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

Side by Side Diff: Source/core/dom/shadow/SelectRuleFeatureSet.cpp

Issue 149513011: Pass around CSSSelector by reference instead of pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 m_cssRuleFeatureSet.add(featureSet.m_cssRuleFeatureSet); 45 m_cssRuleFeatureSet.add(featureSet.m_cssRuleFeatureSet);
46 m_featureFlags |= featureSet.m_featureFlags; 46 m_featureFlags |= featureSet.m_featureFlags;
47 } 47 }
48 48
49 void SelectRuleFeatureSet::clear() 49 void SelectRuleFeatureSet::clear()
50 { 50 {
51 m_cssRuleFeatureSet.clear(); 51 m_cssRuleFeatureSet.clear();
52 m_featureFlags = 0; 52 m_featureFlags = 0;
53 } 53 }
54 54
55 void SelectRuleFeatureSet::collectFeaturesFromSelector(const CSSSelector* select or) 55 void SelectRuleFeatureSet::collectFeaturesFromSelector(const CSSSelector& select or)
56 { 56 {
57 m_cssRuleFeatureSet.collectFeaturesFromSelector(selector); 57 m_cssRuleFeatureSet.collectFeaturesFromSelector(selector);
58 58
59 switch (selector->pseudoType()) { 59 switch (selector.pseudoType()) {
60 case CSSSelector::PseudoChecked: 60 case CSSSelector::PseudoChecked:
61 setSelectRuleFeature(AffectedSelectorChecked); 61 setSelectRuleFeature(AffectedSelectorChecked);
62 break; 62 break;
63 case CSSSelector::PseudoEnabled: 63 case CSSSelector::PseudoEnabled:
64 setSelectRuleFeature(AffectedSelectorEnabled); 64 setSelectRuleFeature(AffectedSelectorEnabled);
65 break; 65 break;
66 case CSSSelector::PseudoDisabled: 66 case CSSSelector::PseudoDisabled:
67 setSelectRuleFeature(AffectedSelectorDisabled); 67 setSelectRuleFeature(AffectedSelectorDisabled);
68 break; 68 break;
69 case CSSSelector::PseudoIndeterminate: 69 case CSSSelector::PseudoIndeterminate:
70 setSelectRuleFeature(AffectedSelectorIndeterminate); 70 setSelectRuleFeature(AffectedSelectorIndeterminate);
71 break; 71 break;
72 case CSSSelector::PseudoLink: 72 case CSSSelector::PseudoLink:
73 setSelectRuleFeature(AffectedSelectorLink); 73 setSelectRuleFeature(AffectedSelectorLink);
74 break; 74 break;
75 case CSSSelector::PseudoTarget: 75 case CSSSelector::PseudoTarget:
76 setSelectRuleFeature(AffectedSelectorTarget); 76 setSelectRuleFeature(AffectedSelectorTarget);
77 break; 77 break;
78 case CSSSelector::PseudoVisited: 78 case CSSSelector::PseudoVisited:
79 setSelectRuleFeature(AffectedSelectorVisited); 79 setSelectRuleFeature(AffectedSelectorVisited);
80 break; 80 break;
81 default: 81 default:
82 break; 82 break;
83 } 83 }
84 } 84 }
85 85
86 } 86 }
87 87
OLDNEW
« no previous file with comments | « Source/core/dom/shadow/SelectRuleFeatureSet.h ('k') | Source/core/html/shadow/HTMLContentElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698