[webkit-changes] [WebKit/WebKit] fcb681: [css-grid] Rename GridBaselineAlignment's isBaseli...
Sammy Gill
noreply at github.com
Tue Jan 2 13:21:54 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fcb681a31f038cac1be045d5b5491a53ec0f42dc
https://github.com/WebKit/WebKit/commit/fcb681a31f038cac1be045d5b5491a53ec0f42dc
Author: Sammy Gill <sammy.gill at apple.com>
Date: 2024-01-02 (Tue, 02 Jan 2024)
Changed paths:
M Source/WebCore/rendering/GridBaselineAlignment.cpp
M Source/WebCore/rendering/GridBaselineAlignment.h
Log Message:
-----------
[css-grid] Rename GridBaselineAlignment's isBaselineAxis variables and GridBaselineAlignment::isHorizontalBaselineAxis.
https://bugs.webkit.org/show_bug.cgi?id=266991
rdar://problem/120378682
Reviewed by Alan Baradlay.
There are spec terms that can be used to better represent what these
variables are capturing. The baselineAxis variables seem to be referring
to which direction in which alignment is occurring. The "baseline axis,"
is not a spec term, but the "alignment axis" is so we should use that
instead. I changed all instances of baselineAxis as well as various
function arguments that were just "axis," since those were being passed
in baselineAxis anyway.
I also changed isHorizontalBaselineAxis to isVerticalAlignmentContext.
These are equivalent since whenever the axis of the alignment context is
vertical that means we have a horizontal alignment axis. It is better
to know the direction of the alignment context axis anyways since the
spec makes decisions based off of that.
https://drafts.csswg.org/css-align-3/
https://drafts.csswg.org/css-align-3/#baseline-rules
* Source/WebCore/rendering/GridBaselineAlignment.cpp:
(WebCore::GridBaselineAlignment::marginOverForChild const):
(WebCore::GridBaselineAlignment::marginUnderForChild const):
(WebCore::GridBaselineAlignment::logicalAscentForChild const):
(WebCore::GridBaselineAlignment::ascentForChild const):
(WebCore::GridBaselineAlignment::descentForChild const):
(WebCore::GridBaselineAlignment::isDescentBaselineForChild const):
(WebCore::GridBaselineAlignment::isVerticalAlignmentContext const):
(WebCore::GridBaselineAlignment::isParallelToAlignmentAxisForChild const):
(WebCore::GridBaselineAlignment::baselineGroupForChild const):
(WebCore::GridBaselineAlignment::updateBaselineAlignmentContext):
(WebCore::GridBaselineAlignment::baselineOffsetForChild const):
(WebCore::GridBaselineAlignment::clear):
(WebCore::GridBaselineAlignment::isHorizontalBaselineAxis const): Deleted.
(WebCore::GridBaselineAlignment::isParallelToBaselineAxisForChild const): Deleted.
* Source/WebCore/rendering/GridBaselineAlignment.h:
Canonical link: https://commits.webkit.org/272579@main
More information about the webkit-changes
mailing list