Closed Bug 933044 Opened 11 years ago Closed 11 years ago

AutoAncestorPusher should push style scopes regardless of whether we have an ancestor filter

Categories

(Core :: CSS Parsing and Computation, defect, P4)

defect

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: heycam, Assigned: heycam)

Details

(Whiteboard: [qa-])

Attachments

(1 file)

There are some uses of AutoAncestorPusher, such as this one:

  https://hg.mozilla.org/mozilla-central/annotate/tip/layout/base/nsCSSFrameConstructor.cpp#l3569

which does the ancestor pushing only if there is an ancestor filter.  But I think we still want to push the style scope element.
Summary: AutoAncestorPusher should be used regardless of whether we have an ancestor filter → AutoAncestorPusher should push style scopes regardless of whether we have an ancestor filter
Priority: -- → P3
Priority: P3 → P4
Attached patch patchSplinter Review
This makes AutoAncestorPusher no longer take a boolean that says whether to push or not.  Instead, we call separate functions on the AutoAncestorPusher to either push the ancestor and the style scope, or only the style scope.  If we don't want to push anything, we can either pass nullptr as the aElement (as we can now), or just not call Push* on the object.

All the uses of AutoAncestorPusher have been updated to push the style scope element when we were going to skip pushing altogether, due to not having an ancestor filter on the TreeMatchContext.
Assignee: nobody → cam
Status: NEW → UNCONFIRMED
Ever confirmed: false
Attachment #825684 - Flags: review?(bzbarsky)
Mats this might affect your display:contents patches.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment on attachment 825684 [details] [diff] [review]
patch

r=me.  I'm not sure what I think of the two-stage init thing, but I agree that trying to do all that in the ctor would just make the code unreadable...
Attachment #825684 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/mozilla-central/rev/7d219bb72548
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: