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

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

Issue 2610253004: Migrate WTF::Vector::append() to ::push_back() [part 9 of N] (Closed)
Patch Set: rebase Created 3 years, 11 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) 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
3 * (C) 2008 Torch Mobile Inc. All rights reserved. 3 * (C) 2008 Torch Mobile Inc. All rights reserved.
4 * (http://www.torchmobile.com/) 4 * (http://www.torchmobile.com/)
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 308
309 m_minPreferredLogicalWidth += toAdd; 309 m_minPreferredLogicalWidth += toAdd;
310 m_maxPreferredLogicalWidth += toAdd; 310 m_maxPreferredLogicalWidth += toAdd;
311 311
312 clearPreferredLogicalWidthsDirty(); 312 clearPreferredLogicalWidthsDirty();
313 } 313 }
314 314
315 void LayoutTextControl::addOutlineRects(Vector<LayoutRect>& rects, 315 void LayoutTextControl::addOutlineRects(Vector<LayoutRect>& rects,
316 const LayoutPoint& additionalOffset, 316 const LayoutPoint& additionalOffset,
317 IncludeBlockVisualOverflowOrNot) const { 317 IncludeBlockVisualOverflowOrNot) const {
318 rects.append(LayoutRect(additionalOffset, size())); 318 rects.push_back(LayoutRect(additionalOffset, size()));
319 } 319 }
320 320
321 LayoutObject* LayoutTextControl::layoutSpecialExcludedChild( 321 LayoutObject* LayoutTextControl::layoutSpecialExcludedChild(
322 bool relayoutChildren, 322 bool relayoutChildren,
323 SubtreeLayoutScope& layoutScope) { 323 SubtreeLayoutScope& layoutScope) {
324 HTMLElement* placeholder = toTextControlElement(node())->placeholderElement(); 324 HTMLElement* placeholder = toTextControlElement(node())->placeholderElement();
325 LayoutObject* placeholderLayoutObject = 325 LayoutObject* placeholderLayoutObject =
326 placeholder ? placeholder->layoutObject() : nullptr; 326 placeholder ? placeholder->layoutObject() : nullptr;
327 if (!placeholderLayoutObject) 327 if (!placeholderLayoutObject)
328 return nullptr; 328 return nullptr;
(...skipping 24 matching lines...) Expand all
353 LayoutUnit baseline(fontData->getFontMetrics().ascent(AlphabeticBaseline)); 353 LayoutUnit baseline(fontData->getFontMetrics().ascent(AlphabeticBaseline));
354 for (LayoutObject* box = innerEditorLayoutObject; box && box != this; 354 for (LayoutObject* box = innerEditorLayoutObject; box && box != this;
355 box = box->parent()) { 355 box = box->parent()) {
356 if (box->isBox()) 356 if (box->isBox())
357 baseline += toLayoutBox(box)->logicalTop(); 357 baseline += toLayoutBox(box)->logicalTop();
358 } 358 }
359 return baseline.toInt(); 359 return baseline.toInt();
360 } 360 }
361 361
362 } // namespace blink 362 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutText.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698