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

Side by Side Diff: Source/core/page/EventHandler.cpp

Issue 141733006: Move focus management API from HTMLDocument to Document (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add extra prototype check Created 6 years, 11 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
« no previous file with comments | « Source/core/html/HTMLDocument.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 2280 matching lines...) Expand 10 before | Expand all | Expand 10 after
2291 2291
2292 HitTestRequest::HitTestRequestType hitType = HitTestRequest::TouchEvent; 2292 HitTestRequest::HitTestRequestType hitType = HitTestRequest::TouchEvent;
2293 double activeInterval = 0; 2293 double activeInterval = 0;
2294 bool shouldKeepActiveForMinInterval = false; 2294 bool shouldKeepActiveForMinInterval = false;
2295 if (gestureEvent.type() == PlatformEvent::GestureShowPress 2295 if (gestureEvent.type() == PlatformEvent::GestureShowPress
2296 || gestureEvent.type() == PlatformEvent::GestureTapUnconfirmed) { 2296 || gestureEvent.type() == PlatformEvent::GestureTapUnconfirmed) {
2297 hitType |= HitTestRequest::Active; 2297 hitType |= HitTestRequest::Active;
2298 } else if (gestureEvent.type() == PlatformEvent::GestureTapDownCancel) { 2298 } else if (gestureEvent.type() == PlatformEvent::GestureTapDownCancel) {
2299 hitType |= HitTestRequest::Release; 2299 hitType |= HitTestRequest::Release;
2300 // A TapDownCancel received when no element is active shouldn't really b e changing hover state. 2300 // A TapDownCancel received when no element is active shouldn't really b e changing hover state.
2301 if (!m_frame->document()->activeElement()) 2301 if (!m_frame->document()->activeHoverElement())
2302 hitType |= HitTestRequest::ReadOnly; 2302 hitType |= HitTestRequest::ReadOnly;
2303 } else if (gestureEvent.type() == PlatformEvent::GestureTap) { 2303 } else if (gestureEvent.type() == PlatformEvent::GestureTap) {
2304 hitType |= HitTestRequest::Release; 2304 hitType |= HitTestRequest::Release;
2305 // If the Tap is received very shortly after ShowPress, we want to delay clearing 2305 // If the Tap is received very shortly after ShowPress, we want to delay clearing
2306 // of the active state so that it's visible to the user for at least one frame. 2306 // of the active state so that it's visible to the user for at least one frame.
2307 activeInterval = WTF::currentTime() - m_lastShowPressTimestamp; 2307 activeInterval = WTF::currentTime() - m_lastShowPressTimestamp;
2308 shouldKeepActiveForMinInterval = m_lastShowPressTimestamp && activeInter val < minimumActiveInterval; 2308 shouldKeepActiveForMinInterval = m_lastShowPressTimestamp && activeInter val < minimumActiveInterval;
2309 if (shouldKeepActiveForMinInterval) 2309 if (shouldKeepActiveForMinInterval)
2310 hitType |= HitTestRequest::ReadOnly; 2310 hitType |= HitTestRequest::ReadOnly;
2311 } 2311 }
(...skipping 1712 matching lines...) Expand 10 before | Expand all | Expand 10 after
4024 unsigned EventHandler::accessKeyModifiers() 4024 unsigned EventHandler::accessKeyModifiers()
4025 { 4025 {
4026 #if OS(MACOSX) 4026 #if OS(MACOSX)
4027 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 4027 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
4028 #else 4028 #else
4029 return PlatformEvent::AltKey; 4029 return PlatformEvent::AltKey;
4030 #endif 4030 #endif
4031 } 4031 }
4032 4032
4033 } // namespace WebCore 4033 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLDocument.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698