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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutView.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 if (mode & IsFixed) 399 if (mode & IsFixed)
400 transformState.move(offsetForFixedPosition()); 400 transformState.move(offsetForFixedPosition());
401 } 401 }
402 402
403 void LayoutView::computeSelfHitTestRects(Vector<LayoutRect>& rects, 403 void LayoutView::computeSelfHitTestRects(Vector<LayoutRect>& rects,
404 const LayoutPoint&) const { 404 const LayoutPoint&) const {
405 // Record the entire size of the contents of the frame. Note that we don't 405 // Record the entire size of the contents of the frame. Note that we don't
406 // just use the viewport size (containing block) here because we want to 406 // just use the viewport size (containing block) here because we want to
407 // ensure this includes all children (so we can avoid walking them 407 // ensure this includes all children (so we can avoid walking them
408 // explicitly). 408 // explicitly).
409 rects.append( 409 rects.push_back(
410 LayoutRect(LayoutPoint::zero(), LayoutSize(frameView()->contentsSize()))); 410 LayoutRect(LayoutPoint::zero(), LayoutSize(frameView()->contentsSize())));
411 } 411 }
412 412
413 void LayoutView::paint(const PaintInfo& paintInfo, 413 void LayoutView::paint(const PaintInfo& paintInfo,
414 const LayoutPoint& paintOffset) const { 414 const LayoutPoint& paintOffset) const {
415 ViewPainter(*this).paint(paintInfo, paintOffset); 415 ViewPainter(*this).paint(paintInfo, paintOffset);
416 } 416 }
417 417
418 void LayoutView::paintBoxDecorationBackground(const PaintInfo& paintInfo, 418 void LayoutView::paintBoxDecorationBackground(const PaintInfo& paintInfo,
419 const LayoutPoint&) const { 419 const LayoutPoint&) const {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 } 520 }
521 521
522 if (hasOverflowClip()) 522 if (hasOverflowClip())
523 adjustment += FloatSize(scrolledContentOffset()); 523 adjustment += FloatSize(scrolledContentOffset());
524 524
525 return roundedLayoutSize(adjustment); 525 return roundedLayoutSize(adjustment);
526 } 526 }
527 527
528 void LayoutView::absoluteRects(Vector<IntRect>& rects, 528 void LayoutView::absoluteRects(Vector<IntRect>& rects,
529 const LayoutPoint& accumulatedOffset) const { 529 const LayoutPoint& accumulatedOffset) const {
530 rects.append( 530 rects.push_back(
531 pixelSnappedIntRect(accumulatedOffset, LayoutSize(layer()->size()))); 531 pixelSnappedIntRect(accumulatedOffset, LayoutSize(layer()->size())));
532 } 532 }
533 533
534 void LayoutView::absoluteQuads(Vector<FloatQuad>& quads, 534 void LayoutView::absoluteQuads(Vector<FloatQuad>& quads,
535 MapCoordinatesFlags mode) const { 535 MapCoordinatesFlags mode) const {
536 quads.append(localToAbsoluteQuad( 536 quads.push_back(localToAbsoluteQuad(
537 FloatRect(FloatPoint(), FloatSize(layer()->size())), mode)); 537 FloatRect(FloatPoint(), FloatSize(layer()->size())), mode));
538 } 538 }
539 539
540 static LayoutObject* layoutObjectAfterPosition(LayoutObject* object, 540 static LayoutObject* layoutObjectAfterPosition(LayoutObject* object,
541 unsigned offset) { 541 unsigned offset) {
542 if (!object) 542 if (!object)
543 return nullptr; 543 return nullptr;
544 544
545 LayoutObject* child = object->childAt(offset); 545 LayoutObject* child = object->childAt(offset);
546 return child ? child : object->nextInPreOrderAfterChildren(); 546 return child ? child : object->nextInPreOrderAfterChildren();
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 bool LayoutView::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { 1035 bool LayoutView::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const {
1036 // Frame scroll corner is painted using LayoutView as the display item client. 1036 // Frame scroll corner is painted using LayoutView as the display item client.
1037 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled() && 1037 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled() &&
1038 (frameView()->horizontalScrollbar() || frameView()->verticalScrollbar())) 1038 (frameView()->horizontalScrollbar() || frameView()->verticalScrollbar()))
1039 return false; 1039 return false;
1040 1040
1041 return LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); 1041 return LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize();
1042 } 1042 }
1043 1043
1044 } // namespace blink 1044 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698