mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57:35 +00:00
LibWeb: Add Layout::Node::display()
This will return something sensible for style-less nodes as well.
This commit is contained in:
parent
277465e699
commit
49eb324535
2 changed files with 12 additions and 0 deletions
|
@ -579,6 +579,16 @@ String Node::debug_description() const
|
|||
return builder.to_string();
|
||||
}
|
||||
|
||||
CSS::Display Node::display() const
|
||||
{
|
||||
if (!has_style()) {
|
||||
// NOTE: No style means this is dumb text content.
|
||||
return CSS::Display(CSS::Display::Outside::Inline, CSS::Display::Inside::Flow);
|
||||
}
|
||||
|
||||
return computed_values().display();
|
||||
}
|
||||
|
||||
bool Node::is_inline() const
|
||||
{
|
||||
if (!has_style()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue