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

Unified Diff: LayoutTests/fast/writing-mode/orthogonal-parent-width-min-content.html

Issue 1121173002: Fix shrink-to-fit when children's writing-mode is orthogonal (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Tests and test results updated Created 5 years, 8 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: LayoutTests/fast/writing-mode/orthogonal-parent-width-min-content.html
diff --git a/LayoutTests/fast/writing-mode/orthogonal-parent-width-min-content.html b/LayoutTests/fast/writing-mode/orthogonal-parent-width-min-content.html
new file mode 100644
index 0000000000000000000000000000000000000000..b91d32cb03fb289bb69d6974e361a8095a1f9a2a
--- /dev/null
+++ b/LayoutTests/fast/writing-mode/orthogonal-parent-width-min-content.html
@@ -0,0 +1,74 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<style>
+.test {
+ font:25px Ahem;
+ margin-top:.2em;
+}
+.target {
+ color:blue;
+ -webkit-writing-mode:vertical-rl;
+}
+.border {
+ border-right:blue solid 1em;
+}
+.next {
+ color:orange;
+}
+.inline-block {
+ display:inline-block;
+}
+table {
+ border-spacing:0px;
+}
+td {
+ padding:0px;
+}
+</style>
+<div id="container">
+<p>Test passes if the <b>left</b> edge of orange box touch the <b>right</b> edge of blue box.
+ There should be no spaces nor overlaps.
+<p>If script is enabled, there should be one or more PASS and no FAIL.
+<div class="test" title="Orthogonal block in inline-block">
+ <div class="inline-block"><div class="target">XX</div></div><span class="next">YY</span>
+</div>
+<div class="test" title="Orthogonal block with borders in inline-block">
+ <div class="inline-block"><div class="target border">XX</div></div><span class="next">YY</span>
+</div>
+<div class="test" title="Orthogonal inline in inline-block">
+ <div class="inline-block"><span class="target">XX</span></div><span class="next">YY</span>
+</div>
+<div class="test" title="Orthogonal block in table-cell">
+ <table>
+ <tr>
+ <td><div class="target">XX</div></td>
+ <td class="next">YY</td>
+ </tr>
+ </table>
+</div>
+<div class="test" title="Orthogonal inline in table-cell">
+ <table>
+ <tr>
+ <td><span class="target">XX</span></td>
+ <td class="next">YY</td>
+ </tr>
+ </table>
+</div>
+</div>
+<script>
+var nodes = document.querySelectorAll(".test");
+for (var i = 0; i < nodes.length; i++) {
+ var node = nodes[i];
+ test(function () {
+ var targetNode = node.querySelector(".target");
+ var targetBounds = targetNode.getBoundingClientRect();
+ var nextNode = node.querySelector(".next");
+ var nextBounds = nextNode.getBoundingClientRect();
+ assert_equals(nextBounds.left - targetBounds.right, 0);
+ }, node.title);
+}
+
+if (window.testRunner)
+ container.style.display = "none";
+</script>

Powered by Google App Engine
This is Rietveld 408576698