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

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

Issue 72363002: Rename es => exceptionState in other than bindings/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Retry Created 7 years, 1 month 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/css/PropertySetCSSStyleDeclaration.cpp ('k') | Source/core/dom/CharacterData.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) 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 // This does everything appendChild() would do in this situation (assumi ng m_ignoreChildrenChanged was set), 85 // This does everything appendChild() would do in this situation (assumi ng m_ignoreChildrenChanged was set),
86 // but much more efficiently. 86 // but much more efficiently.
87 textNode->setParentOrShadowHostNode(this); 87 textNode->setParentOrShadowHostNode(this);
88 treeScope().adoptIfNeeded(*textNode); 88 treeScope().adoptIfNeeded(*textNode);
89 setFirstChild(textNode.get()); 89 setFirstChild(textNode.get());
90 setLastChild(textNode.get()); 90 setLastChild(textNode.get());
91 } 91 }
92 } 92 }
93 93
94 void Attr::setPrefix(const AtomicString& prefix, ExceptionState& es) 94 void Attr::setPrefix(const AtomicString& prefix, ExceptionState& exceptionState)
95 { 95 {
96 UseCounter::count(document(), UseCounter::AttributeSetPrefix); 96 UseCounter::count(document(), UseCounter::AttributeSetPrefix);
97 97
98 checkSetPrefix(prefix, es); 98 checkSetPrefix(prefix, exceptionState);
99 if (es.hadException()) 99 if (exceptionState.hadException())
100 return; 100 return;
101 101
102 if (prefix == xmlnsAtom && namespaceURI() != XMLNSNames::xmlnsNamespaceURI) { 102 if (prefix == xmlnsAtom && namespaceURI() != XMLNSNames::xmlnsNamespaceURI) {
103 es.throwDOMException(NamespaceError, ExceptionMessages::failedToSet("pre fix", "Attr", "The prefix '" + xmlnsAtom + "' may not be used on the namespace ' " + namespaceURI() + "'.")); 103 exceptionState.throwDOMException(NamespaceError, ExceptionMessages::fail edToSet("prefix", "Attr", "The prefix '" + xmlnsAtom + "' may not be used on the namespace '" + namespaceURI() + "'."));
104 return; 104 return;
105 } 105 }
106 106
107 if (this->qualifiedName() == xmlnsAtom) { 107 if (this->qualifiedName() == xmlnsAtom) {
108 es.throwDOMException(NamespaceError, ExceptionMessages::failedToSet("pre fix", "Attr", "The prefix '" + prefix + "' may not be used as a namespace prefix for attributes whose qualified name is '" + xmlnsAtom + "'.")); 108 exceptionState.throwDOMException(NamespaceError, ExceptionMessages::fail edToSet("prefix", "Attr", "The prefix '" + prefix + "' may not be used as a name space prefix for attributes whose qualified name is '" + xmlnsAtom + "'."));
109 return; 109 return;
110 } 110 }
111 111
112 const AtomicString& newPrefix = prefix.isEmpty() ? nullAtom : prefix; 112 const AtomicString& newPrefix = prefix.isEmpty() ? nullAtom : prefix;
113 113
114 if (m_element) 114 if (m_element)
115 elementAttribute().setPrefix(newPrefix); 115 elementAttribute().setPrefix(newPrefix);
116 m_name.setPrefix(newPrefix); 116 m_name.setPrefix(newPrefix);
117 } 117 }
118 118
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 } 214 }
215 215
216 void Attr::attachToElement(Element* element) 216 void Attr::attachToElement(Element* element)
217 { 217 {
218 ASSERT(!m_element); 218 ASSERT(!m_element);
219 m_element = element; 219 m_element = element;
220 m_standaloneValue = nullAtom; 220 m_standaloneValue = nullAtom;
221 } 221 }
222 222
223 } 223 }
OLDNEW
« no previous file with comments | « Source/core/css/PropertySetCSSStyleDeclaration.cpp ('k') | Source/core/dom/CharacterData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698