Status Update
Comments
to...@google.com <to...@google.com> #2
We should fix this when we implement this CookieManager API.
11...@gmail.com <11...@gmail.com> #3
[Monorail components added to Component Tags custom field.]
to...@google.com <to...@google.com> #4
Another issue is that shouldInterceptRequest does not include the cookie header which forces developers to query it at the time of requests. We should include this as well.
Because this will likely require a breaking change, I will first experiment with this behind a flag:
11...@gmail.com <11...@gmail.com> #5
Branch: main
commit 041b6a3c262e0ee8656e42fa6aa9cf32362fa9f2
Author: Rupert Ben Wiser <bewise@chromium.org>
Date: Fri Jun 28 18:08:13 2024
webview: Add cookie headers to shouldInterceptRequest
The problem is that shouldInterceptRequest
gets fired before the net stack ultimately adds the
cookie header. This means that Android developers have to
separately query the cookie manager for headers but as we introduce
new changes to the cookie header, the CookieManager API
can't keep up.
The one issue with this approach is that we are of course
having to try replicate what the network stack would be doing.
In this case, I am matching the partitioning but there
could be other cookie behaviors we need to preserve.
We are somewhat forced to maintain this already for WebView's
restricted cookie manager so we can share the policy which lowers
the maintenance burden a bit.
We also discovered that Set-Cookie doesn't have an effect with
shouldInterceptRequest either for similar reasons.
The Set-Cookie header is not allowed to be persisted over the mojo
calls so we need to return that value to our URL Loader factory with a
simple callback.
Bug: 41496912
Change-Id: Iff5cc37ab0f678c59503cc9d69e3c05cd4ccdf4a
Reviewed-on:
Reviewed-by: Richard (Torne) Coles <torne@chromium.org>
Commit-Queue: Rupert Wiser <bewise@chromium.org>
Auto-Submit: Rupert Wiser <bewise@chromium.org>
Reviewed-by: Mike Taylor <miketaylr@chromium.org>
Reviewed-by: Dylan Cutler <dylancutler@google.com>
Cr-Commit-Position: refs/heads/main@{#1321072}
M android_webview/browser/aw_content_browser_client.cc
M android_webview/browser/aw_cookie_access_policy.h
M android_webview/browser/network_service/aw_proxying_url_loader_factory.cc
M android_webview/browser/network_service/aw_proxying_url_loader_factory.h
M android_webview/common/aw_switches.cc
M android_webview/common/aw_switches.h
M android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java
M android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java
M android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerTest.java
M components/embedder_support/android/util/android_stream_reader_url_loader.cc
M components/embedder_support/android/util/android_stream_reader_url_loader.h
mi...@google.com <mi...@google.com> #6
Project: chromium/src
Branch: main
Author: Adam Walls <
Link:
[WV] Determine if partitioned cookies are not sent to apps.
Expand for full commit details
[WV] Determine if partitioned cookies are not sent to apps.
This allows an investigation into how often partitioned cookies are not
passed to apps. Using CookieManager::SiteHasCookieInOtherPartition, this
indicates whether a site's cookies, with one partition key, also has the
same cookies with a different cookie partition key. This will prove that
there are cookies being omitted on a given site due to the partitioning.
Co-Authors: bewise, avvall
Bug: 41496912
Change-Id: I3698788038afc16c23bb05f6e7f485394433fd07
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6237015
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Elly FJ <ellyjones@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Commit-Queue: Adam Walls <avvall@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1417004}
Files:
- M
android_webview/browser/aw_feature_map.cc
- M
android_webview/browser/cookie_manager.cc
- M
android_webview/browser/cookie_manager.h
- M
android_webview/common/aw_features.cc
- M
android_webview/common/aw_features.h
- M
android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java
- M
android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerTest.java
- M
services/network/cookie_manager.cc
- M
services/network/cookie_manager.h
- M
services/network/public/mojom/cookie_manager.mojom
- M
services/network/test/test_cookie_manager.h
- M
tools/metrics/histograms/metadata/android/histograms.xml
Hash: cbebd148e6898552bdd91af1c63c92b2de40beed
Date: Thu Feb 06 13:52:04 2025
pb...@google.com <pb...@google.com> #7
Project: chromium/src
Branch: main
Author: Adam Walls <
Link:
[WV] Add test config for WebViewPartitionedCookiesExcluded
Expand for full commit details
[WV] Add test config for WebViewPartitionedCookiesExcluded
This adds a JSON config entry for WebViewPartitionedCookiesExcluded so
that A/B experimentation can occur for this feature. This flag was added
in `[WV] Determine if partitioned cookies are not sent to apps. |
https://chromium-review.googlesource.com/c/chromium/src/+/6237015`.
Test: N/A
Bug: 41496912
Change-Id: I29c0a210364734675331a3bf180ee0b33b7c45cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6240130
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Commit-Queue: Adam Walls <avvall@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1417090}
Files:
- M
testing/variations/fieldtrial_testing_config.json
Hash: ad82f6bbd357a122ba932a0d3ec711551561616f
Date: Thu Feb 06 16:49:55 2025
11...@gmail.com <11...@gmail.com> #8
So we can review it for M134 (+mcirlanaru@ too)
pb...@google.com <pb...@google.com> #9
FYI govind@: metrics (as added by CL listed at #6) verified successfully in Canary.
11...@gmail.com <11...@gmail.com> #10
The NextAction date has arrived: 2025-02-10 To opt-out from this automation rule, please add Optout-Blintz-Nextaction-Alert to the "Chromium Labels" custom field.
11...@gmail.com <11...@gmail.com> #11
sw...@google.com <sw...@google.com> #12
Project: chromium/src
Branch: refs/branch-heads/6998
Author: Adam Walls <
Link:
[M134] [WV] Determine if partitioned cookies are not sent to apps.
Expand for full commit details
[M134] [WV] Determine if partitioned cookies are not sent to apps.
This allows an investigation into how often partitioned cookies are not
passed to apps. Using CookieManager::SiteHasCookieInOtherPartition, this
indicates whether a site's cookies, with one partition key, also has the
same cookies with a different cookie partition key. This will prove that
there are cookies being omitted on a given site due to the partitioning.
(cherry picked from commit cbebd148e6898552bdd91af1c63c92b2de40beed)
Co-Authors: bewise, avvall
Bug: 41496912
Change-Id: I3698788038afc16c23bb05f6e7f485394433fd07
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6237015
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Elly FJ <ellyjones@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Commit-Queue: Adam Walls <avvall@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1417004}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6249545
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Commit-Queue: Krishna Govind <govind@chromium.org>
Owners-Override: Krishna Govind <govind@chromium.org>
Reviewed-by: Krishna Govind <govind@chromium.org>
Cr-Commit-Position: refs/branch-heads/6998@{#387}
Cr-Branched-From: de9c6fafd8ae5c6ea0438764076ca7d04a0b165d-refs/heads/main@{#1415337}
Files:
- M
android_webview/browser/aw_feature_map.cc
- M
android_webview/browser/cookie_manager.cc
- M
android_webview/browser/cookie_manager.h
- M
android_webview/common/aw_features.cc
- M
android_webview/common/aw_features.h
- M
android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java
- M
android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerTest.java
- M
services/network/cookie_manager.cc
- M
services/network/cookie_manager.h
- M
services/network/public/mojom/cookie_manager.mojom
- M
services/network/test/test_cookie_manager.h
- M
tools/metrics/histograms/metadata/android/histograms.xml
Hash: 16aba54fcf062cfe3784b35d0230330f6e4dc3ba
Date: Mon Feb 10 10:17:21 2025
pt...@google.com <pt...@google.com> #13
Project: chromium/src
Branch: refs/branch-heads/6998
Author: Adam Walls <
Link:
[M134] [WV] Add test config for WebViewPartitionedCookiesExcluded
Expand for full commit details
[M134] [WV] Add test config for WebViewPartitionedCookiesExcluded
This adds a JSON config entry for WebViewPartitionedCookiesExcluded so
that A/B experimentation can occur for this feature. This flag was added
in `[WV] Determine if partitioned cookies are not sent to apps. |
https://chromium-review.googlesource.com/c/chromium/src/+/6237015`.
(cherry picked from commit ad82f6bbd357a122ba932a0d3ec711551561616f)
Test: N/A
Bug: 41496912
Change-Id: I29c0a210364734675331a3bf180ee0b33b7c45cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6240130
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Commit-Queue: Adam Walls <avvall@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1417090}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6249204
Reviewed-by: Krishna Govind <govind@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Owners-Override: Krishna Govind <govind@chromium.org>
Commit-Queue: Krishna Govind <govind@chromium.org>
Cr-Commit-Position: refs/branch-heads/6998@{#397}
Cr-Branched-From: de9c6fafd8ae5c6ea0438764076ca7d04a0b165d-refs/heads/main@{#1415337}
Files:
- M
testing/variations/fieldtrial_testing_config.json
Hash: 3c33baad1d076a7fbf7a9c490cc4755f3bcc0bf5
Date: Mon Feb 10 11:52:17 2025
ct...@google.com <ct...@google.com> #14
I looked this one and will go to the office on Monday to have a physical mouse to test it.
pt...@google.com <pt...@google.com>
ct...@google.com <ct...@google.com> #15
Hmm, I checked this today again with physical mouse and I can reproduce this as well. I replaced WebView with TextView and it doesn't happen with TextView, so something happened inside of WebView for this. Will take a further look.
ct...@google.com <ct...@google.com> #16
I tried it today and WebView actually received onGenericMotionEvent()
events for the mouse click events, the whole sequence is:
When outside of the button and inside of WebView, WebView received:
onHoverEvent(): ACTION_HOVER_ENTER
onHoverEvent(): ACTION_HOVER_MOVE
...
onHoverEvent(): ACTION_HOVER_MOVE
until we enter the button area, WebView received:
onGenericMotionEvent(): ACTION_HOVER_MOVE
onGenericMotionEvent(): ACTION_HOVER_EXIT
After that, I think all the mouse events are dispatched the button, but when we click the mouse, WebView also received the following events from the framework:
onGenericMotionEvent(): ACTION_BUTTON_PRESS
onGenericMotionEvent(): ACTION_BUTTON_RELEASE
So WebView received the mouse click events from onGenericMotionEvent() I am not sure what's the expectation for this though. But TextView doesn't have this issue because TextView doesn't handle these type of events at all [1]
So in order to prevent the double click issue, you need to handle both BUTTON_PRESS and BUTTON_RELEASE in the button to make sure that WebView won't receive these events.
[1]
to...@google.com <to...@google.com> #17
If that's what's happening then this is an issue with all the *other* views, not with WebView, and seems likely to be difficult to fix without significant changes to how the framework deals with mouse events :(
ct...@google.com <ct...@google.com> #18
Yes I think this is a framework issue and I don't know if it is because the button didn't consume the events or because these press/release events are synthetic, but either way, this is a framework issue and I think WebView is doing the right thing.
ct...@google.com <ct...@google.com> #19
Button is a subclass of TextView, so maybe TextView should consume the event, Siyamed, could you please help to take a look, thanks!
jo...@gmail.com <jo...@gmail.com> #20
sp...@gmail.com <sp...@gmail.com> #21
Also many thanks to the original poster for adding their workaround. Saved me a bunch of time.
Description
Version used: Refer to the project file.
Devices/Android versions reproduced on: galaxy S10+, and Other devices.
If this is a bug in the library, we would appreciate if you could attach:
- Sample project to trigger the issue.
- A screenrecord or screenshots showing the issue (if UI related).
-------------------------------------------------------------------------------------------------------------------------
Hello. I am an Android developer who provides messenger apps in Korea.
Receiving issues from customers, I checked two problems in the webview.
There are two main problems.
The first is that even though there is a button covering viewpager2 including webview, a webview click occurs below it.
The second problem is that it is possible to click on a web view when using a Bluetooth mouse even though touch is prevented. Finger touch events are normally blocked.
I attached the video and sample project for the second issue.
It is not understood that finger input and mouse input work differently.
I'll be waiting for your answer. Thank you always.