Previous revert/reland commits:
commit 4ff6cec717
commit a163034492
commit 287b217280
commit eea02abfad
This patch makes the ::picker(select) popover element sometimes have a
computed style when it is display:none and makes slotting of the
<select> element consistent by only using one slot element.
The first attempt failed because always storing the computed style of
::picker(select) broke top layer animations features like
@starting-style. This patch addresses that by only storing the computed
style of ::picker(select) when the picker has appearance:auto or
appearance:none. appearance:auto/none <select>s need the computed styles
of their <option> elements for rendering.
Fixed: 364348901, 385675798
Change-Id: I651bba880470b91cf5c50c14204622a5c8d68c56
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6257116
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1427208}
This also removes the cache-clearing code that clears the cache when
enabling or disabling the
kSplitCacheByCrossSiteMainFrameNavigationBoolean feature... From
thinking more about this, since we found that navigations make up such a
relatively small percentage of what's cached, and since this change
doesn't result in cached entries that are guaranteed to never be used
again, I think the best way to launch this is to just enable it and let
any previous cross-site top-level navigations that don't get used age
off naturally.
Bug: 398784714
Change-Id: Ie1084654b329ad9d8bf3933a920fc27b7ca17124
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6302391
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Andrew Williams <awillia@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1427206}
Add a new PrivateNetworkRequestPolicy that corresponds to blocking local
network access (LNA) requests if there is no permission from the user
for the LNA request.
The permission hasn't been implemented yet, so using the policy (which
is flag guarded) blocks the local network access request.
Note: there is mention of a separate permission related to the Private
Network Access (PNA) spec. This is a completely separate permission,
that will be removed when PNA is removed from the code base.
Unfortunately, we can't remove it for a few milestones, and so in the
meanwhile we are stuck with 2 different permissions in the code base
relating to PNA/LNA.
Change-Id: Iaac8b2ca983c1ee52d26fa178602853dc88327a4
Bug: 395895368
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6292479
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Hubert Chao <hchao@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Chris Thompson <cthomp@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1427139}
This CL adds
- `kRequiresCallbacksUnderLock=false` to several chrome data sources: while true is the default for backward compatibility, these don't need it.
- Explicit Flush in BackgroundMetadataDataSource, to prevent data
loss; I'm investigating reasons why we often miss this event, this should help rule out data loss related to SMB scraping issue.
Change-Id: I37c386a85341797d69a18bf2452a59581f60cdcb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6305392
Reviewed-by: Mikhail Khokhlov <khokhlov@google.com>
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1427109}
SiteInstance::HasProcess() is commonly used to decide whether a renderer
process shall be created for a process. The CL replaces the check with
the same HasProcess() function when calling DumpWithOutCrashing() in
GetOrCreateProcess().
Bug: 400202176
Change-Id: Ic8ec0612d97fcb4415468a4870969f164ce351d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6311735
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Jiacheng Guo <gjc@google.com>
Cr-Commit-Position: refs/heads/main@{#1426959}
This makes AwWebContentsObserver also observe and notify page deletion
by signing up as a PageDeletionListener, registered on all pages that
have been the primary page.
Bug: 359826084
Change-Id: Id5a360aebf33b4c00ea80c3653e210620b405c74
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6304280
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Richard (Torne) Coles <torne@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1426907}
This introduces Page & PageProxy, along with adding the functions
that have Page as a param in the new navigation callbacks proposal:
https://docs.google.com/document/d/1DDyPvVe7pyJXFpiI3Bk5EPDpoTM550kPt04s2_WTU-w/edit?tab=t.0 that exists in the NavigationWebMessageSender
version, more specifically:
- NavigationClient.onPageDeleted()
- NavigationClient.onPageLoadEventFired()
- NavigationClient.onPageDOMContentLoadedEventFired()
- NavigationClient.onFirstContentfulPaint()
There's no real implementation yet for the functions except for
onPageLoadEventFired. This sets up the Page lifetime correctly
and adds the support lib plumbing as well.
Bug: 359826084
Change-Id: Icb5e99bb0d313249a4adc4b7e65dd2b32531ca84
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6290306
Reviewed-by: Lijin Shen <lazzzis@google.com>
Reviewed-by: Richard (Torne) Coles <torne@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1426906}
Only one PressureObserverManager can beconnected to the
PressureServiceBase.
To prevent wrong usage of PressureServiceBase from //Blink, we
added an extra check.
Bug: 398052996
Change-Id: I51662ad9f301015fa39f2c50367ba28e12128042
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6309305
Commit-Queue: Arnaud Mandy <arnaud.mandy@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1426743}
Following recent conversations with relevant Chromium on iOS folks, it
was decided that it made more sense for now to reverse one of the
decisions from https://crrev.com/c/6197019 and stop making the tvOS and
iOS builds be completely independent of each other: having them be
completely separate would require too many changes in GN, .grd, .py and
C++/Objective-C++ files in the tree (and even more so if we started
renaming the _ios.{mm,cc,h} files to something more generic).
More succinctly, this means that IS_IOS_TVOS in C++ and
`target_platform` in GN are set if and only if IS_IOS and is_ios are set
too, and iOS files and code paths are built on tvOS by default (rather
than being opt-in).
This CL implements this reversal while also making a few more
adjustments:
* The `is_tvos` GN flag is now called `target_platform` and takes
"iphoneos" (default), "tvos" or "watchos" as values at the moment. As
mentioned, it is set only if `is_ios` is also true (i.e. the target
toolchain is being used). Files used by multiple toolchains may need
to check for `is_ios` as well before referencing it.
* The GN flag is no longer being set in the main BUILDCONFIG.gn file,
but rather in one of the files in //build/config/apple. Build system
files that need to check this variable need to explicitly import this
file.
* `BUILDFLAG(IS_TVOS)` is now `BUILDFLAG(IS_IOS_TVOS)` in C++.
Bug: 391990604, 391914246, 397889862
Change-Id: I7862cf63074b8ff75b4b58c911212d4652cae113
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6306066
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Raphael Kubo da Costa <kubo@igalia.com>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1426638}
It is unclear when the accessibility engine is being used in a given
session. We know that a large percentage of users end up with the
engine running, but not how long into their session this occurs. An
accurate measure of this value would better guide our existing metrics,
and would give us a reasonable cutoff for candidates of an ablation
experiment. With this CL we add a metric to track accessibility engine
usage time since browser initialization.
AX-Relnotes: N/A
Bug: 395095542
Change-Id: Ife8a788aa86b77bb4330d544d5e473d3545673e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6309926
Commit-Queue: Mark Schillaci <mschillaci@google.com>
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1426603}
We currently always eagerly compile our JS worklet scripts. However, in
the case that our bid/score tasks are ready by the time the JS
downloads, it's better to lazily compile the JS so that we can run
our tasks earlier.
Bug: 385384684
Change-Id: I0931b84244b856f7500271d5670a3df52127228a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6308953
Commit-Queue: Abigail Katcoff <abigailkatcoff@chromium.org>
Reviewed-by: Russ Hamilton <behamilton@google.com>
Cr-Commit-Position: refs/heads/main@{#1426597}
This only impacts keepalive requests when they're handled in the browser
process.
As prerendered pages are not visible to users yet, attribution reporting
registrations on prerendered pages should be deferred until activation.
This is the existing behavior when keepalive requests are handled in the
renderer process.
This cl introduces
`DocumentAssocidatedData::AddPostPrerenderingActivationStep()`, similar
to `blink::Document::AddPostPrerenderingActivationStep()`, to maintain a
queue of callbacks which will be invoked upon prerendered page
activation.
When the page is prerendering, the delegation of background registration
operations to `AttributionDataHostManager` will be added to the callback
queue for post-prerendering activation.
This cl also refactors the logic to invoke
`KeepAliveURLLoaderService::FactoryContext::OnDidCommitPrerenderedPageActivation()`.
When the navigation commits, a callback is added to the queue if the
page is prerendering.
The callbacks will be run for this RenderFrameHostImpl and all of its
descendants as all of them are activated. This fixes a bug that the UKM
source ID for the attribution context was not updated for subframes
within the prerendered page, and therefore no UKM metric was recorded.
Fixed: 395906295
Change-Id: Iede9a726571518a168175ef2c4c4e26957473157
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6293024
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Andrew Paseltiner <apaseltiner@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1426591}
JS metrics are being skewed by parsing errors in the Clear-Site-Data
header. It's reasonable to bump these down to warnings since
they are basically notices that a header was ignored.
Bug: 399862589
Change-Id: I9298899d58e27d29b82275b50d01e240595faf76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6311715
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1426550}
Now that the ClientSharedImage destructor calls DestroySharedImage
which in turn can ensure that the deferred destroy request is flushed,
clients don't need to call SharedImageInterface::Flush explicitly.
This change removes Flush call from StreamTextureWrapperImpl's
video frame release callback on Android and DCOMPTextureWrapperImpl's
video frame release callback on Windows.
Bug: 399387909
Change-Id: I81a5f59c7c0205c7b62510c4789e36866c46d4ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6309670
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Saifuddin Hitawala <hitawala@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1426514}
This change removes some usages of StorageType in QuotaManagerProxy.
After StorageType::kSyncable deprecation, all other storage types
except kTemporary are deprecated. So we no longer need to specify
StorageType. Further cleanup to remove usage from QuotaManager,
QuotaDatabase, etc. will follow.
Bug: 40211051
Change-Id: Iba5caa5aefcc346cbcf9e7aac3f05ab33ca53d61
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6306646
Reviewed-by: Bo Liu <boliu@chromium.org>
Commit-Queue: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1426466}
The network service needs access to the permissions policy. Previous CLs
moved all the dependencies so it is now safe to move this class.
The following files need to include permissions_policy.h because
otherwise they want to have access into incomplete `PermissionsPolicy`:
* components/permissions/permission_uma_util.cc
* third_party/blink/common/manifest/manifest_util.cc
* third_party/blink/renderer/core/html/client_hints_util.cc
* third_party/blink/renderer/modules/payments/payment_app_service_worker_registration.cc
* third_party/blink/renderer/modules/payments/payment_instruments.cc
Bug: 382291442
Low-Coverage-Reason: LARGE_SCALE_REFACTOR
Change-Id: Ifcf52df3bc5c035e8f6a45df02cf93f304b748c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6310821
Auto-Submit: Sandor «Alex» Major <sandormajor@chromium.org>
Owners-Override: Rick Byers <rbyers@chromium.org>
Commit-Queue: Sandor «Alex» Major <sandormajor@chromium.org>
Reviewed-by: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Rick Byers <rbyers@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1426391}
As found in https://crrev.com/c/5241060, which was reverted, it's
cleaner to just use this directly instead of taking two arguments.
We can reland this part now, which will make the future fix smaller.
Also, by explicitly checking WebAudioLatencyHint::kLastValue we can make
sure the compiler will give an error if new enum values are added in the
future. Add another NOTREACHED for safety after the switch statement, to
handle non-enumerator values (allowed by C++).
Finally, make hardware_capabilities const.
Change-Id: I4432234bc09093ba11b75a6cc3958ca3c6c00a47
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6309667
Reviewed-by: Alvin Ji <alvinji@chromium.org>
Commit-Queue: Michael Wilson <mjwilson@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1426329}
This CL also makes ime_render_widget_host_ available on all platforms
and adds a method to check whether it has been set. This can be checked
to determine whether to use the CursorAnchorInfoMojoPipe path or not
(for cross platform compatibility).
Bug: 40940885
Change-Id: Iee2e0e2103bf5c9d4857b68aed079e6c60071f18
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6234054
Commit-Queue: Alex Mitra <alexmitra@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Reviewed-by: Jinsuk Kim <jinsukkim@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1426260}
The debug string building requires a lot of std::string appends. The CL
removes these debug string for loading performance.
Bug: 399783247, 40065692
Change-Id: Ic8a4965a9546c0023daceb1cb334404f174aa98f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6312375
Commit-Queue: Jiacheng Guo <gjc@google.com>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1426172}