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

Side by Side Diff: Source/core/html/HTMLOptionsCollection.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/html/HTMLMediaElement.cpp ('k') | Source/core/html/HTMLSelectElement.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) 2006, 2011, 2012 Apple Computer, Inc. 2 * Copyright (C) 2006, 2011, 2012 Apple Computer, Inc.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 void HTMLOptionsCollection::add(PassRefPtr<HTMLOptionElement> element, Exception Code& ec) 43 void HTMLOptionsCollection::add(PassRefPtr<HTMLOptionElement> element, Exception Code& ec)
44 { 44 {
45 add(element, length(), ec); 45 add(element, length(), ec);
46 } 46 }
47 47
48 void HTMLOptionsCollection::add(PassRefPtr<HTMLOptionElement> element, int index , ExceptionCode& ec) 48 void HTMLOptionsCollection::add(PassRefPtr<HTMLOptionElement> element, int index , ExceptionCode& ec)
49 { 49 {
50 HTMLOptionElement* newOption = element.get(); 50 HTMLOptionElement* newOption = element.get();
51 51
52 if (!newOption) { 52 if (!newOption) {
53 ec = TYPE_MISMATCH_ERR; 53 ec = TypeMismatchError;
54 return; 54 return;
55 } 55 }
56 56
57 if (index < -1) { 57 if (index < -1) {
58 ec = IndexSizeError; 58 ec = IndexSizeError;
59 return; 59 return;
60 } 60 }
61 61
62 ec = 0; 62 ec = 0;
63 HTMLSelectElement* select = toHTMLSelectElement(ownerNode()); 63 HTMLSelectElement* select = toHTMLSelectElement(ownerNode());
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 { 112 {
113 HTMLSelectElement* base = toHTMLSelectElement(ownerNode()); 113 HTMLSelectElement* base = toHTMLSelectElement(ownerNode());
114 base->remove(index); 114 base->remove(index);
115 return true; 115 return true;
116 } 116 }
117 117
118 bool HTMLOptionsCollection::anonymousIndexedSetter(unsigned index, PassRefPtr<HT MLOptionElement> value, ExceptionCode& ec) 118 bool HTMLOptionsCollection::anonymousIndexedSetter(unsigned index, PassRefPtr<HT MLOptionElement> value, ExceptionCode& ec)
119 { 119 {
120 HTMLSelectElement* base = toHTMLSelectElement(ownerNode()); 120 HTMLSelectElement* base = toHTMLSelectElement(ownerNode());
121 if (!value) { 121 if (!value) {
122 ec = TYPE_MISMATCH_ERR; 122 ec = TypeMismatchError;
123 return true; 123 return true;
124 } 124 }
125 base->setOption(index, value.get(), ec); 125 base->setOption(index, value.get(), ec);
126 return true; 126 return true;
127 } 127 }
128 128
129 } //namespace 129 } //namespace
130 130
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | Source/core/html/HTMLSelectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698