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):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233356
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
2018-06-29 Zalan Bujtas <zalan@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 <zalan@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
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 << ")");