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

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

Issue 2776203002: Migrate WTF::Vector::remove() to ::erase() (Closed)
Patch Set: rebase, repatch VectorTest Created 3 years, 8 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) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2009 Google Inc. All rights reserved. 8 * Copyright (C) 2009 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 2350 matching lines...) Expand 10 before | Expand all | Expand 10 after
2361 const LayoutBoxModelObject* ancestor, 2361 const LayoutBoxModelObject* ancestor,
2362 const LayoutPoint& preOffset, 2362 const LayoutPoint& preOffset,
2363 const LayoutPoint& postOffset) const { 2363 const LayoutPoint& postOffset) const {
2364 for (size_t i = 0; i < rects.size(); ++i) { 2364 for (size_t i = 0; i < rects.size(); ++i) {
2365 LayoutRect& rect = rects[i]; 2365 LayoutRect& rect = rects[i];
2366 rect.moveBy(preOffset); 2366 rect.moveBy(preOffset);
2367 FloatQuad containerQuad = 2367 FloatQuad containerQuad =
2368 localToAncestorQuad(FloatQuad(FloatRect(rect)), ancestor); 2368 localToAncestorQuad(FloatQuad(FloatRect(rect)), ancestor);
2369 LayoutRect containerRect = LayoutRect(containerQuad.boundingBox()); 2369 LayoutRect containerRect = LayoutRect(containerQuad.boundingBox());
2370 if (containerRect.isEmpty()) { 2370 if (containerRect.isEmpty()) {
2371 rects.remove(i--); 2371 rects.erase(i--);
2372 continue; 2372 continue;
2373 } 2373 }
2374 containerRect.moveBy(postOffset); 2374 containerRect.moveBy(postOffset);
2375 rects[i] = containerRect; 2375 rects[i] = containerRect;
2376 } 2376 }
2377 } 2377 }
2378 2378
2379 TransformationMatrix LayoutObject::localToAncestorTransform( 2379 TransformationMatrix LayoutObject::localToAncestorTransform(
2380 const LayoutBoxModelObject* ancestor, 2380 const LayoutBoxModelObject* ancestor,
2381 MapCoordinatesFlags mode) const { 2381 MapCoordinatesFlags mode) const {
(...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after
3646 const blink::LayoutObject* root = object1; 3646 const blink::LayoutObject* root = object1;
3647 while (root->parent()) 3647 while (root->parent())
3648 root = root->parent(); 3648 root = root->parent();
3649 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3649 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3650 } else { 3650 } else {
3651 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3651 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3652 } 3652 }
3653 } 3653 }
3654 3654
3655 #endif 3655 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698