Closed
Bug 1382806
Opened 7 years ago
Closed 7 years ago
stylo: need a way to implement the "inherit from two different things" behavior for ::first-line
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
For first-line kids, inheritance can happen either from the first-line itself or from its parent block, depending on the property. Gecko does this by checking the parent style context pseudo and if it's ::first-line walking up to its parent to inherit from, on a per-struct basis: inherit structs inherit directly, while reset structs inherit from the block. But servo doesn't have either pseudos or parents on ComputedValues or ComputedValuesInner. So for servo we need an API that takes a _pair_ of ComputedValues (one for inheriting reset structs, one for inheriting inherit structs) and a given rulenode, however it's provided (e.g. via a third existing ComputedValues) and hands back the right thing.
Comment 1•7 years ago
|
||
Note that for this stuff you probably don't want to look at ComputedValues, but to StyleBuilder. There's a pseudo there, but there's no "nearest block style".
Assignee | ||
Comment 2•7 years ago
|
||
The pseudo in StyleBuilder is no good here. I need to know whether the thing I'm inheriting from is a first-line, not whether the thing I'm computing is. Put another way, given this: <style> div { border: 1px solid black; color: red; } div::first-line { color: green; } span { border: inherit; color: inherit } </style> <div><span>text</span</div> when computing a style for the _span_ I need to end up with green color and 1px solid black border.
Assignee | ||
Comment 3•7 years ago
|
||
https://hg.mozilla.org/integration/autoland/rev/d9e5fd58d089cbf9504cdd510d8a7fb31a8e46ea
Comment 4•7 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d9e5fd58d089 - landed 6 hours ago.
Assignee: nobody → bzbarsky
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Assignee | ||
Comment 5•7 years ago
|
||
Hmm. I tried to make sure the bug# was in the commit message there... I wonder why that didn't auto-close this bug when merging.
Flags: needinfo?(ryanvm)
Comment 6•7 years ago
|
||
Bugherder sees stylo commits as merge commits and ignores them as such.
Flags: needinfo?(ryanvm)
Assignee | ||
Comment 7•7 years ago
|
||
Ugh. I wonder whether we can do something about that.... this manual annotation and resolution thing is pretty annoying. :(
You need to log in
before you can comment on or make changes to this bug.
Description
•