OLD | NEW |
1 /** | 1 /** |
2 * Copyright (C) 2007 Rob Buis <buis@kde.org> | 2 * Copyright (C) 2007 Rob Buis <buis@kde.org> |
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2009 Google, Inc. All rights reserved. | 5 * Copyright (C) 2009 Google, Inc. All rights reserved. |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 class ComputedStyle; | 43 class ComputedStyle; |
44 class LayoutSVGRoot; | 44 class LayoutSVGRoot; |
45 class SVGLengthContext; | 45 class SVGLengthContext; |
46 class StrokeData; | 46 class StrokeData; |
47 class TransformState; | 47 class TransformState; |
48 | 48 |
49 class CORE_EXPORT SVGLayoutSupport { | 49 class CORE_EXPORT SVGLayoutSupport { |
50 STATIC_ONLY(SVGLayoutSupport); | 50 STATIC_ONLY(SVGLayoutSupport); |
51 public: | 51 public: |
52 // Shares child layouting code between LayoutSVGRoot/LayoutSVG(Hidden)Contai
ner | 52 // Shares child layouting code between LayoutSVGRoot/LayoutSVG(Hidden)Contai
ner |
53 static void layoutChildren(LayoutObject*, bool forceLayout, bool transformCh
anged); | 53 static void layoutChildren(LayoutObject*, bool forceLayout, bool transformCh
anged, bool layoutSizeChanged); |
54 | 54 |
55 // Layout resources used by this node. | 55 // Layout resources used by this node. |
56 static void layoutResourcesIfNeeded(const LayoutObject*); | 56 static void layoutResourcesIfNeeded(const LayoutObject*); |
57 | 57 |
58 // Helper function determining whether overflow is hidden. | 58 // Helper function determining whether overflow is hidden. |
59 static bool isOverflowHidden(const LayoutObject*); | 59 static bool isOverflowHidden(const LayoutObject*); |
60 | 60 |
61 // Calculates the paintInvalidationRect in combination with filter, clipper
and masker in local coordinates. | 61 // Calculates the paintInvalidationRect in combination with filter, clipper
and masker in local coordinates. |
62 static void intersectPaintInvalidationRectWithResources(const LayoutObject*,
FloatRect&); | 62 static void intersectPaintInvalidationRectWithResources(const LayoutObject*,
FloatRect&); |
63 | 63 |
(...skipping 20 matching lines...) Expand all Loading... |
84 static const LayoutObject* pushMappingToContainer(const LayoutObject*, const
LayoutBoxModelObject* ancestorToStopAt, LayoutGeometryMap&); | 84 static const LayoutObject* pushMappingToContainer(const LayoutObject*, const
LayoutBoxModelObject* ancestorToStopAt, LayoutGeometryMap&); |
85 | 85 |
86 // Shared between SVG layoutObjects and resources. | 86 // Shared between SVG layoutObjects and resources. |
87 static void applyStrokeStyleToStrokeData(StrokeData&, const ComputedStyle&,
const LayoutObject&, float dashScaleFactor); | 87 static void applyStrokeStyleToStrokeData(StrokeData&, const ComputedStyle&,
const LayoutObject&, float dashScaleFactor); |
88 | 88 |
89 static DashArray resolveSVGDashArray(const SVGDashArray&, const ComputedStyl
e&, const SVGLengthContext&); | 89 static DashArray resolveSVGDashArray(const SVGDashArray&, const ComputedStyl
e&, const SVGLengthContext&); |
90 | 90 |
91 // Determines if any ancestor's transform has changed. | 91 // Determines if any ancestor's transform has changed. |
92 static bool transformToRootChanged(const LayoutObject*); | 92 static bool transformToRootChanged(const LayoutObject*); |
93 | 93 |
| 94 // Determines if any ancestor's layout size has changed. |
| 95 static bool layoutSizeOfNearestViewportChanged(const LayoutObject*); |
| 96 |
94 // FIXME: These methods do not belong here. | 97 // FIXME: These methods do not belong here. |
95 static const LayoutSVGRoot* findTreeRootObject(const LayoutObject*); | 98 static const LayoutSVGRoot* findTreeRootObject(const LayoutObject*); |
96 | 99 |
97 // Helper method for determining if a LayoutObject marked as text (isText()=
= true) | 100 // Helper method for determining if a LayoutObject marked as text (isText()=
= true) |
98 // can/will be laid out as part of a <text>. | 101 // can/will be laid out as part of a <text>. |
99 static bool isLayoutableTextNode(const LayoutObject*); | 102 static bool isLayoutableTextNode(const LayoutObject*); |
100 | 103 |
101 // Determines whether a svg node should isolate or not based on ComputedStyl
e. | 104 // Determines whether a svg node should isolate or not based on ComputedStyl
e. |
102 static bool willIsolateBlendingDescendantsForStyle(const ComputedStyle&); | 105 static bool willIsolateBlendingDescendantsForStyle(const ComputedStyle&); |
103 static bool willIsolateBlendingDescendantsForObject(const LayoutObject*); | 106 static bool willIsolateBlendingDescendantsForObject(const LayoutObject*); |
104 template<typename LayoutObjectType> | 107 template<typename LayoutObjectType> |
105 static bool computeHasNonIsolatedBlendingDescendants(const LayoutObjectType*
); | 108 static bool computeHasNonIsolatedBlendingDescendants(const LayoutObjectType*
); |
106 static bool isIsolationRequired(const LayoutObject*); | 109 static bool isIsolationRequired(const LayoutObject*); |
107 | 110 |
108 static AffineTransform deprecatedCalculateTransformToLayer(const LayoutObjec
t*); | 111 static AffineTransform deprecatedCalculateTransformToLayer(const LayoutObjec
t*); |
109 static float calculateScreenFontSizeScalingFactor(const LayoutObject*); | 112 static float calculateScreenFontSizeScalingFactor(const LayoutObject*); |
110 | 113 |
111 static LayoutObject* findClosestLayoutSVGText(LayoutObject*, const FloatPoin
t&); | 114 static LayoutObject* findClosestLayoutSVGText(LayoutObject*, const FloatPoin
t&); |
112 | 115 |
113 private: | 116 private: |
114 static void updateObjectBoundingBox(FloatRect& objectBoundingBox, bool& obje
ctBoundingBoxValid, LayoutObject* other, FloatRect otherBoundingBox); | 117 static void updateObjectBoundingBox(FloatRect& objectBoundingBox, bool& obje
ctBoundingBoxValid, LayoutObject* other, FloatRect otherBoundingBox); |
115 static bool layoutSizeOfNearestViewportChanged(const LayoutObject* start); | |
116 }; | 118 }; |
117 | 119 |
118 class SubtreeContentTransformScope { | 120 class SubtreeContentTransformScope { |
119 STACK_ALLOCATED(); | 121 STACK_ALLOCATED(); |
120 public: | 122 public: |
121 SubtreeContentTransformScope(const AffineTransform&); | 123 SubtreeContentTransformScope(const AffineTransform&); |
122 ~SubtreeContentTransformScope(); | 124 ~SubtreeContentTransformScope(); |
123 | 125 |
124 static AffineTransform currentContentTransformation() { return AffineTransfo
rm(s_currentContentTransformation); } | 126 static AffineTransform currentContentTransformation() { return AffineTransfo
rm(s_currentContentTransformation); } |
125 | 127 |
(...skipping 10 matching lines...) Expand all Loading... |
136 return true; | 138 return true; |
137 if (child->hasNonIsolatedBlendingDescendants() && !willIsolateBlendingDe
scendantsForObject(child)) | 139 if (child->hasNonIsolatedBlendingDescendants() && !willIsolateBlendingDe
scendantsForObject(child)) |
138 return true; | 140 return true; |
139 } | 141 } |
140 return false; | 142 return false; |
141 } | 143 } |
142 | 144 |
143 } // namespace blink | 145 } // namespace blink |
144 | 146 |
145 #endif // SVGLayoutSupport_h | 147 #endif // SVGLayoutSupport_h |
OLD | NEW |