WebKit Bugzilla
Attachment 349001 Details for
Bug 189333
: [LFC][BFC] ComputeFloat* methods should take a const FloatingContext&
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189333-20180905205930.patch (text/plain), 4.43 KB, created by
zalan
on 2018-09-05 20:59:35 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2018-09-05 20:59:35 PDT
Size:
4.43 KB
patch
obsolete
>Subversion Revision: 235716 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index d6415ce9564f611768cec4562d0ba0dbc5ce3b57..5172b96e2708369c7ee89219d25fa0895f3d5d23 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2018-09-05 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][BFC] ComputeFloat* methods should take a const FloatingContext& >+ https://bugs.webkit.org/show_bug.cgi?id=189333 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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 Zalan Bujtas <zalan@apple.com> > > [LFC] Pass in const LayoutContext& to geometry methods when possible >diff --git a/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp b/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp >index d28b9f7d98d95b107e503b5c77ed8ec792e00463..9f0bd5857ce5b732137a7a6ef29f7aa000f0a2be 100644 >--- a/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp >+++ b/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp >@@ -142,8 +142,10 @@ void BlockFormattingContext::layoutFormattingContextRoot(LayoutContext& layoutCo > 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::computeEstimatedMarginTopForAncestors(const LayoutC > } > } > >-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 @@ void BlockFormattingContext::computeFloatingPosition(const LayoutContext& layout > } > 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()); >diff --git a/Source/WebCore/layout/blockformatting/BlockFormattingContext.h b/Source/WebCore/layout/blockformatting/BlockFormattingContext.h >index 8d542169170eba8887fceccb14733a05825688b4..7d2773a45ce4e9db7fbc0abed664140823ff1912 100644 >--- a/Source/WebCore/layout/blockformatting/BlockFormattingContext.h >+++ b/Source/WebCore/layout/blockformatting/BlockFormattingContext.h >@@ -56,8 +56,8 @@ private: > 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;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
koivisto
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189333
: 349001