Title: [264169] trunk
Revision
264169
Author
za...@apple.com
Date
2020-07-09 07:33:50 -0700 (Thu, 09 Jul 2020)

Log Message

[LFC][Verification] Use the table wrapper box's margin when checking the table box
https://bugs.webkit.org/show_bug.cgi?id=214119

Reviewed by Darin Adler.

Source/WebCore:

Table margins are propagated to the table wrapper box.

Test: fast/layoutformattingcontext/table-with-margin-simple.html

* layout/Verification.cpp:
(WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
(WebCore::Layout::LayoutContext::verifyAndOutputMismatchingLayoutTree):

LayoutTests:

* fast/layoutformattingcontext/table-with-margin-simple-expected.html: Added.
* fast/layoutformattingcontext/table-with-margin-simple.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (264168 => 264169)


--- trunk/LayoutTests/ChangeLog	2020-07-09 14:10:06 UTC (rev 264168)
+++ trunk/LayoutTests/ChangeLog	2020-07-09 14:33:50 UTC (rev 264169)
@@ -1,3 +1,13 @@
+2020-07-09  Zalan Bujtas  <za...@apple.com>
+
+        [LFC][Verification] Use the table wrapper box's margin when checking the table box
+        https://bugs.webkit.org/show_bug.cgi?id=214119
+
+        Reviewed by Darin Adler.
+
+        * fast/layoutformattingcontext/table-with-margin-simple-expected.html: Added.
+        * fast/layoutformattingcontext/table-with-margin-simple.html: Added.
+
 2020-07-09  Philippe Normand  <pnorm...@igalia.com>
 
         [GStreamer][MSE] AV1 support

Added: trunk/LayoutTests/fast/layoutformattingcontext/table-with-margin-simple-expected.html (0 => 264169)


--- trunk/LayoutTests/fast/layoutformattingcontext/table-with-margin-simple-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/layoutformattingcontext/table-with-margin-simple-expected.html	2020-07-09 14:33:50 UTC (rev 264169)
@@ -0,0 +1,12 @@
+<!-- webkit-test-runner [ internal:LayoutFormattingContextEnabled=true internal:LayoutFormattingContextIntegrationEnabled=false ] -->
+<style>
+div {
+    width: 100px;
+    border: 10px solid green;
+    padding: 10px;
+    background-color: green;
+    margin: 100px;
+}
+</style>
+<div></div>
+<div></div>

Added: trunk/LayoutTests/fast/layoutformattingcontext/table-with-margin-simple.html (0 => 264169)


--- trunk/LayoutTests/fast/layoutformattingcontext/table-with-margin-simple.html	                        (rev 0)
+++ trunk/LayoutTests/fast/layoutformattingcontext/table-with-margin-simple.html	2020-07-09 14:33:50 UTC (rev 264169)
@@ -0,0 +1,13 @@
+<!-- webkit-test-runner [ internal:LayoutFormattingContextEnabled=true internal:LayoutFormattingContextIntegrationEnabled=false ] -->
+<style>
+div {
+    width: 100px;
+    border: 10px solid green;
+    padding: 10px;
+    background-color: green;
+    margin: 100px;
+    display: table;
+}
+</style>
+<div></div>
+<div></div>

Modified: trunk/Source/WebCore/ChangeLog (264168 => 264169)


--- trunk/Source/WebCore/ChangeLog	2020-07-09 14:10:06 UTC (rev 264168)
+++ trunk/Source/WebCore/ChangeLog	2020-07-09 14:33:50 UTC (rev 264169)
@@ -1,3 +1,18 @@
+2020-07-09  Zalan Bujtas  <za...@apple.com>
+
+        [LFC][Verification] Use the table wrapper box's margin when checking the table box
+        https://bugs.webkit.org/show_bug.cgi?id=214119
+
+        Reviewed by Darin Adler.
+
+        Table margins are propagated to the table wrapper box.
+
+        Test: fast/layoutformattingcontext/table-with-margin-simple.html
+
+        * layout/Verification.cpp:
+        (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
+        (WebCore::Layout::LayoutContext::verifyAndOutputMismatchingLayoutTree):
+
 2020-07-09  Alicia Boya GarcĂ­a  <ab...@igalia.com>
 
         [MSE][GStreamer] Don't cache duration in MediaSourceClientGStreamerMSE

Modified: trunk/Source/WebCore/layout/Verification.cpp (264168 => 264169)


--- trunk/Source/WebCore/layout/Verification.cpp	2020-07-09 14:10:06 UTC (rev 264168)
+++ trunk/Source/WebCore/layout/Verification.cpp	2020-07-09 14:33:50 UTC (rev 264169)
@@ -233,7 +233,7 @@
         stream.nextLine();
     };
 
-    auto renderBoxLikeMarginBox = [&] (auto& displayBox) {
+    auto renderBoxLikeMarginBox = [&] (const auto& displayBox) {
         if (layoutBox.isInitialContainingBlock())
             return displayBox.rect();
 
@@ -277,6 +277,9 @@
         // while the actual table box is static, inflow.
         auto& tableWrapperDisplayBox = layoutState.displayBoxForLayoutBox(layoutBox.containingBlock());
         displayBox.moveBy(tableWrapperDisplayBox.topLeft());
+        // Table wrapper box has the margin values for the table.
+        displayBox.setHorizontalMargin(tableWrapperDisplayBox.horizontalMargin());
+        displayBox.setVerticalMargin(tableWrapperDisplayBox.verticalMargin());
     }
 
     if (is<RenderTableRow>(renderer) || is<RenderTableSection>(renderer)) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to