Skip to content

Commit

Permalink
[Android] Adjustment to extending the omnibox suggestions when drawin…
Browse files Browse the repository at this point in the history
…g E2E

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/3c34eed14f29d850c9756a3f7e1ef4f7cb4da709

Extend the omnibox suggestions when drawing E2E

By default, the omnibox suggestions fit the height of the screen, without including system bars. When the edge-to-edge feature is enabled, the bottom navigation bar region can be drawn into, showing a gap with tab content underneath the omnibox suggestions list. This change allows for the edge-to-edge feature to communicate extra bottom padding to the omnibox suggestions dropdown to allow it to extend down and cover that bottom region, so the dropdown can draw "edge-to-edge" while keeping all of the suggestions fully visible and interactable.

Demo:
https://screencast.googleplex.com/cast/NjYyMDM3MTIxNzI4NTEyMHwzOTA4ZmJkZi00NQ

Demo (landscape):
https://screencast.googleplex.com/cast/NTk5NTYyMjA4NjczNzkyMHw5MzI3Y2ZlYi02YQ

Drawing E2E:
https://screenshot.googleplex.com/BUEWNAUMbguNCNY.png

Drawing E2E (bottom):
https://screenshot.googleplex.com/BuCyb2EzK95bsuC.png

Bug: b/325636004
  • Loading branch information
samartnik authored and mkarolin committed Oct 3, 2024
1 parent e7e5c0d commit 47d4b21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ public BraveLocationBarCoordinator(
omniboxSuggestionsDropdownScrollListener,
@Nullable ObservableSupplier<TabModelSelector> tabModelSelectorSupplier,
LocationBarEmbedderUiOverrides uiOverrides,
@Nullable View baseChromeLayout) {
@Nullable View baseChromeLayout,
Supplier<Integer> bottomWindowPaddingSupplier) {
super(
locationBarLayout,
autocompleteAnchorView,
Expand Down Expand Up @@ -118,7 +119,8 @@ public BraveLocationBarCoordinator(
omniboxSuggestionsDropdownScrollListener,
tabModelSelectorSupplier,
uiOverrides,
baseChromeLayout);
baseChromeLayout,
bottomWindowPaddingSupplier);

if (mUrlBar != null) {
((UrlBar) mUrlBar).setSelectAllOnFocus(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,8 @@ public void testConstructorsExistAndMatch() throws Exception {
OmniboxSuggestionsDropdownScrollListener.class,
ObservableSupplier.class,
LocationBarEmbedderUiOverrides.class,
View.class));
View.class,
Supplier.class));
Assert.assertTrue(
constructorsMatch(
"org/chromium/chrome/browser/omnibox/LocationBarMediator",
Expand Down

0 comments on commit 47d4b21

Please sign in to comment.