OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef HitRegion_h | 5 #ifndef HitRegion_h |
6 #define HitRegion_h | 6 #define HitRegion_h |
7 | 7 |
8 #include "core/dom/Element.h" | 8 #include "core/dom/Element.h" |
9 #include "modules/canvas2d/HitRegionOptions.h" | 9 #include "modules/canvas2d/HitRegionOptions.h" |
10 #include "platform/graphics/Path.h" | 10 #include "platform/graphics/Path.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 virtual ~HitRegion() { } | 27 virtual ~HitRegion() { } |
28 | 28 |
29 void removePixels(const Path&); | 29 void removePixels(const Path&); |
30 | 30 |
31 bool contains(const FloatPoint&) const; | 31 bool contains(const FloatPoint&) const; |
32 | 32 |
33 const String& id() const { return m_id; } | 33 const String& id() const { return m_id; } |
34 const Path& path() const { return m_path; } | 34 const Path& path() const { return m_path; } |
35 Element* control() const { return m_control.get(); } | 35 Element* control() const { return m_control.get(); } |
36 WindRule fillRule() const { return m_fillRule; } | |
37 | 36 |
38 DECLARE_TRACE(); | 37 DECLARE_TRACE(); |
39 | 38 |
40 private: | 39 private: |
41 HitRegion(const Path&, const HitRegionOptions&); | 40 HitRegion(const Path&, const HitRegionOptions&); |
42 | 41 |
43 String m_id; | 42 String m_id; |
44 RefPtrWillBeMember<Element> m_control; | 43 RefPtrWillBeMember<Element> m_control; |
45 Path m_path; | 44 Path m_path; |
46 WindRule m_fillRule; | 45 WindRule m_fillRule; |
(...skipping 30 matching lines...) Expand all Loading... |
77 typedef WillBeHeapHashMap<RefPtrWillBeMember<Element>, RefPtrWillBeMember<Hi
tRegion>> HitRegionControlMap; | 76 typedef WillBeHeapHashMap<RefPtrWillBeMember<Element>, RefPtrWillBeMember<Hi
tRegion>> HitRegionControlMap; |
78 | 77 |
79 HitRegionList m_hitRegionList; | 78 HitRegionList m_hitRegionList; |
80 HitRegionIdMap m_hitRegionIdMap; | 79 HitRegionIdMap m_hitRegionIdMap; |
81 HitRegionControlMap m_hitRegionControlMap; | 80 HitRegionControlMap m_hitRegionControlMap; |
82 }; | 81 }; |
83 | 82 |
84 } // namespace blink | 83 } // namespace blink |
85 | 84 |
86 #endif | 85 #endif |
OLD | NEW |