| Differences between
and this patch
- a/Source/WebCore/ChangeLog +48 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2022-03-17  Oriol Brufau  <obrufau@igalia.com>
2
3
        Fix hasExplicitlySetBorderRadius flag
4
        https://bugs.webkit.org/show_bug.cgi?id=238062
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        The four border-*-radius longhands were sharing the same flag, so the
9
        behavior was broken when setting longhands individually.
10
11
        This patch splits the flag into 4 different ones, one for each longhand.
12
        Also makes sure to set it properly when a longhand is set to 'initial'.
13
14
        It's ugly to have all this boilerplate code for the flags, but
15
        https://webkit.org/b/212506 will make it automatically generated.
16
17
        Test: fast/css/appearance-apple-pay-button-border-radius-longhands.html
18
19
        * css/CSSProperties.json:
20
        * rendering/style/RenderStyle.cpp:
21
        (WebCore::RenderStyle::RenderStyle):
22
        * rendering/style/RenderStyle.h:
23
        (WebCore::RenderStyle::hasExplicitlySetBorderBottomLeftRadius const):
24
        (WebCore::RenderStyle::hasExplicitlySetBorderBottomRightRadius const):
25
        (WebCore::RenderStyle::hasExplicitlySetBorderTopLeftRadius const):
26
        (WebCore::RenderStyle::hasExplicitlySetBorderTopRightRadius const):
27
        (WebCore::RenderStyle::hasExplicitlySetBorderRadius const):
28
        (WebCore::RenderStyle::setHasExplicitlySetBorderBottomLeftRadius):
29
        (WebCore::RenderStyle::setHasExplicitlySetBorderBottomRightRadius):
30
        (WebCore::RenderStyle::setHasExplicitlySetBorderTopLeftRadius):
31
        (WebCore::RenderStyle::setHasExplicitlySetBorderTopRightRadius):
32
        (WebCore::RenderStyle::NonInheritedFlags::operator== const):
33
        (WebCore::RenderStyle::NonInheritedFlags::copyNonInheritedFrom):
34
        (WebCore::RenderStyle::setHasExplicitlySetBorderRadius): Deleted.
35
        * style/StyleBuilderCustom.h:
36
        (WebCore::Style::BuilderCustom::applyInitialBorderBottomLeftRadius):
37
        (WebCore::Style::BuilderCustom::applyInheritBorderBottomLeftRadius):
38
        (WebCore::Style::BuilderCustom::applyValueBorderBottomLeftRadius):
39
        (WebCore::Style::BuilderCustom::applyInitialBorderBottomRightRadius):
40
        (WebCore::Style::BuilderCustom::applyInheritBorderBottomRightRadius):
41
        (WebCore::Style::BuilderCustom::applyValueBorderBottomRightRadius):
42
        (WebCore::Style::BuilderCustom::applyInitialBorderTopLeftRadius):
43
        (WebCore::Style::BuilderCustom::applyInheritBorderTopLeftRadius):
44
        (WebCore::Style::BuilderCustom::applyValueBorderTopLeftRadius):
45
        (WebCore::Style::BuilderCustom::applyInitialBorderTopRightRadius):
46
        (WebCore::Style::BuilderCustom::applyInheritBorderTopRightRadius):
47
        (WebCore::Style::BuilderCustom::applyValueBorderTopRightRadius):
48
1
2022-03-16  Oriol Brufau  <obrufau@igalia.com>
49
2022-03-16  Oriol Brufau  <obrufau@igalia.com>
2
50
3
        Clarify code for logical-to-physical mappings, and add physical-to-logical mappings
51
        Clarify code for logical-to-physical mappings, and add physical-to-logical mappings
- a/Source/WebCore/css/CSSProperties.json -8 / +4 lines
Lines 1556-1563 a/Source/WebCore/css/CSSProperties.json_sec1
1556
                "aliases": [
1556
                "aliases": [
1557
                    "-webkit-border-bottom-left-radius"
1557
                    "-webkit-border-bottom-left-radius"
1558
                ],
1558
                ],
1559
                "initial": "initialBorderRadius",
1559
                "custom": "All",
1560
                "custom": "Inherit|Value",
1561
                "logical-property-group": {
1560
                "logical-property-group": {
1562
                    "name": "border-radius",
1561
                    "name": "border-radius",
1563
                    "resolver": "bottom-left"
1562
                    "resolver": "bottom-left"
Lines 1573-1580 a/Source/WebCore/css/CSSProperties.json_sec2
1573
                "aliases": [
1572
                "aliases": [
1574
                    "-webkit-border-bottom-right-radius"
1573
                    "-webkit-border-bottom-right-radius"
1575
                ],
1574
                ],
1576
                "initial": "initialBorderRadius",
1575
                "custom": "All",
1577
                "custom": "Inherit|Value",
1578
                "logical-property-group": {
1576
                "logical-property-group": {
1579
                    "name": "border-radius",
1577
                    "name": "border-radius",
1580
                    "resolver": "bottom-right"
1578
                    "resolver": "bottom-right"
Lines 2195-2202 a/Source/WebCore/css/CSSProperties.json_sec3
2195
                "aliases": [
2193
                "aliases": [
2196
                    "-webkit-border-top-left-radius"
2194
                    "-webkit-border-top-left-radius"
2197
                ],
2195
                ],
2198
                "initial": "initialBorderRadius",
2196
                "custom": "All",
2199
                "custom": "Inherit|Value",
2200
                "logical-property-group": {
2197
                "logical-property-group": {
2201
                    "name": "border-radius",
2198
                    "name": "border-radius",
2202
                    "resolver": "top-left"
2199
                    "resolver": "top-left"
Lines 2212-2219 a/Source/WebCore/css/CSSProperties.json_sec4
2212
                "aliases": [
2209
                "aliases": [
2213
                    "-webkit-border-top-right-radius"
2210
                    "-webkit-border-top-right-radius"
2214
                ],
2211
                ],
2215
                "initial": "initialBorderRadius",
2212
                "custom": "All",
2216
                "custom": "Inherit|Value",
2217
                "logical-property-group": {
2213
                "logical-property-group": {
2218
                    "name": "border-radius",
2214
                    "name": "border-radius",
2219
                    "resolver": "top-right"
2215
                    "resolver": "top-right"
- a/Source/WebCore/rendering/style/RenderStyle.cpp -1 / +4 lines
Lines 197-203 RenderStyle::RenderStyle(CreateDefaultStyleTag) a/Source/WebCore/rendering/style/RenderStyle.cpp_sec1
197
    m_nonInheritedFlags.unicodeBidi = static_cast<unsigned>(initialUnicodeBidi());
197
    m_nonInheritedFlags.unicodeBidi = static_cast<unsigned>(initialUnicodeBidi());
198
    m_nonInheritedFlags.floating = static_cast<unsigned>(initialFloating());
198
    m_nonInheritedFlags.floating = static_cast<unsigned>(initialFloating());
199
    m_nonInheritedFlags.tableLayout = static_cast<unsigned>(initialTableLayout());
199
    m_nonInheritedFlags.tableLayout = static_cast<unsigned>(initialTableLayout());
200
    m_nonInheritedFlags.hasExplicitlySetBorderRadius = false;
200
    m_nonInheritedFlags.hasExplicitlySetBorderBottomLeftRadius = false;
201
    m_nonInheritedFlags.hasExplicitlySetBorderBottomRightRadius = false;
202
    m_nonInheritedFlags.hasExplicitlySetBorderTopLeftRadius = false;
203
    m_nonInheritedFlags.hasExplicitlySetBorderTopRightRadius = false;
201
    m_nonInheritedFlags.hasExplicitlySetDirection = false;
204
    m_nonInheritedFlags.hasExplicitlySetDirection = false;
202
    m_nonInheritedFlags.hasExplicitlySetWritingMode = false;
205
    m_nonInheritedFlags.hasExplicitlySetWritingMode = false;
203
    m_nonInheritedFlags.hasExplicitlySetTextAlign = false;
206
    m_nonInheritedFlags.hasExplicitlySetTextAlign = false;
- a/Source/WebCore/rendering/style/RenderStyle.h -5 / +21 lines
Lines 305-311 public: a/Source/WebCore/rendering/style/RenderStyle.h_sec1
305
    const LengthSize& borderBottomLeftRadius() const { return m_surroundData->border.bottomLeftRadius(); }
305
    const LengthSize& borderBottomLeftRadius() const { return m_surroundData->border.bottomLeftRadius(); }
306
    const LengthSize& borderBottomRightRadius() const { return m_surroundData->border.bottomRightRadius(); }
306
    const LengthSize& borderBottomRightRadius() const { return m_surroundData->border.bottomRightRadius(); }
307
    bool hasBorderRadius() const { return m_surroundData->border.hasBorderRadius(); }
307
    bool hasBorderRadius() const { return m_surroundData->border.hasBorderRadius(); }
308
    bool hasExplicitlySetBorderRadius() const { return m_nonInheritedFlags.hasExplicitlySetBorderRadius; }
308
    bool hasExplicitlySetBorderBottomLeftRadius() const { return m_nonInheritedFlags.hasExplicitlySetBorderBottomLeftRadius; }
309
    bool hasExplicitlySetBorderBottomRightRadius() const { return m_nonInheritedFlags.hasExplicitlySetBorderBottomRightRadius; }
310
    bool hasExplicitlySetBorderTopLeftRadius() const { return m_nonInheritedFlags.hasExplicitlySetBorderTopLeftRadius; }
311
    bool hasExplicitlySetBorderTopRightRadius() const { return m_nonInheritedFlags.hasExplicitlySetBorderTopRightRadius; }
312
    bool hasExplicitlySetBorderRadius() const { return hasExplicitlySetBorderBottomLeftRadius() || hasExplicitlySetBorderBottomRightRadius() || hasExplicitlySetBorderTopLeftRadius() || hasExplicitlySetBorderTopRightRadius(); }
309
313
310
    float borderLeftWidth() const { return m_surroundData->border.borderLeftWidth(); }
314
    float borderLeftWidth() const { return m_surroundData->border.borderLeftWidth(); }
311
    BorderStyle borderLeftStyle() const { return m_surroundData->border.left().style(); }
315
    BorderStyle borderLeftStyle() const { return m_surroundData->border.left().style(); }
Lines 934-940 public: a/Source/WebCore/rendering/style/RenderStyle.h_sec2
934
938
935
    void setBorderRadius(LengthSize&&);
939
    void setBorderRadius(LengthSize&&);
936
    void setBorderRadius(const IntSize&);
940
    void setBorderRadius(const IntSize&);
937
    void setHasExplicitlySetBorderRadius(bool v) { m_nonInheritedFlags.hasExplicitlySetBorderRadius = v; }
941
    void setHasExplicitlySetBorderBottomLeftRadius(bool v) { m_nonInheritedFlags.hasExplicitlySetBorderBottomLeftRadius = v; }
942
    void setHasExplicitlySetBorderBottomRightRadius(bool v) { m_nonInheritedFlags.hasExplicitlySetBorderBottomRightRadius = v; }
943
    void setHasExplicitlySetBorderTopLeftRadius(bool v) { m_nonInheritedFlags.hasExplicitlySetBorderTopLeftRadius = v; }
944
    void setHasExplicitlySetBorderTopRightRadius(bool v) { m_nonInheritedFlags.hasExplicitlySetBorderTopRightRadius = v; }
938
945
939
    RoundedRect getRoundedBorderFor(const LayoutRect& borderRect, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const;
946
    RoundedRect getRoundedBorderFor(const LayoutRect& borderRect, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const;
940
    RoundedRect getRoundedInnerBorderFor(const LayoutRect& borderRect, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const;
947
    RoundedRect getRoundedInnerBorderFor(const LayoutRect& borderRect, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const;
Lines 1947-1953 private: a/Source/WebCore/rendering/style/RenderStyle.h_sec3
1947
        unsigned floating : 3; // Float
1954
        unsigned floating : 3; // Float
1948
        unsigned tableLayout : 1; // TableLayoutType
1955
        unsigned tableLayout : 1; // TableLayoutType
1949
1956
1950
        unsigned hasExplicitlySetBorderRadius : 1;
1957
        unsigned hasExplicitlySetBorderBottomLeftRadius : 1;
1958
        unsigned hasExplicitlySetBorderBottomRightRadius : 1;
1959
        unsigned hasExplicitlySetBorderTopLeftRadius : 1;
1960
        unsigned hasExplicitlySetBorderTopRightRadius : 1;
1951
        unsigned hasExplicitlySetDirection : 1;
1961
        unsigned hasExplicitlySetDirection : 1;
1952
        unsigned hasExplicitlySetWritingMode : 1;
1962
        unsigned hasExplicitlySetWritingMode : 1;
1953
        unsigned hasExplicitlySetTextAlign : 1;
1963
        unsigned hasExplicitlySetTextAlign : 1;
Lines 2084-2090 inline bool RenderStyle::NonInheritedFlags::operator==(const NonInheritedFlags& a/Source/WebCore/rendering/style/RenderStyle.h_sec4
2084
        && unicodeBidi == other.unicodeBidi
2094
        && unicodeBidi == other.unicodeBidi
2085
        && floating == other.floating
2095
        && floating == other.floating
2086
        && tableLayout == other.tableLayout
2096
        && tableLayout == other.tableLayout
2087
        && hasExplicitlySetBorderRadius == other.hasExplicitlySetBorderRadius
2097
        && hasExplicitlySetBorderBottomLeftRadius == other.hasExplicitlySetBorderBottomLeftRadius
2098
        && hasExplicitlySetBorderBottomRightRadius == other.hasExplicitlySetBorderBottomRightRadius
2099
        && hasExplicitlySetBorderTopLeftRadius == other.hasExplicitlySetBorderTopLeftRadius
2100
        && hasExplicitlySetBorderTopRightRadius == other.hasExplicitlySetBorderTopRightRadius
2088
        && hasExplicitlySetDirection == other.hasExplicitlySetDirection
2101
        && hasExplicitlySetDirection == other.hasExplicitlySetDirection
2089
        && hasExplicitlySetWritingMode == other.hasExplicitlySetWritingMode
2102
        && hasExplicitlySetWritingMode == other.hasExplicitlySetWritingMode
2090
        && hasExplicitlySetTextAlign == other.hasExplicitlySetTextAlign
2103
        && hasExplicitlySetTextAlign == other.hasExplicitlySetTextAlign
Lines 2121-2127 inline void RenderStyle::NonInheritedFlags::copyNonInheritedFrom(const NonInheri a/Source/WebCore/rendering/style/RenderStyle.h_sec5
2121
2134
2122
    // Unlike properties tracked by the other hasExplicitlySet* flags, border-radius is non-inherited
2135
    // Unlike properties tracked by the other hasExplicitlySet* flags, border-radius is non-inherited
2123
    // and we need to remember whether it's been explicitly set when copying m_surroundData.
2136
    // and we need to remember whether it's been explicitly set when copying m_surroundData.
2124
    hasExplicitlySetBorderRadius = other.hasExplicitlySetBorderRadius;
2137
    hasExplicitlySetBorderBottomLeftRadius = other.hasExplicitlySetBorderBottomLeftRadius;
2138
    hasExplicitlySetBorderBottomRightRadius = other.hasExplicitlySetBorderBottomRightRadius;
2139
    hasExplicitlySetBorderTopLeftRadius = other.hasExplicitlySetBorderTopLeftRadius;
2140
    hasExplicitlySetBorderTopRightRadius = other.hasExplicitlySetBorderTopRightRadius;
2125
}
2141
}
2126
2142
2127
inline bool RenderStyle::NonInheritedFlags::hasPseudoStyle(PseudoId pseudo) const
2143
inline bool RenderStyle::NonInheritedFlags::hasPseudoStyle(PseudoId pseudo) const
- a/Source/WebCore/style/StyleBuilderCustom.h -8 / +36 lines
Lines 127-138 public: a/Source/WebCore/style/StyleBuilderCustom.h_sec1
127
    static void applyInheritDisplay(BuilderState&);
127
    static void applyInheritDisplay(BuilderState&);
128
    static void applyValueDisplay(BuilderState&, CSSValue&);
128
    static void applyValueDisplay(BuilderState&, CSSValue&);
129
    // FIXME: <https://webkit.org/b/212506> Teach makeprop.pl to generate setters for hasExplicitlySet* flags
129
    // FIXME: <https://webkit.org/b/212506> Teach makeprop.pl to generate setters for hasExplicitlySet* flags
130
    static void applyInitialBorderBottomLeftRadius(BuilderState&);
130
    static void applyInheritBorderBottomLeftRadius(BuilderState&);
131
    static void applyInheritBorderBottomLeftRadius(BuilderState&);
131
    static void applyValueBorderBottomLeftRadius(BuilderState&, CSSValue&);
132
    static void applyValueBorderBottomLeftRadius(BuilderState&, CSSValue&);
133
    static void applyInitialBorderBottomRightRadius(BuilderState&);
132
    static void applyInheritBorderBottomRightRadius(BuilderState&);
134
    static void applyInheritBorderBottomRightRadius(BuilderState&);
133
    static void applyValueBorderBottomRightRadius(BuilderState&, CSSValue&);
135
    static void applyValueBorderBottomRightRadius(BuilderState&, CSSValue&);
136
    static void applyInitialBorderTopLeftRadius(BuilderState&);
134
    static void applyInheritBorderTopLeftRadius(BuilderState&);
137
    static void applyInheritBorderTopLeftRadius(BuilderState&);
135
    static void applyValueBorderTopLeftRadius(BuilderState&, CSSValue&);
138
    static void applyValueBorderTopLeftRadius(BuilderState&, CSSValue&);
139
    static void applyInitialBorderTopRightRadius(BuilderState&);
136
    static void applyInheritBorderTopRightRadius(BuilderState&);
140
    static void applyInheritBorderTopRightRadius(BuilderState&);
137
    static void applyValueBorderTopRightRadius(BuilderState&, CSSValue&);
141
    static void applyValueBorderTopRightRadius(BuilderState&, CSSValue&);
138
142
Lines 1084-1135 inline void BuilderCustom::applyValueFontFamily(BuilderState& builderState, CSSV a/Source/WebCore/style/StyleBuilderCustom.h_sec2
1084
    builderState.setFontDescription(WTFMove(fontDescription));
1088
    builderState.setFontDescription(WTFMove(fontDescription));
1085
}
1089
}
1086
1090
1091
inline void BuilderCustom::applyInitialBorderBottomLeftRadius(BuilderState& builderState)
1092
{
1093
    builderState.style().setBorderBottomLeftRadius(RenderStyle::initialBorderRadius());
1094
    builderState.style().setHasExplicitlySetBorderBottomLeftRadius(false);
1095
}
1096
1087
inline void BuilderCustom::applyInheritBorderBottomLeftRadius(BuilderState& builderState)
1097
inline void BuilderCustom::applyInheritBorderBottomLeftRadius(BuilderState& builderState)
1088
{
1098
{
1089
    builderState.style().setBorderBottomLeftRadius(forwardInheritedValue(builderState.parentStyle().borderBottomLeftRadius()));
1099
    builderState.style().setBorderBottomLeftRadius(forwardInheritedValue(builderState.parentStyle().borderBottomLeftRadius()));
1090
    builderState.style().setHasExplicitlySetBorderRadius(builderState.parentStyle().hasExplicitlySetBorderRadius());
1100
    builderState.style().setHasExplicitlySetBorderBottomLeftRadius(builderState.parentStyle().hasExplicitlySetBorderBottomLeftRadius());
1091
}
1101
}
1092
1102
1093
inline void BuilderCustom::applyValueBorderBottomLeftRadius(BuilderState& builderState, CSSValue& value)
1103
inline void BuilderCustom::applyValueBorderBottomLeftRadius(BuilderState& builderState, CSSValue& value)
1094
{
1104
{
1095
    builderState.style().setBorderBottomLeftRadius(BuilderConverter::convertRadius(builderState, value));
1105
    builderState.style().setBorderBottomLeftRadius(BuilderConverter::convertRadius(builderState, value));
1096
    builderState.style().setHasExplicitlySetBorderRadius(true);
1106
    builderState.style().setHasExplicitlySetBorderBottomLeftRadius(true);
1107
}
1108
1109
inline void BuilderCustom::applyInitialBorderBottomRightRadius(BuilderState& builderState)
1110
{
1111
    builderState.style().setBorderBottomRightRadius(RenderStyle::initialBorderRadius());
1112
    builderState.style().setHasExplicitlySetBorderBottomRightRadius(false);
1097
}
1113
}
1098
1114
1099
inline void BuilderCustom::applyInheritBorderBottomRightRadius(BuilderState& builderState)
1115
inline void BuilderCustom::applyInheritBorderBottomRightRadius(BuilderState& builderState)
1100
{
1116
{
1101
    builderState.style().setBorderBottomRightRadius(forwardInheritedValue(builderState.parentStyle().borderBottomRightRadius()));
1117
    builderState.style().setBorderBottomRightRadius(forwardInheritedValue(builderState.parentStyle().borderBottomRightRadius()));
1102
    builderState.style().setHasExplicitlySetBorderRadius(builderState.parentStyle().hasExplicitlySetBorderRadius());
1118
    builderState.style().setHasExplicitlySetBorderBottomRightRadius(builderState.parentStyle().hasExplicitlySetBorderBottomRightRadius());
1103
}
1119
}
1104
1120
1105
inline void BuilderCustom::applyValueBorderBottomRightRadius(BuilderState& builderState, CSSValue& value)
1121
inline void BuilderCustom::applyValueBorderBottomRightRadius(BuilderState& builderState, CSSValue& value)
1106
{
1122
{
1107
    builderState.style().setBorderBottomRightRadius(BuilderConverter::convertRadius(builderState, value));
1123
    builderState.style().setBorderBottomRightRadius(BuilderConverter::convertRadius(builderState, value));
1108
    builderState.style().setHasExplicitlySetBorderRadius(true);
1124
    builderState.style().setHasExplicitlySetBorderBottomRightRadius(true);
1125
}
1126
1127
inline void BuilderCustom::applyInitialBorderTopLeftRadius(BuilderState& builderState)
1128
{
1129
    builderState.style().setBorderTopLeftRadius(RenderStyle::initialBorderRadius());
1130
    builderState.style().setHasExplicitlySetBorderTopLeftRadius(false);
1109
}
1131
}
1110
1132
1111
inline void BuilderCustom::applyInheritBorderTopLeftRadius(BuilderState& builderState)
1133
inline void BuilderCustom::applyInheritBorderTopLeftRadius(BuilderState& builderState)
1112
{
1134
{
1113
    builderState.style().setBorderTopLeftRadius(forwardInheritedValue(builderState.parentStyle().borderTopLeftRadius()));
1135
    builderState.style().setBorderTopLeftRadius(forwardInheritedValue(builderState.parentStyle().borderTopLeftRadius()));
1114
    builderState.style().setHasExplicitlySetBorderRadius(builderState.parentStyle().hasExplicitlySetBorderRadius());
1136
    builderState.style().setHasExplicitlySetBorderTopLeftRadius(builderState.parentStyle().hasExplicitlySetBorderTopLeftRadius());
1115
}
1137
}
1116
1138
1117
inline void BuilderCustom::applyValueBorderTopLeftRadius(BuilderState& builderState, CSSValue& value)
1139
inline void BuilderCustom::applyValueBorderTopLeftRadius(BuilderState& builderState, CSSValue& value)
1118
{
1140
{
1119
    builderState.style().setBorderTopLeftRadius(BuilderConverter::convertRadius(builderState, value));
1141
    builderState.style().setBorderTopLeftRadius(BuilderConverter::convertRadius(builderState, value));
1120
    builderState.style().setHasExplicitlySetBorderRadius(true);
1142
    builderState.style().setHasExplicitlySetBorderTopLeftRadius(true);
1143
}
1144
1145
inline void BuilderCustom::applyInitialBorderTopRightRadius(BuilderState& builderState)
1146
{
1147
    builderState.style().setBorderTopRightRadius(RenderStyle::initialBorderRadius());
1148
    builderState.style().setHasExplicitlySetBorderTopRightRadius(false);
1121
}
1149
}
1122
1150
1123
inline void BuilderCustom::applyInheritBorderTopRightRadius(BuilderState& builderState)
1151
inline void BuilderCustom::applyInheritBorderTopRightRadius(BuilderState& builderState)
1124
{
1152
{
1125
    builderState.style().setBorderTopRightRadius(forwardInheritedValue(builderState.parentStyle().borderTopRightRadius()));
1153
    builderState.style().setBorderTopRightRadius(forwardInheritedValue(builderState.parentStyle().borderTopRightRadius()));
1126
    builderState.style().setHasExplicitlySetBorderRadius(builderState.parentStyle().hasExplicitlySetBorderRadius());
1154
    builderState.style().setHasExplicitlySetBorderTopRightRadius(builderState.parentStyle().hasExplicitlySetBorderTopRightRadius());
1127
}
1155
}
1128
1156
1129
inline void BuilderCustom::applyValueBorderTopRightRadius(BuilderState& builderState, CSSValue& value)
1157
inline void BuilderCustom::applyValueBorderTopRightRadius(BuilderState& builderState, CSSValue& value)
1130
{
1158
{
1131
    builderState.style().setBorderTopRightRadius(BuilderConverter::convertRadius(builderState, value));
1159
    builderState.style().setBorderTopRightRadius(BuilderConverter::convertRadius(builderState, value));
1132
    builderState.style().setHasExplicitlySetBorderRadius(true);
1160
    builderState.style().setHasExplicitlySetBorderTopRightRadius(true);
1133
}
1161
}
1134
1162
1135
inline bool BuilderCustom::isValidDisplayValue(BuilderState& builderState, DisplayType display)
1163
inline bool BuilderCustom::isValidDisplayValue(BuilderState& builderState, DisplayType display)
- a/LayoutTests/ChangeLog +15 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2022-03-17  Oriol Brufau  <obrufau@igalia.com>
2
3
        Fix hasExplicitlySetBorderRadius flag
4
        https://bugs.webkit.org/show_bug.cgi?id=238062
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Add test, skip it except in iOS and Mac.
9
10
        * TestExpectations:
11
        * fast/css/appearance-apple-pay-button-border-radius-longhands-expected.html: Added.
12
        * fast/css/appearance-apple-pay-button-border-radius-longhands.html: Added.
13
        * platform/ios/TestExpectations:
14
        * platform/mac/TestExpectations:
15
1
2022-03-15  Jean-Yves Avenard  <jya@apple.com>
16
2022-03-15  Jean-Yves Avenard  <jya@apple.com>
2
17
3
        REGRESSION(r287249): [ Monterey wk2 ] media/media-source/media-webm-vorbis-partial.html is a constant text failure
18
        REGRESSION(r287249): [ Monterey wk2 ] media/media-source/media-webm-vorbis-partial.html is a constant text failure
- a/LayoutTests/TestExpectations +1 lines
Lines 278-283 media/deactivate-audio-session.html [ Skip ] a/LayoutTests/TestExpectations_sec1
278
# ApplePay is only available on iOS (greater than iOS 10) and macOS (greater than macOS 10.12) and only for WebKit2.
278
# ApplePay is only available on iOS (greater than iOS 10) and macOS (greater than macOS 10.12) and only for WebKit2.
279
fast/css/appearance-apple-pay-button.html [ Skip ]
279
fast/css/appearance-apple-pay-button.html [ Skip ]
280
fast/css/appearance-apple-pay-button-border-radius.html [ Skip ]
280
fast/css/appearance-apple-pay-button-border-radius.html [ Skip ]
281
fast/css/appearance-apple-pay-button-border-radius-longhands.html [ Skip ]
281
fast/css/appearance-apple-pay-button-default-corners.html [ Skip ]
282
fast/css/appearance-apple-pay-button-default-corners.html [ Skip ]
282
fast/css/getComputedStyle/computed-style-apple-pay-button.html [ Skip ]
283
fast/css/getComputedStyle/computed-style-apple-pay-button.html [ Skip ]
283
fast/css/webkit-named-image/apple-pay-logo-black [ Skip ]
284
fast/css/webkit-named-image/apple-pay-logo-black [ Skip ]
- a/LayoutTests/fast/css/appearance-apple-pay-button-border-radius-longhands-expected.html +55 lines
Line 0 a/LayoutTests/fast/css/appearance-apple-pay-button-border-radius-longhands-expected.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<head>
4
    <style>
5
        .container {
6
            padding: 25px;
7
            width: 500px;
8
        }
9
10
        .apple-pay-button {
11
            -webkit-appearance: -apple-pay-button;
12
        }
13
14
        .square-corners {
15
            border-radius: 0px;
16
        }
17
18
        .very-round-corners {
19
            border-radius: 15px;
20
        }
21
    </style>
22
</head>
23
<body>
24
    <div class='container'>
25
        <button class='apple-pay-button square-corners'></button>
26
        <button class='apple-pay-button square-corners'></button>
27
        <button class='apple-pay-button square-corners'></button>
28
        <button class='apple-pay-button square-corners'></button>
29
    </div>
30
    <div class='container'>
31
        <button class='apple-pay-button square-corners'></button>
32
        <button class='apple-pay-button square-corners'></button>
33
        <button class='apple-pay-button square-corners'></button>
34
        <button class='apple-pay-button square-corners'></button>
35
    </div>
36
    <div class='container'>
37
        <button class='apple-pay-button'></button>
38
        <button class='apple-pay-button'></button>
39
        <button class='apple-pay-button'></button>
40
        <button class='apple-pay-button'></button>
41
    </div>
42
    <div class='container'>
43
        <button class='apple-pay-button very-round-corners'></button>
44
        <button class='apple-pay-button very-round-corners'></button>
45
        <button class='apple-pay-button very-round-corners'></button>
46
        <button class='apple-pay-button very-round-corners'></button>
47
    </div>
48
    <div class='container'>
49
        <button class='apple-pay-button very-round-corners'></button>
50
        <button class='apple-pay-button very-round-corners'></button>
51
        <button class='apple-pay-button very-round-corners'></button>
52
        <button class='apple-pay-button very-round-corners'></button>
53
    </div>
54
</body>
55
</html>
- a/LayoutTests/fast/css/appearance-apple-pay-button-border-radius-longhands.html +55 lines
Line 0 a/LayoutTests/fast/css/appearance-apple-pay-button-border-radius-longhands.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<head>
4
    <style>
5
        .container {
6
            padding: 25px;
7
            width: 500px;
8
        }
9
10
        .apple-pay-button {
11
            -webkit-appearance: -apple-pay-button;
12
        }
13
14
        .square-corners {
15
            border-radius: 0px;
16
        }
17
18
        .very-round-corners {
19
            border-radius: 15px;
20
        }
21
    </style>
22
</head>
23
<body>
24
    <div class='container'>
25
        <button class='apple-pay-button' style='border-bottom-left-radius: 0px'></button>
26
        <button class='apple-pay-button' style='border-bottom-right-radius: 0px'></button>
27
        <button class='apple-pay-button' style='border-top-left-radius: 0px'></button>
28
        <button class='apple-pay-button' style='border-top-right-radius: 0px'></button>
29
    </div>
30
    <div class='container'>
31
        <button class='apple-pay-button square-corners' style='border-bottom-left-radius: inherit'></button>
32
        <button class='apple-pay-button square-corners' style='border-bottom-right-radius: inherit'></button>
33
        <button class='apple-pay-button square-corners' style='border-top-left-radius: inherit'></button>
34
        <button class='apple-pay-button square-corners' style='border-top-right-radius: inherit'></button>
35
    </div>
36
    <div class='container'>
37
        <button class='apple-pay-button' style='border-bottom-left-radius: inherit'></button>
38
        <button class='apple-pay-button' style='border-bottom-right-radius: inherit'></button>
39
        <button class='apple-pay-button' style='border-top-left-radius: inherit'></button>
40
        <button class='apple-pay-button' style='border-top-right-radius: inherit'></button>
41
    </div>
42
    <div class='container'>
43
        <button class='apple-pay-button' style='border-bottom-left-radius: 15px'></button>
44
        <button class='apple-pay-button' style='border-bottom-right-radius: 15px'></button>
45
        <button class='apple-pay-button' style='border-top-left-radius: 15px'></button>
46
        <button class='apple-pay-button' style='border-top-right-radius: 15px'></button>
47
    </div>
48
    <div class='container'>
49
        <button class='apple-pay-button very-round-corners' style='border-bottom-left-radius: inherit'></button>
50
        <button class='apple-pay-button very-round-corners' style='border-bottom-right-radius: inherit'></button>
51
        <button class='apple-pay-button very-round-corners' style='border-top-left-radius: inherit'></button>
52
        <button class='apple-pay-button very-round-corners' style='border-top-right-radius: inherit'></button>
53
    </div>
54
</body>
55
</html>
- a/LayoutTests/platform/ios/TestExpectations +1 lines
Lines 38-43 fast/forms/ios/ipad/open-picker-using-keyboard.html [ Pass Timeout ] a/LayoutTests/platform/ios/TestExpectations_sec1
38
38
39
fast/css/appearance-apple-pay-button.html [ Pass ]
39
fast/css/appearance-apple-pay-button.html [ Pass ]
40
fast/css/appearance-apple-pay-button-border-radius.html [ Pass ]
40
fast/css/appearance-apple-pay-button-border-radius.html [ Pass ]
41
fast/css/appearance-apple-pay-button-border-radius-longhands.html [ Pass ]
41
fast/css/appearance-apple-pay-button-default-corners.html [ Pass ]
42
fast/css/appearance-apple-pay-button-default-corners.html [ Pass ]
42
fast/css/webkit-named-image/apple-pay-logo-black [ Pass ]
43
fast/css/webkit-named-image/apple-pay-logo-black [ Pass ]
43
fast/css/webkit-named-image/apple-pay-logo-white [ Pass ]
44
fast/css/webkit-named-image/apple-pay-logo-white [ Pass ]
- a/LayoutTests/platform/mac/TestExpectations +1 lines
Lines 1045-1050 webkit.org/b/158649 fast/text/chinese-font-name-aliases-2.html [ ImageOnlyFailur a/LayoutTests/platform/mac/TestExpectations_sec1
1045
1045
1046
fast/css/appearance-apple-pay-button.html [ Pass ]
1046
fast/css/appearance-apple-pay-button.html [ Pass ]
1047
fast/css/appearance-apple-pay-button-border-radius.html [ Pass ]
1047
fast/css/appearance-apple-pay-button-border-radius.html [ Pass ]
1048
fast/css/appearance-apple-pay-button-border-radius-longhands.html [ Pass ]
1048
fast/css/appearance-apple-pay-button-default-corners.html [ Pass ]
1049
fast/css/appearance-apple-pay-button-default-corners.html [ Pass ]
1049
fast/css/webkit-named-image/apple-pay-logo-black [ Pass ]
1050
fast/css/webkit-named-image/apple-pay-logo-black [ Pass ]
1050
fast/css/webkit-named-image/apple-pay-logo-white [ Pass ]
1051
fast/css/webkit-named-image/apple-pay-logo-white [ Pass ]

Return to Bug 238062