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

Unified Diff: Source/core/svg/SVGLength.h

Issue 901193002: De-ExceptionState-ify SVGLengthContext (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/svg/dom/SVGLength-px-expected.txt ('k') | Source/core/svg/SVGLength.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGLength.h
diff --git a/Source/core/svg/SVGLength.h b/Source/core/svg/SVGLength.h
index 41a3eb64256ffa16c811250e9208146563f79b51..1571e917931a54aed68332542bc2f02e909a2814 100644
--- a/Source/core/svg/SVGLength.h
+++ b/Source/core/svg/SVGLength.h
@@ -21,8 +21,6 @@
#ifndef SVGLength_h
#define SVGLength_h
-#include "bindings/core/v8/ExceptionMessages.h"
-#include "bindings/core/v8/ExceptionStatePlaceholder.h"
#include "core/svg/SVGLengthContext.h"
#include "core/svg/properties/SVGProperty.h"
#include "platform/heap/Handle.h"
@@ -59,12 +57,8 @@ public:
bool operator==(const SVGLength&) const;
bool operator!=(const SVGLength& other) const { return !operator==(other); }
- float value(const SVGLengthContext& context) const
- {
- return value(context, IGNORE_EXCEPTION);
- }
- float value(const SVGLengthContext&, ExceptionState&) const;
- void setValue(float, const SVGLengthContext&, ExceptionState&);
+ float value(const SVGLengthContext&) const;
+ void setValue(float, const SVGLengthContext&);
float valueInSpecifiedUnits() const { return m_valueInSpecifiedUnits; }
void setValueInSpecifiedUnits(float value) { m_valueInSpecifiedUnits = value; }
@@ -82,15 +76,16 @@ public:
void setValueAsString(const String&, ExceptionState&);
void newValueSpecifiedUnits(SVGLengthType, float valueInSpecifiedUnits);
- void convertToSpecifiedUnits(SVGLengthType, const SVGLengthContext&, ExceptionState&);
+ void convertToSpecifiedUnits(SVGLengthType, const SVGLengthContext&);
// Helper functions
- inline bool isRelative() const
+ static inline bool isRelativeUnit(SVGLengthType unitType)
{
- return m_unitType == LengthTypePercentage
- || m_unitType == LengthTypeEMS
- || m_unitType == LengthTypeEXS;
+ return unitType == LengthTypePercentage
+ || unitType == LengthTypeEMS
+ || unitType == LengthTypeEXS;
}
+ inline bool isRelative() const { return isRelativeUnit(unitType()); }
bool isZero() const
{
« no previous file with comments | « LayoutTests/svg/dom/SVGLength-px-expected.txt ('k') | Source/core/svg/SVGLength.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698