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

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

Issue 217713002: Refactor StyleInvalidator to encapsulate all style invalidation state. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix clear(). Created 6 years, 8 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
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 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after
1583 1583
1584 void Document::updateStyleInvalidationIfNeeded() 1584 void Document::updateStyleInvalidationIfNeeded()
1585 { 1585 {
1586 if (!isActive()) 1586 if (!isActive())
1587 return; 1587 return;
1588 if (!childNeedsStyleInvalidation()) 1588 if (!childNeedsStyleInvalidation())
1589 return; 1589 return;
1590 TRACE_EVENT0("webkit", "Document::computeNeedsStyleRecalcState"); 1590 TRACE_EVENT0("webkit", "Document::computeNeedsStyleRecalcState");
1591 ASSERT(styleResolver()); 1591 ASSERT(styleResolver());
1592 1592
1593 StyleInvalidator(*this).invalidate(); 1593 styleResolver()->ruleFeatureSet().styleInvalidator().invalidate(*this);
esprehn 2014/03/31 18:20:39 This is really silly to reach so far down, you sho
chrishtr 2014/03/31 19:22:59 Don't disagree. This CL is one step towards that.
1594 } 1594 }
1595 1595
1596 void Document::updateDistributionForNodeIfNeeded(Node* node) 1596 void Document::updateDistributionForNodeIfNeeded(Node* node)
1597 { 1597 {
1598 if (node->inDocument()) { 1598 if (node->inDocument()) {
1599 updateDistributionIfNeeded(); 1599 updateDistributionIfNeeded();
1600 return; 1600 return;
1601 } 1601 }
1602 Node* root = node; 1602 Node* root = node;
1603 while (Node* host = root->shadowHost()) 1603 while (Node* host = root->shadowHost())
(...skipping 3888 matching lines...) Expand 10 before | Expand all | Expand 10 after
5492 } 5492 }
5493 5493
5494 void Document::invalidateNodeListCaches(const QualifiedName* attrName) 5494 void Document::invalidateNodeListCaches(const QualifiedName* attrName)
5495 { 5495 {
5496 HashSet<LiveNodeListBase*>::iterator end = m_listsInvalidatedAtDocument.end( ); 5496 HashSet<LiveNodeListBase*>::iterator end = m_listsInvalidatedAtDocument.end( );
5497 for (HashSet<LiveNodeListBase*>::iterator it = m_listsInvalidatedAtDocument. begin(); it != end; ++it) 5497 for (HashSet<LiveNodeListBase*>::iterator it = m_listsInvalidatedAtDocument. begin(); it != end; ++it)
5498 (*it)->invalidateCache(attrName); 5498 (*it)->invalidateCache(attrName);
5499 } 5499 }
5500 5500
5501 } // namespace WebCore 5501 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698