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

Unified Diff: third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp

Issue 2673543003: Migrate WTF::HashMap::remove() to ::erase() (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
diff --git a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
index b566d57efae8cf1c6442700c188c39af9662c424..2fee5266d5d7b896643240e3648e48060ed1c585 100644
--- a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
+++ b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
@@ -30,7 +30,7 @@ static void setPreviousSelectionVisualRect(const LayoutObject& object,
selectionVisualRectMap().contains(&object));
if (rect.isEmpty()) {
if (object.hasPreviousSelectionVisualRect()) {
- selectionVisualRectMap().remove(&object);
+ selectionVisualRectMap().erase(&object);
object.getMutableForPainting().setHasPreviousSelectionVisualRect(false);
}
} else {
@@ -49,12 +49,12 @@ void ObjectPaintInvalidator::objectWillBeDestroyed(const LayoutObject& object) {
DCHECK(object.hasPreviousSelectionVisualRect() ==
selectionVisualRectMap().contains(&object));
if (object.hasPreviousSelectionVisualRect())
- selectionVisualRectMap().remove(&object);
+ selectionVisualRectMap().erase(&object);
DCHECK(object.hasPreviousLocationInBacking() ==
locationInBackingMap().contains(&object));
if (object.hasPreviousLocationInBacking())
- locationInBackingMap().remove(&object);
+ locationInBackingMap().erase(&object);
}
using LayoutObjectTraversalFunctor = std::function<void(const LayoutObject&)>;
@@ -431,7 +431,7 @@ void ObjectPaintInvalidator::setPreviousLocationInBacking(
locationInBackingMap().contains(&m_object));
if (location == m_object.previousVisualRect().location()) {
if (m_object.hasPreviousLocationInBacking()) {
- locationInBackingMap().remove(&m_object);
+ locationInBackingMap().erase(&m_object);
m_object.getMutableForPainting().setHasPreviousLocationInBacking(false);
}
} else {
« no previous file with comments | « third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp ('k') | third_party/WebKit/Source/core/svg/SVGElementProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698