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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp

Issue 2741023002: Migrate WTF::Deque::removeLast() to ::pop_back() (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/fonts/ScriptRunIterator.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 void StyleResolver::addToStyleSharingList(Element& element) { 193 void StyleResolver::addToStyleSharingList(Element& element) {
194 DCHECK(RuntimeEnabledFeatures::styleSharingEnabled()); 194 DCHECK(RuntimeEnabledFeatures::styleSharingEnabled());
195 // Never add elements to the style sharing list if we're not in a recalcStyle, 195 // Never add elements to the style sharing list if we're not in a recalcStyle,
196 // otherwise we could leave stale pointers in there. 196 // otherwise we could leave stale pointers in there.
197 if (!document().inStyleRecalc()) 197 if (!document().inStyleRecalc())
198 return; 198 return;
199 INCREMENT_STYLE_STATS_COUNTER(document().styleEngine(), sharedStyleCandidates, 199 INCREMENT_STYLE_STATS_COUNTER(document().styleEngine(), sharedStyleCandidates,
200 1); 200 1);
201 StyleSharingList& list = styleSharingList(); 201 StyleSharingList& list = styleSharingList();
202 if (list.size() >= styleSharingListSize) 202 if (list.size() >= styleSharingListSize)
203 list.removeLast(); 203 list.pop_back();
204 list.prepend(&element); 204 list.prepend(&element);
205 } 205 }
206 206
207 StyleSharingList& StyleResolver::styleSharingList() { 207 StyleSharingList& StyleResolver::styleSharingList() {
208 m_styleSharingLists.resize(styleSharingMaxDepth); 208 m_styleSharingLists.resize(styleSharingMaxDepth);
209 209
210 // We never put things at depth 0 into the list since that's only the <html> 210 // We never put things at depth 0 into the list since that's only the <html>
211 // element and it has no siblings or cousins to share with. 211 // element and it has no siblings or cousins to share with.
212 unsigned depth = 212 unsigned depth =
213 std::max(std::min(m_styleSharingDepth, styleSharingMaxDepth), 1u) - 1u; 213 std::max(std::min(m_styleSharingDepth, styleSharingMaxDepth), 1u) - 1u;
(...skipping 1731 matching lines...) Expand 10 before | Expand all | Expand 10 after
1945 1945
1946 DEFINE_TRACE(StyleResolver) { 1946 DEFINE_TRACE(StyleResolver) {
1947 visitor->trace(m_matchedPropertiesCache); 1947 visitor->trace(m_matchedPropertiesCache);
1948 visitor->trace(m_selectorFilter); 1948 visitor->trace(m_selectorFilter);
1949 visitor->trace(m_styleSharingLists); 1949 visitor->trace(m_styleSharingLists);
1950 visitor->trace(m_document); 1950 visitor->trace(m_document);
1951 visitor->trace(m_tracker); 1951 visitor->trace(m_tracker);
1952 } 1952 }
1953 1953
1954 } // namespace blink 1954 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/fonts/ScriptRunIterator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698