mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
Make the initial viewport size available to style::properties::cascade
This commit is contained in:
parent
67548a6244
commit
00785ecf63
3 changed files with 30 additions and 16 deletions
|
@ -3701,6 +3701,8 @@ fn cascade_with_cached_declarations(applicable_declarations: &[DeclarationBlock<
|
|||
/// Performs the CSS cascade, computing new styles for an element from its parent style and
|
||||
/// optionally a cached related style. The arguments are:
|
||||
///
|
||||
/// * `viewport_size`: The size of the initial viewport.
|
||||
///
|
||||
/// * `applicable_declarations`: The list of CSS rules that matched.
|
||||
///
|
||||
/// * `shareable`: Whether the `ComputedValues` structure to be constructed should be considered
|
||||
|
@ -3714,7 +3716,8 @@ fn cascade_with_cached_declarations(applicable_declarations: &[DeclarationBlock<
|
|||
/// this is ignored.
|
||||
///
|
||||
/// Returns the computed values and a boolean indicating whether the result is cacheable.
|
||||
pub fn cascade(applicable_declarations: &[DeclarationBlock<Vec<PropertyDeclaration>>],
|
||||
pub fn cascade(viewport_size: Size2D<Au>,
|
||||
applicable_declarations: &[DeclarationBlock<Vec<PropertyDeclaration>>],
|
||||
shareable: bool,
|
||||
parent_style: Option< &ComputedValues >,
|
||||
cached_style: Option< &ComputedValues >)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue