Bug 80877 - Avoid allocating huge layers for an element with a positioned child outside of its bounds
Summary: Avoid allocating huge layers for an element with a positioned child outside o...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2012-03-12 13:37 PDT by Simon Fraser (smfr)
Modified: 2012-07-30 14:22 PDT (History)
8 users (show)

See Also:


Attachments
Interactive testcase (5.34 KB, text/html)
2012-03-12 18:15 PDT, Simon Fraser (smfr)
no flags Details
Screenshot (30.55 KB, image/png)
2012-07-26 17:02 PDT, Simon Fraser (smfr)
no flags Details
WIP patch (4.86 KB, patch)
2012-07-29 17:36 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2012-03-12 13:37:06 PDT
In compositing scenarios like the one in the screenshot, we should put the gray box into its own layer, since it sits far outside of its parent, and backing store usage would be much lower that way.
Comment 1 Simon Fraser (smfr) 2012-03-12 18:15:50 PDT
Created attachment 131480 [details]
Interactive testcase
Comment 2 Simon Fraser (smfr) 2012-07-26 17:02:25 PDT
Created attachment 154792 [details]
Screenshot
Comment 3 Simon Fraser (smfr) 2012-07-28 20:02:55 PDT
This is proving hard to fix. I have a patch, but it causes clip rect assertions. If we break apart a single compositing layer into multiple layers, then a layer RenderLayer B can have a parent, RenderLayer A, that is not its stacking context. When computing clip rects for A, it acts as the clipping root. When computing clip rects for B, we walk up through A, but are using a different clipping root. So we hit assertions.
Comment 4 Radar WebKit Bug Importer 2012-07-29 17:33:28 PDT
<rdar://problem/11983250>
Comment 5 Simon Fraser (smfr) 2012-07-29 17:34:29 PDT
<rdar://problem/10719381>
Comment 6 Simon Fraser (smfr) 2012-07-29 17:36:34 PDT
Created attachment 155189 [details]
WIP patch
Comment 7 Simon Fraser (smfr) 2012-07-30 14:22:27 PDT
The clip rect assertion is present before this patch.