Methods declared in content/public/common/navigation_policy.h
|IsBackForwardCacheEnabled()|, |isProactivelySwapBrowsingInstanceEnabled()|
are not used outside content/ are exposed in public.
Moving these methods to content/common/ API to follow the policy:
-> browser process only -> content/browser
-> renderer process only -> content/renderer
-> browser & renderer process -> content/common
Change-Id: I42dd780646f7da832dba9067974ddbd9909fe1c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2019033
Commit-Queue: Sreeja Kamishetty <sreejakshetty@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736222}
This CL changes FrameHostMsg_GoToEntryAtOffset so that it is
implemented in the LocalFrameHost interface.
It removes WebLocalFrameClient::NavigateBackForwardSoon() from
web_local_frame_client.h since LocalFrameClientImpl have access to
mojom::blink::LocalFrameHost.
Bug: 1039286
Change-Id: If565c4fffb3f785d3518dc38171cf7092c7ef30d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2000267
Commit-Queue: Julie Kim <jkim@igalia.com>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#733150}
Update NavigationBrowserTests to use WebContentsConsoleObserver
instead of ConsoleObserverDelegate. This allows us to observe
console messages added without overriding the existing delegate of the
WebContents. Additionally, we no longer have to worry about the lifetime
of the observer (since it handles its own cleanup), so these can be
properly scoped.
Bug: 1034150
Change-Id: Idf52898484da7e5ec3fd0d3210580acba8294096
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1983591
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#729546}
The test NavigationUrlRewriteBrowserTest.RewriteToNoAccess was already disabled
for debug Android builds. Unfortunately, the test also flakes on release android
builds with is_java_debug set to true. Rather than plumb that through as a
compile time flag, this CL simply disables the test on Android.
The test SitePerProcessHitTestBrowserTest.TouchpadDoubleTapZoomOverOOPIF was
already disabled for being flaky on windows, macOS and Linux. This CL disables
it on Android as well.
Bug: 1021779, 947193, 1029936
Change-Id: I055e06b16b94ee2f4485049c649be957e7b23e13
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1965479
Auto-Submit: Erik Chen <erikchen@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#724308}
As noted in the comment next to one of the DCHECKs,
RewriteUrlForNavigation has non-deterministic behavior in practice.
This is particularly relevant to Reader Mode, which includes a random
string into the distiller's URL, causing each call to the URL-
generating method to be different.
Bug: 992073
Change-Id: I78eb582adc48c9fe90a460adeeab9efc66d9fea9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1873957
Commit-Queue: Aran Gilman <gilmanmh@google.com>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#720710}
This CL converts InterfaceProviderPtr|Request to the new Mojo
types. Major changes are as below,
- Convert mojom::InterfaceProviderPtr to
mojo::PendingRemote|Remote<mojom::InterfaceProvider>
- Convert mojo::InterfaceProviderRequest to
mojo::PendingReceiver<mojom::InterfaceProvider>
- Convert mojo::Binding to mojo::Receiver
- Convert mojom::InterfaceProviderPtrInfo to
mojo::PendingRemote<mojom::InterfaceProvider>
Bug: 955171, 978694
Change-Id: I94b956bb60e20810a84f7714e23c4da836bfd8c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1928429
Reviewed-by: Wei Li <weili@chromium.org>
Reviewed-by: Frank Liberato <liberato@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Sam McNally <sammc@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
Cr-Commit-Position: refs/heads/master@{#719007}
This reverts commit 8c36510cc3.
Reason for revert: Added missing include on ChromeOS.
Original change's description:
> Revert "[base] Remove base::SharedMemory and base::SharedMemoryHandle"
>
> This reverts commit fa7e8cc73e.
>
> Reason for revert: It looks like there was at least one missed instance of transitively including file_util. Sample build log: https://ci.chromium.org/p/chrome/builders/ci/chromeos-kevin-google-rel/4373
>
> Original change's description:
> > [base] Remove base::SharedMemory and base::SharedMemoryHandle
> >
> > There are no users of the deprecated shared memory left, so its code
> > can safely removed.
> >
> > To use shared memory in Chrome, please refer to
> > base::WritableSharedMemoryRegion and base::ReadOnlySharedMemoryRegion
> > classes.
> >
> > This CL removes all remaining #includes of
> > "base/memory/shared_memory.h" and
> > "base/memory/shared_memory_handle.h". They are replaced by new shared
> > memory includes when needed.
> >
> > It also appears that "base/files/file_util.h" and
> > "base/posix/eintr_wrapper.h" were transitively included in many places
> > through the removed files. This CL includes them explicitly in all
> > those files.
> >
> > TBR: wfh@chromium.org
> > Bug: 795291
> > Change-Id: I97ecac4b529c0ad6498b6e5ccf01515f750448ad
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1919152
> > Commit-Queue: Alex Ilin <alexilin@chromium.org>
> > Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> > Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#717588}
>
> TBR=dcheng@chromium.org,jochen@chromium.org,alexilin@chromium.org
>
> Change-Id: I16c6e4c2ada01240d577706478cf739ce1061ee5
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 795291
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1929252
> Reviewed-by: Tommy Martino <tmartino@chromium.org>
> Commit-Queue: Tommy Martino <tmartino@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#717644}
TBR=dcheng@chromium.org,tmartino@chromium.org,jochen@chromium.org,alexilin@chromium.org
Change-Id: I437cf7f93965858840170eb49b2d611b37e79b25
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 795291
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1929221
Reviewed-by: Alex Ilin <alexilin@chromium.org>
Commit-Queue: Alex Ilin <alexilin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#717663}
This reverts commit fa7e8cc73e.
Reason for revert: It looks like there was at least one missed instance of transitively including file_util. Sample build log: https://ci.chromium.org/p/chrome/builders/ci/chromeos-kevin-google-rel/4373
Original change's description:
> [base] Remove base::SharedMemory and base::SharedMemoryHandle
>
> There are no users of the deprecated shared memory left, so its code
> can safely removed.
>
> To use shared memory in Chrome, please refer to
> base::WritableSharedMemoryRegion and base::ReadOnlySharedMemoryRegion
> classes.
>
> This CL removes all remaining #includes of
> "base/memory/shared_memory.h" and
> "base/memory/shared_memory_handle.h". They are replaced by new shared
> memory includes when needed.
>
> It also appears that "base/files/file_util.h" and
> "base/posix/eintr_wrapper.h" were transitively included in many places
> through the removed files. This CL includes them explicitly in all
> those files.
>
> TBR: wfh@chromium.org
> Bug: 795291
> Change-Id: I97ecac4b529c0ad6498b6e5ccf01515f750448ad
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1919152
> Commit-Queue: Alex Ilin <alexilin@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#717588}
TBR=dcheng@chromium.org,jochen@chromium.org,alexilin@chromium.org
Change-Id: I16c6e4c2ada01240d577706478cf739ce1061ee5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 795291
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1929252
Reviewed-by: Tommy Martino <tmartino@chromium.org>
Commit-Queue: Tommy Martino <tmartino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#717644}
There are no users of the deprecated shared memory left, so its code
can safely removed.
To use shared memory in Chrome, please refer to
base::WritableSharedMemoryRegion and base::ReadOnlySharedMemoryRegion
classes.
This CL removes all remaining #includes of
"base/memory/shared_memory.h" and
"base/memory/shared_memory_handle.h". They are replaced by new shared
memory includes when needed.
It also appears that "base/files/file_util.h" and
"base/posix/eintr_wrapper.h" were transitively included in many places
through the removed files. This CL includes them explicitly in all
those files.
TBR: wfh@chromium.org
Bug: 795291
Change-Id: I97ecac4b529c0ad6498b6e5ccf01515f750448ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1919152
Commit-Queue: Alex Ilin <alexilin@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#717588}
Currently, the NavigationImmediateResponse feature is enabled by
default through a flag kNavigationImmediateResponseBody.
As this feature has been landed for some time, this patch removes this
flag and the support for the old behavior.
Bug: 1017705
Change-Id: If02d58b28ccaadfa1ca94e080217321521a009fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1911148
Commit-Queue: Minggang Wang <minggang.wang@intel.com>
Reviewed-by: Shakti Sahu <shaktisahu@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#716024}
Temporary fix that creates an exception for 'no access' URLs like
chrome-native://history. These URLs can cause a origin mismatch in the
commit code because of slight differences between how url::Origin and
blink::SecurityOrigin handle 'no access' URLs. This is intended as a
low risk change that can be easily merged to the M79 branch.
Bug: 1016711, 923144
Change-Id: I8ab833744f45ebfbc489118313c59d7bbfdaff78
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1900358
Auto-Submit: Aaron Colwell <acolwell@chromium.org>
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#713635}
This reverts commit 29392d0009.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Add CanCommitOriginAndUrl() exception for 'no access' URLs.
>
> Temporary fix that creates an exception for 'no access' URLs like
> chrome-native://history. These URLs can cause a origin mismatch in the
> commit code because of slight differences between how url::Origin and
> blink::SecurityOrigin handle 'no access' URLs. This is intended as a
> low risk change that can be easily merged to the M79 branch.
>
> Bug: 1016711
> Change-Id: I20734fe68b6919c06849a1ce1439624d6332898c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1896863
> Commit-Queue: Aaron Colwell <acolwell@chromium.org>
> Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#712415}
TBR=acolwell@chromium.org,alexmos@chromium.org
Change-Id: I6ac033436b2719090e9fd198c90c410f509c845c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1016711,1021779
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1900513
Reviewed-by: Fergal Daly <fergal@chromium.org>
Commit-Queue: Fergal Daly <fergal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712902}
Bug https://crbug.com/1018385 is caused by navigation initially
classified as "same-document" committing error pages.
During the commit phase of the navigation, the NavigationRequest is
transfered in one of these RenderFrameHostImpl's bucket:
- same_document_navigation_request_
- navigation_requests_
A navigation classified as "same-document" ends up in the bucket
incompatible with error pages.
DidCommitPerNavigationMojoInterfaceNavigation expects to find the
navigation is the other bucket.
Add several regressions tests, including WPT tests.
Bug: 1018385
Change-Id: I3d92af1dd487f7b60a3e50a792716a07b074e5eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1886339
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712541}
Temporary fix that creates an exception for 'no access' URLs like
chrome-native://history. These URLs can cause a origin mismatch in the
commit code because of slight differences between how url::Origin and
blink::SecurityOrigin handle 'no access' URLs. This is intended as a
low risk change that can be easily merged to the M79 branch.
Bug: 1016711
Change-Id: I20734fe68b6919c06849a1ce1439624d6332898c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1896863
Commit-Queue: Aaron Colwell <acolwell@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712415}
This reverts commit a88c5fe6e6.
Reason for reland: The test was/is flaky on that bot in the first place,
the name change just makes it look different.
Original change's description:
> Revert "Adjust tests for upcoming cross-site cookie requirements"
>
> This reverts commit 83b71438dc.
>
> Reason for revert: SitePerProcessSSLBrowserTest.UnloadHandlersArePowerful*
> failing on Android. Please see bug.
>
> Bug: 1014956
> Original change's description:
> > Adjust tests for upcoming cross-site cookie requirements
> >
> > They will need to be marked explicitly and secure, so adjust some tests to
> > be over SSL and mark those cookies appropriately
> >
> > Bug: 1006816
> > Change-Id: I6da53ea64a7c03530335913fadb9099992e8ca33
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1863389
> > Reviewed-by: Avi Drissman <avi@chromium.org>
> > Commit-Queue: Maksim Orlovich <morlovich@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#706108}
>
> TBR=avi@chromium.org,morlovich@chromium.org
>
> Change-Id: I982bc1590171f92883000c8315d3be77f7b35b9f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1006816
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1865249
> Reviewed-by: Parastoo Geranmayeh <parastoog@google.com>
> Commit-Queue: Parastoo Geranmayeh <parastoog@google.com>
> Cr-Commit-Position: refs/heads/master@{#706453}
TBR=avi@chromium.org,parastoog@google.com,morlovich@chromium.org
Change-Id: I51c863c89ade36edddc4b1b7a3f16d82c9f855f3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1014956, 1006816
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1866614
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Maksim Orlovich <morlovich@chromium.org>
Commit-Queue: Maksim Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707918}
This reverts commit 83b71438dc.
Reason for revert: SitePerProcessSSLBrowserTest.UnloadHandlersArePowerful*
failing on Android. Please see bug.
Bug: 1014956
Original change's description:
> Adjust tests for upcoming cross-site cookie requirements
>
> They will need to be marked explicitly and secure, so adjust some tests to
> be over SSL and mark those cookies appropriately
>
> Bug: 1006816
> Change-Id: I6da53ea64a7c03530335913fadb9099992e8ca33
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1863389
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Commit-Queue: Maksim Orlovich <morlovich@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#706108}
TBR=avi@chromium.org,morlovich@chromium.org
Change-Id: I982bc1590171f92883000c8315d3be77f7b35b9f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1006816
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1865249
Reviewed-by: Parastoo Geranmayeh <parastoog@google.com>
Commit-Queue: Parastoo Geranmayeh <parastoog@google.com>
Cr-Commit-Position: refs/heads/master@{#706453}
This reduces the number of preprocessor tokens in
content_browser_client.h from 1,335,281 to 754,474. Since this is a
widely included file, reducing build times a fair bit (see bug).
TBR=tsepez for content/browser/child_process_security_policy_*
Bug: 1014009
Change-Id: Id3c2de29f5b08cab80820d01aff722afeb1618e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1857126
Commit-Queue: Hans Wennborg <hans@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706388}
They will need to be marked explicitly and secure, so adjust some tests to
be over SSL and mark those cookies appropriately
Bug: 1006816
Change-Id: I6da53ea64a7c03530335913fadb9099992e8ca33
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1863389
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Maksim Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706108}
Site Isolation and process allocation should work correctly even in
absence of a cooperating renderer process - there should be no need for
the renderer-side ChromeContentRendererClient::ShouldFork. This CL
removes the view-source: and file: related ShouldFork considerations.
Bug: 1003957, 883549
Change-Id: I5598807c358bf81f9c9e827383d0d1dd51d5ba17
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1841667
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#705329}
ScopedFeatureList is unsafe to use after browser threads have been
started. This constraint will imminently be enforced by DCHECK to
prevent further erroneous usage from landing.
This CL corrects usage within miscellaneous Content browser tests
as well as Chrome tests related to site islation.
This is split from a larger CL where in some rare cases, correction
was too complex to resolve before landing the DCHECK, so corresponding
test(s) may be disabled instead of fixed.
Bug: 846380
Change-Id: Idf6fcaabc37d09b49acb70ad3bd177985bed91cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1850736
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704749}
The goal is to fix a big class of URL spoof issues. They happen when
a NavigationRequest is canceled, but the associated pending navigation
entry remains. This causes the wrong URL to be displayed in the
omnibox.
To fix it, delete the matching pending NavigationEntry in the
NavigationRequest's destructor.
This is a bit more complex:
1) During an history navigation, several NavigationRequest can starts
at the same time for iframes. All of them are associated with the
same pending NavigationEntry.
2) A pending NavigationEntry can be used, discarded and reused. It can
is used twice, but not associated with the same NavigationRequest(s)
on every use.
The class PendingEntryRef is used to track one NavigationRequest being
associated with a pending NavigationEntry for a given history
navigation.
Bug: 999932
Change-Id: I14582fd1d954a6f831959db0bb5d96eb1f5d53b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1815129
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703713}
Change the targetText= directive to text=. Also remove the
non-fragment-directive case and the ## delimiter since we definitely
won't be using them.
Updated all tests to use :~:text= syntax.
Updated web platform tests to reflect text= change and delimiter change
to :~:. Tested updated WPT locally with
run_web_tests.py --additional-driver-flag=
'--enable-blink-features=TextFragmentIdentifiers'
Bug: 1008874,1007016
Change-Id: Ic7f3db39e0a17d5adb8186b2ab5081d60553bd8d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1835892
Commit-Queue: Nick Burris <nburris@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703317}
Add regression tests for https://crbug.com/1003167.
This checks what happens with cookies in iframes when using special
URLs like about:srcdoc, about:blank, and data-URLs. This checks
normal navigations and history navigations.
This is able to trigger the DumpWithoutCrashing() in:
network::RestrictedCookieManager::ValidateAccessToCookiesAt
Tests=
- NavigationBaseBrowserTest.CookiesInheritedSrcDoc
- NavigationBaseBrowserTest.CookiesInheritedAboutBlank
- NavigationBaseBrowserTest.CookiesInheritedAboutBlank2
- NavigationBaseBrowserTest.CookiesInheritedDataUrl
Bug: 1003167
Change-Id: I73b9e62021490cfb74caf49c32009171dd9bea00
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1831762
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#701630}
This is the 9th CL of multiple CLs to remove the usages of
NavigationHandleImpl completely and replace it with NavigationRequest.
This CL completely removes NavigationHandleImpl and now
NavigationRequest implement NavigationHandle.
Bug: 995268
Change-Id: Iddb81aa13135ee630a189c165a9cfb087e99e1b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1816469
Commit-Queue: Mohamed Abdelhalim <zetamoo@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Lowell Manners <lowell@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#701540}
This is hopefully the last step before finally adding
WARN_UNUSED_RESULT to NavigateToURL().
Apart from adding straightforward expectations for regular and redirect
cases, this fixes a couple more bugs:
- AppendingFrameInWebUIDoesNotCrash was broken on Android, because it
used chrome://tracing, which doesn't exist on Android.
- A couple of tests in WebContentsImplBrowserTest (e.g.,
ChangeDisplayMode) were navigating to about://blank (instead of
about:blank), which results in an error rather than a blank page.
Bug: 425335
Change-Id: Id80040de9c3383c517f2df95b819f314e6b29f30
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1819852
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699854}
This CL adds navigation browsertests ensuring that
NavigationController::LoadURLParams::referrer's referrer policy is
honored. This is a regression test that fails with my referrer policy CL
that we reverted (crrev.com/c/1806618) due to incorrectly cancelled
requests. The tests in this CL ensures that browser-initiated navigations
have the correct referrer set for all referrer policies.
Bug: 1004083
Change-Id: Ifbca8d2847de53a63494a58f8fb73d323e9bdb0a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1809128
Commit-Queue: Dominic Farolino <dom@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#698104}
This is the 5th CL of multiple CLs to remove the usages of
NavigationHandleImpl completely and replace it with NavigationRequest.
This CL aims at replacing navigation_request->navigation_handle()->*
pattern with navigation_request->*.
Bug: 995268
Change-Id: I40a10f674ee5adecefbfe9183654a3a3b9a3f4e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1807196
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Lowell Manners <lowell@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Commit-Queue: Mohamed Abdelhalim <zetamoo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697569}
This CL converts NavigationClientAssociatedPtrInfo,
NavigationClientAssociatedPtr, NavigationClientPtr,
and NavigationClientAssociatedRequest to new
Mojo types.
It also updates BeginNavigation from frame.mojom
and methods and members which implements it with
new Mojo types.
Bug: 955171
Change-Id: I2ed4aa7cdf57361c982e3adc696cc9ead797630b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1797823
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Julie Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/master@{#695984}
This CL converts DocumentInterfaceBroker{Ptr, Request} in content,
blink, extension and media to the new Mojo types and uses
pending_remote<blink.mojom.DocumentInterfaceBroker> in
document_scoped_interface_bundle.mojom and
pending_receiver<blink.mojom.DocumentInterfaceBroker> in
frame_messages.mojom.
Bug: 955171, 978694
Change-Id: Ic0ccabb445febbf8b2bd81aa754fc0abecfb77b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1781900
Commit-Queue: Miyoung Shin <myid.shin@igalia.com>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#693066}
It turns out the process used to load about:srcdoc was not always
correct. For instance, when starting from A(B), if B navigates to
about:srcdoc, it was sometimes loading in B's process instead of
A's process. This is now fixed and enforced.
This is not a regression. The previous code about srcdoc in
RenderFrameHostManager::CanSubframeSwapProcess() isn't really effective
when the about:srcdoc navigation happens AFTER a cross-process one.
Bug: 996044, 996725
Change-Id: I670ee6dc917cfe4cb02721a58a79a1a415b45e61
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1773264
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#692853}
This CL converts NavigationInitiator{Ptr, Request} in content and
blink to the new Mojo types, and uses
pending_remote<blink.mojom.NavigationInitiator> in frame.mojom.
Bug: 955171, 978694
Change-Id: I89d54747b61cc1cfa4e0ee46c1013b560150c07e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1776157
Commit-Queue: Miyoung Shin <myid.shin@igalia.com>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#692429}
This CL converts BlobURLTokenPtr and BlobURLTokenPtrInfo
to new Mojo types.
It updates BeginNavigation from frame.mojom,
CreateWorkerHostAndStartScriptLoad from
dedicated_worker_host_factory.mojom, and Connect from
shared_worker_connector.mojom
Bug: 955171, 978694
Change-Id: If9cbac3e3500803e9f9bb8914c59c8ba14ea2149
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1774422
Commit-Queue: Julie Kim <jkim@igalia.com>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#691955}
Reland of https://chromium-review.googlesource.com/c/chromium/src/+/1590415
When a document loads, there is a significant period between when
the frame is created and when the user sees content. During this time,
the document is not processing lifecycle updates but Javascript is
scheduled and the RenderWidget exists to handle input.
A major concern is that users might click on some place where there is
something reactive laid-out and available for hit testing and processing
(an ad, a link, start a video) before they have actually seen anything to
click on. Think of something like a last ditch attempt to click on
something on the page you're navigating away from only to hit something
on the page you're navigating to.
It seems safer to avoid this rather than have unexpected and potentially
very nasty behavior. In theory this situation was possible before with
deferred lifecycle updates though it apparently never warranted concern.
But we're preparing to enable the flag that defers the first compositor
commit until we have some content ready to raster (or a timeout), in
which case document lifecycles are running and there is content there
to hit-test against and send events to, but the user hasn't seen it yet
(for half a second at most, right now).
This patch suppresses all input from the time when RenderWidget navigates
to a frame to the time we are notified of the first compositor commit and
paint, which is the best estimate we have for the user seeing something.
This patch may affect the FirstInputDelay (FID) web platform metric.
FID may improve because dropped input won't be measured at all, and
the delay for the first event we actually process will be smaller because
it will come when the system is less stressed. i.e. after initial layout
and paint. Regardless, the impact on FID will be monitored when this
patch lands.
A command line switch is added to allow early input for tests. Many tests
are flaky with this patch because they do not reliably wait for input,
and in some cases we cannot easily modify the tests to wait (for example,
web_tests and Android java-based tests). The open issue crbug.com/987626
exists to burn down the set of tests needing the flag, and possibly remove it.
Sheriffs, please to not revert this for flakiness. Flakiness can be
addressed by modifying individual flaky tests with the
"allow-pre-commit-input" command line flag.
Bug: 958424
Change-Id: Iea30f5b3bb2b1505a7ab7bfe749d0700f6db1027
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1729803
Commit-Queue: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#687220}
|update_network_isolation_key_on_redirect| should only be set on
navigation requests, and renderers are not trusted to set it.
This CL introduces ResourceRequest::TrustedParams, which contains fields
only the browser process is trusted to set, and an |is_trusted| bit that
can be set when creating URLLoaderFactories. If TrustedParams are sent
to a URLLoaderFactory without that bit set, the request will fail.
Bug: 991736
TBR: alexilin@chromium.org
Change-Id: Id3263e03e663b330ee9c21682a4d0de753c5331a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1744926
Commit-Queue: Matt Menke <mmenke@chromium.org>
Reviewed-by: Shivani Sharma <shivanisha@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#686472}