Bug 1631501 [wpt PR 23119] - Fix inline box positions when RTL and has trailing spaces, a=testonly
authorKoji Ishii <kojii@chromium.org>
Tue, 28 Apr 2020 11:33:55 +0000
changeset 527529 07304516644e8cbf88a55bab5bd53220371584a7
parent 527528 2aa412131761b51c58eade279c9e390763da31b2
child 527530 44d409aa5cdf8ba7c847b56ae7133175cc6ca20b
push id37368
push userbtara@mozilla.com
push dateFri, 01 May 2020 21:45:51 +0000
treeherdermozilla-central@0f9c5a59e45d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1631501, 23119, 316409, 1062716, 2156235, 760793
milestone77.0a1
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 1631501 [wpt PR 23119] - Fix inline box positions when RTL and has trailing spaces, a=testonly Automatic update from web-platform-tests Fix inline box positions when RTL and has trailing spaces This patch fixes inline box positions when the line is in RTL and has preserved trailing spaces. Two issues were found for this case: a. Computes incorrect value for how much the line hangs. b. When hang is not zero, inline box positions are incorrect. This patch fixes the issue b. The issue a is related but does not contribute to the reported symptom. It should be worked with better trailing space support and UAX#9 L1 support (crbug.com/316409). TODO comment added for this issue. Bug: 1062716 Change-Id: Ie33db517ebc886a724116b594699f8d59751c808 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2156235 Reviewed-by: Kent Tamura <tkent@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#760793} -- wpt-commits: 44215ed1f182054fdd55a43035b70041b50d61b0 wpt-pr: 23119
testing/web-platform/tests/css/css-text/white-space/reference/trailing-space-rtl-001-ref.html
testing/web-platform/tests/css/css-text/white-space/trailing-space-rtl-001.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/white-space/reference/trailing-space-rtl-001-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<style>
+body {
+  direction: rtl;
+  white-space: pre-wrap;
+}
+.bg {
+  background: orange;
+}
+.override {
+  unicode-bidi: bidi-override;
+}
+</style>
+<body>
+<div>אבג <span class="bg">אבגד</span> אבגדה</div>
+<div>אבג <span class="bg">אבגד</span> אבגדה</div>
+<div class="override">123 <span class="bg override">12345</span> 1234567</div>
+<div class="override">123 <span class="bg override">12345</span> 1234567</div>
+</body>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/white-space/trailing-space-rtl-001.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<title>CSS Test: Preserved trailing spaces in RTL</title>
+<link rel="match" href="reference/trailing-space-rtl-001-ref.html">
+<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
+<link rel="author" title="Koji Ishii" href="mailto:kojii@chromium.org">
+<style>
+body {
+  direction: rtl;
+  white-space: pre-wrap;
+}
+.bg {
+  background: orange;
+}
+.override {
+  unicode-bidi: bidi-override;
+}
+</style>
+<body>
+<div>אבג <span class="bg">אבגד</span> אבגדה</div>
+<div>אבג <span class="bg">אבגד</span> אבגדה </div>
+<div class="override">123 <span class="bg override">12345</span> 1234567</div>
+<div class="override">123 <span class="bg override">12345</span> 1234567 </div>
+</body>