Summary: | Sometimes scroll position is jerky during rubber-band, affects nytimes.com | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Beth Dakin <bdakin> | ||||
Component: | Layout and Rendering | Assignee: | Beth Dakin <bdakin> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | andersca, bdakin, ggaren, jamesr, levin+threading, sam, simon.fraser, tonikitoo, webkit.review.bot | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Mac | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Beth Dakin
2013-01-22 21:58:43 PST
Created attachment 184140 [details]
Patch
Attachment 184140 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebCore/page/scrolling/ScrollingTree.h:82: The parameter name "isRubberBanding" adds no information, so it should be removed. [readability/parameter_name] [5]
Total errors found: 1 in 11 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 184140 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=184140&action=review > Source/WebCore/page/FrameView.cpp:1929 > + if (Page* page = m_frame->page()) { > + if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator()) { > + if (!scrollingCoordinator->shouldUpdateScrollLayerPositionOnMainThread()) > + return scrollingCoordinator->isRubberBandInProgress(); > + } > + } > +#endif > + > + // If the main thread updates the scroll position for this FrameView, we should return > + // ScrollAnimator::isRubberBandInProgress(). > + if (ScrollAnimator* scrollAnimator = existingScrollAnimator()) > + return scrollAnimator->isRubberBandInProgress(); It's a shame that the ScrollingCoordinator and ScrollAnimator don't know about eachother, otherwise you could just ask one of them for the answer. It's pretty unwieldy to have to add code like this in several places. Comment on attachment 184140 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=184140&action=review > Source/WebCore/page/FrameView.cpp:1915 > +#if ENABLE(THREADED_SCROLLING) why this compile-time guard? The code this depends on (ScrollingCoordinator, etc) are all available outside this feature define and platforms that don't set this (say chromium) will still need this code (In reply to comment #3) > (From update of attachment 184140 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=184140&action=review > > > Source/WebCore/page/FrameView.cpp:1929 > > + if (Page* page = m_frame->page()) { > > + if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator()) { > > + if (!scrollingCoordinator->shouldUpdateScrollLayerPositionOnMainThread()) > > + return scrollingCoordinator->isRubberBandInProgress(); > > + } > > + } > > +#endif > > + > > + // If the main thread updates the scroll position for this FrameView, we should return > > + // ScrollAnimator::isRubberBandInProgress(). > > + if (ScrollAnimator* scrollAnimator = existingScrollAnimator()) > > + return scrollAnimator->isRubberBandInProgress(); > > It's a shame that the ScrollingCoordinator and ScrollAnimator don't know about eachother, otherwise you could just ask one of them for the answer. It's pretty unwieldy to have to add code like this in several places. Agreed. :-/ (In reply to comment #4) > (From update of attachment 184140 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=184140&action=review > > > Source/WebCore/page/FrameView.cpp:1915 > > +#if ENABLE(THREADED_SCROLLING) > > why this compile-time guard? The code this depends on (ScrollingCoordinator, etc) are all available outside this feature define and platforms that don't set this (say chromium) will still need this code Alright, I can remove it. I added it because the ScrollingCoordinator function does not do anything on Chromium right now, and didn't know if the bug existed in Chromium anyway. (In reply to comment #6) > (In reply to comment #4) > > (From update of attachment 184140 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=184140&action=review > > > > > Source/WebCore/page/FrameView.cpp:1915 > > > +#if ENABLE(THREADED_SCROLLING) > > > > why this compile-time guard? The code this depends on (ScrollingCoordinator, etc) are all available outside this feature define and platforms that don't set this (say chromium) will still need this code > > Alright, I can remove it. I added it because the ScrollingCoordinator function does not do anything on Chromium right now, and didn't know if the bug existed in Chromium anyway. Rubber-banding isn't implemented at all in chromium's implementation of off-main-thread scrolling today, so an implementation of ScrollingCoordinator that returns false for isRubberBandInProgress() will be accurate until we fix that. |