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

Side by Side Diff: Source/core/dom/DatasetDOMStringMap.cpp

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « Source/core/dom/CustomElementRegistry.cpp ('k') | Source/core/dom/Document.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) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 if (propertyNameMatchesAttributeName(name, attribute->localName())) 172 if (propertyNameMatchesAttributeName(name, attribute->localName()))
173 return true; 173 return true;
174 } 174 }
175 175
176 return false; 176 return false;
177 } 177 }
178 178
179 void DatasetDOMStringMap::setItem(const String& name, const String& value, Excep tionCode& ec) 179 void DatasetDOMStringMap::setItem(const String& name, const String& value, Excep tionCode& ec)
180 { 180 {
181 if (!isValidPropertyName(name)) { 181 if (!isValidPropertyName(name)) {
182 ec = SYNTAX_ERR; 182 ec = SyntaxError;
183 return; 183 return;
184 } 184 }
185 185
186 m_element->setAttribute(convertPropertyNameToAttributeName(name), value, ec) ; 186 m_element->setAttribute(convertPropertyNameToAttributeName(name), value, ec) ;
187 } 187 }
188 188
189 void DatasetDOMStringMap::deleteItem(const String& name, ExceptionCode& ec) 189 void DatasetDOMStringMap::deleteItem(const String& name, ExceptionCode& ec)
190 { 190 {
191 if (!isValidPropertyName(name)) { 191 if (!isValidPropertyName(name)) {
192 ec = SYNTAX_ERR; 192 ec = SyntaxError;
193 return; 193 return;
194 } 194 }
195 195
196 m_element->removeAttribute(convertPropertyNameToAttributeName(name)); 196 m_element->removeAttribute(convertPropertyNameToAttributeName(name));
197 } 197 }
198 198
199 } // namespace WebCore 199 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/CustomElementRegistry.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698