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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlock.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 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 1053
1054 // It is parent blocks job to add positioned child to positioned objects 1054 // It is parent blocks job to add positioned child to positioned objects
1055 // list of its containing block 1055 // list of its containing block
1056 // Parent layout needs to be invalidated to ensure this happens. 1056 // Parent layout needs to be invalidated to ensure this happens.
1057 LayoutObject* p = positionedObject->parent(); 1057 LayoutObject* p = positionedObject->parent();
1058 while (p && !p->isLayoutBlock()) 1058 while (p && !p->isLayoutBlock())
1059 p = p->parent(); 1059 p = p->parent();
1060 if (p) 1060 if (p)
1061 p->setChildNeedsLayout(); 1061 p->setChildNeedsLayout();
1062 1062
1063 deadObjects.append(positionedObject); 1063 deadObjects.push_back(positionedObject);
1064 } 1064 }
1065 } 1065 }
1066 1066
1067 for (auto object : deadObjects) { 1067 for (auto object : deadObjects) {
1068 ASSERT(gPositionedContainerMap->get(object) == this); 1068 ASSERT(gPositionedContainerMap->get(object) == this);
1069 positionedDescendants->remove(object); 1069 positionedDescendants->remove(object);
1070 gPositionedContainerMap->remove(object); 1070 gPositionedContainerMap->remove(object);
1071 } 1071 }
1072 if (positionedDescendants->isEmpty()) { 1072 if (positionedDescendants->isEmpty()) {
1073 gPositionedDescendantsMap->remove(this); 1073 gPositionedDescendantsMap->remove(this);
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
1864 *extraWidthToEndOfLine = size().width() - caretRect.maxX(); 1864 *extraWidthToEndOfLine = size().width() - caretRect.maxX();
1865 1865
1866 return caretRect; 1866 return caretRect;
1867 } 1867 }
1868 1868
1869 void LayoutBlock::addOutlineRects( 1869 void LayoutBlock::addOutlineRects(
1870 Vector<LayoutRect>& rects, 1870 Vector<LayoutRect>& rects,
1871 const LayoutPoint& additionalOffset, 1871 const LayoutPoint& additionalOffset,
1872 IncludeBlockVisualOverflowOrNot includeBlockOverflows) const { 1872 IncludeBlockVisualOverflowOrNot includeBlockOverflows) const {
1873 if (!isAnonymous()) // For anonymous blocks, the children add outline rects. 1873 if (!isAnonymous()) // For anonymous blocks, the children add outline rects.
1874 rects.append(LayoutRect(additionalOffset, size())); 1874 rects.push_back(LayoutRect(additionalOffset, size()));
1875 1875
1876 if (includeBlockOverflows == IncludeBlockVisualOverflow && 1876 if (includeBlockOverflows == IncludeBlockVisualOverflow &&
1877 !hasOverflowClip() && !hasControlClip()) { 1877 !hasOverflowClip() && !hasControlClip()) {
1878 addOutlineRectsForNormalChildren(rects, additionalOffset, 1878 addOutlineRectsForNormalChildren(rects, additionalOffset,
1879 includeBlockOverflows); 1879 includeBlockOverflows);
1880 if (TrackedLayoutBoxListHashSet* positionedObjects = 1880 if (TrackedLayoutBoxListHashSet* positionedObjects =
1881 this->positionedObjects()) { 1881 this->positionedObjects()) {
1882 for (auto* box : *positionedObjects) 1882 for (auto* box : *positionedObjects)
1883 addOutlineRectsForDescendant(*box, rects, additionalOffset, 1883 addOutlineRectsForDescendant(*box, rects, additionalOffset,
1884 includeBlockOverflows); 1884 includeBlockOverflows);
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
2200 } 2200 }
2201 2201
2202 return availableHeight; 2202 return availableHeight;
2203 } 2203 }
2204 2204
2205 bool LayoutBlock::hasDefiniteLogicalHeight() const { 2205 bool LayoutBlock::hasDefiniteLogicalHeight() const {
2206 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); 2206 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1);
2207 } 2207 }
2208 2208
2209 } // namespace blink 2209 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698