WebKit Bugzilla
Attachment 341734 Details for
Bug 186179
: [LFC] Simplify the formatting class implementation by pushing down some of the logic to the Geometry class
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186179-20180531215009.patch (text/plain), 22.41 KB, created by
zalan
on 2018-05-31 21:50:11 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2018-05-31 21:50:11 PDT
Size:
22.41 KB
patch
obsolete
>Subversion Revision: 232374 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index cc8fc7bef6ccc6a72f3202d990c3f6641eff4c82..6640326e4c24c563303be3818dc1a3bf56599ba9 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,61 @@ >+2018-05-31 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC] Simplify the formatting class implementation by pushing down some of the logic to the Geometry class >+ https://bugs.webkit.org/show_bug.cgi?id=186179 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * layout/FormattingContext.cpp: >+ (WebCore::Layout::FormattingContext::computeOutOfFlowPosition const): >+ (WebCore::Layout::FormattingContext::computeOutOfFlowWidth const): >+ (WebCore::Layout::FormattingContext::computeFloatingWidth const): >+ (WebCore::Layout::FormattingContext::computeOutOfFlowHeight const): >+ (WebCore::Layout::FormattingContext::computeFloatingHeight const): >+ * layout/FormattingContext.h: >+ * layout/FormattingContextGeometry.cpp: >+ (WebCore::Layout::outOfFlowNonReplacedHeight): >+ (WebCore::Layout::outOfFlowNonReplacedWidth): >+ (WebCore::Layout::outOfFlowReplacedHeight): >+ (WebCore::Layout::outOfFlowReplacedWidth): >+ (WebCore::Layout::floatingNonReplacedHeight): >+ (WebCore::Layout::floatingNonReplacedWidth): >+ (WebCore::Layout::floatingReplacedHeight): >+ (WebCore::Layout::floatingReplacedWidth): >+ (WebCore::Layout::outOfFlowNonReplacedPosition): >+ (WebCore::Layout::outOfFlowReplacedPosition): >+ (WebCore::Layout::FormattingContext::Geometry::outOfFlowHeight): >+ (WebCore::Layout::FormattingContext::Geometry::outOfFlowWidth): >+ (WebCore::Layout::FormattingContext::Geometry::floatingHeight): >+ (WebCore::Layout::FormattingContext::Geometry::floatingWidth): >+ (WebCore::Layout::FormattingContext::Geometry::outOfFlowPosition): >+ (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeight): >+ (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidth): >+ (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHeight): Deleted. >+ (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedWidth): Deleted. >+ (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHeight): Deleted. >+ (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedWidth): Deleted. >+ (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedHeight): Deleted. >+ (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidth): Deleted. >+ (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeight): Deleted. >+ (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidth): Deleted. >+ (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedPosition): Deleted. >+ (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedPosition): Deleted. >+ (WebCore::Layout::FormattingContext::Geometry::replacedHeight): Deleted. >+ (WebCore::Layout::FormattingContext::Geometry::replacedWidth): Deleted. >+ * layout/blockformatting/BlockFormattingContext.cpp: >+ (WebCore::Layout::BlockFormattingContext::computeStaticPosition const): >+ (WebCore::Layout::BlockFormattingContext::computeInFlowPositionedPosition const): >+ (WebCore::Layout::BlockFormattingContext::computeInFlowHeight const): >+ (WebCore::Layout::BlockFormattingContext::computeInFlowWidth const): >+ * layout/blockformatting/BlockFormattingContext.h: >+ * layout/blockformatting/BlockFormattingContextGeometry.cpp: >+ (WebCore::Layout::inFlowNonReplacedHeight): >+ (WebCore::Layout::inFlowNonReplacedWidth): >+ (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeight): >+ (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidth): >+ (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeight): Deleted. >+ (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidth): Deleted. >+ > 2018-05-31 Megan Gardner <megan_gardner@apple.com> > > Add setting to allow override screen size to be disabled. >diff --git a/Source/WebCore/layout/FormattingContext.cpp b/Source/WebCore/layout/FormattingContext.cpp >index e235a33f1bcf48875bd642a0cbc30acafea76917..6e0d03919a6cedbc7e0414bf56aeac7705bb13b4 100644 >--- a/Source/WebCore/layout/FormattingContext.cpp >+++ b/Source/WebCore/layout/FormattingContext.cpp >@@ -59,14 +59,7 @@ void FormattingContext::computeInFlowPositionedPosition(LayoutContext&, const Bo > > void FormattingContext::computeOutOfFlowPosition(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const > { >- LayoutPoint computedTopLeft; >- >- if (layoutBox.replaced()) >- computedTopLeft = Geometry::outOfFlowReplacedPosition(layoutContext, layoutBox); >- else >- computedTopLeft = Geometry::outOfFlowNonReplacedPosition(layoutContext, layoutBox); >- >- displayBox.setTopLeft(computedTopLeft); >+ displayBox.setTopLeft(Geometry::outOfFlowPosition(layoutContext, layoutBox)); > } > > void FormattingContext::computeWidth(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const >@@ -89,50 +82,22 @@ void FormattingContext::computeHeight(LayoutContext& layoutContext, const Box& l > > void FormattingContext::computeOutOfFlowWidth(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const > { >- LayoutUnit computedWidth; >- >- if (layoutBox.replaced()) >- computedWidth = Geometry::outOfFlowReplacedWidth(layoutContext, layoutBox); >- else >- computedWidth = Geometry::outOfFlowNonReplacedWidth(layoutContext, layoutBox); >- >- displayBox.setWidth(computedWidth); >+ displayBox.setWidth(Geometry::outOfFlowWidth(layoutContext, layoutBox)); > } > > void FormattingContext::computeFloatingWidth(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const > { >- LayoutUnit computedWidth; >- >- if (layoutBox.replaced()) >- computedWidth = Geometry::floatingReplacedWidth(layoutContext, layoutBox); >- else >- computedWidth = Geometry::floatingNonReplacedWidth(layoutContext, layoutBox); >- >- displayBox.setWidth(computedWidth); >+ displayBox.setWidth(Geometry::floatingWidth(layoutContext, layoutBox)); > } > > void FormattingContext::computeOutOfFlowHeight(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const > { >- LayoutUnit computedHeight; >- >- if (layoutBox.replaced()) >- computedHeight = Geometry::outOfFlowReplacedHeight(layoutContext, layoutBox); >- else >- computedHeight = Geometry::outOfFlowNonReplacedHeight(layoutContext, layoutBox); >- >- displayBox.setHeight(computedHeight); >+ displayBox.setHeight(Geometry::outOfFlowHeight(layoutContext, layoutBox)); > } > > void FormattingContext::computeFloatingHeight(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const > { >- LayoutUnit computedHeight; >- >- if (layoutBox.replaced()) >- computedHeight = Geometry::floatingReplacedHeight(layoutContext, layoutBox); >- else >- computedHeight = Geometry::floatingNonReplacedHeight(layoutContext, layoutBox); >- >- displayBox.setHeight(computedHeight); >+ displayBox.setHeight(Geometry::floatingHeight(layoutContext, layoutBox)); > } > > void FormattingContext::computeMargin(LayoutContext&, const Box&, Display::Box& displayBox) const >diff --git a/Source/WebCore/layout/FormattingContext.h b/Source/WebCore/layout/FormattingContext.h >index 143292b4bb23b3d8928065f809a786f6ed1053a8..c53fa66730a633ef56516d3d6d72f31294e2f34a 100644 >--- a/Source/WebCore/layout/FormattingContext.h >+++ b/Source/WebCore/layout/FormattingContext.h >@@ -91,26 +91,25 @@ protected: > // This class implements generic positioning and sizing. > class Geometry { > public: >- static LayoutUnit outOfFlowNonReplacedHeight(LayoutContext&, const Box&); >- static LayoutUnit outOfFlowNonReplacedWidth(LayoutContext&, const Box&); >+ static LayoutUnit outOfFlowHeight(LayoutContext&, const Box&); >+ static LayoutUnit outOfFlowWidth(LayoutContext&, const Box&); > >- static LayoutUnit outOfFlowReplacedHeight(LayoutContext&, const Box&); >- static LayoutUnit outOfFlowReplacedWidth(LayoutContext&, const Box&); >- >- static LayoutUnit floatingNonReplacedHeight(LayoutContext&, const Box&); >- static LayoutUnit floatingNonReplacedWidth(LayoutContext&, const Box&); >- >- static LayoutUnit floatingReplacedHeight(LayoutContext&, const Box&); >- static LayoutUnit floatingReplacedWidth(LayoutContext&, const Box&); >+ static LayoutUnit floatingHeight(LayoutContext&, const Box&); >+ static LayoutUnit floatingWidth(LayoutContext&, const Box&); > >- static LayoutPoint outOfFlowNonReplacedPosition(LayoutContext&, const Box&); >- static LayoutPoint outOfFlowReplacedPosition(LayoutContext&, const Box&); >+ static LayoutPoint outOfFlowPosition(LayoutContext&, const Box&); > >- static LayoutUnit replacedHeight(LayoutContext&, const Box&); >- static LayoutUnit replacedWidth(LayoutContext&, const Box&); >+ static LayoutUnit inlineReplacedHeight(LayoutContext&, const Box&); >+ static LayoutUnit inlineReplacedWidth(LayoutContext&, const Box&); > > static Display::Box::Edges computedBorder(LayoutContext&, const Box&); > static std::optional<Display::Box::Edges> computedPadding(LayoutContext&, const Box&); >+ >+ private: >+ static LayoutUnit outOfFlowReplacedHeight(LayoutContext&, const Box&); >+ static LayoutUnit outOfFlowReplacedWidth(LayoutContext&, const Box&); >+ static LayoutUnit floatingReplacedHeight(LayoutContext&, const Box&); >+ static LayoutUnit floatingReplacedWidth(LayoutContext&, const Box&); > }; > > private: >diff --git a/Source/WebCore/layout/FormattingContextGeometry.cpp b/Source/WebCore/layout/FormattingContextGeometry.cpp >index 789ff1a92610414595c41f53b14535a468ff53ba..c894bda2f07c19e25b5444abe07b28cccf2333ac 100644 >--- a/Source/WebCore/layout/FormattingContextGeometry.cpp >+++ b/Source/WebCore/layout/FormattingContextGeometry.cpp >@@ -64,7 +64,7 @@ static LayoutUnit shrinkToFitWidth(LayoutContext&, const Box&) > return { }; > } > >-LayoutUnit FormattingContext::Geometry::outOfFlowNonReplacedHeight(LayoutContext& layoutContext, const Box& layoutBox) >+static LayoutUnit outOfFlowNonReplacedHeight(LayoutContext& layoutContext, const Box& layoutBox) > { > ASSERT(layoutBox.isOutOfFlowPositioned() && !layoutBox.replaced()); > >@@ -128,7 +128,7 @@ LayoutUnit FormattingContext::Geometry::outOfFlowNonReplacedHeight(LayoutContext > return computedHeightValue; > } > >-LayoutUnit FormattingContext::Geometry::outOfFlowNonReplacedWidth(LayoutContext& layoutContext, const Box& layoutBox) >+static LayoutUnit outOfFlowNonReplacedWidth(LayoutContext& layoutContext, const Box& layoutBox) > { > ASSERT(layoutBox.isOutOfFlowPositioned() && !layoutBox.replaced()); > >@@ -192,7 +192,7 @@ LayoutUnit FormattingContext::Geometry::outOfFlowReplacedHeight(LayoutContext& l > // 10.6.5 Absolutely positioned, replaced elements > // > // The used value of 'height' is determined as for inline replaced elements. >- return replacedHeight(layoutContext, layoutBox); >+ return inlineReplacedHeight(layoutContext, layoutBox); > } > > LayoutUnit FormattingContext::Geometry::outOfFlowReplacedWidth(LayoutContext& layoutContext, const Box& layoutBox) >@@ -201,10 +201,10 @@ LayoutUnit FormattingContext::Geometry::outOfFlowReplacedWidth(LayoutContext& la > // 10.3.8 Absolutely positioned, replaced elements > // > // The used value of 'width' is determined as for inline replaced elements. >- return replacedWidth(layoutContext, layoutBox); >+ return inlineReplacedWidth(layoutContext, layoutBox); > } > >-LayoutUnit FormattingContext::Geometry::floatingNonReplacedHeight(LayoutContext& layoutContext, const Box& layoutBox) >+static LayoutUnit floatingNonReplacedHeight(LayoutContext& layoutContext, const Box& layoutBox) > { > ASSERT(layoutBox.isFloatingPositioned() && !layoutBox.replaced()); > // 10.6.6 Complicated cases >@@ -216,7 +216,7 @@ LayoutUnit FormattingContext::Geometry::floatingNonReplacedHeight(LayoutContext& > return height.isAuto() ? contentHeightForFormattingContextRoot(layoutContext, layoutBox) : LayoutUnit(height.value()); > } > >-LayoutUnit FormattingContext::Geometry::floatingNonReplacedWidth(LayoutContext& layoutContext, const Box& layoutBox) >+static LayoutUnit floatingNonReplacedWidth(LayoutContext& layoutContext, const Box& layoutBox) > { > ASSERT(layoutBox.isFloatingPositioned() && !layoutBox.replaced()); > // 10.3.5 Floating, non-replaced elements >@@ -231,7 +231,7 @@ LayoutUnit FormattingContext::Geometry::floatingReplacedHeight(LayoutContext& la > 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 replacedHeight(layoutContext, layoutBox); >+ return inlineReplacedHeight(layoutContext, layoutBox); > } > > LayoutUnit FormattingContext::Geometry::floatingReplacedWidth(LayoutContext& layoutContext, const Box& layoutBox) >@@ -240,10 +240,10 @@ LayoutUnit FormattingContext::Geometry::floatingReplacedWidth(LayoutContext& lay > // 10.3.6 Floating, replaced elements > // > // The used value of 'width' is determined as for inline replaced elements. >- return replacedWidth(layoutContext, layoutBox); >+ return inlineReplacedWidth(layoutContext, layoutBox); > } > >-LayoutPoint FormattingContext::Geometry::outOfFlowNonReplacedPosition(LayoutContext& layoutContext, const Box& layoutBox) >+static LayoutPoint outOfFlowNonReplacedPosition(LayoutContext& layoutContext, const Box& layoutBox) > { > // 10.3.7 Absolutely positioned, non-replaced elements (left/right) > // 10.6.4 Absolutely positioned, non-replaced elements (top/bottom) >@@ -338,7 +338,7 @@ LayoutPoint FormattingContext::Geometry::outOfFlowNonReplacedPosition(LayoutCont > return { computedLeftValue, computedTopValue }; > } > >-LayoutPoint FormattingContext::Geometry::outOfFlowReplacedPosition(LayoutContext& layoutContext, const Box& layoutBox) >+static LayoutPoint outOfFlowReplacedPosition(LayoutContext& layoutContext, const Box& layoutBox) > { > // 10.6.5 Absolutely positioned, replaced elements (top/bottom) > // 10.3.8 Absolutely positioned, replaced elements (left/right) >@@ -427,7 +427,42 @@ LayoutPoint FormattingContext::Geometry::outOfFlowReplacedPosition(LayoutContext > return { computedLeftValue, computedTopValue }; > } > >-LayoutUnit FormattingContext::Geometry::replacedHeight(LayoutContext&, const Box& layoutBox) >+LayoutUnit FormattingContext::Geometry::outOfFlowHeight(LayoutContext& layoutContext, const Box& layoutBox) >+{ >+ if (!layoutBox.replaced()) >+ return outOfFlowNonReplacedHeight(layoutContext, layoutBox); >+ return outOfFlowReplacedHeight(layoutContext, layoutBox); >+} >+ >+LayoutUnit FormattingContext::Geometry::outOfFlowWidth(LayoutContext& layoutContext, const Box& layoutBox) >+{ >+ if (!layoutBox.replaced()) >+ return outOfFlowNonReplacedWidth(layoutContext, layoutBox); >+ return outOfFlowReplacedWidth(layoutContext, layoutBox); >+} >+ >+LayoutUnit FormattingContext::Geometry::floatingHeight(LayoutContext& layoutContext, const Box& layoutBox) >+{ >+ if (!layoutBox.replaced()) >+ return floatingNonReplacedHeight(layoutContext, layoutBox); >+ return floatingReplacedHeight(layoutContext, layoutBox); >+} >+ >+LayoutUnit FormattingContext::Geometry::floatingWidth(LayoutContext& layoutContext, const Box& layoutBox) >+{ >+ if (!layoutBox.replaced()) >+ return floatingNonReplacedWidth(layoutContext, layoutBox); >+ return floatingReplacedWidth(layoutContext, layoutBox); >+} >+ >+LayoutPoint FormattingContext::Geometry::outOfFlowPosition(LayoutContext& layoutContext, const Box& layoutBox) >+{ >+ if (!layoutBox.replaced()) >+ return outOfFlowNonReplacedPosition(layoutContext, layoutBox); >+ return outOfFlowReplacedPosition(layoutContext, layoutBox); >+} >+ >+LayoutUnit FormattingContext::Geometry::inlineReplacedHeight(LayoutContext&, const Box& layoutBox) > { > ASSERT((layoutBox.isOutOfFlowPositioned() || layoutBox.isFloatingPositioned() || layoutBox.isInFlow()) && layoutBox.replaced()); > // 10.6.5 Absolutely positioned, replaced elements. The used value of 'height' is determined as for inline replaced elements. >@@ -471,7 +506,7 @@ LayoutUnit FormattingContext::Geometry::replacedHeight(LayoutContext&, const Box > return computedHeightValue; > } > >-LayoutUnit FormattingContext::Geometry::replacedWidth(LayoutContext&, const Box& layoutBox) >+LayoutUnit FormattingContext::Geometry::inlineReplacedWidth(LayoutContext&, const Box& layoutBox) > { > ASSERT((layoutBox.isOutOfFlowPositioned() || layoutBox.isFloatingPositioned() || layoutBox.isInFlow()) && layoutBox.replaced()); > >diff --git a/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp b/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp >index 5c06a65408a0b0b4f3256125f0599eac0c031f1a..d9f537d736f5fe94360d04797a318482940e2ce1 100644 >--- a/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp >+++ b/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp >@@ -131,42 +131,22 @@ Ref<FloatingState> BlockFormattingContext::createOrFindFloatingState(LayoutConte > > void BlockFormattingContext::computeStaticPosition(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const > { >- auto topLeft = Geometry::staticPosition(layoutContext, layoutBox); >- displayBox.setTopLeft(topLeft); >+ displayBox.setTopLeft(Geometry::staticPosition(layoutContext, layoutBox)); > } > > void BlockFormattingContext::computeInFlowPositionedPosition(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const > { >- auto topLeft = Geometry::inFlowPositionedPosition(layoutContext, layoutBox); >- displayBox.setTopLeft(topLeft); >+ displayBox.setTopLeft(Geometry::inFlowPositionedPosition(layoutContext, layoutBox)); > } > > void BlockFormattingContext::computeInFlowHeight(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const > { >- LayoutUnit computedHeight; >- >- if (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 >- computedHeight = FormattingContext::Geometry::replacedHeight(layoutContext, layoutBox); >- } else >- computedHeight = Geometry::inFlowNonReplacedHeight(layoutContext, layoutBox); >- >- displayBox.setHeight(computedHeight); >+ displayBox.setHeight(Geometry::inFlowHeight(layoutContext, layoutBox)); > } > > void BlockFormattingContext::computeInFlowWidth(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const > { >- LayoutUnit computedWidth; >- >- if (layoutBox.replaced()) { >- // 10.3.4 Block-level, replaced elements in normal flow >- // The used value of 'width' is determined as for inline replaced elements >- computedWidth = FormattingContext::Geometry::replacedWidth(layoutContext, layoutBox); >- } else >- computedWidth = Geometry::inFlowNonReplacedWidth(layoutContext, layoutBox); >- >- displayBox.setWidth(computedWidth); >+ displayBox.setWidth(Geometry::inFlowWidth(layoutContext, layoutBox)); > } > > void BlockFormattingContext::computeMargin(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 7111d26d05cd96edc7fc10d47f9f5e8e855d2a06..3710853cefb703c418c61afe3168d2bb49a53588 100644 >--- a/Source/WebCore/layout/blockformatting/BlockFormattingContext.h >+++ b/Source/WebCore/layout/blockformatting/BlockFormattingContext.h >@@ -60,13 +60,17 @@ private: > // This class implements positioning and sizing for boxes participating in a block formatting context. > class Geometry { > public: >- static LayoutUnit inFlowNonReplacedHeight(LayoutContext&, const Box&); >- static LayoutUnit inFlowNonReplacedWidth(LayoutContext&, const Box&); >+ static LayoutUnit inFlowHeight(LayoutContext&, const Box&); >+ static LayoutUnit inFlowWidth(LayoutContext&, const Box&); > > static LayoutPoint staticPosition(LayoutContext&, const Box&); > static LayoutPoint inFlowPositionedPosition(LayoutContext&, const Box&); > > static Display::Box::Edges computedMargin(LayoutContext&, const Box&); >+ >+ private: >+ static LayoutUnit inFlowNonReplacedHeight(LayoutContext&, const Box&); >+ static LayoutUnit inFlowNonReplacedWidth(LayoutContext&, const Box&); > }; > > // This class implements margin collapsing for block formatting context. >diff --git a/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp b/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp >index 388f248144db85ec959767016283f0a69a570a5f..106b273654896269ebce1db7498a8a7de7e9a960 100644 >--- a/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp >+++ b/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp >@@ -236,6 +236,24 @@ LayoutPoint BlockFormattingContext::Geometry::inFlowPositionedPosition(LayoutCon > return { displayBox.left() + leftDelta, displayBox.top() + topDelta }; > } > >+LayoutUnit BlockFormattingContext::Geometry::inFlowHeight(LayoutContext& layoutContext, const Box& layoutBox) >+{ >+ if (!layoutBox.replaced()) >+ return inFlowNonReplacedHeight(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); >+} >+ >+LayoutUnit BlockFormattingContext::Geometry::inFlowWidth(LayoutContext& layoutContext, const Box& layoutBox) >+{ >+ if (!layoutBox.replaced()) >+ return inFlowNonReplacedWidth(layoutContext, layoutBox); >+ // 10.3.4 Block-level, replaced elements in normal flow >+ // The used value of 'width' is determined as for inline replaced elements >+ return FormattingContext::Geometry::inlineReplacedWidth(layoutContext, layoutBox); >+} >+ > Display::Box::Edges BlockFormattingContext::Geometry::computedMargin(LayoutContext& layoutContext, const Box& layoutBox) > { > auto& style = layoutBox.style();
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 186179
: 341734