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

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

Issue 1142283004: Implement a Hit Test Cache. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 bool isChildFrameHitTest() const { return m_requestType & ChildFrameHitTest; } 68 bool isChildFrameHitTest() const { return m_requestType & ChildFrameHitTest; }
69 bool ignorePointerEventsNone() const { return m_requestType & IgnorePointerE ventsNone; } 69 bool ignorePointerEventsNone() const { return m_requestType & IgnorePointerE ventsNone; }
70 bool listBased() const { return m_requestType & ListBased; } 70 bool listBased() const { return m_requestType & ListBased; }
71 bool penetratingList() const { return m_requestType & PenetratingList; } 71 bool penetratingList() const { return m_requestType & PenetratingList; }
72 72
73 // Convenience functions 73 // Convenience functions
74 bool touchMove() const { return move() && touchEvent(); } 74 bool touchMove() const { return move() && touchEvent(); }
75 75
76 HitTestRequestType type() const { return m_requestType; } 76 HitTestRequestType type() const { return m_requestType; }
77 77
78 static const HitTestRequestType CacheabilityBits = ReadOnly | Active | Move | Release | TouchEvent;
79 bool equalForCacheability(const HitTestRequest& value) const
80 {
81 return (m_requestType | CacheabilityBits) == (value.m_requestType | Cach eabilityBits);
82 }
83
78 private: 84 private:
79 HitTestRequestType m_requestType; 85 HitTestRequestType m_requestType;
80 }; 86 };
81 87
82 } // namespace blink 88 } // namespace blink
83 89
84 #endif // HitTestRequest_h 90 #endif // HitTestRequest_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698