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

Unified Diff: third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.h

Issue 2537223006: Cleanup after removal of the SVGViewSpec interface (Closed)
Patch Set: SVGViewSpec& Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.h
diff --git a/third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.h b/third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.h
index f39ec0f29a5f9d3b49368ed85f6143e32664c304..35e6ac143ef701aef9e8ac196c355739d2346106 100644
--- a/third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.h
+++ b/third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.h
@@ -31,8 +31,6 @@ G* * Redistributions in binary form must reproduce the above
#ifndef SVGAnimatedProperty_h
#define SVGAnimatedProperty_h
-#include "bindings/core/v8/ExceptionState.h"
-#include "core/dom/ExceptionCode.h"
#include "core/svg/SVGParsingError.h"
#include "core/svg/properties/SVGPropertyInfo.h"
#include "core/svg/properties/SVGPropertyTearOff.h"
@@ -41,6 +39,7 @@ G* * Redistributions in binary form must reproduce the above
namespace blink {
+class ExceptionState;
class SVGElement;
class SVGAnimatedPropertyBase
@@ -78,10 +77,6 @@ class SVGAnimatedPropertyBase
return cssPropertyId() != CSSPropertyInvalid;
}
- bool isReadOnly() const { return m_isReadOnly; }
-
- void setReadOnly() { m_isReadOnly = true; }
-
bool isSpecified() const;
DEFINE_INLINE_VIRTUAL_TRACE() {}
@@ -101,7 +96,6 @@ class SVGAnimatedPropertyBase
const unsigned m_type : 5;
const unsigned m_cssPropertyId : kCssPropertyBits;
- unsigned m_isReadOnly : 1;
// This raw pointer is safe since the SVG element is guaranteed to be kept
// alive by a V8 wrapper.
@@ -197,13 +191,7 @@ class SVGAnimatedProperty : public SVGAnimatedPropertyCommon<Property> {
// implementation. Use currentValue() from C++ code.
PrimitiveType baseVal() { return this->baseValue()->value(); }
- void setBaseVal(PrimitiveType value, ExceptionState& exceptionState) {
- if (this->isReadOnly()) {
- exceptionState.throwDOMException(NoModificationAllowedError,
- "The attribute is read-only.");
- return;
- }
-
+ void setBaseVal(PrimitiveType value, ExceptionState&) {
this->baseValue()->setValue(value);
m_baseValueUpdated = true;
@@ -274,20 +262,17 @@ class SVGAnimatedProperty<Property, TearOffType, void>
m_baseValTearOff =
TearOffType::create(this->baseValue(), this->contextElement(),
PropertyIsNotAnimVal, this->attributeName());
- if (this->isReadOnly())
- m_baseValTearOff->setIsReadOnlyProperty();
}
-
- return m_baseValTearOff.get();
+ return m_baseValTearOff;
}
TearOffType* animVal() {
- if (!m_animValTearOff)
+ if (!m_animValTearOff) {
m_animValTearOff =
TearOffType::create(this->currentValue(), this->contextElement(),
PropertyIsAnimVal, this->attributeName());
-
- return m_animValTearOff.get();
+ }
+ return m_animValTearOff;
}
DEFINE_INLINE_VIRTUAL_TRACE() {

Powered by Google App Engine
This is Rietveld 408576698