media picker: show tabs in tab list
DesktopMediaPickerDialogViews (DMPDV) sizes itself based on the preferred size of its root view, which ultimately depends via TabbedPane on the preferred sizes of DesktopMediaListView (DLMV) or DesktopMediaTabList (DMTL). DMLV computes its preferred size based on the number of sources in its list. DMTL did not compute its preferred size at all, but used FillLayout, which meant its actual preferred size was the maximum preferred size of any of its children. As it happened, its only child is a ScrollView, which always has a preferred size of (0,0) when not bounded via ClipHeightTo(). That meant that if the DMPDV *only* contained a DMTL, its preferred size was not large enough to actually show any of the DMTL, leading to the linked bug. The fix uses a couple of empirical layout constants :) specifically, I chose minimum and maximum numbers of rows to show in the DMTL such that it looks okay with both 1 tab and 100 tabs. Testing this change is fiddly: 1) Make an official build, OR: a) Make an unofficial build b) Load //chrome/browser/resources/hangouts_service as an unpacked extension (using developer mode in chrome://extensions), ignoring the JS error you get 2) Go to https://meet.google.com and start a new meeting 3) In the bottom-right, Present > Chrome Tab This will create a DMPDV that only has a DMTL, no DMLVs. Bug: 965408 Change-Id: I1de28690c579dc2a09fd232d7a3927dee8a70c9a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1626010 Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org> Reviewed-by:Peter Kasting <pkasting@chromium.org> Auto-Submit: Elly Fong-Jones <ellyjones@chromium.org> Cr-Commit-Position: refs/heads/master@{#662639}
Showing
Please register or sign in to comment