Title: [258079] trunk
- Revision
- 258079
- Author
- [email protected]
- Date
- 2020-03-07 14:05:45 -0800 (Sat, 07 Mar 2020)
Log Message
[LFC][Verification] Use the table wrapper box's offset when matching out-of-flow tables
https://bugs.webkit.org/show_bug.cgi?id=208769
<rdar://problem/60191322>
Reviewed by Antti Koivisto.
Source/WebCore:
In LFC, an out-of-flow table initiates a wrapper table box (out-of-flow) and a child table box (in-flow).
Apply the wrapper table box's offset, when matching the display and the render tree.
Test: fast/layoutformattingcontext/absolute-positioned-simple-table2.html
* layout/Verification.cpp:
(WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
LayoutTests:
* fast/layoutformattingcontext/absolute-positioned-simple-table2-expected.html: Added.
* fast/layoutformattingcontext/absolute-positioned-simple-table2.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (258078 => 258079)
--- trunk/LayoutTests/ChangeLog 2020-03-07 21:56:44 UTC (rev 258078)
+++ trunk/LayoutTests/ChangeLog 2020-03-07 22:05:45 UTC (rev 258079)
@@ -1,3 +1,14 @@
+2020-03-07 Zalan Bujtas <[email protected]>
+
+ [LFC][Verification] Use the table wrapper box's offset when matching out-of-flow tables
+ https://bugs.webkit.org/show_bug.cgi?id=208769
+ <rdar://problem/60191322>
+
+ Reviewed by Antti Koivisto.
+
+ * fast/layoutformattingcontext/absolute-positioned-simple-table2-expected.html: Added.
+ * fast/layoutformattingcontext/absolute-positioned-simple-table2.html: Added.
+
2020-03-07 Simon Fraser <[email protected]>
Unreviewed test gardening.
Added: trunk/LayoutTests/fast/layoutformattingcontext/absolute-positioned-simple-table2-expected.html (0 => 258079)
--- trunk/LayoutTests/fast/layoutformattingcontext/absolute-positioned-simple-table2-expected.html (rev 0)
+++ trunk/LayoutTests/fast/layoutformattingcontext/absolute-positioned-simple-table2-expected.html 2020-03-07 22:05:45 UTC (rev 258079)
@@ -0,0 +1,7 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ internal:LayoutFormattingContextEnabled=true internal:LayoutFormattingContextIntegrationEnabled=false ] -->
+<style>
+div {
+ padding: 45px;
+}
+</style>
+<div>absolute_positioned_table</div>
Added: trunk/LayoutTests/fast/layoutformattingcontext/absolute-positioned-simple-table2.html (0 => 258079)
--- trunk/LayoutTests/fast/layoutformattingcontext/absolute-positioned-simple-table2.html (rev 0)
+++ trunk/LayoutTests/fast/layoutformattingcontext/absolute-positioned-simple-table2.html 2020-03-07 22:05:45 UTC (rev 258079)
@@ -0,0 +1,9 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ internal:LayoutFormattingContextEnabled=true internal:LayoutFormattingContextIntegrationEnabled=false ] -->
+<style>
+table {
+ position: absolute;
+ top: 50px;
+ left: 50px;
+}
+</style>
+<table><tr><td>absolute_positioned_table</td></tr></table>
Modified: trunk/Source/WebCore/ChangeLog (258078 => 258079)
--- trunk/Source/WebCore/ChangeLog 2020-03-07 21:56:44 UTC (rev 258078)
+++ trunk/Source/WebCore/ChangeLog 2020-03-07 22:05:45 UTC (rev 258079)
@@ -1,3 +1,19 @@
+2020-03-07 Zalan Bujtas <[email protected]>
+
+ [LFC][Verification] Use the table wrapper box's offset when matching out-of-flow tables
+ https://bugs.webkit.org/show_bug.cgi?id=208769
+ <rdar://problem/60191322>
+
+ Reviewed by Antti Koivisto.
+
+ In LFC, an out-of-flow table initiates a wrapper table box (out-of-flow) and a child table box (in-flow).
+ Apply the wrapper table box's offset, when matching the display and the render tree.
+
+ Test: fast/layoutformattingcontext/absolute-positioned-simple-table2.html
+
+ * layout/Verification.cpp:
+ (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
+
2020-03-07 Darin Adler <[email protected]>
Make Editor::applyEditingStyleToBodyElement do things in a straightforward manner
Modified: trunk/Source/WebCore/layout/Verification.cpp (258078 => 258079)
--- trunk/Source/WebCore/layout/Verification.cpp 2020-03-07 21:56:44 UTC (rev 258078)
+++ trunk/Source/WebCore/layout/Verification.cpp 2020-03-07 22:05:45 UTC (rev 258079)
@@ -242,13 +242,19 @@
};
};
- auto& displayBox = context.displayBoxForLayoutBox(layoutBox);
-
+ // rendering does not offset for relative positioned boxes.
auto frameRect = renderer.frameRect();
- // rendering does not offset for relative positioned boxes.
if (renderer.isInFlowPositioned())
frameRect.move(renderer.offsetForInFlowPosition());
+ auto displayBox = Display::Box { context.displayBoxForLayoutBox(layoutBox) };
+ if (layoutBox.isTableBox()) {
+ // When the <table> is out-of-flow positioned, the wrapper table box has the offset
+ // while the actual table box is static, inflow.
+ auto& tableWrapperDisplayBox = context.displayBoxForLayoutBox(*layoutBox.containingBlock());
+ displayBox.moveBy(tableWrapperDisplayBox.topLeft());
+ }
+
if (!areEssentiallyEqual(frameRect, displayBox.rect())) {
outputRect("frameBox", renderer.frameRect(), displayBox.rect());
return true;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes