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

Side by Side Diff: Source/core/rendering/svg/RenderSVGContainer.h

Issue 899163003: Move rendering/RenderObject to layout/LayoutObject. (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
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.
(...skipping 20 matching lines...) Expand all
31 31
32 class RenderSVGContainer : public RenderSVGModelObject { 32 class RenderSVGContainer : public RenderSVGModelObject {
33 public: 33 public:
34 explicit RenderSVGContainer(SVGElement*); 34 explicit RenderSVGContainer(SVGElement*);
35 virtual ~RenderSVGContainer(); 35 virtual ~RenderSVGContainer();
36 36
37 // If you have a RenderSVGContainer, use firstChild or lastChild instead. 37 // If you have a RenderSVGContainer, 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 RenderObject* firstChild() const { ASSERT(children() == virtualChildren()); return children()->firstChild(); } 41 LayoutObject* firstChild() const { ASSERT(children() == virtualChildren()); return children()->firstChild(); }
42 RenderObject* 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 RenderStyle* oldStyle) ov erride; 45 virtual void styleDidChange(StyleDifference, const RenderStyle* 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 RenderObjectChildList* virtualChildren() override final { return chi ldren(); } 54 virtual LayoutObjectChildList* virtualChildren() override final { return chi ldren(); }
55 virtual const RenderObjectChildList* virtualChildren() const override final { return children(); } 55 virtual const LayoutObjectChildList* virtualChildren() const override final { return children(); }
56 56
57 virtual bool isOfType(RenderObjectType type) const override { return type == RenderObjectSVGContainer || 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 "RenderSVGContainer "; }
59 59
60 virtual void layout() override; 60 virtual void layout() override;
61 61
62 virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0) ov erride final; 62 virtual void addChild(LayoutObject* child, LayoutObject* beforeChild = 0) ov erride final;
63 virtual void removeChild(RenderObject*) 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
69 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F loatPoint& pointInParent, HitTestAction) override; 69 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F loatPoint& pointInParent, HitTestAction) override;
70 70
71 // Allow RenderSVGTransformableContainer to hook in at the right time in lay out(). 71 // Allow RenderSVGTransformableContainer to hook in at the right time in lay out().
72 virtual bool calculateLocalTransform() { return false; } 72 virtual bool calculateLocalTransform() { return false; }
73 73
74 // Allow RenderSVGViewportContainer to hook in at the right times in layout( ) and nodeAtFloatPoint(). 74 // Allow RenderSVGViewportContainer to hook in at the right times in layout( ) and nodeAtFloatPoint().
75 virtual void calcViewport() { } 75 virtual void calcViewport() { }
76 virtual bool pointIsInsideViewportClip(const FloatPoint& /*pointInParent*/) { return true; } 76 virtual bool pointIsInsideViewportClip(const FloatPoint& /*pointInParent*/) { return true; }
77 77
78 virtual void determineIfLayoutSizeChanged() { } 78 virtual void determineIfLayoutSizeChanged() { }
79 79
80 void updateCachedBoundaries(); 80 void updateCachedBoundaries();
81 81
82 virtual void descendantIsolationRequirementsChanged(DescendantIsolationState ) override final; 82 virtual void descendantIsolationRequirementsChanged(DescendantIsolationState ) override final;
83 83
84 private: 84 private:
85 const RenderObjectChildList* children() const { return &m_children; } 85 const LayoutObjectChildList* children() const { return &m_children; }
86 RenderObjectChildList* children() { return &m_children; } 86 LayoutObjectChildList* children() { return &m_children; }
87 87
88 RenderObjectChildList 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_RENDER_OBJECT_TYPE_CASTS(RenderSVGContainer, isSVGContainer()); 97 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(RenderSVGContainer, isSVGContainer());
98 98
99 } // namespace blink 99 } // namespace blink
100 100
101 #endif // RenderSVGContainer_h 101 #endif // RenderSVGContainer_h
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGBlock.cpp ('k') | Source/core/rendering/svg/RenderSVGContainer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698