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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/css-display-3/display-contents-reattachment.html
diff --git a/third_party/WebKit/LayoutTests/css-display-3/display-contents-reattachment.html b/third_party/WebKit/LayoutTests/css-display-3/display-contents-reattachment.html
new file mode 100644
index 0000000000000000000000000000000000000000..7443c295f258bdb8c8bdd0c75b88638fa7238001
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/css-display-3/display-contents-reattachment.html
@@ -0,0 +1,48 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Display 3: Display contents reattachment works well in Flex items</title>
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:ecobos@igalia.com">
+<link rel="help" href="http://dev.w3.org/csswg/css-display">
+<style>
+.flex {
+ display: flex;
+}
+.inline {
+ display: inline;
+}
+.contents {
+ display: contents;
+}
+</style>
+<div class="flex">
+0
+ <div class="contents">
+ <div>1</div>
+ </div>
+ <div class="contents">
+ <div class="inline">2<div>2</div></div>
+ </div>
+ <div class="contents">
+ 3
+ </div>
+ <div class="inline">3</div>
+</div>
+<script>
+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
+window.onload = function() {
+ setTimeout(() => {
+ var elements = [];
+ var all = document.querySelectorAll('*');
+ for (var i = 0; i < all.length; ++i) {
+ if (window.getComputedStyle(all[i]).display == 'contents') {
+ elements.push(all[i]);
+ all[i].style.display = 'none';
+ }
+ }
+ document.body.offsetHeight;
+ setTimeout(() => {
+ elements.forEach(e => e.style.display = '');
+ }, TIMEOUT);
+ }, TIMEOUT);
+}
+</script>

Powered by Google App Engine
This is Rietveld 408576698