| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright (C) 2006 Apple Computer, Inc. | |
| 3 * Copyright (C) 2009 Google, Inc. | |
| 4 * | |
| 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. | |
| 9 * | |
| 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. | |
| 14 * | |
| 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. | |
| 19 */ | |
| 20 | |
| 21 #ifndef RenderSVGForeignObject_h | |
| 22 #define RenderSVGForeignObject_h | |
| 23 | |
| 24 #include "core/rendering/svg/RenderSVGBlock.h" | |
| 25 | |
| 26 namespace blink { | |
| 27 | |
| 28 class SVGForeignObjectElement; | |
| 29 | |
| 30 class RenderSVGForeignObject final : public RenderSVGBlock { | |
| 31 public: | |
| 32 explicit RenderSVGForeignObject(SVGForeignObjectElement*); | |
| 33 virtual ~RenderSVGForeignObject(); | |
| 34 | |
| 35 virtual const char* renderName() const override { return "RenderSVGForeignOb
ject"; } | |
| 36 | |
| 37 virtual bool isChildAllowed(LayoutObject*, const LayoutStyle&) const overrid
e; | |
| 38 | |
| 39 virtual void paint(const PaintInfo&, const LayoutPoint&) override; | |
| 40 | |
| 41 virtual void layout() override; | |
| 42 | |
| 43 virtual FloatRect objectBoundingBox() const override { return FloatRect(Floa
tPoint(), m_viewport.size()); } | |
| 44 virtual FloatRect strokeBoundingBox() const override { return FloatRect(Floa
tPoint(), m_viewport.size()); } | |
| 45 virtual FloatRect paintInvalidationRectInLocalCoordinates() const override {
return FloatRect(FloatPoint(), m_viewport.size()); } | |
| 46 | |
| 47 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F
loatPoint& pointInParent, HitTestAction) override; | |
| 48 virtual bool isOfType(LayoutObjectType type) const override { return type ==
LayoutObjectSVGForeignObject || RenderSVGBlock::isOfType(type); } | |
| 49 | |
| 50 virtual void setNeedsTransformUpdate() override { m_needsTransformUpdate = t
rue; } | |
| 51 | |
| 52 FloatRect viewportRect() { return m_viewport; } | |
| 53 | |
| 54 private: | |
| 55 virtual void updateLogicalWidth() override; | |
| 56 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic
alTop, LogicalExtentComputedValues&) const override; | |
| 57 | |
| 58 virtual const AffineTransform& localToParentTransform() const override; | |
| 59 | |
| 60 bool m_needsTransformUpdate : 1; | |
| 61 FloatRect m_viewport; | |
| 62 mutable AffineTransform m_localToParentTransform; | |
| 63 }; | |
| 64 | |
| 65 } | |
| 66 | |
| 67 #endif | |
| OLD | NEW |