mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
layout_2020: Tag fragments with their pseudo content type
This will allow us to answer queries and properly handle animations in the future for fragments generated for pseudo content.
This commit is contained in:
parent
7df4655b60
commit
89855afa4d
14 changed files with 271 additions and 265 deletions
|
@ -3,12 +3,10 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::context::LayoutContext;
|
||||
use crate::dom_traversal::{Contents, NodeExt};
|
||||
use crate::dom_traversal::{Contents, NodeAndStyleInfo, NodeExt};
|
||||
use crate::formatting_contexts::IndependentFormattingContext;
|
||||
use crate::sizing::ContentSizesRequest;
|
||||
use crate::style_ext::{ComputedValuesExt, DisplayInside};
|
||||
use servo_arc::Arc;
|
||||
use style::properties::ComputedValues;
|
||||
use style::values::specified::text::TextDecorationLine;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
|
@ -30,17 +28,15 @@ impl FloatContext {
|
|||
impl FloatBox {
|
||||
pub fn construct<'dom>(
|
||||
context: &LayoutContext,
|
||||
node: impl NodeExt<'dom>,
|
||||
style: Arc<ComputedValues>,
|
||||
info: &NodeAndStyleInfo<impl NodeExt<'dom>>,
|
||||
display_inside: DisplayInside,
|
||||
contents: Contents,
|
||||
) -> Self {
|
||||
let content_sizes = ContentSizesRequest::inline_if(!style.inline_size_is_length());
|
||||
let content_sizes = ContentSizesRequest::inline_if(!info.style.inline_size_is_length());
|
||||
Self {
|
||||
contents: IndependentFormattingContext::construct(
|
||||
context,
|
||||
node,
|
||||
style,
|
||||
info,
|
||||
display_inside,
|
||||
contents,
|
||||
content_sizes,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue