New issue
Advanced search Search tips

Issue 806886 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Task
Proj-XR
Proj-XR-VR



Sign in to add a comment

Extend linear layout sizing options to accommodate a fixed-size region

Project Member Reported by cjgrant@chromium.org, Jan 29 2018

Issue description

The VR linear layout element helps arrange many of our elements today.

However, there is an increasing number of situations where we want to arrange elements within a fixed-size region, rather than arranging them into an arbitrary total width.  Examples of this include:

- The URL must consume whatever remaining space is available on the URL bar, after icons and indicators are drawn.
- The omnibox text field must consume whatever remaining space is left after adding the voice search button (which isn't visible while incognito).

To handle this, we likely need to support parent-based sizing, in addition to our current strict child-based sizing approach.  These can live in harmony, as long as we protect against conflicts.

Implementation-wise, the sizing tree walk may need to evolve to a two-step approach:  Start at the parent and propagate sizing information to children, then let children report results back to parents.  Elements like linear layout can process child trees in a custom order, so as to size a sacrificial element after all others.
 
Components: UI>Browser>VR
Labels: -Type-Bug -Pri-3 Proj-VR OS-Android Pri-2 Type-Task
Labels: -Pri-2 Pri-3
Status: Started (was: Assigned)
We need this to further decompose the URL bar, in order to support the new hover effects specified by UX.
Project Member

Comment 4 by bugdroid1@chromium.org, Mar 14 2018

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

commit 2d90fd89dfa007bceb52a74348b757df828a374f
Author: Christopher Grant <cjgrant@chromium.org>
Date: Wed Mar 14 18:54:07 2018

VR: Allow linear layout to target a specified size

In most cases, linear layouts expand to contain all children. However,
in some cases, we want elements to fit into a specified space.  In this
case, one element can now be tagged as allowing sizing by its parent,
and LinearLayout can be configured to adjust that size according to the
other elements it needs to fit.

The first concrete example of this is a URL bar, where the text field
consumes all remaining space after any icons or indicators are added.

BUG= 806886 

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Ib9261c3b882f248aec2269a660cad9e9c6d8bbbf
Reviewed-on: https://chromium-review.googlesource.com/962712
Commit-Queue: Christopher Grant <cjgrant@chromium.org>
Reviewed-by: Ian Vollick <vollick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543144}
[modify] https://crrev.com/2d90fd89dfa007bceb52a74348b757df828a374f/chrome/browser/vr/elements/linear_layout.cc
[modify] https://crrev.com/2d90fd89dfa007bceb52a74348b757df828a374f/chrome/browser/vr/elements/linear_layout.h
[modify] https://crrev.com/2d90fd89dfa007bceb52a74348b757df828a374f/chrome/browser/vr/elements/linear_layout_unittest.cc
[modify] https://crrev.com/2d90fd89dfa007bceb52a74348b757df828a374f/chrome/browser/vr/elements/ui_element.cc
[modify] https://crrev.com/2d90fd89dfa007bceb52a74348b757df828a374f/chrome/browser/vr/elements/ui_element.h
[modify] https://crrev.com/2d90fd89dfa007bceb52a74348b757df828a374f/chrome/browser/vr/ui_scene.cc

Summary: Extend linear layout sizing options to accommodate a fixed-size region (was: Fix linear layout sizing options to accommodate a fixed-size region)
Status: Fixed (was: Started)
Labels: M-67 Test-Complete
Project Member

Comment 8 by bugdroid1@chromium.org, Mar 27 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/catapult/+/6b8f67cc144c8bfe103c7a84227e57ed33a20c31

commit 6b8f67cc144c8bfe103c7a84227e57ed33a20c31
Author: Christopher Grant <cjgrant@chromium.org>
Date: Tue Mar 27 13:18:51 2018

VR: Remove UpdateTexturesAndSizes metric

This metric is now bundled in with layout, as sizing, texture generation
and layout are done in a single step.

BUG= chromium:806886 
R=tiborg

Change-Id: I7b29c57d350cbd82aafe39f910ef3e1efd1ce3a9
Reviewed-on: https://chromium-review.googlesource.com/962922
Commit-Queue: Christopher Grant <cjgrant@chromium.org>
Reviewed-by: Ben Hayden <benjhayden@chromium.org>

[modify] https://crrev.com/6b8f67cc144c8bfe103c7a84227e57ed33a20c31/tracing/tracing/metrics/vr/frame_cycle_duration_metric.html
[modify] https://crrev.com/6b8f67cc144c8bfe103c7a84227e57ed33a20c31/tracing/tracing/metrics/vr/frame_cycle_duration_metric_test.html

Project Member

Comment 9 by bugdroid1@chromium.org, Mar 27 2018

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

commit cd2089b6dde6fcc6615ad921f26e8f60bc93aa41
Author: catapult-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com <catapult-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Date: Tue Mar 27 16:05:07 2018

Roll src/third_party/catapult/ 767f070f1..6b8f67cc1 (1 commit)

https://chromium.googlesource.com/catapult.git/+log/767f070f1df4..6b8f67cc144c

$ git log 767f070f1..6b8f67cc1 --date=short --no-merges --format='%ad %ae %s'
2018-03-14 cjgrant VR: Remove UpdateTexturesAndSizes metric

Created with:
  roll-dep src/third_party/catapult
BUG= chromium:806886 


The AutoRoll server is located here: https://catapult-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.


TBR=sullivan@chromium.org

Change-Id: I768834ced8cefa7496bef0b879a37c4fd30ed51e
Reviewed-on: https://chromium-review.googlesource.com/982003
Commit-Queue: catapult-chromium-autoroll <catapult-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Reviewed-by: catapult-chromium-autoroll <catapult-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#546118}
[modify] https://crrev.com/cd2089b6dde6fcc6615ad921f26e8f60bc93aa41/DEPS

Sign in to add a comment