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 * | 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 26 matching lines...) Expand all Loading... |
37 DEFINE_TRACE(SVGClipPathElement) | 37 DEFINE_TRACE(SVGClipPathElement) |
38 { | 38 { |
39 visitor->trace(m_clipPathUnits); | 39 visitor->trace(m_clipPathUnits); |
40 SVGGraphicsElement::trace(visitor); | 40 SVGGraphicsElement::trace(visitor); |
41 } | 41 } |
42 | 42 |
43 DEFINE_NODE_FACTORY(SVGClipPathElement) | 43 DEFINE_NODE_FACTORY(SVGClipPathElement) |
44 | 44 |
45 void SVGClipPathElement::svgAttributeChanged(const QualifiedName& attrName) | 45 void SVGClipPathElement::svgAttributeChanged(const QualifiedName& attrName) |
46 { | 46 { |
47 if (attrName != SVGNames::clipPathUnitsAttr) { | 47 if (attrName == SVGNames::clipPathUnitsAttr) { |
48 SVGGraphicsElement::svgAttributeChanged(attrName); | 48 SVGElement::InvalidationGuard invalidationGuard(this); |
| 49 |
| 50 LayoutSVGResourceContainer* renderer = toLayoutSVGResourceContainer(this
->layoutObject()); |
| 51 if (renderer) |
| 52 renderer->invalidateCacheAndMarkForLayout(); |
49 return; | 53 return; |
50 } | 54 } |
51 | 55 |
52 SVGElement::InvalidationGuard invalidationGuard(this); | 56 SVGGraphicsElement::svgAttributeChanged(attrName); |
53 | |
54 LayoutSVGResourceContainer* renderer = toLayoutSVGResourceContainer(this->la
youtObject()); | |
55 if (renderer) | |
56 renderer->invalidateCacheAndMarkForLayout(); | |
57 } | 57 } |
58 | 58 |
59 void SVGClipPathElement::childrenChanged(const ChildrenChange& change) | 59 void SVGClipPathElement::childrenChanged(const ChildrenChange& change) |
60 { | 60 { |
61 SVGGraphicsElement::childrenChanged(change); | 61 SVGGraphicsElement::childrenChanged(change); |
62 | 62 |
63 if (change.byParser) | 63 if (change.byParser) |
64 return; | 64 return; |
65 | 65 |
66 if (LayoutObject* object = layoutObject()) | 66 if (LayoutObject* object = layoutObject()) |
67 object->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason:
:ChildChanged); | 67 object->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason:
:ChildChanged); |
68 } | 68 } |
69 | 69 |
70 LayoutObject* SVGClipPathElement::createLayoutObject(const ComputedStyle&) | 70 LayoutObject* SVGClipPathElement::createLayoutObject(const ComputedStyle&) |
71 { | 71 { |
72 return new LayoutSVGResourceClipper(this); | 72 return new LayoutSVGResourceClipper(this); |
73 } | 73 } |
74 | 74 |
75 } | 75 } |
OLD | NEW |