[Webkit-unassigned] [Bug 94384] screenToWindow and windowToScreen are not implemented in Qt5 WebKit2

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 27 11:58:46 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=94384





--- Comment #10 from Andras Becsi <abecsi at webkit.org>  2012-08-27 11:58:47 PST ---
(In reply to comment #9)
> (In reply to comment #6)
> > AFAICT screenToWindow should do window->mapFromGlobal(point) and windowToScreen should return IntRect(window->mapToGlobal(rect.location()), rect.size()).
> 
> The way I understand it is that the "window" referred to by screenToWindow() and windowToScreen() is the "webkit" window which is a QQuickWebView, while the QWindow "window" that I mapTo/FromGlobal is on contains that QQuickWebView, but can also contain other thigns (like a URL bar!), so I somehow need to convert between them.

Right, the window is indeed the rootView so for the default case your windowToScreen seems ok, but screenToWindow is incorrect.

Although I think these would produce wrong results if the page is scaled from the UI (pinch zoom) or a custom device pixel ratio is set, since the ScrollView only adjusts the coordinates with the scroll offset.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list