| 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 17 matching lines...) Expand all Loading... |
| 28 #include "core/dom/StaticNodeList.h" | 28 #include "core/dom/StaticNodeList.h" |
| 29 #include "core/html/HTMLOptionElement.h" | 29 #include "core/html/HTMLOptionElement.h" |
| 30 #include "core/html/HTMLSelectElement.h" | 30 #include "core/html/HTMLSelectElement.h" |
| 31 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 HTMLOptionsCollection::HTMLOptionsCollection(ContainerNode& select) | 34 HTMLOptionsCollection::HTMLOptionsCollection(ContainerNode& select) |
| 35 : HTMLCollection(select, SelectOptions, DoesNotOverrideItemAfter) | 35 : HTMLCollection(select, SelectOptions, DoesNotOverrideItemAfter) |
| 36 { | 36 { |
| 37 ASSERT(isHTMLSelectElement(select)); | 37 ASSERT(isHTMLSelectElement(select)); |
| 38 ScriptWrappable::init(this); | |
| 39 } | 38 } |
| 40 | 39 |
| 41 void HTMLOptionsCollection::supportedPropertyNames(Vector<String>& names) | 40 void HTMLOptionsCollection::supportedPropertyNames(Vector<String>& names) |
| 42 { | 41 { |
| 43 // As per http://www.whatwg.org/specs/web-apps/current-work/multipage/common
-dom-interfaces.html#htmloptionscollection: | 42 // As per http://www.whatwg.org/specs/web-apps/current-work/multipage/common
-dom-interfaces.html#htmloptionscollection: |
| 44 // The supported property names consist of the non-empty values of all the i
d and name attributes of all the elements | 43 // The supported property names consist of the non-empty values of all the i
d and name attributes of all the elements |
| 45 // represented by the collection, in tree order, ignoring later duplicates,
with the id of an element preceding its | 44 // represented by the collection, in tree order, ignoring later duplicates,
with the id of an element preceding its |
| 46 // name if it contributes both, they differ from each other, and neither is
the duplicate of an earlier entry. | 45 // name if it contributes both, they differ from each other, and neither is
the duplicate of an earlier entry. |
| 47 HashSet<AtomicString> existingNames; | 46 HashSet<AtomicString> existingNames; |
| 48 unsigned length = this->length(); | 47 unsigned length = this->length(); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 if (!value) { // undefined or null | 140 if (!value) { // undefined or null |
| 142 base.remove(index); | 141 base.remove(index); |
| 143 return true; | 142 return true; |
| 144 } | 143 } |
| 145 base.setOption(index, value.get(), exceptionState); | 144 base.setOption(index, value.get(), exceptionState); |
| 146 return true; | 145 return true; |
| 147 } | 146 } |
| 148 | 147 |
| 149 } //namespace | 148 } //namespace |
| 150 | 149 |
| OLD | NEW |