New issue
Advanced search Search tips

Issue 771885 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug
Team-Security-UX



Sign in to add a comment

Permission prompts on minimised windows on Mac do not appear

Project Member Reported by timloh@chromium.org, Oct 5 2017

Issue description

On Mac (I tested Canary, other platforms seem fine):
- Open a window that will request some permission shortly
- Minimise the window
- The permission is requested
- Re-activate the window

At this point, the permission prompt should appear, but it doesn't. Switching tabs away and back shows the prompt (this deletes and recreates the UI).

The attachment at  bug 770092  can be used to test this.
 
Owner: tapted@chromium.org
Status: Assigned (was: Untriaged)
I can take this (unless you wanna)
Is this a regression? (I think it is, but if it isn't maybe we could just wait for Mac views prompts?)
It's not a regression. This has never worked. (e.g. this also happens with --enable-features=CocoaPermissionBubbles in Canary).

I think most of the problems described in  Issue 770092  are resolved with MacViews bubbles, but this one remains since it happens with both.
Actually I didn't check if this worked in m60, which is before the bisect that was done in  Issue 770092  (and where there are only Cocoa bubbles).
Prior to M60 this was even more broken, see https://bugs.chromium.org/p/chromium/issues/detail?id=719016#c3.
Status: Started (was: Assigned)
https://chromium-review.googlesource.com/c/chromium/src/+/706879
Project Member

Comment 7 by bugdroid1@chromium.org, Oct 10 2017

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

commit 89447d9530e51aab8128f25605862c10edbd3ae7
Author: Trent Apted <tapted@chromium.org>
Date: Tue Oct 10 10:46:30 2017

MacViews: Watch NSWindowDidDeminiaturizeNotification for NSWindow parents

For views::Widgets with non-Widget parent windows, an adapter currently
just watches for NSWindowDidChangeOcclusionStateNotification on the
parent window when deciding to show a "visible" Widget that had a hidden
parent window when the child was shown. For a deminiaturize on the parent,
NSWindowDidChangeOcclusionStateNotification triggers, but it triggers
before -[NSWindow isVisible] returns YES for the parent, so isn't useful.

To fix, also watch NSWindowDidDeminiaturizeNotification.

Bug:  771885 
Change-Id: I094a090198d1107bf0ef597d4d2e606634b7dc54
Reviewed-on: https://chromium-review.googlesource.com/706879
Commit-Queue: Trent Apted <tapted@chromium.org>
Reviewed-by: Patti <patricialor@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507633}
[modify] https://crrev.com/89447d9530e51aab8128f25605862c10edbd3ae7/ui/views/cocoa/widget_owner_nswindow_adapter.mm
[modify] https://crrev.com/89447d9530e51aab8128f25605862c10edbd3ae7/ui/views/widget/native_widget_mac_unittest.mm

Comment 8 by tapted@chromium.org, Oct 11 2017

Status: Fixed (was: Started)

Comment 9 by sahel@chromium.org, Oct 19 2017

Cc: sahel@chromium.org
Status: Assigned (was: Fixed)
NativeWidgetMacTest.VisibleAfterNativeParentDeminiaturize which is added in https://chromium-review.googlesource.com/c/chromium/src/+/706879 is flaky on Mac10.10 Tests.

failure log:
[ RUN      ] NativeWidgetMacTest.VisibleAfterNativeParentDeminiaturize
../../ui/views/widget/native_widget_mac_unittest.mm:816: Failure
Value of: [native_parent isVisible]
  Actual: true
Expected: false
../../ui/views/widget/native_widget_mac_unittest.mm:817: Failure
Value of: child->IsVisible()
  Actual: true
Expected: false
[  FAILED  ] NativeWidgetMacTest.VisibleAfterNativeParentDeminiaturize (126 ms)
[ RUN      ] NativeWidgetMacTest.VisibleAfterNativeParentDeminiaturize
../../ui/views/widget/native_widget_mac_unittest.mm:816: Failure
Value of: [native_parent isVisible]
  Actual: true
Expected: false
../../ui/views/widget/native_widget_mac_unittest.mm:817: Failure
Value of: child->IsVisible()
  Actual: true
Expected: false
[  FAILED  ] NativeWidgetMacTest.VisibleAfterNativeParentDeminiaturize (87 ms)
[ RUN      ] NativeWidgetMacTest.VisibleAfterNativeParentDeminiaturize
../../ui/views/widget/native_widget_mac_unittest.mm:816: Failure
Value of: [native_parent isVisible]
  Actual: true
Expected: false
../../ui/views/widget/native_widget_mac_unittest.mm:817: Failure
Value of: child->IsVisible()
  Actual: true
Expected: false
[  FAILED  ] NativeWidgetMacTest.VisibleAfterNativeParentDeminiaturize (83 ms)
[ RUN      ] NativeWidgetMacTest.VisibleAfterNativeParentDeminiaturize
../../ui/views/widget/native_widget_mac_unittest.mm:816: Failure
Value of: [native_parent isVisible]
  Actual: true
Expected: false
../../ui/views/widget/native_widget_mac_unittest.mm:817: Failure
Value of: child->IsVisible()
  Actual: true
Expected: false
[  FAILED  ] NativeWidgetMacTest.VisibleAfterNativeParentDeminiaturize (133 ms)

sample failure link:
https://uberchromegw.corp.google.com/i/chromium.mac/builders/Mac10.10%20Tests/builds/25167

tpted@ could you please take a look?
Status: Started (was: Assigned)
yep - I'll investigate
Labels: -Pri-3 Pri-1
Status: Fixed (was: Started)
Opened Issue 777247 for the flakes.

Sign in to add a comment