Bug 1355674 - stylo: Use prefixed values in ExtremumLength ; r?xidorn
MozReview-Commit-ID: KEPFAngPNkh
--- a/layout/reftests/box-properties/reftest-stylo.list
+++ b/layout/reftests/box-properties/reftest-stylo.list
@@ -5,17 +5,17 @@ fails == outline-radius-percent-1.html o
== max-width-1.html max-width-1.html
== max-height-1.html max-height-1.html
fails == width-special-values-block.html width-special-values-block.html
fails == width-special-values-float.html width-special-values-float.html
fails == width-special-values-image-block.html width-special-values-image-block.html
fails == width-special-values-image.html width-special-values-image.html
fails == width-special-values-block-intrinsic.html width-special-values-block-intrinsic.html
fails == width-special-values-float-intrinsic.html width-special-values-float-intrinsic.html
-fails == minmax-width-special-values-block-intrinsic.html minmax-width-special-values-block-intrinsic.html
+== minmax-width-special-values-block-intrinsic.html minmax-width-special-values-block-intrinsic.html
fails == width-special-values-cell-auto.html width-special-values-cell-auto.html
fails == width-special-values-cell-fixed.html width-special-values-cell-fixed.html
fails == box-sizing-1.html box-sizing-1.html
fails == box-sizing-2.html box-sizing-2.html
fails == box-sizing-3.html box-sizing-3.html
fails == box-sizing-4.html box-sizing-4.html
== box-sizing-minmax-height.html box-sizing-minmax-height.html
== box-sizing-minmax-width.html box-sizing-minmax-width.html
--- a/layout/reftests/bugs/reftest-stylo.list
+++ b/layout/reftests/bugs/reftest-stylo.list
@@ -887,17 +887,17 @@ fails == 403519-1.html 403519-1.html
== 403656-4.html 403656-4.html
== 403656-5.html 403656-5.html
== 403657-1.html 403657-1.html
== 403733-1.html 403733-1.html
fails == 403962-1.xhtml 403962-1.xhtml # Bug 1290276
== 404030-1.html 404030-1.html
== 404030-1-notref.html 404030-1-notref.html
== 404030-1-notref2.html 404030-1-notref2.html
-fails == 404123-1.html 404123-1.html
+== 404123-1.html 404123-1.html
fails == 404123-2.html 404123-2.html
== 404123-3.html 404123-3.html
# may fail "randomly" on OS X, doesn't seem to be rendering usefully anyhow - bug 602469
random-if(cocoaWidget) HTTP(..) == 404149-1.xul 404149-1.xul
== 404180-1.html 404180-1.html
== 404301-1.html 404301-1.html
== 404309-1a.html 404309-1a.html
== 404309-1b.html 404309-1b.html
@@ -1133,17 +1133,17 @@ fails == 430412-1.html 430412-1.html
== 430813-1.html 430813-1.html
== 430813-2.html 430813-2.html
== 430813-3.html 430813-3.html
== 431341-1.html 431341-1.html
== 431341-2.html 431341-2.html
== 431520-1.html 431520-1.html
== 431948-1.html 431948-1.html
== 433640-1.html 433640-1.html
-fails == 433700.html 433700.html
+== 433700.html 433700.html
== 436356-1.html 436356-1.html
== 436356-2.html 436356-2.html
== 438537-1.html 438537-1.html
== 438981-1.xhtml 438981-1.xhtml
== 438987-1.html 438987-1.html
fuzzy-if(skiaContent,1,3280) == 438987-2a.html 438987-2a.html
fuzzy-if(skiaContent,1,3280) == 438987-2b.html 438987-2b.html
fuzzy-if(skiaContent,1,3280) == 438987-2c.html 438987-2c.html
--- a/layout/reftests/forms/fieldset/reftest-stylo.list
+++ b/layout/reftests/forms/fieldset/reftest-stylo.list
@@ -12,18 +12,18 @@ fails == fieldset-overflow-auto-1.html f
== relpos-legend-3.html relpos-legend-3.html
== relpos-legend-4.html relpos-legend-4.html
fails == sticky-legend-1.html sticky-legend-1.html
fuzzy-if(skiaContent,1,40768) == abs-pos-child-sizing.html abs-pos-child-sizing.html
== overflow-hidden.html overflow-hidden.html
== legend-rtl.html legend-rtl.html # Bug 1340696
fails == fieldset-grid-001.html fieldset-grid-001.html
fails == fieldset-flexbox-001.html fieldset-flexbox-001.html
-fails == fieldset-min-width-1a.html fieldset-min-width-1a.html
-fails == fieldset-min-width-1b.html fieldset-min-width-1b.html
+== fieldset-min-width-1a.html fieldset-min-width-1a.html
+== fieldset-min-width-1b.html fieldset-min-width-1b.html
== fieldset-min-width-2a.html fieldset-min-width-2a.html
== fieldset-min-width-2b.html fieldset-min-width-2b.html
== legend-overlapping-right-border-1.html legend-overlapping-right-border-1.html # Bug 1340696
fails == fieldset-border-image-1a.html fieldset-border-image-1a.html
fails == fieldset-border-image-1b.html fieldset-border-image-1b.html
fails == fieldset-border-image-2a.html fieldset-border-image-2a.html
fails == fieldset-border-image-2b.html fieldset-border-image-2b.html
== dynamic-text-indent.html dynamic-text-indent.html
--- a/layout/style/test/stylo-failures.md
+++ b/layout/style/test/stylo-failures.md
@@ -66,17 +66,17 @@ to mochitest command.
* test_bug221428.html [1]
* test_css_eof_handling.html: also relies on \@-moz-document [1]
* @keyframes
* test_keyframes_rules.html [1]
* test_rules_out_of_sheets.html [1]
* test_bug887741_at-rules_in_declaration_lists.html `rules[2]` [1]
* @support
* test_supports_rules.html [1]
-* test_box_size_keywords.html: moz-prefixed intrinsic size keyword value [64]
+* test_box_size_keywords.html: moz-prefixed intrinsic size keyword value [16]
* test_bug357614.html: case-insensitivity for old attrs in attr selector servo/servo#15006 [2]
* mapped attribute not supported
* test_html_attribute_computed_values.html: also list-style-type [8]
* test_bug387615.html: servo/servo#15006 [1]
* test_bug397427.html: @import issue bug 1331291 and CSSOM support of @import [1]
* console support:
* test_bug413958.html `monitorConsole` [3]
* test_parser_diagnostics_unprintables.html [550]
@@ -256,20 +256,20 @@ to mochitest command.
* ... `-moz-repeating-` [298]
* webkit-prefixed gradient functions servo/servo#15441
* test_value_storage.html `-webkit-gradient` [225]
* ... `-webkit-linear-gradient` [40]
* ... `-webkit-radial-gradient` [105]
* ... `-webkit-repeating-` [35]
* moz-prefixed intrinsic width values
* test_flexbox_flex_shorthand.html `-moz-fit-content` [4]
- * test_value_storage.html `-moz-max-content` [52]
- * ... `-moz-min-content` [12]
- * ... `-moz-fit-content` [12]
- * ... `-moz-available` [10]
+ * test_value_storage.html `-moz-max-content` [46]
+ * ... `-moz-min-content` [6]
+ * ... `-moz-fit-content` [6]
+ * ... `-moz-available` [4]
* -moz-element() function for <image> servo/servo#15443
* test_value_storage.html `-moz-element` [49]
* -moz-anchor-decoration value on text-decoration
* test_value_storage.html `-moz-anchor-decoration` [10]
* several prefixed values in cursor property
* test_value_storage.html `cursor` [4]
* moz-prefixed values of overflow shorthand bug 1330888
* test_bug319381.html [8]
--- a/servo/components/style/properties/longhand/position.mako.rs
+++ b/servo/components/style/properties/longhand/position.mako.rs
@@ -196,17 +196,24 @@
pub struct SpecifiedValue(${MinMax}Length);
#[inline]
pub fn get_initial_value() -> computed_value::T {
use values::computed::${MinMax}Length;
${MinMax}Length::${initial}
}
fn parse(context: &ParserContext, input: &mut Parser) -> Result<SpecifiedValue, ()> {
- ${MinMax}Length::parse(context, input).map(SpecifiedValue)
+ let ret = ${MinMax}Length::parse(context, input);
+ // Keyword values don't make sense in the block direction; don't parse them
+ % if "block" in size:
+ if let Ok(${MinMax}Length::ExtremumLength(..)) = ret {
+ return Err(())
+ }
+ % endif
+ ret.map(SpecifiedValue)
}
impl ToCss for SpecifiedValue {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
self.0.to_css(dest)
}
}
--- a/servo/components/style/values/mod.rs
+++ b/servo/components/style/values/mod.rs
@@ -187,12 +187,12 @@ impl<A: ToComputedValue, B: ToComputedVa
Either::Second(ref a) => Either::Second(ToComputedValue::from_computed_value(a)),
}
}
}
// A type for possible values for min- and max- flavors of width,
// height, block-size, and inline-size.
define_css_keyword_enum!(ExtremumLength:
- "max-content" => MaxContent,
- "min-content" => MinContent,
- "fit-content" => FitContent,
- "fill-available" => FillAvailable);
+ "-moz-max-content" => MaxContent,
+ "-moz-min-content" => MinContent,
+ "-moz-fit-content" => FitContent,
+ "-moz-available" => FillAvailable);