| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2014 Google, Inc. | 4 * Copyright (C) 2014 Google, Inc. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 { | 43 { |
| 44 } | 44 } |
| 45 | 45 |
| 46 DEFINE_TRACE(SVGGraphicsElement) | 46 DEFINE_TRACE(SVGGraphicsElement) |
| 47 { | 47 { |
| 48 visitor->trace(m_transform); | 48 visitor->trace(m_transform); |
| 49 SVGElement::trace(visitor); | 49 SVGElement::trace(visitor); |
| 50 SVGTests::trace(visitor); | 50 SVGTests::trace(visitor); |
| 51 } | 51 } |
| 52 | 52 |
| 53 PassRefPtrWillBeRawPtr<SVGMatrixTearOff> SVGGraphicsElement::getTransformToEleme
nt(SVGElement* target, ExceptionState& exceptionState) | |
| 54 { | |
| 55 AffineTransform ctm = getCTM(AllowStyleUpdate); | |
| 56 | |
| 57 if (target && target->isSVGGraphicsElement()) { | |
| 58 AffineTransform targetCTM = toSVGGraphicsElement(target)->getCTM(AllowSt
yleUpdate); | |
| 59 if (!targetCTM.isInvertible()) { | |
| 60 exceptionState.throwDOMException(InvalidStateError, "The target tran
sformation is not invertable."); | |
| 61 return nullptr; | |
| 62 } | |
| 63 ctm = targetCTM.inverse() * ctm; | |
| 64 } | |
| 65 | |
| 66 return SVGMatrixTearOff::create(ctm); | |
| 67 } | |
| 68 | |
| 69 static bool isViewportElement(const Element& element) | 53 static bool isViewportElement(const Element& element) |
| 70 { | 54 { |
| 71 return (isSVGSVGElement(element) | 55 return (isSVGSVGElement(element) |
| 72 || isSVGSymbolElement(element) | 56 || isSVGSymbolElement(element) |
| 73 || isSVGForeignObjectElement(element) | 57 || isSVGForeignObjectElement(element) |
| 74 || isSVGImageElement(element)); | 58 || isSVGImageElement(element)); |
| 75 } | 59 } |
| 76 | 60 |
| 77 AffineTransform SVGGraphicsElement::computeCTM(SVGElement::CTMScope mode, | 61 AffineTransform SVGGraphicsElement::computeCTM(SVGElement::CTMScope mode, |
| 78 SVGGraphicsElement::StyleUpdateStrategy styleUpdateStrategy, const SVGGraphi
csElement* ancestor) const | 62 SVGGraphicsElement::StyleUpdateStrategy styleUpdateStrategy, const SVGGraphi
csElement* ancestor) const |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 223 |
| 240 return layoutObject()->objectBoundingBox(); | 224 return layoutObject()->objectBoundingBox(); |
| 241 } | 225 } |
| 242 | 226 |
| 243 PassRefPtrWillBeRawPtr<SVGRectTearOff> SVGGraphicsElement::getBBoxFromJavascript
() | 227 PassRefPtrWillBeRawPtr<SVGRectTearOff> SVGGraphicsElement::getBBoxFromJavascript
() |
| 244 { | 228 { |
| 245 return SVGRectTearOff::create(SVGRect::create(getBBox()), 0, PropertyIsNotAn
imVal); | 229 return SVGRectTearOff::create(SVGRect::create(getBBox()), 0, PropertyIsNotAn
imVal); |
| 246 } | 230 } |
| 247 | 231 |
| 248 } | 232 } |
| OLD | NEW |