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

Side by Side Diff: sky/engine/core/animation/AnimationHelpers.h

Issue 1229273004: Remove Animations and Transitions. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 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
(Empty)
1 // Copyright 2014 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 #ifndef SKY_ENGINE_CORE_ANIMATION_ANIMATIONHELPERS_H_
6 #define SKY_ENGINE_CORE_ANIMATION_ANIMATIONHELPERS_H_
7
8 #include "sky/engine/core/css/parser/BisonCSSParser.h"
9 #include "sky/engine/wtf/text/StringBuilder.h"
10
11 namespace blink {
12
13 static inline CSSPropertyID camelCaseCSSPropertyNameToID(const String& propertyN ame)
14 {
15 if (propertyName.find('-') != kNotFound)
16 return CSSPropertyInvalid;
17
18 StringBuilder builder;
19 size_t position = 0;
20 size_t end;
21 while ((end = propertyName.find(isASCIIUpper, position)) != kNotFound) {
22 builder.append(propertyName.substring(position, end - position) + "-" + toASCIILower((propertyName)[end]));
23 position = end + 1;
24 }
25 builder.append(propertyName.substring(position));
26 // Doesn't handle prefixed properties.
27 CSSPropertyID id = cssPropertyID(builder.toString());
28 return id;
29 }
30
31 } // namespace blink
32
33 #endif // SKY_ENGINE_CORE_ANIMATION_ANIMATIONHELPERS_H_
OLDNEW
« no previous file with comments | « sky/engine/core/animation/AnimationEffect.idl ('k') | sky/engine/core/animation/AnimationHelpersTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698