mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Remove interior borders during flow construction
Instead of looking at the boundaries of the text run, set the border width to zero and the border style to none on border sides that are not the outermost for a node container that is display: inline.
This commit is contained in:
parent
8ad3c5aeb6
commit
ec2fa2558c
6 changed files with 74 additions and 9 deletions
|
@ -195,14 +195,17 @@ impl InlineFragmentsAccumulator {
|
|||
mut fragments,
|
||||
enclosing_style
|
||||
} = self;
|
||||
if let Some(enclosing_style) = enclosing_style {
|
||||
let frag_len = fragments.len();
|
||||
for (idx, frag) in fragments.iter_mut().enumerate() {
|
||||
|
||||
match enclosing_style {
|
||||
Some(enclosing_style) => {
|
||||
for frag in fragments.iter_mut() {
|
||||
frag.add_inline_context_style(enclosing_style.clone());
|
||||
}
|
||||
// frag is first inline fragment in the inline node
|
||||
let is_first = idx == 0;
|
||||
// frag is the last inline fragment in the inline node
|
||||
let is_last = idx == frag_len - 1;
|
||||
|
||||
frag.add_inline_context_style(enclosing_style.clone(), is_first, is_last);
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
fragments
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue