0
Commit Graph

109261 Commits

Author SHA1 Message Date
fd2ed480f4 [dPWA][SystemMediaControls][Win] Enable feature by default
Bug: 40275333
Change-Id: I09df2524f14f2eb9b8c1c3a2bf77f2bb576f9152
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5366359
Reviewed-by: Vincent Scheib <scheib@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Tommy Steimel <steimel@chromium.org>
Commit-Queue: Stanley Hon <stahon@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1272988}
2024-03-14 19:27:40 +00:00
1935db82b2 Enable sharedStorage.get() in network-restricted fenced frames.
If the proper flag (kFencedFramesLocalUnpartitionedDataAccess) is
enabled, sharedStorage.get() can now be called in fenced frames.
The call will only succeed if the entire tree rooted at the fenced
frame has disabled untrusted network access, including nested
fenced frames trees.

Bug: 324440086
Change-Id: Ie6788ba6d299a334800ecf11ba90151eaf40f43d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5279221
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Reviewed-by: Ben Kelly <wanderview@chromium.org>
Commit-Queue: Andrew Verge <averge@chromium.org>
Reviewed-by: Garrett Tanzer <gtanzer@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272982}
2024-03-14 19:11:31 +00:00
1ed92885d3 Add missing copy operator to ClipboardPasteData
Change-Id: I37d0c6ff62bdfc9ad505db7257187b129c3489b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5372124
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Auto-Submit: Dominique Fauteux-Chapleau <domfc@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272956}
2024-03-14 18:44:27 +00:00
06014f7e9e Convert OSExchangeData filenames to use std::optional
Bug: 328710562
Change-Id: I145347c6f7d1876fe473f6a3f10938bea18a1fc8
Include-Ci-Only-Tests: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5368231
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272953}
2024-03-14 18:42:52 +00:00
4d025fd233 Android: Reset UmaRecorderHolder between each batched test
It is never desirable to leak UMA state between tests.

Bug: 326415975
Change-Id: I8f5efa100b32d538ae012966d812676e2301981d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5362738
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Owners-Override: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272905}
2024-03-14 17:51:56 +00:00
2c37f68193 Android: Remove Chrome's copy of @UiThreadTest
We can use AndroidX's copy directly now.

Also removes @UiThreadTest from Robolectric tests (has no effect)

Bug: None
Change-Id: I19ae2ab355366cff3ad037a7dba90ad29a20e44a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5361254
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Owners-Override: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272893}
2024-03-14 17:36:09 +00:00
40a2bf7108 Add unit tests for VideoEffects[Service/Processor]Impl stubs
Other changes:
- switch VideoEffectsServiceImpl to accept an instance of
  VizGpuChannelHostProvider to facilitate writing unit tests

Change-Id: Ie40ff0691356daa62e1aefe2afa6fa4501552dee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5357701
Reviewed-by: Bryant Chandler <bryantchandler@chromium.org>
Auto-Submit: Piotr Bialecki <bialpio@chromium.org>
Commit-Queue: Victor Miura <vmiura@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Victor Miura <vmiura@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272875}
2024-03-14 17:09:02 +00:00
efbb90d3b3 Disable WebContentsVideoCaptureDevice test for ChromeOS ASAN builder
Disables WebContentsVideoCaptureDeviceBrowserTestP.CapturesContentChanges
to remedy failures of Chromium OS ASAN builder

Change-Id: Ibac9930c32b49979eb46da1fa628444713c891d8
Bug: 329654821
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5371158
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Commit-Queue: Paul Adedeji <pauladedeji@google.com>
Commit-Queue: Mark Foltz <mfoltz@chromium.org>
Owners-Override: Paul Adedeji <pauladedeji@google.com>
Auto-Submit: Paul Adedeji <pauladedeji@google.com>
Cr-Commit-Position: refs/heads/main@{#1272866}
2024-03-14 16:58:54 +00:00
c6cc30ec98 [Default Nav Transition] Implement the UX for BeforeUnload handler
The UX is: as long as the browser sends out the BeforeUnload IPC to the
renderer, we play the cancel animation to bring back the active page,
even if the renderer decides to not show the prompt at all (e.g., if
the page doesn't have a sticky user activation).

In real world testing, the IPC exchange is so fast (in the case where
the renderer doesn't show the prompt and acks to proceed) that the
cancel animation never gets to play a single frame (even on a debug
build). This is close the the ideal UX mentioned below.

Ideally we want to only play the cancel animation if the renderer
decides to show the prompt. While this is a better UX, it makes the
impl complicated as we need to decide what to show after the user lifts
the finger and before the renderer asks the browser to draw the prompt.
(presumably the invoke animation, then plays the cancel animation when
the renderer acks to show the prompt).

Alternatively, we could let the browser not send out the BeforeUnload
message if we know that the renderer for sure will always ack with
proceed. RFHI::HasStickyUserActivation already has the information,
though the source of truth is passed from the renderer. However we
don't really know the complication of changing the BeforeUnload flow
so this current impl is the best option for now.

Bug: 1421009
Low-Coverage-Reason: TRIVIAL_CHANGE
Change-Id: I993faba663075f5519321d69c26afa2b26404974
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5325441
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Commit-Queue: William Liu <liuwilliam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272861}
2024-03-14 16:54:16 +00:00
cc2d9b0ad9 WebViewPrerender: Prerender support for AwContentsIoThreadClient
AwContentsIoThreadClient manages the correspondence of RFHs and Java IO
threads. Before this CL, AwContentsIoThreadClient assumed that the
FrameTreeNode associated with an RFH never change in its lifetime,
which doesn't hold in prerender activation.

This CL makes AwContentsIoThreadClient prerender-ready by adding
RenderFrameHost/FrameTree swap handling.

Note that the change is behind a feature flag kWebViewPrerender2 and
does nothing if it is disabled.

This CL is necessary for the first test of Prerender for WebView. We'll
add a test for back navigation after [2] landed.

[1] https://docs.google.com/document/d/1Pnf6c7jF04RpA6m_lStTKofLAb-xBoc65H_BKhy-KRE
[2] https://crrev.com/c/5269709

Credit: This CL was written by kenoss@ (not nhiroki@)

Fixed: b/41492762
Change-Id: I02b9e293f69a8ed0f9322e3087a4aa05041228ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5316140
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272806}
2024-03-14 15:41:40 +00:00
0fcb290232 [nvs-prerender] Cache No-Vary-Search header on PrerenderHost
Start adding No-Vary-Search support for prerender2.

In this CL, add a feature flag and cache No-Vary-Search header
on PrerenderHost when the head is received.

Bug: 41494389
Change-Id: Ieec3faaf991245499ff78f19efc0d49e45dc0a86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5318878
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Liviu Tinta <liviutinta@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272738}
2024-03-14 14:03:56 +00:00
fe3cf300a2 Gate header error debug reports behind kAttributionVerboseDebugReporting
To be consistent with other verbose debug reports that are delivered to
the same endpoint.

Change-Id: I9508bfa86f6c8020833866a6f8f417e4663761e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5371740
Reviewed-by: Andrew Paseltiner <apaseltiner@chromium.org>
Commit-Queue: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272723}
2024-03-14 13:29:21 +00:00
74ade49874 Disable WebContentsVideoCaptureDevice test on Linux
Test is flaky on multiple linux bots. E.g.
https://ci.chromium.org/ui/p/chromium/builders/ci/linux-chromeos-dbg/35900/overview

Bug: 40947039
Change-Id: I3927ecb19dc623209f35fecd9e04fc9118887cef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5368855
Commit-Queue: Nicola Tommasi <tommasin@chromium.org>
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Auto-Submit: Christian Dullweber <dullweber@chromium.org>
Owners-Override: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Nicola Tommasi <tommasin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272676}
2024-03-14 10:55:02 +00:00
49b6ec0bfe Revert "Update test runner to account for same-site RFH change"
This reverts commit 0b48266711.

Reason for revert: Causes widespread flakiness in http/tests/devtools
web tests. see crbug.com/329487276 for one example bug with links to
test histories.

Original change's description:
> Update test runner to account for same-site RFH change
>
> With RenderDocument, we can change RenderFrames within the same
> process. This is not currently handled correctly by some parts of the
> WebTestControlHost. This is fixed by this CL by:
> - Making WebTestWindowObserver observe  pre-existing speculative RFHs
> (it would miss them otherwise since those already called
> RenderFrameCreated before the construction of WebTestWindowObserver)
> - Making WebTestControlHost call ReplicateWebTestRuntimeFlagsChanges
> on all WebTestRenderFrameRemotes instead of only one per renderer
> process (as there can be multiple)
>
> Bug: 936696
> Change-Id: I4184a29de9c21bce3029fbe7bd7d15ffa98b10db
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5368628
> Reviewed-by: Fergal Daly <fergal@chromium.org>
> Auto-Submit: Rakina Zata Amni <rakina@chromium.org>
> Commit-Queue: Fergal Daly <fergal@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1271970}

Bug: 936696, 329518758, 329487276
Change-Id: I1ea2466a6672ba21d0dfdd702bb0899b481171f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5366211
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272667}
2024-03-14 10:22:16 +00:00
30335d391e Cleanup: Update links on the ServiceWorker static routing API
Since the ServiceWorker static routing API gets included in the
specification (https://w3c.github.io/ServiceWorker/), let me update code
comments to point out it.  If it is not feasible to point out the
specification, let me point out the WICG page instead of my personal
github repository.

Also, this CL removed "Experimental" because the API became the
specification, and it is not experimental any more.

Bug: 40241479
Change-Id: I0c71d85d4025aeb5bc86e7ae072676c6657f7e97
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5366431
Reviewed-by: Minoru Chikamune <chikamune@chromium.org>
Reviewed-by: Shunya Shishido <sisidovski@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272604}
2024-03-14 06:12:19 +00:00
8227a70a29 [accessibility] Propagate mode changes to frames in the BF cache
A WebContentsImpl must notify all RenderFrameHostImpls for which it is
the RenderFrameHostDelegate when there is a change in the accessibility
mode flags; including frame hosts that are in the back-forward cache.
Previously, frame hosts in the BF cache were not notified, which could
lead to them receiving accessibility updates and events from a renderer
after accessibility had been turned off for the owning WebContents.

Bug: 326751711
Change-Id: I164b4ff8285a2c0d94db9a3caac53db73cd51456
Fixed: 326262509
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5368451
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Auto-Submit: Greg Thompson <grt@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272548}
2024-03-14 02:22:24 +00:00
b80a478f9f Allow child processes to inherit logging file handle on Windows
Child processes on Windows cannot always open their log file
(for instance if they cannot determine the user-data-dir) making
configuration of logging complicated. Child processes also need
a sandbox exception to open their log files.

This CL replaces logging related flags to pass a handle to children
in cases where a file would have been passed, allowing a later CL
to remove the sandbox rule allowing direct access to the log file.

If the browser is run with `--enable-logging --log-file=file`,
children will now be run with `--enable-logging=handle --log-file=N`.
It is not possible to mix stderr logging with file logging (it will
still work for the browser process), but this already does not work
in official builds as std handles are not passed into children.

This also allows the CHROME_LOG_FILE to be useful again for renderer
processes if Chrome is run using:

 $env:CHROME_LOG_FILE="d:\temp\env-log.log"
 chrome.exe --enable-logging

the browser will inspect the env var and provide a handle to that
file when starting renderer processes.

Running the browser with --enable-logging=handle directly is not
supported, these flags should only be provided by the browser when
starting child processes.

Tests: Manually tested results https://docs.google.com/document/d/1Hq37YReGM91fmcCcqkRbjtjwP62FVH_zpZtfpSPlLeY/edit?usp=sharing
Bug: 328285906, 40270808
Change-Id: Id79731b2d35ab3ee58f6c1612990bdec1485da68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5337202
Commit-Queue: Alex Gough <ajgo@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Reviewed-by: Peter Boström <pbos@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272538}
2024-03-14 02:16:44 +00:00
2776ee7be4 webnn: Enable the XNNPACK delegate in the TFLite backend
The code to enable the XNNPACK delegate when the right build flags are
set was accidentally removed in the final version of r1266242.

This change restores that code and refactors the buildflag header target
so that the state of the build_tflite_with_xnnpack flag defined in
//third_party/tflite/features.gni is available in a buildflag header
without depending on //components/optimization_guide.

Bug: 326356909
Change-Id: I609488f260b6844452416a592edcb7cd455cb40e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5363635
Reviewed-by: Robert Ogden <robertogden@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Auto-Submit: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272511}
2024-03-13 23:56:14 +00:00
ef81948e10 [AriaNotify] Add generated event for ARIA notifications
Adding the `ARIA_NOTIFICATIONS_POSTED` event which, in a later patch,
will be triggered whenever there are ARIA notifications seralized in
`AXNodeData`, e.g., has `kAriaNotificationAnnouncements`.

Bug: 326277796
Change-Id: I8867a121d6d83d5a07cdc715f41fd7009b3afb25
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5357560
Reviewed-by: Alison Maher <almaher@microsoft.com>
Reviewed-by: Nektarios Paisios <nektar@chromium.org>
Commit-Queue: Ethan Jimenez <ethavar@microsoft.com>
Reviewed-by: Benjamin Beaudry <benjamin.beaudry@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1272479}
2024-03-13 22:53:42 +00:00
aa4c079615 [Text Contrast] Plumb values into Skia
This is the final change to enable contrast and gamma values from the
registry to get plumbed into Skia. This is not currently enabled
for web_tests - instead command line values are used to verify
that the text contrast has changed. A follow-up will enable registry
values for web_tests.

Values for contrast and gamma are stored on FontRenderParams, and
plumbed into Skia via LegacyDisplayGlobals. Tests were added for
rendering via a new VirtualTestSuite, and since this goes through
a different path than the browser, additional tests were added for
plumbing FontRenderParams values.

Two new command line flags are added here, for setting contrast
and gamma respectively. These are used in the virtual test suite
but also apply to the browser.

Bug: 1160653
Change-Id: I892a17dae636f2779c13dc3bba1bb81dc97dbff9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5283107
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Commit-Queue: Kurt Catti-Schmidt <kschmi@microsoft.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272465}
2024-03-13 22:38:30 +00:00
0ff2727779 Rename GeolocationManager to GeolocationSystemPermissionManager
This CL aligns the class name 'GeolocationSystemPermissionManager' with
its focused functionality as part of the ongoing `GeolocationManager`
refactoring. Previously, `GeolocationManager` handled both location
updates and system permission management. This refactoring streamlines
responsibilities and improves code readability.

Bug: 41496017
Change-Id: I7cd2e76b9e37f32df5c7e739cbc405f4e9c376c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5354161
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Matt Reynolds <mattreynolds@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Alvin Ji <alvinji@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272449}
2024-03-13 21:57:27 +00:00
3a984386c1 [AriaNotify] Support multiple AriaNotification enum attributes
Deprecating `IntAttribute` for the `ariaNotify` interrupt and priority
properties in favor of a `IntListAttribute` for both, which will allow
multiple notifications to be serialized into `AXNodeData`.

After this change, `SerializeAriaNotificationAttributes` still overrides
a single notification within `AXNodeData`. A later patch will correctly
plumb the notifications through these attribute lists.

Bug: 326277796
Change-Id: Ica6fc1077b35f2f61baac5e62f0a67832229035a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5347447
Reviewed-by: Alison Maher <almaher@microsoft.com>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Commit-Queue: Ethan Jimenez <ethavar@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1272432}
2024-03-13 21:30:50 +00:00
014d9d2276 Remove obsolete TODOs from attribution_internals.ts
The Mojo types are now nullable rather than maybe-undefined, and for
simplicity we can use the nullish coalescing operator to handle them.

Change-Id: I44d92267ab8e0812136bf753305968b08ef8a883
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5366701
Auto-Submit: Andrew Paseltiner <apaseltiner@chromium.org>
Commit-Queue: Anthony Garant <anthonygarant@chromium.org>
Reviewed-by: Anthony Garant <anthonygarant@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272431}
2024-03-13 21:30:30 +00:00
470985a103 Revert "view-transition: Ensure navigate event is dispatched before pageswap."
This reverts commit 3fb70711e2.

Reason for revert: Test is failing on linux-bfcache-rel:
https://ci.chromium.org/ui/p/chromium/builders/ci/linux-bfcache-rel/57288/overview

Original change's description:
> view-transition: Ensure navigate event is dispatched before pageswap.
>
> When performing a browser traverse navigation with a ViewTransition,
> ensure that navigate fires before pageswap and capture steps on the
> old Document.
>
> Fixed: 41490961
> Change-Id: Iec422aad59709e2a8168a661e3541871e4871953
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5364073
> Auto-Submit: Khushal Sagar <khushalsagar@chromium.org>
> Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> Commit-Queue: Khushal Sagar <khushalsagar@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1272324}

Change-Id: I760867d45e43fcfba5f242b645b19a33dfa51bd4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5370648
Owners-Override: Nate Chapin <japhet@chromium.org>
Auto-Submit: Nate Chapin <japhet@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Nate Chapin <japhet@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272426}
2024-03-13 21:24:17 +00:00
0dd4e143e2 Plumb Related Website Sets info to DevTools
Bug: 328471612
Change-Id: I4deeb2db8fcda708266c1fc03a0faaca294558b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5353348
Commit-Queue: Shuran Huang <shuuran@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272423}
2024-03-13 21:19:19 +00:00
708e304d78 Return std::nullopt for failed DB queries
This differentiates a failed query from successful one that has empty
result, and forces callers to deal with the failure.

This CL also adds metric to count the failed queries.

Change-Id: Ia6a11370405156787446aa0e8e9fa75220699767
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5370391
Reviewed-by: Chris Fredrickson <cfredric@chromium.org>
Commit-Queue: Shuran Huang <shuuran@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272419}
2024-03-13 21:14:59 +00:00
8f446f0f1d Suppress Win arm64 failures
Suppresses several GPU flakes on Windows arm64 devices.

Bug: 329211596
Change-Id: I7582a9efcbc6aa05d50ef99985836f88170e9ec6
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5365788
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272417}
2024-03-13 21:12:46 +00:00
46770771c0 Suppress texture-active-bind flakes
Suppresses flakes in conformance/textures/misc/texture-active-bind.html
with Metal + Graphite.

Bug: 329285449
Change-Id: Ie001337b7aad56aecc65dd1d268c14488e38558c
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5368797
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1272416}
2024-03-13 21:12:14 +00:00
3c24ca2673 Convert browser tests to use RasterContextProvider
The browser process always uses RasterInterface/RasterDecoder now which
is provided from RasterContextProvider. Update GPU browser tests to
match the real implementation. Also remove GrContextKeepsGpuChannelAlive
test since the browser never uses GrContext anymore.

Bug: 40598922
Change-Id: I30131dcb91bb5fb05d99ce407980585bf54bb84e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5361314
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Commit-Queue: Kyle Charbonneau <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272403}
2024-03-13 20:55:55 +00:00
8e96670fcd content: Don't populate activation info for cross-origin redirects.
Bug: 1522213
Change-Id: I7966cc58a9d9c6b9ae0975710d1d75ec33a16bb1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5366622
Auto-Submit: Khushal Sagar <khushalsagar@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Khushal Sagar <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272366}
2024-03-13 19:49:16 +00:00
493a9465b3 [reland] pa: couple of tweaks based on Speedometer
I believe the reason for the crashes is that when
shrinking the ring buffer size (AdjustForBackground), I
wasn't adjusting global_empty_slot_span_ring_index. This
meant that if global_empty_slot_span_ring_index was >
kMinFreeableSpans, a slot-span could end up being assigned
an index beyond the ring buffer size. This is because
SlotSpanMetadata::RegisterEmpty increments
global_empty_slot_span_ring_index based on the current index and
global_empty_slot_span_ring_size:

https://source.chromium.org/chromium/chromium/src/+/main:third_party/dawn/third_party/angle/third_party/dawn/third_party/angle/third_party/dawn/third_party/partition_alloc/src/partition_alloc/partition_page.cc;l=115-116;drc=4b0447a323de1a925d2b08127e256ef735d73fc3

Also, in this version the features are all disabled. I'll enable
via field trial.

Original description:

Calling to madvise/mprotect is expensive on macs. This patch aims
to reduce the number of such calls. It adds the following:
. Increases empty cache index bits by 8.
. If RegisterEmpty() is called and the slot span was already
  registered, don't do anything. This is in hopes of avoiding
  churn if a slot-span is reused a bunch.
. Increases max_empty_slot_spans_dirty_bytes_shift by a factor of 2.
. Adds feature for that makes blink's partition for buffers use the
  large empty slot span ring.

Bug: 329199197
Change-Id: I819ba2ba82bbed83cba40d7561f21f4aa19ff088
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5362719
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Benoit Lize <lizeb@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272345}
2024-03-13 19:18:58 +00:00
59aeab7eaa Remove passing WebGL Graphite expectations
No recent failures observed.

Validate-Test-Flakiness: skip
Bug: 41485766
Change-Id: I6ae0fab2cd52f48bc1fdbf114df4225ecfc73973
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5365989
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272336}
2024-03-13 19:06:45 +00:00
38cb41b016 [blink-a11y]: ensure RenderAccessibilityImpl always gets mode changes first
Currently, RenderAccessibilityImpl is an observer of RenderFrameImpl
and reacts to AccessibilitymodeChanged to set up or tear down Blink
accessibility.

This is a problem because, depending on when the observers are added,
RenderAccessibilityImpl may be the *last* observer called. In those
cases, previous observers e.g. PdfAccessibilityTree, may inaccurately
conclude that accessibility isn't on when it *is*, or not have access to
state that should be there e.g. WebAXObjects.

Fix this by making the direct mode changed call from
RenderAccessibilityManager -> RenderAccessibilityImpl (which it owns
anyway).

We also re-enable some PDF a11y tests. These tests were flakey and more
recently, consistently failing after the work in
go/chrome-pdf-a11y-stabilization. It is likely for both cases, this
change found and fixed the root cause of the once flakes now
 fails.

R=aleventhal@chromium.org

Bug: 327458821
Test: cq
Change-Id: I28a63ee6e4149b31f0b0ea097b129eea3a293e1d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5369374
Commit-Queue: David Tseng <dtseng@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: Abigail Klein <abigailbklein@google.com>
Cr-Commit-Position: refs/heads/main@{#1272326}
2024-03-13 18:56:18 +00:00
3fb70711e2 view-transition: Ensure navigate event is dispatched before pageswap.
When performing a browser traverse navigation with a ViewTransition,
ensure that navigate fires before pageswap and capture steps on the
old Document.

Fixed: 41490961
Change-Id: Iec422aad59709e2a8168a661e3541871e4871953
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5364073
Auto-Submit: Khushal Sagar <khushalsagar@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Khushal Sagar <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272324}
2024-03-13 18:53:06 +00:00
041e2b44b5 [Private Network Access] Get client IP address space from the service worker that loads the main document
This is to fix https://github.com/WICG/private-network-access/issues/126

The issue is that when the main document is fetched by a service worker,
the URLResponseHead's remote_endpoint doesn't have an IP address, which
makes sense because the service worker doesn't always have to forward
the fetch to an actual network fetch.  This results in the render frame
host and the loaders it created having kUnknown IP address space, which
in turn causes the Private Network Access policy to be allow [1].

Also even if the service worker did fetch from file scheme, the service
worker can still modify the content, so the client address space
shouldn't be local, otherwise a public service worker can bypass PNA.

This CL stores the service worker version's IP address space in the
URLResponseHead of the document (main resource) it loads, and then use
that to calculate the document's IP address space.

[1]
https://source.chromium.org/chromium/chromium/src/+/main:content/browser/renderer_host/private_network_access_util.cc;l=113-117;drc=f4a00cc248dd2dc8ec8759fb51620d47b5114090

Bug: 40241368,323583084
Change-Id: I8751e52cb5e1faa8394531c90d68664e8bd641e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5308035
Auto-Submit: Jonathan Hao <phao@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Jonathan Hao <phao@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272321}
2024-03-13 18:48:28 +00:00
e313e14b50 [A11y] Refactor AXInspectFactory to allow choosing of APIType.
This is a refactor-only change to make a subsequent change to the
accessibility internals page more straightforward.
In doing so, this change also reduces duplication in the platform-specific logic of ax_inspect_factory.

Bug: 325316128
Change-Id: Ic219bee931243e9730cf04e3459075901dffc881
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5319138
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Jacques Newman <janewman@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1272320}
2024-03-13 18:47:22 +00:00
96899be4df Add some debug logs to SelectActionMenuHelper.
There's currently an issue where IDS_ACTIONBAR_SHARE and
IDS_ACTIONBAR_WEB_SEARCH aren't being translated properly. It's unclear
whether this is a build issue or a context issue. The bug is only
reproducible on release builds so we can submit this CL, check the
output of the logs on canary and revert the CL at the end of the week.

Bug: 41486995
Change-Id: I6c5fdfebd92751fd22daf795ecea5200f9e2cd98
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5361597
Reviewed-by: Jinsuk Kim <jinsukkim@chromium.org>
Commit-Queue: Alex Mitra <alexmitra@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272299}
2024-03-13 18:16:19 +00:00
116f258d56 [AssistData] Add implementation for some methods of JNI bridge to build AssistData
This CL continues the work on unifying the paths of the AssistData
structure builds. With this CL we add some of the populate methods
to the AssistDataBuilder and add implementation details on the
native side of the JNI bridge.

AX-Relnotes: N/A
Bug: 325665399
Change-Id: I62e593437771fb924832938042187b8007ce4d7b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5350542
Reviewed-by: David Tseng <dtseng@chromium.org>
Commit-Queue: Mark Schillaci <mschillaci@google.com>
Cr-Commit-Position: refs/heads/main@{#1272292}
2024-03-13 18:07:34 +00:00
ae082d9050 Remove redundant test-suite prefixes
For example, a test that was previously called

AttributionInteropTestInputs/AttributionInteropTest.HasExpectedOutput/event_source

is now called

AttributionInteropTest.HasExpectedOutput/event_source

reducing log output and making it easier to parse visually.

Change-Id: I4d66a41e6808d6f5845880691f98134817688d29
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5370510
Commit-Queue: Nan Lin <linnan@chromium.org>
Auto-Submit: Andrew Paseltiner <apaseltiner@chromium.org>
Reviewed-by: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272277}
2024-03-13 17:51:53 +00:00
3ea214d47e Change error message for B&A API not allowed error
Bug: 329235185
Change-Id: Ie0799519ea6324564a8c8e325971e0683d61767f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5370310
Commit-Queue: Russ Hamilton <behamilton@google.com>
Reviewed-by: Qingxin Wu <qingxinwu@google.com>
Cr-Commit-Position: refs/heads/main@{#1272263}
2024-03-13 17:38:00 +00:00
b3466af85d Reland "Move code from base::ByteSwap to base::numerics and fix UB casts"
This is a reland of commit 49599d8641

Original change's description:
> Move code from base::ByteSwap to base::numerics and fix UB casts
>
> While moving ByteSwap() callers, I found the DTS code doing byte swaps
> by casting byte spans to uint16_t spans, which causes UB if they are
> not aligned. The function explicitly handles non-16-bit aligned inputs
> earlier, so clearly it's expected and we should not CHECK on the
> alignment. So instead, change the code to work with bytes and do the
> swaps in a for loop.
>
> While here, make use of the new split_at() to split the output span
> up into disjoint subspans that are each written to.
>
> R=dalecurtis@chromium.org
>
> Bug: 40284755
> Change-Id: I11c557fd3e0f6fd64555b299f3492ca7722aeae2
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5366084
> Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
> Owners-Override: danakj <danakj@chromium.org>
> Commit-Queue: danakj <danakj@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1271821}

Bug: 40284755
Change-Id: I6a067c0bee14898006163a5706bff5e9947843f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5366281
Owners-Override: danakj <danakj@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272244}
2024-03-13 17:21:47 +00:00
af72bce87e Migrating code from base::ByteSwap and friends to byte conversions
ByteSwap + memcpy (or similar via iterators) can be spelt more clearly
with the new base::numerics byte conversions to convert to and from
byte arrays of big/little endian.

Some code uses BigEndianReader + ByteSwap to read little endian
buffers! Introduce SpanReader to provide a simple api around reading
off the front of the span dynamically in place of using many nested
split_at() calls.

SpanReader overlaps with BufferIterator in some ways, but it provides
a more ergonomic API for reading off spans (including fixed size
spans) and dealing with running out of room explicitly, like
BigEndianReader did. And it does not introduce the complexity of
worrying about seeking or truncating to users of the API.

Bug: 40284755
Change-Id: I1a3c44f0016e74f17c6282a51e5eca9dae7fad01
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5353355
Reviewed-by: Tomas Gunnarsson <tommi@chromium.org>
Reviewed-by: Ryan Hansberry <hansberry@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Evan Stade <estade@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272236}
2024-03-13 17:12:12 +00:00
c647bc7e99 Disable flaky tests on Android
AX-Relnotes: N/A
Bug: 329271598, 329275097
Change-Id: I3b48bc4ac825748f3ae3bc70e996769f6d3e7da6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5369892
Commit-Queue: Abigail Klein <abigailbklein@google.com>
Commit-Queue: Mark Schillaci <mschillaci@google.com>
Auto-Submit: Mark Schillaci <mschillaci@google.com>
Reviewed-by: Abigail Klein <abigailbklein@google.com>
Cr-Commit-Position: refs/heads/main@{#1272214}
2024-03-13 16:48:21 +00:00
9ba2555bcb Fix auction MojoLPM fuzzer coverage
A promise field was missing `old: 1` -- this caused the auction to wait
forever for that promise, simply "failing" the auction upon destruction
of the TestCase [0].

Also move fields to match the order in the mojom file.

Longer-term, we'll need a way to monitor when we've lost coverage like
this.

[0] https://source.chromium.org/chromium/chromium/src/+/main:content/browser/interest_group/ad_auction_service_impl.cc;l=757;drc=465365641ad68b8feb46a3d23111f221cd2ebc7c

Change-Id: I78f321265b27b751e69950d391e2ac543405ee5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5366008
Commit-Queue: Caleb Raitto <caraitto@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272209}
2024-03-13 16:43:06 +00:00
ab5437f23b Revert "Posting registerLocaleChangeReceiver to BG thread"
This reverts commit 872620ee34.

Reason for revert: Unregistering before the broadcast receiver is registered, due to delayed registration running in BG thread, causes an exception. We should revert, and in the re-land, add a sequenced task runner to make sure the registration occurred before unregistering the broadcast receiver.

Original change's description:
> Posting registerLocaleChangeReceiver to BG thread
>
> This is in an effort to move as many calls to
> ContextUtils#registerProtectedBroadcastReceiver off of the UIThread.
> This is part of an effort to improve runtime performance by reducing
> the number of IActivityManager binder transactions in the UIThread.
>
> Bug: b:325352920
> Change-Id: I61ea80fbaa26929d96aaf5673ae7d467c0412b56
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5366686
> Reviewed-by: David Tseng <dtseng@chromium.org>
> Commit-Queue: Adam Walls <avvall@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1271847}

Bug: b:325352920
Change-Id: I5ed7284fb3b6dd858a78e22acfa1780791096049
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5367547
Reviewed-by: David Tseng <dtseng@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Auto-Submit: Adam Walls <avvall@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1272201}
2024-03-13 16:35:55 +00:00
9cf429ba10 [Protected Audiences] Add some logging look for invalid debug URLs.
The browser process seems to be getting invalid report URLs from bidder
worklet processes for unknown reasons. This CL adds some
DumpWithoutCrashing() calls to the bidder worklet logic to try to locate
the call path that's causing this.

Bug: 41496188
Change-Id: I63a21f56ecbf83f61c37ed60b6069ebb8e7500ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5366521
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Commit-Queue: mmenke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272196}
2024-03-13 16:23:39 +00:00
80eecd8b89 VT: Skip transition if paint holding clears fallback resources.
This patch adds a new IPC to inform the renderer that the paint holding
timeout has been reached and the graphics has been cleared.

We use this signal to skip the view transition which would have looked
bad:

page A -> blank screen -> animation from page A to page B.

Now, we see the following:

page A -> blank screen -> page B.

R=rakina@chromium.org, khushalsagar@chromium.org

Bug: 41489647
Change-Id: I839892083fc3bde32a246833b51782289d51c878
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5361318
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Commit-Queue: Vladimir Levin <vmpstr@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272160}
2024-03-13 15:14:38 +00:00
c448942317 Convert OSExchangeData file contents to use std::optional
This adds the assumption that filename is non-empty. This
was always true for Wayland and the non-backed provider but
not for Windows or X11.

Bug: 328710562
Include-Ci-Only-Tests: true
Change-Id: I17940549535b310fd518cceff2f50cb5796c2eb1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5362337
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272151}
2024-03-13 14:54:45 +00:00
d8d6d73a1a Update CookiePartitionKey (de)serialization to use a class instead of a string
Currently the CookiePartitionKey (de)serialization methods consume or return a string that contains the top_level_site. The future incorporation of the ancestor chain bit means that the bit would have to be serialized into that string. Which has the potential to cause errors and might be unclear to developers when the serialized string is utilized in other parts of the system. Using a defined class will prevent these issues and allow for future extension if required.

Bug: 326610082
Change-Id: I7a72b3640f86aaa57827ca4f474a8a1ea573af86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5321100
Reviewed-by: Dylan Cutler <dylancutler@google.com>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Auto-Submit: Aaron Selya <selya@google.com>
Commit-Queue: Aaron Selya <selya@google.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272146}
2024-03-13 14:46:06 +00:00
c42aa9226a FLEDGE: Make RunGenerateBid... test helpers check bids_ array length
... by making the expectation conceptually a vector.
Practically, it's a variant of a mojom::BidderWorkletBidPtr and a
vector thereof, which means tests that expected one or zero bids don't
have to change, even if tests that expect more are a bit clumsy.

Change-Id: Ia261b56e1c0763ce685cbb2c2983684b1d8e7b99
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5367562
Commit-Queue: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: mmenke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272130}
2024-03-13 14:07:00 +00:00