Commit 3e60ca69 authored by Eric Willigers's avatar Eric Willigers Committed by Commit Bot

CSS: ellipse() has 0 or 2 radii

We were incorrectly accepting
"ellipse(10px at 20px 30px)"
as an ellipse.

Retire use count BasicShapeEllipseOneRadius 0.00002%
https://chromestatus.com/metrics/feature/timeline/popularity/2327

We were incorrectly serializing
"ellipse(10px closest-side at 20px 30px)" as
"ellipse(10px at 20px 30px)"

BUG=899150

Change-Id: I6594ff990f659be2497acb336afbb138b5d91ac8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1593882
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: default avatarEmil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#656441}
parent e0332ab3
......@@ -1761,7 +1761,6 @@ enum WebFeature {
kInputTypeFileSecureOriginOpenChooser = 2324,
kInputTypeFileInsecureOriginOpenChooser = 2325,
kBasicShapeEllipseNoRadius = 2326,
kBasicShapeEllipseOneRadius = 2327,
kBasicShapeEllipseTwoRadius = 2328,
kTemporalInputTypeChooserByTrustedClick = 2329,
kTemporalInputTypeChooserByUntrustedClick = 2330,
......
......@@ -191,25 +191,24 @@ String CSSBasicShapeEllipseValue::CustomCSSText() const {
String radius_x;
String radius_y;
if (radius_x_) {
DCHECK(radius_y_);
auto* radius_x_identifier_value =
DynamicTo<CSSIdentifierValue>(radius_x_.Get());
bool should_serialize_radius_x_value =
!(radius_x_identifier_value &&
radius_x_identifier_value->GetValueID() == CSSValueID::kClosestSide);
bool should_serialize_radius_y_value = false;
if (radius_y_) {
auto* radius_y_identifier_value =
DynamicTo<CSSIdentifierValue>(radius_y_.Get());
should_serialize_radius_y_value = !(
radius_y_identifier_value &&
radius_y_identifier_value->GetValueID() == CSSValueID::kClosestSide);
if (should_serialize_radius_y_value)
radius_y = radius_y_->CssText();
}
if (should_serialize_radius_x_value ||
(!should_serialize_radius_x_value && should_serialize_radius_y_value))
bool radius_x_closest_side =
(radius_x_identifier_value &&
radius_x_identifier_value->GetValueID() == CSSValueID::kClosestSide);
auto* radius_y_identifier_value =
DynamicTo<CSSIdentifierValue>(radius_y_.Get());
bool radius_y_closest_side =
(radius_y_identifier_value &&
radius_y_identifier_value->GetValueID() == CSSValueID::kClosestSide);
if (!radius_x_closest_side || !radius_y_closest_side) {
radius_x = radius_x_->CssText();
radius_y = radius_y_->CssText();
}
}
return BuildEllipseString(
......
......@@ -316,13 +316,6 @@ TEST(CSSPropertyParserTest, ClipPathEllipse) {
EXPECT_TRUE(
UseCounter::IsCounted(*doc, WebFeature::kBasicShapeEllipseTwoRadius));
EXPECT_FALSE(
UseCounter::IsCounted(*doc, WebFeature::kBasicShapeEllipseOneRadius));
CSSParser::ParseSingleValue(CSSPropertyID::kClipPath, "ellipse(1px)",
context);
EXPECT_TRUE(
UseCounter::IsCounted(*doc, WebFeature::kBasicShapeEllipseOneRadius));
EXPECT_FALSE(
UseCounter::IsCounted(*doc, WebFeature::kBasicShapeEllipseNoRadius));
CSSParser::ParseSingleValue(CSSPropertyID::kClipPath, "ellipse()", context);
......
......@@ -253,12 +253,13 @@ CSSBasicShapeEllipseValue* ConsumeBasicShapeEllipse(
auto* shape = MakeGarbageCollected<CSSBasicShapeEllipseValue>();
WebFeature feature = WebFeature::kBasicShapeEllipseNoRadius;
if (CSSValue* radius_x = ConsumeShapeRadius(args, context.Mode())) {
shape->SetRadiusX(radius_x);
feature = WebFeature::kBasicShapeEllipseOneRadius;
if (CSSValue* radius_y = ConsumeShapeRadius(args, context.Mode())) {
shape->SetRadiusY(radius_y);
feature = WebFeature::kBasicShapeEllipseTwoRadius;
CSSValue* radius_y = ConsumeShapeRadius(args, context.Mode());
if (!radius_y) {
return nullptr;
}
shape->SetRadiusX(radius_x);
shape->SetRadiusY(radius_y);
feature = WebFeature::kBasicShapeEllipseTwoRadius;
}
if (css_property_parser_helpers::ConsumeIdent<CSSValueID::kAt>(args)) {
CSSValue* center_x = nullptr;
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Shapes Module Level 1: getComputedValue().shapeOutside</title>
<link rel="help" href="https://drafts.csswg.org/css-shapes/#clip-path-property">
<meta name="assert" content="clip-path computed value is as specified.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<style>
#target {
font-size: 40px;
}
</style>
<div id="target"></div>
<script>
test_computed_value("clip-path", "circle(calc(10px + 0.5em) at -50% 50%)", "circle(30px at -50% 50%)");
test_computed_value("clip-path", "circle(calc(10px - 0.5em) at 50% -50%)", "circle(0px at 50% -50%)");
test_computed_value("clip-path", "ellipse(at 50% 50%)");
test_computed_value("clip-path", "ellipse(60% closest-side at 50% 50%)");
</script>
</body>
</html>
This is a testharness.js-based test.
PASS e.style['clip-path'] = "auto" should not set the property value
PASS e.style['clip-path'] = "ray(0deg)" should not set the property value
PASS e.style['clip-path'] = "inset()" should not set the property value
PASS e.style['clip-path'] = "inset(123)" should not set the property value
PASS e.style['clip-path'] = "inset(1% 2% 3% 4% 5%)" should not set the property value
PASS e.style['clip-path'] = "inset(round 0)" should not set the property value
PASS e.style['clip-path'] = "inset(0px round)" should not set the property value
PASS e.style['clip-path'] = "inset(0px round 123)" should not set the property value
PASS e.style['clip-path'] = "inset(0px round 1% 2% 3% 4% 5%)" should not set the property value
PASS e.style['clip-path'] = "inset(0px round / 1px)" should not set the property value
PASS e.style['clip-path'] = "inset(10px round -20px)" should not set the property value
PASS e.style['clip-path'] = "inset(30% round -40%)" should not set the property value
PASS e.style['clip-path'] = "circle(123)" should not set the property value
PASS e.style['clip-path'] = "circle(at)" should not set the property value
PASS e.style['clip-path'] = "circle(10% 20%)" should not set the property value
PASS e.style['clip-path'] = "circle(-10px at 20px 30px)" should not set the property value
PASS e.style['clip-path'] = "circle(-10% at 20% 30%)" should not set the property value
PASS e.style['clip-path'] = "circle(1% 2% at 0% 100%)" should not set the property value
PASS e.style['clip-path'] = "ellipse(farthest-side at)" should not set the property value
PASS e.style['clip-path'] = "ellipse(1% 2% top right)" should not set the property value
FAIL e.style['clip-path'] = "ellipse(3% at 100% 0%)" should not set the property value assert_equals: expected "" but got "ellipse(3% at 100% 0%)"
PASS e.style['clip-path'] = "ellipse(10% -20% at 30% 40%)" should not set the property value
PASS e.style['clip-path'] = "ellipse(-50px 60px at 70% 80%)" should not set the property value
PASS e.style['clip-path'] = "polygon(1%)" should not set the property value
PASS e.style['clip-path'] = "unknown-box" should not set the property value
Harness: the test ran to completion.
......@@ -35,7 +35,10 @@ test_invalid_value("clip-path", "circle(1% 2% at 0% 100%)");
test_invalid_value("clip-path", "ellipse(farthest-side at)");
test_invalid_value("clip-path", "ellipse(1% 2% top right)");
test_invalid_value("clip-path", "ellipse(3%)");
test_invalid_value("clip-path", "ellipse(3% at 100% 0%)");
test_invalid_value("clip-path", "ellipse(closest-side)");
test_invalid_value("clip-path", "ellipse(farthest-side at 100% 0%)");
test_invalid_value("clip-path", "ellipse(10% -20% at 30% 40%)");
test_invalid_value("clip-path", "ellipse(-50px 60px at 70% 80%)");
......
......@@ -18,6 +18,7 @@ PASS e.style['clip-path'] = "circle(4% at top right)" should set the property va
PASS e.style['clip-path'] = "ellipse()" should set the property value
PASS e.style['clip-path'] = "ellipse(1px closest-side)" should set the property value
PASS e.style['clip-path'] = "ellipse(at 10% 20%)" should set the property value
PASS e.style['clip-path'] = "ellipse(closest-side closest-side at 10% 20%)" should set the property value
PASS e.style['clip-path'] = "ellipse(farthest-side 4% at bottom left)" should set the property value
PASS e.style['clip-path'] = "polygon(1% 2%)" should set the property value
PASS e.style['clip-path'] = "polygon(nonzero, 1px 2px, 3em 4em)" should set the property value
......
......@@ -33,8 +33,9 @@ test_valid_value("clip-path", "circle(farthest-side at center top)", "circle(far
test_valid_value("clip-path", "circle(4% at top right)", "circle(4% at 100% 0%)");
test_valid_value("clip-path", "ellipse()", "ellipse(at 50% 50%)");
test_valid_value("clip-path", "ellipse(1px closest-side)", "ellipse(1px at 50% 50%)");
test_valid_value("clip-path", "ellipse(1px closest-side)", "ellipse(1px closest-side at 50% 50%)");
test_valid_value("clip-path", "ellipse(at 10% 20%)");
test_valid_value("clip-path", "ellipse(closest-side closest-side at 10% 20%)", "ellipse(at 10% 20%)");
test_valid_value("clip-path", "ellipse(farthest-side 4% at bottom left)", "ellipse(farthest-side 4% at 0% 100%)");
test_valid_value("clip-path", "polygon(1% 2%)");
......
......@@ -19,6 +19,7 @@
<script>
test_computed_value("shape-outside", "circle(calc(10px + 0.5em) at -50% 50%) border-box", "circle(30px at -50% 50%) border-box");
test_computed_value("shape-outside", "circle(calc(10px - 0.5em) at 50% -50%) border-box", "circle(0px at 50% -50%) border-box");
test_computed_value("shape-outside", "ellipse(60% closest-side at 50% 50%)");
</script>
</body>
</html>
This is a testharness.js-based test.
PASS e.style['shape-outside'] = "auto" should not set the property value
PASS e.style['shape-outside'] = "ray(0deg)" should not set the property value
PASS e.style['shape-outside'] = "inset()" should not set the property value
PASS e.style['shape-outside'] = "inset(123)" should not set the property value
PASS e.style['shape-outside'] = "inset(1% 2% 3% 4% 5%)" should not set the property value
PASS e.style['shape-outside'] = "inset(round 0)" should not set the property value
PASS e.style['shape-outside'] = "inset(0px round)" should not set the property value
PASS e.style['shape-outside'] = "inset(0px round 123)" should not set the property value
PASS e.style['shape-outside'] = "inset(0px round 1% 2% 3% 4% 5%)" should not set the property value
PASS e.style['shape-outside'] = "inset(0px round / 1px)" should not set the property value
PASS e.style['shape-outside'] = "inset(10px round -20px)" should not set the property value
PASS e.style['shape-outside'] = "inset(30% round -40%)" should not set the property value
PASS e.style['shape-outside'] = "circle(123)" should not set the property value
PASS e.style['shape-outside'] = "circle(at)" should not set the property value
PASS e.style['shape-outside'] = "circle(10% 20%)" should not set the property value
PASS e.style['shape-outside'] = "circle(-10px at 20px 30px)" should not set the property value
PASS e.style['shape-outside'] = "circle(-10% at 20% 30%)" should not set the property value
PASS e.style['shape-outside'] = "circle(1% 2% at 0% 100%)" should not set the property value
PASS e.style['shape-outside'] = "ellipse(farthest-side at)" should not set the property value
PASS e.style['shape-outside'] = "ellipse(1% 2% top right)" should not set the property value
FAIL e.style['shape-outside'] = "ellipse(3%)" should not set the property value assert_equals: expected "" but got "ellipse(3% at 50% 50%)"
FAIL e.style['shape-outside'] = "ellipse(3% at 100% 0%)" should not set the property value assert_equals: expected "" but got "ellipse(3% at 100% 0%)"
PASS e.style['shape-outside'] = "ellipse(10% -20% at 30% 40%)" should not set the property value
PASS e.style['shape-outside'] = "ellipse(-50px 60px at 70% 80%)" should not set the property value
PASS e.style['shape-outside'] = "polygon(1%)" should not set the property value
PASS e.style['shape-outside'] = "fill-box" should not set the property value
PASS e.style['shape-outside'] = "stroke-box" should not set the property value
PASS e.style['shape-outside'] = "view-box" should not set the property value
Harness: the test ran to completion.
......@@ -37,6 +37,8 @@ test_invalid_value("shape-outside", "ellipse(farthest-side at)");
test_invalid_value("shape-outside", "ellipse(1% 2% top right)");
test_invalid_value("shape-outside", "ellipse(3%)");
test_invalid_value("shape-outside", "ellipse(3% at 100% 0%)");
test_invalid_value("shape-outside", "ellipse(closest-side)");
test_invalid_value("shape-outside", "ellipse(farthest-side at 100% 0%)");
test_invalid_value("shape-outside", "ellipse(10% -20% at 30% 40%)");
test_invalid_value("shape-outside", "ellipse(-50px 60px at 70% 80%)");
......
......@@ -18,6 +18,8 @@ PASS e.style['shape-outside'] = "circle(4% at top right)" should set the propert
PASS e.style['shape-outside'] = "ellipse()" should set the property value
PASS e.style['shape-outside'] = "ellipse(3% 2%)" should set the property value
PASS e.style['shape-outside'] = "ellipse(closest-side 1px)" should set the property value
PASS e.style['shape-outside'] = "ellipse(10% closest-side)" should set the property value
PASS e.style['shape-outside'] = "ellipse(closest-side closest-side at 60% 70%)" should set the property value
PASS e.style['shape-outside'] = "ellipse(at 10% 20%)" should set the property value
PASS e.style['shape-outside'] = "ellipse(farthest-side 4% at bottom left)" should set the property value
PASS e.style['shape-outside'] = "polygon(1% 2%)" should set the property value
......
......@@ -35,6 +35,8 @@ test_valid_value("shape-outside", "circle(4% at top right)", "circle(4% at 100%
test_valid_value("shape-outside", "ellipse()", "ellipse(at 50% 50%)");
test_valid_value("shape-outside", "ellipse(3% 2%)", "ellipse(3% 2% at 50% 50%)");
test_valid_value("shape-outside", "ellipse(closest-side 1px)", "ellipse(closest-side 1px at 50% 50%)");
test_valid_value("shape-outside", "ellipse(10% closest-side)", "ellipse(10% closest-side at 50% 50%)");
test_valid_value("shape-outside", "ellipse(closest-side closest-side at 60% 70%)", "ellipse(at 60% 70%)");
test_valid_value("shape-outside", "ellipse(at 10% 20%)");
test_valid_value("shape-outside", "ellipse(farthest-side 4% at bottom left)", "ellipse(farthest-side 4% at 0% 100%)");
......
This is a testharness.js-based test.
PASS ellipse(calc(10in)) - inline style
PASS ellipse(calc(10in + 20px)) - inline style
PASS ellipse(calc(30%)) - inline style
PASS ellipse(calc(100%/4)) - inline style
PASS ellipse(calc(25%*3)) - inline style
PASS ellipse(calc(25%*3 - 10in)) - inline style
PASS ellipse(calc((12.5%*6 + 10in) / 4)) - inline style
PASS ellipse(farthest-side calc(10in)) - inline style
PASS ellipse(farthest-side calc(10in + 20px)) - inline style
PASS ellipse(farthest-side calc(30%)) - inline style
......@@ -20,13 +13,6 @@ PASS ellipse(calc(100%/4) calc(100%/4)) - inline style
PASS ellipse(calc(25%*3) calc(25%*3)) - inline style
PASS ellipse(calc(25%*3 - 10in) calc(25%*3 - 10in)) - inline style
PASS ellipse(calc((12.5%*6 + 10in) / 4) calc((12.5%*6 + 10in) / 4)) - inline style
PASS ellipse(calc(10in)) - computed style
PASS ellipse(calc(10in + 20px)) - computed style
PASS ellipse(calc(30%)) - computed style
PASS ellipse(calc(100%/4)) - computed style
PASS ellipse(calc(25%*3)) - computed style
FAIL ellipse(calc(25%*3 - 10in)) - computed style assert_in_array: value "ellipse(calc(75% + -960px) at 50% 50%)" not in array ["ellipse(calc(75% - 960px) at 50% 50%)", "ellipse(calc(-960px + 75%) at 50% 50%)"]
PASS ellipse(calc((12.5%*6 + 10in) / 4)) - computed style
PASS ellipse(farthest-side calc(10in)) - computed style
PASS ellipse(farthest-side calc(10in + 20px)) - computed style
PASS ellipse(farthest-side calc(30%)) - computed style
......
......@@ -19,19 +19,6 @@
<script type="text/javascript">
var ellipse_calc_tests = [];
var defaultPosition = ' at 50% 50%';
ParsingUtils.calcTestValues.forEach(function(value) {
testCase = ['ellipse('+ value[0] +')',
'ellipse('+ value[1] + defaultPosition +')'];
if(Object.prototype.toString.call( value[2] ) === '[object Array]' && value[2].length == 2) {
testCase.push([
'ellipse('+ value[2][0] + defaultPosition +')',
'ellipse('+ value[2][1] + defaultPosition +')',
]);
} else {
testCase.push('ellipse('+ value[2] + defaultPosition +')');
}
ellipse_calc_tests.push(testCase);
});
ParsingUtils.calcTestValues.forEach(function(value) {
testCase = ['ellipse(farthest-side '+ value[0] +')',
'ellipse(farthest-side '+ value[1] + defaultPosition +')'];
......
......@@ -6,13 +6,6 @@ PASS ellipse(at calc(100%/4) 50%) - inline style
PASS ellipse(at calc(25%*3) 50%) - inline style
PASS ellipse(at calc(25%*3 - 10in) 50%) - inline style
PASS ellipse(at calc((12.5%*6 + 10in) / 4) 50%) - inline style
PASS ellipse(farthest-side at calc(10in) 50%) - inline style
PASS ellipse(farthest-side at calc(10in + 20px) 50%) - inline style
PASS ellipse(farthest-side at calc(30%) 50%) - inline style
PASS ellipse(farthest-side at calc(100%/4) 50%) - inline style
PASS ellipse(farthest-side at calc(25%*3) 50%) - inline style
PASS ellipse(farthest-side at calc(25%*3 - 10in) 50%) - inline style
PASS ellipse(farthest-side at calc((12.5%*6 + 10in) / 4) 50%) - inline style
PASS ellipse(closest-side farthest-side at calc(10in) calc(10in)) - inline style
PASS ellipse(closest-side farthest-side at calc(10in + 20px) calc(10in + 20px)) - inline style
PASS ellipse(closest-side farthest-side at calc(30%) calc(30%)) - inline style
......@@ -27,13 +20,6 @@ PASS ellipse(at calc(100%/4) 50%) - computed style
PASS ellipse(at calc(25%*3) 50%) - computed style
FAIL ellipse(at calc(25%*3 - 10in) 50%) - computed style assert_in_array: value "ellipse(at calc(75% + -960px) 50%)" not in array ["ellipse(at calc(75% - 960px) 50%)", "ellipse(at calc(-960px + 75%) 50%)"]
PASS ellipse(at calc((12.5%*6 + 10in) / 4) 50%) - computed style
PASS ellipse(farthest-side at calc(10in) 50%) - computed style
PASS ellipse(farthest-side at calc(10in + 20px) 50%) - computed style
PASS ellipse(farthest-side at calc(30%) 50%) - computed style
PASS ellipse(farthest-side at calc(100%/4) 50%) - computed style
PASS ellipse(farthest-side at calc(25%*3) 50%) - computed style
FAIL ellipse(farthest-side at calc(25%*3 - 10in) 50%) - computed style assert_in_array: value "ellipse(farthest-side at calc(75% + -960px) 50%)" not in array ["ellipse(farthest-side at calc(75% - 960px) 50%)", "ellipse(farthest-side at calc(-960px + 75%) 50%)"]
PASS ellipse(farthest-side at calc((12.5%*6 + 10in) / 4) 50%) - computed style
PASS ellipse(closest-side farthest-side at calc(10in) calc(10in)) - computed style
PASS ellipse(closest-side farthest-side at calc(10in + 20px) calc(10in + 20px)) - computed style
PASS ellipse(closest-side farthest-side at calc(30%) calc(30%)) - computed style
......
......@@ -31,19 +31,6 @@
}
ellipse_position_calc_tests.push(testCase);
});
ParsingUtils.calcTestValues.forEach(function(value) {
testCase = ['ellipse(farthest-side at '+ value[0] +' 50%)',
'ellipse(farthest-side at '+ value[1] +' 50%)'];
if(Object.prototype.toString.call( value[2] ) === '[object Array]' && value[2].length == 2) {
testCase.push([
'ellipse(farthest-side at '+ value[2][0] +' 50%)',
'ellipse(farthest-side at '+ value[2][1] +' 50%)'
]);
} else {
testCase.push('ellipse(farthest-side at '+ value[2] +' 50%)');
}
ellipse_position_calc_tests.push(testCase);
});
ParsingUtils.calcTestValues.forEach(function(value) {
testCase = ['ellipse(closest-side farthest-side at '+ value[0] +' '+ value[0] +')',
'ellipse(closest-side farthest-side at '+ value[1] +' '+ value[1] +')'];
......
......@@ -735,17 +735,13 @@ var validCircleRadii = [
]
var validEllipseRadii = [
['', 'at 50% 50%', 'at 50% 50%'],
['50u1', '50u1 at 50% 50%', '50u1 at 50% 50%'],
['50%', '50% at 50% 50%', '50% at 50% 50%'],
['closest-side', 'at 50% 50%', 'at 50% 50%'],
['farthest-side', 'farthest-side at 50% 50%', 'farthest-side at 50% 50%'],
['50u1 100u1', '50u1 100u1 at 50% 50%'],
['100u1 100px', '100u1 100px at 50% 50%'],
['25% 50%', '25% 50% at 50% 50%'],
['50u1 25%', '50u1 25% at 50% 50%'],
['25% 50u1', '25% 50u1 at 50% 50%'],
['25% closest-side', '25% at 50% 50%'],
['25u1 closest-side', '25u1 at 50% 50%'],
['25% closest-side', '25% closest-side at 50% 50%'],
['25u1 closest-side', '25u1 closest-side at 50% 50%'],
['closest-side 75%', 'closest-side 75% at 50% 50%'],
['closest-side 75u1', 'closest-side 75u1 at 50% 50%'],
['25% farthest-side', '25% farthest-side at 50% 50%'],
......@@ -755,7 +751,7 @@ var validEllipseRadii = [
['closest-side closest-side', 'at 50% 50%'],
['farthest-side farthest-side', 'farthest-side farthest-side at 50% 50%'],
['closest-side farthest-side', 'closest-side farthest-side at 50% 50%'],
['farthest-side closest-side', 'farthest-side at 50% 50%']
['farthest-side closest-side', 'farthest-side closest-side at 50% 50%']
]
var validInsets = [
......
......@@ -104,16 +104,10 @@ PASS getCSSText("shape-outside", "circle(10px at right 10px bottom 10px)") is "c
PASS getComputedStyleValue("shape-outside", "circle(10px at right 10px bottom 10px)") is "circle(10px at right 10px bottom 10px)"
PASS getCSSText("shape-outside", "ellipse()") is "ellipse(at 50% 50%)"
PASS getComputedStyleValue("shape-outside", "ellipse()") is "ellipse(at 50% 50%)"
PASS getCSSText("shape-outside", "ellipse(10px)") is "ellipse(10px at 50% 50%)"
PASS getComputedStyleValue("shape-outside", "ellipse(10px)") is "ellipse(10px at 50% 50%)"
PASS getCSSText("shape-outside", "ellipse(10px 20px)") is "ellipse(10px 20px at 50% 50%)"
PASS getComputedStyleValue("shape-outside", "ellipse(10px 20px)") is "ellipse(10px 20px at 50% 50%)"
PASS getCSSText("shape-outside", "ellipse(10px at 10px)") is "ellipse(10px at 10px 50%)"
PASS getComputedStyleValue("shape-outside", "ellipse(10px at 10px)") is "ellipse(10px at 10px 50%)"
PASS getCSSText("shape-outside", "ellipse(10px 20px at 10px)") is "ellipse(10px 20px at 10px 50%)"
PASS getComputedStyleValue("shape-outside", "ellipse(10px 20px at 10px)") is "ellipse(10px 20px at 10px 50%)"
PASS getCSSText("shape-outside", "ellipse(10px at 10px 10px)") is "ellipse(10px at 10px 10px)"
PASS getComputedStyleValue("shape-outside", "ellipse(10px at 10px 10px)") is "ellipse(10px at 10px 10px)"
PASS getCSSText("shape-outside", "ellipse(at 10px)") is "ellipse(at 10px 50%)"
PASS getComputedStyleValue("shape-outside", "ellipse(at 10px)") is "ellipse(at 10px 50%)"
PASS getCSSText("shape-outside", "ellipse(at 10px 10px)") is "ellipse(at 10px 10px)"
......@@ -122,12 +116,6 @@ PASS getCSSText("shape-outside", "ellipse(at top left)") is "ellipse(at 0% 0%)"
PASS getComputedStyleValue("shape-outside", "ellipse(at top left)") is "ellipse(at 0% 0%)"
PASS getCSSText("shape-outside", "ellipse(at right bottom)") is "ellipse(at 100% 100%)"
PASS getComputedStyleValue("shape-outside", "ellipse(at right bottom)") is "ellipse(at 100% 100%)"
PASS getCSSText("shape-outside", "ellipse(10px at left 0% top 10px)") is "ellipse(10px at 0% 10px)"
PASS getComputedStyleValue("shape-outside", "ellipse(10px at left 0% top 10px)") is "ellipse(10px at 0% 10px)"
PASS getCSSText("shape-outside", "ellipse(10px at top 10px left 10px)") is "ellipse(10px at 10px 10px)"
PASS getComputedStyleValue("shape-outside", "ellipse(10px at top 10px left 10px)") is "ellipse(10px at 10px 10px)"
PASS getCSSText("shape-outside", "ellipse(10px at right 10px bottom 10px)") is "ellipse(10px at right 10px bottom 10px)"
PASS getComputedStyleValue("shape-outside", "ellipse(10px at right 10px bottom 10px)") is "ellipse(10px at right 10px bottom 10px)"
PASS getCSSText("shape-outside", "ellipse(10px 20px at left 0% top 10px)") is "ellipse(10px 20px at 0% 10px)"
PASS getComputedStyleValue("shape-outside", "ellipse(10px 20px at left 0% top 10px)") is "ellipse(10px 20px at 0% 10px)"
PASS getCSSText("shape-outside", "ellipse(10px 20px at top 10px left 10px)") is "ellipse(10px 20px at 10px 10px)"
......@@ -140,8 +128,8 @@ PASS getCSSText("shape-outside", "ellipse(farthest-side farthest-side at 50px 50
PASS getComputedStyleValue("shape-outside", "ellipse(farthest-side farthest-side at 50px 50px)") is "ellipse(farthest-side farthest-side at 50px 50px)"
PASS getCSSText("shape-outside", "ellipse(closest-side farthest-side at 50px 50px)") is "ellipse(closest-side farthest-side at 50px 50px)"
PASS getComputedStyleValue("shape-outside", "ellipse(closest-side farthest-side at 50px 50px)") is "ellipse(closest-side farthest-side at 50px 50px)"
PASS getCSSText("shape-outside", "ellipse(farthest-side closest-side at 50px 50px)") is "ellipse(farthest-side at 50px 50px)"
PASS getComputedStyleValue("shape-outside", "ellipse(farthest-side closest-side at 50px 50px)") is "ellipse(farthest-side at 50px 50px)"
PASS getCSSText("shape-outside", "ellipse(farthest-side closest-side at 50px 50px)") is "ellipse(farthest-side closest-side at 50px 50px)"
PASS getComputedStyleValue("shape-outside", "ellipse(farthest-side closest-side at 50px 50px)") is "ellipse(farthest-side closest-side at 50px 50px)"
PASS getCSSText("shape-outside", "polygon(10px 20px, 30px 40px, 40px 50px)") is "polygon(10px 20px, 30px 40px, 40px 50px)"
PASS getComputedStyleValue("shape-outside", "polygon(10px 20px, 30px 40px, 40px 50px)") is "polygon(10px 20px, 30px 40px, 40px 50px)"
PASS getCSSText("shape-outside", "polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)") is "polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)"
......@@ -258,6 +246,18 @@ PASS getCSSText("shape-outside", "ellipse(10px 20px at)") is ""
PASS getComputedStyleValue("shape-outside", "ellipse(10px 20px at)") is "none"
PASS getCSSText("shape-outside", "ellipse(at)") is ""
PASS getComputedStyleValue("shape-outside", "ellipse(at)") is "none"
PASS getCSSText("shape-outside", "ellipse(10px)") is ""
PASS getComputedStyleValue("shape-outside", "ellipse(10px)") is "none"
PASS getCSSText("shape-outside", "ellipse(10px at 10px)") is ""
PASS getComputedStyleValue("shape-outside", "ellipse(10px at 10px)") is "none"
PASS getCSSText("shape-outside", "ellipse(10px at 10px 10px)") is ""
PASS getComputedStyleValue("shape-outside", "ellipse(10px at 10px 10px)") is "none"
PASS getCSSText("shape-outside", "ellipse(10px at left 0% top 10px)") is ""
PASS getComputedStyleValue("shape-outside", "ellipse(10px at left 0% top 10px)") is "none"
PASS getCSSText("shape-outside", "ellipse(10px at top 10px left 10px)") is ""
PASS getComputedStyleValue("shape-outside", "ellipse(10px at top 10px left 10px)") is "none"
PASS getCSSText("shape-outside", "ellipse(10px at right 10px bottom 10px)") is ""
PASS getComputedStyleValue("shape-outside", "ellipse(10px at right 10px bottom 10px)") is "none"
PASS getCSSText("shape-outside", "polygon()") is ""
PASS getComputedStyleValue("shape-outside", "polygon()") is "none"
PASS getCSSText("shape-outside", "polygon(evenodd 10px 20px, 30px 40px, 40px 50px)") is ""
......
......@@ -60,25 +60,19 @@ var validShapeValues = [
["circle(10px at right 10px bottom 10px)", "circle(10px at right 10px bottom 10px)"],
["ellipse()", "ellipse(at 50% 50%)", "ellipse(at 50% 50%)"],
["ellipse(10px)", "ellipse(10px at 50% 50%)", "ellipse(10px at 50% 50%)"],
["ellipse(10px 20px)", "ellipse(10px 20px at 50% 50%)"],
["ellipse(10px at 10px)", "ellipse(10px at 10px 50%)", "ellipse(10px at 10px 50%)"],
["ellipse(10px 20px at 10px)", "ellipse(10px 20px at 10px 50%)"],
["ellipse(10px at 10px 10px)", "ellipse(10px at 10px 10px)", "ellipse(10px at 10px 10px)"],
["ellipse(at 10px)", "ellipse(at 10px 50%)", "ellipse(at 10px 50%)"],
["ellipse(at 10px 10px)", "ellipse(at 10px 10px)", "ellipse(at 10px 10px)"],
["ellipse(at top left)", "ellipse(at 0% 0%)", "ellipse(at 0% 0%)"],
["ellipse(at right bottom)", "ellipse(at 100% 100%)", "ellipse(at 100% 100%)"],
["ellipse(10px at left 0% top 10px)", "ellipse(10px at 0% 10px)", "ellipse(10px at 0% 10px)"],
["ellipse(10px at top 10px left 10px)", "ellipse(10px at 10px 10px)", "ellipse(10px at 10px 10px)"],
["ellipse(10px at right 10px bottom 10px)", "ellipse(10px at right 10px bottom 10px)", "ellipse(10px at right 10px bottom 10px)"],
["ellipse(10px 20px at left 0% top 10px)", "ellipse(10px 20px at 0% 10px)"],
["ellipse(10px 20px at top 10px left 10px)", "ellipse(10px 20px at 10px 10px)"],
["ellipse(10px 20px at right 10px bottom 10px)", "ellipse(10px 20px at right 10px bottom 10px)"],
["ellipse(closest-side closest-side at 50px 50px)", "ellipse(at 50px 50px)", "ellipse(at 50px 50px)"],
["ellipse(farthest-side farthest-side at 50px 50px)", "ellipse(farthest-side farthest-side at 50px 50px)", "ellipse(farthest-side farthest-side at 50px 50px)"],
["ellipse(closest-side farthest-side at 50px 50px)", "ellipse(closest-side farthest-side at 50px 50px)", "ellipse(closest-side farthest-side at 50px 50px)"],
["ellipse(farthest-side closest-side at 50px 50px)", "ellipse(farthest-side at 50px 50px)", "ellipse(farthest-side at 50px 50px)"],
["ellipse(farthest-side closest-side at 50px 50px)", "ellipse(farthest-side closest-side at 50px 50px)", "ellipse(farthest-side closest-side at 50px 50px)"],
["polygon(10px 20px, 30px 40px, 40px 50px)", "polygon(10px 20px, 30px 40px, 40px 50px)"],
["polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)", "polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)"],
......@@ -150,6 +144,12 @@ var invalidShapeValues = [
"ellipse(at center center 10px)",
"ellipse(10px 20px at)",
"ellipse(at)",
"ellipse(10px)",
"ellipse(10px at 10px)",
"ellipse(10px at 10px 10px)",
"ellipse(10px at left 0% top 10px)",
"ellipse(10px at top 10px left 10px)",
"ellipse(10px at right 10px bottom 10px)",
"polygon()",
"polygon(evenodd 10px 20px, 30px 40px, 40px 50px)",
......
......@@ -22448,7 +22448,7 @@ Called by update_net_error_codes.py.-->
<int value="2324" label="InputTypeFileSecureOriginOpenChooser"/>
<int value="2325" label="InputTypeFileInsecureOriginOpenChooser"/>
<int value="2326" label="BasicShapeEllipseNoRadius"/>
<int value="2327" label="BasicShapeEllipseOneRadius"/>
<int value="2327" label="OBSOLETE_BasicShapeEllipseOneRadius"/>
<int value="2328" label="BasicShapeEllipseTwoRadius"/>
<int value="2329" label="TemporalInputTypeChooserByTrustedClick"/>
<int value="2330" label="TemporalInputTypeChooserByUntrustedClick"/>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment