Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade from Chromium 134 to Chromium 135 #27522

Merged
merged 114 commits into from
Mar 19, 2025
Merged

Upgrade from Chromium 134 to Chromium 135 #27522

merged 114 commits into from
Mar 19, 2025

Conversation

cdesouza-chromium
Copy link
Collaborator

@cdesouza-chromium cdesouza-chromium commented Feb 6, 2025

Resolves brave/brave-browser#43864
Resolves brave/brave-browser#44237
Resolves brave/brave-browser#44736

Submitter Checklist:

  • I confirm that no security/privacy review is needed and no other type of reviews are needed, or that I have requested them
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally:
    • npm run test -- brave_browser_tests, npm run test -- brave_unit_tests wiki
    • npm run presubmit wiki, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

@github-actions github-actions bot added CI/run-network-audit Run network-audit CI/run-audit-deps Check for known npm/cargo vulnerabilities (audit_deps) CI/storybook-url Deploy storybook and provide a unique URL for each build CI/run-upstream-tests Run upstream unit and browser tests on Linux and Windows (otherwise only on Linux) labels Feb 6, 2025
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

samartnik and others added 18 commits March 18, 2025 20:02
Chromium change:
https://chromium.googlesource.com/chromium/src/+/caa23a32a00112731d6e69b1c4ec9077f31942fa

commit caa23a32a00112731d6e69b1c4ec9077f31942fa
Author: Shibalik Mohapatra <shibalik@chromium.org>
Date:   Sun Mar 2 21:52:09 2025 -0800

    [SxS] Migrate Tabstrip to using OnTabGroupDetached and OnTabGroupAttached.

    When a group is detached and re-inserted TabGroupedChanged observers are called with different reasons instead of sending observation that tab's group membership changed or group is removed / created.

    This CL migrates TabStrip view code to handle this new flow. This CL also adds client side handling for multiple tabs being inserted in browser_tab_strip_controller.cc.

    Bug: 399194773
Explicitely wait window closing confirm dialog is closed before test
finishes. Otherwise, download cancelling confirm dialog is not handled
before entering browser shotdown phase on macOS.
This change mirrors upstream changes to their `gn` handlebars into
Brave, and runs `gnrt gen` with the new handlebars.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/5ccffdd86530ff435a307a46b2c59b2dad255b41

commit 5ccffdd86530ff435a307a46b2c59b2dad255b41
Author: Lukasz Anforowicz <lukasza@chromium.org>
Date:   Tue Feb 11 11:30:52 2025 -0800

    [rust png] Don't gather code coverage data for `chromium_crates_io`.

    This CL removes `//build/config/coverage:default_coverage` from targets
    that are auto-generated by `gnrt` for third-party Rust crates that are
    vendored into `//third_party/rust/chromium_crates_io/vendor`.  This
    results in more than x10 speedup in some tests, when code coverage is
    enabled.

    This CL has been mostly auto-generated.  The only manual edit is in
    `third_party/rust/chromium_crates_io/BUILD.gn.hbs`.  The other changes
    have been generated by `tools/crates/run_gnrt.py gen`.

    Bug: 395690207
There has been a few recent changes to handle bars that slipped through
the cracks and had not been mirrored in Brave core. This change realigns
these files closer.

The diff file committed is generated with:

```
git diff --no-index ../third_party/rust/chromium_crates_io/BUILD.gn.hbs third_party/rust/chromium_crates_io/BUILD.gn.hbs > third_party/rust/chromium_crates_io/BUILD.gn.hbs.patch
```

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/0cb343c2b174ebd9f7502079f6655de89d6195e4

commit 0cb343c2b174ebd9f7502079f6655de89d6195e4
Author: Lukasz Anforowicz <lukasza@chromium.org>
Date:   Fri Feb 14 15:48:41 2025 -0800

    [rust png] Optimize `flate2` and 3 other crates even in debug builds.

    This CL adds `//build/config/compiler:optimize` to `flate2`, `fdeflate`,
    `miniz_oxide`, and `png` crates.  This is based on the following
    observations:

    * PNG encoding speed in release builds is mostly the same with and
      without Rust PNG:
        - https://crbug.com/396176046#comment15
        - https://uma.googleplex.com/p/chrome/variations?sid=32a52d8665befdd02cb1b0d83539be6d
          (`Blink.Canvas.ToDataURLScaledDuration.PNG` improves in a
          statistically significant way at 50th and 75th percentile;  it
          seems to also improve in the other percentiles;
          `Blink.Canvas.ToDataURLCompressionRatio.PNG` improves in a
          statistically significant way at 25th and 50th percentila and has
          a smaller regression at 99th percentile;  it seems to improve at
          75th and 95th percentile)

    * Web tests (aka Web Platform Tests or WPTs; also formerly known as
      Layout tests) are sensitive to PNG encoding performance (especially
      for image/pixel-comparison tests).  See:
        - https://crbug.com/396419181
        - https://crbug.com/395690207
        - https://crbug.com/395446442
        - https://crbug.com/394399217

    * There are precendents for enabling optimizations even in debug builds:
        - https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/third_party/astc-encoder/BUILD.gn;l=41-44;drc=45e5cf014778b2ec4ac0c8255879af36feb56698
        - https://source.chromium.org/chromium/chromium/src/+/main:v8/BUILD.gn;l=1701-1713;drc=aaefb87d9c73713cf83737bf0346215183f658a0
        - `libpng`-specific example:
          https://source.chromium.org/chromium/chromium/src/+/main:third_party/libpng/BUILD.gn;l=87-88;drc=492facde5298f1015f0d39329bc3d2b5e0409d8a

    Justification for optimizing *these four* specific crates can be found
    in https://crbug.com/396419181#comment6 and
    https://crbug.com/396419181#comment7.

    Bug: 396419181
    Bug: 396176046

https://chromium.googlesource.com/chromium/src/+/ab804a2d198742451331af2c1e41ef10215ced83

commit ab804a2d198742451331af2c1e41ef10215ced83
Author: Lukasz Anforowicz <lukasza@chromium.org>
Date:   Thu Dec 19 10:10:21 2024 -0800

    [rust png] Performance: Exclude `fdeflate` from `-Coverflow-checks=on`.

    Branch prediction means that `-Coverflow-checks=on` should be fairly
    inexpensive in most cases, but the extra checks can still have a
    significant impact in some scenarios - see measurements captured in the
    doc here:
    https://docs.google.com/document/d/16P0I_4AglenbkU1IBM1Qfe1zAQrMXa5NoEazZqOTHZE/edit?usp=sharing
    Based on those measurements (row 1.2 in "2024-10-18 - 2024-10-23" table,
    rows 1.1 and 1.3 in "2024-11-27 - 2024-12-02" table, row 1.1 in
    "2024-11-27 - 2024-12-02" table) we expect that disabling overflow
    checks for the `fdeflate` crate will result in 2.5% - 3.4% improvement
    in cumulative PNG decoding runtime.

    Note that there is no risk of Undefined Behavior (UB) here. It's still
    well-defined what happens if these overflow checks are turned off - it
    produces a wrapped-around/overflowed value instead of panicking and
    crashing.  These overflow checks provide limited value in Rust, because
    any array indices are bounds checked in safe Rust. The overflow checks
    are only really useful if the calculated value is being used in `unsafe`
    Rust, or used for some purpose which could lead to a logical security
    bug as opposed to a memory safety bug. They're still desirable, but not
    of huge importance.

    Also note that any integer overflows should not "leak out" through the
    public API of the `fdeflate` crate.  The overflows may impact the output
    of the decompression (or compression), but the client will interpret
    such output as opaque byte spans/slices (and not as overflow-sensitive,
    semantically-meaningful lengths or sizes).

    Fixed: chromium:357670287
PRT is related to IP protections which we don't have in Brave, so we
don't need to install this component.

Chromium change:

https://source.chromium.org/chromium/chromium/src/+/206510a4b18474eaa3b392410707cba346326daf

commit 206510a4b18474eaa3b392410707cba346326daf
Author: Ryan Kalla <ryankalla@google.com>
Date:   Wed Feb 19 10:02:32 2025 -0800

    Add Probabilistic Reveal Token component installer

    Bug: 396401608
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/400a8f16a7e49a5de696a94405aad97f3e649570

commit 400a8f16a7e49a5de696a94405aad97f3e649570
Author: Devlin Cronin <rdevlin.cronin@chromium.org>
Date:   Tue Feb 18 10:49:00 2025 -0800

    [Extensions MV2] Enable kExtensionManifestV2Disabled by default

    Chrome has announced that MV2 extensions will gradually no longer be
    supported in the browser. See more information at
    https://developer.chrome.com/blog/resuming-the-transition-to-mv3.

    This enables the kExtensionManifestV2Disabled base::Feature by default.
    This has been gradually rolled out to existing user populations. Users
    may still re-enable MV2 extensions during this time.

    Bug: 337191307
These were upstream code that we pulled in early. Now it's in cr135 so
we don't need these.
fix brave/brave-browser#44393

This is f/u fix as #27909
is reverted in cr135.

We adjusted window offset while dragging in vertical tab mode
because TabDragController refers widget from TabDraggingContext but
that widget is vertical tab widget not browser window widget.
However, upstream refactored TabDragController so we need to adjust
based on latest code again.

Upstream changes - https://chromium-review.googlesource.com/c/chromium/src/+/6160815
Our previous offset adjust - #27909

Enabled tab detach browser test again(VerticalTabStripDragAndDropBrowserTest.DragTabToDetach)
to check mouse cursor is located over the dragged tab properly during
the dragging. But not sure it works well on CI.
…inning is removed

We have been disabling features::kToolbarPinning to disable toolbar pinning and
the "Customize Chrome" page. Now that that feature has been removed, we need to
hide the toolbar pinning trigger points (the menu item and side panel "Customize
Chrome" button) until we're ready to enable this feature.

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/934d841df761dafeb0f19bb5b63eaf43567892d3

commit 934d841df761dafeb0f19bb5b63eaf43567892d3
Author: dljames <dljames@chromium.org>
Date:   Thu Feb 27 15:28:04 2025 -0800

    [ToolbarPinning] Remove pinning flag

    The kToolbarPinning feature has now launched for some time. Removing the
    feature flag now to reduce tech debt.

    Affected files / tests have been updated accordingly.

    Change-Id: Iac6238759176216ec49edf7a57ebb0470987163b
    Bug: 395921085
`BraveUrlConstants` does not extend anything and thus does not belong to `embedder_support` component.
Exclude Glic from building.

Also, cleans up glic related things from our code.
With enable_glic = false, the profile picker crashes because the webui
code is trying to access string glicAddProfileHelper which is not
available because in chrome/browser/ui/webui/signin/profile_picker_ui.cc
the string addition to the resources is guarded by
BUILDFLAG(ENABLE_GLIC).
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/67869e3159fd492fa3fa747390ec04ea17229d1b

commit 67869e3159fd492fa3fa747390ec04ea17229d1b
Author: Awad Osman <awado@google.com>
Date:   Wed Feb 19 08:08:55 2025 -0800

    Enable PasswordLeakToggleMove by default for Desktop

    We have approval for a full launch on desktop so I am removing the
    desktop platforms from the fieldtrial testing config and am enabling the
    feature by default for desktop.

    This CL also fixes and removes some tests that were testing the disabled
    code path because we are removing the password leak's dependency on a
    user's safe browsing status.

    Bug: 396432186
CompoundTabContainer::AddTabs expects all passed in tabs to be either
pinned or unpinned, but we were passing a combination of both.

Fixes the crash by splitting the tabs to pinned and unpinned and then
inserting them ourselves separately.

Chromium change:

https://source.chromium.org/chromium/chromium/src/+/caa23a32a00112731d6e69b1c4ec9077f31942fa

commit caa23a32a00112731d6e69b1c4ec9077f31942fa
Author: Shibalik Mohapatra <shibalik@chromium.org>
Date:   Sun Mar 2 21:52:09 2025 -0800

    [SxS] Migrate Tabstrip to using OnTabGroupDetached and OnTabGroupAttached.

    When a group is detached and re-inserted TabGroupedChanged observers are called with different reasons instead of sending observation that tab's group membership changed or group is removed / created.

    This CL migrates TabStrip view code to handle this new flow. This CL also adds client side handling for multiple tabs being inserted in browser_tab_strip_controller.cc.

    Bug: 399194773
@mkarolin
Copy link
Collaborator

CI is only failing in audit-network with a known issue that originates from master.

@mkarolin mkarolin merged commit 2574bcc into master Mar 19, 2025
15 of 18 checks passed
@mkarolin mkarolin deleted the cr135 branch March 19, 2025 03:19
@github-actions github-actions bot added this to the 1.78.x - Nightly milestone Mar 19, 2025
@brave-builds
Copy link
Collaborator

Released in v1.78.52

mkarolin added a commit that referenced this pull request Mar 19, 2025
Upgrade from Chromium 134 to Chromium 135
mkarolin added a commit that referenced this pull request Mar 21, 2025
Upgrade from Chromium 134 to Chromium 135
mkarolin added a commit that referenced this pull request Mar 21, 2025
Upgrade from Chromium 134 to Chromium 135
mkarolin added a commit that referenced this pull request Mar 25, 2025
Upgrade from Chromium 134 to Chromium 135
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/run-audit-deps Check for known npm/cargo vulnerabilities (audit_deps) CI/run-network-audit Run network-audit CI/run-upstream-tests Run upstream unit and browser tests on Linux and Windows (otherwise only on Linux) CI/storybook-url Deploy storybook and provide a unique URL for each build feature/web3/wallet
Projects
None yet