New issue
Advanced search Search tips

Issue 839972 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 1
Type: Bug

Blocking:
issue 821991



Sign in to add a comment

Add a material refresh touch mode

Project Member Reported by kylixrd@chromium.org, May 4 2018

Issue description

We're going to need to have a mode that enables the touch-mode dimensions that is coupled with the material refresh mode.

The working solution right now is to add a material-refresh-touch flag to the top-chrome-md flag. This is simpler for the various arrays indexed by this enum in layout_constants.cc
 
Blocking: 821991
More detail:

* the "is material touch" oracle function would return true for both touchable and touchable-refresh
* we'd want an oracle for "is refresh" that would return true for refresh and touchable-refresh, and want to switch pretty much all existing "mode == refresh" calls to use it
* Some auditing of existing calls may be necessary to make sure things are sane going forward

Comment 3 by pbos@chromium.org, May 4 2018

Some auditing should probably include all MaterialDesignController::GetMode() and IsTouchable.. / IsNewerMaterial() calls.
Cc: -pbos@chromium.org
Owner: pbos@chromium.org
Status: Assigned (was: Available)
Project Member

Comment 5 by bugdroid1@chromium.org, May 14 2018

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

commit 756745ddcb1990a9dba4ad95ed5906fbd27a95f9
Author: Peter Boström <pbos@chromium.org>
Date: Mon May 14 22:59:43 2018

Add a Touchable Material Refresh mode

Adds a top-chrome-md entry for Touchable Material Refresh under
chrome://flags which is Refresh with a looser Touchable layout.

This change adds MATERIAL_TOUCH_REFRESH to MaterialDesignController
which enables both IsTouchOptimizedUiEnabled() and IsNewerMaterialUi().

All calls to GetMode() have been audited to make sure
MATERIAL_TOUCH_REFRESH doesn't go out of bounds for kValue[mode]
indexes. Most of these values have been filled in with the same values
as Touchable (except for NTB size and tab insets) but they are subject
to change as this mode gets audited further.

A new method IsRefreshUi() is added to the MaterialDesignController
which is true for MATERIAL_REFRESH and MATERIAL_TOUCH_REFRESH.

All explicit MATERIAL_REFRESH checks have been updated to use
IsRefreshUi() instead of MATERIAL_REFRESH directly. Where this is
incorrect and Touchable should take precedence the code will have to
be updated to look at IsTouchOptimizedUiEnabled() first (in separate
future changes).

Bug:  chromium:839972 
Change-Id: If0c8bfbd3ce0b33c578260b9e4c8af9e7edc93e9
Reviewed-on: https://chromium-review.googlesource.com/1055875
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558507}
[modify] https://crrev.com/756745ddcb1990a9dba4ad95ed5906fbd27a95f9/ash/ash_layout_constants.cc
[modify] https://crrev.com/756745ddcb1990a9dba4ad95ed5906fbd27a95f9/chrome/browser/about_flags.cc
[modify] https://crrev.com/756745ddcb1990a9dba4ad95ed5906fbd27a95f9/chrome/browser/flag_descriptions.cc
[modify] https://crrev.com/756745ddcb1990a9dba4ad95ed5906fbd27a95f9/chrome/browser/flag_descriptions.h
[modify] https://crrev.com/756745ddcb1990a9dba4ad95ed5906fbd27a95f9/chrome/browser/ui/layout_constants.cc
[modify] https://crrev.com/756745ddcb1990a9dba4ad95ed5906fbd27a95f9/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
[modify] https://crrev.com/756745ddcb1990a9dba4ad95ed5906fbd27a95f9/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
[modify] https://crrev.com/756745ddcb1990a9dba4ad95ed5906fbd27a95f9/chrome/browser/ui/views/frame/browser_non_client_frame_view_mus.cc
[modify] https://crrev.com/756745ddcb1990a9dba4ad95ed5906fbd27a95f9/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
[modify] https://crrev.com/756745ddcb1990a9dba4ad95ed5906fbd27a95f9/chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc
[modify] https://crrev.com/756745ddcb1990a9dba4ad95ed5906fbd27a95f9/chrome/browser/ui/views/harmony/chrome_layout_provider.cc
[modify] https://crrev.com/756745ddcb1990a9dba4ad95ed5906fbd27a95f9/chrome/browser/ui/views/tabs/new_tab_button.cc
[modify] https://crrev.com/756745ddcb1990a9dba4ad95ed5906fbd27a95f9/chrome/browser/ui/views/tabs/tab.cc
[modify] https://crrev.com/756745ddcb1990a9dba4ad95ed5906fbd27a95f9/chrome/browser/ui/views/tabs/tab_close_button.cc
[modify] https://crrev.com/756745ddcb1990a9dba4ad95ed5906fbd27a95f9/chrome/browser/ui/views/tabs/tab_strip.cc
[modify] https://crrev.com/756745ddcb1990a9dba4ad95ed5906fbd27a95f9/chrome/browser/ui/views/toolbar/browser_actions_container.cc
[modify] https://crrev.com/756745ddcb1990a9dba4ad95ed5906fbd27a95f9/ui/base/material_design/material_design_controller.cc
[modify] https://crrev.com/756745ddcb1990a9dba4ad95ed5906fbd27a95f9/ui/base/material_design/material_design_controller.h
[modify] https://crrev.com/756745ddcb1990a9dba4ad95ed5906fbd27a95f9/ui/base/ui_base_switches.cc
[modify] https://crrev.com/756745ddcb1990a9dba4ad95ed5906fbd27a95f9/ui/base/ui_base_switches.h

Comment 6 by pbos@chromium.org, May 14 2018

Status: Fixed (was: Assigned)
Project Member

Comment 7 by bugdroid1@chromium.org, May 15 2018

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

commit a71d2135643d009c8541cccf25430b7e80718301
Author: Peter Boström <pbos@chromium.org>
Date: Tue May 15 01:13:28 2018

Expand single-tab mode to Touchable Refresh

Makes use of the new MaterialDesignerController::IsRefreshUi() method
instead of MD::GetMode() == MATERIAL_REFRESH.

Bug:  chromium:839972 
Change-Id: Ib75590ce3dbc103d7e75927d8636755c1f581903
Reviewed-on: https://chromium-review.googlesource.com/1058601
Commit-Queue: Peter Boström <pbos@chromium.org>
Commit-Queue: Bret Sepulveda <bsep@chromium.org>
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558570}
[modify] https://crrev.com/a71d2135643d009c8541cccf25430b7e80718301/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc

Sign in to add a comment