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

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

Issue 527263002: Clean-up hit-testing of scrollbars (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix scrollbar-ticks-hittest test Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/page/EventHandler.cpp ('k') | Source/core/rendering/RenderPart.cpp » ('j') | 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 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 17 matching lines...) Expand all
28 class HitTestRequest { 28 class HitTestRequest {
29 public: 29 public:
30 enum RequestType { 30 enum RequestType {
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 AllowFrameScrollbars = 1 << 8, 38 AllowChildFrameContent = 1 << 8,
39 AllowChildFrameContent = 1 << 9, 39 ChildFrameHitTest = 1 << 9,
40 ChildFrameHitTest = 1 << 10, 40 IgnorePointerEventsNone = 1 << 10,
41 IgnorePointerEventsNone = 1 << 11,
42 }; 41 };
43 42
44 typedef unsigned HitTestRequestType; 43 typedef unsigned HitTestRequestType;
45 44
46 HitTestRequest(HitTestRequestType requestType) 45 HitTestRequest(HitTestRequestType requestType)
47 : m_requestType(requestType) 46 : m_requestType(requestType)
48 { 47 {
49 } 48 }
50 49
51 bool readOnly() const { return m_requestType & ReadOnly; } 50 bool readOnly() const { return m_requestType & ReadOnly; }
52 bool active() const { return m_requestType & Active; } 51 bool active() const { return m_requestType & Active; }
53 bool move() const { return m_requestType & Move; } 52 bool move() const { return m_requestType & Move; }
54 bool release() const { return m_requestType & Release; } 53 bool release() const { return m_requestType & Release; }
55 bool ignoreClipping() const { return m_requestType & IgnoreClipping; } 54 bool ignoreClipping() const { return m_requestType & IgnoreClipping; }
56 bool svgClipContent() const { return m_requestType & SVGClipContent; } 55 bool svgClipContent() const { return m_requestType & SVGClipContent; }
57 bool touchEvent() const { return m_requestType & TouchEvent; } 56 bool touchEvent() const { return m_requestType & TouchEvent; }
58 bool mouseEvent() const { return !touchEvent(); } 57 bool mouseEvent() const { return !touchEvent(); }
59 bool allowsFrameScrollbars() const { return m_requestType & AllowFrameScroll bars; }
60 bool allowsChildFrameContent() const { return m_requestType & AllowChildFram eContent; } 58 bool allowsChildFrameContent() const { return m_requestType & AllowChildFram eContent; }
61 bool isChildFrameHitTest() const { return m_requestType & ChildFrameHitTest; } 59 bool isChildFrameHitTest() const { return m_requestType & ChildFrameHitTest; }
62 bool ignorePointerEventsNone() const { return m_requestType & IgnorePointerE ventsNone; } 60 bool ignorePointerEventsNone() const { return m_requestType & IgnorePointerE ventsNone; }
63 61
64 // Convenience functions 62 // Convenience functions
65 bool touchMove() const { return move() && touchEvent(); } 63 bool touchMove() const { return move() && touchEvent(); }
66 bool touchRelease() const { return release() && touchEvent(); } 64 bool touchRelease() const { return release() && touchEvent(); }
67 65
68 HitTestRequestType type() const { return m_requestType; } 66 HitTestRequestType type() const { return m_requestType; }
69 67
70 private: 68 private:
71 HitTestRequestType m_requestType; 69 HitTestRequestType m_requestType;
72 }; 70 };
73 71
74 } // namespace blink 72 } // namespace blink
75 73
76 #endif // HitTestRequest_h 74 #endif // HitTestRequest_h
OLDNEW
« no previous file with comments | « Source/core/page/EventHandler.cpp ('k') | Source/core/rendering/RenderPart.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698