Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Issue 1446623003: [Reland] Enable AutoResize for Constrained Web Dialogs for Mac. (Closed)

Created:
5 years, 1 month ago by apacible
Modified:
4 years, 10 months ago
Reviewers:
erikchen, Nico
CC:
chromium-reviews, extensions-reviews_chromium.org, rouslan+autofill_chromium.org, jdonnelly+autofillwatch_chromium.org, bondd+autofillwatch_chromium.org, estade+watch_chromium.org, vabr+watchlistautofill_chromium.org, chromium-apps-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Reland] Enable AutoResize for Constrained Web Dialogs for Mac. Currently only constrained web dialogs for views (Linux/Windows) are able to autoresize. This change implements the option to pass in minimum and maximum sizes and enabling autoresizing functionality for OSX. This change adds two static functions for options on whether to create a ConstrainedWindowsMac that autoresizes or is of fixed size. The initial patch was reverted because of flaky tests in Mac 10.9. Upon further investigation, the ConstrainedWebDialogBrowserTest tests were also flaky on other Mac versions, such as 10.10. At the time, the test would fail once every 4-5,000 runs. After picking up this patch again, I was unable to repro the failing test after ~20,000 runs. The original patch can be found at: https://codereview.chromium.org/1430023002 BUG=217034 Committed: https://crrev.com/c47b9b44157a34aa5df0acebe357dc0164f49887 Cr-Commit-Position: refs/heads/master@{#374039}

Patch Set 1 : cl 1430023002 #

Patch Set 2 : Rebase. #

Patch Set 3 : Fix invalid window creation issue. #

Patch Set 4 : Fix browser tests. #

Total comments: 8

Patch Set 5 : Changes per erikchen@'s comments. #

Patch Set 6 : Changes per thakis@'s comments. #

Total comments: 5

Patch Set 7 : Changes per thakis@'s comments. #

Patch Set 8 : Fix tests. #

Patch Set 9 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+319 lines, -87 lines) Patch
M chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.h View 1 2 3 4 5 6 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.mm View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.h View 1 2 3 4 5 6 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/certificate_viewer_mac.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/certificate_viewer_mac.mm View 1 2 3 4 5 6 2 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm View 1 2 3 4 5 6 7 chunks +139 lines, -18 lines 0 comments Download
M chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sheet.mm View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h View 1 2 3 4 5 6 4 chunks +29 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.mm View 1 2 3 4 5 6 2 chunks +42 lines, -8 lines 0 comments Download
M chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm View 1 2 3 4 5 6 7 6 chunks +16 lines, -10 lines 0 comments Download
M chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller_unittest.mm View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/constrained_window/constrained_window_web_dialog_sheet.mm View 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm View 1 2 3 4 5 6 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/device_permissions_dialog_controller.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/extensions/device_permissions_dialog_controller.mm View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.mm View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.mm View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/login_prompt_cocoa.mm View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/one_click_signin_dialog_controller.h View 1 2 3 4 5 6 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/one_click_signin_dialog_controller.mm View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_dialog_cocoa.h View 1 2 3 4 5 6 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_dialog_cocoa.mm View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/profiles/user_manager_mac.h View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/profiles/user_manager_mac.mm View 1 2 3 4 5 6 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/single_web_contents_dialog_manager_cocoa.mm View 1 4 1 chunk +5 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm View 1 2 3 4 5 6 2 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/tab_modal_confirm_dialog_mac.mm View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/web_contents_modal_dialog_manager_views_mac.mm View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h View 1 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/constrained_web_dialog_ui.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/constrained_web_dialog_ui_browsertest.cc View 1 2 3 7 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 39 (25 generated)
apacible
Previously the initial patch was reverted because of flaky tests on Mac. Initially I was ...
4 years, 10 months ago (2016-02-03 18:56:06 UTC) #20
erikchen
I reviewed the diff between ps2 and ps4. https://codereview.chromium.org/1446623003/diff/300001/chrome/browser/ui/cocoa/single_web_contents_dialog_manager_cocoa.mm File chrome/browser/ui/cocoa/single_web_contents_dialog_manager_cocoa.mm (right): https://codereview.chromium.org/1446623003/diff/300001/chrome/browser/ui/cocoa/single_web_contents_dialog_manager_cocoa.mm#newcode64 chrome/browser/ui/cocoa/single_web_contents_dialog_manager_cocoa.mm:64: if ...
4 years, 10 months ago (2016-02-03 19:11:27 UTC) #21
apacible
https://codereview.chromium.org/1446623003/diff/300001/chrome/browser/ui/cocoa/single_web_contents_dialog_manager_cocoa.mm File chrome/browser/ui/cocoa/single_web_contents_dialog_manager_cocoa.mm (right): https://codereview.chromium.org/1446623003/diff/300001/chrome/browser/ui/cocoa/single_web_contents_dialog_manager_cocoa.mm#newcode64 chrome/browser/ui/cocoa/single_web_contents_dialog_manager_cocoa.mm:64: if (client_->DialogWasShown()) On 2016/02/03 19:11:27, erikchen wrote: > I ...
4 years, 10 months ago (2016-02-03 19:17:27 UTC) #22
erikchen
On 2016/02/03 19:17:27, apacible wrote: > https://codereview.chromium.org/1446623003/diff/300001/chrome/browser/ui/cocoa/single_web_contents_dialog_manager_cocoa.mm > File chrome/browser/ui/cocoa/single_web_contents_dialog_manager_cocoa.mm > (right): > > https://codereview.chromium.org/1446623003/diff/300001/chrome/browser/ui/cocoa/single_web_contents_dialog_manager_cocoa.mm#newcode64 ...
4 years, 10 months ago (2016-02-03 19:26:33 UTC) #23
Nico
https://codereview.chromium.org/1446623003/diff/300001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm File chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm (right): https://codereview.chromium.org/1446623003/diff/300001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm#newcode166 chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm:166: ConstrainedWindowMac* dialog = doesn't this leak? https://codereview.chromium.org/1446623003/diff/300001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm#newcode167 chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm:167: CreateAndShowWebModalDialogMac(&delegate, ...
4 years, 10 months ago (2016-02-04 22:28:29 UTC) #24
apacible
https://codereview.chromium.org/1446623003/diff/300001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm File chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm (right): https://codereview.chromium.org/1446623003/diff/300001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm#newcode166 chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm:166: ConstrainedWindowMac* dialog = On 2016/02/04 22:28:29, Nico wrote: > ...
4 years, 10 months ago (2016-02-05 03:46:00 UTC) #27
Nico
https://codereview.chromium.org/1446623003/diff/380001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h File chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h (right): https://codereview.chromium.org/1446623003/diff/380001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h#newcode28 chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h:28: ConstrainedWindowMac* CreateAndShowWebModalDialogMac( i mean this should return a unique_ptr, ...
4 years, 10 months ago (2016-02-05 15:31:10 UTC) #28
apacible
Switched to unique_ptr. https://codereview.chromium.org/1446623003/diff/380001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h File chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h (right): https://codereview.chromium.org/1446623003/diff/380001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h#newcode28 chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h:28: ConstrainedWindowMac* CreateAndShowWebModalDialogMac( On 2016/02/05 15:31:10, Nico ...
4 years, 10 months ago (2016-02-05 21:40:42 UTC) #29
Nico
lgtm https://codereview.chromium.org/1446623003/diff/380001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h File chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h (right): https://codereview.chromium.org/1446623003/diff/380001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h#newcode28 chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h:28: ConstrainedWindowMac* CreateAndShowWebModalDialogMac( On 2016/02/05 21:40:41, apacible wrote: > ...
4 years, 10 months ago (2016-02-05 21:52:40 UTC) #30
apacible
On 2016/02/05 21:52:40, Nico wrote: > lgtm > > https://codereview.chromium.org/1446623003/diff/380001/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h > File chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h > (right): ...
4 years, 10 months ago (2016-02-06 17:31:11 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1446623003/440001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1446623003/440001
4 years, 10 months ago (2016-02-06 17:32:42 UTC) #34
commit-bot: I haz the power
Committed patchset #9 (id:440001)
4 years, 10 months ago (2016-02-06 18:35:04 UTC) #36
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/c47b9b44157a34aa5df0acebe357dc0164f49887 Cr-Commit-Position: refs/heads/master@{#374039}
4 years, 10 months ago (2016-02-06 18:36:20 UTC) #38
apacible
4 years, 10 months ago (2016-02-07 20:54:08 UTC) #39
Message was sent while issue was closed.
A revert of this CL (patchset #9 id:440001) has been created in
https://codereview.chromium.org/1674063002/ by apacible@chromium.org.

The reason for reverting is: Flaky on Mac 10.9 again.

See:
https://build.chromium.org/p/chromium.mac/builders/Mac10.9%20Tests
https://build.chromium.org/p/chromium.mac/builders/Mac10.9%20Tests%20%28dbg%29.

Powered by Google App Engine
This is Rietveld 408576698