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

Issue 657244 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Mac
Pri: 1
Type: Bug
Team-Security-UX


Participants' hotlists:
MacViews-Task-Queue


Sign in to add a comment

Mac/Linux Views Page Info can go off screen to the left

Project Member Reported by lgar...@chromium.org, Oct 19 2016

Issue description

Chrome 56.0.2894.0
OSX 10.11.6

What steps will reproduce the problem?
(1) Enable #mac-views-webui-dialogs
(2) Start Chrome with in an RTL language
(3) Move the Chrome window to the left of the screen.
(4) Open Page Info

What is the expected output?
The entire Page Info bubble can be seen.

What do you see instead?
The bubble goes off-screen (screenshot).

Please use labels and text to provide additional information.

 
Screen Shot 2016-10-18 at 20.52.38 (2).png
649 KB View Download

Comment 1 by tapted@chromium.org, Oct 19 2016

It's probably this code in BubbleDialogDelegateView::CreateBubble():

#if defined(OS_WIN)
  // If glass is enabled, the bubble is allowed to extend outside the bounds of
  // the parent frame and let DWM handle compositing.  If not, then we don't
  // want to allow the bubble to extend the frame because it will be clipped.
  bubble_delegate->set_adjust_if_offscreen(ui::win::IsAeroGlassEnabled());
#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX)
  // Linux clips bubble windows that extend outside their parent window bounds.
  // Mac never adjusts.
  bubble_delegate->set_adjust_if_offscreen(false);
#endif


I.e. "Mac never adjusts.". It was added in https://codereview.chromium.org/1280673003/diff/220001/ui/views/bubble/bubble_delegate.cc but it's unclear why.


But, also, that looks bad for Linux.. does RTL on Linux just clip this bubble?

Really, I think the Page Info bubble just be doing BubbleDialogDelegateView::set_mirror_arrow_in_rtl(false), so that it opens to the right of the origin chip regardless of language.

Comment 2 by tapted@chromium.org, Oct 19 2016

> But, also, that looks bad for Linux.. does RTL on Linux just clip this bubble?

Ohhh except a views browser properly puts the origin chip on the right, but CocoaMac doesn't.
> But, also, that looks bad for Linux.. does RTL on Linux just clip this bubble?

Yes, Linux clips any bubble that goes past the window. :-(
Labels: OS-Linux
Summary: Mac/Linux Page Info can go off screen to the left (was: MacViews Page Info can go off screen to the left.)
Summary: Mac/Linux Views Page Info can go off screen to the left (was: Mac/Linux Page Info can go off screen to the left)
Components: -UI>Browser>Omnibox>PageInfo UI>Browser>Bubbles>PageInfo
In a popup window with a URL bar, the security indicator is on the very left of the window, and even an LTR bubble can go off the left of the screen.

Comment 8 by tapted@chromium.org, Nov 24 2016

Owner: tapted@chromium.org
Status: Started (was: Available)
https://codereview.chromium.org/2532613002
Project Member

Comment 9 by bugdroid1@chromium.org, Nov 30 2016

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

commit c60452305f151964dee9b5eaff7c9b0356c41c16
Author: tapted <tapted@chromium.org>
Date: Wed Nov 30 10:42:07 2016

MacViews: fix bubble direction in RTL.

The Cocoa browser doesn't have good RTL support, and doesn't flip its UI
in RTL. Bubble direction should not flip by default.

Add BUILDFLAG(MAC_VIEWS_BROWSER) to accomplish this.

BUG= 657244 

Review-Url: https://codereview.chromium.org/2532613002
Cr-Commit-Position: refs/heads/master@{#435207}

[modify] https://crrev.com/c60452305f151964dee9b5eaff7c9b0356c41c16/build/config/ui.gni
[modify] https://crrev.com/c60452305f151964dee9b5eaff7c9b0356c41c16/chrome/browser/BUILD.gn
[modify] https://crrev.com/c60452305f151964dee9b5eaff7c9b0356c41c16/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/c60452305f151964dee9b5eaff7c9b0356c41c16/chrome/test/BUILD.gn
[modify] https://crrev.com/c60452305f151964dee9b5eaff7c9b0356c41c16/components/constrained_window/BUILD.gn
[modify] https://crrev.com/c60452305f151964dee9b5eaff7c9b0356c41c16/tools/grit/grit_rule.gni
[modify] https://crrev.com/c60452305f151964dee9b5eaff7c9b0356c41c16/ui/base/BUILD.gn
[modify] https://crrev.com/c60452305f151964dee9b5eaff7c9b0356c41c16/ui/base/ui_features.gni
[modify] https://crrev.com/c60452305f151964dee9b5eaff7c9b0356c41c16/ui/views/BUILD.gn
[modify] https://crrev.com/c60452305f151964dee9b5eaff7c9b0356c41c16/ui/views/bubble/bubble_dialog_delegate.cc
[modify] https://crrev.com/c60452305f151964dee9b5eaff7c9b0356c41c16/ui/views/style/platform_style.cc
[modify] https://crrev.com/c60452305f151964dee9b5eaff7c9b0356c41c16/ui/views/style/platform_style.h
[modify] https://crrev.com/c60452305f151964dee9b5eaff7c9b0356c41c16/ui/views/style/platform_style_mac.mm

Cc: tapted@chromium.org lgrey@chromium.org
Owner: ----
Status: Available (was: Started)
moving to Available for remaining pieces:
 - *Linux* needs to adjust the Page Info bubble in RTL for Popup windows (the location bar is not flipped then - I guess flipping it would be another option)
 - Mac (and Linux) should still try to adjust things that might go offscreen to deal with some weird corner cases, or windows partially offscreen
 - Mac: as --enable-features=ExperimentalMacRTL becomes default the fix in r435207 will need to be revisited
Project Member

Comment 11 by bugdroid1@chromium.org, Dec 1 2016

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

commit 6992f1f07971bf7f2100b6538cf302d8556124ec
Author: tapted <tapted@chromium.org>
Date: Thu Dec 01 08:38:24 2016

Move mac_views_browser grit define out of tools/grit.

tools/grit used to add it, but it should move to chrome_grit_defines
instead to avoid a ui dependency there. It's currently breaking WebRTC.

It's currently used by chrome/app/theme/theme_resources.grd.

(ui_resources.grd might need it later, but it doesn't right now).

BUG= 657244 
TBR=scottmg@chromium.org, sky@chromium.org

Review-Url: https://codereview.chromium.org/2535753007
Cr-Commit-Position: refs/heads/master@{#435582}

[modify] https://crrev.com/6992f1f07971bf7f2100b6538cf302d8556124ec/chrome/common/features.gni
[modify] https://crrev.com/6992f1f07971bf7f2100b6538cf302d8556124ec/tools/grit/grit_rule.gni

Labels: MacViews-Dialogs
Status: Fixed (was: Available)
Screen Shot 2017-05-04 at 15.04.27.png
319 KB View Download

Comment 14 by lgrey@chromium.org, Nov 29 2017

>  - Mac: as --enable-features=ExperimentalMacRTL becomes default the fix in r435207 will need to be revisited
Since MacViews bubbles are shipping by default this is relevant again. tapted@ what's the best way to take the experiment into account for this?
We're disabling MacViews bubbles on the beta branch for m64, so the pressure is off for a milestone :).

Is there likely to be a solid/stuck landing for ExperimentalMacRTL in m64 or m65? If yes, we probably don't need special logic -- we can just revert r435207.

But if it's still in flux, we probably need to expose a temporary interface on views::ViewsDelegate or views::LayoutProvider so that the decision can be fed through to the lower layer.

Comment 16 by lgrey@chromium.org, Nov 29 2017

Not sure. We're waiting on download bar to be baked.

I'll look into the ViewsDelegate thing (seems better than LayoutProvider since it already has a bunch of OS-specific defines.)
Cc: msrchandra@chromium.org ranjitkan@chromium.org rbasuvula@chromium.org nyerramilli@chromium.org
 Issue 792386  has been merged into this issue.
Labels: -Pri-3 Proj-HarmonyDialogs M-65 Pri-1
Owner: lgrey@chromium.org
Status: Assigned (was: Fixed)
Project Member

Comment 19 by bugdroid1@chromium.org, Dec 8 2017

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

commit 780534183c285fc2f43821b905c5191694b873a2
Author: Leonard Grey <lgrey@chromium.org>
Date: Fri Dec 08 14:46:33 2017

[Mac] Support #MacRTL feature in MacViews dialogs

Per discussion on the linked bug, this adds a temporary interface to
views::ViewsDelegate to take the #MacRTL feature into account for bubble
anchoring.

Also removes the platform style constant since it's now redundant.

Bug:  657244 
Change-Id: I9b3d32b2891edf9ef90275ccf6b9ef3648e4b0e8
Reviewed-on: https://chromium-review.googlesource.com/811244
Reviewed-by: Trent Apted <tapted@chromium.org>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522778}
[modify] https://crrev.com/780534183c285fc2f43821b905c5191694b873a2/chrome/browser/ui/views/chrome_views_delegate.h
[modify] https://crrev.com/780534183c285fc2f43821b905c5191694b873a2/chrome/browser/ui/views/chrome_views_delegate_mac.cc
[modify] https://crrev.com/780534183c285fc2f43821b905c5191694b873a2/ui/views/bubble/bubble_dialog_delegate.cc
[modify] https://crrev.com/780534183c285fc2f43821b905c5191694b873a2/ui/views/style/platform_style.cc
[modify] https://crrev.com/780534183c285fc2f43821b905c5191694b873a2/ui/views/style/platform_style.h
[modify] https://crrev.com/780534183c285fc2f43821b905c5191694b873a2/ui/views/style/platform_style_mac.mm
[modify] https://crrev.com/780534183c285fc2f43821b905c5191694b873a2/ui/views/views_delegate.cc
[modify] https://crrev.com/780534183c285fc2f43821b905c5191694b873a2/ui/views/views_delegate.h

Labels: TE-Verified-M65 TE-Verified-65.0.3292.0 TE-Verified-65.0.3293.0
Tested the issue on Ubuntu 14.04 and Mac OS 10.12.6 using chrome latest Canary M65-65.0.3292/3.0 by following steps mentioned in the merged  issue 792386 . Observed that Page info bubble displaying as expected. Hence adding TE-Verified label.

Please find the screen cast for reference.
Note: For linux tested in #65.0.3292.0 due to #65.0.3293.0 build failure.

Thank you!
657244.mp4
1.1 MB View Download
Status: Fixed (was: Assigned)
This is fixed.

Sign in to add a comment