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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp

Issue 2502413004: WTF/std normalization: replace WTF::Vector::last with ::back (Closed)
Patch Set: rebase Created 4 years, 1 month 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) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 childLayer->setParent(this); 231 childLayer->setParent(this);
232 232
233 if (!found) 233 if (!found)
234 m_children.append(childLayer); 234 m_children.append(childLayer);
235 235
236 updateChildList(); 236 updateChildList();
237 } 237 }
238 238
239 void GraphicsLayer::removeAllChildren() { 239 void GraphicsLayer::removeAllChildren() {
240 while (!m_children.isEmpty()) { 240 while (!m_children.isEmpty()) {
241 GraphicsLayer* curLayer = m_children.last(); 241 GraphicsLayer* curLayer = m_children.back();
242 ASSERT(curLayer->parent()); 242 ASSERT(curLayer->parent());
243 curLayer->removeFromParent(); 243 curLayer->removeFromParent();
244 } 244 }
245 } 245 }
246 246
247 void GraphicsLayer::removeFromParent() { 247 void GraphicsLayer::removeFromParent() {
248 if (m_parent) { 248 if (m_parent) {
249 // We use reverseFind so that removeAllChildren() isn't n^2. 249 // We use reverseFind so that removeAllChildren() isn't n^2.
250 m_parent->m_children.remove(m_parent->m_children.reverseFind(this)); 250 m_parent->m_children.remove(m_parent->m_children.reverseFind(this));
251 setParent(0); 251 setParent(0);
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
1308 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) { 1308 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) {
1309 if (!layer) { 1309 if (!layer) {
1310 LOG(INFO) << "Cannot showGraphicsLayerTree for (nil)."; 1310 LOG(INFO) << "Cannot showGraphicsLayerTree for (nil).";
1311 return; 1311 return;
1312 } 1312 }
1313 1313
1314 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); 1314 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo);
1315 LOG(INFO) << output.utf8().data(); 1315 LOG(INFO) << output.utf8().data();
1316 } 1316 }
1317 #endif 1317 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698