diff --git a/components/gfx/display_list/mod.rs b/components/gfx/display_list/mod.rs index 828d4c443fd3..96eeebe84b1c 100644 --- a/components/gfx/display_list/mod.rs +++ b/components/gfx/display_list/mod.rs @@ -41,7 +41,7 @@ use std::ops::{Deref, DerefMut}; use std::sync::Arc; use style::computed_values::{border_style, cursor, filter, image_rendering, mix_blend_mode}; use style::computed_values::{pointer_events}; -use style::properties::{ServoComputedValues, TComputedValues}; +use style::properties::{ComputedValues, ServoComputedValues}; use style_traits::cursor::Cursor; use text::TextRun; use text::glyph::CharIndex; diff --git a/components/layout/block.rs b/components/layout/block.rs index 73836d09ec14..9eab35bc49a3 100644 --- a/components/layout/block.rs +++ b/components/layout/block.rs @@ -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::context::StyleContext; 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::{LengthOrPercentage, LengthOrPercentageOrAuto}; use util::geometry::MAX_RECT; diff --git a/components/layout/construct.rs b/components/layout/construct.rs index 050eb9d98574..2fa02c8aa114 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -45,7 +45,7 @@ use std::sync::atomic::Ordering; use style::computed_values::content::ContentItem; use style::computed_values::{caption_side, display, empty_cells, float, list_style_position}; use style::computed_values::{position}; -use style::properties::{self, ServoComputedValues, TComputedValues}; +use style::properties::{self, ComputedValues, ServoComputedValues}; use table::TableFlow; use table_caption::TableCaptionFlow; use table_cell::TableCellFlow; diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs index db43ddc71f06..7c65db972cf5 100644 --- a/components/layout/display_list_builder.rs +++ b/components/layout/display_list_builder.rs @@ -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::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize, WritingMode}; 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::computed; use style::values::computed::{LengthOrNone, LengthOrPercentage, LengthOrPercentageOrAuto, LinearGradient}; diff --git a/components/layout/flex.rs b/components/layout/flex.rs index 3e8f004f8226..82699910d8d4 100644 --- a/components/layout/flex.rs +++ b/components/layout/flex.rs @@ -28,7 +28,7 @@ use std::sync::Arc; use style::computed_values::flex_direction; use style::logical_geometry::LogicalSize; use style::properties::style_structs; -use style::properties::{ServoComputedValues, TComputedValues}; +use style::properties::{ComputedValues, ServoComputedValues}; use style::values::computed::LengthOrPercentageOrAuto; // A mode describes which logical axis a flex axis is parallel with. diff --git a/components/layout/flow.rs b/components/layout/flow.rs index 73f7bc851524..41f502d57709 100644 --- a/components/layout/flow.rs +++ b/components/layout/flow.rs @@ -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::dom::TRestyleDamage; 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 table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, TableFlow}; use table_caption::TableCaptionFlow; diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs index 6c48142a2c57..0f54d9361ff7 100644 --- a/components/layout/fragment.rs +++ b/components/layout/fragment.rs @@ -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::dom::TRestyleDamage; 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::{LengthOrPercentageOrNone}; use text; diff --git a/components/layout/generated_content.rs b/components/layout/generated_content.rs index d4be74f9a4d7..73acba2a3621 100644 --- a/components/layout/generated_content.rs +++ b/components/layout/generated_content.rs @@ -20,7 +20,7 @@ use std::sync::Arc; use style::computed_values::content::ContentItem; use style::computed_values::{display, list_style_type}; use style::dom::TRestyleDamage; -use style::properties::{ServoComputedValues, TComputedValues}; +use style::properties::{ComputedValues, ServoComputedValues}; use text::TextRunScanner; use wrapper::PseudoElementType; diff --git a/components/layout/incremental.rs b/components/layout/incremental.rs index d28cdae548c9..df63fa43af49 100644 --- a/components/layout/incremental.rs +++ b/components/layout/incremental.rs @@ -7,7 +7,7 @@ use std::fmt; use std::sync::Arc; use style::computed_values::float; use style::dom::TRestyleDamage; -use style::properties::{ServoComputedValues, TComputedValues}; +use style::properties::{ComputedValues, ServoComputedValues}; bitflags! { #[doc = "Individual layout actions that may be necessary after restyling."] diff --git a/components/layout/inline.rs b/components/layout/inline.rs index ff3fef3b7cb3..7cfa976de4b7 100644 --- a/components/layout/inline.rs +++ b/components/layout/inline.rs @@ -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::{text_overflow, vertical_align, white_space}; use style::logical_geometry::{LogicalRect, LogicalSize, WritingMode}; -use style::properties::{ServoComputedValues, TComputedValues}; +use style::properties::{ComputedValues, ServoComputedValues}; use style::values::computed::LengthOrPercentage; use text; use unicode_bidi; diff --git a/components/layout/layout_thread.rs b/components/layout/layout_thread.rs index 6e8ab8635f94..c1e882f2a320 100644 --- a/components/layout/layout_thread.rs +++ b/components/layout/layout_thread.rs @@ -72,7 +72,7 @@ use style::error_reporting::ParseErrorReporter; use style::logical_geometry::LogicalPoint; use style::media_queries::{Device, MediaType}; use style::parallel::WorkQueueData; -use style::properties::TComputedValues; +use style::properties::ComputedValues; use style::selector_impl::ServoSelectorImpl; use style::selector_matching::USER_OR_USER_AGENT_STYLESHEETS; use style::servo::{SharedStyleContext, Stylesheet, Stylist}; diff --git a/components/layout/list_item.rs b/components/layout/list_item.rs index f89b53b24616..d499d2a08b3b 100644 --- a/components/layout/list_item.rs +++ b/components/layout/list_item.rs @@ -23,7 +23,7 @@ use inline::InlineMetrics; use std::sync::Arc; use style::computed_values::{list_style_type, position}; use style::logical_geometry::LogicalSize; -use style::properties::{ServoComputedValues, TComputedValues}; +use style::properties::{ComputedValues, ServoComputedValues}; use text; /// A block with the CSS `display` property equal to `list-item`. diff --git a/components/layout/model.rs b/components/layout/model.rs index 516358fe798b..8274aac443a1 100644 --- a/components/layout/model.rs +++ b/components/layout/model.rs @@ -13,7 +13,7 @@ use std::cmp::{max, min}; use std::fmt; use style::computed_values::transform::ComputedMatrix; 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::{LengthOrPercentage, LengthOrPercentageOrNone}; diff --git a/components/layout/multicol.rs b/components/layout/multicol.rs index 7ee8fca9a3f9..a4e532c3b0a3 100644 --- a/components/layout/multicol.rs +++ b/components/layout/multicol.rs @@ -21,7 +21,7 @@ use std::fmt; use std::sync::Arc; use style::context::StyleContext; use style::logical_geometry::LogicalSize; -use style::properties::{ServoComputedValues, TComputedValues}; +use style::properties::{ComputedValues, ServoComputedValues}; use style::values::computed::{LengthOrPercentageOrAuto, LengthOrPercentageOrNone}; use util::print_tree::PrintTree; diff --git a/components/layout/query.rs b/components/layout/query.rs index e05564f1acaa..a998f1dae136 100644 --- a/components/layout/query.rs +++ b/components/layout/query.rs @@ -27,7 +27,7 @@ use std::sync::{Arc, Mutex}; use string_cache::Atom; use style::computed_values; use style::logical_geometry::{WritingMode, BlockFlowDirection, InlineBaseDirection}; -use style::properties::TComputedValues; +use style::properties::ComputedValues; use style::properties::longhands::{display, position}; use style::properties::style_structs; use style::selector_impl::PseudoElement; diff --git a/components/layout/table.rs b/components/layout/table.rs index 1e68542c1506..8c66f7fb66bf 100644 --- a/components/layout/table.rs +++ b/components/layout/table.rs @@ -25,7 +25,7 @@ use std::fmt; use std::sync::Arc; use style::computed_values::{border_collapse, border_spacing, table_layout}; use style::logical_geometry::LogicalSize; -use style::properties::{ServoComputedValues, TComputedValues}; +use style::properties::{ComputedValues, ServoComputedValues}; use style::values::CSSFloat; use style::values::computed::LengthOrPercentageOrAuto; use table_row::{TableRowFlow}; diff --git a/components/layout/table_caption.rs b/components/layout/table_caption.rs index f0159e2bab7c..0d4d9f91cc25 100644 --- a/components/layout/table_caption.rs +++ b/components/layout/table_caption.rs @@ -17,7 +17,7 @@ use gfx::display_list::{StackingContext, StackingContextId}; use std::fmt; use std::sync::Arc; use style::logical_geometry::LogicalSize; -use style::properties::{ServoComputedValues, TComputedValues}; +use style::properties::{ComputedValues, ServoComputedValues}; use util::print_tree::PrintTree; /// A table formatting context. diff --git a/components/layout/table_cell.rs b/components/layout/table_cell.rs index 4230fc99e00d..2e7b96464d5a 100644 --- a/components/layout/table_cell.rs +++ b/components/layout/table_cell.rs @@ -21,7 +21,7 @@ use std::fmt; use std::sync::Arc; use style::computed_values::{border_collapse, border_top_style}; use style::logical_geometry::{LogicalMargin, LogicalRect, LogicalSize, WritingMode}; -use style::properties::{ServoComputedValues, TComputedValues}; +use style::properties::{ComputedValues, ServoComputedValues}; use table::InternalTable; use table_row::{CollapsedBorder, CollapsedBorderProvenance}; use util::print_tree::PrintTree; diff --git a/components/layout/table_colgroup.rs b/components/layout/table_colgroup.rs index 04ccadffada6..0bd52ecc55c4 100644 --- a/components/layout/table_colgroup.rs +++ b/components/layout/table_colgroup.rs @@ -18,7 +18,7 @@ use std::cmp::max; use std::fmt; use std::sync::Arc; use style::logical_geometry::LogicalSize; -use style::properties::{ServoComputedValues, TComputedValues}; +use style::properties::{ComputedValues, ServoComputedValues}; use style::values::computed::LengthOrPercentageOrAuto; /// A table formatting context. diff --git a/components/layout/table_row.rs b/components/layout/table_row.rs index 6694fd5775c4..1d8d50c822fb 100644 --- a/components/layout/table_row.rs +++ b/components/layout/table_row.rs @@ -25,7 +25,7 @@ use std::iter::{Enumerate, IntoIterator, Peekable}; use std::sync::Arc; use style::computed_values::{border_collapse, border_spacing, border_top_style}; use style::logical_geometry::{LogicalSize, PhysicalSide, WritingMode}; -use style::properties::{ServoComputedValues, TComputedValues}; +use style::properties::{ComputedValues, ServoComputedValues}; use style::values::computed::LengthOrPercentageOrAuto; use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, VecExt}; use table_cell::{CollapsedBordersForCell, TableCellFlow}; diff --git a/components/layout/table_rowgroup.rs b/components/layout/table_rowgroup.rs index 887049f30833..202d604a758a 100644 --- a/components/layout/table_rowgroup.rs +++ b/components/layout/table_rowgroup.rs @@ -21,7 +21,7 @@ use std::iter::{IntoIterator, Iterator, Peekable}; use std::sync::Arc; use style::computed_values::{border_collapse, border_spacing}; use style::logical_geometry::{LogicalSize, WritingMode}; -use style::properties::{ServoComputedValues, TComputedValues}; +use style::properties::{ComputedValues, ServoComputedValues}; use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, TableLikeFlow}; use table_row; use util::print_tree::PrintTree; diff --git a/components/layout/table_wrapper.rs b/components/layout/table_wrapper.rs index 70b9a9e4e50f..e9e6ff3a86ad 100644 --- a/components/layout/table_wrapper.rs +++ b/components/layout/table_wrapper.rs @@ -30,7 +30,7 @@ use std::ops::Add; use std::sync::Arc; use style::computed_values::{border_collapse, table_layout}; use style::logical_geometry::LogicalSize; -use style::properties::{ServoComputedValues, TComputedValues}; +use style::properties::{ComputedValues, ServoComputedValues}; use style::values::CSSFloat; use style::values::computed::LengthOrPercentageOrAuto; use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize}; diff --git a/components/layout/text.rs b/components/layout/text.rs index db9b8f13376f..608b40769879 100644 --- a/components/layout/text.rs +++ b/components/layout/text.rs @@ -25,7 +25,7 @@ use style::computed_values::{line_height, text_orientation, text_rendering, text use style::computed_values::{white_space}; use style::logical_geometry::{LogicalSize, WritingMode}; 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_script::{get_script, Script}; use util::linked_list::split_off_head; diff --git a/components/layout/wrapper.rs b/components/layout/wrapper.rs index abf74805a803..387e5238d07d 100644 --- a/components/layout/wrapper.rs +++ b/components/layout/wrapper.rs @@ -67,8 +67,8 @@ use style::computed_values::content::ContentItem; use style::computed_values::{content, display}; use style::dom::{TDocument, TElement, TNode, UnsafeNode}; use style::element_state::*; +use style::properties::{ComputedValues, ServoComputedValues}; use style::properties::{PropertyDeclaration, PropertyDeclarationBlock}; -use style::properties::{ServoComputedValues, TComputedValues}; use style::restyle_hints::ElementSnapshot; use style::selector_impl::{NonTSPseudoClass, PseudoElement, ServoSelectorImpl}; use style::servo::PrivateStyleData; diff --git a/components/style/animation.rs b/components/style/animation.rs index 42fb90e0561e..7413270a66fd 100644 --- a/components/style/animation.rs +++ b/components/style/animation.rs @@ -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::z_index::computed_value::T as ZIndex; use properties::style_struct_traits::TAnimation; -use properties::{ServoComputedValues, TComputedValues}; +use properties::{ComputedValues, ServoComputedValues}; use std::cmp::Ordering; use std::iter::repeat; use std::sync::mpsc::Sender; @@ -930,11 +930,11 @@ impl GetMod for Vec { /// 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 /// kicked off and false otherwise. -pub fn start_transitions_if_applicable(new_animations_sender: &Mutex>, - node: OpaqueNode, - old_style: &C, - new_style: &mut C) - -> bool { +pub fn start_transitions_if_applicable(new_animations_sender: &Mutex>, + node: OpaqueNode, + old_style: &C, + new_style: &mut C) + -> bool { let mut had_animations = false; for i in 0..new_style.get_animation().transition_count() { // Create any property animations, if applicable. @@ -965,7 +965,7 @@ pub fn start_transitions_if_applicable(new_animations_sender /// Updates a single animation and associated style based on the current time. If `damage` is /// provided, inserts the appropriate restyle damage. -pub fn update_style_for_animation>(animation: &Animation, style: &mut Arc, damage: Option<&mut Damage>) { diff --git a/components/style/context.rs b/components/style/context.rs index ef19bc2561e5..f5bf81274ee9 100644 --- a/components/style/context.rs +++ b/components/style/context.rs @@ -8,7 +8,7 @@ use dom::OpaqueNode; use error_reporting::ParseErrorReporter; use euclid::Size2D; use matching::{ApplicableDeclarationsCache, StyleSharingCandidateCache}; -use properties::TComputedValues; +use properties::ComputedValues; use selector_impl::SelectorImplExt; use selector_matching::Stylist; use std::cell::RefCell; @@ -55,12 +55,12 @@ pub struct SharedStyleContext { pub error_reporter: Box, } -pub struct LocalStyleContext { +pub struct LocalStyleContext { pub applicable_declarations_cache: RefCell>, pub style_sharing_candidate_cache: RefCell>, } -pub trait StyleContext<'a, Impl: SelectorImplExt, C: TComputedValues> { +pub trait StyleContext<'a, Impl: SelectorImplExt, C: ComputedValues> { fn shared_context(&self) -> &'a SharedStyleContext; fn local_context(&self) -> &LocalStyleContext; diff --git a/components/style/data.rs b/components/style/data.rs index 6bc6916a5648..3698eeddf5be 100644 --- a/components/style/data.rs +++ b/components/style/data.rs @@ -2,14 +2,14 @@ * 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/. */ -use properties::TComputedValues; +use properties::ComputedValues; use selectors::parser::SelectorImpl; use std::collections::HashMap; use std::hash::BuildHasherDefault; use std::sync::Arc; use std::sync::atomic::AtomicIsize; -pub struct PrivateStyleData { +pub struct PrivateStyleData { /// The results of CSS styling for this node. pub style: Option>, @@ -22,7 +22,7 @@ pub struct PrivateStyleData PrivateStyleData - where Impl: SelectorImpl, ConcreteComputedValues: TComputedValues { + where Impl: SelectorImpl, ConcreteComputedValues: ComputedValues { pub fn new() -> PrivateStyleData { PrivateStyleData { style: None, diff --git a/components/style/dom.rs b/components/style/dom.rs index 7a332806c094..d0ba545798cd 100644 --- a/components/style/dom.rs +++ b/components/style/dom.rs @@ -6,7 +6,7 @@ use data::PrivateStyleData; 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 selector_impl::ElementExt; use selectors::Element; @@ -42,7 +42,7 @@ impl OpaqueNode { } pub trait TRestyleDamage : BitOr + Copy { - type ConcreteComputedValues: TComputedValues; + type ConcreteComputedValues: ComputedValues; fn compute(old: Option<&Arc>, new: &Self::ConcreteComputedValues) -> Self; fn rebuild_and_reflow() -> Self; } @@ -51,7 +51,7 @@ pub trait TNode : Sized + Copy + Clone { type ConcreteElement: TElement; type ConcreteDocument: TDocument; type ConcreteRestyleDamage: TRestyleDamage; - type ConcreteComputedValues: TComputedValues; + type ConcreteComputedValues: ComputedValues; fn to_unsafe(&self) -> UnsafeNode; unsafe fn from_unsafe(n: &UnsafeNode) -> Self; diff --git a/components/style/matching.rs b/components/style/matching.rs index 025e229e57c6..15407d10eca9 100644 --- a/components/style/matching.rs +++ b/components/style/matching.rs @@ -8,7 +8,7 @@ use animation::{self, Animation}; use context::SharedStyleContext; use data::PrivateStyleData; use dom::{TElement, TNode, TRestyleDamage}; -use properties::{PropertyDeclaration, TComputedValues, cascade}; +use properties::{ComputedValues, PropertyDeclaration, cascade}; use selector_impl::{ElementExt, SelectorImplExt}; use selector_matching::{DeclarationBlock, Stylist}; use selectors::Element; @@ -151,11 +151,11 @@ impl<'a> Hash for ApplicableDeclarationsCacheQuery<'a> { static APPLICABLE_DECLARATIONS_CACHE_SIZE: usize = 32; -pub struct ApplicableDeclarationsCache { +pub struct ApplicableDeclarationsCache { cache: SimpleHashCache>, } -impl ApplicableDeclarationsCache { +impl ApplicableDeclarationsCache { pub fn new() -> Self { ApplicableDeclarationsCache { cache: SimpleHashCache::new(APPLICABLE_DECLARATIONS_CACHE_SIZE), @@ -179,12 +179,12 @@ impl ApplicableDeclarationsCache { } /// An LRU cache of the last few nodes seen, so that we can aggressively try to reuse their styles. -pub struct StyleSharingCandidateCache { +pub struct StyleSharingCandidateCache { cache: LRUCache, ()>, } #[derive(Clone)] -pub struct StyleSharingCandidate { +pub struct StyleSharingCandidate { pub style: Arc, pub parent_style: Arc, pub local_name: Atom, @@ -195,7 +195,7 @@ pub struct StyleSharingCandidate { pub link: bool, } -impl PartialEq for StyleSharingCandidate { +impl PartialEq for StyleSharingCandidate { fn eq(&self, other: &Self) -> bool { arc_ptr_eq(&self.style, &other.style) && arc_ptr_eq(&self.parent_style, &other.parent_style) && @@ -207,7 +207,7 @@ impl PartialEq for StyleSharingCandidate { } } -impl StyleSharingCandidate { +impl StyleSharingCandidate { /// Attempts to create a style sharing candidate from this node. Returns /// the style sharing candidate or `None` if this node is ineligible for /// style sharing. @@ -332,7 +332,7 @@ impl StyleSharingCandidate { static STYLE_SHARING_CANDIDATE_CACHE_SIZE: usize = 40; -impl StyleSharingCandidateCache { +impl StyleSharingCandidateCache { pub fn new() -> Self { StyleSharingCandidateCache { cache: LRUCache::new(STYLE_SHARING_CANDIDATE_CACHE_SIZE), diff --git a/components/style/properties.mako.rs b/components/style/properties.mako.rs index 732989c17c14..72cb464e836b 100644 --- a/components/style/properties.mako.rs +++ b/components/style/properties.mako.rs @@ -139,7 +139,7 @@ pub mod longhands { use error_reporting::ParseErrorReporter; use properties::longhands; 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_structs; use std::collections::HashMap; @@ -149,7 +149,7 @@ pub mod longhands { use string_cache::Atom; ${caller.body()} #[allow(unused_variables)] - pub fn cascade_property( + pub fn cascade_property( declaration: &PropertyDeclaration, inherited_style: &C, context: &mut computed::Context, @@ -505,7 +505,7 @@ pub mod longhands { impl ComputedValueAsSpecified for SpecifiedValue {} - fn cascade_property_custom( + fn cascade_property_custom( _declaration: &PropertyDeclaration, _inherited_style: &C, context: &mut computed::Context, @@ -2200,7 +2200,7 @@ pub mod longhands { if !empty { Ok(result) } else { Err(()) } } - fn cascade_property_custom( + fn cascade_property_custom( _declaration: &PropertyDeclaration, _inherited_style: &C, context: &mut computed::Context, @@ -6231,7 +6231,7 @@ pub mod style_structs { % endfor } -pub trait TComputedValues : Clone + Send + Sync + 'static { +pub trait ComputedValues : Clone + Send + Sync + 'static { % for style_struct in STYLE_STRUCTS: type Concrete${style_struct.name}: style_struct_traits::T${style_struct.name}; % endfor @@ -6280,7 +6280,7 @@ pub struct ServoComputedValues { pub root_font_size: Au, } -impl TComputedValues for ServoComputedValues { +impl ComputedValues for ServoComputedValues { % for style_struct in STYLE_STRUCTS: type Concrete${style_struct.name} = style_structs::${style_struct.name}; % endfor @@ -6586,7 +6586,7 @@ lazy_static! { /// Fast path for the function below. Only computes new inherited styles. #[allow(unused_mut, unused_imports)] -fn cascade_with_cached_declarations( +fn cascade_with_cached_declarations( viewport_size: Size2D, applicable_declarations: &[DeclarationBlock>], shareable: bool, @@ -6692,7 +6692,7 @@ fn cascade_with_cached_declarations( context.style } -pub type CascadePropertyFn = +pub type CascadePropertyFn = extern "Rust" fn(declaration: &PropertyDeclaration, inherited_style: &C, context: &mut computed::Context, @@ -6739,7 +6739,7 @@ thread_local!(static CASCADE_PROPERTY: Vec( +pub fn cascade( viewport_size: Size2D, applicable_declarations: &[DeclarationBlock>], shareable: bool, diff --git a/components/style/values.rs b/components/style/values.rs index 80a9a86b7979..dff9f3935cd1 100644 --- a/components/style/values.rs +++ b/components/style/values.rs @@ -1436,7 +1436,7 @@ pub mod specified { pub mod computed { use app_units::Au; use euclid::size::Size2D; - use properties::TComputedValues; + use properties::ComputedValues; use properties::style_struct_traits::TFont; use std::fmt; use super::AuExtensionMethods; @@ -1447,7 +1447,7 @@ pub mod computed { pub use super::specified::{Angle, BorderStyle, Time}; pub trait TContext { - type ConcreteComputedValues: TComputedValues; + type ConcreteComputedValues: ComputedValues; fn is_root_element(&self) -> bool; fn viewport_size(&self) -> Size2D; fn inherited_style(&self) -> &Self::ConcreteComputedValues; @@ -1455,7 +1455,7 @@ pub mod computed { 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 viewport_size: Size2D, pub inherited_style: &'a C, @@ -1465,7 +1465,7 @@ pub mod computed { pub style: C, } - impl<'a, C: TComputedValues> TContext for Context<'a, C> { + impl<'a, C: ComputedValues> TContext for Context<'a, C> { type ConcreteComputedValues = C; fn is_root_element(&self) -> bool { self.is_root_element } fn viewport_size(&self) -> Size2D { self.viewport_size } diff --git a/components/style/viewport.rs b/components/style/viewport.rs index d0201fc57e2e..2b5d9ea3175c 100644 --- a/components/style/viewport.rs +++ b/components/style/viewport.rs @@ -8,7 +8,7 @@ use cssparser::{AtRuleParser, DeclarationListParser, DeclarationParser, Parser, use euclid::scale_factor::ScaleFactor; use euclid::size::{Size2D, TypedSize2D}; use parser::{ParserContext, log_css_error}; -use properties::{ServoComputedValues, TComputedValues}; +use properties::{ComputedValues, ServoComputedValues}; use std::ascii::AsciiExt; use std::collections::hash_map::{Entry, HashMap}; use std::fmt; diff --git a/ports/geckolib/properties.mako.rs b/ports/geckolib/properties.mako.rs index 8d7a8441069e..dfe8f06da0c9 100644 --- a/ports/geckolib/properties.mako.rs +++ b/ports/geckolib/properties.mako.rs @@ -6,7 +6,7 @@ use app_units::Au; use std::sync::Arc; use style::custom_properties::ComputedValuesMap; use style::logical_geometry::WritingMode; -use style::properties::{CascadePropertyFn, ServoComputedValues, TComputedValues}; +use style::properties::{CascadePropertyFn, ServoComputedValues, ComputedValues}; use style::properties::longhands; use style::properties::style_struct_traits::*; @@ -22,7 +22,7 @@ pub struct GeckoComputedValues { pub root_font_size: Au, } -impl TComputedValues for GeckoComputedValues { +impl ComputedValues for GeckoComputedValues { % for style_struct in STYLE_STRUCTS: type Concrete${style_struct.name} = Gecko${style_struct.name}; % endfor diff --git a/tests/unit/style/lib.rs b/tests/unit/style/lib.rs index bd4430040766..9869ff4af723 100644 --- a/tests/unit/style/lib.rs +++ b/tests/unit/style/lib.rs @@ -25,7 +25,7 @@ extern crate util; #[cfg(test)] mod writing_modes { 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] fn initial_writing_mode_is_empty() {