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

Side by Side Diff: Source/core/html/HTMLOptionsCollection.cpp

Issue 426513002: Remove HTMLOptionsCollection.remove(element) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: header too Created 6 years, 4 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/HTMLOptionsCollection.h ('k') | Source/core/html/HTMLOptionsCollection.idl » ('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 * 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
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
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
OLDNEW
« no previous file with comments | « Source/core/html/HTMLOptionsCollection.h ('k') | Source/core/html/HTMLOptionsCollection.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698