Title: [235720] trunk/Source/WebCore
- Revision
- 235720
- Author
- [email protected]
- Date
- 2018-09-05 21:06:14 -0700 (Wed, 05 Sep 2018)
Log Message
[LFC][BFC] ComputeFloat* methods should take a const FloatingContext&
https://bugs.webkit.org/show_bug.cgi?id=189333
Reviewed by Antti Koivisto.
Only layoutFormattingContextRoot() needs a non-const FloatingContext& object (to add the floating box to the floating state).
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
(WebCore::Layout::BlockFormattingContext::computeFloatingPosition const):
(WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats const):
* layout/blockformatting/BlockFormattingContext.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (235719 => 235720)
--- trunk/Source/WebCore/ChangeLog 2018-09-06 04:01:18 UTC (rev 235719)
+++ trunk/Source/WebCore/ChangeLog 2018-09-06 04:06:14 UTC (rev 235720)
@@ -1,3 +1,18 @@
+2018-09-05 Zalan Bujtas <[email protected]>
+
+ [LFC][BFC] ComputeFloat* methods should take a const FloatingContext&
+ https://bugs.webkit.org/show_bug.cgi?id=189333
+
+ Reviewed by Antti Koivisto.
+
+ Only layoutFormattingContextRoot() needs a non-const FloatingContext& object (to add the floating box to the floating state).
+
+ * layout/blockformatting/BlockFormattingContext.cpp:
+ (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
+ (WebCore::Layout::BlockFormattingContext::computeFloatingPosition const):
+ (WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats const):
+ * layout/blockformatting/BlockFormattingContext.h:
+
2018-09-05 Youenn Fablet <[email protected]>
Introduce a backend for RTCRtpTransceiver
Modified: trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp (235719 => 235720)
--- trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp 2018-09-06 04:01:18 UTC (rev 235719)
+++ trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp 2018-09-06 04:06:14 UTC (rev 235720)
@@ -142,8 +142,10 @@
computeHeightAndMargin(layoutContext, layoutBox);
// Float related final positioning.
- if (layoutBox.isFloatingPositioned())
+ if (layoutBox.isFloatingPositioned()) {
computeFloatingPosition(layoutContext, floatingContext, layoutBox);
+ floatingContext.floatingState().append(layoutBox);
+ }
else if (layoutBox.hasFloatClear())
computeVerticalPositionForFloatClear(layoutContext, floatingContext, layoutBox);
else
@@ -192,7 +194,7 @@
}
}
-void BlockFormattingContext::computeFloatingPosition(const LayoutContext& layoutContext, FloatingContext& floatingContext, const Box& layoutBox) const
+void BlockFormattingContext::computeFloatingPosition(const LayoutContext& layoutContext, const FloatingContext& floatingContext, const Box& layoutBox) const
{
ASSERT(layoutBox.isFloatingPositioned());
auto& displayBox = layoutContext.displayBoxForLayoutBox(layoutBox);
@@ -205,10 +207,9 @@
}
computeEstimatedMarginTopForAncestors(layoutContext, layoutBox);
displayBox.setTopLeft(floatingContext.positionForFloat(layoutBox));
- floatingContext.floatingState().append(layoutBox);
}
-void BlockFormattingContext::computePositionToAvoidFloats(const LayoutContext& layoutContext, FloatingContext& floatingContext, const Box& layoutBox) const
+void BlockFormattingContext::computePositionToAvoidFloats(const LayoutContext& layoutContext, const FloatingContext& floatingContext, const Box& layoutBox) const
{
// Formatting context roots avoid floats.
ASSERT(layoutBox.establishesBlockFormattingContext());
Modified: trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.h (235719 => 235720)
--- trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.h 2018-09-06 04:01:18 UTC (rev 235719)
+++ trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.h 2018-09-06 04:06:14 UTC (rev 235720)
@@ -56,8 +56,8 @@
void computeHeightAndMargin(const LayoutContext&, const Box&) const;
void computeStaticPosition(const LayoutContext&, const Box&) const override;
- void computeFloatingPosition(const LayoutContext&, FloatingContext&, const Box&) const;
- void computePositionToAvoidFloats(const LayoutContext&, FloatingContext&, const Box&) const;
+ void computeFloatingPosition(const LayoutContext&, const FloatingContext&, const Box&) const;
+ void computePositionToAvoidFloats(const LayoutContext&, const FloatingContext&, const Box&) const;
void computeVerticalPositionForFloatClear(const LayoutContext&, const FloatingContext&, const Box&) const;
void computeInFlowPositionedPosition(const LayoutContext&, const Box&) const override;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes