<!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>[211775] 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/211775">211775</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2017-02-06 22:45:43 -0800 (Mon, 06 Feb 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Overlay scrolling with iframe-s broken
https://bugs.webkit.org/show_bug.cgi?id=165056

Reviewed by Antonio Gomes.

Source/WebCore:

Mouse press events for overlay scrollbars are ignored if there's a subframe under the scrollbar. This doesn't
happen with normal scrollbars, because the subframe is not really under the scrollbar, so events are always
correctly passed to the scrollbar. With overlay scrollbars, the hit test detects the scrollbar, but events are
always passed first to the subframe. Scrollbars are correctly updated on hover though, because
handleMouseMoveEvent checks the presence of scrollbars before checking for subframes and move events are
actually passed to both, the scrollbar and the subframe. Overlay scrollbars should always take precedence over
subframes to handle mouse press events, so we should check first if mouse is over a scrollbar and never pass the
event to a subframe in that case. Another problem is that the cursor is not updated either when the overlay
scrollbar is hovered and there's a subframe. This is because in handleMouseMoveEvent we pass the event to both
the scrollbar and subframe but we never update the cursor when a suframe was found. So, here again we need to make
an exception for scrollbars and upate the cursor when mouse is over the scrollbar even if a subframe was found.

Test: fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html

* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent): Move the scrollbar check before the subframe check.
(WebCore::EventHandler::handleMouseMoveEvent): Update the cursor when hovering a scrollbar even if a subframe
was found.
(WebCore::EventHandler::updateLastScrollbarUnderMouse): Use an enum instead of a boolean for setLast parameter.
* page/EventHandler.h:

LayoutTests:

Add a new test to check that clicking on an overlay scrollbar works even it's over a subframe.

* fast/scrolling/scroll-animator-overlay-scrollbars-clicked-expected.txt: Added.
* fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html: Added.
* platform/ios-simulator/TestExpectations:
* platform/mac-wk1/TestExpectations:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorTestExpectations">trunk/LayoutTests/platform/ios-simulator/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk1TestExpectations">trunk/LayoutTests/platform/mac-wk1/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepageEventHandlercpp">trunk/Source/WebCore/page/EventHandler.cpp</a></li>
<li><a href="#trunkSourceWebCorepageEventHandlerh">trunk/Source/WebCore/page/EventHandler.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastscrollingscrollanimatoroverlayscrollbarsclickedexpectedtxt">trunk/LayoutTests/fast/scrolling/scroll-animator-overlay-scrollbars-clicked-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastscrollingscrollanimatoroverlayscrollbarsclickedhtml">trunk/LayoutTests/fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (211774 => 211775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-02-07 06:34:26 UTC (rev 211774)
+++ trunk/LayoutTests/ChangeLog        2017-02-07 06:45:43 UTC (rev 211775)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2017-02-06  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        Overlay scrolling with iframe-s broken
+        https://bugs.webkit.org/show_bug.cgi?id=165056
+
+        Reviewed by Antonio Gomes.
+
+        Add a new test to check that clicking on an overlay scrollbar works even it's over a subframe.
+
+        * fast/scrolling/scroll-animator-overlay-scrollbars-clicked-expected.txt: Added.
+        * fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html: Added.
+        * platform/ios-simulator/TestExpectations:
+        * platform/mac-wk1/TestExpectations:
+
</ins><span class="cx"> 2017-02-06  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Migrate ComplexTextController to use platform-independent types
</span></span></pre></div>
<a id="trunkLayoutTestsfastscrollingscrollanimatoroverlayscrollbarsclickedexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/scrolling/scroll-animator-overlay-scrollbars-clicked-expected.txt (0 => 211775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/scroll-animator-overlay-scrollbars-clicked-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/scrolling/scroll-animator-overlay-scrollbars-clicked-expected.txt        2017-02-07 06:45:43 UTC (rev 211775)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+CONSOLE MESSAGE: line 14: MainFrameView: didAddVerticalScrollbar
+CONSOLE MESSAGE: line 14: MainFrameView: didAddHorizontalScrollbar
+CONSOLE MESSAGE: line 14: FrameView: didAddVerticalScrollbar
+CONSOLE MESSAGE: line 14: FrameView: willRemoveVerticalScrollbar
+CONSOLE MESSAGE: line 14: MainFrameView: mouseEnteredContentArea
+CONSOLE MESSAGE: line 14: MainFrameView: mouseMovedInContentArea
+CONSOLE MESSAGE: line 16: MainFrameView: mouseEnteredVerticalScrollbar
+CONSOLE MESSAGE: line 16: FrameView: mouseEnteredContentArea
+CONSOLE MESSAGE: line 16: MainFrameView: mouseMovedInContentArea
+CONSOLE MESSAGE: line 17: MainFrameView: mouseIsDownInVerticalScrollbar
+CONSOLE MESSAGE: line 18: MainFrameView: mouseIsUpInVerticalScrollbar
+CONSOLE MESSAGE: line 19: MainFrameView: mouseExitedVerticalScrollbar
+CONSOLE MESSAGE: line 19: FrameView: mouseExitedContentArea
+CONSOLE MESSAGE: line 19: MainFrameView: mouseMovedInContentArea
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Test for https://bugs.webkit.org/show_bug.cgi?id=165056.
+
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingscrollanimatoroverlayscrollbarsclickedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html (0 => 211775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html                                (rev 0)
+++ trunk/LayoutTests/fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html        2017-02-07 06:45:43 UTC (rev 211775)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+&lt;html&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+  if (window.internals) {
+      window.internals.setUsesMockScrollAnimator(true);
+      window.internals.setUsesOverlayScrollbars(true);
+  }
+  if (window.testRunner) {
+      testRunner.waitUntilDone();
+      testRunner.dumpAsText();
+  }
+  window.onload = function () {
+      if (window.eventSender) {
+          eventSender.mouseMoveTo(0, 0);
+          // Move to a position that is over the vertical scrollbar and the iframe.
+          eventSender.mouseMoveTo(window.innerWidth - 4, 100);
+          eventSender.mouseDown();
+          eventSender.mouseUp();
+          eventSender.mouseMoveTo(0, 0);
+      }
+      if (window.testRunner)
+          testRunner.notifyDone();
+  };
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;body&gt;
+  &lt;p&gt;Test for &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=165056&quot;&gt;https://bugs.webkit.org/show_bug.cgi?id=165056&lt;/a&gt;.&lt;/p&gt;
+  &lt;iframe width=&quot;1024&quot; height=&quot;768&quot; id=&quot;frame&quot; src=&quot;data:text/html,&lt;html&gt;&lt;/html&gt;&quot;&gt;&lt;/iframe&gt;
+  &lt;pre id=&quot;console&quot;&gt;&lt;/pre&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (211774 => 211775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/TestExpectations        2017-02-07 06:34:26 UTC (rev 211774)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations        2017-02-07 06:45:43 UTC (rev 211775)
</span><span class="lines">@@ -313,6 +313,7 @@
</span><span class="cx"> loader/stateobjects/pushstate-size.html [ Skip ]
</span><span class="cx"> loader/stateobjects/pushstate-size-iframe.html [ Skip ]
</span><span class="cx"> fast/scrolling/scroll-animator-basic-events.html [ Skip ]
</span><ins>+fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html [ Skip ]
</ins><span class="cx"> fast/scrolling/scroll-animator-overlay-scrollbars-hovered.html [ Skip ]
</span><span class="cx"> fast/scrolling/scroll-animator-select-list-events.html [ Skip ]
</span><span class="cx"> fast/events/prevent-default-prevents-interaction-with-scrollbars.html [ Skip ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk1TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (211774 => 211775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk1/TestExpectations        2017-02-07 06:34:26 UTC (rev 211774)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations        2017-02-07 06:45:43 UTC (rev 211775)
</span><span class="lines">@@ -197,7 +197,8 @@
</span><span class="cx"> inspector/unit-tests/heap-snapshot.html [ Skip ]
</span><span class="cx"> inspector/unit-tests/heap-snapshot-collection-event.html [ Skip ]
</span><span class="cx"> 
</span><del>-# This test checks ScrollAnimator events only for main frame scrollbars that use native widgets in WK1.
</del><ins>+# These tests check ScrollAnimator events for main frame scrollbars that use native widgets in WK1.
+fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html [ Skip ]
</ins><span class="cx"> fast/scrolling/scroll-animator-overlay-scrollbars-hovered.html [ Skip ]
</span><span class="cx"> 
</span><span class="cx"> # This hit-test test doesn't work on DRT
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (211774 => 211775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-02-07 06:34:26 UTC (rev 211774)
+++ trunk/Source/WebCore/ChangeLog        2017-02-07 06:45:43 UTC (rev 211775)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2017-02-06  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        Overlay scrolling with iframe-s broken
+        https://bugs.webkit.org/show_bug.cgi?id=165056
+
+        Reviewed by Antonio Gomes.
+
+        Mouse press events for overlay scrollbars are ignored if there's a subframe under the scrollbar. This doesn't
+        happen with normal scrollbars, because the subframe is not really under the scrollbar, so events are always
+        correctly passed to the scrollbar. With overlay scrollbars, the hit test detects the scrollbar, but events are
+        always passed first to the subframe. Scrollbars are correctly updated on hover though, because
+        handleMouseMoveEvent checks the presence of scrollbars before checking for subframes and move events are
+        actually passed to both, the scrollbar and the subframe. Overlay scrollbars should always take precedence over
+        subframes to handle mouse press events, so we should check first if mouse is over a scrollbar and never pass the
+        event to a subframe in that case. Another problem is that the cursor is not updated either when the overlay
+        scrollbar is hovered and there's a subframe. This is because in handleMouseMoveEvent we pass the event to both
+        the scrollbar and subframe but we never update the cursor when a suframe was found. So, here again we need to make
+        an exception for scrollbars and upate the cursor when mouse is over the scrollbar even if a subframe was found.
+
+        Test: fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html
+
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::handleMousePressEvent): Move the scrollbar check before the subframe check.
+        (WebCore::EventHandler::handleMouseMoveEvent): Update the cursor when hovering a scrollbar even if a subframe
+        was found.
+        (WebCore::EventHandler::updateLastScrollbarUnderMouse): Use an enum instead of a boolean for setLast parameter.
+        * page/EventHandler.h:
+
</ins><span class="cx"> 2017-02-06  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Symbols exposed on cross-origin Window / Location objects should be configurable
</span></span></pre></div>
<a id="trunkSourceWebCorepageEventHandlercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/EventHandler.cpp (211774 => 211775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/EventHandler.cpp        2017-02-07 06:34:26 UTC (rev 211774)
+++ trunk/Source/WebCore/page/EventHandler.cpp        2017-02-07 06:45:43 UTC (rev 211775)
</span><span class="lines">@@ -1677,17 +1677,23 @@
</span><span class="cx">     m_mousePressNode = mouseEvent.targetNode();
</span><span class="cx">     m_frame.document()-&gt;setFocusNavigationStartingNode(mouseEvent.targetNode());
</span><span class="cx"> 
</span><del>-    RefPtr&lt;Frame&gt; subframe = subframeForHitTestResult(mouseEvent);
-    if (subframe &amp;&amp; passMousePressEventToSubframe(mouseEvent, subframe.get())) {
-        // Start capturing future events for this frame.  We only do this if we didn't clear
-        // the m_mousePressed flag, which may happen if an AppKit widget entered a modal event loop.
-        m_capturesDragging = subframe-&gt;eventHandler().capturesDragging();
-        if (m_mousePressed &amp;&amp; m_capturesDragging) {
-            m_capturingMouseEventsElement = subframe-&gt;ownerElement();
-            m_eventHandlerWillResetCapturingMouseEventsElement = true;
</del><ins>+    Scrollbar* scrollbar = scrollbarForMouseEvent(mouseEvent, m_frame.view());
+    updateLastScrollbarUnderMouse(scrollbar, SetOrClearLastScrollbar::Set);
+    bool passedToScrollbar = scrollbar &amp;&amp; passMousePressEventToScrollbar(mouseEvent, scrollbar);
+
+    if (!passedToScrollbar) {
+        RefPtr&lt;Frame&gt; subframe = subframeForHitTestResult(mouseEvent);
+        if (subframe &amp;&amp; passMousePressEventToSubframe(mouseEvent, subframe.get())) {
+            // Start capturing future events for this frame. We only do this if we didn't clear
+            // the m_mousePressed flag, which may happen if an AppKit widget entered a modal event loop.
+            m_capturesDragging = subframe-&gt;eventHandler().capturesDragging();
+            if (m_mousePressed &amp;&amp; m_capturesDragging) {
+                m_capturingMouseEventsElement = subframe-&gt;ownerElement();
+                m_eventHandlerWillResetCapturingMouseEventsElement = true;
+            }
+            invalidateClick();
+            return true;
</ins><span class="cx">         }
</span><del>-        invalidateClick();
-        return true;
</del><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(PAN_SCROLLING)
</span><span class="lines">@@ -1746,10 +1752,6 @@
</span><span class="cx">             mouseEvent = m_frame.document()-&gt;prepareMouseEvent(HitTestRequest(), documentPoint, platformMouseEvent);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    Scrollbar* scrollbar = scrollbarForMouseEvent(mouseEvent, m_frame.view());
-    updateLastScrollbarUnderMouse(scrollbar, true);
-
-    bool passedToScrollbar = scrollbar &amp;&amp; passMousePressEventToScrollbar(mouseEvent, scrollbar);
</del><span class="cx">     if (!swallowEvent) {
</span><span class="cx">         if (passedToScrollbar)
</span><span class="cx">             swallowEvent = true;
</span><span class="lines">@@ -1931,7 +1933,7 @@
</span><span class="cx">         m_resizeLayer-&gt;resize(platformMouseEvent, m_offsetFromResizeCorner);
</span><span class="cx">     else {
</span><span class="cx">         Scrollbar* scrollbar = mouseEvent.scrollbar();
</span><del>-        updateLastScrollbarUnderMouse(scrollbar, !m_mousePressed);
</del><ins>+        updateLastScrollbarUnderMouse(scrollbar, m_mousePressed ? SetOrClearLastScrollbar::Clear : SetOrClearLastScrollbar::Set);
</ins><span class="cx"> 
</span><span class="cx">         // On iOS, our scrollbars are managed by UIKit.
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="lines">@@ -1959,7 +1961,9 @@
</span><span class="cx">         // node to be detached from its FrameView, in which case the event should not be passed.
</span><span class="cx">         if (newSubframe-&gt;view())
</span><span class="cx">             swallowEvent |= passMouseMoveEventToSubframe(mouseEvent, newSubframe.get(), hoveredNode);
</span><del>-    } else {
</del><ins>+    }
+
+    if (!newSubframe || mouseEvent.scrollbar()) {
</ins><span class="cx"> #if ENABLE(CURSOR_SUPPORT)
</span><span class="cx">         if (auto* view = m_frame.view())
</span><span class="cx">             updateCursor(*view, mouseEvent.hitTestResult(), platformMouseEvent.shiftKey());
</span><span class="lines">@@ -3825,9 +3829,8 @@
</span><span class="cx">     return scrollbar-&gt;mouseDown(mouseEvent.event());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-// If scrollbar (under mouse) is different from last, send a mouse exited. Set
-// last to scrollbar if setLast is true; else set last to nullptr.
-void EventHandler::updateLastScrollbarUnderMouse(Scrollbar* scrollbar, bool setLast)
</del><ins>+// If scrollbar (under mouse) is different from last, send a mouse exited.
+void EventHandler::updateLastScrollbarUnderMouse(Scrollbar* scrollbar, SetOrClearLastScrollbar setOrClear)
</ins><span class="cx"> {
</span><span class="cx">     if (m_lastScrollbarUnderMouse != scrollbar) {
</span><span class="cx">         // Send mouse exited to the old scrollbar.
</span><span class="lines">@@ -3835,12 +3838,10 @@
</span><span class="cx">             m_lastScrollbarUnderMouse-&gt;mouseExited();
</span><span class="cx"> 
</span><span class="cx">         // Send mouse entered if we're setting a new scrollbar.
</span><del>-        if (scrollbar &amp;&amp; setLast)
</del><ins>+        if (scrollbar &amp;&amp; setOrClear == SetOrClearLastScrollbar::Set) {
</ins><span class="cx">             scrollbar-&gt;mouseEntered();
</span><del>-
-        if (setLast &amp;&amp; scrollbar)
</del><span class="cx">             m_lastScrollbarUnderMouse = scrollbar-&gt;createWeakPtr();
</span><del>-        else
</del><ins>+        } else
</ins><span class="cx">             m_lastScrollbarUnderMouse = nullptr;
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepageEventHandlerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/EventHandler.h (211774 => 211775)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/EventHandler.h        2017-02-07 06:34:26 UTC (rev 211774)
+++ trunk/Source/WebCore/page/EventHandler.h        2017-02-07 06:45:43 UTC (rev 211775)
</span><span class="lines">@@ -443,7 +443,8 @@
</span><span class="cx">     void updateSelectionForMouseDrag(const HitTestResult&amp;);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    void updateLastScrollbarUnderMouse(Scrollbar*, bool);
</del><ins>+    enum class SetOrClearLastScrollbar { Clear, Set };
+    void updateLastScrollbarUnderMouse(Scrollbar*, SetOrClearLastScrollbar);
</ins><span class="cx">     
</span><span class="cx">     void setFrameWasScrolledByUser();
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>