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

Side by Side Diff: third_party/WebKit/Source/core/css/RuleFeatureSetTest.cpp

Issue 2683373003: RuleSet invalidations on single feature only, including tags. (Closed)
Patch Set: Trace type ruleset invalidation Created 3 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/css/RuleFeature.h" 5 #include "core/css/RuleFeature.h"
6 6
7 #include "core/css/CSSSelectorList.h" 7 #include "core/css/CSSSelectorList.h"
8 #include "core/css/RuleSet.h" 8 #include "core/css/RuleSet.h"
9 #include "core/css/StylePropertySet.h" 9 #include "core/css/StylePropertySet.h"
10 #include "core/css/StyleRule.h" 10 #include "core/css/StyleRule.h"
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 expectFullRecalcForRuleSetInvalidation(true); 1038 expectFullRecalcForRuleSetInvalidation(true);
1039 clearFeatures(); 1039 clearFeatures();
1040 1040
1041 EXPECT_EQ(RuleFeatureSet::SelectorMayMatch, 1041 EXPECT_EQ(RuleFeatureSet::SelectorMayMatch,
1042 collectFeatures(".x:-webkit-any(*, #y)")); 1042 collectFeatures(".x:-webkit-any(*, #y)"));
1043 expectFullRecalcForRuleSetInvalidation(false); 1043 expectFullRecalcForRuleSetInvalidation(false);
1044 clearFeatures(); 1044 clearFeatures();
1045 1045
1046 EXPECT_EQ(RuleFeatureSet::SelectorMayMatch, 1046 EXPECT_EQ(RuleFeatureSet::SelectorMayMatch,
1047 collectFeatures(":-webkit-any(:-webkit-any(.a, .b), #x)")); 1047 collectFeatures(":-webkit-any(:-webkit-any(.a, .b), #x)"));
1048 expectFullRecalcForRuleSetInvalidation(false); 1048 expectFullRecalcForRuleSetInvalidation(true);
1049 clearFeatures(); 1049 clearFeatures();
1050 1050
1051 EXPECT_EQ(RuleFeatureSet::SelectorMayMatch, 1051 EXPECT_EQ(RuleFeatureSet::SelectorMayMatch,
1052 collectFeatures(":-webkit-any(:-webkit-any(.a, *), #x)")); 1052 collectFeatures(":-webkit-any(:-webkit-any(.a, *), #x)"));
1053 expectFullRecalcForRuleSetInvalidation(true); 1053 expectFullRecalcForRuleSetInvalidation(true);
1054 clearFeatures(); 1054 clearFeatures();
1055 1055
1056 EXPECT_EQ(RuleFeatureSet::SelectorMayMatch, 1056 EXPECT_EQ(RuleFeatureSet::SelectorMayMatch,
1057 collectFeatures(":-webkit-any(*, .a) *")); 1057 collectFeatures(":-webkit-any(*, .a) *"));
1058 expectFullRecalcForRuleSetInvalidation(true); 1058 expectFullRecalcForRuleSetInvalidation(true);
1059
1060 EXPECT_EQ(RuleFeatureSet::SelectorMayMatch,
1061 collectFeatures(":-webkit-any(.a, .b) *"));
1062 expectFullRecalcForRuleSetInvalidation(true);
1059 } 1063 }
1060 1064
1061 } // namespace blink 1065 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/RuleFeature.cpp ('k') | third_party/WebKit/Source/core/css/invalidation/InvalidationSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698