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
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