mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:58:12 +00:00
LibWeb: Move "natural size" concept into Layout::Box
Having this here instead of in ReplacedBox means we can access it when figuring out what the "preferred aspect ratio" is. There's some inconsistency between specs about what this is called, but they're moving towards referring to this as "natural width/height/ aspect-ratio", so let's copy that terminology.
This commit is contained in:
parent
6fd3b39bef
commit
84e7216603
13 changed files with 75 additions and 74 deletions
|
@ -24,8 +24,8 @@ void FrameBox::prepare_for_replaced_layout()
|
|||
VERIFY(dom_node().nested_browsing_context());
|
||||
|
||||
// FIXME: Do proper error checking, etc.
|
||||
set_intrinsic_width(dom_node().attribute(HTML::AttributeNames::width).to_int().value_or(300));
|
||||
set_intrinsic_height(dom_node().attribute(HTML::AttributeNames::height).to_int().value_or(150));
|
||||
set_natural_width(dom_node().attribute(HTML::AttributeNames::width).to_int().value_or(300));
|
||||
set_natural_height(dom_node().attribute(HTML::AttributeNames::height).to_int().value_or(150));
|
||||
}
|
||||
|
||||
void FrameBox::did_set_content_size()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue