diff options
author | Matt Brubeck <mbrubeck@limpet.net> | 2016-03-25 14:54:00 -0700 |
---|---|---|
committer | Matt Brubeck <mbrubeck@limpet.net> | 2016-03-25 14:54:00 -0700 |
commit | afb36ec8de4f676bd54d9ed615f814e7e3730887 (patch) | |
tree | ad8d59f63e23d193c8e8f3fd287a7ab4f9d4b7ef /components/layout/layout_thread.rs | |
parent | d77c7b21aebb8996768bbf6215f0ec6b4440a2c8 (diff) | |
download | servo-afb36ec8de4f676bd54d9ed615f814e7e3730887.tar.gz servo-afb36ec8de4f676bd54d9ed615f814e7e3730887.zip |
Fix forced repaint on image load
After #10021, `LayoutThread::repaint` no longer forced a repaint because of
the `restyle_damage` check. This patch adds the correct restyle damage and
fixes #10163.
Diffstat (limited to 'components/layout/layout_thread.rs')
-rw-r--r-- | components/layout/layout_thread.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/components/layout/layout_thread.rs b/components/layout/layout_thread.rs index 646defb49e4..df555b1d485 100644 --- a/components/layout/layout_thread.rs +++ b/components/layout/layout_thread.rs @@ -593,6 +593,11 @@ impl LayoutThread { fn repaint<'a, 'b>(&mut self, possibly_locked_rw_data: &mut RwData<'a, 'b>) -> bool { let mut rw_data = possibly_locked_rw_data.lock(); + if let Some(mut root_flow) = self.root_flow.clone() { + let flow = flow::mut_base(flow_ref::deref_mut(&mut root_flow)); + flow.restyle_damage.insert(REPAINT); + } + let reflow_info = Reflow { goal: ReflowGoal::ForDisplay, page_clip_rect: MAX_RECT, |