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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/nth-pseudo.html

Issue 2235723002: Use invalidation sets for nth invalidations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment ::before/::after 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.h » ('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/nth-pseudo.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/invalidation/nth-pseudo.html b/third_party/WebKit/LayoutTests/fast/css/invalidation/nth-pseudo.html
index bcf504a1a783ba89ae960608d7158a09ac0db30c..9cffe1bc69afa870a8408646cf312fdf17a49e47 100644
--- a/third_party/WebKit/LayoutTests/fast/css/invalidation/nth-pseudo.html
+++ b/third_party/WebKit/LayoutTests/fast/css/invalidation/nth-pseudo.html
@@ -2,10 +2,13 @@
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<style>
- #t1 > :nth-child(even) {
+ #t1 > span:nth-child(even) {
background-color: green
}
- #t2 > :nth-last-child(even) {
+ #t2 > span:nth-last-child(even) {
+ background-color: green
+ }
+ #t3 > .second:nth-child(2) {
background-color: green
}
</style>
@@ -15,6 +18,12 @@
<div id="t2">
<span></span>
</div>
+<div id="t3">
+ <div class="second"></div>
+ <div></div>
+ <div></div>
+ <div></div>
+</div>
<script>
function backgroundIsGreen(element) {
@@ -40,4 +49,13 @@
assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1);
}, "Prepending an element sibling should not affect :nth-last-child of succeeding siblings.");
+ test(() => {
+ t3.offsetTop;
+ let second = t3.querySelector(".second");
+ backgroundIsTransparent(second);
+ t3.insertBefore(document.createElement("div"), t3.firstChild);
+ assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 2);
+ backgroundIsGreen(second);
+ }, "Prepending an element sibling should not affect :nth-last-child of succeeding siblings.");
+
</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/RuleFeature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698