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 2177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2188 UIEventWithKeyState::ClearNewTabModifierSetFromIsolatedWorld(); | 2188 UIEventWithKeyState::ClearNewTabModifierSetFromIsolatedWorld(); |
2189 | 2189 |
2190 bool is_pointer_locked = false; | 2190 bool is_pointer_locked = false; |
2191 if (WebFrameWidgetBase* widget = MainFrameImpl()->FrameWidget()) { | 2191 if (WebFrameWidgetBase* widget = MainFrameImpl()->FrameWidget()) { |
2192 if (WebWidgetClient* client = widget->Client()) | 2192 if (WebWidgetClient* client = widget->Client()) |
2193 is_pointer_locked = client->IsPointerLocked(); | 2193 is_pointer_locked = client->IsPointerLocked(); |
2194 } | 2194 } |
2195 | 2195 |
2196 if (is_pointer_locked && | 2196 if (is_pointer_locked && |
2197 WebInputEvent::IsMouseEventType(input_event.GetType())) { | 2197 WebInputEvent::IsMouseEventType(input_event.GetType())) { |
2198 MainFrameImpl()->FrameWidget()->PointerLockMouseEvent(input_event); | 2198 MainFrameImpl()->FrameWidget()->PointerLockMouseEvent(coalesced_event); |
2199 return WebInputEventResult::kHandledSystem; | 2199 return WebInputEventResult::kHandledSystem; |
2200 } | 2200 } |
2201 | 2201 |
2202 if (mouse_capture_node_ && | 2202 if (mouse_capture_node_ && |
2203 WebInputEvent::IsMouseEventType(input_event.GetType())) { | 2203 WebInputEvent::IsMouseEventType(input_event.GetType())) { |
2204 TRACE_EVENT1("input", "captured mouse event", "type", | 2204 TRACE_EVENT1("input", "captured mouse event", "type", |
2205 input_event.GetType()); | 2205 input_event.GetType()); |
2206 // Save m_mouseCaptureNode since mouseCaptureLost() will clear it. | 2206 // Save m_mouseCaptureNode since mouseCaptureLost() will clear it. |
2207 Node* node = mouse_capture_node_; | 2207 Node* node = mouse_capture_node_; |
2208 | 2208 |
(...skipping 1952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4161 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) | 4161 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) |
4162 return nullptr; | 4162 return nullptr; |
4163 return focused_frame; | 4163 return focused_frame; |
4164 } | 4164 } |
4165 | 4165 |
4166 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { | 4166 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { |
4167 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; | 4167 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; |
4168 } | 4168 } |
4169 | 4169 |
4170 } // namespace blink | 4170 } // namespace blink |
OLD | NEW |