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

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

Issue 2827003002: CSS Motion Path: delete implementation of motion-path property (Closed)
Patch Set: ManualTests Created 3 years, 7 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/css/properties/CSSPropertyOffsetPathUtils.h" 5 #include "core/css/properties/CSSPropertyOffsetPathUtils.h"
6 6
7 #include "core/css/CSSPathValue.h" 7 #include "core/css/CSSPathValue.h"
8 #include "core/css/parser/CSSParserContext.h" 8 #include "core/css/parser/CSSParserContext.h"
9 #include "core/css/parser/CSSPropertyParserHelpers.h" 9 #include "core/css/parser/CSSPropertyParserHelpers.h"
10 #include "core/svg/SVGPathByteStream.h" 10 #include "core/svg/SVGPathByteStream.h"
(...skipping 27 matching lines...) Expand all
38 range = function_range; 38 range = function_range;
39 if (byte_stream->IsEmpty()) 39 if (byte_stream->IsEmpty())
40 return CSSIdentifierValue::Create(CSSValueNone); 40 return CSSIdentifierValue::Create(CSSValueNone);
41 return CSSPathValue::Create(std::move(byte_stream)); 41 return CSSPathValue::Create(std::move(byte_stream));
42 } 42 }
43 43
44 } // namespace 44 } // namespace
45 45
46 CSSValue* CSSPropertyOffsetPathUtils::ConsumeOffsetPath( 46 CSSValue* CSSPropertyOffsetPathUtils::ConsumeOffsetPath(
47 CSSParserTokenRange& range, 47 CSSParserTokenRange& range,
48 const CSSParserContext* context, 48 const CSSParserContext* context) {
49 bool is_motion_path) {
50 CSSValue* value = ConsumePathOrNone(range); 49 CSSValue* value = ConsumePathOrNone(range);
51 50
52 // Count when we receive a valid path other than 'none'. 51 // Count when we receive a valid path other than 'none'.
53 if (value && !value->IsIdentifierValue()) { 52 if (value && !value->IsIdentifierValue())
54 if (is_motion_path) { 53 context->Count(UseCounter::kCSSOffsetInEffect);
55 context->Count(UseCounter::kCSSMotionInEffect);
56 } else {
57 context->Count(UseCounter::kCSSOffsetInEffect);
58 }
59 }
60 return value; 54 return value;
61 } 55 }
62 56
63 CSSValue* CSSPropertyOffsetPathUtils::ConsumePathOrNone( 57 CSSValue* CSSPropertyOffsetPathUtils::ConsumePathOrNone(
64 CSSParserTokenRange& range) { 58 CSSParserTokenRange& range) {
65 CSSValueID id = range.Peek().Id(); 59 CSSValueID id = range.Peek().Id();
66 if (id == CSSValueNone) 60 if (id == CSSValueNone)
67 return CSSPropertyParserHelpers::ConsumeIdent(range); 61 return CSSPropertyParserHelpers::ConsumeIdent(range);
68 62
69 return ConsumePath(range); 63 return ConsumePath(range);
70 } 64 }
71 65
72 } // namespace blink 66 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698