Files
brave-core/android/java
Artem Samoilenko d362170f05 [cr147][Android] Changes for MVT refactor
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/47857f79d20046a5fc9e3f470e3350c881d65874

commit 47857f79d20046a5fc9e3f470e3350c881d65874
Author: Yanling <yanlinghu@google.com>
Date:   Fri Mar 13 08:36:20 2026 -0700

    [M147] [NtpRefactor] Fix the MVT being truncated issue

    Original change's description:
    > [NtpRefactor] Fix the MVT being truncated issue
    >
    > This CL fixes a bug introduced in crrev.com/c/7644608 where the Most
    > Visited Tiles container is truncated when the NTP is viewed on a narrow
    > window on a tablet.
    > https://drive.google.com/file/d/14-JrnjARKH_7Wy5Wh3iJxQch6KgtuDbu/view?usp=sharing&resourcekey=0-wSzY2uu69f1o_9rRyNHMBw
    >
    > Prior to the refactor, the lateral margins and width for tablets were
    > applied to the outer container (a HorizontalScrollView with ID
    > R.id.mv_tiles_container), overriding the static XML margins. However,
    > the refactor moved this logic to MostVisitedTilesMediator but applied
    > the dynamic margins to the inner layout (MostVisitedTilesLayout with ID
    > R.id.mv_tiles_layout), which is a child of the outer container.
    >
    > This CL fixes the issue by passing the outer container view
    > (mvTilesContainerLayout) down to the MostVisitedTilesMediator, so that
    > the dynamic MarginLayoutParams are once again correctly applied to the
    > outer container. We also updated MostVisitedTilesCoordinator and the
    > related unit tests to reflect and verify this change.
    >
    > This video demonstrate the UI after this CL:
    > https://drive.google.com/file/d/1vrznQ5QZ5BlHUyVRC3508g-N8EFFrKaG/view?usp=sharing&resourcekey=0-ZztGk_lxOAjzprNzQvZ-5w
    >
    > Bug: 491890688
    > Change-Id: I8ce30c55e317f7ec44a1b259ffbfa6acee28355c
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7658684
    > Commit-Queue: Yanling Hu <yanlinghu@google.com>
    > Reviewed-by: Xi Han <hanxi@chromium.org>
    > Cr-Commit-Position: refs/heads/main@{#1598066}

    (cherry picked from commit bb19dc897a3206b86e9b6334c9220d92653696e0)

    Bug: 492318483,491890688
    Change-Id: I8ce30c55e317f7ec44a1b259ffbfa6acee28355c
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7662270
    Auto-Submit: Chrome Cherry Picker <chrome-cherry-picker@chops-service-accounts.iam.gserviceaccount.com>
    Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
    Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
    Cr-Commit-Position: refs/branch-heads/7727@{#252}
    Cr-Branched-From: ce01102937348db7b88c8a4257ee4b3ac702eb1a-refs/heads/main@{#1596535}
2026-03-26 19:55:47 -04:00
..