mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Further changes required by Servo
This commit is contained in:
parent
f48b95e2e3
commit
a7699d9034
23 changed files with 76 additions and 117 deletions
|
@ -44,6 +44,7 @@ servo_atoms = { path = "../atoms" }
|
|||
servo_config = { path = "../config" }
|
||||
servo_geometry = { path = "../geometry" }
|
||||
servo_url = { path = "../url" }
|
||||
size_of_test = { path = "../size_of_test" }
|
||||
smallvec = { workspace = true, features = ["union"] }
|
||||
style = { path = "../style", features = ["servo"] }
|
||||
style_traits = { path = "../style_traits" }
|
||||
|
@ -52,6 +53,3 @@ unicode-script = { workspace = true }
|
|||
webrender_api = { workspace = true }
|
||||
xi-unicode = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
size_of_test = { path = "../size_of_test" }
|
||||
|
||||
|
|
|
@ -158,6 +158,11 @@ 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)?;
|
||||
|
@ -212,6 +217,8 @@ pub enum SpecificFragmentInfo {
|
|||
TruncatedFragment(Box<TruncatedFragmentInfo>),
|
||||
}
|
||||
|
||||
size_of_test!(SpecificFragmentInfo, 24);
|
||||
|
||||
impl SpecificFragmentInfo {
|
||||
fn restyle_damage(&self) -> RestyleDamage {
|
||||
let flow = match *self {
|
||||
|
|
|
@ -16,6 +16,8 @@ extern crate log;
|
|||
extern crate range;
|
||||
#[macro_use]
|
||||
extern crate serde;
|
||||
#[macro_use]
|
||||
extern crate size_of_test;
|
||||
|
||||
#[macro_use]
|
||||
pub mod layout_debug;
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
/* 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/. */
|
||||
|
||||
#![cfg(target_pointer_width = "64")]
|
||||
|
||||
#[macro_use]
|
||||
extern crate size_of_test;
|
||||
|
||||
use layout_2013::Fragment;
|
||||
use layout_2013::SpecificFragmentInfo;
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
size_of_test!(test_size_of_fragment, Fragment, 176);
|
||||
#[cfg(not(debug_assertions))]
|
||||
size_of_test!(test_size_of_fragment, Fragment, 152);
|
||||
size_of_test!(
|
||||
test_size_of_specific_fragment_info,
|
||||
SpecificFragmentInfo,
|
||||
24
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue