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

Side by Side Diff: third_party/WebKit/LayoutTests/css-display-3/display-contents-reattachment.html

Issue 2450093005: Support display: contents for elements, first-line and first-letter pseudos. (Closed)
Patch Set: Support display: contents for elements, first-line and first-letter pseudos. Created 4 years, 1 month 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
OLDNEW
(Empty)
1 <!doctype html>
2 <meta charset="utf-8">
3 <title>CSS Display 3: Display contents reattachment works well in Flex items</ti tle>
4 <link rel="author" title="Emilio Cobos Álvarez" href="mailto:ecobos@igalia.com">
5 <link rel="help" href="http://dev.w3.org/csswg/css-display">
6 <style>
7 .flex {
8 display: flex;
9 }
10 .inline {
11 display: inline;
12 }
13 .contents {
14 display: contents;
15 }
16 </style>
17 <div class="flex">
18 0
19 <div class="contents">
20 <div>1</div>
21 </div>
22 <div class="contents">
23 <div class="inline">2<div>2</div></div>
24 </div>
25 <div class="contents">
26 3
27 </div>
28 <div class="inline">3</div>
29 </div>
30 <script>
31 var TIMEOUT = 100;
rune 2016/11/18 10:35:39 This smells flakiness. Why do you need to use a ti
emilio 2016/11/18 10:54:35 Whoops, that's right. It's not needed, just was ea
32 window.onload = function() {
33 setTimeout(() => {
34 var elements = [];
35 var all = document.querySelectorAll('*');
36 for (var i = 0; i < all.length; ++i) {
37 if (window.getComputedStyle(all[i]).display == 'contents') {
38 elements.push(all[i]);
39 all[i].style.display = 'none';
40 }
41 }
42 document.body.offsetHeight;
43 setTimeout(() => {
44 elements.forEach(e => e.style.display = '');
45 }, TIMEOUT);
46 }, TIMEOUT);
47 }
48 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698