| OLD | NEW |
| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 m_dispatchEventTimer.startOneShot(0, BLINK_FROM_HERE); | 120 m_dispatchEventTimer.startOneShot(0, BLINK_FROM_HERE); |
| 121 // FIXME: show() is asynchronous. If preparing a popup is slow and a | 121 // FIXME: show() is asynchronous. If preparing a popup is slow and a |
| 122 // user released the mouse button before showing the popup, mouseup and | 122 // user released the mouse button before showing the popup, mouseup and |
| 123 // click events are correctly dispatched. Dispatching the synthetic | 123 // click events are correctly dispatched. Dispatching the synthetic |
| 124 // mouseup event is redundant in this case. | 124 // mouseup event is redundant in this case. |
| 125 } | 125 } |
| 126 #endif | 126 #endif |
| 127 } | 127 } |
| 128 | 128 |
| 129 void ExternalPopupMenu::dispatchEvent(TimerBase*) { | 129 void ExternalPopupMenu::dispatchEvent(TimerBase*) { |
| 130 m_webView.handleInputEvent(*m_syntheticEvent); | 130 m_webView.handleInputEvent(blink::WebCoalescedInputEvent(*m_syntheticEvent)); |
| 131 m_syntheticEvent.reset(); | 131 m_syntheticEvent.reset(); |
| 132 } | 132 } |
| 133 | 133 |
| 134 void ExternalPopupMenu::hide() { | 134 void ExternalPopupMenu::hide() { |
| 135 if (m_ownerElement) | 135 if (m_ownerElement) |
| 136 m_ownerElement->popupDidHide(); | 136 m_ownerElement->popupDidHide(); |
| 137 if (!m_webExternalPopupMenu) | 137 if (!m_webExternalPopupMenu) |
| 138 return; | 138 return; |
| 139 m_webExternalPopupMenu->close(); | 139 m_webExternalPopupMenu->close(); |
| 140 m_webExternalPopupMenu = 0; | 140 m_webExternalPopupMenu = 0; |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 if (ownerElement.itemIsDisplayNone(*items[i])) | 302 if (ownerElement.itemIsDisplayNone(*items[i])) |
| 303 continue; | 303 continue; |
| 304 if (popupMenuItemIndex == i) | 304 if (popupMenuItemIndex == i) |
| 305 return indexTracker; | 305 return indexTracker; |
| 306 ++indexTracker; | 306 ++indexTracker; |
| 307 } | 307 } |
| 308 return -1; | 308 return -1; |
| 309 } | 309 } |
| 310 | 310 |
| 311 } // namespace blink | 311 } // namespace blink |
| OLD | NEW |