Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: third_party/WebKit/Source/core/css/properties/CSSPropertyAnimationNameUtils.cpp

Issue 2896543002: Implements CSSPropertyAPI for the animation-name property. (Closed)
Patch Set: Change parseSingleValue method to take local context as input. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/css/properties/CSSPropertyAnimationNameUtils.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "core/css/properties/CSSPropertyAnimationNameUtils.h"
6
7 #include "core/css/parser/CSSPropertyParserHelpers.h"
8 #include "core/frame/UseCounter.h"
9
10 namespace blink {
11
12 CSSValue* CSSPropertyAnimationNameUtils::ConsumeAnimationName(
13 CSSParserTokenRange& range,
14 const CSSParserContext* context,
15 bool allow_quoted_name) {
16 if (range.Peek().Id() == CSSValueNone)
17 return CSSPropertyParserHelpers::ConsumeIdent(range);
18
19 if (allow_quoted_name && range.Peek().GetType() == kStringToken) {
20 // Legacy support for strings in prefixed animations.
21 context->Count(UseCounter::kQuotedAnimationName);
22
23 const CSSParserToken& token = range.ConsumeIncludingWhitespace();
24 if (EqualIgnoringASCIICase(token.Value(), "none"))
25 return CSSIdentifierValue::Create(CSSValueNone);
26 return CSSCustomIdentValue::Create(token.Value().ToAtomicString());
27 }
28
29 return CSSPropertyParserHelpers::ConsumeCustomIdent(range);
30 }
31
32 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/properties/CSSPropertyAnimationNameUtils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698