Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: Source/core/layout/svg/LayoutSVGContainer.h

Issue 923533002: Move RenderSVGContainer to layout/svg/LayoutSVGContainer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutTreeAsText.cpp ('k') | Source/core/layout/svg/LayoutSVGContainer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 RenderSVGContainer_h 23 #ifndef LayoutSVGContainer_h
24 #define RenderSVGContainer_h 24 #define LayoutSVGContainer_h
25 25
26 #include "core/rendering/svg/RenderSVGModelObject.h" 26 #include "core/rendering/svg/RenderSVGModelObject.h"
27 27
28 namespace blink { 28 namespace blink {
29 29
30 class SVGElement; 30 class SVGElement;
31 31
32 class RenderSVGContainer : public RenderSVGModelObject { 32 class LayoutSVGContainer : public RenderSVGModelObject {
33 public: 33 public:
34 explicit RenderSVGContainer(SVGElement*); 34 explicit LayoutSVGContainer(SVGElement*);
35 virtual ~RenderSVGContainer(); 35 virtual ~LayoutSVGContainer();
36 36
37 // If you have a RenderSVGContainer, use firstChild or lastChild instead. 37 // If you have a LayoutSVGContainer, use firstChild or lastChild instead.
38 void slowFirstChild() const = delete; 38 void slowFirstChild() const = delete;
39 void slowLastChild() const = delete; 39 void slowLastChild() const = delete;
40 40
41 LayoutObject* firstChild() const { ASSERT(children() == virtualChildren()); return children()->firstChild(); } 41 LayoutObject* firstChild() const { ASSERT(children() == virtualChildren()); return children()->firstChild(); }
42 LayoutObject* lastChild() const { ASSERT(children() == virtualChildren()); r eturn children()->lastChild(); } 42 LayoutObject* lastChild() const { ASSERT(children() == virtualChildren()); r eturn children()->lastChild(); }
43 43
44 virtual void paint(const PaintInfo&, const LayoutPoint&) override; 44 virtual void paint(const PaintInfo&, const LayoutPoint&) override;
45 virtual void styleDidChange(StyleDifference, const LayoutStyle* oldStyle) ov erride; 45 virtual void styleDidChange(StyleDifference, const LayoutStyle* oldStyle) ov erride;
46 virtual void setNeedsBoundariesUpdate() override final { m_needsBoundariesUp date = true; } 46 virtual void setNeedsBoundariesUpdate() override final { m_needsBoundariesUp date = true; }
47 virtual bool didTransformToRootUpdate() { return false; } 47 virtual bool didTransformToRootUpdate() { return false; }
48 bool isObjectBoundingBoxValid() const { return m_objectBoundingBoxValid; } 48 bool isObjectBoundingBoxValid() const { return m_objectBoundingBoxValid; }
49 49
50 bool selfWillPaint(); 50 bool selfWillPaint();
51 51
52 virtual bool hasNonIsolatedBlendingDescendants() const override final; 52 virtual bool hasNonIsolatedBlendingDescendants() const override final;
53 protected: 53 protected:
54 virtual LayoutObjectChildList* virtualChildren() override final { return chi ldren(); } 54 virtual LayoutObjectChildList* virtualChildren() override final { return chi ldren(); }
55 virtual const LayoutObjectChildList* virtualChildren() const override final { return children(); } 55 virtual const LayoutObjectChildList* virtualChildren() const override final { return children(); }
56 56
57 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectSVGContainer || RenderSVGModelObject::isOfType(type); } 57 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectSVGContainer || RenderSVGModelObject::isOfType(type); }
58 virtual const char* renderName() const override { return "RenderSVGContainer "; } 58 virtual const char* renderName() const override { return "LayoutSVGContainer "; }
59 59
60 virtual void layout() override; 60 virtual void layout() override;
61 61
62 virtual void addChild(LayoutObject* child, LayoutObject* beforeChild = 0) ov erride final; 62 virtual void addChild(LayoutObject* child, LayoutObject* beforeChild = 0) ov erride final;
63 virtual void removeChild(LayoutObject*) override final; 63 virtual void removeChild(LayoutObject*) override final;
64 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit ionalOffset) const override final; 64 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit ionalOffset) const override final;
65 65
66 virtual FloatRect objectBoundingBox() const override final { return m_object BoundingBox; } 66 virtual FloatRect objectBoundingBox() const override final { return m_object BoundingBox; }
67 virtual FloatRect strokeBoundingBox() const override final { return m_stroke BoundingBox; } 67 virtual FloatRect strokeBoundingBox() const override final { return m_stroke BoundingBox; }
68 68
(...skipping 18 matching lines...) Expand all
87 87
88 LayoutObjectChildList m_children; 88 LayoutObjectChildList m_children;
89 FloatRect m_objectBoundingBox; 89 FloatRect m_objectBoundingBox;
90 FloatRect m_strokeBoundingBox; 90 FloatRect m_strokeBoundingBox;
91 bool m_objectBoundingBoxValid; 91 bool m_objectBoundingBoxValid;
92 bool m_needsBoundariesUpdate; 92 bool m_needsBoundariesUpdate;
93 mutable bool m_hasNonIsolatedBlendingDescendants : 1; 93 mutable bool m_hasNonIsolatedBlendingDescendants : 1;
94 mutable bool m_hasNonIsolatedBlendingDescendantsDirty : 1; 94 mutable bool m_hasNonIsolatedBlendingDescendantsDirty : 1;
95 }; 95 };
96 96
97 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(RenderSVGContainer, isSVGContainer()); 97 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGContainer, isSVGContainer());
98 98
99 } // namespace blink 99 } // namespace blink
100 100
101 #endif // RenderSVGContainer_h 101 #endif // LayoutSVGContainer_h
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutTreeAsText.cpp ('k') | Source/core/layout/svg/LayoutSVGContainer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698