Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: dc7fdb2e0a351c834cb5bd7e74eae44778e1cbcf https://github.com/WebKit/WebKit/commit/dc7fdb2e0a351c834cb5bd7e74eae44778e1cbcf Author: Sammy Gill <sammy.g...@apple.com> Date: 2022-10-05 (Wed, 05 Oct 2022)
Changed paths: M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h M Source/WebCore/rendering/RenderBlock.cpp M Source/WebCore/rendering/RenderBlock.h M Source/WebCore/rendering/RenderBlockFlow.cpp M Source/WebCore/rendering/RenderBlockFlow.h M Source/WebCore/rendering/RenderBox.h Log Message: ----------- Add RenderBox::lastLineBaseline and implementation for block flow objects https://bugs.webkit.org/show_bug.cgi?id=245792 rdar://100516446 Reviewed by Alan Bujtas. In order to begin implementing last baseline alignment in various sceanrios, we need to add a lastLineBaseline method in RenderBox similar to how we have firstLineBaseline defined. This patch adds that method along with an implementation for block items. Future patches that implement last baseline alignment, such as for items in flex containers, can use lastLineBaseline to get the last baseline of the items. Other objects besides block objects will need an implementation as necessary. CSS Box Alignment Module Level 3 defines the last baseline of block elements to be: the dominant last baseline of the last in-flow line box in the block container, or is taken from the last in-flow block-level child in the block container that contributes a set of last baselines, whichever comes first/last. The logic for this ends up being very similar to the first baseline logic, but we are simply starting from the last child and working our way up instead of the other way around. * Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp: (WebCore::LayoutIntegration::LineLayout::firstLinePhysicalBaseline const): (WebCore::LayoutIntegration::LineLayout::lastLinePhysicalBaseline const): (WebCore::LayoutIntegration::LineLayout::physicalBaselineFromWritingMode const): * Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h: * Source/WebCore/rendering/RenderBlock.cpp: (WebCore::RenderBlock::firstLineBaseline const): (WebCore::RenderBlock::lastLineBaseline const): * Source/WebCore/rendering/RenderBlock.h: * Source/WebCore/rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::lastLineBaseline const): * Source/WebCore/rendering/RenderBlockFlow.h: * Source/WebCore/rendering/RenderBox.h: (WebCore::RenderBox::lastLineBaseline const): (WebCore::RenderBox::firstInFlowChildBox const): (WebCore::RenderBox::lastInFlowChildBox const): (WebCore::RenderBox::nextInFlowSiblingBox const): Canonical link: https://commits.webkit.org/255179@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes