OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, Inc. |
3 * Copyright (C) 2009 Google, Inc. | 3 * Copyright (C) 2009 Google, Inc. |
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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 150 |
151 // Invalidate all resources of this client if our layout changed. | 151 // Invalidate all resources of this client if our layout changed. |
152 if (layoutChanged) | 152 if (layoutChanged) |
153 SVGResourcesCache::clientLayoutChanged(this); | 153 SVGResourcesCache::clientLayoutChanged(this); |
154 } | 154 } |
155 | 155 |
156 void RenderSVGForeignObject::mapRectToPaintInvalidationBacking(const RenderLayer
ModelObject* paintInvalidationContainer, | 156 void RenderSVGForeignObject::mapRectToPaintInvalidationBacking(const RenderLayer
ModelObject* paintInvalidationContainer, |
157 LayoutRect& rect, bool fixed, const PaintInvalidationState* paintInvalidatio
nState) const | 157 LayoutRect& rect, bool fixed, const PaintInvalidationState* paintInvalidatio
nState) const |
158 { | 158 { |
159 FloatRect r(rect); | 159 FloatRect r(rect); |
160 SVGRenderSupport::computeFloatRectForRepaint(this, paintInvalidationContaine
r, r, fixed, paintInvalidationState); | 160 SVGRenderSupport::computeFloatRectForPaintInvalidation(this, paintInvalidati
onContainer, r, fixed, paintInvalidationState); |
161 rect = enclosingLayoutRect(r); | 161 rect = enclosingLayoutRect(r); |
162 } | 162 } |
163 | 163 |
164 bool RenderSVGForeignObject::nodeAtFloatPoint(const HitTestRequest& request, Hit
TestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction
) | 164 bool RenderSVGForeignObject::nodeAtFloatPoint(const HitTestRequest& request, Hit
TestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction
) |
165 { | 165 { |
166 // Embedded content is drawn in the foreground phase. | 166 // Embedded content is drawn in the foreground phase. |
167 if (hitTestAction != HitTestForeground) | 167 if (hitTestAction != HitTestForeground) |
168 return false; | 168 return false; |
169 | 169 |
170 AffineTransform localTransform = this->localTransform(); | 170 AffineTransform localTransform = this->localTransform(); |
171 if (!localTransform.isInvertible()) | 171 if (!localTransform.isInvertible()) |
172 return false; | 172 return false; |
173 | 173 |
174 FloatPoint localPoint = localTransform.inverse().mapPoint(pointInParent); | 174 FloatPoint localPoint = localTransform.inverse().mapPoint(pointInParent); |
175 | 175 |
176 // Early exit if local point is not contained in clipped viewport area | 176 // Early exit if local point is not contained in clipped viewport area |
177 if (SVGRenderSupport::isOverflowHidden(this) && !m_viewport.contains(localPo
int)) | 177 if (SVGRenderSupport::isOverflowHidden(this) && !m_viewport.contains(localPo
int)) |
178 return false; | 178 return false; |
179 | 179 |
180 // FOs establish a stacking context, so we need to hit-test all layers. | 180 // FOs establish a stacking context, so we need to hit-test all layers. |
181 HitTestLocation hitTestLocation(roundedLayoutPoint(localPoint)); | 181 HitTestLocation hitTestLocation(roundedLayoutPoint(localPoint)); |
182 return RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestForeground) | 182 return RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestForeground) |
183 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestFloat) | 183 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestFloat) |
184 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestChildBlockBackgrounds); | 184 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestChildBlockBackgrounds); |
185 } | 185 } |
186 | 186 |
187 } | 187 } |
OLD | NEW |