| OLD | NEW |
| 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 15 matching lines...) Expand all Loading... |
| 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 RenderSVGModelObject_h |
| 32 #define RenderSVGModelObject_h | 32 #define RenderSVGModelObject_h |
| 33 | 33 |
| 34 #include "core/rendering/RenderObject.h" | 34 #include "core/rendering/RenderObject.h" |
| 35 #include "core/rendering/svg/SVGRenderSupport.h" | 35 #include "core/rendering/svg/SVGRenderSupport.h" |
| 36 #include "core/svg/SVGRect.h" |
| 36 | 37 |
| 37 namespace WebCore { | 38 namespace WebCore { |
| 38 | 39 |
| 39 // Most renderers in the SVG rendering tree will inherit from this class | 40 // Most renderers in the SVG rendering tree will inherit from this class |
| 40 // but not all. (e.g. RenderSVGForeignObject, RenderSVGBlock) thus methods | 41 // but not all. (e.g. RenderSVGForeignObject, RenderSVGBlock) thus methods |
| 41 // required by SVG renders need to be declared on RenderObject, but shared | 42 // required by SVG renders need to be declared on RenderObject, but shared |
| 42 // logic can go in this class or in SVGRenderSupport. | 43 // logic can go in this class or in SVGRenderSupport. |
| 43 | 44 |
| 44 class SVGStyledElement; | 45 class SVGStyledElement; |
| 45 | 46 |
| 46 class RenderSVGModelObject : public RenderObject { | 47 class RenderSVGModelObject : public RenderObject { |
| 47 public: | 48 public: |
| 48 explicit RenderSVGModelObject(SVGStyledElement*); | 49 explicit RenderSVGModelObject(SVGStyledElement*); |
| 49 | 50 |
| 50 virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObjec
t* repaintContainer) const OVERRIDE; | 51 virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObjec
t* repaintContainer) const OVERRIDE; |
| 51 virtual void computeFloatRectForRepaint(const RenderLayerModelObject* repain
tContainer, FloatRect&, bool fixed = false) const OVERRIDE FINAL; | 52 virtual void computeFloatRectForRepaint(const RenderLayerModelObject* repain
tContainer, FloatRect&, bool fixed = false) const OVERRIDE FINAL; |
| 52 virtual LayoutRect outlineBoundsForRepaint(const RenderLayerModelObject* rep
aintContainer, const RenderGeometryMap*) const OVERRIDE FINAL; | 53 virtual LayoutRect outlineBoundsForRepaint(const RenderLayerModelObject* rep
aintContainer, const RenderGeometryMap*) const OVERRIDE FINAL; |
| 53 | 54 |
| 54 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO
ffset) const OVERRIDE FINAL; | 55 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO
ffset) const OVERRIDE FINAL; |
| 55 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const; | 56 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const; |
| 56 | 57 |
| 57 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai
ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed =
0) const OVERRIDE FINAL; | 58 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai
ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed =
0) const OVERRIDE FINAL; |
| 58 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj
ect* ancestorToStopAt, RenderGeometryMap&) const OVERRIDE FINAL; | 59 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj
ect* ancestorToStopAt, RenderGeometryMap&) const OVERRIDE FINAL; |
| 59 virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle) O
VERRIDE FINAL; | 60 virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle) O
VERRIDE FINAL; |
| 60 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); | 61 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); |
| 61 | 62 |
| 62 static bool checkIntersection(RenderObject*, const FloatRect&); | 63 static bool checkIntersection(RenderObject*, const SVGRect&); |
| 63 static bool checkEnclosure(RenderObject*, const FloatRect&); | 64 static bool checkEnclosure(RenderObject*, const SVGRect&); |
| 64 | 65 |
| 65 virtual FloatRect repaintRectInLocalCoordinatesExcludingSVGShadow() const {
return repaintRectInLocalCoordinates(); } | 66 virtual FloatRect repaintRectInLocalCoordinatesExcludingSVGShadow() const {
return repaintRectInLocalCoordinates(); } |
| 66 bool hasSVGShadow() const { return m_hasSVGShadow; } | 67 bool hasSVGShadow() const { return m_hasSVGShadow; } |
| 67 void setHasSVGShadow(bool hasShadow) { m_hasSVGShadow = hasShadow; } | 68 void setHasSVGShadow(bool hasShadow) { m_hasSVGShadow = hasShadow; } |
| 68 | 69 |
| 69 protected: | 70 protected: |
| 70 virtual void willBeDestroyed(); | 71 virtual void willBeDestroyed(); |
| 71 | 72 |
| 72 private: | 73 private: |
| 73 // This method should never be called, SVG uses a different nodeAtPoint meth
od | 74 // This method should never be called, SVG uses a different nodeAtPoint meth
od |
| 74 bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocatio
n& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) OVE
RRIDE; | 75 bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocatio
n& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) OVE
RRIDE; |
| 75 virtual void absoluteFocusRingQuads(Vector<FloatQuad>&) OVERRIDE FINAL; | 76 virtual void absoluteFocusRingQuads(Vector<FloatQuad>&) OVERRIDE FINAL; |
| 76 bool m_hasSVGShadow; | 77 bool m_hasSVGShadow; |
| 77 }; | 78 }; |
| 78 | 79 |
| 79 } | 80 } |
| 80 | 81 |
| 81 #endif | 82 #endif |
| OLD | NEW |