WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
CLOSED FIXED
90327
[BlackBerry] exitFullScreenForElement() is not working for fullscreen elements in iframes
https://bugs.webkit.org/show_bug.cgi?id=90327
Summary
[BlackBerry] exitFullScreenForElement() is not working for fullscreen element...
Max Feil
Reported
2012-06-29 17:39:36 PDT
This problem was discovered in the BlackBerry port during manual testing of fullscreen video at:
http://w3schools.com/html5/tryit.asp?filename=tryhtml5_video_all
See PR168219. The video element is in an iframe, and exiting fullscreen resulted in a crash. The exitFullScreenForElement() call was being made on the topDocument (which has a null m_fullScreenElement) instead of the iframe's document. The Chromium and Windows ports get around this problem by storing either the fullscreen element or its frame during enterFullScreenForElement(), so I will bring the BlackBerry port in line with this. See also
bug 89817
.
Attachments
Patch
(6.96 KB, patch)
2012-06-29 17:51 PDT
,
Max Feil
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ec2-cr-linux-02
(752.38 KB, application/zip)
2012-06-29 20:20 PDT
,
WebKit Review Bot
no flags
Details
Patch
(7.64 KB, patch)
2012-07-06 14:07 PDT
,
Max Feil
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Max Feil
Comment 1
2012-06-29 17:51:02 PDT
Created
attachment 150283
[details]
Patch
WebKit Review Bot
Comment 2
2012-06-29 20:20:52 PDT
Comment on
attachment 150283
[details]
Patch
Attachment 150283
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/13114572
New failing tests: fullscreen/exit-full-screen-iframe.html
WebKit Review Bot
Comment 3
2012-06-29 20:20:56 PDT
Created
attachment 150296
[details]
Archive of layout-test-results from ec2-cr-linux-02 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: ec2-cr-linux-02 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Antonio Gomes
Comment 4
2012-06-30 07:34:25 PDT
Comment on
attachment 150283
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=150283&action=review
> Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp:739 > + ASSERT(m_fullScreenElement); > + if (m_fullScreenElement) {
Max, if it can be null, why do you assert that it is always non-null?
Max Feil
Comment 5
2012-06-30 12:21:43 PDT
(In reply to
comment #4
)
> > Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp:739 > > + ASSERT(m_fullScreenElement); > > + if (m_fullScreenElement) { > > Max, if it can be null, why do you assert that it is always non-null?
The element parameter to exitFullScreenForElement() can be null (for reasons I don't fully agree with). But the member variable m_fullScreenElement is set by enterFullScreenForElement() whose element parameter is never null, so the member variable should never be null at this point (except in the pathological case of mismatched enter/exit calls). See
bug 89817
for more background info.
Antonio Gomes
Comment 6
2012-06-30 13:56:42 PDT
(In reply to
comment #5
)
> (In reply to
comment #4
) > > > Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp:739 > > > + ASSERT(m_fullScreenElement); > > > + if (m_fullScreenElement) { > > > > Max, if it can be null, why do you assert that it is always non-null? > > The element parameter to exitFullScreenForElement() can be null (for reasons I don't fully agree with). But the member variable m_fullScreenElement is set by enterFullScreenForElement() whose element parameter is never null, so the member variable should never be null at this point (except in the pathological case of mismatched enter/exit calls). See
bug 89817
for more background info.
I understand that part from the other bug. So why not just remove the 'if' and keep the assert?
Max Feil
Comment 7
2012-06-30 14:31:04 PDT
(In reply to
comment #6
)
> I understand that part from the other bug. So why not just remove the 'if' and keep the assert?
I think it is better in release builds to do nothing rather than crash if exitFullScreenForElement() is called when m_fullScreenElement is empty. In many ways a null m_fullScreenElement means we are not knowingly in fullscreen mode, so there is nothing we should do. I felt this was clear from the code?
Antonio Gomes
Comment 8
2012-07-01 11:36:46 PDT
(In reply to
comment #7
)
> (In reply to
comment #6
) > > I understand that part from the other bug. So why not just remove the 'if' and keep the assert? > > I think it is better in release builds to do nothing rather than crash if exitFullScreenForElement() is called when m_fullScreenElement is empty.
I particularly prefer it to crash, so we fix it if it is a real bug. If we are trying to catch the cases when it can happen, then we can keep both the assert and if check temporarily, but I'd dislike this pattern to live forever.
Max Feil
Comment 9
2012-07-06 14:07:42 PDT
Created
attachment 151116
[details]
Patch
WebKit Review Bot
Comment 10
2012-07-06 14:41:14 PDT
Comment on
attachment 151116
[details]
Patch Clearing flags on attachment: 151116 Committed
r122035
: <
http://trac.webkit.org/changeset/122035
>
WebKit Review Bot
Comment 11
2012-07-06 14:41:19 PDT
All reviewed patches have been landed. Closing bug.
Max Feil
Comment 12
2012-11-02 12:48:10 PDT
Closing bug for patch that landed a long time ago.
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