mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Replace all uses of the style::stylearc alias with servo_arc.
The alias is left there temporarilly and will be removed completely in a later commit where also components/style/gecko/generated/structs_{debug|release}.rs are re-generated (they still use the old alias).
This commit is contained in:
parent
d403f40438
commit
b07ebbae6b
108 changed files with 150 additions and 128 deletions
|
@ -34,6 +34,7 @@ script_layout_interface = {path = "../script_layout_interface"}
|
|||
script_traits = {path = "../script_traits"}
|
||||
selectors = { path = "../selectors" }
|
||||
serde = "1.0"
|
||||
servo_arc = {path = "../servo_arc"}
|
||||
servo_atoms = {path = "../atoms"}
|
||||
servo_geometry = {path = "../geometry"}
|
||||
serde_json = "1.0"
|
||||
|
|
|
@ -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<ComputedValues>) {
|
||||
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
|
||||
self.fragment.repair_style(new_style)
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
use StyleArc;
|
||||
use ServoArc;
|
||||
use app_units::Au;
|
||||
use block::BlockFlow;
|
||||
use context::{LayoutContext, with_thread_local_font_context};
|
||||
|
@ -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<ComputedValues>, RestyleDamage),
|
||||
Whitespace(OpaqueNode, PseudoElementType<()>, ServoArc<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<ComputedValues>) {
|
||||
style: &ServoArc<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<ComputedValues>) -> Option<(&'static str, &'static str)> {
|
||||
fn bidi_control_chars(style: &ServoArc<ComputedValues>) -> Option<(&'static str, &'static str)> {
|
||||
use style::computed_values::direction::T::*;
|
||||
use style::computed_values::unicode_bidi::T::*;
|
||||
|
||||
|
|
|
@ -973,7 +973,7 @@ impl Flow for FlexFlow {
|
|||
self.block_flow.collect_stacking_contexts(state);
|
||||
}
|
||||
|
||||
fn repair_style(&mut self, new_style: &::StyleArc<ComputedValues>) {
|
||||
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
|
||||
self.block_flow.repair_style(new_style)
|
||||
}
|
||||
|
||||
|
|
|
@ -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<ComputedValues>);
|
||||
fn repair_style(&mut self, new_style: &::ServoArc<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<ComputedValues>);
|
||||
fn repair_style_and_bubble_inline_sizes(self, style: &::ServoArc<ComputedValues>);
|
||||
}
|
||||
|
||||
pub trait MutableOwnedFlowUtils {
|
||||
|
@ -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<ComputedValues>) {
|
||||
fn repair_style_and_bubble_inline_sizes(self, style: &::ServoArc<ComputedValues>) {
|
||||
self.repair_style(style);
|
||||
mut_base(self).update_flags_if_needed(style);
|
||||
self.bubble_inline_sizes();
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
use StyleArc;
|
||||
use ServoArc;
|
||||
use app_units::Au;
|
||||
use canvas_traits::CanvasMsg;
|
||||
use context::{LayoutContext, with_thread_local_font_context};
|
||||
|
@ -95,10 +95,10 @@ pub struct Fragment {
|
|||
pub node: OpaqueNode,
|
||||
|
||||
/// The CSS style of this fragment.
|
||||
pub style: StyleArc<ComputedValues>,
|
||||
pub style: ServoArc<ComputedValues>,
|
||||
|
||||
/// The CSS style of this fragment when it's selected
|
||||
pub selected_style: StyleArc<ComputedValues>,
|
||||
pub selected_style: ServoArc<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<ComputedValues>,
|
||||
selected_style: StyleArc<ComputedValues>,
|
||||
style: ServoArc<ComputedValues>,
|
||||
selected_style: ServoArc<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<ComputedValues>,
|
||||
style: ServoArc<ComputedValues>,
|
||||
specific: SpecificFragmentInfo)
|
||||
-> Fragment {
|
||||
let writing_mode = style.writing_mode;
|
||||
|
@ -2423,7 +2423,7 @@ impl Fragment {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn repair_style(&mut self, new_style: &StyleArc<ComputedValues>) {
|
||||
pub fn repair_style(&mut self, new_style: &ServoArc<ComputedValues>) {
|
||||
self.style = (*new_style).clone()
|
||||
}
|
||||
|
||||
|
|
|
@ -368,7 +368,7 @@ impl Counter {
|
|||
layout_context: &LayoutContext,
|
||||
node: OpaqueNode,
|
||||
pseudo: PseudoElementType<()>,
|
||||
style: ::StyleArc<ComputedValues>,
|
||||
style: ::ServoArc<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<ComputedValues>,
|
||||
style: ::ServoArc<ComputedValues>,
|
||||
string: String)
|
||||
-> Option<SpecificFragmentInfo> {
|
||||
let mut fragments = LinkedList::new();
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
use StyleArc;
|
||||
use ServoArc;
|
||||
use app_units::{Au, MIN_AU};
|
||||
use block::AbsoluteAssignBSizesTraversal;
|
||||
use context::LayoutContext;
|
||||
|
@ -1665,7 +1665,7 @@ impl Flow for InlineFlow {
|
|||
self.build_display_list_for_inline(state);
|
||||
}
|
||||
|
||||
fn repair_style(&mut self, _: &StyleArc<ComputedValues>) {}
|
||||
fn repair_style(&mut self, _: &ServoArc<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<ComputedValues>,
|
||||
pub selected_style: StyleArc<ComputedValues>,
|
||||
pub style: ServoArc<ComputedValues>,
|
||||
pub selected_style: ServoArc<ComputedValues>,
|
||||
pub pseudo: PseudoElementType<()>,
|
||||
pub flags: InlineFragmentNodeFlags,
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ extern crate script_layout_interface;
|
|||
extern crate script_traits;
|
||||
#[macro_use] extern crate serde;
|
||||
extern crate serde_json;
|
||||
extern crate servo_arc;
|
||||
extern crate servo_atoms;
|
||||
extern crate servo_config;
|
||||
extern crate servo_geometry;
|
||||
|
@ -91,6 +92,6 @@ pub use fragment::Fragment;
|
|||
pub use fragment::SpecificFragmentInfo;
|
||||
pub use self::data::LayoutData;
|
||||
|
||||
// We can't use stylearc for everything in layout, because the Flow stuff uses
|
||||
// We can't use servo_arc for everything in layout, because the Flow stuff uses
|
||||
// weak references.
|
||||
use style::stylearc::Arc as StyleArc;
|
||||
use servo_arc::Arc as ServoArc;
|
||||
|
|
|
@ -147,7 +147,7 @@ impl Flow for ListItemFlow {
|
|||
self.block_flow.collect_stacking_contexts(state);
|
||||
}
|
||||
|
||||
fn repair_style(&mut self, new_style: &::StyleArc<ComputedValues>) {
|
||||
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
|
||||
self.block_flow.repair_style(new_style)
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
use StyleArc;
|
||||
use ServoArc;
|
||||
use app_units::Au;
|
||||
use block::BlockFlow;
|
||||
use context::LayoutContext;
|
||||
|
@ -193,7 +193,7 @@ impl Flow for MulticolFlow {
|
|||
self.block_flow.collect_stacking_contexts(state);
|
||||
}
|
||||
|
||||
fn repair_style(&mut self, new_style: &StyleArc<ComputedValues>) {
|
||||
fn repair_style(&mut self, new_style: &ServoArc<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<ComputedValues>) {
|
||||
fn repair_style(&mut self, new_style: &ServoArc<ComputedValues>) {
|
||||
self.block_flow.repair_style(new_style)
|
||||
}
|
||||
|
||||
|
|
|
@ -506,7 +506,7 @@ impl Flow for TableFlow {
|
|||
self.block_flow.collect_stacking_contexts(state);
|
||||
}
|
||||
|
||||
fn repair_style(&mut self, new_style: &::StyleArc<ComputedValues>) {
|
||||
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
|
||||
self.block_flow.repair_style(new_style)
|
||||
}
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ impl Flow for TableCaptionFlow {
|
|||
self.block_flow.collect_stacking_contexts(state);
|
||||
}
|
||||
|
||||
fn repair_style(&mut self, new_style: &::StyleArc<ComputedValues>) {
|
||||
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
|
||||
self.block_flow.repair_style(new_style)
|
||||
}
|
||||
|
||||
|
|
|
@ -263,7 +263,7 @@ impl Flow for TableCellFlow {
|
|||
self.block_flow.collect_stacking_contexts(state);
|
||||
}
|
||||
|
||||
fn repair_style(&mut self, new_style: &::StyleArc<ComputedValues>) {
|
||||
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
|
||||
self.block_flow.repair_style(new_style)
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ impl Flow for TableColGroupFlow {
|
|||
|
||||
fn collect_stacking_contexts(&mut self, _: &mut DisplayListBuildState) {}
|
||||
|
||||
fn repair_style(&mut self, _: &::StyleArc<ComputedValues>) {}
|
||||
fn repair_style(&mut self, _: &::ServoArc<ComputedValues>) {}
|
||||
|
||||
fn compute_overflow(&self) -> Overflow {
|
||||
Overflow::new()
|
||||
|
|
|
@ -481,7 +481,7 @@ impl Flow for TableRowFlow {
|
|||
self.block_flow.collect_stacking_contexts(state);
|
||||
}
|
||||
|
||||
fn repair_style(&mut self, new_style: &::StyleArc<ComputedValues>) {
|
||||
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
|
||||
self.block_flow.repair_style(new_style)
|
||||
}
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ impl Flow for TableRowGroupFlow {
|
|||
self.block_flow.collect_stacking_contexts(state);
|
||||
}
|
||||
|
||||
fn repair_style(&mut self, new_style: &::StyleArc<ComputedValues>) {
|
||||
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
|
||||
self.block_flow.repair_style(new_style)
|
||||
}
|
||||
|
||||
|
|
|
@ -466,7 +466,7 @@ impl Flow for TableWrapperFlow {
|
|||
self.block_flow.collect_stacking_contexts(state);
|
||||
}
|
||||
|
||||
fn repair_style(&mut self, new_style: &::StyleArc<ComputedValues>) {
|
||||
fn repair_style(&mut self, new_style: &::ServoArc<ComputedValues>) {
|
||||
self.block_flow.repair_style(new_style)
|
||||
}
|
||||
|
||||
|
|
|
@ -436,7 +436,7 @@ fn bounding_box_for_run_metrics(metrics: &RunMetrics, writing_mode: WritingMode)
|
|||
///
|
||||
/// `#[inline]` because often the caller only needs a few fields from the font metrics.
|
||||
#[inline]
|
||||
pub fn font_metrics_for_style(font_context: &mut FontContext, font_style: ::StyleArc<style_structs::Font>)
|
||||
pub fn font_metrics_for_style(font_context: &mut FontContext, font_style: ::ServoArc<style_structs::Font>)
|
||||
-> FontMetrics {
|
||||
let fontgroup = font_context.layout_font_group_for_style(font_style);
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue