WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 105075
104730
[Chromium] Non-fast scrollable region should be scaled
https://bugs.webkit.org/show_bug.cgi?id=104730
Summary
[Chromium] Non-fast scrollable region should be scaled
Xianzhu Wang
Reported
2012-12-11 15:38:43 PST
Currently all scrollable areas in a page are marked as non-fast scrollable regions of the scroll layer of the containing frame. When calling WebLayer::setNonFastScrollableRegion(), the passed region is in CSS pixels, then Chromium's LayerImpl uses the region to check if a touch point (in logical pixels) is in non-fast scrolling area. This causes incorrect scrolling behavior when the page is scaled. For example, when page scale factor > 1, when trying to scroll an area by starting from the bottom right part of the area, the area is not scrolled but the whole page is scrolled because it falls back to the whole page fast scrolling path. Though eventually we'll enable fast scrolling for the scrolling areas as many as possible, for now we need to fix the slow scrolling path for them. Tried the following change and it works: void ScrollingCoordinatorChromium::setNonFastScrollableRegion(const Region& region) { // We won't necessarily get a setScrollLayer() call before this one, so grab the root ourselves. setScrollLayer(scrollLayerForFrameView(m_page->mainFrame()->view())); if (m_private->scrollLayer()) { Vector<IntRect> rects = region.rects(); WebVector<WebRect> webRects(rects.size()); for (size_t i = 0; i < rects.size(); ++i) { + rects[i].scale(m_page->pageScaleFactor()); webRects[i] = rects[i]; } m_private->scrollLayer()->setNonFastScrollableRegion(webRects); } } Will upload a formal patch containing layout test soon.
Attachments
Add attachment
proposed patch, testcase, etc.
Xianzhu Wang
Comment 1
2012-12-11 18:09:52 PST
Discussed with Tien-Ren. Perhaps we should not scale in WebKit, but should apply required scales and transformations when hit-testing the non-fast scrollable region in cc. If yes, we should close this bug and work in Chromium instead.
James Robinson
Comment 2
2012-12-11 18:13:52 PST
(In reply to
comment #1
)
> Discussed with Tien-Ren. Perhaps we should not scale in WebKit, but should apply required scales and transformations when hit-testing the non-fast scrollable region in cc. If yes, we should close this bug and work in Chromium instead.
That sounds a bit more forward-thinking to me. The important thing is knowing which space these are in.
Tien-Ren Chen
Comment 3
2012-12-11 18:21:33 PST
(In reply to
comment #2
)
> (In reply to
comment #1
) > > Discussed with Tien-Ren. Perhaps we should not scale in WebKit, but should apply required scales and transformations when hit-testing the non-fast scrollable region in cc. If yes, we should close this bug and work in Chromium instead. > > That sounds a bit more forward-thinking to me. The important thing is knowing which space these are in.
My opinion is that those should be always in the layer's local coordinate. WebKit is not supposed to know too much about the page scale factor in the new model. (also WebKit has no way to know the scale delta, so we have to do the scale in the compositor anyway)
Tien-Ren Chen
Comment 4
2012-12-14 17:23:39 PST
*** This bug has been marked as a duplicate of
bug 105075
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug