-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix video fullscreen exit crash #295
Conversation
bc2e86a
to
e9d9ebe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tomasstrba could you take a look again at this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍 🎖️ 🏅 Thanks for taking this of my shoulders 🙏
Just one thing below and then feel free to merge :)
@@ -20,6 +20,12 @@ import Cocoa | |||
import Combine | |||
import os.log | |||
|
|||
#if DEBUG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general this is a bad technique. The point of #if DEBUG
#else
is to resolve the condition during the compilation. When using isDebugBuild
both branches are part of the binary.
I can't see a usage of isDebugBuild
, was it merged by mistake? (it was previously there and I remember refactoring it)
@@ -170,4 +170,13 @@ final class WebView: WKWebView { | |||
inspectorPerform("showResources") | |||
} | |||
|
|||
var fullscreenWindowController: NSWindowController? { | |||
guard let fullscreenWindowController = self.window?.windowController, | |||
fullscreenWindowController.className.contains("FullScreen") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 what a cool hack
* Fix crash on fullscreen exit * fix resizing * trying to fix Xcode 13.0 compatibility * Xcode 13.1 fix * Unit tests fixed for macOS 12 * fix tab switching * Fix window closing when video playing in full screen * cleanup Co-authored-by: Tomas Strba <[email protected]>
Task/Issue URL: https://app.asana.com/0/1199237043630360/1201203279491064/f
Tech Design URL:
CC: @tomasstrba @samsymons
Description:
Fixes crash when fullscreen playing Tab/Window is closed
Steps to test this PR:
Testing checklist:
Internal references:
Software Engineering Expectations
Technical Design Template
When ready for review, remember to post the PR in MM