Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: Source/core/svg/SVGClipPathElement.cpp

Issue 1074813002: Remove isSupportedAttribute in svg (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: invalidation guard tweaks Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698