diff options
-rw-r--r-- | components/style/Cargo.toml | 6 | ||||
-rw-r--r-- | components/style_traits/Cargo.toml | 2 | ||||
-rw-r--r-- | components/util/Cargo.toml | 9 | ||||
-rw-r--r-- | ports/cef/Cargo.lock | 4 | ||||
-rw-r--r-- | ports/geckolib/Cargo.lock | 155 | ||||
-rw-r--r-- | ports/geckolib/Cargo.toml | 6 | ||||
-rw-r--r-- | ports/geckolib/gecko_bindings/lib.rs | 2 | ||||
-rw-r--r-- | ports/geckolib/gecko_bindings/ptr.rs | 12 | ||||
-rw-r--r-- | ports/geckolib/lib.rs | 9 | ||||
-rw-r--r-- | ports/geckolib/properties.mako.rs | 1 | ||||
-rw-r--r-- | ports/geckolib/selector_impl.rs | 9 | ||||
-rw-r--r-- | ports/geckolib/wrapper.rs | 2 |
12 files changed, 174 insertions, 43 deletions
diff --git a/components/style/Cargo.toml b/components/style/Cargo.toml index e55c2dbaae2..8a9e207aff2 100644 --- a/components/style/Cargo.toml +++ b/components/style/Cargo.toml @@ -12,7 +12,11 @@ path = "lib.rs" [features] gecko = ["gecko_bindings"] -servo = ["serde", "serde_macros", "heapsize", "heapsize_plugin", "style_traits/servo"] +servo = ["serde", "serde/nightly", "serde_macros", "heapsize", "heapsize_plugin", + "style_traits/servo", "app_units/plugins", "euclid/plugins", + "cssparser/heap_size", "cssparser/serde-serialization", + "selectors/heap_size", "selectors/unstable", "string_cache/heap_size", + "url/heap_size"] [dependencies] app_units = "0.2.3" diff --git a/components/style_traits/Cargo.toml b/components/style_traits/Cargo.toml index 67de5b40dac..e823e1fbe7e 100644 --- a/components/style_traits/Cargo.toml +++ b/components/style_traits/Cargo.toml @@ -10,7 +10,7 @@ path = "lib.rs" [features] servo = ["heapsize", "heapsize_plugin", "serde", "serde_macros", "euclid/plugins", - "cssparser/heap_size", "cssparser/serde-serialization"] + "cssparser/heap_size", "cssparser/serde-serialization", "util/servo"] [dependencies] util = {path = "../util"} diff --git a/components/util/Cargo.toml b/components/util/Cargo.toml index 3e810df69cb..c8974dfd583 100644 --- a/components/util/Cargo.toml +++ b/components/util/Cargo.toml @@ -10,14 +10,15 @@ path = "lib.rs" [features] # servo as opposed to geckolib -servo = ["serde", "serde_macros", "backtrace", "ipc-channel"] +servo = ["serde", "serde_macros", "backtrace", "ipc-channel", "app_units/plugins", + "euclid/plugins", "euclid/unstable", "url/heap_size", "url/serde"] [dependencies] -app_units = {version = "0.2.3"} +app_units = "0.2.3" backtrace = {version = "0.2.1", optional = true} bitflags = "0.7" deque = "0.3.1" -euclid = {version = "0.6.4"} +euclid = "0.6.4" getopts = "0.2.11" heapsize = "0.3.0" ipc-channel = {git = "https://github.com/servo/ipc-channel", optional = true} @@ -31,7 +32,7 @@ rustc-serialize = "0.3" serde = {version = "0.7", optional = true} serde_macros = {version = "0.7", optional = true} smallvec = "0.1" -url = {version = "1.0.0"} +url = "1.0.0" [target.'cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android")))'.dependencies] xdg = "2.0" diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index d52028bf746..361af4adda4 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -2100,7 +2100,6 @@ dependencies = [ "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", - "plugins 0.0.1", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2122,7 +2121,6 @@ dependencies = [ "euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "plugins 0.0.1", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2307,7 +2305,6 @@ dependencies = [ "euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.2.3 (git+https://github.com/servo/ipc-channel)", "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2315,7 +2312,6 @@ dependencies = [ "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", - "plugins 0.0.1", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/ports/geckolib/Cargo.lock b/ports/geckolib/Cargo.lock index 0e59eb55446..e527824fb77 100644 --- a/ports/geckolib/Cargo.lock +++ b/ports/geckolib/Cargo.lock @@ -8,12 +8,10 @@ dependencies = [ "euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "gecko_bindings 0.0.1", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", - "plugins 0.0.1", "selectors 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", @@ -39,7 +37,50 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_macros 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "aster" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "backtrace" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "backtrace-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "backtrace-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "gcc 0.3.28 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "bincode" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -48,12 +89,35 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "byteorder" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "cfg-if" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "cssparser" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_macros 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "dbghelp-sys" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -135,9 +199,13 @@ name = "euclid" version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_macros 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -146,6 +214,11 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "gcc" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "gecko_bindings" version = "0.0.1" dependencies = [ @@ -181,6 +254,19 @@ dependencies = [ ] [[package]] +name = "ipc-channel" +version = "0.2.4" +source = "git+https://github.com/servo/ipc-channel#8411eeabf3a712006ad1b47637b2d8fe71177f85" +dependencies = [ + "bincode 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "kernel32-sys" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -231,10 +317,24 @@ dependencies = [ ] [[package]] -name = "plugins" -version = "0.0.1" +name = "quasi" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "quasi_codegen" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "aster 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "quasi_macros" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "tenacious 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "quasi_codegen 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -272,6 +372,11 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "rustc-demangle" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "rustc-serialize" version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -284,6 +389,8 @@ dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "quickersort 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -296,6 +403,24 @@ version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "serde_codegen" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "aster 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", + "quasi 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "quasi_macros 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "serde_macros" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde_codegen 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "smallvec" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -327,12 +452,16 @@ dependencies = [ "euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "gecko_bindings 0.0.1", + "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_macros 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", "style_traits 0.0.1", @@ -348,16 +477,15 @@ version = "0.0.1" dependencies = [ "cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_macros 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", ] [[package]] -name = "tenacious" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] name = "thread-id" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -412,9 +540,12 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "idna 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -427,11 +558,13 @@ name = "util" version = "0.0.1" dependencies = [ "app_units 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.2.4 (git+https://github.com/servo/ipc-channel)", "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", @@ -440,6 +573,8 @@ dependencies = [ "num_cpus 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_macros 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "xdg 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/ports/geckolib/Cargo.toml b/ports/geckolib/Cargo.toml index 1b8fdfce72e..99c3ee14b69 100644 --- a/ports/geckolib/Cargo.toml +++ b/ports/geckolib/Cargo.toml @@ -17,6 +17,8 @@ default = ["servo_features"] # in the full Servo build. Enabling this reduces the number of things # recompiled when building both Servo and geckolib in the same source tree. servo_features = [ + "heapsize", + "style/servo", "time", "url/query_encoding", "url/rustc-serialize", @@ -28,8 +30,7 @@ app_units = "0.2.3" cssparser = "0.5.4" euclid = "0.6.4" gecko_bindings = {version = "0.0.1", path = "gecko_bindings"} -heapsize = "0.3.0" -heapsize_plugin = "0.1.2" +heapsize = {version = "0.3.0", optional = true} lazy_static = "0.2" libc = "0.2" num_cpus = "0.2.2" @@ -38,7 +39,6 @@ smallvec = "0.1" string_cache = {version = "0.2.20", features = ["unstable"]} url = "1.0.0" log = {version = "0.3.5", features = ["release_max_level_info"]} -plugins = {path = "../../components/plugins"} time = {version = "0.1", optional = true, features = ["rustc-serialize"]} util = {path = "../../components/util"} uuid = {version = "0.2", optional = true, features = ["v4", "serde"]} diff --git a/ports/geckolib/gecko_bindings/lib.rs b/ports/geckolib/gecko_bindings/lib.rs index d42257b7e33..b81e8939f60 100644 --- a/ports/geckolib/gecko_bindings/lib.rs +++ b/ports/geckolib/gecko_bindings/lib.rs @@ -3,8 +3,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #![feature(const_fn)] -#![feature(concat_idents)] -#![feature(type_macros)] extern crate heapsize; diff --git a/ports/geckolib/gecko_bindings/ptr.rs b/ports/geckolib/gecko_bindings/ptr.rs index 089df6f70b1..9cdabee818b 100644 --- a/ports/geckolib/gecko_bindings/ptr.rs +++ b/ports/geckolib/gecko_bindings/ptr.rs @@ -10,7 +10,7 @@ use std::fmt::{self, Debug}; // in a ThreadSafeFooHolder smart pointer. Used in tandem with the // NS_DECL_HOLDER_FFI_REFCOUNTING-defined types and functions in Gecko. macro_rules! define_holder_arc { - ($arc_type:ident, $name:ident, $holder_type:ident) => ( + ($arc_type:ident, $name:ident, $holder_type:ident, $addref: ident, $release: ident) => ( #[derive(PartialEq)] pub struct $arc_type { ptr: *mut $holder_type, @@ -19,7 +19,7 @@ macro_rules! define_holder_arc { impl $arc_type { pub fn new(data: *mut $holder_type) -> $arc_type { debug_assert!(!data.is_null()); - unsafe { concat_idents!(Gecko_AddRef, $name, ArbitraryThread)(data); } + unsafe { $addref(data); } $arc_type { ptr: data } @@ -39,7 +39,7 @@ macro_rules! define_holder_arc { impl Drop for $arc_type { fn drop(&mut self) { - unsafe { concat_idents!(Gecko_Release, $name, ArbitraryThread)(self.ptr); } + unsafe { $release(self.ptr); } } } @@ -55,5 +55,7 @@ macro_rules! define_holder_arc { ) } -define_holder_arc!(GeckoArcPrincipal, Principal, ThreadSafePrincipalHolder); -define_holder_arc!(GeckoArcURI, URI, ThreadSafeURIHolder); +define_holder_arc!(GeckoArcPrincipal, Principal, ThreadSafePrincipalHolder, + Gecko_AddRefPrincipalArbitraryThread, Gecko_ReleasePrincipalArbitraryThread); +define_holder_arc!(GeckoArcURI, URI, ThreadSafeURIHolder, + Gecko_AddRefURIArbitraryThread, Gecko_ReleaseURIArbitraryThread); diff --git a/ports/geckolib/lib.rs b/ports/geckolib/lib.rs index bdd611a4b44..96b4580216a 100644 --- a/ports/geckolib/lib.rs +++ b/ports/geckolib/lib.rs @@ -3,13 +3,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #![feature(as_unsafe_cell)] -#![feature(box_syntax)] -#![feature(custom_attribute)] -#![feature(custom_derive)] -#![feature(plugin)] - -#![plugin(heapsize_plugin)] -#![plugin(plugins)] extern crate app_units; #[macro_use] @@ -17,7 +10,7 @@ extern crate cssparser; extern crate env_logger; extern crate euclid; extern crate gecko_bindings; -extern crate heapsize; +#[cfg(feature = "servo_features")] #[macro_use] extern crate heapsize; #[macro_use] extern crate lazy_static; extern crate libc; diff --git a/ports/geckolib/properties.mako.rs b/ports/geckolib/properties.mako.rs index a49eeb5ab16..f9cdd22dba2 100644 --- a/ports/geckolib/properties.mako.rs +++ b/ports/geckolib/properties.mako.rs @@ -136,7 +136,6 @@ impl ComputedValues for GeckoComputedValues { } <%def name="declare_style_struct(style_struct)"> -#[derive(HeapSizeOf)] pub struct ${style_struct.gecko_struct_name} { gecko: ${style_struct.gecko_ffi_name}, } diff --git a/ports/geckolib/selector_impl.rs b/ports/geckolib/selector_impl.rs index c38ca70104b..1c315df24c1 100644 --- a/ports/geckolib/selector_impl.rs +++ b/ports/geckolib/selector_impl.rs @@ -13,9 +13,12 @@ pub type Stylesheet = style::stylesheets::Stylesheet<GeckoSelectorImpl>; pub type SharedStyleContext = style::context::SharedStyleContext<GeckoSelectorImpl>; pub type PrivateStyleData = style::data::PrivateStyleData<GeckoSelectorImpl, GeckoComputedValues>; +#[cfg(feature = "servo_features")] +known_heap_size!(0, GeckoSelectorImpl, PseudoElement, NonTSPseudoClass); + pub struct GeckoSelectorImpl; -#[derive(Clone, Debug, PartialEq, Eq, HeapSizeOf, Hash)] +#[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum PseudoElement { Before, After, @@ -46,7 +49,7 @@ pub enum PseudoElement { } // https://mxr.mozilla.org/mozilla-central/source/layout/style/nsCSSAnonBoxList.h -#[derive(Clone, Debug, PartialEq, Eq, HeapSizeOf, Hash)] +#[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum AnonBoxPseudoElement { MozNonElement, MozAnonymousBlock, @@ -114,7 +117,7 @@ pub enum AnonBoxPseudoElement { MozSVGText, } -#[derive(Clone, Debug, PartialEq, Eq, HeapSizeOf, Hash)] +#[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum NonTSPseudoClass { AnyLink, Link, diff --git a/ports/geckolib/wrapper.rs b/ports/geckolib/wrapper.rs index 7a4125717c5..b9b616cebd7 100644 --- a/ports/geckolib/wrapper.rs +++ b/ports/geckolib/wrapper.rs @@ -85,7 +85,7 @@ impl<'ln> GeckoNode<'ln> { pub fn initialize_data(self) { unsafe { if self.get_node_data().is_null() { - let ptr: NonOpaqueStyleData = Box::into_raw(box RefCell::new(PrivateStyleData::new())); + let ptr: NonOpaqueStyleData = Box::into_raw(Box::new(RefCell::new(PrivateStyleData::new()))); Gecko_SetNodeData(self.node, ptr as *mut ServoNodeData); } } |