Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(460)

Side by Side Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 2956023004: Add a flag to update hover effect when a layout is changed (Closed)
Patch Set: Remove pause in test Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 frame_->GetChromeClient().OnMouseDown(*result.InnerNode()); 727 frame_->GetChromeClient().OnMouseDown(*result.InnerNode());
728 } 728 }
729 729
730 return event_result; 730 return event_result;
731 } 731 }
732 732
733 WebInputEventResult EventHandler::HandleMouseMoveEvent( 733 WebInputEventResult EventHandler::HandleMouseMoveEvent(
734 const WebMouseEvent& event, 734 const WebMouseEvent& event,
735 const Vector<WebMouseEvent>& coalesced_events) { 735 const Vector<WebMouseEvent>& coalesced_events) {
736 TRACE_EVENT0("blink", "EventHandler::handleMouseMoveEvent"); 736 TRACE_EVENT0("blink", "EventHandler::handleMouseMoveEvent");
737
738 HitTestResult hovered_node = HitTestResult(); 737 HitTestResult hovered_node = HitTestResult();
739 WebInputEventResult result = 738 WebInputEventResult result =
740 HandleMouseMoveOrLeaveEvent(event, coalesced_events, &hovered_node); 739 HandleMouseMoveOrLeaveEvent(event, coalesced_events, &hovered_node);
741 740
742 Page* page = frame_->GetPage(); 741 Page* page = frame_->GetPage();
743 if (!page) 742 if (!page)
744 return result; 743 return result;
745 744
746 if (PaintLayer* layer = 745 if (PaintLayer* layer =
747 EventHandlingUtil::LayerForNode(hovered_node.InnerNode())) { 746 EventHandlingUtil::LayerForNode(hovered_node.InnerNode())) {
(...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1889 1888
1890 // TODO(https://crbug.com/668758): Use a normal BeginFrame update for this. 1889 // TODO(https://crbug.com/668758): Use a normal BeginFrame update for this.
1891 if (!cursor_update_timer_.IsActive()) 1890 if (!cursor_update_timer_.IsActive())
1892 cursor_update_timer_.StartOneShot(kCursorUpdateInterval, BLINK_FROM_HERE); 1891 cursor_update_timer_.StartOneShot(kCursorUpdateInterval, BLINK_FROM_HERE);
1893 } 1892 }
1894 1893
1895 bool EventHandler::CursorUpdatePending() { 1894 bool EventHandler::CursorUpdatePending() {
1896 return cursor_update_timer_.IsActive(); 1895 return cursor_update_timer_.IsActive();
1897 } 1896 }
1898 1897
1899 void EventHandler::DispatchFakeMouseMoveEventSoon() { 1898 bool EventHandler::FakeMouseMovePending() const {
1900 mouse_event_manager_->DispatchFakeMouseMoveEventSoon(); 1899 return mouse_event_manager_->FakeMouseMovePending();
1900 }
1901
1902 void EventHandler::DispatchFakeMouseMoveEventSoon(
1903 MouseEventManager::FakeMouseMoveReason fake_mouse_move_reason) {
1904 mouse_event_manager_->DispatchFakeMouseMoveEventSoon(fake_mouse_move_reason);
1901 } 1905 }
1902 1906
1903 void EventHandler::DispatchFakeMouseMoveEventSoonInQuad(const FloatQuad& quad) { 1907 void EventHandler::DispatchFakeMouseMoveEventSoonInQuad(const FloatQuad& quad) {
1904 mouse_event_manager_->DispatchFakeMouseMoveEventSoonInQuad(quad); 1908 mouse_event_manager_->DispatchFakeMouseMoveEventSoonInQuad(quad);
1905 } 1909 }
1906 1910
1907 void EventHandler::SetResizingFrameSet(HTMLFrameSetElement* frame_set) { 1911 void EventHandler::SetResizingFrameSet(HTMLFrameSetElement* frame_set) {
1908 frame_set_being_resized_ = frame_set; 1912 frame_set_being_resized_ = frame_set;
1909 } 1913 }
1910 1914
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
2096 MouseEventWithHitTestResults& mev, 2100 MouseEventWithHitTestResults& mev,
2097 LocalFrame* subframe) { 2101 LocalFrame* subframe) {
2098 WebInputEventResult result = 2102 WebInputEventResult result =
2099 subframe->GetEventHandler().HandleMouseReleaseEvent(mev.Event()); 2103 subframe->GetEventHandler().HandleMouseReleaseEvent(mev.Event());
2100 if (result != WebInputEventResult::kNotHandled) 2104 if (result != WebInputEventResult::kNotHandled)
2101 return result; 2105 return result;
2102 return WebInputEventResult::kHandledSystem; 2106 return WebInputEventResult::kHandledSystem;
2103 } 2107 }
2104 2108
2105 } // namespace blink 2109 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.h ('k') | third_party/WebKit/Source/core/input/MouseEventManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698