<!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>[182215] 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/182215">182215</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2015-03-31 16:42:31 -0700 (Tue, 31 Mar 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Make it possible to compute a region for elements on the page that have wheel event handlers
https://bugs.webkit.org/show_bug.cgi?id=142807

Reviewed by David Hyatt.

Source/WebCore:

Make it possible to compute a region that covers the elements on the page that have
a wheel event handler. This region may overestimate, but must not underestimate the area.

Elements with wheel handlers are registered on the document, and when a document gains
its first wheel handler, it registers the ownerElement in the parent document. Thus, on
the main frame, the region encompasses elements with handlers, and iframes whose subdocuments
have handlers.

Element gains some functions that allow it to return a rect which is the bounds of the element's
renderer, and renders for its descendant elements, which is the size or larger than the event
handling region for that element. Some configurations (e.g. position:fixed) require special
treatment.

Document::absoluteRegionForEventTargets() can then iterate over all elements in the given set,
and build a Region for those (short-circuiting if the document itself has a handler).

The new code is exercised for the debug MouseWheelRegionOverlay, and also added to the
non-fast scrollable region, used by threaded scrolling.

Tests: platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/handlers-in-iframes.html
       platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child.html
       platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-columns.html
       platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-region.html
       platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed.html
       platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-document.html
       platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed.html
       platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic.html

* dom/ContainerNode.h:
(WebCore::ContainerNode::absoluteEventHandlerBounds): Base class implementation; returns empty rect.
* dom/Document.cpp:
(WebCore::Document::prepareForDestruction): Unregister from the parent document.
(WebCore::Document::didAddWheelEventHandler): Add to the wheel handler set. Tell the parent
document if we are adding wheel handlers for the first time. Eventually the wheelEventHandlerCountChanged()
code will be removed, now we have the set. Tell debug overlays that we changed.
(WebCore::Document::didRemoveWheelEventHandler): Remove from the set, and unregister with the parent
document if necessary. Tell debug overlays that we changed.
(WebCore::Document::didAddTouchEventHandler): Minor cleanup.
(WebCore::Document::didRemoveTouchEventHandler): Ditto.
(WebCore::Document::didRemoveEventTargetNode): Remove from wheel targets.
(WebCore::Document::absoluteEventHandlerBounds): Implementation of the ContainerNode
function, just return the document bounds.
(WebCore::Document::absoluteRegionForEventTargets): Iterate over the given event targets,
and call absoluteEventHandlerBounds() on each.
* dom/Document.h:
(WebCore::Document::wheelEventTargets):
* dom/Element.cpp:
(WebCore::layoutOverflowRectContainsAllDescendants): Return true if we can determine that the
layoutOverflow bounds of the given renderer contains the renderers of all descendant elements.
(WebCore::Element::eventBounds): Get the &quot;event handling&quot; bounds of this element (excluding
descendants), and while doing so, compute whether any descendants are position:fixed, and whether
these bounds are known to include descendants.
(WebCore::Element::eventBoundsOfElementAndDescendants): Recursive function that short-circuits
if it can determine that descendants are enclosed by the bounds.
(WebCore::Element::absoluteEventHandlerBounds):
* dom/Element.h:
* page/DebugPageOverlays.cpp:
(WebCore::MouseWheelRegionOverlay::updateRegion): Ask the document for the region of wheel
event handlers.
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::computeNonFastScrollableRegion): Add the wheel handler region
to the non-fast scrollable region.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo): Overflow scrolling needs to dirty event regions.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::absoluteBoundingBoxRect): Need to pass the &quot;wasFixed&quot; flag out
of this function.
(WebCore::RenderObject::localToAbsolute): Ditto.
* rendering/RenderObject.h:

LayoutTests:

Tests that dump the non-fast-scrollable region, for various rendering configurations.

* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/handlers-in-iframes-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/handlers-in-iframes.html: Added.
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/resources/gain-wheel-handler.html: Added.
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/resources/lose-wheel-handler.html: Added.
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/resources/wheel-handler-region-helper.js: Added.
(rectsAsString):
(dumpRegion):
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child.html: Added.
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-columns.html: Added.
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-region.html: Added.
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed.html: Added.
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-document-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-document.html: Added.
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed.html: Added.
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomContainerNodeh">trunk/Source/WebCore/dom/ContainerNode.h</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumenth">trunk/Source/WebCore/dom/Document.h</a></li>
<li><a href="#trunkSourceWebCoredomElementcpp">trunk/Source/WebCore/dom/Element.cpp</a></li>
<li><a href="#trunkSourceWebCoredomElementh">trunk/Source/WebCore/dom/Element.h</a></li>
<li><a href="#trunkSourceWebCorepageDebugPageOverlayscpp">trunk/Source/WebCore/page/DebugPageOverlays.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingCoordinatorcpp">trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayercpp">trunk/Source/WebCore/rendering/RenderLayer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjectcpp">trunk/Source/WebCore/rendering/RenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjecth">trunk/Source/WebCore/rendering/RenderObject.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/</li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionhandlersiniframesexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/handlers-in-iframes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionhandlersiniframeshtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/handlers-in-iframes.html</a></li>
<li>trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/resources/</li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionresourcesgainwheelhandlerhtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/resources/gain-wheel-handler.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionresourceslosewheelhandlerhtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/resources/lose-wheel-handler.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionresourceswheelhandlerregionhelperjs">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/resources/wheel-handler-region-helper.js</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerfixedchildexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerfixedchildhtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerincolumnsexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-columns-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerincolumnshtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-columns.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerinoverflowscrollexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-overflow-scroll-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerinoverflowscrollhtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-overflow-scroll.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerinregionexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-region-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerinregionhtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-region.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerinsidefixedexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerinsidefixedhtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerondocumentexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-document-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerondocumenthtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-document.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandleronfixedexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandleronfixedhtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerregionbasicexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerregionbasichtml">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (182214 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-03-31 23:38:49 UTC (rev 182214)
+++ trunk/LayoutTests/ChangeLog        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2015-03-31  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Make it possible to compute a region for elements on the page that have wheel event handlers
+        https://bugs.webkit.org/show_bug.cgi?id=142807
+
+        Reviewed by David Hyatt.
+        
+        Tests that dump the non-fast-scrollable region, for various rendering configurations.
+
+        * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/handlers-in-iframes-expected.txt: Added.
+        * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/handlers-in-iframes.html: Added.
+        * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/resources/gain-wheel-handler.html: Added.
+        * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/resources/lose-wheel-handler.html: Added.
+        * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/resources/wheel-handler-region-helper.js: Added.
+        (rectsAsString):
+        (dumpRegion):
+        * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child-expected.txt: Added.
+        * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child.html: Added.
+        * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-columns.html: Added.
+        * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-region.html: Added.
+        * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed-expected.txt: Added.
+        * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed.html: Added.
+        * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-document-expected.txt: Added.
+        * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-document.html: Added.
+        * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed-expected.txt: Added.
+        * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed.html: Added.
+        * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic-expected.txt: Added.
+        * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic.html: Added.
+
</ins><span class="cx"> 2015-03-31  Dean Jackson  &lt;dino@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         accessibility/aria-hidden-hides-all-elements.html fails on Windows
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionhandlersiniframesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/handlers-in-iframes-expected.txt (0 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/handlers-in-iframes-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/handlers-in-iframes-expected.txt        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -0,0 +1,2 @@
</span><ins>+
+20, 12 - 320, 162
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionhandlersiniframeshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/handlers-in-iframes.html (0 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/handlers-in-iframes.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/handlers-in-iframes.html        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;html&gt;
+&lt;head&gt;
+    &lt;style&gt;
+        iframe {
+            display: block;
+            margin: 10px;
+        }
+    &lt;/style&gt;
+    &lt;script src=&quot;resources/wheel-handler-region-helper.js&quot;&gt;&lt;/script&gt;
+    &lt;script&gt;
+        if (window.testRunner)
+            testRunner.waitUntilDone();
+
+        var notificationsPending = 3;
+
+        // Called from subframes.
+        function frameChanged()
+        {
+            receivedNotification();
+        }
+        
+        function mainFrameLoaded()
+        {
+            receivedNotification();
+        }
+        
+        function receivedNotification()
+        {
+            if (!--notificationsPending) {
+                dumpRegion();
+                if (window.testRunner)
+                    testRunner.notifyDone();
+            }
+        }
+        
+        window.addEventListener('load', mainFrameLoaded, false);
+    &lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+
+&lt;iframe src=&quot;resources/gain-wheel-handler.html&quot;&gt;&lt;/iframe&gt;
+&lt;iframe src=&quot;resources/lose-wheel-handler.html&quot;&gt;&lt;/iframe&gt;
+
+&lt;pre id=&quot;output&quot;&gt;&lt;/pre&gt;
+
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionresourcesgainwheelhandlerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/resources/gain-wheel-handler.html (0 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/resources/gain-wheel-handler.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/resources/gain-wheel-handler.html        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;html&gt;
+&lt;head&gt;
+    &lt;style&gt;
+        .box {
+            width: 100px;
+            height: 100px;
+            border: 4px solid black;
+        }
+    &lt;/style&gt;
+    &lt;script&gt;
+        function addHandler()
+        {
+            window.setTimeout(function() {
+                var target = document.getElementById('target');
+                target.addEventListener('mousewheel', function(e) { });
+                parent.frameChanged();
+            }, 0);
+        }
+        
+        window.addEventListener('load', addHandler, false);
+    &lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+
+&lt;div id=&quot;target&quot; class=&quot;box&quot;&gt;
+&lt;/div&gt;
+
+&lt;pre id=&quot;output&quot;&gt;&lt;/pre&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionresourceslosewheelhandlerhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/resources/lose-wheel-handler.html (0 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/resources/lose-wheel-handler.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/resources/lose-wheel-handler.html        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -0,0 +1,41 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;html&gt;
+&lt;head&gt;
+    &lt;style&gt;
+        .box {
+            width: 100px;
+            height: 100px;
+            border: 4px solid black;
+        }
+    &lt;/style&gt;
+    &lt;script&gt;
+        function wheelHandler(e)
+        {
+        }
+
+        function removeHandler()
+        {
+            window.setTimeout(function() {
+                var target = document.getElementById('target');
+                target.removeEventListener('mousewheel', wheelHandler);
+                parent.frameChanged();
+            }, 0);
+        }
+        
+        window.addEventListener('load', removeHandler, false);
+    &lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+
+&lt;div id=&quot;target&quot; class=&quot;box&quot;&gt;
+&lt;/div&gt;
+
+&lt;pre id=&quot;output&quot;&gt;&lt;/pre&gt;
+
+&lt;script&gt;
+var target = document.getElementById('target');
+target.addEventListener('mousewheel', wheelHandler);
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionresourceswheelhandlerregionhelperjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/resources/wheel-handler-region-helper.js (0 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/resources/wheel-handler-region-helper.js                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/resources/wheel-handler-region-helper.js        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+if (window.testRunner)
+    testRunner.dumpAsText();
+
+function rectsAsString(rects)
+{
+    var result = &quot;&quot;;
+    for (var i = 0; i &lt; rects.length; ++i) {
+        var rect = rects[i];
+        if (i)
+            result += '\n';
+        result += rect.left + ', ' + rect.top + ' - ' + rect.right + ', ' + rect.bottom;
+    }
+    return result;
+}
+
+function dumpRegion()
+{
+    if (window.internals) {
+        var rects = window.internals.nonFastScrollableRects();
+        document.getElementById('output').textContent = rectsAsString(rects);
+    }
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerfixedchildexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child-expected.txt (0 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child-expected.txt        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+50, 50 - 150, 150
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerfixedchildhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child.html (0 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child.html        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;html&gt;
+&lt;head&gt;
+    &lt;style&gt;
+        .fixed {
+            position: fixed;
+            top: 50px;
+            left: 50px;
+        }
+        
+        .box {
+            height: 100px;
+            width: 100px;
+            background-color: blue;
+        }
+        
+        .child {
+            position: relative;
+            left: 50px;
+            top: 50px;
+        }
+        #output {
+            margin-top: 520px;
+        }
+    &lt;/style&gt;
+    &lt;script src=&quot;resources/wheel-handler-region-helper.js&quot;&gt;&lt;/script&gt;
+    &lt;script&gt;
+        function dumpRegion()
+        {
+            if (window.internals) {
+                var rects = window.internals.nonFastScrollableRects();
+                document.getElementById('output').textContent = rectsAsString(rects);
+            }
+        }
+
+        window.addEventListener('load', dumpRegion, false);
+    &lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+
+&lt;div class=&quot;box&quot;&gt;
+    &lt;div class=&quot;fixed box&quot; onmousewheel=&quot;(void)0&quot;&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;pre id=&quot;output&quot;&gt;&lt;/pre&gt;
+
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerincolumnsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-columns-expected.txt (0 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-columns-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-columns-expected.txt        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
+
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
+
+28, 20 - 567, 380
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerincolumnshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-columns.html (0 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-columns.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-columns.html        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;html&gt;
+&lt;head&gt;
+    &lt;style&gt;
+        .columns {
+            margin: 20px;
+            width: 400px;
+            height: 360px;
+            column-width: 120px;
+        }
+        .target {
+            color: blue;
+        }
+    &lt;/style&gt;
+    &lt;script src=&quot;resources/wheel-handler-region-helper.js&quot;&gt;&lt;/script&gt;
+    &lt;script&gt;
+        function doTest()
+        {
+            dumpRegion();
+        }
+
+        window.addEventListener('load', doTest);
+    &lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+
+&lt;div class=&quot;columns&quot;&gt;
+    &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.&lt;/p&gt;
+    &lt;p class=&quot;target&quot; onmousewheel=&quot;(void)0&quot;&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
+    &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.&lt;/p&gt;
+&lt;/div&gt;
+&lt;pre id=&quot;output&quot;&gt;&lt;/pre&gt;
+
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerinoverflowscrollexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-overflow-scroll-expected.txt (0 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-overflow-scroll-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-overflow-scroll-expected.txt        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
+
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
+
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
+
+8, 8 - 310, 310
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerinoverflowscrollhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-overflow-scroll.html (0 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-overflow-scroll.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-overflow-scroll.html        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;html&gt;
+&lt;head&gt;
+    &lt;style&gt;
+        #container {
+            width: 300px;
+            height: 300px;
+            overflow: scroll;
+            border: 1px solid black;
+        }
+        .target {
+            color: blue;
+        }
+    &lt;/style&gt;
+    &lt;script src=&quot;resources/wheel-handler-region-helper.js&quot;&gt;&lt;/script&gt;
+    &lt;script&gt;
+        if (window.testRunner)
+            testRunner.waitUntilDone();
+
+        function doTest()
+        {
+            window.setTimeout(function() {
+                var scroller = document.getElementById('container');
+                scroller.scrollTop = 200;
+                dumpRegion();
+                if (window.testRunner)
+                    testRunner.notifyDone();
+            }, 0)
+        }
+
+        window.addEventListener('load', doTest);
+    &lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+
+&lt;div id=&quot;container&quot;&gt;
+    &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.&lt;/p&gt;
+    &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.&lt;/p&gt;
+    &lt;p class=&quot;target&quot; onmousewheel=&quot;(void)0&quot;&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
+    &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.&lt;/p&gt;
+&lt;/div&gt;
+
+&lt;pre id=&quot;output&quot;&gt;&lt;/pre&gt;
+
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerinregionexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-region-expected.txt (0 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-region-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-region-expected.txt        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
+
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
+
+39, 151 - 609, 401
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerinregionhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-region.html (0 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-region.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-region.html        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;html&gt;
+&lt;head&gt;
+    &lt;style&gt;
+        #content {
+            -webkit-flow-into: flow1;
+        }
+
+        #region1, #region2 {
+            margin: 10px;
+            border: 1px solid black;
+            -webkit-flow-from: flow1;
+        }
+
+        #region1 {
+            margin-left: 30px;
+            width: 300px;
+            height: 200px;
+        }
+
+        #region2 {
+            margin-top: 80px;
+            margin-left: 200px;
+            width: 400px;
+            height: 90px;
+        }
+
+        .target {
+            color: blue;
+        }
+    &lt;/style&gt;
+    &lt;script src=&quot;resources/wheel-handler-region-helper.js&quot;&gt;&lt;/script&gt;
+    &lt;script&gt;
+        function doTest()
+        {
+            dumpRegion();
+        }
+
+        window.addEventListener('load', doTest);
+    &lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+
+&lt;div id=&quot;content&quot;&gt;
+    &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.&lt;/p&gt;
+    &lt;p class=&quot;target&quot; onmousewheel=&quot;(void)0&quot;&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
+    &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.&lt;/p&gt;
+&lt;/div&gt;
+
+&lt;div id=&quot;container&quot;&gt;
+    &lt;div id=&quot;region1&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;region2&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;pre id=&quot;output&quot;&gt;&lt;/pre&gt;
+
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerinsidefixedexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed-expected.txt (0 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed-expected.txt        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+60, 60 - 160, 160
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerinsidefixedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed.html (0 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed.html        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;html&gt;
+&lt;head&gt;
+    &lt;style&gt;
+        .fixed {
+            position: fixed;
+            top: 10px;
+            left: 10px;
+        }
+        
+        .box {
+            height: 100px;
+            width: 100px;
+            background-color: blue;
+        }
+        
+        .child {
+            position: relative;
+            left: 50px;
+            top: 50px;
+        }
+        #output {
+            margin-top: 520px;
+        }
+    &lt;/style&gt;
+    &lt;script src=&quot;resources/wheel-handler-region-helper.js&quot;&gt;&lt;/script&gt;
+    &lt;script&gt;
+        window.addEventListener('load', dumpRegion, false);
+    &lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+
+&lt;div class=&quot;fixed box&quot;&gt;
+    &lt;div class=&quot;child box&quot; onmousewheel=&quot;(void)0&quot;&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;pre id=&quot;output&quot;&gt;&lt;/pre&gt;
+
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerondocumentexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-document-expected.txt (0 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-document-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-document-expected.txt        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+0, 0 - 800, 600
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerondocumenthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-document.html (0 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-document.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-document.html        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;html&gt;
+&lt;head&gt;
+    &lt;script src=&quot;resources/wheel-handler-region-helper.js&quot;&gt;&lt;/script&gt;
+    &lt;script&gt;
+        function doTest()
+        {
+            document.addEventListener('mousewheel', function() { });
+            dumpRegion();
+        }
+
+        window.addEventListener('load', doTest);
+    &lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+
+&lt;pre id=&quot;output&quot;&gt;&lt;/pre&gt;
+
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandleronfixedexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed-expected.txt (0 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed-expected.txt        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+10, 10 - 110, 110
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandleronfixedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed.html (0 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed.html        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;html&gt;
+&lt;head&gt;
+    &lt;style&gt;
+        .fixed {
+            position: fixed;
+            top: 10px;
+            left: 10px;
+        }
+        
+        .box {
+            height: 100px;
+            width: 100px;
+            background-color: blue;
+        }
+        #output {
+            margin-top: 520px;
+        }
+    &lt;/style&gt;
+    &lt;script src=&quot;resources/wheel-handler-region-helper.js&quot;&gt;&lt;/script&gt;
+    &lt;script&gt;
+        window.addEventListener('load', dumpRegion, false);
+    &lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+
+&lt;div class=&quot;fixed box&quot; onmousewheel=&quot;(void)0&quot;&gt;
+&lt;/div&gt;
+
+&lt;pre id=&quot;output&quot;&gt;&lt;/pre&gt;
+
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerregionbasicexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic-expected.txt (0 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic-expected.txt        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+Some text
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. here Container
+Intermediate
+Child
+Container
+Intermediate
+Child
+8, 8 - 777, 329
+9, 369 - 290, 425
+9, 501 - 290, 601
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingnonfastregionwheelhandlerregionbasichtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic.html (0 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic.html        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -0,0 +1,81 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;html&gt;
+&lt;head&gt;
+    &lt;style&gt;
+        .box {
+            width: 100px;
+            height: 100px;
+            border: 4px solid black;
+            position: relative;
+        }
+        
+        .overflowing-transformed {
+            position: absolute;
+            top: 100px;
+            left: 300px;
+            width: 200px;
+            height: 100px;
+            border: 1px solid green;
+            -webkit-transform: rotate(30deg);
+        }
+        
+        .container {
+            position: absolute;
+            top: 350px;
+            height: 100px;
+            border: 1px solid green;
+        }
+        
+        .inner {
+            position: relative;
+            top: 20px;
+            left: 200px;
+            background-color: orange;
+        }
+        
+        #output {
+            margin-top: 520px;
+        }
+    &lt;/style&gt;
+    &lt;script src=&quot;resources/wheel-handler-region-helper.js&quot;&gt;&lt;/script&gt;
+    &lt;script&gt;
+        window.addEventListener('load', dumpRegion, false);
+    &lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+
+&lt;span id=&quot;target&quot; onmousewheel=&quot;(void)0&quot;&gt;Some text
+    &lt;div class=&quot;box&quot;&gt;
+        &lt;div class=&quot;overflowing-transformed&quot;&gt;
+            Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
+        &lt;/div&gt;
+    &lt;/div&gt;
+here&lt;/span&gt;
+
+&lt;!-- Handler on skipped containing block --&gt;
+&lt;div class=&quot;container&quot; onmousewheel=&quot;(void)0&quot; style=&quot;top: 500px;&quot;&gt;
+    Container
+    &lt;div class=&quot;intermediate&quot;&gt;
+        Intermediate
+        &lt;div class=&quot;inner&quot;&gt;
+            Child
+        &lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+    Container
+    &lt;!-- Handler on skipped containing block --&gt;
+    &lt;div class=&quot;intermediate&quot; onmousewheel=&quot;(void)0&quot;&gt;
+        Intermediate
+        &lt;div class=&quot;inner&quot;&gt;
+            Child
+        &lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;pre id=&quot;output&quot;&gt;&lt;/pre&gt;
+
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (182214 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-03-31 23:38:49 UTC (rev 182214)
+++ trunk/Source/WebCore/ChangeLog        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -1,3 +1,80 @@
</span><ins>+2015-03-31  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Make it possible to compute a region for elements on the page that have wheel event handlers
+        https://bugs.webkit.org/show_bug.cgi?id=142807
+
+        Reviewed by David Hyatt.
+        
+        Make it possible to compute a region that covers the elements on the page that have
+        a wheel event handler. This region may overestimate, but must not underestimate the area.
+        
+        Elements with wheel handlers are registered on the document, and when a document gains
+        its first wheel handler, it registers the ownerElement in the parent document. Thus, on 
+        the main frame, the region encompasses elements with handlers, and iframes whose subdocuments
+        have handlers.
+        
+        Element gains some functions that allow it to return a rect which is the bounds of the element's
+        renderer, and renders for its descendant elements, which is the size or larger than the event
+        handling region for that element. Some configurations (e.g. position:fixed) require special
+        treatment.
+        
+        Document::absoluteRegionForEventTargets() can then iterate over all elements in the given set,
+        and build a Region for those (short-circuiting if the document itself has a handler).
+        
+        The new code is exercised for the debug MouseWheelRegionOverlay, and also added to the
+        non-fast scrollable region, used by threaded scrolling.
+
+        Tests: platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/handlers-in-iframes.html
+               platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child.html
+               platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-columns.html
+               platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-region.html
+               platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed.html
+               platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-document.html
+               platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed.html
+               platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic.html
+
+        * dom/ContainerNode.h:
+        (WebCore::ContainerNode::absoluteEventHandlerBounds): Base class implementation; returns empty rect.
+        * dom/Document.cpp:
+        (WebCore::Document::prepareForDestruction): Unregister from the parent document.
+        (WebCore::Document::didAddWheelEventHandler): Add to the wheel handler set. Tell the parent
+        document if we are adding wheel handlers for the first time. Eventually the wheelEventHandlerCountChanged()
+        code will be removed, now we have the set. Tell debug overlays that we changed.
+        (WebCore::Document::didRemoveWheelEventHandler): Remove from the set, and unregister with the parent
+        document if necessary. Tell debug overlays that we changed.
+        (WebCore::Document::didAddTouchEventHandler): Minor cleanup.
+        (WebCore::Document::didRemoveTouchEventHandler): Ditto.
+        (WebCore::Document::didRemoveEventTargetNode): Remove from wheel targets.
+        (WebCore::Document::absoluteEventHandlerBounds): Implementation of the ContainerNode
+        function, just return the document bounds.
+        (WebCore::Document::absoluteRegionForEventTargets): Iterate over the given event targets,
+        and call absoluteEventHandlerBounds() on each.
+        * dom/Document.h:
+        (WebCore::Document::wheelEventTargets):
+        * dom/Element.cpp:
+        (WebCore::layoutOverflowRectContainsAllDescendants): Return true if we can determine that the
+        layoutOverflow bounds of the given renderer contains the renderers of all descendant elements.
+        (WebCore::Element::eventBounds): Get the &quot;event handling&quot; bounds of this element (excluding
+        descendants), and while doing so, compute whether any descendants are position:fixed, and whether
+        these bounds are known to include descendants.
+        (WebCore::Element::eventBoundsOfElementAndDescendants): Recursive function that short-circuits
+        if it can determine that descendants are enclosed by the bounds.
+        (WebCore::Element::absoluteEventHandlerBounds):
+        * dom/Element.h:
+        * page/DebugPageOverlays.cpp:
+        (WebCore::MouseWheelRegionOverlay::updateRegion): Ask the document for the region of wheel
+        event handlers.
+        * page/scrolling/ScrollingCoordinator.cpp:
+        (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion): Add the wheel handler region
+        to the non-fast scrollable region.
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::scrollTo): Overflow scrolling needs to dirty event regions.
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::absoluteBoundingBoxRect): Need to pass the &quot;wasFixed&quot; flag out
+        of this function.
+        (WebCore::RenderObject::localToAbsolute): Ditto.
+        * rendering/RenderObject.h:
+
</ins><span class="cx"> 2015-03-31  Alexey Proskuryakov  &lt;ap@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix bindings tests results after &lt;http://trac.webkit.org/changeset/182205&gt;.
</span></span></pre></div>
<a id="trunkSourceWebCoredomContainerNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ContainerNode.h (182214 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ContainerNode.h        2015-03-31 23:38:49 UTC (rev 182214)
+++ trunk/Source/WebCore/dom/ContainerNode.h        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -136,6 +136,10 @@
</span><span class="cx"> 
</span><span class="cx">     RenderElement* renderer() const;
</span><span class="cx"> 
</span><ins>+    // Return a bounding box in absolute coordinates enclosing this node and all its descendants.
+    // This gives the area within which events may get handled by a hander registered on this node.
+    virtual LayoutRect absoluteEventHandlerBounds(bool&amp; /* includesFixedPositionElements */) { return LayoutRect(); }
+
</ins><span class="cx">     Element* querySelector(const String&amp; selectors, ExceptionCode&amp;);
</span><span class="cx">     RefPtr&lt;NodeList&gt; querySelectorAll(const String&amp; selectors, ExceptionCode&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (182214 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2015-03-31 23:38:49 UTC (rev 182214)
+++ trunk/Source/WebCore/dom/Document.cpp        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx"> #include &quot;DOMNamedFlowCollection.h&quot;
</span><span class="cx"> #include &quot;DOMWindow.h&quot;
</span><span class="cx"> #include &quot;DateComponents.h&quot;
</span><ins>+#include &quot;DebugPageOverlays.h&quot;
</ins><span class="cx"> #include &quot;Dictionary.h&quot;
</span><span class="cx"> #include &quot;DocumentLoader.h&quot;
</span><span class="cx"> #include &quot;DocumentMarkerController.h&quot;
</span><span class="lines">@@ -2245,6 +2246,9 @@
</span><span class="cx">         parentDocument()-&gt;didRemoveEventTargetNode(*this);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    if (m_wheelEventTargets &amp;&amp; m_wheelEventTargets-&gt;size() &amp;&amp; parentDocument())
+        parentDocument()-&gt;didRemoveEventTargetNode(*this);
+
</ins><span class="cx">     if (m_mediaQueryMatcher)
</span><span class="cx">         m_mediaQueryMatcher-&gt;documentDestroyed();
</span><span class="cx"> 
</span><span class="lines">@@ -5998,29 +6002,61 @@
</span><span class="cx">     scrollingCoordinator-&gt;frameViewWheelEventHandlerCountChanged(*frameView);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Document::didAddWheelEventHandler(Node&amp;)
</del><ins>+void Document::didAddWheelEventHandler(Node&amp; node)
</ins><span class="cx"> {
</span><span class="cx">     ++m_wheelEventHandlerCount;
</span><ins>+
+    if (!m_wheelEventTargets)
+        m_wheelEventTargets = std::make_unique&lt;EventTargetSet&gt;();
+
+    m_wheelEventTargets-&gt;add(&amp;node);
+
+    if (Document* parent = parentDocument()) {
+        parent-&gt;didAddWheelEventHandler(*this);
+        return;
+    }
+
</ins><span class="cx">     wheelEventHandlerCountChanged(this);
</span><ins>+
+    if (Frame* frame = this-&gt;frame())
+        DebugPageOverlays::didChangeEventHandlers(*frame);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Document::didRemoveWheelEventHandler(Node&amp;)
</del><ins>+void Document::didRemoveWheelEventHandler(Node&amp; node)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_wheelEventHandlerCount &gt; 0);
</span><span class="cx">     --m_wheelEventHandlerCount;
</span><ins>+
+    if (!m_wheelEventTargets)
+        return;
+
+    ASSERT(m_wheelEventTargets-&gt;contains(&amp;node));
+    m_wheelEventTargets-&gt;remove(&amp;node);
+
+    if (Document* parent = parentDocument()) {
+        parent-&gt;didRemoveWheelEventHandler(*this);
+        return;
+    }
+
</ins><span class="cx">     wheelEventHandlerCountChanged(this);
</span><ins>+
+    if (Frame* frame = this-&gt;frame())
+        DebugPageOverlays::didChangeEventHandlers(*frame);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Document::didAddTouchEventHandler(Node&amp; handler)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><del>-    if (!m_touchEventTargets.get())
</del><ins>+    if (!m_touchEventTargets)
</ins><span class="cx">         m_touchEventTargets = std::make_unique&lt;EventTargetSet&gt;();
</span><ins>+
</ins><span class="cx">     m_touchEventTargets-&gt;add(&amp;handler);
</span><ins>+
</ins><span class="cx">     if (Document* parent = parentDocument()) {
</span><span class="cx">         parent-&gt;didAddTouchEventHandler(*this);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><ins>+
</ins><span class="cx">     if (Page* page = this-&gt;page()) {
</span><span class="cx">         if (m_touchEventTargets-&gt;size() == 1)
</span><span class="cx">             page-&gt;chrome().client().needTouchEvents(true);
</span><span class="lines">@@ -6033,10 +6069,12 @@
</span><span class="cx"> void Document::didRemoveTouchEventHandler(Node&amp; handler)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><del>-    if (!m_touchEventTargets.get())
</del><ins>+    if (!m_touchEventTargets)
</ins><span class="cx">         return;
</span><ins>+
</ins><span class="cx">     ASSERT(m_touchEventTargets-&gt;contains(&amp;handler));
</span><span class="cx">     m_touchEventTargets-&gt;remove(&amp;handler);
</span><ins>+
</ins><span class="cx">     if (Document* parent = parentDocument()) {
</span><span class="cx">         parent-&gt;didRemoveTouchEventHandler(*this);
</span><span class="cx">         return;
</span><span class="lines">@@ -6047,6 +6085,8 @@
</span><span class="cx">         return;
</span><span class="cx">     if (m_touchEventTargets-&gt;size())
</span><span class="cx">         return;
</span><ins>+
+    // FIXME: why can't we trust m_touchEventTargets?
</ins><span class="cx">     for (const Frame* frame = &amp;page-&gt;mainFrame(); frame; frame = frame-&gt;tree().traverseNext()) {
</span><span class="cx">         if (frame-&gt;document() &amp;&amp; frame-&gt;document()-&gt;hasTouchEventHandlers())
</span><span class="cx">             return;
</span><span class="lines">@@ -6065,11 +6105,53 @@
</span><span class="cx">         if ((&amp;handler == this || m_touchEventTargets-&gt;isEmpty()) &amp;&amp; parentDocument())
</span><span class="cx">             parentDocument()-&gt;didRemoveEventTargetNode(*this);
</span><span class="cx">     }
</span><del>-#else
-    UNUSED_PARAM(handler);
</del><span class="cx"> #endif
</span><ins>+
+    if (m_wheelEventTargets) {
+        m_wheelEventTargets-&gt;removeAll(&amp;handler);
+        if ((&amp;handler == this || m_wheelEventTargets-&gt;isEmpty()) &amp;&amp; parentDocument())
+            parentDocument()-&gt;didRemoveEventTargetNode(*this);
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+LayoutRect Document::absoluteEventHandlerBounds(bool&amp; includesFixedPositionElements)
+{
+    includesFixedPositionElements = false;
+    if (RenderView* renderView = this-&gt;renderView())
+        return renderView-&gt;documentRect();
+    
+    return LayoutRect();
+}
+
+Region Document::absoluteRegionForEventTargets(const EventTargetSet* targets)
+{
+    if (!targets)
+        return Region();
+
+    Region targetRegion;
+    bool insideFixedPosition = false;
+
+    for (auto it : *targets) {
+        LayoutRect rootRelativeBounds;
+        
+        if (is&lt;Document&gt;(it.key)) {
+            Document* document = downcast&lt;Document&gt;(it.key);
+            if (document == this)
+                rootRelativeBounds = absoluteEventHandlerBounds(insideFixedPosition);
+            else if (Element* element = document-&gt;ownerElement())
+                rootRelativeBounds = element-&gt;absoluteEventHandlerBounds(insideFixedPosition);
+        } else if (is&lt;Element&gt;(it.key)) {
+            Element* element = downcast&lt;Element&gt;(it.key);
+            rootRelativeBounds = element-&gt;absoluteEventHandlerBounds(insideFixedPosition);
+        }
+        
+        if (!rootRelativeBounds.isEmpty())
+            targetRegion.unite(Region(enclosingIntRect(rootRelativeBounds)));
+    }
+
+    return targetRegion;
+}
+
</ins><span class="cx"> void Document::updateLastHandledUserGestureTimestamp()
</span><span class="cx"> {
</span><span class="cx">     m_lastHandledUserGestureTimestamp = monotonicallyIncreasingTime();
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.h (182214 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.h        2015-03-31 23:38:49 UTC (rev 182214)
+++ trunk/Source/WebCore/dom/Document.h        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx"> #include &quot;PageVisibilityState.h&quot;
</span><span class="cx"> #include &quot;PlatformScreen.h&quot;
</span><span class="cx"> #include &quot;ReferrerPolicy.h&quot;
</span><ins>+#include &quot;Region.h&quot;
</ins><span class="cx"> #include &quot;RenderPtr.h&quot;
</span><span class="cx"> #include &quot;ScriptExecutionContext.h&quot;
</span><span class="cx"> #include &quot;StringWithDirection.h&quot;
</span><span class="lines">@@ -1148,6 +1149,12 @@
</span><span class="cx"> #endif
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    const EventTargetSet* wheelEventTargets() const { return m_wheelEventTargets.get(); }
+
+    Region absoluteRegionForEventTargets(const EventTargetSet*);
+
+    LayoutRect absoluteEventHandlerBounds(bool&amp;) override final;
+
</ins><span class="cx">     bool visualUpdatesAllowed() const { return m_visualUpdatesAllowed; }
</span><span class="cx"> 
</span><span class="cx">     bool isInDocumentWrite() { return m_writeRecursionDepth &gt; 0; }
</span><span class="lines">@@ -1561,6 +1568,7 @@
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="cx">     std::unique_ptr&lt;EventTargetSet&gt; m_touchEventTargets;
</span><span class="cx"> #endif
</span><ins>+    std::unique_ptr&lt;EventTargetSet&gt; m_wheelEventTargets;
</ins><span class="cx"> 
</span><span class="cx">     double m_lastHandledUserGestureTimestamp;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.cpp (182214 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.cpp        2015-03-31 23:38:49 UTC (rev 182214)
+++ trunk/Source/WebCore/dom/Element.cpp        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -63,6 +63,7 @@
</span><span class="cx"> #include &quot;NodeRenderStyle.h&quot;
</span><span class="cx"> #include &quot;PlatformWheelEvent.h&quot;
</span><span class="cx"> #include &quot;PointerLockController.h&quot;
</span><ins>+#include &quot;RenderFlowThread.h&quot;
</ins><span class="cx"> #include &quot;RenderLayer.h&quot;
</span><span class="cx"> #include &quot;RenderNamedFlowFragment.h&quot;
</span><span class="cx"> #include &quot;RenderRegion.h&quot;
</span><span class="lines">@@ -925,6 +926,126 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static bool layoutOverflowRectContainsAllDescendants(const RenderElement&amp; renderer)
+{
+    if (renderer.isRenderView())
+        return true;
+
+    if (!renderer.element())
+        return false;
+
+    // If there are any position:fixed inside of us, game over.
+    if (auto viewPositionedObjects = renderer.view().positionedObjects()) {
+        for (RenderBox* it : *viewPositionedObjects) {
+            if (it != &amp;renderer &amp;&amp; it-&gt;style().position() == FixedPosition &amp;&amp; renderer.element()-&gt;contains(it-&gt;element()))
+                return false;
+        }
+    }
+
+    if (renderer.canContainAbsolutelyPositionedObjects()) {
+        // Our layout overflow will include all descendant positioned elements.
+        return true;
+    }
+
+    // This renderer may have positioned descendants whose containing block is some ancestor.
+    if (auto containingBlock = renderer.containingBlockForAbsolutePosition()) {
+        if (auto positionedObjects = containingBlock-&gt;positionedObjects()) {
+            for (RenderBox* it : *positionedObjects) {
+                if (it != &amp;renderer &amp;&amp; renderer.element()-&gt;contains(it-&gt;element()))
+                    return false;
+            }
+        }
+    }
+    
+    return false;
+}
+
+LayoutRect Element::absoluteEventBounds(bool&amp; boundsIncludeAllDescendantElements, bool&amp; includesFixedPositionElements)
+{
+    boundsIncludeAllDescendantElements = false;
+    includesFixedPositionElements = false;
+
+    if (!renderer())
+        return LayoutRect();
+
+    LayoutRect result;
+    if (isSVGElement()) {
+        // Get the bounding rectangle from the SVG model.
+        SVGElement&amp; svgElement = downcast&lt;SVGElement&gt;(*this);
+        FloatRect localRect;
+        if (svgElement.getBoundingBox(localRect))
+            result = LayoutRect(renderer()-&gt;localToAbsoluteQuad(localRect, UseTransforms, &amp;includesFixedPositionElements).boundingBox());
+    } else {
+        if (is&lt;RenderBox&gt;(renderer())) {
+            RenderBox&amp; box = *downcast&lt;RenderBox&gt;(renderer());
+
+            bool computedBounds = false;
+            
+            if (RenderFlowThread* flowThread = box.flowThreadContainingBlock()) {
+                bool wasFixed = false;
+                Vector&lt;FloatQuad&gt; quads;
+                FloatRect localRect(0, 0, box.width(), box.height());
+                if (flowThread-&gt;absoluteQuadsForBox(quads, &amp;wasFixed, &amp;box, localRect.y(), localRect.maxY())) {
+                    FloatRect quadBounds = quads[0].boundingBox();
+                    for (size_t i = 1; i &lt; quads.size(); ++i)
+                        quadBounds.unite(quads[i].boundingBox());
+                    
+                    result = LayoutRect(quadBounds);
+                    computedBounds = true;
+                } else {
+                    // Probably columns. Just return the bounds of the multicol block for now.
+                    // FIXME: this doesn't handle nested columns.
+                    RenderElement* multicolContainer = flowThread-&gt;parent();
+                    if (multicolContainer &amp;&amp; is&lt;RenderBox&gt;(multicolContainer)) {
+                        LayoutRect overflowRect = downcast&lt;RenderBox&gt;(multicolContainer)-&gt;layoutOverflowRect();
+                        result = LayoutRect(multicolContainer-&gt;localToAbsoluteQuad(FloatRect(overflowRect), UseTransforms, &amp;includesFixedPositionElements).boundingBox());
+                        computedBounds = true;
+                    }
+                }
+            }
+
+            if (!computedBounds) {
+                LayoutRect overflowRect = box.layoutOverflowRect();
+                result = LayoutRect(box.localToAbsoluteQuad(FloatRect(overflowRect), UseTransforms, &amp;includesFixedPositionElements).boundingBox());
+                boundsIncludeAllDescendantElements = layoutOverflowRectContainsAllDescendants(box);
+            }
+        } else
+            result = LayoutRect(renderer()-&gt;absoluteBoundingBoxRect(true /* useTransforms */, &amp;includesFixedPositionElements));
+    }
+
+    return result;
+}
+
+LayoutRect Element::absoluteEventBoundsOfElementAndDescendants(bool&amp; includesFixedPositionElements)
+{
+    bool boundsIncludeDescendants;
+    LayoutRect result = absoluteEventBounds(boundsIncludeDescendants, includesFixedPositionElements);
+    if (boundsIncludeDescendants)
+        return result;
+
+    for (auto&amp; child : childrenOfType&lt;Element&gt;(*this)) {
+        bool includesFixedPosition = false;
+        LayoutRect childBounds = child.absoluteEventBoundsOfElementAndDescendants(includesFixedPosition);
+        includesFixedPositionElements |= includesFixedPosition;
+        result.unite(childBounds);
+    }
+
+    return result;
+}
+
+LayoutRect Element::absoluteEventHandlerBounds(bool&amp; includesFixedPositionElements)
+{
+    // This is not web-exposed, so don't call the FOUC-inducing updateLayoutIgnorePendingStylesheets().
+    FrameView* frameView = document().view();
+    if (!frameView)
+        return LayoutRect();
+
+    if (frameView-&gt;needsLayout())
+        frameView-&gt;layout();
+
+    return absoluteEventBoundsOfElementAndDescendants(includesFixedPositionElements);
+}
+
</ins><span class="cx"> Ref&lt;ClientRectList&gt; Element::getClientRects()
</span><span class="cx"> {
</span><span class="cx">     document().updateLayoutIgnorePendingStylesheets();
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.h (182214 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.h        2015-03-31 23:38:49 UTC (rev 182214)
+++ trunk/Source/WebCore/dom/Element.h        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -484,6 +484,8 @@
</span><span class="cx">     virtual void didDetachRenderers();
</span><span class="cx">     virtual RefPtr&lt;RenderStyle&gt; customStyleForRenderer(RenderStyle&amp; parentStyle);
</span><span class="cx"> 
</span><ins>+    LayoutRect absoluteEventHandlerBounds(bool&amp; includesFixedPositionElements) override;
+
</ins><span class="cx">     void setBeforePseudoElement(Ref&lt;PseudoElement&gt;&amp;&amp;);
</span><span class="cx">     void setAfterPseudoElement(Ref&lt;PseudoElement&gt;&amp;&amp;);
</span><span class="cx">     void clearBeforePseudoElement();
</span><span class="lines">@@ -562,6 +564,9 @@
</span><span class="cx">     void addAttributeInternal(const QualifiedName&amp;, const AtomicString&amp; value, SynchronizationOfLazyAttribute);
</span><span class="cx">     void removeAttributeInternal(unsigned index, SynchronizationOfLazyAttribute);
</span><span class="cx"> 
</span><ins>+    LayoutRect absoluteEventBounds(bool&amp; boundsIncludeAllDescendantElements, bool&amp; includesFixedPositionElements);
+    LayoutRect absoluteEventBoundsOfElementAndDescendants(bool&amp; includesFixedPositionElements);
+    
</ins><span class="cx"> #if ENABLE(TREE_DEBUGGING)
</span><span class="cx">     virtual void formatForDebugger(char* buffer, unsigned length) const override;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorepageDebugPageOverlayscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DebugPageOverlays.cpp (182214 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DebugPageOverlays.cpp        2015-03-31 23:38:49 UTC (rev 182214)
+++ trunk/Source/WebCore/page/DebugPageOverlays.cpp        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -90,16 +90,8 @@
</span><span class="cx"> 
</span><span class="cx"> bool MouseWheelRegionOverlay::updateRegion()
</span><span class="cx"> {
</span><del>-    std::unique_ptr&lt;Region&gt; region = std::make_unique&lt;Region&gt;();
</del><ins>+    std::unique_ptr&lt;Region&gt; region = std::make_unique&lt;Region&gt;(m_frame.document()-&gt;absoluteRegionForEventTargets(m_frame.document()-&gt;wheelEventTargets()));
</ins><span class="cx"> 
</span><del>-    for (auto&amp; element : descendantsOfType&lt;Element&gt;(*m_frame.document())) {
-        if (element.hasEventListeners(eventNames().mousewheelEvent) || element.hasEventListeners(eventNames().wheelEvent)) {
-            IntRect elementRect = element.boundsInRootViewSpace();
-            elementRect = m_frame.view()-&gt;rootViewToContents(elementRect);
-            region-&gt;unite(Region(elementRect));
-        }
-    }
-
</del><span class="cx">     bool regionChanged = !m_region || !(*m_region == *region);
</span><span class="cx">     m_region = WTF::move(region);
</span><span class="cx">     return regionChanged;
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingCoordinatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (182214 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp        2015-03-31 23:38:49 UTC (rev 182214)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -98,6 +98,10 @@
</span><span class="cx"> 
</span><span class="cx"> Region ScrollingCoordinator::computeNonFastScrollableRegion(const Frame&amp; frame, const IntPoint&amp; frameLocation) const
</span><span class="cx"> {
</span><ins>+    RenderView* renderView = frame.contentRenderer();
+    if (!renderView || renderView-&gt;documentBeingDestroyed())
+        return Region();
+
</ins><span class="cx"> #if ENABLE(IOS_TOUCH_EVENTS)
</span><span class="cx">     // On iOS, we use nonFastScrollableRegion to represent the region covered by elements with touch event handlers.
</span><span class="cx">     ASSERT(frame.isMainFrame());
</span><span class="lines">@@ -114,6 +118,7 @@
</span><span class="cx">     for (const auto&amp; rect : touchRects)
</span><span class="cx">         touchRegion.unite(rect);
</span><span class="cx"> 
</span><ins>+    // FIXME: use absoluteRegionForEventTargets().
</ins><span class="cx">     return touchRegion;
</span><span class="cx"> #else
</span><span class="cx">     Region nonFastScrollableRegion;
</span><span class="lines">@@ -148,6 +153,11 @@
</span><span class="cx">     for (Frame* subframe = frame.tree().firstChild(); subframe; subframe = subframe-&gt;tree().nextSibling())
</span><span class="cx">         nonFastScrollableRegion.unite(computeNonFastScrollableRegion(*subframe, offset));
</span><span class="cx"> 
</span><ins>+    // Include wheel event handler region for the main frame.
+    Region wheelHandlerRegion = frame.document()-&gt;absoluteRegionForEventTargets(frame.document()-&gt;wheelEventTargets());
+    wheelHandlerRegion.translate(toIntSize(offset));
+    nonFastScrollableRegion.unite(wheelHandlerRegion);
+
</ins><span class="cx">     return nonFastScrollableRegion;
</span><span class="cx"> #endif
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (182214 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.cpp        2015-03-31 23:38:49 UTC (rev 182214)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -48,6 +48,7 @@
</span><span class="cx"> #include &quot;BoxShape.h&quot;
</span><span class="cx"> #include &quot;CSSPropertyNames.h&quot;
</span><span class="cx"> #include &quot;Chrome.h&quot;
</span><ins>+#include &quot;DebugPageOverlays.h&quot;
</ins><span class="cx"> #include &quot;Document.h&quot;
</span><span class="cx"> #include &quot;DocumentEventQueue.h&quot;
</span><span class="cx"> #include &quot;Element.h&quot;
</span><span class="lines">@@ -2391,6 +2392,7 @@
</span><span class="cx"> #if PLATFORM(IOS) &amp;&amp; ENABLE(TOUCH_EVENTS)
</span><span class="cx">         renderer().document().dirtyTouchEventRects();
</span><span class="cx"> #endif
</span><ins>+        DebugPageOverlays::didLayout(renderer().frame());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     Frame&amp; frame = renderer().frame();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (182214 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.cpp        2015-03-31 23:38:49 UTC (rev 182214)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -1085,11 +1085,11 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-IntRect RenderObject::absoluteBoundingBoxRect(bool useTransforms) const
</del><ins>+IntRect RenderObject::absoluteBoundingBoxRect(bool useTransforms, bool* wasFixed) const
</ins><span class="cx"> {
</span><span class="cx">     if (useTransforms) {
</span><span class="cx">         Vector&lt;FloatQuad&gt; quads;
</span><del>-        absoluteQuads(quads);
</del><ins>+        absoluteQuads(quads, wasFixed);
</ins><span class="cx"> 
</span><span class="cx">         size_t n = quads.size();
</span><span class="cx">         if (!n)
</span><span class="lines">@@ -1101,7 +1101,7 @@
</span><span class="cx">         return result;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    FloatPoint absPos = localToAbsolute();
</del><ins>+    FloatPoint absPos = localToAbsolute(FloatPoint(), 0 /* ignore transforms */, wasFixed);
</ins><span class="cx">     Vector&lt;IntRect&gt; rects;
</span><span class="cx">     absoluteRects(rects, flooredLayoutPoint(absPos));
</span><span class="cx"> 
</span><span class="lines">@@ -1579,10 +1579,10 @@
</span><span class="cx">     selectionRoot().selectionData().selectionStartEndPositions(spos, epos);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-FloatPoint RenderObject::localToAbsolute(const FloatPoint&amp; localPoint, MapCoordinatesFlags mode) const
</del><ins>+FloatPoint RenderObject::localToAbsolute(const FloatPoint&amp; localPoint, MapCoordinatesFlags mode, bool* wasFixed) const
</ins><span class="cx"> {
</span><span class="cx">     TransformState transformState(TransformState::ApplyTransformDirection, localPoint);
</span><del>-    mapLocalToContainer(nullptr, transformState, mode | ApplyContainerFlip);
</del><ins>+    mapLocalToContainer(nullptr, transformState, mode | ApplyContainerFlip, wasFixed);
</ins><span class="cx">     transformState.flatten();
</span><span class="cx">     
</span><span class="cx">     return transformState.lastPlanarPoint();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.h (182214 => 182215)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.h        2015-03-31 23:38:49 UTC (rev 182214)
+++ trunk/Source/WebCore/rendering/RenderObject.h        2015-03-31 23:42:31 UTC (rev 182215)
</span><span class="lines">@@ -652,7 +652,7 @@
</span><span class="cx">     RenderBlock* containingBlock() const;
</span><span class="cx"> 
</span><span class="cx">     // Convert the given local point to absolute coordinates. If MapCoordinatesFlags includes UseTransforms, take transforms into account.
</span><del>-    WEBCORE_EXPORT FloatPoint localToAbsolute(const FloatPoint&amp; localPoint = FloatPoint(), MapCoordinatesFlags = 0) const;
</del><ins>+    WEBCORE_EXPORT FloatPoint localToAbsolute(const FloatPoint&amp; localPoint = FloatPoint(), MapCoordinatesFlags = 0, bool* wasFixed = nullptr) const;
</ins><span class="cx">     FloatPoint absoluteToLocal(const FloatPoint&amp;, MapCoordinatesFlags = 0) const;
</span><span class="cx"> 
</span><span class="cx">     // Convert a local quad to absolute coordinates, taking transforms into account.
</span><span class="lines">@@ -681,7 +681,7 @@
</span><span class="cx">     virtual void absoluteRects(Vector&lt;IntRect&gt;&amp;, const LayoutPoint&amp;) const { }
</span><span class="cx"> 
</span><span class="cx">     // FIXME: useTransforms should go away eventually
</span><del>-    WEBCORE_EXPORT IntRect absoluteBoundingBoxRect(bool useTransform = true) const;
</del><ins>+    WEBCORE_EXPORT IntRect absoluteBoundingBoxRect(bool useTransform = true, bool* wasFixed = nullptr) const;
</ins><span class="cx">     IntRect absoluteBoundingBoxRectIgnoringTransforms() const { return absoluteBoundingBoxRect(false); }
</span><span class="cx"> 
</span><span class="cx">     // Build an array of quads in absolute coords for line boxes
</span></span></pre>
</div>
</div>

</body>
</html>