Title: [256895] trunk
- Revision
- 256895
- Author
- za...@apple.com
- Date
- 2020-02-18 17:23:50 -0800 (Tue, 18 Feb 2020)
Log Message
[LFC][IFC] Replaced elements can also establish formatting contexts.
https://bugs.webkit.org/show_bug.cgi?id=207923
<rdar://problem/59571203>
Reviewed by Simon Fraser.
Source/WebCore:
While replaced boxes (leaf boxes) can also establish formatting contexts (e.g. style="inline-block"), we
only need to construct formatting context objects for the root's descendants (and not for the root itself).
Test: fast/layoutformattingcontext/block-only/replaced-as-inline-block-simple.html
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
LayoutTests:
* fast/layoutformattingcontext/block-only/replaced-as-inline-block-simple-expected.html: Added.
* fast/layoutformattingcontext/block-only/replaced-as-inline-block-simple.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (256894 => 256895)
--- trunk/LayoutTests/ChangeLog 2020-02-19 01:16:08 UTC (rev 256894)
+++ trunk/LayoutTests/ChangeLog 2020-02-19 01:23:50 UTC (rev 256895)
@@ -1,3 +1,14 @@
+2020-02-18 Zalan Bujtas <za...@apple.com>
+
+ [LFC][IFC] Replaced elements can also establish formatting contexts.
+ https://bugs.webkit.org/show_bug.cgi?id=207923
+ <rdar://problem/59571203>
+
+ Reviewed by Simon Fraser.
+
+ * fast/layoutformattingcontext/block-only/replaced-as-inline-block-simple-expected.html: Added.
+ * fast/layoutformattingcontext/block-only/replaced-as-inline-block-simple.html: Added.
+
2020-02-18 Jacob Uphoff <jacob_uph...@apple.com>
Changed results due to ANGLE use
Added: trunk/LayoutTests/fast/layoutformattingcontext/block-only/replaced-as-inline-block-simple-expected.html (0 => 256895)
--- trunk/LayoutTests/fast/layoutformattingcontext/block-only/replaced-as-inline-block-simple-expected.html (rev 0)
+++ trunk/LayoutTests/fast/layoutformattingcontext/block-only/replaced-as-inline-block-simple-expected.html 2020-02-19 01:23:50 UTC (rev 256895)
@@ -0,0 +1,9 @@
+<!-- webkit-test-runner [ internal:LayoutFormattingContextEnabled=true internal:LayoutFormattingContextIntegrationEnabled=false ] -->
+<style>
+div {
+ width: 100px;
+ height: 100px;
+ background-color: green;
+}
+</style>
+<div></div>
Added: trunk/LayoutTests/fast/layoutformattingcontext/block-only/replaced-as-inline-block-simple.html (0 => 256895)
--- trunk/LayoutTests/fast/layoutformattingcontext/block-only/replaced-as-inline-block-simple.html (rev 0)
+++ trunk/LayoutTests/fast/layoutformattingcontext/block-only/replaced-as-inline-block-simple.html 2020-02-19 01:23:50 UTC (rev 256895)
@@ -0,0 +1,10 @@
+<!-- webkit-test-runner [ internal:LayoutFormattingContextEnabled=true internal:LayoutFormattingContextIntegrationEnabled=false ] -->
+<style>
+video {
+ display: inline-block;
+ width: 100px;
+ height: 100px;
+ background-color: green;
+}
+</style>
+<video>
Modified: trunk/Source/WebCore/ChangeLog (256894 => 256895)
--- trunk/Source/WebCore/ChangeLog 2020-02-19 01:16:08 UTC (rev 256894)
+++ trunk/Source/WebCore/ChangeLog 2020-02-19 01:23:50 UTC (rev 256895)
@@ -1,3 +1,19 @@
+2020-02-18 Zalan Bujtas <za...@apple.com>
+
+ [LFC][IFC] Replaced elements can also establish formatting contexts.
+ https://bugs.webkit.org/show_bug.cgi?id=207923
+ <rdar://problem/59571203>
+
+ Reviewed by Simon Fraser.
+
+ While replaced boxes (leaf boxes) can also establish formatting contexts (e.g. style="inline-block"), we
+ only need to construct formatting context objects for the root's descendants (and not for the root itself).
+
+ Test: fast/layoutformattingcontext/block-only/replaced-as-inline-block-simple.html
+
+ * layout/inlineformatting/InlineFormattingContext.cpp:
+ (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
+
2020-02-18 Said Abou-Hallawa <sabouhall...@apple.com>
Allow different back-ends for ImageBuffer
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp (256894 => 256895)
--- trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp 2020-02-19 01:16:08 UTC (rev 256894)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp 2020-02-19 01:23:50 UTC (rev 256895)
@@ -89,8 +89,7 @@
if (layoutBox->isAtomicInlineLevelBox() || layoutBox->isFloatingPositioned()) {
// Inline-blocks, inline-tables and replaced elements (img, video) can be sized but not yet positioned.
- if (layoutBox->establishesFormattingContext()) {
- ASSERT(is<ContainerBox>(*layoutBox));
+ if (is<ContainerBox>(layoutBox) && layoutBox->establishesFormattingContext()) {
ASSERT(layoutBox->isInlineBlockBox() || layoutBox->isInlineTableBox() || layoutBox->isFloatingPositioned());
auto& containerBox = downcast<ContainerBox>(*layoutBox);
computeBorderAndPadding(containerBox, horizontalConstraints);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes