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

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

Issue 129633003: Add a first pass of a class descendant invalidator, and a containing RuleSetAnalyzer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Implement tree walk for descendant class invalidation. Created 6 years, 11 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/Node.h ('k') | Source/core/dom/shadow/SelectRuleFeatureSet.h » ('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 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 } 639 }
640 640
641 clearChildNeedsDistributionRecalc(); 641 clearChildNeedsDistributionRecalc();
642 } 642 }
643 643
644 void Node::setIsLink(bool isLink) 644 void Node::setIsLink(bool isLink)
645 { 645 {
646 setFlag(isLink && !SVGImage::isInSVGImage(toElement(this)), IsLinkFlag); 646 setFlag(isLink && !SVGImage::isInSVGImage(toElement(this)), IsLinkFlag);
647 } 647 }
648 648
649 void Node::markAncestorsWithChildNeedsInvalidation()
650 {
651 for (Node* node = this; node && !node->childNeedsDistributionRecalc(); node = node->parentOrShadowHostNode())
652 node->setChildNeedsInvalidation();
653 if (document().childNeedsInvalidation())
654 document().scheduleStyleRecalc();
655 }
656
657 // get rid of this method!
658 void Node::setNeedsInvalidation()
659 {
660 markAncestorsWithChildNeedsInvalidation();
661 }
662
663 bool Node::needsInvalidation() const
664 {
665 return false;
666 }
667
649 void Node::markAncestorsWithChildNeedsDistributionRecalc() 668 void Node::markAncestorsWithChildNeedsDistributionRecalc()
650 { 669 {
651 for (Node* node = this; node && !node->childNeedsDistributionRecalc(); node = node->parentOrShadowHostNode()) 670 for (Node* node = this; node && !node->childNeedsDistributionRecalc(); node = node->parentOrShadowHostNode())
652 node->setChildNeedsDistributionRecalc(); 671 node->setChildNeedsDistributionRecalc();
653 if (document().childNeedsDistributionRecalc()) 672 if (document().childNeedsDistributionRecalc())
654 document().scheduleStyleRecalc(); 673 document().scheduleStyleRecalc();
655 } 674 }
656 675
657 namespace { 676 namespace {
658 677
(...skipping 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after
2641 node->showTreeForThis(); 2660 node->showTreeForThis();
2642 } 2661 }
2643 2662
2644 void showNodePath(const WebCore::Node* node) 2663 void showNodePath(const WebCore::Node* node)
2645 { 2664 {
2646 if (node) 2665 if (node)
2647 node->showNodePathForThis(); 2666 node->showNodePathForThis();
2648 } 2667 }
2649 2668
2650 #endif 2669 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/dom/shadow/SelectRuleFeatureSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698