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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 #include "core/page/FocusController.h" | 91 #include "core/page/FocusController.h" |
92 #include "core/page/FrameTree.h" | 92 #include "core/page/FrameTree.h" |
93 #include "core/page/Page.h" | 93 #include "core/page/Page.h" |
94 #include "core/page/PageOverlay.h" | 94 #include "core/page/PageOverlay.h" |
95 #include "core/page/PagePopupClient.h" | 95 #include "core/page/PagePopupClient.h" |
96 #include "core/page/PointerLockController.h" | 96 #include "core/page/PointerLockController.h" |
97 #include "core/page/ScopedPageSuspender.h" | 97 #include "core/page/ScopedPageSuspender.h" |
98 #include "core/page/TouchDisambiguation.h" | 98 #include "core/page/TouchDisambiguation.h" |
99 #include "core/page/ValidationMessageClientImpl.h" | 99 #include "core/page/ValidationMessageClientImpl.h" |
100 #include "core/page/scrolling/TopDocumentRootScrollerController.h" | 100 #include "core/page/scrolling/TopDocumentRootScrollerController.h" |
| 101 #include "core/paint/FirstMeaningfulPaintDetector.h" |
101 #include "core/paint/LinkHighlightImpl.h" | 102 #include "core/paint/LinkHighlightImpl.h" |
102 #include "core/paint/PaintLayer.h" | 103 #include "core/paint/PaintLayer.h" |
103 #include "core/timing/DOMWindowPerformance.h" | 104 #include "core/timing/DOMWindowPerformance.h" |
104 #include "core/timing/Performance.h" | 105 #include "core/timing/Performance.h" |
105 #include "modules/compositorworker/AnimationWorkletProxyClientImpl.h" | 106 #include "modules/compositorworker/AnimationWorkletProxyClientImpl.h" |
106 #include "modules/compositorworker/CompositorWorkerProxyClientImpl.h" | 107 #include "modules/compositorworker/CompositorWorkerProxyClientImpl.h" |
107 #include "modules/credentialmanager/CredentialManagerClient.h" | 108 #include "modules/credentialmanager/CredentialManagerClient.h" |
108 #include "modules/encryptedmedia/MediaKeysController.h" | 109 #include "modules/encryptedmedia/MediaKeysController.h" |
109 #include "modules/quota/StorageQuotaClient.h" | 110 #include "modules/quota/StorageQuotaClient.h" |
110 #include "modules/speech/SpeechRecognitionClientProxy.h" | 111 #include "modules/speech/SpeechRecognitionClientProxy.h" |
(...skipping 2068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2179 if (WebWidgetClient* client = widget->Client()) | 2180 if (WebWidgetClient* client = widget->Client()) |
2180 is_pointer_locked = client->IsPointerLocked(); | 2181 is_pointer_locked = client->IsPointerLocked(); |
2181 } | 2182 } |
2182 | 2183 |
2183 if (is_pointer_locked && | 2184 if (is_pointer_locked && |
2184 WebInputEvent::IsMouseEventType(input_event.GetType())) { | 2185 WebInputEvent::IsMouseEventType(input_event.GetType())) { |
2185 MainFrameImpl()->FrameWidget()->PointerLockMouseEvent(coalesced_event); | 2186 MainFrameImpl()->FrameWidget()->PointerLockMouseEvent(coalesced_event); |
2186 return WebInputEventResult::kHandledSystem; | 2187 return WebInputEventResult::kHandledSystem; |
2187 } | 2188 } |
2188 | 2189 |
| 2190 if (input_event.GetType() != WebInputEvent::kMouseMove) { |
| 2191 FirstMeaningfulPaintDetector::From( |
| 2192 *MainFrameImpl()->GetFrame()->GetDocument()) |
| 2193 .NotifyInputEvent(); |
| 2194 } |
| 2195 |
2189 if (mouse_capture_node_ && | 2196 if (mouse_capture_node_ && |
2190 WebInputEvent::IsMouseEventType(input_event.GetType())) { | 2197 WebInputEvent::IsMouseEventType(input_event.GetType())) { |
2191 TRACE_EVENT1("input", "captured mouse event", "type", | 2198 TRACE_EVENT1("input", "captured mouse event", "type", |
2192 input_event.GetType()); | 2199 input_event.GetType()); |
2193 // Save m_mouseCaptureNode since mouseCaptureLost() will clear it. | 2200 // Save m_mouseCaptureNode since mouseCaptureLost() will clear it. |
2194 Node* node = mouse_capture_node_; | 2201 Node* node = mouse_capture_node_; |
2195 | 2202 |
2196 // Not all platforms call mouseCaptureLost() directly. | 2203 // Not all platforms call mouseCaptureLost() directly. |
2197 if (input_event.GetType() == WebInputEvent::kMouseUp) | 2204 if (input_event.GetType() == WebInputEvent::kMouseUp) |
2198 MouseCaptureLost(); | 2205 MouseCaptureLost(); |
(...skipping 1930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4129 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) | 4136 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) |
4130 return nullptr; | 4137 return nullptr; |
4131 return focused_frame; | 4138 return focused_frame; |
4132 } | 4139 } |
4133 | 4140 |
4134 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { | 4141 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { |
4135 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; | 4142 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; |
4136 } | 4143 } |
4137 | 4144 |
4138 } // namespace blink | 4145 } // namespace blink |
OLD | NEW |