OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 | 130 |
131 PassRefPtr<DisplayList> RenderSVGResourceMasker::asDisplayList(GraphicsContext*
context, | 131 PassRefPtr<DisplayList> RenderSVGResourceMasker::asDisplayList(GraphicsContext*
context, |
132 const AffineTransform& contentTransform) | 132 const AffineTransform& contentTransform) |
133 { | 133 { |
134 ASSERT(context); | 134 ASSERT(context); |
135 | 135 |
136 // Using strokeBoundingBox (instead of paintInvalidationRectInLocalCoordinat
es) to avoid the intersection | 136 // Using strokeBoundingBox (instead of paintInvalidationRectInLocalCoordinat
es) to avoid the intersection |
137 // with local clips/mask, which may yield incorrect results when mixing obje
ctBoundingBox and | 137 // with local clips/mask, which may yield incorrect results when mixing obje
ctBoundingBox and |
138 // userSpaceOnUse units (http://crbug.com/294900). | 138 // userSpaceOnUse units (http://crbug.com/294900). |
139 context->beginRecording(strokeBoundingBox()); | 139 context->beginRecording(strokeBoundingBox()); |
140 for (Element* childElement = ElementTraversal::firstWithin(*element()); chil
dElement; childElement = ElementTraversal::nextSibling(*childElement)) { | 140 for (Element* childElement = ElementTraversal::firstChild(*element()); child
Element; childElement = ElementTraversal::nextSibling(*childElement)) { |
141 RenderObject* renderer = childElement->renderer(); | 141 RenderObject* renderer = childElement->renderer(); |
142 if (!childElement->isSVGElement() || !renderer) | 142 if (!childElement->isSVGElement() || !renderer) |
143 continue; | 143 continue; |
144 RenderStyle* style = renderer->style(); | 144 RenderStyle* style = renderer->style(); |
145 if (!style || style->display() == NONE || style->visibility() != VISIBLE
) | 145 if (!style || style->display() == NONE || style->visibility() != VISIBLE
) |
146 continue; | 146 continue; |
147 | 147 |
148 SVGRenderingContext::renderSubtree(context, renderer, contentTransform); | 148 SVGRenderingContext::renderSubtree(context, renderer, contentTransform); |
149 } | 149 } |
150 | 150 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 transform.translate(objectBoundingBox.x(), objectBoundingBox.y()); | 185 transform.translate(objectBoundingBox.x(), objectBoundingBox.y()); |
186 transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.h
eight()); | 186 transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.h
eight()); |
187 maskRect = transform.mapRect(maskRect); | 187 maskRect = transform.mapRect(maskRect); |
188 } | 188 } |
189 | 189 |
190 maskRect.intersect(maskBoundaries); | 190 maskRect.intersect(maskBoundaries); |
191 return maskRect; | 191 return maskRect; |
192 } | 192 } |
193 | 193 |
194 } | 194 } |
OLD | NEW |