Commit 4684c535 authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Commit Bot

Use :fullscreen instead of :-webkit-full-screen.

The selectors matching for those pseudo classes are the same. No need to
use the legacy one internally.

Change-Id: I7a4f6d25e6e016a2af95e863948fda63cfa6d6fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1800182Reviewed-by: default avatarPhilip Jägenstedt <foolip@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695990}
parent ae8b80ef
:not(:root):-webkit-full-screen { :not(:root):fullscreen {
position: fixed !important; position: fixed !important;
top: 0 !important; top: 0 !important;
right: 0 !important; right: 0 !important;
...@@ -18,14 +18,14 @@ ...@@ -18,14 +18,14 @@
object-fit: contain; object-fit: contain;
} }
iframe:-webkit-full-screen { iframe:fullscreen {
border: none !important; border: none !important;
padding: 0 !important; padding: 0 !important;
} }
/* TODO(foolip): In the spec, there's a ::backdrop block with the properties /* TODO(foolip): In the spec, there's a ::backdrop block with the properties
shared with dialog::backdrop (see html.css). */ shared with dialog::backdrop (see html.css). */
:not(:root):-webkit-full-screen::backdrop { :not(:root):fullscreen::backdrop {
position: fixed; position: fixed;
top: 0; top: 0;
right: 0; right: 0;
...@@ -45,7 +45,7 @@ iframe:-webkit-full-screen { ...@@ -45,7 +45,7 @@ iframe:-webkit-full-screen {
overflow: hidden !important; overflow: hidden !important;
} }
:-webkit-full-screen:-internal-video-persistent-ancestor :not(:-internal-video-persistent-ancestor) { :fullscreen:-internal-video-persistent-ancestor :not(:-internal-video-persistent-ancestor) {
display: none !important; display: none !important;
} }
......
video:-webkit-full-screen { video:fullscreen {
/* Fullscreen video on Android does not synchronize correctly when the <video> /* Fullscreen video on Android does not synchronize correctly when the <video>
* element is not rendered in the root render pass. Disable properties that * element is not rendered in the root render pass. Disable properties that
* cause this. (http://crbug.com/618753) */ * cause this. (http://crbug.com/618753) */
......
...@@ -391,7 +391,7 @@ void WebRemoteFrameImpl::WillEnterFullscreen() { ...@@ -391,7 +391,7 @@ void WebRemoteFrameImpl::WillEnterFullscreen() {
// PrefixedForCrossProcessDescendant is necessary because: // PrefixedForCrossProcessDescendant is necessary because:
// - The fullscreen element ready check and other checks should be bypassed. // - The fullscreen element ready check and other checks should be bypassed.
// - |ownerElement| will need :-webkit-full-screen-ancestor style in addition // - |ownerElement| will need :-webkit-full-screen-ancestor style in addition
// to :-webkit-full-screen. // to :fullscreen.
// //
// TODO(alexmos): currently, this assumes prefixed requests, but in the // TODO(alexmos): currently, this assumes prefixed requests, but in the
// future, this should plumb in information about which request type // future, this should plumb in information about which request type
......
...@@ -194,7 +194,7 @@ TEST_F(HTMLVideoElementPersistentTest, internalPseudoClassOnlyUAStyleSheet) { ...@@ -194,7 +194,7 @@ TEST_F(HTMLVideoElementPersistentTest, internalPseudoClassOnlyUAStyleSheet) {
DummyExceptionStateForTesting exception_state; DummyExceptionStateForTesting exception_state;
EXPECT_FALSE(DivElement()->matches(":-webkit-full-screen")); EXPECT_FALSE(DivElement()->matches(":fullscreen"));
EXPECT_FALSE(DivElement()->matches(":-internal-video-persistent-ancestor", EXPECT_FALSE(DivElement()->matches(":-internal-video-persistent-ancestor",
exception_state)); exception_state));
EXPECT_TRUE(exception_state.HadException()); EXPECT_TRUE(exception_state.HadException());
...@@ -220,7 +220,7 @@ TEST_F(HTMLVideoElementPersistentTest, internalPseudoClassOnlyUAStyleSheet) { ...@@ -220,7 +220,7 @@ TEST_F(HTMLVideoElementPersistentTest, internalPseudoClassOnlyUAStyleSheet) {
EXPECT_TRUE(VideoElement()->ContainsPersistentVideo()); EXPECT_TRUE(VideoElement()->ContainsPersistentVideo());
// The :internal-* rules apply only from the UA stylesheet. // The :internal-* rules apply only from the UA stylesheet.
EXPECT_TRUE(DivElement()->matches(":-webkit-full-screen")); EXPECT_TRUE(DivElement()->matches(":fullscreen"));
EXPECT_FALSE(DivElement()->matches(":-internal-video-persistent-ancestor", EXPECT_FALSE(DivElement()->matches(":-internal-video-persistent-ancestor",
exception_state)); exception_state));
EXPECT_TRUE(exception_state.HadException()); EXPECT_TRUE(exception_state.HadException());
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
margin: 0px; margin: 0px;
} }
body:-webkit-full-screen-ancestor > :not(:-webkit-full-screen-ancestor):not(:-webkit-full-screen) { body:-webkit-full-screen-ancestor > :not(:-webkit-full-screen-ancestor):not(:fullscreen) {
display: none!important display: none!important
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment