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

Unified Diff: LayoutTests/fast/dom/SelectorAPI/document-fragment-nth.html

Issue 1023393002: Cache element indices for :nth-child and :nth-last-child selectors. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Moved nth-index-cache scope to updateStyle Created 5 years, 9 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
Index: LayoutTests/fast/dom/SelectorAPI/document-fragment-nth.html
diff --git a/LayoutTests/fast/dom/SelectorAPI/document-fragment-nth.html b/LayoutTests/fast/dom/SelectorAPI/document-fragment-nth.html
new file mode 100644
index 0000000000000000000000000000000000000000..b4cd8236866c0a0642b3bf2af6b81f281f9dbbb7
--- /dev/null
+++ b/LayoutTests/fast/dom/SelectorAPI/document-fragment-nth.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<script>
+description("DocumentFragment.querySelector matching nth-child of fragment.");
+
+var fragment = document.createDocumentFragment();
+for (var i = 0; i < 12; i++) {
+ var child = document.createElement("span");
+ if (i == 11)
+ child.id = "pass";
+ fragment.appendChild(child);
+}
+
+shouldBe('fragment.querySelector(":nth-child(12)").id', '"pass"');
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/SelectorAPI/document-fragment-nth-expected.txt » ('j') | Source/core/dom/Document.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698