Closed
Bug 921713
Opened 11 years ago
Closed 3 years ago
nsRuleNode::HasAuthorSpecifiedRules should handle inherited properties differently?
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: heycam, Unassigned)
Details
Attachments
(1 file)
2.43 KB,
patch
|
Details | Diff | Splinter Review |
In nsRuleNode::HasAuthorSpecifiedRules there is this comment: // We need to be careful not to count styles covered up by user-important or // UA-important declarations. But we do want to catch explicit inherit // styling in those and check our parent style context to see whether we have // user styling for those properties. Note that we don't care here about // inheritance due to lack of a specified value, since all the properties we // care about are reset properties. text-shadow is one of the properties we look at now, though, after bug 721750, and that's an inherited property. Is there something in the loop below that that we need to change to handle the inherited property? Otherwise, might it be possible that HasAuthorSpecifiedRules(NS_AUTHOR_SPECIFIED_TEXT_SHADOW) returns false when it should return true, if it finds a eCSSUnit_Null value for text-shadow? This might only ever come up if we had say: div { text-shadow: 2px 2px 0 red; } span { letter-spacing: inherit; } in an author or UA style sheet, and then with this content: <div><span>select me</span></div> the selected text should paint with a text shadow but wouldn't.
Reporter | ||
Comment 1•11 years ago
|
||
Something like this?
The original use of HasAuthorSpecifiedRules was to decide whether to disable native theme. What does the current set of uses look like, especially for the callers that care about text-shadow?
Flags: needinfo?(cam)
Reporter | ||
Comment 3•11 years ago
|
||
So the only use of HasAuthorSpecifiedRules that cares about text-shadow is here: https://mxr.mozilla.org/mozilla-central/source/layout/generic/nsTextFrame.cpp#3590 That's not to disable any native theming, but to allow a ::-moz-selection rule that doesn't have a text-shadow declaration to not clobber any text-shadow specified on the element without that pseudo.
Flags: needinfo?(cam) → needinfo?(dbaron)
Comment 4•5 years ago
|
||
Just notice this bug on my triage monitor. Do we still need this because we don't have nsRuleNode
now?
Comment 5•5 years ago
|
||
Reporter | ||
Comment 6•3 years ago
|
||
Emilio, I assume there is nothing to be fixed in the new code and this bug can be closed?
Flags: needinfo?(dbaron) → needinfo?(emilio)
Reporter | ||
Updated•3 years ago
|
Assignee: cam → nobody
Status: ASSIGNED → NEW
Comment 7•3 years ago
|
||
Yeah, I think so.
Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(emilio)
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•