mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Eliminate servo_util::atom
We only needed this for Encodable, and now we use JSTraceable instead.
This commit is contained in:
parent
4be0a07585
commit
6429750b33
39 changed files with 77 additions and 74 deletions
7
Cargo.lock
generated
7
Cargo.lock
generated
|
@ -287,6 +287,8 @@ dependencies = [
|
||||||
"plugins 0.0.1",
|
"plugins 0.0.1",
|
||||||
"script 0.0.1",
|
"script 0.0.1",
|
||||||
"script_traits 0.0.1",
|
"script_traits 0.0.1",
|
||||||
|
"string_cache 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)",
|
||||||
|
"string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)",
|
||||||
"style 0.0.1",
|
"style 0.0.1",
|
||||||
"url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)",
|
"url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)",
|
||||||
"util 0.0.1",
|
"util 0.0.1",
|
||||||
|
@ -397,6 +399,8 @@ dependencies = [
|
||||||
"net 0.0.1",
|
"net 0.0.1",
|
||||||
"plugins 0.0.1",
|
"plugins 0.0.1",
|
||||||
"script_traits 0.0.1",
|
"script_traits 0.0.1",
|
||||||
|
"string_cache 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)",
|
||||||
|
"string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)",
|
||||||
"style 0.0.1",
|
"style 0.0.1",
|
||||||
"url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)",
|
"url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)",
|
||||||
"util 0.0.1",
|
"util 0.0.1",
|
||||||
|
@ -462,6 +466,8 @@ dependencies = [
|
||||||
"plugins 0.0.1",
|
"plugins 0.0.1",
|
||||||
"url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)",
|
"url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)",
|
||||||
"util 0.0.1",
|
"util 0.0.1",
|
||||||
|
"string_cache 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)",
|
||||||
|
"string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -483,6 +489,7 @@ dependencies = [
|
||||||
"azure 0.1.0 (git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d)",
|
"azure 0.1.0 (git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d)",
|
||||||
"geom 0.1.0 (git+https://github.com/servo/rust-geom#90add8d65273c8a46aa16d73959e29a51d0c282d)",
|
"geom 0.1.0 (git+https://github.com/servo/rust-geom#90add8d65273c8a46aa16d73959e29a51d0c282d)",
|
||||||
"string_cache 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)",
|
"string_cache 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)",
|
||||||
|
"string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)",
|
||||||
"task_info 0.0.1",
|
"task_info 0.0.1",
|
||||||
"url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)",
|
"url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)",
|
||||||
]
|
]
|
||||||
|
|
|
@ -39,3 +39,9 @@ git = "https://github.com/servo/rust-geom"
|
||||||
|
|
||||||
[dependencies.url]
|
[dependencies.url]
|
||||||
git = "https://github.com/servo/rust-url"
|
git = "https://github.com/servo/rust-url"
|
||||||
|
|
||||||
|
[dependencies.string_cache]
|
||||||
|
git = "https://github.com/servo/string-cache"
|
||||||
|
|
||||||
|
[dependencies.string_cache_macros]
|
||||||
|
git = "https://github.com/servo/string-cache"
|
||||||
|
|
|
@ -11,7 +11,6 @@ use util::{LayoutDataAccess, LayoutDataWrapper};
|
||||||
use wrapper::{LayoutElement, LayoutNode, PostorderNodeMutTraversal, ThreadSafeLayoutNode, TLayoutNode};
|
use wrapper::{LayoutElement, LayoutNode, PostorderNodeMutTraversal, ThreadSafeLayoutNode, TLayoutNode};
|
||||||
|
|
||||||
use script::dom::node::{TextNodeTypeId};
|
use script::dom::node::{TextNodeTypeId};
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::bloom::BloomFilter;
|
use servo_util::bloom::BloomFilter;
|
||||||
use servo_util::cache::{Cache, LRUCache, SimpleHashCache};
|
use servo_util::cache::{Cache, LRUCache, SimpleHashCache};
|
||||||
use servo_util::namespace::Null;
|
use servo_util::namespace::Null;
|
||||||
|
@ -24,6 +23,7 @@ use style;
|
||||||
use style::{After, Before, ComputedValues, DeclarationBlock, Stylist, TElement, TNode};
|
use style::{After, Before, ComputedValues, DeclarationBlock, Stylist, TElement, TNode};
|
||||||
use style::cascade;
|
use style::cascade;
|
||||||
use sync::Arc;
|
use sync::Arc;
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
pub struct ApplicableDeclarations {
|
pub struct ApplicableDeclarations {
|
||||||
pub normal: SmallVec16<DeclarationBlock>,
|
pub normal: SmallVec16<DeclarationBlock>,
|
||||||
|
|
|
@ -28,6 +28,9 @@ extern crate "net" as servo_net;
|
||||||
extern crate "msg" as servo_msg;
|
extern crate "msg" as servo_msg;
|
||||||
#[phase(plugin, link)]
|
#[phase(plugin, link)]
|
||||||
extern crate "util" as servo_util;
|
extern crate "util" as servo_util;
|
||||||
|
extern crate string_cache;
|
||||||
|
#[phase(plugin)]
|
||||||
|
extern crate string_cache_macros;
|
||||||
|
|
||||||
extern crate collections;
|
extern crate collections;
|
||||||
extern crate encoding;
|
extern crate encoding;
|
||||||
|
|
|
@ -48,7 +48,6 @@ use script::dom::node::{LayoutNodeHelpers, RawLayoutNodeHelpers, SharedLayoutDat
|
||||||
use script::dom::text::Text;
|
use script::dom::text::Text;
|
||||||
use script::layout_interface::LayoutChan;
|
use script::layout_interface::LayoutChan;
|
||||||
use servo_msg::constellation_msg::{PipelineId, SubpageId};
|
use servo_msg::constellation_msg::{PipelineId, SubpageId};
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::namespace::Namespace;
|
use servo_util::namespace::Namespace;
|
||||||
use servo_util::namespace;
|
use servo_util::namespace;
|
||||||
use servo_util::str::is_whitespace;
|
use servo_util::str::is_whitespace;
|
||||||
|
@ -59,6 +58,7 @@ use style::computed_values::{content, display, white_space};
|
||||||
use style::{AnyNamespace, AttrSelector, PropertyDeclarationBlock, SpecificNamespace, TElement};
|
use style::{AnyNamespace, AttrSelector, PropertyDeclarationBlock, SpecificNamespace, TElement};
|
||||||
use style::{TNode};
|
use style::{TNode};
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
/// Allows some convenience methods on generic layout nodes.
|
/// Allows some convenience methods on generic layout nodes.
|
||||||
pub trait TLayoutNode {
|
pub trait TLayoutNode {
|
||||||
|
|
|
@ -60,3 +60,9 @@ git = "https://github.com/servo/rust-url"
|
||||||
|
|
||||||
[dependencies.uuid]
|
[dependencies.uuid]
|
||||||
git = "https://github.com/rust-lang/uuid"
|
git = "https://github.com/rust-lang/uuid"
|
||||||
|
|
||||||
|
[dependencies.string_cache]
|
||||||
|
git = "https://github.com/servo/string-cache"
|
||||||
|
|
||||||
|
[dependencies.string_cache_macros]
|
||||||
|
git = "https://github.com/servo/string-cache"
|
||||||
|
|
|
@ -15,13 +15,13 @@ use dom::window::Window;
|
||||||
use dom::virtualmethods::vtable_for;
|
use dom::virtualmethods::vtable_for;
|
||||||
|
|
||||||
use devtools_traits::AttrInfo;
|
use devtools_traits::AttrInfo;
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::namespace;
|
use servo_util::namespace;
|
||||||
use servo_util::namespace::Namespace;
|
use servo_util::namespace::Namespace;
|
||||||
use servo_util::str::{DOMString, split_html_space_chars};
|
use servo_util::str::{DOMString, split_html_space_chars};
|
||||||
use std::cell::{Ref, RefCell};
|
use std::cell::{Ref, RefCell};
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::slice::Items;
|
use std::slice::Items;
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
pub enum AttrSettingType {
|
pub enum AttrSettingType {
|
||||||
FirstSetAttr,
|
FirstSetAttr,
|
||||||
|
|
|
@ -35,7 +35,6 @@ use std::rc::Rc;
|
||||||
use std::cell::{Cell, RefCell};
|
use std::cell::{Cell, RefCell};
|
||||||
|
|
||||||
use url::Url;
|
use url::Url;
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::namespace::Namespace;
|
use servo_util::namespace::Namespace;
|
||||||
use msg::constellation_msg::{PipelineId, SubpageId, WindowSizeData};
|
use msg::constellation_msg::{PipelineId, SubpageId, WindowSizeData};
|
||||||
use net::image_cache_task::ImageCacheTask;
|
use net::image_cache_task::ImageCacheTask;
|
||||||
|
@ -43,6 +42,7 @@ use script_traits::ScriptControlChan;
|
||||||
use std::collections::hashmap::HashMap;
|
use std::collections::hashmap::HashMap;
|
||||||
use collections::hash::Hash;
|
use collections::hash::Hash;
|
||||||
use style::PropertyDeclarationBlock;
|
use style::PropertyDeclarationBlock;
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
impl<T: Reflectable> JSTraceable for JS<T> {
|
impl<T: Reflectable> JSTraceable for JS<T> {
|
||||||
fn trace(&self, trc: *mut JSTracer) {
|
fn trace(&self, trc: *mut JSTracer) {
|
||||||
|
|
|
@ -55,10 +55,10 @@ use dom::window::{Window, WindowHelpers};
|
||||||
use html::hubbub_html_parser::build_element_from_tag;
|
use html::hubbub_html_parser::build_element_from_tag;
|
||||||
use hubbub::hubbub::{QuirksMode, NoQuirks, LimitedQuirks, FullQuirks};
|
use hubbub::hubbub::{QuirksMode, NoQuirks, LimitedQuirks, FullQuirks};
|
||||||
use layout_interface::{DocumentDamageLevel, ContentChangedDocumentDamage};
|
use layout_interface::{DocumentDamageLevel, ContentChangedDocumentDamage};
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::namespace;
|
use servo_util::namespace;
|
||||||
use servo_util::namespace::{Namespace, Null};
|
use servo_util::namespace::{Namespace, Null};
|
||||||
use servo_util::str::{DOMString, split_html_space_chars};
|
use servo_util::str::{DOMString, split_html_space_chars};
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
use std::collections::hashmap::HashMap;
|
use std::collections::hashmap::HashMap;
|
||||||
use std::ascii::StrAsciiExt;
|
use std::ascii::StrAsciiExt;
|
||||||
|
|
|
@ -12,9 +12,9 @@ use dom::bindings::utils::{Reflector, Reflectable, reflect_dom_object};
|
||||||
use dom::element::{Element, AttributeHandlers};
|
use dom::element::{Element, AttributeHandlers};
|
||||||
use dom::node::window_from_node;
|
use dom::node::window_from_node;
|
||||||
|
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::namespace::Null;
|
use servo_util::namespace::Null;
|
||||||
use servo_util::str::{DOMString, HTML_SPACE_CHARACTERS};
|
use servo_util::str::{DOMString, HTML_SPACE_CHARACTERS};
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
#[jstraceable]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
|
|
|
@ -34,7 +34,6 @@ use layout_interface::MatchSelectorsDocumentDamage;
|
||||||
use devtools_traits::AttrInfo;
|
use devtools_traits::AttrInfo;
|
||||||
use style::{matches, parse_selector_list_from_str};
|
use style::{matches, parse_selector_list_from_str};
|
||||||
use style;
|
use style;
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::namespace;
|
use servo_util::namespace;
|
||||||
use servo_util::namespace::{Namespace, Null};
|
use servo_util::namespace::{Namespace, Null};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
@ -42,6 +41,7 @@ use servo_util::str::DOMString;
|
||||||
use std::ascii::StrAsciiExt;
|
use std::ascii::StrAsciiExt;
|
||||||
use std::cell::{Cell, RefCell};
|
use std::cell::{Cell, RefCell};
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
#[jstraceable]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
|
|
|
@ -17,8 +17,8 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId, window_from_node};
|
use dom::node::{Node, ElementNodeTypeId, window_from_node};
|
||||||
use dom::virtualmethods::VirtualMethods;
|
use dom::virtualmethods::VirtualMethods;
|
||||||
|
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
#[jstraceable]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
|
|
|
@ -16,8 +16,8 @@ use dom::node::{DisabledStateHelpers, Node, NodeHelpers, ElementNodeTypeId, wind
|
||||||
use dom::validitystate::ValidityState;
|
use dom::validitystate::ValidityState;
|
||||||
use dom::virtualmethods::VirtualMethods;
|
use dom::virtualmethods::VirtualMethods;
|
||||||
|
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
#[jstraceable]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
|
|
|
@ -18,8 +18,8 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId, window_from_node};
|
use dom::node::{Node, ElementNodeTypeId, window_from_node};
|
||||||
use dom::virtualmethods::VirtualMethods;
|
use dom::virtualmethods::VirtualMethods;
|
||||||
|
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::str::{DOMString, parse_unsigned_integer};
|
use servo_util::str::{DOMString, parse_unsigned_integer};
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
use geom::size::Size2D;
|
use geom::size::Size2D;
|
||||||
|
|
||||||
|
|
|
@ -12,11 +12,11 @@ use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
|
||||||
use dom::element::{Element, AttributeHandlers, ElementHelpers};
|
use dom::element::{Element, AttributeHandlers, ElementHelpers};
|
||||||
use dom::node::{Node, NodeHelpers};
|
use dom::node::{Node, NodeHelpers};
|
||||||
use dom::window::Window;
|
use dom::window::Window;
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::namespace::Namespace;
|
use servo_util::namespace::Namespace;
|
||||||
use servo_util::str::{DOMString, split_html_space_chars};
|
use servo_util::str::{DOMString, split_html_space_chars};
|
||||||
|
|
||||||
use std::ascii::StrAsciiExt;
|
use std::ascii::StrAsciiExt;
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
pub trait CollectionFilter : JSTraceable {
|
pub trait CollectionFilter : JSTraceable {
|
||||||
fn filter(&self, elem: JSRef<Element>, root: JSRef<Node>) -> bool;
|
fn filter(&self, elem: JSRef<Element>, root: JSRef<Node>) -> bool;
|
||||||
|
|
|
@ -17,9 +17,9 @@ use dom::eventtarget::{EventTarget, EventTargetHelpers, NodeTargetTypeId};
|
||||||
use dom::node::{Node, ElementNodeTypeId, window_from_node};
|
use dom::node::{Node, ElementNodeTypeId, window_from_node};
|
||||||
use dom::virtualmethods::VirtualMethods;
|
use dom::virtualmethods::VirtualMethods;
|
||||||
|
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::namespace;
|
use servo_util::namespace;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
#[jstraceable]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
|
|
|
@ -18,8 +18,8 @@ use dom::node::{DisabledStateHelpers, Node, NodeHelpers, ElementNodeTypeId, wind
|
||||||
use dom::validitystate::ValidityState;
|
use dom::validitystate::ValidityState;
|
||||||
use dom::virtualmethods::VirtualMethods;
|
use dom::virtualmethods::VirtualMethods;
|
||||||
|
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::str::{DOMString, StaticStringVec};
|
use servo_util::str::{DOMString, StaticStringVec};
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
#[jstraceable]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
|
|
|
@ -23,9 +23,9 @@ use page::IterablePage;
|
||||||
use servo_msg::constellation_msg::{PipelineId, SubpageId};
|
use servo_msg::constellation_msg::{PipelineId, SubpageId};
|
||||||
use servo_msg::constellation_msg::{IFrameSandboxed, IFrameUnsandboxed};
|
use servo_msg::constellation_msg::{IFrameSandboxed, IFrameUnsandboxed};
|
||||||
use servo_msg::constellation_msg::{ConstellationChan, LoadIframeUrlMsg};
|
use servo_msg::constellation_msg::{ConstellationChan, LoadIframeUrlMsg};
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::namespace::Null;
|
use servo_util::namespace::Null;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
use std::ascii::StrAsciiExt;
|
use std::ascii::StrAsciiExt;
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
|
|
|
@ -17,9 +17,9 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, ElementNodeTypeId, NodeHelpers, window_from_node};
|
use dom::node::{Node, ElementNodeTypeId, NodeHelpers, window_from_node};
|
||||||
use dom::virtualmethods::VirtualMethods;
|
use dom::virtualmethods::VirtualMethods;
|
||||||
use servo_net::image_cache_task;
|
use servo_net::image_cache_task;
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::geometry::to_px;
|
use servo_util::geometry::to_px;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
use url::{Url, UrlParser};
|
use url::{Url, UrlParser};
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{DisabledStateHelpers, Node, NodeHelpers, ElementNodeTypeId};
|
use dom::node::{DisabledStateHelpers, Node, NodeHelpers, ElementNodeTypeId};
|
||||||
use dom::virtualmethods::VirtualMethods;
|
use dom::virtualmethods::VirtualMethods;
|
||||||
|
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
#[jstraceable]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
|
|
|
@ -15,12 +15,12 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{Node, NodeHelpers, ElementNodeTypeId, window_from_node};
|
use dom::node::{Node, NodeHelpers, ElementNodeTypeId, window_from_node};
|
||||||
use dom::virtualmethods::VirtualMethods;
|
use dom::virtualmethods::VirtualMethods;
|
||||||
use layout_interface::{LayoutChan, LoadStylesheetMsg};
|
use layout_interface::{LayoutChan, LoadStylesheetMsg};
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::str::{DOMString, HTML_SPACE_CHARACTERS};
|
use servo_util::str::{DOMString, HTML_SPACE_CHARACTERS};
|
||||||
use servo_util::namespace::Null;
|
use servo_util::namespace::Null;
|
||||||
|
|
||||||
use std::ascii::StrAsciiExt;
|
use std::ascii::StrAsciiExt;
|
||||||
use url::UrlParser;
|
use url::UrlParser;
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
#[jstraceable]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
|
|
|
@ -20,9 +20,9 @@ use dom::virtualmethods::VirtualMethods;
|
||||||
|
|
||||||
use servo_net::image_cache_task;
|
use servo_net::image_cache_task;
|
||||||
use servo_net::image_cache_task::ImageCacheTask;
|
use servo_net::image_cache_task::ImageCacheTask;
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::namespace::Null;
|
use servo_util::namespace::Null;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{DisabledStateHelpers, Node, NodeHelpers, ElementNodeTypeId};
|
use dom::node::{DisabledStateHelpers, Node, NodeHelpers, ElementNodeTypeId};
|
||||||
use dom::virtualmethods::VirtualMethods;
|
use dom::virtualmethods::VirtualMethods;
|
||||||
|
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
#[jstraceable]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
|
|
|
@ -19,9 +19,9 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{DisabledStateHelpers, Node, NodeHelpers, ElementNodeTypeId};
|
use dom::node::{DisabledStateHelpers, Node, NodeHelpers, ElementNodeTypeId};
|
||||||
use dom::virtualmethods::VirtualMethods;
|
use dom::virtualmethods::VirtualMethods;
|
||||||
|
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::namespace;
|
use servo_util::namespace;
|
||||||
use servo_util::str::{DOMString, split_html_space_chars};
|
use servo_util::str::{DOMString, split_html_space_chars};
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
#[jstraceable]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
|
|
|
@ -18,8 +18,8 @@ use dom::node::{DisabledStateHelpers, Node, NodeHelpers, ElementNodeTypeId, wind
|
||||||
use dom::validitystate::ValidityState;
|
use dom::validitystate::ValidityState;
|
||||||
use dom::virtualmethods::VirtualMethods;
|
use dom::virtualmethods::VirtualMethods;
|
||||||
|
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
#[jstraceable]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
|
|
|
@ -18,8 +18,8 @@ use dom::node::{TextNodeTypeId, NodeHelpers};
|
||||||
use dom::processinginstruction::ProcessingInstruction;
|
use dom::processinginstruction::ProcessingInstruction;
|
||||||
use dom::text::Text;
|
use dom::text::Text;
|
||||||
|
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::namespace;
|
use servo_util::namespace;
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn serialize(iterator: &mut NodeIterator) -> String {
|
pub fn serialize(iterator: &mut NodeIterator) -> String {
|
||||||
|
|
|
@ -15,8 +15,8 @@ use dom::htmlelement::HTMLElement;
|
||||||
use dom::node::{DisabledStateHelpers, Node, NodeHelpers, ElementNodeTypeId};
|
use dom::node::{DisabledStateHelpers, Node, NodeHelpers, ElementNodeTypeId};
|
||||||
use dom::virtualmethods::VirtualMethods;
|
use dom::virtualmethods::VirtualMethods;
|
||||||
|
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
#[jstraceable]
|
#[jstraceable]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
|
|
|
@ -57,8 +57,8 @@ use dom::htmlstyleelement::HTMLStyleElement;
|
||||||
use dom::htmltextareaelement::HTMLTextAreaElement;
|
use dom::htmltextareaelement::HTMLTextAreaElement;
|
||||||
use dom::node::{Node, NodeHelpers, ElementNodeTypeId};
|
use dom::node::{Node, NodeHelpers, ElementNodeTypeId};
|
||||||
|
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
/// Trait to allow DOM nodes to opt-in to overriding (or adding to) common
|
/// Trait to allow DOM nodes to opt-in to overriding (or adding to) common
|
||||||
/// behaviours. Replicates the effect of C++ virtual methods.
|
/// behaviours. Replicates the effect of C++ virtual methods.
|
||||||
|
|
|
@ -25,7 +25,6 @@ use encoding::types::{Encoding, DecodeReplace};
|
||||||
use hubbub::hubbub;
|
use hubbub::hubbub;
|
||||||
use hubbub::hubbub::{NullNs, HtmlNs, MathMlNs, SvgNs, XLinkNs, XmlNs, XmlNsNs};
|
use hubbub::hubbub::{NullNs, HtmlNs, MathMlNs, SvgNs, XLinkNs, XmlNs, XmlNsNs};
|
||||||
use servo_net::resource_task::{Load, LoadData, Payload, Done, ResourceTask, load_whole_resource};
|
use servo_net::resource_task::{Load, LoadData, Payload, Done, ResourceTask, load_whole_resource};
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::namespace;
|
use servo_util::namespace;
|
||||||
use servo_util::namespace::{Namespace, Null};
|
use servo_util::namespace::{Namespace, Null};
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
@ -37,6 +36,7 @@ use std::comm::{channel, Sender, Receiver};
|
||||||
use url::{Url, UrlParser};
|
use url::{Url, UrlParser};
|
||||||
use http::headers::HeaderEnum;
|
use http::headers::HeaderEnum;
|
||||||
use time;
|
use time;
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
macro_rules! handle_element(
|
macro_rules! handle_element(
|
||||||
($document: expr,
|
($document: expr,
|
||||||
|
|
|
@ -42,6 +42,9 @@ extern crate sync;
|
||||||
extern crate "msg" as servo_msg;
|
extern crate "msg" as servo_msg;
|
||||||
extern crate url;
|
extern crate url;
|
||||||
extern crate uuid;
|
extern crate uuid;
|
||||||
|
extern crate string_cache;
|
||||||
|
#[phase(plugin)]
|
||||||
|
extern crate string_cache_macros;
|
||||||
|
|
||||||
pub mod cors;
|
pub mod cors;
|
||||||
|
|
||||||
|
|
|
@ -29,3 +29,9 @@ git = "https://github.com/lifthrasiir/rust-encoding"
|
||||||
|
|
||||||
[dependencies.lazy_static]
|
[dependencies.lazy_static]
|
||||||
git = "https://github.com/Kimundi/lazy-static.rs"
|
git = "https://github.com/Kimundi/lazy-static.rs"
|
||||||
|
|
||||||
|
[dependencies.string_cache]
|
||||||
|
git = "https://github.com/servo/string-cache"
|
||||||
|
|
||||||
|
[dependencies.string_cache_macros]
|
||||||
|
git = "https://github.com/servo/string-cache"
|
||||||
|
|
|
@ -22,6 +22,11 @@ extern crate url;
|
||||||
|
|
||||||
extern crate cssparser;
|
extern crate cssparser;
|
||||||
extern crate encoding;
|
extern crate encoding;
|
||||||
|
extern crate string_cache;
|
||||||
|
|
||||||
|
#[phase(plugin)]
|
||||||
|
extern crate string_cache_macros;
|
||||||
|
|
||||||
#[phase(plugin)]
|
#[phase(plugin)]
|
||||||
extern crate lazy_static;
|
extern crate lazy_static;
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
//! style.
|
//! style.
|
||||||
|
|
||||||
use selectors::AttrSelector;
|
use selectors::AttrSelector;
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::namespace::Namespace;
|
use servo_util::namespace::Namespace;
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
|
|
||||||
pub trait TNode<'a, E: TElement<'a>> : Clone {
|
pub trait TNode<'a, E: TElement<'a>> : Clone {
|
||||||
|
|
|
@ -9,11 +9,11 @@ use sync::Arc;
|
||||||
|
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::bloom::BloomFilter;
|
use servo_util::bloom::BloomFilter;
|
||||||
use servo_util::namespace;
|
use servo_util::namespace;
|
||||||
use servo_util::smallvec::VecLike;
|
use servo_util::smallvec::VecLike;
|
||||||
use servo_util::sort;
|
use servo_util::sort;
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
use media_queries::{Device, Screen};
|
use media_queries::{Device, Screen};
|
||||||
use node::{TElement, TNode};
|
use node::{TElement, TNode};
|
||||||
|
@ -997,7 +997,6 @@ impl<K: Eq + Hash, V> FindPush<K, V> for HashMap<K, Vec<V>> {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use sync::Arc;
|
use sync::Arc;
|
||||||
use super::{DeclarationBlock, Rule, SelectorMap};
|
use super::{DeclarationBlock, Rule, SelectorMap};
|
||||||
use selectors::LocalName;
|
use selectors::LocalName;
|
||||||
|
|
|
@ -9,9 +9,9 @@ use sync::Arc;
|
||||||
use cssparser::ast::*;
|
use cssparser::ast::*;
|
||||||
use cssparser::{tokenize, parse_nth};
|
use cssparser::{tokenize, parse_nth};
|
||||||
|
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::namespace::Namespace;
|
use servo_util::namespace::Namespace;
|
||||||
use servo_util::namespace;
|
use servo_util::namespace;
|
||||||
|
use string_cache::Atom;
|
||||||
|
|
||||||
use namespaces::NamespaceMap;
|
use namespaces::NamespaceMap;
|
||||||
|
|
||||||
|
@ -575,7 +575,6 @@ fn skip_whitespace<I: Iterator<ComponentValue>>(iter: &mut Iter<I>) -> bool {
|
||||||
mod tests {
|
mod tests {
|
||||||
use sync::Arc;
|
use sync::Arc;
|
||||||
use cssparser;
|
use cssparser;
|
||||||
use servo_util::atom::Atom;
|
|
||||||
use servo_util::namespace;
|
use servo_util::namespace;
|
||||||
use namespaces::NamespaceMap;
|
use namespaces::NamespaceMap;
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
|
@ -19,5 +19,8 @@ path = "../../support/rust-task_info"
|
||||||
[dependencies.string_cache]
|
[dependencies.string_cache]
|
||||||
git = "https://github.com/servo/string-cache"
|
git = "https://github.com/servo/string-cache"
|
||||||
|
|
||||||
|
[dependencies.string_cache_macros]
|
||||||
|
git = "https://github.com/servo/string-cache"
|
||||||
|
|
||||||
[dependencies.url]
|
[dependencies.url]
|
||||||
git = "https://github.com/servo/rust-url"
|
git = "https://github.com/servo/rust-url"
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
//! Provides a wrapper around the Atom type in the string cache
|
|
||||||
//! crate. It's needed so that it can implement the Encodable
|
|
||||||
//! trait which is required by Servo.
|
|
||||||
|
|
||||||
use serialize::{Encoder, Encodable};
|
|
||||||
use std::fmt;
|
|
||||||
use std::hash::Hash;
|
|
||||||
use string_cache::atom;
|
|
||||||
|
|
||||||
#[deriving(Clone, Eq, Hash, PartialEq)]
|
|
||||||
pub struct Atom {
|
|
||||||
atom: atom::Atom,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Atom {
|
|
||||||
#[inline(always)]
|
|
||||||
pub fn from_slice(slice: &str) -> Atom {
|
|
||||||
Atom {
|
|
||||||
atom: atom::Atom::from_slice(slice)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline(always)]
|
|
||||||
pub fn as_slice<'t>(&'t self) -> &'t str {
|
|
||||||
self.atom.as_slice()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl fmt::Show for Atom {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
write!(f, "{:s}", self.atom.as_slice())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<E, S: Encoder<E>> Encodable<S, E> for Atom {
|
|
||||||
fn encode(&self, _s: &mut S) -> Result<(), E> {
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -29,7 +29,9 @@ extern crate "time" as std_time;
|
||||||
extern crate string_cache;
|
extern crate string_cache;
|
||||||
extern crate url;
|
extern crate url;
|
||||||
|
|
||||||
pub mod atom;
|
#[phase(plugin)]
|
||||||
|
extern crate string_cache_macros;
|
||||||
|
|
||||||
pub mod bloom;
|
pub mod bloom;
|
||||||
pub mod cache;
|
pub mod cache;
|
||||||
pub mod debug_utils;
|
pub mod debug_utils;
|
||||||
|
|
7
ports/cef/Cargo.lock
generated
7
ports/cef/Cargo.lock
generated
|
@ -299,6 +299,8 @@ dependencies = [
|
||||||
"plugins 0.0.1",
|
"plugins 0.0.1",
|
||||||
"script 0.0.1",
|
"script 0.0.1",
|
||||||
"script_traits 0.0.1",
|
"script_traits 0.0.1",
|
||||||
|
"string_cache 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)",
|
||||||
|
"string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)",
|
||||||
"style 0.0.1",
|
"style 0.0.1",
|
||||||
"url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)",
|
"url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)",
|
||||||
"util 0.0.1",
|
"util 0.0.1",
|
||||||
|
@ -409,6 +411,8 @@ dependencies = [
|
||||||
"net 0.0.1",
|
"net 0.0.1",
|
||||||
"plugins 0.0.1",
|
"plugins 0.0.1",
|
||||||
"script_traits 0.0.1",
|
"script_traits 0.0.1",
|
||||||
|
"string_cache 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)",
|
||||||
|
"string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)",
|
||||||
"style 0.0.1",
|
"style 0.0.1",
|
||||||
"url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)",
|
"url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)",
|
||||||
"util 0.0.1",
|
"util 0.0.1",
|
||||||
|
@ -486,6 +490,8 @@ dependencies = [
|
||||||
"geom 0.1.0 (git+https://github.com/servo/rust-geom#90add8d65273c8a46aa16d73959e29a51d0c282d)",
|
"geom 0.1.0 (git+https://github.com/servo/rust-geom#90add8d65273c8a46aa16d73959e29a51d0c282d)",
|
||||||
"lazy_static 0.1.0 (git+https://github.com/Kimundi/lazy-static.rs#e62a65372f1dd9019e37eb9381d819edff80e360)",
|
"lazy_static 0.1.0 (git+https://github.com/Kimundi/lazy-static.rs#e62a65372f1dd9019e37eb9381d819edff80e360)",
|
||||||
"plugins 0.0.1",
|
"plugins 0.0.1",
|
||||||
|
"string_cache 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)",
|
||||||
|
"string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)",
|
||||||
"url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)",
|
"url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)",
|
||||||
"util 0.0.1",
|
"util 0.0.1",
|
||||||
]
|
]
|
||||||
|
@ -509,6 +515,7 @@ dependencies = [
|
||||||
"azure 0.1.0 (git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d)",
|
"azure 0.1.0 (git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d)",
|
||||||
"geom 0.1.0 (git+https://github.com/servo/rust-geom#90add8d65273c8a46aa16d73959e29a51d0c282d)",
|
"geom 0.1.0 (git+https://github.com/servo/rust-geom#90add8d65273c8a46aa16d73959e29a51d0c282d)",
|
||||||
"string_cache 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)",
|
"string_cache 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)",
|
||||||
|
"string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)",
|
||||||
"task_info 0.0.1",
|
"task_info 0.0.1",
|
||||||
"url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)",
|
"url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)",
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue