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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGFilterPrimitiveStandardAttributes.cpp

Issue 2026343002: Don't use hasAttribute in SVGFilterPrimitiveStandardAttributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Margin collapsing - boo! Created 4 years, 6 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
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/animations/filter-primitive-region-expected.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006, 2007 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) 2009 Dirk Schulze <krit@webkit.org> 4 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 void SVGFilterPrimitiveStandardAttributes::childrenChanged(const ChildrenChange& change) 85 void SVGFilterPrimitiveStandardAttributes::childrenChanged(const ChildrenChange& change)
86 { 86 {
87 SVGElement::childrenChanged(change); 87 SVGElement::childrenChanged(change);
88 88
89 if (!change.byParser) 89 if (!change.byParser)
90 invalidate(); 90 invalidate();
91 } 91 }
92 92
93 void SVGFilterPrimitiveStandardAttributes::setStandardAttributes(FilterEffect* f ilterEffect) const 93 void SVGFilterPrimitiveStandardAttributes::setStandardAttributes(FilterEffect* f ilterEffect) const
94 { 94 {
95 ASSERT(filterEffect); 95 DCHECK(filterEffect);
96 if (!filterEffect)
97 return;
98 96
99 if (hasAttribute(SVGNames::xAttr)) 97 if (x()->isSpecified())
100 filterEffect->setHasX(true); 98 filterEffect->setHasX(true);
101 if (hasAttribute(SVGNames::yAttr)) 99 if (y()->isSpecified())
102 filterEffect->setHasY(true); 100 filterEffect->setHasY(true);
103 if (hasAttribute(SVGNames::widthAttr)) 101 if (width()->isSpecified())
104 filterEffect->setHasWidth(true); 102 filterEffect->setHasWidth(true);
105 if (hasAttribute(SVGNames::heightAttr)) 103 if (height()->isSpecified())
106 filterEffect->setHasHeight(true); 104 filterEffect->setHasHeight(true);
107 } 105 }
108 106
109 LayoutObject* SVGFilterPrimitiveStandardAttributes::createLayoutObject(const Com putedStyle&) 107 LayoutObject* SVGFilterPrimitiveStandardAttributes::createLayoutObject(const Com putedStyle&)
110 { 108 {
111 return new LayoutSVGResourceFilterPrimitive(this); 109 return new LayoutSVGResourceFilterPrimitive(this);
112 } 110 }
113 111
114 bool SVGFilterPrimitiveStandardAttributes::layoutObjectIsNeeded(const ComputedSt yle& style) 112 bool SVGFilterPrimitiveStandardAttributes::layoutObjectIsNeeded(const ComputedSt yle& style)
115 { 113 {
(...skipping 26 matching lines...) Expand all
142 return; 140 return;
143 141
144 LayoutObject* layoutObject = parent->layoutObject(); 142 LayoutObject* layoutObject = parent->layoutObject();
145 if (!layoutObject || !layoutObject->isSVGResourceFilterPrimitive()) 143 if (!layoutObject || !layoutObject->isSVGResourceFilterPrimitive())
146 return; 144 return;
147 145
148 LayoutSVGResourceContainer::markForLayoutAndParentResourceInvalidation(layou tObject, false); 146 LayoutSVGResourceContainer::markForLayoutAndParentResourceInvalidation(layou tObject, false);
149 } 147 }
150 148
151 } // namespace blink 149 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/animations/filter-primitive-region-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698