| Summary: | Promote WKWebView device orientation permission delegate to API | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | youenn fablet <youennf> | ||||||||||||||
| Component: | WebKit API | Assignee: | 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
youenn fablet
2021-03-30 04:19:00 PDT
Created attachment 424628 [details]
Patch
Created attachment 426013 [details]
Patch
Created attachment 426082 [details]
Patch
Created attachment 426086 [details]
Patch
@Keith, can you check why the script is not removing WK_UNAVAILABLE_API on TVOs and TVSim? I do not have those builds locally. 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*\) 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 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 * Created attachment 426124 [details]
Patch
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/ Tools/Scripts/svn-apply failed to apply attachment 426124 [details] to trunk.
Please resolve the conflicts and upload a new patch.
Created attachment 426144 [details]
Patch
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]. |