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

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

Issue 153233002: *** DO NOT LAND *** Remove regions support, keeping a bare minimum to support "region-based"... (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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) 2012 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 20 matching lines...) Expand all
31 #include "wtf/OwnPtr.h" 31 #include "wtf/OwnPtr.h"
32 #include "wtf/RefPtr.h" 32 #include "wtf/RefPtr.h"
33 33
34 namespace WebCore { 34 namespace WebCore {
35 35
36 class Element; 36 class Element;
37 class Frame; 37 class Frame;
38 class Image; 38 class Image;
39 class KURL; 39 class KURL;
40 class Node; 40 class Node;
41 class RenderRegion;
42 class Scrollbar; 41 class Scrollbar;
43 42
44 class HitTestLocation { 43 class HitTestLocation {
45 public: 44 public:
46 45
47 HitTestLocation(); 46 HitTestLocation();
48 HitTestLocation(const LayoutPoint&); 47 HitTestLocation(const LayoutPoint&);
49 HitTestLocation(const FloatPoint&); 48 HitTestLocation(const FloatPoint&);
50 HitTestLocation(const FloatPoint&, const FloatQuad&); 49 HitTestLocation(const FloatPoint&, const FloatQuad&);
51 // Pass non-zero padding values to perform a rect-based hit test. 50 // Pass non-zero padding values to perform a rect-based hit test.
52 HitTestLocation(const LayoutPoint& centerPoint, unsigned topPadding, unsigne d rightPadding, unsigned bottomPadding, unsigned leftPadding); 51 HitTestLocation(const LayoutPoint& centerPoint, unsigned topPadding, unsigne d rightPadding, unsigned bottomPadding, unsigned leftPadding);
53 // Make a copy the HitTestLocation in a new region by applying given offset to internal point and area. 52 HitTestLocation(const HitTestLocation&, const LayoutSize& offset);
54 HitTestLocation(const HitTestLocation&, const LayoutSize& offset, RenderRegi on* = 0);
55 HitTestLocation(const HitTestLocation&); 53 HitTestLocation(const HitTestLocation&);
56 ~HitTestLocation(); 54 ~HitTestLocation();
57 HitTestLocation& operator=(const HitTestLocation&); 55 HitTestLocation& operator=(const HitTestLocation&);
58 56
59 const LayoutPoint& point() const { return m_point; } 57 const LayoutPoint& point() const { return m_point; }
60 IntPoint roundedPoint() const { return roundedIntPoint(m_point); } 58 IntPoint roundedPoint() const { return roundedIntPoint(m_point); }
61 59
62 RenderRegion* region() const { return m_region; }
63
64 // Rect-based hit test related methods. 60 // Rect-based hit test related methods.
65 bool isRectBasedTest() const { return m_isRectBased; } 61 bool isRectBasedTest() const { return m_isRectBased; }
66 bool isRectilinear() const { return m_isRectilinear; } 62 bool isRectilinear() const { return m_isRectilinear; }
67 IntRect boundingBox() const { return m_boundingBox; } 63 IntRect boundingBox() const { return m_boundingBox; }
68 64
69 static IntRect rectForPoint(const LayoutPoint&, unsigned topPadding, unsigne d rightPadding, unsigned bottomPadding, unsigned leftPadding); 65 static IntRect rectForPoint(const LayoutPoint&, unsigned topPadding, unsigne d rightPadding, unsigned bottomPadding, unsigned leftPadding);
70 int topPadding() const { return roundedPoint().y() - m_boundingBox.y(); } 66 int topPadding() const { return roundedPoint().y() - m_boundingBox.y(); }
71 int rightPadding() const { return m_boundingBox.maxX() - roundedPoint().x() - 1; } 67 int rightPadding() const { return m_boundingBox.maxX() - roundedPoint().x() - 1; }
72 int bottomPadding() const { return m_boundingBox.maxY() - roundedPoint().y() - 1; } 68 int bottomPadding() const { return m_boundingBox.maxY() - roundedPoint().y() - 1; }
73 int leftPadding() const { return roundedPoint().x() - m_boundingBox.x(); } 69 int leftPadding() const { return roundedPoint().x() - m_boundingBox.x(); }
(...skipping 10 matching lines...) Expand all
84 bool intersectsRect(const RectType&) const; 80 bool intersectsRect(const RectType&) const;
85 void move(const LayoutSize& offset); 81 void move(const LayoutSize& offset);
86 82
87 // This is cached forms of the more accurate point and area below. 83 // This is cached forms of the more accurate point and area below.
88 LayoutPoint m_point; 84 LayoutPoint m_point;
89 IntRect m_boundingBox; 85 IntRect m_boundingBox;
90 86
91 FloatPoint m_transformedPoint; 87 FloatPoint m_transformedPoint;
92 FloatQuad m_transformedRect; 88 FloatQuad m_transformedRect;
93 89
94 RenderRegion* m_region; // The region we're inside.
95
96 bool m_isRectBased; 90 bool m_isRectBased;
97 bool m_isRectilinear; 91 bool m_isRectilinear;
98 }; 92 };
99 93
100 } // namespace WebCore 94 } // namespace WebCore
101 95
102 #endif // HitTestLocation_h 96 #endif // HitTestLocation_h
OLDNEW
« no previous file with comments | « Source/core/rendering/FlowThreadController.cpp ('k') | Source/core/rendering/HitTestLocation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698