From 5f1ab04193ad0130ca8204aadaceae083aca9881 Mon Sep 17 00:00:00 2001 From: Feng Qian Date: Wed, 17 Jun 2009 12:12:20 -0700 Subject: Get WebKit r44544. --- WebCore/rendering/RenderSVGContainer.h | 56 +++++++++------------------------- 1 file changed, 14 insertions(+), 42 deletions(-) (limited to 'WebCore/rendering/RenderSVGContainer.h') 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 2004, 2005, 2007 Rob Buis - - 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: children in SVG + // 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& rects, int tx, int ty, bool topLevel = true); - virtual void absoluteQuads(Vector&, 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 -- cgit v1.1