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

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

Issue 2357463002: Consolidate read-only exception throwing for SVG*TearOffs (Closed)
Patch Set: Baseline updates Created 4 years, 3 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 20 matching lines...) Expand all
31 #ifndef SVGPropertyTearOff_h 31 #ifndef SVGPropertyTearOff_h
32 #define SVGPropertyTearOff_h 32 #define SVGPropertyTearOff_h
33 33
34 #include "core/dom/QualifiedName.h" 34 #include "core/dom/QualifiedName.h"
35 #include "core/svg/SVGElement.h" 35 #include "core/svg/SVGElement.h"
36 #include "core/svg/properties/SVGProperty.h" 36 #include "core/svg/properties/SVGProperty.h"
37 #include "platform/heap/Handle.h" 37 #include "platform/heap/Handle.h"
38 38
39 namespace blink { 39 namespace blink {
40 40
41 class ExceptionState;
42
41 enum PropertyIsAnimValType { 43 enum PropertyIsAnimValType {
42 PropertyIsNotAnimVal, 44 PropertyIsNotAnimVal,
43 PropertyIsAnimVal 45 PropertyIsAnimVal
44 }; 46 };
45 47
46 class SVGPropertyTearOffBase : public GarbageCollectedFinalized<SVGPropertyTearO ffBase> { 48 class SVGPropertyTearOffBase : public GarbageCollectedFinalized<SVGPropertyTearO ffBase> {
47 public: 49 public:
48 virtual ~SVGPropertyTearOffBase() { } 50 virtual ~SVGPropertyTearOffBase() { }
49 51
50 PropertyIsAnimValType propertyIsAnimVal() const 52 PropertyIsAnimValType propertyIsAnimVal() const
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 m_contextElement = contextElement; 94 m_contextElement = contextElement;
93 m_attributeName = attributeName; 95 m_attributeName = attributeName;
94 } 96 }
95 97
96 virtual AnimatedPropertyType type() const = 0; 98 virtual AnimatedPropertyType type() const = 0;
97 99
98 DEFINE_INLINE_VIRTUAL_TRACE() 100 DEFINE_INLINE_VIRTUAL_TRACE()
99 { 101 {
100 } 102 }
101 103
104 static void throwReadOnly(ExceptionState&);
105
102 protected: 106 protected:
103 SVGPropertyTearOffBase(SVGElement* contextElement, PropertyIsAnimValType pro pertyIsAnimVal, const QualifiedName& attributeName = QualifiedName::null()) 107 SVGPropertyTearOffBase(SVGElement* contextElement, PropertyIsAnimValType pro pertyIsAnimVal, const QualifiedName& attributeName = QualifiedName::null())
104 : m_contextElement(contextElement) 108 : m_contextElement(contextElement)
105 , m_propertyIsAnimVal(propertyIsAnimVal) 109 , m_propertyIsAnimVal(propertyIsAnimVal)
106 , m_isReadOnlyProperty(false) 110 , m_isReadOnlyProperty(false)
107 , m_attributeName(attributeName) 111 , m_attributeName(attributeName)
108 { 112 {
109 } 113 }
110 114
111 private: 115 private:
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 ASSERT(m_target); 158 ASSERT(m_target);
155 } 159 }
156 160
157 private: 161 private:
158 Member<Property> m_target; 162 Member<Property> m_target;
159 }; 163 };
160 164
161 } // namespace blink 165 } // namespace blink
162 166
163 #endif // SVGPropertyTearOff_h 167 #endif // SVGPropertyTearOff_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698