OLD | NEW |
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 10 matching lines...) Expand all Loading... |
21 */ | 21 */ |
22 | 22 |
23 #ifndef LayoutSVGContainer_h | 23 #ifndef LayoutSVGContainer_h |
24 #define LayoutSVGContainer_h | 24 #define LayoutSVGContainer_h |
25 | 25 |
26 #include "core/layout/svg/LayoutSVGModelObject.h" | 26 #include "core/layout/svg/LayoutSVGModelObject.h" |
27 | 27 |
28 namespace blink { | 28 namespace blink { |
29 | 29 |
30 class SVGElement; | 30 class SVGElement; |
| 31 enum class SVGTransformChange; |
31 | 32 |
32 class LayoutSVGContainer : public LayoutSVGModelObject { | 33 class LayoutSVGContainer : public LayoutSVGModelObject { |
33 public: | 34 public: |
34 explicit LayoutSVGContainer(SVGElement*); | 35 explicit LayoutSVGContainer(SVGElement*); |
35 ~LayoutSVGContainer() override; | 36 ~LayoutSVGContainer() override; |
36 | 37 |
37 // If you have a LayoutSVGContainer, use firstChild or lastChild instead. | 38 // If you have a LayoutSVGContainer, use firstChild or lastChild instead. |
38 void slowFirstChild() const = delete; | 39 void slowFirstChild() const = delete; |
39 void slowLastChild() const = delete; | 40 void slowLastChild() const = delete; |
40 | 41 |
(...skipping 22 matching lines...) Expand all Loading... |
63 void layout() override; | 64 void layout() override; |
64 | 65 |
65 void addChild(LayoutObject* child, LayoutObject* beforeChild = nullptr) fina
l; | 66 void addChild(LayoutObject* child, LayoutObject* beforeChild = nullptr) fina
l; |
66 void removeChild(LayoutObject*) final; | 67 void removeChild(LayoutObject*) final; |
67 void addOutlineRects(Vector<LayoutRect>&, const LayoutPoint& additionalOffse
t, IncludeBlockVisualOverflowOrNot) const final; | 68 void addOutlineRects(Vector<LayoutRect>&, const LayoutPoint& additionalOffse
t, IncludeBlockVisualOverflowOrNot) const final; |
68 | 69 |
69 FloatRect strokeBoundingBox() const final { return m_strokeBoundingBox; } | 70 FloatRect strokeBoundingBox() const final { return m_strokeBoundingBox; } |
70 | 71 |
71 bool nodeAtFloatPoint(HitTestResult&, const FloatPoint& pointInParent, HitTe
stAction) override; | 72 bool nodeAtFloatPoint(HitTestResult&, const FloatPoint& pointInParent, HitTe
stAction) override; |
72 | 73 |
73 // The following enumeration is used to optimize cases where the scale is | |
74 // known to be invariant (see: LayoutSVGContainer::layout). The value | |
75 // 'Full' can be used in the general case when the scale change is unknown, | |
76 // or known to change. | |
77 enum class TransformChange { | |
78 None, | |
79 ScaleInvariant, | |
80 Full, | |
81 }; | |
82 // Allow LayoutSVGTransformableContainer to hook in at the right time in lay
out(). | 74 // Allow LayoutSVGTransformableContainer to hook in at the right time in lay
out(). |
83 virtual TransformChange calculateLocalTransform() { return TransformChange::
None; } | 75 virtual SVGTransformChange calculateLocalTransform(); |
84 | 76 |
85 // Allow LayoutSVGViewportContainer to hook in at the right times in layout(
) and nodeAtFloatPoint(). | 77 // Allow LayoutSVGViewportContainer to hook in at the right times in layout(
) and nodeAtFloatPoint(). |
86 virtual void calcViewport() { } | 78 virtual void calcViewport() { } |
87 virtual bool pointIsInsideViewportClip(const FloatPoint& /*pointInParent*/)
{ return true; } | 79 virtual bool pointIsInsideViewportClip(const FloatPoint& /*pointInParent*/)
{ return true; } |
88 | 80 |
89 virtual void determineIfLayoutSizeChanged() { } | 81 virtual void determineIfLayoutSizeChanged() { } |
90 | 82 |
91 void updateCachedBoundaries(); | 83 void updateCachedBoundaries(); |
92 | 84 |
93 void descendantIsolationRequirementsChanged(DescendantIsolationState) final; | 85 void descendantIsolationRequirementsChanged(DescendantIsolationState) final; |
(...skipping 10 matching lines...) Expand all Loading... |
104 bool m_didScreenScaleFactorChange : 1; | 96 bool m_didScreenScaleFactorChange : 1; |
105 mutable bool m_hasNonIsolatedBlendingDescendants : 1; | 97 mutable bool m_hasNonIsolatedBlendingDescendants : 1; |
106 mutable bool m_hasNonIsolatedBlendingDescendantsDirty : 1; | 98 mutable bool m_hasNonIsolatedBlendingDescendantsDirty : 1; |
107 }; | 99 }; |
108 | 100 |
109 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGContainer, isSVGContainer()); | 101 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGContainer, isSVGContainer()); |
110 | 102 |
111 } // namespace blink | 103 } // namespace blink |
112 | 104 |
113 #endif // LayoutSVGContainer_h | 105 #endif // LayoutSVGContainer_h |
OLD | NEW |