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

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

Issue 108683002: Use xmlAtom / starAtom when possible instead of string literals (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/fetch/CrossOriginAccessControl.cpp ('k') | Source/core/timing/Performance.cpp » ('j') | 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, 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 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 return false; 60 return false;
61 } 61 }
62 62
63 bool SVGLangSpace::isKnownAttribute(const QualifiedName& attrName) 63 bool SVGLangSpace::isKnownAttribute(const QualifiedName& attrName)
64 { 64 {
65 return attrName.matches(XMLNames::langAttr) || attrName.matches(XMLNames::sp aceAttr); 65 return attrName.matches(XMLNames::langAttr) || attrName.matches(XMLNames::sp aceAttr);
66 } 66 }
67 67
68 void SVGLangSpace::addSupportedAttributes(HashSet<QualifiedName>& supportedAttri butes) 68 void SVGLangSpace::addSupportedAttributes(HashSet<QualifiedName>& supportedAttri butes)
69 { 69 {
70 DEFINE_STATIC_LOCAL(AtomicString, xmlPrefix, ("xml", AtomicString::Construct FromLiteral));
71
72 QualifiedName langWithPrefix = XMLNames::langAttr; 70 QualifiedName langWithPrefix = XMLNames::langAttr;
73 langWithPrefix.setPrefix(xmlPrefix); 71 langWithPrefix.setPrefix(xmlAtom);
74 supportedAttributes.add(langWithPrefix); 72 supportedAttributes.add(langWithPrefix);
75 supportedAttributes.add(XMLNames::langAttr); 73 supportedAttributes.add(XMLNames::langAttr);
76 74
77 QualifiedName spaceWithPrefix = XMLNames::spaceAttr; 75 QualifiedName spaceWithPrefix = XMLNames::spaceAttr;
78 spaceWithPrefix.setPrefix(xmlPrefix); 76 spaceWithPrefix.setPrefix(xmlAtom);
79 supportedAttributes.add(spaceWithPrefix); 77 supportedAttributes.add(spaceWithPrefix);
80 supportedAttributes.add(XMLNames::spaceAttr); 78 supportedAttributes.add(XMLNames::spaceAttr);
81 } 79 }
82 80
83 } 81 }
OLDNEW
« no previous file with comments | « Source/core/fetch/CrossOriginAccessControl.cpp ('k') | Source/core/timing/Performance.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698