WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
137930
Fullscreen video dismissal can put application to incorrect orientation on iOS
https://bugs.webkit.org/show_bug.cgi?id=137930
Summary
Fullscreen video dismissal can put application to incorrect orientation on iOS
rabbasian
Reported
2014-10-21 11:49:42 PDT
Under some circumstances, when a fullscreen video gets dismissed programmatically, it can make the application to have an incorrect interface orientation.
Attachments
Fix Patch
(4.55 KB, patch)
2014-10-21 12:05 PDT
,
rabbasian
jer.noble
: review+
jer.noble
: commit-queue+
Details
Formatted Diff
Diff
Under some circumstances, when a fullscreen video gets dismissed programmatically, it can make the application to have an incorrect interface orientation.
(4.52 KB, patch)
2014-11-04 15:37 PST
,
rabbasian
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
rabbasian
Comment 1
2014-10-21 12:05:59 PDT
Created
attachment 240214
[details]
Fix Patch
Darin Adler
Comment 2
2014-10-21 15:54:43 PDT
Comment on
attachment 240214
[details]
Fix Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=240214&action=review
> Source/WebCore/ChangeLog:11 > + When a fullscreen video gets dismissed programmatically, for instance for removing > + a webview from the view hierarchy, it can put the device in an incorrect orientation. > + Make sure we retain the window of parentView when we attempt to go to fullscreen and use > + the retained window for putting the device in correct orientation after dismissal.
Instead of retaining the UIWindow, could we just store the result of calling interfaceOrientation? Or is it helpful to call the interfaceOrientation method at the time of dismissal?
rabbasian
Comment 3
2014-10-21 16:00:58 PDT
(In reply to
comment #2
)
> Comment on
attachment 240214
[details]
> Fix Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=240214&action=review
> > > Source/WebCore/ChangeLog:11 > > + When a fullscreen video gets dismissed programmatically, for instance for removing > > + a webview from the view hierarchy, it can put the device in an incorrect orientation. > > + Make sure we retain the window of parentView when we attempt to go to fullscreen and use > > + the retained window for putting the device in correct orientation after dismissal. > > Instead of retaining the UIWindow, could we just store the result of calling > interfaceOrientation? Or is it helpful to call the interfaceOrientation > method at the time of dismissal?
It is necessary that we get the interfaceOrientation at the time of dismissal, because after entering the fullscreen video, the user could start rotating the device and depending on window's view controller rotation handling code, possibly change the orientation of the window.
Jer Noble
Comment 4
2014-10-21 16:16:27 PDT
Comment on
attachment 240214
[details]
Fix Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=240214&action=review
>>> Source/WebCore/ChangeLog:11 >>> + the retained window for putting the device in correct orientation after dismissal. >> >> Instead of retaining the UIWindow, could we just store the result of calling interfaceOrientation? Or is it helpful to call the interfaceOrientation method at the time of dismissal? > > It is necessary that we get the interfaceOrientation at the time of dismissal, because after entering the fullscreen video, the user could start rotating the device and depending on window's view controller rotation handling code, possibly change the orientation of the window.
One alternative would be to use delegate notifications (e.g., - window:willRotateToInterfaceOrientation:duration:) that the window's orientation will change, and save the result.
rabbasian
Comment 5
2014-10-21 16:46:23 PDT
(In reply to
comment #4
)
> Comment on
attachment 240214
[details]
> Fix Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=240214&action=review
> > >>> Source/WebCore/ChangeLog:11 > >>> + the retained window for putting the device in correct orientation after dismissal. > >> > >> Instead of retaining the UIWindow, could we just store the result of calling interfaceOrientation? Or is it helpful to call the interfaceOrientation method at the time of dismissal? > > > > It is necessary that we get the interfaceOrientation at the time of dismissal, because after entering the fullscreen video, the user could start rotating the device and depending on window's view controller rotation handling code, possibly change the orientation of the window. > > One alternative would be to use delegate notifications (e.g., - > window:willRotateToInterfaceOrientation:duration:) that the window's > orientation will change, and save the result.
I considered this approach. window:willRotateToInterfaceOrientation:duration: type of callbacks seem to be intended for UIViewController usage and UIViewControllers can implement those methods to get callbacks. Also there is no way to register as the recipient of these calls. One other alternative approach that I considered is to listen to window rotation change notifications. But this approach would also need the window object since we need to make sure that each time the notification is being received, it is from the window that we are interested in. I think the approach that I took may be the simplest way to address this issue.
rabbasian
Comment 6
2014-11-04 15:37:55 PST
Created
attachment 240963
[details]
Under some circumstances, when a fullscreen video gets dismissed programmatically, it can make the application to have an incorrect interface orientation. Fixed some commit conflicts.
WebKit Commit Bot
Comment 7
2014-11-04 16:22:41 PST
Comment on
attachment 240963
[details]
Under some circumstances, when a fullscreen video gets dismissed programmatically, it can make the application to have an incorrect interface orientation. Clearing flags on attachment: 240963 Committed
r175585
: <
http://trac.webkit.org/changeset/175585
>
WebKit Commit Bot
Comment 8
2014-11-04 16:22:46 PST
All reviewed patches have been landed. Closing bug.
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