Closed Bug 1366427 Opened 8 years ago Closed 8 years ago

stylo: Backdrop pseudo should not inherit.

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(1 file)

Right now ServoStyleSet ignores the aParentStyleContext argument arriving to ResolvePseudoElementStyle, assuming the pseudo should inherit from the element. This is completely wrong for ::backdrop, which should not inherit from anything. I'm adding restyling for ::backdrop in bug 1364871. I plan to fix the behavior of ::backdrop here.
Blocks: stylo
Comment on attachment 8869693 [details] Bug 1366427: Make backdrop not inherit from the parent element. https://reviewboard.mozilla.org/r/141268/#review144900 ::: servo/ports/geckolib/glue.rs:1185 (Diff revision 1) > - let base = styles.primary.values(); > + let base = if pseudo.inherits_from_parent() { > + styles.primary.values() > + } else { > + d.default_computed_values() > + }; Since the usual behaviour is to inherit from the parent, I think it might make sense to invert the function here, and have it be "inherits_from_default_styles" or something. Reading this code here, otherwise, it's not obvious why if inherits_from_parent() is false, that we should use the default computed values. Alternatively you could use an enum, but I think inheriting from the parent seems obvious enough to not need to be explicitly written.
Attachment #8869693 - Flags: review?(cam) → review+
Comment on attachment 8869693 [details] Bug 1366427: Make backdrop not inherit from the parent element. https://reviewboard.mozilla.org/r/141268/#review144900 > Since the usual behaviour is to inherit from the parent, I think it might make sense to invert the function here, and have it be "inherits_from_default_styles" or something. Reading this code here, otherwise, it's not obvious why if inherits_from_parent() is false, that we should use the default computed values. > > Alternatively you could use an enum, but I think inheriting from the parent seems obvious enough to not need to be explicitly written. Sounds good, will do :)
Emilio, did this land?
Flags: needinfo?(emilio+bugs)
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(emilio+bugs)
Resolution: --- → FIXED
Assignee: nobody → emilio
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: