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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutScrollbar.cpp

Issue 2673543003: Migrate WTF::HashMap::remove() to ::erase() (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008, 2009 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 } 262 }
263 } 263 }
264 264
265 LayoutScrollbarPart* partLayoutObject = m_parts.get(partType); 265 LayoutScrollbarPart* partLayoutObject = m_parts.get(partType);
266 if (!partLayoutObject && needLayoutObject && m_scrollableArea) { 266 if (!partLayoutObject && needLayoutObject && m_scrollableArea) {
267 partLayoutObject = LayoutScrollbarPart::createAnonymous( 267 partLayoutObject = LayoutScrollbarPart::createAnonymous(
268 &styleSource()->document(), m_scrollableArea, this, partType); 268 &styleSource()->document(), m_scrollableArea, this, partType);
269 m_parts.set(partType, partLayoutObject); 269 m_parts.set(partType, partLayoutObject);
270 setNeedsPaintInvalidation(partType); 270 setNeedsPaintInvalidation(partType);
271 } else if (partLayoutObject && !needLayoutObject) { 271 } else if (partLayoutObject && !needLayoutObject) {
272 m_parts.remove(partType); 272 m_parts.erase(partType);
273 partLayoutObject->destroy(); 273 partLayoutObject->destroy();
274 partLayoutObject = nullptr; 274 partLayoutObject = nullptr;
275 if (!destroy) 275 if (!destroy)
276 setNeedsPaintInvalidation(partType); 276 setNeedsPaintInvalidation(partType);
277 } 277 }
278 278
279 if (partLayoutObject) 279 if (partLayoutObject)
280 partLayoutObject->setStyleWithWritingModeOfParent(std::move(partStyle)); 280 partLayoutObject->setStyleWithWritingModeOfParent(std::move(partStyle));
281 } 281 }
282 282
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 } 381 }
382 382
383 void LayoutScrollbar::invalidateDisplayItemClientsOfScrollbarParts() { 383 void LayoutScrollbar::invalidateDisplayItemClientsOfScrollbarParts() {
384 for (auto& part : m_parts) 384 for (auto& part : m_parts)
385 ObjectPaintInvalidator(*part.value) 385 ObjectPaintInvalidator(*part.value)
386 .invalidateDisplayItemClientsIncludingNonCompositingDescendants( 386 .invalidateDisplayItemClientsIncludingNonCompositingDescendants(
387 PaintInvalidationScroll); 387 PaintInvalidationScroll);
388 } 388 }
389 389
390 } // namespace blink 390 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698