Log Message
[css-logical] Side border shorthands should not be logical/physical https://bugs.webkit.org/show_bug.cgi?id=239734
Reviewed by Tim Nguyen. No test since now there should be no observable change in behavior. However, this refactoring will be needed for bug 236199. * animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Mark logical side border shorthands as animatable. * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::valueForPropertyInStyle): Add code for serializing logical side border shorthands. * css/CSSProperties.json: Stop side border shorthands from being in a logical property group. They will just expand into logical or physical longhands, but the shorthands themselves will be normal. * css/makeprop.pl: (addProperty): Assert that no shorthand belongs to a logical property group. * css/parser/CSSParser.cpp: (WebCore::CSSParser::parseValueWithVariableReferences): Remove dead code.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (293492 => 293493)
--- trunk/Source/WebCore/ChangeLog 2022-04-27 02:00:03 UTC (rev 293492)
+++ trunk/Source/WebCore/ChangeLog 2022-04-27 02:01:32 UTC (rev 293493)
@@ -1,3 +1,35 @@
+2022-04-26 Oriol Brufau <obru...@igalia.com>
+
+ [css-logical] Side border shorthands should not be logical/physical
+ https://bugs.webkit.org/show_bug.cgi?id=239734
+
+ Reviewed by Tim Nguyen.
+
+ No test since now there should be no observable change in behavior.
+
+ However, this refactoring will be needed for bug 236199.
+
+ * animation/CSSPropertyAnimation.cpp:
+ (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
+ Mark logical side border shorthands as animatable.
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
+ Add code for serializing logical side border shorthands.
+
+ * css/CSSProperties.json:
+ Stop side border shorthands from being in a logical property group.
+ They will just expand into logical or physical longhands, but the
+ shorthands themselves will be normal.
+
+ * css/makeprop.pl:
+ (addProperty):
+ Assert that no shorthand belongs to a logical property group.
+
+ * css/parser/CSSParser.cpp:
+ (WebCore::CSSParser::parseValueWithVariableReferences):
+ Remove dead code.
+
2022-04-26 Jean-Yves Avenard <j...@apple.com>
MediaSession.setPositionState() does not work.
Modified: trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp (293492 => 293493)
--- trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp 2022-04-27 02:00:03 UTC (rev 293492)
+++ trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp 2022-04-27 02:01:32 UTC (rev 293493)
@@ -3373,6 +3373,7 @@
CSSPropertyWebkitMaskPosition,
CSSPropertyMaskRepeat,
CSSPropertyBorderTop, CSSPropertyBorderRight, CSSPropertyBorderBottom, CSSPropertyBorderLeft,
+ CSSPropertyBorderBlockStart, CSSPropertyBorderBlockEnd, CSSPropertyBorderInlineStart, CSSPropertyBorderInlineEnd,
CSSPropertyBorderColor,
CSSPropertyBorderRadius,
CSSPropertyBorderWidth,
Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (293492 => 293493)
--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2022-04-27 02:00:03 UTC (rev 293492)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2022-04-27 02:01:32 UTC (rev 293493)
@@ -4043,6 +4043,10 @@
}
case CSSPropertyBorderBlockColor:
return getCSSPropertyValuesFor2SidesShorthand(borderBlockColorShorthand());
+ case CSSPropertyBorderBlockEnd:
+ return getCSSPropertyValuesForShorthandProperties(borderBlockEndShorthand());
+ case CSSPropertyBorderBlockStart:
+ return getCSSPropertyValuesForShorthandProperties(borderBlockStartShorthand());
case CSSPropertyBorderBlockStyle:
return getCSSPropertyValuesFor2SidesShorthand(borderBlockStyleShorthand());
case CSSPropertyBorderBlockWidth:
@@ -4061,6 +4065,10 @@
}
case CSSPropertyBorderInlineColor:
return getCSSPropertyValuesFor2SidesShorthand(borderInlineColorShorthand());
+ case CSSPropertyBorderInlineEnd:
+ return getCSSPropertyValuesForShorthandProperties(borderInlineEndShorthand());
+ case CSSPropertyBorderInlineStart:
+ return getCSSPropertyValuesForShorthandProperties(borderInlineStartShorthand());
case CSSPropertyBorderInlineStyle:
return getCSSPropertyValuesFor2SidesShorthand(borderInlineStyleShorthand());
case CSSPropertyBorderInlineWidth:
@@ -4212,21 +4220,17 @@
break;
/* Directional properties are resolved by resolveDirectionAwareProperty() before the switch. */
- case CSSPropertyBorderBlockEnd:
case CSSPropertyBorderBlockEndColor:
case CSSPropertyBorderBlockEndStyle:
case CSSPropertyBorderBlockEndWidth:
- case CSSPropertyBorderBlockStart:
case CSSPropertyBorderBlockStartColor:
case CSSPropertyBorderBlockStartStyle:
case CSSPropertyBorderBlockStartWidth:
- case CSSPropertyBorderEndEndRadius:
- case CSSPropertyBorderEndStartRadius:
- case CSSPropertyBorderInlineEnd:
+ case CSSPropertyBorderEndEndRadius:
+ case CSSPropertyBorderEndStartRadius:
case CSSPropertyBorderInlineEndColor:
case CSSPropertyBorderInlineEndStyle:
case CSSPropertyBorderInlineEndWidth:
- case CSSPropertyBorderInlineStart:
case CSSPropertyBorderInlineStartColor:
case CSSPropertyBorderInlineStartStyle:
case CSSPropertyBorderInlineStartWidth:
Modified: trunk/Source/WebCore/css/CSSProperties.json (293492 => 293493)
--- trunk/Source/WebCore/css/CSSProperties.json 2022-04-27 02:00:03 UTC (rev 293492)
+++ trunk/Source/WebCore/css/CSSProperties.json 2022-04-27 02:01:32 UTC (rev 293493)
@@ -1342,11 +1342,7 @@
"border-block-end-width",
"border-block-end-style",
"border-block-end-color"
- ],
- "logical-property-group": {
- "name": "border",
- "resolver": "block-end"
- }
+ ]
},
"specification": {
"category": "css-logical-props",
@@ -1423,11 +1419,7 @@
"border-block-start-width",
"border-block-start-style",
"border-block-start-color"
- ],
- "logical-property-group": {
- "name": "border",
- "resolver": "block-start"
- }
+ ]
},
"specification": {
"category": "css-logical-props",
@@ -1525,11 +1517,7 @@
"border-bottom-width",
"border-bottom-style",
"border-bottom-color"
- ],
- "logical-property-group": {
- "name": "border",
- "resolver": "bottom"
- }
+ ]
},
"specification": {
"category": "css-backgrounds",
@@ -1770,11 +1758,7 @@
"border-inline-end-width",
"border-inline-end-style",
"border-inline-end-color"
- ],
- "logical-property-group": {
- "name": "border",
- "resolver": "inline-end"
- }
+ ]
},
"specification": {
"category": "css-logical-props",
@@ -1851,11 +1835,7 @@
"border-inline-start-width",
"border-inline-start-style",
"border-inline-start-color"
- ],
- "logical-property-group": {
- "name": "border",
- "resolver": "inline-start"
- }
+ ]
},
"specification": {
"category": "css-logical-props",
@@ -1953,11 +1933,7 @@
"border-left-width",
"border-left-style",
"border-left-color"
- ],
- "logical-property-group": {
- "name": "border",
- "resolver": "left"
- }
+ ]
},
"specification": {
"category": "css-backgrounds",
@@ -2038,11 +2014,7 @@
"border-right-width",
"border-right-style",
"border-right-color"
- ],
- "logical-property-group": {
- "name": "border",
- "resolver": "right"
- }
+ ]
},
"specification": {
"category": "css-backgrounds",
@@ -2162,11 +2134,7 @@
"border-top-width",
"border-top-style",
"border-top-color"
- ],
- "logical-property-group": {
- "name": "border",
- "resolver": "top"
- }
+ ]
},
"specification": {
"category": "css-backgrounds",
Modified: trunk/Source/WebCore/css/makeprop.pl (293492 => 293493)
--- trunk/Source/WebCore/css/makeprop.pl 2022-04-27 02:00:03 UTC (rev 293492)
+++ trunk/Source/WebCore/css/makeprop.pl 2022-04-27 02:01:32 UTC (rev 293493)
@@ -306,6 +306,7 @@
} elsif ($codegenOptionName eq "color-property") {
$nameIsColorProperty{$name} = 1;
} elsif ($codegenOptionName eq "logical-property-group") {
+ die "Shorthand property $name can't belong to a logical property group\n" if exists $codegenProperties->{"longhands"};
my $groupName = $codegenProperties->{$codegenOptionName}{"name"};
my $resolver = $codegenProperties->{$codegenOptionName}{"resolver"};
my $kind;
Modified: trunk/Source/WebCore/css/parser/CSSParser.cpp (293492 => 293493)
--- trunk/Source/WebCore/css/parser/CSSParser.cpp 2022-04-27 02:00:03 UTC (rev 293492)
+++ trunk/Source/WebCore/css/parser/CSSParser.cpp 2022-04-27 02:01:32 UTC (rev 293493)
@@ -201,8 +201,6 @@
auto& substitution = downcast<CSSPendingSubstitutionValue>(value);
auto shorthandID = substitution.shorthandPropertyId();
- if (CSSProperty::isDirectionAwareProperty(shorthandID))
- shorthandID = CSSProperty::resolveDirectionAwareProperty(shorthandID, direction, writingMode);
auto resolvedData = substitution.shorthandValue().resolveVariableReferences(builderState);
if (!resolvedData)
_______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes