Title: [234159] trunk/Source/WebCore
- Revision
- 234159
- Author
- [email protected]
- Date
- 2018-07-24 11:48:25 -0700 (Tue, 24 Jul 2018)
Log Message
[LFC][IFC] BlockContainer::establishesInlineFormattingContext should only check the first inflow child.
https://bugs.webkit.org/show_bug.cgi?id=187965
Reviewed by Antti Koivisto.
* layout/layouttree/LayoutBlockContainer.cpp:
(WebCore::Layout::BlockContainer::establishesInlineFormattingContext const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (234158 => 234159)
--- trunk/Source/WebCore/ChangeLog 2018-07-24 18:34:24 UTC (rev 234158)
+++ trunk/Source/WebCore/ChangeLog 2018-07-24 18:48:25 UTC (rev 234159)
@@ -1,3 +1,13 @@
+2018-07-24 Zalan Bujtas <[email protected]>
+
+ [LFC][IFC] BlockContainer::establishesInlineFormattingContext should only check the first inflow child.
+ https://bugs.webkit.org/show_bug.cgi?id=187965
+
+ Reviewed by Antti Koivisto.
+
+ * layout/layouttree/LayoutBlockContainer.cpp:
+ (WebCore::Layout::BlockContainer::establishesInlineFormattingContext const):
+
2018-07-24 Myles C. Maxfield <[email protected]>
[Cocoa] Stop crashing in lastResortFallbackFont()
Modified: trunk/Source/WebCore/layout/layouttree/LayoutBlockContainer.cpp (234158 => 234159)
--- trunk/Source/WebCore/layout/layouttree/LayoutBlockContainer.cpp 2018-07-24 18:34:24 UTC (rev 234158)
+++ trunk/Source/WebCore/layout/layouttree/LayoutBlockContainer.cpp 2018-07-24 18:48:25 UTC (rev 234159)
@@ -45,11 +45,12 @@
{
// 9.4.2 Inline formatting contexts
// An inline formatting context is established by a block container box that contains no block-level boxes.
- for (auto* child = firstInFlowChild(); child; child = child->nextInFlowSibling()) {
- if (child->isBlockLevelBox())
- return false;
- }
- return hasInFlowOrFloatingChild();
+
+ // It's enough to check the first in-flow child since we can't have both block and inline level sibling boxes.
+ if (auto* firstInFlowChild = this->firstInFlowChild())
+ return firstInFlowChild->isInlineLevelBox();
+
+ return false;
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes