WebKit Bugzilla
Attachment 338856 Details for
Bug 185024
: [LFC] Implement BlockFormattingContext::layout logic and its dependencies
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185024-20180425221910.patch (text/plain), 22.73 KB, created by
zalan
on 2018-04-25 22:19:11 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2018-04-25 22:19:11 PDT
Size:
22.73 KB
patch
obsolete
>Subversion Revision: 231038 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index af46292fc656ab02433503336226c32a680599eb..5f96901d4bb5c9a8b67e40be402c5b1033cfef73 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,50 @@ >+2018-04-25 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC] Implement BlockFormattingContext::layout logic and its dependencies >+ https://bugs.webkit.org/show_bug.cgi?id=185024 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * layout/FloatingContext.cpp: >+ (WebCore::Layout::FloatingContext::FloatingContext): >+ (WebCore::Layout::FloatingContext::computePosition): >+ * layout/FloatingState.cpp: >+ (WebCore::Layout::FloatingState::FloatingState): >+ * layout/FloatingState.h: >+ (WebCore::Layout::FloatingState::create): >+ * layout/FormattingContext.cpp: >+ (WebCore::Layout::FormattingContext::FormattingContext): >+ (WebCore::Layout::FormattingContext::placeInFlowPositionedChildren const): >+ (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const): >+ * layout/FormattingContext.h: >+ * layout/FormattingState.cpp: >+ (WebCore::Layout::FormattingState::FormattingState): >+ (WebCore::Layout::FormattingState::~FormattingState): >+ * layout/FormattingState.h: >+ (WebCore::Layout::FormattingState::floatingState const): >+ * layout/LayoutContext.cpp: >+ (WebCore::Layout::LayoutContext::updateLayout): >+ (WebCore::Layout::LayoutContext::layout): >+ (WebCore::Layout::LayoutContext::formattingState): >+ (WebCore::Layout::LayoutContext::formattingContext): >+ * layout/LayoutContext.h: >+ * layout/blockformatting/BlockFormattingContext.cpp: >+ (WebCore::Layout::BlockFormattingContext::BlockFormattingContext): >+ (WebCore::Layout::BlockFormattingContext::layout): >+ (WebCore::Layout::BlockFormattingContext::formattingState const): >+ * layout/blockformatting/BlockFormattingContext.h: >+ * layout/blockformatting/BlockFormattingState.cpp: >+ (WebCore::Layout::BlockFormattingState::BlockFormattingState): >+ * layout/blockformatting/BlockFormattingState.h: >+ * layout/inlineformatting/InlineFormattingContext.cpp: >+ (WebCore::Layout::InlineFormattingContext::InlineFormattingContext): >+ (WebCore::Layout::InlineFormattingContext::layout): >+ (WebCore::Layout::InlineFormattingContext::formattingState const): >+ * layout/inlineformatting/InlineFormattingContext.h: >+ * layout/inlineformatting/InlineFormattingState.cpp: >+ (WebCore::Layout::InlineFormattingState::InlineFormattingState): >+ * layout/inlineformatting/InlineFormattingState.h: >+ > 2018-04-25 Zalan Bujtas <zalan@apple.com> > > [LFC] Add support for is<> and downcast<> >diff --git a/Source/WebCore/layout/FloatingContext.cpp b/Source/WebCore/layout/FloatingContext.cpp >index 92872aa3a749c00d52efd6a18390d1a735aef8a1..f7430cda44b495894e6cb138376ff3f409a28e6b 100644 >--- a/Source/WebCore/layout/FloatingContext.cpp >+++ b/Source/WebCore/layout/FloatingContext.cpp >@@ -25,3 +25,24 @@ > > #include "config.h" > #include "FloatingContext.h" >+ >+#if ENABLE(LAYOUT_FORMATTING_CONTEXT) >+ >+#include <wtf/IsoMallocInlines.h> >+ >+namespace WebCore { >+namespace Layout { >+ >+WTF_MAKE_ISO_ALLOCATED_IMPL(FloatingContext); >+ >+FloatingContext::FloatingContext(FloatingState&) >+{ >+} >+ >+void FloatingContext::computePosition(const Box&) >+{ >+} >+ >+} >+} >+#endif >diff --git a/Source/WebCore/layout/FloatingState.cpp b/Source/WebCore/layout/FloatingState.cpp >index 5e00ba70b9a5f57b85387ba7b0c0da053acaec36..40fa1640d19d1ce61d70be9a9a4d2cae72aa6b8f 100644 >--- a/Source/WebCore/layout/FloatingState.cpp >+++ b/Source/WebCore/layout/FloatingState.cpp >@@ -25,3 +25,21 @@ > > #include "config.h" > #include "FloatingState.h" >+ >+#if ENABLE(LAYOUT_FORMATTING_CONTEXT) >+ >+#include "FormattingState.h" >+#include <wtf/IsoMallocInlines.h> >+ >+namespace WebCore { >+namespace Layout { >+ >+WTF_MAKE_ISO_ALLOCATED_IMPL(FloatingState); >+ >+FloatingState::FloatingState() >+{ >+} >+ >+} >+} >+#endif >diff --git a/Source/WebCore/layout/FloatingState.h b/Source/WebCore/layout/FloatingState.h >index cb1781b8c67fe6f3cb6d4cfdeb49f86e2533504e..6fe7e22570ffb0de26bfa02d08d2e738c9700e52 100644 >--- a/Source/WebCore/layout/FloatingState.h >+++ b/Source/WebCore/layout/FloatingState.h >@@ -28,6 +28,7 @@ > #if ENABLE(LAYOUT_FORMATTING_CONTEXT) > > #include <wtf/IsoMalloc.h> >+#include <wtf/Ref.h> > > namespace WebCore { > >@@ -36,10 +37,13 @@ namespace Layout { > class FormattingState; > > // FloatingState holds the floating boxes per formatting context. >-class FloatingState { >+class FloatingState : public RefCounted<FloatingState> { > WTF_MAKE_ISO_ALLOCATED(FloatingState); > public: >- FloatingState(FormattingState& parentFormattingState); >+ static Ref<FloatingState> create() { return adoptRef(*new FloatingState()); } >+ >+private: >+ FloatingState(); > }; > > } >diff --git a/Source/WebCore/layout/FormattingContext.cpp b/Source/WebCore/layout/FormattingContext.cpp >index 9855bad4295e7a9b5c8bdf5f2c87d3f41b14d4ec..765b6c37072634daaca9ef346d40aca5779fdfc9 100644 >--- a/Source/WebCore/layout/FormattingContext.cpp >+++ b/Source/WebCore/layout/FormattingContext.cpp >@@ -35,8 +35,8 @@ namespace Layout { > > WTF_MAKE_ISO_ALLOCATED_IMPL(FormattingContext); > >-FormattingContext::FormattingContext(Box& formattingContextRoot) >- : m_root(makeWeakPtr(formattingContextRoot)) >+FormattingContext::FormattingContext(const Box& formattingContextRoot) >+ : m_root(makeWeakPtr(const_cast<Box&>(formattingContextRoot))) > { > } > >@@ -84,6 +84,14 @@ LayoutUnit FormattingContext::marginRight(const Box&) const > return 0; > } > >+void FormattingContext::placeInFlowPositionedChildren(const Container&) const >+{ >+} >+ >+void FormattingContext::layoutOutOfFlowDescendants() const >+{ >+} >+ > } > } > #endif >diff --git a/Source/WebCore/layout/FormattingContext.h b/Source/WebCore/layout/FormattingContext.h >index e86cff92d2775a3057774837b294f04ee7f81d51..7e684759cc23cce209abcfb4dcf31ac0f4c3eb35 100644 >--- a/Source/WebCore/layout/FormattingContext.h >+++ b/Source/WebCore/layout/FormattingContext.h >@@ -35,17 +35,19 @@ namespace WebCore { > > namespace Layout { > >-class FormattingState; > class Box; >+class Container; >+class FormattingState; >+class LayoutContext; > > class FormattingContext { > WTF_MAKE_ISO_ALLOCATED(FormattingContext); > public: >- FormattingContext(Box& formattingContextRoot); >+ FormattingContext(const Box& formattingContextRoot); > virtual ~FormattingContext(); > >- virtual void layout(FormattingState&) = 0; >- virtual std::unique_ptr<FormattingState> formattingState() const = 0; >+ virtual void layout(LayoutContext&, FormattingState&) = 0; >+ virtual std::unique_ptr<FormattingState> formattingState(const Box& formattingRoot, const LayoutContext&) const = 0; > > const Box& root() const { return *m_root; } > >@@ -61,6 +63,9 @@ protected: > virtual LayoutUnit marginLeft(const Box&) const; > virtual LayoutUnit marginBottom(const Box&) const; > virtual LayoutUnit marginRight(const Box&) const; >+ >+ void placeInFlowPositionedChildren(const Container&) const; >+ void layoutOutOfFlowDescendants() const; > > private: > WeakPtr<Box> m_root; >diff --git a/Source/WebCore/layout/FormattingState.cpp b/Source/WebCore/layout/FormattingState.cpp >index 8fa0d438ccf7c53096a38db4c44afc12e410c93f..6d62f11b11d81022f6393f1ac5a4ca27b92e064a 100644 >--- a/Source/WebCore/layout/FormattingState.cpp >+++ b/Source/WebCore/layout/FormattingState.cpp >@@ -35,7 +35,13 @@ namespace Layout { > > WTF_MAKE_ISO_ALLOCATED_IMPL(FormattingState); > >-FormattingState::FormattingState() >+FormattingState::FormattingState(const Box& formattingRoot, Ref<FloatingState>&& floatingState) >+ : m_formattingRoot(makeWeakPtr(const_cast<Box&>(formattingRoot))) >+ , m_floatingState(WTFMove(floatingState)) >+{ >+} >+ >+FormattingState::~FormattingState() > { > } > >diff --git a/Source/WebCore/layout/FormattingState.h b/Source/WebCore/layout/FormattingState.h >index e34c009c3c0631f42baa5b6f2f61c705efba219d..db436ede2799a822c8407ab79a06a1f63597ba8b 100644 >--- a/Source/WebCore/layout/FormattingState.h >+++ b/Source/WebCore/layout/FormattingState.h >@@ -27,25 +27,31 @@ > > #if ENABLE(LAYOUT_FORMATTING_CONTEXT) > >+#include "FloatingState.h" > #include <wtf/IsoMalloc.h> >+#include <wtf/WeakPtr.h> > > namespace WebCore { > > namespace Layout { > > class Box; >-class FloatingState; > class StyleDiff; > > class FormattingState { > WTF_MAKE_ISO_ALLOCATED(FormattingState); > public: >- FormattingState(); >+ FormattingState(const Box& formattingRoot, Ref<FloatingState>&&); >+ virtual ~FormattingState(); > >- FloatingState& floatingState(); >+ FloatingState& floatingState() const { return m_floatingState; } > > void markNeedsLayout(const Box&, StyleDiff); > bool needsLayout(const Box&); >+ >+private: >+ WeakPtr<Box> m_formattingRoot; >+ Ref<FloatingState> m_floatingState; > }; > > } >diff --git a/Source/WebCore/layout/LayoutContext.cpp b/Source/WebCore/layout/LayoutContext.cpp >index 938dd2b085dce73fefb960dd2d911f2e52a35791..55f59f6e0cceb18a381705acd8a6ca4fbdbb6f33 100644 >--- a/Source/WebCore/layout/LayoutContext.cpp >+++ b/Source/WebCore/layout/LayoutContext.cpp >@@ -47,19 +47,26 @@ LayoutContext::LayoutContext(Box& root) > > void LayoutContext::updateLayout() > { >- auto context = formattingContext(*m_root); >- auto state = formattingState(*context); >- context->layout(state); >+ layout(*m_root); >+} >+ >+void LayoutContext::layout(const Box& formattingContextRoot) >+{ >+ ASSERT(formattingContextRoot.establishesFormattingContext()); >+ >+ auto context = formattingContext(formattingContextRoot); >+ auto& state = formattingState(*context); >+ context->layout(*this, state); > } > > FormattingState& LayoutContext::formattingState(const FormattingContext& context) > { >- return *m_formattingStates.ensure(&context.root(), [&context] { >- return context.formattingState(); >+ return *m_formattingStates.ensure(&context.root(), [this, &context] { >+ return context.formattingState(context.root(), *this); > }).iterator->value; > } > >-std::unique_ptr<FormattingContext> LayoutContext::formattingContext(Box& formattingContextRoot) >+std::unique_ptr<FormattingContext> LayoutContext::formattingContext(const Box& formattingContextRoot) > { > if (formattingContextRoot.establishesBlockFormattingContext()) > return std::make_unique<BlockFormattingContext>(formattingContextRoot); >diff --git a/Source/WebCore/layout/LayoutContext.h b/Source/WebCore/layout/LayoutContext.h >index 15007d60a621aa64a0aa9ab4b3d3885f6945a5de..97ff62e4a9908deab9a94f25eacc75f22202c732 100644 >--- a/Source/WebCore/layout/LayoutContext.h >+++ b/Source/WebCore/layout/LayoutContext.h >@@ -59,10 +59,13 @@ public: > > void markNeedsLayout(const Box&, StyleDiff); > bool needsLayout(const Box&) const; >+ void layout(const Box& formattingContextRoot); >+ >+ FormattingState& formattingStateForBox(const Box&) const; > > private: > FormattingState& formattingState(const FormattingContext&); >- std::unique_ptr<FormattingContext> formattingContext(Box& formattingContextRoot); >+ std::unique_ptr<FormattingContext> formattingContext(const Box& formattingContextRoot); > > WeakPtr<Box> m_root; > HashMap<const Box*, std::unique_ptr<FormattingState>> m_formattingStates; >diff --git a/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp b/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp >index d37e1814bbede6d7737dbd0115fccd75f61d1ced..1bb346b24c92460aede869d42a07e96ea1503274 100644 >--- a/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp >+++ b/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp >@@ -29,6 +29,9 @@ > #if ENABLE(LAYOUT_FORMATTING_CONTEXT) > > #include "BlockFormattingState.h" >+#include "FloatingContext.h" >+#include "LayoutContainer.h" >+#include "LayoutContext.h" > #include <wtf/IsoMallocInlines.h> > > namespace WebCore { >@@ -36,18 +39,73 @@ namespace Layout { > > WTF_MAKE_ISO_ALLOCATED_IMPL(BlockFormattingContext); > >-BlockFormattingContext::BlockFormattingContext(Box& formattingContextRoot) >+BlockFormattingContext::BlockFormattingContext(const Box& formattingContextRoot) > : FormattingContext(formattingContextRoot) > { > } > >-void BlockFormattingContext::layout(FormattingState&) >+void BlockFormattingContext::layout(LayoutContext& layoutContext, FormattingState& formattingState) > { >+ // 9.4.1 Block formatting contexts >+ // In a block formatting context, boxes are laid out one after the other, vertically, beginning at the top of a containing block. >+ // The vertical distance between two sibling boxes is determined by the 'margin' properties. >+ // Vertical margins between adjacent block-level boxes in a block formatting context collapse. >+ if (!is<Container>(root())) >+ return; >+ auto& formattingRoot = downcast<Container>(root()); >+ Vector<const Box*> layoutQueue; >+ FloatingContext floatingContext(formattingState.floatingState()); >+ // 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 (formattingRoot.hasInFlowOrFloatingChild()) >+ layoutQueue.append(formattingRoot.firstInFlowOrFloatingChild()); >+ // 1. Go all the way down to the leaf node >+ // 2. Compute static position and width as we travers down >+ // 3. As we climb back on the tree, compute height and finialize position >+ // (Any subtrees with new formatting contexts need to layout synchronously) >+ while (!layoutQueue.isEmpty()) { >+ // Travers down on the descendants until we find a leaf node. >+ while (true) { >+ auto& layoutBox = *layoutQueue.last(); >+ computeWidth(layoutBox); >+ computeStaticPosition(layoutBox); >+ if (layoutBox.establishesFormattingContext()) { >+ layoutContext.layout(layoutBox); >+ break; >+ } >+ if (!is<Container>(layoutBox) || !downcast<Container>(layoutBox).hasInFlowOrFloatingChild()) >+ break; >+ layoutQueue.append(downcast<Container>(layoutBox).firstInFlowOrFloatingChild()); >+ } >+ >+ // 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& layoutBox = *layoutQueue.takeLast(); >+ computeHeight(layoutBox); >+ // Adjust position now that we have all the previous floats placed in this context -if needed. >+ floatingContext.computePosition(layoutBox); >+ if (!is<Container>(layoutBox)) >+ continue; >+ auto& container = downcast<Container>(layoutBox); >+ // Move in-flow positioned children to their final position. >+ placeInFlowPositionedChildren(container); >+ if (auto* nextSibling = container.nextInFlowOrFloatingSibling()) { >+ layoutQueue.append(nextSibling); >+ break; >+ } >+ } >+ } >+ // Place the inflow positioned children. >+ placeInFlowPositionedChildren(formattingRoot); >+ // And take care of out-of-flow boxes as the final step. >+ layoutOutOfFlowDescendants(); > } > >-std::unique_ptr<FormattingState> BlockFormattingContext::formattingState() const >+std::unique_ptr<FormattingState> BlockFormattingContext::formattingState(const Box& formattingRoot, const LayoutContext&) const > { >- return std::make_unique<BlockFormattingState>(); >+ // Block formatting context always establishes a new floating state. >+ return std::make_unique<BlockFormattingState>(formattingRoot, FloatingState::create()); > } > > void BlockFormattingContext::computeStaticPosition(const Box&) const >diff --git a/Source/WebCore/layout/blockformatting/BlockFormattingContext.h b/Source/WebCore/layout/blockformatting/BlockFormattingContext.h >index f12e7e762d53341ea26ccde7a1d81be9c9fdbbfa..5f16009775e9f6410701b665199ebf4b57cbbaf9 100644 >--- a/Source/WebCore/layout/blockformatting/BlockFormattingContext.h >+++ b/Source/WebCore/layout/blockformatting/BlockFormattingContext.h >@@ -37,16 +37,17 @@ namespace Layout { > > class BlockFormattingState; > class Box; >+class LayoutContext; > > // This class implements the layout logic for block formatting contexts. > // https://www.w3.org/TR/CSS22/visuren.html#block-formatting > class BlockFormattingContext : public FormattingContext { > WTF_MAKE_ISO_ALLOCATED(BlockFormattingContext); > public: >- BlockFormattingContext(Box& formattingContextRoot); >+ BlockFormattingContext(const Box& formattingContextRoot); > >- void layout(FormattingState&) override; >- std::unique_ptr<FormattingState> formattingState() const override; >+ void layout(LayoutContext&, FormattingState&) override; >+ std::unique_ptr<FormattingState> formattingState(const Box& formattingRoot, const LayoutContext&) const override; > > protected: > void computeStaticPosition(const Box&) const override; >diff --git a/Source/WebCore/layout/blockformatting/BlockFormattingState.cpp b/Source/WebCore/layout/blockformatting/BlockFormattingState.cpp >index 244d8254acef7f1c3291de976204af82de57fe2c..f84d09ce2f31d550d9b342d5b13df2d234153a3c 100644 >--- a/Source/WebCore/layout/blockformatting/BlockFormattingState.cpp >+++ b/Source/WebCore/layout/blockformatting/BlockFormattingState.cpp >@@ -35,8 +35,8 @@ namespace Layout { > > WTF_MAKE_ISO_ALLOCATED_IMPL(BlockFormattingState); > >-BlockFormattingState::BlockFormattingState() >- : FormattingState() >+BlockFormattingState::BlockFormattingState(const Box& formattingRoot, Ref<FloatingState>&& floatingState) >+ : FormattingState(formattingRoot, WTFMove(floatingState)) > { > } > >diff --git a/Source/WebCore/layout/blockformatting/BlockFormattingState.h b/Source/WebCore/layout/blockformatting/BlockFormattingState.h >index 5485bda2f68ddeacc14e28bd5c95f1bc74c5633f..a9876454220854190ef8bc14a8b58a3f4c5ee018 100644 >--- a/Source/WebCore/layout/blockformatting/BlockFormattingState.h >+++ b/Source/WebCore/layout/blockformatting/BlockFormattingState.h >@@ -38,7 +38,7 @@ namespace Layout { > class BlockFormattingState : public FormattingState { > WTF_MAKE_ISO_ALLOCATED(BlockFormattingState); > public: >- BlockFormattingState(); >+ BlockFormattingState(const Box& formattingRoot, Ref<FloatingState>&&); > }; > > } >diff --git a/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp b/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp >index 7d1b76403d9cb43977f35d917bc718d244bb5af6..e011df89041e479e3477a4598a8b3fd090dc0408 100644 >--- a/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp >+++ b/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp >@@ -29,6 +29,8 @@ > #if ENABLE(LAYOUT_FORMATTING_CONTEXT) > > #include "InlineFormattingState.h" >+#include "LayoutBox.h" >+#include "LayoutContext.h" > #include <wtf/IsoMallocInlines.h> > > namespace WebCore { >@@ -36,18 +38,23 @@ namespace Layout { > > WTF_MAKE_ISO_ALLOCATED_IMPL(InlineFormattingContext); > >-InlineFormattingContext::InlineFormattingContext(Box& formattingContextRoot) >+InlineFormattingContext::InlineFormattingContext(const Box& formattingContextRoot) > : FormattingContext(formattingContextRoot) > { > } > >-void InlineFormattingContext::layout(FormattingState&) >+void InlineFormattingContext::layout(LayoutContext&, FormattingState&) > { > } > >-std::unique_ptr<FormattingState> InlineFormattingContext::formattingState() const >+std::unique_ptr<FormattingState> InlineFormattingContext::formattingState(const Box& formattingRoot, const LayoutContext& layoutContext) const > { >- return std::make_unique<InlineFormattingState>(); >+ // If the block container box that initiates this inline formatting context also establishes a block context, create a new float for >+ if (formattingRoot.establishesBlockFormattingContext()) >+ return std::make_unique<InlineFormattingState>(formattingRoot, FloatingState::create()); >+ // Find the formatting state in which this formatting root lives, not the one it creates (this) and use its floating state. >+ auto& formattingState = layoutContext.formattingStateForBox(formattingRoot); >+ return std::make_unique<InlineFormattingState>(formattingRoot, formattingState.floatingState()); > } > > } >diff --git a/Source/WebCore/layout/inlineformatting/InlineFormattingContext.h b/Source/WebCore/layout/inlineformatting/InlineFormattingContext.h >index 6026060e9ec4e787f230501649a2dbe898d27125..0d6e9f8b0ed20caa5a862b3b3ae9172628a5d850 100644 >--- a/Source/WebCore/layout/inlineformatting/InlineFormattingContext.h >+++ b/Source/WebCore/layout/inlineformatting/InlineFormattingContext.h >@@ -35,16 +35,17 @@ namespace WebCore { > namespace Layout { > > class InlineFormattingState; >+class LayoutContext; > > // This class implements the layout logic for inline formatting contexts. > // https://www.w3.org/TR/CSS22/visuren.html#inline-formatting > class InlineFormattingContext : public FormattingContext { > WTF_MAKE_ISO_ALLOCATED(InlineFormattingContext); > public: >- InlineFormattingContext(Box& formattingContextRoot); >+ InlineFormattingContext(const Box& formattingContextRoot); > >- void layout(FormattingState&) override; >- std::unique_ptr<FormattingState> formattingState() const override; >+ void layout(LayoutContext&, FormattingState&) override; >+ std::unique_ptr<FormattingState> formattingState(const Box& formattingRoot, const LayoutContext&) const override; > }; > > } >diff --git a/Source/WebCore/layout/inlineformatting/InlineFormattingState.cpp b/Source/WebCore/layout/inlineformatting/InlineFormattingState.cpp >index 930a88504192b2f75ac52fd6ec1a8c8a26065640..9e9db0d9378ba64818799ca1bc64259e3950d708 100644 >--- a/Source/WebCore/layout/inlineformatting/InlineFormattingState.cpp >+++ b/Source/WebCore/layout/inlineformatting/InlineFormattingState.cpp >@@ -28,6 +28,7 @@ > > #if ENABLE(LAYOUT_FORMATTING_CONTEXT) > >+#include "LayoutBox.h" > #include <wtf/IsoMallocInlines.h> > > namespace WebCore { >@@ -35,8 +36,8 @@ namespace Layout { > > WTF_MAKE_ISO_ALLOCATED_IMPL(InlineFormattingState); > >-InlineFormattingState::InlineFormattingState() >- : FormattingState() >+InlineFormattingState::InlineFormattingState(const Box& formattingRoot, Ref<FloatingState>&& floatingState) >+ : FormattingState(formattingRoot, WTFMove(floatingState)) > { > } > >diff --git a/Source/WebCore/layout/inlineformatting/InlineFormattingState.h b/Source/WebCore/layout/inlineformatting/InlineFormattingState.h >index ed9bcdadc7844f17e0e7ea861734d05b31ee55bc..a73ef95d0700bdb8d9fc3ea413309c3060b39859 100644 >--- a/Source/WebCore/layout/inlineformatting/InlineFormattingState.h >+++ b/Source/WebCore/layout/inlineformatting/InlineFormattingState.h >@@ -38,7 +38,7 @@ namespace Layout { > class InlineFormattingState : public FormattingState { > WTF_MAKE_ISO_ALLOCATED(InlineFormattingState); > public: >- InlineFormattingState(); >+ InlineFormattingState(const Box& formattingRoot, Ref<FloatingState>&&); > }; > > }
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
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185024
:
338856
|
338999
|
339003