Bug 104724 - Pre-painting should not paint out-of-view fixed position elements
Summary: Pre-painting should not paint out-of-view fixed position elements
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Xianzhu Wang
URL:
Keywords:
Depends on: 102543
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-11 14:59 PST by Xianzhu Wang
Modified: 2012-12-12 11:39 PST (History)
6 users (show)

See Also:


Attachments
Patch (5.79 KB, patch)
2012-12-11 21:28 PST, Xianzhu Wang
no flags Details | Formatted Diff | Diff
Use manual test (3.71 KB, patch)
2012-12-12 10:58 PST, Xianzhu Wang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xianzhu Wang 2012-12-11 14:59:34 PST
Out-of-view fixed position elements are not composited. In RenderLayer::paintLayer(), such elements will be painted when pre-paint out-of-view parts. This causes residues when the part scrolls into the viewport. Patch of bug 102543 provides a way to determine if a non-composited fixed position element is out-of-view so not to be painted in pre-paining.
Comment 1 James Robinson 2012-12-11 19:22:34 PST
I see the same bug in Safari running a WebKit nightly
Comment 2 James Robinson 2012-12-11 19:26:14 PST
For instance load up http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2012, click "Rendered view", and scroll down.  I see lots of red on Version 6.0.2 (8536.26.17, 537+)  WebKit r137338
Comment 3 Simon Fraser (smfr) 2012-12-11 19:52:38 PST
Not sure what pre-painting is.
Comment 4 James Robinson 2012-12-11 20:46:51 PST
Painting things not currently in the visible viewport.  On mac, I think this is done via the tile caching logic.
Comment 5 Xianzhu Wang 2012-12-11 21:28:01 PST
Created attachment 178958 [details]
Patch
Comment 6 Xianzhu Wang 2012-12-11 21:31:04 PST
Actually I didn't reproduce the issue with the added test case when the fix was not applied. I wonder what the correct way is to test prepainting behavior.
Comment 7 James Robinson 2012-12-11 22:14:23 PST
The scroll will generate an invalidation before the test completes.  I don't know of any way to see the results of off-main-thread scrolling in a layout test.
Comment 8 Beth Dakin 2012-12-11 22:17:29 PST
(In reply to comment #0)
> Out-of-view fixed position elements are not composited. In RenderLayer::paintLayer(), such elements will be painted when pre-paint out-of-view parts. This causes residues when the part scrolls into the viewport. Patch of bug 102543 provides a way to determine if a non-composited fixed position element is out-of-view so not to be painted in pre-paining.

Can you provide a manual test that reproduces this bug? I am just curious to see it.
Comment 9 James Robinson 2012-12-11 22:27:17 PST
(In reply to comment #8)
> (In reply to comment #0)
> > Out-of-view fixed position elements are not composited. In RenderLayer::paintLayer(), such elements will be painted when pre-paint out-of-view parts. This causes residues when the part scrolls into the viewport. Patch of bug 102543 provides a way to determine if a non-composited fixed position element is out-of-view so not to be painted in pre-paining.
> 
> Can you provide a manual test that reproduces this bug? I am just curious to see it.

See comment #2
Comment 10 Beth Dakin 2012-12-11 22:31:58 PST
(In reply to comment #9)
> (In reply to comment #8)
> > (In reply to comment #0)
> > > Out-of-view fixed position elements are not composited. In RenderLayer::paintLayer(), such elements will be painted when pre-paint out-of-view parts. This causes residues when the part scrolls into the viewport. Patch of bug 102543 provides a way to determine if a non-composited fixed position element is out-of-view so not to be painted in pre-paining.
> > 
> > Can you provide a manual test that reproduces this bug? I am just curious to see it.
> 
> See comment #2

Thanks!
Comment 11 Xianzhu Wang 2012-12-12 10:58:18 PST
Created attachment 179082 [details]
Use manual test
Comment 12 James Robinson 2012-12-12 11:02:04 PST
Comment on attachment 179082 [details]
Use manual test

R=me
Comment 13 WebKit Review Bot 2012-12-12 11:39:16 PST
Comment on attachment 179082 [details]
Use manual test

Clearing flags on attachment: 179082

Committed r137492: <http://trac.webkit.org/changeset/137492>
Comment 14 WebKit Review Bot 2012-12-12 11:39:20 PST
All reviewed patches have been landed.  Closing bug.