mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Fix <br> support
This commit is contained in:
parent
f5ebd19c01
commit
024ce539fd
5 changed files with 26 additions and 2 deletions
|
@ -1421,8 +1421,10 @@ impl Fragment {
|
||||||
pub fn can_merge_with_fragment(&self, other: &Fragment) -> bool {
|
pub fn can_merge_with_fragment(&self, other: &Fragment) -> bool {
|
||||||
match (&self.specific, &other.specific) {
|
match (&self.specific, &other.specific) {
|
||||||
(&UnscannedTextFragment(_), &UnscannedTextFragment(_)) => {
|
(&UnscannedTextFragment(_), &UnscannedTextFragment(_)) => {
|
||||||
|
/// FIXME: Should probably use a whitelist of styles that can safely differ (#3165)
|
||||||
self.font_style() == other.font_style() &&
|
self.font_style() == other.font_style() &&
|
||||||
self.text_decoration() == other.text_decoration()
|
self.text_decoration() == other.text_decoration() &&
|
||||||
|
self.white_space() == other.white_space()
|
||||||
}
|
}
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@ ol[type="i"] { list-style-type: lower-roman; }
|
||||||
ol[type="I"] { list-style-type: upper-roman; }
|
ol[type="I"] { list-style-type: upper-roman; }
|
||||||
|
|
||||||
u, ins { text-decoration: underline }
|
u, ins { text-decoration: underline }
|
||||||
br:before { content: "\A"; white-space: pre-line }
|
br:before { content: "\A"; white-space: pre }
|
||||||
|
|
||||||
center { text-align: center }
|
center { text-align: center }
|
||||||
a:link,
|
a:link,
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
== basic_width_px.html basic_width_em.html
|
== basic_width_px.html basic_width_em.html
|
||||||
|
== br.html br-ref.html
|
||||||
== hello_a.html hello_b.html
|
== hello_a.html hello_b.html
|
||||||
== margin_a.html margin_b.html
|
== margin_a.html margin_b.html
|
||||||
== root_pseudo_a.html root_pseudo_b.html
|
== root_pseudo_a.html root_pseudo_b.html
|
||||||
|
|
11
src/test/ref/br-ref.html
Normal file
11
src/test/ref/br-ref.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<!doctype HTML>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>br reference</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div>A</div>
|
||||||
|
<div>B</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
10
src/test/ref/br.html
Normal file
10
src/test/ref/br.html
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<!doctype HTML>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>br test</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
A<br>B
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Add table
Add a link
Reference in a new issue