OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
5 * 2000 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. |
10 * | 10 * |
(...skipping 2579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2590 | 2590 |
2591 frame_->Selection().DidLayout(); | 2591 frame_->Selection().DidLayout(); |
2592 | 2592 |
2593 DCHECK(frame_->GetDocument()); | 2593 DCHECK(frame_->GetDocument()); |
2594 | 2594 |
2595 FontFaceSet::DidLayout(*frame_->GetDocument()); | 2595 FontFaceSet::DidLayout(*frame_->GetDocument()); |
2596 // Cursor update scheduling is done by the local root, which is the main frame | 2596 // Cursor update scheduling is done by the local root, which is the main frame |
2597 // if there are no RemoteFrame ancestors in the frame tree. Use of | 2597 // if there are no RemoteFrame ancestors in the frame tree. Use of |
2598 // localFrameRoot() is discouraged but will change when cursor update | 2598 // localFrameRoot() is discouraged but will change when cursor update |
2599 // scheduling is moved from EventHandler to PageEventHandler. | 2599 // scheduling is moved from EventHandler to PageEventHandler. |
2600 GetFrame().LocalFrameRoot().GetEventHandler().ScheduleCursorUpdate(); | 2600 |
| 2601 // Fire a fake a mouse move event to update hover state and mouse cursor, and |
| 2602 // send the right mouse out/over events. |
| 2603 if (RuntimeEnabledFeatures::UpdateHoverPostLayoutEnabled()) { |
| 2604 frame_->GetEventHandler().DispatchFakeMouseMoveEventSoon( |
| 2605 MouseEventManager::FakeMouseMoveReason::kPerFrame); |
| 2606 } else { |
| 2607 GetFrame().LocalFrameRoot().GetEventHandler().ScheduleCursorUpdate(); |
| 2608 } |
2601 | 2609 |
2602 UpdateGeometries(); | 2610 UpdateGeometries(); |
2603 | 2611 |
2604 // Plugins could have torn down the page inside updateGeometries(). | 2612 // Plugins could have torn down the page inside updateGeometries(). |
2605 if (GetLayoutViewItem().IsNull()) | 2613 if (GetLayoutViewItem().IsNull()) |
2606 return; | 2614 return; |
2607 | 2615 |
2608 ScheduleUpdatePluginsIfNecessary(); | 2616 ScheduleUpdatePluginsIfNecessary(); |
2609 | 2617 |
2610 if (ScrollingCoordinator* scrolling_coordinator = | 2618 if (ScrollingCoordinator* scrolling_coordinator = |
(...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4161 scroll_offset_ = offset; | 4169 scroll_offset_ = offset; |
4162 | 4170 |
4163 if (!ScrollbarsSuppressed()) | 4171 if (!ScrollbarsSuppressed()) |
4164 pending_scroll_delta_ += scroll_delta; | 4172 pending_scroll_delta_ += scroll_delta; |
4165 | 4173 |
4166 UpdateLayersAndCompositingAfterScrollIfNeeded(); | 4174 UpdateLayersAndCompositingAfterScrollIfNeeded(); |
4167 | 4175 |
4168 Document* document = frame_->GetDocument(); | 4176 Document* document = frame_->GetDocument(); |
4169 document->EnqueueScrollEventForNode(document); | 4177 document->EnqueueScrollEventForNode(document); |
4170 | 4178 |
4171 frame_->GetEventHandler().DispatchFakeMouseMoveEventSoon(); | 4179 frame_->GetEventHandler().DispatchFakeMouseMoveEventSoon( |
| 4180 MouseEventManager::FakeMouseMoveReason::kDuringScroll); |
4172 if (scroll_type == kUserScroll || scroll_type == kCompositorScroll) { | 4181 if (scroll_type == kUserScroll || scroll_type == kCompositorScroll) { |
4173 Page* page = GetFrame().GetPage(); | 4182 Page* page = GetFrame().GetPage(); |
4174 if (page) | 4183 if (page) |
4175 page->GetChromeClient().ClearToolTip(*frame_); | 4184 page->GetChromeClient().ClearToolTip(*frame_); |
4176 } | 4185 } |
4177 | 4186 |
4178 LayoutViewItem layout_view_item = document->GetLayoutViewItem(); | 4187 LayoutViewItem layout_view_item = document->GetLayoutViewItem(); |
4179 if (!layout_view_item.IsNull()) { | 4188 if (!layout_view_item.IsNull()) { |
4180 if (layout_view_item.UsesCompositing()) | 4189 if (layout_view_item.UsesCompositing()) |
4181 layout_view_item.Compositor()->FrameViewDidScroll(); | 4190 layout_view_item.Compositor()->FrameViewDidScroll(); |
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5477 void LocalFrameView::SetAnimationHost( | 5486 void LocalFrameView::SetAnimationHost( |
5478 std::unique_ptr<CompositorAnimationHost> host) { | 5487 std::unique_ptr<CompositorAnimationHost> host) { |
5479 animation_host_ = std::move(host); | 5488 animation_host_ = std::move(host); |
5480 } | 5489 } |
5481 | 5490 |
5482 LayoutUnit LocalFrameView::CaretWidth() const { | 5491 LayoutUnit LocalFrameView::CaretWidth() const { |
5483 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); | 5492 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); |
5484 } | 5493 } |
5485 | 5494 |
5486 } // namespace blink | 5495 } // namespace blink |
OLD | NEW |