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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/rule-change.html

Issue 2253053002: CSS: RuleFeature::clear clears all invalidation sets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/RuleFeature.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/css/invalidation/rule-change.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/invalidation/rule-change.html b/third_party/WebKit/LayoutTests/fast/css/invalidation/rule-change.html
new file mode 100644
index 0000000000000000000000000000000000000000..5684f4f5ae6729c9c1cae9e12fab8949fe3ab8c5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/invalidation/rule-change.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+</head>
+<body>
+<div></div>
+<div id="t1">
+ <div id="t2"></div>
+ <div></div>
+ <div></div>
+</div>
+<script>
+ test(() => {
+ var s = document.createElement("style");
+ s.textContent = "div ~ div > :nth-child(even) { background-color: red }";
+ var head = document.querySelector("head");
+ head.appendChild(s);
+ t2.offsetTop;
+ head.removeChild(s);
+ t2.offsetTop;
+
+ t1.insertBefore(document.createElement("div"), t2);
+ assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1);
+ }, "Removed style rules should not cause invalidation");
+</script>
+<body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/RuleFeature.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698