Log Message
[LFC][BFC] Remove redundant vertical positioning in BlockFormattingContext::computeFloatingPosition https://bugs.webkit.org/show_bug.cgi?id=193872
Reviewed by Antti Koivisto. This is taken care of by verticalPositionWithMargin() in BlockFormattingContext::computeHeightAndMargin(). * layout/blockformatting/BlockFormattingContext.cpp: (WebCore::Layout::BlockFormattingContext::computeFloatingPosition const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (240581 => 240582)
--- trunk/Source/WebCore/ChangeLog 2019-01-28 15:31:49 UTC (rev 240581)
+++ trunk/Source/WebCore/ChangeLog 2019-01-28 15:43:00 UTC (rev 240582)
@@ -1,3 +1,15 @@
+2019-01-28 Zalan Bujtas <[email protected]>
+
+ [LFC][BFC] Remove redundant vertical positioning in BlockFormattingContext::computeFloatingPosition
+ https://bugs.webkit.org/show_bug.cgi?id=193872
+
+ Reviewed by Antti Koivisto.
+
+ This is taken care of by verticalPositionWithMargin() in BlockFormattingContext::computeHeightAndMargin().
+
+ * layout/blockformatting/BlockFormattingContext.cpp:
+ (WebCore::Layout::BlockFormattingContext::computeFloatingPosition const):
+
2019-01-28 cathie chen <[email protected]>
Add missing #include in ScrollingTreeFrameScrollingNode.cpp
Modified: trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp (240581 => 240582)
--- trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp 2019-01-28 15:31:49 UTC (rev 240581)
+++ trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp 2019-01-28 15:43:00 UTC (rev 240582)
@@ -273,19 +273,9 @@
void BlockFormattingContext::computeFloatingPosition(const FloatingContext& floatingContext, const Box& layoutBox) const
{
- auto& layoutState = this->layoutState();
ASSERT(layoutBox.isFloatingPositioned());
ASSERT(hasPrecomputedMarginBefore(layoutBox));
-
- auto& displayBox = layoutState.displayBoxForLayoutBox(layoutBox);
- // 8.3.1 Collapsing margins
- // In block formatting context margins between a floated box and any other box do not collapse.
- // Adjust the static position by using the previous inflow box's non-collapsed margin.
- if (auto* previousInFlowBox = layoutBox.previousInFlowSibling()) {
- auto& previousDisplayBox = layoutState.displayBoxForLayoutBox(*previousInFlowBox);
- displayBox.moveVertically(previousDisplayBox.nonCollapsedMarginAfter() - previousDisplayBox.marginAfter());
- }
- displayBox.setTopLeft(floatingContext.positionForFloat(layoutBox));
+ layoutState().displayBoxForLayoutBox(layoutBox).setTopLeft(floatingContext.positionForFloat(layoutBox));
}
void BlockFormattingContext::computePositionToAvoidFloats(const FloatingContext& floatingContext, const Box& layoutBox) const
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
