Closed Bug 1077849 Opened 5 years ago Closed 5 years ago

Use eRestyle_ForceDescendants for all cases of rebuilding the rule tree

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: dbaron, Assigned: dbaron)

Details

Attachments

(1 file)

No description provided.
Bug 931668 added the eRestyle_ForceDescendants case for all cases that
go through RebuildAllStyleData, but there is another case that calls
DoRebuildAllStyleData directly, and we should cover that too.

This is needed because when we're rebuilding the rule tree, we need to
create new style contexts for all frames.

I don't know of any bugs caused by this, but it seems worth fixing.
Attachment #8500020 - Flags: review?(cam)
Comment on attachment 8500020 [details] [diff] [review]
Use eRestyle_ForceDescendants for all cases of rebuilding the rule tree

Review of attachment 8500020 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/base/RestyleManager.cpp
@@ +1483,5 @@
>  
> +  aRestyleHint = aRestyleHint | eRestyle_ForceDescendants;
> +
> +  if (!(aRestyleHint & eRestyle_Subtree) &&
> +      (aRestyleHint & ~(eRestyle_Force | eRestyle_ForceDescendants))) {

Why do we look for eRestyle_Force as well?  Is it something like: the primary frame is the child of the root frame, so if we force restyle the root frame we will get to the primary frame?
(In reply to Cameron McCormack (:heycam) (away October 6 - November 5) from comment #2)
> > +  aRestyleHint = aRestyleHint | eRestyle_ForceDescendants;
> > +
> > +  if (!(aRestyleHint & eRestyle_Subtree) &&
> > +      (aRestyleHint & ~(eRestyle_Force | eRestyle_ForceDescendants))) {
> 
> Why do we look for eRestyle_Force as well?  Is it something like: the
> primary frame is the child of the root frame, so if we force restyle the
> root frame we will get to the primary frame?

I'm removing eRestyle_Force because I've explicitly added eRestyle_ForceDescendants above, so I only care about there being a hint other than eRestyle_Subtree, but not counting Force or ForceDescendants.  The question I'm asking is "is there a hint other than eRestyle_Subtree, excluding Force/ForceDescendants".
Attachment #8500020 - Flags: review?(cam) → review+
https://hg.mozilla.org/mozilla-central/rev/41ce29f771b2
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.