Update to string-cache 0.3

This commit is contained in:
Simon Sapin 2016-10-30 19:27:43 +01:00
parent 9fcc9d9d3f
commit 53b638c0e2
170 changed files with 1309 additions and 1050 deletions

View file

@ -18,6 +18,7 @@ euclid = "0.10.1"
gfx_traits = {path = "../gfx_traits"}
heapsize = "0.3.0"
heapsize_derive = "0.1"
html5ever-atoms = "0.1"
ipc-channel = "0.5"
libc = "0.2"
log = "0.3.5"
@ -28,6 +29,6 @@ profile_traits = {path = "../profile_traits"}
range = {path = "../range"}
script_traits = {path = "../script_traits"}
selectors = "0.14"
string_cache = {version = "0.2.26", features = ["heap_size"]}
servo_atoms = {path = "../atoms"}
style = {path = "../style"}
url = {version = "1.2", features = ["heap_size"]}

View file

@ -24,6 +24,7 @@ extern crate euclid;
extern crate gfx_traits;
extern crate heapsize;
#[macro_use] extern crate heapsize_derive;
#[macro_use] extern crate html5ever_atoms;
extern crate ipc_channel;
extern crate libc;
#[macro_use]
@ -34,8 +35,7 @@ extern crate profile_traits;
extern crate range;
extern crate script_traits;
extern crate selectors;
#[macro_use(atom, ns)]
extern crate string_cache;
#[macro_use] extern crate servo_atoms;
extern crate style;
extern crate url;

View file

@ -14,9 +14,9 @@ use profile_traits::mem::ReportsChan;
use rpc::LayoutRPC;
use script_traits::{ConstellationControlMsg, LayoutControlMsg};
use script_traits::{LayoutMsg as ConstellationMsg, StackingContextScrollState, WindowSizeData};
use servo_atoms::Atom;
use std::sync::Arc;
use std::sync::mpsc::{Receiver, Sender};
use string_cache::Atom;
use style::context::ReflowGoal;
use style::selector_impl::PseudoElement;
use style::stylesheets::Stylesheet;

View file

@ -9,12 +9,12 @@ use LayoutNodeType;
use OpaqueStyleAndLayoutData;
use SVGSVGData;
use gfx_traits::ByteIndex;
use html5ever_atoms::{Namespace, LocalName};
use msg::constellation_msg::PipelineId;
use range::Range;
use restyle_damage::RestyleDamage;
use std::fmt::Debug;
use std::sync::Arc;
use string_cache::{Atom, Namespace};
use style::atomic_refcell::AtomicRefCell;
use style::computed_values::display;
use style::context::SharedStyleContext;
@ -295,7 +295,7 @@ pub trait ThreadSafeLayoutElement: Clone + Copy + Sized + Debug +
fn type_id(&self) -> Option<LayoutNodeType>;
#[inline]
fn get_attr(&self, namespace: &Namespace, name: &Atom) -> Option<&str>;
fn get_attr(&self, namespace: &Namespace, name: &LocalName) -> Option<&str>;
fn get_style_data(&self) -> Option<&AtomicRefCell<ElementData>>;
@ -330,7 +330,7 @@ pub trait ThreadSafeLayoutElement: Clone + Copy + Sized + Debug +
#[inline]
fn get_details_summary_pseudo(&self) -> Option<Self> {
if self.get_local_name() == &atom!("details") &&
if self.get_local_name() == &local_name!("details") &&
self.get_namespace() == &ns!(html) {
Some(self.with_pseudo(PseudoElementType::DetailsSummary(None)))
} else {
@ -340,9 +340,9 @@ pub trait ThreadSafeLayoutElement: Clone + Copy + Sized + Debug +
#[inline]
fn get_details_content_pseudo(&self) -> Option<Self> {
if self.get_local_name() == &atom!("details") &&
if self.get_local_name() == &local_name!("details") &&
self.get_namespace() == &ns!(html) {
let display = if self.get_attr(&ns!(), &atom!("open")).is_some() {
let display = if self.get_attr(&ns!(), &local_name!("open")).is_some() {
None // Specified by the stylesheet
} else {
Some(display::T::none)