mirror of
https://github.com/servo/servo.git
synced 2025-07-16 11:53:39 +01:00
Remove REPAINT damage in Fragment::build_display_list
Previously, the code that called this function was responsible for this. Some code paths neglected to do it. This moves the damage removal to one central location.
This commit is contained in:
parent
8f7cfb1b06
commit
25a19343b3
3 changed files with 5 additions and 8 deletions
|
@ -50,7 +50,7 @@ use layout_thread::DISPLAY_PORT_SIZE_FACTOR;
|
||||||
use model::{CollapsibleMargins, MaybeAuto, specified, specified_or_none};
|
use model::{CollapsibleMargins, MaybeAuto, specified, specified_or_none};
|
||||||
use model::{self, IntrinsicISizes, MarginCollapseInfo};
|
use model::{self, IntrinsicISizes, MarginCollapseInfo};
|
||||||
use rustc_serialize::{Encodable, Encoder};
|
use rustc_serialize::{Encodable, Encoder};
|
||||||
use script_layout_interface::restyle_damage::{BUBBLE_ISIZES, REFLOW, REFLOW_OUT_OF_FLOW, REPAINT};
|
use script_layout_interface::restyle_damage::{BUBBLE_ISIZES, REFLOW, REFLOW_OUT_OF_FLOW};
|
||||||
use std::cmp::{max, min};
|
use std::cmp::{max, min};
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
@ -2134,7 +2134,6 @@ impl Flow for BlockFlow {
|
||||||
|
|
||||||
fn build_display_list(&mut self, state: &mut DisplayListBuildState) {
|
fn build_display_list(&mut self, state: &mut DisplayListBuildState) {
|
||||||
self.build_display_list_for_block(state, BorderPaintingMode::Separate);
|
self.build_display_list_for_block(state, BorderPaintingMode::Separate);
|
||||||
self.fragment.restyle_damage.remove(REPAINT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn repair_style(&mut self, new_style: &Arc<ServoComputedValues>) {
|
fn repair_style(&mut self, new_style: &Arc<ServoComputedValues>) {
|
||||||
|
|
|
@ -38,6 +38,7 @@ use model::{self, MaybeAuto, ToGfxMatrix};
|
||||||
use net_traits::image::base::PixelFormat;
|
use net_traits::image::base::PixelFormat;
|
||||||
use net_traits::image_cache_thread::UsePlaceholder;
|
use net_traits::image_cache_thread::UsePlaceholder;
|
||||||
use range::Range;
|
use range::Range;
|
||||||
|
use script_layout_interface::restyle_damage::REPAINT;
|
||||||
use std::default::Default;
|
use std::default::Default;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::{cmp, f32};
|
use std::{cmp, f32};
|
||||||
|
@ -1011,6 +1012,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
||||||
display_list_section: DisplayListSection,
|
display_list_section: DisplayListSection,
|
||||||
clip: &ClippingRegion,
|
clip: &ClippingRegion,
|
||||||
stacking_relative_display_port: &Rect<Au>) {
|
stacking_relative_display_port: &Rect<Au>) {
|
||||||
|
self.restyle_damage.remove(REPAINT);
|
||||||
if self.style().get_inheritedbox().visibility != visibility::T::visible {
|
if self.style().get_inheritedbox().visibility != visibility::T::visible {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,8 +24,8 @@ use gfx_traits::StackingContextId;
|
||||||
use layout_debug;
|
use layout_debug;
|
||||||
use model::IntrinsicISizesContribution;
|
use model::IntrinsicISizesContribution;
|
||||||
use range::{Range, RangeIndex};
|
use range::{Range, RangeIndex};
|
||||||
use script_layout_interface::restyle_damage::{BUBBLE_ISIZES, REFLOW, REFLOW_OUT_OF_FLOW};
|
use script_layout_interface::restyle_damage::{BUBBLE_ISIZES, REFLOW};
|
||||||
use script_layout_interface::restyle_damage::{REPAINT, RESOLVE_GENERATED_CONTENT};
|
use script_layout_interface::restyle_damage::{REFLOW_OUT_OF_FLOW, RESOLVE_GENERATED_CONTENT};
|
||||||
use script_layout_interface::wrapper_traits::PseudoElementType;
|
use script_layout_interface::wrapper_traits::PseudoElementType;
|
||||||
use std::cmp::max;
|
use std::cmp::max;
|
||||||
use std::collections::VecDeque;
|
use std::collections::VecDeque;
|
||||||
|
@ -1642,10 +1642,6 @@ impl Flow for InlineFlow {
|
||||||
|
|
||||||
fn build_display_list(&mut self, state: &mut DisplayListBuildState) {
|
fn build_display_list(&mut self, state: &mut DisplayListBuildState) {
|
||||||
self.build_display_list_for_inline(state);
|
self.build_display_list_for_inline(state);
|
||||||
|
|
||||||
for fragment in &mut self.fragments.fragments {
|
|
||||||
fragment.restyle_damage.remove(REPAINT);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn repair_style(&mut self, _: &Arc<ServoComputedValues>) {}
|
fn repair_style(&mut self, _: &Arc<ServoComputedValues>) {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue