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

Unified Diff: Source/web/PopupMenuImpl.cpp

Issue 1013303004: Fix issue on <select> style change when popup is visible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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
« Source/web/PopupListBox.cpp ('K') | « Source/web/PopupMenuImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/PopupMenuImpl.cpp
diff --git a/Source/web/PopupMenuImpl.cpp b/Source/web/PopupMenuImpl.cpp
index cc73edb64bacbcabf37a9623d056541c19a3430b..b6efa51a7776f14df3e03025f0bd9e6906a48705 100644
--- a/Source/web/PopupMenuImpl.cpp
+++ b/Source/web/PopupMenuImpl.cpp
@@ -67,7 +67,6 @@ PopupMenuImpl::PopupMenuImpl(ChromeClientImpl* chromeClient, PopupMenuClient* cl
: m_chromeClient(chromeClient)
, m_client(client)
, m_popup(nullptr)
- , m_indexToSetOnClose(-1)
{
}
@@ -237,7 +236,6 @@ void PopupMenuImpl::setValueAndClosePopup(int numValue, const String& stringValu
ASSERT(success);
m_client->selectionChanged(listIndex);
m_client->valueChanged(listIndex);
- m_indexToSetOnClose = -1;
closePopup();
}
@@ -247,8 +245,7 @@ void PopupMenuImpl::setValue(const String& value)
bool success;
int listIndex = value.toInt(&success);
ASSERT(success);
- m_client->setTextFromItem(listIndex);
- m_indexToSetOnClose = listIndex;
+ m_client->setProvisionallySelectedListIndex(listIndex);
}
void PopupMenuImpl::didClosePopup()
@@ -256,11 +253,6 @@ void PopupMenuImpl::didClosePopup()
// Clearing m_popup first to prevent from trying to close the popup again.
m_popup = nullptr;
RefPtrWillBeRawPtr<PopupMenuImpl> protector(this);
- if (m_client && m_indexToSetOnClose >= 0) {
- // valueChanged() will dispatch a 'change' event.
- m_client->valueChanged(m_indexToSetOnClose);
- }
- m_indexToSetOnClose = -1;
if (m_client)
m_client->popupDidHide();
}
« Source/web/PopupListBox.cpp ('K') | « Source/web/PopupMenuImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698