WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 78186
Avoid compositing out-of-view fixed positioned elements
https://bugs.webkit.org/show_bug.cgi?id=78186
Summary
Avoid compositing out-of-view fixed positioned elements
Xianzhu Wang
Reported
2012-02-08 17:26:20 PST
Like in
http://techcrunch.com
, a out-of-viewport fixed positioned element with negative z-index makes the whole page composited, even the element is never visible, causing unnecessary layer compositings. Should check if the fixed element is visible when determining if it should be composited. This avoids the problem of excessive repaints which still needs to be investigated and resolved. Experiments on chromium-linux showed that with the checking, the number of layers of
http://techcrunch.com
reduced from about 100 to 0. Experiments on chromium-android showed the number of layers reduced from 31 (including 3 fullscreen layers) to only 5~6. (
http://techcrunch.com
returns different pages for chromium-linux and chromium-android)
Attachments
patch for preview (missing test)
(1.46 KB, patch)
2012-02-08 17:34 PST
,
Xianzhu Wang
no flags
Details
Formatted Diff
Diff
patch with layout test
(4.81 KB, patch)
2012-02-09 18:09 PST
,
Xianzhu Wang
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Xianzhu Wang
Comment 1
2012-02-08 17:34:12 PST
Created
attachment 126202
[details]
patch for preview (missing test)
James Robinson
Comment 2
2012-02-08 20:05:07 PST
Comment on
attachment 126202
[details]
patch for preview (missing test) This is a nice find. For testing, I'd recommend use the layerTreeAsText() hook to make sure that we aren't making GraphicsLayers that we don't need to.
Xianzhu Wang
Comment 3
2012-02-09 18:09:01 PST
Created
attachment 126418
[details]
patch with layout test
James Robinson
Comment 4
2012-02-09 18:12:02 PST
Comment on
attachment 126418
[details]
patch with layout test Great! R=me
WebKit Review Bot
Comment 5
2012-02-09 22:35:10 PST
Comment on
attachment 126418
[details]
patch with layout test Clearing flags on attachment: 126418 Committed
r107364
: <
http://trac.webkit.org/changeset/107364
>
WebKit Review Bot
Comment 6
2012-02-09 22:35:14 PST
All reviewed patches have been landed. Closing bug.
Xianzhu Wang
Comment 7
2012-02-17 15:35:11 PST
Changed title to be more accurate.
Simon Fraser (smfr)
Comment 8
2012-12-16 15:04:31 PST
There's a problem with this strategy, when combined with zooming;when zoomed in, we may consider a fixed element to be outside the viewport, and not composite it. However, zooming may bring that element back into the viewport, but if it doesn't have a layer yet, it won't be visible while zooming.
Xianzhu Wang
Comment 9
2012-12-17 12:10:33 PST
(In reply to
comment #8
)
> There's a problem with this strategy, when combined with zooming;when zoomed in, we may consider a fixed element to be outside the viewport, and not composite it. However, zooming may bring that element back into the viewport, but if it doesn't have a layer yet, it won't be visible while zooming.
Thanks for the finding. Filed
bug 105202
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug