aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout
diff options
context:
space:
mode:
authorManish Goregaokar <manishearth@gmail.com>2017-07-17 11:41:52 -0700
committerManish Goregaokar <manishsmail@gmail.com>2017-07-17 18:02:25 -0700
commit808b1f509b7e1524cfc49f7cc1fc89fd5f8e5737 (patch)
treeb6f4e04c1d0a4e427b2360d60abb02eea8e5aec8 /components/layout
parent04b0ae64f2fe606744142e353388749fe283a8ad (diff)
downloadservo-808b1f509b7e1524cfc49f7cc1fc89fd5f8e5737.tar.gz
servo-808b1f509b7e1524cfc49f7cc1fc89fd5f8e5737.zip
stylo: Use ComputedValuesInner instead of ComputedValues when we don't need it
Diffstat (limited to 'components/layout')
-rw-r--r--components/layout/block.rs4
-rw-r--r--components/layout/construct.rs10
-rw-r--r--components/layout/display_list_builder.rs52
-rw-r--r--components/layout/flex.rs4
-rw-r--r--components/layout/flow.rs10
-rw-r--r--components/layout/fragment.rs26
-rw-r--r--components/layout/generated_content.rs8
-rw-r--r--components/layout/inline.rs12
-rw-r--r--components/layout/list_item.rs4
-rw-r--r--components/layout/model.rs6
-rw-r--r--components/layout/multicol.rs6
-rw-r--r--components/layout/table.rs4
-rw-r--r--components/layout/table_caption.rs4
-rw-r--r--components/layout/table_cell.rs4
-rw-r--r--components/layout/table_colgroup.rs4
-rw-r--r--components/layout/table_row.rs24
-rw-r--r--components/layout/table_rowgroup.rs4
-rw-r--r--components/layout/table_wrapper.rs4
-rw-r--r--components/layout/text.rs4
19 files changed, 97 insertions, 97 deletions
diff --git a/components/layout/block.rs b/components/layout/block.rs
index 6a3db5a6141..3ae8a439a4d 100644
--- a/components/layout/block.rs
+++ b/components/layout/block.rs
@@ -56,7 +56,7 @@ use style::computed_values::{border_collapse, box_sizing, display, float, overfl
use style::computed_values::{position, text_align};
use style::context::SharedStyleContext;
use style::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize, WritingMode};
-use style::properties::ServoComputedValues;
+use style::properties::ComputedValues;
use style::servo::restyle_damage::{BUBBLE_ISIZES, REFLOW, REFLOW_OUT_OF_FLOW, REPOSITION};
use style::values::computed::{LengthOrPercentageOrNone, LengthOrPercentage};
use style::values::computed::LengthOrPercentageOrAuto;
@@ -2139,7 +2139,7 @@ impl Flow for BlockFlow {
self.build_display_list_for_block(state, BorderPaintingMode::Separate);
}
- fn repair_style(&mut self, new_style: &::StyleArc<ServoComputedValues>) {
+ fn repair_style(&mut self, new_style: &::StyleArc<ComputedValues>) {
self.fragment.repair_style(new_style)
}
diff --git a/components/layout/construct.rs b/components/layout/construct.rs
index cbb4400544e..cfb92ebc78a 100644
--- a/components/layout/construct.rs
+++ b/components/layout/construct.rs
@@ -52,7 +52,7 @@ use style::computed_values::content::ContentItem;
use style::computed_values::position;
use style::context::SharedStyleContext;
use style::logical_geometry::Direction;
-use style::properties::ServoComputedValues;
+use style::properties::ComputedValues;
use style::properties::longhands::list_style_image;
use style::selector_parser::{PseudoElement, RestyleDamage};
use style::servo::restyle_damage::{BUBBLE_ISIZES, RECONSTRUCT_FLOW};
@@ -109,7 +109,7 @@ pub enum ConstructionItem {
/// Inline fragments and associated {ib} splits that have not yet found flows.
InlineFragments(InlineFragmentsConstructionResult),
/// Potentially ignorable whitespace.
- Whitespace(OpaqueNode, PseudoElementType<()>, StyleArc<ServoComputedValues>, RestyleDamage),
+ Whitespace(OpaqueNode, PseudoElementType<()>, StyleArc<ComputedValues>, RestyleDamage),
/// TableColumn Fragment
TableColumnFragment(Fragment),
}
@@ -677,7 +677,7 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
fn create_fragments_for_node_text_content(&self,
fragments: &mut IntermediateInlineFragments,
node: &ConcreteThreadSafeLayoutNode,
- style: &StyleArc<ServoComputedValues>) {
+ style: &StyleArc<ComputedValues>) {
// Fast path: If there is no text content, return immediately.
let text_content = node.text_content();
if text_content.is_empty() {
@@ -1806,7 +1806,7 @@ pub fn strip_ignorable_whitespace_from_end(this: &mut LinkedList<Fragment>) {
/// If the 'unicode-bidi' property has a value other than 'normal', return the bidi control codes
/// to inject before and after the text content of the element.
-fn bidi_control_chars(style: &StyleArc<ServoComputedValues>) -> Option<(&'static str, &'static str)> {
+fn bidi_control_chars(style: &StyleArc<ComputedValues>) -> Option<(&'static str, &'static str)> {
use style::computed_values::direction::T::*;
use style::computed_values::unicode_bidi::T::*;
@@ -1851,7 +1851,7 @@ trait ComputedValueUtils {
fn has_padding_or_border(&self) -> bool;
}
-impl ComputedValueUtils for ServoComputedValues {
+impl ComputedValueUtils for ComputedValues {
fn has_padding_or_border(&self) -> bool {
let padding = self.get_padding();
let border = self.get_border();
diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs
index 4b79c5e7a68..025a5d5f654 100644
--- a/components/layout/display_list_builder.rs
+++ b/components/layout/display_list_builder.rs
@@ -51,7 +51,7 @@ use style::computed_values::{background_attachment, background_clip, background_
use style::computed_values::{background_repeat, border_style, cursor};
use style::computed_values::{image_rendering, overflow_x, pointer_events, position, visibility};
use style::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize, WritingMode};
-use style::properties::{self, ServoComputedValues};
+use style::properties::{self, ComputedValues};
use style::properties::longhands::border_image_repeat::computed_value::RepeatKeyword;
use style::properties::style_structs;
use style::servo::restyle_damage::REPAINT;
@@ -375,14 +375,14 @@ pub trait FragmentDisplayListBuilding {
/// list if necessary.
fn build_display_list_for_background_if_applicable(&self,
state: &mut DisplayListBuildState,
- style: &ServoComputedValues,
+ style: &ComputedValues,
display_list_section: DisplayListSection,
absolute_bounds: &Rect<Au>);
/// Computes the background size for an image with the given background area according to the
/// rules in CSS-BACKGROUNDS § 3.9.
fn compute_background_image_size(&self,
- style: &ServoComputedValues,
+ style: &ComputedValues,
bounds: &Rect<Au>,
image: &WebRenderImageInfo, index: usize)
-> Size2D<Au>;
@@ -391,7 +391,7 @@ pub trait FragmentDisplayListBuilding {
/// appropriate section of the display list.
fn build_display_list_for_background_image(&self,
state: &mut DisplayListBuildState,
- style: &ServoComputedValues,
+ style: &ComputedValues,
display_list_section: DisplayListSection,
absolute_bounds: &Rect<Au>,
clip: &LocalClip,
@@ -402,7 +402,7 @@ pub trait FragmentDisplayListBuilding {
/// appropriate section of the display list.
fn build_display_list_for_webrender_image(&self,
state: &mut DisplayListBuildState,
- style: &ServoComputedValues,
+ style: &ComputedValues,
display_list_section: DisplayListSection,
absolute_bounds: &Rect<Au>,
clip: &LocalClip,
@@ -413,7 +413,7 @@ pub trait FragmentDisplayListBuilding {
/// worklet to the appropriate section of the display list.
fn build_display_list_for_background_paint_worklet(&self,
state: &mut DisplayListBuildState,
- style: &ServoComputedValues,
+ style: &ComputedValues,
display_list_section: DisplayListSection,
absolute_bounds: &Rect<Au>,
clip: &LocalClip,
@@ -443,14 +443,14 @@ pub trait FragmentDisplayListBuilding {
absolute_bounds: &Rect<Au>,
clip: &LocalClip,
gradient: &Gradient,
- style: &ServoComputedValues);
+ style: &ComputedValues);
/// Adds the display items necessary to paint the borders of this fragment to a display list if
/// necessary.
fn build_display_list_for_borders_if_applicable(
&self,
state: &mut DisplayListBuildState,
- style: &ServoComputedValues,
+ style: &ComputedValues,
border_painting_mode: BorderPaintingMode,
bounds: &Rect<Au>,
display_list_section: DisplayListSection,
@@ -460,7 +460,7 @@ pub trait FragmentDisplayListBuilding {
/// if necessary.
fn build_display_list_for_outline_if_applicable(&self,
state: &mut DisplayListBuildState,
- style: &ServoComputedValues,
+ style: &ComputedValues,
bounds: &Rect<Au>,
clip: &Rect<Au>);
@@ -468,7 +468,7 @@ pub trait FragmentDisplayListBuilding {
/// list if necessary.
fn build_display_list_for_box_shadow_if_applicable(&self,
state: &mut DisplayListBuildState,
- style: &ServoComputedValues,
+ style: &ComputedValues,
display_list_section: DisplayListSection,
absolute_bounds: &Rect<Au>,
clip: &Rect<Au>);
@@ -476,7 +476,7 @@ pub trait FragmentDisplayListBuilding {
/// Adds display items necessary to draw debug boxes around a scanned text fragment.
fn build_debug_borders_around_text_fragments(&self,
state: &mut DisplayListBuildState,
- style: &ServoComputedValues,
+ style: &ComputedValues,
stacking_relative_border_box: &Rect<Au>,
stacking_relative_content_box: &Rect<Au>,
text_fragment: &ScannedTextFragmentInfo,
@@ -607,7 +607,7 @@ fn build_border_radius(abs_bounds: &Rect<Au>,
/// Get the border radius for the rectangle inside of a rounded border. This is useful
/// for building the clip for the content inside the border.
fn build_border_radius_for_inner_rect(outer_rect: &Rect<Au>,
- style: &ServoComputedValues)
+ style: &ComputedValues)
-> BorderRadii<Au> {
let mut radii = build_border_radius(&outer_rect, style.get_border());
if radii.is_square() {
@@ -633,7 +633,7 @@ fn build_border_radius_for_inner_rect(outer_rect: &Rect<Au>,
}
fn build_inner_border_box_for_border_rect(border_box: &Rect<Au>,
- style: &ServoComputedValues)
+ style: &ComputedValues)
-> Rect<Au> {
let border_widths = style.logical_border_width().to_physical(style.writing_mode);
let mut inner_border_box = *border_box;
@@ -845,7 +845,7 @@ fn convert_ellipse_size_keyword(keyword: ShapeExtent,
impl FragmentDisplayListBuilding for Fragment {
fn build_display_list_for_background_if_applicable(&self,
state: &mut DisplayListBuildState,
- style: &ServoComputedValues,
+ style: &ComputedValues,
display_list_section: DisplayListSection,
absolute_bounds: &Rect<Au>) {
// FIXME: This causes a lot of background colors to be displayed when they are clearly not
@@ -950,7 +950,7 @@ impl FragmentDisplayListBuilding for Fragment {
}
fn compute_background_image_size(&self,
- style: &ServoComputedValues,
+ style: &ComputedValues,
bounds: &Rect<Au>,
image: &WebRenderImageInfo,
index: usize)
@@ -996,7 +996,7 @@ impl FragmentDisplayListBuilding for Fragment {
fn build_display_list_for_background_image(&self,
state: &mut DisplayListBuildState,
- style: &ServoComputedValues,
+ style: &ComputedValues,
display_list_section: DisplayListSection,
absolute_bounds: &Rect<Au>,
clip: &LocalClip,
@@ -1020,7 +1020,7 @@ impl FragmentDisplayListBuilding for Fragment {
fn build_display_list_for_webrender_image(&self,
state: &mut DisplayListBuildState,
- style: &ServoComputedValues,
+ style: &ComputedValues,
display_list_section: DisplayListSection,
absolute_bounds: &Rect<Au>,
clip: &LocalClip,
@@ -1157,7 +1157,7 @@ impl FragmentDisplayListBuilding for Fragment {
fn build_display_list_for_background_paint_worklet(&self,
state: &mut DisplayListBuildState,
- style: &ServoComputedValues,
+ style: &ComputedValues,
display_list_section: DisplayListSection,
absolute_bounds: &Rect<Au>,
clip: &LocalClip,
@@ -1338,7 +1338,7 @@ impl FragmentDisplayListBuilding for Fragment {
absolute_bounds: &Rect<Au>,
clip: &LocalClip,
gradient: &Gradient,
- style: &ServoComputedValues) {
+ style: &ComputedValues) {
let border = self.border_width().to_physical(style.writing_mode);
let mut bounds = *absolute_bounds;
bounds.origin.x = bounds.origin.x + border.left;
@@ -1380,7 +1380,7 @@ impl FragmentDisplayListBuilding for Fragment {
fn build_display_list_for_box_shadow_if_applicable(&self,
state: &mut DisplayListBuildState,
- style: &ServoComputedValues,
+ style: &ComputedValues,
display_list_section: DisplayListSection,
absolute_bounds: &Rect<Au>,
clip: &Rect<Au>) {
@@ -1423,7 +1423,7 @@ impl FragmentDisplayListBuilding for Fragment {
fn build_display_list_for_borders_if_applicable(
&self,
state: &mut DisplayListBuildState,
- style: &ServoComputedValues,
+ style: &ComputedValues,
border_painting_mode: BorderPaintingMode,
bounds: &Rect<Au>,
display_list_section: DisplayListSection,
@@ -1570,7 +1570,7 @@ impl FragmentDisplayListBuilding for Fragment {
fn build_display_list_for_outline_if_applicable(&self,
state: &mut DisplayListBuildState,
- style: &ServoComputedValues,
+ style: &ComputedValues,
bounds: &Rect<Au>,
clip: &Rect<Au>) {
use style::values::Either;
@@ -1615,7 +1615,7 @@ impl FragmentDisplayListBuilding for Fragment {
fn build_debug_borders_around_text_fragments(&self,
state: &mut DisplayListBuildState,
- style: &ServoComputedValues,
+ style: &ComputedValues,
stacking_relative_border_box: &Rect<Au>,
stacking_relative_content_box: &Rect<Au>,
text_fragment: &ScannedTextFragmentInfo,
@@ -2886,12 +2886,12 @@ impl BaseFlowDisplayListBuilding for BaseFlow {
}
}
-trait ServoComputedValuesCursorUtility {
+trait ComputedValuesCursorUtility {
fn get_cursor(&self, default_cursor: Cursor) -> Option<Cursor>;
}
-impl ServoComputedValuesCursorUtility for ServoComputedValues {
- /// Gets the cursor to use given the specific ServoComputedValues. `default_cursor` specifies
+impl ComputedValuesCursorUtility for ComputedValues {
+ /// Gets the cursor to use given the specific ComputedValues. `default_cursor` specifies
/// the cursor to use if `cursor` is `auto`. Typically, this will be `PointerCursor`, but for
/// text display items it may be `TextCursor` or `VerticalTextCursor`.
#[inline]
diff --git a/components/layout/flex.rs b/components/layout/flex.rs
index 30295eabfe7..6b2e5d3425a 100644
--- a/components/layout/flex.rs
+++ b/components/layout/flex.rs
@@ -23,7 +23,7 @@ use std::ops::Range;
use style::computed_values::{align_content, align_self, flex_direction, flex_wrap, justify_content};
use style::computed_values::border_collapse;
use style::logical_geometry::{Direction, LogicalSize};
-use style::properties::ServoComputedValues;
+use style::properties::ComputedValues;
use style::servo::restyle_damage::{REFLOW, REFLOW_OUT_OF_FLOW};
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto, LengthOrPercentageOrNone};
use style::values::computed::flex::FlexBasis;
@@ -973,7 +973,7 @@ impl Flow for FlexFlow {
self.block_flow.collect_stacking_contexts(state);
}
- fn repair_style(&mut self, new_style: &::StyleArc<ServoComputedValues>) {
+ fn repair_style(&mut self, new_style: &::StyleArc<ComputedValues>) {
self.block_flow.repair_style(new_style)
}
diff --git a/components/layout/flow.rs b/components/layout/flow.rs
index 240942ec843..be71745883f 100644
--- a/components/layout/flow.rs
+++ b/components/layout/flow.rs
@@ -52,7 +52,7 @@ use std::sync::atomic::Ordering;
use style::computed_values::{clear, float, overflow_x, position, text_align};
use style::context::SharedStyleContext;
use style::logical_geometry::{LogicalRect, LogicalSize, WritingMode};
-use style::properties::ServoComputedValues;
+use style::properties::ComputedValues;
use style::selector_parser::RestyleDamage;
use style::servo::restyle_damage::{RECONSTRUCT_FLOW, REFLOW, REFLOW_OUT_OF_FLOW, REPAINT, REPOSITION};
use style::values::computed::LengthOrPercentageOrAuto;
@@ -424,7 +424,7 @@ pub trait Flow: fmt::Debug + Sync + Send + 'static {
/// Attempts to perform incremental fixup of this flow by replacing its fragment's style with
/// the new style. This can only succeed if the flow has exactly one fragment.
- fn repair_style(&mut self, new_style: &::StyleArc<ServoComputedValues>);
+ fn repair_style(&mut self, new_style: &::StyleArc<ComputedValues>);
/// Print any extra children (such as fragments) contained in this Flow
/// for debugging purposes. Any items inserted into the tree will become
@@ -561,7 +561,7 @@ pub trait MutableFlowUtils {
/// Calls `repair_style` and `bubble_inline_sizes`. You should use this method instead of
/// calling them individually, since there is no reason not to perform both operations.
- fn repair_style_and_bubble_inline_sizes(self, style: &::StyleArc<ServoComputedValues>);
+ fn repair_style_and_bubble_inline_sizes(self, style: &::StyleArc<ComputedValues>);
}
pub trait MutableOwnedFlowUtils {
@@ -1033,7 +1033,7 @@ pub enum ForceNonfloatedFlag {
impl BaseFlow {
#[inline]
- pub fn new(style: Option<&ServoComputedValues>,
+ pub fn new(style: Option<&ComputedValues>,
writing_mode: WritingMode,
force_nonfloated: ForceNonfloatedFlag)
-> BaseFlow {
@@ -1381,7 +1381,7 @@ impl<'a> MutableFlowUtils for &'a mut Flow {
/// Calls `repair_style` and `bubble_inline_sizes`. You should use this method instead of
/// calling them individually, since there is no reason not to perform both operations.
- fn repair_style_and_bubble_inline_sizes(self, style: &::StyleArc<ServoComputedValues>) {
+ fn repair_style_and_bubble_inline_sizes(self, style: &::StyleArc<ComputedValues>) {
self.repair_style(style);
mut_base(self).update_flags_if_needed(style);
self.bubble_inline_sizes();
diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs
index b9bbe5ddd6e..9e7eaf6c72f 100644
--- a/components/layout/fragment.rs
+++ b/components/layout/fragment.rs
@@ -45,7 +45,7 @@ use style::computed_values::{overflow_wrap, overflow_x, position, text_decoratio
use style::computed_values::{transform_style, vertical_align, white_space, word_break};
use style::computed_values::content::ContentItem;
use style::logical_geometry::{Direction, LogicalMargin, LogicalRect, LogicalSize, WritingMode};
-use style::properties::ServoComputedValues;
+use style::properties::ComputedValues;
use style::selector_parser::RestyleDamage;
use style::servo::restyle_damage::RECONSTRUCT_FLOW;
use style::str::char_is_whitespace;
@@ -95,10 +95,10 @@ pub struct Fragment {
pub node: OpaqueNode,
/// The CSS style of this fragment.
- pub style: StyleArc<ServoComputedValues>,
+ pub style: StyleArc<ComputedValues>,
/// The CSS style of this fragment when it's selected
- pub selected_style: StyleArc<ServoComputedValues>,
+ pub selected_style: StyleArc<ComputedValues>,
/// The position of this fragment relative to its owning flow. The size includes padding and
/// border, but not margin.
@@ -676,8 +676,8 @@ impl Fragment {
/// Constructs a new `Fragment` instance from an opaque node.
pub fn from_opaque_node_and_style(node: OpaqueNode,
pseudo: PseudoElementType<()>,
- style: StyleArc<ServoComputedValues>,
- selected_style: StyleArc<ServoComputedValues>,
+ style: StyleArc<ComputedValues>,
+ selected_style: StyleArc<ComputedValues>,
mut restyle_damage: RestyleDamage,
specific: SpecificFragmentInfo)
-> Fragment {
@@ -706,7 +706,7 @@ impl Fragment {
/// type. For the new anonymous fragment, layout-related values (border box, etc.) are reset to
/// initial values.
pub fn create_similar_anonymous_fragment(&self,
- style: StyleArc<ServoComputedValues>,
+ style: StyleArc<ComputedValues>,
specific: SpecificFragmentInfo)
-> Fragment {
let writing_mode = style.writing_mode;
@@ -1339,7 +1339,7 @@ impl Fragment {
// Return offset from original position because of `position: relative`.
pub fn relative_position(&self, containing_block_size: &LogicalSize<Au>) -> LogicalSize<Au> {
- fn from_style(style: &ServoComputedValues, container_size: &LogicalSize<Au>)
+ fn from_style(style: &ComputedValues, container_size: &LogicalSize<Au>)
-> LogicalSize<Au> {
let offsets = style.logical_position();
let offset_i = if offsets.inline_start != LengthOrPercentageOrAuto::Auto {
@@ -1392,12 +1392,12 @@ impl Fragment {
}
#[inline(always)]
- pub fn style(&self) -> &ServoComputedValues {
+ pub fn style(&self) -> &ComputedValues {
&*self.style
}
#[inline(always)]
- pub fn selected_style(&self) -> &ServoComputedValues {
+ pub fn selected_style(&self) -> &ComputedValues {
&*self.selected_style
}
@@ -2142,7 +2142,7 @@ impl Fragment {
};
return inline_metrics;
- fn inline_metrics_of_block(flow: &FlowRef, style: &ServoComputedValues) -> InlineMetrics {
+ fn inline_metrics_of_block(flow: &FlowRef, style: &ComputedValues) -> InlineMetrics {
// CSS 2.1 § 10.8: "The height of each inline-level box in the line box is calculated.
// For replaced elements, inline-block elements, and inline-table elements, this is the
// height of their margin box."
@@ -2423,7 +2423,7 @@ impl Fragment {
}
}
- pub fn repair_style(&mut self, new_style: &StyleArc<ServoComputedValues>) {
+ pub fn repair_style(&mut self, new_style: &StyleArc<ComputedValues>) {
self.style = (*new_style).clone()
}
@@ -3038,9 +3038,9 @@ pub struct InlineStyleIterator<'a> {
}
impl<'a> Iterator for InlineStyleIterator<'a> {
- type Item = &'a ServoComputedValues;
+ type Item = &'a ComputedValues;
- fn next(&mut self) -> Option<&'a ServoComputedValues> {
+ fn next(&mut self) -> Option<&'a ComputedValues> {
if !self.primary_style_yielded {
self.primary_style_yielded = true;
return Some(&*self.fragment.style)
diff --git a/components/layout/generated_content.rs b/components/layout/generated_content.rs
index 5f6f9b1e706..281c5965c9f 100644
--- a/components/layout/generated_content.rs
+++ b/components/layout/generated_content.rs
@@ -18,7 +18,7 @@ use smallvec::SmallVec;
use std::collections::{HashMap, LinkedList};
use style::computed_values::{display, list_style_type};
use style::computed_values::content::ContentItem;
-use style::properties::ServoComputedValues;
+use style::properties::ComputedValues;
use style::selector_parser::RestyleDamage;
use style::servo::restyle_damage::RESOLVE_GENERATED_CONTENT;
use text::TextRunScanner;
@@ -298,7 +298,7 @@ impl<'a,'b> ResolveGeneratedContentFragmentMutator<'a,'b> {
self.incremented = true
}
- fn quote(&self, style: &ServoComputedValues, close: bool) -> String {
+ fn quote(&self, style: &ComputedValues, close: bool) -> String {
let quotes = &style.get_list().quotes;
if quotes.0.is_empty() {
return String::new()
@@ -368,7 +368,7 @@ impl Counter {
layout_context: &LayoutContext,
node: OpaqueNode,
pseudo: PseudoElementType<()>,
- style: ::StyleArc<ServoComputedValues>,
+ style: ::StyleArc<ComputedValues>,
list_style_type: list_style_type::T,
mode: RenderingMode)
-> Option<SpecificFragmentInfo> {
@@ -431,7 +431,7 @@ struct CounterValue {
fn render_text(layout_context: &LayoutContext,
node: OpaqueNode,
pseudo: PseudoElementType<()>,
- style: ::StyleArc<ServoComputedValues>,
+ style: ::StyleArc<ComputedValues>,
string: String)
-> Option<SpecificFragmentInfo> {
let mut fragments = LinkedList::new();
diff --git a/components/layout/inline.rs b/components/layout/inline.rs
index de58b05255b..9228c21a7ba 100644
--- a/components/layout/inline.rs
+++ b/components/layout/inline.rs
@@ -33,7 +33,7 @@ use std::sync::Arc;
use style::computed_values::{display, overflow_x, position, text_align, text_justify};
use style::computed_values::{vertical_align, white_space};
use style::logical_geometry::{LogicalRect, LogicalSize, WritingMode};
-use style::properties::{longhands, ServoComputedValues};
+use style::properties::{longhands, ComputedValues};
use style::servo::restyle_damage::{BUBBLE_ISIZES, REFLOW, REFLOW_OUT_OF_FLOW, REPOSITION, RESOLVE_GENERATED_CONTENT};
use text;
use unicode_bidi as bidi;
@@ -1106,7 +1106,7 @@ impl InlineFlow {
/// Computes the minimum metrics for each line. This is done during flow construction.
///
/// `style` is the style of the block.
- pub fn minimum_line_metrics(&self, font_context: &mut FontContext, style: &ServoComputedValues)
+ pub fn minimum_line_metrics(&self, font_context: &mut FontContext, style: &ComputedValues)
-> LineMetrics {
InlineFlow::minimum_line_metrics_for_fragments(&self.fragments.fragments,
font_context,
@@ -1119,7 +1119,7 @@ impl InlineFlow {
/// `style` is the style of the block that these fragments belong to.
pub fn minimum_line_metrics_for_fragments(fragments: &[Fragment],
font_context: &mut FontContext,
- style: &ServoComputedValues)
+ style: &ComputedValues)
-> LineMetrics {
// As a special case, if this flow contains only hypothetical fragments, then the entire
// flow is hypothetical and takes up no space. See CSS 2.1 § 10.3.7.
@@ -1665,7 +1665,7 @@ impl Flow for InlineFlow {
self.build_display_list_for_inline(state);
}
- fn repair_style(&mut self, _: &StyleArc<ServoComputedValues>) {}
+ fn repair_style(&mut self, _: &StyleArc<ComputedValues>) {}
fn compute_overflow(&self) -> Overflow {
let mut overflow = Overflow::new();
@@ -1754,8 +1754,8 @@ impl fmt::Debug for InlineFlow {
#[derive(Clone)]
pub struct InlineFragmentNodeInfo {
pub address: OpaqueNode,
- pub style: StyleArc<ServoComputedValues>,
- pub selected_style: StyleArc<ServoComputedValues>,
+ pub style: StyleArc<ComputedValues>,
+ pub selected_style: StyleArc<ComputedValues>,
pub pseudo: PseudoElementType<()>,
pub flags: InlineFragmentNodeFlags,
}
diff --git a/components/layout/list_item.rs b/components/layout/list_item.rs
index cb8cd27df70..faf8ae259fc 100644
--- a/components/layout/list_item.rs
+++ b/components/layout/list_item.rs
@@ -20,7 +20,7 @@ use generated_content;
use inline::InlineFlow;
use style::computed_values::{list_style_type, position};
use style::logical_geometry::LogicalSize;
-use style::properties::ServoComputedValues;
+use style::properties::ComputedValues;
use style::servo::restyle_damage::RESOLVE_GENERATED_CONTENT;
/// A block with the CSS `display` property equal to `list-item`.
@@ -147,7 +147,7 @@ impl Flow for ListItemFlow {
self.block_flow.collect_stacking_contexts(state);
}
- fn repair_style(&mut self, new_style: &::StyleArc<ServoComputedValues>) {
+ fn repair_style(&mut self, new_style: &::StyleArc<ComputedValues>) {
self.block_flow.repair_style(new_style)
}
diff --git a/components/layout/model.rs b/components/layout/model.rs
index 7f564a599ab..c96c3bdaaf5 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, WritingMode};
-use style::properties::ServoComputedValues;
+use style::properties::ComputedValues;
use style::values::computed::{BorderCornerRadius, LengthOrPercentageOrAuto};
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrNone};
@@ -481,7 +481,7 @@ pub fn specified_border_radius(
}
#[inline]
-pub fn padding_from_style(style: &ServoComputedValues,
+pub fn padding_from_style(style: &ComputedValues,
containing_block_inline_size: Au,
writing_mode: WritingMode)
-> LogicalMargin<Au> {
@@ -498,7 +498,7 @@ pub fn padding_from_style(style: &ServoComputedValues,
///
/// This is used when calculating intrinsic inline sizes.
#[inline]
-pub fn specified_margin_from_style(style: &ServoComputedValues,
+pub fn specified_margin_from_style(style: &ComputedValues,
writing_mode: WritingMode) -> LogicalMargin<Au> {
let margin_style = style.get_margin();
LogicalMargin::from_physical(writing_mode, SideOffsets2D::new(
diff --git a/components/layout/multicol.rs b/components/layout/multicol.rs
index afe45c2aea7..739341ab4e3 100644
--- a/components/layout/multicol.rs
+++ b/components/layout/multicol.rs
@@ -20,7 +20,7 @@ use std::cmp::{min, max};
use std::fmt;
use std::sync::Arc;
use style::logical_geometry::LogicalSize;
-use style::properties::ServoComputedValues;
+use style::properties::ComputedValues;
use style::values::Either;
use style::values::computed::{LengthOrPercentageOrAuto, LengthOrPercentageOrNone};
@@ -193,7 +193,7 @@ impl Flow for MulticolFlow {
self.block_flow.collect_stacking_contexts(state);
}
- fn repair_style(&mut self, new_style: &StyleArc<ServoComputedValues>) {
+ fn repair_style(&mut self, new_style: &StyleArc<ComputedValues>) {
self.block_flow.repair_style(new_style)
}
@@ -275,7 +275,7 @@ impl Flow for MulticolColumnFlow {
self.block_flow.collect_stacking_contexts(state);
}
- fn repair_style(&mut self, new_style: &StyleArc<ServoComputedValues>) {
+ fn repair_style(&mut self, new_style: &StyleArc<ComputedValues>) {
self.block_flow.repair_style(new_style)
}
diff --git a/components/layout/table.rs b/components/layout/table.rs
index d199b059a69..809e2ac4e29 100644
--- a/components/layout/table.rs
+++ b/components/layout/table.rs
@@ -24,7 +24,7 @@ use std::fmt;
use style::computed_values::{border_collapse, border_spacing, table_layout};
use style::context::SharedStyleContext;
use style::logical_geometry::LogicalSize;
-use style::properties::ServoComputedValues;
+use style::properties::ComputedValues;
use style::servo::restyle_damage::{REFLOW, REFLOW_OUT_OF_FLOW};
use style::values::CSSFloat;
use style::values::computed::LengthOrPercentageOrAuto;
@@ -506,7 +506,7 @@ impl Flow for TableFlow {
self.block_flow.collect_stacking_contexts(state);
}
- fn repair_style(&mut self, new_style: &::StyleArc<ServoComputedValues>) {
+ fn repair_style(&mut self, new_style: &::StyleArc<ComputedValues>) {
self.block_flow.repair_style(new_style)
}
diff --git a/components/layout/table_caption.rs b/components/layout/table_caption.rs
index 99d95fd9587..c225339b082 100644
--- a/components/layout/table_caption.rs
+++ b/components/layout/table_caption.rs
@@ -16,7 +16,7 @@ use fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
use gfx_traits::print_tree::PrintTree;
use std::fmt;
use style::logical_geometry::LogicalSize;
-use style::properties::ServoComputedValues;
+use style::properties::ComputedValues;
/// A table formatting context.
pub struct TableCaptionFlow {
@@ -83,7 +83,7 @@ impl Flow for TableCaptionFlow {
self.block_flow.collect_stacking_contexts(state);
}
- fn repair_style(&mut self, new_style: &::StyleArc<ServoComputedValues>) {
+ fn repair_style(&mut self, new_style: &::StyleArc<ComputedValues>) {
self.block_flow.repair_style(new_style)
}
diff --git a/components/layout/table_cell.rs b/components/layout/table_cell.rs
index 47f74891488..6ba7667a0a9 100644
--- a/components/layout/table_cell.rs
+++ b/components/layout/table_cell.rs
@@ -20,7 +20,7 @@ use script_layout_interface::wrapper_traits::ThreadSafeLayoutNode;
use std::fmt;
use style::computed_values::{border_collapse, border_top_style, vertical_align};
use style::logical_geometry::{LogicalMargin, LogicalRect, LogicalSize, WritingMode};
-use style::properties::ServoComputedValues;
+use style::properties::ComputedValues;
use style::values::computed::Color;
use table::InternalTable;
use table_row::{CollapsedBorder, CollapsedBorderProvenance};
@@ -263,7 +263,7 @@ impl Flow for TableCellFlow {
self.block_flow.collect_stacking_contexts(state);
}
- fn repair_style(&mut self, new_style: &::StyleArc<ServoComputedValues>) {
+ fn repair_style(&mut self, new_style: &::StyleArc<ComputedValues>) {
self.block_flow.repair_style(new_style)
}
diff --git a/components/layout/table_colgroup.rs b/components/layout/table_colgroup.rs
index 85d5207646e..4967f19ee73 100644
--- a/components/layout/table_colgroup.rs
+++ b/components/layout/table_colgroup.rs
@@ -16,7 +16,7 @@ use layout_debug;
use std::cmp::max;
use std::fmt;
use style::logical_geometry::LogicalSize;
-use style::properties::ServoComputedValues;
+use style::properties::ComputedValues;
use style::values::computed::LengthOrPercentageOrAuto;
/// A table formatting context.
@@ -94,7 +94,7 @@ impl Flow for TableColGroupFlow {
fn collect_stacking_contexts(&mut self, _: &mut DisplayListBuildState) {}
- fn repair_style(&mut self, _: &::StyleArc<ServoComputedValues>) {}
+ fn repair_style(&mut self, _: &::StyleArc<ComputedValues>) {}
fn compute_overflow(&self) -> Overflow {
Overflow::new()
diff --git a/components/layout/table_row.rs b/components/layout/table_row.rs
index 45b47ee8de5..cc683096831 100644
--- a/components/layout/table_row.rs
+++ b/components/layout/table_row.rs
@@ -23,7 +23,7 @@ use std::fmt;
use std::iter::{Enumerate, IntoIterator, Peekable};
use style::computed_values::{border_collapse, border_spacing, border_top_style};
use style::logical_geometry::{LogicalSize, PhysicalSide, WritingMode};
-use style::properties::ServoComputedValues;
+use style::properties::ComputedValues;
use style::servo::restyle_damage::{REFLOW, REFLOW_OUT_OF_FLOW};
use style::values::computed::{Color, LengthOrPercentageOrAuto};
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, VecExt};
@@ -481,7 +481,7 @@ impl Flow for TableRowFlow {
self.block_flow.collect_stacking_contexts(state);
}
- fn repair_style(&mut self, new_style: &::StyleArc<ServoComputedValues>) {
+ fn repair_style(&mut self, new_style: &::StyleArc<ComputedValues>) {
self.block_flow.repair_style(new_style)
}
@@ -612,7 +612,7 @@ impl CollapsedBorder {
/// Creates a collapsed border from the block-start border described in the given CSS style
/// object.
- fn top(css_style: &ServoComputedValues, provenance: CollapsedBorderProvenance)
+ fn top(css_style: &ComputedValues, provenance: CollapsedBorderProvenance)
-> CollapsedBorder {
CollapsedBorder {
style: css_style.get_border().border_top_style,
@@ -624,7 +624,7 @@ impl CollapsedBorder {
/// Creates a collapsed border style from the right border described in the given CSS style
/// object.
- fn right(css_style: &ServoComputedValues, provenance: CollapsedBorderProvenance)
+ fn right(css_style: &ComputedValues, provenance: CollapsedBorderProvenance)
-> CollapsedBorder {
CollapsedBorder {
style: css_style.get_border().border_right_style,
@@ -636,7 +636,7 @@ impl CollapsedBorder {
/// Creates a collapsed border style from the bottom border described in the given CSS style
/// object.
- fn bottom(css_style: &ServoComputedValues, provenance: CollapsedBorderProvenance)
+ fn bottom(css_style: &ComputedValues, provenance: CollapsedBorderProvenance)
-> CollapsedBorder {
CollapsedBorder {
style: css_style.get_border().border_bottom_style,
@@ -648,7 +648,7 @@ impl CollapsedBorder {
/// Creates a collapsed border style from the left border described in the given CSS style
/// object.
- fn left(css_style: &ServoComputedValues, provenance: CollapsedBorderProvenance)
+ fn left(css_style: &ComputedValues, provenance: CollapsedBorderProvenance)
-> CollapsedBorder {
CollapsedBorder {
style: css_style.get_border().border_left_style,
@@ -660,7 +660,7 @@ impl CollapsedBorder {
/// Creates a collapsed border style from the given physical side.
fn from_side(side: PhysicalSide,
- css_style: &ServoComputedValues,
+ css_style: &ComputedValues,
provenance: CollapsedBorderProvenance)
-> CollapsedBorder {
match side {
@@ -673,7 +673,7 @@ impl CollapsedBorder {
/// Creates a collapsed border style from the inline-start border described in the given CSS
/// style object.
- pub fn inline_start(css_style: &ServoComputedValues, provenance: CollapsedBorderProvenance)
+ pub fn inline_start(css_style: &ComputedValues, provenance: CollapsedBorderProvenance)
-> CollapsedBorder {
CollapsedBorder::from_side(css_style.writing_mode.inline_start_physical_side(),
css_style,
@@ -682,7 +682,7 @@ impl CollapsedBorder {
/// Creates a collapsed border style from the inline-start border described in the given CSS
/// style object.
- pub fn inline_end(css_style: &ServoComputedValues, provenance: CollapsedBorderProvenance)
+ pub fn inline_end(css_style: &ComputedValues, provenance: CollapsedBorderProvenance)
-> CollapsedBorder {
CollapsedBorder::from_side(css_style.writing_mode.inline_end_physical_side(),
css_style,
@@ -691,7 +691,7 @@ impl CollapsedBorder {
/// Creates a collapsed border style from the block-start border described in the given CSS
/// style object.
- pub fn block_start(css_style: &ServoComputedValues, provenance: CollapsedBorderProvenance)
+ pub fn block_start(css_style: &ComputedValues, provenance: CollapsedBorderProvenance)
-> CollapsedBorder {
CollapsedBorder::from_side(css_style.writing_mode.block_start_physical_side(),
css_style,
@@ -700,7 +700,7 @@ impl CollapsedBorder {
/// Creates a collapsed border style from the block-end border described in the given CSS style
/// object.
- pub fn block_end(css_style: &ServoComputedValues, provenance: CollapsedBorderProvenance)
+ pub fn block_end(css_style: &ComputedValues, provenance: CollapsedBorderProvenance)
-> CollapsedBorder {
CollapsedBorder::from_side(css_style.writing_mode.block_end_physical_side(),
css_style,
@@ -909,7 +909,7 @@ pub struct BorderCollapseInfoForChildTableCell<'a> {
/// table row. This is done eagerly here so that at least the inline inside border collapse
/// computations can be parallelized across all the rows of the table.
fn perform_inline_direction_border_collapse_for_row(
- row_style: &ServoComputedValues,
+ row_style: &ComputedValues,
children_count: usize,
child_index: usize,
child_table_cell: &mut TableCellFlow,
diff --git a/components/layout/table_rowgroup.rs b/components/layout/table_rowgroup.rs
index 7664796b082..779832923d0 100644
--- a/components/layout/table_rowgroup.rs
+++ b/components/layout/table_rowgroup.rs
@@ -20,7 +20,7 @@ use std::fmt;
use std::iter::{IntoIterator, Iterator, Peekable};
use style::computed_values::{border_collapse, border_spacing};
use style::logical_geometry::LogicalSize;
-use style::properties::ServoComputedValues;
+use style::properties::ComputedValues;
use table::{ColumnIntrinsicInlineSize, InternalTable, TableLikeFlow};
/// A table formatting context.
@@ -185,7 +185,7 @@ impl Flow for TableRowGroupFlow {
self.block_flow.collect_stacking_contexts(state);
}
- fn repair_style(&mut self, new_style: &::StyleArc<ServoComputedValues>) {
+ fn repair_style(&mut self, new_style: &::StyleArc<ComputedValues>) {
self.block_flow.repair_style(new_style)
}
diff --git a/components/layout/table_wrapper.rs b/components/layout/table_wrapper.rs
index 015f32a9762..ac0e6025c67 100644
--- a/components/layout/table_wrapper.rs
+++ b/components/layout/table_wrapper.rs
@@ -30,7 +30,7 @@ use std::ops::Add;
use style::computed_values::{border_collapse, position, table_layout};
use style::context::SharedStyleContext;
use style::logical_geometry::{LogicalRect, LogicalSize};
-use style::properties::ServoComputedValues;
+use style::properties::ComputedValues;
use style::values::CSSFloat;
use style::values::computed::LengthOrPercentageOrAuto;
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize};
@@ -466,7 +466,7 @@ impl Flow for TableWrapperFlow {
self.block_flow.collect_stacking_contexts(state);
}
- fn repair_style(&mut self, new_style: &::StyleArc<ServoComputedValues>) {
+ fn repair_style(&mut self, new_style: &::StyleArc<ComputedValues>) {
self.block_flow.repair_style(new_style)
}
diff --git a/components/layout/text.rs b/components/layout/text.rs
index 10093f251b8..ab2f941fc03 100644
--- a/components/layout/text.rs
+++ b/components/layout/text.rs
@@ -26,7 +26,7 @@ use std::sync::Arc;
use style::computed_values::{text_rendering, text_transform};
use style::computed_values::{word_break, white_space};
use style::logical_geometry::{LogicalSize, WritingMode};
-use style::properties::ServoComputedValues;
+use style::properties::ComputedValues;
use style::properties::style_structs;
use style::values::generics::text::LineHeight;
use unicode_bidi as bidi;
@@ -445,7 +445,7 @@ pub fn font_metrics_for_style(font_context: &mut FontContext, font_style: ::Styl
}
/// Returns the line block-size needed by the given computed style and font size.
-pub fn line_height_from_style(style: &ServoComputedValues, metrics: &FontMetrics) -> Au {
+pub fn line_height_from_style(style: &ComputedValues, metrics: &FontMetrics) -> Au {
let font_size = style.get_font().font_size;
match style.get_inheritedtext().line_height {
LineHeight::Normal => metrics.line_gap,