0
Commit Graph

826 Commits

Author SHA1 Message Date
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
41188d4167 DocumentSubresourceFilter: Switch to RequestDestination.
This patch refactors DocumentSubresourceFilter to use network::mojom::RequestDestination instead of blink::mojom::RequestContextType.
Update subsequent dependencies and tests.

Bug: 373206908
Change-Id: I1c64cdf5ccf1737ec0c1860cfef8a34e60d639e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5933188
Reviewed-by: John Delaney <johnidel@chromium.org>
Commit-Queue: John Kim <johnykim@google.com>
Reviewed-by: Martin Verde <thesalsa@google.com>
Reviewed-by: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1372059}
2024-10-22 15:29:09 +00:00
99e9d6690c [shared storage] Check IsInterestGroupAPIAllowed() for interestGroups()
What: Check privacy sandbox settings for interestGroups().

How:
1. Add `browser_context` to the `IsInterestGroupAPIAllowed()` parameters
   to get the `PrivacySandboxSettings` for general permission check.
   This is because `render_frame_host` can be null (e.g., due to the
   initiator frame being destroyed and the worklet is in keep-alive
   phase). In this case, certain operations like console error will
   be skipped, but the core permission check will still be
   performed.
2. Introduce and use a new InterestGroupApiOperation::kRead type.

Bug: 367992703
Change-Id: I9e1b44efc3f67a408433e6284be82197bb594a73
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5936920
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Russ Hamilton <behamilton@google.com>
Reviewed-by: Fiona Macintosh <fmacintosh@google.com>
Reviewed-by: Ben Kelly <wanderview@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1370140}
2024-10-17 18:05:33 +00:00
332e097811 Modernize codec usage in content/
Codec calls have new API that uses std::optional and spans. Switch usage
to those new APIs, and lightly modernize the calling code.

Bug: 370696612
Change-Id: I84589ca62e8ab5ae7c560e295b6b6b20a7403114
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5938466
Auto-Submit: Avi Drissman <avi@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1369823}
2024-10-17 07:11:44 +00:00
0d0e1ba7cc [webauthn] Remove mojo testing API
My first project at Google was implementing the WebAuthn WebDriver
testing API. Some time after, I added a TODO [1] to remove it once web
platform tests no longer depended on it.

Four years later, the day of reckoning has come. The CI now runs
WebAuthn WPTs using real Chrome, and all the internal web tests that
depended on mojo were migrated to WPTs. The mojo testing API can be put
to rest. Farewell, old friend. I won't miss you.

https://media0.giphy.com/media/JOG3AA9pCgHCw/200w.gif

[1] https://source.chromium.org/chromium/chromium/src/+/main:content/public/common/content_switches.cc;l=428;drc=4b44bd63028a5aa82976dc4d7ed51cb78cbc6891;bpv=1;bpt=1

Fixed: 372169469
Change-Id: I6d31e0c51e06673694e02e26180561f1ec7db743
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5921534
Commit-Queue: Nina Satragno <nsatragno@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1368923}
2024-10-15 19:10:07 +00:00
6e6af3cdb6 Move cc switches from ::cc::switches to ::switches.
This is more compliant with
https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-dos-and-donts.md#named-namespaces
and prevents namespace hiding issues. It is also a more typical practice
in Chrome (though there are also many counterexamples at the moment).

This uncovered a duplicate switch in ui/base/ that I believe was
supposed to have been the same as the cc/ switch. It was only used
once; changing components/viz/ to use the cc/ switch directly
required modifying DEPS.

Bug: 364987728
Change-Id: I3af891f18851836cc7ffd918bd5e2e253024efed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5912279
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Owners-Override: danakj <danakj@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Victor Miura <vmiura@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1368521}
2024-10-15 00:13:18 +00:00
11eecbbd95 Use clearer parameter name in CreateLoginDelegate
The is_request_for_primary_main_frame parameter of CreateLoginDelegate()
could mean whether the request is for any resources in the primary main
frame, or whether the request is for primary main frame navigation.

The current name has confused people and caused bugs. The bugs were
fixed in http://crrev.com/c/5882129. As a follow up of that change, this
change adds _navigation to the parameter name to make it clear so that
we don't have this confusion in the future.

Bug: 40792637
Change-Id: I6cb8f729b703ad2ca23488287436424a10a3ace8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5910076
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Emily Stark <estark@chromium.org>
Commit-Queue: Liang Zhao <lzhao@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1367732}
2024-10-11 20:11:51 +00:00
62e70ea809 Also remove content-shell-devtools-tab-target feature
Bug: 330301889
Change-Id: I050a9299d6047f67692b102bce87ac154837810c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5898741
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1365377}
2024-10-08 08:18:06 +00:00
3af929c3e0 Pass isolate to GetCreationContext()
V8 wants to deprecate the use of v8::Object::GetCreationContext()
without the explicit isolate argument (see https://crrev.com/c/5906106). This CL adds isolate as argument for some of the uses in Chromium.

Bug: 336738728
Change-Id: I19044f941c4612a823c4aae8b78c4034a5e0d66c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5904164
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Owners-Override: Rick Byers <rbyers@chromium.org>
Reviewed-by: Rick Byers <rbyers@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1365344}
2024-10-08 05:53:19 +00:00