Bug 143637

Summary: Too much repainting on scrolling with fixed backgrounds
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: New BugsAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, buildbot, dino, rniwa, simon.fraser, thorton
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
darin: review+, buildbot: commit-queue-
Archive of layout-test-results from ews106 for mac-mavericks-wk2 none

Description Simon Fraser (smfr) 2015-04-11 14:53:00 PDT
Too much repainting on scrolling with fixed backgrounds
Comment 1 Simon Fraser (smfr) 2015-04-11 14:58:44 PDT
Created attachment 250586 [details]
Patch
Comment 2 Simon Fraser (smfr) 2015-04-11 14:59:42 PDT
rdar://problem/20245243
Comment 3 Build Bot 2015-04-11 15:54:26 PDT
Comment on attachment 250586 [details]
Patch

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

New failing tests:
compositing/repaint/fixed-background-scroll.html
Comment 4 Build Bot 2015-04-11 15:54:30 PDT
Created attachment 250589 [details]
Archive of layout-test-results from ews106 for mac-mavericks-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-mavericks-wk2  Platform: Mac OS X 10.9.5
Comment 5 Darin Adler 2015-04-11 18:19:47 PDT
Comment on attachment 250586 [details]
Patch

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

Looks like compositing/repaint/fixed-background-scroll.html failed on the WK2 bot. Clearly that needs to be diagnosed and fixed before landing.

> Source/WebCore/page/FrameView.cpp:1874
> +    if (!usesCompositedScrolling()) {
> +        if (RenderWidget* frameRenderer = frame().ownerRenderer()) {
> +            if (isEnclosedInCompositingLayer()) {

Is this the optimal order for checking these, with the inexpensive checks most likely to fail first?

> Source/WebCore/page/FrameView.cpp:1876
> +                LayoutRect rect(frameRenderer->borderLeft() + frameRenderer->paddingLeft(), frameRenderer->borderTop() + frameRenderer->paddingTop(),
> +                    visibleWidth(), visibleHeight());

Makes me wish this code used points and sizes instead of scalars; the X and Y parts of this computation are the same.
Comment 6 Simon Fraser (smfr) 2015-04-12 10:33:11 PDT
https://trac.webkit.org/changeset/182669