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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGLengthTearOff.h

Issue 2912663002: Clean up creation of "detached" SVG* data type objects (Closed)
Patch Set: 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 kSvgLengthtypeEms = 3, 50 kSvgLengthtypeEms = 3,
51 kSvgLengthtypeExs = 4, 51 kSvgLengthtypeExs = 4,
52 kSvgLengthtypePx = 5, 52 kSvgLengthtypePx = 5,
53 kSvgLengthtypeCm = 6, 53 kSvgLengthtypeCm = 6,
54 kSvgLengthtypeMm = 7, 54 kSvgLengthtypeMm = 7,
55 kSvgLengthtypeIn = 8, 55 kSvgLengthtypeIn = 8,
56 kSvgLengthtypePt = 9, 56 kSvgLengthtypePt = 9,
57 kSvgLengthtypePc = 10 57 kSvgLengthtypePc = 10
58 }; 58 };
59 59
60 static SVGLengthTearOff* Create( 60 static SVGLengthTearOff* Create(SVGLength* target,
61 SVGLength* target, 61 SVGElement* context_element,
62 SVGElement* context_element, 62 PropertyIsAnimValType property_is_anim_val,
63 PropertyIsAnimValType property_is_anim_val, 63 const QualifiedName& attribute_name) {
64 const QualifiedName& attribute_name = QualifiedName::Null()) {
65 return new SVGLengthTearOff(target, context_element, property_is_anim_val, 64 return new SVGLengthTearOff(target, context_element, property_is_anim_val,
66 attribute_name); 65 attribute_name);
67 } 66 }
67 static SVGLengthTearOff* CreateDetached();
68 68
69 unsigned short unitType(); 69 unsigned short unitType();
70 SVGLengthMode UnitMode(); 70 SVGLengthMode UnitMode();
71 float value(ExceptionState&); 71 float value(ExceptionState&);
72 void setValue(float value, ExceptionState&); 72 void setValue(float value, ExceptionState&);
73 float valueInSpecifiedUnits(); 73 float valueInSpecifiedUnits();
74 void setValueInSpecifiedUnits(float value, ExceptionState&); 74 void setValueInSpecifiedUnits(float value, ExceptionState&);
75 String valueAsString(); 75 String valueAsString();
76 void setValueAsString(const String&, ExceptionState&); 76 void setValueAsString(const String&, ExceptionState&);
77 void newValueSpecifiedUnits(unsigned short unit_type, 77 void newValueSpecifiedUnits(unsigned short unit_type,
78 float value_in_specified_units, 78 float value_in_specified_units,
79 ExceptionState&); 79 ExceptionState&);
80 void convertToSpecifiedUnits(unsigned short unit_type, ExceptionState&); 80 void convertToSpecifiedUnits(unsigned short unit_type, ExceptionState&);
81 81
82 bool HasExposedLengthUnit(); 82 bool HasExposedLengthUnit();
83 83
84 DECLARE_VIRTUAL_TRACE_WRAPPERS(); 84 DECLARE_VIRTUAL_TRACE_WRAPPERS();
85 85
86 private: 86 private:
87 SVGLengthTearOff(SVGLength*, 87 SVGLengthTearOff(SVGLength*,
88 SVGElement* context_element, 88 SVGElement* context_element,
89 PropertyIsAnimValType, 89 PropertyIsAnimValType,
90 const QualifiedName& attribute_name = QualifiedName::Null()); 90 const QualifiedName& attribute_name);
91 }; 91 };
92 92
93 } // namespace blink 93 } // namespace blink
94 94
95 #endif // SVGLengthTearOff_h 95 #endif // SVGLengthTearOff_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGLengthTearOff.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698