WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
209372
Adopt -[UIWindowScene interfaceOrientation] when determining device orientation
https://bugs.webkit.org/show_bug.cgi?id=209372
Summary
Adopt -[UIWindowScene interfaceOrientation] when determining device orientation
Wenson Hsieh
Reported
2020-03-20 21:38:47 PDT
<
rdar://problem/60491857
>
Attachments
Patch
(6.87 KB, patch)
2020-03-21 16:26 PDT
,
Wenson Hsieh
darin
: review+
Details
Formatted Diff
Diff
Patch for landing
(6.87 KB, patch)
2020-03-22 12:05 PDT
,
Wenson Hsieh
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Wenson Hsieh
Comment 1
2020-03-21 16:26:31 PDT
Created
attachment 394183
[details]
Patch
Darin Adler
Comment 2
2020-03-22 09:52:52 PDT
Comment on
attachment 394183
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=394183&action=review
How can we make an automated test for this?
> Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:229 > + auto *application = UIApplication.sharedApplication;
Just auto would be better. Let’s dodge the * placement issue.
> Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:234 > + else if (auto *windowScene = self.window.windowScene)
Ditto.
Wenson Hsieh
Comment 3
2020-03-22 12:00:19 PDT
Comment on
attachment 394183
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=394183&action=review
I considered writing an API test for this that would mock out -_appAdoptsUISceneLifecycle to return YES, but I don't think such a test would be very useful. Generally, writing an API test for this is tricky, because TestWebKitAPI isn't even a UI application on iOS, and so the UIApplication, windows, and their window scenes would all need to be mocked by the test. I think when we eventually convert WebKitTestRunnerApp into a scene-based UIApplication, we'll be able to get test coverage for this codepath.
>> Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:229 >> + auto *application = UIApplication.sharedApplication; > > Just auto would be better. Let’s dodge the * placement issue.
Sounds good — changed to just auto.
>> Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:234 >> + else if (auto *windowScene = self.window.windowScene) > > Ditto.
Changed to just auto.
Wenson Hsieh
Comment 4
2020-03-22 12:05:28 PDT
Created
attachment 394222
[details]
Patch for landing
EWS
Comment 5
2020-03-22 12:29:44 PDT
Committed
r258821
: <
https://trac.webkit.org/changeset/258821
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 394222
[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