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

Side by Side Diff: Source/core/rendering/svg/RenderSVGModelObject.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
(Empty)
1 /*
2 * Copyright (c) 2009, Google Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the
13 * distribution.
14 * * Neither the name of Google Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
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.
29 */
30
31 #ifndef RenderSVGModelObject_h
32 #define RenderSVGModelObject_h
33
34 #include "core/layout/LayoutObject.h"
35 #include "core/svg/SVGElement.h"
36
37 namespace blink {
38
39 // Most renderers in the SVG rendering tree will inherit from this class
40 // but not all. (e.g. LayoutSVGForeignObject, RenderSVGBlock) thus methods
41 // required by SVG renders need to be declared on LayoutObject, but shared
42 // logic can go in this class or in SVGLayoutSupport.
43
44 class RenderSVGModelObject : public LayoutObject {
45 public:
46 explicit RenderSVGModelObject(SVGElement*);
47
48 virtual bool isChildAllowed(LayoutObject*, const LayoutStyle&) const overrid e;
49
50 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutLayer ModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) cons t override;
51
52 virtual FloatRect paintInvalidationRectInLocalCoordinates() const override f inal { return m_paintInvalidationBoundingBox; }
53
54 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO ffset) const override final;
55 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const overrid e;
56
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;
59 virtual void styleDidChange(StyleDifference, const LayoutStyle* oldStyle) ov erride;
60
61 virtual void computeLayerHitTestRects(LayerHitTestRects&) const override fin al;
62
63 SVGElement* element() const { return toSVGElement(LayoutObject::node()); }
64
65 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectSVG || LayoutObject::isOfType(type); }
66
67 protected:
68 virtual void addLayerHitTestRects(LayerHitTestRects&, const Layer* currentCo mpositedLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const override final;
69 virtual void willBeDestroyed() override;
70
71 private:
72 // RenderSVGModelObject subclasses should use element() instead.
73 void node() const = delete;
74
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;
77 virtual IntRect absoluteFocusRingBoundingBoxRect() const override final;
78
79 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&) override final;
80
81 protected:
82 FloatRect m_paintInvalidationBoundingBox;
83 };
84
85 }
86
87 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGGradientStop.cpp ('k') | Source/core/rendering/svg/RenderSVGModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698