mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
order derivable traits lists
Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
This commit is contained in:
parent
ab73f3d61d
commit
c5fe235112
194 changed files with 553 additions and 552 deletions
|
@ -86,7 +86,7 @@ impl FloatedBlockInfo {
|
|||
}
|
||||
|
||||
/// The solutions for the block-size-and-margins constraint equation.
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Clone, Copy)]
|
||||
struct BSizeConstraintSolution {
|
||||
block_start: Au,
|
||||
block_size: Au,
|
||||
|
@ -2196,7 +2196,7 @@ impl fmt::Debug for BlockFlow {
|
|||
}
|
||||
|
||||
/// The inputs for the inline-sizes-and-margins constraint equation.
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct ISizeConstraintInput {
|
||||
pub computed_inline_size: MaybeAuto,
|
||||
pub inline_start_margin: MaybeAuto,
|
||||
|
@ -2229,7 +2229,7 @@ impl ISizeConstraintInput {
|
|||
}
|
||||
|
||||
/// The solutions for the inline-size-and-margins constraint equation.
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct ISizeConstraintSolution {
|
||||
pub inline_start: Au,
|
||||
pub inline_size: Au,
|
||||
|
@ -3086,7 +3086,7 @@ impl ISizeAndMarginsComputer for InlineFlexItem {
|
|||
}
|
||||
|
||||
/// A stacking context, a pseudo-stacking context, or a non-stacking context.
|
||||
#[derive(Copy, Clone, PartialEq)]
|
||||
#[derive(Clone, Copy, PartialEq)]
|
||||
pub enum BlockStackingContextType {
|
||||
NonstackingContext,
|
||||
PseudoStackingContext,
|
||||
|
|
|
@ -2915,7 +2915,7 @@ impl ComputedValuesCursorUtility for ComputedValues {
|
|||
}
|
||||
|
||||
// A helper data structure for gradients.
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Clone, Copy)]
|
||||
struct StopRun {
|
||||
start_offset: f32,
|
||||
end_offset: f32,
|
||||
|
@ -2953,7 +2953,7 @@ impl ToGfxColor for RGBA {
|
|||
}
|
||||
|
||||
/// Describes how to paint the borders.
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Clone, Copy)]
|
||||
pub enum BorderPaintingMode<'a> {
|
||||
/// Paint borders separately (`border-collapse: separate`).
|
||||
Separate,
|
||||
|
@ -2963,7 +2963,7 @@ pub enum BorderPaintingMode<'a> {
|
|||
Hidden,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, PartialEq)]
|
||||
#[derive(Clone, Copy, PartialEq)]
|
||||
pub enum StackingContextCreationMode {
|
||||
Normal,
|
||||
PseudoPositioned,
|
||||
|
|
|
@ -13,7 +13,7 @@ use style::logical_geometry::{LogicalRect, LogicalSize, WritingMode};
|
|||
use style::values::computed::LengthOrPercentageOrAuto;
|
||||
|
||||
/// The kind of float: left or right.
|
||||
#[derive(Clone, Serialize, Debug, Copy)]
|
||||
#[derive(Clone, Copy, Debug, Serialize)]
|
||||
pub enum FloatKind {
|
||||
Left,
|
||||
Right
|
||||
|
@ -30,7 +30,7 @@ impl FloatKind {
|
|||
}
|
||||
|
||||
/// The kind of clearance: left, right, or both.
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Clone, Copy)]
|
||||
pub enum ClearType {
|
||||
Left,
|
||||
Right,
|
||||
|
@ -431,7 +431,7 @@ impl Floats {
|
|||
/// This is used for two purposes: (a) determining whether we can lay out blocks in parallel; (b)
|
||||
/// guessing the inline-sizes of block formatting contexts in an effort to lay them out in
|
||||
/// parallel.
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct SpeculatedFloatPlacement {
|
||||
/// The estimated inline size (an upper bound) of the left floats flowing through this flow.
|
||||
pub left: Au,
|
||||
|
|
|
@ -559,7 +559,7 @@ pub trait MutableOwnedFlowUtils {
|
|||
absolute_descendants: &mut AbsoluteDescendants);
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Serialize, PartialEq, Debug)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Serialize)]
|
||||
pub enum FlowClass {
|
||||
Block,
|
||||
Inline,
|
||||
|
@ -771,7 +771,7 @@ pub type AbsoluteDescendantOffsetIter<'a> = Zip<AbsoluteDescendantIter<'a>, Iter
|
|||
|
||||
/// Information needed to compute absolute (i.e. viewport-relative) flow positions (not to be
|
||||
/// confused with absolutely-positioned flows) that is computed during block-size assignment.
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct EarlyAbsolutePositionInfo {
|
||||
/// The size of the containing block for relatively-positioned descendants.
|
||||
pub relative_containing_block_size: LogicalSize<Au>,
|
||||
|
@ -793,7 +793,7 @@ impl EarlyAbsolutePositionInfo {
|
|||
|
||||
/// Information needed to compute absolute (i.e. viewport-relative) flow positions (not to be
|
||||
/// confused with absolutely-positioned flows) that is computed during final position assignment.
|
||||
#[derive(Serialize, Copy, Clone)]
|
||||
#[derive(Clone, Copy, Serialize)]
|
||||
pub struct LateAbsolutePositionInfo {
|
||||
/// The position of the absolute containing block relative to the nearest ancestor stacking
|
||||
/// context. If the absolute containing block establishes the stacking context for this flow,
|
||||
|
@ -809,7 +809,7 @@ impl LateAbsolutePositionInfo {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct FragmentationContext {
|
||||
pub available_block_size: Au,
|
||||
pub this_fragment_is_empty: bool,
|
||||
|
@ -1412,7 +1412,7 @@ impl ContainingBlockLink {
|
|||
|
||||
/// A wrapper for the pointer address of a flow. These pointer addresses may only be compared for
|
||||
/// equality with other such pointer addresses, never dereferenced.
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
pub struct OpaqueFlow(pub usize);
|
||||
|
||||
impl OpaqueFlow {
|
||||
|
|
|
@ -13,7 +13,7 @@ use flow::Flow;
|
|||
use std::ops::Deref;
|
||||
use std::sync::{Arc, Weak};
|
||||
|
||||
#[derive(Clone,Debug)]
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct FlowRef(Arc<Flow>);
|
||||
|
||||
impl Deref for FlowRef {
|
||||
|
@ -55,7 +55,7 @@ impl FlowRef {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone,Debug)]
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct WeakFlowRef(Weak<Flow>);
|
||||
|
||||
impl WeakFlowRef {
|
||||
|
|
|
@ -574,7 +574,7 @@ impl ScannedTextFragmentInfo {
|
|||
|
||||
/// Describes how to split a fragment. This is used during line breaking as part of the return
|
||||
/// value of `find_split_info_for_inline_size()`.
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct SplitInfo {
|
||||
// TODO(bjz): this should only need to be a single character index, but both values are
|
||||
// currently needed for splitting in the `inline::try_append_*` functions.
|
||||
|
@ -633,7 +633,7 @@ impl UnscannedTextFragmentInfo {
|
|||
}
|
||||
|
||||
/// A fragment that represents a table column.
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct TableColumnFragmentInfo {
|
||||
/// the number of columns a <col> element should span
|
||||
pub span: u32,
|
||||
|
@ -3049,7 +3049,7 @@ pub trait FragmentBorderBoxIterator {
|
|||
|
||||
/// The coordinate system used in `stacking_relative_border_box()`. See the documentation of that
|
||||
/// method for details.
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub enum CoordinateSystem {
|
||||
/// The border box returned is relative to the fragment's parent stacking context.
|
||||
Parent,
|
||||
|
@ -3094,7 +3094,7 @@ impl<'a> InlineStyleIterator<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum WhitespaceStrippingResult {
|
||||
RetainFragment,
|
||||
FragmentContainedOnlyBidiControlCharacters,
|
||||
|
@ -3116,7 +3116,7 @@ impl WhitespaceStrippingResult {
|
|||
|
||||
/// The overflow area. We need two different notions of overflow: paint overflow and scrollable
|
||||
/// overflow.
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct Overflow {
|
||||
pub scroll: Rect<Au>,
|
||||
pub paint: Rect<Au>,
|
||||
|
@ -3163,7 +3163,7 @@ bitflags! {
|
|||
/// Specified distances from the margin edge of a block to its content in the inline direction.
|
||||
/// These are returned by `guess_inline_content_edge_offsets()` and are used in the float placement
|
||||
/// speculation logic.
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct SpeculatedInlineContentEdgeOffsets {
|
||||
pub start: Au,
|
||||
pub end: Au,
|
||||
|
|
|
@ -63,7 +63,7 @@ use unicode_bidi as 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(Serialize, Debug, Clone)]
|
||||
#[derive(Clone, Debug, Serialize)]
|
||||
pub struct Line {
|
||||
/// A range of line indices that describe line breaks.
|
||||
///
|
||||
|
@ -823,7 +823,7 @@ impl LineBreaker {
|
|||
}
|
||||
|
||||
/// Represents a list of inline fragments, including element ranges.
|
||||
#[derive(Serialize, Clone)]
|
||||
#[derive(Clone, Serialize)]
|
||||
pub struct InlineFragments {
|
||||
/// The fragments themselves.
|
||||
pub fragments: Vec<Fragment>,
|
||||
|
@ -1864,13 +1864,13 @@ impl InlineMetrics {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, PartialEq)]
|
||||
#[derive(Clone, Copy, PartialEq)]
|
||||
enum LineFlushMode {
|
||||
No,
|
||||
Flush,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Serialize)]
|
||||
#[derive(Clone, Copy, Debug, Serialize)]
|
||||
pub struct LineMetrics {
|
||||
pub space_above_baseline: Au,
|
||||
pub space_below_baseline: Au,
|
||||
|
|
|
@ -18,7 +18,7 @@ use style::values::computed::{BorderCornerRadius, LengthOrPercentageOrAuto};
|
|||
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrNone};
|
||||
|
||||
/// A collapsible margin. See CSS 2.1 § 8.3.1.
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct AdjoiningMargins {
|
||||
/// The value of the greatest positive margin.
|
||||
pub most_positive: Au,
|
||||
|
@ -61,7 +61,7 @@ impl AdjoiningMargins {
|
|||
}
|
||||
|
||||
/// Represents the block-start and block-end margins of a flow with collapsible margins. See CSS 2.1 § 8.3.1.
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub enum CollapsibleMargins {
|
||||
/// Margins may not collapse with this flow.
|
||||
None(Au, Au),
|
||||
|
@ -295,7 +295,7 @@ impl MarginCollapseInfo {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub enum MarginCollapseState {
|
||||
/// We are accumulating margin on the logical top of this flow.
|
||||
AccumulatingCollapsibleTopMargin,
|
||||
|
@ -304,7 +304,7 @@ pub enum MarginCollapseState {
|
|||
}
|
||||
|
||||
/// Intrinsic inline-sizes, which consist of minimum and preferred.
|
||||
#[derive(Serialize, Copy, Clone)]
|
||||
#[derive(Clone, Copy, Serialize)]
|
||||
pub struct IntrinsicISizes {
|
||||
/// The *minimum inline-size* of the content.
|
||||
pub minimum_inline_size: Au,
|
||||
|
@ -395,7 +395,7 @@ impl IntrinsicISizesContribution {
|
|||
}
|
||||
|
||||
/// Useful helper data type when computing values for blocks and positioned elements.
|
||||
#[derive(Copy, Clone, PartialEq, Debug)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum MaybeAuto {
|
||||
Auto,
|
||||
Specified(Au),
|
||||
|
|
|
@ -588,7 +588,7 @@ impl ISizeAndMarginsComputer for InternalTable {
|
|||
/// maximum of 100 pixels and 20% of the table), the preceding constraint means that we must
|
||||
/// potentially store both a specified width *and* a specified percentage, so that the inline-size
|
||||
/// assignment phase of layout will know which one to pick.
|
||||
#[derive(Clone, Serialize, Debug, Copy)]
|
||||
#[derive(Clone, Copy, Debug, Serialize)]
|
||||
pub struct ColumnIntrinsicInlineSize {
|
||||
/// The preferred intrinsic inline size.
|
||||
pub preferred: Au,
|
||||
|
@ -625,7 +625,7 @@ impl ColumnIntrinsicInlineSize {
|
|||
///
|
||||
/// TODO(pcwalton): There will probably be some `border-collapse`-related info in here too
|
||||
/// eventually.
|
||||
#[derive(Serialize, Clone, Copy, Debug)]
|
||||
#[derive(Clone, Copy, Debug, Serialize)]
|
||||
pub struct ColumnComputedInlineSize {
|
||||
/// The computed size of this inline column.
|
||||
pub size: Au,
|
||||
|
|
|
@ -305,7 +305,7 @@ impl fmt::Debug for TableCellFlow {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Serialize)]
|
||||
#[derive(Clone, Copy, Debug, Serialize)]
|
||||
pub struct CollapsedBordersForCell {
|
||||
pub inline_start_border: CollapsedBorder,
|
||||
pub inline_end_border: CollapsedBorder,
|
||||
|
|
|
@ -73,7 +73,7 @@ impl Serialize for TableRowFlow {
|
|||
}
|
||||
|
||||
/// Information about the column inline size and span for each cell.
|
||||
#[derive(Serialize, Copy, Clone)]
|
||||
#[derive(Clone, Copy, Serialize)]
|
||||
pub struct CellIntrinsicInlineSize {
|
||||
/// Inline sizes that this cell contributes to the column.
|
||||
pub column_size: ColumnIntrinsicInlineSize,
|
||||
|
@ -571,7 +571,7 @@ impl CollapsedBorderSpacingForRow {
|
|||
}
|
||||
|
||||
/// All aspects of a border that can collapse with adjacent borders. See CSS 2.1 § 17.6.2.1.
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct CollapsedBorder {
|
||||
/// The style of the border.
|
||||
pub style: border_top_style::T,
|
||||
|
@ -596,7 +596,7 @@ impl Serialize for CollapsedBorder {
|
|||
// FIXME(#8586): FromTableRow, FromTableRowGroup, FromTableColumn,
|
||||
// FromTableColumnGroup are unused
|
||||
#[allow(dead_code)]
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Serialize)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Serialize)]
|
||||
pub enum CollapsedBorderProvenance {
|
||||
FromPreviousTableCell = 6,
|
||||
FromNextTableCell = 5,
|
||||
|
@ -906,7 +906,7 @@ fn set_inline_position_of_child_flow(
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct BorderCollapseInfoForChildTableCell<'a> {
|
||||
collapsed_borders_for_row: &'a CollapsedBordersForRow,
|
||||
collapsed_border_spacing_for_row: &'a CollapsedBorderSpacingForRow,
|
||||
|
|
|
@ -35,7 +35,7 @@ use style::values::CSSFloat;
|
|||
use style::values::computed::LengthOrPercentageOrAuto;
|
||||
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize};
|
||||
|
||||
#[derive(Copy, Clone, Serialize, Debug)]
|
||||
#[derive(Clone, Copy, Debug, Serialize)]
|
||||
pub enum TableLayout {
|
||||
Fixed,
|
||||
Auto
|
||||
|
@ -615,7 +615,7 @@ impl<'a> Add for &'a AutoLayoutCandidateGuess {
|
|||
|
||||
/// The `CSSFloat` member specifies the weight of the smaller of the two guesses, on a scale from
|
||||
/// 0.0 to 1.0.
|
||||
#[derive(Copy, Clone, PartialEq, Debug)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
enum SelectedAutoLayoutCandidateGuess {
|
||||
UseMinimumGuess,
|
||||
InterpolateBetweenMinimumGuessAndMinimumPercentageGuess(CSSFloat),
|
||||
|
|
|
@ -562,7 +562,7 @@ impl RunInfo {
|
|||
|
||||
/// A mapping from a portion of an unscanned text fragment to the text run we're going to create
|
||||
/// for it.
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
struct RunMapping {
|
||||
/// The range of byte indices within the text fragment.
|
||||
byte_range: Range<usize>,
|
||||
|
|
|
@ -243,7 +243,7 @@ impl<'a> PostorderFlowTraversal for BubbleISizes<'a> {
|
|||
}
|
||||
|
||||
/// The assign-inline-sizes traversal. In Gecko this corresponds to `Reflow`.
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct AssignISizes<'a> {
|
||||
pub layout_context: &'a LayoutContext<'a>,
|
||||
}
|
||||
|
@ -263,7 +263,7 @@ impl<'a> PreorderFlowTraversal for AssignISizes<'a> {
|
|||
/// The assign-block-sizes-and-store-overflow traversal, the last (and most expensive) part of
|
||||
/// layout computation. Determines the final block-sizes for all layout objects and computes
|
||||
/// positions. In Gecko this corresponds to `Reflow`.
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct AssignBSizes<'a> {
|
||||
pub layout_context: &'a LayoutContext<'a>,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue