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

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

Issue 189833009: Trace where timers were scheduled in Blink (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/web/AssociatedURLLoader.cpp ('k') | Source/web/ValidationMessageClientImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 return; 74 return;
75 m_webExternalPopupMenu = m_webView.client()->createExternalPopupMenu(info, t his); 75 m_webExternalPopupMenu = m_webView.client()->createExternalPopupMenu(info, t his);
76 if (m_webExternalPopupMenu) { 76 if (m_webExternalPopupMenu) {
77 m_webExternalPopupMenu->show(m_frameView->contentsToWindow(rect)); 77 m_webExternalPopupMenu->show(m_frameView->contentsToWindow(rect));
78 #if OS(MACOSX) 78 #if OS(MACOSX)
79 const WebInputEvent* currentEvent = WebViewImpl::currentInputEvent(); 79 const WebInputEvent* currentEvent = WebViewImpl::currentInputEvent();
80 if (currentEvent && currentEvent->type == WebInputEvent::MouseDown) { 80 if (currentEvent && currentEvent->type == WebInputEvent::MouseDown) {
81 m_syntheticEvent = adoptPtr(new WebMouseEvent); 81 m_syntheticEvent = adoptPtr(new WebMouseEvent);
82 *m_syntheticEvent = *static_cast<const WebMouseEvent*>(currentEvent) ; 82 *m_syntheticEvent = *static_cast<const WebMouseEvent*>(currentEvent) ;
83 m_syntheticEvent->type = WebInputEvent::MouseUp; 83 m_syntheticEvent->type = WebInputEvent::MouseUp;
84 m_dispatchEventTimer.startOneShot(0); 84 m_dispatchEventTimer.startOneShot(0, FROM_HERE);
85 // FIXME: show() is asynchronous. If preparing a popup is slow and 85 // FIXME: show() is asynchronous. If preparing a popup is slow and
86 // a user released the mouse button before showing the popup, 86 // a user released the mouse button before showing the popup,
87 // mouseup and click events are correctly dispatched. Dispatching 87 // mouseup and click events are correctly dispatched. Dispatching
88 // the synthetic mouseup event is redundant in this case. 88 // the synthetic mouseup event is redundant in this case.
89 } 89 }
90 #endif 90 #endif
91 } else { 91 } else {
92 // The client might refuse to create a popup (when there is already one pending to be shown for example). 92 // The client might refuse to create a popup (when there is already one pending to be shown for example).
93 didCancel(); 93 didCancel();
94 } 94 }
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 info->itemHeight = m_popupMenuClient->menuStyle().font().fontMetrics().heigh t(); 207 info->itemHeight = m_popupMenuClient->menuStyle().font().fontMetrics().heigh t();
208 info->itemFontSize = static_cast<int>(m_popupMenuClient->menuStyle().font(). fontDescription().computedSize()); 208 info->itemFontSize = static_cast<int>(m_popupMenuClient->menuStyle().font(). fontDescription().computedSize());
209 info->selectedIndex = m_popupMenuClient->selectedIndex(); 209 info->selectedIndex = m_popupMenuClient->selectedIndex();
210 info->rightAligned = m_popupMenuClient->menuStyle().textDirection() == WebCo re::RTL; 210 info->rightAligned = m_popupMenuClient->menuStyle().textDirection() == WebCo re::RTL;
211 info->allowMultipleSelection = m_popupMenuClient->multiple(); 211 info->allowMultipleSelection = m_popupMenuClient->multiple();
212 info->items.swap(items); 212 info->items.swap(items);
213 } 213 }
214 214
215 } 215 }
OLDNEW
« no previous file with comments | « Source/web/AssociatedURLLoader.cpp ('k') | Source/web/ValidationMessageClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698