| Summary: | 'mouseenter' mouse compat event not fired when listeners for touch events | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Patrick H. Lauke <redux> | ||||||||||||
| Component: | UI Events | Assignee: | Benjamin Poulain <benjamin> | ||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||
| Severity: | Minor | CC: | benjamin, commit-queue, dtrebbien, esprehn+autocc, kangil.han, kling, sam | ||||||||||||
| Priority: | P3 | ||||||||||||||
| Version: | 528+ (Nightly build) | ||||||||||||||
| Hardware: | iPhone / iPad | ||||||||||||||
| OS: | iOS 7.0 | ||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Patrick H. Lauke
2014-02-10 07:59:31 PST
That looks like a input event bug. Next time you can CC me on Twitter too :) Can I attach the two files to the bug for future reference? Created attachment 223834 [details]
Event test for touch, pointer, MSPointer, mouse events
Created attachment 223835 [details]
Event test just for mouse events
Cheers Ben. I assume you're @awfulben ? I made the two tests self-contained (stuck the styles directly in there) and attached them. Created attachment 223836 [details]
iOS/Safari when zoomed out - no mouseenter fired on "all events" test
Created attachment 223838 [details]
iOS/Safari when zoomed in - mouseenter fired on "all events" test
Just testing this further, some more weirdness which may point towards the cause of the bug: it seems that mouseenter is not fired in my test when Safari is zoomed out. If I pinch-zoom into my test page, mouseenter DOES fire.
(In reply to comment #4) > Cheers Ben. I assume you're @awfulben ? I am :) > I made the two tests self-contained (stuck the styles directly in there) and attached them. Thanks for attaching the tests. I can reproduce locally, I will take the bug. I suspect we changes a hover state when delivering the touch events, and when we generate the synthetic mouse events eventHandler thinks mouseenter was already delivered. Just a wild guess though, I'll find out when I'll have time to debug this. Created attachment 224159 [details]
Patch
Comment on attachment 224159 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=224159&action=review r=me > Source/WebCore/ChangeLog:8 > + The code dispatchign mouseenter and mouseleave events was making the assumption that dispatching > Source/WebCore/ChangeLog:15 > + processing of mouse events. The update is done along the events mouseover and mouseout. along what? > Source/WebCore/dom/Document.cpp:5873 > + for (size_t i = 0; i < removeCount; ++i) range for > Source/WebCore/page/EventHandler.cpp:2384 > + RenderElement* oldHoverObj = m_lastElementUnderMouse ? m_lastElementUnderMouse->renderer() : nullptr; > + RenderElement* newHoverObj = m_elementUnderMouse ? m_elementUnderMouse->renderer() : nullptr; I'd call these *Renderer instead of *Obj. > Source/WebCore/page/EventHandler.cpp:2387 > + Vector<RefPtr<Element>, 32> leftElementsChain; This could be Vector<Ref<Element>> since it never contains null pointers. > Source/WebCore/page/EventHandler.cpp:2400 > + Vector<RefPtr<Element>, 32> enteredElementsChain; Ditto. > Source/WebCore/page/EventHandler.cpp:2415 > + for (size_t i = 0; i < leftElementsChain.size(); ++i) { range for > Source/WebCore/page/EventHandler.cpp:2425 > + for (size_t i = 0, size = enteredElementsChain.size(); i < size; ++i) { range for Committed r164495: <http://trac.webkit.org/changeset/164495> |