Bug 1463589 - Remove reftests and correct rust formatting.
MozReview-Commit-ID: Ja9bEJxvPkT
deleted file mode 100644
--- a/layout/reftests/w3c-css/submitted/contain/contain-bad-parse-001-ref.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>CSS Reftest Reference</title>
- <link rel="author" title="Morgan Rae Reschenberg" href="mailto:mreschenberg@berkeley.edu">
- <style>
- body {
- margin: 0;
- }
- #a {
- width: 100px;
- height: 100px;
- background: blue;
- margin: 25px;
- padding: 25px;
- }
- </style>
-</head>
-<body>
- <div id="a"></div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/w3c-css/submitted/contain/contain-bad-parse-001.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>CSS Test: 'contain: nothing' parse test, no content manipulation.</title>
- <link rel="author" title="Morgan Rae Reschenberg" href="mailto:mreschenberg@berkeley.edu">
- <link rel="help" href="https://drafts.csswg.org/css-contain/#containment-size">
- <link rel="match" href="contain-bad-parse-001-ref.html">
- <style>
- body {
- margin: 0;
- }
- .root {
- contain: nothing;
- width: 100px;
- height: 100px;
- background: blue;
- margin: 25px;
- padding: 25px;
- }
- </style>
-</head>
-<body>
- <div class="root"></div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/w3c-css/submitted/contain/contain-content-parse-001-ref.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>CSS Reftest Reference</title>
- <link rel="author" title="Morgan Rae Reschenberg" href="mailto:mreschenberg@berkeley.edu">
- <style>
- body {
- margin: 0;
- }
- #a {
- width: 100px;
- height: 100px;
- background: red;
- margin: 25px;
- padding: 25px;
- }
- </style>
-</head>
-<body>
- <div id="a"></div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/w3c-css/submitted/contain/contain-content-parse-001.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>CSS Test: 'contain: content' parse test, no content manipulation.</title>
- <link rel="author" title="Morgan Rae Reschenberg" href="mailto:mreschenberg@berkeley.edu">
- <!--link rel="help" href="https://drafts.csswg.org/css-contain/#containment-size"-->
- <link rel="match" href="contain-content-parse-001-ref.html">
- <style>
- body {
- margin: 0;
- }
- .root {
- contain: content;
- width: 100px;
- height: 100px;
- background: red;
- margin: 25px;
- padding: 25px;
- }
- </style>
-</head>
-<body>
- <div class="root"></div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/w3c-css/submitted/contain/contain-size-parse-001-ref.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>CSS Reftest Reference</title>
- <link rel="author" title="Morgan Rae Reschenberg" href="mailto:mreschenberg@berkeley.edu">
- <style>
- body {
- margin: 0;
- }
- #a {
- width: 100px;
- height: 100px;
- background: blue;
- margin: 25px;
- padding: 25px;
- }
- </style>
-</head>
-<body>
- <div id="a"></div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/w3c-css/submitted/contain/contain-size-parse-001.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>CSS Test: 'contain: size' parse test, no content manipulation.</title>
- <link rel="author" title="Morgan Rae Reschenberg" href="mailto:mreschenberg@berkeley.edu">
- <link rel="help" href="https://drafts.csswg.org/css-contain/#containment-size">
- <link rel="match" href="contain-size-parse-001-ref.html">
- <style>
- body {
- margin: 0;
- }
- .root {
- contain: size;
- width: 100px;
- height: 100px;
- background: blue;
- margin: 25px;
- padding: 25px;
- }
- </style>
-</head>
-<body>
- <div class="root"></div>
-</body>
-</html>
--- a/layout/reftests/w3c-css/submitted/contain/reftest.list
+++ b/layout/reftests/w3c-css/submitted/contain/reftest.list
@@ -3,11 +3,9 @@ default-preferences pref(layout.css.cont
== contain-paint-clip-001.html contain-paint-clip-001-ref.html
== contain-paint-clip-002.html contain-paint-clip-002-ref.html
== contain-paint-clip-003.html contain-paint-clip-003-ref.html
== contain-paint-clip-004.html contain-paint-clip-004-ref.html
== contain-paint-clip-005.html contain-paint-clip-003-ref.html
== contain-paint-containing-block-absolute-001.html contain-paint-containing-block-absolute-001-ref.html
== contain-paint-containing-block-fixed-001.html contain-paint-containing-block-fixed-001-ref.html
== contain-paint-formatting-context-float-001.html contain-paint-formatting-context-float-001-ref.html
-== contain-paint-formatting-context-margin-001.html contain-paint-formatting-context-margin-001-ref.html
-== contain-content-parse-001.html contain-content-parse-001-ref.html
-== contain-size-parse-001.html contain-size-parse-001-ref.html
\ No newline at end of file
+== contain-paint-formatting-context-margin-001.html contain-paint-formatting-context-margin-001-ref.html
\ No newline at end of file
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -5049,17 +5049,17 @@ nsComputedDOMStyle::DoGetContain()
val->SetIdent(eCSSKeyword_strict);
} else if (mask & NS_STYLE_CONTAIN_CONTENT) {
NS_ASSERTION(mask == (NS_STYLE_CONTAIN_CONTENT | NS_STYLE_CONTAIN_CONTENT_BITS),
"contain: content should imply contain: layout style paint");
val->SetIdent(eCSSKeyword_content);
} else {
nsAutoString valueStr;
nsStyleUtil::AppendBitmaskCSSValue(nsCSSProps::kContainKTable,
- mask,
+ mask,
NS_STYLE_CONTAIN_SIZE, NS_STYLE_CONTAIN_PAINT,
valueStr);
val->SetString(valueStr);
}
return val.forget();
}
--- a/servo/components/style/properties/gecko.mako.rs
+++ b/servo/components/style/properties/gecko.mako.rs
@@ -3677,26 +3677,30 @@ fn static_assert() {
use gecko_bindings::structs::NS_STYLE_CONTAIN_ALL_BITS;
use gecko_bindings::structs::NS_STYLE_CONTAIN_CONTENT_BITS;
use properties::longhands::contain::{self, SpecifiedValue};
let mut servo_flags = contain::computed_value::T::empty();
let gecko_flags = self.gecko.mContain;
if gecko_flags & (NS_STYLE_CONTAIN_STRICT as u8) != 0 {
- debug_assert_eq!(gecko_flags & (NS_STYLE_CONTAIN_ALL_BITS as u8),
- NS_STYLE_CONTAIN_ALL_BITS as u8,
- "When strict is specified, ALL_BITS should be specified as well");
+ debug_assert_eq!(
+ gecko_flags & (NS_STYLE_CONTAIN_ALL_BITS as u8),
+ NS_STYLE_CONTAIN_ALL_BITS as u8,
+ "When strict is specified, ALL_BITS should be specified as well"
+ );
servo_flags.insert(SpecifiedValue::STRICT | SpecifiedValue::STRICT_BITS);
return servo_flags;
}
if gecko_flags & (NS_STYLE_CONTAIN_CONTENT as u8) != 0 {
- debug_assert_eq!(gecko_flags & (NS_STYLE_CONTAIN_CONTENT_BITS as u8),
- NS_STYLE_CONTAIN_CONTENT_BITS as u8,
- "When content is specified, CONTENT_BITS should be specified as well");
+ debug_assert_eq!(
+ gecko_flags & (NS_STYLE_CONTAIN_CONTENT_BITS as u8),
+ NS_STYLE_CONTAIN_CONTENT_BITS as u8,
+ "When content is specified, CONTENT_BITS should be specified as well"
+ );
servo_flags.insert(SpecifiedValue::CONTENT | SpecifiedValue::CONTENT_BITS);
return servo_flags;
}
if gecko_flags & (NS_STYLE_CONTAIN_LAYOUT as u8) != 0 {
servo_flags.insert(SpecifiedValue::LAYOUT);
}
if gecko_flags & (NS_STYLE_CONTAIN_STYLE as u8) != 0 {
servo_flags.insert(SpecifiedValue::STYLE);