diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index 39a40afd3525..348fe3a3df8e 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -4208,9 +4208,8 @@ var gCSSProperties = { prerequisites: { "display": "block", "contain": "none" }, subproperties: [ "overflow-x", "overflow-y" ], initial_values: [ "visible" ], - other_values: [ "auto", "scroll", "hidden", "-moz-hidden-unscrollable", "-moz-scrollbars-none", - "auto auto", "auto scroll", "hidden scroll", "auto hidden" ], - invalid_values: [ "-moz-hidden-unscrollable -moz-hidden-unscrollable", "-moz-hidden-unscrollable -moz-scrollbars-none" ] + other_values: [ "auto", "scroll", "hidden", "-moz-hidden-unscrollable", "-moz-scrollbars-none" ], + invalid_values: [] }, "overflow-x": { domProp: "overflowX", diff --git a/servo/components/style/properties/shorthand/box.mako.rs b/servo/components/style/properties/shorthand/box.mako.rs index 1bf868b1bd57..7f2fe128eb2f 100644 --- a/servo/components/style/properties/shorthand/box.mako.rs +++ b/servo/components/style/properties/shorthand/box.mako.rs @@ -4,11 +4,8 @@ <%namespace name="helpers" file="/helpers.mako.rs" /> -<%helpers:shorthand - name="overflow" - sub_properties="overflow-x overflow-y" - spec="https://drafts.csswg.org/css-overflow/#propdef-overflow" -> +<%helpers:shorthand name="overflow" sub_properties="overflow-x overflow-y" + spec="https://drafts.csswg.org/css-overflow/#propdef-overflow"> use properties::longhands::overflow_x::parse as parse_overflow; % if product == "gecko": use properties::longhands::overflow_x::SpecifiedValue; @@ -45,23 +42,20 @@ return moz_kw_found } % endif - let overflow_x = parse_overflow(context, input)?; - let overflow_y = - input.try(|i| parse_overflow(context, i)).unwrap_or(overflow_x); + let overflow = parse_overflow(context, input)?; Ok(expanded! { - overflow_x: overflow_x, - overflow_y: overflow_y, + overflow_x: overflow, + overflow_y: overflow, }) } impl<'a> ToCss for LonghandsToSerialize<'a> { fn to_css(&self, dest: &mut CssWriter) -> fmt::Result where W: fmt::Write { - self.overflow_x.to_css(dest)?; - if self.overflow_x != self.overflow_y { - dest.write_char(' ')?; - self.overflow_y.to_css(dest)?; + if self.overflow_x == self.overflow_y { + self.overflow_x.to_css(dest) + } else { + Ok(()) } - Ok(()) } } diff --git a/testing/web-platform/meta/MANIFEST.json b/testing/web-platform/meta/MANIFEST.json index 9f09bc2bcbe1..5b499fa10a14 100644 --- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -313623,12 +313623,6 @@ {} ] ], - "css/css-overflow/overflow-shorthand-001.html": [ - [ - "/css/css-overflow/overflow-shorthand-001.html", - {} - ] - ], "css/css-position/position-sticky-bottom.html": [ [ "/css/css-position/position-sticky-bottom.html", @@ -503536,10 +503530,6 @@ "f51bc673da28b0471018cdf945b4449ab00ce717", "reftest" ], - "css/css-overflow/overflow-shorthand-001.html": [ - "6409ee499d3e853d8f4933f1b532e12ed9ab406b", - "testharness" - ], "css/css-overflow/reference/input-scrollable-region-001-ref.html": [ "31e24bb1a2cb6f42703cc05e055fcb345c770a22", "support" diff --git a/testing/web-platform/tests/css/css-overflow/overflow-shorthand-001.html b/testing/web-platform/tests/css/css-overflow/overflow-shorthand-001.html deleted file mode 100644 index 864d20fd6366..000000000000 --- a/testing/web-platform/tests/css/css-overflow/overflow-shorthand-001.html +++ /dev/null @@ -1,37 +0,0 @@ - - -CSS Overflow Test: Overflow longhand accepts two values - - - - -
-