2011-05-29 Jer Noble <jer.noble@apple.com>
Reviewed by Simon Fraser.
Embedded Vimeo video, when taken fullscreen, is overlapped by content from the enclosing page
https://bugs.webkit.org/show_bug.cgi?id=61712
* fullscreen/full-screen-iframe-zIndex-expected.txt: Added.
* fullscreen/full-screen-iframe-zIndex.html: Added.
* platform/mac/fullscreen/full-screen-iframe-zIndex-expected.png: Added.
2011-05-29 Jer Noble <jer.noble@apple.com>
Reviewed by Simon Fraser.
Embedded Vimeo video, when taken fullscreen, is overlapped by content from the enclosing page
https://bugs.webkit.org/show_bug.cgi?id=61712
Tests: fullscreen/full-screen-iframe-zIndex.html
Walk up the ancestor chain for the full-screen element, marking them as full-screen
ancestors. Then, we apply a pseudo-class to those elements, which disable all their
stacking-context-creating styles. Set the z-index of all full-screen elements (and
the iframes which contain them) to a large value, ensuring they appear above other
sibling elements.
This new behavior replaces the previous "-webkit-full-screen-media-document" behavior
and pesudo-class, so remove it and replace it with the new pseudo-class.
* css/CSSSelector.cpp:
(WebCore::nameToPseudoTypeMap): Add -webkit-full-screen-ancestor and remove
-webkit-full-screen-media-document.
(WebCore::CSSSelector::pseudoId): Add PseudoFullScreenAncestor and remove
PseudoFullScreenMediaDocument
(WebCore::CSSSelector::extractPseudoType): Ditto.
* css/CSSSelector.h: Ditto.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Remove the
PseudoFullScreenMediaDocument implementation and replace it with
PseudoFullScreenAncestor.
* css/fullscreen.css:
(:-webkit-full-screen): Add a z-index property.
(:-webkit-full-screen-ancestor:not(iframe)): Added. Reset the z-index to
auto, and reset other stacking-context creating properties.
* dom/Document.cpp:
(WebCore::Document::setContainsFullScreenElementRecursively): Recurse up every element
instead of just the iframe elements.
(WebCore::Document::webkitWillEnterFullScreenForElement): Ditto.
* dom/Element.cpp:
(WebCore::Element::willRemove): Reset our parent's containsFullScreenElement property.
(WebCore::Element::insertedIntoTree): Ditto.
(WebCore::Element::containsFullScreenElement): Moved here from HTMLElementBase.
(WebCore::Element::setContainsFullScreenElement): Ditto.
* dom/Element.h:
* dom/ElementRareData.h:
(WebCore::ElementRareData::ElementRareData): Added ivar and initializer for
m_containsFullScreenElement.
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::HTMLFrameElementBase): Removed ivar and initializer.
(WebCore::HTMLFrameElementBase::setContainsFullScreenElement): Moved into Element.
* html/HTMLFrameElementBase.h:
* rendering/style/RenderStyleConstants.h:
Canonical link: https://commits.webkit.org/77155@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@87660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-05-30 02:05:30 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<script>
|
|
|
|
var runPixelTests = true;
|
|
|
|
|
|
|
|
function init() {
|
|
|
|
// Bail out early if the full screen API is not enabled or is missing:
|
|
|
|
if (Element.prototype.webkitRequestFullScreen == undefined) {
|
|
|
|
logResult(false, "Element.prototype.webkitRequestFullScreen == undefined");
|
|
|
|
endTest();
|
|
|
|
} else {
|
|
|
|
var iframe = document.getElementById('block1');
|
|
|
|
var element = iframe.contentDocument.documentElement;
|
|
|
|
waitForEventAndEnd(element, 'webkitfullscreenchange');
|
|
|
|
runWithKeyDown(goFullScreen);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function goFullScreen() {
|
|
|
|
var iframe = document.getElementById('block1');
|
|
|
|
var element = iframe.contentDocument.documentElement;
|
|
|
|
element.webkitRequestFullScreen();
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<script src="full-screen-test.js"></script>
|
|
|
|
<style>
|
|
|
|
#block1 {
|
|
|
|
width: 200px;
|
|
|
|
height: 100px;
|
|
|
|
border: 4px solid darkgreen;
|
|
|
|
background-color: green;
|
2013-03-07 00:26:01 +00:00
|
|
|
z-index: 0;
|
2011-05-29 Jer Noble <jer.noble@apple.com>
Reviewed by Simon Fraser.
Embedded Vimeo video, when taken fullscreen, is overlapped by content from the enclosing page
https://bugs.webkit.org/show_bug.cgi?id=61712
* fullscreen/full-screen-iframe-zIndex-expected.txt: Added.
* fullscreen/full-screen-iframe-zIndex.html: Added.
* platform/mac/fullscreen/full-screen-iframe-zIndex-expected.png: Added.
2011-05-29 Jer Noble <jer.noble@apple.com>
Reviewed by Simon Fraser.
Embedded Vimeo video, when taken fullscreen, is overlapped by content from the enclosing page
https://bugs.webkit.org/show_bug.cgi?id=61712
Tests: fullscreen/full-screen-iframe-zIndex.html
Walk up the ancestor chain for the full-screen element, marking them as full-screen
ancestors. Then, we apply a pseudo-class to those elements, which disable all their
stacking-context-creating styles. Set the z-index of all full-screen elements (and
the iframes which contain them) to a large value, ensuring they appear above other
sibling elements.
This new behavior replaces the previous "-webkit-full-screen-media-document" behavior
and pesudo-class, so remove it and replace it with the new pseudo-class.
* css/CSSSelector.cpp:
(WebCore::nameToPseudoTypeMap): Add -webkit-full-screen-ancestor and remove
-webkit-full-screen-media-document.
(WebCore::CSSSelector::pseudoId): Add PseudoFullScreenAncestor and remove
PseudoFullScreenMediaDocument
(WebCore::CSSSelector::extractPseudoType): Ditto.
* css/CSSSelector.h: Ditto.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Remove the
PseudoFullScreenMediaDocument implementation and replace it with
PseudoFullScreenAncestor.
* css/fullscreen.css:
(:-webkit-full-screen): Add a z-index property.
(:-webkit-full-screen-ancestor:not(iframe)): Added. Reset the z-index to
auto, and reset other stacking-context creating properties.
* dom/Document.cpp:
(WebCore::Document::setContainsFullScreenElementRecursively): Recurse up every element
instead of just the iframe elements.
(WebCore::Document::webkitWillEnterFullScreenForElement): Ditto.
* dom/Element.cpp:
(WebCore::Element::willRemove): Reset our parent's containsFullScreenElement property.
(WebCore::Element::insertedIntoTree): Ditto.
(WebCore::Element::containsFullScreenElement): Moved here from HTMLElementBase.
(WebCore::Element::setContainsFullScreenElement): Ditto.
* dom/Element.h:
* dom/ElementRareData.h:
(WebCore::ElementRareData::ElementRareData): Added ivar and initializer for
m_containsFullScreenElement.
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::HTMLFrameElementBase): Removed ivar and initializer.
(WebCore::HTMLFrameElementBase::setContainsFullScreenElement): Moved into Element.
* html/HTMLFrameElementBase.h:
* rendering/style/RenderStyleConstants.h:
Canonical link: https://commits.webkit.org/77155@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@87660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-05-30 02:05:30 +00:00
|
|
|
}
|
|
|
|
#block2 {
|
|
|
|
width: 100px;
|
|
|
|
height: 50px;
|
|
|
|
border: 4px solid darkred;
|
|
|
|
background-color: red;
|
|
|
|
z-index: 500;
|
|
|
|
position: relative;
|
|
|
|
left: 50px;
|
|
|
|
top: 25px;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body onload="init()">
|
|
|
|
<div>This tests that an element with a positive z-index appears behind the full screen element.
|
|
|
|
After entering full screen mode, only a white box should be visible.
|
|
|
|
Click <button onclick="goFullScreen()">go full screen</button> to run the test.</div>
|
|
|
|
<div id="block2"></div>
|
|
|
|
<iframe webkitallowfullscreen src="resources/inner.html" id="block1"></iframe>
|
2012-06-13 12:34:26 +00:00
|
|
|
</body>
|