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

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

Issue 23049008: Replace style sharing cousin list search with LRU (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updating to ToT Created 7 years, 3 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') | Source/core/html/parser/HTMLConstructionSite.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) 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 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after
1561 1561
1562 if (forceCheckOfNextElementSibling || forceCheckOfAnyElementSibling) 1562 if (forceCheckOfNextElementSibling || forceCheckOfAnyElementSibling)
1563 element->setNeedsStyleRecalc(); 1563 element->setNeedsStyleRecalc();
1564 1564
1565 forceCheckOfNextElementSibling = childRulesChanged && hasDirectAdjac entRules; 1565 forceCheckOfNextElementSibling = childRulesChanged && hasDirectAdjac entRules;
1566 forceCheckOfAnyElementSibling = forceCheckOfAnyElementSibling || (ch ildRulesChanged && hasIndirectAdjacentRules); 1566 forceCheckOfAnyElementSibling = forceCheckOfAnyElementSibling || (ch ildRulesChanged && hasIndirectAdjacentRules);
1567 1567
1568 if (shouldRecalcStyle(change, element)) { 1568 if (shouldRecalcStyle(change, element)) {
1569 parentPusher.push(); 1569 parentPusher.push();
1570 didReattach = element->recalcStyle(change); 1570 didReattach = element->recalcStyle(change);
1571 } else {
1572 document().styleResolver()->addToStyleSharingList(element);
1571 } 1573 }
1572 } 1574 }
1573 1575
1574 forceReattachOfAnyWhitespaceSibling = didReattach || forceReattachOfAnyW hitespaceSibling; 1576 forceReattachOfAnyWhitespaceSibling = didReattach || forceReattachOfAnyW hitespaceSibling;
1575 } 1577 }
1576 1578
1577 if (shouldRecalcStyle(change, this)) { 1579 if (shouldRecalcStyle(change, this)) {
1578 updatePseudoElement(AFTER, change); 1580 updatePseudoElement(AFTER, change);
1579 updatePseudoElement(BACKDROP, change); 1581 updatePseudoElement(BACKDROP, change);
1580 } 1582 }
(...skipping 2057 matching lines...) Expand 10 before | Expand all | Expand 10 after
3638 return 0; 3640 return 0;
3639 } 3641 }
3640 3642
3641 Attribute* UniqueElementData::attributeItem(unsigned index) 3643 Attribute* UniqueElementData::attributeItem(unsigned index)
3642 { 3644 {
3643 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); 3645 ASSERT_WITH_SECURITY_IMPLICATION(index < length());
3644 return &m_attributeVector.at(index); 3646 return &m_attributeVector.at(index);
3645 } 3647 }
3646 3648
3647 } // namespace WebCore 3649 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/html/parser/HTMLConstructionSite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698