OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, Inc. |
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 void RenderSVGBlock::updateFromStyle() | 49 void RenderSVGBlock::updateFromStyle() |
50 { | 50 { |
51 RenderBlock::updateFromStyle(); | 51 RenderBlock::updateFromStyle(); |
52 | 52 |
53 // RenderSVGlock, used by Render(SVGText|ForeignObject), is not allowed to c
all setHasOverflowClip(true). | 53 // RenderSVGlock, used by Render(SVGText|ForeignObject), is not allowed to c
all setHasOverflowClip(true). |
54 // RenderBlock assumes a layer to be present when the overflow clip function
ality is requested. Both | 54 // RenderBlock assumes a layer to be present when the overflow clip function
ality is requested. Both |
55 // Render(SVGText|ForeignObject) return 'NoLayer' on 'layerTypeRequired'. Fi
ne for RenderSVGText. | 55 // Render(SVGText|ForeignObject) return 'NoLayer' on 'layerTypeRequired'. Fi
ne for RenderSVGText. |
56 // | 56 // |
57 // If we want to support overflow rules for <foreignObject> we can choose be
tween two solutions: | 57 // If we want to support overflow rules for <foreignObject> we can choose be
tween two solutions: |
58 // a) make RenderSVGForeignObject require layers and SVG layer aware | 58 // a) make RenderSVGForeignObject require layers and SVG layer aware |
59 // b) reactor overflow logic out of RenderLayer (as suggested by dhyatt), wh
ich is a large task | 59 // b) reactor overflow logic out of Layer (as suggested by dhyatt), which is
a large task |
60 // | 60 // |
61 // Until this is resolved, disable overflow support. Opera/FF don't support
it as well at the moment (Feb 2010). | 61 // Until this is resolved, disable overflow support. Opera/FF don't support
it as well at the moment (Feb 2010). |
62 // | 62 // |
63 // Note: This does NOT affect overflow handling on outer/inner <svg> element
s - this is handled | 63 // Note: This does NOT affect overflow handling on outer/inner <svg> element
s - this is handled |
64 // manually by RenderSVGRoot - which owns the documents enclosing root layer
and thus works fine. | 64 // manually by RenderSVGRoot - which owns the documents enclosing root layer
and thus works fine. |
65 setHasOverflowClip(false); | 65 setHasOverflowClip(false); |
66 } | 66 } |
67 | 67 |
68 void RenderSVGBlock::absoluteRects(Vector<IntRect>&, const LayoutPoint&) const | 68 void RenderSVGBlock::absoluteRects(Vector<IntRect>&, const LayoutPoint&) const |
69 { | 69 { |
(...skipping 15 matching lines...) Expand all Loading... |
85 if (isBlendingAllowed()) { | 85 if (isBlendingAllowed()) { |
86 bool hasBlendModeChanged = (oldStyle && oldStyle->hasBlendMode()) == !st
yle()->hasBlendMode(); | 86 bool hasBlendModeChanged = (oldStyle && oldStyle->hasBlendMode()) == !st
yle()->hasBlendMode(); |
87 if (parent() && hasBlendModeChanged) | 87 if (parent() && hasBlendModeChanged) |
88 parent()->descendantIsolationRequirementsChanged(style()->hasBlendMo
de() ? DescendantIsolationRequired : DescendantIsolationNeedsUpdate); | 88 parent()->descendantIsolationRequirementsChanged(style()->hasBlendMo
de() ? DescendantIsolationRequired : DescendantIsolationNeedsUpdate); |
89 } | 89 } |
90 | 90 |
91 RenderBlock::styleDidChange(diff, oldStyle); | 91 RenderBlock::styleDidChange(diff, oldStyle); |
92 SVGResourcesCache::clientStyleChanged(this, diff, style()); | 92 SVGResourcesCache::clientStyleChanged(this, diff, style()); |
93 } | 93 } |
94 | 94 |
95 void RenderSVGBlock::mapLocalToContainer(const RenderLayerModelObject* paintInva
lidationContainer, TransformState& transformState, MapCoordinatesFlags, bool* wa
sFixed, const PaintInvalidationState* paintInvalidationState) const | 95 void RenderSVGBlock::mapLocalToContainer(const LayoutLayerModelObject* paintInva
lidationContainer, TransformState& transformState, MapCoordinatesFlags, bool* wa
sFixed, const PaintInvalidationState* paintInvalidationState) const |
96 { | 96 { |
97 SVGRenderSupport::mapLocalToContainer(this, paintInvalidationContainer, tran
sformState, wasFixed, paintInvalidationState); | 97 SVGRenderSupport::mapLocalToContainer(this, paintInvalidationContainer, tran
sformState, wasFixed, paintInvalidationState); |
98 } | 98 } |
99 | 99 |
100 const RenderObject* RenderSVGBlock::pushMappingToContainer(const RenderLayerMode
lObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const | 100 const RenderObject* RenderSVGBlock::pushMappingToContainer(const LayoutLayerMode
lObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const |
101 { | 101 { |
102 return SVGRenderSupport::pushMappingToContainer(this, ancestorToStopAt, geom
etryMap); | 102 return SVGRenderSupport::pushMappingToContainer(this, ancestorToStopAt, geom
etryMap); |
103 } | 103 } |
104 | 104 |
105 LayoutRect RenderSVGBlock::clippedOverflowRectForPaintInvalidation(const RenderL
ayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paint
InvalidationState) const | 105 LayoutRect RenderSVGBlock::clippedOverflowRectForPaintInvalidation(const LayoutL
ayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paint
InvalidationState) const |
106 { | 106 { |
107 return SVGRenderSupport::clippedOverflowRectForPaintInvalidation(this, paint
InvalidationContainer, paintInvalidationState); | 107 return SVGRenderSupport::clippedOverflowRectForPaintInvalidation(this, paint
InvalidationContainer, paintInvalidationState); |
108 } | 108 } |
109 | 109 |
110 void RenderSVGBlock::mapRectToPaintInvalidationBacking(const RenderLayerModelObj
ect* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState*
paintInvalidationState) const | 110 void RenderSVGBlock::mapRectToPaintInvalidationBacking(const LayoutLayerModelObj
ect* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState*
paintInvalidationState) const |
111 { | 111 { |
112 FloatRect paintInvalidationRect = rect; | 112 FloatRect paintInvalidationRect = rect; |
113 paintInvalidationRect.inflate(style()->outlineWidth()); | 113 paintInvalidationRect.inflate(style()->outlineWidth()); |
114 const RenderSVGRoot& svgRoot = SVGRenderSupport::mapRectToSVGRootForPaintInv
alidation(this, paintInvalidationRect, rect); | 114 const RenderSVGRoot& svgRoot = SVGRenderSupport::mapRectToSVGRootForPaintInv
alidation(this, paintInvalidationRect, rect); |
115 svgRoot.mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect,
paintInvalidationState); | 115 svgRoot.mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect,
paintInvalidationState); |
116 } | 116 } |
117 | 117 |
118 bool RenderSVGBlock::nodeAtPoint(const HitTestRequest&, HitTestResult&, const Hi
tTestLocation&, const LayoutPoint&, HitTestAction) | 118 bool RenderSVGBlock::nodeAtPoint(const HitTestRequest&, HitTestResult&, const Hi
tTestLocation&, const LayoutPoint&, HitTestAction) |
119 { | 119 { |
120 ASSERT_NOT_REACHED(); | 120 ASSERT_NOT_REACHED(); |
(...skipping 24 matching lines...) Expand all Loading... |
145 | 145 |
146 void RenderSVGBlock::updatePaintInfoRect(IntRect& rect) | 146 void RenderSVGBlock::updatePaintInfoRect(IntRect& rect) |
147 { | 147 { |
148 if (rect != LayoutRect::infiniteRect()) { | 148 if (rect != LayoutRect::infiniteRect()) { |
149 AffineTransform transformToRoot = m_cachedPaintInvalidationTransform * l
ocalTransform(); | 149 AffineTransform transformToRoot = m_cachedPaintInvalidationTransform * l
ocalTransform(); |
150 rect = enclosingIntRect(transformToRoot.inverse().mapRect(FloatRect(rect
))); | 150 rect = enclosingIntRect(transformToRoot.inverse().mapRect(FloatRect(rect
))); |
151 } | 151 } |
152 } | 152 } |
153 | 153 |
154 } | 154 } |
OLD | NEW |