This is a minor bug in nsRuleNode::HasAuthorSpecifiedRules that I noticed while porting its code to Stylo (bug 1349651). nsRuleNode.cpp contains 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. However, the last sentence (and the associated code) became incorrect when bug 721750 added 'text-shadow' to the list of "properties we care about." It's probably rare for this to affect any users. Because Gecko's UA stylesheets don't contain any UA-important declarations that set 'text-shadow', this bug is only triggered if there is a user stylesheet with a !important declaration that sets 'text-shadow'. The effect of the bug is that the wrong 'text-shadow' style could be applied to selected text.
Comment on attachment 8917642 [details] Bug 1363088 - Remove text-shadow handling from HasAuthorSpecifiedRules. https://reviewboard.mozilla.org/r/188572/#review193830 ::: layout/style/nsRuleNode.cpp:10514 (Diff revision 1) > - > // properties in the SIDS, whether or not we care about them > size_t nprops = 0, > - backgroundOffset, borderOffset, paddingOffset, textShadowOffset; > + backgroundOffset, borderOffset, paddingOffset; > > // We put the reset properties the start of the nsCSSValue array.... Can drop this comment.
Attachment #8917642 - Flags: review?(cam) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/8189460a08a7 Remove text-shadow handling from HasAuthorSpecifiedRules. r=heycam
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox58: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.