OLD | NEW |
---|---|
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 22 matching lines...) Expand all Loading... | |
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 // Deprecated. Instead of this, callers should call HitTestResult::setTo NodesInDocumentTreeScope() explicitly. | 38 // Deprecated. Instead of this, callers should call HitTestResult::setTo NodesInDocumentTreeScope() explicitly. |
39 ConfusingAndOftenMisusedDisallowShadowContent = 1 << 8, | 39 ConfusingAndOftenMisusedDisallowShadowContent = 1 << 8, |
40 AllowFrameScrollbars = 1 << 9, | 40 AllowFrameScrollbars = 1 << 9, |
41 AllowChildFrameContent = 1 << 10, | 41 AllowChildFrameContent = 1 << 10, |
42 ChildFrameHitTest = 1 << 11, | 42 ChildFrameHitTest = 1 << 11, |
43 IgnorePointerEventsNone = 1 << 12 | 43 IgnorePointerEventsNone = 1 << 12, |
44 TouchAction = 1 << 13 | |
Rick Byers
2014/01/17 16:12:46
Please add a brief comment describing this: eg. "H
| |
44 }; | 45 }; |
45 | 46 |
46 typedef unsigned HitTestRequestType; | 47 typedef unsigned HitTestRequestType; |
47 | 48 |
48 HitTestRequest(HitTestRequestType requestType) | 49 HitTestRequest(HitTestRequestType requestType) |
49 : m_requestType(requestType) | 50 : m_requestType(requestType) |
50 { | 51 { |
51 } | 52 } |
52 | 53 |
53 bool readOnly() const { return m_requestType & ReadOnly; } | 54 bool readOnly() const { return m_requestType & ReadOnly; } |
54 bool active() const { return m_requestType & Active; } | 55 bool active() const { return m_requestType & Active; } |
55 bool move() const { return m_requestType & Move; } | 56 bool move() const { return m_requestType & Move; } |
56 bool release() const { return m_requestType & Release; } | 57 bool release() const { return m_requestType & Release; } |
57 bool ignoreClipping() const { return m_requestType & IgnoreClipping; } | 58 bool ignoreClipping() const { return m_requestType & IgnoreClipping; } |
58 bool svgClipContent() const { return m_requestType & SVGClipContent; } | 59 bool svgClipContent() const { return m_requestType & SVGClipContent; } |
59 bool touchEvent() const { return m_requestType & TouchEvent; } | 60 bool touchEvent() const { return m_requestType & TouchEvent; } |
60 bool mouseEvent() const { return !touchEvent(); } | 61 bool mouseEvent() const { return !touchEvent(); } |
61 bool disallowsShadowContent() const { return m_requestType & ConfusingAndOft enMisusedDisallowShadowContent; } | 62 bool disallowsShadowContent() const { return m_requestType & ConfusingAndOft enMisusedDisallowShadowContent; } |
62 bool allowsFrameScrollbars() const { return m_requestType & AllowFrameScroll bars; } | 63 bool allowsFrameScrollbars() const { return m_requestType & AllowFrameScroll bars; } |
63 bool allowsChildFrameContent() const { return m_requestType & AllowChildFram eContent; } | 64 bool allowsChildFrameContent() const { return m_requestType & AllowChildFram eContent; } |
64 bool isChildFrameHitTest() const { return m_requestType & ChildFrameHitTest; } | 65 bool isChildFrameHitTest() const { return m_requestType & ChildFrameHitTest; } |
65 bool ignorePointerEventsNone() const { return m_requestType & IgnorePointerE ventsNone; } | 66 bool ignorePointerEventsNone() const { return m_requestType & IgnorePointerE ventsNone; } |
67 bool touchAction() const { return m_requestType & TouchAction; } | |
66 | 68 |
67 // Convenience functions | 69 // Convenience functions |
68 bool touchMove() const { return move() && touchEvent(); } | 70 bool touchMove() const { return move() && touchEvent(); } |
69 bool touchRelease() const { return release() && touchEvent(); } | 71 bool touchRelease() const { return release() && touchEvent(); } |
70 | 72 |
71 HitTestRequestType type() const { return m_requestType; } | 73 HitTestRequestType type() const { return m_requestType; } |
72 | 74 |
73 private: | 75 private: |
74 HitTestRequestType m_requestType; | 76 HitTestRequestType m_requestType; |
75 }; | 77 }; |
76 | 78 |
77 } // namespace WebCore | 79 } // namespace WebCore |
78 | 80 |
79 #endif // HitTestRequest_h | 81 #endif // HitTestRequest_h |
OLD | NEW |