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

Unified Diff: Source/web/PopupListBox.h

Issue 1013303004: Fix issue on <select> style change when popup is visible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed test expectation 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
« no previous file with comments | « Source/web/PopupContainer.cpp ('k') | Source/web/PopupListBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/PopupListBox.h
diff --git a/Source/web/PopupListBox.h b/Source/web/PopupListBox.h
index 8ffba8288fb7c626258c15d32ca64a2ec0fdf1ca..c45ff20c38d91e3c7acdf05a2d26f167a7e1e129 100644
--- a/Source/web/PopupListBox.h
+++ b/Source/web/PopupListBox.h
@@ -133,17 +133,17 @@ public:
bool handleTouchEvent(const PlatformTouchEvent&);
bool handleGestureEvent(const PlatformGestureEvent&);
- // Closes the popup
- void abandon();
+ // Closes the popup without accepting a selection.
+ void cancel();
// Updates our internal list to match the client.
void updateFromElement();
- // Sets the index of the option that is displayed in the <select> widget in the page
- void setOriginalIndex(int);
+ // Sets the index of the option that is displayed in the popup.
+ void setSelectedIndex(int index) { m_selectedIndex = index; }
// Gets the index of the item that the user is currently moused over or has
- // selected with the keyboard. This is not the same as the original index,
+ // selected with the keyboard. This is not the same as the element value,
// since the user has not yet accepted this input.
int selectedIndex() const { return m_selectedIndex; }
@@ -192,7 +192,7 @@ private:
PopupListBox(PopupMenuClient*, bool deviceSupportsTouch, PopupContainer*);
virtual ~PopupListBox();
- // Hides the popup. Other classes should not call this. Use abandon instead.
+ // Hides the popup. Other classes should not call this. Use cancel instead.
void hidePopup();
// Returns true if the selection can be changed to index.
@@ -255,21 +255,11 @@ private:
// to make it easier to unambiguously touch them.
bool m_deviceSupportsTouch;
- // This is the index of the item marked as "selected" - i.e. displayed in
- // the widget on the page.
- int m_originalIndex;
-
// This is the index of the item that the user is hovered over or has
// selected using the keyboard in the list. They have not confirmed this
// selection by clicking or pressing enter yet however.
int m_selectedIndex;
- // If >= 0, this is the index we should accept if the popup is "abandoned".
- // This is used for keyboard navigation, where we want the
- // selection to change immediately, and is only used if the settings
- // acceptOnAbandon field is true.
- int m_acceptedIndexOnAbandon;
-
// This is the number of rows visible in the popup. The maximum number
// visible at a time is defined as being kMaxVisibleRows. For a scrolled
// popup, this can be thought of as the page size in data units.
« no previous file with comments | « Source/web/PopupContainer.cpp ('k') | Source/web/PopupListBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698