diff --git a/layout/reftests/svg/filters/css-filters/blur-calc-negative-ref.html b/layout/reftests/svg/filters/css-filters/blur-calc-negative-ref.html new file mode 100644 index 000000000000..fc260c2e2232 --- /dev/null +++ b/layout/reftests/svg/filters/css-filters/blur-calc-negative-ref.html @@ -0,0 +1,27 @@ + + + +
+You should see a green square.
+ + + diff --git a/layout/reftests/svg/filters/css-filters/blur-calc-negative.html b/layout/reftests/svg/filters/css-filters/blur-calc-negative.html new file mode 100644 index 000000000000..694c6cfc97c3 --- /dev/null +++ b/layout/reftests/svg/filters/css-filters/blur-calc-negative.html @@ -0,0 +1,28 @@ + + + + +You should see a green square.
+ + + diff --git a/layout/reftests/svg/filters/css-filters/blur-calc-ref.html b/layout/reftests/svg/filters/css-filters/blur-calc-ref.html new file mode 100644 index 000000000000..8f3567274931 --- /dev/null +++ b/layout/reftests/svg/filters/css-filters/blur-calc-ref.html @@ -0,0 +1,23 @@ + + + + +You should see a blurred green square.
+ + + diff --git a/layout/reftests/svg/filters/css-filters/blur-calc.html b/layout/reftests/svg/filters/css-filters/blur-calc.html new file mode 100644 index 000000000000..e4dc87e7d75d --- /dev/null +++ b/layout/reftests/svg/filters/css-filters/blur-calc.html @@ -0,0 +1,28 @@ + + + + +You should see a blurred green square.
+ + + diff --git a/layout/reftests/svg/filters/css-filters/reftest.list b/layout/reftests/svg/filters/css-filters/reftest.list index b5bc0ec94af6..b18ba158fcca 100644 --- a/layout/reftests/svg/filters/css-filters/reftest.list +++ b/layout/reftests/svg/filters/css-filters/reftest.list @@ -5,6 +5,8 @@ default-preferences pref(layout.css.filters.enabled,true) == blur.html blur-ref.html == blur.svg blur-ref.svg +== blur-calc.html blur-calc-ref.html +== blur-calc-negative.html blur-calc-negative-ref.html == blur-zero-radius.html blur-zero-radius-ref.html == blur-zoomed-page.html blur-zoomed-page-ref.html == brightness.html brightness-ref.html diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index 547b067db9de..c8e76dda427e 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -8708,7 +8708,9 @@ nsRuleNode::SetStyleFilterToCSSValue(nsStyleFilter* aStyleFilter, int32_t mask = SETCOORD_PERCENT | SETCOORD_FACTOR; if (type == NS_STYLE_FILTER_BLUR) { - mask = SETCOORD_LENGTH | SETCOORD_STORE_CALC; + mask = SETCOORD_LENGTH | + SETCOORD_CALC_LENGTH_ONLY | + SETCOORD_CALC_CLAMP_NONNEGATIVE; } else if (type == NS_STYLE_FILTER_HUE_ROTATE) { mask = SETCOORD_ANGLE; }