Skip to content
This repository was archived by the owner on Jul 18, 2018. It is now read-only.

Commit ecd2115

Browse files
ericwilligersCommit Bot
authored and
Commit Bot
committed
CSS: Remove support for unitless 0 angles in offset-rotate
Angles in offset-rotate must specify units. w3c/csswg-drafts#1162 (comment) Discussed in Intent: https://groups.google.com/a/chromium.org/d/msg/blink-dev/mP-bj7jCyvM/UChplbzpBgAJ Bug: 727195 Change-Id: Iac2e641b3a35c92bdf26e441d52d520469ef3ee6 Reviewed-on: https://chromium-review.googlesource.com/522483 Reviewed-by: Jochen Eisinger Reviewed-by: Rune Lillesveen Commit-Queue: Eric Willigers Cr-Commit-Position: refs/heads/master@{#477398}
1 parent b57fe51 commit ecd2115

File tree

6 files changed

+42
-43
lines changed

6 files changed

+42
-43
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Motion Path Module Level 1: parsing offset with invalid valuestitle>
6+
<link rel="author" title="Eric Willigers" href="mailto:[email protected]">
7+
<link rel="help" href="https://drafts.fxtf.org/motion-1/#offset-shorthand">
8+
<meta name="assert" content="offset supports only the grammar from the spec.">
9+
<script src="/resources/testharness.js">script>
10+
<script src="/resources/testharnessreport.js">script>
11+
<script src="resources/parsing-testcommon.js">script>
12+
head>
13+
<body>
14+
<script>
15+
test_invalid_value("offset", "path('m 0 0 h 100') 100px 0");
16+
test_invalid_value("offset", "ray(sides 0) 50% 90deg auto");
17+
test_invalid_value("offset", "100px 0deg path('m 0 0 h 100')");
18+
script>
19+
body>
20+
html>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Motion Path Module Level 1: parsing offset with valid valuestitle>
6+
<link rel="author" title="Eric Willigers" href="mailto:[email protected]">
7+
<link rel="help" href="https://drafts.fxtf.org/motion-1/#offset-shorthand">
8+
<meta name="assert" content="offset supports the full grammar from the spec.">
9+
<script src="/resources/testharness.js">script>
10+
<script src="/resources/testharnessreport.js">script>
11+
<script src="resources/parsing-testcommon.js">script>
12+
head>
13+
<body>
14+
<script>
15+
test_valid_value("offset", "path('m 0 0 h 100') 100px 0deg");
16+
test_valid_value("offset", "ray(sides 0deg) 50% 90deg auto", "ray(0deg sides) 50% auto 90deg");
17+
test_valid_value("offset", "none calc(10px + 20%) auto");
18+
script>
19+
body>
20+
html>

third_party/WebKit/LayoutTests/external/wpt/css/motion-1/parsing/offset-rotate-parsing-invalid-expected.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

third_party/WebKit/LayoutTests/fast/css/usecounter-angle-zero-offset-rotate.html

Lines changed: 0 additions & 32 deletions
This file was deleted.

third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -689,14 +689,13 @@ static CSSValue* ConsumeTextDecorationLine(CSSParserTokenRange& range) {
689689
static CSSValue* ConsumeOffsetRotate(CSSParserTokenRange& range,
690690
const CSSParserContext& context) {
691691
CSSValue* angle =
692-
ConsumeAngle(range, context, UseCounter::kUnitlessZeroAngleOffsetRotate);
692+
ConsumeAngle(range, context, Optional<UseCounter::Feature>());
693693
CSSValue* keyword = ConsumeIdent(range);
694694
if (!angle && !keyword)
695695
return nullptr;
696696

697697
if (!angle) {
698-
angle = ConsumeAngle(range, context,
699-
UseCounter::kUnitlessZeroAngleOffsetRotate);
698+
angle = ConsumeAngle(range, context, Optional());
700699
}
701700

702701
CSSValueList* list = CSSValueList::CreateSpaceSeparated();

third_party/WebKit/public/platform/UseCounterFeature.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,6 @@ kThreeValuedPositionObjectPosition = 2004,
15381538
kThreeValuedPositionPerspectiveOrigin = 2005,
15391539
kUnitlessZeroAngleFilter = 2007,
15401540
kUnitlessZeroAngleGradient = 2008,
1541-
kUnitlessZeroAngleOffsetRotate = 2009,
15421541
kUnitlessZeroAngleTransform = 2010,
15431542
kHTMLOListElementStartGetterReversedWithoutStartAttribute = 2011,
15441543
kCredentialManagerPreventSilentAccess = 2012,

0 commit comments

Comments
 (0)