mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Renamed TComputedValues to ComputedValues
This is a followup to #10210, and a continuation of #10185.
This commit is contained in:
parent
639fdd6b12
commit
4cb4cc93e4
34 changed files with 65 additions and 65 deletions
|
@ -41,7 +41,7 @@ use std::ops::{Deref, DerefMut};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use style::computed_values::{border_style, cursor, filter, image_rendering, mix_blend_mode};
|
use style::computed_values::{border_style, cursor, filter, image_rendering, mix_blend_mode};
|
||||||
use style::computed_values::{pointer_events};
|
use style::computed_values::{pointer_events};
|
||||||
use style::properties::{ServoComputedValues, TComputedValues};
|
use style::properties::{ComputedValues, ServoComputedValues};
|
||||||
use style_traits::cursor::Cursor;
|
use style_traits::cursor::Cursor;
|
||||||
use text::TextRun;
|
use text::TextRun;
|
||||||
use text::glyph::CharIndex;
|
use text::glyph::CharIndex;
|
||||||
|
|
|
@ -57,7 +57,7 @@ use style::computed_values::{border_collapse, box_sizing, display, float, overfl
|
||||||
use style::computed_values::{position, text_align, transform_style};
|
use style::computed_values::{position, text_align, transform_style};
|
||||||
use style::context::StyleContext;
|
use style::context::StyleContext;
|
||||||
use style::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize, WritingMode};
|
use style::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize, WritingMode};
|
||||||
use style::properties::{ServoComputedValues, TComputedValues};
|
use style::properties::{ComputedValues, ServoComputedValues};
|
||||||
use style::values::computed::{LengthOrNone, LengthOrPercentageOrNone};
|
use style::values::computed::{LengthOrNone, LengthOrPercentageOrNone};
|
||||||
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto};
|
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto};
|
||||||
use util::geometry::MAX_RECT;
|
use util::geometry::MAX_RECT;
|
||||||
|
|
|
@ -45,7 +45,7 @@ use std::sync::atomic::Ordering;
|
||||||
use style::computed_values::content::ContentItem;
|
use style::computed_values::content::ContentItem;
|
||||||
use style::computed_values::{caption_side, display, empty_cells, float, list_style_position};
|
use style::computed_values::{caption_side, display, empty_cells, float, list_style_position};
|
||||||
use style::computed_values::{position};
|
use style::computed_values::{position};
|
||||||
use style::properties::{self, ServoComputedValues, TComputedValues};
|
use style::properties::{self, ComputedValues, ServoComputedValues};
|
||||||
use table::TableFlow;
|
use table::TableFlow;
|
||||||
use table_caption::TableCaptionFlow;
|
use table_caption::TableCaptionFlow;
|
||||||
use table_cell::TableCellFlow;
|
use table_cell::TableCellFlow;
|
||||||
|
|
|
@ -51,7 +51,7 @@ use style::computed_values::{border_style, image_rendering, overflow_x, position
|
||||||
use style::computed_values::{transform, transform_style, visibility};
|
use style::computed_values::{transform, transform_style, visibility};
|
||||||
use style::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize, WritingMode};
|
use style::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize, WritingMode};
|
||||||
use style::properties::style_structs::Border;
|
use style::properties::style_structs::Border;
|
||||||
use style::properties::{self, ServoComputedValues, TComputedValues};
|
use style::properties::{self, ComputedValues, ServoComputedValues};
|
||||||
use style::values::RGBA;
|
use style::values::RGBA;
|
||||||
use style::values::computed;
|
use style::values::computed;
|
||||||
use style::values::computed::{LengthOrNone, LengthOrPercentage, LengthOrPercentageOrAuto, LinearGradient};
|
use style::values::computed::{LengthOrNone, LengthOrPercentage, LengthOrPercentageOrAuto, LinearGradient};
|
||||||
|
|
|
@ -28,7 +28,7 @@ use std::sync::Arc;
|
||||||
use style::computed_values::flex_direction;
|
use style::computed_values::flex_direction;
|
||||||
use style::logical_geometry::LogicalSize;
|
use style::logical_geometry::LogicalSize;
|
||||||
use style::properties::style_structs;
|
use style::properties::style_structs;
|
||||||
use style::properties::{ServoComputedValues, TComputedValues};
|
use style::properties::{ComputedValues, ServoComputedValues};
|
||||||
use style::values::computed::LengthOrPercentageOrAuto;
|
use style::values::computed::LengthOrPercentageOrAuto;
|
||||||
|
|
||||||
// A mode describes which logical axis a flex axis is parallel with.
|
// A mode describes which logical axis a flex axis is parallel with.
|
||||||
|
|
|
@ -50,7 +50,7 @@ use std::{fmt, mem, raw};
|
||||||
use style::computed_values::{clear, display, empty_cells, float, position, overflow_x, text_align};
|
use style::computed_values::{clear, display, empty_cells, float, position, overflow_x, text_align};
|
||||||
use style::dom::TRestyleDamage;
|
use style::dom::TRestyleDamage;
|
||||||
use style::logical_geometry::{LogicalRect, LogicalSize, WritingMode};
|
use style::logical_geometry::{LogicalRect, LogicalSize, WritingMode};
|
||||||
use style::properties::{self, ServoComputedValues, TComputedValues};
|
use style::properties::{self, ComputedValues, ServoComputedValues};
|
||||||
use style::values::computed::LengthOrPercentageOrAuto;
|
use style::values::computed::LengthOrPercentageOrAuto;
|
||||||
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, TableFlow};
|
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, TableFlow};
|
||||||
use table_caption::TableCaptionFlow;
|
use table_caption::TableCaptionFlow;
|
||||||
|
|
|
@ -41,7 +41,7 @@ use style::computed_values::{overflow_x, position, text_decoration, transform_st
|
||||||
use style::computed_values::{white_space, word_break, z_index};
|
use style::computed_values::{white_space, word_break, z_index};
|
||||||
use style::dom::TRestyleDamage;
|
use style::dom::TRestyleDamage;
|
||||||
use style::logical_geometry::{LogicalMargin, LogicalRect, LogicalSize, WritingMode};
|
use style::logical_geometry::{LogicalMargin, LogicalRect, LogicalSize, WritingMode};
|
||||||
use style::properties::{ServoComputedValues, TComputedValues};
|
use style::properties::{ComputedValues, ServoComputedValues};
|
||||||
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto};
|
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto};
|
||||||
use style::values::computed::{LengthOrPercentageOrNone};
|
use style::values::computed::{LengthOrPercentageOrNone};
|
||||||
use text;
|
use text;
|
||||||
|
|
|
@ -20,7 +20,7 @@ use std::sync::Arc;
|
||||||
use style::computed_values::content::ContentItem;
|
use style::computed_values::content::ContentItem;
|
||||||
use style::computed_values::{display, list_style_type};
|
use style::computed_values::{display, list_style_type};
|
||||||
use style::dom::TRestyleDamage;
|
use style::dom::TRestyleDamage;
|
||||||
use style::properties::{ServoComputedValues, TComputedValues};
|
use style::properties::{ComputedValues, ServoComputedValues};
|
||||||
use text::TextRunScanner;
|
use text::TextRunScanner;
|
||||||
use wrapper::PseudoElementType;
|
use wrapper::PseudoElementType;
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ use std::fmt;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use style::computed_values::float;
|
use style::computed_values::float;
|
||||||
use style::dom::TRestyleDamage;
|
use style::dom::TRestyleDamage;
|
||||||
use style::properties::{ServoComputedValues, TComputedValues};
|
use style::properties::{ComputedValues, ServoComputedValues};
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
#[doc = "Individual layout actions that may be necessary after restyling."]
|
#[doc = "Individual layout actions that may be necessary after restyling."]
|
||||||
|
|
|
@ -30,7 +30,7 @@ use std::{fmt, isize, mem};
|
||||||
use style::computed_values::{display, overflow_x, position, text_align, text_justify};
|
use style::computed_values::{display, overflow_x, position, text_align, text_justify};
|
||||||
use style::computed_values::{text_overflow, vertical_align, white_space};
|
use style::computed_values::{text_overflow, vertical_align, white_space};
|
||||||
use style::logical_geometry::{LogicalRect, LogicalSize, WritingMode};
|
use style::logical_geometry::{LogicalRect, LogicalSize, WritingMode};
|
||||||
use style::properties::{ServoComputedValues, TComputedValues};
|
use style::properties::{ComputedValues, ServoComputedValues};
|
||||||
use style::values::computed::LengthOrPercentage;
|
use style::values::computed::LengthOrPercentage;
|
||||||
use text;
|
use text;
|
||||||
use unicode_bidi;
|
use unicode_bidi;
|
||||||
|
|
|
@ -72,7 +72,7 @@ use style::error_reporting::ParseErrorReporter;
|
||||||
use style::logical_geometry::LogicalPoint;
|
use style::logical_geometry::LogicalPoint;
|
||||||
use style::media_queries::{Device, MediaType};
|
use style::media_queries::{Device, MediaType};
|
||||||
use style::parallel::WorkQueueData;
|
use style::parallel::WorkQueueData;
|
||||||
use style::properties::TComputedValues;
|
use style::properties::ComputedValues;
|
||||||
use style::selector_impl::ServoSelectorImpl;
|
use style::selector_impl::ServoSelectorImpl;
|
||||||
use style::selector_matching::USER_OR_USER_AGENT_STYLESHEETS;
|
use style::selector_matching::USER_OR_USER_AGENT_STYLESHEETS;
|
||||||
use style::servo::{SharedStyleContext, Stylesheet, Stylist};
|
use style::servo::{SharedStyleContext, Stylesheet, Stylist};
|
||||||
|
|
|
@ -23,7 +23,7 @@ use inline::InlineMetrics;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use style::computed_values::{list_style_type, position};
|
use style::computed_values::{list_style_type, position};
|
||||||
use style::logical_geometry::LogicalSize;
|
use style::logical_geometry::LogicalSize;
|
||||||
use style::properties::{ServoComputedValues, TComputedValues};
|
use style::properties::{ComputedValues, ServoComputedValues};
|
||||||
use text;
|
use text;
|
||||||
|
|
||||||
/// A block with the CSS `display` property equal to `list-item`.
|
/// A block with the CSS `display` property equal to `list-item`.
|
||||||
|
|
|
@ -13,7 +13,7 @@ use std::cmp::{max, min};
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use style::computed_values::transform::ComputedMatrix;
|
use style::computed_values::transform::ComputedMatrix;
|
||||||
use style::logical_geometry::LogicalMargin;
|
use style::logical_geometry::LogicalMargin;
|
||||||
use style::properties::{ServoComputedValues, TComputedValues};
|
use style::properties::{ComputedValues, ServoComputedValues};
|
||||||
use style::values::computed::{BorderRadiusSize, LengthOrPercentageOrAuto};
|
use style::values::computed::{BorderRadiusSize, LengthOrPercentageOrAuto};
|
||||||
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrNone};
|
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrNone};
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ use std::fmt;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use style::context::StyleContext;
|
use style::context::StyleContext;
|
||||||
use style::logical_geometry::LogicalSize;
|
use style::logical_geometry::LogicalSize;
|
||||||
use style::properties::{ServoComputedValues, TComputedValues};
|
use style::properties::{ComputedValues, ServoComputedValues};
|
||||||
use style::values::computed::{LengthOrPercentageOrAuto, LengthOrPercentageOrNone};
|
use style::values::computed::{LengthOrPercentageOrAuto, LengthOrPercentageOrNone};
|
||||||
use util::print_tree::PrintTree;
|
use util::print_tree::PrintTree;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ use std::sync::{Arc, Mutex};
|
||||||
use string_cache::Atom;
|
use string_cache::Atom;
|
||||||
use style::computed_values;
|
use style::computed_values;
|
||||||
use style::logical_geometry::{WritingMode, BlockFlowDirection, InlineBaseDirection};
|
use style::logical_geometry::{WritingMode, BlockFlowDirection, InlineBaseDirection};
|
||||||
use style::properties::TComputedValues;
|
use style::properties::ComputedValues;
|
||||||
use style::properties::longhands::{display, position};
|
use style::properties::longhands::{display, position};
|
||||||
use style::properties::style_structs;
|
use style::properties::style_structs;
|
||||||
use style::selector_impl::PseudoElement;
|
use style::selector_impl::PseudoElement;
|
||||||
|
|
|
@ -25,7 +25,7 @@ use std::fmt;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use style::computed_values::{border_collapse, border_spacing, table_layout};
|
use style::computed_values::{border_collapse, border_spacing, table_layout};
|
||||||
use style::logical_geometry::LogicalSize;
|
use style::logical_geometry::LogicalSize;
|
||||||
use style::properties::{ServoComputedValues, TComputedValues};
|
use style::properties::{ComputedValues, ServoComputedValues};
|
||||||
use style::values::CSSFloat;
|
use style::values::CSSFloat;
|
||||||
use style::values::computed::LengthOrPercentageOrAuto;
|
use style::values::computed::LengthOrPercentageOrAuto;
|
||||||
use table_row::{TableRowFlow};
|
use table_row::{TableRowFlow};
|
||||||
|
|
|
@ -17,7 +17,7 @@ use gfx::display_list::{StackingContext, StackingContextId};
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use style::logical_geometry::LogicalSize;
|
use style::logical_geometry::LogicalSize;
|
||||||
use style::properties::{ServoComputedValues, TComputedValues};
|
use style::properties::{ComputedValues, ServoComputedValues};
|
||||||
use util::print_tree::PrintTree;
|
use util::print_tree::PrintTree;
|
||||||
|
|
||||||
/// A table formatting context.
|
/// A table formatting context.
|
||||||
|
|
|
@ -21,7 +21,7 @@ use std::fmt;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use style::computed_values::{border_collapse, border_top_style};
|
use style::computed_values::{border_collapse, border_top_style};
|
||||||
use style::logical_geometry::{LogicalMargin, LogicalRect, LogicalSize, WritingMode};
|
use style::logical_geometry::{LogicalMargin, LogicalRect, LogicalSize, WritingMode};
|
||||||
use style::properties::{ServoComputedValues, TComputedValues};
|
use style::properties::{ComputedValues, ServoComputedValues};
|
||||||
use table::InternalTable;
|
use table::InternalTable;
|
||||||
use table_row::{CollapsedBorder, CollapsedBorderProvenance};
|
use table_row::{CollapsedBorder, CollapsedBorderProvenance};
|
||||||
use util::print_tree::PrintTree;
|
use util::print_tree::PrintTree;
|
||||||
|
|
|
@ -18,7 +18,7 @@ use std::cmp::max;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use style::logical_geometry::LogicalSize;
|
use style::logical_geometry::LogicalSize;
|
||||||
use style::properties::{ServoComputedValues, TComputedValues};
|
use style::properties::{ComputedValues, ServoComputedValues};
|
||||||
use style::values::computed::LengthOrPercentageOrAuto;
|
use style::values::computed::LengthOrPercentageOrAuto;
|
||||||
|
|
||||||
/// A table formatting context.
|
/// A table formatting context.
|
||||||
|
|
|
@ -25,7 +25,7 @@ use std::iter::{Enumerate, IntoIterator, Peekable};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use style::computed_values::{border_collapse, border_spacing, border_top_style};
|
use style::computed_values::{border_collapse, border_spacing, border_top_style};
|
||||||
use style::logical_geometry::{LogicalSize, PhysicalSide, WritingMode};
|
use style::logical_geometry::{LogicalSize, PhysicalSide, WritingMode};
|
||||||
use style::properties::{ServoComputedValues, TComputedValues};
|
use style::properties::{ComputedValues, ServoComputedValues};
|
||||||
use style::values::computed::LengthOrPercentageOrAuto;
|
use style::values::computed::LengthOrPercentageOrAuto;
|
||||||
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, VecExt};
|
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, VecExt};
|
||||||
use table_cell::{CollapsedBordersForCell, TableCellFlow};
|
use table_cell::{CollapsedBordersForCell, TableCellFlow};
|
||||||
|
|
|
@ -21,7 +21,7 @@ use std::iter::{IntoIterator, Iterator, Peekable};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use style::computed_values::{border_collapse, border_spacing};
|
use style::computed_values::{border_collapse, border_spacing};
|
||||||
use style::logical_geometry::{LogicalSize, WritingMode};
|
use style::logical_geometry::{LogicalSize, WritingMode};
|
||||||
use style::properties::{ServoComputedValues, TComputedValues};
|
use style::properties::{ComputedValues, ServoComputedValues};
|
||||||
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, TableLikeFlow};
|
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, TableLikeFlow};
|
||||||
use table_row;
|
use table_row;
|
||||||
use util::print_tree::PrintTree;
|
use util::print_tree::PrintTree;
|
||||||
|
|
|
@ -30,7 +30,7 @@ use std::ops::Add;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use style::computed_values::{border_collapse, table_layout};
|
use style::computed_values::{border_collapse, table_layout};
|
||||||
use style::logical_geometry::LogicalSize;
|
use style::logical_geometry::LogicalSize;
|
||||||
use style::properties::{ServoComputedValues, TComputedValues};
|
use style::properties::{ComputedValues, ServoComputedValues};
|
||||||
use style::values::CSSFloat;
|
use style::values::CSSFloat;
|
||||||
use style::values::computed::LengthOrPercentageOrAuto;
|
use style::values::computed::LengthOrPercentageOrAuto;
|
||||||
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize};
|
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize};
|
||||||
|
|
|
@ -25,7 +25,7 @@ use style::computed_values::{line_height, text_orientation, text_rendering, text
|
||||||
use style::computed_values::{white_space};
|
use style::computed_values::{white_space};
|
||||||
use style::logical_geometry::{LogicalSize, WritingMode};
|
use style::logical_geometry::{LogicalSize, WritingMode};
|
||||||
use style::properties::style_structs::Font as FontStyle;
|
use style::properties::style_structs::Font as FontStyle;
|
||||||
use style::properties::{ServoComputedValues, TComputedValues};
|
use style::properties::{ComputedValues, ServoComputedValues};
|
||||||
use unicode_bidi::{is_rtl, process_text};
|
use unicode_bidi::{is_rtl, process_text};
|
||||||
use unicode_script::{get_script, Script};
|
use unicode_script::{get_script, Script};
|
||||||
use util::linked_list::split_off_head;
|
use util::linked_list::split_off_head;
|
||||||
|
|
|
@ -67,8 +67,8 @@ use style::computed_values::content::ContentItem;
|
||||||
use style::computed_values::{content, display};
|
use style::computed_values::{content, display};
|
||||||
use style::dom::{TDocument, TElement, TNode, UnsafeNode};
|
use style::dom::{TDocument, TElement, TNode, UnsafeNode};
|
||||||
use style::element_state::*;
|
use style::element_state::*;
|
||||||
|
use style::properties::{ComputedValues, ServoComputedValues};
|
||||||
use style::properties::{PropertyDeclaration, PropertyDeclarationBlock};
|
use style::properties::{PropertyDeclaration, PropertyDeclarationBlock};
|
||||||
use style::properties::{ServoComputedValues, TComputedValues};
|
|
||||||
use style::restyle_hints::ElementSnapshot;
|
use style::restyle_hints::ElementSnapshot;
|
||||||
use style::selector_impl::{NonTSPseudoClass, PseudoElement, ServoSelectorImpl};
|
use style::selector_impl::{NonTSPseudoClass, PseudoElement, ServoSelectorImpl};
|
||||||
use style::servo::PrivateStyleData;
|
use style::servo::PrivateStyleData;
|
||||||
|
|
|
@ -25,7 +25,7 @@ use properties::longhands::vertical_align::computed_value::T as VerticalAlign;
|
||||||
use properties::longhands::visibility::computed_value::T as Visibility;
|
use properties::longhands::visibility::computed_value::T as Visibility;
|
||||||
use properties::longhands::z_index::computed_value::T as ZIndex;
|
use properties::longhands::z_index::computed_value::T as ZIndex;
|
||||||
use properties::style_struct_traits::TAnimation;
|
use properties::style_struct_traits::TAnimation;
|
||||||
use properties::{ServoComputedValues, TComputedValues};
|
use properties::{ComputedValues, ServoComputedValues};
|
||||||
use std::cmp::Ordering;
|
use std::cmp::Ordering;
|
||||||
use std::iter::repeat;
|
use std::iter::repeat;
|
||||||
use std::sync::mpsc::Sender;
|
use std::sync::mpsc::Sender;
|
||||||
|
@ -930,11 +930,11 @@ impl<T> GetMod for Vec<T> {
|
||||||
/// Inserts transitions into the queue of running animations as applicable for the given style
|
/// Inserts transitions into the queue of running animations as applicable for the given style
|
||||||
/// difference. This is called from the layout worker threads. Returns true if any animations were
|
/// difference. This is called from the layout worker threads. Returns true if any animations were
|
||||||
/// kicked off and false otherwise.
|
/// kicked off and false otherwise.
|
||||||
pub fn start_transitions_if_applicable<C: TComputedValues>(new_animations_sender: &Mutex<Sender<Animation>>,
|
pub fn start_transitions_if_applicable<C: ComputedValues>(new_animations_sender: &Mutex<Sender<Animation>>,
|
||||||
node: OpaqueNode,
|
node: OpaqueNode,
|
||||||
old_style: &C,
|
old_style: &C,
|
||||||
new_style: &mut C)
|
new_style: &mut C)
|
||||||
-> bool {
|
-> bool {
|
||||||
let mut had_animations = false;
|
let mut had_animations = false;
|
||||||
for i in 0..new_style.get_animation().transition_count() {
|
for i in 0..new_style.get_animation().transition_count() {
|
||||||
// Create any property animations, if applicable.
|
// Create any property animations, if applicable.
|
||||||
|
@ -965,7 +965,7 @@ pub fn start_transitions_if_applicable<C: TComputedValues>(new_animations_sender
|
||||||
|
|
||||||
/// Updates a single animation and associated style based on the current time. If `damage` is
|
/// Updates a single animation and associated style based on the current time. If `damage` is
|
||||||
/// provided, inserts the appropriate restyle damage.
|
/// provided, inserts the appropriate restyle damage.
|
||||||
pub fn update_style_for_animation<C: TComputedValues,
|
pub fn update_style_for_animation<C: ComputedValues,
|
||||||
Damage: TRestyleDamage<ConcreteComputedValues=C>>(animation: &Animation,
|
Damage: TRestyleDamage<ConcreteComputedValues=C>>(animation: &Animation,
|
||||||
style: &mut Arc<C>,
|
style: &mut Arc<C>,
|
||||||
damage: Option<&mut Damage>) {
|
damage: Option<&mut Damage>) {
|
||||||
|
|
|
@ -8,7 +8,7 @@ use dom::OpaqueNode;
|
||||||
use error_reporting::ParseErrorReporter;
|
use error_reporting::ParseErrorReporter;
|
||||||
use euclid::Size2D;
|
use euclid::Size2D;
|
||||||
use matching::{ApplicableDeclarationsCache, StyleSharingCandidateCache};
|
use matching::{ApplicableDeclarationsCache, StyleSharingCandidateCache};
|
||||||
use properties::TComputedValues;
|
use properties::ComputedValues;
|
||||||
use selector_impl::SelectorImplExt;
|
use selector_impl::SelectorImplExt;
|
||||||
use selector_matching::Stylist;
|
use selector_matching::Stylist;
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
|
@ -55,12 +55,12 @@ pub struct SharedStyleContext<Impl: SelectorImplExt> {
|
||||||
pub error_reporter: Box<ParseErrorReporter + Sync>,
|
pub error_reporter: Box<ParseErrorReporter + Sync>,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct LocalStyleContext<C: TComputedValues> {
|
pub struct LocalStyleContext<C: ComputedValues> {
|
||||||
pub applicable_declarations_cache: RefCell<ApplicableDeclarationsCache<C>>,
|
pub applicable_declarations_cache: RefCell<ApplicableDeclarationsCache<C>>,
|
||||||
pub style_sharing_candidate_cache: RefCell<StyleSharingCandidateCache<C>>,
|
pub style_sharing_candidate_cache: RefCell<StyleSharingCandidateCache<C>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait StyleContext<'a, Impl: SelectorImplExt, C: TComputedValues> {
|
pub trait StyleContext<'a, Impl: SelectorImplExt, C: ComputedValues> {
|
||||||
|
|
||||||
fn shared_context(&self) -> &'a SharedStyleContext<Impl>;
|
fn shared_context(&self) -> &'a SharedStyleContext<Impl>;
|
||||||
fn local_context(&self) -> &LocalStyleContext<C>;
|
fn local_context(&self) -> &LocalStyleContext<C>;
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
use properties::TComputedValues;
|
use properties::ComputedValues;
|
||||||
use selectors::parser::SelectorImpl;
|
use selectors::parser::SelectorImpl;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::hash::BuildHasherDefault;
|
use std::hash::BuildHasherDefault;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::sync::atomic::AtomicIsize;
|
use std::sync::atomic::AtomicIsize;
|
||||||
|
|
||||||
pub struct PrivateStyleData<Impl: SelectorImpl, ConcreteComputedValues: TComputedValues> {
|
pub struct PrivateStyleData<Impl: SelectorImpl, ConcreteComputedValues: ComputedValues> {
|
||||||
/// The results of CSS styling for this node.
|
/// The results of CSS styling for this node.
|
||||||
pub style: Option<Arc<ConcreteComputedValues>>,
|
pub style: Option<Arc<ConcreteComputedValues>>,
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ pub struct PrivateStyleData<Impl: SelectorImpl, ConcreteComputedValues: TCompute
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<Impl, ConcreteComputedValues> PrivateStyleData<Impl, ConcreteComputedValues>
|
impl<Impl, ConcreteComputedValues> PrivateStyleData<Impl, ConcreteComputedValues>
|
||||||
where Impl: SelectorImpl, ConcreteComputedValues: TComputedValues {
|
where Impl: SelectorImpl, ConcreteComputedValues: ComputedValues {
|
||||||
pub fn new() -> PrivateStyleData<Impl, ConcreteComputedValues> {
|
pub fn new() -> PrivateStyleData<Impl, ConcreteComputedValues> {
|
||||||
PrivateStyleData {
|
PrivateStyleData {
|
||||||
style: None,
|
style: None,
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
use data::PrivateStyleData;
|
use data::PrivateStyleData;
|
||||||
use element_state::ElementState;
|
use element_state::ElementState;
|
||||||
use properties::{PropertyDeclaration, PropertyDeclarationBlock, TComputedValues};
|
use properties::{ComputedValues, PropertyDeclaration, PropertyDeclarationBlock};
|
||||||
use restyle_hints::{ElementSnapshot, RESTYLE_DESCENDANTS, RESTYLE_LATER_SIBLINGS, RESTYLE_SELF, RestyleHint};
|
use restyle_hints::{ElementSnapshot, RESTYLE_DESCENDANTS, RESTYLE_LATER_SIBLINGS, RESTYLE_SELF, RestyleHint};
|
||||||
use selector_impl::ElementExt;
|
use selector_impl::ElementExt;
|
||||||
use selectors::Element;
|
use selectors::Element;
|
||||||
|
@ -42,7 +42,7 @@ impl OpaqueNode {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait TRestyleDamage : BitOr<Output=Self> + Copy {
|
pub trait TRestyleDamage : BitOr<Output=Self> + Copy {
|
||||||
type ConcreteComputedValues: TComputedValues;
|
type ConcreteComputedValues: ComputedValues;
|
||||||
fn compute(old: Option<&Arc<Self::ConcreteComputedValues>>, new: &Self::ConcreteComputedValues) -> Self;
|
fn compute(old: Option<&Arc<Self::ConcreteComputedValues>>, new: &Self::ConcreteComputedValues) -> Self;
|
||||||
fn rebuild_and_reflow() -> Self;
|
fn rebuild_and_reflow() -> Self;
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ pub trait TNode : Sized + Copy + Clone {
|
||||||
type ConcreteElement: TElement<ConcreteNode = Self, ConcreteDocument = Self::ConcreteDocument>;
|
type ConcreteElement: TElement<ConcreteNode = Self, ConcreteDocument = Self::ConcreteDocument>;
|
||||||
type ConcreteDocument: TDocument<ConcreteNode = Self, ConcreteElement = Self::ConcreteElement>;
|
type ConcreteDocument: TDocument<ConcreteNode = Self, ConcreteElement = Self::ConcreteElement>;
|
||||||
type ConcreteRestyleDamage: TRestyleDamage<ConcreteComputedValues = Self::ConcreteComputedValues>;
|
type ConcreteRestyleDamage: TRestyleDamage<ConcreteComputedValues = Self::ConcreteComputedValues>;
|
||||||
type ConcreteComputedValues: TComputedValues;
|
type ConcreteComputedValues: ComputedValues;
|
||||||
|
|
||||||
fn to_unsafe(&self) -> UnsafeNode;
|
fn to_unsafe(&self) -> UnsafeNode;
|
||||||
unsafe fn from_unsafe(n: &UnsafeNode) -> Self;
|
unsafe fn from_unsafe(n: &UnsafeNode) -> Self;
|
||||||
|
|
|
@ -8,7 +8,7 @@ use animation::{self, Animation};
|
||||||
use context::SharedStyleContext;
|
use context::SharedStyleContext;
|
||||||
use data::PrivateStyleData;
|
use data::PrivateStyleData;
|
||||||
use dom::{TElement, TNode, TRestyleDamage};
|
use dom::{TElement, TNode, TRestyleDamage};
|
||||||
use properties::{PropertyDeclaration, TComputedValues, cascade};
|
use properties::{ComputedValues, PropertyDeclaration, cascade};
|
||||||
use selector_impl::{ElementExt, SelectorImplExt};
|
use selector_impl::{ElementExt, SelectorImplExt};
|
||||||
use selector_matching::{DeclarationBlock, Stylist};
|
use selector_matching::{DeclarationBlock, Stylist};
|
||||||
use selectors::Element;
|
use selectors::Element;
|
||||||
|
@ -151,11 +151,11 @@ impl<'a> Hash for ApplicableDeclarationsCacheQuery<'a> {
|
||||||
|
|
||||||
static APPLICABLE_DECLARATIONS_CACHE_SIZE: usize = 32;
|
static APPLICABLE_DECLARATIONS_CACHE_SIZE: usize = 32;
|
||||||
|
|
||||||
pub struct ApplicableDeclarationsCache<C: TComputedValues> {
|
pub struct ApplicableDeclarationsCache<C: ComputedValues> {
|
||||||
cache: SimpleHashCache<ApplicableDeclarationsCacheEntry, Arc<C>>,
|
cache: SimpleHashCache<ApplicableDeclarationsCacheEntry, Arc<C>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<C: TComputedValues> ApplicableDeclarationsCache<C> {
|
impl<C: ComputedValues> ApplicableDeclarationsCache<C> {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
ApplicableDeclarationsCache {
|
ApplicableDeclarationsCache {
|
||||||
cache: SimpleHashCache::new(APPLICABLE_DECLARATIONS_CACHE_SIZE),
|
cache: SimpleHashCache::new(APPLICABLE_DECLARATIONS_CACHE_SIZE),
|
||||||
|
@ -179,12 +179,12 @@ impl<C: TComputedValues> ApplicableDeclarationsCache<C> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An LRU cache of the last few nodes seen, so that we can aggressively try to reuse their styles.
|
/// An LRU cache of the last few nodes seen, so that we can aggressively try to reuse their styles.
|
||||||
pub struct StyleSharingCandidateCache<C: TComputedValues> {
|
pub struct StyleSharingCandidateCache<C: ComputedValues> {
|
||||||
cache: LRUCache<StyleSharingCandidate<C>, ()>,
|
cache: LRUCache<StyleSharingCandidate<C>, ()>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct StyleSharingCandidate<C: TComputedValues> {
|
pub struct StyleSharingCandidate<C: ComputedValues> {
|
||||||
pub style: Arc<C>,
|
pub style: Arc<C>,
|
||||||
pub parent_style: Arc<C>,
|
pub parent_style: Arc<C>,
|
||||||
pub local_name: Atom,
|
pub local_name: Atom,
|
||||||
|
@ -195,7 +195,7 @@ pub struct StyleSharingCandidate<C: TComputedValues> {
|
||||||
pub link: bool,
|
pub link: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<C: TComputedValues> PartialEq for StyleSharingCandidate<C> {
|
impl<C: ComputedValues> PartialEq for StyleSharingCandidate<C> {
|
||||||
fn eq(&self, other: &Self) -> bool {
|
fn eq(&self, other: &Self) -> bool {
|
||||||
arc_ptr_eq(&self.style, &other.style) &&
|
arc_ptr_eq(&self.style, &other.style) &&
|
||||||
arc_ptr_eq(&self.parent_style, &other.parent_style) &&
|
arc_ptr_eq(&self.parent_style, &other.parent_style) &&
|
||||||
|
@ -207,7 +207,7 @@ impl<C: TComputedValues> PartialEq for StyleSharingCandidate<C> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<C: TComputedValues> StyleSharingCandidate<C> {
|
impl<C: ComputedValues> StyleSharingCandidate<C> {
|
||||||
/// Attempts to create a style sharing candidate from this node. Returns
|
/// Attempts to create a style sharing candidate from this node. Returns
|
||||||
/// the style sharing candidate or `None` if this node is ineligible for
|
/// the style sharing candidate or `None` if this node is ineligible for
|
||||||
/// style sharing.
|
/// style sharing.
|
||||||
|
@ -332,7 +332,7 @@ impl<C: TComputedValues> StyleSharingCandidate<C> {
|
||||||
|
|
||||||
static STYLE_SHARING_CANDIDATE_CACHE_SIZE: usize = 40;
|
static STYLE_SHARING_CANDIDATE_CACHE_SIZE: usize = 40;
|
||||||
|
|
||||||
impl<C: TComputedValues> StyleSharingCandidateCache<C> {
|
impl<C: ComputedValues> StyleSharingCandidateCache<C> {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
StyleSharingCandidateCache {
|
StyleSharingCandidateCache {
|
||||||
cache: LRUCache::new(STYLE_SHARING_CANDIDATE_CACHE_SIZE),
|
cache: LRUCache::new(STYLE_SHARING_CANDIDATE_CACHE_SIZE),
|
||||||
|
|
|
@ -139,7 +139,7 @@ pub mod longhands {
|
||||||
use error_reporting::ParseErrorReporter;
|
use error_reporting::ParseErrorReporter;
|
||||||
use properties::longhands;
|
use properties::longhands;
|
||||||
use properties::property_bit_field::PropertyBitField;
|
use properties::property_bit_field::PropertyBitField;
|
||||||
use properties::{ServoComputedValues, PropertyDeclaration, TComputedValues};
|
use properties::{ComputedValues, ServoComputedValues, PropertyDeclaration};
|
||||||
use properties::style_struct_traits::T${THIS_STYLE_STRUCT.name};
|
use properties::style_struct_traits::T${THIS_STYLE_STRUCT.name};
|
||||||
use properties::style_structs;
|
use properties::style_structs;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
@ -149,7 +149,7 @@ pub mod longhands {
|
||||||
use string_cache::Atom;
|
use string_cache::Atom;
|
||||||
${caller.body()}
|
${caller.body()}
|
||||||
#[allow(unused_variables)]
|
#[allow(unused_variables)]
|
||||||
pub fn cascade_property<C: TComputedValues>(
|
pub fn cascade_property<C: ComputedValues>(
|
||||||
declaration: &PropertyDeclaration,
|
declaration: &PropertyDeclaration,
|
||||||
inherited_style: &C,
|
inherited_style: &C,
|
||||||
context: &mut computed::Context<C>,
|
context: &mut computed::Context<C>,
|
||||||
|
@ -505,7 +505,7 @@ pub mod longhands {
|
||||||
|
|
||||||
impl ComputedValueAsSpecified for SpecifiedValue {}
|
impl ComputedValueAsSpecified for SpecifiedValue {}
|
||||||
|
|
||||||
fn cascade_property_custom<C: TComputedValues>(
|
fn cascade_property_custom<C: ComputedValues>(
|
||||||
_declaration: &PropertyDeclaration,
|
_declaration: &PropertyDeclaration,
|
||||||
_inherited_style: &C,
|
_inherited_style: &C,
|
||||||
context: &mut computed::Context<C>,
|
context: &mut computed::Context<C>,
|
||||||
|
@ -2200,7 +2200,7 @@ pub mod longhands {
|
||||||
if !empty { Ok(result) } else { Err(()) }
|
if !empty { Ok(result) } else { Err(()) }
|
||||||
}
|
}
|
||||||
|
|
||||||
fn cascade_property_custom<C: TComputedValues>(
|
fn cascade_property_custom<C: ComputedValues>(
|
||||||
_declaration: &PropertyDeclaration,
|
_declaration: &PropertyDeclaration,
|
||||||
_inherited_style: &C,
|
_inherited_style: &C,
|
||||||
context: &mut computed::Context<C>,
|
context: &mut computed::Context<C>,
|
||||||
|
@ -6231,7 +6231,7 @@ pub mod style_structs {
|
||||||
% endfor
|
% endfor
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait TComputedValues : Clone + Send + Sync + 'static {
|
pub trait ComputedValues : Clone + Send + Sync + 'static {
|
||||||
% for style_struct in STYLE_STRUCTS:
|
% for style_struct in STYLE_STRUCTS:
|
||||||
type Concrete${style_struct.name}: style_struct_traits::T${style_struct.name};
|
type Concrete${style_struct.name}: style_struct_traits::T${style_struct.name};
|
||||||
% endfor
|
% endfor
|
||||||
|
@ -6280,7 +6280,7 @@ pub struct ServoComputedValues {
|
||||||
pub root_font_size: Au,
|
pub root_font_size: Au,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TComputedValues for ServoComputedValues {
|
impl ComputedValues for ServoComputedValues {
|
||||||
% for style_struct in STYLE_STRUCTS:
|
% for style_struct in STYLE_STRUCTS:
|
||||||
type Concrete${style_struct.name} = style_structs::${style_struct.name};
|
type Concrete${style_struct.name} = style_structs::${style_struct.name};
|
||||||
% endfor
|
% endfor
|
||||||
|
@ -6586,7 +6586,7 @@ lazy_static! {
|
||||||
|
|
||||||
/// Fast path for the function below. Only computes new inherited styles.
|
/// Fast path for the function below. Only computes new inherited styles.
|
||||||
#[allow(unused_mut, unused_imports)]
|
#[allow(unused_mut, unused_imports)]
|
||||||
fn cascade_with_cached_declarations<C: TComputedValues>(
|
fn cascade_with_cached_declarations<C: ComputedValues>(
|
||||||
viewport_size: Size2D<Au>,
|
viewport_size: Size2D<Au>,
|
||||||
applicable_declarations: &[DeclarationBlock<Vec<PropertyDeclaration>>],
|
applicable_declarations: &[DeclarationBlock<Vec<PropertyDeclaration>>],
|
||||||
shareable: bool,
|
shareable: bool,
|
||||||
|
@ -6692,7 +6692,7 @@ fn cascade_with_cached_declarations<C: TComputedValues>(
|
||||||
context.style
|
context.style
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type CascadePropertyFn<C: TComputedValues> =
|
pub type CascadePropertyFn<C: ComputedValues> =
|
||||||
extern "Rust" fn(declaration: &PropertyDeclaration,
|
extern "Rust" fn(declaration: &PropertyDeclaration,
|
||||||
inherited_style: &C,
|
inherited_style: &C,
|
||||||
context: &mut computed::Context<C>,
|
context: &mut computed::Context<C>,
|
||||||
|
@ -6739,7 +6739,7 @@ thread_local!(static CASCADE_PROPERTY: Vec<Option<CascadePropertyFn<ServoCompute
|
||||||
/// this is ignored.
|
/// this is ignored.
|
||||||
///
|
///
|
||||||
/// Returns the computed values and a boolean indicating whether the result is cacheable.
|
/// Returns the computed values and a boolean indicating whether the result is cacheable.
|
||||||
pub fn cascade<C: TComputedValues>(
|
pub fn cascade<C: ComputedValues>(
|
||||||
viewport_size: Size2D<Au>,
|
viewport_size: Size2D<Au>,
|
||||||
applicable_declarations: &[DeclarationBlock<Vec<PropertyDeclaration>>],
|
applicable_declarations: &[DeclarationBlock<Vec<PropertyDeclaration>>],
|
||||||
shareable: bool,
|
shareable: bool,
|
||||||
|
|
|
@ -1436,7 +1436,7 @@ pub mod specified {
|
||||||
pub mod computed {
|
pub mod computed {
|
||||||
use app_units::Au;
|
use app_units::Au;
|
||||||
use euclid::size::Size2D;
|
use euclid::size::Size2D;
|
||||||
use properties::TComputedValues;
|
use properties::ComputedValues;
|
||||||
use properties::style_struct_traits::TFont;
|
use properties::style_struct_traits::TFont;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use super::AuExtensionMethods;
|
use super::AuExtensionMethods;
|
||||||
|
@ -1447,7 +1447,7 @@ pub mod computed {
|
||||||
pub use super::specified::{Angle, BorderStyle, Time};
|
pub use super::specified::{Angle, BorderStyle, Time};
|
||||||
|
|
||||||
pub trait TContext {
|
pub trait TContext {
|
||||||
type ConcreteComputedValues: TComputedValues;
|
type ConcreteComputedValues: ComputedValues;
|
||||||
fn is_root_element(&self) -> bool;
|
fn is_root_element(&self) -> bool;
|
||||||
fn viewport_size(&self) -> Size2D<Au>;
|
fn viewport_size(&self) -> Size2D<Au>;
|
||||||
fn inherited_style(&self) -> &Self::ConcreteComputedValues;
|
fn inherited_style(&self) -> &Self::ConcreteComputedValues;
|
||||||
|
@ -1455,7 +1455,7 @@ pub mod computed {
|
||||||
fn mutate_style(&mut self) -> &mut Self::ConcreteComputedValues;
|
fn mutate_style(&mut self) -> &mut Self::ConcreteComputedValues;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Context<'a, C: TComputedValues> {
|
pub struct Context<'a, C: ComputedValues> {
|
||||||
pub is_root_element: bool,
|
pub is_root_element: bool,
|
||||||
pub viewport_size: Size2D<Au>,
|
pub viewport_size: Size2D<Au>,
|
||||||
pub inherited_style: &'a C,
|
pub inherited_style: &'a C,
|
||||||
|
@ -1465,7 +1465,7 @@ pub mod computed {
|
||||||
pub style: C,
|
pub style: C,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, C: TComputedValues> TContext for Context<'a, C> {
|
impl<'a, C: ComputedValues> TContext for Context<'a, C> {
|
||||||
type ConcreteComputedValues = C;
|
type ConcreteComputedValues = C;
|
||||||
fn is_root_element(&self) -> bool { self.is_root_element }
|
fn is_root_element(&self) -> bool { self.is_root_element }
|
||||||
fn viewport_size(&self) -> Size2D<Au> { self.viewport_size }
|
fn viewport_size(&self) -> Size2D<Au> { self.viewport_size }
|
||||||
|
|
|
@ -8,7 +8,7 @@ use cssparser::{AtRuleParser, DeclarationListParser, DeclarationParser, Parser,
|
||||||
use euclid::scale_factor::ScaleFactor;
|
use euclid::scale_factor::ScaleFactor;
|
||||||
use euclid::size::{Size2D, TypedSize2D};
|
use euclid::size::{Size2D, TypedSize2D};
|
||||||
use parser::{ParserContext, log_css_error};
|
use parser::{ParserContext, log_css_error};
|
||||||
use properties::{ServoComputedValues, TComputedValues};
|
use properties::{ComputedValues, ServoComputedValues};
|
||||||
use std::ascii::AsciiExt;
|
use std::ascii::AsciiExt;
|
||||||
use std::collections::hash_map::{Entry, HashMap};
|
use std::collections::hash_map::{Entry, HashMap};
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
|
@ -6,7 +6,7 @@ use app_units::Au;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use style::custom_properties::ComputedValuesMap;
|
use style::custom_properties::ComputedValuesMap;
|
||||||
use style::logical_geometry::WritingMode;
|
use style::logical_geometry::WritingMode;
|
||||||
use style::properties::{CascadePropertyFn, ServoComputedValues, TComputedValues};
|
use style::properties::{CascadePropertyFn, ServoComputedValues, ComputedValues};
|
||||||
use style::properties::longhands;
|
use style::properties::longhands;
|
||||||
use style::properties::style_struct_traits::*;
|
use style::properties::style_struct_traits::*;
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ pub struct GeckoComputedValues {
|
||||||
pub root_font_size: Au,
|
pub root_font_size: Au,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TComputedValues for GeckoComputedValues {
|
impl ComputedValues for GeckoComputedValues {
|
||||||
% for style_struct in STYLE_STRUCTS:
|
% for style_struct in STYLE_STRUCTS:
|
||||||
type Concrete${style_struct.name} = Gecko${style_struct.name};
|
type Concrete${style_struct.name} = Gecko${style_struct.name};
|
||||||
% endfor
|
% endfor
|
||||||
|
|
|
@ -25,7 +25,7 @@ extern crate util;
|
||||||
|
|
||||||
#[cfg(test)] mod writing_modes {
|
#[cfg(test)] mod writing_modes {
|
||||||
use style::logical_geometry::WritingMode;
|
use style::logical_geometry::WritingMode;
|
||||||
use style::properties::{INITIAL_SERVO_VALUES, TComputedValues, get_writing_mode};
|
use style::properties::{INITIAL_SERVO_VALUES, ComputedValues, get_writing_mode};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn initial_writing_mode_is_empty() {
|
fn initial_writing_mode_is_empty() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue