<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[178965] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/178965">178965</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2015-01-22 15:46:41 -0800 (Thu, 22 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Win] Expose missing editing features through WebView interface
https://bugs.webkit.org/show_bug.cgi?id=140773
&lt;rdar://problem/19565421&gt;

Reviewed by Dean Jackson.

Connect the various WebView editing delegate methods to our
test infrastructure. Also prefer _bstr_t to raw BSTR types
to simplify life cycle management.

Source/WebKit/win:

* DOMCoreClasses.cpp: Flesh out the DOMRange object.
(DOMElement::createInstance):
(DOMRange::QueryInterface):
(DOMRange::DOMRange):
(DOMRange::~DOMRange):
(DOMRange::createInstance):
(DOMRange::startContainer):
(DOMRange::startOffset):
(DOMRange::endContainer):
(DOMRange::endOffset):
(DOMRange::collapsed):
(DOMRange::commonAncestorContainer):
(DOMRange::setStart):
(DOMRange::setEnd):
(DOMRange::setStartBefore):
(DOMRange::setStartAfter):
(DOMRange::setEndBefore):
(DOMRange::setEndAfter):
(DOMRange::collapse):
(DOMRange::selectNode):
(DOMRange::selectNodeContents):
(DOMRange::compareBoundaryPoints):
(DOMRange::deleteContents):
(DOMRange::extractContents):
(DOMRange::cloneContents):
(DOMRange::insertNode):
(DOMRange::surroundContents):
(DOMRange::cloneRange):
(DOMRange::toString):
(DOMRange::detach):
* DOMCoreClasses.h:
(DOMRange::AddRef):
(DOMRange::Release):
(DOMRange::throwException):
(DOMRange::callWebScriptMethod):
(DOMRange::evaluateWebScript):
(DOMRange::removeWebScriptKey):
(DOMRange::stringRepresentation):
(DOMRange::webScriptValueAtIndex):
(DOMRange::setWebScriptValueAtIndex):
(DOMRange::setException):
* Interfaces/IWebEditingDelegate.idl:
* Interfaces/IWebView.idl:
* WebCoreSupport/WebEditorClient.cpp: Connect more methods
to actual editing features in WebCore.
(WebEditorClient::shouldBeginEditing):
(WebEditorClient::shouldEndEditing):
(WebEditorClient::didBeginEditing):
(WebEditorClient::respondToChangedContents):
(WebEditorClient::respondToChangedSelection):
(WebEditorClient::didEndEditing):
(WebEditorClient::shouldDeleteRange):
(WebEditorClient::shouldInsertNode):
(WebEditorClient::shouldInsertText):
(WebEditorClient::shouldChangeSelectedRange):
(WebEditorClient::webViewDidChangeTypingStyle):
(WebEditorClient::webViewDidChangeSelection):
(WebEditorClient::isSelectTrailingWhitespaceEnabled):
* WebView.cpp:
(WebView::setEditingDelegate): Added.

Tools:

* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebViewToConsistentStateBeforeTesting):
* DumpRenderTree/win/EditingDelegate.cpp:
(EditingDelegate::QueryInterface):
(dumpPath):
(dump):
(EditingDelegate::shouldBeginEditingInDOMRange):
(EditingDelegate::shouldEndEditingInDOMRange):
(EditingDelegate::shouldInsertNode):
(EditingDelegate::shouldInsertText):
(EditingDelegate::shouldDeleteDOMRange):
(EditingDelegate::shouldChangeSelectedDOMRange):
(EditingDelegate::shouldApplyStyle):
(EditingDelegate::shouldChangeTypingStyle):
(EditingDelegate::doPlatformCommand):
(EditingDelegate::webViewDidBeginEditing):
(EditingDelegate::webViewDidChange):
(EditingDelegate::webViewDidEndEditing):
(EditingDelegate::webViewDidChangeTypingStyle):
(EditingDelegate::webViewDidChangeSelection):
(EditingDelegate::checkSpellingOfString):
(EditingDelegate::onNotify):
* DumpRenderTree/win/EditingDelegate.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinDOMCoreClassescpp">trunk/Source/WebKit/win/DOMCoreClasses.cpp</a></li>
<li><a href="#trunkSourceWebKitwinDOMCoreClassesh">trunk/Source/WebKit/win/DOMCoreClasses.h</a></li>
<li><a href="#trunkSourceWebKitwinInterfacesIWebEditingDelegateidl">trunk/Source/WebKit/win/Interfaces/IWebEditingDelegate.idl</a></li>
<li><a href="#trunkSourceWebKitwinInterfacesIWebViewidl">trunk/Source/WebKit/win/Interfaces/IWebView.idl</a></li>
<li><a href="#trunkSourceWebKitwinWebCoreSupportWebEditorClientcpp">trunk/Source/WebKit/win/WebCoreSupport/WebEditorClient.cpp</a></li>
<li><a href="#trunkSourceWebKitwinWebViewcpp">trunk/Source/WebKit/win/WebView.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreewinDumpRenderTreecpp">trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinEditingDelegatecpp">trunk/Tools/DumpRenderTree/win/EditingDelegate.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinEditingDelegateh">trunk/Tools/DumpRenderTree/win/EditingDelegate.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (178964 => 178965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2015-01-22 23:42:46 UTC (rev 178964)
+++ trunk/Source/WebKit/win/ChangeLog        2015-01-22 23:46:41 UTC (rev 178965)
</span><span class="lines">@@ -1,3 +1,76 @@
</span><ins>+2015-01-22  Brent Fulgham  &lt;bfulgham@apple.com&gt;
+
+        [Win] Expose missing editing features through WebView interface
+        https://bugs.webkit.org/show_bug.cgi?id=140773
+        &lt;rdar://problem/19565421&gt;
+
+        Reviewed by Dean Jackson.
+
+        Connect the various WebView editing delegate methods to our
+        test infrastructure. Also prefer _bstr_t to raw BSTR types
+        to simplify life cycle management.
+
+        * DOMCoreClasses.cpp: Flesh out the DOMRange object.
+        (DOMElement::createInstance):
+        (DOMRange::QueryInterface):
+        (DOMRange::DOMRange):
+        (DOMRange::~DOMRange):
+        (DOMRange::createInstance):
+        (DOMRange::startContainer):
+        (DOMRange::startOffset):
+        (DOMRange::endContainer):
+        (DOMRange::endOffset):
+        (DOMRange::collapsed):
+        (DOMRange::commonAncestorContainer):
+        (DOMRange::setStart):
+        (DOMRange::setEnd):
+        (DOMRange::setStartBefore):
+        (DOMRange::setStartAfter):
+        (DOMRange::setEndBefore):
+        (DOMRange::setEndAfter):
+        (DOMRange::collapse):
+        (DOMRange::selectNode):
+        (DOMRange::selectNodeContents):
+        (DOMRange::compareBoundaryPoints):
+        (DOMRange::deleteContents):
+        (DOMRange::extractContents):
+        (DOMRange::cloneContents):
+        (DOMRange::insertNode):
+        (DOMRange::surroundContents):
+        (DOMRange::cloneRange):
+        (DOMRange::toString):
+        (DOMRange::detach):
+        * DOMCoreClasses.h:
+        (DOMRange::AddRef):
+        (DOMRange::Release):
+        (DOMRange::throwException):
+        (DOMRange::callWebScriptMethod):
+        (DOMRange::evaluateWebScript):
+        (DOMRange::removeWebScriptKey):
+        (DOMRange::stringRepresentation):
+        (DOMRange::webScriptValueAtIndex):
+        (DOMRange::setWebScriptValueAtIndex):
+        (DOMRange::setException):
+        * Interfaces/IWebEditingDelegate.idl:
+        * Interfaces/IWebView.idl:
+        * WebCoreSupport/WebEditorClient.cpp: Connect more methods
+        to actual editing features in WebCore.
+        (WebEditorClient::shouldBeginEditing):
+        (WebEditorClient::shouldEndEditing):
+        (WebEditorClient::didBeginEditing):
+        (WebEditorClient::respondToChangedContents):
+        (WebEditorClient::respondToChangedSelection):
+        (WebEditorClient::didEndEditing):
+        (WebEditorClient::shouldDeleteRange):
+        (WebEditorClient::shouldInsertNode):
+        (WebEditorClient::shouldInsertText):
+        (WebEditorClient::shouldChangeSelectedRange):
+        (WebEditorClient::webViewDidChangeTypingStyle):
+        (WebEditorClient::webViewDidChangeSelection):
+        (WebEditorClient::isSelectTrailingWhitespaceEnabled):
+        * WebView.cpp:
+        (WebView::setEditingDelegate): Added.
+
</ins><span class="cx"> 2015-01-21  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Win] eventSender does not support scalePageBy
</span></span></pre></div>
<a id="trunkSourceWebKitwinDOMCoreClassescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/DOMCoreClasses.cpp (178964 => 178965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/DOMCoreClasses.cpp        2015-01-22 23:42:46 UTC (rev 178964)
+++ trunk/Source/WebKit/win/DOMCoreClasses.cpp        2015-01-22 23:46:41 UTC (rev 178965)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006, 2007, 2009 Apple Inc.  All rights reserved.
</del><ins>+ * Copyright (C) 2006, 2007, 2009, 2014-2015 Apple Inc.  All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx"> #include &lt;WebCore/HTMLSelectElement.h&gt;
</span><span class="cx"> #include &lt;WebCore/HTMLTextAreaElement.h&gt;
</span><span class="cx"> #include &lt;WebCore/NodeList.h&gt;
</span><ins>+#include &lt;WebCore/Range.h&gt;
</ins><span class="cx"> #include &lt;WebCore/RenderElement.h&gt;
</span><span class="cx"> #include &lt;WebCore/RenderTreeAsText.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -1530,3 +1531,212 @@
</span><span class="cx"> 
</span><span class="cx">     return domElement;
</span><span class="cx"> }
</span><ins>+
+// DOMRange - IUnknown -----------------------------------------------------
+
+HRESULT DOMRange::QueryInterface(REFIID riid, void** ppvObject)
+{
+    *ppvObject = nullptr;
+    if (IsEqualGUID(riid, IID_IDOMRange))
+        *ppvObject = static_cast&lt;IDOMRange*&gt;(this);
+    else
+        return DOMObject::QueryInterface(riid, ppvObject);
+
+    AddRef();
+    return S_OK;
+}
+
+// DOMRange ----------------------------------------------------------------- 
+
+DOMRange::DOMRange(WebCore::Range* e)
+    : m_range(e)
+{
+}
+
+DOMRange::~DOMRange()
+{
+}
+
+IDOMRange* DOMRange::createInstance(WebCore::Range* range)
+{
+    if (!range)
+        return nullptr;
+
+    DOMRange* newRange = new DOMRange(range);
+
+    IDOMRange* domRange = nullptr;
+    if (FAILED(newRange-&gt;QueryInterface(IID_IDOMRange, reinterpret_cast&lt;void**&gt;(&amp;domRange))))
+        return nullptr;
+
+    return newRange;
+}
+
+HRESULT DOMRange::startContainer(IDOMNode** node)
+{
+    if (!node)
+        return E_POINTER;
+
+    if (!m_range)
+        return E_UNEXPECTED;
+
+    *node = DOMNode::createInstance(m_range-&gt;startContainer());
+
+    return S_OK;
+}
+
+HRESULT DOMRange::startOffset(int* offset)
+{
+    if (!offset)
+        return E_POINTER;
+
+    if (!m_range)
+        return E_UNEXPECTED;
+
+    *offset = m_range-&gt;startOffset();
+
+    return S_OK;
+}
+
+HRESULT DOMRange::endContainer(IDOMNode** node)
+{
+    if (!node)
+        return E_POINTER;
+
+    if (!m_range)
+        return E_UNEXPECTED;
+
+    *node = DOMNode::createInstance(m_range-&gt;endContainer());
+
+    return S_OK;
+}
+
+HRESULT DOMRange::endOffset(int* offset)
+{
+    if (!offset)
+        return E_POINTER;
+
+    if (!m_range)
+        return E_UNEXPECTED;
+
+    *offset = m_range-&gt;endOffset();
+
+    return S_OK;
+}
+
+HRESULT DOMRange::collapsed(BOOL* result)
+{
+    if (!result)
+        return E_POINTER;
+
+    if (!m_range)
+        return E_UNEXPECTED;
+
+    WebCore::ExceptionCode ec = 0;
+    *result = m_range-&gt;collapsed(ec);
+
+    return S_OK;
+}
+
+HRESULT DOMRange::commonAncestorContainer(IDOMNode** container)
+{
+    return E_NOTIMPL;
+}
+
+HRESULT DOMRange::setStart(IDOMNode* refNode, int offset)
+{
+    return E_NOTIMPL;
+}
+
+HRESULT DOMRange::setEnd(IDOMNode* refNode, int offset)
+{
+    return E_NOTIMPL;
+}
+
+HRESULT DOMRange::setStartBefore(IDOMNode* refNode)
+{
+    return E_NOTIMPL;
+}
+
+HRESULT DOMRange::setStartAfter(IDOMNode* refNode)
+{
+    return E_NOTIMPL;
+}
+
+HRESULT DOMRange::setEndBefore(IDOMNode* refNode)
+{
+    return E_NOTIMPL;
+}
+
+HRESULT DOMRange::setEndAfter(IDOMNode* refNode)
+{
+    return E_NOTIMPL;
+}
+
+HRESULT DOMRange::collapse(BOOL toStart)
+{
+    return E_NOTIMPL;
+}
+
+HRESULT DOMRange::selectNode(IDOMNode* refNode)
+{
+    return E_NOTIMPL;
+}
+
+HRESULT DOMRange::selectNodeContents(IDOMNode* refNode)
+{
+    return E_NOTIMPL;
+}
+
+HRESULT DOMRange::compareBoundaryPoints(unsigned short how, IDOMRange* sourceRange)
+{
+    return E_NOTIMPL;
+}
+
+HRESULT DOMRange::deleteContents()
+{
+    return E_NOTIMPL;
+}
+
+HRESULT DOMRange::extractContents(IDOMDocumentFragment** fragment)
+{
+    return E_NOTIMPL;
+}
+
+HRESULT DOMRange::cloneContents(IDOMDocumentFragment** fragment)
+{
+    return E_NOTIMPL;
+}
+
+HRESULT DOMRange::insertNode(IDOMNode* newNode)
+{
+    return E_NOTIMPL;
+}
+
+HRESULT DOMRange::surroundContents(IDOMNode* newParent)
+{
+    return E_NOTIMPL;
+}
+
+HRESULT DOMRange::cloneRange(IDOMRange** range)
+{
+    return E_NOTIMPL;
+}
+
+HRESULT DOMRange::toString(BSTR* str)
+{
+    if (!str)
+        return E_POINTER;
+
+    if (!m_range)
+        return E_UNEXPECTED;
+
+    WebCore::ExceptionCode ec = 0;
+    *str = BString(m_range-&gt;toString(ec)).release();
+
+    return S_OK;
+}
+
+HRESULT DOMRange::detach()
+{
+    return E_NOTIMPL;
+}
</ins></span></pre></div>
<a id="trunkSourceWebKitwinDOMCoreClassesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/DOMCoreClasses.h (178964 => 178965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/DOMCoreClasses.h        2015-01-22 23:42:46 UTC (rev 178964)
+++ trunk/Source/WebKit/win/DOMCoreClasses.h        2015-01-22 23:46:41 UTC (rev 178965)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006, 2007 Apple Inc.  All rights reserved.
</del><ins>+ * Copyright (C) 2006, 2007, 2014 Apple Inc.  All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> class DOMWindow;
</span><span class="cx"> class Node;
</span><span class="cx"> class NodeList;
</span><ins>+class Range;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -925,4 +926,87 @@
</span><span class="cx">     WebCore::Element* m_element;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+class DOMRange : public DOMObject, public IDOMRange {
+protected:
+    DOMRange(WebCore::Range*);
+    ~DOMRange();
+
+public:
+    static IDOMRange* createInstance(WebCore::Range*);
+
+public:
+    // IUnknown
+    virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
+    virtual ULONG STDMETHODCALLTYPE AddRef(void) { return DOMObject::AddRef(); }
+    virtual ULONG STDMETHODCALLTYPE Release(void) { return DOMObject::Release(); }
+
+    // IWebScriptObject
+    virtual HRESULT STDMETHODCALLTYPE throwException(BSTR exceptionMessage, BOOL* result)
+    {
+        return DOMObject::throwException(exceptionMessage, result);
+    }
+
+    virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod(BSTR name, const VARIANT args[], int cArgs, VARIANT* result)
+    {
+        return DOMObject::callWebScriptMethod(name, args, cArgs, result);
+    }
+
+    virtual HRESULT STDMETHODCALLTYPE evaluateWebScript(BSTR script, VARIANT* result)
+    {
+        return DOMObject::evaluateWebScript(script, result);
+    }
+
+    virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey(BSTR name)
+    {
+        return DOMObject::removeWebScriptKey(name);
+    }
+
+    virtual HRESULT STDMETHODCALLTYPE stringRepresentation(BSTR* stringRepresentation)
+    {
+        return DOMObject::stringRepresentation(stringRepresentation);
+    }
+
+    virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex(unsigned index, VARIANT* result)
+    {
+        return DOMObject::webScriptValueAtIndex(index, result);
+    }
+
+    virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex(unsigned index, VARIANT val)
+    {
+        return DOMObject::setWebScriptValueAtIndex(index, val);
+    }
+
+    virtual HRESULT STDMETHODCALLTYPE setException(BSTR description)
+    {
+        return DOMObject::setException(description);
+    }
+
+    virtual HRESULT STDMETHODCALLTYPE startContainer(IDOMNode**);
+    virtual HRESULT STDMETHODCALLTYPE startOffset(int*);
+    virtual HRESULT STDMETHODCALLTYPE endContainer(IDOMNode**);
+    virtual HRESULT STDMETHODCALLTYPE endOffset(int*);
+    virtual HRESULT STDMETHODCALLTYPE collapsed(BOOL*);
+    virtual HRESULT STDMETHODCALLTYPE commonAncestorContainer(IDOMNode**);
+    virtual HRESULT STDMETHODCALLTYPE setStart(IDOMNode*, int offset);
+    virtual HRESULT STDMETHODCALLTYPE setEnd(IDOMNode*, int offset);
+    virtual HRESULT STDMETHODCALLTYPE setStartBefore(IDOMNode*);
+    virtual HRESULT STDMETHODCALLTYPE setStartAfter(IDOMNode*);
+    virtual HRESULT STDMETHODCALLTYPE setEndBefore(IDOMNode*);
+    virtual HRESULT STDMETHODCALLTYPE setEndAfter(IDOMNode*);
+    virtual HRESULT STDMETHODCALLTYPE collapse(BOOL);
+    virtual HRESULT STDMETHODCALLTYPE selectNode(IDOMNode*);
+    virtual HRESULT STDMETHODCALLTYPE selectNodeContents(IDOMNode*);
+    virtual HRESULT STDMETHODCALLTYPE compareBoundaryPoints(unsigned short how, IDOMRange* sourceRange);
+    virtual HRESULT STDMETHODCALLTYPE deleteContents();
+    virtual HRESULT STDMETHODCALLTYPE extractContents(IDOMDocumentFragment**);
+    virtual HRESULT STDMETHODCALLTYPE cloneContents(IDOMDocumentFragment**);
+    virtual HRESULT STDMETHODCALLTYPE insertNode(IDOMNode*);
+    virtual HRESULT STDMETHODCALLTYPE surroundContents(IDOMNode* newParent);
+    virtual HRESULT STDMETHODCALLTYPE cloneRange(IDOMRange**);
+    virtual HRESULT STDMETHODCALLTYPE toString(BSTR*);
+    virtual HRESULT STDMETHODCALLTYPE detach();
+
+protected:
+    WebCore::Range* m_range;
+};
</ins><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKitwinInterfacesIWebEditingDelegateidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/Interfaces/IWebEditingDelegate.idl (178964 => 178965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/Interfaces/IWebEditingDelegate.idl        2015-01-22 23:42:46 UTC (rev 178964)
+++ trunk/Source/WebKit/win/Interfaces/IWebEditingDelegate.idl        2015-01-22 23:46:41 UTC (rev 178965)
</span><span class="lines">@@ -113,7 +113,7 @@
</span><span class="cx">     /*
</span><span class="cx">         - (BOOL)webView:(WebView *)webView shouldInsertNode:(DOMNode *)node replacingDOMRange:(DOMRange *)range givenAction:(WebViewInsertAction)action;
</span><span class="cx">     */
</span><del>-    HRESULT shouldInsertNode([in] IWebView* webView, [in] IDOMNode* node, [in] IDOMRange* range, [in] WebViewInsertAction action);
</del><ins>+    HRESULT shouldInsertNode([in] IWebView* webView, [in] IDOMNode* node, [in] IDOMRange* range, [in] WebViewInsertAction action, [out, retval] BOOL* result);
</ins><span class="cx"> 
</span><span class="cx">     /*
</span><span class="cx">         - (BOOL)webView:(WebView *)webView shouldInsertText:(NSString *)text replacingDOMRange:(DOMRange *)range givenAction:(WebViewInsertAction)action;
</span></span></pre></div>
<a id="trunkSourceWebKitwinInterfacesIWebViewidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/Interfaces/IWebView.idl (178964 => 178965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/Interfaces/IWebView.idl        2015-01-22 23:42:46 UTC (rev 178964)
+++ trunk/Source/WebKit/win/Interfaces/IWebView.idl        2015-01-22 23:46:41 UTC (rev 178965)
</span><span class="lines">@@ -30,6 +30,10 @@
</span><span class="cx"> cpp_quote(&quot;#define WebViewProgressEstimateChangedNotification TEXT(\&quot;WebProgressEstimateChangedNotification\&quot;)&quot;)
</span><span class="cx"> cpp_quote(&quot;#define WebViewProgressFinishedNotification TEXT(\&quot;WebProgressFinishedNotification\&quot;)&quot;)
</span><span class="cx"> cpp_quote(&quot;#define WebViewDidChangeSelectionNotification TEXT(\&quot;WebViewDidChangeSelectionNotification\&quot;)&quot;)
</span><ins>+cpp_quote(&quot;#define WebViewDidBeginEditingNotification TEXT(\&quot;WebViewDidBeginEditingNotification\&quot;)&quot;)
+cpp_quote(&quot;#define WebViewDidEndEditingNotification TEXT(\&quot;WebViewDidEndEditingNotification\&quot;)&quot;)
+cpp_quote(&quot;#define WebViewDidChangeTypingStyleNotification TEXT(\&quot;WebViewDidChangeTypingStyleNotification\&quot;)&quot;)
+cpp_quote(&quot;#define WebViewDidChangeNotification TEXT(\&quot;WebViewDidChangeNotification\&quot;)&quot;)
</ins><span class="cx"> 
</span><span class="cx"> #ifndef DO_NO_IMPORTS
</span><span class="cx"> import &quot;oaidl.idl&quot;;
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportWebEditorClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebCoreSupport/WebEditorClient.cpp (178964 => 178965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/WebEditorClient.cpp        2015-01-22 23:42:46 UTC (rev 178964)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebEditorClient.cpp        2015-01-22 23:46:41 UTC (rev 178965)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006, 2007, 2011 Apple Inc.  All rights reserved.
</del><ins>+ * Copyright (C) 2006, 2007, 2011, 2014 Apple Inc.  All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include &quot;WebNotificationCenter.h&quot;
</span><span class="cx"> #include &quot;WebView.h&quot;
</span><span class="cx"> #include &quot;DOMCoreClasses.h&quot;
</span><ins>+#include &lt;comutil.h&gt;
</ins><span class="cx"> #include &lt;WebCore/BString.h&gt;
</span><span class="cx"> #include &lt;WebCore/Document.h&gt;
</span><span class="cx"> #include &lt;WebCore/HTMLElement.h&gt;
</span><span class="lines">@@ -188,35 +189,57 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebEditorClient::shouldBeginEditing(Range*)
</del><ins>+bool WebEditorClient::shouldBeginEditing(WebCore::Range* range)
</ins><span class="cx"> {
</span><del>-    notImplemented();
-    return true;
</del><ins>+    COMPtr&lt;IWebEditingDelegate&gt; ed;
+    if (FAILED(m_webView-&gt;editingDelegate(&amp;ed)) || !ed.get())
+        return true;
+
+    COMPtr&lt;IDOMRange&gt; currentRange(AdoptCOM, DOMRange::createInstance(range));
+
+    BOOL shouldBegin = FALSE;
+    if (FAILED(ed-&gt;shouldBeginEditingInDOMRange(m_webView, currentRange.get(), &amp;shouldBegin)))
+        return true;
+
+    return shouldBegin;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebEditorClient::shouldEndEditing(Range*)
</del><ins>+bool WebEditorClient::shouldEndEditing(Range* range)
</ins><span class="cx"> {
</span><del>-    notImplemented();
-    return true;
</del><ins>+    COMPtr&lt;IWebEditingDelegate&gt; ed;
+    if (FAILED(m_webView-&gt;editingDelegate(&amp;ed)) || !ed.get())
+        return true;
+
+    COMPtr&lt;IDOMRange&gt; currentRange(AdoptCOM, DOMRange::createInstance(range));
+
+    BOOL shouldEnd = FALSE;
+    if (FAILED(ed-&gt;shouldEndEditingInDOMRange(m_webView, currentRange.get(), &amp;shouldEnd)))
+        return true;
+
+    return shouldEnd;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebEditorClient::didBeginEditing()
</span><span class="cx"> {
</span><del>-    notImplemented();
</del><ins>+    static _bstr_t webViewDidBeginEditingNotificationName(WebViewDidBeginEditingNotification);
+    IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal();
+    notifyCenter-&gt;postNotificationName(webViewDidBeginEditingNotificationName.GetBSTR(), static_cast&lt;IWebView*&gt;(m_webView), nullptr);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebEditorClient::respondToChangedContents()
</span><span class="cx"> {
</span><del>-    notImplemented();
</del><ins>+    static _bstr_t webViewDidChangeNotificationName(WebViewDidChangeNotification);
+    IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal();
+    notifyCenter-&gt;postNotificationName(webViewDidChangeNotificationName.GetBSTR(), static_cast&lt;IWebView*&gt;(m_webView), 0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebEditorClient::respondToChangedSelection(Frame*)
</span><span class="cx"> {
</span><span class="cx">     m_webView-&gt;selectionChanged();
</span><span class="cx"> 
</span><del>-    static BSTR webViewDidChangeSelectionNotificationName = SysAllocString(WebViewDidChangeSelectionNotification);
</del><ins>+    static _bstr_t webViewDidChangeSelectionNotificationName(WebViewDidChangeSelectionNotification);
</ins><span class="cx">     IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal();
</span><del>-    notifyCenter-&gt;postNotificationName(webViewDidChangeSelectionNotificationName, static_cast&lt;IWebView*&gt;(m_webView), 0);
</del><ins>+    notifyCenter-&gt;postNotificationName(webViewDidChangeSelectionNotificationName.GetBSTR(), static_cast&lt;IWebView*&gt;(m_webView), 0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebEditorClient::discardedComposition(Frame*)
</span><span class="lines">@@ -226,7 +249,9 @@
</span><span class="cx"> 
</span><span class="cx"> void WebEditorClient::didEndEditing()
</span><span class="cx"> {
</span><del>-    notImplemented();
</del><ins>+    static _bstr_t webViewDidEndEditingNotificationName(WebViewDidEndEditingNotification);
+    IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal();
+    notifyCenter-&gt;postNotificationName(webViewDidEndEditingNotificationName.GetBSTR(), static_cast&lt;IWebView*&gt;(m_webView), nullptr);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebEditorClient::didWriteSelectionToPasteboard()
</span><span class="lines">@@ -244,50 +269,76 @@
</span><span class="cx">     notImplemented();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebEditorClient::shouldDeleteRange(Range* /*range*/)
</del><ins>+bool WebEditorClient::shouldDeleteRange(Range* range)
</ins><span class="cx"> {
</span><del>-    notImplemented(); 
-    return true; 
</del><ins>+    COMPtr&lt;IWebEditingDelegate&gt; ed;
+    if (FAILED(m_webView-&gt;editingDelegate(&amp;ed)) || !ed.get())
+        return true;
</ins><span class="cx"> 
</span><del>-    // FIXME: calling m_webView-&gt;editingDelegate() will cause an assertion failure so we don't want to enable this code until that's implemented. 
-    //BOOL result = false;
-    //IWebViewEditingDelegate* editingDelegate;
-    //// FIXME: DOMRange needs to be implemented before anything meaningful can be done here
-    //IDOMRange* domRange(0);
-    //if (SUCCEEDED(m_webView-&gt;editingDelegate(&amp;editingDelegate))) {
-    //    editingDelegate-&gt;shouldDeleteDOMRange(m_webView, domRange, &amp;result);
-    //    editingDelegate-&gt;Release();
-    //}
-    //return !!result;
</del><ins>+    COMPtr&lt;IDOMRange&gt; currentRange(AdoptCOM, DOMRange::createInstance(range));
+
+    BOOL shouldDelete = FALSE;
+    if (FAILED(ed-&gt;shouldDeleteDOMRange(m_webView, currentRange.get(), &amp;shouldDelete)))
+        return true;
+
+    return shouldDelete;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebEditorClient::shouldInsertNode(Node* /*node*/, Range* /*replacingRange*/, EditorInsertAction /*givenAction*/)
</del><ins>+bool WebEditorClient::shouldInsertNode(Node* node, Range* insertingRange, EditorInsertAction givenAction)
</ins><span class="cx"> { 
</span><del>-    notImplemented(); 
-    return true; 
</del><ins>+    COMPtr&lt;IWebEditingDelegate&gt; editingDelegate;
+    if (FAILED(m_webView-&gt;editingDelegate(&amp;editingDelegate)) || !editingDelegate.get())
+        return true;
+
+    COMPtr&lt;IDOMRange&gt; insertingDOMRange(AdoptCOM, DOMRange::createInstance(insertingRange));
+    if (!insertingDOMRange)
+        return true;
+
+    COMPtr&lt;IDOMNode&gt; insertDOMNode(AdoptCOM, DOMNode::createInstance(node));
+    if (!insertDOMNode)
+        return true;
+
+    BOOL shouldInsert = FALSE;
+    if (FAILED(editingDelegate-&gt;shouldInsertNode(m_webView, insertDOMNode.get(), insertingDOMRange.get(), static_cast&lt;WebViewInsertAction&gt;(givenAction), &amp;shouldInsert)))
+        return true;
+
+    return shouldInsert;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebEditorClient::shouldInsertText(const String&amp; /*str*/, Range* /* replacingRange */, EditorInsertAction /*givenAction*/)
-{     
-    notImplemented(); 
-    return true; 
</del><ins>+bool WebEditorClient::shouldInsertText(const String&amp; str, Range* insertingRange, EditorInsertAction givenAction)
+{
+    COMPtr&lt;IWebEditingDelegate&gt; editingDelegate;
+    if (FAILED(m_webView-&gt;editingDelegate(&amp;editingDelegate)) || !editingDelegate.get())
+        return true;
</ins><span class="cx"> 
</span><del>-    // FIXME: calling m_webView-&gt;editingDelegate() will cause an assertion failure so we don't want to enable this code until that's implemented. 
-    //BOOL result = false;
-    //IWebViewEditingDelegate* editingDelegate;
-    //// FIXME: DOMRange needs to be implemented before anything meaningful can be done here
-    //IDOMRange* domRange(0); // make a DOMRange from replacingRange
-    //BString text(str);
-    //if (SUCCEEDED(m_webView-&gt;editingDelegate(&amp;editingDelegate))) {
-    //    editingDelegate-&gt;shouldInsertText(m_webView, text, domRange, (WebViewInsertAction) givenAction, &amp;result);
-    //    editingDelegate-&gt;Release();
-    //}
-    //return !!result;
</del><ins>+    COMPtr&lt;IDOMRange&gt; insertingDOMRange(AdoptCOM, DOMRange::createInstance(insertingRange));
+    if (!insertingDOMRange)
+        return true;
+
+    BString text(str);
+    BOOL shouldInsert = FALSE;
+    if (FAILED(editingDelegate-&gt;shouldInsertText(m_webView, text, insertingDOMRange.get(), static_cast&lt;WebViewInsertAction&gt;(givenAction), &amp;shouldInsert)))
+        return true;
+
+    return shouldInsert;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-//bool WebEditorClient::shouldChangeSelectedRange(Range *currentRange, Range *toProposedRange, SelectionAffinity selectionAffinity, bool stillSelecting)
-//{ notImplemented(); return false; }
</del><ins>+bool WebEditorClient::shouldChangeSelectedRange(WebCore::Range* currentRange, WebCore::Range* proposedRange, WebCore::EAffinity selectionAffinity, bool flag)
+{
+    COMPtr&lt;IWebEditingDelegate&gt; ed;
+    if (FAILED(m_webView-&gt;editingDelegate(&amp;ed)) || !ed.get())
+        return true;
</ins><span class="cx"> 
</span><ins>+    COMPtr&lt;IDOMRange&gt; currentIDOMRange(AdoptCOM, DOMRange::createInstance(currentRange));
+    COMPtr&lt;IDOMRange&gt; proposedIDOMRange(AdoptCOM, DOMRange::createInstance(proposedRange));
+
+    BOOL shouldChange = FALSE;
+    if (FAILED(ed-&gt;shouldChangeSelectedDOMRange(m_webView, currentIDOMRange.get(), proposedIDOMRange.get(), static_cast&lt;WebSelectionAffinity&gt;(selectionAffinity), flag, &amp;shouldChange)))
+        return true;
+
+    return shouldChange;
+}
+
</ins><span class="cx"> bool WebEditorClient::shouldApplyStyle(StyleProperties* /*style*/, Range* /*toElementsInDOMRange*/)
</span><span class="cx"> { notImplemented(); return true; }
</span><span class="cx"> 
</span><span class="lines">@@ -298,10 +349,14 @@
</span><span class="cx"> { notImplemented(); return false; }
</span><span class="cx"> 
</span><span class="cx"> void WebEditorClient::webViewDidChangeTypingStyle(WebNotification* /*notification*/)
</span><del>-{  notImplemented(); }
</del><ins>+{
+    notImplemented();
+}
</ins><span class="cx"> 
</span><span class="cx"> void WebEditorClient::webViewDidChangeSelection(WebNotification* /*notification*/)
</span><del>-{  notImplemented(); }
</del><ins>+{
+    notImplemented();
+}
</ins><span class="cx"> 
</span><span class="cx"> bool WebEditorClient::smartInsertDeleteEnabled(void)
</span><span class="cx"> {
</span><span class="lines">@@ -319,9 +374,6 @@
</span><span class="cx">     return page-&gt;settings().selectTrailingWhitespaceEnabled();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebEditorClient::shouldChangeSelectedRange(WebCore::Range*, WebCore::Range*, WebCore::EAffinity, bool)
-{ notImplemented(); return true; }
-
</del><span class="cx"> void WebEditorClient::textFieldDidBeginEditing(Element* e)
</span><span class="cx"> {
</span><span class="cx">     IWebFormDelegate* formDelegate;
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebView.cpp (178964 => 178965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebView.cpp        2015-01-22 23:42:46 UTC (rev 178964)
+++ trunk/Source/WebKit/win/WebView.cpp        2015-01-22 23:46:41 UTC (rev 178965)
</span><span class="lines">@@ -4340,10 +4340,39 @@
</span><span class="cx">     return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="cx">     
</span><del>-HRESULT STDMETHODCALLTYPE WebView::setEditingDelegate( 
-        /* [in] */ IWebEditingDelegate* d)
</del><ins>+HRESULT WebView::setEditingDelegate(IWebEditingDelegate* d)
</ins><span class="cx"> {
</span><ins>+    if (m_editingDelegate == d)
+        return S_OK;
+
+    static BSTR webViewDidBeginEditingNotificationName = SysAllocString(WebViewDidBeginEditingNotification);
+    static BSTR webViewDidChangeSelectionNotificationName = SysAllocString(WebViewDidChangeSelectionNotification);
+    static BSTR webViewDidEndEditingNotificationName = SysAllocString(WebViewDidEndEditingNotification);
+    static BSTR webViewDidChangeTypingStyleNotificationName = SysAllocString(WebViewDidChangeTypingStyleNotification);
+    static BSTR webViewDidChangeNotificationName = SysAllocString(WebViewDidChangeNotification);
+
+    IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal();
+
+    COMPtr&lt;IWebNotificationObserver&gt; wasObserver(Query, m_editingDelegate);
+    if (wasObserver) {
+        notifyCenter-&gt;removeObserver(wasObserver.get(), webViewDidBeginEditingNotificationName, nullptr);
+        notifyCenter-&gt;removeObserver(wasObserver.get(), webViewDidChangeSelectionNotificationName, nullptr);
+        notifyCenter-&gt;removeObserver(wasObserver.get(), webViewDidEndEditingNotificationName, nullptr);
+        notifyCenter-&gt;removeObserver(wasObserver.get(), webViewDidChangeTypingStyleNotificationName, nullptr);
+        notifyCenter-&gt;removeObserver(wasObserver.get(), webViewDidChangeNotificationName, nullptr);
+    }
+
</ins><span class="cx">     m_editingDelegate = d;
</span><ins>+
+    COMPtr&lt;IWebNotificationObserver&gt; isObserver(Query, m_editingDelegate);
+    if (isObserver) {
+        notifyCenter-&gt;addObserver(isObserver.get(), webViewDidBeginEditingNotificationName, nullptr);
+        notifyCenter-&gt;addObserver(isObserver.get(), webViewDidChangeSelectionNotificationName, nullptr);
+        notifyCenter-&gt;addObserver(isObserver.get(), webViewDidEndEditingNotificationName, nullptr);
+        notifyCenter-&gt;addObserver(isObserver.get(), webViewDidChangeTypingStyleNotificationName, nullptr);
+        notifyCenter-&gt;addObserver(isObserver.get(), webViewDidChangeNotificationName, nullptr);
+    }
+
</ins><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (178964 => 178965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-01-22 23:42:46 UTC (rev 178964)
+++ trunk/Tools/ChangeLog        2015-01-22 23:46:41 UTC (rev 178965)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2015-01-22  Brent Fulgham  &lt;bfulgham@apple.com&gt;
+
+        [Win] Expose missing editing features through WebView interface
+        https://bugs.webkit.org/show_bug.cgi?id=140773
+        &lt;rdar://problem/19565421&gt;
+
+        Reviewed by Dean Jackson.
+
+        Connect the various WebView editing delegate methods to our
+        test infrastructure. Also prefer _bstr_t to raw BSTR types
+        to simplify life cycle management.
+
+        * DumpRenderTree/win/DumpRenderTree.cpp:
+        (resetWebViewToConsistentStateBeforeTesting):
+        * DumpRenderTree/win/EditingDelegate.cpp:
+        (EditingDelegate::QueryInterface):
+        (dumpPath):
+        (dump):
+        (EditingDelegate::shouldBeginEditingInDOMRange):
+        (EditingDelegate::shouldEndEditingInDOMRange):
+        (EditingDelegate::shouldInsertNode):
+        (EditingDelegate::shouldInsertText):
+        (EditingDelegate::shouldDeleteDOMRange):
+        (EditingDelegate::shouldChangeSelectedDOMRange):
+        (EditingDelegate::shouldApplyStyle):
+        (EditingDelegate::shouldChangeTypingStyle):
+        (EditingDelegate::doPlatformCommand):
+        (EditingDelegate::webViewDidBeginEditing):
+        (EditingDelegate::webViewDidChange):
+        (EditingDelegate::webViewDidEndEditing):
+        (EditingDelegate::webViewDidChangeTypingStyle):
+        (EditingDelegate::webViewDidChangeSelection):
+        (EditingDelegate::checkSpellingOfString):
+        (EditingDelegate::onNotify):
+        * DumpRenderTree/win/EditingDelegate.h:
+
</ins><span class="cx"> 2015-01-22  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Add a build flag for ES6 class syntax
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinDumpRenderTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp (178964 => 178965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp        2015-01-22 23:42:46 UTC (rev 178964)
+++ trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp        2015-01-22 23:46:41 UTC (rev 178965)
</span><span class="lines">@@ -866,6 +866,19 @@
</span><span class="cx">     if (FAILED(frame-&gt;webView(&amp;webView))) 
</span><span class="cx">         return;
</span><span class="cx"> 
</span><ins>+    COMPtr&lt;IWebViewEditing&gt; viewEditing;
+    if (SUCCEEDED(webView-&gt;QueryInterface(&amp;viewEditing)) &amp;&amp; viewEditing) {
+
+        viewEditing-&gt;setEditable(FALSE);
+
+        COMPtr&lt;IWebEditingDelegate&gt; delegate;
+        if (SUCCEEDED(viewEditing-&gt;editingDelegate(&amp;delegate)) &amp;&amp; delegate) {
+            COMPtr&lt;EditingDelegate&gt; editingDelegate(Query, viewEditing.get());
+            if (editingDelegate)
+                editingDelegate-&gt;setAcceptsEditing(TRUE);
+        }
+    }
+
</ins><span class="cx">     COMPtr&lt;IWebIBActions&gt; webIBActions(Query, webView);
</span><span class="cx">     if (webIBActions) {
</span><span class="cx">         webIBActions-&gt;makeTextStandardSize(0);
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinEditingDelegatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/EditingDelegate.cpp (178964 => 178965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/EditingDelegate.cpp        2015-01-22 23:42:46 UTC (rev 178964)
+++ trunk/Tools/DumpRenderTree/win/EditingDelegate.cpp        2015-01-22 23:46:41 UTC (rev 178965)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2007, 2014 Apple Inc.  All rights reserved.
</del><ins>+ * Copyright (C) 2007, 2014-2015 Apple Inc.  All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> #include &lt;WebCore/COMPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/Assertions.h&gt;
</span><span class="cx"> #include &lt;wtf/Platform.h&gt;
</span><ins>+#include &lt;wtf/StringExtras.h&gt;
</ins><span class="cx"> #include &lt;string&gt;
</span><span class="cx"> #include &lt;tchar.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -54,6 +55,8 @@
</span><span class="cx">         *ppvObject = static_cast&lt;IWebEditingDelegate*&gt;(this);
</span><span class="cx">     else if (IsEqualGUID(riid, IID_IWebEditingDelegate))
</span><span class="cx">         *ppvObject = static_cast&lt;IWebEditingDelegate*&gt;(this);
</span><ins>+    else if (IsEqualGUID(riid, IID_IWebNotificationObserver))
+        *ppvObject = static_cast&lt;IWebNotificationObserver*&gt;(this);
</ins><span class="cx">     else
</span><span class="cx">         return E_NOINTERFACE;
</span><span class="cx"> 
</span><span class="lines">@@ -75,46 +78,47 @@
</span><span class="cx">     return newRef;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static wstring dumpPath(IDOMNode* node)
</del><ins>+static std::string dumpPath(IDOMNode* node)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(node);
</span><span class="cx"> 
</span><del>-    wstring result;
</del><ins>+    std::string result;
</ins><span class="cx"> 
</span><span class="cx">     _bstr_t name;
</span><span class="cx">     if (FAILED(node-&gt;nodeName(&amp;name.GetBSTR())))
</span><span class="cx">         return result;
</span><del>-    result.assign(static_cast&lt;wchar_t*&gt;(name), name.length());
</del><ins>+    result.assign(static_cast&lt;const char*&gt;(name), name.length());
</ins><span class="cx"> 
</span><span class="cx">     COMPtr&lt;IDOMNode&gt; parent;
</span><span class="cx">     if (SUCCEEDED(node-&gt;parentNode(&amp;parent)))
</span><del>-        result += TEXT(&quot; &gt; &quot;) + dumpPath(parent.get());
</del><ins>+        result += &quot; &gt; &quot; + dumpPath(parent.get());
</ins><span class="cx"> 
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static wstring dump(IDOMRange* range)
</del><ins>+static std::string dump(IDOMRange* range)
</ins><span class="cx"> {
</span><del>-    ASSERT(range);
</del><ins>+    if (!range)
+        return std::string();
</ins><span class="cx"> 
</span><span class="cx">     int startOffset;
</span><span class="cx">     if (FAILED(range-&gt;startOffset(&amp;startOffset)))
</span><del>-        return 0;
</del><ins>+        return std::string();
</ins><span class="cx"> 
</span><span class="cx">     int endOffset;
</span><span class="cx">     if (FAILED(range-&gt;endOffset(&amp;endOffset)))
</span><del>-        return 0;
</del><ins>+        return std::string();
</ins><span class="cx"> 
</span><span class="cx">     COMPtr&lt;IDOMNode&gt; startContainer;
</span><span class="cx">     if (FAILED(range-&gt;startContainer(&amp;startContainer)))
</span><del>-        return 0;
</del><ins>+        return std::string();
</ins><span class="cx"> 
</span><span class="cx">     COMPtr&lt;IDOMNode&gt; endContainer;
</span><span class="cx">     if (FAILED(range-&gt;endContainer(&amp;endContainer)))
</span><del>-        return 0;
</del><ins>+        return std::string();
</ins><span class="cx"> 
</span><del>-    wchar_t buffer[1024];
-    _snwprintf(buffer, ARRAYSIZE(buffer), L&quot;range from %ld of %s to %ld of %s&quot;, startOffset, dumpPath(startContainer.get()).c_str(), endOffset, dumpPath(endContainer.get()).c_str());
</del><ins>+    char buffer[1024];
+    snprintf(buffer, ARRAYSIZE(buffer), &quot;range from %ld of %s to %ld of %s&quot;, startOffset, dumpPath(startContainer.get()).c_str(), endOffset, dumpPath(endContainer.get()).c_str());
</ins><span class="cx">     return buffer;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -126,7 +130,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done)
</span><del>-        _tprintf(TEXT(&quot;EDITING DELEGATE: shouldBeginEditingInDOMRange:%s\n&quot;), dump(range).c_str());
</del><ins>+        printf(&quot;EDITING DELEGATE: shouldBeginEditingInDOMRange:%s\n&quot;, dump(range).c_str());
</ins><span class="cx"> 
</span><span class="cx">     *result = m_acceptsEditing;
</span><span class="cx">     return S_OK;
</span><span class="lines">@@ -140,23 +144,24 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done)
</span><del>-        _tprintf(TEXT(&quot;EDITING DELEGATE: shouldEndEditingInDOMRange:%s\n&quot;), dump(range).c_str());
</del><ins>+        printf(&quot;EDITING DELEGATE: shouldEndEditingInDOMRange:%s\n&quot;, dump(range).c_str());
</ins><span class="cx"> 
</span><span class="cx">     *result = m_acceptsEditing;
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-HRESULT EditingDelegate::shouldInsertNode(IWebView* /*webView*/, IDOMNode* node, IDOMRange* range, WebViewInsertAction action)
</del><ins>+HRESULT EditingDelegate::shouldInsertNode(IWebView* /*webView*/, IDOMNode* node, IDOMRange* range, WebViewInsertAction action, BOOL* result)
</ins><span class="cx"> {
</span><del>-    static LPCTSTR insertactionstring[] = {
-        TEXT(&quot;WebViewInsertActionTyped&quot;),
-        TEXT(&quot;WebViewInsertActionPasted&quot;),
-        TEXT(&quot;WebViewInsertActionDropped&quot;),
</del><ins>+    static const char* insertActionString[] = {
+        &quot;WebViewInsertActionTyped&quot;,
+        &quot;WebViewInsertActionPasted&quot;,
+        &quot;WebViewInsertActionDropped&quot;,
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done)
</span><del>-        _tprintf(TEXT(&quot;EDITING DELEGATE: shouldInsertNode:%s replacingDOMRange:%s givenAction:%s\n&quot;), dumpPath(node).c_str(), dump(range).c_str(), insertactionstring[action]);
</del><ins>+        printf(&quot;EDITING DELEGATE: shouldInsertNode:%s replacingDOMRange:%s givenAction:%s\n&quot;, dumpPath(node).c_str(), dump(range).c_str(), insertActionString[action]);
</ins><span class="cx"> 
</span><ins>+    *result = m_acceptsEditing;
</ins><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -167,14 +172,16 @@
</span><span class="cx">         return E_POINTER;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static LPCTSTR insertactionstring[] = {
-        TEXT(&quot;WebViewInsertActionTyped&quot;),
-        TEXT(&quot;WebViewInsertActionPasted&quot;),
-        TEXT(&quot;WebViewInsertActionDropped&quot;),
</del><ins>+    static const char* insertactionstring[] = {
+        &quot;WebViewInsertActionTyped&quot;,
+        &quot;WebViewInsertActionPasted&quot;,
+        &quot;WebViewInsertActionDropped&quot;,
</ins><span class="cx">     };
</span><span class="cx"> 
</span><del>-    if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done)
-        _tprintf(TEXT(&quot;EDITING DELEGATE: shouldInsertText:%s replacingDOMRange:%s givenAction:%s\n&quot;), text ? text : TEXT(&quot;&quot;), dump(range).c_str(), insertactionstring[action]);
</del><ins>+    if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done) {
+        _bstr_t textBstr(text);
+        printf(&quot;EDITING DELEGATE: shouldInsertText:%s replacingDOMRange:%s givenAction:%s\n&quot;, static_cast&lt;const char*&gt;(textBstr), dump(range).c_str(), insertactionstring[action]);
+    }
</ins><span class="cx"> 
</span><span class="cx">     *result = m_acceptsEditing;
</span><span class="cx">     return S_OK;
</span><span class="lines">@@ -188,7 +195,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done)
</span><del>-        _tprintf(TEXT(&quot;EDITING DELEGATE: shouldDeleteDOMRange:%s\n&quot;), dump(range).c_str());
</del><ins>+        printf(&quot;EDITING DELEGATE: shouldDeleteDOMRange:%s\n&quot;, dump(range).c_str());
</ins><span class="cx"> 
</span><span class="cx">     *result = m_acceptsEditing;
</span><span class="cx">     return S_OK;
</span><span class="lines">@@ -202,17 +209,17 @@
</span><span class="cx">         return E_POINTER;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static LPCTSTR affinitystring[] = {
-        TEXT(&quot;NSSelectionAffinityUpstream&quot;),
-        TEXT(&quot;NSSelectionAffinityDownstream&quot;)
</del><ins>+    static const char* affinityString[] = {
+        &quot;NSSelectionAffinityUpstream&quot;,
+        &quot;NSSelectionAffinityDownstream&quot;
</ins><span class="cx">     };
</span><del>-    static LPCTSTR boolstring[] = {
-        TEXT(&quot;FALSE&quot;),
-        TEXT(&quot;TRUE&quot;)
</del><ins>+    static const char* boolstring[] = {
+        &quot;FALSE&quot;,
+        &quot;TRUE&quot;
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done)
</span><del>-        _tprintf(TEXT(&quot;EDITING DELEGATE: shouldChangeSelectedDOMRange:%s toDOMRange:%s affinity:%s stillSelecting:%s\n&quot;), dump(currentRange).c_str(), dump(proposedRange).c_str(), affinitystring[selectionAffinity], boolstring[stillSelecting]);
</del><ins>+        printf(&quot;EDITING DELEGATE: shouldChangeSelectedDOMRange:%s toDOMRange:%s affinity:%s stillSelecting:%s\n&quot;, dump(currentRange).c_str(), dump(proposedRange).c_str(), affinityString[selectionAffinity], boolstring[stillSelecting]);
</ins><span class="cx"> 
</span><span class="cx">     *result = m_acceptsEditing;
</span><span class="cx">     return S_OK;
</span><span class="lines">@@ -226,7 +233,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done)
</span><del>-        _tprintf(TEXT(&quot;EDITING DELEGATE: shouldApplyStyle:%s toElementsInDOMRange:%s\n&quot;), TEXT(&quot;'style description'&quot;)/*[[style description] UTF8String]*/, dump(range).c_str());
</del><ins>+        printf(&quot;EDITING DELEGATE: shouldApplyStyle:%s toElementsInDOMRange:%s\n&quot;, &quot;'style description'&quot;/*[[style description] UTF8String]*/, dump(range).c_str());
</ins><span class="cx"> 
</span><span class="cx">     *result = m_acceptsEditing;
</span><span class="cx">     return S_OK;
</span><span class="lines">@@ -240,7 +247,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done)
</span><del>-        _tprintf(TEXT(&quot;EDITING DELEGATE: shouldChangeTypingStyle:%s toStyle:%s\n&quot;), TEXT(&quot;'currentStyle description'&quot;), TEXT(&quot;'proposedStyle description'&quot;));
</del><ins>+        printf(&quot;EDITING DELEGATE: shouldChangeTypingStyle:%s toStyle:%s\n&quot;, &quot;'currentStyle description'&quot;, &quot;'proposedStyle description'&quot;);
</ins><span class="cx"> 
</span><span class="cx">     *result = m_acceptsEditing;
</span><span class="cx">     return S_OK;
</span><span class="lines">@@ -253,8 +260,10 @@
</span><span class="cx">         return E_POINTER;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done)
-        _tprintf(TEXT(&quot;EDITING DELEGATE: doPlatformCommand:%s\n&quot;), command ? command : TEXT(&quot;&quot;));
</del><ins>+    if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done) {
+        _bstr_t commandBSTR(command);
+        printf(&quot;EDITING DELEGATE: doPlatformCommand:%s\n&quot;, static_cast&lt;const char*&gt;(commandBSTR));
+    }
</ins><span class="cx"> 
</span><span class="cx">     *result = m_acceptsEditing;
</span><span class="cx">     return S_OK;
</span><span class="lines">@@ -265,7 +274,7 @@
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done) {
</span><span class="cx">         _bstr_t name;
</span><span class="cx">         notification-&gt;name(&amp;name.GetBSTR());
</span><del>-        _tprintf(TEXT(&quot;EDITING DELEGATE: webViewDidBeginEditing:%s\n&quot;), static_cast&lt;TCHAR*&gt;(name));
</del><ins>+        printf(&quot;EDITING DELEGATE: webViewDidBeginEditing:%s\n&quot;, static_cast&lt;const char*&gt;(name));
</ins><span class="cx">     }
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="lines">@@ -275,7 +284,7 @@
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done) {
</span><span class="cx">         _bstr_t name;
</span><span class="cx">         notification-&gt;name(&amp;name.GetBSTR());
</span><del>-        _tprintf(TEXT(&quot;EDITING DELEGATE: webViewDidBeginEditing:%s\n&quot;), static_cast&lt;TCHAR*&gt;(name));
</del><ins>+        printf(&quot;EDITING DELEGATE: webViewDidChange:%s\n&quot;, static_cast&lt;const char*&gt;(name));
</ins><span class="cx">     }
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="lines">@@ -285,7 +294,7 @@
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done) {
</span><span class="cx">         _bstr_t name;
</span><span class="cx">         notification-&gt;name(&amp;name.GetBSTR());
</span><del>-        _tprintf(TEXT(&quot;EDITING DELEGATE: webViewDidEndEditing:%s\n&quot;), static_cast&lt;TCHAR*&gt;(name));
</del><ins>+        printf(&quot;EDITING DELEGATE: webViewDidEndEditing:%s\n&quot;, static_cast&lt;const char*&gt;(name));
</ins><span class="cx">     }
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="lines">@@ -295,7 +304,7 @@
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done) {
</span><span class="cx">         _bstr_t name;
</span><span class="cx">         notification-&gt;name(&amp;name.GetBSTR());
</span><del>-        _tprintf(TEXT(&quot;EDITING DELEGATE: webViewDidChangeTypingStyle:%s\n&quot;), static_cast&lt;TCHAR*&gt;(name));
</del><ins>+        printf(&quot;EDITING DELEGATE: webViewDidChangeTypingStyle:%s\n&quot;, static_cast&lt;const char*&gt;(name));
</ins><span class="cx">     }
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="lines">@@ -305,7 +314,7 @@
</span><span class="cx">     if (::gTestRunner-&gt;dumpEditingCallbacks() &amp;&amp; !done) {
</span><span class="cx">         _bstr_t name;
</span><span class="cx">         notification-&gt;name(&amp;name.GetBSTR());
</span><del>-        _tprintf(TEXT(&quot;EDITING DELEGATE: webViewDidChangeSelection:%s\n&quot;), static_cast&lt;TCHAR*&gt;(name));
</del><ins>+        printf(&quot;EDITING DELEGATE: webViewDidChangeSelection:%s\n&quot;, static_cast&lt;const char*&gt;(name));
</ins><span class="cx">     }
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><span class="lines">@@ -378,3 +387,34 @@
</span><span class="cx"> 
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span><ins>+
+HRESULT EditingDelegate::onNotify(IWebNotification* notification)
+{
+    _bstr_t notificationName;
+    HRESULT hr = notification-&gt;name(&amp;notificationName.GetBSTR());
+    if (FAILED(hr))
+        return hr;
+
+    static _bstr_t webViewDidBeginEditingNotificationName(WebViewDidBeginEditingNotification);
+    static _bstr_t webViewDidChangeSelectionNotificationName(WebViewDidChangeSelectionNotification);
+    static _bstr_t webViewDidEndEditingNotificationName(WebViewDidEndEditingNotification);
+    static _bstr_t webViewDidChangeTypingStyleNotificationName(WebViewDidChangeTypingStyleNotification);
+    static _bstr_t webViewDidChangeNotificationName(WebViewDidChangeNotification);
+
+    if (!wcscmp(notificationName, webViewDidBeginEditingNotificationName))
+        return webViewDidBeginEditing(notification);
+
+    if (!wcscmp(notificationName, webViewDidChangeSelectionNotificationName))
+        return webViewDidChangeSelection(notification);
+
+    if (!wcscmp(notificationName, webViewDidEndEditingNotificationName))
+        return webViewDidEndEditing(notification);
+
+    if (!wcscmp(notificationName, webViewDidChangeTypingStyleNotificationName))
+        return webViewDidChangeTypingStyle(notification);
+
+    if (!wcscmp(notificationName, webViewDidChangeNotificationName))
+        return webViewDidChange(notification);
+
+    return S_OK;
+}
</ins></span></pre></div>
<a id="trunkToolsDumpRenderTreewinEditingDelegateh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/EditingDelegate.h (178964 => 178965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/EditingDelegate.h        2015-01-22 23:42:46 UTC (rev 178964)
+++ trunk/Tools/DumpRenderTree/win/EditingDelegate.h        2015-01-22 23:46:41 UTC (rev 178965)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &lt;WebKit/WebKit.h&gt;
</span><span class="cx"> 
</span><del>-class __declspec(uuid(&quot;265DCD4B-79C3-44a2-84BC-511C3EDABD6F&quot;)) EditingDelegate : public IWebEditingDelegate {
</del><ins>+class __declspec(uuid(&quot;265DCD4B-79C3-44a2-84BC-511C3EDABD6F&quot;)) EditingDelegate : public IWebEditingDelegate, public IWebNotificationObserver {
</ins><span class="cx"> public:
</span><span class="cx">     EditingDelegate();
</span><span class="cx"> 
</span><span class="lines">@@ -53,11 +53,7 @@
</span><span class="cx">         /* [in] */ IDOMRange *range,
</span><span class="cx">         /* [retval][out] */ BOOL *result);
</span><span class="cx">     
</span><del>-    virtual HRESULT STDMETHODCALLTYPE shouldInsertNode( 
-        /* [in] */ IWebView *webView,
-        /* [in] */ IDOMNode *node,
-        /* [in] */ IDOMRange *range,
-        /* [in] */ WebViewInsertAction action);
</del><ins>+    virtual HRESULT STDMETHODCALLTYPE shouldInsertNode(IWebView*, IDOMNode*, IDOMRange*, WebViewInsertAction, BOOL* result);
</ins><span class="cx">     
</span><span class="cx">     virtual HRESULT STDMETHODCALLTYPE shouldInsertText( 
</span><span class="cx">         /* [in] */ IWebView *webView,
</span><span class="lines">@@ -168,6 +164,9 @@
</span><span class="cx">         
</span><span class="cx">         virtual HRESULT STDMETHODCALLTYPE updateGrammar( void) { return E_NOTIMPL; }
</span><span class="cx"> 
</span><ins>+        // IWebNotificationObserver
+        virtual HRESULT STDMETHODCALLTYPE onNotify(IWebNotification* notification);
+
</ins><span class="cx"> private:
</span><span class="cx">     bool m_acceptsEditing;
</span><span class="cx">     ULONG m_refCount;
</span></span></pre>
</div>
</div>

</body>
</html>