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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 #include "core/page/ContextMenuProvider.h" | 88 #include "core/page/ContextMenuProvider.h" |
89 #include "core/page/FocusController.h" | 89 #include "core/page/FocusController.h" |
90 #include "core/page/FrameTree.h" | 90 #include "core/page/FrameTree.h" |
91 #include "core/page/Page.h" | 91 #include "core/page/Page.h" |
92 #include "core/page/PagePopupClient.h" | 92 #include "core/page/PagePopupClient.h" |
93 #include "core/page/PointerLockController.h" | 93 #include "core/page/PointerLockController.h" |
94 #include "core/page/ScopedPageSuspender.h" | 94 #include "core/page/ScopedPageSuspender.h" |
95 #include "core/page/TouchDisambiguation.h" | 95 #include "core/page/TouchDisambiguation.h" |
96 #include "core/page/ValidationMessageClientImpl.h" | 96 #include "core/page/ValidationMessageClientImpl.h" |
97 #include "core/page/scrolling/TopDocumentRootScrollerController.h" | 97 #include "core/page/scrolling/TopDocumentRootScrollerController.h" |
| 98 #include "core/paint/FirstMeaningfulPaintDetector.h" |
98 #include "core/paint/LinkHighlightImpl.h" | 99 #include "core/paint/LinkHighlightImpl.h" |
99 #include "core/paint/PaintLayer.h" | 100 #include "core/paint/PaintLayer.h" |
100 #include "core/timing/DOMWindowPerformance.h" | 101 #include "core/timing/DOMWindowPerformance.h" |
101 #include "core/timing/Performance.h" | 102 #include "core/timing/Performance.h" |
102 #include "modules/compositorworker/AnimationWorkletProxyClientImpl.h" | 103 #include "modules/compositorworker/AnimationWorkletProxyClientImpl.h" |
103 #include "modules/compositorworker/CompositorWorkerProxyClientImpl.h" | 104 #include "modules/compositorworker/CompositorWorkerProxyClientImpl.h" |
104 #include "modules/credentialmanager/CredentialManagerClient.h" | 105 #include "modules/credentialmanager/CredentialManagerClient.h" |
105 #include "modules/encryptedmedia/MediaKeysController.h" | 106 #include "modules/encryptedmedia/MediaKeysController.h" |
106 #include "modules/speech/SpeechRecognitionClientProxy.h" | 107 #include "modules/speech/SpeechRecognitionClientProxy.h" |
107 #include "modules/storage/StorageNamespaceController.h" | 108 #include "modules/storage/StorageNamespaceController.h" |
(...skipping 2060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2168 if (WebWidgetClient* client = widget->Client()) | 2169 if (WebWidgetClient* client = widget->Client()) |
2169 is_pointer_locked = client->IsPointerLocked(); | 2170 is_pointer_locked = client->IsPointerLocked(); |
2170 } | 2171 } |
2171 | 2172 |
2172 if (is_pointer_locked && | 2173 if (is_pointer_locked && |
2173 WebInputEvent::IsMouseEventType(input_event.GetType())) { | 2174 WebInputEvent::IsMouseEventType(input_event.GetType())) { |
2174 MainFrameImpl()->FrameWidget()->PointerLockMouseEvent(coalesced_event); | 2175 MainFrameImpl()->FrameWidget()->PointerLockMouseEvent(coalesced_event); |
2175 return WebInputEventResult::kHandledSystem; | 2176 return WebInputEventResult::kHandledSystem; |
2176 } | 2177 } |
2177 | 2178 |
| 2179 if (input_event.GetType() != WebInputEvent::kMouseMove) { |
| 2180 FirstMeaningfulPaintDetector::From( |
| 2181 *MainFrameImpl()->GetFrame()->GetDocument()) |
| 2182 .NotifyInputEvent(); |
| 2183 } |
| 2184 |
2178 if (mouse_capture_node_ && | 2185 if (mouse_capture_node_ && |
2179 WebInputEvent::IsMouseEventType(input_event.GetType())) { | 2186 WebInputEvent::IsMouseEventType(input_event.GetType())) { |
2180 TRACE_EVENT1("input", "captured mouse event", "type", | 2187 TRACE_EVENT1("input", "captured mouse event", "type", |
2181 input_event.GetType()); | 2188 input_event.GetType()); |
2182 // Save m_mouseCaptureNode since mouseCaptureLost() will clear it. | 2189 // Save m_mouseCaptureNode since mouseCaptureLost() will clear it. |
2183 Node* node = mouse_capture_node_; | 2190 Node* node = mouse_capture_node_; |
2184 | 2191 |
2185 // Not all platforms call mouseCaptureLost() directly. | 2192 // Not all platforms call mouseCaptureLost() directly. |
2186 if (input_event.GetType() == WebInputEvent::kMouseUp) | 2193 if (input_event.GetType() == WebInputEvent::kMouseUp) |
2187 MouseCaptureLost(); | 2194 MouseCaptureLost(); |
(...skipping 1922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4110 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) | 4117 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) |
4111 return nullptr; | 4118 return nullptr; |
4112 return focused_frame; | 4119 return focused_frame; |
4113 } | 4120 } |
4114 | 4121 |
4115 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { | 4122 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { |
4116 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; | 4123 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; |
4117 } | 4124 } |
4118 | 4125 |
4119 } // namespace blink | 4126 } // namespace blink |
OLD | NEW |