Bug 55273

Summary: WebKit2: Plumb through the FULLSCREEN_API Chrome client calls
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: WebKit2Assignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, sam, webkit-ews, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 55261    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch sam: review+

Jer Noble
Reported 2011-02-25 15:45:54 PST
In WebKit2, the supportsFullscreenForNode, enterFullScreenForNode, and exitFullScreenForNode chrome client methods must be implemented.
Attachments
Patch (7.87 KB, patch)
2011-02-25 16:35 PST, Jer Noble
no flags
Patch (41.24 KB, patch)
2011-02-28 10:09 PST, Jer Noble
no flags
Patch (40.41 KB, patch)
2011-02-28 10:51 PST, Jer Noble
no flags
Patch (40.59 KB, patch)
2011-02-28 11:29 PST, Jer Noble
no flags
Patch (54.21 KB, patch)
2011-02-28 12:51 PST, Jer Noble
no flags
Patch (52.05 KB, patch)
2011-03-01 09:43 PST, Jer Noble
sam: review+
Jer Noble
Comment 1 2011-02-25 16:35:16 PST
Early Warning System Bot
Comment 2 2011-02-25 18:11:36 PST
WebKit Review Bot
Comment 3 2011-02-25 21:39:04 PST
Jer Noble
Comment 4 2011-02-28 10:09:07 PST
Jer Noble
Comment 5 2011-02-28 10:51:42 PST
Created attachment 84083 [details] Patch Same patch as above, but rebased against current HEAD.
Build Bot
Comment 6 2011-02-28 11:25:29 PST
Jer Noble
Comment 7 2011-02-28 11:29:24 PST
Created attachment 84087 [details] Patch Updated patch with feedback from Sam Weinig.
Jer Noble
Comment 8 2011-02-28 11:35:28 PST
Looks like I need to add the new files to the Windows project (and probably the qt one as well).
Jer Noble
Comment 9 2011-02-28 12:51:50 PST
Created attachment 84101 [details] Patch Added build commands for new files to the win/ and qt/ ports.
Sam Weinig
Comment 10 2011-02-28 14:44:33 PST
Comment on attachment 84101 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=84101&action=review > Source/WebKit2/UIProcess/WebFullScreenManagerProxy.cpp:66 > + WebProcess::shared().connection()->send(Messages::WebFullScreenManager::WillEnterFullScreen(), 0); This won't reach the correct (or any?) WebFullScreenManager. It needs to be routed through the WebPage. > Source/WebKit2/UIProcess/WebPageProxy.cpp:1257 > + if (WebFullScreenManagerProxy* manager = this->fullScreenManager()) > + manager->didReceiveMessage(connection, messageID, arguments); > + return; This should probably just call a function like ensureFullScreenManager(), and then you can use the fullScreenManager directly m_fullScreenManager.get(). > Source/WebKit2/UIProcess/WebPageProxy.cpp:1279 > + if (messageID.is<CoreIPC::MessageClassWebFullScreenManagerProxy>()) { > + if (WebFullScreenManagerProxy* manager = this->fullScreenManager()) > + manager->didReceiveSyncMessage(connection, messageID, arguments, reply); > + return; > + } Same here. > Source/WebKit2/UIProcess/WebPageProxy.cpp:1991 > + if (isClosed() || !isValid()) > + return 0; You can remove this. > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:1390 > + if (m_isClosed) > + return 0; This should not be necessary. > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:1771 > + if (WebFullScreenManager* fullScreenManager = this->fullScreenManager()) > + fullScreenManager->didReceiveMessage(connection, messageID, arguments); The fullScreenManager should always be non-null here, since only JS can start a fullscreen. I think you can probably just loose the lazy initialization stuff, but that is up to you.
Jer Noble
Comment 11 2011-02-28 15:19:51 PST
(In reply to comment #10) > (From update of attachment 84101 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=84101&action=review > > > Source/WebKit2/UIProcess/WebFullScreenManagerProxy.cpp:66 > > + WebProcess::shared().connection()->send(Messages::WebFullScreenManager::WillEnterFullScreen(), 0); > > This won't reach the correct (or any?) WebFullScreenManager. It needs to be routed through the WebPage. Indeed! > > Source/WebKit2/UIProcess/WebPageProxy.cpp:1257 > > + if (WebFullScreenManagerProxy* manager = this->fullScreenManager()) > > + manager->didReceiveMessage(connection, messageID, arguments); > > + return; > > This should probably just call a function like ensureFullScreenManager(), and then you can use the fullScreenManager directly m_fullScreenManager.get(). With the two changes below (removing the isClosed and isValid checks), the fullScreenManager() and fullScreenManagerProxy() functions will always return a non-NULL value, thus making these if checks extraneous. What if I leave the lazy instantiation in, but remove all these unnecessary ifs? > > Source/WebKit2/UIProcess/WebPageProxy.cpp:1279 > > + if (messageID.is<CoreIPC::MessageClassWebFullScreenManagerProxy>()) { > > + if (WebFullScreenManagerProxy* manager = this->fullScreenManager()) > > + manager->didReceiveSyncMessage(connection, messageID, arguments, reply); > > + return; > > + } > > Same here. > > > Source/WebKit2/UIProcess/WebPageProxy.cpp:1991 > > + if (isClosed() || !isValid()) > > + return 0; > > You can remove this. Removed. > > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:1390 > > + if (m_isClosed) > > + return 0; > > This should not be necessary. Removed. > > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:1771 > > + if (WebFullScreenManager* fullScreenManager = this->fullScreenManager()) > > + fullScreenManager->didReceiveMessage(connection, messageID, arguments); > > The fullScreenManager should always be non-null here, since only JS can start a fullscreen. I think you can probably just loose the lazy initialization stuff, but that is up to you. Same as above.
Early Warning System Bot
Comment 12 2011-02-28 15:27:00 PST
Build Bot
Comment 13 2011-02-28 15:54:41 PST
Build Bot
Comment 14 2011-02-28 16:35:39 PST
Jer Noble
Comment 15 2011-03-01 09:43:37 PST
Created attachment 84242 [details] Patch This patch should fix the build issues on platforms which do not enable FULLSCREEN_API, as well as address (some of) Sam's review.
Jer Noble
Comment 16 2011-03-08 21:20:53 PST
Note You need to log in before you can comment on or make changes to this bug.