Bug 201101 - Removing fullscreen element in rAF() callback after requestFullscreen() can leave fullscreen in inconsistent state.
Summary: Removing fullscreen element in rAF() callback after requestFullscreen() can l...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-08-23 16:23 PDT by Jer Noble
Modified: 2019-08-27 13:47 PDT (History)
4 users (show)

See Also:


Attachments
Patch (22.14 KB, patch)
2019-08-26 10:02 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (21.24 KB, patch)
2019-08-26 10:05 PDT, Jer Noble
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2019-08-23 16:23:05 PDT
Removing fullscreen element in rAF() callback after requestFullscreen() can leave fullscreen in inconsistent state.
Comment 1 Jer Noble 2019-08-23 16:42:17 PDT
<rdar://problem/54164587>
Comment 2 Jer Noble 2019-08-26 10:02:18 PDT
Created attachment 377249 [details]
Patch
Comment 3 Jer Noble 2019-08-26 10:05:01 PDT
Created attachment 377251 [details]
Patch
Comment 4 Eric Carlson 2019-08-26 17:29:25 PDT
Comment on attachment 377251 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=377251&action=review

> Source/WebCore/dom/FullscreenManager.cpp:245
> +        if (m_pendingFullscreenElement)

Nit: this test is unnecessary

> Source/WebCore/dom/FullscreenManager.cpp:271
> +        if (m_pendingFullscreenElement)

Ditto

> LayoutTests/fullscreen/full-screen-request-removed-with-raf.html:9
> +            if (document.webkitCurrentFullScreenElement && document.webkitCurrentFullScreenElement.ownerDocument)

Shouldn’t this be “! document.webkitCurrentFullScreenElement.ownerDocument”?
Comment 5 Jer Noble 2019-08-27 08:02:23 PDT
Comment on attachment 377251 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=377251&action=review

>> LayoutTests/fullscreen/full-screen-request-removed-with-raf.html:9
>> +            if (document.webkitCurrentFullScreenElement && document.webkitCurrentFullScreenElement.ownerDocument)
> 
> Shouldn’t this be “! document.webkitCurrentFullScreenElement.ownerDocument”?

Yep.
Comment 6 Jer Noble 2019-08-27 09:49:46 PDT
Committed r249147: <https://trac.webkit.org/changeset/249147>