2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz>
3 * Copyright (C) 2006 Apple Computer Inc.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
21 #ifndef RenderSVGInline_h
22 #define RenderSVGInline_h
24 #include "core/rendering/RenderInline.h"
28 class RenderSVGInline : public RenderInline {
30 explicit RenderSVGInline(Element*);
32 virtual const char* renderName() const OVERRIDE { return "RenderSVGInline"; }
33 virtual LayerType layerTypeRequired() const OVERRIDE FINAL { return NoLayer; }
34 virtual bool isSVGInline() const OVERRIDE FINAL { return true; }
35 virtual bool isSVG() const OVERRIDE FINAL { return true; }
37 virtual bool isChildAllowed(RenderObject*, RenderStyle*) const OVERRIDE;
39 // Chapter 10.4 of the SVG Specification say that we should use the
40 // object bounding box of the parent text element.
41 // We search for the root text element and take its bounding box.
42 // It is also necessary to take the stroke and repaint rect of
43 // this element, since we need it for filters.
44 virtual FloatRect objectBoundingBox() const OVERRIDE FINAL;
45 virtual FloatRect strokeBoundingBox() const OVERRIDE FINAL;
46 virtual FloatRect paintInvalidationRectInLocalCoordinates() const OVERRIDE FINAL;
48 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer) const OVERRIDE FINAL;
49 virtual void computeFloatRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, FloatRect&, bool fixed = false) const OVERRIDE FINAL;
50 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const OVERRIDE FINAL;
51 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&) const OVERRIDE FINAL;
52 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const OVERRIDE FINAL;
55 virtual InlineFlowBox* createInlineFlowBox() OVERRIDE FINAL;
57 virtual void willBeDestroyed() OVERRIDE FINAL;
58 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OVERRIDE FINAL;
60 virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0) OVERRIDE FINAL;
61 virtual void removeChild(RenderObject*) OVERRIDE FINAL;
64 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGInline, isSVGInline());
68 #endif // !RenderSVGTSpan_H