servo: Merge #19621 - using local variable instead of a function call (from sbwtw:using_variable); r=jdm
author石博文 <sbw@sbw.so>
Thu, 21 Dec 2017 08:53:21 -0600
changeset 448936 faf2a545daf2bbcfdedc1a259fe4c0c40edf1546
parent 448935 649873f16998ab8ab7ce96d560d04d44be90dd57
child 448937 8da482abb3f5e64c44fd1881948b07f9485fe6a3
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm
milestone59.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 #19621 - using local variable instead of a function call (from sbwtw:using_variable); r=jdm the data of `frame_size` is already storage into variable `new_frame_size` Source-Repo: https://github.com/servo/servo Source-Revision: a15cecb3f792d4807ec8b271369fa85bb35924b5
servo/components/compositing/compositor.rs
--- a/servo/components/compositing/compositor.rs
+++ b/servo/components/compositing/compositor.rs
@@ -669,17 +669,17 @@ impl<Window: WindowMethods> IOCompositor
         let new_window_rect = self.window.window_rect();
         let new_frame_size = self.window.framebuffer_size();
 
         if self.window_rect == new_window_rect &&
            self.frame_size == new_frame_size {
             return;
         }
 
-        self.frame_size = self.window.framebuffer_size();
+        self.frame_size = new_frame_size;
         self.window_rect = new_window_rect;
 
         self.send_window_size(WindowSizeType::Resize);
     }
 
     pub fn on_mouse_window_event_class(&mut self, mouse_window_event: MouseWindowEvent) {
         if opts::get().convert_mouse_to_touch {
             match mouse_window_event {