Skip to content

Migrate away from UIApplication.sharedApplication.statusBarFrame in WebKitTestRunner#62870

Merged
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
smfr:eng/Migrate-away-from-UIApplication-sharedApplication-statusBarFrame-in-WebKitTestRunner
Apr 16, 2026
Merged

Migrate away from UIApplication.sharedApplication.statusBarFrame in WebKitTestRunner#62870
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
smfr:eng/Migrate-away-from-UIApplication-sharedApplication-statusBarFrame-in-WebKitTestRunner

Conversation

@smfr
Copy link
Copy Markdown
Contributor

@smfr smfr commented Apr 16, 2026

5a8ae3a

Migrate away from UIApplication.sharedApplication.statusBarFrame in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=312432
rdar://174655309

Reviewed by Aditya Keerthi and Abrar Rahman Protyasha.

`UIApplication.sharedApplication.statusBarFrame` has been deprecated for a while,
so move to UIScene-based status bar API.

* Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::viewRectForWindowRect):
* Tools/WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformConfigureViewForTest):

Canonical link: https://commits.webkit.org/311370@main

7f76cc7

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows Apple Internal
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win ⏳ 🛠 ios-apple
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ✅ 🧪 win-tests ⏳ 🛠 mac-apple
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe ⏳ 🛠 vision-apple
✅ 🧪 ios-wk2-wpt ✅ 🧪 api-mac-debug ✅ 🛠 gtk3-libwebrtc
✅ 🧪 api-ios ✅ 🧪 mac-wk1 ✅ 🛠 gtk
✅ 🧪 mac-wk2 ✅ 🧪 gtk-wk2
loading 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🛠 playstation
✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2
✅ 🛠 tv loading 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@smfr smfr requested a review from JonWBedard as a code owner April 16, 2026 01:49
@smfr smfr self-assigned this Apr 16, 2026
@smfr smfr added the Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases label Apr 16, 2026
Copy link
Copy Markdown
Member

@aprotyas aprotyas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: RetainPtr

// We add the status bar in here because it is subtracted back out in viewRectForWindowRect.
static constexpr CGSize defaultTestingiPadViewSize = { 810, 1060 };
sceneBounds = CGRectMake(0, 0, defaultTestingiPadViewSize.width, defaultTestingiPadViewSize.height + CGRectGetHeight(UIApplication.sharedApplication.statusBarFrame));
auto *scene = webView.window.windowScene;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have scene on line 490.

Suggested change
auto *scene = webView.window.windowScene;

@smfr smfr force-pushed the eng/Migrate-away-from-UIApplication-sharedApplication-statusBarFrame-in-WebKitTestRunner branch from e2bd3db to 7f76cc7 Compare April 16, 2026 02:26
@smfr smfr added the merge-queue Applied to send a pull request to merge-queue label Apr 16, 2026
…ebKitTestRunner

https://bugs.webkit.org/show_bug.cgi?id=312432
rdar://174655309

Reviewed by Aditya Keerthi and Abrar Rahman Protyasha.

`UIApplication.sharedApplication.statusBarFrame` has been deprecated for a while,
so move to UIScene-based status bar API.

* Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::viewRectForWindowRect):
* Tools/WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformConfigureViewForTest):

Canonical link: https://commits.webkit.org/311370@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Migrate-away-from-UIApplication-sharedApplication-statusBarFrame-in-WebKitTestRunner branch from 7f76cc7 to 5a8ae3a Compare April 16, 2026 15:22
@webkit-commit-queue
Copy link
Copy Markdown
Collaborator

Committed 311370@main (5a8ae3a): https://commits.webkit.org/311370@main

Reviewed commits have been landed. Closing PR #62870 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 5a8ae3a into WebKit:main Apr 16, 2026
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants