0
Commit Graph

834 Commits

Author SHA1 Message Date
e6deab359b Use browser context specific URLLoaderFactory for InMemoryDownloadService
Bring back profile URLLoaderFactory by async retrieving through
FullBrowserTransitionManager without breaking DownloadServiceFactory
as a SKSF (SimpleKeyedServiceFactory).

Bug: 395544421
Change-Id: I5c7126df0619ec7d57e78b947b0c1968f6d1fae3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6249551
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Claudio DeSouza <cdesouza@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1424112}
2025-02-24 13:04:06 -08:00
d885a8be06 Handle empty SkBitmap results in WebTestControlHost::OnImageDump().
In some cases, we'll fail to create an SkBitmap (for instance, when
printing via `TestRunner::PrintFrameToBitmap()`. We handle those cases
safely in general, but we missed a check against the color space here.
This CL punts out of image encoding early when it's unnecessary (and
impossible).

Bug: 397018488
Change-Id: If5a43f24312639391d482081671963e151040cf1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6287486
Reviewed-by: Jonathan Hao <phao@chromium.org>
Commit-Queue: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1423778}
2025-02-23 23:34:40 -08:00
1e230250af Remove type alias
Fulfil a TODO and remove a type alias.

Bug: none
Change-Id: I681865a22b5466a74c352b470662fbacca2cb42f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6280957
Commit-Queue: Devon Loehr <dloehr@google.com>
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Devon Loehr <dloehr@google.com>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1422559}
2025-02-20 07:39:11 -08:00
647ad46d95 [Fuchsia] Remove dependency on devtools-frontend
Devtools frontend is not supported on Fuchsia. Remove dependencies
on the corresponding resources.

Bug: 396724495
Change-Id: I5b31e5d0cf96af849b4070b6786472f75a1a7568
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6278810
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Junji Watanabe <jwata@google.com>
Reviewed-by: Sam McNally <sammc@chromium.org>
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: John Lee <johntlee@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1422107}
2025-02-19 11:34:33 -08:00
878f835180 Move ParsedPermissionsPolicyDeclaration from Blink to Network service
The network service is going to need access to the "storage-access"
Permissions Policy. This is the third step of moving some of the
Permissions Policy logic out of Blink to maintain a single
implementation of https://w3c.github.io/webappsec-permissions-policy
across Chromium.

Bug: 382291442
Low-Coverage-Reason: LARGE_SCALE_REFACTOR
Change-Id: Ic6ad87dd4bd6f882a135a0c580d481dc1b219831
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6254141
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: Rick Byers <rbyers@chromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Owners-Override: Rick Byers <rbyers@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Reviewed-by: Ari Chivukula <arichiv@chromium.org>
Commit-Queue: Sandor «Alex» Major <sandormajor@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421574}
2025-02-18 12:16:02 -08:00
0df3afce64 Fix Encoding Associated Interfaces as Function Args in Lite JS Bindings
Encoding associated interfaces passed as function call arguments relies
on the correct calculation of the dimensions of the paramStructSpec of
the said function call.

This is done in `computeStructDimensions` which internally calls
`computeDimensions` on each struct field.

The issue comes from `computeStructDimensions` assuming all calls to
`computeDimensions` return a numInterfaceIds which is not the case.

This fix makes sure to check if a numInterfaceIds is returned before
updating the `numInterfaceIds` for the paramStructSpec dimensions.

Change-Id: Iee4ae5d84c697450f800cf1c46aaa83bfb5ef5b6
Bug: N/A
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6272375
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Commit-Queue: Ali Hijazi <ahijazi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1421086}
2025-02-17 08:19:31 -08:00
6764bd04f4 Support web test font sideloading for FontDataManager
Web tests depend on Ahem being available as a system font. To achieve
this, the DWriteFontProxy sideloads Ahem in its internal collection.

This doesn't provide Ahem to the browser process' underlying font
manager, which makes it so FontDataManager can't see Ahem in web tests.

This CL sideloads the font in the browser's dwrite font manager, which
is used by the FontDataManager. This allows web tests that depend on
Ahem to pass when using FontDataManager.

Bug: None
Change-Id: Id56da6ac99070a4ac7f65436b86e68cd5c6de320
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6250577
Reviewed-by: Etienne Bergeron <etienneb@chromium.org>
Commit-Queue: Anthony Vallée-Dubois <anthonyvd@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1418296}
2025-02-10 12:29:09 -08:00
b971946682 DevTools: add an option to inherit permissions in Target.exposeDevToolsProtocol
Target.exposeDevToolsProtocol creates a new DevToolsAgentHostClient that
does not inherit permissions by default. To support WebDriver
implementation that relies on exposeDevToolsProtocol to create isolated
sessions, this CL allows the client to specify that current client
permissions need to be inherited. This is needed to let WebDriver access
Extensions domain commands to implement
https://w3c.github.io/webdriver-bidi/#module-webExtension

Bug: 393500934
Change-Id: Iaa2b339950ce1e22125f4872c0e962055aa183ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6217068
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1418087}
2025-02-10 05:36:38 -08:00
8317de3175 [Blink] Switch to using Graphite by default in layout tests on Mac14-ARM
Graphite has stuck in fieldtrial_testing_config.json and we are
experimenting on stable in Mac-ARM, so it's time to move the layout tests
on this platform to use Graphite. Rebaselines tests as necessary via
third_party/blink/tools/blink_tool.py rebaseline-cl .

In this CL we move only Mac14 to limit the scope of the change. We will
follow up with other OS versions.

Sheriffs: If this CL results in layout test failures please
rebaseline/add suppressions if at all feasible and CC me rather than
reverting the CL.

Include-Ci-Only-Tests: true
Bug: 40937352
Change-Id: I123cccc7ee9c7cec32fe8f4596c744a495b6bf25
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6179215
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1413635}
2025-01-30 11:29:20 -08:00
8726d30ed0 Suppress unsafe_libc_call warning for initial identified files.
See docs/unsafe_buffers.md for details. Enforcement is not yet
enabled, but this set of files are not in compliance with the
new warnings.

Bug: 390223051
Change-Id: I4e24c2141b9399f572678302c833947494098b29
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6187925
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1412673}
2025-01-28 18:11:08 -08:00
aece0d42b5 Remove WebVector: Automatic changes
Replace WebVector (which has been an alias of std::vector since
crrev.com/c/6204022) with std::vector.

function cg() {
  git grep --name-only "$1" -- *.mm *.h *.cc
}
sed -i 's/include.*web_vector.h"/include <vector>/' `cg web_vector.h`
sed -i '/^using blink::WebVector;/d' `cg 'using blink::WebVector'`
sed -i '/^using ::blink::WebVector;/d' `cg 'using ::blink::WebVector'`
sed -i 's/blink::WebVector\b/std::vector/g' `cg blink::WebVector`
sed -i 's/\bWebVector\b/std::vector/g' `cg WebVector`
git checkout -- third_party/blink/public/platform/web_vector.h
git cl format

Only manual changes are to remove unused "#include <vector>" added by
the above script, based on presubmit warnings.

BYPASS_LARGE_CHANGE_WARNING=`git cl split` will create too many CLs needing too many reviewers while this CL doesn't need much manual review.

Bug: 40865165
Change-Id: Ib70af44863ceaa73f470c77abe74d8994e2822a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6209609
Owners-Override: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1412669}
2025-01-28 17:57:12 -08:00
1557e5fbe4 [cleanup] Replace base::ranges with std::ranges: content/
Done entirely with `git grep` and `sed` + `git cl format`, no
hand-editing.

Bug: 386918226
Change-Id: I8561612cb02c9d62c455836dba414ab402e40694
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6199140
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Owners-Override: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1412009}
2025-01-27 17:14:08 -08:00
5984e7ea2a Extract DontShowPopupMenus and expose via content API
This allows Headless to explicitly tell content what it's trying to do
rather than patch out the platform underneath content, which frees
content to do reimplementation of popup menus.

Bug: 389067059
Change-Id: If9996c55f5c5313f1abe54731c08c8585a04a3f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6187262
Reviewed-by: Leonard Grey <lgrey@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1409664}
2025-01-22 07:31:55 -08:00
3ba50a50a4 Delete AllocateSharedBitmap
Now we don't use AllocateSharedBitmap after converting SharedBitmap to
SharedImage. CreateSharedImage is the one for software compositing.

Bug: 40064122
Change-Id: I43dcd5319f083aa19eb15ee4d18074aad76f7792
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6182348
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Auto-Submit: Maggie Chen <magchen@chromium.org>
Commit-Queue: Maggie Chen <magchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1408802}
2025-01-20 16:32:08 -08:00
73648bb41e Use new version of v8::String::Write* APIs in tests
The old v8::String::Write* APIs are deprecated and we should use the V2
versions of these APIs instead.

Bug: 373485796
Change-Id: I8ecfcd22021815a40d355a6d06612714ca710d8d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6156855
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1403511}
2025-01-08 04:30:10 -08:00
183b8d7028 [MPArch Guest View] Make WebPreferences queried per frame tree root
Different frame tree roots will require different web preferences
(extension applies different settings for apps). We need to be able
to query the preferences per frame tree root.

Bug: 40202416
Change-Id: If3c05dc72cce0ae7c68fe25d96727e1d7204e121
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6096390
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Kevin McNee <mcnee@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1403110}
2025-01-07 10:47:18 -08:00
4d1d7f9b83 [//content] Convert test_plugin away from SharedImageMapping
Converts to the functionally-equivalent new API that holds the
SharedMemoryMapping inside the ClientSharedImage and exposes it via
ScopedMapping.

Bug: 40064122
Change-Id: I185a87ec0fb121c9235d17472dc9f057bf4627ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6110451
Reviewed-by: Peter Beverloo <peter@chromium.org>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398531}
2024-12-19 06:28:41 -08:00
88d05ae28b Remove more Lacros leftovers from content/
- Remove IS_CHROMEOS_LACROS code
- Replace IS_CHROMEOS_ASH with the equivalent IS_CHROMEOS
- Similarly for is_chromeos_lacros/is_chromeos_ash.
- Drop obsolete includes/build dependencies.
- Drop lacros-chrome browser tag from gpu tests
- Drop obsolete skip directives from gpu tests

No change in behavior.

Bug: b:365742770 , b:365741912
AX-Relnotes: n/a.
Change-Id: I594d3677a9855d0649deba3ad836a1b3804440f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6097832
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398368}
2024-12-18 18:25:18 -08:00
d5ce01f7ef C++11 std::array rewrite for memory safety [11/19]
Split from:
https://chromium-review.googlesource.com/c/chromium/src/+/6004959

Generated patch
---------------
- Tool: ./tool/clang/spanify/rewrite-multiple-platform.sh
- Platform: Linux.
- Filter: This includes 2400/4222 patches. I included the std::array
      ones and excluded build errors.

Google announcement:
--------------------
https://groups.google.com/a/google.com/g/chrome-memory-safety/c/RMiO4gaVLQA/m/Yz-3NCObAgAJ

Benchmarks:
----------
See design doc and
https://chromium-review.googlesource.com/c/chromium/src/+/6004959/21

Description
-----------
The consensus during the memory safety summit was to begin rewriting
relevant C-style arrays to C++11 std::array. It can be done immediately,
offers better developer ergonomics, and fix large chunks of the
-Wunsafe-buffer-usage errors in Chrome.

To clarify, this effort is complementary to the longer plan work with
enabling -fsanitize=array-bounds, and we plan to leverage both,
especially for protecting 3p code.

[Attached] is a document detailing the rationale, benefits, and
considerations for potential compile-time and performance impacts.

[Attached]:https://docs.google.com/document/d/1z5aBDg26lHmNDjXRCysElWKx7E4PAJXqykI_k7ondJI/edit?tab=t.0#heading=h.cqgo7wvp0kzt

NO_IFTTT=No need to update base/debug/stack_trace.h

Bug: 378069401
Change-Id: I6d36543c267f12c672cce00d75cf833fff238ebf
R: dcheng@chromium.org
AX-Relnotes: n/a.
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6039265
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1395908}
2024-12-13 05:35:28 -08:00
f31c642e0a Code Health: Cleanup stale PersistentOriginTrials
Fixed: 362246755
Change-Id: I56c8d12207a77ef3775bd279b25dd5fb189df73d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6082699
Reviewed-by: Peter Pakkenberg <pbirk@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Commit-Queue: Nathan Memmott <memmott@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1395533}
2024-12-12 11:34:44 -08:00
d7086ce3b0 Rename test helper mojoms in //content/test/data
Bug: 383380971
Change-Id: I3ce0f503b2f765184cca8033ae5d73dc5a907de6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6089809
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1395453}
2024-12-12 09:04:27 -08:00
347764c002 Remove Lacros code from {chrome,content}/browser/speech
Remove code behind IS_CHROMEOS_LACROS, as well as the following
obsolete files in chrome/browser/speech:
  - tts_client_factory_lacros.*
  - tts_client_lacros.*
  - tts_external_platform_delegate_impl_lacros.*
  - tts_lacros.*
Also remove interfaces that no longer have an implementation:
  - content::ExternalPlatformDelegate
  - content::RemoteTtsEngineDelegate

No change in behavior.

AX-Relnotes: n/a.
Bug: b:373971535, b:365741912
Change-Id: Iea8014f30e139172ee8db1aede34964144ca2577
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6087237
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Katie Dektar <katie@chromium.org>
Reviewed-by: Evan Liu <evliu@google.com>
Cr-Commit-Position: refs/heads/main@{#1395245}
2024-12-11 20:03:45 -08:00
d15fd76ecb Change RenderProcessHost::GetID to RenderProcessHost::GetDeprecatedID
This change bulk changes RenderProcessHost::GetID to
RenderProcessHost::GetDeprecatedID to support the transition to a
strongly typed ChildProcessId.

Bug: 379869738
Change-Id: Ib0c991536486ef29702ea166cdcf12ea68ed70ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6065543
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Owners-Override: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Emily Andrews <emiled@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1394500}
2024-12-10 20:41:54 +00:00
4a6de15201 Rename SharedImageUsage.
Rename SharedImageUsage SHARED_IMAGE_USAGE_CPU_WRITE to
SHARED_IMAGE_USAGE_CPU_WRITE_ONLY in order to clarify the intent that
this usage is only meant for write only and not read.

This was required as all the other WRITE usages we have also implies
READ as well.

This CL is a no-op and strictly just a rename.

Bug: 40264379
Change-Id: I7e7a4e5102ad422d1b73b9cf02751c6944cfa12e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6071632
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Kramer Ge <fangzhoug@chromium.org>
Commit-Queue: vikas soni <vikassoni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1393191}
2024-12-06 22:25:26 +00:00
e263daabd1 Remove usage of base::make_span(): content/
Replace with span() CTAD use, or more targeted helpers.

Bug: 341907909
Change-Id: I5c40ce02387df62d9c9769227271a3f6ef637a7a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6060230
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1390215}
2024-12-02 09:26:54 +00:00
483e0127f1 [MPArch guest view] Fix authentication for MPArch guests
Pass the GuestPageHolder into the auth content APIs so that we can
find the correct WebViewGuest causing the authentication request.

Bug: 40202416
Change-Id: I4904e7fe6d4c3691cad1325fa8e20158f59ecfe0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6056267
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Peter Conn <peconn@chromium.org>
Reviewed-by: Kevin McNee <mcnee@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1389515}
2024-11-28 19:31:51 +00:00
74877f6406 web-tests: Reset third party cookies blocking to original state
Take into account third party cookie blocking flags when resetting the
third party cookie blocking state after each test.

This allows us to run all web tests with or without third party cookie
blocking.

Without this change, forcing third party cookie blocking through flags
would only work for the first test, since third party cookie blocking
would be disabled after the first.

Change-Id: Ic75e08d2cfd0022513a8cc8773980de52f98a828
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6049845
Auto-Submit: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1388449}
2024-11-26 21:03:46 +00:00
c48b1dd240 Move TransferableResource::origin setting to TextureLayer users
There are exactly four use-cases that create layer with flipped = true:
* DrawingBuffer, flip depends on composition and MESA_framebuffer_flip
* ImageLayerBridge: This used to update flip for each resource
* PepperPluginInstanceImpl for Graphics3D case. This is the only case
  which uses SetTransferableResource instead of TextureClient
* TestPlugin: Always uses bottom-left.

This CL makes TransferableResource adjustment right the place where
we pass it to TextureLayer, to make sure it's no-op.

Follow-up will push them closer to place where we create the resource.

This allows to remove flip from TextureLayer entirely.

Bug: 378688985
Change-Id: Ide4b81711db84ecb469bf3ee3731ec3e055489fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6039385
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1388225}
2024-11-26 15:02:01 +00:00
8860090413 Pass flipped to TextureLayer ctor
TextureLayer was flipped by default, but most production use-cases
would call SetFlipped right after that. This CL adds param to ctor to
avoid default value.

It also updates all unit tests that don't care about flipped to pass
false.

Bug: 378688985
Change-Id: I33235d0970bc023155ae9bb70c591c7f4239aa0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6039088
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1388200}
2024-11-26 14:02:29 +00:00
292f1e0a76 Revert the shared_image_ if state from the previous change in TestPlugin::PrepareTransferableResource()
Don't assume that |shared_image_| is always valid in
PrepareTransferableResource(). Revert part of the change from the
previous clean-up.

See the previous change in CL 6023878: Remove SharedBitmapIdRegistrar
from PrepareTransferableResource()
https://chromium-review.googlesource.com/c/chromium/src/+/6023878/7/content/web_test/renderer/test_plugin.cc

Bug: 379776574
Change-Id: Ib3535a920132e4cd89b7553a55ff2adf5296b24f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6037105
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Maggie Chen <magchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1385746}
2024-11-20 18:01:55 +00:00
b41d6ee12d Replace CHECK(false) in content/
In most cases NOTREACHED() is now a better option. Also performs
dead-code removal.

Bug: 40122554
Low-Coverage-Reason: OTHER Should-be-unreachable code
Change-Id: I3d9054619242c472feadab98d9de4024c74d4992
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6013928
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Auto-Submit: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1385678}
2024-11-20 15:49:39 +00:00
451cc2542d Remove SharedBitmapIdRegistrar from PrepareTransferableResource()
SharedBitmapIdRegistrar is no longer used after converting SharedBitmap
to SharedImage.

Bug: 40064122
Change-Id: Ie78b164f09a57f54da90894ea999843a9757d55f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6023878
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Maggie Chen <magchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1384539}
2024-11-18 20:36:20 +00:00
fb850e3eb1 Remove kCanvasSharedBitmapToSharedImage
This feature is enabled by default after M130.

Bug:40064122

Change-Id: I9052c002de2ed20e5afd79ad4cd39d172e19d0cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6024347
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Maggie Chen <magchen@chromium.org>
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1384024}
2024-11-16 19:12:11 +00:00
414b11f49b [video pip] Display origin in 2024 UI
This CL adds the Media Session's source title (generally the origin of
the page) to the video picture-in-picture controls.

Bug: 360357715
Change-Id: I350068155c418e523f2b2a654d5c1610a25406de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6016211
Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Peter Kvitek <kvitekp@chromium.org>
Reviewed-by: Fr <beaufort.francois@gmail.com>
Commit-Queue: Tommy Steimel <steimel@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1383886}
2024-11-16 00:16:36 +00:00
92a5d7dea4 [video pip] Add favicon to 2024 UI
This CL adds the website's favicon to the video picture-in-picture
controls.

Bug: 360357715
Change-Id: I8be92a423bf9a06c02d15b08587f1f7058270d99
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6015925
Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
Reviewed-by: Fr <beaufort.francois@gmail.com>
Reviewed-by: Peter Kvitek <kvitekp@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Tommy Steimel <steimel@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1383868}
2024-11-15 23:24:05 +00:00
e608efe630 [gpu] Add GL performance log suppression
Suppress GL_DEBUG_TYPE_PERFORMANCE log messages for web tests that can
get sent to the JS console and cause unnecessary test failures due to
test output log expectation comparisons.

Tested by removing suppressions for tests due to such failures in PS5
and adding mac-skia-alt-arm64-blink-rel bot.

Bug: 374090995
Change-Id: Id211e17e0f92f29af2faaadb9f806323162d9437
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6018367
Commit-Queue: Saifuddin Hitawala <hitawala@chromium.org>
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1382695}
2024-11-14 00:17:49 +00:00
8d111ba170 Preliminary plumbing for web test isolation.
This adds bits on LoadURLParams and NavigationRequest to indicate that
a new compositor is needed, and sets them to true when navigating to
about:blank?reset-web-test.

A follow-up patch will implement the new navigation behavior.

Bug: 40946696
Change-Id: I2284ed6c9ba2d082d41238c98916320b503fbeba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5808877
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Steve Kobes <skobes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1381762}
2024-11-12 15:23:51 +00:00
e379c4f2c9 Revert "Don't show popups (e.g. <select>) if the tab isn't focused"
This reverts commit 9a7e491a5c.

Reason for revert: Seems to have caused an extensions issue: https://issues.chromium.org/issues/377830108

Original change's description:
> Don't show popups (e.g. <select>) if the tab isn't focused
>
> It was previously possible for pickers like <select>'s picker to be
> shown on top of the not-currently-focused tab, confusing the user.
> With this change, the select picker must be the currently-focused
> tab for the picker to be opened. This is akin to existing protections
> for the tab being visible.
>
> Fixed: 365089001
> Change-Id: Id2b15f5d310cce877341d7e9d5a5c5d6da882887
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5909884
> Reviewed-by: Alexander Timin <altimin@chromium.org>
> Commit-Queue: Mason Freed <masonf@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1377731}

Change-Id: I94470d6e18b3393c0c9b814439bda5c61aad5565
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6012850
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1381534}
2024-11-12 01:22:10 +00:00
c81cdeb133 Reland "bluetooth: Use base::span when writing characteristics and descriptors"
This reverts commit 01792837d2.

Reason for revert: Fixed Cast target.

Original change's description:
> Revert "bluetooth: Use base::span when writing characteristics and descriptors"
>
> This reverts commit c128543f07.
>
> Reason for revert: Failures caused tree closure https://ci.chromium.org/ui/p/chromium/builders/ci/linux-cast-arm64-rel/5543/overview
>
> Original change's description:
> > bluetooth: Use base::span when writing characteristics and descriptors
> >
> > Updates the platform-independent API, platform-specific backends and
> > tests.
> >
> > Change-Id: Ia39d59f568ea7cc25f75d15a11a1fb48fb2b5d52
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5980562
> > Auto-Submit: Reilly Grant <reillyg@chromium.org>
> > Reviewed-by: Jon Mann <jonmann@chromium.org>
> > Commit-Queue: Jon Mann <jonmann@chromium.org>
> > Reviewed-by: Jon Mann <jonmann@google.com>
> > Reviewed-by: Jack Hsieh <chengweih@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1377107}
>
> Change-Id: I0135c4a4f0b55089565267021d8614160a0c0cad
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5984963
> Owners-Override: Angela Yoeurng <yoangela@chromium.org>
> Commit-Queue: Angela Yoeurng <yoangela@chromium.org>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Auto-Submit: Angela Yoeurng <yoangela@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1377117}

Change-Id: Ia4f31fc8c0c7d87c6bafa3b6b82b8185e49fceb6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5990173
Auto-Submit: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Jack Hsieh <chengweih@chromium.org>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Jon Mann <jonmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1380771}
2024-11-09 02:20:42 +00:00
880103e378 Remove danakj from OWNERS files
:salute:

R=arthursonzogni@chromium.org, dcheng@chromium.org, dtapuska@chromium.org, kylechar@chromium.org

Change-Id: I0d8f90a91e775615df8ff928972c09a216d1876f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6004731
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Owners-Override: danakj <danakj@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1380640}
2024-11-08 21:56:14 +00:00
b1c91d9b6a [video pip] Add progress bar to 2024 UI
This CL adds a progress bar to the video picture-in-picture controls.
It reuses the existing MediaProgressView element for this, and routes
the commands to the VideoPictureInPictureWindowController.

Bug: 360357715
Change-Id: I209d3d7a0c045fe00ec972861763789ce8c6aa2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5912245
Reviewed-by: Peter Kvitek <kvitekp@chromium.org>
Reviewed-by: Tommy Steimel <steimel@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Tommy Steimel <steimel@chromium.org>
Reviewed-by: Fr <beaufort.francois@gmail.com>
Cr-Commit-Position: refs/heads/main@{#1378645}
2024-11-05 22:06:08 +00:00
731c62b266 use c++20 starts_/ends_-with //blink
Bug: 40256235
Change-Id: If297502ad749bd92360116c3bde90051d81176d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5982559
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Helmut Januschka <helmut@januschka.com>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1378592}
2024-11-05 20:56:46 +00:00
6a0d165067 [web-tests] Dedup --disable-gpu-process-for-dx12-info-collection
`WebTestBrowserMainRunner::Initialize()` adds this switch twice.

Bug: None
Change-Id: I9e9d0954722c632f48c4985a0d3842d3d858eedf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5990232
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Auto-Submit: Jonathan Lee <jonathanjlee@google.com>
Cr-Commit-Position: refs/heads/main@{#1378461}
2024-11-05 18:24:25 +00:00
9a7e491a5c Don't show popups (e.g. <select>) if the tab isn't focused
It was previously possible for pickers like <select>'s picker to be
shown on top of the not-currently-focused tab, confusing the user.
With this change, the select picker must be the currently-focused
tab for the picker to be opened. This is akin to existing protections
for the tab being visible.

Fixed: 365089001
Change-Id: Id2b15f5d310cce877341d7e9d5a5c5d6da882887
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5909884
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1377731}
2024-11-04 17:33:17 +00:00
01792837d2 Revert "bluetooth: Use base::span when writing characteristics and descriptors"
This reverts commit c128543f07.

Reason for revert: Failures caused tree closure https://ci.chromium.org/ui/p/chromium/builders/ci/linux-cast-arm64-rel/5543/overview

Original change's description:
> bluetooth: Use base::span when writing characteristics and descriptors
>
> Updates the platform-independent API, platform-specific backends and
> tests.
>
> Change-Id: Ia39d59f568ea7cc25f75d15a11a1fb48fb2b5d52
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5980562
> Auto-Submit: Reilly Grant <reillyg@chromium.org>
> Reviewed-by: Jon Mann <jonmann@chromium.org>
> Commit-Queue: Jon Mann <jonmann@chromium.org>
> Reviewed-by: Jon Mann <jonmann@google.com>
> Reviewed-by: Jack Hsieh <chengweih@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1377107}

Change-Id: I0135c4a4f0b55089565267021d8614160a0c0cad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5984963
Owners-Override: Angela Yoeurng <yoangela@chromium.org>
Commit-Queue: Angela Yoeurng <yoangela@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Angela Yoeurng <yoangela@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1377117}
2024-11-01 22:01:40 +00:00
c128543f07 bluetooth: Use base::span when writing characteristics and descriptors
Updates the platform-independent API, platform-specific backends and
tests.

Change-Id: Ia39d59f568ea7cc25f75d15a11a1fb48fb2b5d52
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5980562
Auto-Submit: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Jon Mann <jonmann@chromium.org>
Commit-Queue: Jon Mann <jonmann@chromium.org>
Reviewed-by: Jon Mann <jonmann@google.com>
Reviewed-by: Jack Hsieh <chengweih@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1377107}
2024-11-01 21:47:27 +00:00
fc7ddc185b Migrate to NOTREACHED() in content/
NOTREACHED() and NOTREACHED_IN_MIGRATION() are both CHECK-fatal now.
The former is [[noreturn]] so this CL also performs dead-code removal
after the NOTREACHED().

This CL does not attempt to do additional rewrites of any surrounding
code, like:

if (!foo) {
  NOTREACHED();
}

to CHECK(foo);

Those transforms take a non-trivial amount of time (and there are
thousands of instances). Cleanup can be left as an exercise for the
reader.

This does clean up kCrashOnDanglingBrowserContext as both paths of the
kill switch are currently fatal. This has been rolled out for a long
time.

Bug: 40580068, 40062641
Change-Id: Ib88e710d003e2e48df3fc502ca54d2341d157a0e
Cq-Include-Trybots: luci.chromium.try:linux-dcheck-off-rel
Low-Coverage-Reason: OTHER Should-be-unreachable code
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5974816
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Auto-Submit: Peter Boström <pbos@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1376522}
2024-10-31 19:37:21 +00:00
081c2ad319 Use scoped access for shared image in TestPlugin
As part of the ClientSharedImage refactoring, this CL uses scoped
access objects in TestPlugin to automatically manage the access to
the shared image.

Bug: 40286368
Change-Id: I1adb96b0790aabd583d167d4ff9c8587b80a9526
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5973519
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Commit-Queue: Mingjing Zhang <mjzhang@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1375677}
2024-10-30 05:20:08 +00:00
27cc6bec44 [media] Apply inside blink to renderer/platform/media
Move some more blink media code into platform/media from public/platform/media. This allows us to use KURL directly and
not go to a WebURL on some calls.

Apply INSIDE_BLINK macro to other code that is in platform/media so
it will use the internal types. This is necessary because this code uses
blink mojom types and we want to enforce that blink mojo headers are
only included inside blink. Fortunately this addresses some of the
discouraged type overrides in the media code.

BYPASS_LARGE_CHANGE_WARNING=File move

Change-Id: I712128d82bb7e1971548f22aaadfdf31a7393ad6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5962517
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1374973}
2024-10-29 00:05:45 +00:00
097916145a Ignore native platform mouse events in web tests.
For web tests this stops WindowEventDispatcher::SynthesizeMouseMoveEvent
from sending the renderer a mousemove, which it normally does on startup
and whenever we swap in a new RenderWidgetHostView.

The benefits of this change are:

- Eliminating potential flakiness by making the web tests more order-
  agnostic.  Tests can behave differently with the mouse at (0,0) versus
  the position-unknown state which is restored in between test runs by
  EventHandler::ResetLastMousePositionForWebTest.  This also helps to
  de-risk upcoming web test isolation changes (go/web-test-isolation).

- Aligning Windows and Linux behavior with Mac.  AppKit sends a native
  mousemove to a new on-screen RWHV, similar to what Aura synthesizes.
  But AppKit does NOT send these mousemoves to headless web tests.

Bug: 374783343
Change-Id: I6b1d7234410cd6fa799954845bb5b50f5a2b82ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5808379
Commit-Queue: Steve Kobes <skobes@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372147}
2024-10-22 17:26:30 +00:00