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/accessibility/AXObjectCache.h" | 8 #include "core/accessibility/AXObjectCache.h" |
9 #include "core/rendering/RenderBoxModelObject.h" | 9 #include "core/rendering/RenderBoxModelObject.h" |
10 | 10 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 hitRegion->removePixels(clearArea); | 108 hitRegion->removePixels(clearArea); |
109 if (hitRegion->path().isEmpty()) | 109 if (hitRegion->path().isEmpty()) |
110 removeHitRegion(hitRegion.get()); | 110 removeHitRegion(hitRegion.get()); |
111 } | 111 } |
112 } | 112 } |
113 | 113 |
114 void HitRegionManager::removeAllHitRegions() | 114 void HitRegionManager::removeAllHitRegions() |
115 { | 115 { |
116 m_hitRegionList.clear(); | 116 m_hitRegionList.clear(); |
117 m_hitRegionIdMap.clear(); | 117 m_hitRegionIdMap.clear(); |
| 118 m_hitRegionControlMap.clear(); |
118 } | 119 } |
119 | 120 |
120 HitRegion* HitRegionManager::getHitRegionById(const String& id) const | 121 HitRegion* HitRegionManager::getHitRegionById(const String& id) const |
121 { | 122 { |
122 return m_hitRegionIdMap.get(id); | 123 return m_hitRegionIdMap.get(id); |
123 } | 124 } |
124 | 125 |
125 HitRegion* HitRegionManager::getHitRegionByControl(Element* control) const | 126 HitRegion* HitRegionManager::getHitRegionByControl(Element* control) const |
126 { | 127 { |
127 if (control) | 128 if (control) |
(...skipping 23 matching lines...) Expand all Loading... |
151 void HitRegionManager::trace(Visitor* visitor) | 152 void HitRegionManager::trace(Visitor* visitor) |
152 { | 153 { |
153 visitor->trace(m_hitRegionList); | 154 visitor->trace(m_hitRegionList); |
154 visitor->trace(m_hitRegionIdMap); | 155 visitor->trace(m_hitRegionIdMap); |
155 visitor->trace(m_hitRegionControlMap); | 156 visitor->trace(m_hitRegionControlMap); |
156 } | 157 } |
157 | 158 |
158 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(HitRegionManager) | 159 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(HitRegionManager) |
159 | 160 |
160 } // namespace WebCore | 161 } // namespace WebCore |
OLD | NEW |