Closed
Bug 1366427
Opened 8 years ago
Closed 8 years ago
stylo: Backdrop pseudo should not inherit.
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
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.
Comment hidden (mozreview-request) |
Comment 2•8 years ago
|
||
mozreview-review |
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+
Assignee | ||
Comment 3•8 years ago
|
||
mozreview-review-reply |
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 :)
Assignee | ||
Comment 5•8 years ago
|
||
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(emilio+bugs)
Resolution: --- → FIXED
Updated•6 years ago
|
Assignee: nobody → emilio
You need to log in
before you can comment on or make changes to this bug.
Description
•