RESOLVED FIXED141439
Scroll to make the video element visible when exiting fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=141439
Summary Scroll to make the video element visible when exiting fullscreen.
Jeremy Jones
Reported 2015-02-10 11:27:48 PST
Scroll element visible when exiting fullscreen.
Attachments
Patch (23.00 KB, patch)
2015-02-10 11:50 PST, Jeremy Jones
no flags
Patch (23.55 KB, patch)
2015-02-10 12:26 PST, Jeremy Jones
no flags
Patch (22.17 KB, patch)
2015-02-27 15:02 PST, Jeremy Jones
no flags
Patch (22.22 KB, patch)
2015-03-02 16:09 PST, Jeremy Jones
no flags
Patch (20.22 KB, patch)
2015-03-05 10:20 PST, Jeremy Jones
no flags
Patch (15.84 KB, patch)
2015-03-05 14:58 PST, Jeremy Jones
simon.fraser: review+
Patch for landing. (20.68 KB, patch)
2015-03-05 16:54 PST, Jeremy Jones
no flags
Patch for landing. (20.66 KB, patch)
2015-03-05 18:17 PST, Jeremy Jones
no flags
Jeremy Jones
Comment 1 2015-02-10 11:50:19 PST
WebKit Commit Bot
Comment 2 2015-02-10 11:52:25 PST
Attachment 246333 [details] did not pass style-queue: ERROR: Source/WebKit2/UIProcess/Cocoa/UIDelegate.h:94: Please declare enum bitfields as unsigned integral types. [runtime/enum_bitfields] [5] Total errors found: 1 in 22 files If any of these errors are false positives, please file a bug against check-webkit-style.
Jeremy Jones
Comment 3 2015-02-10 12:26:31 PST
WebKit Commit Bot
Comment 4 2015-02-10 12:28:44 PST
Attachment 246335 [details] did not pass style-queue: ERROR: Source/WebKit2/UIProcess/Cocoa/UIDelegate.h:94: Please declare enum bitfields as unsigned integral types. [runtime/enum_bitfields] [5] Total errors found: 1 in 22 files If any of these errors are false positives, please file a bug against check-webkit-style.
Simon Fraser (smfr)
Comment 5 2015-02-11 11:56:05 PST
"Scroll element visible when exiting fullscreen." is so hard to parse. Do you mean "the scroll element is visible" or "scroll the element to be visible"?
Jeremy Jones
Comment 6 2015-02-16 12:47:02 PST
(In reply to comment #5) > "Scroll element visible when exiting fullscreen." is so hard to parse. > > Do you mean "the scroll element is visible" or "scroll the element to be > visible"? Second one. Scroll is a verb. I'll make that less ambiguous.
Jeremy Jones
Comment 7 2015-02-27 15:02:34 PST
WebKit Commit Bot
Comment 8 2015-02-27 15:04:43 PST
Attachment 247560 [details] did not pass style-queue: ERROR: Source/WebKit2/UIProcess/Cocoa/UIDelegate.h:94: Please declare enum bitfields as unsigned integral types. [runtime/enum_bitfields] [5] Total errors found: 1 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
Jeremy Jones
Comment 9 2015-03-02 16:09:44 PST
WebKit Commit Bot
Comment 10 2015-03-02 16:11:56 PST
Attachment 247712 [details] did not pass style-queue: ERROR: Source/WebKit2/UIProcess/Cocoa/UIDelegate.h:94: Please declare enum bitfields as unsigned integral types. [runtime/enum_bitfields] [5] Total errors found: 1 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
Jeremy Jones
Comment 11 2015-03-05 10:20:07 PST
Jeremy Jones
Comment 12 2015-03-05 10:37:08 PST
UIDelegate::UIClient::isPageVisible no longer delegates to WKUIDelegatePrivate and instead implements it based on if the WKView is hidden and is in a window.
Simon Fraser (smfr)
Comment 13 2015-03-05 10:49:55 PST
Comment on attachment 247964 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=247964&action=review > Source/WebCore/dom/Element.h:194 > void scrollIntoView(bool alignToTop = true); > void scrollIntoViewIfNeeded(bool centerIfNeeded = true); > + WEBCORE_EXPORT void scrollIntoViewIfNotVisible(bool centerIfNotVisible = true); Shame we have all these variants. Maybe one with some bit flags would be better long-term. > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:1156 > +void WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline(bool visible, IntRect inlineRect) const IntRect& > Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm:260 > +bool UIDelegate::UIClient::isPageVisible(WebKit::WebPageProxy*) > +{ > + return ![m_uiDelegate.m_webView isHidden] && [m_uiDelegate.m_webView window] != nil; > +} We already have PageClient which has isViewVisible() and isViewInWindow(). Not sure why we need new code here.
Jeremy Jones
Comment 14 2015-03-05 14:58:07 PST
Jeremy Jones
Comment 15 2015-03-05 14:59:08 PST
(In reply to comment #13) > Comment on attachment 247964 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=247964&action=review > > > Source/WebCore/dom/Element.h:194 > > void scrollIntoView(bool alignToTop = true); > > void scrollIntoViewIfNeeded(bool centerIfNeeded = true); > > + WEBCORE_EXPORT void scrollIntoViewIfNotVisible(bool centerIfNotVisible = true); > > Shame we have all these variants. Maybe one with some bit flags would be > better long-term. I'll file a bug for this. > > > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:1156 > > +void WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline(bool visible, IntRect inlineRect) > > const IntRect& Still need to fix this one.... > > > Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm:260 > > +bool UIDelegate::UIClient::isPageVisible(WebKit::WebPageProxy*) > > +{ > > + return ![m_uiDelegate.m_webView isHidden] && [m_uiDelegate.m_webView window] != nil; > > +} > > We already have PageClient which has isViewVisible() and isViewInWindow(). > Not sure why we need new code here. Removed.
Simon Fraser (smfr)
Comment 16 2015-03-05 15:02:56 PST
Comment on attachment 248004 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=248004&action=review > Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.h:62 > + void preparedToReturnToInline(bool visible, WebCore::IntRect inlineRect) override; const IntRect& > Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm:126 > +void WebVideoFullscreenManagerProxy::preparedToReturnToInline(bool visible, WebCore::IntRect inlineRect) const IntRect& > Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.mm:265 > + m_page->send(Messages::WebVideoFullscreenManagerProxy::PreparedToReturnToInline(true, clientRectForElement(m_videoElement.get())), m_page->pageID()); Not clear what 'true' means here.
Jeremy Jones
Comment 17 2015-03-05 16:53:25 PST
(In reply to comment #16) > Comment on attachment 248004 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=248004&action=review > > > Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.h:62 > > + void preparedToReturnToInline(bool visible, WebCore::IntRect inlineRect) override; > > const IntRect& Fixed. > > > Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm:126 > > +void WebVideoFullscreenManagerProxy::preparedToReturnToInline(bool visible, WebCore::IntRect inlineRect) > > const IntRect& Fixed. And several locations. > > > Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.mm:265 > > + m_page->send(Messages::WebVideoFullscreenManagerProxy::PreparedToReturnToInline(true, clientRectForElement(m_videoElement.get())), m_page->pageID()); > > Not clear what 'true' means here. 'true' will be replaced by something more meaningful in a later bug fix.
Jeremy Jones
Comment 18 2015-03-05 16:54:13 PST
Created attachment 248020 [details] Patch for landing.
Brent Fulgham
Comment 19 2015-03-05 17:41:51 PST
Still breaking Windows: ScrollBehavior.cpp(50): error C2370: 'alignToEdgeIfNotVisible' : redefinition; different storage class (..\rendering\RenderingAllInOne.cpp)
Brent Fulgham
Comment 20 2015-03-05 17:44:09 PST
(In reply to comment #19) > Still breaking Windows: > > ScrollBehavior.cpp(50): error C2370: 'alignToEdgeIfNotVisible' : > redefinition; different storage class (..\rendering\RenderingAllInOne.cpp) If you declare it as WEBCORE_EXPORT in the implementation file, it needs to have the same declaration in the header file (or else Windows gets mad). I think it's usually sufficient to just add it in the header file and not do so in the implementation file.
Jeremy Jones
Comment 21 2015-03-05 18:17:27 PST
Created attachment 248027 [details] Patch for landing.
Jeremy Jones
Comment 22 2015-03-06 10:09:06 PST
(In reply to comment #20) > (In reply to comment #19) > > Still breaking Windows: > > > > ScrollBehavior.cpp(50): error C2370: 'alignToEdgeIfNotVisible' : > > redefinition; different storage class (..\rendering\RenderingAllInOne.cpp) > > If you declare it as WEBCORE_EXPORT in the implementation file, it needs to > have the same declaration in the header file (or else Windows gets mad). I > think it's usually sufficient to just add it in the header file and not do > so in the implementation file. I removed that WEBCORE_EXPORT as it was unnecessary.
WebKit Commit Bot
Comment 23 2015-03-06 11:28:52 PST
Comment on attachment 248027 [details] Patch for landing. Clearing flags on attachment: 248027 Committed r181173: <http://trac.webkit.org/changeset/181173>
Note You need to log in before you can comment on or make changes to this bug.