OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 void WebPopupMenuImpl::handleMouseMove(const WebMouseEvent& event) | 113 void WebPopupMenuImpl::handleMouseMove(const WebMouseEvent& event) |
114 { | 114 { |
115 // Don't send mouse move messages if the mouse hasn't moved. | 115 // Don't send mouse move messages if the mouse hasn't moved. |
116 if (event.x != m_lastMousePosition.x || event.y != m_lastMousePosition.y) { | 116 if (event.x != m_lastMousePosition.x || event.y != m_lastMousePosition.y) { |
117 m_lastMousePosition = WebPoint(event.x, event.y); | 117 m_lastMousePosition = WebPoint(event.x, event.y); |
118 m_widget->handleMouseMoveEvent(PlatformMouseEventBuilder(m_widget, event
)); | 118 m_widget->handleMouseMoveEvent(PlatformMouseEventBuilder(m_widget, event
)); |
119 | 119 |
120 // We cannot call setToolTipText() in PopupContainer, because PopupConta
iner is in WebCore, and we cannot refer to WebKit from Webcore. | 120 // We cannot call setToolTipText() in PopupContainer, because PopupConta
iner is in WebCore, and we cannot refer to WebKit from Webcore. |
121 PopupContainer* container = static_cast<PopupContainer*>(m_widget); | 121 PopupContainer* container = static_cast<PopupContainer*>(m_widget); |
122 client()->setToolTipText(container->getSelectedItemToolTip(), container-
>menuStyle().textDirection() == RTL ? WebTextDirectionRightToLeft : WebTextDirec
tionLeftToRight); | 122 client()->setToolTipText(container->getSelectedItemToolTip(), toWebTextD
irection(container->menuStyle().textDirection())); |
123 } | 123 } |
124 } | 124 } |
125 | 125 |
126 void WebPopupMenuImpl::handleMouseLeave(const WebMouseEvent& event) | 126 void WebPopupMenuImpl::handleMouseLeave(const WebMouseEvent& event) |
127 { | 127 { |
128 m_widget->handleMouseMoveEvent(PlatformMouseEventBuilder(m_widget, event)); | 128 m_widget->handleMouseMoveEvent(PlatformMouseEventBuilder(m_widget, event)); |
129 } | 129 } |
130 | 130 |
131 void WebPopupMenuImpl::handleMouseDown(const WebMouseEvent& event) | 131 void WebPopupMenuImpl::handleMouseDown(const WebMouseEvent& event) |
132 { | 132 { |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 ASSERT(widget == m_widget); | 411 ASSERT(widget == m_widget); |
412 if (m_widget) { | 412 if (m_widget) { |
413 m_widget->setClient(0); | 413 m_widget->setClient(0); |
414 m_widget = 0; | 414 m_widget = 0; |
415 } | 415 } |
416 if (m_client) | 416 if (m_client) |
417 m_client->closeWidgetSoon(); | 417 m_client->closeWidgetSoon(); |
418 } | 418 } |
419 | 419 |
420 } // namespace blink | 420 } // namespace blink |
OLD | NEW |