diff options
author | Matt Brubeck <mbrubeck@limpet.net> | 2016-04-15 15:57:24 -0700 |
---|---|---|
committer | Matt Brubeck <mbrubeck@limpet.net> | 2016-04-16 11:01:40 -0700 |
commit | 1807fd3cc5741e410b7eae4eb4c2f389c594b144 (patch) | |
tree | 675816d6286e1dd3e81bd3139bef2360b0ee48a4 /components/layout/incremental.rs | |
parent | fbef2724bf12c2204f0256cebaa5a4d0e8ef45f2 (diff) | |
download | servo-1807fd3cc5741e410b7eae4eb4c2f389c594b144.tar.gz servo-1807fd3cc5741e410b7eae4eb4c2f389c594b144.zip |
Generate a fragment for an empty elements with borders or padding
Diffstat (limited to 'components/layout/incremental.rs')
-rw-r--r-- | components/layout/incremental.rs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/components/layout/incremental.rs b/components/layout/incremental.rs index cc34dc49bcd..affb4f42c70 100644 --- a/components/layout/incremental.rs +++ b/components/layout/incremental.rs @@ -5,7 +5,7 @@ use flow::{self, AFFECTS_COUNTERS, Flow, HAS_COUNTER_AFFECTING_CHILDREN, IS_ABSOLUTELY_POSITIONED}; use std::fmt; use std::sync::Arc; -use style::computed_values::float; +use style::computed_values::{display, float}; use style::dom::TRestyleDamage; use style::properties::{ComputedValues, ServoComputedValues}; @@ -193,7 +193,17 @@ pub fn compute_damage(old: Option<&Arc<ServoComputedValues>>, new: &ServoCompute get_text.text_decoration, get_text.unicode_bidi, get_inheritedtable.empty_cells, get_inheritedtable.caption_side, get_column.column_width, get_column.column_count - ]) || add_if_not_equal!(old, new, damage, + ]) || (new.get_box().display == display::T::inline && + add_if_not_equal!(old, new, damage, + [REPAINT, STORE_OVERFLOW, BUBBLE_ISIZES, REFLOW_OUT_OF_FLOW, REFLOW, + RECONSTRUCT_FLOW], [ + // For inline boxes only, border/padding styles are used in flow construction (to decide + // whether to create fragments for empty flows). + get_border.border_top_width, get_border.border_right_width, + get_border.border_bottom_width, get_border.border_left_width, + get_padding.padding_top, get_padding.padding_right, + get_padding.padding_bottom, get_padding.padding_left + ])) || add_if_not_equal!(old, new, damage, [ REPAINT, STORE_OVERFLOW, BUBBLE_ISIZES, REFLOW_OUT_OF_FLOW, REFLOW ], [get_border.border_top_width, get_border.border_right_width, get_border.border_bottom_width, get_border.border_left_width, |