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 * |
11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
15 * | 15 * |
16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
20 */ | 20 */ |
21 | 21 |
22 #include "config.h" | 22 #include "config.h" |
23 | 23 |
24 #include "core/svg/SVGClipPathElement.h" | 24 #include "core/svg/SVGClipPathElement.h" |
25 | 25 |
26 #include "core/rendering/svg/RenderSVGResourceClipper.h" | 26 #include "core/layout/svg/LayoutSVGResourceClipper.h" |
27 | 27 |
28 namespace blink { | 28 namespace blink { |
29 | 29 |
30 inline SVGClipPathElement::SVGClipPathElement(Document& document) | 30 inline SVGClipPathElement::SVGClipPathElement(Document& document) |
31 : SVGGraphicsElement(SVGNames::clipPathTag, document) | 31 : SVGGraphicsElement(SVGNames::clipPathTag, document) |
32 , m_clipPathUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create(
this, SVGNames::clipPathUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)) | 32 , m_clipPathUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create(
this, SVGNames::clipPathUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)) |
33 { | 33 { |
34 addToPropertyMap(m_clipPathUnits); | 34 addToPropertyMap(m_clipPathUnits); |
35 } | 35 } |
36 | 36 |
(...skipping 12 matching lines...) Expand all Loading... |
49 | 49 |
50 void SVGClipPathElement::svgAttributeChanged(const QualifiedName& attrName) | 50 void SVGClipPathElement::svgAttributeChanged(const QualifiedName& attrName) |
51 { | 51 { |
52 if (attrName != SVGNames::clipPathUnitsAttr) { | 52 if (attrName != SVGNames::clipPathUnitsAttr) { |
53 SVGGraphicsElement::svgAttributeChanged(attrName); | 53 SVGGraphicsElement::svgAttributeChanged(attrName); |
54 return; | 54 return; |
55 } | 55 } |
56 | 56 |
57 SVGElement::InvalidationGuard invalidationGuard(this); | 57 SVGElement::InvalidationGuard invalidationGuard(this); |
58 | 58 |
59 RenderSVGResourceContainer* renderer = toRenderSVGResourceContainer(this->re
nderer()); | 59 LayoutSVGResourceContainer* renderer = toLayoutSVGResourceContainer(this->re
nderer()); |
60 if (renderer) | 60 if (renderer) |
61 renderer->invalidateCacheAndMarkForLayout(); | 61 renderer->invalidateCacheAndMarkForLayout(); |
62 } | 62 } |
63 | 63 |
64 void SVGClipPathElement::childrenChanged(const ChildrenChange& change) | 64 void SVGClipPathElement::childrenChanged(const ChildrenChange& change) |
65 { | 65 { |
66 SVGGraphicsElement::childrenChanged(change); | 66 SVGGraphicsElement::childrenChanged(change); |
67 | 67 |
68 if (change.byParser) | 68 if (change.byParser) |
69 return; | 69 return; |
70 | 70 |
71 if (LayoutObject* object = renderer()) | 71 if (LayoutObject* object = renderer()) |
72 object->setNeedsLayoutAndFullPaintInvalidation(); | 72 object->setNeedsLayoutAndFullPaintInvalidation(); |
73 } | 73 } |
74 | 74 |
75 LayoutObject* SVGClipPathElement::createRenderer(const LayoutStyle&) | 75 LayoutObject* SVGClipPathElement::createRenderer(const LayoutStyle&) |
76 { | 76 { |
77 return new RenderSVGResourceClipper(this); | 77 return new LayoutSVGResourceClipper(this); |
78 } | 78 } |
79 | 79 |
80 } | 80 } |
OLD | NEW |