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, 2008, 2009 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@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. | 5 * Copyright (C) 2009 Google, Inc. |
6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2011. 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 void RenderSVGRoot::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& paint
Offset) | 221 void RenderSVGRoot::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& paint
Offset) |
222 { | 222 { |
223 // An empty viewport disables rendering. | 223 // An empty viewport disables rendering. |
224 if (pixelSnappedBorderBoxRect().isEmpty()) | 224 if (pixelSnappedBorderBoxRect().isEmpty()) |
225 return; | 225 return; |
226 | 226 |
227 // Don't paint, if the context explicitly disabled it. | 227 // Don't paint, if the context explicitly disabled it. |
228 if (paintInfo.context->paintingDisabled()) | 228 if (paintInfo.context->paintingDisabled()) |
229 return; | 229 return; |
230 | 230 |
| 231 // SVG outlines are painted during PaintPhaseForeground. |
| 232 if (paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSel
fOutline) |
| 233 return; |
| 234 |
231 // An empty viewBox also disables rendering. | 235 // An empty viewBox also disables rendering. |
232 // (http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute) | 236 // (http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute) |
233 SVGSVGElement* svg = toSVGSVGElement(node()); | 237 SVGSVGElement* svg = toSVGSVGElement(node()); |
234 ASSERT(svg); | 238 ASSERT(svg); |
235 if (svg->hasEmptyViewBox()) | 239 if (svg->hasEmptyViewBox()) |
236 return; | 240 return; |
237 | 241 |
238 // Don't paint if we don't have kids, except if we have filters we should pa
int those. | 242 // Don't paint if we don't have kids, except if we have filters we should pa
int those. |
239 if (!firstChild()) { | 243 if (!firstChild()) { |
240 SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObj
ect(this); | 244 SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObj
ect(this); |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 updateHitTestResult(result, pointInBorderBox); | 456 updateHitTestResult(result, pointInBorderBox); |
453 if (!result.addNodeToRectBasedTestResult(node(), request, locationIn
Container, boundsRect)) | 457 if (!result.addNodeToRectBasedTestResult(node(), request, locationIn
Container, boundsRect)) |
454 return true; | 458 return true; |
455 } | 459 } |
456 } | 460 } |
457 | 461 |
458 return false; | 462 return false; |
459 } | 463 } |
460 | 464 |
461 } | 465 } |
OLD | NEW |