Skip to content
Permalink
Browse files
Unprefix -webkit-backface-visibility
https://bugs.webkit.org/show_bug.cgi?id=170983

Patch by Alex Christensen <achristensen@webkit.org> on 2021-08-12
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* web-platform-tests/css/css-transforms/css-transform-property-existence-expected.txt: Added.
* web-platform-tests/css/css-transforms/css-transform-property-existence.html: Added.
* web-platform-tests/css/css-transforms/parsing/backface-visibility-computed-expected.txt:
* web-platform-tests/css/css-transforms/parsing/backface-visibility-valid-expected.txt:
* web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt:

Source/WebCore:

This has already been done by Chrome and Firefox.
Keep the prefixed version as an alias.

Test: imported/w3c/web-platform-tests/css/css-transforms/css-transform-property-existence.html

* animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
* css/CSSProperties.json:
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):

LayoutTests:

* platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
* platform/ios/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/ios/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
* platform/ios/svg/css/getComputedStyle-basic-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/mac/svg/css/getComputedStyle-basic-expected.txt:

Canonical link: https://commits.webkit.org/240499@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Alex Christensen authored and webkit-commit-queue committed Aug 13, 2021
1 parent 76ba148 commit bfca3aabec21507f744a59631f1711ebd7d621bd
Show file tree
Hide file tree
Showing 24 changed files with 125 additions and 25 deletions.
@@ -1,3 +1,19 @@
2021-08-12 Alex Christensen <achristensen@webkit.org>

Unprefix -webkit-backface-visibility
https://bugs.webkit.org/show_bug.cgi?id=170983

Reviewed by Simon Fraser.

* platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
* platform/ios/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/ios/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
* platform/ios/svg/css/getComputedStyle-basic-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/mac/svg/css/getComputedStyle-basic-expected.txt:

2021-08-12 Carlos Alberto Lopez Perez <clopez@igalia.com>

[GTK][WPE] Gardening of layout test failures
@@ -1,3 +1,20 @@
2021-08-12 Alex Christensen <achristensen@webkit.org>

Unprefix -webkit-backface-visibility
https://bugs.webkit.org/show_bug.cgi?id=170983

Reviewed by Simon Fraser.

* web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* web-platform-tests/css/css-transforms/css-transform-property-existence-expected.txt: Added.
* web-platform-tests/css/css-transforms/css-transform-property-existence.html: Added.
* web-platform-tests/css/css-transforms/parsing/backface-visibility-computed-expected.txt:
* web-platform-tests/css/css-transforms/parsing/backface-visibility-valid-expected.txt:
* web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt:

2021-08-12 Martin Robinson <mrobinson@webkit.org>

Update import of css/css-position from WPT
@@ -17,6 +17,7 @@ PASS animation-name
PASS animation-play-state
PASS animation-timing-function
PASS aspect-ratio
PASS backface-visibility
PASS background-attachment
PASS background-blend-mode
PASS background-clip
@@ -314,7 +315,6 @@ PASS -apple-pay-button-type
PASS -apple-trailing-word
PASS -webkit-appearance
PASS -webkit-backdrop-filter
PASS -webkit-backface-visibility
PASS -webkit-background-clip
PASS -webkit-background-composite
PASS -webkit-background-origin
@@ -0,0 +1,8 @@

PASS Check the existence of transform.
PASS Check the existence of transform-origin.
PASS Check the existence of transform-style.
PASS Check the existence of perspective.
PASS Check the existence of perspective-origin.
PASS Check the existence of backface-visibility.

@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Transforms Test: property existence</title>
<link rel="author" title="Intel" href="http://www.intel.com">
<link rel="help" href="http://www.w3.org/TR/css-transforms-1/#propdef-transform">
<meta name="flags" content="dom">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="test"></div>
<div id="log"></div>
<script>
[
'transform',
'transform-origin',
'transform-style',
'perspective',
'perspective-origin',
'backface-visibility',
].forEach(property => {
test(() => {
assert_true(
property in document.getElementById('test').style,
`expect ${property}`,
);
}, `Check the existence of ${property}.`);
});
</script>
</body>
</html>
@@ -1,4 +1,4 @@

FAIL Property backface-visibility value 'visible' assert_true: backface-visibility doesn't seem to be supported in the computed style expected true got false
FAIL Property backface-visibility value 'hidden' assert_true: backface-visibility doesn't seem to be supported in the computed style expected true got false
PASS Property backface-visibility value 'visible'
PASS Property backface-visibility value 'hidden'

@@ -1,4 +1,4 @@

FAIL e.style['backface-visibility'] = "visible" should set the property value assert_not_equals: property should be set got disallowed value ""
FAIL e.style['backface-visibility'] = "hidden" should set the property value assert_not_equals: property should be set got disallowed value ""
PASS e.style['backface-visibility'] = "visible" should set the property value
PASS e.style['backface-visibility'] = "hidden" should set the property value

Large diffs are not rendered by default.

@@ -9,6 +9,9 @@ PASS align-items: "flex-start" onto "flex-end"
PASS align-self (type: discrete) has testAccumulation function
PASS align-self: "flex-end" onto "flex-start"
PASS align-self: "flex-start" onto "flex-end"
PASS backface-visibility (type: discrete) has testAccumulation function
PASS backface-visibility: "hidden" onto "visible"
PASS backface-visibility: "visible" onto "hidden"
PASS background-attachment (type: discrete) has testAccumulation function
PASS background-attachment: "local" onto "fixed"
PASS background-attachment: "fixed" onto "local"
@@ -9,6 +9,9 @@ PASS align-items: "flex-start" onto "flex-end"
PASS align-self (type: discrete) has testAddition function
PASS align-self: "flex-end" onto "flex-start"
PASS align-self: "flex-start" onto "flex-end"
PASS backface-visibility (type: discrete) has testAddition function
PASS backface-visibility: "hidden" onto "visible"
PASS backface-visibility: "visible" onto "hidden"
PASS background-attachment (type: discrete) has testAddition function
PASS background-attachment: "local" onto "fixed"
PASS background-attachment: "fixed" onto "local"
@@ -12,6 +12,10 @@ PASS align-self (type: discrete) has testInterpolation function
PASS align-self uses discrete animation when animating between "flex-start" and "flex-end" with linear easing
PASS align-self uses discrete animation when animating between "flex-start" and "flex-end" with effect easing
PASS align-self uses discrete animation when animating between "flex-start" and "flex-end" with keyframe easing
PASS backface-visibility (type: discrete) has testInterpolation function
PASS backface-visibility uses discrete animation when animating between "visible" and "hidden" with linear easing
PASS backface-visibility uses discrete animation when animating between "visible" and "hidden" with effect easing
PASS backface-visibility uses discrete animation when animating between "visible" and "hidden" with keyframe easing
PASS background-attachment (type: discrete) has testInterpolation function
PASS background-attachment uses discrete animation when animating between "fixed" and "local" with linear easing
PASS background-attachment uses discrete animation when animating between "fixed" and "local" with effect easing

Large diffs are not rendered by default.

@@ -195,7 +195,6 @@ writing-mode: horizontal-tb;
z-index: auto;
zoom: 1;
-webkit-appearance: none;
-webkit-backface-visibility: visible;
-webkit-background-clip: border-box;
-webkit-background-composite: source-over;
-webkit-background-origin: padding-box;
@@ -194,7 +194,6 @@ writing-mode: horizontal-tb
z-index: auto
zoom: 1
-webkit-appearance: none
-webkit-backface-visibility: visible
-webkit-background-clip: border-box
-webkit-background-composite: source-over
-webkit-background-origin: padding-box

Large diffs are not rendered by default.

@@ -388,8 +388,6 @@ rect: style.getPropertyValue(zoom) : 1
rect: style.getPropertyCSSValue(zoom) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-appearance) : none
rect: style.getPropertyCSSValue(-webkit-appearance) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-backface-visibility) : visible
rect: style.getPropertyCSSValue(-webkit-backface-visibility) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-background-clip) : border-box
rect: style.getPropertyCSSValue(-webkit-background-clip) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-background-composite) : source-over
@@ -912,8 +910,6 @@ g: style.getPropertyValue(zoom) : 1
g: style.getPropertyCSSValue(zoom) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-appearance) : none
g: style.getPropertyCSSValue(-webkit-appearance) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-backface-visibility) : visible
g: style.getPropertyCSSValue(-webkit-backface-visibility) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-background-clip) : border-box
g: style.getPropertyCSSValue(-webkit-background-clip) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-background-composite) : source-over
@@ -195,7 +195,6 @@ writing-mode: horizontal-tb;
z-index: auto;
zoom: 1;
-webkit-appearance: none;
-webkit-backface-visibility: visible;
-webkit-background-clip: border-box;
-webkit-background-composite: source-over;
-webkit-background-origin: padding-box;
@@ -194,7 +194,6 @@ writing-mode: horizontal-tb
z-index: auto
zoom: 1
-webkit-appearance: none
-webkit-backface-visibility: visible
-webkit-background-clip: border-box
-webkit-background-composite: source-over
-webkit-background-origin: padding-box
@@ -388,8 +388,6 @@ rect: style.getPropertyValue(zoom) : 1
rect: style.getPropertyCSSValue(zoom) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-appearance) : none
rect: style.getPropertyCSSValue(-webkit-appearance) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-backface-visibility) : visible
rect: style.getPropertyCSSValue(-webkit-backface-visibility) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-background-clip) : border-box
rect: style.getPropertyCSSValue(-webkit-background-clip) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-background-composite) : source-over
@@ -912,8 +910,6 @@ g: style.getPropertyValue(zoom) : 1
g: style.getPropertyCSSValue(zoom) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-appearance) : none
g: style.getPropertyCSSValue(-webkit-appearance) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-backface-visibility) : visible
g: style.getPropertyCSSValue(-webkit-backface-visibility) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-background-clip) : border-box
g: style.getPropertyCSSValue(-webkit-background-clip) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-background-composite) : source-over
@@ -1,3 +1,24 @@
2021-08-12 Alex Christensen <achristensen@webkit.org>

Unprefix -webkit-backface-visibility
https://bugs.webkit.org/show_bug.cgi?id=170983

Reviewed by Simon Fraser.

This has already been done by Chrome and Firefox.
Keep the prefixed version as an alias.

Test: imported/w3c/web-platform-tests/css/css-transforms/css-transform-property-existence.html

* animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
* css/CSSProperties.json:
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):

2021-08-12 Cameron McCormack <heycam@apple.com>

Fix bounds checks for WhitespaceCache string lengths
@@ -2460,7 +2460,7 @@ CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap()
new DiscretePropertyWrapper<const StyleContentAlignmentData&>(CSSPropertyAlignContent, &RenderStyle::alignContent, &RenderStyle::setAlignContent),
new DiscretePropertyWrapper<const StyleSelfAlignmentData&>(CSSPropertyAlignItems, &RenderStyle::alignItems, &RenderStyle::setAlignItems),
new DiscretePropertyWrapper<const StyleSelfAlignmentData&>(CSSPropertyAlignSelf, &RenderStyle::alignSelf, &RenderStyle::setAlignSelf),
new DiscretePropertyWrapper<BackfaceVisibility>(CSSPropertyWebkitBackfaceVisibility, &RenderStyle::backfaceVisibility, &RenderStyle::setBackfaceVisibility),
new DiscretePropertyWrapper<BackfaceVisibility>(CSSPropertyBackfaceVisibility, &RenderStyle::backfaceVisibility, &RenderStyle::setBackfaceVisibility),
new DiscretePropertyWrapper<FillAttachment>(CSSPropertyBackgroundAttachment, &RenderStyle::backgroundAttachment, &RenderStyle::setBackgroundAttachment),
new DiscretePropertyWrapper<FillBox>(CSSPropertyBackgroundClip, &RenderStyle::backgroundClip, &RenderStyle::setBackgroundClip),
new DiscretePropertyWrapper<FillBox>(CSSPropertyBackgroundOrigin, &RenderStyle::backgroundOrigin, &RenderStyle::setBackgroundOrigin),
@@ -3483,7 +3483,7 @@ RefPtr<CSSValue> ComputedStyleExtractor::valueForPropertyInStyle(const RenderSty
list->append(cssValuePool.createIdentifierValue(CSSValuePaint));
return list;
}
case CSSPropertyWebkitBackfaceVisibility:
case CSSPropertyBackfaceVisibility:
return cssValuePool.createIdentifierValue((style.backfaceVisibility() == BackfaceVisibility::Hidden) ? CSSValueHidden : CSSValueVisible);
case CSSPropertyWebkitBorderImage:
return valueForNinePieceImage(style.borderImage(), style);
@@ -4976,7 +4976,12 @@
"url": "https://drafts.csswg.org/css-contain-1/"
}
},
"-webkit-backface-visibility": {
"backface-visibility": {
"codegen-properties": {
"aliases": [
"-webkit-backface-visibility"
]
},
"values": [
"visible",
"hidden"
@@ -753,7 +753,7 @@ bool CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyID propertyId
return valueID == CSSValueVisible || valueID == CSSValueHidden || valueID == CSSValueCollapse;
case CSSPropertyWebkitAppearance:
return (valueID >= CSSValueCheckbox && valueID <= CSSValueCapsLockIndicator) || valueID == CSSValueNone;
case CSSPropertyWebkitBackfaceVisibility:
case CSSPropertyBackfaceVisibility:
return valueID == CSSValueVisible || valueID == CSSValueHidden;
#if ENABLE(CSS_COMPOSITING)
case CSSPropertyMixBlendMode:
@@ -960,7 +960,7 @@ bool CSSParserFastPaths::isKeywordPropertyID(CSSPropertyID propertyId)
case CSSPropertyUnicodeBidi:
case CSSPropertyVisibility:
case CSSPropertyWebkitAppearance:
case CSSPropertyWebkitBackfaceVisibility:
case CSSPropertyBackfaceVisibility:
case CSSPropertyWebkitBorderFit:
case CSSPropertyWebkitBoxAlign:
case CSSPropertyWebkitBoxDirection:

0 comments on commit bfca3aa

Please sign in to comment.