WebKit Bugzilla
Attachment 360961 Details for
Bug 194188
: [LFC] Initialize ICB's style with fixed width/height.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
Patch.txt (text/plain), 4.94 KB, created by
zalan
on 2019-02-01 22:06:54 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-02-01 22:06:54 PST
Size:
4.94 KB
patch
obsolete
>diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index e96f7e7c044..f56b04548d8 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2019-02-01 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC] Initialize ICB's style with fixed width/height. >+ https://bugs.webkit.org/show_bug.cgi?id=194188 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Let's set ICB's logical width/height to Fixed so that it's available when we try to resolve a box's height >+ in FormattingContext::Geometry::computedHeightValue() by using the containing block's height (ICB in this case). >+ >+ * layout/LayoutState.cpp: >+ (WebCore::Layout::LayoutState::LayoutState): >+ * layout/LayoutState.h: >+ * layout/layouttree/LayoutTreeBuilder.cpp: >+ (WebCore::Layout::TreeBuilder::createLayoutTree): >+ > 2019-02-01 Zalan Bujtas <zalan@apple.com> > > [LFC] Add missing case to out-of-flow non-replaced horizontal used margin value computation >diff --git a/Source/WebCore/layout/LayoutState.cpp b/Source/WebCore/layout/LayoutState.cpp >index c98628b8dcb..7af8eb16f11 100644 >--- a/Source/WebCore/layout/LayoutState.cpp >+++ b/Source/WebCore/layout/LayoutState.cpp >@@ -45,7 +45,7 @@ namespace Layout { > > WTF_MAKE_ISO_ALLOCATED_IMPL(LayoutState); > >-LayoutState::LayoutState(const Container& initialContainingBlock, const LayoutSize& containerSize) >+LayoutState::LayoutState(const Container& initialContainingBlock) > : m_initialContainingBlock(makeWeakPtr(initialContainingBlock)) > { > // LayoutState is always initiated with the ICB. >@@ -59,8 +59,8 @@ LayoutState::LayoutState(const Container& initialContainingBlock, const LayoutSi > displayBox.setBorder({ }); > displayBox.setPadding({ }); > displayBox.setTopLeft({ }); >- displayBox.setContentBoxHeight(containerSize.height()); >- displayBox.setContentBoxWidth(containerSize.width()); >+ displayBox.setContentBoxHeight(initialContainingBlock.style().logicalHeight().value()); >+ displayBox.setContentBoxWidth(initialContainingBlock.style().logicalWidth().value()); > > m_formattingContextRootListForLayout.add(&initialContainingBlock); > } >diff --git a/Source/WebCore/layout/LayoutState.h b/Source/WebCore/layout/LayoutState.h >index 26159214f00..2373e66807e 100644 >--- a/Source/WebCore/layout/LayoutState.h >+++ b/Source/WebCore/layout/LayoutState.h >@@ -59,7 +59,7 @@ class FormattingState; > class LayoutState { > WTF_MAKE_ISO_ALLOCATED(LayoutState); > public: >- LayoutState(const Container& initialContainingBlock, const LayoutSize&); >+ LayoutState(const Container& initialContainingBlock); > > void updateLayout(); > void styleChanged(const Box&, StyleDiff); >diff --git a/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp b/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp >index 5dc5c471355..36dbf9f42d1 100644 >--- a/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp >+++ b/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp >@@ -51,7 +51,11 @@ namespace Layout { > > std::unique_ptr<Container> TreeBuilder::createLayoutTree(const RenderView& renderView) > { >- std::unique_ptr<Container> initialContainingBlock(new BlockContainer(WTF::nullopt, RenderStyle::clone(renderView.style()))); >+ auto style = RenderStyle::clone(renderView.style()); >+ style.setLogicalWidth(Length(renderView.width(), Fixed)); >+ style.setLogicalHeight(Length(renderView.height(), Fixed)); >+ >+ std::unique_ptr<Container> initialContainingBlock(new BlockContainer(WTF::nullopt, WTFMove(style))); > TreeBuilder::createSubTree(renderView, *initialContainingBlock); > return initialContainingBlock; > } >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index c3150821aac..19c24541c57 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,12 @@ >+2019-02-01 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC] Initialize ICB's style with fixed width/height. >+ https://bugs.webkit.org/show_bug.cgi?id=194188 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * LayoutReloaded/misc/LFC-passing-tests.txt: >+ > 2019-02-01 Zalan Bujtas <zalan@apple.com> > > [LFC] Add missing case to out-of-flow non-replaced horizontal used margin value computation >diff --git a/Tools/LayoutReloaded/misc/LFC-passing-tests.txt b/Tools/LayoutReloaded/misc/LFC-passing-tests.txt >index e22fc3af156..71a47a6e2c1 100644 >--- a/Tools/LayoutReloaded/misc/LFC-passing-tests.txt >+++ b/Tools/LayoutReloaded/misc/LFC-passing-tests.txt >@@ -504,8 +504,10 @@ css2.1/t0803-c5504-imrgn-l-00-b-ag.html > css2.1/20110323/abspos-containing-block-initial-005a.htm > css2.1/20110323/abspos-containing-block-initial-005c.htm > css2.1/20110323/abspos-containing-block-initial-007.htm >+css2.1/20110323/abspos-containing-block-initial-009a.htm > css2.1/20110323/abspos-containing-block-initial-009b.htm > css2.1/20110323/abspos-containing-block-initial-009e.htm >+css2.1/20110323/abspos-containing-block-initial-009f.htm > css2.1/t0803-c5504-mrgn-l-00-c-ag.html > css2.1/t0803-c5504-mrgn-l-02-c.html > css2.1/t0803-c5504-mrgn-l-03-c.html
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 194188
: 360961