mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
layout: Add line height from preserved segment breaks in quirks mode (#31419)
In quirks mode, preserved segment breaks should add line height to lines. This matches the behavior of WebKit and Blink, but not Gecko. This also handles the special-case of `<br>` elements, which are implemented with preserved segment breaks via `white-space: pre-line`. This is an implementation detail though because `<br>` has a special behavior if the line isn't empty -- it doesn't add any line height in this case.
This commit is contained in:
parent
a9a7e8a5cf
commit
e5598590ba
12 changed files with 158 additions and 10 deletions
|
@ -77,8 +77,10 @@ bitflags! {
|
|||
/// Flags used to track various information about a DOM node during layout.
|
||||
#[derive(Clone, Copy, Debug, Serialize)]
|
||||
pub(crate) struct FragmentFlags: u8 {
|
||||
/// Whether or not this node is a body element on an HTML document.
|
||||
/// Whether or not the node that created this fragment is a `<body>` element on an HTML document.
|
||||
const IS_BODY_ELEMENT_OF_HTML_ELEMENT_ROOT = 0b00000001;
|
||||
/// Whether or not the node that created this Fragment is a `<br>` element.
|
||||
const IS_BR_ELEMENT = 0b00000010;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue