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

Unified Diff: Source/core/html/HTMLSelectElement.h

Issue 541693003: HTMLSelectElement does not include selected index/indices while saving state (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/html/HTMLSelectElement.h
diff --git a/Source/core/html/HTMLSelectElement.h b/Source/core/html/HTMLSelectElement.h
index cab4c3a35f324c34ae3e86d683104f82a4b2d74a..edc1f1a63e29783c5ed9c90d52eee660285b804a 100644
--- a/Source/core/html/HTMLSelectElement.h
+++ b/Source/core/html/HTMLSelectElement.h
@@ -190,6 +190,11 @@ private:
void listBoxDefaultEventHandler(Event*);
void setOptionsChangedOnRenderer();
size_t searchOptionsForValue(const String&, size_t listIndexStart, size_t listIndexEnd) const;
+ String valueAtIndex(size_t index) const
+ {
+ const WillBeHeapVector<RawPtrWillBeMember<HTMLElement> >& items = listItems();
tkent 2014/09/09 02:14:45 Don't define function body in a header file if it
spartha 2014/09/09 11:09:56 Done.
+ return index < items.size() && isHTMLOptionElement(items[index]) ? toHTMLOptionElement(items[index])->value() : WTF::emptyString();
+ }
enum SkipDirection {
SkipBackwards = -1,

Powered by Google App Engine
This is Rietveld 408576698