Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 46ea4dfa817dfded066ffb6e5f2b05c9ee10ffd7
https://github.com/WebKit/WebKit/commit/46ea4dfa817dfded066ffb6e5f2b05c9ee10ffd7
Author: Sam Weinig <[email protected]>
Date: 2025-12-26 (Fri, 26 Dec 2025)
Changed paths:
M Source/WebCore/css/scripts/process-css-properties.py
M Source/WebCore/css/scripts/test/TestCSSProperties.json
M
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/RenderStyleProperties+GettersInlines.h
M
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/RenderStyleProperties+SettersInlines.h
M
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/RenderStyleProperties.h
M
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/StyleChangedAnimatablePropertiesGenerated.cpp
M
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/StyleComputedStyleProperties+GettersInlines.h
M
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/StyleComputedStyleProperties+InitialInlines.h
M
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/StyleComputedStyleProperties+SettersInlines.h
M
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/StyleComputedStyleProperties.h
M Source/WebCore/dom/Document.cpp
M Source/WebCore/rendering/RenderBoxModelObjectInlines.h
M Source/WebCore/rendering/cocoa/RenderThemeCocoa.mm
M Source/WebCore/rendering/ios/RenderThemeIOS.mm
M Source/WebCore/rendering/style/RenderStyle+GettersInlines.h
M Source/WebCore/rendering/style/RenderStyle+SettersInlines.h
M Source/WebCore/rendering/style/RenderStyle.cpp
M Source/WebCore/rendering/style/RenderStyle.h
M Source/WebCore/rendering/updating/RenderTreeUpdater.cpp
Log Message:
-----------
[RenderStyleGen] Generate logical property getter/setters
https://bugs.webkit.org/show_bug.cgi?id=304679
Reviewed by Darin Adler.
Replaces hand written logical property getters and setters
on RenderStyle with generated equivalents.
Currently, only properties that are part of a "logical property
group" of type 'axis' or 'side' get generated logical functions.
There are currently no 'corner' logical property getters or
setters on RenderStyle, so this is not a change.
For named "logical property group" of type "axis", like 'size',
which contains the 'width' and height' properties, we generate:
inline const Style::PreferredSize& logicalWidth(WritingMode) const;
inline const Style::PreferredSize& logicalHeight(WritingMode) const;
inline const Style::PreferredSize& logicalWidth() const;
inline const Style::PreferredSize& logicalHeight() const;
inline void setLogicalWidth(Style::PreferredSize&&);
inline void setLogicalHeight(Style::PreferredSize&&);
For named "logical property group" of type "side", like 'padding',
which contains the 'padding-left', 'padding-right', etc. properties,
we generate:
inline const Style::PaddingEdge& paddingStart(WritingMode) const;
inline const Style::PaddingEdge& paddingEnd(WritingMode) const;
inline const Style::PaddingEdge& paddingBefore(WritingMode) const;
inline const Style::PaddingEdge& paddingAfter(WritingMode) const;
inline const Style::PaddingEdge& paddingLogicalLeft(WritingMode) const;
inline const Style::PaddingEdge& paddingLogicalRight(WritingMode) const;
inline const Style::PaddingEdge& paddingStart() const;
inline const Style::PaddingEdge& paddingEnd() const;
inline const Style::PaddingEdge& paddingBefore() const;
inline const Style::PaddingEdge& paddingAfter() const;
inline const Style::PaddingEdge& paddingLogicalLeft() const;
inline const Style::PaddingEdge& paddingLogicalRight() const;
inline void setPaddingStart(Style::PaddingEdge&&);
inline void setPaddingEnd(Style::PaddingEdge&&);
inline void setPaddingBefore(Style::PaddingEdge&&);
inline void setPaddingAfter(Style::PaddingEdge&&);
inline void setPaddingLogicalLeft(Style::PaddingEdge&&);
inline void setPaddingLogicalRight(Style::PaddingEdge&&);
A few small renames were necessary to achieve a consistent naming convention:
- containIntrinsicLogicalWidth/containIntrinsicLogicalHeight were renamed to
logicalContainIntrinsicWidth/logicalContainIntrinsicHeight.
- borderAfterWidth/borderBeforeWidth/borderStartWidth/borderEndWidth were
renamed to borderWidthAfter/borderWidthBefore/borderWidthStart/borderWidthEnd.
The logical inset functions logicalLeft/logicalRight/logicalTop/logicalBottom
were left as aliases for now, as I wasn't clear on whether the convention should
of logicalTop/logicalBottom was something to bring forward.
* Source/WebCore/css/scripts/process-css-properties.py:
* Source/WebCore/css/scripts/test/TestCSSProperties.json:
*
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/RenderStyleProperties+GettersInlines.h:
*
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/RenderStyleProperties+SettersInlines.h:
*
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/RenderStyleProperties.h:
*
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/StyleChangedAnimatablePropertiesGenerated.cpp:
*
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/StyleComputedStyleProperties+GettersInlines.h:
*
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/StyleComputedStyleProperties+InitialInlines.h:
*
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/StyleComputedStyleProperties+SettersInlines.h:
*
Source/WebCore/css/scripts/test/TestCSSPropertiesResults/StyleComputedStyleProperties.h:
* Source/WebCore/dom/Document.cpp:
* Source/WebCore/rendering/RenderBoxModelObjectInlines.h:
* Source/WebCore/rendering/cocoa/RenderThemeCocoa.mm:
* Source/WebCore/rendering/style/RenderStyle+GettersInlines.h:
* Source/WebCore/rendering/style/RenderStyle+SettersInlines.h:
* Source/WebCore/rendering/style/RenderStyle.cpp:
* Source/WebCore/rendering/style/RenderStyle.h:
* Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:
Canonical link: https://commits.webkit.org/304950@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications