Title: [254410] trunk/Source/WebCore
- Revision
- 254410
- Author
- [email protected]
- Date
- 2020-01-11 20:21:40 -0800 (Sat, 11 Jan 2020)
Log Message
[LFC] Introduce the concept of independent formatting context
https://bugs.webkit.org/show_bug.cgi?id=206137
<rdar://problem/58508015>
Reviewed by Sam Weinig.
At this point it is just about absolute positioned block level boxes since we don't support the "contain" property.
https://www.w3.org/TR/css-display-3/#independent-formatting-context
* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::establishesFormattingContext const):
(WebCore::Layout::Box::establishesIndependentFormattingContext const):
* layout/layouttree/LayoutBox.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (254409 => 254410)
--- trunk/Source/WebCore/ChangeLog 2020-01-12 01:46:52 UTC (rev 254409)
+++ trunk/Source/WebCore/ChangeLog 2020-01-12 04:21:40 UTC (rev 254410)
@@ -1,3 +1,19 @@
+2020-01-11 Zalan Bujtas <[email protected]>
+
+ [LFC] Introduce the concept of independent formatting context
+ https://bugs.webkit.org/show_bug.cgi?id=206137
+ <rdar://problem/58508015>
+
+ Reviewed by Sam Weinig.
+
+ At this point it is just about absolute positioned block level boxes since we don't support the "contain" property.
+ https://www.w3.org/TR/css-display-3/#independent-formatting-context
+
+ * layout/layouttree/LayoutBox.cpp:
+ (WebCore::Layout::Box::establishesFormattingContext const):
+ (WebCore::Layout::Box::establishesIndependentFormattingContext const):
+ * layout/layouttree/LayoutBox.h:
+
2020-01-11 Alex Christensen <[email protected]>
Expose frame information on _WKResourceLoadInfo
Modified: trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp (254409 => 254410)
--- trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp 2020-01-12 01:46:52 UTC (rev 254409)
+++ trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp 2020-01-12 04:21:40 UTC (rev 254410)
@@ -75,7 +75,7 @@
{
// We need the final tree structure to tell whether a box establishes a certain formatting context.
ASSERT(!Phase::isInTreeBuilding());
- return establishesBlockFormattingContext() || establishesInlineFormattingContext() || establishesTableFormattingContext();
+ return establishesBlockFormattingContext() || establishesInlineFormattingContext() || establishesTableFormattingContext() || establishesIndependentFormattingContext();
}
bool Box::establishesBlockFormattingContext() const
@@ -131,6 +131,12 @@
return isTableBox();
}
+bool Box::establishesIndependentFormattingContext() const
+{
+ // FIXME: This is where we would check for 'contain' property.
+ return isAbsolutelyPositioned();
+}
+
bool Box::establishesBlockFormattingContextOnly() const
{
return establishesBlockFormattingContext() && !establishesInlineFormattingContext();
Modified: trunk/Source/WebCore/layout/layouttree/LayoutBox.h (254409 => 254410)
--- trunk/Source/WebCore/layout/layouttree/LayoutBox.h 2020-01-12 01:46:52 UTC (rev 254409)
+++ trunk/Source/WebCore/layout/layouttree/LayoutBox.h 2020-01-12 04:21:40 UTC (rev 254410)
@@ -69,9 +69,11 @@
bool establishesFormattingContext() const;
bool establishesBlockFormattingContext() const;
+ bool establishesInlineFormattingContext() const;
bool establishesTableFormattingContext() const;
+ bool establishesIndependentFormattingContext() const;
+
bool establishesBlockFormattingContextOnly() const;
- bool establishesInlineFormattingContext() const;
bool establishesInlineFormattingContextOnly() const;
bool isInFlow() const { return !isFloatingOrOutOfFlowPositioned(); }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes