Closed
Bug 724502
Opened 13 years ago
Closed 13 years ago
UpdateTransformLayer and UpdateOpacityLayer change hints incorrectly merged by style change processing
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
mozilla13
People
(Reporter: roc, Assigned: roc)
Details
Attachments
(3 files, 1 obsolete file)
ReResolveStyleContext assumes, in general, that when we generate a style change list entry for a frame with a given hint, there is no need to generate style change list entries for descendant frames with the same hint.
This is wrong for UpdateTransformLayer and UpdateOpacityLayer and I think it explains a bug Nick Cameron showed me the other day.
Assignee | ||
Comment 1•13 years ago
|
||
Load the testcase. After you see that the lime DIV has faded a bit, click away to another window to force the page to be fully repainted. You'll see the yellow DIV suddenly snap to its correct rendering.
![]() |
||
Comment 2•13 years ago
|
||
We have two options here.
Option 1 is to add a clause to the code at the beginning of ReResolveStyleContext that handles this situation for the reflow flags to remove the layer flags from aMinChange.
Option 2 is to change processing of the layer hints to walk all the kids (like the repaint hint does, say).
I'm guessing #1 is better?
Comment 3•13 years ago
|
||
Hover over the yellow div to see the bug at the end of the transition
Assignee | ||
Comment 4•13 years ago
|
||
Assignee: nobody → roc
Attachment #594885 -
Flags: review?(matspal)
Assignee | ||
Comment 5•13 years ago
|
||
Sorry about that.
Attachment #594885 -
Attachment is obsolete: true
Attachment #594885 -
Flags: review?(matspal)
Attachment #594886 -
Flags: review?(matspal)
![]() |
||
Comment 6•13 years ago
|
||
Comment on attachment 594886 [details] [diff] [review]
correct patch
Add a comment about how those don't get automatically applied to descendants, and r=me
Attachment #594886 -
Flags: review?(matspal) → review+
Assignee | ||
Comment 7•13 years ago
|
||
Thanks. I'll wait for Mats to land his stuff before landing this.
Comment 8•13 years ago
|
||
FYI, I landed my stuff directly on mozilla-central so make sure it is merged first
if you want to land on mozilla-inbound.
Also, is there any situation where a child has opacity:inherit and the rule nodes
are shared so that nsStyleDisplay::CalcDifference isn't called, like we saw in
bug 723669.... Actually, never mind, I see that nsStyleDisplay has:
static bool ForceCompare() { return true; }
so that covers both UpdateTransformLayer and UpdateOpacityLayer since they are only
used by nsStyleDisplay::CalcDifference. Can we document this dependency somehow?
Assignee | ||
Comment 9•13 years ago
|
||
It is documented in nsStyleStruct.h:
Structs that can return a hint that doesn't guarantee that the
// change will be applied to all descendants must return true from
// ForceCompare(), so that we will make sure to compare those structs in
// nsStyleContext::CalcStyleDifference.
I'll document it in nsChangeHint.h as well.
Assignee | ||
Comment 10•13 years ago
|
||
Comment 11•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in
before you can comment on or make changes to this bug.
Description
•