Skip to content

Commit

Permalink
reset border_padding between, account for border_padding in border_bo…
Browse files Browse the repository at this point in the history
…x and reset *_FRAGMENT_OF_ELEMENT flag for splitted fragments
  • Loading branch information
splav committed Aug 8, 2016
1 parent ba0a670 commit 0b68fb3
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion components/layout/inline.rs
Expand Up @@ -636,7 +636,23 @@ impl LineBreaker {
// Push the first fragment onto the line we're working on and start off the next line with
// the second fragment. If there's no second fragment, the next line will start off empty.
match (inline_start_fragment, inline_end_fragment) {
(Some(inline_start_fragment), Some(inline_end_fragment)) => {
(Some(mut inline_start_fragment), Some(mut inline_end_fragment)) => {
inline_start_fragment.border_padding.inline_end = Au(0);
if let Some(ref mut inline_context) = inline_start_fragment.inline_context {
for node in &mut inline_context.nodes {
node.flags.remove(LAST_FRAGMENT_OF_ELEMENT);
}
}
inline_start_fragment.border_box.size.inline += inline_start_fragment.border_padding.inline_start;

inline_end_fragment.border_padding.inline_start = Au(0);
if let Some(ref mut inline_context) = inline_end_fragment.inline_context {
for node in &mut inline_context.nodes {
node.flags.remove(FIRST_FRAGMENT_OF_ELEMENT);
}
}
inline_end_fragment.border_box.size.inline += inline_end_fragment.border_padding.inline_end;

self.push_fragment_to_line(layout_context,
inline_start_fragment,
LineFlushMode::Flush);
Expand Down

0 comments on commit 0b68fb3

Please sign in to comment.