<!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>[150801] trunk/Source/WebCore</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/150801">150801</a></dd>
<dt>Author</dt> <dd>akling@apple.com</dd>
<dt>Date</dt> <dd>2013-05-28 07:01:20 -0700 (Tue, 28 May 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Move dispatching of focus-related events from Node to Element.
&lt;http://webkit.org/b/116864&gt;

Reviewed by Antti Koivisto.

...and pass around pointers to Element instead of Node.

* dom/Node.cpp:
* dom/Node.h:
* dom/Element.h:
* dom/Element.cpp:
(WebCore::Element::dispatchFocusInEvent):
(WebCore::Element::dispatchFocusOutEvent):
(WebCore::Element::dispatchFocusEvent):
(WebCore::Element::dispatchBlurEvent):

    Moved here from Node.

* html/HTMLFormControlElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::dispatchBlurEvent):
* html/HTMLSelectElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::dispatchFocusEvent):
(WebCore::HTMLSelectElement::dispatchBlurEvent):
* html/HTMLTextFormControlElement.h:
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
(WebCore::HTMLTextFormControlElement::dispatchBlurEvent):

    Update subclass overrides and sprinkle OVERRIDE/FINAL.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomElementcpp">trunk/Source/WebCore/dom/Element.cpp</a></li>
<li><a href="#trunkSourceWebCoredomElementh">trunk/Source/WebCore/dom/Element.h</a></li>
<li><a href="#trunkSourceWebCoredomNodecpp">trunk/Source/WebCore/dom/Node.cpp</a></li>
<li><a href="#trunkSourceWebCoredomNodeh">trunk/Source/WebCore/dom/Node.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormControlElementcpp">trunk/Source/WebCore/html/HTMLFormControlElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormControlElementh">trunk/Source/WebCore/html/HTMLFormControlElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLSelectElementcpp">trunk/Source/WebCore/html/HTMLSelectElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLSelectElementh">trunk/Source/WebCore/html/HTMLSelectElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLTextFormControlElementcpp">trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLTextFormControlElementh">trunk/Source/WebCore/html/HTMLTextFormControlElement.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (150800 => 150801)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-05-28 13:34:19 UTC (rev 150800)
+++ trunk/Source/WebCore/ChangeLog        2013-05-28 14:01:20 UTC (rev 150801)
</span><span class="lines">@@ -1,3 +1,37 @@
</span><ins>+2013-05-28  Andreas Kling  &lt;akling@apple.com&gt;
+
+        Move dispatching of focus-related events from Node to Element.
+        &lt;http://webkit.org/b/116864&gt;
+
+        Reviewed by Antti Koivisto.
+
+        ...and pass around pointers to Element instead of Node.
+
+        * dom/Node.cpp:
+        * dom/Node.h:
+        * dom/Element.h:
+        * dom/Element.cpp:
+        (WebCore::Element::dispatchFocusInEvent):
+        (WebCore::Element::dispatchFocusOutEvent):
+        (WebCore::Element::dispatchFocusEvent):
+        (WebCore::Element::dispatchBlurEvent):
+
+            Moved here from Node.
+
+        * html/HTMLFormControlElement.h:
+        * html/HTMLFormControlElement.cpp:
+        (WebCore::HTMLFormControlElement::dispatchBlurEvent):
+        * html/HTMLSelectElement.h:
+        * html/HTMLSelectElement.cpp:
+        (WebCore::HTMLSelectElement::dispatchFocusEvent):
+        (WebCore::HTMLSelectElement::dispatchBlurEvent):
+        * html/HTMLTextFormControlElement.h:
+        * html/HTMLTextFormControlElement.cpp:
+        (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
+        (WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
+
+            Update subclass overrides and sprinkle OVERRIDE/FINAL.
+
</ins><span class="cx"> 2013-05-28  Zan Dobersek  &lt;zdobersek@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove CachedResourceRequest::initiatorElement
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.cpp (150800 => 150801)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.cpp        2013-05-28 13:34:19 UTC (rev 150800)
+++ trunk/Source/WebCore/dom/Element.cpp        2013-05-28 14:01:20 UTC (rev 150801)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx"> #include &quot;ExceptionCode.h&quot;
</span><span class="cx"> #include &quot;FlowThreadController.h&quot;
</span><span class="cx"> #include &quot;FocusController.h&quot;
</span><ins>+#include &quot;FocusEvent.h&quot;
</ins><span class="cx"> #include &quot;Frame.h&quot;
</span><span class="cx"> #include &quot;FrameSelection.h&quot;
</span><span class="cx"> #include &quot;FrameView.h&quot;
</span><span class="lines">@@ -2158,6 +2159,39 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void Element::dispatchFocusInEvent(const AtomicString&amp; eventType, PassRefPtr&lt;Element&gt; oldFocusedElement)
+{
+    ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden());
+    ASSERT(eventType == eventNames().focusinEvent || eventType == eventNames().DOMFocusInEvent);
+    dispatchScopedEventDispatchMediator(FocusInEventDispatchMediator::create(FocusEvent::create(eventType, true, false, document()-&gt;defaultView(), 0, oldFocusedElement)));
+}
+
+void Element::dispatchFocusOutEvent(const AtomicString&amp; eventType, PassRefPtr&lt;Element&gt; newFocusedElement)
+{
+    ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden());
+    ASSERT(eventType == eventNames().focusoutEvent || eventType == eventNames().DOMFocusOutEvent);
+    dispatchScopedEventDispatchMediator(FocusOutEventDispatchMediator::create(FocusEvent::create(eventType, true, false, document()-&gt;defaultView(), 0, newFocusedElement)));
+}
+
+void Element::dispatchFocusEvent(PassRefPtr&lt;Element&gt; oldFocusedElement, FocusDirection)
+{
+    if (document()-&gt;page())
+        document()-&gt;page()-&gt;chrome().client()-&gt;elementDidFocus(this);
+
+    RefPtr&lt;FocusEvent&gt; event = FocusEvent::create(eventNames().focusEvent, false, false, document()-&gt;defaultView(), 0, oldFocusedElement);
+    EventDispatcher::dispatchEvent(this, FocusEventDispatchMediator::create(event.release()));
+}
+
+void Element::dispatchBlurEvent(PassRefPtr&lt;Element&gt; newFocusedElement)
+{
+    if (document()-&gt;page())
+        document()-&gt;page()-&gt;chrome().client()-&gt;elementDidBlur(this);
+
+    RefPtr&lt;FocusEvent&gt; event = FocusEvent::create(eventNames().blurEvent, false, false, document()-&gt;defaultView(), 0, newFocusedElement);
+    EventDispatcher::dispatchEvent(this, BlurEventDispatchMediator::create(event.release()));
+}
+
+
</ins><span class="cx"> String Element::innerText()
</span><span class="cx"> {
</span><span class="cx">     // We need to update layout, since plainText uses line boxes in the render tree.
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.h (150800 => 150801)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.h        2013-05-28 13:34:19 UTC (rev 150800)
+++ trunk/Source/WebCore/dom/Element.h        2013-05-28 14:01:20 UTC (rev 150801)
</span><span class="lines">@@ -636,6 +636,10 @@
</span><span class="cx">     void setSavedLayerScrollOffset(const IntSize&amp;);
</span><span class="cx"> 
</span><span class="cx">     void dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEventOptions = SendNoEvents, SimulatedClickVisualOptions = ShowPressedLook);
</span><ins>+    void dispatchFocusInEvent(const AtomicString&amp; eventType, PassRefPtr&lt;Element&gt; oldFocusedElement);
+    void dispatchFocusOutEvent(const AtomicString&amp; eventType, PassRefPtr&lt;Element&gt; newFocusedElement);
+    virtual void dispatchFocusEvent(PassRefPtr&lt;Element&gt; oldFocusedElement, FocusDirection);
+    virtual void dispatchBlurEvent(PassRefPtr&lt;Element&gt; newFocusedElement);
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     Element(const QualifiedName&amp; tagName, Document* document, ConstructionType type)
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.cpp (150800 => 150801)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.cpp        2013-05-28 13:34:19 UTC (rev 150800)
+++ trunk/Source/WebCore/dom/Node.cpp        2013-05-28 14:01:20 UTC (rev 150801)
</span><span class="lines">@@ -60,7 +60,6 @@
</span><span class="cx"> #include &quot;EventNames.h&quot;
</span><span class="cx"> #include &quot;ExceptionCode.h&quot;
</span><span class="cx"> #include &quot;ExceptionCodePlaceholder.h&quot;
</span><del>-#include &quot;FocusEvent.h&quot;
</del><span class="cx"> #include &quot;Frame.h&quot;
</span><span class="cx"> #include &quot;FrameView.h&quot;
</span><span class="cx"> #include &quot;HTMLElement.h&quot;
</span><span class="lines">@@ -2298,20 +2297,6 @@
</span><span class="cx">     dispatchScopedEvent(MutationEvent::create(eventNames().DOMSubtreeModifiedEvent, true));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Node::dispatchFocusInEvent(const AtomicString&amp; eventType, PassRefPtr&lt;Node&gt; oldFocusedNode)
-{
-    ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden());
-    ASSERT(eventType == eventNames().focusinEvent || eventType == eventNames().DOMFocusInEvent);
-    dispatchScopedEventDispatchMediator(FocusInEventDispatchMediator::create(FocusEvent::create(eventType, true, false, document()-&gt;defaultView(), 0, oldFocusedNode)));
-}
-
-void Node::dispatchFocusOutEvent(const AtomicString&amp; eventType, PassRefPtr&lt;Node&gt; newFocusedNode)
-{
-    ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden());
-    ASSERT(eventType == eventNames().focusoutEvent || eventType == eventNames().DOMFocusOutEvent);
-    dispatchScopedEventDispatchMediator(FocusOutEventDispatchMediator::create(FocusEvent::create(eventType, true, false, document()-&gt;defaultView(), 0, newFocusedNode)));
-}
-
</del><span class="cx"> bool Node::dispatchDOMActivateEvent(int detail, PassRefPtr&lt;Event&gt; underlyingEvent)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden());
</span><span class="lines">@@ -2365,24 +2350,6 @@
</span><span class="cx">     return EventDispatcher::dispatchEvent(this, WheelEventDispatchMediator::create(event, document()-&gt;defaultView()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Node::dispatchFocusEvent(PassRefPtr&lt;Node&gt; oldFocusedNode, FocusDirection)
-{
-    if (document()-&gt;page())
-        document()-&gt;page()-&gt;chrome().client()-&gt;elementDidFocus(this);
-
-    RefPtr&lt;FocusEvent&gt; event = FocusEvent::create(eventNames().focusEvent, false, false, document()-&gt;defaultView(), 0, oldFocusedNode);
-    EventDispatcher::dispatchEvent(this, FocusEventDispatchMediator::create(event.release()));
-}
-
-void Node::dispatchBlurEvent(PassRefPtr&lt;Node&gt; newFocusedNode)
-{
-    if (document()-&gt;page())
-        document()-&gt;page()-&gt;chrome().client()-&gt;elementDidBlur(this);
-
-    RefPtr&lt;FocusEvent&gt; event = FocusEvent::create(eventNames().blurEvent, false, false, document()-&gt;defaultView(), 0, newFocusedNode);
-    EventDispatcher::dispatchEvent(this, BlurEventDispatchMediator::create(event.release()));
-}
-
</del><span class="cx"> void Node::dispatchChangeEvent()
</span><span class="cx"> {
</span><span class="cx">     dispatchScopedEvent(Event::create(eventNames().changeEvent, true, false));
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.h (150800 => 150801)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.h        2013-05-28 13:34:19 UTC (rev 150800)
+++ trunk/Source/WebCore/dom/Node.h        2013-05-28 14:01:20 UTC (rev 150801)
</span><span class="lines">@@ -27,7 +27,6 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;EditingBoundary.h&quot;
</span><span class="cx"> #include &quot;EventTarget.h&quot;
</span><del>-#include &quot;FocusDirection.h&quot;
</del><span class="cx"> #include &quot;KURLHash.h&quot;
</span><span class="cx"> #include &quot;LayoutRect.h&quot;
</span><span class="cx"> #include &quot;MutationObserver.h&quot;
</span><span class="lines">@@ -603,8 +602,6 @@
</span><span class="cx"> 
</span><span class="cx">     void dispatchSubtreeModifiedEvent();
</span><span class="cx">     bool dispatchDOMActivateEvent(int detail, PassRefPtr&lt;Event&gt; underlyingEvent);
</span><del>-    void dispatchFocusInEvent(const AtomicString&amp; eventType, PassRefPtr&lt;Node&gt; oldFocusedNode);
-    void dispatchFocusOutEvent(const AtomicString&amp; eventType, PassRefPtr&lt;Node&gt; newFocusedNode);
</del><span class="cx"> 
</span><span class="cx">     bool dispatchKeyEvent(const PlatformKeyboardEvent&amp;);
</span><span class="cx">     bool dispatchWheelEvent(const PlatformWheelEvent&amp;);
</span><span class="lines">@@ -618,8 +615,6 @@
</span><span class="cx"> 
</span><span class="cx">     bool dispatchBeforeLoadEvent(const String&amp; sourceURL);
</span><span class="cx"> 
</span><del>-    virtual void dispatchFocusEvent(PassRefPtr&lt;Node&gt; oldFocusedNode, FocusDirection);
-    virtual void dispatchBlurEvent(PassRefPtr&lt;Node&gt; newFocusedNode);
</del><span class="cx">     virtual void dispatchChangeEvent();
</span><span class="cx">     virtual void dispatchInputEvent();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormControlElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormControlElement.cpp (150800 => 150801)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormControlElement.cpp        2013-05-28 13:34:19 UTC (rev 150800)
+++ trunk/Source/WebCore/html/HTMLFormControlElement.cpp        2013-05-28 14:01:20 UTC (rev 150801)
</span><span class="lines">@@ -456,9 +456,9 @@
</span><span class="cx">     return m_validationMessage &amp;&amp; m_validationMessage-&gt;shadowTreeContains(node);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void HTMLFormControlElement::dispatchBlurEvent(PassRefPtr&lt;Node&gt; newFocusedNode)
</del><ins>+void HTMLFormControlElement::dispatchBlurEvent(PassRefPtr&lt;Element&gt; newFocusedElement)
</ins><span class="cx"> {
</span><del>-    HTMLElement::dispatchBlurEvent(newFocusedNode);
</del><ins>+    HTMLElement::dispatchBlurEvent(newFocusedElement);
</ins><span class="cx">     hideVisibleValidationMessage();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormControlElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormControlElement.h (150800 => 150801)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormControlElement.h        2013-05-28 13:34:19 UTC (rev 150800)
+++ trunk/Source/WebCore/html/HTMLFormControlElement.h        2013-05-28 14:01:20 UTC (rev 150801)
</span><span class="lines">@@ -121,7 +121,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void didRecalcStyle(StyleChange) OVERRIDE;
</span><span class="cx"> 
</span><del>-    virtual void dispatchBlurEvent(PassRefPtr&lt;Node&gt; newFocusedNode);
</del><ins>+    virtual void dispatchBlurEvent(PassRefPtr&lt;Element&gt; newFocusedElement) OVERRIDE;
</ins><span class="cx"> 
</span><span class="cx">     // This must be called any time the result of willValidate() has changed.
</span><span class="cx">     void setNeedsWillValidateCheck();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLSelectElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLSelectElement.cpp (150800 => 150801)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLSelectElement.cpp        2013-05-28 13:34:19 UTC (rev 150800)
+++ trunk/Source/WebCore/html/HTMLSelectElement.cpp        2013-05-28 14:01:20 UTC (rev 150801)
</span><span class="lines">@@ -905,23 +905,23 @@
</span><span class="cx">     return optionIndex;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void HTMLSelectElement::dispatchFocusEvent(PassRefPtr&lt;Node&gt; oldFocusedNode, FocusDirection direction)
</del><ins>+void HTMLSelectElement::dispatchFocusEvent(PassRefPtr&lt;Element&gt; oldFocusedElement, FocusDirection direction)
</ins><span class="cx"> {
</span><span class="cx">     // Save the selection so it can be compared to the new selection when
</span><span class="cx">     // dispatching change events during blur event dispatch.
</span><span class="cx">     if (usesMenuList())
</span><span class="cx">         saveLastSelection();
</span><del>-    HTMLFormControlElementWithState::dispatchFocusEvent(oldFocusedNode, direction);
</del><ins>+    HTMLFormControlElementWithState::dispatchFocusEvent(oldFocusedElement, direction);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void HTMLSelectElement::dispatchBlurEvent(PassRefPtr&lt;Node&gt; newFocusedNode)
</del><ins>+void HTMLSelectElement::dispatchBlurEvent(PassRefPtr&lt;Element&gt; newFocusedElement)
</ins><span class="cx"> {
</span><span class="cx">     // We only need to fire change events here for menu lists, because we fire
</span><span class="cx">     // change events for list boxes whenever the selection change is actually made.
</span><span class="cx">     // This matches other browsers' behavior.
</span><span class="cx">     if (usesMenuList())
</span><span class="cx">         dispatchChangeEventForMenuList();
</span><del>-    HTMLFormControlElementWithState::dispatchBlurEvent(newFocusedNode);
</del><ins>+    HTMLFormControlElementWithState::dispatchBlurEvent(newFocusedElement);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void HTMLSelectElement::deselectItemsWithoutValidation(HTMLElement* excludeElement)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLSelectElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLSelectElement.h (150800 => 150801)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLSelectElement.h        2013-05-28 13:34:19 UTC (rev 150800)
+++ trunk/Source/WebCore/html/HTMLSelectElement.h        2013-05-28 14:01:20 UTC (rev 150801)
</span><span class="lines">@@ -114,8 +114,8 @@
</span><span class="cx">     virtual bool isKeyboardFocusable(KeyboardEvent*) const OVERRIDE;
</span><span class="cx">     virtual bool isMouseFocusable() const OVERRIDE;
</span><span class="cx"> 
</span><del>-    virtual void dispatchFocusEvent(PassRefPtr&lt;Node&gt; oldFocusedNode, FocusDirection) OVERRIDE;
-    virtual void dispatchBlurEvent(PassRefPtr&lt;Node&gt; newFocusedNode);
</del><ins>+    virtual void dispatchFocusEvent(PassRefPtr&lt;Element&gt; oldFocusedElement, FocusDirection) OVERRIDE FINAL;
+    virtual void dispatchBlurEvent(PassRefPtr&lt;Element&gt; newFocusedElement) OVERRIDE FINAL;
</ins><span class="cx">     
</span><span class="cx">     virtual bool canStartSelection() const { return false; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLTextFormControlElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp (150800 => 150801)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp        2013-05-28 13:34:19 UTC (rev 150800)
+++ trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp        2013-05-28 14:01:20 UTC (rev 150801)
</span><span class="lines">@@ -85,20 +85,20 @@
</span><span class="cx">     return InsertionDone;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void HTMLTextFormControlElement::dispatchFocusEvent(PassRefPtr&lt;Node&gt; oldFocusedNode, FocusDirection direction)
</del><ins>+void HTMLTextFormControlElement::dispatchFocusEvent(PassRefPtr&lt;Element&gt; oldFocusedElement, FocusDirection direction)
</ins><span class="cx"> {
</span><span class="cx">     if (supportsPlaceholder())
</span><span class="cx">         updatePlaceholderVisibility(false);
</span><del>-    handleFocusEvent(oldFocusedNode.get(), direction);
-    HTMLFormControlElementWithState::dispatchFocusEvent(oldFocusedNode, direction);
</del><ins>+    handleFocusEvent(oldFocusedElement.get(), direction);
+    HTMLFormControlElementWithState::dispatchFocusEvent(oldFocusedElement, direction);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void HTMLTextFormControlElement::dispatchBlurEvent(PassRefPtr&lt;Node&gt; newFocusedNode)
</del><ins>+void HTMLTextFormControlElement::dispatchBlurEvent(PassRefPtr&lt;Element&gt; newFocusedElement)
</ins><span class="cx"> {
</span><span class="cx">     if (supportsPlaceholder())
</span><span class="cx">         updatePlaceholderVisibility(false);
</span><span class="cx">     handleBlurEvent();
</span><del>-    HTMLFormControlElementWithState::dispatchBlurEvent(newFocusedNode);
</del><ins>+    HTMLFormControlElementWithState::dispatchBlurEvent(newFocusedElement);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void HTMLTextFormControlElement::defaultEventHandler(Event* event)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLTextFormControlElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLTextFormControlElement.h (150800 => 150801)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLTextFormControlElement.h        2013-05-28 13:34:19 UTC (rev 150800)
+++ trunk/Source/WebCore/html/HTMLTextFormControlElement.h        2013-05-28 14:01:20 UTC (rev 150801)
</span><span class="lines">@@ -116,8 +116,8 @@
</span><span class="cx">     int computeSelectionEnd() const;
</span><span class="cx">     TextFieldSelectionDirection computeSelectionDirection() const;
</span><span class="cx"> 
</span><del>-    virtual void dispatchFocusEvent(PassRefPtr&lt;Node&gt; oldFocusedNode, FocusDirection) OVERRIDE;
-    virtual void dispatchBlurEvent(PassRefPtr&lt;Node&gt; newFocusedNode);
</del><ins>+    virtual void dispatchFocusEvent(PassRefPtr&lt;Element&gt; oldFocusedElement, FocusDirection) OVERRIDE FINAL;
+    virtual void dispatchBlurEvent(PassRefPtr&lt;Element&gt; newFocusedElement) OVERRIDE FINAL;
</ins><span class="cx">     virtual bool childShouldCreateRenderer(const NodeRenderingContext&amp;) const OVERRIDE;
</span><span class="cx"> 
</span><span class="cx">     // Returns true if user-editable value is empty. Used to check placeholder visibility.
</span></span></pre>
</div>
</div>

</body>
</html>