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

Side by Side Diff: Source/core/css/RuleFeature.cpp

Issue 450293002: Invalidation set features are not skippable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | « no previous file | 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) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r ights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r ights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 26 matching lines...) Expand all
37 #include "core/css/invalidation/DescendantInvalidationSet.h" 37 #include "core/css/invalidation/DescendantInvalidationSet.h"
38 #include "core/dom/Element.h" 38 #include "core/dom/Element.h"
39 #include "core/dom/Node.h" 39 #include "core/dom/Node.h"
40 #include "platform/RuntimeEnabledFeatures.h" 40 #include "platform/RuntimeEnabledFeatures.h"
41 #include "wtf/BitVector.h" 41 #include "wtf/BitVector.h"
42 42
43 namespace blink { 43 namespace blink {
44 44
45 static bool isSkippableComponentForInvalidation(const CSSSelector& selector) 45 static bool isSkippableComponentForInvalidation(const CSSSelector& selector)
46 { 46 {
47 if (selector.match() == CSSSelector::Tag 47 if (selector.match() == CSSSelector::Tag) {
48 || selector.match() == CSSSelector::Id 48 ASSERT(selector.tagQName().localName() == starAtom);
49 || selector.isAttributeSelector())
50 return true; 49 return true;
50 }
51 if (selector.match() == CSSSelector::PseudoElement) { 51 if (selector.match() == CSSSelector::PseudoElement) {
52 switch (selector.pseudoType()) { 52 switch (selector.pseudoType()) {
53 case CSSSelector::PseudoBefore: 53 case CSSSelector::PseudoBefore:
54 case CSSSelector::PseudoAfter: 54 case CSSSelector::PseudoAfter:
55 case CSSSelector::PseudoBackdrop: 55 case CSSSelector::PseudoBackdrop:
56 case CSSSelector::PseudoShadow: 56 case CSSSelector::PseudoShadow:
57 return true; 57 return true;
58 default: 58 default:
59 return selector.isCustomPseudoElement(); 59 ASSERT(!selector.isCustomPseudoElement());
60 return false;
60 } 61 }
61 } 62 }
62 if (selector.match() != CSSSelector::PseudoClass) 63 if (selector.match() != CSSSelector::PseudoClass)
63 return false; 64 return false;
64 switch (selector.pseudoType()) { 65 switch (selector.pseudoType()) {
65 case CSSSelector::PseudoEmpty: 66 case CSSSelector::PseudoEmpty:
66 case CSSSelector::PseudoFirstChild: 67 case CSSSelector::PseudoFirstChild:
67 case CSSSelector::PseudoFirstOfType: 68 case CSSSelector::PseudoFirstOfType:
68 case CSSSelector::PseudoLastChild: 69 case CSSSelector::PseudoLastChild:
69 case CSSSelector::PseudoLastOfType: 70 case CSSSelector::PseudoLastOfType:
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 visitor->trace(uncommonAttributeRules); 524 visitor->trace(uncommonAttributeRules);
524 visitor->trace(m_classInvalidationSets); 525 visitor->trace(m_classInvalidationSets);
525 visitor->trace(m_attributeInvalidationSets); 526 visitor->trace(m_attributeInvalidationSets);
526 visitor->trace(m_idInvalidationSets); 527 visitor->trace(m_idInvalidationSets);
527 visitor->trace(m_pseudoInvalidationSets); 528 visitor->trace(m_pseudoInvalidationSets);
528 visitor->trace(m_styleInvalidator); 529 visitor->trace(m_styleInvalidator);
529 #endif 530 #endif
530 } 531 }
531 532
532 } // namespace blink 533 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698