Bug 1497163 [wpt PR 13388] - [LayoutNG] Correct LayoutText::LinesBoundingBox() for vertical-rl., a=testonly
authorMorten Stenshorne <mstensho@chromium.org>
Thu, 11 Oct 2018 09:31:43 +0000
changeset 496775 c1b374a8deaf00ab2c25e5af0dd6e10338f5c75c
parent 496774 e8201978a4abad1f4c8606ddad2b53d8cc2dc8ea
child 496776 5fcb3470239e64906db361514e5a956cd638a227
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1497163, 13388, 889449, 1264596, 597541
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1497163 [wpt PR 13388] - [LayoutNG] Correct LayoutText::LinesBoundingBox() for vertical-rl., a=testonly Automatic update from web-platform-tests[LayoutNG] Correct LayoutText::LinesBoundingBox() for vertical-rl. NG needs to produce a rectangle with the block-axis offset relatively to block-start of the container, just like legacy does. Using purely physical coordinates is wrong. This fixes issues with scroll anchoring, and possibly other things too. One test had to be rebaselined, due to a rounding change. LayoutText::DebugRect() calls LinesBoundingBox(), which now flips the block-axis coordinate for vertical-rl. This affects rounding of the size of the rectangle. Bug: 889449 Change-Id: I7053ed7fe05ce443f53a128660d60f27fea7f8b3 Cq-Include-Trybots: luci.chromium.try‚Äč:linux_layout_tests_layout_ng Reviewed-on: https://chromium-review.googlesource.com/c/1264596 Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Reviewed-by: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#597541} -- wpt-commits: 698d3553c23008550c9a68b196154e97ce2ed7d8 wpt-pr: 13388
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-scroll-anchoring/text-anchor-in-vertical-rl.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-scroll-anchoring/">
+<p>There should be no red below.</p>
+<div id="container" style="writing-mode:vertical-rl; overflow:auto; width:300px; height:300px;">
+  <div style="width:300px; background:red;"></div>
+  <div style="width:400px; font-size:16px; line-height:25px;">
+    <span id="displayMe" style="color:red; display:none;">
+      FAIL<br>FAIL<br>FAIL<br>FAIL<br>
+    </span>
+    line<br>
+  </div>
+  <div id="displayMeToo" style="display:none; width:300px; background:red;"></div>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+  test(()=> {
+      var container = document.getElementById("container");
+      var displayMe = document.getElementById("displayMe");
+      var displayMeToo = document.getElementById("displayMeToo");
+      // Scroll the text container into view.
+      container.scrollLeft = 100;
+      displayMe.style.display = "inline";
+      displayMeToo.style.display = "block";
+      assert_equals(container.scrollLeft, 300);
+  }, "Line at edge of scrollport shouldn't jump visually when content is inserted before");