| OLD | NEW |
| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 select->add(newOption, toHTMLOptionElement(item(index)), es); | 68 select->add(newOption, toHTMLOptionElement(item(index)), es); |
| 69 | 69 |
| 70 ASSERT(!es.hadException()); | 70 ASSERT(!es.hadException()); |
| 71 } | 71 } |
| 72 | 72 |
| 73 void HTMLOptionsCollection::remove(int index) | 73 void HTMLOptionsCollection::remove(int index) |
| 74 { | 74 { |
| 75 toHTMLSelectElement(ownerNode())->remove(index); | 75 toHTMLSelectElement(ownerNode())->remove(index); |
| 76 } | 76 } |
| 77 | 77 |
| 78 void HTMLOptionsCollection::remove(HTMLOptionElement* option) |
| 79 { |
| 80 return remove(option->index()); |
| 81 } |
| 82 |
| 78 int HTMLOptionsCollection::selectedIndex() const | 83 int HTMLOptionsCollection::selectedIndex() const |
| 79 { | 84 { |
| 80 return toHTMLSelectElement(ownerNode())->selectedIndex(); | 85 return toHTMLSelectElement(ownerNode())->selectedIndex(); |
| 81 } | 86 } |
| 82 | 87 |
| 83 void HTMLOptionsCollection::setSelectedIndex(int index) | 88 void HTMLOptionsCollection::setSelectedIndex(int index) |
| 84 { | 89 { |
| 85 toHTMLSelectElement(ownerNode())->setSelectedIndex(index); | 90 toHTMLSelectElement(ownerNode())->setSelectedIndex(index); |
| 86 } | 91 } |
| 87 | 92 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 if (!value) { | 126 if (!value) { |
| 122 es.throwDOMException(TypeMismatchError); | 127 es.throwDOMException(TypeMismatchError); |
| 123 return true; | 128 return true; |
| 124 } | 129 } |
| 125 base->setOption(index, value.get(), es); | 130 base->setOption(index, value.get(), es); |
| 126 return true; | 131 return true; |
| 127 } | 132 } |
| 128 | 133 |
| 129 } //namespace | 134 } //namespace |
| 130 | 135 |
| OLD | NEW |