Closed
Bug 1450189
Opened 7 years ago
Closed 7 years ago
Don't invalidate display items when a frame gets a new style context
Categories
(Core :: Web Painting, enhancement, P2)
Core
Web Painting
Tracking
()
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: mattwoodrow, Assigned: mattwoodrow)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
28.27 KB,
patch
|
mikokm
:
review+
|
Details | Diff | Splinter Review |
We currently invalidate all display items for a frame (and all descendants of that frame) whenever we get a new style context, even though the relevant rendering might not have changed (this happens frequently on gmail).
We invalidate display items, since the sometimes have raw pointers to style data, which will be dangling after we change style context.
Instead we can just hold a strong pointer to the style context, and if anything relevant changed then we'll get a call to InvalidateFrame() to trigger the display item invalidation.
Assignee | ||
Comment 1•7 years ago
|
||
Attachment #8963872 -
Flags: review?(mikokm)
Comment 2•7 years ago
|
||
Comment on attachment 8963872 [details] [diff] [review]
Don't invalidate display items when we get a new style context
Review of attachment 8963872 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM.
::: layout/painting/nsDisplayList.cpp
@@ +3678,5 @@
> if ((drawBackgroundColor && color != NS_RGBA(0,0,0,0)) ||
> aBuilder->IsForEventDelivery()) {
> Maybe<DisplayListClipState::AutoSaveRestore> clipState;
> nsRect bgColorRect = bgRect;
> + if (bgSC && !aBuilder->IsForEventDelivery()) {
There is a call bg->BottomLayer() below (and other calls as well) that might now be nullptr, if the background is themed.
Attachment #8963872 -
Flags: review?(mikokm) → review+
Pushed by mwoodrow@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/79da39e0fd79
Don't invalidate display items when we get a new style context. r=miko
Comment 4•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in
before you can comment on or make changes to this bug.
Description
•