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

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

Issue 540533004: Use style invalidation for more pseudo classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 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
« no previous file with comments | « Source/core/css/RuleFeature.h ('k') | Source/core/dom/Document.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) 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 if (selector.isAttributeSelector()) 209 if (selector.isAttributeSelector())
210 return &ensureAttributeInvalidationSet(selector.attribute().localName()) ; 210 return &ensureAttributeInvalidationSet(selector.attribute().localName()) ;
211 if (selector.match() == CSSSelector::Id) 211 if (selector.match() == CSSSelector::Id)
212 return &ensureIdInvalidationSet(selector.value()); 212 return &ensureIdInvalidationSet(selector.value());
213 if (selector.match() == CSSSelector::PseudoClass) { 213 if (selector.match() == CSSSelector::PseudoClass) {
214 switch (selector.pseudoType()) { 214 switch (selector.pseudoType()) {
215 case CSSSelector::PseudoEmpty: 215 case CSSSelector::PseudoEmpty:
216 case CSSSelector::PseudoHover: 216 case CSSSelector::PseudoHover:
217 case CSSSelector::PseudoActive: 217 case CSSSelector::PseudoActive:
218 case CSSSelector::PseudoFocus: 218 case CSSSelector::PseudoFocus:
219 case CSSSelector::PseudoChecked:
220 case CSSSelector::PseudoEnabled:
221 case CSSSelector::PseudoDisabled:
222 case CSSSelector::PseudoIndeterminate:
223 case CSSSelector::PseudoLink:
224 case CSSSelector::PseudoTarget:
225 case CSSSelector::PseudoVisited:
219 return &ensurePseudoInvalidationSet(selector.pseudoType()); 226 return &ensurePseudoInvalidationSet(selector.pseudoType());
220 default: 227 default:
221 break; 228 break;
222 } 229 }
223 } 230 }
224 return 0; 231 return 0;
225 } 232 }
226 233
227 // Given a selector, update the descendant invalidation sets for the features fo und 234 // Given a selector, update the descendant invalidation sets for the features fo und
228 // in the selector. The first step is to extract the features from the rightmost 235 // in the selector. The first step is to extract the features from the rightmost
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 visitor->trace(uncommonAttributeRules); 570 visitor->trace(uncommonAttributeRules);
564 visitor->trace(m_classInvalidationSets); 571 visitor->trace(m_classInvalidationSets);
565 visitor->trace(m_attributeInvalidationSets); 572 visitor->trace(m_attributeInvalidationSets);
566 visitor->trace(m_idInvalidationSets); 573 visitor->trace(m_idInvalidationSets);
567 visitor->trace(m_pseudoInvalidationSets); 574 visitor->trace(m_pseudoInvalidationSets);
568 visitor->trace(m_styleInvalidator); 575 visitor->trace(m_styleInvalidator);
569 #endif 576 #endif
570 } 577 }
571 578
572 } // namespace blink 579 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/RuleFeature.h ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698