Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(573)

Unified Diff: Source/core/css/fullscreen.css

Issue 974783002: Match the Fullscreen spec's CSS as far as currently practical (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address feedback Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/css/fullscreen.css
diff --git a/Source/core/css/fullscreen.css b/Source/core/css/fullscreen.css
index bb9c79e0eae427ab0fa76dd0fc2fa00796f0c063..377086842db2b3e71987aa75bf6beef5c83ed27f 100644
--- a/Source/core/css/fullscreen.css
+++ b/Source/core/css/fullscreen.css
@@ -1,10 +1,53 @@
+/*
+ * User-agent level style sheet defaults for the Fullscreen API
+ * https://fullscreen.spec.whatwg.org/#user-agent-level-style-sheet-defaults
+ *
+ * FIXME: Use the :fullscreen pseudo-class instead of :-webkit-full-screen.
+ * (see crbug.com/402378)
+ */
+
+:not(:root):-webkit-full-screen {
+ position: fixed !important;
+ top: 0 !important;
+ right: 0 !important;
+ bottom: 0 !important;
+ left: 0 !important;
+ margin: 0 !important;
+ box-sizing: border-box !important;
+ min-width: 0 !important;
+ max-width: none !important;
+ min-height: 0 !important;
+ max-height: none !important;
+ width: 100% !important;
+ height: 100% !important;
+ object-fit: contain !important;
+}
+
+iframe:-webkit-full-screen {
+ border: none;
philipj_slow 2015/03/04 07:20:50 This is a change from before, it used to be !impor
Julien - ping for review 2015/03/04 17:50:23 ACK!
+}
+
+/* Anything below are extensions over what the Fullscreen API mandates. */
+
+/*
+ * The flex and transform rules will likely be added to the spec:
+ * https://www.w3.org/Bugs/Public/show_bug.cgi?id=27931
+ */
+:not(:root):-webkit-full-screen {
+ flex: none !important;
+ transform: none !important;
+}
+
+
+/* FIXME: Remove these rules when moving Fullscreen to top layer.
+ (see crbug.com/240576) */
:-webkit-full-screen {
background-color: white;
z-index: 2147483647 !important;
}
-:root:-webkit-full-screen-ancestor {
- overflow: hidden !important;
+video:-webkit-full-screen, audio:-webkit-full-screen {
+ background-color: transparent !important;
}
:-webkit-full-screen-ancestor:not(iframe) {
@@ -21,40 +64,9 @@
-webkit-transform-style: flat !important;
}
-video:-webkit-full-screen, audio:-webkit-full-screen {
- background-color: transparent !important;
- position: relative !important;
- left: 0 !important;
- top: 0 ! important;
- margin: 0 !important;
- min-width: 0 !important;
- max-width: none !important;
- min-height: 0 !important;
- max-height: none !important;
- width: 100% !important;
- height: 100% !important;
- flex: 1 !important;
- display: block !important;
- transform: none !important;
-}
-
-img:-webkit-full-screen {
- width: auto;
- height: 100%;
- max-width: 100%;
-}
-
-iframe:-webkit-full-screen {
- margin: 0 !important;
- padding: 0 !important;
- border: 0 !important;
- position: fixed !important;
- min-width: 0 !important;
- max-width: none !important;
- min-height: 0 !important;
- max-height: none !important;
- width: 100% !important;
- height: 100% !important;
- left: 0 !important;
- top: 0 !important;
+/* This prevents video from overflowing the viewport in
+ virtual/android/fullscreen/video-scrolled-iframe.html
+ FIXME: We should remove this (see crbug.com/441890). */
+:-webkit-full-screen-ancestor {
+ overflow: hidden !important;
}

Powered by Google App Engine
This is Rietveld 408576698