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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/block/large-padding-vertical-writing-mode.html

Issue 2716583002: Avoid negative content box sizes. (Closed)
Patch Set: code review Created 3 years, 10 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
(Empty)
1 <!DOCTYPE html>
2 <div style="writing-mode:vertical-lr; position:absolute; height:500px; right:0;" >
3 <!-- With such large vertical borders and padding, the content box height
4 of the following block should become 0, since its available height is
5 just 500px. The percentage padding specified on its child should
6 resolve to 0 for all sides, since percentage padding is always
7 resolved against the logical *width* of the containing block (even for
8 padding-left and padding-right). -->
9 <div style="position:relative; padding:1234567890px 0; border-width:12345678 90px 0; border-style:solid;">
10 <div id="inner" style="padding:10%; width:300px;"></div>
11 </div>
12 <!-- And here's a sibling to verify that the insane border and padding and
13 percentage padding resolution didn't have any ill effects on block
14 progression. -->
15 <div id="sibling"></div>
16 </div>
17 <script src="../../resources/testharness.js"></script>
18 <script src="../../resources/testharnessreport.js"></script>
19 <script>
20 test(() => {
21 assert_equals(document.getElementById("sibling").offsetLeft, 300);
22 assert_equals(document.getElementById("inner").offsetHeight, 0);
23 assert_equals(document.getElementById("inner").offsetWidth, 300);
24 }, "Sizes should never become negative");
25 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698