diff options
author | Feng Qian <fqian@google.com> | 2009-06-17 12:12:20 -0700 |
---|---|---|
committer | Feng Qian <fqian@google.com> | 2009-06-17 12:12:20 -0700 |
commit | 5f1ab04193ad0130ca8204aadaceae083aca9881 (patch) | |
tree | 5a92cd389e2cfe7fb67197ce14b38469462379f8 /WebCore/rendering/RenderSVGContainer.h | |
parent | 194315e5a908cc8ed67d597010544803eef1ac59 (diff) | |
download | external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.zip external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.tar.gz external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.tar.bz2 |
Get WebKit r44544.
Diffstat (limited to 'WebCore/rendering/RenderSVGContainer.h')
-rw-r--r-- | WebCore/rendering/RenderSVGContainer.h | 56 |
1 files changed, 14 insertions, 42 deletions
diff --git a/WebCore/rendering/RenderSVGContainer.h b/WebCore/rendering/RenderSVGContainer.h index 2c1be65..4bb7e44 100644 --- a/WebCore/rendering/RenderSVGContainer.h +++ b/WebCore/rendering/RenderSVGContainer.h @@ -1,8 +1,7 @@ /* Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2004, 2005, 2007 Rob Buis <buis@kde.org> - - This file is part of the KDE project + Copyright (C) 2009 Google, Inc. 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 @@ -25,14 +24,13 @@ #if ENABLE(SVG) -#include "RenderPath.h" -#include "SVGPreserveAspectRatio.h" +#include "RenderSVGModelObject.h" namespace WebCore { class SVGElement; -class RenderSVGContainer : public RenderObject { +class RenderSVGContainer : public RenderSVGModelObject { public: RenderSVGContainer(SVGStyledElement*); ~RenderSVGContainer(); @@ -42,62 +40,36 @@ public: const RenderObjectChildList* children() const { return &m_children; } RenderObjectChildList* children() { return &m_children; } - int width() const { return m_width; } - int height() const { return m_height; } - - // Some containers do not want it's children - // to be drawn, because they may be 'referenced' - // Example: <marker> children in SVG + // <marker> uses these methods to only allow drawing children during a special marker draw time void setDrawsContents(bool); bool drawsContents() const; virtual bool isSVGContainer() const { return true; } virtual const char* renderName() const { return "RenderSVGContainer"; } - virtual bool requiresLayer() const { return false; } - virtual int lineHeight(bool b, bool isRootLineBox = false) const; - virtual int baselinePosition(bool b, bool isRootLineBox = false) const; - virtual void layout(); virtual void paint(PaintInfo&, int parentX, int parentY); - - virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer); - virtual void absoluteRects(Vector<IntRect>& rects, int tx, int ty, bool topLevel = true); - virtual void absoluteQuads(Vector<FloatQuad>&, bool topLevel = true); virtual void addFocusRingRects(GraphicsContext*, int tx, int ty); - FloatRect relativeBBox(bool includeStroke = true) const; - - virtual bool calculateLocalTransform(); - virtual TransformationMatrix localTransform() const; - virtual TransformationMatrix viewportTransform() const; + virtual FloatRect objectBoundingBox() const; + virtual FloatRect repaintRectInLocalCoordinates() const; - virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction); + virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction); protected: - virtual void applyContentTransforms(PaintInfo&); - virtual void applyAdditionalTransforms(PaintInfo&); + // Allow RenderSVGTransformableContainer to hook in at the right time in layout() + virtual void calculateLocalTransform() { } - void calcBounds(); - - virtual IntRect outlineBoundsForRepaint(RenderBoxModelObject* /*repaintContainer*/) const; + // Allow RenderSVGViewportContainer to hook in at the right times in layout(), paint() and nodeAtFloatPoint() + virtual void calcViewport() { } + virtual void applyViewportClip(PaintInfo&) { } + virtual bool pointIsInsideViewportClip(const FloatPoint& /*pointInParent*/) { return true; } private: - int calcReplacedWidth() const; - int calcReplacedHeight() const; - - RenderObjectChildList m_children; - - int m_width; - int m_height; - bool selfWillPaint() const; + RenderObjectChildList m_children; bool m_drawsContents : 1; - -protected: - IntRect m_absoluteBounds; - TransformationMatrix m_localTransform; }; } // namespace WebCore |