summaryrefslogtreecommitdiff
path: root/chromium/third_party/WebKit/Source/core/svg/SVGSVGElement.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/svg/SVGSVGElement.h')
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGSVGElement.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/chromium/third_party/WebKit/Source/core/svg/SVGSVGElement.h b/chromium/third_party/WebKit/Source/core/svg/SVGSVGElement.h
index 54b39de7ead..65f8c69c30e 100644
--- a/chromium/third_party/WebKit/Source/core/svg/SVGSVGElement.h
+++ b/chromium/third_party/WebKit/Source/core/svg/SVGSVGElement.h
@@ -29,6 +29,7 @@
#include "core/svg/SVGFitToViewBox.h"
#include "core/svg/SVGGraphicsElement.h"
#include "core/svg/SVGZoomAndPan.h"
+#include "wtf/WeakPtr.h"
namespace WebCore {
@@ -44,7 +45,7 @@ class SVGSVGElement FINAL : public SVGGraphicsElement,
public SVGFitToViewBox,
public SVGZoomAndPan {
public:
- static PassRefPtr<SVGSVGElement> create(const QualifiedName&, Document&);
+ static PassRefPtr<SVGSVGElement> create(Document&);
using SVGGraphicsElement::ref;
using SVGGraphicsElement::deref;
@@ -130,10 +131,10 @@ public:
SVGZoomAndPanType zoomAndPan() const { return m_zoomAndPan; }
void setZoomAndPan(unsigned short zoomAndPan) { m_zoomAndPan = SVGZoomAndPan::parseFromNumber(zoomAndPan); }
- bool hasEmptyViewBox() const { return viewBoxIsValid() && viewBoxCurrentValue().isEmpty(); }
+ bool hasEmptyViewBox() const { return viewBoxCurrentValue().isValid() && viewBoxCurrentValue().isEmpty(); }
private:
- SVGSVGElement(const QualifiedName&, Document&);
+ explicit SVGSVGElement(Document&);
virtual ~SVGSVGElement();
virtual bool isSVGSVGElement() const OVERRIDE { return true; }
@@ -169,26 +170,22 @@ private:
DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspectRatio)
END_DECLARE_ANIMATED_PROPERTIES
- virtual AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope) const;
+ virtual AffineTransform localCoordinateSpaceTransform(SVGElement::CTMScope) const;
bool m_useCurrentView;
SVGZoomAndPanType m_zoomAndPan;
RefPtr<SMILTimeContainer> m_timeContainer;
SVGPoint m_translation;
RefPtr<SVGViewSpec> m_viewSpec;
+ WeakPtrFactory<SVGSVGElement> m_weakFactory;
};
-inline SVGSVGElement* toSVGSVGElement(Node* node)
+inline bool isSVGSVGElement(const Node& node)
{
- ASSERT_WITH_SECURITY_IMPLICATION(!node || toSVGElement(node)->isSVGSVGElement());
- return static_cast<SVGSVGElement*>(node);
+ return node.isSVGElement() && toSVGElement(node).isSVGSVGElement();
}
-inline const SVGSVGElement* toSVGSVGElement(const Node* node)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!node || toSVGElement(node)->isSVGSVGElement());
- return static_cast<const SVGSVGElement*>(node);
-}
+DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(SVGSVGElement);
} // namespace WebCore