Fullscreen media controls are unusable in pagination mode
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Apr 2014 17:59:26 +0000 (17:59 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Apr 2014 17:59:26 +0000 (17:59 +0000)
commit6db04a8c13bb0679d8b27390ac8e7a938f7a99a6
tree399e1b5bac8edded72aba9a3a816e65d10424a04
parentf14b2a78d78bdcc983cde951b39e53bda4aa2969
Fullscreen media controls are unusable in pagination mode
https://bugs.webkit.org/show_bug.cgi?id=131705

Reviewed by Darin Adler.

Source/WebCore:
When pagination mode is enabled, the full screen media will (depending on the width of the
pagination columns) overflow its column, and hit testing will be clipped to the column. In extreme
cases, where the column width < 0.5 * media element width, the media controls will be entirely
unclickable.

Rather than making the RenderFullScreen a child of the full screen element's parent's renderer,
make it a child of the RenderView, putting it outside of the columns entirely. Always create and
insert the fullscreenRenderer's placeholder, using it as the remembered insertion point for the
fullscreen element's renderer when we exit full screen.

Drive-by fix: don't wrap the full screen element's renderer in webkitWillEnterFullScreenForElement();
it will just be re-wrapped in createRendererIfNeeded().

* dom/Document.cpp:
(WebCore::Document::webkitWillEnterFullScreenForElement): Don't wrap the full screen element's renderer.
(WebCore::Document::setFullScreenRenderer): Call setPlaceholderStyle.
* rendering/RenderFullScreen.cpp:
(WebCore::RenderFullScreenPlaceholder::willBeDestroyed): Call clearPlaceholder.
(WebCore::RenderFullScreen::wrapRenderer): Make fullscreenRenderer a child of the view().
(WebCore::RenderFullScreen::unwrapRenderer): Return the children to the parent of the placeholder().
(WebCore::RenderFullScreen::clearPlaceholder): Renamed from setPlaceholder().
(WebCore::RenderFullScreen::ensurePlaceholder): Added.
(WebCore::RenderFullScreen::setPlaceholderStyle): Renamed from createPlaceholder().
(WebCore::RenderFullScreen::setPlaceholder): Deleted.
(WebCore::RenderFullScreen::createPlaceholder): Deleted.
* rendering/RenderFullScreen.h:

LayoutTests:
* fullscreen/full-screen-no-style-sharing-expected.txt: Rebaselined.
* fullscreen/video-cursor-auto-hide.html: Corrected test to move cursor
    to the middle of the video element.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167441 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fullscreen/full-screen-no-style-sharing-expected.txt
LayoutTests/fullscreen/video-cursor-auto-hide.html
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/rendering/RenderFullScreen.cpp
Source/WebCore/rendering/RenderFullScreen.h