| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 bool listBased() const { return m_requestType & ListBased; } | 76 bool listBased() const { return m_requestType & ListBased; } |
| 77 bool penetratingList() const { return m_requestType & PenetratingList; } | 77 bool penetratingList() const { return m_requestType & PenetratingList; } |
| 78 bool avoidCache() const { return m_requestType & AvoidCache; } | 78 bool avoidCache() const { return m_requestType & AvoidCache; } |
| 79 | 79 |
| 80 // Convenience functions | 80 // Convenience functions |
| 81 bool touchMove() const { return move() && touchEvent(); } | 81 bool touchMove() const { return move() && touchEvent(); } |
| 82 | 82 |
| 83 HitTestRequestType type() const { return m_requestType; } | 83 HitTestRequestType type() const { return m_requestType; } |
| 84 | 84 |
| 85 // The Cacheability bits don't affect hit testing computation. | 85 // The Cacheability bits don't affect hit testing computation. |
| 86 // TODO(dtapuska): These bits really shouldn't be fields on the HitTestRequest
as | 86 // TODO(dtapuska): These bits really shouldn't be fields on the HitTestRequest |
| 87 // they don't influence the result; but rather are hints on the output as to w
hat to do. | 87 // as they don't influence the result; but rather are hints on the output as |
| 88 // Perhaps move these fields to another enum ? | 88 // to what to do. Perhaps move these fields to another enum? |
| 89 static const HitTestRequestType CacheabilityBits = | 89 static const HitTestRequestType CacheabilityBits = |
| 90 ReadOnly | Active | Move | Release | TouchEvent; | 90 ReadOnly | Active | Move | Release | TouchEvent; |
| 91 bool equalForCacheability(const HitTestRequest& value) const { | 91 bool equalForCacheability(const HitTestRequest& value) const { |
| 92 return (m_requestType | CacheabilityBits) == | 92 return (m_requestType | CacheabilityBits) == |
| 93 (value.m_requestType | CacheabilityBits); | 93 (value.m_requestType | CacheabilityBits); |
| 94 } | 94 } |
| 95 | 95 |
| 96 private: | 96 private: |
| 97 HitTestRequestType m_requestType; | 97 HitTestRequestType m_requestType; |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 } // namespace blink | 100 } // namespace blink |
| 101 | 101 |
| 102 #endif // HitTestRequest_h | 102 #endif // HitTestRequest_h |
| OLD | NEW |