mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Move size of tests to compile-time tests in the style crate
Same reasoning as the previous commit. Differential Revision: https://phabricator.services.mozilla.com/D146104
This commit is contained in:
parent
50d31686be
commit
f48b95e2e3
13 changed files with 53 additions and 49 deletions
|
@ -159,6 +159,9 @@ pub struct ElementStyles {
|
|||
pub pseudos: EagerPseudoStyles,
|
||||
}
|
||||
|
||||
// There's one of these per rendered elements so it better be small.
|
||||
size_of_test!(ElementStyles, 16);
|
||||
|
||||
impl ElementStyles {
|
||||
/// Returns the primary style.
|
||||
pub fn get_primary(&self) -> Option<&Arc<ComputedValues>> {
|
||||
|
@ -249,6 +252,9 @@ pub struct ElementData {
|
|||
pub flags: ElementDataFlags,
|
||||
}
|
||||
|
||||
// There's one of these per rendered elements so it better be small.
|
||||
size_of_test!(ElementData, 24);
|
||||
|
||||
/// The kind of restyle that a single element should do.
|
||||
#[derive(Debug)]
|
||||
pub enum RestyleKind {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue