mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 921731 - Part 5: Support eCSSUnit_Unset in nsRuleNode.cpp's SetFactor. r=bzbarsky
This commit is contained in:
parent
ae26d6be95
commit
6699cf7840
@ -1229,6 +1229,8 @@ SetDiscrete(const nsCSSValue& aValue, FieldT & aField,
|
|||||||
#define SETFCT_POSITIVE 0x01 // assert value is >= 0.0f
|
#define SETFCT_POSITIVE 0x01 // assert value is >= 0.0f
|
||||||
#define SETFCT_OPACITY 0x02 // clamp value to [0.0f .. 1.0f]
|
#define SETFCT_OPACITY 0x02 // clamp value to [0.0f .. 1.0f]
|
||||||
#define SETFCT_NONE 0x04 // allow _None (uses aInitialValue).
|
#define SETFCT_NONE 0x04 // allow _None (uses aInitialValue).
|
||||||
|
#define SETFCT_UNSET_INHERIT 0x00400000
|
||||||
|
#define SETFCT_UNSET_INITIAL 0x00800000
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SetFactor(const nsCSSValue& aValue, float& aField, bool& aCanStoreInRuleTree,
|
SetFactor(const nsCSSValue& aValue, float& aField, bool& aCanStoreInRuleTree,
|
||||||
@ -1269,6 +1271,18 @@ SetFactor(const nsCSSValue& aValue, float& aField, bool& aCanStoreInRuleTree,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case eCSSUnit_Unset:
|
||||||
|
if (aFlags & SETFCT_UNSET_INHERIT) {
|
||||||
|
aCanStoreInRuleTree = false;
|
||||||
|
aField = aParentValue;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (aFlags & SETFCT_UNSET_INITIAL) {
|
||||||
|
aField = aInitialValue;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user