Bug 223919

Summary: Promote WKWebView device orientation permission delegate to API
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebKit APIAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, eric.carlson, krollin, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
ews-feeder: commit-queue-
Patch
none
Patch
none
Patch none

youenn fablet
Reported 2021-03-30 04:19:00 PDT
Promote WKWebView device orientation permission delegate to API
Attachments
Patch (10.74 KB, patch)
2021-03-30 04:20 PDT, youenn fablet
no flags
Patch (12.99 KB, patch)
2021-04-14 10:52 PDT, youenn fablet
no flags
Patch (13.29 KB, patch)
2021-04-15 01:46 PDT, youenn fablet
ews-feeder: commit-queue-
Patch (13.30 KB, patch)
2021-04-15 02:00 PDT, youenn fablet
no flags
Patch (13.32 KB, patch)
2021-04-15 12:12 PDT, Alex Christensen
no flags
Patch (12.68 KB, patch)
2021-04-15 15:42 PDT, Alex Christensen
no flags
youenn fablet
Comment 1 2021-03-30 04:20:32 PDT
Radar WebKit Bug Importer
Comment 2 2021-04-06 04:19:51 PDT
youenn fablet
Comment 3 2021-04-14 10:52:24 PDT
youenn fablet
Comment 4 2021-04-14 10:53:42 PDT
youenn fablet
Comment 5 2021-04-15 01:46:55 PDT
youenn fablet
Comment 6 2021-04-15 02:00:36 PDT
youenn fablet
Comment 7 2021-04-15 02:31:45 PDT
@Keith, can you check why the script is not removing WK_UNAVAILABLE_API on TVOs and TVSim? I do not have those builds locally.
Alex Christensen
Comment 8 2021-04-15 12:08:58 PDT
Comment on attachment 426086 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=426086&action=review > Source/WebKit/Scripts/postprocess-header-rule:77 > -e 's/WK_(API_|CLASS_)AVAILABLE\(.*\)\s*\)//g' > + -e 's/WK_API_UNAVAILABLE\(.*\)\s*\)//g' WK_API_AVAILABLE needs to match two closing parentheses, whereas WK_API_UNAVAILABLE does not. I fixed this by removing \s*\)
Alex Christensen
Comment 9 2021-04-15 12:09:44 PDT
Comment on attachment 426086 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=426086&action=review > Source/WebKit/UIProcess/Cocoa/UIDelegate.mm:1078 > + [(id <WKUIDelegatePrivate>)delegate webView:m_uiDelegate->m_webView.get().get() requestDeviceOrientationAndMotionPermissionForOrigin:wrapper(API::SecurityOrigin::create(securityOrigin.get())) initiatedByFrame:wrapper(API::FrameInfo::create(WTFMove(frameInfo), &page)) decisionHandler:decisionHandler.get()]; The cast to WKUIDelegatePrivate is no longer needed
Alex Christensen
Comment 10 2021-04-15 12:10:21 PDT
Comment on attachment 426086 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=426086&action=review > Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h:154 > +- (void)webView:(WKWebView *)webView requestDeviceOrientationAndMotionPermissionForOrigin:(WKSecurityOrigin*)origin initiatedByFrame:(WKFrameInfo *)frame decisionHandler:(void (^)(WKPermissionDecision decision))decisionHandler WK_API_AVAILABLE(ios(WK_IOS_TBA)) WK_API_UNAVAILABLE(macos); Needs space between WKSecurityOrigin and *
Alex Christensen
Comment 11 2021-04-15 12:12:52 PDT
Eric Carlson
Comment 12 2021-04-15 12:22:58 PDT
Comment on attachment 426124 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=426124&action=review > Source/WebKit/ChangeLog:9 > + Introduce WK_API_UNAVAILABLE to make that API are not available in certain OSes. s/make that API are not available/make that API not available/
EWS
Comment 13 2021-04-15 13:04:52 PDT
Tools/Scripts/svn-apply failed to apply attachment 426124 [details] to trunk. Please resolve the conflicts and upload a new patch.
Alex Christensen
Comment 14 2021-04-15 15:42:34 PDT
EWS
Comment 15 2021-04-16 01:47:31 PDT
Committed r276125 (236621@main): <https://commits.webkit.org/236621@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 426144 [details].
Note You need to log in before you can comment on or make changes to this bug.