This CL implements the necessary code changes to integrate the origin
trial feature for including JavaScript call stacks in crash reports.
The collection process is now contingent upon the check within
the execution context.
The generated Feature can be enabled/disabled by the user or by field
trial, and the overridden state takes precedence over the origin trial.
combinations:
Document doesn't have OT token --> feature is disabled
Doc doesn't have OT token, and we provide
--enable-features=DocumentPolicyIncludeJSCallStacksInCrashReports
--> feature is enabled
Doc does not have OT token, and we provide
--enable-experimental-web-platform-features --> feature is enabled
Doc has OT token --> feature is enabled.
Doc has OT token, and we provide
--disable-features=DocumentPolicyIncludeJSCallStacksInCrashReports
--> feature is disabled
Bug: 40268201
Change-Id: Iaef0c18b7db23cc884acf379bb6c74cecd464492
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5491178
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Issack John <issackjohn@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1299596}
The PEPC element needs to get the overall permission status including
the device status in order to correctly decide which text to present
to the user. This CL ensures that the PEPC observer will receive the
permission status including the device status, while not changing the
functionality for other observers. This is done by adding a new
parameter to the `AddObserver` call: `should_include_device_status`.
This parameter is trickled all the way down to the `PermissionManager`
where it is used when calculating the permission status for that
subscription only, whenever that is done.
*Reviewers*: This CL makes mechanical changes to many files, but the
only logical changes are:
* chrome_permissions_client.cc - implement OS device status interaction
for Mac
* components/permissions/permission_context_base.h - define new
`AlwaysIncludeDeviceStatus` function which allows the
`GeolocationPermissionContextAndroid` to keep its current functionality
* `components/permissions/permission_manager.cc` - use the new
`should_include_device_status` parameter to decide whether to include
the device status when getting the permission status.
* html_permission_element.cc - make the AddObserver call with
`should_include_device_status` = true
Fixed: 335834559
Change-Id: Ia8cf68010c9b596520a6b4c5fc61ad24577452f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5483406
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: David Song <wintermelons@google.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Reviewed-by: Peter Kvitek <kvitekp@chromium.org>
Reviewed-by: Thomas Nguyen <tungnh@chromium.org>
Reviewed-by: Antonio Sartori <antoniosartori@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Andy Paicu <andypaicu@chromium.org>
Reviewed-by: Sean Topping <seantopping@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: Eugene Zemtsov <eugene@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299563}
This updates the IsIsolatedContextAllowedForUrl path of enabling
IsolatedContext to never allow sandboxed frames.
WebExposedIsolationLevel::kIsolatedApplication is already not inherited
by sandboxed frames. This gives the same behavior to Chrome Apps and
kiosk.
Bug: b/336945294
Change-Id: Ib75f9ac0d19d05105f957dac0af9b03825c5c170
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5530400
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Reviewed-by: Andrew Rayskiy <greengrape@google.com>
Cr-Commit-Position: refs/heads/main@{#1299531}
That way they do not conflict with builtin keys
such as account_id or disclosure_text_shown.
I picked `param_` as the prefix. The underscore matches what
we use in other parameters like `account_id`.
Bug: 339457767
Change-Id: I68c778554514f94e9b59ef01ff5b12d4c55872bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5531106
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Reviewed-by: Yi Gu <yigu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299492}
The mojo callback for the response to the idb-internals page was
executing on a bucket thread instead of the main IDB thread.
Fix this by using SequenceBound the way it's intended to be used
instead of passing a callback to the bucket context.
Bug: 337994998
Change-Id: I08757523b116e8c987853f9b04745b8efcf2f272
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5528756
Commit-Queue: Evan Stade <estade@chromium.org>
Reviewed-by: Brad Triebwasser <btriebw@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299454}
`IndexedDBConnection` maintains a token identifying the client that
initiated the connection to support certain BFCache scenarios.
See https://chromium-review.googlesource.com/c/chromium/src/+/5203165.
This token is currently generated by
`IndexedDBClientStateCheckerFactory` based on the RFH ID of the client.
However, `IndexedDBBucketContext` - which implements the `IDBFactory`
interface and creates the IDB connections - can uniquely identify the
client by the `ReceiverId` of the mojo call creating the connection.
Hence, this CL passes the `ReceiverId` returned by `current_receiver()`
as the `client_token_` to `IndexedDBConnection`.
This CL has no functional changes and will help with further planned
work in this space, as discussed in the linked bug.
Bug: 336960312
Change-Id: Ibd10331f8034db5b076f8c9525dde027e55cb505
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5529157
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Brad Triebwasser <btriebw@chromium.org>
Reviewed-by: Evan Stade <estade@chromium.org>
Reviewed-by: Brad Triebwasser <btriebw@chromium.org>
Auto-Submit: Abhishek Shanthkumar <abhishek.shanthkumar@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1299392}
...which returns all feature detection knobs in a single object.
This makes it easier to incorporate new features for people running as
component auctions, as they don't need cooperation of the top-level
party for each feature they want to test, and can just take the entire
config as part of their RPC.
Bug: 332913415
Change-Id: I15c2abc410424db93a872dae2646fa2e2a6cfa05
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5530182
Reviewed-by: Mike Taylor <miketaylr@chromium.org>
Commit-Queue: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Caleb Raitto <caraitto@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299357}
This change fixes a bug where previously svg
images with a nested title tag were not using the
text from the title as the accessible name, as per
the rules for svg naming defined at:
https://www.w3.org/TR/svg-aam-1.0/
The previous algorithm groupped html images (<img)
and svg images (<image), in one step to compute
the accessible name by trying to read the alt
attribute. For html, this is correct; However, for
svg images trying to read the alt attribute is
wrong since there is no alt attribute, and the
way to provide accessible descriptions is through
aria.
Test: DumpAccessibilityTreeTest.NameSvgFromContent
AX-Relnotes: n/a.
Bug: 331902964
Change-Id: I0fbd06f4253531b8aaf4bc26f8be9d24df641e7a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5515384
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Lucas Radaelli <lucasradaelli@google.com>
Cr-Commit-Position: refs/heads/main@{#1299329}
In preparation of moving BrowserAccessibility* and
BrowserAccessibilityManager* to the ui/ layer, I am working to move
anything that can be done ahead of time.
This change removes yet another content layer dependency from
BrowserAccessibilityManagerMac.
I have tested locally and found no difference in VoiceOver's
announcements of live region changes.
Bug: 40672441
Change-Id: I4ed6a3df0c5afd00c415631d9806087682733230
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5522879
Commit-Queue: Jacques Newman <janewman@microsoft.com>
Reviewed-by: Benjamin Beaudry <benjamin.beaudry@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1299323}
For CCT, it will show a download interstitial page if another app
launches a URL that resolves to a download. For inline pdf, we
shouldn't do that. This CL exposes the MIME type from the native
NavigationHandle to its java counterpart, so we can determine
whether the interstitial should be shown.
Bug: 339511978
Change-Id: Ic317c9bcbab1d6538486af2143f1a5278df225c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5529698
Reviewed-by: Peter Conn <peconn@chromium.org>
Reviewed-by: Jinsuk Kim <jinsukkim@chromium.org>
Reviewed-by: Lijin Shen <lazzzis@google.com>
Reviewed-by: Shu Yang <shuyng@google.com>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299309}
Previously this method crashed due to a DCHECK in
base::ScopedObservation::Observe when an observation was already in
effect.
Bug: 339141101
Change-Id: Ie9e202c121fd7dff885c60981cd759a3206f8959
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5527382
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Commit-Queue: Andrew Paseltiner <apaseltiner@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299294}
This CL adds a flag guard to enable the mechanism from
https://crrev.com/c/5366846 only if the current page has a
view-transition opt-in.
That CL looks like it causes a non-trivial regression in CLS so it's not
clear it can be shipped yet. Since same-origin view transitions are
currently enabled to ship for M126, this gives us an option to enable
the behavior only in cases where a view transition is likely to take
place.
Bug: 41490049,332331777
Change-Id: I6811379c2b83e6de09f65a27ea468d1f17201986
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5526681
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299265}
On Android Platform, kDisableGpuShaderDiskCache is set to be true by default, so there is no need to do RemoveDiskCacheHandles(). If we do call RemoveDiskCacheHandles(), there's a chance accidentally triggering the gpu process to launch if it does not exist, because RemoveDiskCacheHandles() method will call delegate_->EnsureGpuHost().
Bug: dawn:549
Change-Id: I598f9ccfa81ba99591c37c0639b73ffef0493f0e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5528833
Commit-Queue: Charlie Reis <creis@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Charlie Reis <creis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299259}
This fix makes it so that if a replacement is made that makes the
new URL invalid, the renderURL will remain the original non-replaced
version.
Added tests to:
- Ensure this works properly.
- Verify deprecatedReplaceInURN works similarly.
- Verify validity of hostname replacements.
- Verify chaining deprecatedReplaceInURN with deprecatedRenderURLReplacements
- Same changes to component auctions.
Bug: 338236823
Change-Id: I0840e8458859e7652336b0c3baee6cfb8473862d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5517864
Reviewed-by: Orr Bernstein <orrb@google.com>
Reviewed-by: Russ Hamilton <behamilton@google.com>
Commit-Queue: Youssef Bourouphael <ybourouphael@google.com>
Cr-Commit-Position: refs/heads/main@{#1299231}
This patch fixes the issue where CSS APIs are not properly enabled when
the origin trial token is valid. The main issue was that
style_environment_variables was not passed the current execution context
and thus couldn't enable the APIs correctly (failing in the DCHECK for
viewport segments environment variables).
This patch makes the tests a lot more robust by making sure the CSS Variables
do resolve. In order to achieve this we need to be able to emulate the posture/segments
and the tests are now doing that. To avoid the tests depending on
DevicePostureProviderImpl, WebContentsImpl interface was modified.
Bug: 339681878
Change-Id: I1e3da4e6588492530b36c05e1780e5a1f9b5d7f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5530236
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Alexis Menard <alexis.menard@intel.com>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299211}
The embedder_blocked_hosts associated with kPrerender2 flag is
superseded by the new version associated with
kPrerender2EmbedderBlockedHost flag. This CL removes the unused old
version.
Bug: 41481880
Change-Id: I20f778c76f9420a876a5a273159673ffe98be88e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5529194
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299191}
Make [PasteActionModeCallback] use [SelectionPopupControllerImpl] as the delegate to create the menu instead of a new [SelectionActionMenuDelegate] created on the fly.
[SelectionPopupControllerImpl] already implements [SelectionActionMenuDelegate].
Bug: 320643289
Change-Id: I9f4f445125e1a336038cdf66645f96afe8fbcd9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5526597
Commit-Queue: Zakarie Yaris <yaris@google.com>
Reviewed-by: Peter Conn <peconn@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299188}
The [PasteActionModeCallback] handles the life cycle of the "paste" menu. Previously it was combined with the general code of the pastePopup menu in [FloatingPastePopupMenu].
Since the "paste" menu now uses [SelectionPopupControllerImpl] as a delegate directly instead of its own interface (which eventually used [SelectionPopupControllerImpl]), we have also moved the methods that hide and show the paste menu into the controller (making [FloatingPastePopupMenu] class redundant) and only left the callback in the file (which would also be moved into the controller in next CL).
Bug: 320643289
Change-Id: I59b22635725d6323b9ad5d905cef1c84318fb504
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5522217
Reviewed-by: Peter Conn <peconn@chromium.org>
Commit-Queue: Zakarie Yaris <yaris@google.com>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299159}
V8 fast calls can now allocate objects, trigger GC, call back to
JavaScript, and throw exceptions. Therefore there is no need anymore for
tests that check that API functions called by fast V8 calls don't do
these things.
Bug: 41492790
Change-Id: I4ab690b872eb890e46f5a7d24c2e7a96d4c505f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5526133
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299078}
We no longer use the code path to add IO-thread associated interfaces
directly to an IPC::Channel, except for some BrowserMessageFilter code
which also turns out to be dead code.
Delete this stuff.
Bug: None
Change-Id: Iad964273134fb953562c3829359117eee11179e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5530315
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/main@{#1299048}
RenderFrameHostManager::DetermineSiteInstanceForURL does not use its
dest_is_restore or dest_is_view_source_mode parameters. Clean these up.
Test: No behaviour change
Bug: 40202433
Change-Id: I914d3594ecec26a5fd69877c50a9fc857de656a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5530469
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Sharon Yang <yangsharon@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1299003}
Caret blink rate wasn't being sent to the files "save-as" dialog. This
change makes sure that the renderer preferences are updated to include
caret rate whenever the caret rate changes in NativeTheme.
See bug for video of this working (and video of it failing in the
initial description).
Test: Manual
Bug: b:339459013
Change-Id: I04e1922777666e3877c8d8a49123722cf58400dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5529700
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Katie Dektar <katie@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1298939}
absl::Cleanup is a helper to run arbitrary code when the absl::Cleanup
object goes out of scope, which is useful for executing cleanup code or
ensuring something always runs. The current //base equivalent is
base::ScopedClosureRunner, which executes a base::OnceClosure when the
runner object goes out of scope.
Compared to base::ScopedClosureRunner, there are several benefits to
using absl::Cleanup:
- works with capturing lambdas, which are often much more concise than
base::BindOnce()
- requires no heap allocations
- less impact on binary size since absl::Cleanup instantiates fewer
templates
This CL is part of a project-wide cleanup to migrate to absl::Cleanup
where appropriate. The general criteria for migrating usages of
base::ScopedCLosureRunner:
- The cleanup scoper must not escape block scope, e.g. it is not
returned from the function, passed to another function, or bound into
a callback.
- The cleanup scoper's type does not need to be named, e.g. the scoper
construction can use CTAD:
absl::Cleanup run_at_exit = [] { RestoreSettings(original); };
Note: having to write absl::Cleanup<decltype(lambda)> as a type is
often a sign that absl::Cleanup is not a good fit for how the code is
currently structured.
- The cleanup scoper is not simply running a base::OnceClosure.
Bug: 339492604
Change-Id: Id644c6a189081674b4d28814401f191f9d09d69f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5530368
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1298937}
pixel_skia_gold_validating_test is flaking on Samsung S23 GPU bot. These
video related tests occasionally crash due to DCHECK in
CompositorFrameSinkSupport::DidPresentCompositorFrame(). Add
RetryOnFailure to suppress the failures until root cause can be found.
Bug: 339457781
Change-Id: I59fe8087602404c0fa77367d105ce8982015e617
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5530202
Commit-Queue: Kyle Charbonneau <kylechar@chromium.org>
Reviewed-by: Saifuddin Hitawala <hitawala@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1298883}
Identify buyers that would not use all of their allocated space and
reallocate that space to other buyers. To accomplish this we calculate
the maximum serialized interest groups for each bidder. Then we
iteratively adjust the allocation so that bidders are not allocated
more space than they can use.
Bug: 332299012
Change-Id: Ifae52a26b8d730cf73f86942ee94a71dc4f2433f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5446064
Commit-Queue: Russ Hamilton <behamilton@google.com>
Reviewed-by: Caleb Raitto <caraitto@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1298877}