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

Side by Side Diff: Source/core/dom/DOMStringMap.h

Issue 64113006: Rename es => exceptionState in core/dom (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/dom/DOMSettableTokenList.cpp ('k') | Source/core/dom/DOMTokenList.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 virtual ~DOMStringMap(); 42 virtual ~DOMStringMap();
43 43
44 virtual void ref() = 0; 44 virtual void ref() = 0;
45 virtual void deref() = 0; 45 virtual void deref() = 0;
46 46
47 virtual void getNames(Vector<String>&) = 0; 47 virtual void getNames(Vector<String>&) = 0;
48 virtual String item(const String& name) = 0; 48 virtual String item(const String& name) = 0;
49 virtual bool contains(const String& name) = 0; 49 virtual bool contains(const String& name) = 0;
50 virtual void setItem(const String& name, const String& value, ExceptionState &) = 0; 50 virtual void setItem(const String& name, const String& value, ExceptionState &) = 0;
51 virtual void deleteItem(const String& name, ExceptionState&) = 0; 51 virtual void deleteItem(const String& name, ExceptionState&) = 0;
52 bool anonymousNamedSetter(const String& name, const String& value, Exception State& es) 52 bool anonymousNamedSetter(const String& name, const String& value, Exception State& exceptionState)
53 { 53 {
54 setItem(name, value, es); 54 setItem(name, value, exceptionState);
55 return true; 55 return true;
56 } 56 }
57 bool anonymousNamedDeleter(const AtomicString& name, ExceptionState&) 57 bool anonymousNamedDeleter(const AtomicString& name, ExceptionState&)
58 { 58 {
59 // FIXME: Remove ExceptionState parameter. 59 // FIXME: Remove ExceptionState parameter.
60 60
61 TrackExceptionState es; 61 TrackExceptionState exceptionState;
62 deleteItem(name, es); 62 deleteItem(name, exceptionState);
63 bool result = !es.hadException(); 63 bool result = !exceptionState.hadException();
64 // DOMStringMap deleter should ignore exception. 64 // DOMStringMap deleter should ignore exception.
65 // Behavior of Firefox and Opera are same. 65 // Behavior of Firefox and Opera are same.
66 // delete document.body.dataset["-foo"] // false instead of DOM Exceptio n 12 66 // delete document.body.dataset["-foo"] // false instead of DOM Exceptio n 12
67 // LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-multiple. html 67 // LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-multiple. html
68 return result; 68 return result;
69 } 69 }
70 void namedPropertyEnumerator(Vector<String>& names, ExceptionState&) 70 void namedPropertyEnumerator(Vector<String>& names, ExceptionState&)
71 { 71 {
72 getNames(names); 72 getNames(names);
73 } 73 }
74 bool namedPropertyQuery(const AtomicString&, ExceptionState&); 74 bool namedPropertyQuery(const AtomicString&, ExceptionState&);
75 75
76 String anonymousIndexedGetter(uint32_t index) 76 String anonymousIndexedGetter(uint32_t index)
77 { 77 {
78 return item(String::number(index)); 78 return item(String::number(index));
79 } 79 }
80 bool anonymousIndexedSetter(uint32_t index, const String& value, ExceptionSt ate& es) 80 bool anonymousIndexedSetter(uint32_t index, const String& value, ExceptionSt ate& exceptionState)
81 { 81 {
82 return anonymousNamedSetter(String::number(index), value, es); 82 return anonymousNamedSetter(String::number(index), value, exceptionState );
83 } 83 }
84 bool anonymousIndexedDeleter(uint32_t index, ExceptionState& es) 84 bool anonymousIndexedDeleter(uint32_t index, ExceptionState& exceptionState)
85 { 85 {
86 return anonymousNamedDeleter(AtomicString(String::number(index)), es); 86 return anonymousNamedDeleter(AtomicString(String::number(index)), except ionState);
87 } 87 }
88 88
89 virtual Element* element() = 0; 89 virtual Element* element() = 0;
90 90
91 protected: 91 protected:
92 DOMStringMap() 92 DOMStringMap()
93 { 93 {
94 ScriptWrappable::init(this); 94 ScriptWrappable::init(this);
95 } 95 }
96 }; 96 };
97 97
98 } // namespace WebCore 98 } // namespace WebCore
99 99
100 #endif // DOMStringMap_h 100 #endif // DOMStringMap_h
OLDNEW
« no previous file with comments | « Source/core/dom/DOMSettableTokenList.cpp ('k') | Source/core/dom/DOMTokenList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698