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

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

Issue 19097005: Remove one SVG animated type special case from the bindings generator (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix the regressions Created 7 years, 5 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 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005 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) Research In Motion Limited 2011. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2011. 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 ASSERT(shadow()); 173 ASSERT(shadow());
174 Node* container = shadow()->oldestShadowRoot()->firstChild(); 174 Node* container = shadow()->oldestShadowRoot()->firstChild();
175 if (container) 175 if (container)
176 container->setTextContent(emptyContent, IGNORE_EXCEPTION); 176 container->setTextContent(emptyContent, IGNORE_EXCEPTION);
177 177
178 if (!inDocument()) 178 if (!inDocument())
179 return; 179 return;
180 180
181 // Mark the referenced ID as pending. 181 // Mark the referenced ID as pending.
182 String id; 182 String id;
183 SVGURIReference::targetElementFromIRIString(href(), document(), &id); 183 SVGURIReference::targetElementFromIRIString(hrefCurrentValue(), document(), &id);
184 if (!id.isEmpty()) 184 if (!id.isEmpty())
185 document()->accessSVGExtensions()->addPendingResource(id, this); 185 document()->accessSVGExtensions()->addPendingResource(id, this);
186 } 186 }
187 187
188 bool SVGTRefElement::isSupportedAttribute(const QualifiedName& attrName) 188 bool SVGTRefElement::isSupportedAttribute(const QualifiedName& attrName)
189 { 189 {
190 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 190 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
191 if (supportedAttributes.isEmpty()) 191 if (supportedAttributes.isEmpty())
192 SVGURIReference::addSupportedAttributes(supportedAttributes); 192 SVGURIReference::addSupportedAttributes(supportedAttributes);
193 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); 193 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 void SVGTRefElement::buildPendingResource() 253 void SVGTRefElement::buildPendingResource()
254 { 254 {
255 // Remove any existing event listener. 255 // Remove any existing event listener.
256 m_targetListener->detach(); 256 m_targetListener->detach();
257 257
258 // If we're not yet in a document, this function will be called again from i nsertedInto(). 258 // If we're not yet in a document, this function will be called again from i nsertedInto().
259 if (!inDocument()) 259 if (!inDocument())
260 return; 260 return;
261 261
262 String id; 262 String id;
263 RefPtr<Element> target = SVGURIReference::targetElementFromIRIString(href(), document(), &id); 263 RefPtr<Element> target = SVGURIReference::targetElementFromIRIString(hrefCur rentValue(), document(), &id);
264 if (!target.get()) { 264 if (!target.get()) {
265 if (id.isEmpty()) 265 if (id.isEmpty())
266 return; 266 return;
267 267
268 document()->accessSVGExtensions()->addPendingResource(id, this); 268 document()->accessSVGExtensions()->addPendingResource(id, this);
269 ASSERT(hasPendingResources()); 269 ASSERT(hasPendingResources());
270 return; 270 return;
271 } 271 }
272 272
273 // Don't set up event listeners if this is a shadow tree node. 273 // Don't set up event listeners if this is a shadow tree node.
(...skipping 15 matching lines...) Expand all
289 } 289 }
290 290
291 void SVGTRefElement::removedFrom(ContainerNode* rootParent) 291 void SVGTRefElement::removedFrom(ContainerNode* rootParent)
292 { 292 {
293 SVGStyledElement::removedFrom(rootParent); 293 SVGStyledElement::removedFrom(rootParent);
294 if (rootParent->inDocument()) 294 if (rootParent->inDocument())
295 m_targetListener->detach(); 295 m_targetListener->detach();
296 } 296 }
297 297
298 } 298 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698