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

Side by Side Diff: Source/core/svg/animation/SVGSMILElement.cpp

Issue 108483002: Have Document::parseQualifiedName() deal with AtomicStrings (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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 | « Source/core/editing/EditorCommand.cpp ('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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 document().accessSVGExtensions()->addPendingResource(id, this); 232 document().accessSVGExtensions()->addPendingResource(id, this);
233 ASSERT(hasPendingResources()); 233 ASSERT(hasPendingResources());
234 } 234 }
235 } else { 235 } else {
236 // Register us with the target in the dependencies map. Any change of hr efElement 236 // Register us with the target in the dependencies map. Any change of hr efElement
237 // that leads to relayout/repainting now informs us, so we can react to it. 237 // that leads to relayout/repainting now informs us, so we can react to it.
238 document().accessSVGExtensions()->addElementReferencingTarget(this, svgT arget); 238 document().accessSVGExtensions()->addElementReferencingTarget(this, svgT arget);
239 } 239 }
240 } 240 }
241 241
242 static inline QualifiedName constructQualifiedName(const SVGElement* svgElement, const String& attributeName) 242 static inline QualifiedName constructQualifiedName(const SVGElement* svgElement, const AtomicString& attributeName)
243 { 243 {
244 ASSERT(svgElement); 244 ASSERT(svgElement);
245 if (attributeName.isEmpty()) 245 if (attributeName.isEmpty())
246 return anyQName(); 246 return anyQName();
247 if (!attributeName.contains(':')) 247 if (!attributeName.contains(':'))
248 return QualifiedName(nullAtom, attributeName, nullAtom); 248 return QualifiedName(nullAtom, attributeName, nullAtom);
249 249
250 String prefix; 250 AtomicString prefix;
251 String localName; 251 AtomicString localName;
252 if (!Document::parseQualifiedName(attributeName, prefix, localName, ASSERT_N O_EXCEPTION)) 252 if (!Document::parseQualifiedName(attributeName, prefix, localName, ASSERT_N O_EXCEPTION))
253 return anyQName(); 253 return anyQName();
254 254
255 String namespaceURI = svgElement->lookupNamespaceURI(prefix); 255 String namespaceURI = svgElement->lookupNamespaceURI(prefix);
256 if (namespaceURI.isEmpty()) 256 if (namespaceURI.isEmpty())
257 return anyQName(); 257 return anyQName();
258 258
259 return QualifiedName(nullAtom, localName, namespaceURI); 259 return QualifiedName(nullAtom, localName, namespaceURI);
260 } 260 }
261 261
(...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 if (eventType == "repeatn") { 1279 if (eventType == "repeatn") {
1280 unsigned repeatEventCount = m_repeatEventCountList.first(); 1280 unsigned repeatEventCount = m_repeatEventCountList.first();
1281 m_repeatEventCountList.remove(0); 1281 m_repeatEventCountList.remove(0);
1282 dispatchEvent(RepeatEvent::create(eventType, repeatEventCount)); 1282 dispatchEvent(RepeatEvent::create(eventType, repeatEventCount));
1283 } else { 1283 } else {
1284 dispatchEvent(Event::create(eventType)); 1284 dispatchEvent(Event::create(eventType));
1285 } 1285 }
1286 } 1286 }
1287 1287
1288 } 1288 }
OLDNEW
« no previous file with comments | « Source/core/editing/EditorCommand.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698