Remove size_of_test macro from legacy layout and inline it (#34055)

in the last remaining location it is used.

Signed-off-by: Nico Burns <nico@nicoburns.com>
This commit is contained in:
Nico Burns 2024-10-29 21:46:10 +07:00 committed by GitHub
parent a501572971
commit 000144f52a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 11 additions and 25 deletions

View file

@ -44,7 +44,6 @@ servo_atoms = { workspace = true }
servo_config = { path = "../config" }
servo_geometry = { path = "../geometry" }
servo_url = { path = "../url" }
size_of_test = { workspace = true }
smallvec = { workspace = true, features = ["union"] }
style = { workspace = true }
style_traits = { workspace = true }

View file

@ -29,7 +29,6 @@ use script_layout_interface::wrapper_traits::{
use script_layout_interface::{HTMLCanvasData, HTMLCanvasDataSource, HTMLMediaData, SVGSVGData};
use serde::ser::{Serialize, SerializeStruct, Serializer};
use servo_url::ServoUrl;
use size_of_test::size_of_test;
use style::computed_values::border_collapse::T as BorderCollapse;
use style::computed_values::box_sizing::T as BoxSizing;
use style::computed_values::clear::T as Clear;
@ -167,11 +166,6 @@ pub struct Fragment {
pub established_reference_frame: Option<ClipScrollNodeIndex>,
}
#[cfg(debug_assertions)]
size_of_test!(Fragment, 176);
#[cfg(not(debug_assertions))]
size_of_test!(Fragment, 152);
impl Serialize for Fragment {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut serializer = serializer.serialize_struct("fragment", 3)?;
@ -226,8 +220,6 @@ pub enum SpecificFragmentInfo {
TruncatedFragment(Box<TruncatedFragmentInfo>),
}
size_of_test!(SpecificFragmentInfo, 24);
impl SpecificFragmentInfo {
fn restyle_damage(&self) -> RestyleDamage {
let flow = match *self {