2 * Copyright (C) 2006 Apple Computer, Inc.
3 * Copyright (C) 2009 Google, 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 RenderSVGForeignObject_h
22 #define RenderSVGForeignObject_h
24 #include "core/rendering/svg/RenderSVGBlock.h"
28 class SVGForeignObjectElement;
30 class RenderSVGForeignObject FINAL : public RenderSVGBlock {
32 explicit RenderSVGForeignObject(SVGForeignObjectElement*);
33 virtual ~RenderSVGForeignObject();
35 virtual const char* renderName() const OVERRIDE { return "RenderSVGForeignObject"; }
37 virtual bool isChildAllowed(RenderObject*, RenderStyle*) const OVERRIDE;
39 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE;
41 virtual void layout() OVERRIDE;
43 virtual FloatRect objectBoundingBox() const OVERRIDE { return FloatRect(FloatPoint(), m_viewport.size()); }
44 virtual FloatRect strokeBoundingBox() const OVERRIDE { return FloatRect(FloatPoint(), m_viewport.size()); }
45 virtual FloatRect repaintRectInLocalCoordinates() const OVERRIDE { return FloatRect(FloatPoint(), m_viewport.size()); }
47 virtual void computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect&, bool fixed = false) const OVERRIDE;
48 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction) OVERRIDE;
49 virtual bool isSVGForeignObject() const OVERRIDE { return true; }
51 virtual void setNeedsTransformUpdate() OVERRIDE { m_needsTransformUpdate = true; }
54 virtual void updateLogicalWidth() OVERRIDE;
55 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues&) const OVERRIDE;
57 virtual const AffineTransform& localToParentTransform() const OVERRIDE;
59 bool m_needsTransformUpdate : 1;
61 mutable AffineTransform m_localToParentTransform;