Changeset 167684 in webkit
- Timestamp:
- Apr 22, 2014 2:55:59 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r167680 r167684 1 2014-04-22 Andreas Kling <akling@apple.com> 2 3 REGRESSION (r151839): Subframe keeps getting mousemove events with the same coordinates after hiding a hovered element. 4 <https://webkit.org/b/131974> 5 <rdar://problem/15907469> 6 7 Add a test that triggers the weirdness where removing the renderer from 8 a hovered element in a subframe would leave the subframe's EventHandler 9 in a state where it could dispatch fake mousemove events with stale 10 coordinates in response to style recalc. 11 12 Note that the final 500ms delay is because fake mousemove events are 13 sent on 250ms delay timers so we need to give it some time to catch up. 14 15 Reviewed by Benjamin Poulain. 16 17 * fast/events/ghostly-mousemoves-in-subframe-expected.txt: Added. 18 * fast/events/ghostly-mousemoves-in-subframe.html: Added. 19 * platform/mac-wk2/fast/events/resources/ghostly-mousemoves-in-subframe-the-actual-subframe.html: Added. 20 1 21 2014-04-22 Tim Horton <timothy_horton@apple.com> 2 22 -
trunk/Source/WebCore/ChangeLog
r167683 r167684 1 2014-04-22 Andreas Kling <akling@apple.com> 2 3 REGRESSION (r151839): Subframe keeps getting mousemove events with the same coordinates after hiding a hovered element. 4 <https://webkit.org/b/131974> 5 <rdar://problem/15907469> 6 7 When the currently hovered element disappears as a result of style recalc, 8 we send a fake mousemove event to the page, to see if anything newly added 9 should become hovered. 10 11 The faking mechanism lives in EventHandler and simply synthesizes a new 12 mousemove event using the last seen mouse location. 13 14 The problem here is that we were sending this fake mousemove event to the 15 subframe where the hovered element lived. Since subframes aren't kept up 16 to date on recent mouse locations, this could cause some strange behavior 17 where a subframe would dispatch mousemove events with stale coordinates. 18 19 The solution is to always dispatch fake mousemove events from the main 20 frame's event handler. This is how real event delivery happens, and hit 21 testing will then find the appropriate subframe, if any. 22 23 Reviewed by Benjamin Poulain. 24 25 Test: fast/events/ghostly-mousemoves-in-subframe.html 26 27 * dom/Document.cpp: 28 (WebCore::Document::recalcStyle): 29 1 30 2014-04-22 Myles C. Maxfield <mmaxfield@apple.com> 2 31 -
trunk/Source/WebCore/dom/Document.cpp
r167594 r167684 1795 1795 // to check if any other elements ended up under the mouse pointer due to re-layout. 1796 1796 if (m_hoveredElement && !m_hoveredElement->renderer()) 1797 frameView.frame(). eventHandler().dispatchFakeMouseMoveEventSoon();1797 frameView.frame().mainFrame().eventHandler().dispatchFakeMouseMoveEventSoon(); 1798 1798 1799 1799 // Style change may reset the focus, e.g. display: none, visibility: hidden.
Note: See TracChangeset
for help on using the changeset viewer.