mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 12:20:56 +00:00
servo: Merge #17775 - Replace all uses of the style::stylearc alias with servo_arc (from michael-p:rename-stylearc-to-servo-arc); r=emilio
The `stylearc` alias is left there temporarilly and will be removed completely in a later commit/PR where also `components/style/gecko/generated/structs_{debug|release}.rs` are re-generated (they still use the old alias). --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #17768 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because no new features / only refactoring Source-Repo: https://github.com/servo/servo Source-Revision: 31228c18499d1c7f68b6b64b559354c768e81215 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 4d7b64e8a000a80d9daf9b1a511682416f456ff5
This commit is contained in:
parent
9b4972da8a
commit
3ff096ba27
7
servo/Cargo.lock
generated
7
servo/Cargo.lock
generated
@ -1024,6 +1024,7 @@ dependencies = [
|
||||
"nsstring_vendor 0.1.0",
|
||||
"parking_lot 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"selectors 0.19.0",
|
||||
"servo_arc 0.0.1",
|
||||
"style 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"stylo_tests 0.0.1",
|
||||
@ -1063,6 +1064,7 @@ dependencies = [
|
||||
"range 0.0.1",
|
||||
"serde 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo-fontconfig 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_arc 0.0.1",
|
||||
"servo_atoms 0.0.1",
|
||||
"servo_geometry 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
@ -1461,6 +1463,7 @@ dependencies = [
|
||||
"selectors 0.19.0",
|
||||
"serde 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_arc 0.0.1",
|
||||
"servo_atoms 0.0.1",
|
||||
"servo_config 0.0.1",
|
||||
"servo_geometry 0.0.1",
|
||||
@ -1509,6 +1512,7 @@ dependencies = [
|
||||
"script_traits 0.0.1",
|
||||
"selectors 0.19.0",
|
||||
"serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_arc 0.0.1",
|
||||
"servo_atoms 0.0.1",
|
||||
"servo_config 0.0.1",
|
||||
"servo_geometry 0.0.1",
|
||||
@ -2470,6 +2474,7 @@ dependencies = [
|
||||
"selectors 0.19.0",
|
||||
"serde 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_arc 0.0.1",
|
||||
"servo_atoms 0.0.1",
|
||||
"servo_config 0.0.1",
|
||||
"servo_geometry 0.0.1",
|
||||
@ -2513,6 +2518,7 @@ dependencies = [
|
||||
"range 0.0.1",
|
||||
"script_traits 0.0.1",
|
||||
"selectors 0.19.0",
|
||||
"servo_arc 0.0.1",
|
||||
"servo_atoms 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"style 0.0.1",
|
||||
@ -3029,6 +3035,7 @@ dependencies = [
|
||||
"rayon 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"selectors 0.19.0",
|
||||
"servo_arc 0.0.1",
|
||||
"servo_atoms 0.0.1",
|
||||
"servo_config 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
|
@ -29,6 +29,7 @@ net_traits = {path = "../net_traits"}
|
||||
ordered-float = "0.4"
|
||||
range = {path = "../range"}
|
||||
serde = "1.0"
|
||||
servo_arc = {path = "../servo_arc"}
|
||||
servo_atoms = {path = "../atoms"}
|
||||
servo_geometry = {path = "../geometry"}
|
||||
servo_url = {path = "../url"}
|
||||
|
@ -11,6 +11,7 @@ use heapsize::HeapSizeOf;
|
||||
use platform::font::FontHandle;
|
||||
use platform::font_context::FontContextHandle;
|
||||
use platform::font_template::FontTemplateData;
|
||||
use servo_arc::Arc as ServoArc;
|
||||
use smallvec::SmallVec;
|
||||
use std::cell::RefCell;
|
||||
use std::collections::HashMap;
|
||||
@ -21,7 +22,6 @@ use std::sync::Arc;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
|
||||
use style::computed_values::{font_style, font_variant_caps};
|
||||
use style::properties::style_structs;
|
||||
use style::stylearc::Arc as StyleArc;
|
||||
use webrender_api;
|
||||
|
||||
static SMALL_CAPS_SCALE_FACTOR: f32 = 0.8; // Matches FireFox (see gfxFont.h)
|
||||
@ -110,7 +110,7 @@ impl FontContext {
|
||||
/// Create a group of fonts for use in layout calculations. May return
|
||||
/// a cached font if this font instance has already been used by
|
||||
/// this context.
|
||||
pub fn layout_font_group_for_style(&mut self, style: StyleArc<style_structs::Font>)
|
||||
pub fn layout_font_group_for_style(&mut self, style: ServoArc<style_structs::Font>)
|
||||
-> Rc<FontGroup> {
|
||||
self.expire_font_caches_if_necessary();
|
||||
|
||||
@ -240,7 +240,7 @@ impl HeapSizeOf for FontContext {
|
||||
|
||||
#[derive(Debug)]
|
||||
struct LayoutFontGroupCacheKey {
|
||||
pointer: StyleArc<style_structs::Font>,
|
||||
pointer: ServoArc<style_structs::Font>,
|
||||
size: Au,
|
||||
}
|
||||
|
||||
|
@ -52,6 +52,7 @@ extern crate net_traits;
|
||||
extern crate ordered_float;
|
||||
extern crate range;
|
||||
#[macro_use] extern crate serde;
|
||||
extern crate servo_arc;
|
||||
extern crate servo_geometry;
|
||||
extern crate servo_url;
|
||||
#[macro_use] extern crate servo_atoms;
|
||||
|
@ -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)
|
||||
|
@ -34,6 +34,7 @@ script_layout_interface = {path = "../script_layout_interface"}
|
||||
script_traits = {path = "../script_traits"}
|
||||
selectors = { path = "../selectors" }
|
||||
serde_json = "1.0"
|
||||
servo_arc = {path = "../servo_arc"}
|
||||
servo_atoms = {path = "../atoms"}
|
||||
servo_config = {path = "../config"}
|
||||
servo_geometry = {path = "../geometry"}
|
||||
|
@ -54,6 +54,7 @@ use selectors::attr::{AttrSelectorOperation, NamespaceConstraint, CaseSensitivit
|
||||
use selectors::matching::{ElementSelectorFlags, LocalMatchingContext, MatchingContext, RelevantLinkStatus};
|
||||
use selectors::matching::VisitedHandlingMode;
|
||||
use selectors::sink::Push;
|
||||
use servo_arc::{Arc, ArcBorrow};
|
||||
use servo_atoms::Atom;
|
||||
use servo_url::ServoUrl;
|
||||
use std::fmt;
|
||||
@ -78,7 +79,6 @@ use style::selector_parser::{AttrValue as SelectorAttrValue, NonTSPseudoClass, P
|
||||
use style::selector_parser::{PseudoElement, SelectorImpl, extended_filtering};
|
||||
use style::shared_lock::{SharedRwLock as StyleSharedRwLock, Locked as StyleLocked};
|
||||
use style::str::is_whitespace;
|
||||
use style::stylearc::{Arc, ArcBorrow};
|
||||
|
||||
pub unsafe fn drop_style_and_layout_data(data: OpaqueStyleAndLayoutData) {
|
||||
let ptr: *mut StyleData = data.ptr.get();
|
||||
|
@ -39,6 +39,7 @@ extern crate script_layout_interface;
|
||||
extern crate script_traits;
|
||||
extern crate selectors;
|
||||
extern crate serde_json;
|
||||
extern crate servo_arc;
|
||||
extern crate servo_atoms;
|
||||
extern crate servo_config;
|
||||
extern crate servo_geometry;
|
||||
@ -97,6 +98,7 @@ use script_layout_interface::wrapper_traits::LayoutNode;
|
||||
use script_traits::{ConstellationControlMsg, LayoutControlMsg, LayoutMsg as ConstellationMsg};
|
||||
use script_traits::{ScrollState, UntrustedNodeAddress};
|
||||
use selectors::Element;
|
||||
use servo_arc::Arc as ServoArc;
|
||||
use servo_atoms::Atom;
|
||||
use servo_config::opts;
|
||||
use servo_config::prefs::PREFS;
|
||||
@ -127,7 +129,6 @@ use style::properties::PropertyId;
|
||||
use style::selector_parser::SnapshotMap;
|
||||
use style::servo::restyle_damage::{REFLOW, REFLOW_OUT_OF_FLOW, REPAINT, REPOSITION, STORE_OVERFLOW};
|
||||
use style::shared_lock::{SharedRwLock, SharedRwLockReadGuard, StylesheetGuards};
|
||||
use style::stylearc::Arc as StyleArc;
|
||||
use style::stylesheets::{Origin, Stylesheet, StylesheetInDocument, UserAgentStylesheets};
|
||||
use style::stylist::{ExtraStyleData, Stylist};
|
||||
use style::thread_state;
|
||||
@ -211,10 +212,10 @@ pub struct LayoutThread {
|
||||
document_shared_lock: Option<SharedRwLock>,
|
||||
|
||||
/// The list of currently-running animations.
|
||||
running_animations: StyleArc<RwLock<FnvHashMap<OpaqueNode, Vec<Animation>>>>,
|
||||
running_animations: ServoArc<RwLock<FnvHashMap<OpaqueNode, Vec<Animation>>>>,
|
||||
|
||||
/// The list of animations that have expired since the last style recalculation.
|
||||
expired_animations: StyleArc<RwLock<FnvHashMap<OpaqueNode, Vec<Animation>>>>,
|
||||
expired_animations: ServoArc<RwLock<FnvHashMap<OpaqueNode, Vec<Animation>>>>,
|
||||
|
||||
/// A counter for epoch messages
|
||||
epoch: Cell<Epoch>,
|
||||
@ -426,7 +427,7 @@ fn add_font_face_rules(stylesheet: &Stylesheet,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
struct StylesheetIterator<'a>(slice::Iter<'a, StyleArc<Stylesheet>>);
|
||||
struct StylesheetIterator<'a>(slice::Iter<'a, ServoArc<Stylesheet>>);
|
||||
|
||||
impl<'a> Iterator for StylesheetIterator<'a> {
|
||||
type Item = &'a Stylesheet;
|
||||
@ -515,8 +516,8 @@ impl LayoutThread {
|
||||
outstanding_web_fonts: outstanding_web_fonts_counter,
|
||||
root_flow: RefCell::new(None),
|
||||
document_shared_lock: None,
|
||||
running_animations: StyleArc::new(RwLock::new(FnvHashMap::default())),
|
||||
expired_animations: StyleArc::new(RwLock::new(FnvHashMap::default())),
|
||||
running_animations: ServoArc::new(RwLock::new(FnvHashMap::default())),
|
||||
expired_animations: ServoArc::new(RwLock::new(FnvHashMap::default())),
|
||||
epoch: Cell::new(Epoch(0)),
|
||||
viewport_size: Size2D::new(Au(0), Au(0)),
|
||||
webrender_api: webrender_api_sender.create_api(),
|
||||
@ -825,7 +826,7 @@ impl LayoutThread {
|
||||
}
|
||||
|
||||
fn handle_add_stylesheet<'a, 'b>(&self,
|
||||
stylesheet: StyleArc<Stylesheet>,
|
||||
stylesheet: ServoArc<Stylesheet>,
|
||||
possibly_locked_rw_data: &mut RwData<'a, 'b>) {
|
||||
// Find all font-face rules and notify the font cache of them.
|
||||
// GWTODO: Need to handle unloading web fonts.
|
||||
|
@ -74,6 +74,7 @@ script_plugins = {path = "../script_plugins"}
|
||||
script_traits = {path = "../script_traits"}
|
||||
selectors = { path = "../selectors" }
|
||||
serde = "1.0"
|
||||
servo_arc = {path = "../servo_arc"}
|
||||
servo_atoms = {path = "../atoms"}
|
||||
servo_config = {path = "../config"}
|
||||
servo_geometry = {path = "../geometry" }
|
||||
|
@ -77,6 +77,7 @@ use script_traits::{DocumentActivity, TimerEventId, TimerSource, TouchpadPressur
|
||||
use script_traits::{UntrustedNodeAddress, WindowSizeData, WindowSizeType};
|
||||
use selectors::matching::ElementSelectorFlags;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_arc::Arc as ServoArc;
|
||||
use servo_atoms::Atom;
|
||||
use servo_url::{ImmutableOrigin, MutableOrigin, ServoUrl};
|
||||
use smallvec::SmallVec;
|
||||
@ -97,7 +98,6 @@ use style::media_queries::MediaList;
|
||||
use style::properties::PropertyDeclarationBlock;
|
||||
use style::selector_parser::{PseudoElement, Snapshot};
|
||||
use style::shared_lock::{SharedRwLock as StyleSharedRwLock, Locked as StyleLocked};
|
||||
use style::stylearc::Arc as StyleArc;
|
||||
use style::stylesheets::{CssRules, FontFaceRule, KeyframesRule, MediaRule};
|
||||
use style::stylesheets::{NamespaceRule, StyleRule, ImportRule, SupportsRule, ViewportRule};
|
||||
use style::stylesheets::keyframes_rule::Keyframe;
|
||||
@ -165,7 +165,7 @@ unsafe impl<T: JSTraceable> JSTraceable for Arc<T> {
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl<T: JSTraceable> JSTraceable for StyleArc<T> {
|
||||
unsafe impl<T: JSTraceable> JSTraceable for ServoArc<T> {
|
||||
unsafe fn trace(&self, trc: *mut JSTracer) {
|
||||
(**self).trace(trc)
|
||||
}
|
||||
|
@ -10,8 +10,8 @@ use dom::cssmediarule::CSSMediaRule;
|
||||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::csssupportsrule::CSSSupportsRule;
|
||||
use dom_struct::dom_struct;
|
||||
use servo_arc::Arc;
|
||||
use style::shared_lock::{SharedRwLock, Locked};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::CssRules as StyleCssRules;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -10,8 +10,8 @@ use dom::cssrule::{CSSRule, SpecificCSSRule};
|
||||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use servo_arc::Arc;
|
||||
use style::shared_lock::{Locked, ToCssWithGuard};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::FontFaceRule;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -12,8 +12,8 @@ use dom::cssrule::CSSRule;
|
||||
use dom::cssrulelist::{CSSRuleList, RulesSource};
|
||||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom_struct::dom_struct;
|
||||
use servo_arc::Arc;
|
||||
use style::shared_lock::{SharedRwLock, Locked};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::CssRules as StyleCssRules;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -10,8 +10,8 @@ use dom::cssrule::{CSSRule, SpecificCSSRule};
|
||||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use servo_arc::Arc;
|
||||
use style::shared_lock::{Locked, ToCssWithGuard};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::ImportRule;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -12,8 +12,8 @@ use dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration, CSSSt
|
||||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use servo_arc::Arc;
|
||||
use style::shared_lock::{Locked, ToCssWithGuard};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::keyframes_rule::Keyframe;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -16,8 +16,8 @@ use dom::cssrulelist::{CSSRuleList, RulesSource};
|
||||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use servo_arc::Arc;
|
||||
use style::shared_lock::{Locked, ToCssWithGuard};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::keyframes_rule::{KeyframesRule, Keyframe, KeyframeSelector};
|
||||
use style::values::KeyframesName;
|
||||
|
||||
|
@ -15,10 +15,10 @@ use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::medialist::MediaList;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use servo_arc::Arc;
|
||||
use style::media_queries::parse_media_query_list;
|
||||
use style::parser::ParserContext;
|
||||
use style::shared_lock::{Locked, ToCssWithGuard};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::{CssRuleType, MediaRule};
|
||||
use style_traits::{PARSING_MODE_DEFAULT, ToCss};
|
||||
|
||||
|
@ -11,8 +11,8 @@ use dom::cssrule::{CSSRule, SpecificCSSRule};
|
||||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use servo_arc::Arc;
|
||||
use style::shared_lock::{Locked, ToCssWithGuard};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::NamespaceRule;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -13,8 +13,8 @@ use dom::cssrule::CSSRule;
|
||||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use servo_arc::Arc;
|
||||
use style::shared_lock::Locked;
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::{CssRules, CssRulesHelpers, KeyframesRule, RulesMutateError};
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
|
@ -14,6 +14,7 @@ use dom::element::Element;
|
||||
use dom::node::{Node, window_from_node, document_from_node};
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use servo_arc::Arc;
|
||||
use servo_url::ServoUrl;
|
||||
use std::ascii::AsciiExt;
|
||||
use style::attr::AttrValue;
|
||||
@ -21,7 +22,6 @@ use style::properties::{Importance, PropertyDeclarationBlock, PropertyId, Longha
|
||||
use style::properties::{parse_one_declaration_into, parse_style_attribute, SourcePropertyDeclaration};
|
||||
use style::selector_parser::PseudoElement;
|
||||
use style::shared_lock::Locked;
|
||||
use style::stylearc::Arc;
|
||||
use style_traits::{PARSING_MODE_DEFAULT, ToCss};
|
||||
|
||||
// http://dev.w3.org/csswg/cssom/#the-cssstyledeclaration-interface
|
||||
|
@ -16,10 +16,10 @@ use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use selectors::parser::SelectorList;
|
||||
use servo_arc::Arc;
|
||||
use std::mem;
|
||||
use style::selector_parser::SelectorParser;
|
||||
use style::shared_lock::{Locked, ToCssWithGuard};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::{StyleRule, Origin};
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -14,9 +14,9 @@ use dom::element::Element;
|
||||
use dom::stylesheet::StyleSheet;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use servo_arc::Arc;
|
||||
use std::cell::Cell;
|
||||
use style::shared_lock::SharedRwLock;
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::Stylesheet as StyleStyleSheet;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -13,9 +13,9 @@ use dom::cssrule::SpecificCSSRule;
|
||||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use servo_arc::Arc;
|
||||
use style::parser::ParserContext;
|
||||
use style::shared_lock::{Locked, ToCssWithGuard};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::{CssRuleType, SupportsRule};
|
||||
use style::stylesheets::supports_rule::SupportsCondition;
|
||||
use style_traits::{PARSING_MODE_DEFAULT, ToCss};
|
||||
|
@ -10,8 +10,8 @@ use dom::cssrule::{CSSRule, SpecificCSSRule};
|
||||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use servo_arc::Arc;
|
||||
use style::shared_lock::{Locked, ToCssWithGuard};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::ViewportRule;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -118,6 +118,7 @@ use script_traits::{MouseButton, MouseEventType, MozBrowserEvent};
|
||||
use script_traits::{MsDuration, ScriptMsg as ConstellationMsg, TouchpadPressurePhase};
|
||||
use script_traits::{TouchEventType, TouchId};
|
||||
use script_traits::UntrustedNodeAddress;
|
||||
use servo_arc::Arc;
|
||||
use servo_atoms::Atom;
|
||||
use servo_config::prefs::PREFS;
|
||||
use servo_url::{ImmutableOrigin, MutableOrigin, ServoUrl};
|
||||
@ -137,7 +138,6 @@ use style::invalidation::element::restyle_hints::{RestyleHint, RESTYLE_SELF, RES
|
||||
use style::selector_parser::{RestyleDamage, Snapshot};
|
||||
use style::shared_lock::SharedRwLock as StyleSharedRwLock;
|
||||
use style::str::{HTML_SPACE_CHARACTERS, split_html_space_chars, str_join};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::Stylesheet;
|
||||
use task_source::TaskSource;
|
||||
use time;
|
||||
|
@ -93,6 +93,7 @@ use selectors::matching::{ElementSelectorFlags, LocalMatchingContext, MatchingCo
|
||||
use selectors::matching::{HAS_EDGE_CHILD_SELECTOR, HAS_SLOW_SELECTOR, HAS_SLOW_SELECTOR_LATER_SIBLINGS};
|
||||
use selectors::matching::{RelevantLinkStatus, matches_selector_list};
|
||||
use selectors::sink::Push;
|
||||
use servo_arc::Arc;
|
||||
use servo_atoms::Atom;
|
||||
use std::ascii::AsciiExt;
|
||||
use std::borrow::Cow;
|
||||
@ -113,7 +114,6 @@ use style::rule_tree::CascadeLevel;
|
||||
use style::selector_parser::{NonTSPseudoClass, PseudoElement, RestyleDamage, SelectorImpl, SelectorParser};
|
||||
use style::selector_parser::extended_filtering;
|
||||
use style::shared_lock::{SharedRwLock, Locked};
|
||||
use style::stylearc::Arc;
|
||||
use style::thread_state;
|
||||
use style::values::{CSSFloat, Either};
|
||||
use style::values::{specified, computed};
|
||||
|
@ -26,6 +26,7 @@ use html5ever::{LocalName, Prefix};
|
||||
use net_traits::ReferrerPolicy;
|
||||
use script_layout_interface::message::Msg;
|
||||
use script_traits::{MozBrowserEvent, ScriptMsg as ConstellationMsg};
|
||||
use servo_arc::Arc;
|
||||
use std::ascii::AsciiExt;
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::Cell;
|
||||
@ -34,7 +35,6 @@ use style::attr::AttrValue;
|
||||
use style::media_queries::parse_media_query_list;
|
||||
use style::parser::ParserContext as CssParserContext;
|
||||
use style::str::HTML_SPACE_CHARACTERS;
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::{CssRuleType, Stylesheet};
|
||||
use style_traits::PARSING_MODE_DEFAULT;
|
||||
use stylesheet_loader::{StylesheetLoader, StylesheetContextSource, StylesheetOwner};
|
||||
|
@ -20,13 +20,13 @@ use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use parking_lot::RwLock;
|
||||
use servo_arc::Arc;
|
||||
use servo_config::prefs::PREFS;
|
||||
use std::ascii::AsciiExt;
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use style::attr::AttrValue;
|
||||
use style::media_queries::MediaList;
|
||||
use style::str::HTML_SPACE_CHARACTERS;
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::{Stylesheet, StylesheetContents, CssRule, CssRules, Origin, ViewportRule};
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -20,8 +20,8 @@ use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use net_traits::image::base::Image;
|
||||
use servo_arc::Arc;
|
||||
use std::default::Default;
|
||||
use style::stylearc::Arc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLObjectElement {
|
||||
|
@ -21,10 +21,10 @@ use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use net_traits::ReferrerPolicy;
|
||||
use script_layout_interface::message::Msg;
|
||||
use servo_arc::Arc;
|
||||
use std::cell::Cell;
|
||||
use style::media_queries::parse_media_query_list;
|
||||
use style::parser::ParserContext as CssParserContext;
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::{CssRuleType, Stylesheet, Origin};
|
||||
use style_traits::PARSING_MODE_DEFAULT;
|
||||
use stylesheet_loader::{StylesheetLoader, StylesheetOwner};
|
||||
|
@ -12,11 +12,11 @@ use dom::bindings::str::DOMString;
|
||||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use servo_arc::Arc;
|
||||
use style::media_queries::{MediaQuery, parse_media_query_list};
|
||||
use style::media_queries::MediaList as StyleMediaList;
|
||||
use style::parser::ParserContext;
|
||||
use style::shared_lock::{SharedRwLock, Locked};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::CssRuleType;
|
||||
use style_traits::{PARSING_MODE_DEFAULT, ToCss};
|
||||
|
||||
|
@ -72,6 +72,7 @@ use script_traits::DocumentActivity;
|
||||
use script_traits::UntrustedNodeAddress;
|
||||
use selectors::matching::{matches_selector_list, MatchingContext, MatchingMode};
|
||||
use selectors::parser::SelectorList;
|
||||
use servo_arc::Arc;
|
||||
use servo_url::ServoUrl;
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::{Cell, UnsafeCell, RefMut};
|
||||
@ -83,7 +84,6 @@ use std::ops::Range;
|
||||
use style::context::QuirksMode;
|
||||
use style::dom::OpaqueNode;
|
||||
use style::selector_parser::{SelectorImpl, SelectorParser};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::Stylesheet;
|
||||
use style::thread_state;
|
||||
use uuid::Uuid;
|
||||
|
@ -14,14 +14,14 @@ use dom::documenttype::DocumentType;
|
||||
use dom::element::Element;
|
||||
use dom::htmlscriptelement::HTMLScriptElement;
|
||||
use dom::htmltemplateelement::HTMLTemplateElement;
|
||||
use dom::node::{Node, TreeIterator};
|
||||
use dom::node::Node;
|
||||
use dom::processinginstruction::ProcessingInstruction;
|
||||
use dom::servoparser::Sink;
|
||||
use html5ever::QualName;
|
||||
use html5ever::buffer_queue::BufferQueue;
|
||||
use html5ever::serialize::{AttrRef, Serialize, Serializer};
|
||||
use html5ever::serialize::TraversalScope;
|
||||
use html5ever::serialize::TraversalScope::{ChildrenOnly, IncludeNode};
|
||||
use html5ever::serialize::TraversalScope::ChildrenOnly;
|
||||
use html5ever::tokenizer::{Tokenizer as HtmlTokenizer, TokenizerOpts, TokenizerResult};
|
||||
use html5ever::tree_builder::{Tracer as HtmlTracer, TreeBuilder, TreeBuilderOpts};
|
||||
use js::jsapi::JSTracer;
|
||||
|
@ -83,6 +83,7 @@ extern crate script_layout_interface;
|
||||
extern crate script_traits;
|
||||
extern crate selectors;
|
||||
extern crate serde;
|
||||
extern crate servo_arc;
|
||||
#[macro_use] extern crate servo_atoms;
|
||||
extern crate servo_config;
|
||||
extern crate servo_geometry;
|
||||
|
@ -24,6 +24,7 @@ use net_traits::{FetchResponseListener, FetchMetadata, FilteredMetadata, Metadat
|
||||
use net_traits::request::{CorsSettings, CredentialsMode, Destination, RequestInit, RequestMode, Type as RequestType};
|
||||
use network_listener::{NetworkListener, PreInvoke};
|
||||
use parking_lot::RwLock;
|
||||
use servo_arc::Arc;
|
||||
use servo_url::ServoUrl;
|
||||
use std::mem;
|
||||
use std::sync::Mutex;
|
||||
@ -31,7 +32,6 @@ use std::sync::atomic::AtomicBool;
|
||||
use style::media_queries::MediaList;
|
||||
use style::parser::ParserContext;
|
||||
use style::shared_lock::{Locked, SharedRwLock};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::{CssRules, ImportRule, Namespaces, Stylesheet, StylesheetContents, Origin};
|
||||
use style::stylesheets::StylesheetLoader as StyleStylesheetLoader;
|
||||
use style::stylesheets::import_rule::ImportSheet;
|
||||
|
@ -28,6 +28,7 @@ profile_traits = {path = "../profile_traits"}
|
||||
range = {path = "../range"}
|
||||
script_traits = {path = "../script_traits"}
|
||||
selectors = { path = "../selectors" }
|
||||
servo_arc = {path = "../servo_arc"}
|
||||
servo_atoms = {path = "../atoms"}
|
||||
servo_url = {path = "../url"}
|
||||
style = {path = "../style"}
|
||||
|
@ -30,6 +30,7 @@ extern crate profile_traits;
|
||||
extern crate range;
|
||||
extern crate script_traits;
|
||||
extern crate selectors;
|
||||
extern crate servo_arc;
|
||||
extern crate servo_atoms;
|
||||
extern crate servo_url;
|
||||
extern crate style;
|
||||
|
@ -14,6 +14,7 @@ use rpc::LayoutRPC;
|
||||
use script_traits::{ConstellationControlMsg, LayoutControlMsg, LayoutMsg as ConstellationMsg};
|
||||
use script_traits::{ScrollState, UntrustedNodeAddress, WindowSizeData};
|
||||
use script_traits::Painter;
|
||||
use servo_arc::Arc as ServoArc;
|
||||
use servo_atoms::Atom;
|
||||
use servo_url::ServoUrl;
|
||||
use std::sync::Arc;
|
||||
@ -26,7 +27,7 @@ use style::stylesheets::Stylesheet;
|
||||
/// Asynchronous messages that script can send to layout.
|
||||
pub enum Msg {
|
||||
/// Adds the given stylesheet to the document.
|
||||
AddStylesheet(::style::stylearc::Arc<Stylesheet>),
|
||||
AddStylesheet(ServoArc<Stylesheet>),
|
||||
|
||||
/// Change the quirks mode.
|
||||
SetQuirksMode(QuirksMode),
|
||||
@ -133,7 +134,7 @@ pub struct ScriptReflow {
|
||||
/// The document node.
|
||||
pub document: TrustedNodeAddress,
|
||||
/// The document's list of stylesheets.
|
||||
pub document_stylesheets: Vec<::style::stylearc::Arc<Stylesheet>>,
|
||||
pub document_stylesheets: Vec<ServoArc<Stylesheet>>,
|
||||
/// Whether the document's stylesheets have changed since the last script reflow.
|
||||
pub stylesheets_changed: bool,
|
||||
/// The current window size.
|
||||
|
@ -13,6 +13,7 @@ use gfx_traits::{ByteIndex, FragmentType, combine_id_with_fragment_type};
|
||||
use html5ever::{Namespace, LocalName};
|
||||
use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
||||
use range::Range;
|
||||
use servo_arc::Arc;
|
||||
use servo_url::ServoUrl;
|
||||
use std::fmt::Debug;
|
||||
use style::attr::AttrValue;
|
||||
@ -24,7 +25,6 @@ use style::dom::OpaqueNode;
|
||||
use style::font_metrics::ServoMetricsProvider;
|
||||
use style::properties::{CascadeFlags, ComputedValues};
|
||||
use style::selector_parser::{PseudoElement, PseudoElementCascadeType, SelectorImpl};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylist::RuleInclusion;
|
||||
use webrender_api::ClipId;
|
||||
|
||||
|
@ -60,8 +60,8 @@ pdqsort = "0.1.0"
|
||||
precomputed-hash = "0.1"
|
||||
rayon = "0.8"
|
||||
selectors = { path = "../selectors" }
|
||||
servo_arc = { path = "../servo_arc" }
|
||||
serde = {version = "1.0", optional = true, features = ["derive"]}
|
||||
servo_arc = { path = "../servo_arc" }
|
||||
servo_atoms = {path = "../atoms", optional = true}
|
||||
servo_config = {path = "../config", optional = true}
|
||||
smallvec = "0.4"
|
||||
|
@ -16,8 +16,8 @@ use properties::longhands::animation_direction::computed_value::single_value::T
|
||||
use properties::longhands::animation_iteration_count::single_value::computed_value::T as AnimationIterationCount;
|
||||
use properties::longhands::animation_play_state::computed_value::single_value::T as AnimationPlayState;
|
||||
use rule_tree::CascadeLevel;
|
||||
use servo_arc::Arc;
|
||||
use std::sync::mpsc::Sender;
|
||||
use stylearc::Arc;
|
||||
use stylesheets::keyframes_rule::{KeyframesStep, KeyframesStepValue};
|
||||
use timer::Timer;
|
||||
use values::computed::Time;
|
||||
|
@ -6,11 +6,11 @@
|
||||
|
||||
use properties::PropertyDeclarationBlock;
|
||||
use rule_tree::{CascadeLevel, StyleSource};
|
||||
use servo_arc::Arc;
|
||||
use shared_lock::Locked;
|
||||
use smallvec::SmallVec;
|
||||
use std::fmt::{Debug, self};
|
||||
use std::mem;
|
||||
use stylearc::Arc;
|
||||
|
||||
/// List of applicable declarations. This is a transient structure that shuttles
|
||||
/// declarations between selector matching and inserting into the rule tree, and
|
||||
|
@ -13,6 +13,7 @@ use euclid::num::Zero;
|
||||
use num_traits::ToPrimitive;
|
||||
use properties::PropertyDeclarationBlock;
|
||||
use selectors::attr::AttrSelectorOperation;
|
||||
use servo_arc::Arc;
|
||||
use servo_url::ServoUrl;
|
||||
use shared_lock::Locked;
|
||||
use std::ascii::AsciiExt;
|
||||
@ -20,7 +21,6 @@ use std::str::FromStr;
|
||||
use str::{HTML_SPACE_CHARACTERS, read_exponent, read_fraction};
|
||||
use str::{read_numbers, split_commas, split_html_space_chars};
|
||||
use str::str_join;
|
||||
use stylearc::Arc;
|
||||
use values::specified::Length;
|
||||
|
||||
// Duplicated from script::dom::values.
|
||||
|
@ -11,8 +11,8 @@ use atomic_refcell::{AtomicRefMut, AtomicRefCell};
|
||||
use dom::{SendElement, TElement};
|
||||
use owning_ref::OwningHandle;
|
||||
use selectors::bloom::BloomFilter;
|
||||
use servo_arc::Arc;
|
||||
use smallvec::SmallVec;
|
||||
use stylearc::Arc;
|
||||
|
||||
/// Bloom filters are large allocations, so we store them in thread-local storage
|
||||
/// such that they can be reused across style traversals. StyleBloom is responsible
|
||||
|
@ -20,13 +20,13 @@ use properties::ComputedValues;
|
||||
use rule_tree::StrongRuleNode;
|
||||
use selector_parser::{EAGER_PSEUDO_COUNT, SnapshotMap};
|
||||
use selectors::matching::ElementSelectorFlags;
|
||||
use servo_arc::Arc;
|
||||
use shared_lock::StylesheetGuards;
|
||||
use sharing::StyleSharingCandidateCache;
|
||||
use std::fmt;
|
||||
use std::ops;
|
||||
#[cfg(feature = "servo")] use std::sync::Mutex;
|
||||
#[cfg(feature = "servo")] use std::sync::mpsc::Sender;
|
||||
use stylearc::Arc;
|
||||
use stylist::Stylist;
|
||||
use thread_state;
|
||||
use time;
|
||||
|
@ -11,12 +11,12 @@ use cssparser::{Delimiter, Parser, ParserInput, SourcePosition, Token, TokenSeri
|
||||
use parser::ParserContext;
|
||||
use properties::{CSSWideKeyword, DeclaredValue};
|
||||
use selectors::parser::SelectorParseError;
|
||||
use servo_arc::Arc;
|
||||
use std::ascii::AsciiExt;
|
||||
use std::borrow::Cow;
|
||||
use std::collections::{HashMap, hash_map, HashSet};
|
||||
use std::fmt;
|
||||
use style_traits::{HasViewportPercentage, ToCss, StyleParseError, ParseError};
|
||||
use stylearc::Arc;
|
||||
|
||||
/// A custom property name is just an `Atom`.
|
||||
///
|
||||
|
@ -11,9 +11,9 @@ use properties::ComputedValues;
|
||||
use properties::longhands::display::computed_value as display;
|
||||
use rule_tree::StrongRuleNode;
|
||||
use selector_parser::{EAGER_PSEUDO_COUNT, PseudoElement, RestyleDamage};
|
||||
use servo_arc::Arc;
|
||||
use shared_lock::StylesheetGuards;
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use stylearc::Arc;
|
||||
|
||||
bitflags! {
|
||||
flags RestyleFlags: u8 {
|
||||
|
@ -23,6 +23,7 @@ use selector_parser::{AttrValue, ElementExt, PreExistingComputedValues};
|
||||
use selector_parser::{PseudoClassStringArg, PseudoElement};
|
||||
use selectors::matching::{ElementSelectorFlags, VisitedHandlingMode};
|
||||
use selectors::sink::Push;
|
||||
use servo_arc::{Arc, ArcBorrow};
|
||||
use shared_lock::Locked;
|
||||
use smallvec::VecLike;
|
||||
use std::fmt;
|
||||
@ -30,7 +31,6 @@ use std::fmt;
|
||||
use std::fmt::Debug;
|
||||
use std::hash::Hash;
|
||||
use std::ops::Deref;
|
||||
use stylearc::{Arc, ArcBorrow};
|
||||
use stylist::Stylist;
|
||||
use thread_state;
|
||||
use traversal::TraversalFlags;
|
||||
|
@ -11,9 +11,9 @@ use cssparser::{stylesheet_encoding, EncodingSupport};
|
||||
use error_reporting::ParseErrorReporter;
|
||||
use media_queries::MediaList;
|
||||
use self::encoding::{EncodingRef, DecoderTrap};
|
||||
use servo_arc::Arc;
|
||||
use shared_lock::SharedRwLock;
|
||||
use std::str;
|
||||
use stylearc::Arc;
|
||||
use stylesheets::{Stylesheet, StylesheetLoader, Origin, UrlExtraData};
|
||||
|
||||
struct RustEncoding;
|
||||
|
@ -17,8 +17,8 @@ use gecko_bindings::sugar::ownership::{HasArcFFI, HasBoxFFI, HasFFI, HasSimpleFF
|
||||
use invalidation::media_queries::{MediaListKey, ToMediaListKey};
|
||||
use media_queries::{Device, MediaList};
|
||||
use properties::ComputedValues;
|
||||
use servo_arc::Arc;
|
||||
use shared_lock::{Locked, StylesheetGuards, SharedRwLockReadGuard};
|
||||
use stylearc::Arc;
|
||||
use stylesheet_set::StylesheetSet;
|
||||
use stylesheets::{Origin, StylesheetContents, StylesheetInDocument};
|
||||
use stylist::{ExtraStyleData, Stylist};
|
||||
|
@ -9,8 +9,8 @@ use gecko_bindings::structs;
|
||||
use gecko_bindings::structs::{nsChangeHint, nsStyleContext};
|
||||
use matching::{StyleChange, StyleDifference};
|
||||
use properties::ComputedValues;
|
||||
use servo_arc::Arc;
|
||||
use std::ops::{BitAnd, BitOr, BitOrAssign, Not};
|
||||
use stylearc::Arc;
|
||||
|
||||
/// The representation of Gecko's restyle damage is just a wrapper over
|
||||
/// `nsChangeHint`.
|
||||
|
@ -10,9 +10,9 @@ use gecko_bindings::structs::root::mozilla::css::ImageValue;
|
||||
use gecko_bindings::structs::root::nsStyleImageRequest;
|
||||
use gecko_bindings::sugar::refptr::RefPtr;
|
||||
use parser::ParserContext;
|
||||
use servo_arc::Arc;
|
||||
use std::fmt;
|
||||
use style_traits::{ToCss, ParseError};
|
||||
use stylearc::Arc;
|
||||
|
||||
/// A specified url() value for gecko. Gecko does not eagerly resolve SpecifiedUrls.
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
|
@ -79,6 +79,7 @@ use selectors::attr::{AttrSelectorOperation, AttrSelectorOperator, CaseSensitivi
|
||||
use selectors::matching::{ElementSelectorFlags, LocalMatchingContext, MatchingContext};
|
||||
use selectors::matching::{RelevantLinkStatus, VisitedHandlingMode};
|
||||
use selectors::sink::Push;
|
||||
use servo_arc::{Arc, ArcBorrow, RawOffsetArc};
|
||||
use shared_lock::Locked;
|
||||
use std::cell::RefCell;
|
||||
use std::collections::HashMap;
|
||||
@ -88,7 +89,6 @@ use std::mem;
|
||||
use std::ops::DerefMut;
|
||||
use std::ptr;
|
||||
use string_cache::{Atom, Namespace, WeakAtom, WeakNamespace};
|
||||
use stylearc::{Arc, ArcBorrow, RawOffsetArc};
|
||||
use stylesheets::UrlExtraData;
|
||||
use stylist::Stylist;
|
||||
|
||||
|
@ -4,11 +4,11 @@
|
||||
|
||||
//! Helpers for different FFI pointer kinds that Gecko's FFI layer uses.
|
||||
|
||||
use servo_arc::{Arc, RawOffsetArc};
|
||||
use std::marker::PhantomData;
|
||||
use std::mem::{forget, transmute};
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use std::ptr;
|
||||
use stylearc::{Arc, RawOffsetArc};
|
||||
|
||||
/// Indicates that a given Servo type has a corresponding Gecko FFI type.
|
||||
pub unsafe trait HasFFI : Sized + 'static {
|
||||
|
@ -6,10 +6,10 @@
|
||||
|
||||
use gecko_bindings::structs;
|
||||
use gecko_bindings::sugar::ownership::HasArcFFI;
|
||||
use servo_arc::Arc;
|
||||
use std::{mem, ptr};
|
||||
use std::marker::PhantomData;
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use stylearc::Arc;
|
||||
|
||||
/// Trait for all objects that have Addref() and Release
|
||||
/// methods and can be placed inside RefPtr<T>
|
||||
|
@ -18,7 +18,7 @@ use properties::longhands::display::computed_value as display;
|
||||
use rule_tree::{CascadeLevel, StrongRuleNode};
|
||||
use selector_parser::{PseudoElement, RestyleDamage};
|
||||
use selectors::matching::ElementSelectorFlags;
|
||||
use stylearc::{Arc, ArcBorrow};
|
||||
use servo_arc::{Arc, ArcBorrow};
|
||||
|
||||
/// Represents the result of comparing an element's old and new style.
|
||||
pub struct StyleDifference {
|
||||
|
@ -58,9 +58,9 @@ use properties::{longhands, FontComputationData, Importance, LonghandId};
|
||||
use properties::{PropertyDeclaration, PropertyDeclarationBlock, PropertyDeclarationId};
|
||||
use rule_tree::StrongRuleNode;
|
||||
use selector_parser::PseudoElement;
|
||||
use servo_arc::{Arc, RawOffsetArc};
|
||||
use std::mem::{forget, uninitialized, transmute, zeroed};
|
||||
use std::{cmp, ops, ptr};
|
||||
use stylearc::{Arc, RawOffsetArc};
|
||||
use values::{Auto, CustomIdent, Either, KeyframesName};
|
||||
use values::computed::ToComputedValue;
|
||||
use values::computed::effects::{BoxShadow, Filter, SimpleShadow};
|
||||
|
@ -305,7 +305,7 @@
|
||||
#[allow(unused_imports)]
|
||||
use selectors::parser::SelectorParseError;
|
||||
#[allow(unused_imports)]
|
||||
use stylearc::Arc;
|
||||
use servo_arc::Arc;
|
||||
#[allow(unused_imports)]
|
||||
use style_traits::{ParseError, StyleParseError};
|
||||
#[allow(unused_imports)]
|
||||
|
@ -10,10 +10,10 @@
|
||||
|
||||
<%namespace name="helpers" file="/helpers.mako.rs" />
|
||||
|
||||
use servo_arc::{Arc, UniqueArc};
|
||||
use std::borrow::Cow;
|
||||
use std::collections::HashSet;
|
||||
use std::{fmt, mem, ops};
|
||||
use stylearc::{Arc, UniqueArc};
|
||||
|
||||
use app_units::Au;
|
||||
#[cfg(feature = "servo")] use cssparser::RGBA;
|
||||
@ -2352,13 +2352,13 @@ pub fn get_writing_mode(inheritedbox_style: &style_structs::InheritedBox) -> Wri
|
||||
}
|
||||
|
||||
% if product == "gecko":
|
||||
pub use ::stylearc::RawOffsetArc as BuilderArc;
|
||||
pub use ::servo_arc::RawOffsetArc as BuilderArc;
|
||||
/// Clone an arc, returning a regular arc
|
||||
fn clone_arc<T: 'static>(x: &BuilderArc<T>) -> Arc<T> {
|
||||
Arc::from_raw_offset(x.clone())
|
||||
}
|
||||
% else:
|
||||
pub use ::stylearc::Arc as BuilderArc;
|
||||
pub use ::servo_arc::Arc as BuilderArc;
|
||||
/// Clone an arc, returning a regular arc
|
||||
fn clone_arc<T: 'static>(x: &BuilderArc<T>) -> Arc<T> {
|
||||
x.clone()
|
||||
@ -2653,7 +2653,7 @@ pub use self::lazy_static_module::INITIAL_SERVO_VALUES;
|
||||
#[allow(missing_docs)]
|
||||
mod lazy_static_module {
|
||||
use logical_geometry::WritingMode;
|
||||
use stylearc::Arc;
|
||||
use servo_arc::Arc;
|
||||
use super::{ComputedValues, ComputedValuesInner, longhands, style_structs, FontComputationData};
|
||||
use super::computed_value_flags::ComputedValueFlags;
|
||||
|
||||
|
@ -10,13 +10,13 @@ use applicable_declarations::ApplicableDeclarationList;
|
||||
#[cfg(feature = "servo")]
|
||||
use heapsize::HeapSizeOf;
|
||||
use properties::{Importance, LonghandIdSet, PropertyDeclarationBlock};
|
||||
use servo_arc::{Arc, ArcBorrow, NonZeroPtrMut};
|
||||
use shared_lock::{Locked, StylesheetGuards, SharedRwLockReadGuard};
|
||||
use smallvec::SmallVec;
|
||||
use std::io::{self, Write};
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
use std::sync::atomic::{AtomicPtr, AtomicUsize, Ordering};
|
||||
use stylearc::{Arc, ArcBorrow, NonZeroPtrMut};
|
||||
use stylesheets::StyleRule;
|
||||
use thread_state;
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
use parser::ParserContext;
|
||||
use servo_url::ServoUrl;
|
||||
use std::fmt;
|
||||
// Note: We use std::sync::Arc rather than stylearc::Arc here because the
|
||||
// Note: We use std::sync::Arc rather than servo_arc::Arc here because the
|
||||
// nonzero optimization is important in keeping the size of SpecifiedUrl below
|
||||
// the threshold.
|
||||
use std::sync::Arc;
|
||||
|
@ -8,11 +8,11 @@
|
||||
use atomic_refcell::{AtomicRefCell, AtomicRef, AtomicRefMut};
|
||||
#[cfg(feature = "servo")]
|
||||
use parking_lot::RwLock;
|
||||
use servo_arc::Arc;
|
||||
use std::cell::UnsafeCell;
|
||||
use std::fmt;
|
||||
#[cfg(feature = "gecko")]
|
||||
use std::ptr;
|
||||
use stylearc::Arc;
|
||||
|
||||
/// A shared read/write lock that can protect multiple objects.
|
||||
///
|
||||
|
@ -10,8 +10,8 @@ use Atom;
|
||||
use bloom::StyleBloom;
|
||||
use context::{SelectorFlagsMap, SharedStyleContext};
|
||||
use dom::TElement;
|
||||
use servo_arc::Arc;
|
||||
use sharing::{StyleSharingCandidate, StyleSharingTarget};
|
||||
use stylearc::Arc;
|
||||
|
||||
/// Whether, given two elements, they have pointer-equal computed values.
|
||||
///
|
||||
|
@ -77,11 +77,11 @@ use matching::MatchMethods;
|
||||
use owning_ref::OwningHandle;
|
||||
use properties::ComputedValues;
|
||||
use selectors::matching::{ElementSelectorFlags, VisitedHandlingMode};
|
||||
use servo_arc::Arc;
|
||||
use smallvec::SmallVec;
|
||||
use std::marker::PhantomData;
|
||||
use std::mem;
|
||||
use std::ops::Deref;
|
||||
use stylearc::Arc;
|
||||
use stylist::Stylist;
|
||||
|
||||
mod checks;
|
||||
|
@ -17,7 +17,7 @@ use properties::{VISITED_DEPENDENT_ONLY, cascade};
|
||||
use rule_tree::StrongRuleNode;
|
||||
use selector_parser::{PseudoElement, SelectorImpl};
|
||||
use selectors::matching::{ElementSelectorFlags, MatchingContext, MatchingMode, VisitedHandlingMode};
|
||||
use stylearc::Arc;
|
||||
use servo_arc::Arc;
|
||||
use stylist::RuleInclusion;
|
||||
|
||||
/// A struct that takes care of resolving the style of a given element.
|
||||
|
@ -9,10 +9,10 @@
|
||||
use cssparser::{Parser, Token, SourceLocation, BasicParseError};
|
||||
use media_queries::Device;
|
||||
use parser::{Parse, ParserContext};
|
||||
use servo_arc::Arc;
|
||||
use shared_lock::{DeepCloneParams, DeepCloneWithLock, Locked, SharedRwLock, SharedRwLockReadGuard, ToCssWithGuard};
|
||||
use std::fmt;
|
||||
use style_traits::{ToCss, ParseError, StyleParseError};
|
||||
use stylearc::Arc;
|
||||
use stylesheets::CssRules;
|
||||
use values::specified::url::SpecifiedUrl;
|
||||
|
||||
|
@ -42,7 +42,7 @@ impl DeepCloneWithLock for ImportSheet {
|
||||
/// A sheet that is held from an import rule.
|
||||
#[cfg(feature = "servo")]
|
||||
#[derive(Debug)]
|
||||
pub struct ImportSheet(pub ::stylearc::Arc<::stylesheets::Stylesheet>);
|
||||
pub struct ImportSheet(pub ::servo_arc::Arc<::stylesheets::Stylesheet>);
|
||||
|
||||
impl StylesheetInDocument for ImportSheet {
|
||||
/// Get the media associated with this stylesheet.
|
||||
@ -67,7 +67,7 @@ impl DeepCloneWithLock for ImportSheet {
|
||||
_guard: &SharedRwLockReadGuard,
|
||||
_params: &DeepCloneParams,
|
||||
) -> Self {
|
||||
use stylearc::Arc;
|
||||
use servo_arc::Arc;
|
||||
|
||||
ImportSheet(Arc::new((&*self.0).clone()))
|
||||
}
|
||||
|
@ -14,11 +14,11 @@ use properties::LonghandIdSet;
|
||||
use properties::animated_properties::AnimatableLonghand;
|
||||
use properties::longhands::transition_timing_function::single_value::SpecifiedValue as SpecifiedTimingFunction;
|
||||
use selectors::parser::SelectorParseError;
|
||||
use servo_arc::Arc;
|
||||
use shared_lock::{DeepCloneParams, DeepCloneWithLock, SharedRwLock, SharedRwLockReadGuard, Locked, ToCssWithGuard};
|
||||
use std::fmt;
|
||||
use style_traits::{PARSING_MODE_DEFAULT, ToCss, ParseError, StyleParseError};
|
||||
use style_traits::PropertyDeclarationParseError;
|
||||
use stylearc::Arc;
|
||||
use stylesheets::{CssRuleType, StylesheetContents};
|
||||
use stylesheets::rule_parser::VendorPrefix;
|
||||
use values::KeyframesName;
|
||||
|
@ -8,8 +8,8 @@
|
||||
use cssparser::SourceLocation;
|
||||
use media_queries::MediaList;
|
||||
use parser::ParserContext;
|
||||
use servo_arc::Arc;
|
||||
use shared_lock::{Locked, SharedRwLock};
|
||||
use stylearc::Arc;
|
||||
use stylesheets::import_rule::ImportRule;
|
||||
use values::specified::url::SpecifiedUrl;
|
||||
|
||||
|
@ -8,10 +8,10 @@
|
||||
|
||||
use cssparser::SourceLocation;
|
||||
use media_queries::MediaList;
|
||||
use servo_arc::Arc;
|
||||
use shared_lock::{DeepCloneParams, DeepCloneWithLock, Locked, SharedRwLock, SharedRwLockReadGuard, ToCssWithGuard};
|
||||
use std::fmt;
|
||||
use style_traits::ToCss;
|
||||
use stylearc::Arc;
|
||||
use stylesheets::CssRules;
|
||||
|
||||
/// An [`@media`][media] urle.
|
||||
|
@ -25,10 +25,10 @@ pub mod viewport_rule;
|
||||
use cssparser::{parse_one_rule, Parser, ParserInput};
|
||||
use error_reporting::NullReporter;
|
||||
use parser::ParserContext;
|
||||
use servo_arc::Arc;
|
||||
use shared_lock::{DeepCloneParams, DeepCloneWithLock, Locked, SharedRwLock, SharedRwLockReadGuard, ToCssWithGuard};
|
||||
use std::fmt;
|
||||
use style_traits::PARSING_MODE_DEFAULT;
|
||||
use stylearc::Arc;
|
||||
|
||||
pub use self::counter_style_rule::CounterStyleRule;
|
||||
pub use self::document_rule::DocumentRule;
|
||||
|
@ -8,10 +8,10 @@
|
||||
|
||||
use cssparser::SourceLocation;
|
||||
use properties::PropertyDeclarationBlock;
|
||||
use servo_arc::Arc;
|
||||
use shared_lock::{DeepCloneParams, DeepCloneWithLock, Locked, SharedRwLock, SharedRwLockReadGuard, ToCssWithGuard};
|
||||
use std::fmt;
|
||||
use style_traits::ToCss;
|
||||
use stylearc::Arc;
|
||||
|
||||
/// A [`@page`][page] rule.
|
||||
///
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
//! A list of CSS rules.
|
||||
|
||||
use servo_arc::{Arc, RawOffsetArc};
|
||||
use shared_lock::{DeepCloneParams, DeepCloneWithLock, Locked, SharedRwLock, SharedRwLockReadGuard};
|
||||
use stylearc::{Arc, RawOffsetArc};
|
||||
use stylesheets::{CssRule, RulesMutateError};
|
||||
use stylesheets::loader::StylesheetLoader;
|
||||
use stylesheets::memory::{MallocSizeOfFn, MallocSizeOfWithGuard};
|
||||
|
@ -16,11 +16,11 @@ use properties::parse_property_declaration_list;
|
||||
use selector_parser::{SelectorImpl, SelectorParser};
|
||||
use selectors::SelectorList;
|
||||
use selectors::parser::SelectorParseError;
|
||||
use servo_arc::Arc;
|
||||
use shared_lock::{Locked, SharedRwLock};
|
||||
use std::borrow::Cow;
|
||||
use str::starts_with_ignore_ascii_case;
|
||||
use style_traits::{StyleParseError, ParseError};
|
||||
use stylearc::Arc;
|
||||
use stylesheets::{CssRule, CssRules, CssRuleType, Origin, StylesheetLoader};
|
||||
use stylesheets::{DocumentRule, KeyframesRule, MediaRule, NamespaceRule, PageRule};
|
||||
use stylesheets::{StyleRule, SupportsRule, ViewportRule};
|
||||
|
@ -8,10 +8,10 @@ use cssparser::SourceLocation;
|
||||
use properties::PropertyDeclarationBlock;
|
||||
use selector_parser::SelectorImpl;
|
||||
use selectors::SelectorList;
|
||||
use servo_arc::Arc;
|
||||
use shared_lock::{DeepCloneParams, DeepCloneWithLock, Locked, SharedRwLock, SharedRwLockReadGuard, ToCssWithGuard};
|
||||
use std::fmt;
|
||||
use style_traits::ToCss;
|
||||
use stylearc::Arc;
|
||||
use stylesheets::{MallocSizeOf, MallocSizeOfFn, MallocSizeOfWithGuard};
|
||||
|
||||
/// A style rule, with selectors and declarations.
|
||||
|
@ -10,11 +10,11 @@ use fnv::FnvHashMap;
|
||||
use media_queries::{MediaList, Device};
|
||||
use parking_lot::RwLock;
|
||||
use parser::{ParserContext, log_css_error};
|
||||
use servo_arc::Arc;
|
||||
use shared_lock::{DeepCloneParams, DeepCloneWithLock, Locked, SharedRwLock, SharedRwLockReadGuard};
|
||||
use std::mem;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use style_traits::PARSING_MODE_DEFAULT;
|
||||
use stylearc::Arc;
|
||||
use stylesheets::{CssRule, CssRules, Origin, UrlExtraData};
|
||||
use stylesheets::loader::StylesheetLoader;
|
||||
use stylesheets::memory::{MallocSizeOfFn, MallocSizeOfWithGuard};
|
||||
|
@ -9,10 +9,10 @@ use cssparser::{Delimiter, parse_important, Parser, SourceLocation, Token};
|
||||
use parser::ParserContext;
|
||||
use properties::{PropertyId, PropertyDeclaration, SourcePropertyDeclaration};
|
||||
use selectors::parser::SelectorParseError;
|
||||
use servo_arc::Arc;
|
||||
use shared_lock::{DeepCloneParams, DeepCloneWithLock, Locked, SharedRwLock, SharedRwLockReadGuard, ToCssWithGuard};
|
||||
use std::fmt;
|
||||
use style_traits::{ToCss, ParseError, StyleParseError};
|
||||
use stylearc::Arc;
|
||||
use stylesheets::{CssRuleType, CssRules};
|
||||
|
||||
/// An [`@supports`][supports] rule.
|
||||
|
@ -31,13 +31,13 @@ use selectors::parser::{AncestorHashes, Combinator, Component, Selector};
|
||||
use selectors::parser::{SelectorIter, SelectorMethods};
|
||||
use selectors::sink::Push;
|
||||
use selectors::visitor::SelectorVisitor;
|
||||
use servo_arc::{Arc, ArcBorrow};
|
||||
use shared_lock::{Locked, SharedRwLockReadGuard, StylesheetGuards};
|
||||
use smallvec::VecLike;
|
||||
use std::fmt::Debug;
|
||||
#[cfg(feature = "servo")]
|
||||
use std::marker::PhantomData;
|
||||
use style_traits::viewport::ViewportConstraints;
|
||||
use stylearc::{Arc, ArcBorrow};
|
||||
#[cfg(feature = "gecko")]
|
||||
use stylesheets::{CounterStyleRule, FontFaceRule};
|
||||
use stylesheets::{CssRule, StyleRule};
|
||||
|
@ -23,6 +23,7 @@ log = {version = "0.3.5", features = ["release_max_level_info"]}
|
||||
nsstring_vendor = {path = "../../components/style/gecko_bindings/nsstring_vendor"}
|
||||
parking_lot = "0.4"
|
||||
selectors = {path = "../../components/selectors"}
|
||||
servo_arc = {path = "../../components/servo_arc"}
|
||||
style = {path = "../../components/style", features = ["gecko"]}
|
||||
style_traits = {path = "../../components/style_traits"}
|
||||
|
||||
|
@ -8,6 +8,7 @@ use cssparser::ToCss as ParserToCss;
|
||||
use env_logger::LogBuilder;
|
||||
use selectors::Element;
|
||||
use selectors::matching::{MatchingContext, MatchingMode, matches_selector};
|
||||
use servo_arc::{Arc, RawOffsetArc};
|
||||
use std::env;
|
||||
use std::fmt::Write;
|
||||
use std::ptr;
|
||||
@ -102,7 +103,6 @@ use style::sequential;
|
||||
use style::shared_lock::{SharedRwLockReadGuard, StylesheetGuards, ToCssWithGuard, Locked};
|
||||
use style::string_cache::Atom;
|
||||
use style::style_adjuster::StyleAdjuster;
|
||||
use style::stylearc::{Arc, RawOffsetArc};
|
||||
use style::stylesheets::{CssRule, CssRules, CssRuleType, CssRulesHelpers, DocumentRule};
|
||||
use style::stylesheets::{ImportRule, KeyframesRule, MallocSizeOfWithGuard, MediaRule};
|
||||
use style::stylesheets::{NamespaceRule, Origin, PageRule, StyleRule, SupportsRule};
|
||||
|
@ -10,6 +10,7 @@ extern crate env_logger;
|
||||
extern crate libc;
|
||||
#[macro_use] extern crate log;
|
||||
extern crate selectors;
|
||||
extern crate servo_arc;
|
||||
#[macro_use] extern crate style;
|
||||
extern crate style_traits;
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use cssparser::SourceLocation;
|
||||
use servo_arc::Arc;
|
||||
use style::gecko::data::GeckoStyleSheet;
|
||||
use style::gecko_bindings::bindings::Gecko_LoadStyleSheet;
|
||||
use style::gecko_bindings::structs::{Loader, ServoStyleSheet, LoaderReusableStyleSheets};
|
||||
@ -10,7 +11,6 @@ use style::gecko_bindings::sugar::ownership::FFIArcHelpers;
|
||||
use style::media_queries::MediaList;
|
||||
use style::parser::ParserContext;
|
||||
use style::shared_lock::{Locked, SharedRwLock};
|
||||
use style::stylearc::Arc;
|
||||
use style::stylesheets::{ImportRule, StylesheetLoader as StyleStylesheetLoader};
|
||||
use style::stylesheets::import_rule::ImportSheet;
|
||||
use style::values::specified::url::SpecifiedUrl;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user