Bug 48988

Summary: Delegate scrolling via a separate method
Product: WebKit Reporter: Kenneth Rohde Christiansen <kenneth>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, aroben, hyatt, kling, mitz, webkit-ews
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
Patch
none
Patch2 hyatt: review+

Kenneth Rohde Christiansen
Reported 2010-11-04 04:12:15 PDT
Instead of piggy-backing on the HostWindow::scroll method, we use a special delegateScrollRequested method. This means that we avoid calling additional scrollbar related code before the call to HostWindow::scroll, and that we do not need to do special casing in ChromeClient::scroll to figure out if it was a delegated scroll or not, thus imposing overhead on the normal case. This will also make the webkit2 impl more clear.
Attachments
Patch (11.16 KB, patch)
2010-11-04 04:17 PDT, Kenneth Rohde Christiansen
no flags
Patch2 (11.89 KB, patch)
2010-11-04 06:47 PDT, Kenneth Rohde Christiansen
hyatt: review+
Kenneth Rohde Christiansen
Comment 1 2010-11-04 04:17:15 PDT
Early Warning System Bot
Comment 2 2010-11-04 04:28:38 PDT
Kenneth Rohde Christiansen
Comment 3 2010-11-04 06:47:56 PDT
Adam Roben (:aroben)
Comment 4 2010-11-04 08:27:19 PDT
Comment on attachment 72933 [details] Patch2 View in context: https://bugs.webkit.org/attachment.cgi?id=72933&action=review > WebCore/platform/ScrollView.cpp:340 > + IntPoint newScrollPosition = scrollPoint.shrunkTo(maximumScrollPosition()); > + newScrollPosition.clampNegativeToZero(); > + > +#if ENABLE(TILED_BACKING_STORE) > if (delegatesScrolling()) { > - scrollContents(IntSize(scrollPoint.x(), scrollPoint.y())); > + hostWindow()->delegatedScrollRequested(IntSize(scrollPoint.x(), scrollPoint.y())); > return; > } > - > - IntPoint newScrollPosition = scrollPoint.shrunkTo(maximumScrollPosition()); > - newScrollPosition.clampNegativeToZero(); > +#endif Looks like you removed the call to scrollContents entirely, even in the non-tiled case.
Kenneth Rohde Christiansen
Comment 5 2010-11-04 08:29:06 PDT
(In reply to comment #4) > (From update of attachment 72933 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=72933&action=review > Looks like you removed the call to scrollContents entirely, even in the non-tiled case. No, that is called later indirectly bye setting the scrollbars.
Dave Hyatt
Comment 6 2010-11-04 12:24:39 PDT
Comment on attachment 72933 [details] Patch2 View in context: https://bugs.webkit.org/attachment.cgi?id=72933&action=review Looks good. > WebCore/ChangeLog:9 > + scrolling to the view. This is only used in conjunging with tiling, "conjunction" is what you meant to say here I think.
Andreas Kling
Comment 7 2010-11-04 12:41:56 PDT
Note You need to log in before you can comment on or make changes to this bug.