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

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

Issue 2700943003: Invalidate custom pseudo elements for RuleSet invalidations. (Closed)
Patch Set: 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 982 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 expectFullRecalcForRuleSetInvalidation(false); 993 expectFullRecalcForRuleSetInvalidation(false);
994 clearFeatures(); 994 clearFeatures();
995 995
996 EXPECT_EQ(RuleFeatureSet::SelectorMayMatch, collectFeatures(":not(.x) + .y")); 996 EXPECT_EQ(RuleFeatureSet::SelectorMayMatch, collectFeatures(":not(.x) + .y"));
997 expectFullRecalcForRuleSetInvalidation(false); 997 expectFullRecalcForRuleSetInvalidation(false);
998 } 998 }
999 999
1000 TEST_F(RuleFeatureSetTest, RuleSetInvalidationCustomPseudo) { 1000 TEST_F(RuleFeatureSetTest, RuleSetInvalidationCustomPseudo) {
1001 EXPECT_EQ(RuleFeatureSet::SelectorMayMatch, 1001 EXPECT_EQ(RuleFeatureSet::SelectorMayMatch,
1002 collectFeatures("::-webkit-slider-thumb")); 1002 collectFeatures("::-webkit-slider-thumb"));
1003 expectFullRecalcForRuleSetInvalidation(true); 1003 expectFullRecalcForRuleSetInvalidation(false);
1004 clearFeatures(); 1004 clearFeatures();
1005 1005
1006 EXPECT_EQ(RuleFeatureSet::SelectorMayMatch, 1006 EXPECT_EQ(RuleFeatureSet::SelectorMayMatch,
1007 collectFeatures(".x::-webkit-slider-thumb")); 1007 collectFeatures(".x::-webkit-slider-thumb"));
1008 expectFullRecalcForRuleSetInvalidation(false); 1008 expectFullRecalcForRuleSetInvalidation(false);
1009 clearFeatures(); 1009 clearFeatures();
1010 1010
1011 EXPECT_EQ(RuleFeatureSet::SelectorMayMatch, 1011 EXPECT_EQ(RuleFeatureSet::SelectorMayMatch,
1012 collectFeatures(".x + ::-webkit-slider-thumb")); 1012 collectFeatures(".x + ::-webkit-slider-thumb"));
1013 expectFullRecalcForRuleSetInvalidation(false); 1013 expectFullRecalcForRuleSetInvalidation(false);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 } 1059 }
1060 1060
1061 } // namespace blink 1061 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/RuleFeature.cpp ('k') | third_party/WebKit/Source/core/dom/StyleEngineTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698