mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Compute content sizes lazily in layout 2020
This commit is contained in:
parent
ba5568a0a6
commit
235df94f2e
11 changed files with 176 additions and 247 deletions
|
@ -5,8 +5,7 @@
|
|||
use crate::context::LayoutContext;
|
||||
use crate::dom_traversal::{Contents, NodeAndStyleInfo, NodeExt};
|
||||
use crate::formatting_contexts::IndependentFormattingContext;
|
||||
use crate::sizing::ContentSizesRequest;
|
||||
use crate::style_ext::{ComputedValuesExt, DisplayInside};
|
||||
use crate::style_ext::DisplayInside;
|
||||
use style::values::specified::text::TextDecorationLine;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
|
@ -32,14 +31,12 @@ impl FloatBox {
|
|||
display_inside: DisplayInside,
|
||||
contents: Contents,
|
||||
) -> Self {
|
||||
let content_sizes = ContentSizesRequest::inline_if(!info.style.inline_size_is_length());
|
||||
Self {
|
||||
contents: IndependentFormattingContext::construct(
|
||||
context,
|
||||
info,
|
||||
display_inside,
|
||||
contents,
|
||||
content_sizes,
|
||||
// Text decorations are not propagated to any out-of-flow descendants
|
||||
TextDecorationLine::NONE,
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue