WebKit Bugzilla
Attachment 342163 Details for
Bug 186394
: [LFC] Merge height and vertical margin computation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186394-20180607075059.patch (text/plain), 22.63 KB, created by
zalan
on 2018-06-07 07:51:00 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2018-06-07 07:51:00 PDT
Size:
22.63 KB
patch
obsolete
>Subversion Revision: 232541 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 2e5bee9d23b546b7f088e8451aa38c25f327ab4f..46135765ae53348f17b9270fe933ec7ab63573f2 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,45 @@ >+2018-06-07 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC] Merge height and vertical margin computation >+ https://bugs.webkit.org/show_bug.cgi?id=186394 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ To match the spec (and the width/horizontal margin computation). -currently with default values. >+ >+ * layout/FormattingContext.cpp: >+ (WebCore::Layout::FormattingContext::computeFloatingHeightAndMargin const): >+ (WebCore::Layout::FormattingContext::computeOutOfFlowHeight const): >+ (WebCore::Layout::FormattingContext::computeFloatingHeight const): Deleted. >+ * layout/FormattingContext.h: >+ * layout/FormattingContextGeometry.cpp: >+ (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHeightAndMargin): >+ (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHeightAndMargin): >+ (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedHeightAndMargin): >+ (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin): >+ (WebCore::Layout::FormattingContext::Geometry::outOfFlowHeightAndMargin): >+ (WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin): >+ (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin): >+ (WebCore::Layout::outOfFlowNonReplacedHeight): Deleted. >+ (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHeight): Deleted. >+ (WebCore::Layout::floatingNonReplacedHeight): Deleted. >+ (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeight): Deleted. >+ (WebCore::Layout::FormattingContext::Geometry::outOfFlowHeight): Deleted. >+ (WebCore::Layout::FormattingContext::Geometry::floatingHeight): Deleted. >+ (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeight): Deleted. >+ * layout/blockformatting/BlockFormattingContext.cpp: >+ (WebCore::Layout::BlockFormattingContext::layout const): >+ (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const): >+ (WebCore::Layout::BlockFormattingContext::computeInFlowHeightAndMargin const): >+ (WebCore::Layout::BlockFormattingContext::computeHeight const): Deleted. >+ (WebCore::Layout::BlockFormattingContext::computeInFlowHeight const): Deleted. >+ * layout/blockformatting/BlockFormattingContext.h: >+ * layout/blockformatting/BlockFormattingContextGeometry.cpp: >+ (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin): >+ (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin): >+ (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeight): Deleted. >+ (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeight): Deleted. >+ > 2018-06-06 Zalan Bujtas <zalan@apple.com> > > [LFC] Add margin computation for floating, replaced elements. >diff --git a/Source/WebCore/layout/FormattingContext.cpp b/Source/WebCore/layout/FormattingContext.cpp >index a48fce3d2a6504be9204ba4e485c727646f87766..51c2623b3c6c930f7c5c6f58805970eafb403960 100644 >--- a/Source/WebCore/layout/FormattingContext.cpp >+++ b/Source/WebCore/layout/FormattingContext.cpp >@@ -54,9 +54,11 @@ void FormattingContext::computeOutOfFlowPosition(LayoutContext& layoutContext, c > displayBox.setTopLeft(Geometry::outOfFlowPosition(layoutContext, layoutBox)); > } > >-void FormattingContext::computeFloatingHeight(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const >+void FormattingContext::computeFloatingHeightAndMargin(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const > { >- displayBox.setHeight(Geometry::floatingHeight(layoutContext, layoutBox)); >+ auto heightAndMargin = Geometry::floatingHeightAndMargin(layoutContext, layoutBox); >+ displayBox.setHeight(heightAndMargin.height); >+ displayBox.setVerticalMargin(heightAndMargin.margin); > } > > void FormattingContext::computeFloatingWidthAndMargin(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const >@@ -75,7 +77,9 @@ void FormattingContext::computeOutOfFlowWidthAndMargin(LayoutContext& layoutCont > > void FormattingContext::computeOutOfFlowHeight(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const > { >- displayBox.setHeight(Geometry::outOfFlowHeight(layoutContext, layoutBox)); >+ auto heightAndMargin = Geometry::outOfFlowHeightAndMargin(layoutContext, layoutBox); >+ displayBox.setHeight(heightAndMargin.height); >+ displayBox.setVerticalMargin(heightAndMargin.margin); > } > > void FormattingContext::computeBorderAndPadding(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const >diff --git a/Source/WebCore/layout/FormattingContext.h b/Source/WebCore/layout/FormattingContext.h >index 56c0b036b9064de0f9fe425dd1e1d6263f7b9cea..736376ca9d4878ca88dbe367b6f5767aae2e6f14 100644 >--- a/Source/WebCore/layout/FormattingContext.h >+++ b/Source/WebCore/layout/FormattingContext.h >@@ -66,7 +66,7 @@ protected: > virtual void computeStaticPosition(LayoutContext&, const Box&, Display::Box&) const = 0; > virtual void computeInFlowPositionedPosition(LayoutContext&, const Box&, Display::Box&) const = 0; > >- void computeFloatingHeight(LayoutContext&, const Box&, Display::Box&) const; >+ void computeFloatingHeightAndMargin(LayoutContext&, const Box&, Display::Box&) const; > void computeFloatingWidthAndMargin(LayoutContext&, const Box&, Display::Box&) const; > > void computeBorderAndPadding(LayoutContext&, const Box&, Display::Box&) const; >@@ -86,15 +86,20 @@ protected: > Display::Box::HorizontalEdges margin; > }; > >- static LayoutUnit outOfFlowHeight(LayoutContext&, const Box&); >+ struct HeightAndMargin { >+ LayoutUnit height; >+ Display::Box::VerticalEdges margin; >+ }; >+ >+ static HeightAndMargin outOfFlowHeightAndMargin(LayoutContext&, const Box&); > static WidthAndMargin outOfFlowWidthAndMargin(LayoutContext&, const Box&); > >- static LayoutUnit floatingHeight(LayoutContext&, const Box&); >+ static HeightAndMargin floatingHeightAndMargin(LayoutContext&, const Box&); > static WidthAndMargin floatingWidthAndMargin(LayoutContext&, const Box&); > > static LayoutPoint outOfFlowPosition(LayoutContext&, const Box&); > >- static LayoutUnit inlineReplacedHeight(LayoutContext&, const Box&); >+ static HeightAndMargin inlineReplacedHeightAndMargin(LayoutContext&, const Box&); > static WidthAndMargin inlineReplacedWidthAndMargin(LayoutContext&, const Box&, std::optional<LayoutUnit> precomputedMarginLeft = { }, > std::optional<LayoutUnit> precomputedMarginRight = { }); > >@@ -102,14 +107,16 @@ protected: > static std::optional<Display::Box::Edges> computedPadding(LayoutContext&, const Box&); > > private: >- static LayoutUnit outOfFlowReplacedHeight(LayoutContext&, const Box&); >+ static HeightAndMargin outOfFlowReplacedHeightAndMargin(LayoutContext&, const Box&); > static WidthAndMargin outOfFlowReplacedWidthAndMargin(LayoutContext&, const Box&); > >+ static HeightAndMargin outOfFlowNonReplacedHeightAndMargin(LayoutContext&, const Box&); > static WidthAndMargin outOfFlowNonReplacedWidthAndMargin(LayoutContext&, const Box&); > >- static LayoutUnit floatingReplacedHeight(LayoutContext&, const Box&); >+ static HeightAndMargin floatingReplacedHeightAndMargin(LayoutContext&, const Box&); > static WidthAndMargin floatingReplacedWidthAndMargin(LayoutContext&, const Box&); > >+ static HeightAndMargin floatingNonReplacedHeightAndMargin(LayoutContext&, const Box&); > static WidthAndMargin floatingNonReplacedWidthAndMargin(LayoutContext&, const Box&); > }; > >diff --git a/Source/WebCore/layout/FormattingContextGeometry.cpp b/Source/WebCore/layout/FormattingContextGeometry.cpp >index 355d9b360b00add0c001f58e0d87776aa4210adb..6a4fff0cfcefe818f416e0e67b28e75237c10c78 100644 >--- a/Source/WebCore/layout/FormattingContextGeometry.cpp >+++ b/Source/WebCore/layout/FormattingContextGeometry.cpp >@@ -64,7 +64,7 @@ static LayoutUnit shrinkToFitWidth(LayoutContext&, const Box&) > return { }; > } > >-static LayoutUnit outOfFlowNonReplacedHeight(LayoutContext& layoutContext, const Box& layoutBox) >+FormattingContext::Geometry::HeightAndMargin FormattingContext::Geometry::outOfFlowNonReplacedHeightAndMargin(LayoutContext& layoutContext, const Box& layoutBox) > { > ASSERT(layoutBox.isOutOfFlowPositioned() && !layoutBox.replaced()); > >@@ -125,7 +125,7 @@ static LayoutUnit outOfFlowNonReplacedHeight(LayoutContext& layoutContext, const > ASSERT_NOT_REACHED(); > } > >- return computedHeightValue; >+ return { computedHeightValue, { } }; > } > > FormattingContext::Geometry::WidthAndMargin FormattingContext::Geometry::outOfFlowNonReplacedWidthAndMargin(LayoutContext& layoutContext, const Box& layoutBox) >@@ -186,13 +186,13 @@ FormattingContext::Geometry::WidthAndMargin FormattingContext::Geometry::outOfFl > return WidthAndMargin { computedWidthValue, { } }; > } > >-LayoutUnit FormattingContext::Geometry::outOfFlowReplacedHeight(LayoutContext& layoutContext, const Box& layoutBox) >+FormattingContext::Geometry::HeightAndMargin FormattingContext::Geometry::outOfFlowReplacedHeightAndMargin(LayoutContext& layoutContext, const Box& layoutBox) > { > ASSERT(layoutBox.isOutOfFlowPositioned() && layoutBox.replaced()); > // 10.6.5 Absolutely positioned, replaced elements > // > // The used value of 'height' is determined as for inline replaced elements. >- return inlineReplacedHeight(layoutContext, layoutBox); >+ return inlineReplacedHeightAndMargin(layoutContext, layoutBox); > } > > FormattingContext::Geometry::WidthAndMargin FormattingContext::Geometry::outOfFlowReplacedWidthAndMargin(LayoutContext& layoutContext, const Box& layoutBox) >@@ -204,7 +204,7 @@ FormattingContext::Geometry::WidthAndMargin FormattingContext::Geometry::outOfFl > return inlineReplacedWidthAndMargin(layoutContext, layoutBox); > } > >-static LayoutUnit floatingNonReplacedHeight(LayoutContext& layoutContext, const Box& layoutBox) >+FormattingContext::Geometry::HeightAndMargin FormattingContext::Geometry::floatingNonReplacedHeightAndMargin(LayoutContext& layoutContext, const Box& layoutBox) > { > ASSERT(layoutBox.isFloatingPositioned() && !layoutBox.replaced()); > // 10.6.6 Complicated cases >@@ -213,7 +213,8 @@ static LayoutUnit floatingNonReplacedHeight(LayoutContext& layoutContext, const > // > // If 'height' is 'auto', the height depends on the element's descendants per 10.6.7. > auto height = layoutBox.style().logicalHeight(); >- return height.isAuto() ? contentHeightForFormattingContextRoot(layoutContext, layoutBox) : LayoutUnit(height.value()); >+ auto computedHeightValue = height.isAuto() ? contentHeightForFormattingContextRoot(layoutContext, layoutBox) : LayoutUnit { height.value() }; >+ return FormattingContext::Geometry::HeightAndMargin { computedHeightValue, { } }; > } > > FormattingContext::Geometry::WidthAndMargin FormattingContext::Geometry::floatingNonReplacedWidthAndMargin(LayoutContext& layoutContext, const Box& layoutBox) >@@ -242,12 +243,12 @@ FormattingContext::Geometry::WidthAndMargin FormattingContext::Geometry::floatin > return FormattingContext::Geometry::WidthAndMargin { computedWidthValue, { computedMarginLeftValue, computedMarginRightValue } }; > } > >-LayoutUnit FormattingContext::Geometry::floatingReplacedHeight(LayoutContext& layoutContext, const Box& layoutBox) >+FormattingContext::Geometry::HeightAndMargin FormattingContext::Geometry::floatingReplacedHeightAndMargin(LayoutContext& layoutContext, const Box& layoutBox) > { > ASSERT(layoutBox.isFloatingPositioned() && layoutBox.replaced()); > // 10.6.2 Inline replaced elements, block-level replaced elements in normal flow, 'inline-block' > // replaced elements in normal flow and floating replaced elements >- return inlineReplacedHeight(layoutContext, layoutBox); >+ return inlineReplacedHeightAndMargin(layoutContext, layoutBox); > } > > FormattingContext::Geometry::WidthAndMargin FormattingContext::Geometry::floatingReplacedWidthAndMargin(LayoutContext& layoutContext, const Box& layoutBox) >@@ -457,13 +458,13 @@ static LayoutPoint outOfFlowReplacedPosition(LayoutContext& layoutContext, const > return { computedLeftValue, computedTopValue }; > } > >-LayoutUnit FormattingContext::Geometry::outOfFlowHeight(LayoutContext& layoutContext, const Box& layoutBox) >+FormattingContext::Geometry::HeightAndMargin FormattingContext::Geometry::outOfFlowHeightAndMargin(LayoutContext& layoutContext, const Box& layoutBox) > { > ASSERT(layoutBox.isOutOfFlowPositioned()); > > if (!layoutBox.replaced()) >- return outOfFlowNonReplacedHeight(layoutContext, layoutBox); >- return outOfFlowReplacedHeight(layoutContext, layoutBox); >+ return outOfFlowNonReplacedHeightAndMargin(layoutContext, layoutBox); >+ return outOfFlowReplacedHeightAndMargin(layoutContext, layoutBox); > } > > FormattingContext::Geometry::WidthAndMargin FormattingContext::Geometry::outOfFlowWidthAndMargin(LayoutContext& layoutContext, const Box& layoutBox) >@@ -475,13 +476,13 @@ FormattingContext::Geometry::WidthAndMargin FormattingContext::Geometry::outOfFl > return outOfFlowReplacedWidthAndMargin(layoutContext, layoutBox); > } > >-LayoutUnit FormattingContext::Geometry::floatingHeight(LayoutContext& layoutContext, const Box& layoutBox) >+FormattingContext::Geometry::HeightAndMargin FormattingContext::Geometry::floatingHeightAndMargin(LayoutContext& layoutContext, const Box& layoutBox) > { > ASSERT(layoutBox.isFloatingPositioned()); > > if (!layoutBox.replaced()) >- return floatingNonReplacedHeight(layoutContext, layoutBox); >- return floatingReplacedHeight(layoutContext, layoutBox); >+ return floatingNonReplacedHeightAndMargin(layoutContext, layoutBox); >+ return floatingReplacedHeightAndMargin(layoutContext, layoutBox); > } > > FormattingContext::Geometry::WidthAndMargin FormattingContext::Geometry::floatingWidthAndMargin(LayoutContext& layoutContext, const Box& layoutBox) >@@ -502,7 +503,7 @@ LayoutPoint FormattingContext::Geometry::outOfFlowPosition(LayoutContext& layout > return outOfFlowReplacedPosition(layoutContext, layoutBox); > } > >-LayoutUnit FormattingContext::Geometry::inlineReplacedHeight(LayoutContext&, const Box& layoutBox) >+FormattingContext::Geometry::HeightAndMargin FormattingContext::Geometry::inlineReplacedHeightAndMargin(LayoutContext&, const Box& layoutBox) > { > ASSERT((layoutBox.isOutOfFlowPositioned() || layoutBox.isFloatingPositioned() || layoutBox.isInFlow()) && layoutBox.replaced()); > // 10.6.2 Inline replaced elements, block-level replaced elements in normal flow, 'inline-block' replaced elements in normal flow and floating replaced elements >@@ -541,7 +542,7 @@ LayoutUnit FormattingContext::Geometry::inlineReplacedHeight(LayoutContext&, con > } else > computedHeightValue = height.value(); > >- return computedHeightValue; >+ return { computedHeightValue, { } }; > } > > FormattingContext::Geometry::WidthAndMargin FormattingContext::Geometry::inlineReplacedWidthAndMargin(LayoutContext& layoutContext, const Box& layoutBox, >diff --git a/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp b/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp >index 8f58a22f66b55294a7251b7892dc3e7c139a6602..3c42f4cead96320de9c1ccfb2cd1a515e080e653 100644 >--- a/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp >+++ b/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp >@@ -94,7 +94,7 @@ void BlockFormattingContext::layout(LayoutContext& layoutContext, FormattingStat > auto& layoutBox = layoutPair->layoutBox; > auto& displayBox = layoutPair->displayBox; > >- computeHeight(layoutContext, layoutBox, displayBox); >+ computeHeightAndMargin(layoutContext, layoutBox, displayBox); > // Adjust position now that we have all the previous floats placed in this context -if needed. > floatingContext.computePosition(layoutBox, displayBox); > if (!is<Container>(layoutBox)) >@@ -149,20 +149,22 @@ void BlockFormattingContext::computeWidthAndMargin(LayoutContext& layoutContext, > ASSERT_NOT_REACHED(); > } > >-void BlockFormattingContext::computeHeight(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const >+void BlockFormattingContext::computeHeightAndMargin(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const > { > if (layoutBox.isInFlow()) >- return computeInFlowHeight(layoutContext, layoutBox, displayBox); >+ return computeInFlowHeightAndMargin(layoutContext, layoutBox, displayBox); > > if (layoutBox.isFloatingPositioned()) >- return computeFloatingHeight(layoutContext, layoutBox, displayBox); >+ return computeFloatingHeightAndMargin(layoutContext, layoutBox, displayBox); > > ASSERT_NOT_REACHED(); > } > >-void BlockFormattingContext::computeInFlowHeight(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const >+void BlockFormattingContext::computeInFlowHeightAndMargin(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const > { >- displayBox.setHeight(Geometry::inFlowHeight(layoutContext, layoutBox)); >+ auto heightAndMargin = Geometry::inFlowHeightAndMargin(layoutContext, layoutBox); >+ displayBox.setHeight(heightAndMargin.height); >+ displayBox.setVerticalMargin(heightAndMargin.margin); > } > > void BlockFormattingContext::computeInFlowWidthAndMargin(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const >diff --git a/Source/WebCore/layout/blockformatting/BlockFormattingContext.h b/Source/WebCore/layout/blockformatting/BlockFormattingContext.h >index 58ab2edfb221a08e345098cce151fd1ab98b8ff1..857fe152a1906ebdeaa4784f60bd7518bff93db1 100644 >--- a/Source/WebCore/layout/blockformatting/BlockFormattingContext.h >+++ b/Source/WebCore/layout/blockformatting/BlockFormattingContext.h >@@ -52,24 +52,24 @@ public: > > private: > void computeWidthAndMargin(LayoutContext&, const Box&, Display::Box&) const; >- void computeHeight(LayoutContext&, const Box&, Display::Box&) const; >+ void computeHeightAndMargin(LayoutContext&, const Box&, Display::Box&) const; > > void computeStaticPosition(LayoutContext&, const Box&, Display::Box&) const override; > void computeInFlowPositionedPosition(LayoutContext&, const Box&, Display::Box&) const override; > void computeInFlowWidthAndMargin(LayoutContext&, const Box&, Display::Box&) const; >- void computeInFlowHeight(LayoutContext&, const Box&, Display::Box&) const; >+ void computeInFlowHeightAndMargin(LayoutContext&, const Box&, Display::Box&) const; > > // This class implements positioning and sizing for boxes participating in a block formatting context. > class Geometry { > public: >- static LayoutUnit inFlowHeight(LayoutContext&, const Box&); >+ static FormattingContext::Geometry::HeightAndMargin inFlowHeightAndMargin(LayoutContext&, const Box&); > static FormattingContext::Geometry::WidthAndMargin inFlowWidthAndMargin(LayoutContext&, const Box&); > > static LayoutPoint staticPosition(LayoutContext&, const Box&); > static LayoutPoint inFlowPositionedPosition(LayoutContext&, const Box&); > > private: >- static LayoutUnit inFlowNonReplacedHeight(LayoutContext&, const Box&); >+ static FormattingContext::Geometry::HeightAndMargin inFlowNonReplacedHeightAndMargin(LayoutContext&, const Box&); > static FormattingContext::Geometry::WidthAndMargin inFlowNonReplacedWidthAndMargin(LayoutContext&, const Box&, std::optional<LayoutUnit> precomputedWidth = std::nullopt); > static FormattingContext::Geometry::WidthAndMargin inFlowReplacedWidthAndMargin(LayoutContext&, const Box&); > }; >diff --git a/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp b/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp >index 574b851e934566a420d67afc49fd5cfb447c8a71..a83fe8c225efe48e676bb43cb1846251ee412689 100644 >--- a/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp >+++ b/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp >@@ -54,7 +54,7 @@ static const Container& initialContainingBlock(const Box& layoutBox) > return *containingBlock; > } > >-LayoutUnit BlockFormattingContext::Geometry::inFlowNonReplacedHeight(LayoutContext& layoutContext, const Box& layoutBox) >+FormattingContext::Geometry::HeightAndMargin BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin(LayoutContext& layoutContext, const Box& layoutBox) > { > ASSERT(layoutBox.isInFlow() && !layoutBox.replaced()); > >@@ -108,9 +108,9 @@ LayoutUnit BlockFormattingContext::Geometry::inFlowNonReplacedHeight(LayoutConte > > auto computedHeight = compute(); > if (!isStretchedToViewport(layoutContext, layoutBox)) >- return computedHeight; >+ return { computedHeight, { } }; > auto initialContainingBlockHeight = layoutContext.displayBoxForLayoutBox(initialContainingBlock(layoutBox))->contentBox().height(); >- return std::max(computedHeight, initialContainingBlockHeight); >+ return { std::max(computedHeight, initialContainingBlockHeight), { } }; > } > > FormattingContext::Geometry::WidthAndMargin BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin(LayoutContext& layoutContext, const Box& layoutBox, >@@ -319,15 +319,15 @@ LayoutPoint BlockFormattingContext::Geometry::inFlowPositionedPosition(LayoutCon > return { displayBox.left() + leftDelta, displayBox.top() + topDelta }; > } > >-LayoutUnit BlockFormattingContext::Geometry::inFlowHeight(LayoutContext& layoutContext, const Box& layoutBox) >+FormattingContext::Geometry::HeightAndMargin BlockFormattingContext::Geometry::inFlowHeightAndMargin(LayoutContext& layoutContext, const Box& layoutBox) > { > ASSERT(layoutBox.isInFlow()); > > if (!layoutBox.replaced()) >- return inFlowNonReplacedHeight(layoutContext, layoutBox); >+ return inFlowNonReplacedHeightAndMargin(layoutContext, layoutBox); > // 10.6.2 Inline replaced elements, block-level replaced elements in normal flow, 'inline-block' > // replaced elements in normal flow and floating replaced elements >- return FormattingContext::Geometry::inlineReplacedHeight(layoutContext, layoutBox); >+ return FormattingContext::Geometry::inlineReplacedHeightAndMargin(layoutContext, layoutBox); > } > > FormattingContext::Geometry::WidthAndMargin BlockFormattingContext::Geometry::inFlowWidthAndMargin(LayoutContext& layoutContext, const Box& layoutBox)
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 186394
: 342163