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

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

Issue 2671933002: Migrate WTF::HashMap::add() to ::insert() (Closed)
Patch Set: rebase, add TODOs 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 for (size_t i = 0; 461 for (size_t i = 0;
462 i < sizeof(m_lowestFloatBottomCache) / sizeof(FloatBottomCachedValue); 462 i < sizeof(m_lowestFloatBottomCache) / sizeof(FloatBottomCachedValue);
463 ++i) 463 ++i)
464 m_lowestFloatBottomCache[i].dirty = true; 464 m_lowestFloatBottomCache[i].dirty = true;
465 } 465 }
466 466
467 void FloatingObjects::moveAllToFloatInfoMap(LayoutBoxToFloatInfoMap& map) { 467 void FloatingObjects::moveAllToFloatInfoMap(LayoutBoxToFloatInfoMap& map) {
468 while (!m_set.isEmpty()) { 468 while (!m_set.isEmpty()) {
469 std::unique_ptr<FloatingObject> floatingObject = m_set.takeFirst(); 469 std::unique_ptr<FloatingObject> floatingObject = m_set.takeFirst();
470 LayoutBox* layoutObject = floatingObject->layoutObject(); 470 LayoutBox* layoutObject = floatingObject->layoutObject();
471 map.add(layoutObject, std::move(floatingObject)); 471 map.insert(layoutObject, std::move(floatingObject));
472 } 472 }
473 clear(); 473 clear();
474 } 474 }
475 475
476 inline void FloatingObjects::increaseObjectsCount(FloatingObject::Type type) { 476 inline void FloatingObjects::increaseObjectsCount(FloatingObject::Type type) {
477 if (type == FloatingObject::FloatLeft) 477 if (type == FloatingObject::FloatLeft)
478 m_leftObjectsCount++; 478 m_leftObjectsCount++;
479 else 479 else
480 m_rightObjectsCount++; 480 m_rightObjectsCount++;
481 } 481 }
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 const FloatingObject* floatingObject) { 726 const FloatingObject* floatingObject) {
727 return String::format("%p (%gx%g %gx%g)", floatingObject, 727 return String::format("%p (%gx%g %gx%g)", floatingObject,
728 floatingObject->frameRect().x().toFloat(), 728 floatingObject->frameRect().x().toFloat(),
729 floatingObject->frameRect().y().toFloat(), 729 floatingObject->frameRect().y().toFloat(),
730 floatingObject->frameRect().maxX().toFloat(), 730 floatingObject->frameRect().maxX().toFloat(),
731 floatingObject->frameRect().maxY().toFloat()); 731 floatingObject->frameRect().maxY().toFloat());
732 } 732 }
733 #endif 733 #endif
734 734
735 } // namespace blink 735 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698