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

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

Issue 396343002: Remove unneeded ASSERT in StyleResolver::styleSharingList (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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 | no next file » | 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. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 list.prepend(&element); 326 list.prepend(&element);
327 } 327 }
328 328
329 StyleSharingList& StyleResolver::styleSharingList() 329 StyleSharingList& StyleResolver::styleSharingList()
330 { 330 {
331 m_styleSharingLists.resize(styleSharingMaxDepth); 331 m_styleSharingLists.resize(styleSharingMaxDepth);
332 332
333 // We never put things at depth 0 into the list since that's only the <html> element 333 // We never put things at depth 0 into the list since that's only the <html> element
334 // and it has no siblings or cousins to share with. 334 // and it has no siblings or cousins to share with.
335 unsigned depth = std::max(std::min(m_styleSharingDepth, styleSharingMaxDepth ), 1u) - 1u; 335 unsigned depth = std::max(std::min(m_styleSharingDepth, styleSharingMaxDepth ), 1u) - 1u;
336 ASSERT(depth >= 0);
337 336
338 if (!m_styleSharingLists[depth]) 337 if (!m_styleSharingLists[depth])
339 m_styleSharingLists[depth] = adoptPtr(new StyleSharingList); 338 m_styleSharingLists[depth] = adoptPtr(new StyleSharingList);
340 return *m_styleSharingLists[depth]; 339 return *m_styleSharingLists[depth];
341 } 340 }
342 341
343 void StyleResolver::clearStyleSharingList() 342 void StyleResolver::clearStyleSharingList()
344 { 343 {
345 m_styleSharingLists.resize(0); 344 m_styleSharingLists.resize(0);
346 } 345 }
(...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 visitor->trace(m_viewportStyleResolver); 1563 visitor->trace(m_viewportStyleResolver);
1565 visitor->trace(m_features); 1564 visitor->trace(m_features);
1566 visitor->trace(m_siblingRuleSet); 1565 visitor->trace(m_siblingRuleSet);
1567 visitor->trace(m_uncommonAttributeRuleSet); 1566 visitor->trace(m_uncommonAttributeRuleSet);
1568 visitor->trace(m_watchedSelectorsRules); 1567 visitor->trace(m_watchedSelectorsRules);
1569 visitor->trace(m_treeBoundaryCrossingRules); 1568 visitor->trace(m_treeBoundaryCrossingRules);
1570 visitor->trace(m_pendingStyleSheets); 1569 visitor->trace(m_pendingStyleSheets);
1571 } 1570 }
1572 1571
1573 } // namespace WebCore 1572 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698