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

Side by Side Diff: third_party/WebKit/Source/core/animation/PropertyHandle.h

Issue 1410993004: Make PropertyHandle::svgAttribute() return a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_unCSSInterpolationType
Patch Set: Created 5 years, 2 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 | « no previous file | third_party/WebKit/Source/core/animation/PropertyHandleTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef PropertyHandle_h 5 #ifndef PropertyHandle_h
6 #define PropertyHandle_h 6 #define PropertyHandle_h
7 7
8 #include "core/CSSPropertyNames.h" 8 #include "core/CSSPropertyNames.h"
9 #include "core/CoreExport.h" 9 #include "core/CoreExport.h"
10 #include "core/dom/QualifiedName.h" 10 #include "core/dom/QualifiedName.h"
(...skipping 19 matching lines...) Expand all
30 30
31 bool operator==(const PropertyHandle&) const; 31 bool operator==(const PropertyHandle&) const;
32 bool operator!=(const PropertyHandle& other) const { return !(*this == other ); } 32 bool operator!=(const PropertyHandle& other) const { return !(*this == other ); }
33 33
34 unsigned hash() const; 34 unsigned hash() const;
35 35
36 bool isCSSProperty() const { return handleType == HandleCSSProperty; } 36 bool isCSSProperty() const { return handleType == HandleCSSProperty; }
37 CSSPropertyID cssProperty() const { ASSERT(isCSSProperty()); return property ; } 37 CSSPropertyID cssProperty() const { ASSERT(isCSSProperty()); return property ; }
38 38
39 bool isSVGAttribute() const { return handleType == HandleSVGAttribute; } 39 bool isSVGAttribute() const { return handleType == HandleSVGAttribute; }
40 const QualifiedName* svgAttribute() const { ASSERT(isSVGAttribute()); return attribute; } 40 const QualifiedName& svgAttribute() const { ASSERT(isSVGAttribute()); return *attribute; }
41 41
42 private: 42 private:
43 enum HandleType { 43 enum HandleType {
44 HandleEmptyValueForHashTraits, 44 HandleEmptyValueForHashTraits,
45 HandleDeletedValueForHashTraits, 45 HandleDeletedValueForHashTraits,
46 HandleCSSProperty, 46 HandleCSSProperty,
47 HandleSVGAttribute, 47 HandleSVGAttribute,
48 }; 48 };
49 49
50 explicit PropertyHandle(HandleType handleType) 50 explicit PropertyHandle(HandleType handleType)
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 static blink::PropertyHandle emptyValue() 97 static blink::PropertyHandle emptyValue()
98 { 98 {
99 return blink::PropertyHandle::emptyValueForHashTraits(); 99 return blink::PropertyHandle::emptyValueForHashTraits();
100 } 100 }
101 }; 101 };
102 102
103 } // namespace WTF 103 } // namespace WTF
104 104
105 #endif // PropertyHandle_h 105 #endif // PropertyHandle_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/PropertyHandleTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698