mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Rename ReplacedContent::used_size to used_size_as_if_inline_element
This commit is contained in:
parent
e86222d6bb
commit
14ddf39215
3 changed files with 8 additions and 5 deletions
|
@ -465,7 +465,7 @@ fn layout_atomic<'box_tree>(
|
|||
|
||||
let fragment = match atomic.as_replaced() {
|
||||
Ok(replaced) => {
|
||||
let size = replaced.used_size(ifc.containing_block, &atomic.style);
|
||||
let size = replaced.used_size_as_if_inline_element(ifc.containing_block, &atomic.style);
|
||||
let fragments = replaced.make_fragments(&atomic.style, size.clone());
|
||||
let content_rect = Rect { start_corner, size };
|
||||
BoxFragment {
|
||||
|
|
|
@ -521,7 +521,7 @@ fn layout_in_flow_replaced_block_level<'a>(
|
|||
style: &Arc<ComputedValues>,
|
||||
replaced: &ReplacedContent,
|
||||
) -> BoxFragment {
|
||||
let size = replaced.used_size(containing_block, style);
|
||||
let size = replaced.used_size_as_if_inline_element(containing_block, style);
|
||||
|
||||
let cbis = containing_block.inline_size;
|
||||
let padding = style.padding().percentages_relative_to(cbis);
|
||||
|
|
|
@ -123,9 +123,12 @@ impl ReplacedContent {
|
|||
}
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/css2/visudet.html#inline-replaced-width
|
||||
// https://drafts.csswg.org/css2/visudet.html#inline-replaced-height
|
||||
pub fn used_size(
|
||||
/// https://drafts.csswg.org/css2/visudet.html#inline-replaced-width
|
||||
/// https://drafts.csswg.org/css2/visudet.html#inline-replaced-height
|
||||
///
|
||||
/// Also used in other cases, for example
|
||||
/// https://drafts.csswg.org/css2/visudet.html#block-replaced-width
|
||||
pub fn used_size_as_if_inline_element(
|
||||
&self,
|
||||
containing_block: &ContainingBlock,
|
||||
style: &ComputedValues,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue