Index: Source/core/svg/SVGZoomAndPan.cpp |
diff --git a/Source/core/svg/SVGZoomAndPan.cpp b/Source/core/svg/SVGZoomAndPan.cpp |
index 450152cb59bbb43a60ebf51ebda73b06b9d0b84d..714d0439f337a8ba53c705b153a7f2d5ff3d58c5 100644 |
--- a/Source/core/svg/SVGZoomAndPan.cpp |
+++ b/Source/core/svg/SVGZoomAndPan.cpp |
@@ -1,6 +1,7 @@ |
/* |
* Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
* Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
+ * Copyright (C) 2014 Samsung Electronics. All rights reserved. |
* |
* This library is free software; you can redistribute it and/or |
* modify it under the terms of the GNU Library General Public |
@@ -19,13 +20,24 @@ |
*/ |
#include "config.h" |
- |
#include "core/svg/SVGZoomAndPan.h" |
+#include "bindings/v8/ExceptionMessages.h" |
+#include "bindings/v8/ExceptionState.h" |
#include "core/svg/SVGParserUtilities.h" |
namespace WebCore { |
+SVGZoomAndPan::SVGZoomAndPan() |
+ : m_zoomAndPan(SVGZoomAndPanMagnify) |
+{ |
+} |
+ |
+void SVGZoomAndPan::resetZoomAndPan() |
+{ |
+ m_zoomAndPan = SVGZoomAndPanMagnify; |
+} |
+ |
bool SVGZoomAndPan::isKnownAttribute(const QualifiedName& attrName) |
{ |
return attrName == SVGNames::zoomAndPanAttr; |
@@ -53,29 +65,20 @@ static bool parseZoomAndPanInternal(const CharType*& start, const CharType* end, |
return false; |
} |
-bool SVGZoomAndPan::parseZoomAndPan(const LChar*& start, const LChar* end, SVGZoomAndPanType& zoomAndPan) |
-{ |
- return parseZoomAndPanInternal(start, end, zoomAndPan); |
-} |
- |
-bool SVGZoomAndPan::parseZoomAndPan(const UChar*& start, const UChar* end, SVGZoomAndPanType& zoomAndPan) |
-{ |
- return parseZoomAndPanInternal(start, end, zoomAndPan); |
-} |
- |
-NO_RETURN_DUE_TO_ASSERT void SVGZoomAndPan::ref() |
+bool SVGZoomAndPan::parseZoomAndPan(const LChar*& start, const LChar* end) |
{ |
- ASSERT_NOT_REACHED(); |
+ return parseZoomAndPanInternal(start, end, m_zoomAndPan); |
} |
-NO_RETURN_DUE_TO_ASSERT void SVGZoomAndPan::deref() |
+bool SVGZoomAndPan::parseZoomAndPan(const UChar*& start, const UChar* end) |
{ |
- ASSERT_NOT_REACHED(); |
+ return parseZoomAndPanInternal(start, end, m_zoomAndPan); |
} |
-NO_RETURN_DUE_TO_ASSERT void SVGZoomAndPan::setZoomAndPan(unsigned short) |
+void SVGZoomAndPan::setZoomAndPan(SVGViewSpec*, unsigned short, ExceptionState& exceptionState) |
{ |
- ASSERT_NOT_REACHED(); |
+ // SVGViewSpec and all of its content is read-only. |
+ exceptionState.throwDOMException(NoModificationAllowedError, ExceptionMessages::readOnly()); |
} |
} |