This CL removes legacy SwiftShader from the
SetSoftwareWebGLCommandLineSwitches function
and uses SwANGLE for WebGL on all platforms.
Bug: chromium:1060139
Change-Id: Ie1ad81e6d648026f4143c09a103cdbd0d628fb48
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3408178
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: danakj chromium <danakj@chromium.org>
Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#963033}
During a transition, each shared element induces a render surface to
generate its content as an image. This image is then drawn using a
pseudo element which can be animated for the duration of the transition.
This pseudo element is drawn using a cc::DocumentTransitionContentLayer
tagged with the same SharedElementResourceId that the shared element's
render surface is tagged with.
Since the shared element's render surface output is drawn where the
DocumentTransitionContentLayer quad draws (instead of its actual
render target), this results in incorrect render surface dependency
tracking.
This change fixes this by updating the shared element's target render
surface to the render target of its corresponding
DocumentTransitionContentLayer (or to the layer itself if it has a
render surface).
This ensures that render passes are created in correct dependency order.
R=vasilyt@chromium.org, kylechar@chromium.org
Bug: 1277772
Change-Id: I9972eff032cbf9d76a1f8c2770a0937322de8907
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3396605
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Vladimir Levin <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#961631}
Connects the ChromeContentBrowserClient implementation of
IsInterestGroupAPIAllowed to the recently added access control function
for joining an interest group.
To support distinguishing joins from other interest group operations,
an InterestGroupApiOperation is added, and to better clarify the
contents, usage of GURL for the auction party is changed to Origin.
Additionally, to allow the PageSpecificContentSettings to be informed
of attempts to join interest groups, the interface is adjusted to
take the RenderFrameHost instead of the BrowserContext.
Stubs for PageSpecificContentSettings functionality are included, these
will be included in a follow up.
Bug: 1286276
Change-Id: If02aefa75e8cf80940b18bd122418c36bdb65665
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3398639
Reviewed-by: Russ Hamilton <behamilton@google.com>
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Theodore Olsauskas-Warren <sauski@google.com>
Cr-Commit-Position: refs/heads/main@{#961098}
If window.close() is called by a web test right *after* it has
completed, don't call OnTestFinished twice. Doing so leads to an extra
result being reported, and thus future web tests being matched to the
wrong expectations.
Fixed: 1283172
Change-Id: I8a3fd7eff9b553786ce1241e1d82875a1bdf9ddd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3383610
Auto-Submit: David Baron <dbaron@chromium.org>
Reviewed-by: danakj chromium <danakj@chromium.org>
Commit-Queue: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#958865}
When the layout dumps were stitched together we would use
web_contents()->GetMainFrame()->ForEachRenderFrameHost() but when
requesting dumps we would use web_contents()->ForEachRenderFrameHost().
Since back/forward cache can share the FrameTreeNode ids it is possible
that we'd iterate RenderFrameHosts in the back/forward cache and those
would get already handled causing the DCHECK.
There are two ways to fix this 1) Actually use a GlobalFrameRoutingID
which uniquely maps to a RenderFrameHost 2) Fix the inconsistency
which seems more correct. WebTest currently doesn't require dumps from
prerender or bfcached pages so it is more appropriate to iterate only
the active page.
BUG=1267581
Change-Id: I9c6fa2ef612e3a85c3a569359418897cb36677be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3345138
Reviewed-by: danakj chromium <danakj@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#952487}
Remove unnecessary includes and replace them with missing includes if
necessary. Fix the build by adding missing includes in various files
that depended on child_process_host.h's includes.
Also uninline ~ChildProcessHost().
Bug: 242216
Change-Id: I387ac9782910af2eedeed82de5355707dd63de48
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3309695
Reviewed-by: Alexander Timin <altimin@chromium.org>
Owners-Override: Alexander Timin <altimin@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#947045}
Introduces the initial NavigationEntry, created on FrameTree
initialization, which is not associated with any navigation. It will
be replaced or lose its initial-ness when the first navigation in the
main frame committed. With the initial NavigationEntry, we can always
guarantee that a NavigationEntry always exists, even when no navigation
has committed. This has many benefits, as outlined in the doc:
https://docs.google.com/document/d/1H81oAG13f21fUf-IGHH8AnjNVJFtaThowl5Ki9hWw5E/edit#heading=h.sbcge7snrbj3
This CL introduces a few changes of behavior:
- After initialization, a FrameTree/NavigationController will always
have a NavigationEntry. This will be reflected in content/public
functions such as GetLastCommittedEntry(), GetVisibleEntry(),
GetActiveEntry(), GetEntryCount(), GetLastCommittedEntryIndex(),
GetCurrentEntryIndex()
- Navigations that are previously ignored because there is no committed
entry to attach to or clone are now no longer ignored, except for the
synchronous about:blank commit for window.open().
What this CL does not change:
- This CL does not change the behavior of any navigation that wasn't
previously ignored, including initial empty document replacements.
- Web-platform-exposed behaviors, including history.length which will
still start at 0 instead of 1 on a tab that hasn't navigated at all.
- Behavior of WebView APIs. WebBackForwardList, which exposes the
whole session history list, remove initial NavigationEntry.
getOriginalURL() will continue to return null when there's no
committed navigation.
- Similarly, behavior of WebLayer APIs will not change. The values
returned by APIs such as GetNavigationListCurrentIndex() and
GetNavigationListSize() will continue to be what they were before (-1
and 0 respectively) even when the initial NavigationEntry exists,
preserving their previous behaviors.
This CL corresponds to Step 1 of the implementation plan in this doc:
https://docs.google.com/document/d/1H81oAG13f21fUf-IGHH8AnjNVJFtaThowl5Ki9hWw5E/edit#heading=h.8n643ug2wk11
This CL also applies all the changes detailed in the audit doc, except
for most of the "remove nullcheck" changes:
https://docs.google.com/spreadsheets/d/1MJyLNd6T5b7QWCO-qsSdnzmyLhubCddns1Uu9X8mEIk/edit#gid=0
Bug: 524208, 1215096
Change-Id: I9dbc17feeb451ae32954a8544cc32bb39ec37150
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3237491
Reviewed-by: Charlie Reis <creis@chromium.org>
Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Reviewed-by: Clark DuVall <cduvall@chromium.org>
Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Kevin Marshall <kmarshall@chromium.org>
Reviewed-by: Daniel Rubery <drubery@chromium.org>
Owners-Override: Charlie Reis <creis@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#946343}
Currently CHECK_EQ() at permission_request_manager.cc line 196 fails
when the permission is requested from a fenced frame. This is because
IsInactiveAndDisallowActivation() returns false for fenced frames.
This CL fix this by checking IsNestedWithinFencedFrame() in
PermissionContextBase::GetPermissionStatus().
Bug: 1190825, 1259837
Change-Id: Ieed75c6939d861da2f6fd2396fdbab7a43eb37a6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3220941
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Reviewed-by: Ravjit Singh Uppal <ravjit@chromium.org>
Reviewed-by: Adithya Srinivasan <adithyas@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/main@{#942118}
As discussed in https://bit.ly/3qtrn9s we want to use gfx::PointF for
scroll offset (out of blink renderer) and gfx::Vector2dF for scroll
delta, instead of gfx::Vector2dF for both, for the following purposes:
1. To make it easier to do the correct thing: passing blink scroll
position (currently using FloatPoint, will be changed to gfx::PointF)
to out-of-blink scroll offset (and vice versa); and to make it
difficult to do the incorrect thing: passing blink scroll offset [1]
to out-of-blink scroll offset. Without this CL, the incorrect thing
would be easier to do than the correct thing because of the data
type mismatches.
2. We can better distinguish scroll offset and scroll delta with
different data types.
3. Make it consistent to use gfx::Point[F] for absolute scroll offsets
throughout Chromium.
[1] See third_party/blink/core/layout/README.md for detailed explanation
for of scroll position and scroll offset in blink renderer.
Bug: 738465
Change-Id: Ic9ac9658b8f3154514608ef4039780d0f20883bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3267944
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Steve Kobes <skobes@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Owners-Override: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/main@{#941498}
This is taking care of a long-standing TODO to move these OnceClosure
holders rather than copy them around with their OnceClosure* members.
This is a precursor to
https://chromium-review.googlesource.com/c/chromium/src/+/3187153/35#message-fcc92e9f85e73f0e5ba6c03610a95cda8736f1f9
which highlighted a problem where some tests see a non-null
MainFunctionParams::ui_task but running the closure results in a UAF.
Logs show that the test hitting the UAF is not the one setting this
field. This CL makes that impossible and fixes the issue in the
follow-up CL.
This CL is intended to be a logical no-op.
This CL touches a lot of files and must happen all at once.
The core change is that ContentMainParams and MainFunctionParams's
moveable fields (ui_task, created_main_parts_closure, and startup_data)
are now held by moveable types rather than raw pointers.
This trickles in the following chain:
main() (in various *_main.cc)
(or SetUp() in !OS_ANDROID browser_test_base.cc)
-> ContentMain()
-> ContentMainRunnerImpl::Initialize()
(forwards arg into MainFunctionParams)
-> RunBrowser()
-> BrowserMain()
-> BrowserMainRunnerImpl::Initialize()
-> BrowserMainLoop (stores MainFunctionParams)
-> BrowserMainLoop::Init
-> ContentBrowserClient::CreateBrowserMainParts()
-> (Embedder)ContentBrowserClient::CreateBrowserMainParts()
-> (Embedder)BrowserMainParts(Platform)
-> (Embedder)BrowserMainParts
-> RunOtherNamedProcessTypeMain()
-> (Embedder)ContentMainDelegate::RunProcess()
(or)
-> FooMain() (kMainFunctions)
(or)
-> RunZygote()
(creates its own MainFunctionParams)
-> (Embedder)ContentMainDelegate::RunProcess()
(on OS_ANDROID, browser_test_base.cc calls directly into
ContentMainDelegate::RunProcess())
Few of these needed the params after passing them down so a move-only
model was simple to adapt (even if invasive). The few exceptions like
BrowserMainRunnerImpl::Initialize consuming |created_main_parts_closure|
are better off in the new model (where they take the OnceClosure before
passing down the params) because that prevents others down the chain
from having access to a OnceClosure they shouldn't invoke anyways.
Noteworthy:
- ContentMainDelegate::RunProcess():
Returned an exit_code >= 0 to indicate the embedder elected to handle
the run request given these params. With move-only semantics it is
necessary to return the params back when the embedder declines
handling this run request. An absl::variant return value is used
to satisfy this requirement.
- content/public/test/test_launcher.h : GetContentMainParams():
Becomes CopyContentMainParams() and only exposes a copy of copyable
params. Uses new ContentMainParams::ShallowCopyForTesting() which
verifies that moveable fields are still null by that time as should be
the case in the order browser tests are initialized.
- MainFunctionParams::command_line being const& violated the style-guide
rule to "avoid defining functions that require a const reference
parameter to outlive the call". This also prevented moving. The type
was hence switched to a const CommandLine*.
- BUILD.gn changes for nacl_helper_win_64 which requires static linking
of its minimal //content deps (was previously missing a dep but was
getting away with it because MainFunctionParams was .h only; required
now with .cc). This was already done for static_switches and this CL
adds static_main_function_params, reusing a similar static_features
target that already existed but was no longer required in
/c/nacl/broker, cleaning that up by replacing rather than copying that
target's definition in this CL.
- ContentMainParams::minimal_browser_mode was weirdly passed as a
parameter to ContentMainRunner::Run(bool start_minimal_browser) but
that method also has access to the ContentMainParams originally passed
via ContentMainRunner::Init(). Passing the param again from Run()
would be a use-after-move in content_main.cc, instead
content_main_runner_impl.cc was updated to use the param it already
has in store.
Bug: 1175074
Change-Id: I3af90505525e426383c59107a3903d645d455682
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3244976
Commit-Queue: Gabriel Charette <gab@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Clark DuVall <cduvall@chromium.org>
Owners-Override: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#940478}
This is another CL that removes USE_X11 define and
gn arg usage from //content and also removes
IsUsingOzonePlatform condition as it's no longer
needed as it always resolves to true.
Bug: 1096425
Change-Id: Ibbf2e861b46ffd8156dfe6fd5c6df75c54b83ba9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3198073
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Cr-Commit-Position: refs/heads/main@{#937765}
These line numbers are sometimes included and sometimes not,
and they are "test only" output. So to avoid tests that flaky-
fail for no reason related to the test, this CL removes line
numbers completely.
While this CL is quite large, the only material changes are to
these two files:
content/web_test/renderer/web_frame_test_proxy.cc
- Remove line numbers
third_party/blink/web_tests/TestExpectations
- Remove many now-passing, non-flaky tests.
The remainder of the files are rebaselines that remove the
string "line Xyz: " from expectations output. I verified both
automatically and by manual inspection that these are the only
changes in expectations. Of course, it'd be great if reviewers
double-spot-checked this.
For posterity (and FYI), I used this filter to look for expectations
changes that are unrelated to the console line numbers:
git diff HEAD^ -U0 --diff-filter=d | grep '^[+-]' | grep -Ev '^(--- a/|\+\+\+ b/)' | grep -v "CONSOLE"
The only thing it returns are the two files mentioned above.
Fixed: 896194
Change-Id: Idc318795c56dd78d2eb8575897a144ba4bc0de63
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3246152
Commit-Queue: Mason Freed <masonf@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/main@{#937717}
- Default action will not be exposed on elements just because they
have a given ARIA role -- there needs to be a mouse event handler
as well, on that element or an ancestor. Otherwise, clicking on
the ARIA element wouldn't do anything. For example, Chrome won't
assume that a role=button or role=menuitem is actionable.
- Elements that are considered disabled for any reason are not
considered "clickable".
- Remove unused code, such as code only used in web tests. The unused
web test code was actually incorrect. A link as a "jump" action,
not "press".
- Remove 2 antiquated tests from WebKit that do not test anything
relevant to our architecture that isn't tested better elsewhere.
This work is a precursor to CL:3252847
Bug: 1248236
Change-Id: I26ff7367d8d0bbfd3e0a28ec105f766f34adc377
NOTRY: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3252113
Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Daniel Libby <dlibby@microsoft.com>
Reviewed-by: Mark Schillaci <mschillaci@google.com>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#937539}
This CL fixes timeouts when running DevTools web tests massively in
parallel (e.g. via the `-f` option for run_web_test.py).
DevTools web tests have two WebContents. One loads the DevTools
frontend plus the test source, while the second loads the inspected
page resources.
In content_shell the DevTools frontend is loaded via apache.
The devtools:// scheme is only available in chrome.
Currently, the DevTools frontend is loaded via `localhost`, while
the test source and the inspected page resources are loaded from
`127.0.0.1`. This is a mismatch, as the DevTools page
(i.e. integration_test_runner.html) dynamically imports from
a different origin.
Either loading DevTools from `127.0.0.1` or loading the test source
from `localhost` fixes the issue, as the dynamic import is now
same-origin. We are not sure why though. Regardless, its probably
better to be consistent and load from the same origin in the
DevTools WebContents.
R=alexrudenko@chromium.org
Bug: None
Change-Id: Ib13af2dd1a705bdc9a780a4d3f08351d2cf1fa5a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3250903
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#937261}
This inlines all remaining DISALLOW_* macros in content/. This is done
manually (vim regex + manually finding insertion position).
IWYU cleanup is left as a separate pass that is easier when these macros
go away.
Bug: 1010217
Change-Id: I8b5ea6dd9f8a3f584cf3eef82634017a38b15be8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3193883
Commit-Queue: Peter Boström <pbos@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Auto-Submit: Peter Boström <pbos@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#936160}
'Spelling' and 'Grammar' values for |ariaInvalidValue| are represented
with markers, and the invalid state can be read through |invalidState|.
Therefore |ariaInvalidValue| is redundant and can be removed.
Also, based on the spec, |invalidState| will be set to true for all
non-empty and non-false values.
Bug: 1259555
AX-Relnotes: n/a.
Change-Id: I794b0554c1396bf2f8994fa41eeb7d7b145578b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3221050
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: Mark Schillaci <mschillaci@google.com>
Reviewed-by: Nektarios Paisios <nektar@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: David Tseng <dtseng@chromium.org>
Reviewed-by: Dan Clark <daniec@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#935841}
sandbox.mojom.Sandbox can now be used as the sandbox type so we
replace it everywhere.
The guts of the change are in //sandbox/policy/sandbox_type.h where
SandboxType is now deleted, and //sandbox/policy/mojom/sandbox.mojom
where sandbox types that are not already used in mojom ServiceSandbox
attributes are added.
Some cascading changes:-
- kService wasn't implemented on Mac (as it is equivalent to kUtility).
As we cannot alias enum fields in mojo like we can in C++ I have added
kService for Mac. The alternative is to define platform specific
ServiceSandbox attributes for all kService interfaces which seems to
put this complexity in the wrong place.
- sandbox_type.h included a number of buildflag headers that other files
then relied on. As sandbox_type.h is no longer needed in many places
and no longer needs these defines, they have been introduced where
required.
- sandbox::mojom::Sandbox is forward declared in a couple of headers
that are widely imported, hopefully reducing the number of times the
mojom.h is included but not used.
- some build deps must be modified.
- LibAssistantService needs a sandbox to be defined even when hosted
in process, so has kNoSandbox now when enable_cros_libassistant is
false.
Bug: 1210301
Change-Id: I13fa4fa8cbbb3090a38806fe5532787bbdf1e2fb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3213677
Reviewed-by: Charlie Reis <creis@chromium.org>
Reviewed-by: Sean Topping <seantopping@chromium.org>
Reviewed-by: Filip Gorski <fgorski@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Tao Wu <wutao@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Will Harris <wfh@chromium.org>
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#934126}
PDFium loads fonts directly, so only requires the test_fonts files
without the fontconfig parts. This CL moves the fontconfig-
specific parts of test_fonts into a subdirectory so that the
fontconfig dependency may be removed. This is required since otherwise
building 'all' would fail due to a missing fontconfig dependency.
R=thestig
Bug: 1250250
Change-Id: I773ed63a236e09666e1850cd3cb82765b395ae9f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3227476
Auto-Submit: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/main@{#933047}
This patch renames `GURL::GetOrigin()` to
`GURL::DeprecatedGetOriginAsURL()`. A subsequent patch will
reintroduce a `GURL::GetOrigin()` that returns a `url::Origin`
rather than a `GURL`.
This patch was brought to you by sed, followed by a little manual
work to deal with look-alike methods (most notably
`CascadePriority::GetOrigin()` and `NudgeTracker::GetOrigin()`) and
two or three spots that held pointers to GURLs:
```
git grep -n -l ".GetOrigin(" | \
xargs -L1 sed -i '' \
-e 's/\.GetOrigin(/.DeprecatedGetOriginAsURL(/g'
```
Bug: 512374
Change-Id: I03fb290650b8759d9849af0911cad9bdc92a5132
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3220292
Commit-Queue: Mike West <mkwst@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#931431}
This is a follow up CL for:
https://chromium-review.googlesource.com/c/chromium/src/+/3202052/comments/a963c207_8b7edbd6
A browser controls state is usually a per-tab level state.
However, the current interface misleads it as per-page level state.
As suggested in the previous CL comment, this CL moves the public
UpdateBrowserControlsState method from RenderFrameHost to WebContents.
All //content/public API users should use UpdateBrowserControlsState
in WebContents instead of RenderFrameHost.
Note that sources inside //content can use UpdateBrowserControlsStates
in RenderFrameHostImpl. For the back forward cache implementation,
RestoreBrowserControlsState is called before |cached_rfh| is restored
from the back forward cache, and we should not update browser control
state for the primary main frame but the cached frame.
For that purpose, RenderFrameHostImpl keeps UpdateBrowserControlsState
so that it can be called from back_forward_cache_impl.cc as before.
It was suggested in this CL comment.
Bug: 1256696
Change-Id: I6d5a753f66d396c23a9e609ca98551247e753d73
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3212280
Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Owners-Override: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#931355}
* Ensure the 'desc' element participates in the description calculation
* Fall back on the 'title' element if it wasn't used for the name and
there is no other description source.
* Fall back on the 'xlink:title' attribute if it wasn't used for the
name and there is no other description source.
* Ensure the 'title' child of a 'use' element participates in the
name calculation of its instantiated element.
AX-Relnotes: Improved the accessible text alternative computation for
SVG elements.
Bug: 231654
Change-Id: I38c50e606b5c038d0702dae6e696a03faad3c818
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3189722
Reviewed-by: David Tseng <dtseng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Joanmarie Diggs <jdiggs@igalia.com>
Cr-Commit-Position: refs/heads/main@{#931162}
This cl implements Lacros support for TTS voice handling part (behind
the flag feature::kTtsLacrosSupport):
1. Add Lacros support for tts.getVoices extension API and speech web API
SpeechSynthesis.getVoices to return all the voices provided by both Ash
and Lacros tts engines. The voices registered with Ash and Lacros are
available in both Ash and Lacros TTS for the primary profile.
2. The TtsController in Ash is the source of the truth, which knows all
the voices registered in both Ash and Lacros, queues up all the
utterances from both Ash and Lacros, and process them in sequence.
TtsControllerProxy in Lacros handles the speech requests from tts
extension API and web speech API, and sends them to Ash. I have built an
end to end prototype to support the speak API, in which Ash can speak out
a Lacros utterance with a Ash voice using either a voice from tts
extension engines that supports onSpeak(onSpeakWithAudioSteam is not
supported yet), or a native platform voice, and routes the TTS events
back to the calling client in Lacros. This cl contains only the voices
part.
3. When Lacros starts and loads a profile, TttsControllerProxy will
creates a BrowserContext keyed service TtsClientLacros which implements
mojom::TtsClient interface and registers itself with TtsAsh in Ash.
TtsAsh pulls Lacros voices with mojom::TtsClient::getLacrosVoices and
cached them. When the cached Lacros voices change, it will notify
TtsController. RemoteTtsEngineDelegate will provide the cached Lacros
voices to TtsController. TtsController::getVoices runs synchronously
as it does today.
4. TtsAsh observes voices change in Ash TtsController, and notify the
remote TtsClient in Lacros, so that TtsCliet in Lacros will call
mojom::Tts::getVoices to retrieve the entire set of the voices from ash
and cache them. TtsControllerProxy::GetVoices will retrieve the cached
voices from TtsClientLacros when requested.
5. The code is structured in such a way that can be extended to support
multiple user profiles later if multi-profile becomes available in
Lacros, but it has not implemented all the logic for handling
multi-profile since I don't want to add too much complexity at this
stage.
6. Adds support for incognito mode by override
TtsClientFactoryLacros::GetBrowserContextToUse to use its original
profile to create/get TtsClientLacros, so that incognito mode will be
handled in the same way as its original profile.
7. Duplicated voices: When Lacros becomes the only browser on ChromeOS,
Ash will contain the voices provided by 1st party Tts extension engines
(patts, eSpeak,Enhanced Network Engine), and the native platform; users
can installed 3rd party tts engine extensions only in Lacros. We simply
include all these voices tomake them available in both Ash and Lacros.
However, during a transitional phase when ash-chrome and lacros-chrome
runs side by side, it is possible to have the same TTS engine extension
installed in both Ash and Lacros, which leads to the duplicated voices.
Since this will be an edge case only for the transitional phase,
I didn't add sophisticated logic to merge and resolve the duplicated
voices; instead, I just have all voices included in the voice set, with
Ash voices listed before Lacros voices, so that Ash TtsController will
match the ash voice first if it has a duplicated one from Lacros.
Bug: 1227543
Change-Id: I29430502c039a5b9574dfe25466d5aa46af51955
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3178786
Reviewed-by: Sean Topping <seantopping@chromium.org>
Reviewed-by: Clemens Arbesser <arbesser@google.com>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: David Tseng <dtseng@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Commit-Queue: Jenny Zhang <jennyz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#929891}
This CL was generated by using tools/git/move_source_file.py to change
the includes for those files:
base/bind_post_task.h
base/deferred_sequenced_task_runner.h
base/post_task_and_reply_with_result_internal.h
base/sequenced_task_runner.h
base/sequenced_task_runner_helpers.h
base/single_thread_task_runner.h
base/task_runner.h
base/task_runner_util.h
base/updateable_sequenced_task_runner.h
Then formatted using "git cl format". DEPS files were fixed with a
simple search and replace script.
Bug: 1255932
Change-Id: I0d9b5ddd9260fde5e4581e6c6e0080bdb0ed2c44
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3209175
Reviewed-by: Gabriel Charette <gab@chromium.org>
Owners-Override: Gabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/main@{#929867}
Introduce a new TestRunner binding "setBrowserHandlesFocus" to allow
webtests to let the browser get a crack at handling focus between
pages. With mparch the browser is responsible for moving focus into the
parent from an inner frame tree.
BUG=1257595
Change-Id: I6b740ca032af8dfe13a62003aa60ae512701c460
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3212534
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#929419}