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

Side by Side Diff: Source/core/html/canvas/HitRegion.cpp

Issue 343543007: Should call clear() for controls when calling removeAllHitRegions(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698