Title: [294192] trunk/Source/WebCore
- Revision
- 294192
- Author
- za...@apple.com
- Date
- 2022-05-14 06:30:56 -0700 (Sat, 14 May 2022)
Log Message
[FFC][Integration] Do not reset the effective display value for flex root
https://bugs.webkit.org/show_bug.cgi?id=240412
Reviewed by Antti Koivisto.
Non-inline formatting roots (e.g. flex) should not need display type adjustment.
* layout/integration/LayoutIntegrationBoxTree.cpp:
(WebCore::LayoutIntegration::rootBoxStyle):
(WebCore::LayoutIntegration::rootBoxFirstLineStyle):
(WebCore::LayoutIntegration::BoxTree::BoxTree):
(WebCore::LayoutIntegration::BoxTree::updateStyle):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (294191 => 294192)
--- trunk/Source/WebCore/ChangeLog 2022-05-14 13:19:52 UTC (rev 294191)
+++ trunk/Source/WebCore/ChangeLog 2022-05-14 13:30:56 UTC (rev 294192)
@@ -1,5 +1,20 @@
2022-05-14 Alan Bujtas <za...@apple.com>
+ [FFC][Integration] Do not reset the effective display value for flex root
+ https://bugs.webkit.org/show_bug.cgi?id=240412
+
+ Reviewed by Antti Koivisto.
+
+ Non-inline formatting roots (e.g. flex) should not need display type adjustment.
+
+ * layout/integration/LayoutIntegrationBoxTree.cpp:
+ (WebCore::LayoutIntegration::rootBoxStyle):
+ (WebCore::LayoutIntegration::rootBoxFirstLineStyle):
+ (WebCore::LayoutIntegration::BoxTree::BoxTree):
+ (WebCore::LayoutIntegration::BoxTree::updateStyle):
+
+2022-05-14 Alan Bujtas <za...@apple.com>
+
[LFC] LayoutState should track the integration formatting context type
https://bugs.webkit.org/show_bug.cgi?id=240411
Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp (294191 => 294192)
--- trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp 2022-05-14 13:19:52 UTC (rev 294191)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp 2022-05-14 13:30:56 UTC (rev 294192)
@@ -57,10 +57,11 @@
// FIXME: see webkit.org/b/230964
#define CAN_USE_FIRST_LINE_STYLE_RESOLVE 1
-static RenderStyle rootBoxStyle(const RenderStyle& style)
+static RenderStyle rootBoxStyle(const RenderBlock& rootRenderer)
{
- auto clonedStyle = RenderStyle::clone(style);
- clonedStyle.setEffectiveDisplay(DisplayType::Block);
+ auto clonedStyle = RenderStyle::clone(rootRenderer.style());
+ if (is<RenderBlockFlow>(rootRenderer))
+ clonedStyle.setEffectiveDisplay(DisplayType::Block);
return clonedStyle;
}
@@ -71,7 +72,8 @@
if (rootRenderer.style() == firstLineStyle)
return { };
auto clonedStyle = RenderStyle::clonePtr(firstLineStyle);
- clonedStyle->setEffectiveDisplay(DisplayType::Block);
+ if (is<RenderBlockFlow>(rootRenderer))
+ clonedStyle->setEffectiveDisplay(DisplayType::Block);
return clonedStyle;
#else
UNUSED_PARAM(rootRenderer);
@@ -81,7 +83,7 @@
BoxTree::BoxTree(RenderBlock& rootRenderer)
: m_rootRenderer(rootRenderer)
- , m_root(Layout::Box::ElementAttributes { Layout::Box::ElementType::IntegrationBlockContainer }, rootBoxStyle(rootRenderer.style()), rootBoxFirstLineStyle(rootRenderer))
+ , m_root(Layout::Box::ElementAttributes { Layout::Box::ElementType::IntegrationBlockContainer }, rootBoxStyle(rootRenderer), rootBoxFirstLineStyle(rootRenderer))
{
if (rootRenderer.isAnonymous())
m_root.setIsAnonymous();
@@ -217,7 +219,7 @@
};
if (&layoutBox == &rootLayoutBox())
- layoutBox.updateStyle(rootBoxStyle(style), rootBoxFirstLineStyle(downcast<RenderBlockFlow>(renderer)));
+ layoutBox.updateStyle(rootBoxStyle(downcast<RenderBlock>(renderer)), rootBoxFirstLineStyle(downcast<RenderBlock>(renderer)));
else
layoutBox.updateStyle(style, firstLineStyle());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes