mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
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.
This commit is contained in:
parent
d77c7b21ae
commit
afb36ec8de
1 changed files with 5 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue