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

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

Issue 933953003: Move the remaining rendering/svg/RenderSVG* files to layout. (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) 2009, Google Inc. All rights reserved. 2 * Copyright (c) 2009, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 10 matching lines...) Expand all
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef RenderSVGModelObject_h 31 #ifndef LayoutSVGModelObject_h
32 #define RenderSVGModelObject_h 32 #define LayoutSVGModelObject_h
33 33
34 #include "core/layout/LayoutObject.h" 34 #include "core/layout/LayoutObject.h"
35 #include "core/svg/SVGElement.h" 35 #include "core/svg/SVGElement.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 // Most renderers in the SVG rendering tree will inherit from this class 39 // Most renderers in the SVG rendering tree will inherit from this class
40 // but not all. (e.g. LayoutSVGForeignObject, RenderSVGBlock) thus methods 40 // but not all. (e.g. LayoutSVGForeignObject, LayoutSVGBlock) thus methods
41 // required by SVG renders need to be declared on LayoutObject, but shared 41 // required by SVG renders need to be declared on LayoutObject, but shared
42 // logic can go in this class or in SVGLayoutSupport. 42 // logic can go in this class or in SVGLayoutSupport.
43 43
44 class RenderSVGModelObject : public LayoutObject { 44 class LayoutSVGModelObject : public LayoutObject {
45 public: 45 public:
46 explicit RenderSVGModelObject(SVGElement*); 46 explicit LayoutSVGModelObject(SVGElement*);
47 47
48 virtual bool isChildAllowed(LayoutObject*, const LayoutStyle&) const overrid e; 48 virtual bool isChildAllowed(LayoutObject*, const LayoutStyle&) const overrid e;
49 49
50 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutLayer ModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) cons t override; 50 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutLayer ModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) cons t override;
51 51
52 virtual FloatRect paintInvalidationRectInLocalCoordinates() const override f inal { return m_paintInvalidationBoundingBox; } 52 virtual FloatRect paintInvalidationRectInLocalCoordinates() const override f inal { return m_paintInvalidationBoundingBox; }
53 53
54 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO ffset) const override final; 54 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO ffset) const override final;
55 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const overrid e; 55 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const overrid e;
56 56
57 virtual void mapLocalToContainer(const LayoutLayerModelObject* paintInvalida tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0, const PaintInvalidationState* = 0) const override final; 57 virtual void mapLocalToContainer(const LayoutLayerModelObject* paintInvalida tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0, const PaintInvalidationState* = 0) const override final;
58 virtual const LayoutObject* pushMappingToContainer(const LayoutLayerModelObj ect* ancestorToStopAt, LayoutGeometryMap&) const override final; 58 virtual const LayoutObject* pushMappingToContainer(const LayoutLayerModelObj ect* ancestorToStopAt, LayoutGeometryMap&) const override final;
59 virtual void styleDidChange(StyleDifference, const LayoutStyle* oldStyle) ov erride; 59 virtual void styleDidChange(StyleDifference, const LayoutStyle* oldStyle) ov erride;
60 60
61 virtual void computeLayerHitTestRects(LayerHitTestRects&) const override fin al; 61 virtual void computeLayerHitTestRects(LayerHitTestRects&) const override fin al;
62 62
63 SVGElement* element() const { return toSVGElement(LayoutObject::node()); } 63 SVGElement* element() const { return toSVGElement(LayoutObject::node()); }
64 64
65 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectSVG || LayoutObject::isOfType(type); } 65 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectSVG || LayoutObject::isOfType(type); }
66 66
67 protected: 67 protected:
68 virtual void addLayerHitTestRects(LayerHitTestRects&, const Layer* currentCo mpositedLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const override final; 68 virtual void addLayerHitTestRects(LayerHitTestRects&, const Layer* currentCo mpositedLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const override final;
69 virtual void willBeDestroyed() override; 69 virtual void willBeDestroyed() override;
70 70
71 private: 71 private:
72 // RenderSVGModelObject subclasses should use element() instead. 72 // LayoutSVGModelObject subclasses should use element() instead.
73 void node() const = delete; 73 void node() const = delete;
74 74
75 // This method should never be called, SVG uses a different nodeAtPoint meth od 75 // This method should never be called, SVG uses a different nodeAtPoint meth od
76 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct ion) override final; 76 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct ion) override final;
77 virtual IntRect absoluteFocusRingBoundingBoxRect() const override final; 77 virtual IntRect absoluteFocusRingBoundingBoxRect() const override final;
78 78
79 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&) override final; 79 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&) override final;
80 80
81 protected: 81 protected:
82 FloatRect m_paintInvalidationBoundingBox; 82 FloatRect m_paintInvalidationBoundingBox;
83 }; 83 };
84 84
85 } 85 }
86 86
87 #endif 87 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/svg/LayoutSVGInlineText.cpp ('k') | Source/core/layout/svg/LayoutSVGModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698