Index: Source/core/rendering/svg/RenderSVGRoot.h |
diff --git a/Source/core/rendering/svg/RenderSVGRoot.h b/Source/core/rendering/svg/RenderSVGRoot.h |
deleted file mode 100644 |
index a2936cd3454cf87d003526ad23f5d8e12d85130d..0000000000000000000000000000000000000000 |
--- a/Source/core/rendering/svg/RenderSVGRoot.h |
+++ /dev/null |
@@ -1,135 +0,0 @@ |
-/* |
- * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
- * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org> |
- * Copyright (C) 2009 Google, Inc. All rights reserved. |
- * Copyright (C) 2009 Apple 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 |
- * License as published by the Free Software Foundation; either |
- * version 2 of the License, or (at your option) any later version. |
- * |
- * This library is distributed in the hope that it will be useful, |
- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
- * Library General Public License for more details. |
- * |
- * You should have received a copy of the GNU Library General Public License |
- * along with this library; see the file COPYING.LIB. If not, write to |
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
- * Boston, MA 02110-1301, USA. |
- */ |
- |
-#ifndef RenderSVGRoot_h |
-#define RenderSVGRoot_h |
- |
-#include "core/layout/LayoutReplaced.h" |
- |
-namespace blink { |
- |
-class SVGElement; |
- |
-class RenderSVGRoot final : public LayoutReplaced { |
-public: |
- explicit RenderSVGRoot(SVGElement*); |
- virtual ~RenderSVGRoot(); |
- |
- bool isEmbeddedThroughSVGImage() const; |
- bool isEmbeddedThroughFrameContainingSVGDocument() const; |
- |
- virtual void computeIntrinsicRatioInformation(FloatSize& intrinsicSize, double& intrinsicRatio) const override; |
- virtual void mapRectToPaintInvalidationBacking(const LayoutLayerModelObject* paintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const override; |
- |
- // If you have a RenderSVGRoot, use firstChild or lastChild instead. |
- void slowFirstChild() const = delete; |
- void slowLastChild() const = delete; |
- |
- LayoutObject* firstChild() const { ASSERT(children() == virtualChildren()); return children()->firstChild(); } |
- LayoutObject* lastChild() const { ASSERT(children() == virtualChildren()); return children()->lastChild(); } |
- |
- bool isLayoutSizeChanged() const { return m_isLayoutSizeChanged; } |
- virtual void setNeedsBoundariesUpdate() override { m_needsBoundariesOrTransformUpdate = true; } |
- virtual void setNeedsTransformUpdate() override { m_needsBoundariesOrTransformUpdate = true; } |
- |
- IntSize containerSize() const { return m_containerSize; } |
- void setContainerSize(const IntSize& containerSize) |
- { |
- // SVGImage::draw() does a view layout prior to painting, |
- // and we need that layout to know of the new size otherwise |
- // the rendering may be incorrectly using the old size. |
- if (m_containerSize != containerSize) |
- setNeedsLayoutAndFullPaintInvalidation(); |
- m_containerSize = containerSize; |
- } |
- |
- // localToBorderBoxTransform maps local SVG viewport coordinates to local CSS box coordinates. |
- const AffineTransform& localToBorderBoxTransform() const { return m_localToBorderBoxTransform; } |
- bool shouldApplyViewportClip() const; |
- |
- virtual bool hasNonIsolatedBlendingDescendants() const override final; |
- |
-private: |
- const LayoutObjectChildList* children() const { return &m_children; } |
- LayoutObjectChildList* children() { return &m_children; } |
- |
- virtual LayoutObjectChildList* virtualChildren() override { return children(); } |
- virtual const LayoutObjectChildList* virtualChildren() const override { return children(); } |
- |
- virtual const char* renderName() const override { return "RenderSVGRoot"; } |
- virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectSVG || type == LayoutObjectSVGRoot || LayoutReplaced::isOfType(type); } |
- |
- virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = ComputeActual) const override; |
- virtual LayoutUnit computeReplacedLogicalHeight() const override; |
- virtual void layout() override; |
- virtual void paintReplaced(const PaintInfo&, const LayoutPoint&) override; |
- |
- virtual void willBeDestroyed() override; |
- virtual void styleDidChange(StyleDifference, const LayoutStyle* oldStyle) override; |
- virtual bool isChildAllowed(LayoutObject*, const LayoutStyle&) const override; |
- virtual void addChild(LayoutObject* child, LayoutObject* beforeChild = 0) override; |
- virtual void removeChild(LayoutObject*) override; |
- |
- virtual void insertedIntoTree() override; |
- virtual void willBeRemovedFromTree() override; |
- |
- virtual const AffineTransform& localToParentTransform() const override; |
- |
- virtual FloatRect objectBoundingBox() const override { return m_objectBoundingBox; } |
- virtual FloatRect strokeBoundingBox() const override { return m_strokeBoundingBox; } |
- virtual FloatRect paintInvalidationRectInLocalCoordinates() const override { return m_paintInvalidationBoundingBox; } |
- |
- virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) override; |
- |
- virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutLayerModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) const override; |
- |
- virtual void mapLocalToContainer(const LayoutLayerModelObject* paintInvalidationContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0, const PaintInvalidationState* = 0) const override; |
- virtual const LayoutObject* pushMappingToContainer(const LayoutLayerModelObject* ancestorToStopAt, LayoutGeometryMap&) const override; |
- |
- virtual bool canBeSelectionLeaf() const override { return false; } |
- virtual bool canHaveChildren() const override { return true; } |
- |
- virtual void descendantIsolationRequirementsChanged(DescendantIsolationState) override final; |
- |
- void updateCachedBoundaries(); |
- void buildLocalToBorderBoxTransform(); |
- |
- LayoutObjectChildList m_children; |
- IntSize m_containerSize; |
- FloatRect m_objectBoundingBox; |
- bool m_objectBoundingBoxValid; |
- FloatRect m_strokeBoundingBox; |
- FloatRect m_paintInvalidationBoundingBox; |
- mutable AffineTransform m_localToParentTransform; |
- AffineTransform m_localToBorderBoxTransform; |
- bool m_isLayoutSizeChanged : 1; |
- bool m_needsBoundariesOrTransformUpdate : 1; |
- bool m_hasBoxDecorationBackground : 1; |
- mutable bool m_hasNonIsolatedBlendingDescendants : 1; |
- mutable bool m_hasNonIsolatedBlendingDescendantsDirty : 1; |
-}; |
- |
-DEFINE_LAYOUT_OBJECT_TYPE_CASTS(RenderSVGRoot, isSVGRoot()); |
- |
-} // namespace blink |
- |
-#endif // RenderSVGRoot_h |