mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 921731 - Part 7: Treat "unset" on inherited properties like "inherit" in nsRuleNode::HasAuthorSpecifiedRules. r=bzbarsky
This commit is contained in:
parent
8058e5a031
commit
f3b8113210
@ -8151,6 +8151,8 @@ nsRuleNode::HasAuthorSpecifiedRules(nsStyleContext* aStyleContext,
|
||||
size_t nprops = 0,
|
||||
backgroundOffset, borderOffset, paddingOffset, textShadowOffset;
|
||||
|
||||
// We put the reset properties the start of the nsCSSValue array....
|
||||
|
||||
if (ruleTypeMask & NS_AUTHOR_SPECIFIED_BACKGROUND) {
|
||||
backgroundOffset = nprops;
|
||||
nprops += nsCSSProps::PropertyCountInStruct(eStyleStruct_Background);
|
||||
@ -8166,6 +8168,9 @@ nsRuleNode::HasAuthorSpecifiedRules(nsStyleContext* aStyleContext,
|
||||
nprops += nsCSSProps::PropertyCountInStruct(eStyleStruct_Padding);
|
||||
}
|
||||
|
||||
// ...and the inherited properties at the end of the array.
|
||||
size_t inheritedOffset = nprops;
|
||||
|
||||
if (ruleTypeMask & NS_AUTHOR_SPECIFIED_TEXT_SHADOW) {
|
||||
textShadowOffset = nprops;
|
||||
nprops += nsCSSProps::PropertyCountInStruct(eStyleStruct_Text);
|
||||
@ -8312,7 +8317,8 @@ nsRuleNode::HasAuthorSpecifiedRules(nsStyleContext* aStyleContext,
|
||||
if (unit != eCSSUnit_Null &&
|
||||
unit != eCSSUnit_Dummy &&
|
||||
unit != eCSSUnit_DummyInherit) {
|
||||
if (unit == eCSSUnit_Inherit) {
|
||||
if (unit == eCSSUnit_Inherit ||
|
||||
(i >= inheritedOffset && unit == eCSSUnit_Unset)) {
|
||||
haveExplicitUAInherit = true;
|
||||
values[i]->SetDummyInheritValue();
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user