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

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

Issue 724673003: Don't make :hover sticky on tap on sites that set a mobile viewport set (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Don't make :hover sticky on tap on sites that set a mobile viewport set Created 6 years, 1 month 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 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 2645 matching lines...) Expand 10 before | Expand all | Expand 10 after
2656 { 2656 {
2657 HitTestRequest::HitTestRequestType hitType = HitTestRequest::TouchEvent; 2657 HitTestRequest::HitTestRequestType hitType = HitTestRequest::TouchEvent;
2658 switch (type) { 2658 switch (type) {
2659 case PlatformEvent::GestureShowPress: 2659 case PlatformEvent::GestureShowPress:
2660 case PlatformEvent::GestureTapUnconfirmed: 2660 case PlatformEvent::GestureTapUnconfirmed:
2661 return hitType | HitTestRequest::Active; 2661 return hitType | HitTestRequest::Active;
2662 case PlatformEvent::GestureTapDownCancel: 2662 case PlatformEvent::GestureTapDownCancel:
2663 // A TapDownCancel received when no element is active shouldn't really b e changing hover state. 2663 // A TapDownCancel received when no element is active shouldn't really b e changing hover state.
2664 if (!m_frame->document()->activeHoverElement()) 2664 if (!m_frame->document()->activeHoverElement())
2665 hitType |= HitTestRequest::ReadOnly; 2665 hitType |= HitTestRequest::ReadOnly;
2666 return hitType | HitTestRequest::Release; 2666 // allow :hover style to be sticky after long press
2667 return hitType | HitTestRequest::Release | HitTestRequest::Hover;
USE s.singapati at gmail.com 2014/11/13 10:30:57 Retained "Release" flag to not break any other tha
2667 case PlatformEvent::GestureTap: 2668 case PlatformEvent::GestureTap:
2668 return hitType | HitTestRequest::Release; 2669 return hitType | HitTestRequest::Release;
2669 case PlatformEvent::GestureTapDown: 2670 case PlatformEvent::GestureTapDown:
2670 case PlatformEvent::GestureLongPress: 2671 case PlatformEvent::GestureLongPress:
2671 case PlatformEvent::GestureLongTap: 2672 case PlatformEvent::GestureLongTap:
2672 case PlatformEvent::GestureTwoFingerTap: 2673 case PlatformEvent::GestureTwoFingerTap:
2673 // FIXME: Shouldn't LongTap and TwoFingerTap clear the Active state? 2674 // FIXME: Shouldn't LongTap and TwoFingerTap clear the Active state?
2674 return hitType | HitTestRequest::Active | HitTestRequest::ReadOnly; 2675 return hitType | HitTestRequest::Active | HitTestRequest::ReadOnly;
2675 default: 2676 default:
2676 ASSERT_NOT_REACHED(); 2677 ASSERT_NOT_REACHED();
(...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after
3871 unsigned EventHandler::accessKeyModifiers() 3872 unsigned EventHandler::accessKeyModifiers()
3872 { 3873 {
3873 #if OS(MACOSX) 3874 #if OS(MACOSX)
3874 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 3875 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
3875 #else 3876 #else
3876 return PlatformEvent::AltKey; 3877 return PlatformEvent::AltKey;
3877 #endif 3878 #endif
3878 } 3879 }
3879 3880
3880 } // namespace blink 3881 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698