#ifndef HitTestRequest_h
#define HitTestRequest_h
namespace WebCore {
class HitTestRequest {
public:
enum RequestType {
ReadOnly = 1 << 1,
Active = 1 << 2,
Move = 1 << 3,
Release = 1 << 4,
IgnoreClipping = 1 << 5,
SVGClipContent = 1 << 6,
TouchEvent = 1 << 7,
ConfusingAndOftenMisusedDisallowShadowContent = 1 << 8,
AllowFrameScrollbars = 1 << 9,
AllowChildFrameContent = 1 << 10,
ChildFrameHitTest = 1 << 11,
IgnorePointerEventsNone = 1 << 12,
TouchAction = 1 << 13,
};
typedef unsigned HitTestRequestType;
HitTestRequest(HitTestRequestType requestType)
: m_requestType(requestType)
{
}
bool readOnly() const { return m_requestType & ReadOnly; }
bool active() const { return m_requestType & Active; }
bool move() const { return m_requestType & Move; }
bool release() const { return m_requestType & Release; }
bool ignoreClipping() const { return m_requestType & IgnoreClipping; }
bool svgClipContent() const { return m_requestType & SVGClipContent; }
bool touchEvent() const { return m_requestType & TouchEvent; }
bool mouseEvent() const { return !touchEvent(); }
bool disallowsShadowContent() const { return m_requestType & ConfusingAndOftenMisusedDisallowShadowContent; }
bool allowsFrameScrollbars() const { return m_requestType & AllowFrameScrollbars; }
bool allowsChildFrameContent() const { return m_requestType & AllowChildFrameContent; }
bool isChildFrameHitTest() const { return m_requestType & ChildFrameHitTest; }
bool ignorePointerEventsNone() const { return m_requestType & IgnorePointerEventsNone; }
bool touchAction() const { return m_requestType & TouchAction; }
bool touchMove() const { return move() && touchEvent(); }
bool touchRelease() const { return release() && touchEvent(); }
HitTestRequestType type() const { return m_requestType; }
private:
HitTestRequestType m_requestType;
};
}
#endif