Bug 132107

Summary: Cursor doesn't change back to pointer when leaving the Safari window slowly
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: UI EventsAssignee: Ryosuke Niwa <rniwa>
Status: NEW ---    
Severity: Normal CC: ap, benjamin, buildbot, darin, rniwa, simon.fraser, zalan
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Initial attempt
buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2
none
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion
none
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion none

Description Ryosuke Niwa 2014-04-23 21:29:09 PDT
Reproduction steps
1. Open large image in Safari
2. Move mouse cursor over the image to reveal the magnification cursor icon
3. _Slowly_ move cursor from image to bookmarks bar

Expected Results:
Magnification cursor icon should disappear

Actual Results:
Magnification cursor remains

<rdar://problem/12049075>
Comment 1 Ryosuke Niwa 2014-04-23 21:39:46 PDT
Created attachment 230046 [details]
Initial attempt
Comment 2 Ryosuke Niwa 2014-04-23 21:40:20 PDT
I'd appreciate if someone could suggest me a testing strategy.
Comment 3 Ryosuke Niwa 2014-04-23 21:42:17 PDT
Note that the problem is fixed since http://trac.webkit.org/changeset/167700 when the mouse cursor is moved rapidly out of the window.
Comment 4 zalan 2014-04-23 22:11:19 PDT
Comment on attachment 230046 [details]
Initial attempt

View in context: https://bugs.webkit.org/attachment.cgi?id=230046&action=review

I stopped going through the changes. I'd be just repeating my comments. What I am missing here is the strategy of rounding and whether it is ensured that all these type conversions (especially on convertFromRenderer()) won't introduce any side-effects now that we take Float* instead of Int* (so all implicit flooring through integer arithmetic are gone now).

> Source/WebCore/dom/MouseRelatedEvent.cpp:78
> +            adjustedPageLocation = roundedLayoutPoint(frameView->windowToContents(windowLocation));

roundedLayoutPoint simply converts FloatPoint->LayoutPoint when subpixel is on. What are you trying to round here? If it's just type conversion, I'd prefer you do it explicitly.

> Source/WebCore/editing/Editor.cpp:2795
> +    VisibleSelection selection(frame->visiblePositionForPoint(roundedIntPoint(framePoint)));

Why round here? Other places you seem to just floor implicitly by doing lossy FloatPoint to IntPoint conversion.

> Source/WebCore/page/EventHandler.cpp:623
> +        LayoutPoint vPoint = roundedLayoutPoint(view->windowToContents(event.event().position()));

Same here.

> Source/WebCore/page/EventHandler.cpp:737
> +    m_dragStartPos = roundedLayoutPoint(event.event().position());

Same here.

> Source/WebCore/page/EventHandler.cpp:1057
> +    return page->dragController().delegateDragSourceAction(view->contentsToRootView(roundedIntPoint(m_mouseDownPos)));

Why round?
Comment 5 Build Bot 2014-04-23 22:49:19 PDT
Comment on attachment 230046 [details]
Initial attempt

Attachment 230046 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/4864321867743232

New failing tests:
fast/css/resize-corner-tracking-transformed-iframe.html
Comment 6 Build Bot 2014-04-23 22:49:23 PDT
Created attachment 230052 [details]
Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-16  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 7 Build Bot 2014-04-23 23:17:32 PDT
Comment on attachment 230046 [details]
Initial attempt

Attachment 230046 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/6057171724795904

New failing tests:
fast/css/resize-corner-tracking-transformed-iframe.html
Comment 8 Build Bot 2014-04-23 23:17:36 PDT
Created attachment 230053 [details]
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-01  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 9 Build Bot 2014-04-24 00:10:45 PDT
Comment on attachment 230046 [details]
Initial attempt

Attachment 230046 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/5974265971081216

New failing tests:
fast/css/resize-corner-tracking-transformed-iframe.html
Comment 10 Build Bot 2014-04-24 00:10:50 PDT
Created attachment 230056 [details]
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-08  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 11 Ryosuke Niwa 2014-12-14 10:09:20 PST
Comment on attachment 230046 [details]
Initial attempt

This patch is bad.