Bug 1412743 - style: Avoid double-applying text-zoom for keywords. r=Manishearth, a=ritu FIREFOX_57b_RELBRANCH
authorEmilio Cobos Álvarez <emilio@crisal.io>
Wed, 01 Nov 2017 22:57:00 -0400
branchFIREFOX_57b_RELBRANCH
changeset 432925 bd8f4df9d0035ec8ce34b2da9e2d4677017ccd99
parent 432924 ea733883167184dd414f0227f41d8eaa33193ce3
child 432926 b5ec72ee69fbe442c47b996d4b65282123c66795
push id8113
push userryanvm@gmail.com
push dateThu, 02 Nov 2017 13:29:01 +0000
treeherdermozilla-beta@b5ec72ee69fb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersManishearth, ritu
bugs1412743
milestone57.0
Bug 1412743 - style: Avoid double-applying text-zoom for keywords. r=Manishearth, a=ritu Source-Repo: https://github.com/servo/servo Source-Revision: c882266c8915b9f424cc4efbc860a9e417bf1326
servo/components/style/properties/longhand/font.mako.rs
--- a/servo/components/style/properties/longhand/font.mako.rs
+++ b/servo/components/style/properties/longhand/font.mako.rs
@@ -1037,18 +1037,17 @@ macro_rules! impl_gecko_keyword_conversi
 
     /// FIXME(emilio): This is very complex. Also, it should move to
     /// StyleBuilder.
     pub fn cascade_inherit_font_size(context: &mut Context) {
         // If inheriting, we must recompute font-size in case of language
         // changes using the font_size_keyword. We also need to do this to
         // handle mathml scriptlevel changes
         let kw_inherited_size = context.builder.font_size_keyword.map(|(kw, ratio, offset)| {
-            let len = SpecifiedValue::Keyword(kw, ratio, offset).to_computed_value(context);
-            context.maybe_zoom_text(len.0).into()
+            SpecifiedValue::Keyword(kw, ratio, offset).to_computed_value(context)
         });
         let parent_kw;
         let device = context.builder.device;
         let mut font = context.builder.take_font();
         let used_kw = {
             let parent_font = context.builder.get_parent_font();
             parent_kw = *context.builder.inherited_font_computation_data();
 
@@ -1063,20 +1062,19 @@ macro_rules! impl_gecko_keyword_conversi
     ///
     /// FIXME(emilio): This is the only function that is outside of the
     /// `StyleBuilder`, and should really move inside!
     ///
     /// Can we move the font stuff there?
     pub fn cascade_initial_font_size(context: &mut Context) {
         // font-size's default ("medium") does not always
         // compute to the same value and depends on the font
-        let computed = context.maybe_zoom_text(
-                            longhands::font_size::get_initial_specified_value()
-                                .to_computed_value(context).0
-                        ).into();
+        let computed =
+            longhands::font_size::get_initial_specified_value()
+                .to_computed_value(context);
         context.builder.mutate_font().set_font_size(computed);
         % if product == "gecko":
             let device = context.builder.device;
             context.builder.mutate_font().fixup_font_min_size(device);
         % endif
         context.builder.font_size_keyword = Some((Default::default(), 1., Au(0).into()));
     }
 </%helpers:longhand>