<!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>[56402] 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/56402">56402</a></dd>
<dt>Author</dt> <dd>hyatt@apple.com</dd>
<dt>Date</dt> <dd>2010-03-23 10:53:00 -0700 (Tue, 23 Mar 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>https://bugs.webkit.org/show_bug.cgi?id=36266, support DOM Level 3 focusin/focusout events.  Add support for
IE onfocusin/onfocusout extensions to HTML.  The old DOM level 2 names (DOMFocusIn/DOMFocusOut are still supported).

Reviewed by Sam Weinig.

Added fast/events/focusinout.html

* dom/Document.cpp:
(WebCore::Document::setFocusedNode):
* dom/Event.cpp:
(WebCore::Event::aliasedType):
(WebCore::Event::hasAliasedType):
* dom/Event.h:
* dom/EventNames.h:
* dom/EventTarget.cpp:
(WebCore::EventTarget::fireEventListeners):
* dom/EventTarget.h:
* dom/Node.cpp:
(WebCore::Node::dispatchUIEvent):
* html/HTMLAttributeNames.in:
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::parseMappedAttribute):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseMappedAttribute):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::parseMappedAttribute):
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::parseMappedAttribute):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::parseMappedAttribute):
* svg/SVGElement.cpp:
(WebCore::SVGElement::parseMappedAttribute):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCoredomDocumentcpp">trunk/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkWebCoredomEventcpp">trunk/WebCore/dom/Event.cpp</a></li>
<li><a href="#trunkWebCoredomEventh">trunk/WebCore/dom/Event.h</a></li>
<li><a href="#trunkWebCoredomEventNamesh">trunk/WebCore/dom/EventNames.h</a></li>
<li><a href="#trunkWebCoredomEventTargetcpp">trunk/WebCore/dom/EventTarget.cpp</a></li>
<li><a href="#trunkWebCoredomEventTargeth">trunk/WebCore/dom/EventTarget.h</a></li>
<li><a href="#trunkWebCoredomNodecpp">trunk/WebCore/dom/Node.cpp</a></li>
<li><a href="#trunkWebCorehtmlHTMLAttributeNamesin">trunk/WebCore/html/HTMLAttributeNames.in</a></li>
<li><a href="#trunkWebCorehtmlHTMLButtonElementcpp">trunk/WebCore/html/HTMLButtonElement.cpp</a></li>
<li><a href="#trunkWebCorehtmlHTMLElementcpp">trunk/WebCore/html/HTMLElement.cpp</a></li>
<li><a href="#trunkWebCorehtmlHTMLFormControlElementcpp">trunk/WebCore/html/HTMLFormControlElement.cpp</a></li>
<li><a href="#trunkWebCorehtmlHTMLFrameSetElementcpp">trunk/WebCore/html/HTMLFrameSetElement.cpp</a></li>
<li><a href="#trunkWebCorehtmlHTMLSelectElementcpp">trunk/WebCore/html/HTMLSelectElement.cpp</a></li>
<li><a href="#trunkWebCoresvgSVGElementcpp">trunk/WebCore/svg/SVGElement.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfasteventsfocusinoutexpectedtxt">trunk/LayoutTests/fast/events/focusinout-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasteventsfocusinouthtml">trunk/LayoutTests/fast/events/focusinout.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsfasteventsfocusinoutexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/focusinout-expected.txt (0 => 56402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/focusinout-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/events/focusinout-expected.txt        2010-03-23 17:53:00 UTC (rev 56402)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+
+PASS
+PASS
+PASS
+PASS
+PASS
+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestsfasteventsfocusinouthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/focusinout.html (0 => 56402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/focusinout.html                                (rev 0)
+++ trunk/LayoutTests/fast/events/focusinout.html        2010-03-23 17:53:00 UTC (rev 56402)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+&lt;html onfocusin=&quot;writePass('result5')&quot; onfocusout=&quot;writePass('result6')&quot;&gt;
+&lt;head&gt;
+&lt;script&gt;
+if (window.layoutTestController)
+    window.layoutTestController.dumpAsText();
+
+function writePass(id)
+{
+    document.getElementById(id).innerHTML = &quot;PASS&quot;;
+}
+
+function focusHandler(event)
+{
+    writePass('result1');
+}
+
+function blurHandler(event)
+{
+    writePass('result2');
+}
+
+function focusHandlerTwo(event)
+{
+    writePass('result3');
+}
+
+function blurHandlerTwo(event)
+{
+    writePass('result4');
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;document.getElementById('field').focus();document.getElementById('field').blur()&quot;&gt;
+
+&lt;form&gt;
+&lt;input type=text id=&quot;field&quot;&gt;
+&lt;/form&gt;
+
+&lt;div id=&quot;result1&quot;&gt;FAIL&lt;/div&gt;
+&lt;div id=&quot;result2&quot;&gt;FAIL&lt;/div&gt;
+&lt;div id=&quot;result3&quot;&gt;FAIL&lt;/div&gt;
+&lt;div id=&quot;result4&quot;&gt;FAIL&lt;/div&gt;
+&lt;div id=&quot;result5&quot;&gt;FAIL&lt;/div&gt;
+&lt;div id=&quot;result6&quot;&gt;FAIL&lt;/div&gt;
+
+&lt;script&gt;
+document.documentElement.addEventListener(&quot;focusin&quot;, focusHandler, false);
+document.documentElement.addEventListener(&quot;focusout&quot;, blurHandler, false);
+document.documentElement.addEventListener(&quot;DOMFocusIn&quot;, focusHandlerTwo, false);
+document.documentElement.addEventListener(&quot;DOMFocusOut&quot;, blurHandlerTwo, false);
+&lt;/script&gt;
+
</ins></span></pre></div>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (56401 => 56402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2010-03-23 17:10:40 UTC (rev 56401)
+++ trunk/WebCore/ChangeLog        2010-03-23 17:53:00 UTC (rev 56402)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2010-03-22  David Hyatt  &lt;hyatt@apple.com&gt;
+
+        Reviewed by Sam Weinig.
+
+        https://bugs.webkit.org/show_bug.cgi?id=36266, support DOM Level 3 focusin/focusout events.  Add support for
+        IE onfocusin/onfocusout extensions to HTML.  The old DOM level 2 names (DOMFocusIn/DOMFocusOut are still supported).
+
+        Added fast/events/focusinout.html
+
+        * dom/Document.cpp:
+        (WebCore::Document::setFocusedNode):
+        * dom/Event.cpp:
+        (WebCore::Event::aliasedType):
+        (WebCore::Event::hasAliasedType):
+        * dom/Event.h:
+        * dom/EventNames.h:
+        * dom/EventTarget.cpp:
+        (WebCore::EventTarget::fireEventListeners):
+        * dom/EventTarget.h:
+        * dom/Node.cpp:
+        (WebCore::Node::dispatchUIEvent):
+        * html/HTMLAttributeNames.in:
+        * html/HTMLButtonElement.cpp:
+        (WebCore::HTMLButtonElement::parseMappedAttribute):
+        * html/HTMLElement.cpp:
+        (WebCore::HTMLElement::parseMappedAttribute):
+        * html/HTMLFormControlElement.cpp:
+        (WebCore::HTMLTextFormControlElement::parseMappedAttribute):
+        * html/HTMLFrameSetElement.cpp:
+        (WebCore::HTMLFrameSetElement::parseMappedAttribute):
+        * html/HTMLSelectElement.cpp:
+        (WebCore::HTMLSelectElement::parseMappedAttribute):
+        * svg/SVGElement.cpp:
+        (WebCore::SVGElement::parseMappedAttribute):
+
</ins><span class="cx"> 2010-03-23  MORITA Hajime  &lt;morrita@google.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Alexey Proskuryakov.
</span></span></pre></div>
<a id="trunkWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/dom/Document.cpp (56401 => 56402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/dom/Document.cpp        2010-03-23 17:10:40 UTC (rev 56401)
+++ trunk/WebCore/dom/Document.cpp        2010-03-23 17:53:00 UTC (rev 56402)
</span><span class="lines">@@ -2760,7 +2760,9 @@
</span><span class="cx">             focusChangeBlocked = true;
</span><span class="cx">             newFocusedNode = 0;
</span><span class="cx">         }
</span><del>-        oldFocusedNode-&gt;dispatchUIEvent(eventNames().DOMFocusOutEvent, 0, 0);
</del><ins>+        
+        oldFocusedNode-&gt;dispatchUIEvent(eventNames().focusoutEvent, 0, 0); // DOM level 3 name for the bubbling blur event.
+
</ins><span class="cx">         if (m_focusedNode) {
</span><span class="cx">             // handler shifted focus
</span><span class="cx">             focusChangeBlocked = true;
</span><span class="lines">@@ -2790,7 +2792,9 @@
</span><span class="cx">             focusChangeBlocked = true;
</span><span class="cx">             goto SetFocusedNodeDone;
</span><span class="cx">         }
</span><del>-        m_focusedNode-&gt;dispatchUIEvent(eventNames().DOMFocusInEvent, 0, 0);
</del><ins>+
+        m_focusedNode-&gt;dispatchUIEvent(eventNames().focusinEvent, 0, 0); // DOM level 3 bubbling focus event.
+
</ins><span class="cx">         if (m_focusedNode != newFocusedNode) { 
</span><span class="cx">             // handler shifted focus
</span><span class="cx">             focusChangeBlocked = true;
</span></span></pre></div>
<a id="trunkWebCoredomEventcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/dom/Event.cpp (56401 => 56402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/dom/Event.cpp        2010-03-23 17:10:40 UTC (rev 56401)
+++ trunk/WebCore/dom/Event.cpp        2010-03-23 17:53:00 UTC (rev 56402)
</span><span class="lines">@@ -249,4 +249,25 @@
</span><span class="cx">     m_underlyingEvent = ue;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+const AtomicString&amp; Event::aliasedType() const
+{
+    if (type() == eventNames().focusinEvent)
+        return eventNames().DOMFocusInEvent;
+    if (type() == eventNames().focusoutEvent)
+        return eventNames().DOMFocusOutEvent;
+    if (type() == eventNames().DOMFocusInEvent)
+        return eventNames().focusinEvent;
+    if (type() == eventNames().DOMFocusOutEvent)
+        return eventNames().focusoutEvent;
+    
+    ASSERT_NOT_REACHED();
+    return type();
+}
+
+bool Event::hasAliasedType() const
+{
+    return type() == eventNames().focusinEvent || type() == eventNames().focusoutEvent ||
+           type() == eventNames().DOMFocusInEvent || type() == eventNames().DOMFocusOutEvent;
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkWebCoredomEventh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/dom/Event.h (56401 => 56402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/dom/Event.h        2010-03-23 17:10:40 UTC (rev 56401)
+++ trunk/WebCore/dom/Event.h        2010-03-23 17:53:00 UTC (rev 56402)
</span><span class="lines">@@ -75,6 +75,9 @@
</span><span class="cx">         void initEvent(const AtomicString&amp; type, bool canBubble, bool cancelable);
</span><span class="cx"> 
</span><span class="cx">         const AtomicString&amp; type() const { return m_type; }
</span><ins>+        
+        const AtomicString&amp; aliasedType() const;
+        bool hasAliasedType() const;
</ins><span class="cx"> 
</span><span class="cx">         EventTarget* target() const { return m_target.get(); }
</span><span class="cx">         void setTarget(PassRefPtr&lt;EventTarget&gt;);
</span></span></pre></div>
<a id="trunkWebCoredomEventNamesh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/dom/EventNames.h (56401 => 56402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/dom/EventNames.h        2010-03-23 17:10:40 UTC (rev 56401)
+++ trunk/WebCore/dom/EventNames.h        2010-03-23 17:53:00 UTC (rev 56402)
</span><span class="lines">@@ -60,6 +60,8 @@
</span><span class="cx">     macro(drop) \
</span><span class="cx">     macro(error) \
</span><span class="cx">     macro(focus) \
</span><ins>+    macro(focusin) \
+    macro(focusout) \
</ins><span class="cx">     macro(hashchange) \
</span><span class="cx">     macro(input) \
</span><span class="cx">     macro(invalid) \
</span><span class="lines">@@ -100,10 +102,10 @@
</span><span class="cx">     macro(zoom) \
</span><span class="cx">     \
</span><span class="cx">     macro(DOMActivate) \
</span><ins>+    macro(DOMFocusIn) \
+    macro(DOMFocusOut) \
</ins><span class="cx">     macro(DOMAttrModified) \
</span><span class="cx">     macro(DOMCharacterDataModified) \
</span><del>-    macro(DOMFocusIn) \
-    macro(DOMFocusOut) \
</del><span class="cx">     macro(DOMNodeInserted) \
</span><span class="cx">     macro(DOMNodeInsertedIntoDocument) \
</span><span class="cx">     macro(DOMNodeRemoved) \
</span></span></pre></div>
<a id="trunkWebCoredomEventTargetcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/dom/EventTarget.cpp (56401 => 56402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/dom/EventTarget.cpp        2010-03-23 17:10:40 UTC (rev 56401)
+++ trunk/WebCore/dom/EventTarget.cpp        2010-03-23 17:53:00 UTC (rev 56402)
</span><span class="lines">@@ -272,10 +272,22 @@
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="cx">     EventListenerMap::iterator result = d-&gt;eventListenerMap.find(event-&gt;type());
</span><del>-    if (result == d-&gt;eventListenerMap.end())
-        return false;
-    EventListenerVector&amp; entry = *result-&gt;second;
-
</del><ins>+    if (result != d-&gt;eventListenerMap.end())
+        fireEventListeners(event, d, *result-&gt;second);
+    
+    // Alias DOMFocusIn/DOMFocusOut to focusin/focusout (and vice versa). Just consider them to be the
+    // same event (triggering one another's handlers).  This mechanism allows us to deprecate or change event
+    // names in the future and still make them be interoperable.
+    if (event-&gt;hasAliasedType() &amp;&amp; !event-&gt;immediatePropagationStopped()) {
+        EventListenerMap::iterator result = d-&gt;eventListenerMap.find(event-&gt;aliasedType());
+        if (result != d-&gt;eventListenerMap.end())
+            fireEventListeners(event, d, *result-&gt;second);
+    }
+    return !event-&gt;defaultPrevented();
+}
+        
+void EventTarget::fireEventListeners(Event* event, EventTargetData* d, EventListenerVector&amp; entry)
+{
</ins><span class="cx">     RefPtr&lt;EventTarget&gt; protect = this;
</span><span class="cx"> 
</span><span class="cx">     // Fire all listeners registered for this event. Don't fire listeners removed
</span><span class="lines">@@ -303,8 +315,6 @@
</span><span class="cx">         registeredListener.listener-&gt;handleEvent(scriptExecutionContext(), event);
</span><span class="cx">     }
</span><span class="cx">     d-&gt;firingEventIterators.removeLast();
</span><del>-
-    return !event-&gt;defaultPrevented();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> const EventListenerVector&amp; EventTarget::getEventListeners(const AtomicString&amp; eventType)
</span></span></pre></div>
<a id="trunkWebCoredomEventTargeth"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/dom/EventTarget.h (56401 => 56402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/dom/EventTarget.h        2010-03-23 17:10:40 UTC (rev 56401)
+++ trunk/WebCore/dom/EventTarget.h        2010-03-23 17:53:00 UTC (rev 56402)
</span><span class="lines">@@ -153,6 +153,8 @@
</span><span class="cx">     private:
</span><span class="cx">         virtual void refEventTarget() = 0;
</span><span class="cx">         virtual void derefEventTarget() = 0;
</span><ins>+        
+        void fireEventListeners(Event*, EventTargetData*, EventListenerVector&amp;);
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     #define DEFINE_ATTRIBUTE_EVENT_LISTENER(attribute) \
</span></span></pre></div>
<a id="trunkWebCoredomNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/dom/Node.cpp (56401 => 56402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/dom/Node.cpp        2010-03-23 17:10:40 UTC (rev 56401)
+++ trunk/WebCore/dom/Node.cpp        2010-03-23 17:53:00 UTC (rev 56402)
</span><span class="lines">@@ -2723,7 +2723,8 @@
</span><span class="cx"> void Node::dispatchUIEvent(const AtomicString&amp; eventType, int detail, PassRefPtr&lt;Event&gt; underlyingEvent)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!eventDispatchForbidden());
</span><del>-    ASSERT(eventType == eventNames().DOMFocusInEvent || eventType == eventNames().DOMFocusOutEvent || eventType == eventNames().DOMActivateEvent);
</del><ins>+    ASSERT(eventType == eventNames().focusinEvent || eventType == eventNames().focusoutEvent || 
+           eventType == eventNames().DOMFocusInEvent || eventType == eventNames().DOMFocusOutEvent || eventType == eventNames().DOMActivateEvent);
</ins><span class="cx">     
</span><span class="cx">     bool cancelable = eventType == eventNames().DOMActivateEvent;
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkWebCorehtmlHTMLAttributeNamesin"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/html/HTMLAttributeNames.in (56401 => 56402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/HTMLAttributeNames.in        2010-03-23 17:10:40 UTC (rev 56401)
+++ trunk/WebCore/html/HTMLAttributeNames.in        2010-03-23 17:53:00 UTC (rev 56402)
</span><span class="lines">@@ -163,6 +163,8 @@
</span><span class="cx"> onended
</span><span class="cx"> onerror
</span><span class="cx"> onfocus
</span><ins>+onfocusin
+onfocusout
</ins><span class="cx"> onhashchange
</span><span class="cx"> oninput
</span><span class="cx"> oninvalid
</span></span></pre></div>
<a id="trunkWebCorehtmlHTMLButtonElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/html/HTMLButtonElement.cpp (56401 => 56402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/HTMLButtonElement.cpp        2010-03-23 17:10:40 UTC (rev 56401)
+++ trunk/WebCore/html/HTMLButtonElement.cpp        2010-03-23 17:53:00 UTC (rev 56402)
</span><span class="lines">@@ -90,10 +90,6 @@
</span><span class="cx">     } else if (attr-&gt;name() == alignAttr) {
</span><span class="cx">         // Don't map 'align' attribute.  This matches what Firefox and IE do, but not Opera.
</span><span class="cx">         // See http://bugs.webkit.org/show_bug.cgi?id=12071
</span><del>-    } else if (attr-&gt;name() == onfocusAttr) {
-        setAttributeEventListener(eventNames().focusEvent, createAttributeEventListener(this, attr));
-    } else if (attr-&gt;name() == onblurAttr) {
-        setAttributeEventListener(eventNames().blurEvent, createAttributeEventListener(this, attr));
</del><span class="cx">     } else
</span><span class="cx">         HTMLFormControlElement::parseMappedAttribute(attr);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkWebCorehtmlHTMLElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/html/HTMLElement.cpp (56401 => 56402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/HTMLElement.cpp        2010-03-23 17:10:40 UTC (rev 56401)
+++ trunk/WebCore/html/HTMLElement.cpp        2010-03-23 17:53:00 UTC (rev 56402)
</span><span class="lines">@@ -198,6 +198,10 @@
</span><span class="cx">         setAttributeEventListener(eventNames().mousewheelEvent, createAttributeEventListener(this, attr));
</span><span class="cx">     } else if (attr-&gt;name() == onfocusAttr) {
</span><span class="cx">         setAttributeEventListener(eventNames().focusEvent, createAttributeEventListener(this, attr));
</span><ins>+    } else if (attr-&gt;name() == onfocusinAttr) {
+        setAttributeEventListener(eventNames().focusinEvent, createAttributeEventListener(this, attr));
+    } else if (attr-&gt;name() == onfocusoutAttr) {
+        setAttributeEventListener(eventNames().focusoutEvent, createAttributeEventListener(this, attr));
</ins><span class="cx">     } else if (attr-&gt;name() == onblurAttr) {
</span><span class="cx">         setAttributeEventListener(eventNames().blurEvent, createAttributeEventListener(this, attr));
</span><span class="cx">     } else if (attr-&gt;name() == onkeydownAttr) {
</span></span></pre></div>
<a id="trunkWebCorehtmlHTMLFormControlElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/html/HTMLFormControlElement.cpp (56401 => 56402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/HTMLFormControlElement.cpp        2010-03-23 17:10:40 UTC (rev 56401)
+++ trunk/WebCore/html/HTMLFormControlElement.cpp        2010-03-23 17:53:00 UTC (rev 56402)
</span><span class="lines">@@ -537,10 +537,6 @@
</span><span class="cx"> {
</span><span class="cx">     if (attr-&gt;name() == placeholderAttr)
</span><span class="cx">         updatePlaceholderVisibility(true);
</span><del>-    else if (attr-&gt;name() == onfocusAttr)
-        setAttributeEventListener(eventNames().focusEvent, createAttributeEventListener(this, attr));
-    else if (attr-&gt;name() == onblurAttr)
-        setAttributeEventListener(eventNames().blurEvent, createAttributeEventListener(this, attr));
</del><span class="cx">     else if (attr-&gt;name() == onselectAttr)
</span><span class="cx">         setAttributeEventListener(eventNames().selectEvent, createAttributeEventListener(this, attr));
</span><span class="cx">     else if (attr-&gt;name() == onchangeAttr)
</span></span></pre></div>
<a id="trunkWebCorehtmlHTMLFrameSetElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/html/HTMLFrameSetElement.cpp (56401 => 56402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/HTMLFrameSetElement.cpp        2010-03-23 17:10:40 UTC (rev 56401)
+++ trunk/WebCore/html/HTMLFrameSetElement.cpp        2010-03-23 17:53:00 UTC (rev 56402)
</span><span class="lines">@@ -135,6 +135,10 @@
</span><span class="cx">         document()-&gt;setWindowAttributeEventListener(eventNames().blurEvent, createAttributeEventListener(document()-&gt;frame(), attr));
</span><span class="cx">     else if (attr-&gt;name() == onfocusAttr)
</span><span class="cx">         document()-&gt;setWindowAttributeEventListener(eventNames().focusEvent, createAttributeEventListener(document()-&gt;frame(), attr));
</span><ins>+    else if (attr-&gt;name() == onfocusinAttr)
+        document()-&gt;setWindowAttributeEventListener(eventNames().focusinEvent, createAttributeEventListener(document()-&gt;frame(), attr));
+    else if (attr-&gt;name() == onfocusoutAttr)
+        document()-&gt;setWindowAttributeEventListener(eventNames().focusoutEvent, createAttributeEventListener(document()-&gt;frame(), attr));
</ins><span class="cx"> #if ENABLE(ORIENTATION_EVENTS)
</span><span class="cx">     else if (attr-&gt;name() == onorientationchangeAttr)
</span><span class="cx">         document()-&gt;setWindowAttributeEventListener(eventNames().orientationchangeEvent, createAttributeEventListener(document()-&gt;frame(), attr));
</span></span></pre></div>
<a id="trunkWebCorehtmlHTMLSelectElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/html/HTMLSelectElement.cpp (56401 => 56402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/HTMLSelectElement.cpp        2010-03-23 17:10:40 UTC (rev 56401)
+++ trunk/WebCore/html/HTMLSelectElement.cpp        2010-03-23 17:53:00 UTC (rev 56402)
</span><span class="lines">@@ -214,10 +214,6 @@
</span><span class="cx">     } else if (attr-&gt;name() == alignAttr) {
</span><span class="cx">         // Don't map 'align' attribute.  This matches what Firefox, Opera and IE do.
</span><span class="cx">         // See http://bugs.webkit.org/show_bug.cgi?id=12072
</span><del>-    } else if (attr-&gt;name() == onfocusAttr) {
-        setAttributeEventListener(eventNames().focusEvent, createAttributeEventListener(this, attr));
-    } else if (attr-&gt;name() == onblurAttr) {
-        setAttributeEventListener(eventNames().blurEvent, createAttributeEventListener(this, attr));
</del><span class="cx">     } else if (attr-&gt;name() == onchangeAttr) {
</span><span class="cx">         setAttributeEventListener(eventNames().changeEvent, createAttributeEventListener(this, attr));
</span><span class="cx">     } else
</span></span></pre></div>
<a id="trunkWebCoresvgSVGElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/svg/SVGElement.cpp (56401 => 56402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/svg/SVGElement.cpp        2010-03-23 17:10:40 UTC (rev 56401)
+++ trunk/WebCore/svg/SVGElement.cpp        2010-03-23 17:53:00 UTC (rev 56402)
</span><span class="lines">@@ -208,9 +208,9 @@
</span><span class="cx">     else if (attr-&gt;name() == onmouseupAttr)
</span><span class="cx">         setAttributeEventListener(eventNames().mouseupEvent, createAttributeEventListener(this, attr));
</span><span class="cx">     else if (attr-&gt;name() == SVGNames::onfocusinAttr)
</span><del>-        setAttributeEventListener(eventNames().DOMFocusInEvent, createAttributeEventListener(this, attr));
</del><ins>+        setAttributeEventListener(eventNames().focusinEvent, createAttributeEventListener(this, attr));
</ins><span class="cx">     else if (attr-&gt;name() == SVGNames::onfocusoutAttr)
</span><del>-        setAttributeEventListener(eventNames().DOMFocusOutEvent, createAttributeEventListener(this, attr));
</del><ins>+        setAttributeEventListener(eventNames().focusoutEvent, createAttributeEventListener(this, attr));
</ins><span class="cx">     else if (attr-&gt;name() == SVGNames::onactivateAttr)
</span><span class="cx">         setAttributeEventListener(eventNames().DOMActivateEvent, createAttributeEventListener(this, attr));
</span><span class="cx">     else
</span></span></pre>
</div>
</div>

</body>
</html>