diff options
author | athenian200 <athenian200@outlook.com> | 2020-09-17 16:01:38 -0500 |
---|---|---|
committer | athenian200 <athenian200@outlook.com> | 2020-09-17 16:01:38 -0500 |
commit | b5c9f8e24e6ce368532f893fbd9a517b79096839 (patch) | |
tree | 103df6df754ae5d6dc93a432aeb54254777834b1 /layout/style/nsCSSPropList.h | |
parent | 51764ac7228e723054bf304a381cc83d9067f10a (diff) | |
download | uxp-b5c9f8e24e6ce368532f893fbd9a517b79096839.tar.gz |
Issue #1647 - Part 2: Implement VARIANT_OPACITY to correctly serialize.
Even though percentages are already treated as floats internally by the style system for computation purposes, you have to go out of your way to stop them from being read back out as percentages. What I do here amounts to storing the percentage token in the "wrong" container, the one normally used for floats. This allows a value that was read in as a percentage to be read back out as something else, which is normally prevented by the design of the style system.
Diffstat (limited to 'layout/style/nsCSSPropList.h')
-rw-r--r-- | layout/style/nsCSSPropList.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/layout/style/nsCSSPropList.h b/layout/style/nsCSSPropList.h index 66e22551e2..3873e9d35b 100644 --- a/layout/style/nsCSSPropList.h +++ b/layout/style/nsCSSPropList.h @@ -1690,7 +1690,7 @@ CSS_PROP_SVG( FillOpacity, CSS_PROPERTY_PARSE_VALUE, "", - VARIANT_HPN | VARIANT_OPENTYPE_SVG_KEYWORD, + VARIANT_INHERIT | VARIANT_OPACITY | VARIANT_OPENTYPE_SVG_KEYWORD, kContextOpacityKTable, offsetof(nsStyleSVG, mFillOpacity), eStyleAnimType_float) @@ -1828,7 +1828,7 @@ CSS_PROP_SVGRESET( FloodOpacity, CSS_PROPERTY_PARSE_VALUE, "", - VARIANT_HPN, + VARIANT_INHERIT | VARIANT_OPACITY, nullptr, offsetof(nsStyleSVGReset, mFloodOpacity), eStyleAnimType_float) @@ -3057,7 +3057,7 @@ CSS_PROP_EFFECTS( CSS_PROPERTY_CAN_ANIMATE_ON_COMPOSITOR | CSS_PROPERTY_CREATES_STACKING_CONTEXT, "", - VARIANT_HPN, + VARIANT_INHERIT | VARIANT_OPACITY, nullptr, offsetof(nsStyleEffects, mOpacity), eStyleAnimType_float) @@ -3748,7 +3748,7 @@ CSS_PROP_SVGRESET( StopOpacity, CSS_PROPERTY_PARSE_VALUE, "", - VARIANT_HPN, + VARIANT_INHERIT | VARIANT_OPACITY, nullptr, offsetof(nsStyleSVGReset, mStopOpacity), eStyleAnimType_float) @@ -3823,7 +3823,7 @@ CSS_PROP_SVG( StrokeOpacity, CSS_PROPERTY_PARSE_VALUE, "", - VARIANT_HPN | VARIANT_OPENTYPE_SVG_KEYWORD, + VARIANT_INHERIT | VARIANT_OPACITY | VARIANT_OPENTYPE_SVG_KEYWORD, kContextOpacityKTable, offsetof(nsStyleSVG, mStrokeOpacity), eStyleAnimType_float) |