| Index: third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
|
| index 3117a85f4d7e33e04735d4864d8f66dbb1ca27ae..14591cd7fa4bafc5702624b2e7db65b2bf5c46b5 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
|
| @@ -377,6 +377,8 @@ void HTMLSelectElement::parseAttribute(const QualifiedName& name, const AtomicSt
|
| if (inActiveDocument())
|
| lazyReattachIfAttached();
|
| resetToDefaultSelection();
|
| + if (!usesMenuList())
|
| + saveListboxActiveSelection();
|
| }
|
| } else if (name == multipleAttr) {
|
| parseMultipleAttribute(value);
|
| @@ -640,7 +642,12 @@ void HTMLSelectElement::saveLastSelection()
|
| void HTMLSelectElement::setActiveSelectionAnchor(HTMLOptionElement* option)
|
| {
|
| m_activeSelectionAnchor = option;
|
| + if (!usesMenuList())
|
| + saveListboxActiveSelection();
|
| +}
|
|
|
| +void HTMLSelectElement::saveListboxActiveSelection()
|
| +{
|
| // Cache the selection state so we can restore the old selection as the new
|
| // selection pivots around this anchor index.
|
| // Example:
|
|
|