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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 RenderSVGBlock::setNeedsBoundariesUpdate(); | 149 RenderSVGBlock::setNeedsBoundariesUpdate(); |
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, LayoutRect& rect, const PaintInvalidati
onState* paintInvalidationState) const | 156 void RenderSVGForeignObject::mapRectToPaintInvalidationBacking(const RenderLayer
ModelObject* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidati
onState* paintInvalidationState) const |
157 { | 157 { |
158 FloatRect r(rect); | 158 FloatRect r(rect); |
| 159 r.inflate(style()->outlineWidth()); |
159 SVGRenderSupport::computeFloatRectForPaintInvalidation(this, paintInvalidati
onContainer, r, paintInvalidationState); | 160 SVGRenderSupport::computeFloatRectForPaintInvalidation(this, paintInvalidati
onContainer, r, paintInvalidationState); |
160 rect = enclosingLayoutRect(r); | 161 rect = enclosingLayoutRect(r); |
161 } | 162 } |
162 | 163 |
163 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
) |
164 { | 165 { |
165 // Embedded content is drawn in the foreground phase. | 166 // Embedded content is drawn in the foreground phase. |
166 if (hitTestAction != HitTestForeground) | 167 if (hitTestAction != HitTestForeground) |
167 return false; | 168 return false; |
168 | 169 |
169 AffineTransform localTransform = this->localTransform(); | 170 AffineTransform localTransform = this->localTransform(); |
170 if (!localTransform.isInvertible()) | 171 if (!localTransform.isInvertible()) |
171 return false; | 172 return false; |
172 | 173 |
173 FloatPoint localPoint = localTransform.inverse().mapPoint(pointInParent); | 174 FloatPoint localPoint = localTransform.inverse().mapPoint(pointInParent); |
174 | 175 |
175 // 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 |
176 if (SVGRenderSupport::isOverflowHidden(this) && !m_viewport.contains(localPo
int)) | 177 if (SVGRenderSupport::isOverflowHidden(this) && !m_viewport.contains(localPo
int)) |
177 return false; | 178 return false; |
178 | 179 |
179 // 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. |
180 HitTestLocation hitTestLocation(roundedLayoutPoint(localPoint)); | 181 HitTestLocation hitTestLocation(roundedLayoutPoint(localPoint)); |
181 return RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestForeground) | 182 return RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestForeground) |
182 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestFloat) | 183 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestFloat) |
183 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestChildBlockBackgrounds); | 184 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestChildBlockBackgrounds); |
184 } | 185 } |
185 | 186 |
186 } | 187 } |
OLD | NEW |