servo: Merge #18422 - style: Remove stale todo about handling scrollbars in viewport units (from emilio:stale-todo); r=bholley
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 08 Sep 2017 16:30:26 -0500
changeset 429335 3352077c1e395a718b681461716823158fcf9282
parent 429334 728c1c579a4c6bc7e83f593618e4d16472207cf4
child 429336 fcbd8cdd83082eb65837432c372efbea0a177721
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs18422
milestone57.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
servo: Merge #18422 - style: Remove stale todo about handling scrollbars in viewport units (from emilio:stale-todo); r=bholley This is effectively not going to happen, per https://github.com/w3c/csswg-drafts/issues/1766 Source-Repo: https://github.com/servo/servo Source-Revision: 9c0abfea239077bc490ed8a2d4a7c32ba782942d
servo/components/style/gecko/media_queries.rs
--- a/servo/components/style/gecko/media_queries.rs
+++ b/servo/components/style/gecko/media_queries.rs
@@ -151,21 +151,18 @@ impl Device {
             };
 
             MediaType(CustomIdent(Atom::from(medium_to_use)))
         }
     }
 
     /// Returns the current viewport size in app units.
     pub fn au_viewport_size(&self) -> Size2D<Au> {
-        unsafe {
-            // TODO(emilio): Need to take into account scrollbars.
-            let area = &self.pres_context().mVisibleArea;
-            Size2D::new(Au(area.width), Au(area.height))
-        }
+        let area = &self.pres_context().mVisibleArea;
+        Size2D::new(Au(area.width), Au(area.height))
     }
 
     /// Returns the current viewport size in app units, recording that it's been
     /// used for viewport unit resolution.
     pub fn au_viewport_size_for_viewport_unit_resolution(&self) -> Size2D<Au> {
         self.used_viewport_size.store(true, Ordering::Relaxed);
         self.au_viewport_size()
     }