| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(CoalescedWebInputEvent(*m_syntheticEvent)); |
| 130 m_syntheticEvent.reset(); | 130 m_syntheticEvent.reset(); |
| 131 } | 131 } |
| 132 | 132 |
| 133 void ExternalPopupMenu::hide() { | 133 void ExternalPopupMenu::hide() { |
| 134 if (m_ownerElement) | 134 if (m_ownerElement) |
| 135 m_ownerElement->popupDidHide(); | 135 m_ownerElement->popupDidHide(); |
| 136 if (!m_webExternalPopupMenu) | 136 if (!m_webExternalPopupMenu) |
| 137 return; | 137 return; |
| 138 m_webExternalPopupMenu->close(); | 138 m_webExternalPopupMenu->close(); |
| 139 m_webExternalPopupMenu = 0; | 139 m_webExternalPopupMenu = 0; |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 if (ownerElement.itemIsDisplayNone(*items[i])) | 300 if (ownerElement.itemIsDisplayNone(*items[i])) |
| 301 continue; | 301 continue; |
| 302 if (popupMenuItemIndex == i) | 302 if (popupMenuItemIndex == i) |
| 303 return indexTracker; | 303 return indexTracker; |
| 304 ++indexTracker; | 304 ++indexTracker; |
| 305 } | 305 } |
| 306 return -1; | 306 return -1; |
| 307 } | 307 } |
| 308 | 308 |
| 309 } // namespace blink | 309 } // namespace blink |
| OLD | NEW |