Bug 743198 part 7 - Add :fullscreen pseudo class. draft
authorXidorn Quan <quanxunzhen@gmail.com>
Mon, 04 Jan 2016 20:27:32 +1100
changeset 331141 17aa1c960a8acb810c26cd6879b6acb591269acb
parent 331140 a23139b04f374c124f7c2c3658f26bf38ce8c0c5
child 331142 a3c9be6db07f2bc561b90c43243ae039ccee8ab2
push id10906
push userxquan@mozilla.com
push dateTue, 16 Feb 2016 01:37:28 +0000
bugs743198
milestone47.0a1
Bug 743198 part 7 - Add :fullscreen pseudo class. MozReview-Commit-ID: 1VDmjX4m2Pc
layout/style/html.css
layout/style/nsCSSPseudoClassList.h
layout/style/ua.css
--- a/layout/style/html.css
+++ b/layout/style/html.css
@@ -719,17 +719,17 @@ noembed, param, template {
    display: none;
 }
 
 area {
   /* Don't give it frames other than its imageframe */
   display: none ! important;
 }
 
-iframe:-moz-full-screen {
+iframe:fullscreen {
   /* iframes in full-screen mode don't show a border. */
   border: none !important;
   padding: 0 !important;
 }
 
 /* media elements */
 video > xul|videocontrols, audio > xul|videocontrols {
   display: -moz-box;
--- a/layout/style/nsCSSPseudoClassList.h
+++ b/layout/style/nsCSSPseudoClassList.h
@@ -155,16 +155,17 @@ CSS_STATE_PSEUDO_CLASS(target, ":target"
 CSS_STATE_PSEUDO_CLASS(indeterminate, ":indeterminate", 0, "",
                        NS_EVENT_STATE_INDETERMINATE)
 
 CSS_STATE_PSEUDO_CLASS(mozDevtoolsHighlighted, ":-moz-devtools-highlighted", 0, "",
                        NS_EVENT_STATE_DEVTOOLS_HIGHLIGHTED)
 
 // Matches the element which is being displayed full-screen, and
 // any containing frames.
+CSS_STATE_PSEUDO_CLASS(fullscreen, ":fullscreen", 0, "", NS_EVENT_STATE_FULL_SCREEN)
 CSS_STATE_PSEUDO_CLASS(mozFullScreen, ":-moz-full-screen", 0, "", NS_EVENT_STATE_FULL_SCREEN)
 
 // Matches any element which is an ancestor of the DOM full-screen element,
 // or an ancestor of a containing frame of the full-screen element.
 CSS_STATE_PSEUDO_CLASS(mozFullScreenAncestor, ":-moz-full-screen-ancestor", 0, "", NS_EVENT_STATE_FULL_SCREEN_ANCESTOR)
 
 // Matches if the element is focused and should show a focus ring
 CSS_STATE_PSEUDO_CLASS(mozFocusRing, ":-moz-focusring", 0, "", NS_EVENT_STATE_FOCUSRING)
--- a/layout/style/ua.css
+++ b/layout/style/ua.css
@@ -271,17 +271,17 @@
 @media print {
 
   * {
     cursor: default !important;
   }
 
 }
 
-*|*:-moz-full-screen:not(:root) {
+*|*:fullscreen:not(:root) {
   position: fixed !important;
   top: 0 !important;
   left: 0 !important;
   right: 0 !important;
   bottom: 0 !important;
   width: 100% !important;
   height: 100% !important;
   margin: 0 !important;
@@ -291,17 +291,17 @@
   max-height: none !important;
   box-sizing: border-box !important;
   object-fit: contain !important;
   transform: none !important;
 }
 
 /* Selectors here should match the check in
  * nsViewportFrame.cpp:ShouldInTopLayerForFullscreen() */
-*|*:-moz-full-screen:not(:root):not(:-moz-browser-frame) {
+*|*:fullscreen:not(:root):not(:-moz-browser-frame) {
   -moz-top-layer: top !important;
 }
 
 *|*::backdrop {
   -moz-top-layer: top !important;
   display: block;
   position: fixed;
   top: 0; left: 0;