WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
214198
[iOS] Prompt for requestStorageAccess is inverted in WKWebView
https://bugs.webkit.org/show_bug.cgi?id=214198
Summary
[iOS] Prompt for requestStorageAccess is inverted in WKWebView
Ali Juma
Reported
2020-07-10 14:27:00 PDT
Created
attachment 404001
[details]
Test case Testing on iOS 14 beta 2, I'm seeing the following broken behavior for the requestStorageAccess prompt in WKWebView: 1. On the simulator, clicking "Don't allow" or "Allow" does the opposite: "Don't allow" grants access while "Allow" denies it. 2. On device, in situations where the prompt should be shown, storage access is granted silently without displaying any prompt. The behavior is correct in Safari, but broken in WKWebView (I'm testing using Chrome). I've attached a test case that reproduces this bug: 1. First visit
https://alijuma.github.io/request.html
and click the button. 2. Visit the attached test page (which embeds the page above) and click the button, which triggers requestStorageAccess. Expected behavior (and behavior in Safari): a prompt is shown, and clicking on "Allow" or "Don't allow" updates the displayed message to indicate whether the promise resolved or rejected. Actual behavior in WKWebView: On simulator, the prompt is shown, but the buttons do the opposite of what they should. On device, no prompt is shown.
Attachments
Test case
(77 bytes, text/html)
2020-07-10 14:27 PDT
,
Ali Juma
no flags
Details
Patch
(2.30 KB, patch)
2020-07-10 16:07 PDT
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Ali Juma
Comment 1
2020-07-10 14:32:57 PDT
Also created FB7910866 for this.
Brent Fulgham
Comment 2
2020-07-10 16:02:06 PDT
Oh wow -- I think this has been inverted the whole time!
Radar WebKit Bug Importer
Comment 3
2020-07-10 16:02:28 PDT
<
rdar://problem/65369725
>
Brent Fulgham
Comment 4
2020-07-10 16:04:59 PDT
Ali: Looking at the code, I believe this has been broken in all versions of iOS with this prompt. Did you test in iOS 13 and find that it worked properly in that release?
Brent Fulgham
Comment 5
2020-07-10 16:07:43 PDT
Created
attachment 404015
[details]
Patch
Ali Juma
Comment 6
2020-07-10 17:42:57 PDT
(In reply to Brent Fulgham from
comment #4
)
> Ali: Looking at the code, I believe this has been broken in all versions of > iOS with this prompt. Did you test in iOS 13 and find that it worked > properly in that release?
On iOS 13, I don't see the prompt at all in WKWebView (storage access is silently granted), presumably because ITP isn't enabled in iOS 13.
EWS
Comment 7
2020-07-10 23:30:28 PDT
Committed
r264266
: <
https://trac.webkit.org/changeset/264266
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 404015
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug