Title: [258836] trunk/Source/WebCore
- Revision
- 258836
- Author
- [email protected]
- Date
- 2020-03-23 07:22:04 -0700 (Mon, 23 Mar 2020)
Log Message
[LFC] Box::establishesBlockFormattingContext should check isInitialContainingBlock
https://bugs.webkit.org/show_bug.cgi?id=209390
<rdar://problem/60735021>
Reviewed by Antti Koivisto.
It's more correct to call isInitialContainingBlock() to check if the current box is the ICB.
* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::establishesBlockFormattingContext const):
(WebCore::Layout::Box::initialContainingBlock const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (258835 => 258836)
--- trunk/Source/WebCore/ChangeLog 2020-03-23 13:33:51 UTC (rev 258835)
+++ trunk/Source/WebCore/ChangeLog 2020-03-23 14:22:04 UTC (rev 258836)
@@ -1,3 +1,17 @@
+2020-03-23 Zalan Bujtas <[email protected]>
+
+ [LFC] Box::establishesBlockFormattingContext should check isInitialContainingBlock
+ https://bugs.webkit.org/show_bug.cgi?id=209390
+ <rdar://problem/60735021>
+
+ Reviewed by Antti Koivisto.
+
+ It's more correct to call isInitialContainingBlock() to check if the current box is the ICB.
+
+ * layout/layouttree/LayoutBox.cpp:
+ (WebCore::Layout::Box::establishesBlockFormattingContext const):
+ (WebCore::Layout::Box::initialContainingBlock const):
+
2020-03-23 Antoine Quint <[email protected]>
[Web Animations] ElementAnimationRareData is created too frequently
Modified: trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp (258835 => 258836)
--- trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp 2020-03-23 13:33:51 UTC (rev 258835)
+++ trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp 2020-03-23 14:22:04 UTC (rev 258836)
@@ -69,8 +69,8 @@
bool Box::establishesBlockFormattingContext() const
{
- // Initial Containing Block always creates a new (inital) block formatting context.
- if (!parent())
+ // ICB always creates a new (inital) block formatting context.
+ if (isInitialContainingBlock())
return true;
if (isTableWrapperBox())
@@ -245,10 +245,10 @@
if (isInitialContainingBlock())
return downcast<ContainerBox>(*this);
- auto* parent = this->parent();
- for (; parent->parent(); parent = parent->parent()) { }
+ auto* ancestor = parent();
+ for (; ancestor->parent(); ancestor = ancestor->parent()) { }
- return *parent;
+ return *ancestor;
}
bool Box::isInFormattingContextOf(const ContainerBox& formattingContextRoot) const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes