OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/renderer_host/render_widget_host_view_win.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_win.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <peninputpanel_i.c> | 9 #include <peninputpanel_i.c> |
10 #include <stack> | 10 #include <stack> |
(...skipping 1800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1811 // RenderViewHostHWND as there is no way to retrieve it from the HWND. | 1811 // RenderViewHostHWND as there is no way to retrieve it from the HWND. |
1812 | 1812 |
1813 // Don't forward if the container is a popup or fullscreen widget. | 1813 // Don't forward if the container is a popup or fullscreen widget. |
1814 if (!is_fullscreen_ && !close_on_deactivate_) { | 1814 if (!is_fullscreen_ && !close_on_deactivate_) { |
1815 switch (message) { | 1815 switch (message) { |
1816 case WM_LBUTTONDOWN: | 1816 case WM_LBUTTONDOWN: |
1817 case WM_MBUTTONDOWN: | 1817 case WM_MBUTTONDOWN: |
1818 case WM_RBUTTONDOWN: | 1818 case WM_RBUTTONDOWN: |
1819 // Finish the ongoing composition whenever a mouse click happens. | 1819 // Finish the ongoing composition whenever a mouse click happens. |
1820 // It matches IE's behavior. | 1820 // It matches IE's behavior. |
1821 ime_input_.CleanupComposition(m_hWnd); | 1821 if (base::win::IsTsfAwareRequired()) { |
| 1822 ui::TsfBridge::GetInstance()->CancelComposition(); |
| 1823 } else { |
| 1824 ime_input_.CleanupComposition(m_hWnd); |
| 1825 } |
1822 // Fall through. | 1826 // Fall through. |
1823 case WM_MOUSEMOVE: | 1827 case WM_MOUSEMOVE: |
1824 case WM_MOUSELEAVE: { | 1828 case WM_MOUSELEAVE: { |
1825 // Give the WebContentsImpl first crack at the message. It may want to | 1829 // Give the WebContentsImpl first crack at the message. It may want to |
1826 // prevent forwarding to the renderer if some higher level browser | 1830 // prevent forwarding to the renderer if some higher level browser |
1827 // functionality is invoked. | 1831 // functionality is invoked. |
1828 LPARAM parent_msg_lparam = lparam; | 1832 LPARAM parent_msg_lparam = lparam; |
1829 if (message != WM_MOUSELEAVE) { | 1833 if (message != WM_MOUSELEAVE) { |
1830 // For the messages except WM_MOUSELEAVE, before forwarding them to | 1834 // For the messages except WM_MOUSELEAVE, before forwarding them to |
1831 // parent window, we should adjust cursor position from client | 1835 // parent window, we should adjust cursor position from client |
(...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3079 // receive a focus change in the context of a pointer down message, it means | 3083 // receive a focus change in the context of a pointer down message, it means |
3080 // that the pointer down message occurred on the edit field and we should | 3084 // that the pointer down message occurred on the edit field and we should |
3081 // display the on screen keyboard | 3085 // display the on screen keyboard |
3082 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) | 3086 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) |
3083 DisplayOnScreenKeyboardIfNeeded(); | 3087 DisplayOnScreenKeyboardIfNeeded(); |
3084 received_focus_change_after_pointer_down_ = false; | 3088 received_focus_change_after_pointer_down_ = false; |
3085 pointer_down_context_ = false; | 3089 pointer_down_context_ = false; |
3086 } | 3090 } |
3087 | 3091 |
3088 } // namespace content | 3092 } // namespace content |
OLD | NEW |