| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 if (isSVGUseElement(*childElement) && !toSVGUseElement(*childElement).vi
sibleTargetGraphicsElementForClipping()) | 226 if (isSVGUseElement(*childElement) && !toSVGUseElement(*childElement).vi
sibleTargetGraphicsElementForClipping()) |
| 227 continue; | 227 continue; |
| 228 | 228 |
| 229 m_localClipBounds.unite(layoutObject->localToSVGParentTransform().mapRec
t(layoutObject->paintInvalidationRectInLocalSVGCoordinates())); | 229 m_localClipBounds.unite(layoutObject->localToSVGParentTransform().mapRec
t(layoutObject->paintInvalidationRectInLocalSVGCoordinates())); |
| 230 } | 230 } |
| 231 } | 231 } |
| 232 | 232 |
| 233 bool LayoutSVGResourceClipper::hitTestClipContent(const FloatRect& objectBoundin
gBox, const FloatPoint& nodeAtPoint) | 233 bool LayoutSVGResourceClipper::hitTestClipContent(const FloatRect& objectBoundin
gBox, const FloatPoint& nodeAtPoint) |
| 234 { | 234 { |
| 235 FloatPoint point = nodeAtPoint; | 235 FloatPoint point = nodeAtPoint; |
| 236 if (!SVGLayoutSupport::pointInClippingArea(this, point)) | 236 if (!SVGLayoutSupport::pointInClippingArea(*this, point)) |
| 237 return false; | 237 return false; |
| 238 | 238 |
| 239 if (clipPathUnits() == SVGUnitTypes::kSvgUnitTypeObjectboundingbox) { | 239 if (clipPathUnits() == SVGUnitTypes::kSvgUnitTypeObjectboundingbox) { |
| 240 AffineTransform transform; | 240 AffineTransform transform; |
| 241 transform.translate(objectBoundingBox.x(), objectBoundingBox.y()); | 241 transform.translate(objectBoundingBox.x(), objectBoundingBox.y()); |
| 242 transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.h
eight()); | 242 transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.h
eight()); |
| 243 point = transform.inverse().mapPoint(point); | 243 point = transform.inverse().mapPoint(point); |
| 244 } | 244 } |
| 245 | 245 |
| 246 AffineTransform animatedLocalTransform = toSVGClipPathElement(element())->ca
lculateAnimatedLocalTransform(); | 246 AffineTransform animatedLocalTransform = toSVGClipPathElement(element())->ca
lculateAnimatedLocalTransform(); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 277 if (clipPathUnits() == SVGUnitTypes::kSvgUnitTypeObjectboundingbox) { | 277 if (clipPathUnits() == SVGUnitTypes::kSvgUnitTypeObjectboundingbox) { |
| 278 FloatRect objectBoundingBox = object->objectBoundingBox(); | 278 FloatRect objectBoundingBox = object->objectBoundingBox(); |
| 279 transform.translate(objectBoundingBox.x(), objectBoundingBox.y()); | 279 transform.translate(objectBoundingBox.x(), objectBoundingBox.y()); |
| 280 transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.h
eight()); | 280 transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.h
eight()); |
| 281 } | 281 } |
| 282 | 282 |
| 283 return transform.mapRect(m_localClipBounds); | 283 return transform.mapRect(m_localClipBounds); |
| 284 } | 284 } |
| 285 | 285 |
| 286 } // namespace blink | 286 } // namespace blink |
| OLD | NEW |