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

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

Issue 2459003003: WTF/std normalization: replace WTF::Vector::removeLast with ::pop_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) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 ASSERT(m_mapping.size()); 306 ASSERT(m_mapping.size());
307 307
308 bool mightBeSaturated = false; 308 bool mightBeSaturated = false;
309 while (m_mapping.size() && 309 while (m_mapping.size() &&
310 m_mapping.last().m_layoutObject != ancestorLayoutObject) { 310 m_mapping.last().m_layoutObject != ancestorLayoutObject) {
311 mightBeSaturated = 311 mightBeSaturated =
312 mightBeSaturated || m_accumulatedOffset.width().mightBeSaturated(); 312 mightBeSaturated || m_accumulatedOffset.width().mightBeSaturated();
313 mightBeSaturated = 313 mightBeSaturated =
314 mightBeSaturated || m_accumulatedOffset.height().mightBeSaturated(); 314 mightBeSaturated || m_accumulatedOffset.height().mightBeSaturated();
315 stepRemoved(m_mapping.last()); 315 stepRemoved(m_mapping.last());
316 m_mapping.removeLast(); 316 m_mapping.pop_back();
317 } 317 }
318 if (UNLIKELY(mightBeSaturated)) { 318 if (UNLIKELY(mightBeSaturated)) {
319 m_accumulatedOffset = LayoutSize(); 319 m_accumulatedOffset = LayoutSize();
320 for (const auto& step : m_mapping) 320 for (const auto& step : m_mapping)
321 m_accumulatedOffset += step.m_offset; 321 m_accumulatedOffset += step.m_offset;
322 } 322 }
323 } 323 }
324 324
325 void LayoutGeometryMap::popMappingsToAncestor(const PaintLayer* ancestorLayer) { 325 void LayoutGeometryMap::popMappingsToAncestor(const PaintLayer* ancestorLayer) {
326 const LayoutBoxModelObject* ancestorLayoutObject = 326 const LayoutBoxModelObject* ancestorLayoutObject =
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 // If we're not working with multiple LayoutViews, then any view is considered 369 // If we're not working with multiple LayoutViews, then any view is considered
370 // "topmost" (to preserve original behavior). 370 // "topmost" (to preserve original behavior).
371 if (!(m_mapCoordinatesFlags & TraverseDocumentBoundaries)) 371 if (!(m_mapCoordinatesFlags & TraverseDocumentBoundaries))
372 return true; 372 return true;
373 373
374 return layoutObject->frame()->isMainFrame(); 374 return layoutObject->frame()->isMainFrame();
375 } 375 }
376 #endif 376 #endif
377 377
378 } // namespace blink 378 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/BidiRunForLine.cpp ('k') | third_party/WebKit/Source/core/layout/TextAutosizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698