OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 2178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2189 UIEventWithKeyState::ClearNewTabModifierSetFromIsolatedWorld(); | 2189 UIEventWithKeyState::ClearNewTabModifierSetFromIsolatedWorld(); |
2190 | 2190 |
2191 bool is_pointer_locked = false; | 2191 bool is_pointer_locked = false; |
2192 if (WebFrameWidgetBase* widget = MainFrameImpl()->FrameWidget()) { | 2192 if (WebFrameWidgetBase* widget = MainFrameImpl()->FrameWidget()) { |
2193 if (WebWidgetClient* client = widget->Client()) | 2193 if (WebWidgetClient* client = widget->Client()) |
2194 is_pointer_locked = client->IsPointerLocked(); | 2194 is_pointer_locked = client->IsPointerLocked(); |
2195 } | 2195 } |
2196 | 2196 |
2197 if (is_pointer_locked && | 2197 if (is_pointer_locked && |
2198 WebInputEvent::IsMouseEventType(input_event.GetType())) { | 2198 WebInputEvent::IsMouseEventType(input_event.GetType())) { |
2199 MainFrameImpl()->FrameWidget()->PointerLockMouseEvent(input_event); | 2199 MainFrameImpl()->FrameWidget()->PointerLockMouseEvent(coalesced_event); |
2200 return WebInputEventResult::kHandledSystem; | 2200 return WebInputEventResult::kHandledSystem; |
2201 } | 2201 } |
2202 | 2202 |
2203 if (mouse_capture_node_ && | 2203 if (mouse_capture_node_ && |
2204 WebInputEvent::IsMouseEventType(input_event.GetType())) { | 2204 WebInputEvent::IsMouseEventType(input_event.GetType())) { |
2205 TRACE_EVENT1("input", "captured mouse event", "type", | 2205 TRACE_EVENT1("input", "captured mouse event", "type", |
2206 input_event.GetType()); | 2206 input_event.GetType()); |
2207 // Save m_mouseCaptureNode since mouseCaptureLost() will clear it. | 2207 // Save m_mouseCaptureNode since mouseCaptureLost() will clear it. |
2208 Node* node = mouse_capture_node_; | 2208 Node* node = mouse_capture_node_; |
2209 | 2209 |
(...skipping 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4148 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) | 4148 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) |
4149 return nullptr; | 4149 return nullptr; |
4150 return focused_frame; | 4150 return focused_frame; |
4151 } | 4151 } |
4152 | 4152 |
4153 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { | 4153 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { |
4154 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; | 4154 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; |
4155 } | 4155 } |
4156 | 4156 |
4157 } // namespace blink | 4157 } // namespace blink |
OLD | NEW |