WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
223247
Align device orientation delegate to getUserMedia/geolocation delegates
https://bugs.webkit.org/show_bug.cgi?id=223247
Summary
Align device orientation delegate to getUserMedia/geolocation delegates
youenn fablet
Reported
2021-03-16 03:33:19 PDT
Align device orientation delegate to getUserMedia/geolocation delegates
Attachments
Patch
(33.30 KB, patch)
2021-03-16 03:38 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(52.30 KB, patch)
2021-03-16 08:59 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch for landing
(53.35 KB, patch)
2021-03-17 01:10 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2021-03-16 03:38:08 PDT
Created
attachment 423314
[details]
Patch
youenn fablet
Comment 2
2021-03-16 08:59:21 PDT
Created
attachment 423337
[details]
Patch
Eric Carlson
Comment 3
2021-03-16 09:05:11 PDT
Comment on
attachment 423337
[details]
Patch r=me once the bots are satisfied
Chris Dumez
Comment 4
2021-03-16 09:22:55 PDT
Comment on
attachment 423337
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=423337&action=review
> Source/WebKit/ChangeLog:8 > + Refactor code to move device orientation prompt implementation with other prompts in MediaPermissionUtilities.
Well, then *Media*PermissionUtilities does not seem like a great name for it.
> Source/WebKit/ChangeLog:11 > + Update the decision handler to taker grant, deny or prompt parameter.
typo: taker
> Source/WebKit/UIProcess/API/C/WKPageUIClient.h:136 > +typedef bool (*WKPageShouldAllowDeviceOrientationAndMotionAccessCallback)(WKPageRef page, WKSecurityOriginRef securityOrigin, WKFrameInfoRef frame, const void *clientInfo);
Is it really OK to modify the existing callback type like that? Wouldn't it break clients using the old prototype? I thought we were adding new delegates whenever the prototype changes.
> Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h:226 > +- (void)_webView:(WKWebView *)webView requestDeviceOrientationAndMotionPermissionForOrigin:(WKSecurityOrigin*)origin initiatedByFrame:(WKFrameInfo *)frame decisionHandler:(void (^)(_WKPermissionDecision decision))decisionHandler WK_API_AVAILABLE(ios(WK_IOS_TBA));
Same, seems risky to just rename the existing SPI. I feel we should deprecate the old one and add a new one.
youenn fablet
Comment 5
2021-03-17 01:07:56 PDT
> > Source/WebKit/ChangeLog:11 > > + Update the decision handler to taker grant, deny or prompt parameter. > > typo: taker
OK
> > Source/WebKit/UIProcess/API/C/WKPageUIClient.h:136 > > +typedef bool (*WKPageShouldAllowDeviceOrientationAndMotionAccessCallback)(WKPageRef page, WKSecurityOriginRef securityOrigin, WKFrameInfoRef frame, const void *clientInfo); > > Is it really OK to modify the existing callback type like that? Wouldn't it > break clients using the old prototype? I thought we were adding new > delegates whenever the prototype changes.
I think there is no other user right now except WebKit Tools.
> > Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h:226 > > +- (void)_webView:(WKWebView *)webView requestDeviceOrientationAndMotionPermissionForOrigin:(WKSecurityOrigin*)origin initiatedByFrame:(WKFrameInfo *)frame decisionHandler:(void (^)(_WKPermissionDecision decision))decisionHandler WK_API_AVAILABLE(ios(WK_IOS_TBA)); > > Same, seems risky to just rename the existing SPI. I feel we should > deprecate the old one and add a new one.
Ditto.
youenn fablet
Comment 6
2021-03-17 01:10:50 PDT
Created
attachment 423449
[details]
Patch for landing
EWS
Comment 7
2021-03-17 06:30:30 PDT
Committed
r274558
: <
https://commits.webkit.org/r274558
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 423449
[details]
.
Radar WebKit Bug Importer
Comment 8
2021-03-17 06:31:14 PDT
<
rdar://problem/75523911
>
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