0
Commit Graph

72169 Commits

Author SHA1 Message Date
3c4369d082 Portals: Fix touch input transfer tests
Couple of issues dealt with by this CL:

1) We should be starting the gesture from near the bottom of the page
   instead from the top (as it moves upwards)
2) In TouchInputTransferAcrossReactivation, we might get some scrolling
   in the main page before the first activation. We should be checking
   to see if it has scrolled more than that amount after reactivation

Bug: 1010675
Change-Id: I6289549f1326a80896c8b78e6a66a724ac6dbeff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1880077
Reviewed-by: Kevin McNee <mcnee@chromium.org>
Commit-Queue: Adithya Srinivasan <adithyas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709989}
2019-10-28 18:56:21 +00:00
954e4b971a Implement support for ARIA code, strong, emphasis, and time roles
* Create ax::mojom::Role::kCode, kEmphasis, and kStrong
* Map to accessibility APIs as defined in Core-AAM specification

Because it is up to content authors and toolkits/frameworks to
style these roles as they see fit, font and format information
will be exposed based on authoring. We cannot assume (and thus
should not automatically expose) bold for the strong role or
italics for the emphasis role.

Bug: 1017195
Change-Id: I4fa6d300de27b01abd6c72742c4cf1ac90f63c01
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1875520
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: Kevin Babbitt <kbabbitt@microsoft.com>
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/master@{#709986}
2019-10-28 18:52:25 +00:00
71ce57cd11 Navigation: Reset commit timeout at ResetForCrossDocumentRestart.
It was the case that if ResetForCrossDocumentRestart is called before
committing, OnCommitTimeout was called which crashed when trying to get
the current RenderFrameHost.

The introduced test failed with the same stack trace in the related bug
before resetting commit timeout.

Bug: 1006677
Change-Id: Ia1d08f792cbd9c3692533d69519cb6da7e21d102
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879913
Commit-Queue: Mohamed Abdelhalim <zetamoo@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709984}
2019-10-28 18:51:16 +00:00
3b2b88c5dc Fix AllowSignedExchange crashing when closing incognito window
The PrefetchURLLoader's lifetime is managed using
mojo::MakeStrongBinding, which means it may live until after the
BrowserContext is destroyed. Instead of keeping the browser context
around to check if signed exchange is allowed, we check in the
constructor and cache the value.

Bug: 1016373
Change-Id: Ia6722ed37a8213078be856b11b9dde70ef230e8d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1881379
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709973}
2019-10-28 18:43:09 +00:00
daef62d803 Clean up old Mojo types for mojom::MhtmlFileWriter
This CL cleans up old Mojo types for mojom::MhtmlFileWriter with
replacing AssociatedBinding and MhtmlFileWriterAssociatedRequest
with AssociatedReceiver and PendingAssociatedReceiver.

Bug: 955171
Change-Id: I55f3209dcddbaa734e029ec34b881015bd5a2d84
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1880207
Commit-Queue: Min Qin <qinmin@chromium.org>
Reviewed-by: Min Qin <qinmin@chromium.org>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709969}
2019-10-28 18:01:50 +00:00
323f362d62 Extract WebContextMenuData::EditFlags to a different file
In order to remove the WebContextMenuData dependency from chrome/browser
we need to extract all the data types used in c/b from
web_context_menu_data.h and move them to different files under
third_party/blink/public/common.

WebContextMenuData::EditFlags is moved to a different file under public/common
so that chrome/browser does not depend on public/web.

This is the last step of the web_context_menu_data.h dependency removal
from chrome/browser so we're safe to remove it from DEPS file.

Bug: 1014517
Change-Id: I32bc847b596de9558607700288b650bd557b9318
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1878252
Commit-Queue: Sergio Villar <svillar@igalia.com>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709967}
2019-10-28 17:59:51 +00:00
c117648592 Revert "media: Add ENABLE_CDM_PROXY BUILDFLAG"
This reverts commit 15cb261d10.

Reason for revert: causing compile error on linux-archive-rel: https://ci.chromium.org/p/chromium/builders/ci/linux-archive-rel/12634

Original change's description:
> media: Add ENABLE_CDM_PROXY BUILDFLAG
> 
> CdmProxy is still under development and will not be enabled on all
> platforms. Hence, this CL adds a new buildflag so it's not enabled by
> default.
> 
> Tbr: nasko@chromium.org
> Bug: 785563
> Change-Id: Id1a1b65032e15f4d31a7755b01912deac0b3766d
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1869561
> Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
> Reviewed-by: John Rummell <jrummell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#709933}

TBR=nasko@chromium.org,xhwang@chromium.org,jrummell@chromium.org

Change-Id: I09d36127e7b47a390ce19a7ef28e63c2fe9c27e3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 785563
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1881637
Reviewed-by: Tommy Steimel <steimel@chromium.org>
Commit-Queue: Tommy Steimel <steimel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709938}
2019-10-28 16:58:28 +00:00
28567cffcd Move FrameMsg_CheckCompleted to mojo
CheckCompleted moves to mojo. There already is an implementation on
LocalFrame so this uses that same signature for implementation.

BUG=1008432

Change-Id: I23381f935f06290cebf0181bc6c6af462323ab28
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1877130
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709937}
2019-10-28 16:52:57 +00:00
15cb261d10 media: Add ENABLE_CDM_PROXY BUILDFLAG
CdmProxy is still under development and will not be enabled on all
platforms. Hence, this CL adds a new buildflag so it's not enabled by
default.

Tbr: nasko@chromium.org
Bug: 785563
Change-Id: Id1a1b65032e15f4d31a7755b01912deac0b3766d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1869561
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: John Rummell <jrummell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709933}
2019-10-28 16:42:18 +00:00
d6ed57e33e [bfcache] Fixing content_browsertest expectations
Removed the waiting on the frame deletion since nothing in the test actually
relies on the frames being deleted.

Bug: 1004786
Change-Id: Ief978db07f964c2837da93c5a9bed1768acc9e9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1881237
Reviewed-by: Camille Lamy <clamy@chromium.org>
Commit-Queue: Arthur Hemery <ahemery@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709928}
2019-10-28 16:27:55 +00:00
3c5f50468b Only apply transform when outermost != outer WebContents.
In applying the fix for Issue 1002598, we changed behaviour by
transforming coordinates for the case where outer and outer-most
WebContents are the same, and this seems to cause Issue 1015298.
This CL makes it so we only transform when there are different
outer and outer-most WebContents.

Bug: 1015298
Change-Id: I390bf37ca72cdfb5a2596721046e2c9937496df1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879597
Commit-Queue: James MacLean <wjmaclean@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709924}
2019-10-28 16:24:21 +00:00
1eaae7db70 All a11y methods in RenderFrameHost should check if the host is active before proceeding
When a RenderFrameHost is being swapped out, it will be in the process of being deleted.
Before any requests from accessibility should be serviced, we should
check if the RenderFrameHost is not being swapped out.
Otherwise, parts of the class instance, such as its RenderViewHost,
might have been destroyed, or the renderer associated with
the RenderFrameHost instance might not be able to
receive IPCs.

R=dmazzoni@chromium.org

Change-Id: I08a87cad7b789f0752adbcc1564b748456d5d338
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1881324
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Nektarios Paisios <nektar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709917}
2019-10-28 16:13:48 +00:00
f9703901d7 Clean up owners files for security & privacy reviews
Bug: 1018108
Change-Id: Ib6e14fa2ff814ebaec419cf768b11633015c2298
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879290
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Ryan Sleevi <rsleevi@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709915}
2019-10-28 16:09:27 +00:00
26cc91c397 Make WebContextMenuData::InputFieldType an enum class and extract to a file
In order to remove the WebContextMenuData dependency from chrome/browser
we need to extract all the data types used in c/b from
web_context_menu_data.h and move them to different files under
third_party/blink/public/common.

WebContextMenuData::InputFieldType is converted to a strongly typed enum class
and moved to a different file under public/common so that chrome/browser does
not depend on public/web.

Bug: 1014517
Change-Id: If4f90dbd69943c5d14bb12594a1a0a46cdb15a2f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1876088
Commit-Queue: Sergio Villar <svillar@igalia.com>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709911}
2019-10-28 15:42:35 +00:00
868752c19f [content] Fix navigation in LockObserver browser tests.
LockObserver browser tests were disabled on Android Kit Kat
because of flaky failures of the navigation performed in
SetUpOnMainThread(). Since it is not important to perform the
navigation from SetUpOnMainThread(), this CL moves it to the
test body.

The failure seems related to this comment:
https://cs.chromium.org/chromium/src/content/public/test/browser_test_base.cc?l=650-664&rcl=786a9194459684dc7a6fded9cabfc0c9b9b37174

This CL also removes the ContentMockCertVerifier in
LockManager browser tests, and instead specifies the
switches::kIgnoreCertificateErrors command-line flag,
which is simpler.

Bug: 1011765, 1014015
Change-Id: Ia1e140605a6734a95012f5c6019c6cef4918f372
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1854901
Commit-Queue: François Doray <fdoray@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709888}
2019-10-28 14:29:53 +00:00
b2c3c3e8dd [fetch keepalive] Introduce limit on the size of URL and headers
This is (3) in
https://docs.google.com/document/d/1sMG4xAT-myWtFaNa0kuLjRqsyxSy12ahgRIbffy1Bxk/.

Bug: 1018050
Change-Id: Ib265bd86153842b4f90c836fb0b06d200e94a787
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1880361
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709882}
2019-10-28 13:54:37 +00:00
f30b5b72ca Remove Browser.Responsiveness.JankyIntervalsPerThirtySeconds startup suffix
Only start monitoring after BrowserMainLoop::PreMainMessageLoopRun()
invokes base::DisallowUnresponsiveTasks().

R=erikchen@chromium.org, rkaplow@chromium.org

Bug: 1018359
Change-Id: I597c4b6a45797c66c0fa1b30fc3efdc9108aa81e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1881709
Auto-Submit: Gabriel Charette <gab@chromium.org>
Commit-Queue: Robert Kaplow <rkaplow@chromium.org>
Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709880}
2019-10-28 13:45:39 +00:00
1c45552506 Fix leaks in BackgroundFetchDataManagerTest tests.
These tests must allow tasks on the cache thread and the main loop to
run to allow for proper cleanup. Without this, files in the profile dir
may be held open beyond the lifetime of the test function, inhibiting
ScopedTempDir's ability to clean them up during TestBrowserContext
destruction.

BUG=546640,1016662

Change-Id: I1f9b50cb91a7fd287a103a4528ffe393720aeec9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1882319
Commit-Queue: Greg Thompson <grt@chromium.org>
Commit-Queue: Rayan Kanso <rayankans@chromium.org>
Reviewed-by: Rayan Kanso <rayankans@chromium.org>
Auto-Submit: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709877}
2019-10-28 13:23:51 +00:00
5b452cc5ab [navigation] Removing IsPerNavigationMojoInterface checks in NavigationRequest.
NavigationClient is on by default, removing unnecessary branching.

Bug: 784904
Change-Id: I9024044ec53edd8776dda2427e59b754cd0f91ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1821179
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Arthur Hemery <ahemery@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709873}
2019-10-28 13:10:44 +00:00
8aaf24b826 Rename WebContextMenuData::MediaType to ContextMenuDataMediaType
In crrev.com/c/1866520 the WebContextMenuData::MediaType was extracted to a
different file and renamed as ContextMenuDataMediaType. That alone required so
many changes (as the enum became an enum class) that an alias was added for the
old name in order to keep the changes under control and ease the review.

In this follow up patch the alias (using) is removed and the code starts to use
the new enum class name.

Bug: 1014517
Change-Id: I563fb0d6cc1a13a796988d6a66e995835b92c335
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1872004
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Sergio Villar <svillar@igalia.com>
Cr-Commit-Position: refs/heads/master@{#709872}
2019-10-28 13:02:45 +00:00
193084b4e4 [navigation] Enforce having a NavigationClient at commit time.
We are now always using the NavigationClient to commit a successful
navigation or an error page. We update all the "commit calling" stack
to reflect that.

One important exception to note is committed interstitials, that commit
without a NavigationRequest. This prevent us from fully removing the old
FrameNavigationControl::CommitNavigation path.

Bug: 784904
Change-Id: Ife819ed0d2274630939323ad21863c354229a3f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1819242
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Arthur Hemery <ahemery@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709866}
2019-10-28 12:48:18 +00:00
2cb5cb3bd9 [Cleanup] Remove unused pcm files.
* single_user_demo_mono_16kHz.pcm was never used, apparently.
* speechmusic_mono_16kHz.pcm was only referenced by one test,
  which was removed here:
https://codereview.chromium.org/194813002

TEST=content_unittests

Bug: chromium:331030
Change-Id: I4b77c264729db411d38f5d0568496cb76a2ce4be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1882308
Reviewed-by: Tommi <tommi@chromium.org>
Commit-Queue: Yves Gerey <yvesg@google.com>
Cr-Commit-Position: refs/heads/master@{#709864}
2019-10-28 12:39:26 +00:00
1095a0b321 Make WebContextMenuData::MediaType an enum class and extract to a file
In order to remove the WebContextMenuData dependency from chrome/browser
we need to extract all the data types used in c/b from
web_context_menu_data.h and move them to different files under
third_party/blink/public/common.

This is the first step of those migrations. We took the chance to
convert the WebContextMenuData::MediaType into a strongly typed enum
class. In order to keep the amount of changes under control we are
adding an alias (using MediaType = ContextMenuDataMediaType) to the
new structure so that no additional changes are required. A follow up
patch will remove that alias and perform the renames.

Bug: 1014517
Change-Id: I33a351a81eec1e0a7c09d783859f8078a5355778
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1866520
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Sergio Villar <svillar@igalia.com>
Cr-Commit-Position: refs/heads/master@{#709854}
2019-10-28 11:38:07 +00:00
86901a594f Fix file handle leaks in BackgroundFetchDataManagerTest tests.
Tests using BackgroundFetchDataManagerTest::MatchCache inadvetantly held
files in the profile dir open beyond the lifetime of the test function,
inhibiting ScopedTempDir's ability to clean them up during
TestBrowserContext destruction. This change causes MatchCache to wait
until the main RunLoop goes idle, thereby allowing for residual tasks to
be posted and run upon destruction of the response given to
DidMatchCache.

BUG=546640,1016662

Change-Id: I4e2a989ec2b744b61b75e3ba2d09270c0eab3c70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1882310
Reviewed-by: Rayan Kanso <rayankans@chromium.org>
Commit-Queue: Rayan Kanso <rayankans@chromium.org>
Auto-Submit: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709850}
2019-10-28 11:21:26 +00:00
6dc9714616 Reenable two SignedExchangeRequestHandlerBrowserTest.
This reenable:
 - SignedExchangeRequestHandlerBrowserTest.Simple
 - SignedExchangeRequestHandlerBrowserTest.VariantMatch

Histograms in this file are recorded when the RenderFrameHost is
deleted. This is triggered by a navigation. The problem is that the
deletion is never synchronous and the test wasn't waiting for this.

To fix this, wait for any RenderFrameHost to be deleted before checking
the histograms.

Along the way, flush the BackForwardCache to release the remaining
RenderFrameHost

Bug: 1016865, 965925
Change-Id: Icc0c26baf9b0e0d7f539eec1ed1e53f1e0d49ce0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1878770
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709848}
2019-10-28 11:19:41 +00:00
5751c53aff Loosen the restriction on the number of keepalive requests
This is (1) in
https://docs.google.com/document/d/1sMG4xAT-myWtFaNa0kuLjRqsyxSy12ahgRIbffy1Bxk/.

Bug: 1018050
Change-Id: I52536cb0e97ac3c60da30a946a30ee005b1a861d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1880892
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709827}
2019-10-28 08:56:32 +00:00
8933b9a471 Fix a crash from shutdown race in JankMonitor.
During shutdown of JankMonitor, when the monitor timer is fired after
MetricSource has shut down, the timer dereferences the null pointer and
crashes. Fix the crash by nulling out the pointers after the monitor
timer shut down.

Bug: 1015425
Test: JankMonitorShutdownTest.ShutdownRace_TimerFired
Change-Id: Icd9073e4527e0ac01c373fe486d88aa0985a5841
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1868772
Commit-Queue: Chinglin Yu <chinglinyu@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709822}
2019-10-28 07:37:03 +00:00
688ff472f6 Remove unused block_mixed_plugin_content from RequestExtraData
I found a setter of block_mixed_plugin_content is not called from anywhere so
removed the param as preparation of Loader's Onion Soup.

Bug: 860403
Change-Id: I2a47e70f7c551727d918888977548142214b1725
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1883349
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Makoto Shimazu <shimazu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709818}
2019-10-28 07:28:00 +00:00
62521aaefd Revert "Exposing button's children internally and to AT"
This reverts commit 81487c5595.

Reason for revert: https://crbug.com/1018627

Original change's description:
> Exposing button's children internally and to AT
> 
> The motivation behind this change is that we want text pattern APIs to
> access the text content of both native buttons and ARIA role=button.
> In order to achieve the above, we need to be able to serialize button
> element's children to AXTree. This change enables all children of button
> to be exposed in the AXTree.
> 
> Additionally, if the button's children are text only and also exposed
> in the Browser Accessibility tree, screen readers may double speak the
> button's name. To prevent this, if button's only child is a static text
> we mark the button Browser A11y node as leaf.
> 
> On Android, we treat all its Browser A11y button nodes as leaves and
> expose no child.
> 
> Summary:
> --------------------------------------------------------------------
> BEFORE: Exposed in AXTree & Browser A11y Tree (BATree):
> 
>                        native button    |   role=button
> single text child: AXTree[N],BATree[N]  | AXTree[N],BATree[N]
>                       BATreeAndroid[N]  |    BATreeAndroid[N]
> 
> complex children:  AXTree[N],BATree[N]  | AXTree[Y],BATree[Y]
>                       BATreeAndroid[N]  |    BATreeAndroid[Y]
> --------------------------------------------------------------------
> AFTER: Exposed in AXTree & Browser A11y Tree (BATree):
> 
>                        native button    |   role=button
> single text child: AXTree[Y],BATree[N], | AXTree[Y],BATree[N],
>                       BATreeAndroid[N]  |    BATreeAndroid[N]
> 
> multiple children: AXTree[Y],BATree[Y]  | AXTree[Y],BATree[Y]
>                       BATreeAndroid[N]  |    BATreeAndroid[N]
> --------------------------------------------------------------------
> 
> Note:
> According to the ARIA spec (below), the children of role=button are
> presentational, which means they should not be exposed to ATs
> (a.k.a. should all be treated as leaf nodes).
> However, we need the button contents to be exposed sometimes because
> they may contain many rich, interactive descendants such as buttons
> inside a calendar popup and screen readers need to interact with these
> contents (See https://crbug.com/689204).
> 
> Additionally, Firefox also expose the children of both native button and
> role=button.
> Due to the above, we decided to departure from the ARIA spec and not
> enforce the leafiness of buttons.
> 
> ARIA && core-aam specs:
> https://w3c.github.io/aria/#button
> https://www.w3.org/TR/core-aam-1.1/#exclude_elements
> 
> ~~~~~~
> Note:
> The actual functional changes are in the two files below, the rest are
> tests:
> content/browser/accessibility/browser_accessibility.cc
> content/browser/accessibility/browser_accessibility_android.cc
> third_party/blink/renderer/modules/accessibility/ax_node_object.cc
> ~~~~~~
> 
> Bug:1013609
> 
> Change-Id: Ia7c4bac9940b34dd3a3122938057cb48e847b76a
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1845810
> Commit-Queue: Victor Fei <vicfei@microsoft.com>
> Reviewed-by: Bo <boliu@chromium.org>
> Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#709728}

TBR=dmazzoni@chromium.org,boliu@chromium.org,aleventhal@chromium.org,kschmi@microsoft.com,adettenb@microsoft.com,vicfei@microsoft.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1013609
Change-Id: I2641def8c4e7b1fd610219ed3a99982c94b9f183
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1882198
Reviewed-by: Meredith Lane <meredithl@chromium.org>
Commit-Queue: Meredith Lane <meredithl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709799}
2019-10-28 04:08:49 +00:00
122062beae Deflaky SitePerProcessHitTestBrowserTest.RenderWidgetUserActivationStateTest
The test was flaky failing with RemovePendingUserActivationIfAvailable true
and HasTransientUserActivation false.
It's probably because of timing issue (InputEventAck arrive sooner than
the UpdateUserActivationState IPC).
This CL changes to wait until the target frame get activated.

This CL also adds the test to INSTANTIATE_TEST_SUITE_P. (The test wasn't
actually running after the crrev.com/c/1850736 fixed the scope feature list)


Bug: 995285
Change-Id: I5651115487d7dd1beba51933ec67dbc3d38c28e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1869072
Commit-Queue: Ella Ge <eirage@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709797}
2019-10-28 03:52:27 +00:00
4da45e4b6e Migrate InterfaceFactory to new Mojo types further
This CL applies the new Mojo types to CreateMediaPlayerRenderer
and CreateFlingRenderer in InterfaceFactory interface.

  - Convert FooRequest to mojo::PendingReceiver.
  - Convert FooPtr to mojo::PendingRemote or mojo::Remote.
  - Replace MakeStrongBinding with MakeSelfOwnedReceiver.

Bug: 955171
Change-Id: I8dabcba8ebe6e53dd3a561d786c8bd5bf1edb257
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1880988
Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
Reviewed-by: Thomas Guilbert <tguilbert@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Sam McNally <sammc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709795}
2019-10-28 03:40:42 +00:00
47743f4fbd Rename content/browser/fileapi to file_system
In the past, "content/*/file_system" was renamed to "fileapi"
to contain both the code for the filesystem API and the blob system.

But the blob system moved out to separate directories,
we have the confusing situation that we have directories named
after one API that contain the implementation of a different API.

This patch rename "content/browser/fileapi" to "file_system"
to actually match for reducing confusion.

Bug: 921260
Change-Id: Iffb6dc2e9b453585f04642c534db324e99684737
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1873805
Commit-Queue: DongJun Kim <djmix.kim@samsung.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709789}
2019-10-28 03:05:51 +00:00
c6e7106940 Migrate InterfaceFactory::CreateCastRenderer to new Mojo type
As a following CL, this CL applies pending_receiver to
the second parameter of CreateCastRenderer.

  - Convert FooRequest to mojo::PendingReceiver.

Bug: 955171
Change-Id: I4e06c59e550c5ca0c17aadae40871de017c69f0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1881000
Reviewed-by: Chrome Cunningham <chcunningham@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Sam McNally <sammc@chromium.org>
Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
Cr-Commit-Position: refs/heads/master@{#709786}
2019-10-28 02:48:57 +00:00
6124f1ddcf WebBundle: Add using_web_bundles.md
This is a doc for web developers who want to create Web Bundles that can
be loaded with Chrome.

Change-Id: I9cc05fa686e82910065fdd11d6e13e8ecec0ba6c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1880413
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Commit-Queue: Kunihiko Sakamoto <ksakamoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709778}
2019-10-28 01:15:30 +00:00
8a702487f0 Fix the context menu is overlaid on the touch handles
There two cases of the bug:
1. When the touch handles are on the same line, or one of them is
invisible, the RectBetweenBounds becomes a line, and not union the
handle rect, cause the context menu covers the touch handles.

2. Long press on any text, the showSelectionMenu is coming before
concluding the selection. While the handles remain hidden for the
duration of a longpress drag, including the time between a longpress
and the start of drag motion. So, the handle rect is empty and cause
the context menu covers the touch handles.

The CL removes the empty check of RectBetweenBounds, so it always
union the handle rect to fix case 1. For case 2, leave it to Ajith's
CL to fix(http://crrev/c/995653).

Bug: 1013477
Test: manual
Change-Id: Ie4fbe0669b28d1a0e7ac0894d2ba07569b63dd05
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1857838
Commit-Queue: Jinsong Fan <fanjinsong@sogou-inc.com>
Reviewed-by: Mohsen Izadi <mohsen@chromium.org>
Reviewed-by: Khushal <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709760}
2019-10-26 09:52:49 +00:00
3a7707fdfd Migrate references to the viz::mojom::InputTargetClient interface
Convert the remaining bits referencing the viz::mojom::InputTargetClient
mojo interface using the old APIs to the new mojo types.

Bug: 955171
Change-Id: I1ff61c9eda3479fb4462dfee94f7e98a520b8a39
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879895
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Commit-Queue: Mario Sanchez Prada <mario@igalia.com>
Cr-Commit-Position: refs/heads/master@{#709758}
2019-10-26 09:11:10 +00:00
e4df2a0a6d Clean up old Mojo types for mojom::ChildProcess
This CL cleans up old Mojo types for mojom::ChildProcess with
removing ChildProcessRequest.

Bug: 955171
Change-Id: I8b95086f4c3c2cc39d559ff32f983a0c60f335f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879629
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Commit-Queue: Julie Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/master@{#709754}
2019-10-26 06:23:46 +00:00
e2eea5085b Convert MediaMetricsProvider to new Mojo types
This CL converts MediaMetricsProvider{Ptr, Request} in content and
media to the new Mojo type.

Bug: 955171
Change-Id: I12a9cd0c377a6081ad00f3503682d13078bc6b9b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1880990
Reviewed-by: Frank Liberato <liberato@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: Miyoung Shin <myid.shin@igalia.com>
Cr-Commit-Position: refs/heads/master@{#709749}
2019-10-26 04:40:04 +00:00
d7c43476bd Add metric for total agents across all renderers
This CL adds a browser-side to the AgentMetricsCollector. Each renderer
periodically (on state changes and every 5 minutes) sends its current
list of acive agents to the browser side. This is recorded in a global
map.

Tuple-origins are recorded with both their protocol and registrable
domain. The "unique" version of the metric de-duplicates same protocol+
registrable domain agents to simulate a potential OOPIF coalescing
stragegy. Non-tuple-origins are always counted as unique and are sent
as an empty string.

Change-Id: Ie841c6c145c508c4769af7a0048b27c1e22aec1f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1876878
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709748}
2019-10-26 04:38:14 +00:00
a4f9f94ec6 Migrate RemoterFactory to new Mojo types
This CL applies the new Mojo types to Create function
in RemoteFactory interface.

  - Convert FooRequest to mojo::PendingReceiver.
  - Convert FooPtr to mojo::PendingRemote or mojo::Remote.
  - Convert MakeStrongBinding to MakeSelfOwnedReceiver.

Bug: 955171
Change-Id: I68e72fbd4963d5c6b80fdbe7c1140ae65ac6debc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1877877
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
Cr-Commit-Position: refs/heads/master@{#709741}
2019-10-26 02:55:50 +00:00
23966e294a Clean up old Mojo types for mojom::RenderMessageFilter
This CL cleans up old Mojo types for mojom::RenderMessageFilter
with replacing RenderMessageFilterAssociatedPtr with
AssociatedRemote.

Bug: 955171
Change-Id: I46f955af3356479fba5355d180d1345402f8b1d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1880232
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Commit-Queue: Julie Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/master@{#709738}
2019-10-26 02:13:29 +00:00
d7ef146478 Clean up old Mojo types for BrowserAssociatedInterfaceTestDriver and WebContentsFrameBindingSetTest
This CL cleans up old Mojo types for
mojom::BrowserAssociatedInterfaceTestDriver and
mojom::WebContentsFrameBindingSetTest with using
AssociatedRemote and PendingAssociatedRecevier.

Bug: 955171
Change-Id: Ifd937d9c3014af8616d12426ad239dce98efee59
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1880407
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Commit-Queue: Julie Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/master@{#709736}
2019-10-26 02:12:00 +00:00
81487c5595 Exposing button's children internally and to AT
The motivation behind this change is that we want text pattern APIs to
access the text content of both native buttons and ARIA role=button.
In order to achieve the above, we need to be able to serialize button
element's children to AXTree. This change enables all children of button
to be exposed in the AXTree.

Additionally, if the button's children are text only and also exposed
in the Browser Accessibility tree, screen readers may double speak the
button's name. To prevent this, if button's only child is a static text
we mark the button Browser A11y node as leaf.

On Android, we treat all its Browser A11y button nodes as leaves and
expose no child.

Summary:
--------------------------------------------------------------------
BEFORE: Exposed in AXTree & Browser A11y Tree (BATree):

                       native button    |   role=button
single text child: AXTree[N],BATree[N]  | AXTree[N],BATree[N]
                      BATreeAndroid[N]  |    BATreeAndroid[N]

complex children:  AXTree[N],BATree[N]  | AXTree[Y],BATree[Y]
                      BATreeAndroid[N]  |    BATreeAndroid[Y]
--------------------------------------------------------------------
AFTER: Exposed in AXTree & Browser A11y Tree (BATree):

                       native button    |   role=button
single text child: AXTree[Y],BATree[N], | AXTree[Y],BATree[N],
                      BATreeAndroid[N]  |    BATreeAndroid[N]

multiple children: AXTree[Y],BATree[Y]  | AXTree[Y],BATree[Y]
                      BATreeAndroid[N]  |    BATreeAndroid[N]
--------------------------------------------------------------------

Note:
According to the ARIA spec (below), the children of role=button are
presentational, which means they should not be exposed to ATs
(a.k.a. should all be treated as leaf nodes).
However, we need the button contents to be exposed sometimes because
they may contain many rich, interactive descendants such as buttons
inside a calendar popup and screen readers need to interact with these
contents (See https://crbug.com/689204).

Additionally, Firefox also expose the children of both native button and
role=button.
Due to the above, we decided to departure from the ARIA spec and not
enforce the leafiness of buttons.

ARIA && core-aam specs:
https://w3c.github.io/aria/#button
https://www.w3.org/TR/core-aam-1.1/#exclude_elements

~~~~~~
Note:
The actual functional changes are in the two files below, the rest are
tests:
content/browser/accessibility/browser_accessibility.cc
content/browser/accessibility/browser_accessibility_android.cc
third_party/blink/renderer/modules/accessibility/ax_node_object.cc
~~~~~~

Bug:1013609

Change-Id: Ia7c4bac9940b34dd3a3122938057cb48e847b76a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1845810
Commit-Queue: Victor Fei <vicfei@microsoft.com>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709728}
2019-10-26 01:33:14 +00:00
cef1a6438a Clean up old Mojo types for mojom::RenderFrameProxyHost
This CL cleans up old Mojo types for mojom::RenderFrameProxyHost with
replacing AssociatedBinding and RenderFrameProxyHostAssociatedRequest
with AssociatedReceiver and PendingAssociatedReceiver.

Bug: 955171
Change-Id: I7596694adc6bcd54dcd96e4359c6d0dad35e4e26
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1880227
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Commit-Queue: Julie Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/master@{#709727}
2019-10-26 01:31:14 +00:00
3ef723cb10 Clean up old Mojo types for mojom::MojoWebTestHelper
This CL cleans up old Mojo types for mojom::MojoWebTestHelper
with replacing MojoWebTestHelperRequest with PendingReceiver.

Bug: 955171
Change-Id: Iafe8dd63d07466aa56323307852b2d3e8665f6cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1880233
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Commit-Queue: Julie Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/master@{#709725}
2019-10-26 01:20:52 +00:00
fb422cb8f6 Clean up old Mojo types for mojom::RendererAudioOutputStreamFactory
This CL cleans up old Mojo types for
mojom::RendererAudioOutputStreamFactory with replacing
InterfaceRequest with PendingReceiver.

Bug: 955171
Change-Id: I51c557d3187f5f264ed0d69116ce5239763bfabd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1880228
Reviewed-by: Olga Sharonova <olka@chromium.org>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Commit-Queue: Julie Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/master@{#709721}
2019-10-26 00:59:51 +00:00
311c90e5d7 Clean up old Mojo types for mojom::RenderFrameMetadataObserverClient
This CL cleans up old Mojo types for
mojom::RenderFrameMetadataObserverClient with replacing
Binding with Receiver.

Bug: 955171
Change-Id: I6f904387e375eac06cb1834297f647b5ef122717
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1880229
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Commit-Queue: Julie Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/master@{#709720}
2019-10-26 00:59:31 +00:00
e9b843ae9a Migrate TextureVirtualDevice to new Mojo types
This CL applies the new Mojo types to OnFrameReadyInBuffer
in TextureVirtualDevice and Receiver interface.

  - Convert FooRequest to mojo::PendingReceiver.
  - Convert FooPtr to mojo::PendingRemote or mojo::Remote.
  - Replace MakeStrongBinding with MakeSelfOwnedReceiver.

Bug: 955171
Change-Id: I297be9aec3b5e1e218ee60c843dcd5dd1c5a5a61
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1871506
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Sam McNally <sammc@chromium.org>
Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
Cr-Commit-Position: refs/heads/master@{#709719}
2019-10-26 00:55:36 +00:00
4ecda5ce4c Migrate CdmService::CreateCdmFactory to new Mojo type more
This CL applies pending_receiver to the first parameter of
CreateCdmFactory function in CdmService interface.

Bug: 955171
Change-Id: I3c262ce12c9a9a0cc095ff71a6d9901a73d2c320
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1880412
Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
Reviewed-by: Sam McNally <sammc@chromium.org>
Reviewed-by: Chrome Cunningham <chcunningham@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#709718}
2019-10-26 00:54:14 +00:00
3985d34583 Remove chrome mock scrollbar settings
We are using mock overlay scrollbars in blink web tests and
unit tests in particular cases. Mock scrollbar will not be a
standalone setting in blink, and doesn't need to expose to chrome.

Change-Id: I339398322e473d09364069129b3c716aaddd0d96
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879706
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709707}
2019-10-26 00:07:07 +00:00