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 29 matching lines...) Expand all Loading... |
40 // but not all. (e.g. LayoutSVGForeignObject, LayoutSVGBlock) thus methods | 40 // but not all. (e.g. LayoutSVGForeignObject, LayoutSVGBlock) thus methods |
41 // required by SVG layoutObjects need to be declared on LayoutObject, but shared | 41 // required by SVG layoutObjects 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 LayoutSVGModelObject : public LayoutObject { | 44 class LayoutSVGModelObject : public LayoutObject { |
45 public: | 45 public: |
46 explicit LayoutSVGModelObject(SVGElement*); | 46 explicit LayoutSVGModelObject(SVGElement*); |
47 | 47 |
48 bool isChildAllowed(LayoutObject*, const ComputedStyle&) const override; | 48 bool isChildAllowed(LayoutObject*, const ComputedStyle&) const override; |
49 | 49 |
50 LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxModelObjec
t* paintInvalidationContainer, const PaintInvalidationState* = nullptr) const ov
erride; | 50 LayoutRect absoluteClippedOverflowRect() const override; |
51 | 51 FloatRect paintInvalidationRectInLocalSVGCoordinates() const override { retu
rn m_paintInvalidationBoundingBox; } |
52 FloatRect paintInvalidationRectInLocalSVGCoordinates() const final { return
m_paintInvalidationBoundingBox; } | |
53 | 52 |
54 void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) c
onst final; | 53 void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) c
onst final; |
55 void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override; | 54 void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override; |
56 | 55 |
57 void mapLocalToAncestor(const LayoutBoxModelObject* ancestor, TransformState
&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = nullptr, const Pai
ntInvalidationState* = nullptr) const final; | 56 void mapLocalToAncestor(const LayoutBoxModelObject* ancestor, TransformState
&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = nullptr) const fin
al; |
58 void mapAncestorToLocal(const LayoutBoxModelObject* ancestor, TransformState
&, MapCoordinatesFlags = ApplyContainerFlip) const final; | 57 void mapAncestorToLocal(const LayoutBoxModelObject* ancestor, TransformState
&, MapCoordinatesFlags = ApplyContainerFlip) const final; |
59 const LayoutObject* pushMappingToContainer(const LayoutBoxModelObject* ances
torToStopAt, LayoutGeometryMap&) const final; | 58 const LayoutObject* pushMappingToContainer(const LayoutBoxModelObject* ances
torToStopAt, LayoutGeometryMap&) const final; |
60 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override
; | 59 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override
; |
61 | 60 |
62 void computeLayerHitTestRects(LayerHitTestRects&) const final; | 61 void computeLayerHitTestRects(LayerHitTestRects&) const final; |
63 | 62 |
64 SVGElement* element() const { return toSVGElement(LayoutObject::node()); } | 63 SVGElement* element() const { return toSVGElement(LayoutObject::node()); } |
65 | 64 |
66 bool isOfType(LayoutObjectType type) const override { return type == LayoutO
bjectSVG || LayoutObject::isOfType(type); } | 65 bool isOfType(LayoutObjectType type) const override { return type == LayoutO
bjectSVG || LayoutObject::isOfType(type); } |
67 | 66 |
68 protected: | 67 protected: |
69 void addLayerHitTestRects(LayerHitTestRects&, const PaintLayer* currentCompo
sitedLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) con
st final; | 68 void addLayerHitTestRects(LayerHitTestRects&, const PaintLayer* currentCompo
sitedLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) con
st final; |
70 void willBeDestroyed() override; | 69 void willBeDestroyed() override; |
71 | 70 |
72 private: | 71 private: |
73 // LayoutSVGModelObject subclasses should use element() instead. | 72 // LayoutSVGModelObject subclasses should use element() instead. |
74 void node() const = delete; | 73 void node() const = delete; |
75 | 74 |
76 // 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 |
77 bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInContainer,
const LayoutPoint& accumulatedOffset, HitTestAction) final; | 76 bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInContainer,
const LayoutPoint& accumulatedOffset, HitTestAction) final; |
78 IntRect absoluteElementBoundingBoxRect() const final; | 77 IntRect absoluteElementBoundingBoxRect() const final; |
79 | 78 |
| 79 // This method should never be called. Should use paintInvalidationRectInLoc
alSVGCoordinates(). |
| 80 using LayoutObject::localOverflowRectForPaintInvalidation; |
| 81 |
80 void invalidateTreeIfNeeded(const PaintInvalidationState&) final; | 82 void invalidateTreeIfNeeded(const PaintInvalidationState&) final; |
81 | 83 |
82 protected: | 84 protected: |
83 FloatRect m_paintInvalidationBoundingBox; | 85 FloatRect m_paintInvalidationBoundingBox; |
84 }; | 86 }; |
85 | 87 |
86 } // namespace blink | 88 } // namespace blink |
87 | 89 |
88 #endif | 90 #endif |
OLD | NEW |