| 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 if (clipPathUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) { | 166 if (clipPathUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) { |
| 167 contentTransformation.translate(targetBoundingBox.x(), targetBoundingBox
.y()); | 167 contentTransformation.translate(targetBoundingBox.x(), targetBoundingBox
.y()); |
| 168 contentTransformation.scaleNonUniform(targetBoundingBox.width(), targetB
oundingBox.height()); | 168 contentTransformation.scaleNonUniform(targetBoundingBox.width(), targetB
oundingBox.height()); |
| 169 } | 169 } |
| 170 | 170 |
| 171 if (m_clipContentPicture) | 171 if (m_clipContentPicture) |
| 172 return m_clipContentPicture; | 172 return m_clipContentPicture; |
| 173 | 173 |
| 174 SubtreeContentTransformScope contentTransformScope(contentTransformation); | 174 SubtreeContentTransformScope contentTransformScope(contentTransformation); |
| 175 | 175 |
| 176 // Using strokeBoundingBox (instead of paintInvalidationRectInLocalCoordinat
es) to avoid the intersection | 176 // Using strokeBoundingBox (instead of paintInvalidationRectInLocalSVGCoordi
nates) to avoid the intersection |
| 177 // with local clips/mask, which may yield incorrect results when mixing obje
ctBoundingBox and | 177 // with local clips/mask, which may yield incorrect results when mixing obje
ctBoundingBox and |
| 178 // userSpaceOnUse units (http://crbug.com/294900). | 178 // userSpaceOnUse units (http://crbug.com/294900). |
| 179 FloatRect bounds = strokeBoundingBox(); | 179 FloatRect bounds = strokeBoundingBox(); |
| 180 | 180 |
| 181 SkPictureBuilder pictureBuilder(bounds, nullptr, &context); | 181 SkPictureBuilder pictureBuilder(bounds, nullptr, &context); |
| 182 | 182 |
| 183 for (SVGElement* childElement = Traversal<SVGElement>::firstChild(*element()
); childElement; childElement = Traversal<SVGElement>::nextSibling(*childElement
)) { | 183 for (SVGElement* childElement = Traversal<SVGElement>::firstChild(*element()
); childElement; childElement = Traversal<SVGElement>::nextSibling(*childElement
)) { |
| 184 LayoutObject* layoutObject = childElement->layoutObject(); | 184 LayoutObject* layoutObject = childElement->layoutObject(); |
| 185 if (!layoutObject) | 185 if (!layoutObject) |
| 186 continue; | 186 continue; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 AffineTransform transform; | 285 AffineTransform transform; |
| 286 transform.translate(objectBoundingBox.x(), objectBoundingBox.y()); | 286 transform.translate(objectBoundingBox.x(), objectBoundingBox.y()); |
| 287 transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.h
eight()); | 287 transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.h
eight()); |
| 288 return transform.mapRect(m_clipBoundaries); | 288 return transform.mapRect(m_clipBoundaries); |
| 289 } | 289 } |
| 290 | 290 |
| 291 return m_clipBoundaries; | 291 return m_clipBoundaries; |
| 292 } | 292 } |
| 293 | 293 |
| 294 } // namespace blink | 294 } // namespace blink |
| OLD | NEW |