2
2
Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3
3
2004, 2005, 2007 Rob Buis <buis@kde.org>
5
This file is part of the KDE project
5
Copyright (C) 2009 Apple Inc. All rights reserved.
7
7
This library is free software; you can redistribute it and/or
8
8
modify it under the terms of the GNU Library General Public
30
30
namespace WebCore {
32
// This is used for non-root <svg> elements and <marker> elements, neither of which are SVGTransformable
33
// thus we inherit from RenderSVGContainer instead of RenderSVGTransformableContainer
32
34
class RenderSVGViewportContainer : public RenderSVGContainer {
34
36
RenderSVGViewportContainer(SVGStyledElement*);
35
~RenderSVGViewportContainer();
38
// FIXME: This is only public for SVGResourceMarker::draw, likely the callsite should be changed.
39
TransformationMatrix viewportTransform() const;
41
virtual void paint(PaintInfo&, int parentX, int parentY);
37
44
virtual bool isSVGContainer() const { return true; }
38
45
virtual const char* renderName() const { return "RenderSVGViewportContainer"; }
40
virtual void layout();
41
virtual void paint(PaintInfo&, int parentX, int parentY);
47
virtual TransformationMatrix localToParentTransform() const;
49
// FIXME: This override should be removed once callers of RenderBox::absoluteTransform() can be removed.
43
50
virtual TransformationMatrix absoluteTransform() const;
44
virtual TransformationMatrix viewportTransform() const;
46
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
48
FloatRect viewport() const;
53
virtual void applyContentTransforms(PaintInfo&);
54
virtual void applyAdditionalTransforms(PaintInfo&);
52
virtual void calcViewport();
54
virtual void applyViewportClip(PaintInfo&);
55
virtual bool pointIsInsideViewportClip(const FloatPoint& pointInParent);
56
57
FloatRect m_viewport;
60
inline RenderSVGViewportContainer* toRenderSVGViewportContainer(RenderObject* object)
62
ASSERT(!object || !strcmp(object->renderName(), "RenderSVGViewportContainer"));
63
return static_cast<RenderSVGViewportContainer*>(object);
66
// This will catch anyone doing an unnecessary cast.
67
void toRenderSVGViewportContainer(const RenderSVGViewportContainer*);
59
69
} // namespace WebCore
61
71
#endif // ENABLE(SVG)