mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +01:00
Migrated -Z trace-layout to serde_json
This commit is contained in:
parent
f48b3fe219
commit
8bea421329
19 changed files with 129 additions and 114 deletions
|
@ -65,7 +65,7 @@ use unicode_bidi;
|
|||
/// with a float or a horizontal wall of the containing block. The block-start
|
||||
/// inline-start corner of the green zone is the same as that of the line, but
|
||||
/// the green zone can be taller and wider than the line itself.
|
||||
#[derive(RustcEncodable, Debug, Clone)]
|
||||
#[derive(Serialize, Debug, Clone)]
|
||||
pub struct Line {
|
||||
/// A range of line indices that describe line breaks.
|
||||
///
|
||||
|
@ -207,7 +207,7 @@ impl Line {
|
|||
}
|
||||
|
||||
int_range_index! {
|
||||
#[derive(RustcEncodable)]
|
||||
#[derive(Serialize)]
|
||||
#[doc = "The index of a fragment in a flattened vector of DOM elements."]
|
||||
struct FragmentIndex(isize)
|
||||
}
|
||||
|
@ -791,7 +791,7 @@ impl LineBreaker {
|
|||
}
|
||||
|
||||
/// Represents a list of inline fragments, including element ranges.
|
||||
#[derive(RustcEncodable, Clone)]
|
||||
#[derive(Serialize, Clone)]
|
||||
pub struct InlineFragments {
|
||||
/// The fragments themselves.
|
||||
pub fragments: Vec<Fragment>,
|
||||
|
@ -828,7 +828,7 @@ impl InlineFragments {
|
|||
}
|
||||
|
||||
/// Flows for inline layout.
|
||||
#[derive(RustcEncodable)]
|
||||
#[derive(Serialize)]
|
||||
pub struct InlineFlow {
|
||||
/// Data common to all flows.
|
||||
pub base: BaseFlow,
|
||||
|
@ -1780,7 +1780,7 @@ fn inline_contexts_are_equal(inline_context_a: &Option<InlineFragmentContext>,
|
|||
///
|
||||
/// Descent is not included in this structure because it can be computed from the fragment's
|
||||
/// border/content box and the ascent.
|
||||
#[derive(Clone, Copy, Debug, RustcEncodable)]
|
||||
#[derive(Clone, Copy, Debug, Serialize)]
|
||||
pub struct InlineMetrics {
|
||||
/// The amount of space above the baseline needed for this fragment.
|
||||
pub space_above_baseline: Au,
|
||||
|
@ -1831,7 +1831,7 @@ enum LineFlushMode {
|
|||
Flush,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, RustcEncodable)]
|
||||
#[derive(Copy, Clone, Debug, Serialize)]
|
||||
pub struct LineMetrics {
|
||||
pub space_above_baseline: Au,
|
||||
pub space_below_baseline: Au,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue