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

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

Issue 2716583002: Avoid negative content box sizes. (Closed)
Patch Set: code review Created 3 years, 9 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="position:relative; width:500px;">
3 <!-- With such large horizontal borders and padding, the content box width
4 of the following block should become 0, since its available width 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-top and padding-bottom). -->
9 <div style="position:relative; padding:0 1234567890px; border-width:0 123456 7890px; border-style:solid;">
10 <div id="inner" style="padding:10%; height: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").offsetTop, 300);
22 assert_equals(document.getElementById("inner").offsetWidth, 0);
23 assert_equals(document.getElementById("inner").offsetHeight, 300);
24 }, "Sizes should never become negative");
25 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698