Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 493db53c8c0b4ad4b3c1180d356af40a679db746 https://github.com/WebKit/WebKit/commit/493db53c8c0b4ad4b3c1180d356af40a679db746 Author: Sammy Gill <sammy.g...@apple.com> Date: 2023-05-16 (Tue, 16 May 2023)
Changed paths: M Source/WebCore/Sources.txt M Source/WebCore/WebCore.xcodeproj/project.pbxproj A Source/WebCore/rendering/BaselineAlignment.cpp A Source/WebCore/rendering/BaselineAlignment.h A Source/WebCore/rendering/BaselineAlignmentInlines.h M Source/WebCore/rendering/GridBaselineAlignment.cpp M Source/WebCore/rendering/GridBaselineAlignment.h M Source/WebCore/rendering/RenderGrid.cpp M Source/WebCore/rendering/RenderGrid.h M Source/WebCore/rendering/style/TextSizeAdjustment.cpp Log Message: ----------- [baseline-alignment] Move BaselineContext and BaselineGroup out of GridBaselineAlignment. https://bugs.webkit.org/show_bug.cgi?id=256775 rdar://problem/109336789 Reviewed by Brent Fulgham and Tim Nguyen. These two classes represent parts of the baseline alignment spec in css-align-3 in general and are not specific to grid. These classes can be useful for baseline alignment in other formatting contexts, such as flex, so we will attempt to share them between all of the contexts where needed. We may be able to abstract more things out of GridBaselineAlignment, but it is not super clear what else at this point so it will be best to start here, integrate the classes into another formatting context, and then come back and see what else, if anything, can be moved around. A couple of new #includes were needed in TextSizeAdjustment.cpp and RenderGrid.cpp due to new compile errors in the unified sources. * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/rendering/BaselineAlignment.cpp: Added. (WebCore::BaselineGroup::BaselineGroup): (WebCore::BaselineGroup::update): (WebCore::BaselineGroup::isOppositeBlockFlow const): (WebCore::BaselineGroup::isOrthogonalBlockFlow const): (WebCore::BaselineGroup::isCompatible const): (WebCore::BaselineContext::BaselineContext): (WebCore::BaselineContext::sharedGroup const): (WebCore::BaselineContext::updateSharedGroup): (WebCore::BaselineContext::findCompatibleSharedGroup): * Source/WebCore/rendering/BaselineAlignment.h: Copied from Source/WebCore/rendering/GridBaselineAlignment.h. (WebCore::BaselineGroup::maxAscent const): (WebCore::BaselineGroup::size const): * Source/WebCore/rendering/BaselineAlignmentInlines.h: Added. (WebCore::isBaselinePosition): (WebCore::isFirstBaselinePosition): * Source/WebCore/rendering/GridBaselineAlignment.cpp: (WebCore::BaselineGroup::BaselineGroup): Deleted. (WebCore::BaselineGroup::update): Deleted. (WebCore::BaselineGroup::isOppositeBlockFlow const): Deleted. (WebCore::BaselineGroup::isOrthogonalBlockFlow const): Deleted. (WebCore::BaselineGroup::isCompatible const): Deleted. (WebCore::BaselineContext::BaselineContext): Deleted. (WebCore::BaselineContext::sharedGroup const): Deleted. (WebCore::BaselineContext::updateSharedGroup): Deleted. (WebCore::BaselineContext::findCompatibleSharedGroup): Deleted. * Source/WebCore/rendering/GridBaselineAlignment.h: (WebCore::BaselineGroup::maxAscent const): Deleted. (WebCore::BaselineGroup::size const): Deleted. (): Deleted. (WebCore::isBaselinePosition): Deleted. (WebCore::isFirstBaselinePosition): Deleted. * Source/WebCore/rendering/RenderGrid.cpp: * Source/WebCore/rendering/style/TextSizeAdjustment.cpp: Canonical link: https://commits.webkit.org/264113@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes