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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/block/large-padding-vertical-writing-mode.html
diff --git a/third_party/WebKit/LayoutTests/fast/block/large-padding-vertical-writing-mode.html b/third_party/WebKit/LayoutTests/fast/block/large-padding-vertical-writing-mode.html
new file mode 100644
index 0000000000000000000000000000000000000000..ea673a9ad5649db7e303ad824fd277c4c8ac0f5a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/block/large-padding-vertical-writing-mode.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<div style="writing-mode:vertical-lr; position:absolute; height:500px; right:0;">
+ <!-- With such large vertical borders and padding, the content box height
+ of the following block should become 0, since its available height is
+ just 500px. The percentage padding specified on its child should
+ resolve to 0 for all sides, since percentage padding is always
+ resolved against the logical *width* of the containing block (even for
+ padding-left and padding-right). -->
+ <div style="position:relative; padding:1234567890px 0; border-width:1234567890px 0; border-style:solid;">
+ <div id="inner" style="padding:10%; width:300px;"></div>
+ </div>
+ <!-- And here's a sibling to verify that the insane border and padding and
+ percentage padding resolution didn't have any ill effects on block
+ progression. -->
+ <div id="sibling"></div>
+</div>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+ test(() => {
+ assert_equals(document.getElementById("sibling").offsetLeft, 300);
+ assert_equals(document.getElementById("inner").offsetHeight, 0);
+ assert_equals(document.getElementById("inner").offsetWidth, 300);
+ }, "Sizes should never become negative");
+</script>

Powered by Google App Engine
This is Rietveld 408576698