Title: [256732] trunk
- Revision
- 256732
- Author
- [email protected]
- Date
- 2020-02-17 07:53:41 -0800 (Mon, 17 Feb 2020)
Log Message
[LFC] The initial containing block does not necessarily have in-flow content.
https://bugs.webkit.org/show_bug.cgi?id=207833
<rdar://problem/59500650>
Reviewed by Antti Koivisto.
Source/WebCore:
Test: fast/layoutformattingcontext/html-is-absolute-positioned.html
When the <html> is out-of-flow positioned, the initial containing block has no in-flow direct children.
* layout/LayoutContext.cpp:
(WebCore::Layout::LayoutContext::layoutFormattingContextSubtree):
LayoutTests:
* fast/layoutformattingcontext/html-is-absolute-positioned-expected.html: Added.
* fast/layoutformattingcontext/html-is-absolute-positioned.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (256731 => 256732)
--- trunk/LayoutTests/ChangeLog 2020-02-17 15:37:39 UTC (rev 256731)
+++ trunk/LayoutTests/ChangeLog 2020-02-17 15:53:41 UTC (rev 256732)
@@ -1,3 +1,14 @@
+2020-02-17 Zalan Bujtas <[email protected]>
+
+ [LFC] The initial containing block does not necessarily have in-flow content.
+ https://bugs.webkit.org/show_bug.cgi?id=207833
+ <rdar://problem/59500650>
+
+ Reviewed by Antti Koivisto.
+
+ * fast/layoutformattingcontext/html-is-absolute-positioned-expected.html: Added.
+ * fast/layoutformattingcontext/html-is-absolute-positioned.html: Added.
+
2020-02-13 Carlos Alberto Lopez Perez <[email protected]>
Update WPT tests for encoding
Added: trunk/LayoutTests/fast/layoutformattingcontext/html-is-absolute-positioned-expected.html (0 => 256732)
--- trunk/LayoutTests/fast/layoutformattingcontext/html-is-absolute-positioned-expected.html (rev 0)
+++ trunk/LayoutTests/fast/layoutformattingcontext/html-is-absolute-positioned-expected.html 2020-02-17 15:53:41 UTC (rev 256732)
@@ -0,0 +1,2 @@
+<!-- webkit-test-runner [ internal:LayoutFormattingContextEnabled=true internal:LayoutFormattingContextIntegrationEnabled=false ] -->
+<div style="position:absolute; left:100px; top:100px; width:100px; height:100px; border: 1px solid green"></div>
\ No newline at end of file
Added: trunk/LayoutTests/fast/layoutformattingcontext/html-is-absolute-positioned.html (0 => 256732)
--- trunk/LayoutTests/fast/layoutformattingcontext/html-is-absolute-positioned.html (rev 0)
+++ trunk/LayoutTests/fast/layoutformattingcontext/html-is-absolute-positioned.html 2020-02-17 15:53:41 UTC (rev 256732)
@@ -0,0 +1,2 @@
+<!DOCTYPE html><!-- webkit-test-runner [ internal:LayoutFormattingContextEnabled=true internal:LayoutFormattingContextIntegrationEnabled=false ] -->
+<html style="position:absolute; left:100px; top:100px; width:100px; height:100px; border: 1px solid green"></html>
\ No newline at end of file
Modified: trunk/Source/WebCore/ChangeLog (256731 => 256732)
--- trunk/Source/WebCore/ChangeLog 2020-02-17 15:37:39 UTC (rev 256731)
+++ trunk/Source/WebCore/ChangeLog 2020-02-17 15:53:41 UTC (rev 256732)
@@ -1,3 +1,18 @@
+2020-02-17 Zalan Bujtas <[email protected]>
+
+ [LFC] The initial containing block does not necessarily have in-flow content.
+ https://bugs.webkit.org/show_bug.cgi?id=207833
+ <rdar://problem/59500650>
+
+ Reviewed by Antti Koivisto.
+
+ Test: fast/layoutformattingcontext/html-is-absolute-positioned.html
+
+ When the <html> is out-of-flow positioned, the initial containing block has no in-flow direct children.
+
+ * layout/LayoutContext.cpp:
+ (WebCore::Layout::LayoutContext::layoutFormattingContextSubtree):
+
2020-02-17 Don Olmstead <[email protected]>
[CMake] Use builtin targets
Modified: trunk/Source/WebCore/layout/LayoutContext.cpp (256731 => 256732)
--- trunk/Source/WebCore/layout/LayoutContext.cpp 2020-02-17 15:37:39 UTC (rev 256731)
+++ trunk/Source/WebCore/layout/LayoutContext.cpp 2020-02-17 15:53:41 UTC (rev 256732)
@@ -95,9 +95,11 @@
auto formattingContext = createFormattingContext(formattingContextRoot, layoutState());
auto& displayBox = layoutState().displayBoxForLayoutBox(formattingContextRoot);
- auto horizontalConstraints = HorizontalConstraints { displayBox.contentBoxLeft(), displayBox.contentBoxWidth() };
- auto verticalConstraints = VerticalConstraints { displayBox.contentBoxTop(), { } };
- formattingContext->layoutInFlowContent(invalidationState, horizontalConstraints, verticalConstraints);
+ if (formattingContextRoot.hasInFlowOrFloatingChild()) {
+ auto horizontalConstraints = HorizontalConstraints { displayBox.contentBoxLeft(), displayBox.contentBoxWidth() };
+ auto verticalConstraints = VerticalConstraints { displayBox.contentBoxTop(), { } };
+ formattingContext->layoutInFlowContent(invalidationState, horizontalConstraints, verticalConstraints);
+ }
// FIXME: layoutFormattingContextSubtree() does not perform layout on the root, rather it lays out the root's content.
// It constructs an FC for descendant boxes and runs layout on them. The formattingContextRoot is laid out in the FC in which it lives (parent formatting context).
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes