| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |