Bug 1377648 - Test case for reconstruction details element when removing summary element. r?heycam draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Wed, 05 Jul 2017 15:53:04 +0900
changeset 604082 244bbf49173434fa19ec92f680f1fdb51aae7825
parent 604081 0ffe978c99eeac3f981448ccd82a1b3264ee7133
child 636078 34f25ae9ffb5e839f2758447da6820eaf963aee2
push id66947
push userhikezoe@mozilla.com
push dateWed, 05 Jul 2017 08:39:33 +0000
reviewersheycam
bugs1377648, 1374175
milestone56.0a1
Bug 1377648 - Test case for reconstruction details element when removing summary element. r?heycam Currently these two test cases don't fail either on gecko or stylo even if the patches in this patch series are not applied, but will fail once the patch for bug 1374175 (i.e. not returning reconstruction damage from compute_style_difference in some cases) landed without this patch series on stylo. That means that, on stylo, reconstruction of details element on removing child summary triggered by RecreateFramesForContent in MaybeRecreateContainerForFrameRemoval has not worked well. MozReview-Commit-ID: El6p0UwWaJb
layout/reftests/details-summary/move-float-summary-to-different-details-ref.html
layout/reftests/details-summary/move-float-summary-to-different-details.html
layout/reftests/details-summary/move-position-absolute-summary-to-different-details-ref.html
layout/reftests/details-summary/move-position-absolute-summary-to-different-details.html
layout/reftests/details-summary/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/details-summary/move-float-summary-to-different-details-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<!-- Any copyright is dedicated to the Public Domain.
+   - http://creativecommons.org/publicdomain/zero/1.0/ -->
+
+<html>
+  <body>
+    <details>
+      <summary style="float:left;">Summary 2</summary>
+      <summary>Summary 1</summary>
+      <p>This is the details 1.</p>
+    </details>
+    <details>
+      <p>This is the details 2.</p>
+    </details>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/details-summary/move-float-summary-to-different-details.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<!-- Any copyright is dedicated to the Public Domain.
+   - http://creativecommons.org/publicdomain/zero/1.0/ -->
+
+<html class="reftest-wait">
+  <script>
+  function runTest() {
+    var details1 = document.getElementById("details1");
+    var summary2 = document.getElementById("summary2");
+
+    details1.insertBefore(summary2, details1.children[0]);
+
+    document.documentElement.removeAttribute("class");
+  }
+  </script>
+  <body onload="runTest();">
+    <details id="details1">
+      <summary>Summary 1</summary>
+      <p>This is the details 1.</p>
+    </details>
+    <details>
+      <summary id="summary2" style="float: left;">Summary 2</summary>
+      <p>This is the details 2.</p>
+    </details>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/details-summary/move-position-absolute-summary-to-different-details-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<!-- Any copyright is dedicated to the Public Domain.
+   - http://creativecommons.org/publicdomain/zero/1.0/ -->
+
+<html>
+  <body>
+    <details>
+      <summary style="position: absolute;">Summary 2</summary>
+      <summary>Summary 1</summary>
+      <p>This is the details 1.</p>
+    </details>
+    <details>
+      <p>This is the details 2.</p>
+    </details>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/details-summary/move-position-absolute-summary-to-different-details.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<!-- Any copyright is dedicated to the Public Domain.
+   - http://creativecommons.org/publicdomain/zero/1.0/ -->
+
+<html class="reftest-wait">
+  <script>
+  function runTest() {
+    var details1 = document.getElementById("details1");
+    var summary2 = document.getElementById("summary2");
+
+    details1.insertBefore(summary2, details1.children[0]);
+
+    document.documentElement.removeAttribute("class");
+  }
+  </script>
+  <body onload="runTest();">
+    <details id="details1">
+      <summary>Summary 1</summary>
+      <p>This is the details 1.</p>
+    </details>
+    <details>
+      <summary id="summary2" style="position: absolute;">Summary 2</summary>
+      <p>This is the details 2.</p>
+    </details>
+  </body>
+</html>
--- a/layout/reftests/details-summary/reftest.list
+++ b/layout/reftests/details-summary/reftest.list
@@ -96,8 +96,12 @@ fuzzy(1,1) == mouse-click-twice-float-de
 == key-enter-prevent-default.html single-summary.html
 == key-space-single-summary.html open-single-summary.html
 
 # Generated content bits
 == details-after.html single-summary.html
 == details-before.html single-summary.html
 == open-details-after.html open-single-summary.html
 == open-details-before.html open-single-summary.html
+
+# Move summary element
+== move-float-summary-to-different-details.html move-float-summary-to-different-details-ref.html
+== move-position-absolute-summary-to-different-details.html move-position-absolute-summary-to-different-details-ref.html