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

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

Issue 1613783003: Revert of Remove unused arguments of blink::PopupMenu::show(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // show a popup. 99 // show a popup.
100 m_webExternalPopupMenu->show(rectInViewport); 100 m_webExternalPopupMenu->show(rectInViewport);
101 return true; 101 return true;
102 } else { 102 } else {
103 // The client might refuse to create a popup (when there is already one pending to be shown for example). 103 // The client might refuse to create a popup (when there is already one pending to be shown for example).
104 didCancel(); 104 didCancel();
105 return false; 105 return false;
106 } 106 }
107 } 107 }
108 108
109 void ExternalPopupMenu::show() 109 void ExternalPopupMenu::show(const FloatQuad&, const IntSize&, int)
110 { 110 {
111 if (!showInternal()) 111 if (!showInternal())
112 return; 112 return;
113 #if OS(MACOSX) 113 #if OS(MACOSX)
114 const WebInputEvent* currentEvent = WebViewImpl::currentInputEvent(); 114 const WebInputEvent* currentEvent = WebViewImpl::currentInputEvent();
115 if (currentEvent && currentEvent->type == WebInputEvent::MouseDown) { 115 if (currentEvent && currentEvent->type == WebInputEvent::MouseDown) {
116 m_syntheticEvent = adoptPtr(new WebMouseEvent); 116 m_syntheticEvent = adoptPtr(new WebMouseEvent);
117 *m_syntheticEvent = *static_cast<const WebMouseEvent*>(currentEvent); 117 *m_syntheticEvent = *static_cast<const WebMouseEvent*>(currentEvent);
118 m_syntheticEvent->type = WebInputEvent::MouseUp; 118 m_syntheticEvent->type = WebInputEvent::MouseUp;
119 m_dispatchEventTimer.startOneShot(0, BLINK_FROM_HERE); 119 m_dispatchEventTimer.startOneShot(0, BLINK_FROM_HERE);
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 if (ownerElement.itemIsDisplayNone(*items[i])) 292 if (ownerElement.itemIsDisplayNone(*items[i]))
293 continue; 293 continue;
294 if (popupMenuItemIndex == i) 294 if (popupMenuItemIndex == i)
295 return indexTracker; 295 return indexTracker;
296 ++indexTracker; 296 ++indexTracker;
297 } 297 }
298 return -1; 298 return -1;
299 } 299 }
300 300
301 } // namespace blink 301 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/ExternalPopupMenu.h ('k') | third_party/WebKit/Source/web/PopupMenuImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698