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

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

Issue 2536723007: Removed android scrolling fake mouse moves and device_supports_mouse (Closed)
Patch Set: rebase Created 4 years 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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 updateCursor(); 354 updateCursor();
355 } 355 }
356 356
357 void EventHandler::updateCursor() { 357 void EventHandler::updateCursor() {
358 TRACE_EVENT0("input", "EventHandler::updateCursor"); 358 TRACE_EVENT0("input", "EventHandler::updateCursor");
359 359
360 // We must do a cross-frame hit test because the frame that triggered the 360 // We must do a cross-frame hit test because the frame that triggered the
361 // cursor update could be occluded by a different frame. 361 // cursor update could be occluded by a different frame.
362 ASSERT(m_frame == m_frame->localFrameRoot()); 362 ASSERT(m_frame == m_frame->localFrameRoot());
363 363
364 if (m_mouseEventManager->isMousePositionUnknown())
365 return;
366
367 FrameView* view = m_frame->view(); 364 FrameView* view = m_frame->view();
368 if (!view || !view->shouldSetCursor()) 365 if (!view || !view->shouldSetCursor())
369 return; 366 return;
370 367
371 LayoutViewItem layoutViewItem = view->layoutViewItem(); 368 LayoutViewItem layoutViewItem = view->layoutViewItem();
372 if (layoutViewItem.isNull()) 369 if (layoutViewItem.isNull())
373 return; 370 return;
374 371
375 m_frame->document()->updateStyleAndLayout(); 372 m_frame->document()->updateStyleAndLayout();
376 373
(...skipping 1519 matching lines...) Expand 10 before | Expand all | Expand 10 after
1896 locationInRootFrame, globalPosition, 1893 locationInRootFrame, globalPosition,
1897 WebPointerProperties::Button::NoButton, eventType, /* clickCount */ 0, 1894 WebPointerProperties::Button::NoButton, eventType, /* clickCount */ 0,
1898 PlatformEvent::NoModifiers, PlatformMouseEvent::RealOrIndistinguishable, 1895 PlatformEvent::NoModifiers, PlatformMouseEvent::RealOrIndistinguishable,
1899 TimeTicks::Now(), WebPointerProperties::PointerType::Mouse); 1896 TimeTicks::Now(), WebPointerProperties::PointerType::Mouse);
1900 1897
1901 return sendContextMenuEvent(mouseEvent, overrideTargetElement); 1898 return sendContextMenuEvent(mouseEvent, overrideTargetElement);
1902 } 1899 }
1903 1900
1904 void EventHandler::scheduleHoverStateUpdate() { 1901 void EventHandler::scheduleHoverStateUpdate() {
1905 // TODO(https://crbug.com/668758): Use a normal BeginFrame update for this. 1902 // TODO(https://crbug.com/668758): Use a normal BeginFrame update for this.
1906 if (!m_hoverTimer.isActive()) 1903 if (!m_hoverTimer.isActive() &&
1904 !m_mouseEventManager->isMousePositionUnknown())
1907 m_hoverTimer.startOneShot(0, BLINK_FROM_HERE); 1905 m_hoverTimer.startOneShot(0, BLINK_FROM_HERE);
1908 } 1906 }
1909 1907
1910 void EventHandler::scheduleCursorUpdate() { 1908 void EventHandler::scheduleCursorUpdate() {
1911 // We only want one timer for the page, rather than each frame having it's own 1909 // We only want one timer for the page, rather than each frame having it's own
1912 // timer competing which eachother (since there's only one mouse cursor). 1910 // timer competing which eachother (since there's only one mouse cursor).
1913 ASSERT(m_frame == m_frame->localFrameRoot()); 1911 ASSERT(m_frame == m_frame->localFrameRoot());
1914 1912
1915 // TODO(https://crbug.com/668758): Use a normal BeginFrame update for this. 1913 // TODO(https://crbug.com/668758): Use a normal BeginFrame update for this.
1916 if (!m_cursorUpdateTimer.isActive()) 1914 if (!m_cursorUpdateTimer.isActive())
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
2128 } 2126 }
2129 2127
2130 FrameHost* EventHandler::frameHost() const { 2128 FrameHost* EventHandler::frameHost() const {
2131 if (!m_frame->page()) 2129 if (!m_frame->page())
2132 return nullptr; 2130 return nullptr;
2133 2131
2134 return &m_frame->page()->frameHost(); 2132 return &m_frame->page()->frameHost();
2135 } 2133 }
2136 2134
2137 } // namespace blink 2135 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.h ('k') | third_party/WebKit/Source/core/input/MouseEventManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698