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

Side by Side Diff: Source/core/dom/Attr.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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2012 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2012 Apple Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 void Attr::setPrefix(const AtomicString& prefix, ExceptionCode& ec) 92 void Attr::setPrefix(const AtomicString& prefix, ExceptionCode& ec)
93 { 93 {
94 ec = 0; 94 ec = 0;
95 checkSetPrefix(prefix, ec); 95 checkSetPrefix(prefix, ec);
96 if (ec) 96 if (ec)
97 return; 97 return;
98 98
99 if ((prefix == xmlnsAtom && namespaceURI() != XMLNSNames::xmlnsNamespaceURI) 99 if ((prefix == xmlnsAtom && namespaceURI() != XMLNSNames::xmlnsNamespaceURI)
100 || static_cast<Attr*>(this)->qualifiedName() == xmlnsAtom) { 100 || static_cast<Attr*>(this)->qualifiedName() == xmlnsAtom) {
101 ec = NAMESPACE_ERR; 101 ec = NamespaceError;
102 return; 102 return;
103 } 103 }
104 104
105 const AtomicString& newPrefix = prefix.isEmpty() ? nullAtom : prefix; 105 const AtomicString& newPrefix = prefix.isEmpty() ? nullAtom : prefix;
106 106
107 if (m_element) 107 if (m_element)
108 elementAttribute().setPrefix(newPrefix); 108 elementAttribute().setPrefix(newPrefix);
109 m_name.setPrefix(newPrefix); 109 m_name.setPrefix(newPrefix);
110 } 110 }
111 111
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 } 207 }
208 208
209 void Attr::attachToElement(Element* element) 209 void Attr::attachToElement(Element* element)
210 { 210 {
211 ASSERT(!m_element); 211 ASSERT(!m_element);
212 m_element = element; 212 m_element = element;
213 m_standaloneValue = nullAtom; 213 m_standaloneValue = nullAtom;
214 } 214 }
215 215
216 } 216 }
OLDNEW
« no previous file with comments | « Source/core/css/PropertySetCSSStyleDeclaration.cpp ('k') | Source/core/dom/CustomElementRegistry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698