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

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

Issue 2588093003: Import display: contents tests from csswg-test. (Closed)
Patch Set: Rebased 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/imported/csswg-test/css-display-3/support/acid.css ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 function eachDisplayContentsElementIn(document, window, callbackDo, callbackUndo ) {
2 var elements = [];
3
4 document.body.offsetHeight;
5
6 // NOTE: Doing qsa('*') and getComputedStyle is just for the
7 // test's sake, since it's easier to mess it up when
8 // getComputedStyle is involved.
9 var all = document.querySelectorAll('*');
10 for (var i = 0; i < all.length; ++i) {
11 if (window.getComputedStyle(all[i]).display === "contents") {
12 callbackDo(all[i]);
13 elements.push(all[i]);
14 }
15 }
16
17 document.body.offsetHeight;
18
19 for (var i = 0; i < elements.length; ++i)
20 callbackUndo(elements[i]);
21
22 document.body.offsetHeight;
23 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/imported/csswg-test/css-display-3/support/acid.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698