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:
Matt Brubeck 2016-06-15 04:37:15 -07:00
parent 8f7cfb1b06
commit 25a19343b3
3 changed files with 5 additions and 8 deletions

View file

@ -50,7 +50,7 @@ use layout_thread::DISPLAY_PORT_SIZE_FACTOR;
use model::{CollapsibleMargins, MaybeAuto, specified, specified_or_none};
use model::{self, IntrinsicISizes, MarginCollapseInfo};
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::fmt;
use std::sync::Arc;
@ -2134,7 +2134,6 @@ impl Flow for BlockFlow {
fn build_display_list(&mut self, state: &mut DisplayListBuildState) {
self.build_display_list_for_block(state, BorderPaintingMode::Separate);
self.fragment.restyle_damage.remove(REPAINT);
}
fn repair_style(&mut self, new_style: &Arc<ServoComputedValues>) {

View file

@ -38,6 +38,7 @@ use model::{self, MaybeAuto, ToGfxMatrix};
use net_traits::image::base::PixelFormat;
use net_traits::image_cache_thread::UsePlaceholder;
use range::Range;
use script_layout_interface::restyle_damage::REPAINT;
use std::default::Default;
use std::sync::Arc;
use std::{cmp, f32};
@ -1011,6 +1012,7 @@ impl FragmentDisplayListBuilding for Fragment {
display_list_section: DisplayListSection,
clip: &ClippingRegion,
stacking_relative_display_port: &Rect<Au>) {
self.restyle_damage.remove(REPAINT);
if self.style().get_inheritedbox().visibility != visibility::T::visible {
return
}

View file

@ -24,8 +24,8 @@ use gfx_traits::StackingContextId;
use layout_debug;
use model::IntrinsicISizesContribution;
use range::{Range, RangeIndex};
use script_layout_interface::restyle_damage::{BUBBLE_ISIZES, REFLOW, REFLOW_OUT_OF_FLOW};
use script_layout_interface::restyle_damage::{REPAINT, RESOLVE_GENERATED_CONTENT};
use script_layout_interface::restyle_damage::{BUBBLE_ISIZES, REFLOW};
use script_layout_interface::restyle_damage::{REFLOW_OUT_OF_FLOW, RESOLVE_GENERATED_CONTENT};
use script_layout_interface::wrapper_traits::PseudoElementType;
use std::cmp::max;
use std::collections::VecDeque;
@ -1642,10 +1642,6 @@ impl Flow for InlineFlow {
fn build_display_list(&mut self, state: &mut DisplayListBuildState) {
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>) {}