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

Side by Side Diff: third_party/WebKit/Source/web/ExternalPopupMenu.cpp

Issue 2479123003: WIP Add getCoalescedEvents API using vector of WebInputEvents (Closed)
Patch Set: Created 4 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 m_dispatchEventTimer.startOneShot(0, BLINK_FROM_HERE); 119 m_dispatchEventTimer.startOneShot(0, BLINK_FROM_HERE);
120 // FIXME: show() is asynchronous. If preparing a popup is slow and a 120 // FIXME: show() is asynchronous. If preparing a popup is slow and a
121 // user released the mouse button before showing the popup, mouseup and 121 // user released the mouse button before showing the popup, mouseup and
122 // click events are correctly dispatched. Dispatching the synthetic 122 // click events are correctly dispatched. Dispatching the synthetic
123 // mouseup event is redundant in this case. 123 // mouseup event is redundant in this case.
124 } 124 }
125 #endif 125 #endif
126 } 126 }
127 127
128 void ExternalPopupMenu::dispatchEvent(TimerBase*) { 128 void ExternalPopupMenu::dispatchEvent(TimerBase*) {
129 m_webView.handleInputEvent(*m_syntheticEvent); 129 m_webView.handleInputEvent(*m_syntheticEvent,
130 std::vector<const WebInputEvent*>());
130 m_syntheticEvent.reset(); 131 m_syntheticEvent.reset();
131 } 132 }
132 133
133 void ExternalPopupMenu::hide() { 134 void ExternalPopupMenu::hide() {
134 if (m_ownerElement) 135 if (m_ownerElement)
135 m_ownerElement->popupDidHide(); 136 m_ownerElement->popupDidHide();
136 if (!m_webExternalPopupMenu) 137 if (!m_webExternalPopupMenu)
137 return; 138 return;
138 m_webExternalPopupMenu->close(); 139 m_webExternalPopupMenu->close();
139 m_webExternalPopupMenu = 0; 140 m_webExternalPopupMenu = 0;
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 if (ownerElement.itemIsDisplayNone(*items[i])) 301 if (ownerElement.itemIsDisplayNone(*items[i]))
301 continue; 302 continue;
302 if (popupMenuItemIndex == i) 303 if (popupMenuItemIndex == i)
303 return indexTracker; 304 return indexTracker;
304 ++indexTracker; 305 ++indexTracker;
305 } 306 }
306 return -1; 307 return -1;
307 } 308 }
308 309
309 } // namespace blink 310 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698