diff --git a/src/components/layout/fragment.rs b/src/components/layout/fragment.rs index 19015b94f89..baee693e21d 100644 --- a/src/components/layout/fragment.rs +++ b/src/components/layout/fragment.rs @@ -1421,8 +1421,10 @@ impl Fragment { pub fn can_merge_with_fragment(&self, other: &Fragment) -> bool { match (&self.specific, &other.specific) { (&UnscannedTextFragment(_), &UnscannedTextFragment(_)) => { + /// FIXME: Should probably use a whitelist of styles that can safely differ (#3165) 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, } diff --git a/src/components/style/user-agent.css b/src/components/style/user-agent.css index d73560abe0e..b52748cb0c1 100644 --- a/src/components/style/user-agent.css +++ b/src/components/style/user-agent.css @@ -85,7 +85,7 @@ ol[type="i"] { list-style-type: lower-roman; } ol[type="I"] { list-style-type: upper-roman; } u, ins { text-decoration: underline } -br:before { content: "\A"; white-space: pre-line } +br:before { content: "\A"; white-space: pre } center { text-align: center } a:link, diff --git a/src/test/ref/basic.list b/src/test/ref/basic.list index 5ba2816f037..05f022d9972 100644 --- a/src/test/ref/basic.list +++ b/src/test/ref/basic.list @@ -1,4 +1,5 @@ == basic_width_px.html basic_width_em.html +== br.html br-ref.html == hello_a.html hello_b.html == margin_a.html margin_b.html == root_pseudo_a.html root_pseudo_b.html diff --git a/src/test/ref/br-ref.html b/src/test/ref/br-ref.html new file mode 100644 index 00000000000..0dc5ad017ec --- /dev/null +++ b/src/test/ref/br-ref.html @@ -0,0 +1,11 @@ + + +
+ +