Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 85b11ecf4984a52240fd2fcb15352bf41e7da77d
https://github.com/WebKit/WebKit/commit/85b11ecf4984a52240fd2fcb15352bf41e7da77d
Author: Antti Koivisto <[email protected]>
Date: 2022-09-20 (Tue, 20 Sep 2022)
Changed paths:
M Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp
M Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp
M Source/WebCore/layout/integration/LayoutIntegrationBoxTree.h
M
Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentBuilder.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
M Source/WebCore/layout/layouttree/LayoutBox.h
M Source/WebCore/layout/layouttree/LayoutContainerBox.h
M Source/WebCore/layout/layouttree/LayoutLineBreakBox.cpp
M Source/WebCore/layout/layouttree/LayoutLineBreakBox.h
M Source/WebCore/layout/layouttree/LayoutReplacedBox.cpp
M Source/WebCore/layout/layouttree/LayoutReplacedBox.h
Log Message:
-----------
[IFC][Integration] Inline blocks should be represented by ContainerBox
instead of ReplacedBox
https://bugs.webkit.org/show_bug.cgi?id=245357
<rdar://100116780>
Reviewed by Alan Bujtas.
Inline block and replaced element are separate concepts though they behave
quite similarly externally. This is needed
to make progress with integration.
* Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:
(WebCore::Layout::LineBoxBuilder::constructInlineLevelBoxes):
(WebCore::Layout::LineBoxBuilder::adjustIdeographicBaselineIfApplicable):
* Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp:
(WebCore::LayoutIntegration::BoxTree::BoxTree):
(WebCore::LayoutIntegration::BoxTree::buildTreeForInlineContent):
Make Layout::ContainerBox for RenderBlocks. Only RenderReplaced generates
Layout::ReplacedBox.
In some cases we can have a RenderBlock with 'display:inline'. IFC requires it
to be translated to inline-block.
(WebCore::LayoutIntegration::BoxTree::buildTreeForFlexContent):
(WebCore::LayoutIntegration::BoxTree::appendChild):
(WebCore::LayoutIntegration::BoxTree::updateStyle):
(WebCore::LayoutIntegration::BoxTree::layoutBoxForRenderer const):
(WebCore::LayoutIntegration::BoxTree::layoutBoxForRenderer):
Tighten typing by returning a ContainerBox.
* Source/WebCore/layout/integration/LayoutIntegrationBoxTree.h:
*
Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentBuilder.cpp:
(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::updateLayoutBoxDimensions):
(WebCore::LayoutIntegration::LineLayout::constructContent):
* Source/WebCore/layout/layouttree/LayoutBox.h:
(WebCore::Layout::Box::isIntegrationRoot const):
(WebCore::Layout::Box::isIntegrationBlockContainer const): Deleted.
(WebCore::Layout::Box::isIntegrationInlineBlock const): Deleted.
Remove unneeded IntegrationBlockContainer and IntegrationInlineBlock concepts.
* Source/WebCore/layout/layouttree/LayoutContainerBox.h:
(WebCore::Layout::ContainerBox::setBaselineForIntegration):
(WebCore::Layout::ContainerBox::baselineForIntegration const):
Move baseline field to ContainerBox and make it clear it is needed for
integration only.
* Source/WebCore/layout/layouttree/LayoutLineBreakBox.cpp:
(WebCore::Layout::LineBreakBox::LineBreakBox):
Make LineBreakBox and ContainerBox. This way all layout boxes are either
InlineTextBoxes or ContainerBoxes.
* Source/WebCore/layout/layouttree/LayoutLineBreakBox.h:
* Source/WebCore/layout/layouttree/LayoutReplacedBox.cpp:
(WebCore::Layout::ReplacedBox::ReplacedBox):
Make ReplacedBox a ContainerBox. This makes things easier and the hierarchy has
no deeper meaning in any case.
Also with shadow trees replaced elements can have children.
* Source/WebCore/layout/layouttree/LayoutReplacedBox.h:
(WebCore::Layout::ReplacedBox::setBaseline): Deleted.
(WebCore::Layout::ReplacedBox::baseline const): Deleted.
Canonical link: https://commits.webkit.org/254666@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes