Modified: trunk/Source/WebCore/ChangeLog (235642 => 235643)
--- trunk/Source/WebCore/ChangeLog 2018-09-04 21:41:54 UTC (rev 235642)
+++ trunk/Source/WebCore/ChangeLog 2018-09-04 22:16:44 UTC (rev 235643)
@@ -1,3 +1,14 @@
+2018-09-04 Zalan Bujtas <[email protected]>
+
+ [LFC] Rename LayoutPair to BoxPair
+ https://bugs.webkit.org/show_bug.cgi?id=189276
+
+ Reviewed by Antti Koivisto.
+
+ * layout/FormattingContext.h:
+ * layout/blockformatting/BlockFormattingContext.cpp:
+ (WebCore::Layout::BlockFormattingContext::layout const):
+
2018-09-04 Youenn Fablet <[email protected]>
Disable WebRTC unified plan runtime flag by default
Modified: trunk/Source/WebCore/layout/FormattingContext.h (235642 => 235643)
--- trunk/Source/WebCore/layout/FormattingContext.h 2018-09-04 21:41:54 UTC (rev 235642)
+++ trunk/Source/WebCore/layout/FormattingContext.h 2018-09-04 22:16:44 UTC (rev 235643)
@@ -64,11 +64,11 @@
static Position mapCoordinateToAncestor(const LayoutContext&, Position, const Container& containingBlock, const Container& ancestor);
protected:
- struct LayoutPair {
- const Box& layoutBox;
- Display::Box& displayBox;
+ struct BoxPair {
+ const Box& layout;
+ Display::Box& display;
};
- using LayoutQueue = Vector<std::unique_ptr<LayoutPair>>;
+ using LayoutQueue = Vector<std::unique_ptr<BoxPair>>;
const Box& root() const { return *m_root; }
Modified: trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp (235642 => 235643)
--- trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp 2018-09-04 21:41:54 UTC (rev 235642)
+++ trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp 2018-09-04 22:16:44 UTC (rev 235643)
@@ -66,7 +66,7 @@
// This is a post-order tree traversal layout.
// The root container layout is done in the formatting context it lives in, not that one it creates, so let's start with the first child.
if (auto* firstChild = formattingRoot.firstInFlowOrFloatingChild())
- layoutQueue.append(std::make_unique<LayoutPair>(LayoutPair {*firstChild, layoutContext.createDisplayBox(*firstChild)}));
+ layoutQueue.append(std::make_unique<BoxPair>(BoxPair {*firstChild, layoutContext.createDisplayBox(*firstChild)}));
// 1. Go all the way down to the leaf node
// 2. Compute static position and width as we traverse down
// 3. As we climb back on the tree, compute height and finialize position
@@ -74,9 +74,9 @@
while (!layoutQueue.isEmpty()) {
// Traverse down on the descendants and compute width/static position until we find a leaf node.
while (true) {
- auto& layoutPair = *layoutQueue.last();
- auto& layoutBox = layoutPair.layoutBox;
- auto& displayBox = layoutPair.displayBox;
+ auto& boxPair = *layoutQueue.last();
+ auto& layoutBox = boxPair.layout;
+ auto& displayBox = boxPair.display;
if (layoutBox.establishesFormattingContext()) {
layoutFormattingContextRoot(layoutContext, floatingContext, formattingState, layoutBox, displayBox);
@@ -86,7 +86,7 @@
if (!layoutBox.nextInFlowOrFloatingSibling())
break;
auto* nextSibling = layoutBox.nextInFlowOrFloatingSibling();
- layoutQueue.append(std::make_unique<LayoutPair>(LayoutPair {*nextSibling, layoutContext.createDisplayBox(*nextSibling)}));
+ layoutQueue.append(std::make_unique<BoxPair>(BoxPair {*nextSibling, layoutContext.createDisplayBox(*nextSibling)}));
continue;
}
@@ -97,15 +97,15 @@
if (!is<Container>(layoutBox) || !downcast<Container>(layoutBox).hasInFlowOrFloatingChild())
break;
auto& firstChild = *downcast<Container>(layoutBox).firstInFlowOrFloatingChild();
- layoutQueue.append(std::make_unique<LayoutPair>(LayoutPair {firstChild, layoutContext.createDisplayBox(firstChild)}));
+ layoutQueue.append(std::make_unique<BoxPair>(BoxPair {firstChild, layoutContext.createDisplayBox(firstChild)}));
}
// Climb back on the ancestors and compute height/final position.
while (!layoutQueue.isEmpty()) {
// All inflow descendants (if there are any) are laid out by now. Let's compute the box's height.
- auto layoutPair = layoutQueue.takeLast();
- auto& layoutBox = layoutPair->layoutBox;
- auto& displayBox = layoutPair->displayBox;
+ auto boxPair = layoutQueue.takeLast();
+ auto& layoutBox = boxPair->layout;
+ auto& displayBox = boxPair->display;
LOG_WITH_STREAM(FormattingContextLayout, stream << "[Compute] -> [Height][Margin] -> for layoutBox(" << &layoutBox << ")");
// Formatting root boxes are special-cased and they don't come here.
@@ -120,7 +120,7 @@
// Move in-flow positioned children to their final position.
placeInFlowPositionedChildren(layoutContext, container);
if (auto* nextSibling = container.nextInFlowOrFloatingSibling()) {
- layoutQueue.append(std::make_unique<LayoutPair>(LayoutPair {*nextSibling, layoutContext.createDisplayBox(*nextSibling)}));
+ layoutQueue.append(std::make_unique<BoxPair>(BoxPair {*nextSibling, layoutContext.createDisplayBox(*nextSibling)}));
break;
}
}