New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 758182 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug

Blocking:
issue 583289



Sign in to add a comment

Local NTP: Fix RTL support

Project Member Reported by treib@chromium.org, Aug 23 2017

Issue description

The API embeddedSearch.searchBox.rtl was removed in https://codereview.chromium.org/2884293002/ because it was supposedly unused. However, the local NTP does still (try to) use it. We should either re-add .rtl to the API (and fix all resulting weirdnesses - currently OGB and voice search break in RTL), or fully remove RTL support from the local NTP.
Since the remote NTP doesn't have any RTL support, I'm tempted to just remove it all.
 

Comment 1 by treib@chromium.org, Aug 23 2017

Summary: Local NTP: Fix RTL support (was: Local NTP: Either fix or remove RTL support)
Hm, on further investigation, the remote NTP does have RTL support, it just doesn't use the searchBox API to trigger it. So we should fix it for the local NTP.

Comment 2 by treib@chromium.org, Aug 23 2017

To test RTL: --force-ui-direction=rtl

Comment 3 by treib@chromium.org, Aug 23 2017

...except that doesn't work for the NTP, because that flag currently isn't passed to the renderer process.

Comment 4 by treib@chromium.org, Aug 23 2017

Cc: -treib@chromium.org
Labels: M-63
Owner: treib@chromium.org
Status: Started (was: Available)

Comment 5 by treib@chromium.org, Aug 24 2017

Labels: -M-63 M-62
Turns out the fix is pretty simple, and the OGB does in fact work correctly (with an actual RTL language, not with the --force-ui-direction flag though). Let's get the fix into 62.
Project Member

Comment 6 by bugdroid1@chromium.org, Aug 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ad33cf94f3251449231decff805b91443635ad87

commit ad33cf94f3251449231decff805b91443635ad87
Author: Marc Treib <treib@chromium.org>
Date: Thu Aug 24 11:19:00 2017

Local NTP: Fix RTL support

Detecting RTL mode depends on embeddedSearch.searchBox.rtl, which was
mistakenly removed in https://codereview.chromium.org/2884293002/.
This adds back that API, so the local NTP can detect RTL-ness again.
It also adds a test to verify that the RTL flag makes it all the way to
the page, plus some plumbing to make the --force-ui-direction flag work
with the NTP.

Bug:  758182 
Change-Id: I3e11d5c00a8ff6bf5e6306cbc3142cd2257460b1
Reviewed-on: https://chromium-review.googlesource.com/631680
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: Chris Pickel <sfiera@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497004}
[modify] https://crrev.com/ad33cf94f3251449231decff805b91443635ad87/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/ad33cf94f3251449231decff805b91443635ad87/chrome/browser/ui/search/local_ntp_browsertest.cc
[modify] https://crrev.com/ad33cf94f3251449231decff805b91443635ad87/chrome/renderer/resources/extensions/searchbox_api.js
[modify] https://crrev.com/ad33cf94f3251449231decff805b91443635ad87/chrome/renderer/searchbox/searchbox_extension.cc

Comment 7 by treib@chromium.org, Aug 24 2017

Status: Fixed (was: Started)

Sign in to add a comment