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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 2617783002: Migrate WTF::Vector::append() to ::push_back() [part 12 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, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@gmail.com> 10 * Christian Biesinger <cbiesinger@gmail.com>
(...skipping 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after
2047 return; 2047 return;
2048 scrollableArea.setNeedsRelayout(true); 2048 scrollableArea.setNeedsRelayout(true);
2049 scrollableArea.setHadHorizontalScrollbarBeforeRelayout( 2049 scrollableArea.setHadHorizontalScrollbarBeforeRelayout(
2050 hadHorizontalScrollbar); 2050 hadHorizontalScrollbar);
2051 scrollableArea.setHadVerticalScrollbarBeforeRelayout(hadVerticalScrollbar); 2051 scrollableArea.setHadVerticalScrollbarBeforeRelayout(hadVerticalScrollbar);
2052 2052
2053 s_relayoutNeeded = true; 2053 s_relayoutNeeded = true;
2054 if (!s_needsRelayout) 2054 if (!s_needsRelayout)
2055 s_needsRelayout = 2055 s_needsRelayout =
2056 new PersistentHeapVector<Member<PaintLayerScrollableArea>>(); 2056 new PersistentHeapVector<Member<PaintLayerScrollableArea>>();
2057 s_needsRelayout->append(&scrollableArea); 2057 s_needsRelayout->push_back(&scrollableArea);
2058 } 2058 }
2059 2059
2060 void PaintLayerScrollableArea::PreventRelayoutScope::resetRelayoutNeeded() { 2060 void PaintLayerScrollableArea::PreventRelayoutScope::resetRelayoutNeeded() {
2061 DCHECK_EQ(s_count, 0); 2061 DCHECK_EQ(s_count, 0);
2062 DCHECK(!s_needsRelayout || s_needsRelayout->isEmpty()); 2062 DCHECK(!s_needsRelayout || s_needsRelayout->isEmpty());
2063 s_relayoutNeeded = false; 2063 s_relayoutNeeded = false;
2064 } 2064 }
2065 2065
2066 int PaintLayerScrollableArea::FreezeScrollbarsScope::s_count = 0; 2066 int PaintLayerScrollableArea::FreezeScrollbarsScope::s_count = 0;
2067 2067
(...skipping 13 matching lines...) Expand all
2081 PaintLayerScrollableArea::DelayScrollOffsetClampScope:: 2081 PaintLayerScrollableArea::DelayScrollOffsetClampScope::
2082 ~DelayScrollOffsetClampScope() { 2082 ~DelayScrollOffsetClampScope() {
2083 if (--s_count == 0) 2083 if (--s_count == 0)
2084 DelayScrollOffsetClampScope::clampScrollableAreas(); 2084 DelayScrollOffsetClampScope::clampScrollableAreas();
2085 } 2085 }
2086 2086
2087 void PaintLayerScrollableArea::DelayScrollOffsetClampScope::setNeedsClamp( 2087 void PaintLayerScrollableArea::DelayScrollOffsetClampScope::setNeedsClamp(
2088 PaintLayerScrollableArea* scrollableArea) { 2088 PaintLayerScrollableArea* scrollableArea) {
2089 if (!scrollableArea->needsScrollOffsetClamp()) { 2089 if (!scrollableArea->needsScrollOffsetClamp()) {
2090 scrollableArea->setNeedsScrollOffsetClamp(true); 2090 scrollableArea->setNeedsScrollOffsetClamp(true);
2091 s_needsClamp->append(scrollableArea); 2091 s_needsClamp->push_back(scrollableArea);
2092 } 2092 }
2093 } 2093 }
2094 2094
2095 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: 2095 void PaintLayerScrollableArea::DelayScrollOffsetClampScope::
2096 clampScrollableAreas() { 2096 clampScrollableAreas() {
2097 for (auto& scrollableArea : *s_needsClamp) 2097 for (auto& scrollableArea : *s_needsClamp)
2098 scrollableArea->clampScrollOffsetAfterOverflowChange(); 2098 scrollableArea->clampScrollOffsetAfterOverflowChange();
2099 delete s_needsClamp; 2099 delete s_needsClamp;
2100 s_needsClamp = nullptr; 2100 s_needsClamp = nullptr;
2101 } 2101 }
2102 2102
2103 } // namespace blink 2103 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698