Commit 838b755a authored by jameslahm's avatar jameslahm Committed by V8 LUCI CQ

fix(internationalization): correct orientation RTL check in JSLocale::TextInfo

Originally, the check "if (orientation == ULOC_LAYOUT_LTR)" lead dir
to be "rtl" when orientation is "ltr". Fix it to correct check
"if (orientation == ULOC_LAYOUT_RTL)"

Bug: v8:12531
Change-Id: I5fba29466c66b4fd05e31ddbe4083c16c19e9005
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3459928Reviewed-by: 's avatarFrank Tang <ftang@chromium.org>
Reviewed-by: 's avatarShu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79213}
parent ef0fbafd
......@@ -689,7 +689,7 @@ MaybeHandle<JSObject> JSLocale::TextInfo(Isolate* isolate,
THROW_NEW_ERROR(isolate, NewRangeError(MessageTemplate::kIcuError),
JSObject);
}
if (orientation == ULOC_LAYOUT_LTR) {
if (orientation == ULOC_LAYOUT_RTL) {
// Let dir be "rtl".
dir = factory->rtl_string();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment