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

Side by Side Diff: Source/core/rendering/HitTestRequest.h

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 Apple Computer, Inc. 2 * Copyright (C) 2006 Apple Computer, Inc.
3 * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 3 * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
4 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) 4 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 20 matching lines...) Expand all
31 ReadOnly = 1 << 1, 31 ReadOnly = 1 << 1,
32 Active = 1 << 2, 32 Active = 1 << 2,
33 Move = 1 << 3, 33 Move = 1 << 3,
34 Release = 1 << 4, 34 Release = 1 << 4,
35 IgnoreClipping = 1 << 5, 35 IgnoreClipping = 1 << 5,
36 SVGClipContent = 1 << 6, 36 SVGClipContent = 1 << 6,
37 TouchEvent = 1 << 7, 37 TouchEvent = 1 << 7,
38 AllowChildFrameContent = 1 << 8, 38 AllowChildFrameContent = 1 << 8,
39 ChildFrameHitTest = 1 << 9, 39 ChildFrameHitTest = 1 << 9,
40 IgnorePointerEventsNone = 1 << 10, 40 IgnorePointerEventsNone = 1 << 10,
41 Hover = 1 << 11,
Rick Byers 2014/11/17 22:00:10 It's a little confusing to explicitly opt-in to ho
41 }; 42 };
42 43
43 typedef unsigned HitTestRequestType; 44 typedef unsigned HitTestRequestType;
44 45
45 HitTestRequest(HitTestRequestType requestType) 46 HitTestRequest(HitTestRequestType requestType)
46 : m_requestType(requestType) 47 : m_requestType(requestType)
47 { 48 {
48 } 49 }
49 50
50 bool readOnly() const { return m_requestType & ReadOnly; } 51 bool readOnly() const { return m_requestType & ReadOnly; }
51 bool active() const { return m_requestType & Active; } 52 bool active() const { return m_requestType & Active; }
52 bool move() const { return m_requestType & Move; } 53 bool move() const { return m_requestType & Move; }
53 bool release() const { return m_requestType & Release; } 54 bool release() const { return m_requestType & Release; }
54 bool ignoreClipping() const { return m_requestType & IgnoreClipping; } 55 bool ignoreClipping() const { return m_requestType & IgnoreClipping; }
55 bool svgClipContent() const { return m_requestType & SVGClipContent; } 56 bool svgClipContent() const { return m_requestType & SVGClipContent; }
56 bool touchEvent() const { return m_requestType & TouchEvent; } 57 bool touchEvent() const { return m_requestType & TouchEvent; }
57 bool allowsChildFrameContent() const { return m_requestType & AllowChildFram eContent; } 58 bool allowsChildFrameContent() const { return m_requestType & AllowChildFram eContent; }
58 bool isChildFrameHitTest() const { return m_requestType & ChildFrameHitTest; } 59 bool isChildFrameHitTest() const { return m_requestType & ChildFrameHitTest; }
59 bool ignorePointerEventsNone() const { return m_requestType & IgnorePointerE ventsNone; } 60 bool ignorePointerEventsNone() const { return m_requestType & IgnorePointerE ventsNone; }
61 bool hover() const { return m_requestType & Hover; }
60 62
61 // Convenience functions 63 // Convenience functions
62 bool touchMove() const { return move() && touchEvent(); } 64 bool touchMove() const { return move() && touchEvent(); }
63 65
64 HitTestRequestType type() const { return m_requestType; } 66 HitTestRequestType type() const { return m_requestType; }
65 67
66 private: 68 private:
67 HitTestRequestType m_requestType; 69 HitTestRequestType m_requestType;
68 }; 70 };
69 71
70 } // namespace blink 72 } // namespace blink
71 73
72 #endif // HitTestRequest_h 74 #endif // HitTestRequest_h
OLDNEW
« Source/core/page/EventHandler.cpp ('K') | « Source/core/page/EventHandler.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698