1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use crate::;
/// A trait that holds all the concrete implementations of the Layout DOM traits. This is
/// useful because it means that other types (specifically the implementation of the `Layout`
/// trait) can be parameterized over a single type (`LayoutDomTypeBundle`) rather than all of
/// the various Layout DOM trait implementations.
// The type aliases below simplify extracting the concrete types out of the type bundle. It will be
// possible to simplify this once default associated types have landed and are stable:
// https://github.com/rust-lang/rust/issues/29661.
/// Type alias to extract `ConcreteLayoutNode` from a `LayoutDomTypeBundle` implementation.
pub type LayoutNodeOf<'dom, T> = ConcreteLayoutNode;
/// Type alias to extract `ConcreteLayoutElement` from a `LayoutDomTypeBundle` implementation.
pub type LayoutElementOf<'dom, T> = ConcreteLayoutElement;
/// Type alias to extract `ConcreteDangerousStyleNode` from a `LayoutDomTypeBundle` implementation.
pub type DangerousStyleNodeOf<'dom, T> =
ConcreteDangerousStyleNode;
/// Type alias to extract `ConcreteDangerousStyleElement` from a `LayoutDomTypeBundle` implementation.
pub type DangerousStyleElementOf<'dom, T> =
ConcreteDangerousStyleElement;