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

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

Issue 168923002: Drop [LegacyImplementedInBaseClass] from SVGZoomAndSpan IDL interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Further refactoring Created 6 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 | « Source/core/svg/SVGViewSpec.idl ('k') | Source/core/svg/SVGZoomAndPan.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGZoomAndPan.h
diff --git a/Source/core/svg/SVGZoomAndPan.h b/Source/core/svg/SVGZoomAndPan.h
index b1432eb9bf02fea3a0c46c7a2b8b2c8ab6d9b10a..5b5c69c535f24edcee1b499b4c888802b6bbdcea 100644
--- a/Source/core/svg/SVGZoomAndPan.h
+++ b/Source/core/svg/SVGZoomAndPan.h
@@ -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
@@ -27,6 +28,9 @@
namespace WebCore {
+class ExceptionState;
+class SVGViewSpec;
+
enum SVGZoomAndPanType {
SVGZoomAndPanUnknown = 0,
SVGZoomAndPanDisable,
@@ -52,38 +56,42 @@ public:
return static_cast<SVGZoomAndPanType>(number);
}
- static bool parseZoomAndPan(const LChar*& start, const LChar* end, SVGZoomAndPanType&);
- static bool parseZoomAndPan(const UChar*& start, const UChar* end, SVGZoomAndPanType&);
+ bool parseZoomAndPan(const LChar*& start, const LChar* end);
+ bool parseZoomAndPan(const UChar*& start, const UChar* end);
- template<class SVGElementTarget>
- static bool parseAttribute(SVGElementTarget* target, const QualifiedName& name, const AtomicString& value)
+ bool parseAttribute(const QualifiedName& name, const AtomicString& value)
{
- ASSERT(target);
if (name == SVGNames::zoomAndPanAttr) {
- SVGZoomAndPanType zoomAndPan = SVGZoomAndPanUnknown;
+ m_zoomAndPan = SVGZoomAndPanUnknown;
if (!value.isEmpty()) {
if (value.is8Bit()) {
const LChar* start = value.characters8();
- parseZoomAndPan(start, start + value.length(), zoomAndPan);
+ parseZoomAndPan(start, start + value.length());
} else {
const UChar* start = value.characters16();
- parseZoomAndPan(start, start + value.length(), zoomAndPan);
+ parseZoomAndPan(start, start + value.length());
}
}
- target->setZoomAndPan(zoomAndPan);
return true;
}
return false;
}
- SVGZoomAndPanType zoomAndPan() const { return SVGZoomAndPanUnknown; }
+ // SVGZoomAndPan JS API.
+ static SVGZoomAndPanType zoomAndPan(SVGZoomAndPan* object) { return object->m_zoomAndPan; }
+ static void setZoomAndPan(SVGZoomAndPan* object, unsigned short value, ExceptionState&) { object->setZoomAndPan(value); }
+ static void setZoomAndPan(SVGViewSpec*, unsigned short, ExceptionState&);
+
+ void setZoomAndPan(unsigned short value) { m_zoomAndPan = parseFromNumber(value); }
+ SVGZoomAndPanType zoomAndPan() const { return m_zoomAndPan; }
+
+protected:
+ SVGZoomAndPan();
+ void resetZoomAndPan();
- // These methods only exist to allow us to compile V8/JSSVGZoomAndPan.*.
- // These are never called, and thus ASSERT_NOT_REACHED.
- void ref();
- void deref();
- void setZoomAndPan(unsigned short);
+private:
+ SVGZoomAndPanType m_zoomAndPan;
};
} // namespace WebCore
« no previous file with comments | « Source/core/svg/SVGViewSpec.idl ('k') | Source/core/svg/SVGZoomAndPan.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698