| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
| 5 * Copyright (C) 2011 Dirk Schulze <krit@webkit.org> | 5 * Copyright (C) 2011 Dirk Schulze <krit@webkit.org> |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 // userSpaceOnUse units (http://crbug.com/294900). | 247 // userSpaceOnUse units (http://crbug.com/294900). |
| 248 FloatRect bounds = strokeBoundingBox(); | 248 FloatRect bounds = strokeBoundingBox(); |
| 249 context->beginRecording(bounds); | 249 context->beginRecording(bounds); |
| 250 | 250 |
| 251 // Switch to a paint behavior where all children of this <clipPath> will be
rendered using special constraints: | 251 // Switch to a paint behavior where all children of this <clipPath> will be
rendered using special constraints: |
| 252 // - fill-opacity/stroke-opacity/opacity set to 1 | 252 // - fill-opacity/stroke-opacity/opacity set to 1 |
| 253 // - masker/filter not applied when rendering the children | 253 // - masker/filter not applied when rendering the children |
| 254 // - fill is set to the initial fill paint server (solid, black) | 254 // - fill is set to the initial fill paint server (solid, black) |
| 255 // - stroke is set to the initial stroke paint server (none) | 255 // - stroke is set to the initial stroke paint server (none) |
| 256 PaintBehavior oldBehavior = frame()->view()->paintBehavior(); | 256 PaintBehavior oldBehavior = frame()->view()->paintBehavior(); |
| 257 frame()->view()->setPaintBehavior(oldBehavior | PaintBehaviorRenderingSVGMas
k); | 257 frame()->view()->setPaintBehavior(oldBehavior | PaintBehaviorRenderingClipPa
thAsMask); |
| 258 | 258 |
| 259 for (SVGElement* childElement = Traversal<SVGElement>::firstChild(*element()
); childElement; childElement = Traversal<SVGElement>::nextSibling(*childElement
)) { | 259 for (SVGElement* childElement = Traversal<SVGElement>::firstChild(*element()
); childElement; childElement = Traversal<SVGElement>::nextSibling(*childElement
)) { |
| 260 RenderObject* renderer = childElement->renderer(); | 260 RenderObject* renderer = childElement->renderer(); |
| 261 if (!renderer) | 261 if (!renderer) |
| 262 continue; | 262 continue; |
| 263 | 263 |
| 264 RenderStyle* style = renderer->style(); | 264 RenderStyle* style = renderer->style(); |
| 265 if (!style || style->display() == NONE || style->visibility() != VISIBLE
) | 265 if (!style || style->display() == NONE || style->visibility() != VISIBLE
) |
| 266 continue; | 266 continue; |
| 267 | 267 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 AffineTransform transform; | 358 AffineTransform transform; |
| 359 transform.translate(objectBoundingBox.x(), objectBoundingBox.y()); | 359 transform.translate(objectBoundingBox.x(), objectBoundingBox.y()); |
| 360 transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.h
eight()); | 360 transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.h
eight()); |
| 361 return transform.mapRect(m_clipBoundaries); | 361 return transform.mapRect(m_clipBoundaries); |
| 362 } | 362 } |
| 363 | 363 |
| 364 return m_clipBoundaries; | 364 return m_clipBoundaries; |
| 365 } | 365 } |
| 366 | 366 |
| 367 } | 367 } |
| OLD | NEW |