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

Side by Side Diff: Source/core/dom/Document.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/ContainerNode.cpp ('k') | Source/core/dom/Element.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 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 1739 matching lines...) Expand 10 before | Expand all | Expand 10 after
1750 unscheduleStyleRecalc(); 1750 unscheduleStyleRecalc();
1751 1751
1752 // FIXME: SVG <use> element can schedule a recalc in the middle of an al ready running one. 1752 // FIXME: SVG <use> element can schedule a recalc in the middle of an al ready running one.
1753 // See StyleSheetCollections::updateActiveStyleSheets. 1753 // See StyleSheetCollections::updateActiveStyleSheets.
1754 if (m_styleSheetCollections->needsUpdateActiveStylesheetsOnStyleRecalc() ) 1754 if (m_styleSheetCollections->needsUpdateActiveStylesheetsOnStyleRecalc() )
1755 setNeedsStyleRecalc(); 1755 setNeedsStyleRecalc();
1756 1756
1757 m_inStyleRecalc = false; 1757 m_inStyleRecalc = false;
1758 1758
1759 // Pseudo element removal and similar may only work with these flags sti ll set. Reset them after the style recalc. 1759 // Pseudo element removal and similar may only work with these flags sti ll set. Reset them after the style recalc.
1760 if (m_styleResolver) 1760 if (m_styleResolver) {
1761 m_styleSheetCollections->resetCSSFeatureFlags(m_styleResolver->ruleF eatureSet()); 1761 m_styleSheetCollections->resetCSSFeatureFlags(m_styleResolver->ruleF eatureSet());
1762 m_styleResolver->clearStyleSharingList();
1763 }
1762 1764
1763 if (frameView) { 1765 if (frameView) {
1764 frameView->resumeScheduledEvents(); 1766 frameView->resumeScheduledEvents();
1765 frameView->endDeferredRepaints(); 1767 frameView->endDeferredRepaints();
1766 } 1768 }
1767 } 1769 }
1768 1770
1769 STYLE_STATS_PRINT(); 1771 STYLE_STATS_PRINT();
1770 STYLE_STATS_CLEAR(); 1772 STYLE_STATS_CLEAR();
1771 1773
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1999 setRenderer(0); 2001 setRenderer(0);
2000 2002
2001 m_hoverNode = 0; 2003 m_hoverNode = 0;
2002 m_focusedElement = 0; 2004 m_focusedElement = 0;
2003 m_activeElement = 0; 2005 m_activeElement = 0;
2004 2006
2005 ContainerNode::detach(context); 2007 ContainerNode::detach(context);
2006 2008
2007 unscheduleStyleRecalc(); 2009 unscheduleStyleRecalc();
2008 2010
2011 clearStyleResolver();
2012
2009 if (render) 2013 if (render)
2010 render->destroy(); 2014 render->destroy();
2011 2015
2012 if (m_touchEventTargets && m_touchEventTargets->size() && parentDocument()) 2016 if (m_touchEventTargets && m_touchEventTargets->size() && parentDocument())
2013 parentDocument()->didRemoveEventTargetNode(this); 2017 parentDocument()->didRemoveEventTargetNode(this);
2014 2018
2015 // This is required, as our Frame might delete itself as soon as it detaches 2019 // This is required, as our Frame might delete itself as soon as it detaches
2016 // us. However, this violates Node::detach() semantics, as it's never 2020 // us. However, this violates Node::detach() semantics, as it's never
2017 // possible to re-attach. Eventually Document::detach() should be renamed, 2021 // possible to re-attach. Eventually Document::detach() should be renamed,
2018 // or this setting of the frame to 0 could be made explicit in each of the 2022 // or this setting of the frame to 0 could be made explicit in each of the
(...skipping 3353 matching lines...) Expand 10 before | Expand all | Expand 10 after
5372 { 5376 {
5373 return DocumentLifecycleNotifier::create(this); 5377 return DocumentLifecycleNotifier::create(this);
5374 } 5378 }
5375 5379
5376 DocumentLifecycleNotifier* Document::lifecycleNotifier() 5380 DocumentLifecycleNotifier* Document::lifecycleNotifier()
5377 { 5381 {
5378 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec ycleNotifier()); 5382 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec ycleNotifier());
5379 } 5383 }
5380 5384
5381 } // namespace WebCore 5385 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698