mirror of
https://github.com/servo/servo.git
synced 2025-06-25 09:34:32 +01:00
Merge pull request #3414 from mbrubeck/pre-line-break
Fix line splitting in `white-space: pre` flows. r=gw
This commit is contained in:
commit
b11a110e85
4 changed files with 31 additions and 1 deletions
|
@ -499,7 +499,7 @@ impl LineBreaker {
|
|||
debug!("LineBreaker: Deferring the fragment to the inline_end of the new-line \
|
||||
character to the line.");
|
||||
let mut inline_end = split_fragment(inline_end);
|
||||
inline_end.new_line_pos = in_fragment.new_line_pos.clone();
|
||||
inline_end.new_line_pos.remove(0);
|
||||
self.work_list.push_front(inline_end);
|
||||
}
|
||||
false
|
||||
|
|
|
@ -95,6 +95,7 @@ experimental == vertical-lr-blocks.html vertical-lr-blocks_ref.html
|
|||
== table_auto_width.html table_auto_width_ref.html
|
||||
== inline_whitespace_b.html inline_whitespace_ref.html
|
||||
== inline_whitespace_a.html inline_whitespace_ref.html
|
||||
== whitespace_pre.html whitespace_pre_ref.html
|
||||
== line_height_a.html line_height_ref.html
|
||||
== block_replaced_content_a.html block_replaced_content_ref.html
|
||||
== block_replaced_content_b.html block_replaced_content_ref.html
|
||||
|
|
16
tests/ref/whitespace_pre.html
Normal file
16
tests/ref/whitespace_pre.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>whitespace pre test</title>
|
||||
<style>
|
||||
div { white-space: pre; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div>a
|
||||
b
|
||||
c</div>
|
||||
|
||||
</body>
|
||||
</html>
|
13
tests/ref/whitespace_pre_ref.html
Normal file
13
tests/ref/whitespace_pre_ref.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>whitespace pre test</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div>a</div>
|
||||
<div> b</div>
|
||||
<div>c</div>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue