mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
layout: Add support for object-fit
and object-position
(#33479)
This also makes a couple small improvements: - Rename `IntrinsicSizes` to `NaturalSizes` which reflects more modern spec language. - Move the conversion of Stylo's `ImageRendering` to WebRender's version to a `ToWebRender` trait implementation. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
632d832704
commit
bd632fc814
58 changed files with 169 additions and 563 deletions
|
@ -992,6 +992,7 @@ impl FloatBox {
|
|||
);
|
||||
children = replaced.contents.make_fragments(
|
||||
&replaced.style,
|
||||
containing_block,
|
||||
content_size.to_physical_size(containing_block.style.writing_mode),
|
||||
)
|
||||
},
|
||||
|
|
|
@ -1917,7 +1917,11 @@ impl IndependentFormattingContext {
|
|||
.contents
|
||||
.used_size_as_if_inline_element(layout.containing_block, &replaced.style, &pbm)
|
||||
.to_physical_size(container_writing_mode);
|
||||
let fragments = replaced.contents.make_fragments(&replaced.style, size);
|
||||
let fragments = replaced.contents.make_fragments(
|
||||
&replaced.style,
|
||||
layout.containing_block,
|
||||
size,
|
||||
);
|
||||
|
||||
let content_rect = PhysicalRect::new(PhysicalPoint::zero(), size);
|
||||
(fragments, content_rect, None, None)
|
||||
|
|
|
@ -1307,7 +1307,7 @@ fn layout_in_flow_replaced_block_level(
|
|||
|
||||
let containing_block_writing_mode = containing_block.style.writing_mode;
|
||||
let physical_content_size = content_size.to_physical_size(containing_block_writing_mode);
|
||||
let fragments = replaced.make_fragments(style, physical_content_size);
|
||||
let fragments = replaced.make_fragments(style, containing_block, physical_content_size);
|
||||
|
||||
let clearance;
|
||||
if let Some(ref mut sequential_layout_state) = sequential_layout_state {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue