mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +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
|
@ -60,3 +60,9 @@ git = "https://github.com/servo/rust-url"
|
|||
|
||||
[dependencies.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 devtools_traits::AttrInfo;
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::namespace;
|
||||
use servo_util::namespace::Namespace;
|
||||
use servo_util::str::{DOMString, split_html_space_chars};
|
||||
use std::cell::{Ref, RefCell};
|
||||
use std::mem;
|
||||
use std::slice::Items;
|
||||
use string_cache::Atom;
|
||||
|
||||
pub enum AttrSettingType {
|
||||
FirstSetAttr,
|
||||
|
|
|
@ -35,7 +35,6 @@ use std::rc::Rc;
|
|||
use std::cell::{Cell, RefCell};
|
||||
|
||||
use url::Url;
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::namespace::Namespace;
|
||||
use msg::constellation_msg::{PipelineId, SubpageId, WindowSizeData};
|
||||
use net::image_cache_task::ImageCacheTask;
|
||||
|
@ -43,6 +42,7 @@ use script_traits::ScriptControlChan;
|
|||
use std::collections::hashmap::HashMap;
|
||||
use collections::hash::Hash;
|
||||
use style::PropertyDeclarationBlock;
|
||||
use string_cache::Atom;
|
||||
|
||||
impl<T: Reflectable> JSTraceable for JS<T> {
|
||||
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 hubbub::hubbub::{QuirksMode, NoQuirks, LimitedQuirks, FullQuirks};
|
||||
use layout_interface::{DocumentDamageLevel, ContentChangedDocumentDamage};
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::namespace;
|
||||
use servo_util::namespace::{Namespace, Null};
|
||||
use servo_util::str::{DOMString, split_html_space_chars};
|
||||
use string_cache::Atom;
|
||||
|
||||
use std::collections::hashmap::HashMap;
|
||||
use std::ascii::StrAsciiExt;
|
||||
|
|
|
@ -12,9 +12,9 @@ use dom::bindings::utils::{Reflector, Reflectable, reflect_dom_object};
|
|||
use dom::element::{Element, AttributeHandlers};
|
||||
use dom::node::window_from_node;
|
||||
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::namespace::Null;
|
||||
use servo_util::str::{DOMString, HTML_SPACE_CHARACTERS};
|
||||
use string_cache::Atom;
|
||||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
|
|
|
@ -34,7 +34,6 @@ use layout_interface::MatchSelectorsDocumentDamage;
|
|||
use devtools_traits::AttrInfo;
|
||||
use style::{matches, parse_selector_list_from_str};
|
||||
use style;
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::namespace;
|
||||
use servo_util::namespace::{Namespace, Null};
|
||||
use servo_util::str::DOMString;
|
||||
|
@ -42,6 +41,7 @@ use servo_util::str::DOMString;
|
|||
use std::ascii::StrAsciiExt;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::mem;
|
||||
use string_cache::Atom;
|
||||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
|
|
|
@ -17,8 +17,8 @@ use dom::htmlelement::HTMLElement;
|
|||
use dom::node::{Node, ElementNodeTypeId, window_from_node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::str::DOMString;
|
||||
use string_cache::Atom;
|
||||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
|
|
|
@ -16,8 +16,8 @@ use dom::node::{DisabledStateHelpers, Node, NodeHelpers, ElementNodeTypeId, wind
|
|||
use dom::validitystate::ValidityState;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::str::DOMString;
|
||||
use string_cache::Atom;
|
||||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
|
|
|
@ -18,8 +18,8 @@ use dom::htmlelement::HTMLElement;
|
|||
use dom::node::{Node, ElementNodeTypeId, window_from_node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::str::{DOMString, parse_unsigned_integer};
|
||||
use string_cache::Atom;
|
||||
|
||||
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::node::{Node, NodeHelpers};
|
||||
use dom::window::Window;
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::namespace::Namespace;
|
||||
use servo_util::str::{DOMString, split_html_space_chars};
|
||||
|
||||
use std::ascii::StrAsciiExt;
|
||||
use string_cache::Atom;
|
||||
|
||||
pub trait CollectionFilter : JSTraceable {
|
||||
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::virtualmethods::VirtualMethods;
|
||||
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::namespace;
|
||||
use servo_util::str::DOMString;
|
||||
use string_cache::Atom;
|
||||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
|
|
|
@ -18,8 +18,8 @@ use dom::node::{DisabledStateHelpers, Node, NodeHelpers, ElementNodeTypeId, wind
|
|||
use dom::validitystate::ValidityState;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::str::{DOMString, StaticStringVec};
|
||||
use string_cache::Atom;
|
||||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
|
|
|
@ -23,9 +23,9 @@ use page::IterablePage;
|
|||
use servo_msg::constellation_msg::{PipelineId, SubpageId};
|
||||
use servo_msg::constellation_msg::{IFrameSandboxed, IFrameUnsandboxed};
|
||||
use servo_msg::constellation_msg::{ConstellationChan, LoadIframeUrlMsg};
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::namespace::Null;
|
||||
use servo_util::str::DOMString;
|
||||
use string_cache::Atom;
|
||||
|
||||
use std::ascii::StrAsciiExt;
|
||||
use std::cell::Cell;
|
||||
|
|
|
@ -17,9 +17,9 @@ use dom::htmlelement::HTMLElement;
|
|||
use dom::node::{Node, ElementNodeTypeId, NodeHelpers, window_from_node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use servo_net::image_cache_task;
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::geometry::to_px;
|
||||
use servo_util::str::DOMString;
|
||||
use string_cache::Atom;
|
||||
|
||||
use url::{Url, UrlParser};
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@ use dom::htmlelement::HTMLElement;
|
|||
use dom::node::{DisabledStateHelpers, Node, NodeHelpers, ElementNodeTypeId};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::str::DOMString;
|
||||
use string_cache::Atom;
|
||||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
|
|
|
@ -15,12 +15,12 @@ use dom::htmlelement::HTMLElement;
|
|||
use dom::node::{Node, NodeHelpers, ElementNodeTypeId, window_from_node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use layout_interface::{LayoutChan, LoadStylesheetMsg};
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::str::{DOMString, HTML_SPACE_CHARACTERS};
|
||||
use servo_util::namespace::Null;
|
||||
|
||||
use std::ascii::StrAsciiExt;
|
||||
use url::UrlParser;
|
||||
use string_cache::Atom;
|
||||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
|
|
|
@ -20,9 +20,9 @@ use dom::virtualmethods::VirtualMethods;
|
|||
|
||||
use servo_net::image_cache_task;
|
||||
use servo_net::image_cache_task::ImageCacheTask;
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::namespace::Null;
|
||||
use servo_util::str::DOMString;
|
||||
use string_cache::Atom;
|
||||
|
||||
use url::Url;
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@ use dom::htmlelement::HTMLElement;
|
|||
use dom::node::{DisabledStateHelpers, Node, NodeHelpers, ElementNodeTypeId};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::str::DOMString;
|
||||
use string_cache::Atom;
|
||||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
|
|
|
@ -19,9 +19,9 @@ use dom::htmlelement::HTMLElement;
|
|||
use dom::node::{DisabledStateHelpers, Node, NodeHelpers, ElementNodeTypeId};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::namespace;
|
||||
use servo_util::str::{DOMString, split_html_space_chars};
|
||||
use string_cache::Atom;
|
||||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
|
|
|
@ -18,8 +18,8 @@ use dom::node::{DisabledStateHelpers, Node, NodeHelpers, ElementNodeTypeId, wind
|
|||
use dom::validitystate::ValidityState;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::str::DOMString;
|
||||
use string_cache::Atom;
|
||||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
|
|
|
@ -18,8 +18,8 @@ use dom::node::{TextNodeTypeId, NodeHelpers};
|
|||
use dom::processinginstruction::ProcessingInstruction;
|
||||
use dom::text::Text;
|
||||
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::namespace;
|
||||
use string_cache::Atom;
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn serialize(iterator: &mut NodeIterator) -> String {
|
||||
|
|
|
@ -15,8 +15,8 @@ use dom::htmlelement::HTMLElement;
|
|||
use dom::node::{DisabledStateHelpers, Node, NodeHelpers, ElementNodeTypeId};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::str::DOMString;
|
||||
use string_cache::Atom;
|
||||
|
||||
#[jstraceable]
|
||||
#[must_root]
|
||||
|
|
|
@ -57,8 +57,8 @@ use dom::htmlstyleelement::HTMLStyleElement;
|
|||
use dom::htmltextareaelement::HTMLTextAreaElement;
|
||||
use dom::node::{Node, NodeHelpers, ElementNodeTypeId};
|
||||
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::str::DOMString;
|
||||
use string_cache::Atom;
|
||||
|
||||
/// Trait to allow DOM nodes to opt-in to overriding (or adding to) common
|
||||
/// behaviours. Replicates the effect of C++ virtual methods.
|
||||
|
|
|
@ -25,7 +25,6 @@ use encoding::types::{Encoding, DecodeReplace};
|
|||
use hubbub::hubbub;
|
||||
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_util::atom::Atom;
|
||||
use servo_util::namespace;
|
||||
use servo_util::namespace::{Namespace, Null};
|
||||
use servo_util::str::DOMString;
|
||||
|
@ -37,6 +36,7 @@ use std::comm::{channel, Sender, Receiver};
|
|||
use url::{Url, UrlParser};
|
||||
use http::headers::HeaderEnum;
|
||||
use time;
|
||||
use string_cache::Atom;
|
||||
|
||||
macro_rules! handle_element(
|
||||
($document: expr,
|
||||
|
|
|
@ -42,6 +42,9 @@ extern crate sync;
|
|||
extern crate "msg" as servo_msg;
|
||||
extern crate url;
|
||||
extern crate uuid;
|
||||
extern crate string_cache;
|
||||
#[phase(plugin)]
|
||||
extern crate string_cache_macros;
|
||||
|
||||
pub mod cors;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue