No bug - Cherry-pick changes from Servo PR #22825. r=npotb
authorAlan Jeffrey <ajeffrey@mozilla.com>
Mon, 04 Feb 2019 19:35:03 -0600
changeset 516304 32b792a2a7a4c1876a2de67e752881ebcb3e08a3
parent 516303 5a801f6c5c8ff4af9b17d754445e242add550f60
child 516317 952b928f1605ad5676ae4ccfd41612b34523bae5
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnpotb
bugs22825
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
No bug - Cherry-pick changes from Servo PR #22825. r=npotb
servo/components/style/properties/longhands/box.mako.rs
servo/components/style/properties/properties.mako.rs
--- a/servo/components/style/properties/longhands/box.mako.rs
+++ b/servo/components/style/properties/longhands/box.mako.rs
@@ -29,16 +29,27 @@
     gecko_constant_prefix="NS_STYLE_TOP_LAYER",
     gecko_ffi_name="mTopLayer",
     products="gecko",
     animation_value_type="none",
     enabled_in="ua",
     spec="Internal (not web-exposed)",
 )}
 
+// An internal-only property for elements in a top layer
+// https://fullscreen.spec.whatwg.org/#top-layer
+${helpers.single_keyword(
+    "-servo-top-layer",
+    "none top",
+    products="servo",
+    animation_value_type="none",
+    enabled_in="ua",
+    spec="Internal (not web-exposed)",
+)}
+
 ${helpers.single_keyword(
     "position",
     "static absolute relative fixed sticky",
     animation_value_type="discrete",
     flags="CREATES_STACKING_CONTEXT ABSPOS_CB",
     spec="https://drafts.csswg.org/css-position/#position-property",
     servo_restyle_damage="rebuild_and_reflow",
 )}
--- a/servo/components/style/properties/properties.mako.rs
+++ b/servo/components/style/properties/properties.mako.rs
@@ -3621,21 +3621,22 @@ impl<'a> StyleBuilder<'a> {
     /// Returns whether this computed style represents an out of flow-positioned
     /// object.
     pub fn out_of_flow_positioned(&self) -> bool {
         use crate::properties::longhands::position::computed_value::T as Position;
         matches!(self.get_box().clone_position(),
                  Position::Absolute | Position::Fixed)
     }
 
-    /// Whether this style has a top-layer style. That's implemented in Gecko
-    /// via the -moz-top-layer property, but servo doesn't have any concept of a
-    /// top layer (yet, it's needed for fullscreen).
+    /// Whether this style has a top-layer style.
     #[cfg(feature = "servo")]
-    pub fn in_top_layer(&self) -> bool { false }
+    pub fn in_top_layer(&self) -> bool {
+        matches!(self.get_box().clone__servo_top_layer(),
+                 longhands::_servo_top_layer::computed_value::T::Top)
+    }
 
     /// Whether this style has a top-layer style.
     #[cfg(feature = "gecko")]
     pub fn in_top_layer(&self) -> bool {
         matches!(self.get_box().clone__moz_top_layer(),
                  longhands::_moz_top_layer::computed_value::T::Top)
     }