0
Commit Graph

474 Commits

Author SHA1 Message Date
2922f36940 Stop using deprecated v8::EmbedderHeapTracer
Bug: v8:13207,983223
Change-Id: I1df9c3c6d93f956a362654566eacaae8ff0e902f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4062755
Commit-Queue: Nico Weber <thakis@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1076906}
2022-11-29 17:03:46 +00:00
0bcd00a217 Migrate leak_detector to new base::Value APIs.
Bug: 1187001
Change-Id: Icdf9594da1443d9792152f0c3190e85f0f4cd57a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4062150
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1076332}
2022-11-28 19:17:59 +00:00
39db904e7a Reland "Replace children changed events with only marking object dirty"
This is a reland of commit 26358e91c2

Reason for revert: broke AccessibilityIpcErrorBrowserTest.ResetBrowserAccessibilityManager	Code across various bots

Original change's description:
> Replace children changed events with only marking object dirty
>
> Firing an actual children changed event has the same effect as
> marking a node dirty and incrementing the modification count. We don't process kChildrenChanged at all on the browser side except for in tests.
>
> Tests that used use kChildrenChanged have been altered to use the generated CHILDREN_CHANGED event where possible. However, unlike the generated kChildrenChanged, it only fires if the children actually change, which isn't always the case. Therefore some tests were altered to use other events such as focus changed, or end of test.
>
> Over time, we have been removing a number of events from Blink and
> relying more on browser-side computations of changes.
>
> Bug: none
> Change-Id: I25507d2c0d01525d057ec46769c474a6b6b77719
> Cq-Do-Not-Cancel-Tryjobs: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4041223
> Commit-Queue: Avi Drissman <avi@chromium.org>
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
> Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
> Reviewed-by: David Tseng <dtseng@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1074810}

Bug: none
Change-Id: I6c6e97c3bbd66d4c78d968f31b610cd396df6058
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4048033
Reviewed-by: Avi Drissman <avi@chromium.org>
Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1075362}
2022-11-23 22:49:48 +00:00
eac774f396 Pip 2.0: Merge VideoOverlayWindowViews and OverlayWindowViews
When exploring Document Picture-in-Picture first[1], a new
DocumentOverlayWindowViews subtype was introduced which caused the
creation of VideoOverlayWindowViews from OverlayWindowViews. Since it is
not necessary anymore, this CL merges  VideoOverlayWindowViews and
OverlayWindowViews and cleans up many left overs.

This CL has no functional changes.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/3252789

Bug: 1379386
Change-Id: I64ec577f321da8b80ea3a2d0fdd689e9b1cb3671
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4040140
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Tommy Steimel <steimel@chromium.org>
Reviewed-by: Boris Sazonov <bsazonov@chromium.org>
Commit-Queue: Fr <beaufort.francois@gmail.com>
Cr-Commit-Position: refs/heads/main@{#1075095}
2022-11-23 11:53:44 +00:00
c3938ef15d Create trial setup for PersistentOriginTrials
Adding 'OriginTrials' to the list of expected keyed services for Chrome.

For the url_loader_throttles.cc change, I realised that while all the
platforms in the trial list do return a valid pointer when the feature
flag is enabled, this is not necessarily true for other platforms.
In particular content/public/test/test_browser_context.cc does not
return a valid pointer unless explicitly instantiated, which caused
test failures on the test runners.

Bug: 1257579
Change-Id: Ie94020b6ef02df2f3fa0e159af2cc452b386b3c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4027571
Auto-Submit: Peter Pakkenberg <pbirk@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1075092}
2022-11-23 11:39:48 +00:00
dde6e05ad3 Revert "Replace children changed events with only marking object dirty"
This reverts commit 26358e91c2.

Reason for revert: suspected of breaking AccessibilityIpcErrorBrowserTest.ResetBrowserAccessibilityManager	Code across various bots

Original change's description:
> Replace children changed events with only marking object dirty
>
> Firing an actual children changed event has the same effect as
> marking a node dirty and incrementing the modification count. We don't process kChildrenChanged at all on the browser side except for in tests.
>
> Tests that used use kChildrenChanged have been altered to use the generated CHILDREN_CHANGED event where possible. However, unlike the generated kChildrenChanged, it only fires if the children actually change, which isn't always the case. Therefore some tests were altered to use other events such as focus changed, or end of test.
>
> Over time, we have been removing a number of events from Blink and
> relying more on browser-side computations of changes.
>
> Bug: none
> Change-Id: I25507d2c0d01525d057ec46769c474a6b6b77719
> Cq-Do-Not-Cancel-Tryjobs: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4041223
> Commit-Queue: Avi Drissman <avi@chromium.org>
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
> Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
> Reviewed-by: David Tseng <dtseng@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1074810}

Bug: none
Change-Id: I16ab4c08221f2f0452827f1dd778137ea69158ab
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4048836
Commit-Queue: Jeffrey Cohen <jeffreycohen@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Jeffrey Cohen <jeffreycohen@chromium.org>
Auto-Submit: Jeffrey Cohen <jeffreycohen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1074904}
2022-11-22 22:28:03 +00:00
26358e91c2 Replace children changed events with only marking object dirty
Firing an actual children changed event has the same effect as
marking a node dirty and incrementing the modification count. We don't process kChildrenChanged at all on the browser side except for in tests.

Tests that used use kChildrenChanged have been altered to use the generated CHILDREN_CHANGED event where possible. However, unlike the generated kChildrenChanged, it only fires if the children actually change, which isn't always the case. Therefore some tests were altered to use other events such as focus changed, or end of test.

Over time, we have been removing a number of events from Blink and
relying more on browser-side computations of changes.

Bug: none
Change-Id: I25507d2c0d01525d057ec46769c474a6b6b77719
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4041223
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1074810}
2022-11-22 19:51:29 +00:00
5b9af51fdd task posting v3: moving away from ThreadTaskRunnerHandle
To continue the migration away from TaskRunnerHandles, the codebase
was refactored using the following scripts:
shell script:
https://paste.googleplex.com/4673967729147904
python:
https://paste.googleplex.com/5824001174667264

This will do a few sed-like modifications, changing calls to methods of
ThreadTaskRunnerHandle to calls to methods of
SingleThreadTaskRunner::CurrentDefaultHandle, and swapping includes.

Bug: 1026641
AX-Relnotes: n/a.
Change-Id: Ia33b6dfebb15937481c619f5c838720ce7bb2676
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4031817
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Owners-Override: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1074085}
2022-11-21 15:32:47 +00:00
d927c9421e Enable Persistent Origin Trial for content/shell
This introduces the Persistent Origin Trial functionality to the
content_shell application.

To facilitate web tests of the persistent origin trial feature, this
CL also adds a new header to the content_shell app when running in
web-test mode, which sets a |X-Web-Test-Enabled-Origin-Trials| request
header with the names of enabled persistent origin trials.

This CL is part of the persistent origin trials implementation.
Full implementation plan here:
https://docs.google.com/document/d/1v4cwALXi33VgYrdqFCldDT0N0BuwiXzESt7NIJIiOTs/edit?usp=sharing

LOW_COVERAGE_REASON=web_test_content_browser_client.cc is being tested
     by the web tests. Coverage does not pick up on this though.

Bug: 1257579
Change-Id: Iefdd82547d3f9ba0d1809ab795f33eef13ee923f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3792108
Reviewed-by: Peter Beverloo <peter@chromium.org>
Auto-Submit: Peter Pakkenberg <pbirk@chromium.org>
Commit-Queue: Peter Pakkenberg <pbirk@chromium.org>
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Commit-Queue: Finnur Thorarinsson <finnur@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1072781}
2022-11-17 14:30:42 +00:00
340d8b04b7 Remove unnecessary weak_ptr.h includes in //content headers.
Files that do not reference "WeakPtr" have no need for weak_ptr.h. Then
fix files that are missing includes.

Bug: 242216
Change-Id: Id56125f8fecfdd382dbd51f8be4c2a56c3eb5e9d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4020780
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1071123}
2022-11-14 19:38:44 +00:00
52fa5a7f26 task posting v3: moving away from SequencedTaskRunnerHandle
To continue the migration away from TaskRunnerHandles, the codebase
was refactored using the following scripts:
shell script:
https://paste.googleplex.com/4673967729147904
python:
https://paste.googleplex.com/5302682490241024

This will do a few sed-like modifications, changing calls to methods of
SequencedTaskRunnerHandle to calls to methods of
SequencedTaskRunner::CurrentDefaultHandle, and swapping includes.

Bug: 1026641
AX-Relnotes: n/a.
Change-Id: I49e50a2bd1e78b00e7c067219fff96d2e0bc0b46
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3983373
Commit-Queue: Gabriel Charette <gab@chromium.org>
Owners-Override: Gabriel Charette <gab@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1071032}
2022-11-14 15:53:25 +00:00
8d217638ce Reland "[wptrunner] Consume wptserve config"
This is a reland of commit 7687ce10ba

Changes from original:
  Include missing `external/wpt/config.json` for all targets that depend
  on wptserve:
    https://source.chromium.org/search?q=%2F%2Fthird_party%2Fwpt_tools%2F%20lang:gn

Original change's description:
> [wptrunner] Consume wptserve config
>
> Currently, `run_web_tests.py` invokes `wpt serve --config=...` to apply
> Blink-specific overrides from `//third_party/wpt_tools/wpt.config.json`.
> However, this is a nonstandard location for this file; wptrunner expects
> this file to exist at the test root corresponding to the `/` URL prefix
> with the name `config.json`:
>   https://github.com/web-platform-tests/wpt/pull/36656#issuecomment-1292443696
>
> This change moves the file to the standard location, updates any stale
> references to the old location, and blocks the WPT exporter from
> upstreaming this Blink-specific file. `bluetooth/` tests that previously
> failed in wptrunner because they could not load
> `web_tests/resources/testdriver-vendor.js` should now pass.
>
> Test: run_{blink_web_tests,wpt_tests_isolate_content_shell} \
> Test: -t Default external/wpt/bluetooth/adapter
> Test: third_party/wpt_tools/update_certs.py
> Cq-Include-Trybots: luci.chromium.try:linux-wpt-content-shell-fyi-rel
> Bug: 1378043
> Change-Id: I457ab68e38071c348a442558a8a6a48b593fc2f5
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3984351
> Reviewed-by: Mike West <mkwst@chromium.org>
> Commit-Queue: Jonathan Lee <jonathanjlee@google.com>
> Reviewed-by: Weizhong Xia <weizhong@google.com>
> Cr-Commit-Position: refs/heads/main@{#1064403}

Bug: 1378043
Change-Id: Ibe6b490f493ba3a6b66a81ddb41889284e701b1d
Cq-Include-Trybots: luci.chromium.try:linux-wpt-content-shell-fyi-rel
Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Cq-Include-Trybots: luci.chromium.try:dawn-linux-x64-deps-rel
Cq-Include-Trybots: luci.chromium.try:win_optional_gpu_tests_rel
No-Export: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3995408
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Weizhong Xia <weizhong@google.com>
Commit-Queue: Jonathan Lee <jonathanjlee@google.com>
Cr-Commit-Position: refs/heads/main@{#1069883}
2022-11-10 19:12:24 +00:00
2d62ab6b03 Remove spurious stringprintf.h includes from non-headers.
Files that do not match the patterns StringPrint[fV] and
StringAppend[FV] don't need this include.

Bug: 242216
Change-Id: Id927c7500e6ac41f1aa1e411b0461cc75d8509fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4014655
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1069457}
2022-11-10 00:12:55 +00:00
d87307de3e Rewrite T& into raw_ref<T> under content/
The changes were generated by running
tools/clang/rewrite_raw_ref_fields/rewrite-multiple-platforms.sh with
tool-arg=--enable_raw_ref_rewrite

`raw_ref` is a smart pointer for a pointer which can not be null, and
which provides Use-after-Free protection in the same ways as raw_ptr.
This class acts like a combination of std::reference_wrapper and
raw_ptr.

See raw_ptr and //base/memory/raw_ptr.md for more details on the
Use-after-Free protection.

Bug: 1357022
Change-Id: I14c1f8d4d890715fb9b9f0526ace78ecc625c08a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3999748
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Ali Hijazi <ahijazi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1068278}
2022-11-07 20:15:03 +00:00
ac38936dfd Generate TTS_EVENT_PAUSE and TTS_EVENT_RESUME events for web tests
This CL generates TTS_EVENT_PAUSE and TTS_EVENT_RESUME in
WebTestTtsPlatform to get events in web tests.
It modifies 'restriction-speech-synthesis.html' to test pause()
and resume() in prerendering.

Bug: 1365948
Change-Id: Ic9491a14c4343e88bb197db062bf4dfee2bd212e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3981368
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Evan Liu <evliu@google.com>
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Julie Jeongeun Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1067415}
2022-11-04 05:39:32 +00:00
5c6a688e3f [FedCM] Support second valid provider in wpt tests
Bug: 1379865
Change-Id: I6331c91d036f260735ac629724cb8295a5de417b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3990653
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Commit-Queue: Zachary Tan <tanzachary@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1066872}
2022-11-03 04:06:02 +00:00
85a3569677 Fix for null deref of ax_context_ in test-only code
Fixed: 1379636
Change-Id: I680699f9d3fe442c0f38e35c89cbd2621d951e70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3999980
Reviewed-by: David Tseng <dtseng@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1066518}
2022-11-02 16:21:35 +00:00
6e2675ca8f Log console messages to stderr for all test types
When debugging timeouts, it can be very useful to have console
messages. These were not logged for non-WPT tests, so a timeout would
print no indications that a console message occurred. This patch logs
console messages to stderr for all test types.

Change-Id: I75f9fdf78da29af36bf25f054108ed508f6e3bf9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3994343
Auto-Submit: Philip Rogers <pdr@chromium.org>
Commit-Queue: Philip Rogers <pdr@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1065984}
2022-11-01 17:01:54 +00:00
12a59ece31 Simulate TTS_EVENT_END asynchronously for web tests
This CL introduces WebTestTtsPlatform::SimulateEndEvent() to send
TTS_EVENT_END asynchronously. As TTS_EVENT_START and TTS_EVENT_END
happen separately, when SpeechSynthesis.cancel() is tested
after SpeechSynthesis.speak(utterance), the test can get "canceled"
error code. The test for cancel() is introduced in a separate CL.

Bug: 1365948
Change-Id: I68f7081e3f089cf503cd92c0fe35d358b8e7245c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3979133
Reviewed-by: Evan Liu <evliu@google.com>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Julie Jeongeun Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1065813}
2022-11-01 04:14:47 +00:00
5ef758eabc Move a11y to post-lifecycle steps (iteration )
This is a reland of CL:3964415 and supporting CLs, which
were reverted together with a number of supporting CLs,
in CL:3990067 because of crbug.com/1376991. The problematic code
is fixed in CL:3988990. Also fixes a flake in week pickers
reported in bug 1378062.

A11y is moved to the end of the document lifecycle, where it can
occur in parallel with other tasks.

Parts of the code that used to force layout updates in order to
update the AX tree now call UpdateAXForAllDocuments(), a new
method introduced in the previous CL, which first updates the
lifecycle and then manually updates the AX tree.

Additional code cleanups in AXObjectCacheImpl related to
popups were also now possible.

Test changes:
* Changes to css-display-expected-win.txt and content-editable-notifications.html were due to a subtle change in event ordering,
but are still correct.

Fixed: 1378062,1376991
NOTRY: true
Change-Id: I7fa925e12cfb7352cbaf9c2deed4b83e47ae084d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3991106
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: Benjamin Beaudry <benjamin.beaudry@microsoft.com>
Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1064998}
2022-10-28 20:05:09 +00:00
2d1bacb14b [fuchsia] Remove support for using test_fonts in CFv1 tests
All tests that use //skia:test_fonts are now component framework v2
components, so it's high time to remove support for using them in v1
components.

Bug: 1287051
Change-Id: I898e6d2ea6490080ec76e2ee1ca243319057168e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3975331
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Auto-Submit: Greg Thompson <grt@chromium.org>
Commit-Queue: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1064826}
2022-10-28 14:39:45 +00:00
3c7eb577ee Revert set of a11y tree commits which cause crashes
It is not practical to revert each CL individually, so I have
created this CL to bundle all the reverts together.

da5d2ffb6d
4463d9a99f
2278ce249c
97778ef778
27716a230a
76b1d09313
faed33fe90
14c61afb23
962d5db870
b18739d115
4066dd6c1c

crrev.com/c/3964415
crrev.com/c/3970603
crrev.com/c/3974832
crrev.com/c/3976209
crrev.com/c/3971173
crrev.com/c/3972090
crrev.com/c/3970627
crrev.com/c/3970885
crrev.com/c/3976391
crrev.com/c/3978892
crrev.com/c/3975164

Revert "Move a11y to post-lifecycle steps (iteration )"

This reverts commit da5d2ffb6d.


Revert "AXObjectCache is still dirty if tree updates are paused"

This reverts commit 4463d9a99f.


Revert "Remove extra call to ProcessDeferredAccessibilityEvents()"

This reverts commit 2278ce249c.


Revert "More robust handling of aria-activedescendant invalidations"

This reverts commit 97778ef778.


Revert "Avoid redundant calls to UpdateAXForAllDocuments()"

This reverts commit 27716a230a.


Revert "Restore popup guard"

This reverts commit 76b1d09313.


Revert "Use DCHECKs to prevent recursive calls in AXObjectCacheImpl"

This reverts commit faed33fe90.


Revert "Avoid raw pointer in WebAXObjectProxyList"

This reverts commit 14c61afb23.


Revert "Clean up load logic so that it's easier to understand"

This reverts commit 962d5db870.


Revert "Deflake web tests that create the root ax object"

This reverts commit b18739d115.


Revert "Do not create orphaned AXObjects for whitespace text"

This reverts commit 4066dd6c1c.

Bug: 1376991
Change-Id: I9869417a9b9333fdf3a6b5796f94eabf9ac168e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3990067
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Owners-Override: Leo Zhang <googleo@google.com>
Reviewed-by: Colin Kincaid <ckincaid@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1064718}
2022-10-28 06:09:16 +00:00
49e9515b72 Revert "[wptrunner] Consume wptserve config"
This reverts commit 7687ce10ba.

Reason for revert: crbug.com/1379151

Original change's description:
> [wptrunner] Consume wptserve config
>
> Currently, `run_web_tests.py` invokes `wpt serve --config=...` to apply
> Blink-specific overrides from `//third_party/wpt_tools/wpt.config.json`.
> However, this is a nonstandard location for this file; wptrunner expects
> this file to exist at the test root corresponding to the `/` URL prefix
> with the name `config.json`:
>   https://github.com/web-platform-tests/wpt/pull/36656#issuecomment-1292443696
>
> This change moves the file to the standard location, updates any stale
> references to the old location, and blocks the WPT exporter from
> upstreaming this Blink-specific file. `bluetooth/` tests that previously
> failed in wptrunner because they could not load
> `web_tests/resources/testdriver-vendor.js` should now pass.
>
> Test: run_{blink_web_tests,wpt_tests_isolate_content_shell} \
> Test: -t Default external/wpt/bluetooth/adapter
> Test: third_party/wpt_tools/update_certs.py
> Cq-Include-Trybots: luci.chromium.try:linux-wpt-content-shell-fyi-rel
> Bug: 1378043
> Change-Id: I457ab68e38071c348a442558a8a6a48b593fc2f5
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3984351
> Reviewed-by: Mike West <mkwst@chromium.org>
> Commit-Queue: Jonathan Lee <jonathanjlee@google.com>
> Reviewed-by: Weizhong Xia <weizhong@google.com>
> Cr-Commit-Position: refs/heads/main@{#1064403}

Bug: 1378043
Change-Id: Icfe14a670a42ac423591888bfd02463e782341f5
Cq-Include-Trybots: luci.chromium.try:linux-wpt-content-shell-fyi-rel
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3989255
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Jonathan Lee <jonathanjlee@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Emilia Paz <emiliapaz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1064577}
2022-10-27 22:35:09 +00:00
7687ce10ba [wptrunner] Consume wptserve config
Currently, `run_web_tests.py` invokes `wpt serve --config=...` to apply
Blink-specific overrides from `//third_party/wpt_tools/wpt.config.json`.
However, this is a nonstandard location for this file; wptrunner expects
this file to exist at the test root corresponding to the `/` URL prefix
with the name `config.json`:
  https://github.com/web-platform-tests/wpt/pull/36656#issuecomment-1292443696

This change moves the file to the standard location, updates any stale
references to the old location, and blocks the WPT exporter from
upstreaming this Blink-specific file. `bluetooth/` tests that previously
failed in wptrunner because they could not load
`web_tests/resources/testdriver-vendor.js` should now pass.

Test: run_{blink_web_tests,wpt_tests_isolate_content_shell} \
Test: -t Default external/wpt/bluetooth/adapter
Test: third_party/wpt_tools/update_certs.py
Cq-Include-Trybots: luci.chromium.try:linux-wpt-content-shell-fyi-rel
Bug: 1378043
Change-Id: I457ab68e38071c348a442558a8a6a48b593fc2f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3984351
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Jonathan Lee <jonathanjlee@google.com>
Reviewed-by: Weizhong Xia <weizhong@google.com>
Cr-Commit-Position: refs/heads/main@{#1064403}
2022-10-27 17:17:20 +00:00
9f37e85be7 Add and implement a flag to use tab target in content_shell and web test runner.
Bug: 1370050
Change-Id: I69a6b8c62b0c0911dc185f27491139316f408c4e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3982255
Commit-Queue: Mike West <mkwst@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@{#1064201}
2022-10-27 07:09:19 +00:00
b18739d115 Deflake web tests that create the root ax object
Bug: 1378175
Change-Id: I5a837edd7ba4f72a90c0c56380cbe7f0b58f950b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3978892
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: Daniel Libby <dlibby@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1063524}
2022-10-25 22:04:22 +00:00
14c61afb23 Avoid raw pointer in WebAXObjectProxyList
Bug: None
Change-Id: I847fcc2a0abf890c86932f0520262470233eff1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3970885
Commit-Queue: Benjamin Beaudry <benjamin.beaudry@microsoft.com>
Reviewed-by: Benjamin Beaudry <benjamin.beaudry@microsoft.com>
Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1063437}
2022-10-25 19:21:29 +00:00
399b737833 [fuchsia] Switch to fonts.cm for serving test_fonts to content_shell
Bug: 1278939
Change-Id: Ia3af3afec73635f2353cb819333bc1930c54ce6a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3972486
Auto-Submit: Greg Thompson <grt@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Commit-Queue: Greg Thompson <grt@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1063245}
2022-10-25 11:33:26 +00:00
d51a3330fc For a11y, update layout for both main and popup documents
This CL is a necessary precursor to CL:3964415, which moves
accessibility to post-lifecycle steps. It fixes a number of test
failures related to popups, e.g. in color and date popups.

When serializing, snapshotting or otherwise consuming the a11y
tree, ensure both layout and accessibility are clean and up-to-date
for both the main document and (if present), the popup document.
This avoids situations where layout or a11y are not clean and
up-to-date when crossing from one document to the other.

This is accomplished by introducing WebAXContext::UpdateAXForAllDocuments() which calls into
AXObjectCacheImpl, which now tracks both the main and the
popup document, when showing. The old static methods on
WebAXObject to update layout are now removed.

Test changes:
* Changes to date-picker-ax, week-picker-ax, and month-picker-ax were
necessary as the number of dirty objects generated has changed.
This CL now removes the TestExpectations and
FlagExpectations for these files as they should consistently pass now.

Follow-ups:
* Move a11y to post-lifecycle steps (CL:3964415)
* Get rid of raw pointer to AXContext in WebAXObjectProxyList (see TODO in header)
* Update lifecycle unconditionally in AXObjectCacheImpl::UpdateLifecycleIfNeeded(), letting the layout code handle the conditions for early return. CL:3968646.
* Do not throw away return value from lifecycle update function,
  because it indicates there is a throttling scenario, and that
  the caller should defer work until later.

Bug: None
Change-Id: Ie0f661aadc397b3d74a871b23e8b347ff1a30215
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3961549
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Stefan Zager <szager@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1062326}
2022-10-21 20:23:42 +00:00
6c2d03be87 VT: Update the API to the latest spec
This patch changes the API to the new iteration that's in the spec.
The patch is pretty large! Here's a brief guide:
1. Most of the API and model changes are in document_transition.cc
   This is a big one that should be reviewed carefully
2. Since we no longer reuse a transition, and a transition object
   does not necessarily exist, supplement now has more
   responsibility about tracking what's created and what's not
3. Due to above, the rest of the changes are plumbing changes that use
   DocumentTransitionUtils to get the transition if one exists instead
   of getting the supplement directly
4. The test changes are just updating to the new API (for the most part)
5. Removed the stop transition API since it was a bit of a wart for
   testing purposes, and we have other test coverage in the area
6. Removed some tests that don't make sense in the new API.

R=khushalsagar@chromium.org, bokan@chromium.org

Change-Id: I015c7defa82c03e984b273c400b0ca777b58d4f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3957574
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Commit-Queue: Vladimir Levin <vmpstr@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1062134}
2022-10-21 14:52:42 +00:00
4d4e24099b DanglingPtr: Mark all of them as untriaged [1/N]
This patch must be a no-op with all the common build flags.

Add the "DanglingUntriaged" raw_ptr annotation. It indicates a
raw_ptr becomes dangling, and it should be triaged/fixed. This will also disable dangling protection for those pointers, once enabled.

These were identified by running the CQ bots with DPD activated (both build + runtime here: https://crrev.com/c/3941825)

Bug: 1291138
Change-Id: I07e3d85b1c629f7d49c928f1fca42a538c64ef3b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3959615
Owners-Override: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Pâris Meuleman <pmeuleman@chromium.org>
Commit-Queue: Ali Hijazi <ahijazi@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1061867}
2022-10-20 22:59:31 +00:00
f441b4ca49 [bfcache] Report breakdowns of DisableForRenderFrameHost
This CL reports a breakdown of DisableForRenderFrameHost reasons. Note
that we mask extension related reasons as "Extensions".

Now that I added another field to DisabledReason, it's now a complex
struct :( So I am adding a constructor and copy constructor.

Bug: 1374561
Change-Id: I2c99790a21d3f21d3268770726f1d5838b0bff76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3954524
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Fergal Daly <fergal@chromium.org>
Commit-Queue: Yuzu Saijo <yuzus@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1060819}
2022-10-19 02:14:32 +00:00
737d2472d7 [cleanup] Replace enable_basic_printing with enable_printing
Mechanical change to replace build flag enable_basic_printing with
enable_printing.  The source code define was already being set as
ENABLE_PRINTING, so this makes the build and source names match.

Change-Id: Ie1be57ce1f17655f9910cecc48f602b9a986c5de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3957357
Owners-Override: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Alan Screen <awscreen@chromium.org>
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1060594}
2022-10-18 18:43:47 +00:00
7ba87508b2 Pass the context's MicrotaskQueue into MicrotasksScope.
When we start allocating a MicrotaskQueue per WindowAgent we need to
pass the appropriate MicrotaskQueue into the v8::MicrotasksScope. For
now this has no behavioral change.

BUG=961186

Change-Id: Ia033c2b8a748d9e8d546343200f4123f452abc2d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3950830
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1059426}
2022-10-14 19:52:27 +00:00
4f4aacaf9a s/RasterContextProvider::BindToCurrentThread/RasterContextProvider::BindToCurrentSequence/g
crrev/c/3928266 changes the code to assume Media is now a
SequencedTaskRunner.
In preparation of changing the implementation to be a thread pool backed
sequenced task runner, this CL changes the BindToCurrentThread method
name to more accurately be named BindToCurrentSequence.

This change is achieved separately to de-complexify crrev/c/3928266.

Bug: 1144329
Change-Id: I4429a2986e4efe7823a170e54da1e3b423440b38
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3936623
Owners-Override: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Markus Handell <handellm@google.com>
Cr-Commit-Position: refs/heads/main@{#1059191}
2022-10-14 10:46:47 +00:00
86c3eaf5dd [blink] migrate tests and content shell to CFv2
Bug: 1278939
Change-Id: I7571a8a8bd5263be6c51d016527ba05298bdcc18
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3904541
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Derek Gonyeo <dgonyeo@google.com>
Reviewed-by: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1058662}
2022-10-13 13:35:55 +00:00
27a7b5cbe9 Refactor TtsPlatform to separate Lacros introduced changes.
This cl is a refactor without any functional changes.

It includes the following changes:
1. Add a separate interface ExternalPlatformDelegate
to handle tts requests that needs to be routed to an
external TtsController living in another browser process.
Move the functions added due to Lacros tts processing from
TtsPlatform to ExternalPlatformDelegate, so that TtsPlatform
should remain intact moving forward when we add more lacros
tts support.
3. Implement ExternalPlatformDelegateLacros for handling lacros
tts requests.
4. Disable TtsConctrollerTest.TestTtsControllerShutdown for
Lacros build since it does not apply to Lacros. We will add
separate lacros test later.

LOW_COVERAGE_REASON=The refactoring code should be covered by
the existing tests.

AX-Relnotes: n/a.

Bug: 1227543
Change-Id: I762cd2daaf37442d03af7fae6e8e6ba72422dcdc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3935307
Reviewed-by: Jenny Zhang <jennyz@chromium.org>
Reviewed-by: David Tseng <dtseng@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: Jenny Zhang <jennyz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1057641}
2022-10-11 20:19:12 +00:00
c725a7b112 Change WebNavigationType assignment logic
In Chromium, when navigating back to a page that is loaded by POST method, the navigation type is not back_forward as Firefox is.
This CL fix this issue. For investigation, see https://docs.google.com/document/d/
1b3xntaIctQTwgF5gUGjtr2TUHA5uSoqmvM-fIza81Rs/edit?usp=sharing

Bug: 1083373
Change-Id: I895116f0c6d92df12283ce7b3359410ac76e12ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3887581
Commit-Queue: Hao Liu <haoliuk@chromium.org>
Reviewed-by: Yoav Weiss <yoavweiss@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1057477}
2022-10-11 15:55:58 +00:00
46f61f0a35 bluetooth: Remove indirection from all MockBluetoothDevice methods
Now that there is support in gMock for move-only types there is no need
to provide wrappers around methods which take callbacks.

Change-Id: I7740f92fbc5aeeb855c7a96e1ab548549c571a89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3939158
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Reviewed-by: Alvin Ji <alvinji@chromium.org>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1056531}
2022-10-07 22:05:43 +00:00
4715ecdde3 Remove indirection in MockBluetoothDevice::CreateGattConnection
Now that gMock supports move-only types we don't need indirection to
support invoking a OnceCallback.

Change-Id: Id75ea1ba58ade3df6abd4f6f6924b56a9ae8ea9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3939645
Commit-Queue: Matt Reynolds <mattreynolds@chromium.org>
Auto-Submit: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Reviewed-by: Matt Reynolds <mattreynolds@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1056528}
2022-10-07 21:59:27 +00:00
003600d138 gfx::Transform::TransformRect[Reverse]() -> [Inverse]MapRect()
Besides the renaming, also change the function to return the mapped
value instead of modifying the input value in place, to make the methods
consistent with those in blink::TransformationMatrix and
gfx::AxisTransform2d.

Used the following commands to make automated changes (patchset 2)
(see https://pastebin.com/c8j2wsVe for definition of 'cg'):
sed -i 's/\(  \)\([^ ].*[.>]\)TransformRect(&\([0-9a-z\._]*\))/\1\3 = \2MapRect(\3)/' `cg TransformRect -l`
sed -i 's/\(  \)\([^ ].*[.>]\)TransformRect(\([0-9a-z\._]*\))/\1*\3 = \2MapRect(*\3)/' `cg TransformRect -l`
sed -i s/TransformRectReverse/InverseMapRect/g `cg TransformRectReverse -l`
git cl format

Manual edits are
- Changes of API and implementation of the functions
- Fixes for failures of the automated replacement
- Some small cleanups and optimizations

Bug: 1359528
Change-Id: If73382c9cfebb3b968ef162057c26843c57d71bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3929799
Reviewed-by: danakj <danakj@chromium.org>
Owners-Override: danakj <danakj@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1055553}
2022-10-05 23:28:07 +00:00
a6117879fc Use [[nodiscard]] in TargetConfig
Adds [[nodiscard]] to Set methods in TargetConfig that can fail, and
checks return values throughout.

Note: fixes in a bug in app_container_test.cc where token level
parameters were reversed.

Bug: 1353947
Change-Id: Ide82a3a4228810b3a215d38aee20947376192da2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3924295
Reviewed-by: Will Harris <wfh@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1054856}
2022-10-04 18:45:02 +00:00
ff4c2a0b44 [webdriver] Add Get All/Named Cookie Command
This CL implements the functions outlines in:
https://w3c.github.io/webdriver/#get-all-cookies
https://w3c.github.io/webdriver/#get-named-cookie
that return data in the format outlines in:
https://w3c.github.io/webdriver/#cookies
as requested in the PR:
https://github.com/web-platform-tests/rfcs/pull/108

These functions will make it much easier for WPTs to get details beyond
just name and value for set cookies.

Bug: 1342633
Change-Id: I485ac1007d98e2b68b49b82268e88054d882eee4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3891100
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Commit-Queue: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1054592}
2022-10-04 09:05:41 +00:00
8240038c4d gpu: Rename SHARED_IMAGE_USAGE_DISPLAY to SHARED_IMAGE_USAGE_DISPLAY_READ
This change is to prepare to add SHARED_IMAGE_USAGE_DISPLAY_WRITE. It
just does a text find/replace.

LOW_COVERAGE_REASON=No added/changed functionality

Bug: 1132392
Change-Id: If0166efd72ea97da31e11cf2cf5400402ba225cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3917092
Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Eugene Zemtsov <eugene@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Michael Tang <tangm@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1054296}
2022-10-03 20:22:13 +00:00
a03ba4ca94 Add caller param to SelectFileDialog::SelectFile()
Adds a new optional parameter to `SelectFileDialog::SelectFile()` and
`SelectFileImpl()` to pass information about the caller, in particular,
the URL where applicable, to specific implementations.

This is needed in order to support better integration of the files app
on CrOS (which is one type of `SelectFileDialog`) with the Data Leak
Prevention (DLP) restrictions, as described in go/files-dlp-metadata.

Bug: 1364565
Change-Id: I3bf97ec8abb0121d101f6e5cd73c7fc5d6d6909d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3909173
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Commit-Queue: Aida Zolic <aidazolic@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1052956}
2022-09-29 13:50:09 +00:00
622c28b886 Support speaking lacros utterance with ash voice.
This cl implements speaking a Lacros utterance with
an Ash voice:

1. Add SpeakOrEnqueue in Tts interface, which is used
by Lacros to pass the utterance to ash, so that the lacros
utterances will be queued and processed by ash's TtsController.

2. Add TtsUtteranceClient interface (implemented in lacros).
it is passed as a remote pending object in Tts::SpeakOrEqueue,
which can be used by ash to dispatch the TTS events back to Lacros.
It also notifies ash about destroying of the utterance in Lacros
when the associated WebContents object is destroyed.

3. The tts.speak related tests in TtsControllerTest does not
exercise the real code path for Lacros build. They used mocked
TtsPlatform for Lacros, which is not called when lacros tts
support feature is disabled. So I disabled them. I will add new
tests for Lacros build for lacros tts supported case.

LOW_COVERAGE_REASON=crosapi testing framework not ready yet

Bug: 1227543
Change-Id: I1eef1a75fe75f73258d3a62596f9a5b59b211daa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3880882
Commit-Queue: Jenny Zhang <jennyz@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Reviewed-by: Clemens Arbesser <arbesser@google.com>
Reviewed-by: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1052401}
2022-09-28 14:55:01 +00:00
af5540a7b5 [a11y-during-render] Move dirty_object list into Blink
Bug: 1068668, 1342801

Change-Id: Ie88eee26ba09431364758dd4509a476575befa93
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3911618
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Stefan Zager <szager@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1051477}
2022-09-26 23:25:50 +00:00
3bcf8d7222 Only use document-scoped layout updates before serialization
This is a precursor for work to move a11y to RunPostLifecycleSteps()
in CL:3861311.

There is no need to force a layout on every dirty node --
WebAXObject::MaybeUpdateLayoutAndCheckValidity() does not do this currently.

The only reason to ever do this might be if we wanted updated layout
information for every content-visibility: auto object, but this is
not necessary because the a11y code already special cases
content-visibility: auto objects with stale layout by not exposing
information that requires a layout object  such as style, location and
perfect whitespace computation. If a user tries to navigate to one
of these objects (e.g. via a skip to next heading command), then it
will be scrolled into view and receive full layout at that time.

In addition, forcing a layout for every content-visibility: auto node
would cost performance, including for users of password managers, etc.
and would ruin a lot of the benefit of content-visibility.

Bug: None
Change-Id: Id5ea7939bc997d0f8b100cd02fd736f3f4f9c9ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3905906
Reviewed-by: David Tseng <dtseng@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1049902}
2022-09-21 22:21:48 +00:00
ecf584957e Change BluetoothGattService::GattErrorCode to an enum class.
Change BluetoothGattService::GattErrorCode to enum classes to avoid
conflicts in enum values, as detected by -Wshadow.

Bug: 1344231
Change-Id: I27033c961fb46d4cf77fb09fef6b068bc347eefe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3906106
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Jon Mann <jonmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1049227}
2022-09-20 18:33:15 +00:00
494bc8b994 Rename GattErrorCode enum values.
- Change GattErrorCode enum values from FOO_BAR to modern kFooBar style.
- Use the enum values consistently as though GattErrorCode is an enum
  class. This makes it easier to switch to an enum class in the future.

Change-Id: I2c2c1ca880b388e3d92c939a865767933267fec6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3905045
Reviewed-by: Jon Mann <jonmann@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1049166}
2022-09-20 16:52:41 +00:00