mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Update to string-cache 0.3
This commit is contained in:
parent
9fcc9d9d3f
commit
53b638c0e2
170 changed files with 1309 additions and 1050 deletions
|
@ -21,6 +21,7 @@ gfx = {path = "../gfx"}
|
|||
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"
|
||||
|
@ -36,8 +37,8 @@ script_layout_interface = {path = "../script_layout_interface"}
|
|||
script_traits = {path = "../script_traits"}
|
||||
selectors = "0.14"
|
||||
serde_derive = "0.8"
|
||||
servo_atoms = {path = "../atoms"}
|
||||
smallvec = "0.1"
|
||||
string_cache = {version = "0.2.26", features = ["heap_size"]}
|
||||
style = {path = "../style"}
|
||||
style_traits = {path = "../style_traits"}
|
||||
unicode-bidi = "0.2"
|
||||
|
|
|
@ -1660,7 +1660,10 @@ trait ObjectElement {
|
|||
impl<N> ObjectElement for N where N: ThreadSafeLayoutNode {
|
||||
fn has_object_data(&self) -> bool {
|
||||
let elem = self.as_element().unwrap();
|
||||
let type_and_data = (elem.get_attr(&ns!(), &atom!("type")), elem.get_attr(&ns!(), &atom!("data")));
|
||||
let type_and_data = (
|
||||
elem.get_attr(&ns!(), &local_name!("type")),
|
||||
elem.get_attr(&ns!(), &local_name!("data")),
|
||||
);
|
||||
match type_and_data {
|
||||
(None, Some(uri)) => is_image_data(uri),
|
||||
_ => false
|
||||
|
@ -1669,7 +1672,10 @@ impl<N> ObjectElement for N where N: ThreadSafeLayoutNode {
|
|||
|
||||
fn object_data(&self) -> Option<Url> {
|
||||
let elem = self.as_element().unwrap();
|
||||
let type_and_data = (elem.get_attr(&ns!(), &atom!("type")), elem.get_attr(&ns!(), &atom!("data")));
|
||||
let type_and_data = (
|
||||
elem.get_attr(&ns!(), &local_name!("type")),
|
||||
elem.get_attr(&ns!(), &local_name!("data")),
|
||||
);
|
||||
match type_and_data {
|
||||
(None, Some(uri)) if is_image_data(uri) => Url::parse(uri).ok(),
|
||||
_ => None
|
||||
|
|
|
@ -886,7 +886,7 @@ impl TableColumnFragmentInfo {
|
|||
/// Create the information specific to an table column fragment.
|
||||
pub fn new<N: ThreadSafeLayoutNode>(node: &N) -> TableColumnFragmentInfo {
|
||||
let element = node.as_element().unwrap();
|
||||
let span = element.get_attr(&ns!(), &atom!("span"))
|
||||
let span = element.get_attr(&ns!(), &local_name!("span"))
|
||||
.and_then(|string| string.parse().ok())
|
||||
.unwrap_or(0);
|
||||
TableColumnFragmentInfo {
|
||||
|
|
|
@ -29,6 +29,7 @@ extern crate gfx;
|
|||
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]
|
||||
|
@ -47,8 +48,8 @@ extern crate range;
|
|||
extern crate rustc_serialize;
|
||||
extern crate script_layout_interface;
|
||||
extern crate script_traits;
|
||||
#[macro_use] extern crate servo_atoms;
|
||||
extern crate smallvec;
|
||||
#[macro_use(atom, ns)] extern crate string_cache;
|
||||
extern crate style;
|
||||
extern crate style_traits;
|
||||
extern crate unicode_bidi;
|
||||
|
|
|
@ -23,10 +23,10 @@ use script_layout_interface::wrapper_traits::{LayoutNode, ThreadSafeLayoutElemen
|
|||
use script_traits::LayoutMsg as ConstellationMsg;
|
||||
use script_traits::UntrustedNodeAddress;
|
||||
use sequential;
|
||||
use servo_atoms::Atom;
|
||||
use std::cmp::{min, max};
|
||||
use std::ops::Deref;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use string_cache::Atom;
|
||||
use style::computed_values;
|
||||
use style::context::StyleContext;
|
||||
use style::logical_geometry::{WritingMode, BlockFlowDirection, InlineBaseDirection};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue