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

Side by Side Diff: LayoutTests/css3/flexbox/mozilla/flexbox-items-as-stacking-contexts-2.html

Issue 23737004: Paint flex items atomically, like inline-blocks (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update comment Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/css3/flexbox/mozilla/flexbox-items-as-stacking-contexts-2-expected.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <!--
3 Any copyright is dedicated to the Public Domain.
4 http://creativecommons.org/publicdomain/zero/1.0/
5 -->
6 <!-- This testcase checks flex items are painted atomically. In particular,
7 if one item has content that overflows into the region of another item,
8 then one item is painted "behind" the other; there shouldn't normally
9 any interleaving of backgrounds and content between the two items.
10
11 This testcase also tests some special cases that will change the paint
12 ordering - specifically, the properties "position", "z-index", and
13 "order" on flex items.
14 -->
15 <html>
16 <head>
17 <style>
18 body { font: 10px sans-serif }
19 .flexContainer {
20 background: orange;
21 display: flex;
22 justify-content: space-between;
23 width: 70px;
24 padding: 2px;
25 margin-bottom: 2px;
26 }
27 .item1 {
28 background: lightblue;
29 width: 30px;
30 }
31 .item2 {
32 background: yellow;
33 width: 30px;
34 }
35 </style>
36 </head>
37 <body>
38 <!-- This container has two flex items, the first of which has content
39 sticking out & overlapping the second. If they're painting atomically
40 (and in the right order), the second item's background should cover the
41 first item's overflowing content. -->
42 <div class="flexContainer"
43 ><div class="item1">ThisIsALongUnbrokenString</div
44 ><div class="item2">HereIsSomeMoreLongText</div
45 ></div>
46
47 <!-- Now, the first item is relatively positioned, which should make it paint
48 on top of everything. -->
49 <div class="flexContainer"
50 ><div class="item1" style="position:relative">ThisIsALongUnbrokenString</div
51 ><div class="item2">HereIsSomeMoreLongText</div
52 ></div>
53
54 <!-- Now, the first item is has "z-index" set, which should make it paint on
55 top of everything. -->
56 <div class="flexContainer"
57 ><div class="item1" style="z-index: 1">ThisIsALongUnbrokenString</div
58 ><div class="item2">HereIsSomeMoreLongText</div
59 ></div>
60
61 <!-- Now, the first item has "order" set to a higher value than default,
62 which should make it paint on top (and at the far right) -->
63 <div class="flexContainer"
64 ><div class="item1" style="order: 1">ThisIsALongUnbrokenString</div
65 ><div class="item2">HereIsSomeMoreLongText</div
66 ></div>
67
68 <!-- And for thoroughness, let's set "order" to a lower value than default,
69 on the second item. (Should render the same as previous example.) -->
70 <div class="flexContainer"
71 ><div class="item1">ThisIsALongUnbrokenString</div
72 ><div class="item2" style="order: -1">HereIsSomeMoreLongText</div
73 ></div>
74
75 <!-- ...but if we relatively position that second item, it should paint
76 on top again, despite its low "order" value. -->
77 <div class="flexContainer"
78 ><div class="item1">ThisIsALongUnbrokenString</div
79 ><div class="item2" style="order: -1; position: relative">HereIsSomeMoreLong Text</div
80 ></div>
81 </body>
82 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/css3/flexbox/mozilla/flexbox-items-as-stacking-contexts-2-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698