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

Unified Diff: third_party/WebKit/LayoutTests/imported/csswg-test/css-display-3/support/util.js

Issue 2450093005: Support display: contents for elements, first-line and first-letter pseudos. (Closed)
Patch Set: Allow text as child of the LayoutView, since it can happen with display: contents Created 4 years 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: third_party/WebKit/LayoutTests/imported/csswg-test/css-display-3/support/util.js
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-display-3/support/util.js b/third_party/WebKit/LayoutTests/imported/csswg-test/css-display-3/support/util.js
new file mode 100644
index 0000000000000000000000000000000000000000..861bcd77d9e77b14c659089743409824d21a2a64
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-display-3/support/util.js
@@ -0,0 +1,23 @@
+function eachDisplayContentsElementIn(document, window, callbackDo, callbackUndo) {
+ var elements = [];
+
+ document.body.offsetHeight;
+
+ // NOTE: Doing qsa('*') and getComputedStyle is just for the
+ // test's shake, since it's easier to mess it up when
+ // getComputedStyle is involved.
+ var all = document.querySelectorAll('*');
+ for (var i = 0; i < all.length; ++i) {
+ if (window.getComputedStyle(all[i]).display === "contents") {
+ callbackDo(all[i]);
+ elements.push(all[i]);
+ }
+ }
+
+ document.body.offsetHeight;
+
+ for (var i = 0; i < elements.length; ++i)
+ callbackUndo(elements[i]);
+
+ document.body.offsetHeight;
+}

Powered by Google App Engine
This is Rietveld 408576698