Title: [233356] trunk/Source/WebCore
- Revision
- 233356
- Author
- za...@apple.com
- Date
- 2018-06-29 07:47:06 -0700 (Fri, 29 Jun 2018)
Log Message
[LFC] Do not skip the next inflow sibling after finishing a formatting context root layout.
https://bugs.webkit.org/show_bug.cgi?id=187178
Reviewed by Antti Koivisto.
Since the block formatting layout is based on pre-order traversal, after finishing a formatting
context layout (which takes care of its entire subtre), we need to visit the next (in-flow)sibling.
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::layout const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (233355 => 233356)
--- trunk/Source/WebCore/ChangeLog 2018-06-29 14:17:38 UTC (rev 233355)
+++ trunk/Source/WebCore/ChangeLog 2018-06-29 14:47:06 UTC (rev 233356)
@@ -1,5 +1,18 @@
2018-06-29 Zalan Bujtas <za...@apple.com>
+ [LFC] Do not skip the next inflow sibling after finishing a formatting context root layout.
+ https://bugs.webkit.org/show_bug.cgi?id=187178
+
+ Reviewed by Antti Koivisto.
+
+ Since the block formatting layout is based on pre-order traversal, after finishing a formatting
+ context layout (which takes care of its entire subtre), we need to visit the next (in-flow)sibling.
+
+ * layout/blockformatting/BlockFormattingContext.cpp:
+ (WebCore::Layout::BlockFormattingContext::layout const):
+
+2018-06-29 Zalan Bujtas <za...@apple.com>
+
[LFC] The static position for an out-of-flow box should include the previous sibling's collapsed margin
https://bugs.webkit.org/show_bug.cgi?id=187169
Modified: trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp (233355 => 233356)
--- trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp 2018-06-29 14:17:38 UTC (rev 233355)
+++ trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp 2018-06-29 14:47:06 UTC (rev 233356)
@@ -82,7 +82,12 @@
layoutFormattingContextRoot(layoutContext, formattingState, layoutBox, displayBox);
layoutQueue.removeLast();
// Since this box is a formatting context root, it takes care of its entire subtree.
- break;
+ // Continue with next sibling if exists.
+ if (!layoutBox.nextInFlowOrFloatingSibling())
+ break;
+ auto* nextSibling = layoutBox.nextInFlowOrFloatingSibling();
+ layoutQueue.append(std::make_unique<LayoutPair>(LayoutPair {*nextSibling, layoutContext.createDisplayBox(*nextSibling)}));
+ continue;
}
LOG_WITH_STREAM(FormattingContextLayout, stream << "[Compute] -> [Position][Border][Padding][Width][Margin] -> for layoutBox(" << &layoutBox << ")");
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes