haikuwebkit/LayoutTests/fullscreen/full-screen-stacking-contex...

63 lines
2.2 KiB
HTML
Raw Permalink Normal View History

2011-05-03 Jer Noble <jer.noble@apple.com> Reviewed by Antti Koivisto. Safari: Video at apple.com cannot play at full screen mode with layout distortion https://bugs.webkit.org/show_bug.cgi?id=60140 * fullscreen/full-screen-stacking-context-expected.txt: Added. * fullscreen/full-screen-stacking-context.html: Added. * platform/mac/fullscreen/full-screen-stacking-context-expected.png: Added. 2011-05-03 Jer Noble <jer.noble@apple.com> Reviewed by Antti Koivisto. Safari: Video at apple.com cannot play at full screen mode with layout distortion https://bugs.webkit.org/show_bug.cgi?id=60140 Because a fullscreen element may be in a stacking context with a lower z-index than a sibling stacking context, those higher contexts would sometimes "pop" through the full screen renderer. To facilitate eliminating all the stacking contexts aside from the full screen renderer, added a new pseudo-class specific to video or audio full screen elements. Then, added a new UA rule which resets the z-index and opacities of all elements under said pseudo-class to auto and 1 respectively. To facilitate quick identity checking of HTMLMediaElements, added isMediaElement() virtual function to Element and HTMLMediaElement. Test: fullscreen/full-screen-stacking-context.html * css/CSSSelector.cpp: (WebCore::CSSSelector::pseudoId): Support PseudoFullScreenMediaDocument. (WebCore::nameToPseudoTypeMap): Support fullScreenMediaDocument. (WebCore::CSSSelector::extractPseudoType): Support PseudoFullScreenMediaDocument. * css/CSSSelector.h: Add PseudoFullScreenMediaDocument. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Support PseudoFullScreenMediaDocument. * css/fullscreen.css: (:root:-webkit-full-screen-document:not(:-webkit-full-screen)): Corrected these names, which were missing the -webkit prefix. (:root:-webkit-full-screen-media-document *:not(-webkit-full-screen)): Added. * dom/Element.h: (WebCore::Element::isMediaElement): Added, returns false. * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::isMediaElement): Added, returns true. * rendering/style/RenderStyleConstants.h: Added FULL_SCREEN_MEDIA_DOCUMENT. Canonical link: https://commits.webkit.org/75495@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@85811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-05-05 00:07:33 +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 {
waitForEventAndEnd(document, 'webkitfullscreenchange');
runWithKeyDown(goFullScreen);
}
}
function goFullScreen() {
document.getElementById('video').webkitRequestFullScreen();
}
</script>
<script src="full-screen-test.js"></script>
<style>
#one {
width: 100px;
height: 100px;
position: relative;
top: 50px;
left: 50px;
z-index: 1;
background-color: red;
}
#one, #two {
2011-05-03 Jer Noble <jer.noble@apple.com> Reviewed by Antti Koivisto. Safari: Video at apple.com cannot play at full screen mode with layout distortion https://bugs.webkit.org/show_bug.cgi?id=60140 * fullscreen/full-screen-stacking-context-expected.txt: Added. * fullscreen/full-screen-stacking-context.html: Added. * platform/mac/fullscreen/full-screen-stacking-context-expected.png: Added. 2011-05-03 Jer Noble <jer.noble@apple.com> Reviewed by Antti Koivisto. Safari: Video at apple.com cannot play at full screen mode with layout distortion https://bugs.webkit.org/show_bug.cgi?id=60140 Because a fullscreen element may be in a stacking context with a lower z-index than a sibling stacking context, those higher contexts would sometimes "pop" through the full screen renderer. To facilitate eliminating all the stacking contexts aside from the full screen renderer, added a new pseudo-class specific to video or audio full screen elements. Then, added a new UA rule which resets the z-index and opacities of all elements under said pseudo-class to auto and 1 respectively. To facilitate quick identity checking of HTMLMediaElements, added isMediaElement() virtual function to Element and HTMLMediaElement. Test: fullscreen/full-screen-stacking-context.html * css/CSSSelector.cpp: (WebCore::CSSSelector::pseudoId): Support PseudoFullScreenMediaDocument. (WebCore::nameToPseudoTypeMap): Support fullScreenMediaDocument. (WebCore::CSSSelector::extractPseudoType): Support PseudoFullScreenMediaDocument. * css/CSSSelector.h: Add PseudoFullScreenMediaDocument. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Support PseudoFullScreenMediaDocument. * css/fullscreen.css: (:root:-webkit-full-screen-document:not(:-webkit-full-screen)): Corrected these names, which were missing the -webkit prefix. (:root:-webkit-full-screen-media-document *:not(-webkit-full-screen)): Added. * dom/Element.h: (WebCore::Element::isMediaElement): Added, returns false. * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::isMediaElement): Added, returns true. * rendering/style/RenderStyleConstants.h: Added FULL_SCREEN_MEDIA_DOCUMENT. Canonical link: https://commits.webkit.org/75495@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@85811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-05-05 00:07:33 +00:00
opacity: 0.5;
-webkit-transform: rotate(180);
-webkit-mask: -webkit-linear-gradient(left, alpha 0%, white 100%);
-webkit-filter: contrast(100%);
clip:rect(0px,100px,100px,0px);
-webkit-box-reflect: below;
-webkit-transform-style: preserve-3d;
-webkit-perspective: 300;
2011-05-03 Jer Noble <jer.noble@apple.com> Reviewed by Antti Koivisto. Safari: Video at apple.com cannot play at full screen mode with layout distortion https://bugs.webkit.org/show_bug.cgi?id=60140 * fullscreen/full-screen-stacking-context-expected.txt: Added. * fullscreen/full-screen-stacking-context.html: Added. * platform/mac/fullscreen/full-screen-stacking-context-expected.png: Added. 2011-05-03 Jer Noble <jer.noble@apple.com> Reviewed by Antti Koivisto. Safari: Video at apple.com cannot play at full screen mode with layout distortion https://bugs.webkit.org/show_bug.cgi?id=60140 Because a fullscreen element may be in a stacking context with a lower z-index than a sibling stacking context, those higher contexts would sometimes "pop" through the full screen renderer. To facilitate eliminating all the stacking contexts aside from the full screen renderer, added a new pseudo-class specific to video or audio full screen elements. Then, added a new UA rule which resets the z-index and opacities of all elements under said pseudo-class to auto and 1 respectively. To facilitate quick identity checking of HTMLMediaElements, added isMediaElement() virtual function to Element and HTMLMediaElement. Test: fullscreen/full-screen-stacking-context.html * css/CSSSelector.cpp: (WebCore::CSSSelector::pseudoId): Support PseudoFullScreenMediaDocument. (WebCore::nameToPseudoTypeMap): Support fullScreenMediaDocument. (WebCore::CSSSelector::extractPseudoType): Support PseudoFullScreenMediaDocument. * css/CSSSelector.h: Add PseudoFullScreenMediaDocument. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Support PseudoFullScreenMediaDocument. * css/fullscreen.css: (:root:-webkit-full-screen-document:not(:-webkit-full-screen)): Corrected these names, which were missing the -webkit prefix. (:root:-webkit-full-screen-media-document *:not(-webkit-full-screen)): Added. * dom/Element.h: (WebCore::Element::isMediaElement): Added, returns false. * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::isMediaElement): Added, returns true. * rendering/style/RenderStyleConstants.h: Added FULL_SCREEN_MEDIA_DOCUMENT. Canonical link: https://commits.webkit.org/75495@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@85811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-05-05 00:07:33 +00:00
}
#zero {
position: relative;
z-index: 0;
}
#video {
width: 200px;
height: 200px;
background-color: black;
}
</style>
</head>
<body onload="init()">
<div>This tests that a full screen element in a lower stacking context blocks a sibling in a higher stacking context.
After entering full screen mode, only a black box should be visible.
Click <button onclick="goFullScreen()">go full screen</button> to run the test.</div>
<div id="one"></div>
<div id="zero">
<video id="video"></video>
</div>
Fonts, fullscreen, gamepad, and html5lib tests should use testRunner instead of layoutTestController https://bugs.webkit.org/show_bug.cgi?id=88959 Reviewed by Darin Adler. * fonts/valid-standard-font.html: * fullscreen/anonymous-block-merge-crash.html: * fullscreen/full-screen-element-stack.html: * fullscreen/full-screen-frameset.html: * fullscreen/full-screen-iframe-zIndex.html: * fullscreen/full-screen-keyboard-disabled.html: * fullscreen/full-screen-keyboard-enabled.html: * fullscreen/full-screen-remove-ancestor-during-transition.html: * fullscreen/full-screen-remove-sibling.html: * fullscreen/full-screen-render-inline.html: * fullscreen/full-screen-request-rejected.html: * fullscreen/full-screen-request-removed.html: * fullscreen/full-screen-restrictions.html: * fullscreen/full-screen-stacking-context.html: * fullscreen/full-screen-test.js: (runWithKeyDown): (endTest): * fullscreen/full-screen-zIndex-after.html: * fullscreen/full-screen-zIndex.html: * fullscreen/non-ancestor-iframe.html: * fullscreen/parent-flow-inline-with-block-child.html: * fullscreen/video-controls-override.html: * html5lib/resources/runner.js: (run): * html5lib/webkit-resumer.html: * platform/gtk/fonts/custom-font-missing-glyphs.html: * platform/gtk/fonts/font-face-with-complex-text.html: * platform/gtk/fonts/font-family-fallback.html: * platform/gtk/fonts/synthetic-oblique-positioning.html: Canonical link: https://commits.webkit.org/106812@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@120190 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-06-13 12:34:26 +00:00
</body>