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

Unified Diff: Source/core/page/EventHandler.cpp

Issue 14612004: Remove CURSOR_VISIBILITY, it's always off (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix UseCounter Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/page/EventHandler.h ('k') | Source/core/page/UseCounter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/EventHandler.cpp
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index bc8ef3efcc03578034fc843f2dac49f47ecb0032..607ea810888553910b16172beabae952081e0450 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -311,18 +311,12 @@ EventHandler::EventHandler(Frame* frame)
, m_baseEventType(PlatformEvent::NoType)
, m_didStartDrag(false)
, m_didLongPressInvokeContextMenu(false)
-#if ENABLE(CURSOR_VISIBILITY)
- , m_autoHideCursorTimer(this, &EventHandler::autoHideCursorTimerFired)
-#endif
{
}
EventHandler::~EventHandler()
{
ASSERT(!m_fakeMouseMoveEventTimer.isActive());
-#if ENABLE(CURSOR_VISIBILITY)
- ASSERT(!m_autoHideCursorTimer.isActive());
-#endif
}
DragState& EventHandler::dragState()
@@ -335,9 +329,6 @@ void EventHandler::clear()
{
m_hoverTimer.stop();
m_fakeMouseMoveEventTimer.stop();
-#if ENABLE(CURSOR_VISIBILITY)
- cancelAutoHideCursorTimer();
-#endif
m_resizeLayer = 0;
m_nodeUnderMouse = 0;
m_lastNodeUnderMouse = 0;
@@ -1159,14 +1150,6 @@ OptionalCursor EventHandler::selectCursor(const MouseEventWithHitTestResults& ev
bool horizontalText = !style || style->isHorizontalWritingMode();
const Cursor& iBeam = horizontalText ? iBeamCursor() : verticalTextCursor();
-#if ENABLE(CURSOR_VISIBILITY)
- if (style && style->cursorVisibility() == CursorVisibilityAutoHide) {
- UseCounter::count(m_frame->document(), UseCounter::CursorVisibility);
- startAutoHideCursorTimer();
- } else
- cancelAutoHideCursorTimer();
-#endif
-
// During selection, use an I-beam no matter what we're over.
// If a drag may be starting or we're capturing mouse events for a particular node, don't treat this as a selection.
if (m_mousePressed && m_mouseDownMayStartSelect
@@ -1308,39 +1291,6 @@ OptionalCursor EventHandler::selectCursor(const MouseEventWithHitTestResults& ev
return pointerCursor();
}
-#if ENABLE(CURSOR_VISIBILITY)
-static const double timeWithoutMouseMovementBeforeHidingControls = 3;
-
-void EventHandler::startAutoHideCursorTimer()
-{
- Page* page = m_frame->page();
- if (!page)
- return;
-
- m_autoHideCursorTimer.startOneShot(timeWithoutMouseMovementBeforeHidingControls);
-
- // The fake mouse move event screws up the auto-hide feature (by resetting the auto-hide timer)
- // so cancel any pending fake mouse moves.
- if (m_fakeMouseMoveEventTimer.isActive())
- m_fakeMouseMoveEventTimer.stop();
-}
-
-void EventHandler::cancelAutoHideCursorTimer()
-{
- if (m_autoHideCursorTimer.isActive())
- m_autoHideCursorTimer.stop();
-}
-
-void EventHandler::autoHideCursorTimerFired(Timer<EventHandler>* timer)
-{
- ASSERT_UNUSED(timer, timer == &m_autoHideCursorTimer);
- m_currentMouseCursor = noneCursor();
- FrameView* view = m_frame->view();
- if (view && view->isActive())
- view->setCursor(m_currentMouseCursor);
-}
-#endif
-
static LayoutPoint documentPointForWindowPoint(Frame* frame, const IntPoint& windowPoint)
{
FrameView* view = frame->view();
« no previous file with comments | « Source/core/page/EventHandler.h ('k') | Source/core/page/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698