mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Remove some usage of unstable features in geckolib
This commit is contained in:
parent
3822bb269c
commit
b103e8baa7
12 changed files with 174 additions and 43 deletions
|
@ -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"
|
||||
|
|
|
@ -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"}
|
||||
|
|
|
@ -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"
|
||||
|
|
4
ports/cef/Cargo.lock
generated
4
ports/cef/Cargo.lock
generated
|
@ -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)",
|
||||
|
|
155
ports/geckolib/Cargo.lock
generated
155
ports/geckolib/Cargo.lock
generated
|
@ -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]]
|
||||
|
@ -47,13 +88,36 @@ name = "bitflags"
|
|||
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]]
|
||||
|
@ -145,6 +213,11 @@ name = "fnv"
|
|||
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"
|
||||
|
@ -180,6 +253,19 @@ dependencies = [
|
|||
"unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[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"
|
||||
|
@ -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 = [
|
||||
"tenacious 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"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 = [
|
||||
"quasi_codegen 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -271,6 +371,11 @@ name = "regex-syntax"
|
|||
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"
|
||||
|
@ -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)",
|
||||
|
@ -295,6 +402,24 @@ name = "serde"
|
|||
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"
|
||||
|
@ -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,15 +477,14 @@ 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"
|
||||
|
@ -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)",
|
||||
|
|
|
@ -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"]}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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},
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue