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

Side by Side Diff: Source/core/dom/Element.cpp

Issue 22966004: Revert "Replace style sharing cousin list search with LRU" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | 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) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after
1507 if (document()->styleSheetCollection()->usesRemUnits() && document()->do cumentElement() == this && localChange != NoChange && currentStyle && newStyle & & currentStyle->fontSize() != newStyle->fontSize()) { 1507 if (document()->styleSheetCollection()->usesRemUnits() && document()->do cumentElement() == this && localChange != NoChange && currentStyle && newStyle & & currentStyle->fontSize() != newStyle->fontSize()) {
1508 // Cached RenderStyles may depend on the re units. 1508 // Cached RenderStyles may depend on the re units.
1509 document()->styleResolver()->invalidateMatchedPropertiesCache(); 1509 document()->styleResolver()->invalidateMatchedPropertiesCache();
1510 change = Force; 1510 change = Force;
1511 } 1511 }
1512 1512
1513 if (styleChangeType() >= SubtreeStyleChange) 1513 if (styleChangeType() >= SubtreeStyleChange)
1514 change = Force; 1514 change = Force;
1515 else if (change != Force) 1515 else if (change != Force)
1516 change = localChange; 1516 change = localChange;
1517 } else {
1518 // We still want to seed the style sharing list when just walking the tr ee to maximize sharing.
1519 document()->styleResolver()->addToStyleSharingList(this);
1520 } 1517 }
1521 StyleResolverParentPusher parentPusher(this); 1518 StyleResolverParentPusher parentPusher(this);
1522 1519
1523 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadow Root()) { 1520 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadow Root()) {
1524 if (shouldRecalcStyle(change, root)) { 1521 if (shouldRecalcStyle(change, root)) {
1525 parentPusher.push(); 1522 parentPusher.push();
1526 root->recalcStyle(change); 1523 root->recalcStyle(change);
1527 } 1524 }
1528 } 1525 }
1529 1526
(...skipping 2116 matching lines...) Expand 10 before | Expand all | Expand 10 after
3646 return 0; 3643 return 0;
3647 } 3644 }
3648 3645
3649 Attribute* UniqueElementData::attributeItem(unsigned index) 3646 Attribute* UniqueElementData::attributeItem(unsigned index)
3650 { 3647 {
3651 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); 3648 ASSERT_WITH_SECURITY_IMPLICATION(index < length());
3652 return &m_attributeVector.at(index); 3649 return &m_attributeVector.at(index);
3653 } 3650 }
3654 3651
3655 } // namespace WebCore 3652 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698