OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2009 Google, Inc. All rights reserved. | 4 * Copyright (C) 2009 Google, Inc. All rights reserved. |
5 * Copyright (C) 2009 Apple Inc. All rights reserved. | 5 * Copyright (C) 2009 Apple Inc. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
11 * | 11 * |
12 * This library is distributed in the hope that it will be useful, | 12 * This library is distributed in the hope that it will be useful, |
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 * Library General Public License for more details. | 15 * Library General Public License for more details. |
16 * | 16 * |
17 * You should have received a copy of the GNU Library General Public License | 17 * You should have received a copy of the GNU Library General Public License |
18 * along with this library; see the file COPYING.LIB. If not, write to | 18 * along with this library; see the file COPYING.LIB. If not, write to |
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
20 * Boston, MA 02110-1301, USA. | 20 * Boston, MA 02110-1301, USA. |
21 */ | 21 */ |
22 | 22 |
23 #ifndef RenderSVGRoot_h | 23 #ifndef RenderSVGRoot_h |
24 #define RenderSVGRoot_h | 24 #define RenderSVGRoot_h |
25 | 25 |
26 #include "core/rendering/RenderReplaced.h" | 26 #include "core/layout/LayoutReplaced.h" |
27 | 27 |
28 namespace blink { | 28 namespace blink { |
29 | 29 |
30 class SVGElement; | 30 class SVGElement; |
31 | 31 |
32 class RenderSVGRoot final : public RenderReplaced { | 32 class RenderSVGRoot final : public LayoutReplaced { |
33 public: | 33 public: |
34 explicit RenderSVGRoot(SVGElement*); | 34 explicit RenderSVGRoot(SVGElement*); |
35 virtual ~RenderSVGRoot(); | 35 virtual ~RenderSVGRoot(); |
36 | 36 |
37 bool isEmbeddedThroughSVGImage() const; | 37 bool isEmbeddedThroughSVGImage() const; |
38 bool isEmbeddedThroughFrameContainingSVGDocument() const; | 38 bool isEmbeddedThroughFrameContainingSVGDocument() const; |
39 | 39 |
40 virtual void computeIntrinsicRatioInformation(FloatSize& intrinsicSize, doub
le& intrinsicRatio) const override; | 40 virtual void computeIntrinsicRatioInformation(FloatSize& intrinsicSize, doub
le& intrinsicRatio) const override; |
41 virtual void mapRectToPaintInvalidationBacking(const LayoutLayerModelObject*
paintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const o
verride; | 41 virtual void mapRectToPaintInvalidationBacking(const LayoutLayerModelObject*
paintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const o
verride; |
42 | 42 |
(...skipping 26 matching lines...) Expand all Loading... |
69 virtual bool hasNonIsolatedBlendingDescendants() const override final; | 69 virtual bool hasNonIsolatedBlendingDescendants() const override final; |
70 | 70 |
71 private: | 71 private: |
72 const LayoutObjectChildList* children() const { return &m_children; } | 72 const LayoutObjectChildList* children() const { return &m_children; } |
73 LayoutObjectChildList* children() { return &m_children; } | 73 LayoutObjectChildList* children() { return &m_children; } |
74 | 74 |
75 virtual LayoutObjectChildList* virtualChildren() override { return children(
); } | 75 virtual LayoutObjectChildList* virtualChildren() override { return children(
); } |
76 virtual const LayoutObjectChildList* virtualChildren() const override { retu
rn children(); } | 76 virtual const LayoutObjectChildList* virtualChildren() const override { retu
rn children(); } |
77 | 77 |
78 virtual const char* renderName() const override { return "RenderSVGRoot"; } | 78 virtual const char* renderName() const override { return "RenderSVGRoot"; } |
79 virtual bool isOfType(LayoutObjectType type) const override { return type ==
LayoutObjectSVG || type == LayoutObjectSVGRoot || RenderReplaced::isOfType(type
); } | 79 virtual bool isOfType(LayoutObjectType type) const override { return type ==
LayoutObjectSVG || type == LayoutObjectSVGRoot || LayoutReplaced::isOfType(type
); } |
80 | 80 |
81 virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = Com
puteActual) const override; | 81 virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = Com
puteActual) const override; |
82 virtual LayoutUnit computeReplacedLogicalHeight() const override; | 82 virtual LayoutUnit computeReplacedLogicalHeight() const override; |
83 virtual void layout() override; | 83 virtual void layout() override; |
84 virtual void paintReplaced(const PaintInfo&, const LayoutPoint&) override; | 84 virtual void paintReplaced(const PaintInfo&, const LayoutPoint&) override; |
85 | 85 |
86 virtual void willBeDestroyed() override; | 86 virtual void willBeDestroyed() override; |
87 virtual void styleDidChange(StyleDifference, const LayoutStyle* oldStyle) ov
erride; | 87 virtual void styleDidChange(StyleDifference, const LayoutStyle* oldStyle) ov
erride; |
88 virtual bool isChildAllowed(LayoutObject*, const LayoutStyle&) const overrid
e; | 88 virtual bool isChildAllowed(LayoutObject*, const LayoutStyle&) const overrid
e; |
89 virtual void addChild(LayoutObject* child, LayoutObject* beforeChild = 0) ov
erride; | 89 virtual void addChild(LayoutObject* child, LayoutObject* beforeChild = 0) ov
erride; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 bool m_hasBoxDecorationBackground : 1; | 126 bool m_hasBoxDecorationBackground : 1; |
127 mutable bool m_hasNonIsolatedBlendingDescendants : 1; | 127 mutable bool m_hasNonIsolatedBlendingDescendants : 1; |
128 mutable bool m_hasNonIsolatedBlendingDescendantsDirty : 1; | 128 mutable bool m_hasNonIsolatedBlendingDescendantsDirty : 1; |
129 }; | 129 }; |
130 | 130 |
131 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(RenderSVGRoot, isSVGRoot()); | 131 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(RenderSVGRoot, isSVGRoot()); |
132 | 132 |
133 } // namespace blink | 133 } // namespace blink |
134 | 134 |
135 #endif // RenderSVGRoot_h | 135 #endif // RenderSVGRoot_h |
OLD | NEW |