<!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>[70985] 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/70985">70985</a></dd>
<dt>Author</dt> <dd>dglazkov@chromium.org</dd>
<dt>Date</dt> <dd>2010-10-30 11:48:23 -0700 (Sat, 30 Oct 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>2010-10-30  Dimitri Glazkov  &lt;dglazkov@chromium.org&gt;

        Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/70984">r70984</a>.
        http://trac.webkit.org/changeset/70984
        https://bugs.webkit.org/show_bug.cgi?id=46015

        Made media/audio-delete-while-slider-thumb-clicked.html crash.

        * fast/events/shadow-boundary-crossing.html:
2010-10-30  Dimitri Glazkov  &lt;dglazkov@chromium.org&gt;

        Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/70984">r70984</a>.
        http://trac.webkit.org/changeset/70984
        https://bugs.webkit.org/show_bug.cgi?id=46015

        Made media/audio-delete-while-slider-thumb-clicked.html crash.

        * Android.mk:
        * CMakeLists.txt:
        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.pro:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/ContainerNode.cpp:
        (WebCore::notifyChildInserted):
        * dom/EventContext.cpp: Removed.
        * dom/EventContext.h: Removed.
        * dom/Node.cpp:
        (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc):
        (WebCore::Node::createRendererIfNeeded):
        (WebCore::Node::eventParentNode):
        (WebCore::Node::enclosingLinkEventParentOrSelf):
        (WebCore::eventTargetAsSVGElementInstance):
        (WebCore::eventTargetRespectingSVGTargetRules):
        (WebCore::Node::eventAncestors):
        (WebCore::Node::dispatchGenericEvent):
        * dom/Node.h:
        * dom/Text.cpp:
        (WebCore::Text::createRenderer):
        * dom/WindowEventContext.cpp: Removed.
        * dom/WindowEventContext.h: Removed.
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::getEventListenersForNode):
        * inspector/InspectorInstrumentation.cpp:
        (WebCore::eventHasListeners):
        (WebCore::InspectorInstrumentation::willDispatchEventImpl):
        * inspector/InspectorInstrumentation.h:
        (WebCore::InspectorInstrumentation::willDispatchEvent):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::updateMouseEventTargetNode):
        * svg/SVGElement.cpp:
        (WebCore::SVGElement::eventParentNode):
        * svg/SVGElement.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfasteventsshadowboundarycrossinghtml">trunk/LayoutTests/fast/events/shadow-boundary-crossing.html</a></li>
<li><a href="#trunkWebCoreAndroidmk">trunk/WebCore/Android.mk</a></li>
<li><a href="#trunkWebCoreCMakeListstxt">trunk/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCoreGNUmakefileam">trunk/WebCore/GNUmakefile.am</a></li>
<li><a href="#trunkWebCoreWebCoregypi">trunk/WebCore/WebCore.gypi</a></li>
<li><a href="#trunkWebCoreWebCorepro">trunk/WebCore/WebCore.pro</a></li>
<li><a href="#trunkWebCoreWebCorexcodeprojprojectpbxproj">trunk/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkWebCoredomContainerNodecpp">trunk/WebCore/dom/ContainerNode.cpp</a></li>
<li><a href="#trunkWebCoredomNodecpp">trunk/WebCore/dom/Node.cpp</a></li>
<li><a href="#trunkWebCoredomNodeh">trunk/WebCore/dom/Node.h</a></li>
<li><a href="#trunkWebCoredomTextcpp">trunk/WebCore/dom/Text.cpp</a></li>
<li><a href="#trunkWebCoreinspectorInspectorDOMAgentcpp">trunk/WebCore/inspector/InspectorDOMAgent.cpp</a></li>
<li><a href="#trunkWebCoreinspectorInspectorInstrumentationcpp">trunk/WebCore/inspector/InspectorInstrumentation.cpp</a></li>
<li><a href="#trunkWebCoreinspectorInspectorInstrumentationh">trunk/WebCore/inspector/InspectorInstrumentation.h</a></li>
<li><a href="#trunkWebCorepageEventHandlercpp">trunk/WebCore/page/EventHandler.cpp</a></li>
<li><a href="#trunkWebCoresvgSVGElementcpp">trunk/WebCore/svg/SVGElement.cpp</a></li>
<li><a href="#trunkWebCoresvgSVGElementh">trunk/WebCore/svg/SVGElement.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkWebCoredomEventContextcpp">trunk/WebCore/dom/EventContext.cpp</a></li>
<li><a href="#trunkWebCoredomEventContexth">trunk/WebCore/dom/EventContext.h</a></li>
<li><a href="#trunkWebCoredomWindowEventContextcpp">trunk/WebCore/dom/WindowEventContext.cpp</a></li>
<li><a href="#trunkWebCoredomWindowEventContexth">trunk/WebCore/dom/WindowEventContext.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (70984 => 70985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2010-10-30 17:32:24 UTC (rev 70984)
+++ trunk/LayoutTests/ChangeLog        2010-10-30 18:48:23 UTC (rev 70985)
</span><span class="lines">@@ -1,5 +1,15 @@
</span><span class="cx"> 2010-10-30  Dimitri Glazkov  &lt;dglazkov@chromium.org&gt;
</span><span class="cx"> 
</span><ins>+        Unreviewed, rolling out r70984.
+        http://trac.webkit.org/changeset/70984
+        https://bugs.webkit.org/show_bug.cgi?id=46015
+
+        Made media/audio-delete-while-slider-thumb-clicked.html crash.
+
+        * fast/events/shadow-boundary-crossing.html:
+
+2010-10-30  Dimitri Glazkov  &lt;dglazkov@chromium.org&gt;
+
</ins><span class="cx">         Reviewed by Darin Adler.
</span><span class="cx"> 
</span><span class="cx">         Implement shadow DOM-aware event targeting and introduce EventContext to track the context of each event dispatch.
</span></span></pre></div>
<a id="trunkLayoutTestsfasteventsshadowboundarycrossinghtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/events/shadow-boundary-crossing.html (70984 => 70985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/shadow-boundary-crossing.html        2010-10-30 17:32:24 UTC (rev 70984)
+++ trunk/LayoutTests/fast/events/shadow-boundary-crossing.html        2010-10-30 18:48:23 UTC (rev 70985)
</span><span class="lines">@@ -2,12 +2,11 @@
</span><span class="cx"> &lt;head&gt;
</span><span class="cx">     &lt;title&gt;&lt;/title&gt;
</span><span class="cx">     &lt;script type=&quot;text/javascript&quot;&gt;
</span><del>-        var success;
-        var target;
</del><ins>+        var fired = false;
</ins><span class="cx"> 
</span><span class="cx">         function selectStart(event)
</span><span class="cx">         {
</span><del>-            success = event.target == target;
</del><ins>+            fired = true;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function test()
</span><span class="lines">@@ -16,7 +15,7 @@
</span><span class="cx">                 return;
</span><span class="cx">             layoutTestController.dumpAsText();
</span><span class="cx"> 
</span><del>-            target = document.getElementById(&quot;target&quot;);
</del><ins>+            var target = document.getElementById(&quot;target&quot;);
</ins><span class="cx">             var x = target.offsetLeft + target.offsetWidth / 2;
</span><span class="cx">             var y = target.offsetTop + target.offsetHeight / 2;
</span><span class="cx"> 
</span><span class="lines">@@ -24,7 +23,7 @@
</span><span class="cx">             eventSender.mouseDown();
</span><span class="cx">             eventSender.mouseUp();
</span><span class="cx"> 
</span><del>-            document.getElementById(&quot;result&quot;).innerText = !success ? &quot;FAIL&quot; : &quot;PASS&quot;;
</del><ins>+            document.getElementById(&quot;result&quot;).innerText = fired ? &quot;FAIL&quot; : &quot;PASS&quot;;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         addEventListener(&quot;selectstart&quot;, selectStart, true);
</span></span></pre></div>
<a id="trunkWebCoreAndroidmk"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/Android.mk (70984 => 70985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/Android.mk        2010-10-30 17:32:24 UTC (rev 70984)
+++ trunk/WebCore/Android.mk        2010-10-30 18:48:23 UTC (rev 70985)
</span><span class="lines">@@ -132,7 +132,6 @@
</span><span class="cx">         dom/EntityReference.cpp \
</span><span class="cx">         dom/ErrorEvent.cpp \
</span><span class="cx">         dom/Event.cpp \
</span><del>-        dom/EventContext.cpp \
</del><span class="cx">         dom/EventNames.cpp \
</span><span class="cx">         dom/EventTarget.cpp \
</span><span class="cx">         dom/ExceptionBase.cpp \
</span><span class="lines">@@ -193,7 +192,6 @@
</span><span class="cx">         dom/WebKitAnimationEvent.cpp \
</span><span class="cx">         dom/WebKitTransitionEvent.cpp \
</span><span class="cx">         dom/WheelEvent.cpp \
</span><del>-        dom/WindowEventContext.cpp \
</del><span class="cx">         dom/XMLDocumentParser.cpp \
</span><span class="cx">         dom/XMLDocumentParserLibxml2.cpp \
</span><span class="cx">         dom/XMLDocumentParserScope.cpp \
</span></span></pre></div>
<a id="trunkWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/CMakeLists.txt (70984 => 70985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/CMakeLists.txt        2010-10-30 17:32:24 UTC (rev 70984)
+++ trunk/WebCore/CMakeLists.txt        2010-10-30 18:48:23 UTC (rev 70985)
</span><span class="lines">@@ -824,7 +824,6 @@
</span><span class="cx">     dom/EntityReference.cpp
</span><span class="cx">     dom/ErrorEvent.cpp
</span><span class="cx">     dom/Event.cpp
</span><del>-    dom/EventContext.cpp
</del><span class="cx">     dom/EventNames.cpp
</span><span class="cx">     dom/EventTarget.cpp
</span><span class="cx">     dom/ExceptionBase.cpp
</span><span class="lines">@@ -882,7 +881,6 @@
</span><span class="cx">     dom/WebKitAnimationEvent.cpp
</span><span class="cx">     dom/WebKitTransitionEvent.cpp
</span><span class="cx">     dom/WheelEvent.cpp
</span><del>-    dom/WindowEventContext.cpp
</del><span class="cx">     dom/XMLDocumentParser.cpp
</span><span class="cx">     dom/XMLDocumentParserLibxml2.cpp
</span><span class="cx">     dom/XMLDocumentParserScope.cpp
</span></span></pre></div>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (70984 => 70985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2010-10-30 17:32:24 UTC (rev 70984)
+++ trunk/WebCore/ChangeLog        2010-10-30 18:48:23 UTC (rev 70985)
</span><span class="lines">@@ -1,5 +1,50 @@
</span><span class="cx"> 2010-10-30  Dimitri Glazkov  &lt;dglazkov@chromium.org&gt;
</span><span class="cx"> 
</span><ins>+        Unreviewed, rolling out r70984.
+        http://trac.webkit.org/changeset/70984
+        https://bugs.webkit.org/show_bug.cgi?id=46015
+
+        Made media/audio-delete-while-slider-thumb-clicked.html crash.
+
+        * Android.mk:
+        * CMakeLists.txt:
+        * GNUmakefile.am:
+        * WebCore.gypi:
+        * WebCore.pro:
+        * WebCore.xcodeproj/project.pbxproj:
+        * dom/ContainerNode.cpp:
+        (WebCore::notifyChildInserted):
+        * dom/EventContext.cpp: Removed.
+        * dom/EventContext.h: Removed.
+        * dom/Node.cpp:
+        (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc):
+        (WebCore::Node::createRendererIfNeeded):
+        (WebCore::Node::eventParentNode):
+        (WebCore::Node::enclosingLinkEventParentOrSelf):
+        (WebCore::eventTargetAsSVGElementInstance):
+        (WebCore::eventTargetRespectingSVGTargetRules):
+        (WebCore::Node::eventAncestors):
+        (WebCore::Node::dispatchGenericEvent):
+        * dom/Node.h:
+        * dom/Text.cpp:
+        (WebCore::Text::createRenderer):
+        * dom/WindowEventContext.cpp: Removed.
+        * dom/WindowEventContext.h: Removed.
+        * inspector/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::getEventListenersForNode):
+        * inspector/InspectorInstrumentation.cpp:
+        (WebCore::eventHasListeners):
+        (WebCore::InspectorInstrumentation::willDispatchEventImpl):
+        * inspector/InspectorInstrumentation.h:
+        (WebCore::InspectorInstrumentation::willDispatchEvent):
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::updateMouseEventTargetNode):
+        * svg/SVGElement.cpp:
+        (WebCore::SVGElement::eventParentNode):
+        * svg/SVGElement.h:
+
+2010-10-30  Dimitri Glazkov  &lt;dglazkov@chromium.org&gt;
+
</ins><span class="cx">         Reviewed by Darin Adler.
</span><span class="cx"> 
</span><span class="cx">         Implement shadow DOM-aware event targeting and introduce EventContext to track the context of each event dispatch.
</span></span></pre></div>
<a id="trunkWebCoreGNUmakefileam"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/GNUmakefile.am (70984 => 70985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/GNUmakefile.am        2010-10-30 17:32:24 UTC (rev 70984)
+++ trunk/WebCore/GNUmakefile.am        2010-10-30 18:48:23 UTC (rev 70985)
</span><span class="lines">@@ -1132,10 +1132,8 @@
</span><span class="cx">         WebCore/dom/ErrorEvent.cpp \
</span><span class="cx">         WebCore/dom/ErrorEvent.h \
</span><span class="cx">         WebCore/dom/Event.cpp \
</span><del>-        WebCore/dom/Event.h \
-        WebCore/dom/EventContext.cpp \
-        WebCore/dom/EventContext.h \
</del><span class="cx">         WebCore/dom/EventException.h \
</span><ins>+        WebCore/dom/Event.h \
</ins><span class="cx">         WebCore/dom/EventListener.h \
</span><span class="cx">         WebCore/dom/EventNames.cpp \
</span><span class="cx">         WebCore/dom/EventNames.h \
</span><span class="lines">@@ -1263,8 +1261,6 @@
</span><span class="cx">         WebCore/dom/WebKitTransitionEvent.h \
</span><span class="cx">         WebCore/dom/WheelEvent.cpp \
</span><span class="cx">         WebCore/dom/WheelEvent.h \
</span><del>-        WebCore/dom/WindowEventContext.cpp \
-        WebCore/dom/WindowEventContext.h \
</del><span class="cx">         WebCore/dom/XMLDocumentParser.cpp \
</span><span class="cx">         WebCore/dom/XMLDocumentParser.h \
</span><span class="cx">         WebCore/dom/XMLDocumentParserLibxml2.cpp \
</span></span></pre></div>
<a id="trunkWebCoreWebCoregypi"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCore.gypi (70984 => 70985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCore.gypi        2010-10-30 17:32:24 UTC (rev 70984)
+++ trunk/WebCore/WebCore.gypi        2010-10-30 18:48:23 UTC (rev 70985)
</span><span class="lines">@@ -1204,8 +1204,6 @@
</span><span class="cx">             'dom/ErrorEvent.h',
</span><span class="cx">             'dom/Event.cpp',
</span><span class="cx">             'dom/Event.h',
</span><del>-            'dom/EventContext.cpp',
-            'dom/EventContext.h',
</del><span class="cx">             'dom/EventException.h',
</span><span class="cx">             'dom/EventListener.h',
</span><span class="cx">             'dom/EventNames.cpp',
</span><span class="lines">@@ -1341,8 +1339,6 @@
</span><span class="cx">             'dom/WebKitTransitionEvent.h',
</span><span class="cx">             'dom/WheelEvent.cpp',
</span><span class="cx">             'dom/WheelEvent.h',
</span><del>-            'dom/WindowEventContext.cpp',
-            'dom/WindowEventContext.h',
</del><span class="cx">             'dom/XMLDocumentParser.cpp',
</span><span class="cx">             'dom/XMLDocumentParser.h',
</span><span class="cx">             'dom/XMLDocumentParserLibxml2.cpp',
</span></span></pre></div>
<a id="trunkWebCoreWebCorepro"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCore.pro (70984 => 70985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCore.pro        2010-10-30 17:32:24 UTC (rev 70984)
+++ trunk/WebCore/WebCore.pro        2010-10-30 18:48:23 UTC (rev 70985)
</span><span class="lines">@@ -713,7 +713,6 @@
</span><span class="cx">     dom/EntityReference.cpp \
</span><span class="cx">     dom/ErrorEvent.cpp \
</span><span class="cx">     dom/Event.cpp \
</span><del>-    dom/EventContext.cpp \
</del><span class="cx">     dom/EventNames.cpp \
</span><span class="cx">     dom/EventTarget.cpp \
</span><span class="cx">     dom/ExceptionBase.cpp \
</span><span class="lines">@@ -774,7 +773,6 @@
</span><span class="cx">     dom/WebKitAnimationEvent.cpp \
</span><span class="cx">     dom/WebKitTransitionEvent.cpp \
</span><span class="cx">     dom/WheelEvent.cpp \
</span><del>-    dom/WindowEventContext.cpp \
</del><span class="cx">     dom/XMLDocumentParser.cpp \
</span><span class="cx">     dom/XMLDocumentParserQt.cpp \
</span><span class="cx">     dom/default/PlatformMessagePortChannel.cpp \
</span></span></pre></div>
<a id="trunkWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCore.xcodeproj/project.pbxproj (70984 => 70985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCore.xcodeproj/project.pbxproj        2010-10-30 17:32:24 UTC (rev 70984)
+++ trunk/WebCore/WebCore.xcodeproj/project.pbxproj        2010-10-30 18:48:23 UTC (rev 70985)
</span><span class="lines">@@ -891,11 +891,7 @@
</span><span class="cx">                 410B7E721045FAB000D8224F /* JSMessageEventCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 410B7E711045FAB000D8224F /* JSMessageEventCustom.cpp */; };
</span><span class="cx">                 411046410FA222A600BA436A /* ScriptEventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 4110463F0FA222A600BA436A /* ScriptEventListener.h */; };
</span><span class="cx">                 411046420FA222A600BA436A /* ScriptEventListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 411046400FA222A600BA436A /* ScriptEventListener.cpp */; };
</span><del>-                4123E569127B3041000FEEA7 /* WindowEventContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 4123E567127B3041000FEEA7 /* WindowEventContext.h */; };
-                4123E56A127B3041000FEEA7 /* WindowEventContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4123E568127B3041000FEEA7 /* WindowEventContext.cpp */; };
</del><span class="cx">                 4127D5370F8AAB1D00E424F5 /* ScriptState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4127D5360F8AAB1D00E424F5 /* ScriptState.cpp */; };
</span><del>-                4138D3351244054800323D33 /* EventContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 4138D3331244054800323D33 /* EventContext.h */; };
-                4138D3361244054800323D33 /* EventContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4138D3341244054800323D33 /* EventContext.cpp */; };
</del><span class="cx">                 4162A450101145AE00DFF3ED /* DedicatedWorkerContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4162A44D101145AE00DFF3ED /* DedicatedWorkerContext.cpp */; };
</span><span class="cx">                 4162A451101145AE00DFF3ED /* DedicatedWorkerContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 4162A44E101145AE00DFF3ED /* DedicatedWorkerContext.h */; };
</span><span class="cx">                 4162A454101145E300DFF3ED /* JSDedicatedWorkerContextCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4162A453101145E300DFF3ED /* JSDedicatedWorkerContextCustom.cpp */; };
</span><span class="lines">@@ -6959,11 +6955,7 @@
</span><span class="cx">                 410B7E711045FAB000D8224F /* JSMessageEventCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMessageEventCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 4110463F0FA222A600BA436A /* ScriptEventListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptEventListener.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 411046400FA222A600BA436A /* ScriptEventListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptEventListener.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                4123E567127B3041000FEEA7 /* WindowEventContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WindowEventContext.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                4123E568127B3041000FEEA7 /* WindowEventContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WindowEventContext.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 4127D5360F8AAB1D00E424F5 /* ScriptState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptState.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                4138D3331244054800323D33 /* EventContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventContext.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                4138D3341244054800323D33 /* EventContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventContext.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 4162A44D101145AE00DFF3ED /* DedicatedWorkerContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DedicatedWorkerContext.cpp; path = workers/DedicatedWorkerContext.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 4162A44E101145AE00DFF3ED /* DedicatedWorkerContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DedicatedWorkerContext.h; path = workers/DedicatedWorkerContext.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 4162A44F101145AE00DFF3ED /* DedicatedWorkerContext.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DedicatedWorkerContext.idl; path = workers/DedicatedWorkerContext.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -18171,8 +18163,6 @@
</span><span class="cx">                                 85031B2B0A44EFC700F992E0 /* Event.cpp */,
</span><span class="cx">                                 85031B2C0A44EFC700F992E0 /* Event.h */,
</span><span class="cx">                                 14E836D209F8512000B85AE4 /* Event.idl */,
</span><del>-                                4138D3341244054800323D33 /* EventContext.cpp */,
-                                4138D3331244054800323D33 /* EventContext.h */,
</del><span class="cx">                                 BC60D9090D2A17CE00B9918F /* EventException.h */,
</span><span class="cx">                                 BC60D90A0D2A17CE00B9918F /* EventException.idl */,
</span><span class="cx">                                 935FBC4409BA00B900E230B1 /* EventListener.h */,
</span><span class="lines">@@ -18333,8 +18323,6 @@
</span><span class="cx">                                 85031B3A0A44EFC700F992E0 /* WheelEvent.cpp */,
</span><span class="cx">                                 85031B3B0A44EFC700F992E0 /* WheelEvent.h */,
</span><span class="cx">                                 93EEC1F709C2877700C515D1 /* WheelEvent.idl */,
</span><del>-                                4123E568127B3041000FEEA7 /* WindowEventContext.cpp */,
-                                4123E567127B3041000FEEA7 /* WindowEventContext.h */,
</del><span class="cx">                                 F523D30902DE4476018635CA /* XMLDocumentParser.cpp */,
</span><span class="cx">                                 F523D30A02DE4476018635CA /* XMLDocumentParser.h */,
</span><span class="cx">                                 54C50F7A0E801DF3009832A0 /* XMLDocumentParserLibxml2.cpp */,
</span><span class="lines">@@ -19498,7 +19486,6 @@
</span><span class="cx">                                 89878560122CA064003AABDA /* ErrorCallback.h in Headers */,
</span><span class="cx">                                 2ECF7AE210162B5800427DE7 /* ErrorEvent.h in Headers */,
</span><span class="cx">                                 85031B420A44EFC700F992E0 /* Event.h in Headers */,
</span><del>-                                4138D3351244054800323D33 /* EventContext.h in Headers */,
</del><span class="cx">                                 BC60D90C0D2A17CE00B9918F /* EventException.h in Headers */,
</span><span class="cx">                                 93C09A530B064DB3005ABD4D /* EventHandler.h in Headers */,
</span><span class="cx">                                 935FBC4509BA00B900E230B1 /* EventListener.h in Headers */,
</span><span class="lines">@@ -21154,7 +21141,6 @@
</span><span class="cx">                                 85031B510A44EFC700F992E0 /* WheelEvent.h in Headers */,
</span><span class="cx">                                 9380F47409A11AB4001FDB34 /* Widget.h in Headers */,
</span><span class="cx">                                 939B02EF0EA2DBC400C54570 /* WidthIterator.h in Headers */,
</span><del>-                                4123E569127B3041000FEEA7 /* WindowEventContext.h in Headers */,
</del><span class="cx">                                 BC8243E90D0CFD7500460C8F /* WindowFeatures.h in Headers */,
</span><span class="cx">                                 E1E1BF00115FF6FB006F52CA /* WindowsKeyboardCodes.h in Headers */,
</span><span class="cx">                                 08203AA00ED8C35300B8B61A /* WMLAccessElement.h in Headers */,
</span><span class="lines">@@ -22130,7 +22116,6 @@
</span><span class="cx">                                 893C480C1248BD3A002B3D86 /* EntrySync.cpp in Sources */,
</span><span class="cx">                                 2ECF7AE110162B5800427DE7 /* ErrorEvent.cpp in Sources */,
</span><span class="cx">                                 85031B410A44EFC700F992E0 /* Event.cpp in Sources */,
</span><del>-                                4138D3361244054800323D33 /* EventContext.cpp in Sources */,
</del><span class="cx">                                 93C09A810B064F00005ABD4D /* EventHandler.cpp in Sources */,
</span><span class="cx">                                 93C09A7F0B064EEF005ABD4D /* EventHandlerMac.mm in Sources */,
</span><span class="cx">                                 1CA19E050DC255950065A994 /* EventLoopMac.mm in Sources */,
</span><span class="lines">@@ -23730,7 +23715,6 @@
</span><span class="cx">                                 9380F47309A11AB4001FDB34 /* Widget.cpp in Sources */,
</span><span class="cx">                                 9380F47809A11ACC001FDB34 /* WidgetMac.mm in Sources */,
</span><span class="cx">                                 939B02EE0EA2DBC400C54570 /* WidthIterator.cpp in Sources */,
</span><del>-                                4123E56A127B3041000FEEA7 /* WindowEventContext.cpp in Sources */,
</del><span class="cx">                                 BC8243E80D0CFD7500460C8F /* WindowFeatures.cpp in Sources */,
</span><span class="cx">                                 08203A9F0ED8C35300B8B61A /* WMLAccessElement.cpp in Sources */,
</span><span class="cx">                                 088C97510ECB6E28000534BA /* WMLAElement.cpp in Sources */,
</span></span></pre></div>
<a id="trunkWebCoredomContainerNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/dom/ContainerNode.cpp (70984 => 70985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/dom/ContainerNode.cpp        2010-10-30 17:32:24 UTC (rev 70984)
+++ trunk/WebCore/dom/ContainerNode.cpp        2010-10-30 18:48:23 UTC (rev 70985)
</span><span class="lines">@@ -1005,8 +1005,7 @@
</span><span class="cx">     RefPtr&lt;Node&gt; c = child;
</span><span class="cx">     RefPtr&lt;Document&gt; document = child-&gt;document();
</span><span class="cx"> 
</span><del>-    Node* parentOrHostNode = c-&gt;parentOrHostNode();
-    if (parentOrHostNode &amp;&amp; parentOrHostNode-&gt;inDocument())
</del><ins>+    if (c-&gt;parentNode() &amp;&amp; c-&gt;parentNode()-&gt;inDocument())
</ins><span class="cx">         c-&gt;insertedIntoDocument();
</span><span class="cx">     else
</span><span class="cx">         c-&gt;insertedIntoTree(true);
</span></span></pre></div>
<a id="trunkWebCoredomEventContextcpp"></a>
<div class="delfile"><h4>Deleted: trunk/WebCore/dom/EventContext.cpp (70984 => 70985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/dom/EventContext.cpp        2010-10-30 17:32:24 UTC (rev 70984)
+++ trunk/WebCore/dom/EventContext.cpp        2010-10-30 18:48:23 UTC (rev 70985)
</span><span class="lines">@@ -1,51 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Google Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- *
- */
-
-#include &quot;config.h&quot;
-#include &quot;EventContext.h&quot;
-
-#include &quot;DOMWindow.h&quot;
-#include &quot;Document.h&quot;
-#include &quot;Event.h&quot;
-#include &quot;Node.h&quot;
-
-namespace WebCore {
-
-EventContext::EventContext(PassRefPtr&lt;Node&gt; node, PassRefPtr&lt;EventTarget&gt; currentTarget, PassRefPtr&lt;EventTarget&gt; target)
-    : m_node(node)
-    , m_currentTarget(currentTarget)
-    , m_target(target)
-{
-}
-
-void EventContext::handleLocalEvents(Event* event) const
-{
-    event-&gt;setTarget(m_target.get());
-    event-&gt;setCurrentTarget(m_currentTarget.get());
-    m_node-&gt;handleLocalEvents(event);
-}
-
-}
</del></span></pre></div>
<a id="trunkWebCoredomEventContexth"></a>
<div class="delfile"><h4>Deleted: trunk/WebCore/dom/EventContext.h (70984 => 70985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/dom/EventContext.h        2010-10-30 17:32:24 UTC (rev 70984)
+++ trunk/WebCore/dom/EventContext.h        2010-10-30 18:48:23 UTC (rev 70985)
</span><span class="lines">@@ -1,65 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Google Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- *
- */
-
-#ifndef EventContext_h
-#define EventContext_h
-
-#include &lt;wtf/RefPtr.h&gt;
-
-namespace WebCore {
-
-class EventTarget;
-class Event;
-class Node;
-
-class EventContext {
-public:
-    // FIXME: Use ContainerNode instead of Node.
-    EventContext(PassRefPtr&lt;Node&gt;, PassRefPtr&lt;EventTarget&gt; currentTarget, PassRefPtr&lt;EventTarget&gt; target);
-
-    Node* node() const;
-    EventTarget* target() const;
-    void handleLocalEvents(Event*) const;
-
-private:
-    RefPtr&lt;Node&gt; m_node;
-    RefPtr&lt;EventTarget&gt; m_currentTarget;
-    RefPtr&lt;EventTarget&gt; m_target;
-};
-
-inline Node* EventContext::node() const
-{
-    return m_node.get();
-}
-
-inline EventTarget* EventContext::target() const
-{
-    return m_target.get();
-}
-
-}
-
-#endif // EventContext_h
</del></span></pre></div>
<a id="trunkWebCoredomNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/dom/Node.cpp (70984 => 70985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/dom/Node.cpp        2010-10-30 17:32:24 UTC (rev 70984)
+++ trunk/WebCore/dom/Node.cpp        2010-10-30 18:48:23 UTC (rev 70985)
</span><span class="lines">@@ -45,7 +45,6 @@
</span><span class="cx"> #include &quot;DynamicNodeList.h&quot;
</span><span class="cx"> #include &quot;Element.h&quot;
</span><span class="cx"> #include &quot;Event.h&quot;
</span><del>-#include &quot;EventContext.h&quot;
</del><span class="cx"> #include &quot;EventException.h&quot;
</span><span class="cx"> #include &quot;EventHandler.h&quot;
</span><span class="cx"> #include &quot;EventListener.h&quot;
</span><span class="lines">@@ -81,7 +80,6 @@
</span><span class="cx"> #include &quot;WebKitAnimationEvent.h&quot;
</span><span class="cx"> #include &quot;WebKitTransitionEvent.h&quot;
</span><span class="cx"> #include &quot;WheelEvent.h&quot;
</span><del>-#include &quot;WindowEventContext.h&quot;
</del><span class="cx"> #include &quot;XMLNames.h&quot;
</span><span class="cx"> #include &quot;htmlediting.h&quot;
</span><span class="cx"> #include &lt;wtf/HashSet.h&gt;
</span><span class="lines">@@ -736,9 +734,9 @@
</span><span class="cx"> 
</span><span class="cx"> inline void Node::markAncestorsWithChildNeedsStyleRecalc()
</span><span class="cx"> {
</span><del>-    for (ContainerNode* p = parentOrHostNode(); p &amp;&amp; !p-&gt;childNeedsStyleRecalc(); p = p-&gt;parentOrHostNode())
</del><ins>+    for (ContainerNode* p = parentNode(); p &amp;&amp; !p-&gt;childNeedsStyleRecalc(); p = p-&gt;parentNode())
</ins><span class="cx">         p-&gt;setChildNeedsStyleRecalc();
</span><del>-
</del><ins>+    
</ins><span class="cx">     if (document()-&gt;childNeedsStyleRecalc())
</span><span class="cx">         document()-&gt;scheduleStyleRecalc();
</span><span class="cx"> }
</span><span class="lines">@@ -1323,7 +1321,7 @@
</span><span class="cx"> 
</span><span class="cx">     ASSERT(!renderer());
</span><span class="cx">     
</span><del>-    ContainerNode* parent = parentOrHostNode();
</del><ins>+    ContainerNode* parent = parentNode();    
</ins><span class="cx">     ASSERT(parent);
</span><span class="cx">     
</span><span class="cx">     RenderObject* parentRenderer = parent-&gt;renderer();
</span><span class="lines">@@ -2241,9 +2239,14 @@
</span><span class="cx">     addSubresourceAttributeURLs(urls);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+ContainerNode* Node::eventParentNode()
+{
+    return parentNode();
+}
+
</ins><span class="cx"> Node* Node::enclosingLinkEventParentOrSelf()
</span><span class="cx"> {
</span><del>-    for (Node* node = this; node; node = node-&gt;parentOrHostNode()) {
</del><ins>+    for (Node* node = this; node; node = node-&gt;eventParentNode()) {
</ins><span class="cx">         // For imagemaps, the enclosing link node is the associated area element not the image itself.
</span><span class="cx">         // So we don't let images be the enclosingLinkNode, even though isLink sometimes returns true
</span><span class="cx">         // for them.
</span><span class="lines">@@ -2481,13 +2484,12 @@
</span><span class="cx">     fireEventListeners(event);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline EventTarget* eventTargetRespectingSVGTargetRules(Node* referenceNode)
</del><ins>+#if ENABLE(SVG)
+static inline SVGElementInstance* eventTargetAsSVGElementInstance(Node* referenceNode)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(referenceNode);
</span><del>-
-#if ENABLE(SVG)
</del><span class="cx">     if (!referenceNode-&gt;isSVGElement())
</span><del>-        return referenceNode;
</del><ins>+        return 0;
</ins><span class="cx"> 
</span><span class="cx">     // Spec: The event handling for the non-exposed tree works as if the referenced element had been textually included
</span><span class="cx">     // as a deeply cloned child of the 'use' element, except that events are dispatched to the SVGElementInstance objects
</span><span class="lines">@@ -2501,39 +2503,36 @@
</span><span class="cx">         if (SVGElementInstance* instance = static_cast&lt;SVGUseElement*&gt;(shadowTreeParentElement)-&gt;instanceForShadowTreeElement(referenceNode))
</span><span class="cx">             return instance;
</span><span class="cx">     }
</span><del>-#endif
</del><span class="cx"> 
</span><del>-    return referenceNode;
</del><ins>+    return 0;
</ins><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx"> 
</span><del>-void Node::getEventAncestors(Vector&lt;EventContext&gt;&amp; ancestors, EventTarget* originalTarget)
</del><ins>+static inline EventTarget* eventTargetRespectingSVGTargetRules(Node* referenceNode)
</ins><span class="cx"> {
</span><del>-    if (!inDocument())
-        return;
</del><ins>+    ASSERT(referenceNode);
</ins><span class="cx"> 
</span><del>-    EventTarget* target = originalTarget;
-    Node* ancestor = this;
-    bool shouldSkipNextAncestor = false;
-    while (true) {
-        if (ancestor-&gt;isShadowNode()) {
-            ancestor = ancestor-&gt;shadowParentNode();
-            if (!shouldSkipNextAncestor)
-                target = ancestor;
-        } else
-            ancestor = ancestor-&gt;parentNode();
</del><ins>+#if ENABLE(SVG)
+    if (SVGElementInstance* instance = eventTargetAsSVGElementInstance(referenceNode)) {
+        ASSERT(instance-&gt;shadowTreeElement() == referenceNode);
+        return instance;
+    }
+#endif
</ins><span class="cx"> 
</span><del>-        if (!ancestor)
-            return;
</del><ins>+    return referenceNode;
+}
</ins><span class="cx"> 
</span><ins>+void Node::eventAncestors(Vector&lt;RefPtr&lt;ContainerNode&gt; &gt; &amp;ancestors)
+{
+    if (inDocument()) {
+        for (ContainerNode* ancestor = eventParentNode(); ancestor; ancestor = ancestor-&gt;eventParentNode()) {
</ins><span class="cx"> #if ENABLE(SVG)
</span><del>-        // Skip SVGShadowTreeRootElement.
-        shouldSkipNextAncestor = ancestor-&gt;isSVGElement() &amp;&amp; ancestor-&gt;isShadowNode();
-        if (shouldSkipNextAncestor)
-            continue;
</del><ins>+            // Skip &lt;use&gt; shadow tree elements.
+            if (ancestor-&gt;isSVGElement() &amp;&amp; ancestor-&gt;isShadowNode())
+                continue;
</ins><span class="cx"> #endif
</span><del>-        // FIXME: Unroll the extra loop inside eventTargetRespectingSVGTargetRules into this loop.
-        ancestors.append(EventContext(ancestor, eventTargetRespectingSVGTargetRules(ancestor), target));
-
</del><ins>+            ancestors.append(ancestor);
+        }
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2548,11 +2547,6 @@
</span><span class="cx">     return dispatchGenericEvent(event.release());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static const EventContext* topEventContext(const Vector&lt;EventContext&gt;&amp; ancestors)
-{
-    return ancestors.isEmpty() ? 0 : &amp;(ancestors.last());
-}
-
</del><span class="cx"> bool Node::dispatchGenericEvent(PassRefPtr&lt;Event&gt; prpEvent)
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;Event&gt; event(prpEvent);
</span><span class="lines">@@ -2565,13 +2559,20 @@
</span><span class="cx">     // If the node is not in a document just send the event to it.
</span><span class="cx">     // Be sure to ref all of nodes since event handlers could result in the last reference going away.
</span><span class="cx">     RefPtr&lt;Node&gt; thisNode(this);
</span><del>-    RefPtr&lt;EventTarget&gt; originalTarget = event-&gt;target();
-    Vector&lt;EventContext&gt; ancestors;
-    getEventAncestors(ancestors, originalTarget.get());
</del><ins>+    Vector&lt;RefPtr&lt;ContainerNode&gt; &gt; ancestors;
+    eventAncestors(ancestors);
</ins><span class="cx"> 
</span><del>-    WindowEventContext windowContext(event.get(), this, topEventContext(ancestors));
</del><ins>+    // Set up a pointer to indicate whether / where to dispatch window events.
+    // We don't dispatch load events to the window. That quirk was originally
+    // added because Mozilla doesn't propagate load events to the window object.
+    DOMWindow* targetForWindowEvents = 0;
+    if (event-&gt;type() != eventNames().loadEvent) {
+        Node* topLevelContainer = ancestors.isEmpty() ? this : ancestors.last().get();
+        if (topLevelContainer-&gt;isDocumentNode())
+            targetForWindowEvents = static_cast&lt;Document*&gt;(topLevelContainer)-&gt;domWindow();
+    }
</ins><span class="cx"> 
</span><del>-    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willDispatchEvent(document(), *event, windowContext.window(), this, ancestors);
</del><ins>+    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willDispatchEvent(document(), *event, targetForWindowEvents, this, ancestors);
</ins><span class="cx"> 
</span><span class="cx">     // Give the target node a chance to do some work before DOM event handlers get a crack.
</span><span class="cx">     void* data = preDispatchEventHandler(event.get());
</span><span class="lines">@@ -2581,17 +2582,22 @@
</span><span class="cx">     // Trigger capturing event handlers, starting at the top and working our way down.
</span><span class="cx">     event-&gt;setEventPhase(Event::CAPTURING_PHASE);
</span><span class="cx"> 
</span><del>-    if (windowContext.handleLocalEvents(event.get()) &amp;&amp; event-&gt;propagationStopped())
-        goto doneDispatching;
-
</del><ins>+    if (targetForWindowEvents) {
+        event-&gt;setCurrentTarget(targetForWindowEvents);
+        targetForWindowEvents-&gt;fireEventListeners(event.get());
+        if (event-&gt;propagationStopped())
+            goto doneDispatching;
+    }
</ins><span class="cx">     for (size_t i = ancestors.size(); i; --i) {
</span><del>-        ancestors[i - 1].handleLocalEvents(event.get());
</del><ins>+        ContainerNode* ancestor = ancestors[i - 1].get();
+        event-&gt;setCurrentTarget(eventTargetRespectingSVGTargetRules(ancestor));
+        ancestor-&gt;handleLocalEvents(event.get());
</ins><span class="cx">         if (event-&gt;propagationStopped())
</span><span class="cx">             goto doneDispatching;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     event-&gt;setEventPhase(Event::AT_TARGET);
</span><del>-    event-&gt;setTarget(originalTarget.get());
</del><ins>+
</ins><span class="cx">     event-&gt;setCurrentTarget(eventTargetRespectingSVGTargetRules(this));
</span><span class="cx">     handleLocalEvents(event.get());
</span><span class="cx">     if (event-&gt;propagationStopped())
</span><span class="lines">@@ -2603,15 +2609,21 @@
</span><span class="cx"> 
</span><span class="cx">         size_t size = ancestors.size();
</span><span class="cx">         for (size_t i = 0; i &lt; size; ++i) {
</span><del>-            ancestors[i].handleLocalEvents(event.get());
</del><ins>+            ContainerNode* ancestor = ancestors[i].get();
+            event-&gt;setCurrentTarget(eventTargetRespectingSVGTargetRules(ancestor));
+            ancestor-&gt;handleLocalEvents(event.get());
</ins><span class="cx">             if (event-&gt;propagationStopped() || event-&gt;cancelBubble())
</span><span class="cx">                 goto doneDispatching;
</span><span class="cx">         }
</span><del>-        windowContext.handleLocalEvents(event.get());
</del><ins>+        if (targetForWindowEvents) {
+            event-&gt;setCurrentTarget(targetForWindowEvents);
+            targetForWindowEvents-&gt;fireEventListeners(event.get());
+            if (event-&gt;propagationStopped() || event-&gt;cancelBubble())
+                goto doneDispatching;
+        }
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> doneDispatching:
</span><del>-    event-&gt;setTarget(originalTarget.get());
</del><span class="cx">     event-&gt;setCurrentTarget(0);
</span><span class="cx">     event-&gt;setEventPhase(0);
</span><span class="cx"> 
</span><span class="lines">@@ -2632,7 +2644,8 @@
</span><span class="cx">         if (event-&gt;bubbles()) {
</span><span class="cx">             size_t size = ancestors.size();
</span><span class="cx">             for (size_t i = 0; i &lt; size; ++i) {
</span><del>-                ancestors[i].node()-&gt;defaultEventHandler(event.get());
</del><ins>+                ContainerNode* ancestor = ancestors[i].get();
+                ancestor-&gt;defaultEventHandler(event.get());
</ins><span class="cx">                 ASSERT(!event-&gt;defaultPrevented());
</span><span class="cx">                 if (event-&gt;defaultHandled())
</span><span class="cx">                     goto doneWithDefault;
</span></span></pre></div>
<a id="trunkWebCoredomNodeh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/dom/Node.h (70984 => 70985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/dom/Node.h        2010-10-30 17:32:24 UTC (rev 70984)
+++ trunk/WebCore/dom/Node.h        2010-10-30 18:48:23 UTC (rev 70985)
</span><span class="lines">@@ -49,7 +49,6 @@
</span><span class="cx"> class DynamicNodeList;
</span><span class="cx"> class Element;
</span><span class="cx"> class Event;
</span><del>-class EventContext;
</del><span class="cx"> class EventListener;
</span><span class="cx"> class FloatPoint;
</span><span class="cx"> class Frame;
</span><span class="lines">@@ -205,14 +204,16 @@
</span><span class="cx">     Node* shadowAncestorNode();
</span><span class="cx">     Node* shadowTreeRootNode();
</span><span class="cx">     bool isInShadowTree();
</span><del>-    // Node's parent or shadow tree host.
-    ContainerNode* parentOrHostNode();
</del><span class="cx"> 
</span><ins>+    // The node's parent for the purpose of event capture and bubbling.
+    virtual ContainerNode* eventParentNode();
+
</ins><span class="cx">     // Returns the enclosing event parent node (or self) that, when clicked, would trigger a navigation.
</span><span class="cx">     Node* enclosingLinkEventParentOrSelf();
</span><span class="cx"> 
</span><span class="cx">     // Node ancestors when concerned about event flow.
</span><del>-    void getEventAncestors(Vector&lt;EventContext&gt;&amp; ancestors, EventTarget*);
</del><ins>+    // FIXME: Should be named getEventAncestors.
+    void eventAncestors(Vector&lt;RefPtr&lt;ContainerNode&gt; &gt; &amp;ancestors);
</ins><span class="cx"> 
</span><span class="cx">     bool isBlockFlow() const;
</span><span class="cx">     bool isBlockFlowOrBlockTable() const;
</span><span class="lines">@@ -692,13 +693,6 @@
</span><span class="cx">         urls.add(url);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline ContainerNode* Node::parentOrHostNode()
-{
-    if (ContainerNode* parent = parentNode())
-        return parent;
-    return shadowParentNode();
-}
-
</del><span class="cx"> } //namespace
</span><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span></span></pre></div>
<a id="trunkWebCoredomTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/dom/Text.cpp (70984 => 70985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/dom/Text.cpp        2010-10-30 17:32:24 UTC (rev 70984)
+++ trunk/WebCore/dom/Text.cpp        2010-10-30 18:48:23 UTC (rev 70985)
</span><span class="lines">@@ -239,11 +239,10 @@
</span><span class="cx"> 
</span><span class="cx"> RenderObject* Text::createRenderer(RenderArena* arena, RenderStyle*)
</span><span class="cx"> {
</span><del>-    Node* parentOrHost = parentOrHostNode();
</del><span class="cx"> #if ENABLE(SVG)
</span><del>-    if (parentOrHost-&gt;isSVGElement()
</del><ins>+    if (parentNode()-&gt;isSVGElement()
</ins><span class="cx"> #if ENABLE(SVG_FOREIGN_OBJECT)
</span><del>-        &amp;&amp; !parentOrHost-&gt;hasTagName(SVGNames::foreignObjectTag)
</del><ins>+        &amp;&amp; !parentNode()-&gt;hasTagName(SVGNames::foreignObjectTag)
</ins><span class="cx"> #endif
</span><span class="cx">     )
</span><span class="cx">         return new (arena) RenderSVGInlineText(this, dataImpl());
</span></span></pre></div>
<a id="trunkWebCoredomWindowEventContextcpp"></a>
<div class="delfile"><h4>Deleted: trunk/WebCore/dom/WindowEventContext.cpp (70984 => 70985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/dom/WindowEventContext.cpp        2010-10-30 17:32:24 UTC (rev 70984)
+++ trunk/WebCore/dom/WindowEventContext.cpp        2010-10-30 18:48:23 UTC (rev 70985)
</span><span class="lines">@@ -1,64 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Google Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- *
- */
-
-#include &quot;config.h&quot;
-#include &quot;WindowEventContext.h&quot;
-
-#include &quot;DOMWindow.h&quot;
-#include &quot;Document.h&quot;
-#include &quot;Event.h&quot;
-#include &quot;EventContext.h&quot;
-#include &quot;Node.h&quot;
-
-namespace WebCore {
-
-WindowEventContext::WindowEventContext(Event* event, PassRefPtr&lt;Node&gt; node, const EventContext* topEventContext)
-{
-    // We don't dispatch load events to the window. That quirk was originally
-    // added because Mozilla doesn't propagate load events to the window object.
-    if (event-&gt;type() == eventNames().loadEvent)
-        return;
-
-    Node* topLevelContainer = topEventContext ? topEventContext-&gt;node() : node.get();
-    if (!topLevelContainer-&gt;isDocumentNode())
-        return;
-
-    m_window = static_cast&lt;Document*&gt;(topLevelContainer)-&gt;domWindow();
-    m_target = topEventContext ? topEventContext-&gt;target() : node.get();
-}
-
-bool WindowEventContext::handleLocalEvents(Event* event)
-{
-    if (!m_window)
-        return false;
-
-    event-&gt;setTarget(target());
-    event-&gt;setCurrentTarget(window());
-    m_window-&gt;fireEventListeners(event);
-    return true;
-}
-
-}
</del></span></pre></div>
<a id="trunkWebCoredomWindowEventContexth"></a>
<div class="delfile"><h4>Deleted: trunk/WebCore/dom/WindowEventContext.h (70984 => 70985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/dom/WindowEventContext.h        2010-10-30 17:32:24 UTC (rev 70984)
+++ trunk/WebCore/dom/WindowEventContext.h        2010-10-30 18:48:23 UTC (rev 70985)
</span><span class="lines">@@ -1,65 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Google Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- *
- */
-
-#ifndef WindowEventContext_h
-#define WindowEventContext_h
-
-#include &lt;wtf/RefPtr.h&gt;
-
-namespace WebCore {
-
-class DOMWindow;
-class EventTarget;
-class EventContext;
-class Event;
-class Node;
-
-class WindowEventContext {
-public:
-    WindowEventContext(Event*, PassRefPtr&lt;Node&gt;, const EventContext*);
-
-    DOMWindow* window() const;
-    EventTarget* target() const;
-    bool handleLocalEvents(Event* event);
-
-private:
-    RefPtr&lt;DOMWindow&gt; m_window;
-    RefPtr&lt;EventTarget&gt; m_target;
-};
-
-inline DOMWindow* WindowEventContext::window() const
-{
-    return m_window.get();
-}
-
-inline EventTarget* WindowEventContext::target() const
-{
-    return m_target.get();
-}
-
-}
-
-#endif // WindowEventContext_h
</del></span></pre></div>
<a id="trunkWebCoreinspectorInspectorDOMAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/inspector/InspectorDOMAgent.cpp (70984 => 70985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/InspectorDOMAgent.cpp        2010-10-30 17:32:24 UTC (rev 70984)
+++ trunk/WebCore/inspector/InspectorDOMAgent.cpp        2010-10-30 18:48:23 UTC (rev 70985)
</span><span class="lines">@@ -51,7 +51,6 @@
</span><span class="cx"> #include &quot;Document.h&quot;
</span><span class="cx"> #include &quot;DocumentType.h&quot;
</span><span class="cx"> #include &quot;Event.h&quot;
</span><del>-#include &quot;EventContext.h&quot;
</del><span class="cx"> #include &quot;EventListener.h&quot;
</span><span class="cx"> #include &quot;EventNames.h&quot;
</span><span class="cx"> #include &quot;EventTarget.h&quot;
</span><span class="lines">@@ -608,13 +607,13 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // The Node's Event Ancestors (not including self)
</span><del>-    Vector&lt;EventContext&gt; ancestors;
-    node-&gt;getEventAncestors(ancestors, node);
</del><ins>+    Vector&lt;RefPtr&lt;ContainerNode&gt; &gt; ancestors;
+    node-&gt;eventAncestors(ancestors);
</ins><span class="cx"> 
</span><span class="cx">     // Nodes and their Listeners for the concerned event types (order is top to bottom)
</span><span class="cx">     Vector&lt;EventListenerInfo&gt; eventInformation;
</span><span class="cx">     for (size_t i = ancestors.size(); i; --i) {
</span><del>-        Node* ancestor = ancestors[i - 1].node();
</del><ins>+        ContainerNode* ancestor = ancestors[i - 1].get();
</ins><span class="cx">         for (size_t j = 0; j &lt; eventTypesLength; ++j) {
</span><span class="cx">             AtomicString&amp; type = eventTypes[j];
</span><span class="cx">             if (ancestor-&gt;hasEventListeners(type))
</span></span></pre></div>
<a id="trunkWebCoreinspectorInspectorInstrumentationcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/inspector/InspectorInstrumentation.cpp (70984 => 70985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/InspectorInstrumentation.cpp        2010-10-30 17:32:24 UTC (rev 70984)
+++ trunk/WebCore/inspector/InspectorInstrumentation.cpp        2010-10-30 18:48:23 UTC (rev 70985)
</span><span class="lines">@@ -35,7 +35,6 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;DOMWindow.h&quot;
</span><span class="cx"> #include &quot;Event.h&quot;
</span><del>-#include &quot;EventContext.h&quot;
</del><span class="cx"> #include &quot;InspectorController.h&quot;
</span><span class="cx"> #include &quot;InspectorDOMAgent.h&quot;
</span><span class="cx"> #include &quot;InspectorDebuggerAgent.h&quot;
</span><span class="lines">@@ -54,7 +53,7 @@
</span><span class="cx"> 
</span><span class="cx"> int InspectorInstrumentation::s_frontendCounter = 0;
</span><span class="cx"> 
</span><del>-static bool eventHasListeners(const AtomicString&amp; eventType, DOMWindow* window, Node* node, const Vector&lt;EventContext&gt;&amp; ancestors)
</del><ins>+static bool eventHasListeners(const AtomicString&amp; eventType, DOMWindow* window, Node* node, const Vector&lt;RefPtr&lt;ContainerNode&gt; &gt;&amp; ancestors)
</ins><span class="cx"> {
</span><span class="cx">     if (window &amp;&amp; window-&gt;hasEventListeners(eventType))
</span><span class="cx">         return true;
</span><span class="lines">@@ -63,7 +62,7 @@
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="cx">     for (size_t i = 0; i &lt; ancestors.size(); i++) {
</span><del>-        Node* ancestor = ancestors[i].node();
</del><ins>+        ContainerNode* ancestor = ancestors[i].get();
</ins><span class="cx">         if (ancestor-&gt;hasEventListeners(eventType))
</span><span class="cx">             return true;
</span><span class="cx">     }
</span><span class="lines">@@ -140,6 +139,7 @@
</span><span class="cx">         domAgent-&gt;characterDataModified(characterData);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx"> void InspectorInstrumentation::willSendXMLHttpRequestImpl(InspectorController* inspectorController, const String&amp; url)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(JAVASCRIPT_DEBUGGER)
</span><span class="lines">@@ -213,7 +213,7 @@
</span><span class="cx">         timelineAgent-&gt;didChangeXHRReadyState();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEventImpl(InspectorController* inspectorController, const Event&amp; event, DOMWindow* window, Node* node, const Vector&lt;EventContext&gt;&amp; ancestors)
</del><ins>+InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEventImpl(InspectorController* inspectorController, const Event&amp; event, DOMWindow* window, Node* node, const Vector&lt;RefPtr&lt;ContainerNode&gt; &gt;&amp; ancestors)
</ins><span class="cx"> {
</span><span class="cx">     pauseOnNativeEventIfNeeded(inspectorController, listenerEventCategoryType, event.type(), false);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebCoreinspectorInspectorInstrumentationh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/inspector/InspectorInstrumentation.h (70984 => 70985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/InspectorInstrumentation.h        2010-10-30 17:32:24 UTC (rev 70984)
+++ trunk/WebCore/inspector/InspectorInstrumentation.h        2010-10-30 18:48:23 UTC (rev 70985)
</span><span class="lines">@@ -40,7 +40,6 @@
</span><span class="cx"> 
</span><span class="cx"> class CharacterData;
</span><span class="cx"> class Element;
</span><del>-class EventContext;
</del><span class="cx"> class InspectorController;
</span><span class="cx"> class InspectorTimelineAgent;
</span><span class="cx"> class KURL;
</span><span class="lines">@@ -74,7 +73,7 @@
</span><span class="cx">     static void didCallFunction(const InspectorInstrumentationCookie&amp;);
</span><span class="cx">     static InspectorInstrumentationCookie willChangeXHRReadyState(ScriptExecutionContext*, XMLHttpRequest* request);
</span><span class="cx">     static void didChangeXHRReadyState(const InspectorInstrumentationCookie&amp;);
</span><del>-    static InspectorInstrumentationCookie willDispatchEvent(Document*, const Event&amp; event, DOMWindow* window, Node* node, const Vector&lt;EventContext&gt;&amp; ancestors);
</del><ins>+    static InspectorInstrumentationCookie willDispatchEvent(Document*, const Event&amp; event, DOMWindow* window, Node* node, const Vector&lt;RefPtr&lt;ContainerNode&gt; &gt;&amp; ancestors);
</ins><span class="cx">     static void didDispatchEvent(const InspectorInstrumentationCookie&amp;);
</span><span class="cx">     static InspectorInstrumentationCookie willDispatchEventOnWindow(Frame*, const Event&amp; event, DOMWindow* window);
</span><span class="cx">     static void didDispatchEventOnWindow(const InspectorInstrumentationCookie&amp;);
</span><span class="lines">@@ -131,7 +130,7 @@
</span><span class="cx">     static void didCallFunctionImpl(const InspectorInstrumentationCookie&amp;);
</span><span class="cx">     static InspectorInstrumentationCookie willChangeXHRReadyStateImpl(InspectorController*, XMLHttpRequest* request);
</span><span class="cx">     static void didChangeXHRReadyStateImpl(const InspectorInstrumentationCookie&amp;);
</span><del>-    static InspectorInstrumentationCookie willDispatchEventImpl(InspectorController*, const Event&amp; event, DOMWindow* window, Node* node, const Vector&lt;EventContext&gt;&amp; ancestors);
</del><ins>+    static InspectorInstrumentationCookie willDispatchEventImpl(InspectorController*, const Event&amp; event, DOMWindow* window, Node* node, const Vector&lt;RefPtr&lt;ContainerNode&gt; &gt;&amp; ancestors);
</ins><span class="cx">     static void didDispatchEventImpl(const InspectorInstrumentationCookie&amp;);
</span><span class="cx">     static InspectorInstrumentationCookie willDispatchEventOnWindowImpl(InspectorController*, const Event&amp; event, DOMWindow* window);
</span><span class="cx">     static void didDispatchEventOnWindowImpl(const InspectorInstrumentationCookie&amp;);
</span><span class="lines">@@ -226,6 +225,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx"> inline void InspectorInstrumentation::willSendXMLHttpRequest(ScriptExecutionContext* context, const String&amp; url)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="lines">@@ -293,7 +293,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEvent(Document* document, const Event&amp; event, DOMWindow* window, Node* node, const Vector&lt;EventContext&gt;&amp; ancestors)
</del><ins>+inline InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEvent(Document* document, const Event&amp; event, DOMWindow* window, Node* node, const Vector&lt;RefPtr&lt;ContainerNode&gt; &gt;&amp; ancestors)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">     if (InspectorController* inspectorController = inspectorControllerForDocument(document))
</span></span></pre></div>
<a id="trunkWebCorepageEventHandlercpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/page/EventHandler.cpp (70984 => 70985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/page/EventHandler.cpp        2010-10-30 17:32:24 UTC (rev 70984)
+++ trunk/WebCore/page/EventHandler.cpp        2010-10-30 18:48:23 UTC (rev 70985)
</span><span class="lines">@@ -1766,6 +1766,8 @@
</span><span class="cx">         // If the target node is a text node, dispatch on the parent node - rdar://4196646
</span><span class="cx">         if (result &amp;&amp; result-&gt;isTextNode())
</span><span class="cx">             result = result-&gt;parentNode();
</span><ins>+        if (result)
+            result = result-&gt;shadowAncestorNode();
</ins><span class="cx">     }
</span><span class="cx">     m_nodeUnderMouse = result;
</span><span class="cx"> #if ENABLE(SVG)
</span></span></pre></div>
<a id="trunkWebCoresvgSVGElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/svg/SVGElement.cpp (70984 => 70985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/svg/SVGElement.cpp        2010-10-30 17:32:24 UTC (rev 70984)
+++ trunk/WebCore/svg/SVGElement.cpp        2010-10-30 18:48:23 UTC (rev 70985)
</span><span class="lines">@@ -347,6 +347,13 @@
</span><span class="cx">     clearIsSynchronizingSVGAttributes();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+ContainerNode* SVGElement::eventParentNode()
+{
+    if (ContainerNode* shadowParent = shadowParentNode())
+        return shadowParent;
+    return StyledElement::eventParentNode();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+}
+
</ins><span class="cx"> #endif // ENABLE(SVG)
</span></span></pre></div>
<a id="trunkWebCoresvgSVGElementh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/svg/SVGElement.h (70984 => 70985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/svg/SVGElement.h        2010-10-30 17:32:24 UTC (rev 70984)
+++ trunk/WebCore/svg/SVGElement.h        2010-10-30 18:48:23 UTC (rev 70985)
</span><span class="lines">@@ -99,6 +99,8 @@
</span><span class="cx"> 
</span><span class="cx">         virtual bool isSupported(StringImpl* feature, StringImpl* version) const;
</span><span class="cx"> 
</span><ins>+        virtual ContainerNode* eventParentNode();
+
</ins><span class="cx">         virtual bool needsPendingResourceHandling() const { return true; }
</span><span class="cx">         virtual void buildPendingResource() { }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>