Closed Bug 2068988 Opened 2 months ago Closed 2 months ago

[wpt-sync] Sync PR 62411 - Fix missing line break before entering unicode-bidi scope

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 62411 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/62411
Details from upstream follow.

Charles Zhang <csalinezh@gmail.com> wrote:

Fix missing line break before entering unicode-bidi scope

Prior to this patch, LayoutNG's LineBreaker::HandleBidiControlItem()
invokes ICU to find the break opportunity only when exiting a bidi
scope. It ignores opportunities when entering such a scope, e.g. at
unicode-bidi: isolate or \<bdi> boundaries.

That's fine when preceded by a breakable space, but is problematic when
a character that allows a break to follow is used, such as the hyphen-
minus. The bidi control characters injected by inline_items_builder.cc
belong to UAX#14 line break class CM, which should get combined with the
preceding base characters and ignored per UAX#14 LB9.

This patch adds the line break opportunity check when entering a bidi
scope, gated by feature flag LineBreakBidiControlEnter.

Fixed: 477829708
Change-Id: Ie6bcfc3c77a6afb967d5348e45be3d3dde3849a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8284218
Commit-Queue: Kent Tamura \<tkent@chromium.org>
Reviewed-by: Koji Ishii \<kojii@chromium.org>
Auto-Submit: Charles Zhang \<csalinezh@gmail.com>
Reviewed-by: Kent Tamura \<tkent@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1691195}

Component: web-platform-tests → Layout
Product: Testing → Core

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1236 tests

Status Summary

Firefox

OK : 1[GitHub] 81[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 11[GitHub] 13[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 390[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 1498[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 1501[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 1505[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt]
FAIL: 25[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 52[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 54[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 59[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview]

Chrome

OK : 1
PASS: 7
FAIL: 4

Safari

OK : 1
PASS: 11

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Tests Disabled in Gecko Infrastructure

Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/8c398540b8bc https://hg.mozilla.org/integration/autoland/rev/6e5f327636a9 [wpt PR 62411] - Fix missing line break before entering unicode-bidi scope, a=testonly
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
You need to log in before you can comment on or make changes to this bug.