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 #include "config.h" | 5 #include "config.h" |
6 #include "core/html/canvas/HitRegion.h" | 6 #include "core/html/canvas/HitRegion.h" |
7 | 7 |
8 #include "core/dom/AXObjectCache.h" | 8 #include "core/dom/AXObjectCache.h" |
9 #include "core/rendering/RenderBoxModelObject.h" | 9 #include "core/rendering/RenderBoxModelObject.h" |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 bool HitRegion::contains(const FloatPoint& point) const | 51 bool HitRegion::contains(const FloatPoint& point) const |
52 { | 52 { |
53 return m_path.contains(point, m_fillRule); | 53 return m_path.contains(point, m_fillRule); |
54 } | 54 } |
55 | 55 |
56 void HitRegion::removePixels(const Path& clearArea) | 56 void HitRegion::removePixels(const Path& clearArea) |
57 { | 57 { |
58 m_path.subtractPath(clearArea); | 58 m_path.subtractPath(clearArea); |
59 } | 59 } |
60 | 60 |
61 void HitRegion::trace(Visitor* visitor) | 61 DEFINE_TRACE(HitRegion) |
62 { | 62 { |
63 visitor->trace(m_control); | 63 visitor->trace(m_control); |
64 } | 64 } |
65 | 65 |
66 void HitRegionManager::addHitRegion(PassRefPtrWillBeRawPtr<HitRegion> passHitReg
ion) | 66 void HitRegionManager::addHitRegion(PassRefPtrWillBeRawPtr<HitRegion> passHitReg
ion) |
67 { | 67 { |
68 RefPtrWillBeRawPtr<HitRegion> hitRegion = passHitRegion; | 68 RefPtrWillBeRawPtr<HitRegion> hitRegion = passHitRegion; |
69 | 69 |
70 m_hitRegionList.add(hitRegion); | 70 m_hitRegionList.add(hitRegion); |
71 | 71 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 } | 153 } |
154 | 154 |
155 return nullptr; | 155 return nullptr; |
156 } | 156 } |
157 | 157 |
158 unsigned HitRegionManager::getHitRegionsCount() const | 158 unsigned HitRegionManager::getHitRegionsCount() const |
159 { | 159 { |
160 return m_hitRegionList.size(); | 160 return m_hitRegionList.size(); |
161 } | 161 } |
162 | 162 |
163 void HitRegionManager::trace(Visitor* visitor) | 163 DEFINE_TRACE(HitRegionManager) |
164 { | 164 { |
165 #if ENABLE(OILPAN) | 165 #if ENABLE(OILPAN) |
166 visitor->trace(m_hitRegionList); | 166 visitor->trace(m_hitRegionList); |
167 visitor->trace(m_hitRegionIdMap); | 167 visitor->trace(m_hitRegionIdMap); |
168 visitor->trace(m_hitRegionControlMap); | 168 visitor->trace(m_hitRegionControlMap); |
169 #endif | 169 #endif |
170 } | 170 } |
171 | 171 |
172 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(HitRegionManager) | 172 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(HitRegionManager) |
173 | 173 |
174 } // namespace blink | 174 } // namespace blink |
OLD | NEW |