Bug 1463589 - Add support for contain:size and contain:content in parser r?emilio draft
authorMorgan Rae Reschenberg <mreschenberg@mozilla.com>
Fri, 25 May 2018 13:00:51 -0700
changeset 800086 208fe2e632fb9005d7fe043c1d12c813d1075a6f
parent 800085 174a717de4fc0b3e2e8ba24947355e62091a4c32
push id111265
push userbmo:mreschenberg@berkeley.edu
push dateFri, 25 May 2018 21:01:03 +0000
reviewersemilio
bugs1463589
milestone62.0a1
Bug 1463589 - Add support for contain:size and contain:content in parser r?emilio MozReview-Commit-ID: D01nHLI0l4F
.lldbinit
layout/reftests/w3c-css/submitted/contain/contain-bad-parse-001-ref.html
layout/reftests/w3c-css/submitted/contain/contain-bad-parse-001.html
layout/reftests/w3c-css/submitted/contain/contain-content-parse-001-ref.html
layout/reftests/w3c-css/submitted/contain/contain-content-parse-001.html
layout/reftests/w3c-css/submitted/contain/contain-size-parse-001-ref.html
layout/reftests/w3c-css/submitted/contain/contain-size-parse-001.html
layout/reftests/w3c-css/submitted/contain/reftest.list
layout/style/test/test_value_computation.html
--- a/.lldbinit
+++ b/.lldbinit
@@ -8,17 +8,17 @@
 # Import the module that defines complex Gecko debugging commands.  This assumes
 # you are either running lldb from the top level source directory, the objdir,
 # or the dist/bin directory.  (.lldbinit files in the objdir and dist/bin set
 # topsrcdir appropriately.)
 script topsrcdir = topsrcdir if locals().has_key("topsrcdir") else os.getcwd(); sys.path.append(os.path.join(topsrcdir, "third_party/python/lldbutils")); import lldbutils; lldbutils.init()
 
 # Mozilla's use of UNIFIED_SOURCES to include multiple source files into a
 # single compiled file breaks lldb breakpoint setting. This works around that.
-# See http://lldb.llvm.org/troubleshooting.html for more info.
+# See http://lldb.llvm.org/troubleshooting.html for more.
 settings set target.inline-breakpoint-strategy always
 
 # Show the dynamic type of an object when using "expr".  This, for example,
 # will show a variable declared as "nsIFrame *" that points to an nsBlockFrame
 # object as being of type "nsBlockFrame *" rather than "nsIFrame *".
 settings set target.prefer-dynamic-value run-target
 
 # Show the string value in atoms.
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/contain/contain-bad-parse-001-ref.html
@@ -0,0 +1,23 @@
+<!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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/contain/contain-bad-parse-001.html
@@ -0,0 +1,26 @@
+<!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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/contain/contain-content-parse-001-ref.html
@@ -0,0 +1,23 @@
+<!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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/contain/contain-content-parse-001.html
@@ -0,0 +1,26 @@
+<!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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/contain/contain-size-parse-001-ref.html
@@ -0,0 +1,23 @@
+<!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>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/contain/contain-size-parse-001.html
@@ -0,0 +1,26 @@
+<!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
@@ -4,8 +4,10 @@ default-preferences pref(layout.css.cont
 == 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
--- a/layout/style/test/test_value_computation.html
+++ b/layout/style/test/test_value_computation.html
@@ -163,16 +163,17 @@ function test_value(property, val, is_in
   // means we'll have a cached aStartStruct from the parent in the rule
   // tree (caching the "other" value), so we'll make sure we don't get
   // the initial value from the luck of default-initialization.
   // This means that it's important that we set the prereqs on
   // gRule1.style rather than on gElement.style.
   gRule2.style.setProperty(property, val, "");
   var val_computed_n = get_computed_value(getComputedStyle(gElementN, ""), property);
   var val_computed_f = get_computed_value(getComputedStyle(gElementF, ""), property);
+  
   isnot(val_computed_n, "",
         "should not get empty value for '" + property + ":" + val + "'");
   isnot(val_computed_f, "",
         "should not get empty value for '" + property + ":" + val + "'");
   if (is_initial) {
     (xfail_value(property, val, is_initial, false) ? todo_is : is)(
        val_computed_n, initial_computed_n,
        "should get initial value for '" + property + ":" + val + "'");