OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2011, 2012 Apple Computer, Inc. | 2 * Copyright (C) 2006, 2011, 2012 Apple Computer, Inc. |
3 * Copyright (C) 2014 Samsung Electronics. All rights reserved. | 3 * Copyright (C) 2014 Samsung Electronics. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 select.addBeforeOptionAtIndex(newOption, index, exceptionState); | 96 select.addBeforeOptionAtIndex(newOption, index, exceptionState); |
97 | 97 |
98 ASSERT(!exceptionState.hadException()); | 98 ASSERT(!exceptionState.hadException()); |
99 } | 99 } |
100 | 100 |
101 void HTMLOptionsCollection::remove(int index) | 101 void HTMLOptionsCollection::remove(int index) |
102 { | 102 { |
103 toHTMLSelectElement(ownerNode()).remove(index); | 103 toHTMLSelectElement(ownerNode()).remove(index); |
104 } | 104 } |
105 | 105 |
106 void HTMLOptionsCollection::remove(HTMLOptionElement* option) | |
107 { | |
108 return remove(option->index()); | |
109 } | |
110 | |
111 int HTMLOptionsCollection::selectedIndex() const | 106 int HTMLOptionsCollection::selectedIndex() const |
112 { | 107 { |
113 return toHTMLSelectElement(ownerNode()).selectedIndex(); | 108 return toHTMLSelectElement(ownerNode()).selectedIndex(); |
114 } | 109 } |
115 | 110 |
116 void HTMLOptionsCollection::setSelectedIndex(int index) | 111 void HTMLOptionsCollection::setSelectedIndex(int index) |
117 { | 112 { |
118 toHTMLSelectElement(ownerNode()).setSelectedIndex(index); | 113 toHTMLSelectElement(ownerNode()).setSelectedIndex(index); |
119 } | 114 } |
120 | 115 |
(...skipping 27 matching lines...) Expand all Loading... |
148 if (!value) { // undefined or null | 143 if (!value) { // undefined or null |
149 base.remove(index); | 144 base.remove(index); |
150 return true; | 145 return true; |
151 } | 146 } |
152 base.setOption(index, value.get(), exceptionState); | 147 base.setOption(index, value.get(), exceptionState); |
153 return true; | 148 return true; |
154 } | 149 } |
155 | 150 |
156 } //namespace | 151 } //namespace |
157 | 152 |
OLD | NEW |