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

Side by Side Diff: LayoutTests/fast/shapes/shape-inside/shape-inside-bottom-edge.html

Issue 19865002: [CSS Shapes] Port shape-inside on regions and shape's content overflow from WebKit (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: [CSS Shapes] Port shape-inside on regions and shape's content overflow from WebKit Created 7 years, 5 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script> 4 <script>
5 if (window.internals) 5 if (window.internals)
6 window.internals.settings.setCSSExclusionsEnabled(true); 6 window.internals.settings.setCSSExclusionsEnabled(true);
7 </script> 7 </script>
8 <style> 8 <style>
9 .shape-inside { 9 .box {
10 position: absolute; 10 width: 450px;
11 left: 0px; 11 height: 100px;
12 width: 600px; 12 line-height: 20px;
13 height: 200px; 13 outline: 2px solid green;
14 -webkit-shape-inside: rectangle(50px, 50px, 400px, 100px);
15 } 14 }
16 15
17 .shape-background { 16 .rectangle {
18 position: absolute; 17 -webkit-shape-inside: rectangle(25px, 25px, 400px, 50px);
19 left: 50px;
20 width: 400px;
21 height: 100px;
22 background-color: green;
23 } 18 }
24 19
25 #shape-background-no-overlap { 20 .rounded-rectangle {
26 top: 50px; 21 width: 100px;
22 height: 100px;
23 -webkit-shape-inside: rectangle(0, 0, 100%, 100%, 25%, 25%);
27 } 24 }
28 25
29 #shape-inside-no-overlap { 26 .smaller-rounded-rectangle {
30 top: 0px; 27 width: 100px;
31 } 28 height: 100px;
32 #shape-inside-no-overlap::before, #shape-inside-overlap::before { 29 -webkit-shape-inside: rectangle(0, 0, 75%, 75%, 25%, 25%);
33 display: block;
34 height: 150px;
35 content: ' ';
36 }
37 #shape-inside-overlap::before {
38 height: 149.9px;
39 }
40 #shape-background-overlap {
41 top: 250px;
42 } 30 }
43 31
44 #shape-inside-overlap { 32 .details {
45 top: 200px; 33 padding-top: 15px;
34 font-style: italic;
46 } 35 }
47 </style> 36 </style>
48 </head> 37 </head>
49 38
50 <body> 39 <body>
51 <div id="shape-background-no-overlap" class="shape-background"></div> 40 <div class="box rectangle">
52 <div id="shape-inside-no-overlap" class="shape-inside">This text should appear below and to the left of the green rectangle.</div> 41 <p style="padding-top: 55px;">Content1</p>
42 </div>
43 <p class="details">There is a 400x50px shape-inside rectangle inside the green b ox.<br/>The Content1 text line's bottom equals to the shape-inside's rectangle b ottom boundary, so it should fit in the shape-inside.</p>
44 <hr>
53 45
54 <div id="shape-background-overlap" class="shape-background"></div> 46 <div class="box rectangle">
55 <div id="shape-inside-overlap" class="shape-inside">This text should directly appear below the green rectangle.</div> 47 <p style="padding-top: 60px;">Content2</p>
48 </div>
49 <p class="details">There is a 400x50px shape-inside rectangle inside the green b ox.<br/>The Content2 text line overlaps with the shape-inside's rectangle bottom boundary, so the Content2 should be pushed below the content box.</p>
50 <hr>
51
52 <div class="box rectangle">
53 <p style="padding-top: 76px;">Content3</p>
54 </div>
55 <p class="details">There is a 400x50px shape-inside rectangle inside the green b ox.<br/>The Content3 text line starts after the shape-inside's rectangle bottom boundary, so the Content3 should be pushed below the content box.</p>
56 <hr>
57
58 <div class="box rounded-rectangle">
59 <p style="padding-top: 90px;">Content4</p>
60 </div>
61 <p class="details">There is a 100x100px shape-inside rounded rectangle inside th e green box.<br/>The shape top and bottom boundaries match with the content box boundaries, the overflow should start on the left, below the green content box.< /p>
62 <hr>
63
64 <div class="box smaller-rounded-rectangle">
65 <p style="padding-top: 60px;">Content5</p>
66 </div>
67 <p class="details">There is a 75x75px shape-inside rounded rectangle inside the green 100x100px box.<br/>The forth line should overflow, the overflow should sta rt on the left, below the green content box.</p>
68 <hr>
69
70 <p>Based on a recent change on the <a href="http://dev.w3.org/csswg/css-exclusio ns/#shape-inside-property">exclusions specification</a>. The 'shape-inside' prop erty adds an exclusion area to the element's wrapping context.
71 This modifies the normal rectangular shape of the content area to a possibly non -rectangular wrapping area. The exclusion area added is defined by subtracting t he shape from the element's content area.</p>
72 <p>Bug <a href="http://webkit.org/b/114526 ">114526</a>: [CSS Exclusions] shape- inside overflow should be pushed to the outside of the content box</p>
56 </body> 73 </body>
57 </html> 74 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698