| 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
|
|
|