This CL fixes a potential issue for RaceNetworkRequest for subresources.
There maybe the case that the fetch event originated from
ServiceWorkerSubresourceLoader is restarted when the controller is
dropped. In that case RaceNetworkRequest tries to dispatch again and
hits DCHECK, specifically
`DCHECK(!race_network_request_loader_client_);` in
`MaybeStartRaceNetworkRequest()`.
Rather than just removing DCHECKs, it would be simpler to disable
RaceNetworkRequest when the restart happens.
Also, this CL checks and sets `fetch_response_from` if the connection
close happened. By checking its value, we can avoid calling
CommitComplete multiple times.
We can revisit when we have to support the restart case.
Bug: 1420517
Change-Id: I5b1aeae1a65a4a8eaafb1303c1a24d204b3e3a9d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4417124
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: Shunya Shishido <sisidovski@chromium.org>
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Reviewed-by: Minoru Chikamune <chikamune@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132320}
- Original delegate method `webView:shouldStartLoadWithRequest:` was
added before the asynchronous policy handling was supported. Since
policy decision can be decided asynchronously now, these two delegate
methods can also be converted to asynchronous methods.
- Align decide policy methods of CWVNavigationDelegate to
WKNavigationDelegate.
Bug: 1431768
Change-Id: I39f31fb319867e5e89053f20dcb6f23afa4a7f8c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4405654
Reviewed-by: John Wu <jzw@chromium.org>
Commit-Queue: Zengfeng Ye <zenye@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1132318}
This CL fixes potential issue in RaceNetworkRequest. When the fetch
handler doesn't respond (fallback), and the response from
RaceNetworkRequset at the same time, |status_| may not be transitioned
as expected. Specifically following case:
1. Dispatch the fetch handler and RaceNetowrkRequest.
2. The response of the fetch handler comes first and it falls back.
3. |status_| will be transitioned to Status::kCompleted.
4. The response from RaceNetworkRequest comes.
5. `CommitCompleted()` is called and try to transition |status_| again.
6. Changing |status| from kCompleted to kCompleted hits DCHECK .
This CL immediately cancels the RaceNetworkRequest by
reseting |race_network_request_url_loader_| after the loader decided to
use the response from the fetch handler. By doing so, |status_| won't be
changed by RaceNetworkRequest accidentally. Instead, the fallback
resource fetch will start separately without using RaceNetworkRequest's
result.
Change-Id: If5f48fac376a0566cf255d36bce6f3326e6bd8ba
Bug: 1420517
Disable-Rts: True
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4414117
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Minoru Chikamune <chikamune@chromium.org>
Commit-Queue: Shunya Shishido <sisidovski@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132315}
This util only supports the page content world which is less widely used
now than it was when the utility was created. Additionally, it can hide
this fact from the caller and lead to bugs where the expected frames are
not returned (because the associated features live in an isolated
world).
Bug: 1427327
Change-Id: I2c783f174bacbfeeaf83d063832bf2cb71d82bc4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4442406
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
Reviewed-by: Ali Juma <ajuma@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132304}
- Align error illustrations with new design spec.
- Handle no network connection error more properly:
- Only show error illustration in GIF tab (if no internet connection).
- Only show non-GIF emojis in search view (if no internet connection).
Bug: b:277657906
Change-Id: I782223ad01903fa0615ff513905a3d9afd335790
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4405809
Reviewed-by: John Palmer <jopalmer@chromium.org>
Commit-Queue: Grey Wang <greywang@google.com>
Cr-Commit-Position: refs/heads/main@{#1132303}
Add basic code to listen for dynamic color changes and migrate two
simple things into using dynamic color tokens as a poc. All colors will
be migrated in a series of follow up CLs.
Bug: b:228796439
Test: enable chrome://flags#jelly-colors, and check the icon and
background are of expected color.
Change-Id: I7f1b909db3c68e20aad2d2cad065170bca7266c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4374510
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Shik Chen <shik@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132300}
Previously, we could skip to the next iteration of the loop
at the continue on line 498, meaning index was not incremented.
This could theoretically result in a file handler being shown
twice in the list, or incorrect calculation of the 'best'
handler.
Bug: none
Change-Id: I1fa98243be93509edb3f7f6dfc11be730030e1dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4401990
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Tim Sergeant <tsergeant@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132298}
This CL fixes the bug that may hit DCHECK in race case. When fetch
handler results for subresorces are fallback, normally additional
fallback requests are created in
`ServiceWorkerSubresourceLoader::OnFallback` and dispatched, then change
the `status_` to `Status::kCompleted`.
Howevver, if the response from RaceNetworkRequest comes first, the
response is passed to the original URLLoaderClient before `OnFallback`
being called. In that case additional network requests are totally
meaningless, and transitioning the `status_` from `Status::kCompleted`
to `Status::kCompleted`, that hits DCHECK.
As a short term solution, if the response is already handled by
RaceNetworkRequest, simply returns `OnFallback` early.
For a long term solution, we should reuse the result from
RaceNetworkRequest as a fallback response, but it needs additional mojo
pipe modification.
Bug: 1432075
Change-Id: I10f56bcb3318d8506f4cb165e313639feb54e8cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4410223
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Reviewed-by: Minoru Chikamune <chikamune@chromium.org>
Commit-Queue: Shunya Shishido <sisidovski@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132296}
This CL hides the realbox's dropdown if there are no primary matches or
groups to show. This deals with the edge case in which a user removes
all (primary) suggestions and there is no trending searches to show.
This also updates `matchesAreVisible` to the more correct name
`dropdownIsVisible`. Matches may not be visible if a dropdown is open.
Bug: 1432704
Change-Id: Iedcbb437637793570586f7d5df7ddf558c723f7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4443100
Reviewed-by: Moe Ahmadi <mahmadi@chromium.org>
Commit-Queue: John Lee <johntlee@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132294}
This CL allows overlay candidates to have a content rect to now:
- Scale the overlay image since the content rect's area smaller or
larger than the display rect.
- Clip the overlay image if the content rect is not at the origin or
has a size that does not match the quad rect's size.
The content rect maps to the UV rect in OverlayCandidate. This rect is
the portion of the overlay image that we want to use, scaled to fit the
display rect (which is the quad rect + transform to root). This CL
implements the clip and transform on the content visual needed to
support this.
This change also handles low latency canvas in DCLayerTree directly,
rather than via SwapChainPresenter. Now if a overlay image is
DCLayerOverlayType::kDCompVisualContent, then it will not be handled by
SwapChainPresenter.
To help testing, nearest-neighbor filtering support was added to
overlays on Windows, so we can avoid bleed from linear interpolation
while sampling overlays that are clipped and scaled by their content
rect.
Change-Id: I57815aa0da0cdfa530fc2773468729ebab89ca8b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4426676
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Commit-Queue: Michael Tang <tangm@microsoft.com>
Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1132293}
Add WebAppOriginAssociationManager to app lock so it is available for
use within commands. It will be used for web app origin association
validation during app install and during manifest update.
Bug: 1250011
Change-Id: Ie89d3d73a5404fa351258fe13f919a86efc64236
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4422046
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Commit-Queue: Lu Huang <luhua@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1132287}
Since we're going to migrate most SVG background to css sides, and
there's not many SVG that needs more than 1 color, use the standard
color CSS attribute that also inherits, and add fill: currentColor to
correctly style the svg.
Bug: b:228796439
Test: manually
Change-Id: I325e5189a30f62e1c5cebaed4df61061b380f15f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4439232
Reviewed-by: Chu-Hsuan Yang <chuhsuan@chromium.org>
Commit-Queue: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Shik Chen <shik@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132286}
Previously the TS we were generating was tagged as unsafe by the google3
compile time checks. This CL rearranges the generated TS and legacy
mappings to remove any strings that can't be tagged as safe at compile
time.
Change-Id: Id790993dbc889ee7092ea0ca3079029b60de9047
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4424232
Commit-Queue: Zain Afzal <zafzal@google.com>
Reviewed-by: Christos Froussios <cfroussios@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132285}
This CL updates the multiple overlay processor to handle candidates
with rounded-display mask textures.
Currently the overlay processor will reject the candidates with
rounded-display masks as these textures have no damage over consecutive
frames therefore it is less power efficient to promote these textures.
Candidates with rounded-display masks are given a special priority in
the system that promote them for correctness rather than efficient.
This CL also adds fallback strategies in case candidates with
rounded-display mask textures fail DRM page-flip test.
Bug: 1262970
Test: Covered by unittests
Change-Id: Ia99fec6932b2f639fc3c13b5df30d7d6d63fb5f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4285130
Reviewed-by: Peter McNeeley <petermcneeley@chromium.org>
Reviewed-by: Kevin Haslett <khaslett@chromium.org>
Commit-Queue: Zoraiz Naeem <zoraiznaeem@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1132281}
This is a refactoring CL that makes existing tests simpler.
Specifically, following updates are applied:
- Use single URL endpoint (/service_worker/mock_response) for each test
- Rename parameters that specify each behavior to be more intuitive
- Start ServiceWorker for subresource tests to make the order reliable
For parameters, following will be used:
- `server_slow` for the delayed response from server
- `server_notfound` for 404 response from server
- `sw_slow` for the delayed response from fetch hander
- `sw_respond` for the fixed 200 response from fetch handler
- `sw_fallback` for the fallback from fetch handler
This is a follow up from
https://chromium-review.googlesource.com/c/chromium/src/+/4348252/comment/c34a3db6_4977c6fe/
Change-Id: Ib1893c99d7667a2bdcfce02f9109b54c659ecb6e
Bug: 1420517
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4408809
Reviewed-by: Minoru Chikamune <chikamune@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132280}
subresources"
This is a reland of commit 472153701f
Changes from the reverted commit: Disabled the flaky test on Fuchsia. It
doesn't reproduce the error either on the local machine or CI test via
trybot. Also Fuchsia is not our primary target platform.
Please see the diff from here.
https://chromium-review.googlesource.com/c/chromium/src/+/4402520/1..7
Original change's description:
> [BestEffortServiceWorker] RaceNetworkRequest mode supports subresources
>
> This CL adds the subresource support to the RaceNetworkRequest mode.
> It's basically implemented with the same approach as the CL for the main
> resource[1].
>
> So, this CL will do following:
> 1. Trigger the network request directly from the renderer process.
> 2. Race the network request and the fetch handler execution, and use
> whichever faster as a response.
>
> And this CL doesn't cover below thing. Those will be added in follwo-ups.
> 1. Prevent the fetch handler from dispatching the fetch request which is
> same as the one issued by this feature.
>
> [1] crrev.com/c/4328792/18
>
> Change-Id: I0a8380611a07e6c467ecb4a7100afe99010f4c1f
> Bug: 1420517
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4348252
> Reviewed-by: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
> Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
> Commit-Queue: Shunya Shishido <sisidovski@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1124583}
Bug: 1420517
Change-Id: I8718e5796769b844a223ab4b316dc27b1ffc1b61
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4402520
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Reviewed-by: Minoru Chikamune <chikamune@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132279}
Checkboxes may choose to hide the ripple if the UI is using the checkbox
as an entire row with its own hover state or ripple.
Bug: 1431798
Change-Id: I75ca7360a7a3cb92a89378eaca19992574e0e2a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4443436
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: John Lee <johntlee@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132278}
Follow on to the VP9 initialization changes. Use the split
initialization process to lazily create the CAPTURE queue
after the first frame is parsed by the driver. This codec
also supports DRC so the DRC support in the legacy
initialization code is removed.
BUG=b:277338563
Change-Id: I9c7a11aaf2aac2b2b13daa3b625f0bd68e15cdd7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4429791
Reviewed-by: Steve Cho <stevecho@chromium.org>
Commit-Queue: Fritz Koenig <frkoenig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132276}
Instead, let tests pass the LocalState instance to its ctor.
By default BrowserProcess's LocalState is used for ChromeUserManager
and its subclasses.
BUG=b:278643115
TEST=Ran tryjob.
Change-Id: Idc742af199c41a33ae34ad25358d39081015743f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4441786
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Hidehiko Abe <hidehiko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132273}
With this change, the per-provider feature flags should only be
checked when (for Chrome):
- the user has a DNS configuration that makes it eligible for
DoH auto-upgrading (this was true to some extent before as
well, but now the feature flag gets checked after we also
determine whether the configured DNS providers are a match)
- A user visits the chrome://settings page (same as before,
except now only providers that are globally-visible or
that have a country code matching that of the user will
have their feature flag checked)
- the user produces a NetLog file (the NetLog includes a list
of all the disabled providers)
Previously, the feature flags would also be checked after
each DNS request made via the built-in resolver.
This change is beneficial because we use these flags when
enabling DoH providers via Finch (so we can enable the provider
slowly while we monitor health metrics), and the experiments
use the default Finch behavior of deeming a given client to be
a part of the experiment if the experiment feature flag is
checked. If the feature flag is checked broadly, then lots of
users that don't use the given DoH provider get placed into the
experiment groups, and it seems to make the metrics much more
noisy (and in general less useful). With this change, fewer
users that don't use a given DoH provider will enter an
experiment for it, giving us better data to analyze.
Fixed: 1432938
Change-Id: I8dab2bcd7ccba16b00042096355401a58b8ce55f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4423489
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
Commit-Queue: Andrew Williams <awillia@chromium.org>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132272}