New issue
Advanced search Search tips

Issue 802257 link

Starred by 7 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: 30
NextAction: 2018-01-19
OS: Mac
Pri: 1
Type: Bug


Sign in to add a comment

[macviews] browser mode should be controllable via a feature

Project Member Reported by ellyjo...@chromium.org, Jan 16 2018

Issue description

Right now, macviews browser vs cocoa browser is a build config option; it should instead be controlled via a base::Feature so that people can test macviews browser without having to do a new build.

The base::Feature is ViewsBrowserWindows, so --enable-features=ViewsBrowserWindows.
 
The NextAction date has arrived: 2018-01-19
Status: Started (was: Assigned)
Good news! <https://chromium-review.googlesource.com/c/chromium/src/+/874730>

Bad news:
1) Infobars don't work, probably because of a symbol conflict
2) There are probably other symbol conflicts waiting to cause puzzling crashes

Comment 3 by tapted@chromium.org, Jan 23 2018

Blocking: 671916
Background on why this bug exists:

In the mid/long term, the Mac team would like to use MacViews for primary as well as secondary UI - i.e., to ship a mac_views_browser build as the real Mac chromium. Right now, mac_views_browser is a build flag, which means that enabling or disabling it is a very large lever with a lot of associated risk, because we obviously can't control build flags using Finch. It would be good therefore for the launch process not to involve a build flag.

To have a Finch-controllable "macviews or cocoa" switch, we need to produce one binary that can display either UI. There are two ways to do that: have the Cocoa browser come to incorporate all the MacViews code, or have the MacViews browser come to incorporate all the Cocoa code. Linking both UIs in increases the browser binary's size by about 25-30% (subject to adjustment - I didn't try to optimize this *at all*), so it seems better to have the shipping browser stay small while we stabilize and shake the bugs out of the MacViews browser UI. Therefore, we want to start linking the Cocoa UI code into MacViews browser, still behind the mac_views_browser build flag.

This way, we can:
1) Get all the Cocoa code linked into mac_views_browser, behind a *runtime* flag (which I've called "polychrome" in this bug, with values either "cocoa" or "views")
2) Stabilize the --polychrome=cocoa configuration
3) Make --polychrome=cocoa the default for mac_views_browser builds
3) Carefully set mac_views_browser = true, which should(*) have no visible UI effects at all
4) If horrible problems appear, revert mac_views_browser to false
4) Once mac_views_browser = true --polychrome=cocoa is fully stable, we're positioned to set --polychrome=views via Finch or any other mechanism.

There is a Google-internal design document describing the full launch process here: <https://goto.google.com/chrome-mac:mvb-launch-plan>
Project Member

Comment 5 by bugdroid1@chromium.org, Jan 29 2018

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

commit e11a396c29b54c08c0744f3284cb17ee24d3e753
Author: Elly Fong-Jones <ellyjones@chromium.org>
Date: Mon Jan 29 18:54:52 2018

macviews: split cocoa sources into variables

This change moves Cocoa-only browser and test source files into variables, to
reduce merge conflicts while these files get integrated into the Views browser
builds as well.

Bug:  802257 , 804950 
Change-Id: I123b778fb7614afc20a50a800eab5ae2a6290b24
Reviewed-on: https://chromium-review.googlesource.com/889792
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532515}
[modify] https://crrev.com/e11a396c29b54c08c0744f3284cb17ee24d3e753/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/e11a396c29b54c08c0744f3284cb17ee24d3e753/chrome/test/BUILD.gn

Project Member

Comment 6 by bugdroid1@chromium.org, Jan 31 2018

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

commit de30ba8e626978965312af8c42f3cb89bb808519
Author: Elly Fong-Jones <ellyjones@chromium.org>
Date: Wed Jan 31 14:26:50 2018

macviews: introduce polychrome

This change introduces a new command line flag, --polychrome, which causes
a mac_views_browser build to use the existing Cocoa UI instead of the new
Views browser UI. This involves:

1) Linking all of the Cocoa UI in when building the Views browser;
2) Resolving symbol and filename conflicts;
3) Introducing views_mode_controller::IsViewsBrowserCocoa();
4) Having BrowserWindowFactory choose which type of BrowserWindow to create
   based on the value of views_mode_controller::IsViewsBrowserCocoa()

This change also makes unit_tests build, but not any other targets - it is
likely that browser_tests does not build. The resulting mac_views_browser
*runs* but is unstable because of  bug 804950 , which is hard to address
without this CL being landed.

The current name is deliberately a bit silly, under the theory that we'll pick
a better one once the approach solidifies :)

Bug:  802257 , 804950 
Change-Id: I30aaef7ed08dd11b66d59d5b816f57641bf2f209
Reviewed-on: https://chromium-review.googlesource.com/874730
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Reviewed-by: Trent Apted <tapted@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533267}
[modify] https://crrev.com/de30ba8e626978965312af8c42f3cb89bb808519/chrome/browser/infobars/infobar_service.h
[modify] https://crrev.com/de30ba8e626978965312af8c42f3cb89bb808519/chrome/browser/ssl/ssl_client_certificate_selector.h
[modify] https://crrev.com/de30ba8e626978965312af8c42f3cb89bb808519/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/de30ba8e626978965312af8c42f3cb89bb808519/chrome/browser/ui/browser_window.h
[modify] https://crrev.com/de30ba8e626978965312af8c42f3cb89bb808519/chrome/browser/ui/cocoa/browser_window_factory_cocoa.mm
[modify] https://crrev.com/de30ba8e626978965312af8c42f3cb89bb808519/chrome/browser/ui/cocoa/infobars/confirm_infobar_controller.mm
[modify] https://crrev.com/de30ba8e626978965312af8c42f3cb89bb808519/chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm
[modify] https://crrev.com/de30ba8e626978965312af8c42f3cb89bb808519/chrome/browser/ui/views/certificate_viewer_mac_views.mm
[modify] https://crrev.com/de30ba8e626978965312af8c42f3cb89bb808519/chrome/browser/ui/views/frame/browser_window_factory.cc
[modify] https://crrev.com/de30ba8e626978965312af8c42f3cb89bb808519/chrome/browser/ui/views/infobars/confirm_infobar.cc
[modify] https://crrev.com/de30ba8e626978965312af8c42f3cb89bb808519/chrome/browser/ui/views/ssl_client_certificate_selector.cc
[add] https://crrev.com/de30ba8e626978965312af8c42f3cb89bb808519/chrome/browser/ui/views_mode_controller.cc
[add] https://crrev.com/de30ba8e626978965312af8c42f3cb89bb808519/chrome/browser/ui/views_mode_controller.h
[modify] https://crrev.com/de30ba8e626978965312af8c42f3cb89bb808519/chrome/common/chrome_features.cc
[modify] https://crrev.com/de30ba8e626978965312af8c42f3cb89bb808519/chrome/common/chrome_features.h
[modify] https://crrev.com/de30ba8e626978965312af8c42f3cb89bb808519/chrome/test/BUILD.gn

Blockedon: 808017
Pls add appropriate milestone label. I think it should be M-67, correct?
Labels: M-67
Blockedon: 810479
Blockedon: 810480
Blockedon: 810481
Blockedon: 810482
Description: Show this description
Project Member

Comment 15 by bugdroid1@chromium.org, Mar 22 2018

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

commit e09df9251bdc1f717aa76df1629a04143971a15e
Author: Elly Fong-Jones <ellyjones@chromium.org>
Date: Thu Mar 22 21:30:46 2018

polychrome: flip the flag

This change causes all Mac targets to build with mac_views_browser
set to true. See comment 4 on the linked bug for details about why.

Bug:  802257 
Change-Id: Ic4fb9b4282d03d02c16b0f2e29bff78ba2f38e04
Reviewed-on: https://chromium-review.googlesource.com/969078
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545258}
[modify] https://crrev.com/e09df9251bdc1f717aa76df1629a04143971a15e/ui/base/ui_features.gni

Project Member

Comment 16 by bugdroid1@chromium.org, Mar 23 2018

Status: Fixed (was: Started)
As of #15 and #16, this is Fixed.
Project Member

Comment 18 by bugdroid1@chromium.org, Oct 9

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

commit 90775b9a06bb6782768f4b743aa9bf1e315193db
Author: Nico Weber <thakis@chromium.org>
Date: Tue Oct 09 20:37:23 2018

mac: Inline cocoa_browser_sources.

These source files are all still used in the new views browser.

Bug:  832676 , 802257 , 804950 
Change-Id: Ide348cda6322fcbcc1d17482d522fdfd0cc76cee
Reviewed-on: https://chromium-review.googlesource.com/c/1271715
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598068}
[modify] https://crrev.com/90775b9a06bb6782768f4b743aa9bf1e315193db/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/90775b9a06bb6782768f4b743aa9bf1e315193db/chrome/test/BUILD.gn

Sign in to add a comment