Upgrade to rustc 0.12.0-pre (4d2af3861 2014-09-17 15:51:11 +0000)

This commit is contained in:
Keegan McAllister 2014-09-16 13:00:18 -07:00
parent 8a7eefefd5
commit a640a7c5c3
74 changed files with 459 additions and 449 deletions

242
Cargo.lock generated
View file

@ -8,7 +8,7 @@ dependencies = [
"msg 0.0.1",
"net 0.0.1",
"script 0.0.1",
"url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)",
"url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)",
"util 0.0.1",
]
@ -17,94 +17,94 @@ name = "alert"
version = "0.1.0"
source = "git+https://github.com/servo/rust-alert#fdc24f13be8d8a2d15214ec228d166b3221b809e"
dependencies = [
"cocoa 0.1.0 (git+https://github.com/servo/rust-cocoa#f5da9ccfaeb701ff1b5ab9e1784e999d04530e8f)",
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)",
"cocoa 0.1.0 (git+https://github.com/servo/rust-cocoa#cfbf6d9d5a68d3c8f424d678aa22096c49136e25)",
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#166a601ff3e0fc3a64ca1a9090d02c8d4f22b61a)",
]
[[package]]
name = "azure"
version = "0.1.0"
source = "git+https://github.com/servo/rust-azure#9c5567b79d8b87e8ef3b48c5842f453978035d21"
source = "git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d"
dependencies = [
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)",
"core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#04bd18a4eb83a645a1a32326a33149ba2d0e81be)",
"core_text 0.1.0 (git+https://github.com/servo/rust-core-text#e2280222889c030df27ded9a378c14a0e31ab463)",
"egl 0.1.0 (git+https://github.com/servo/rust-egl#48b85e30d557ab2ee536730a73dd86a8160d618b)",
"freetype 0.1.0 (git+https://github.com/servo/rust-freetype#fb15dd309750c8ec664b2c9f245cfcb06731872e)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)",
"glfw 0.0.1 (git+https://github.com/servo/glfw-rs?ref=servo#dd1a111c827994886d2cdebf91a1838603256390)",
"layers 0.1.0 (git+https://github.com/servo/rust-layers#e29c5cd670a0b42e8ac50e7099c265c481640dd5)",
"opengles 0.1.0 (git+https://github.com/servo/rust-opengles#13cccda11011716fd75526a74dfd03122110f95a)",
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#166a601ff3e0fc3a64ca1a9090d02c8d4f22b61a)",
"core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#6a9919f8a912cc67571b891ba198d5325964a104)",
"core_text 0.1.0 (git+https://github.com/servo/rust-core-text#1ad11072b31657eeccaf4879c6e98723d488bd3d)",
"egl 0.1.0 (git+https://github.com/servo/rust-egl#88f2a13812ddbce2bf2317221663a61c31b3e220)",
"freetype 0.1.0 (git+https://github.com/servo/rust-freetype#0b03da276e4bdeae2300596dabc4ccb16733ad70)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
"glfw 0.0.1 (git+https://github.com/servo/glfw-rs?ref=servo#955dbe919870b0536f79123232d87c0efe3c552e)",
"layers 0.1.0 (git+https://github.com/servo/rust-layers#ef89918471815dfced7aaf2f1594d5469f03eab7)",
"opengles 0.1.0 (git+https://github.com/servo/rust-opengles#6776e9c07feb149d34b087039ecf6b2c143e3afc)",
"skia-sys 0.0.20130412 (git+https://github.com/servo/skia#6d696712962fd0d41120b7a414a48417da8e6a92)",
"xlib 0.1.0 (git+https://github.com/servo/rust-xlib#79904fb42ff8a0e888f70fae336fbf6c11f1e6c8)",
"xlib 0.1.0 (git+https://github.com/servo/rust-xlib#581d4faddec5188d3c3ae5307dbea28aab90644c)",
]
[[package]]
name = "canvas"
version = "0.0.1"
dependencies = [
"azure 0.1.0 (git+https://github.com/servo/rust-azure#9c5567b79d8b87e8ef3b48c5842f453978035d21)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)",
"azure 0.1.0 (git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
]
[[package]]
name = "cocoa"
version = "0.1.0"
source = "git+https://github.com/servo/rust-cocoa#f5da9ccfaeb701ff1b5ab9e1784e999d04530e8f"
source = "git+https://github.com/servo/rust-cocoa#cfbf6d9d5a68d3c8f424d678aa22096c49136e25"
[[package]]
name = "compositing"
version = "0.0.1"
dependencies = [
"alert 0.1.0 (git+https://github.com/servo/rust-alert#fdc24f13be8d8a2d15214ec228d166b3221b809e)",
"azure 0.1.0 (git+https://github.com/servo/rust-azure#9c5567b79d8b87e8ef3b48c5842f453978035d21)",
"core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#04bd18a4eb83a645a1a32326a33149ba2d0e81be)",
"core_text 0.1.0 (git+https://github.com/servo/rust-core-text#e2280222889c030df27ded9a378c14a0e31ab463)",
"azure 0.1.0 (git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d)",
"core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#6a9919f8a912cc67571b891ba198d5325964a104)",
"core_text 0.1.0 (git+https://github.com/servo/rust-core-text#1ad11072b31657eeccaf4879c6e98723d488bd3d)",
"devtools 0.0.1",
"devtools_traits 0.0.1",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
"gfx 0.0.1",
"glfw 0.0.1 (git+https://github.com/servo/glfw-rs?ref=servo#dd1a111c827994886d2cdebf91a1838603256390)",
"glut 0.0.1 (git+https://github.com/servo/rust-glut#d351eed425464c58671c6ec33445ee896fd42ff1)",
"layers 0.1.0 (git+https://github.com/servo/rust-layers#e29c5cd670a0b42e8ac50e7099c265c481640dd5)",
"glfw 0.0.1 (git+https://github.com/servo/glfw-rs?ref=servo#955dbe919870b0536f79123232d87c0efe3c552e)",
"glut 0.0.1 (git+https://github.com/servo/rust-glut#01af0162ea0322ad1a40d6adb023a39813605949)",
"layers 0.1.0 (git+https://github.com/servo/rust-layers#ef89918471815dfced7aaf2f1594d5469f03eab7)",
"layout_traits 0.0.1",
"msg 0.0.1",
"net 0.0.1",
"opengles 0.1.0 (git+https://github.com/servo/rust-opengles#13cccda11011716fd75526a74dfd03122110f95a)",
"png 0.1.0 (git+https://github.com/servo/rust-png#f3640b37e71a02ee3e140e181cc9accb0a123e16)",
"opengles 0.1.0 (git+https://github.com/servo/rust-opengles#6776e9c07feb149d34b087039ecf6b2c143e3afc)",
"png 0.1.0 (git+https://github.com/servo/rust-png#74418ffbf20e94b0d3bed4a9d004062a13342c79)",
"script_traits 0.0.1",
"url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)",
"url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)",
"util 0.0.1",
]
[[package]]
name = "core_foundation"
version = "0.1.0"
source = "git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff"
source = "git+https://github.com/servo/rust-core-foundation#166a601ff3e0fc3a64ca1a9090d02c8d4f22b61a"
[[package]]
name = "core_graphics"
version = "0.1.0"
source = "git+https://github.com/servo/rust-core-graphics#04bd18a4eb83a645a1a32326a33149ba2d0e81be"
source = "git+https://github.com/servo/rust-core-graphics#6a9919f8a912cc67571b891ba198d5325964a104"
dependencies = [
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)",
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#166a601ff3e0fc3a64ca1a9090d02c8d4f22b61a)",
]
[[package]]
name = "core_text"
version = "0.1.0"
source = "git+https://github.com/servo/rust-core-text#e2280222889c030df27ded9a378c14a0e31ab463"
source = "git+https://github.com/servo/rust-core-text#1ad11072b31657eeccaf4879c6e98723d488bd3d"
dependencies = [
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)",
"core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#04bd18a4eb83a645a1a32326a33149ba2d0e81be)",
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#166a601ff3e0fc3a64ca1a9090d02c8d4f22b61a)",
"core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#6a9919f8a912cc67571b891ba198d5325964a104)",
]
[[package]]
name = "cssparser"
version = "0.1.0"
source = "git+https://github.com/servo/rust-cssparser#42346400a6629b17a48d06f0a9b28ae498947c6f"
source = "git+https://github.com/servo/rust-cssparser#fa619d4ffd6920dee6e7ea79f42d9cceb9015407"
dependencies = [
"encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#12b6610adff6eddc060691888c36017cd3ad57f7)",
"encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#35f0d70f65f73ba16f296f9ec675eddee661ba79)",
]
[[package]]
@ -125,12 +125,12 @@ dependencies = [
[[package]]
name = "egl"
version = "0.1.0"
source = "git+https://github.com/servo/rust-egl#48b85e30d557ab2ee536730a73dd86a8160d618b"
source = "git+https://github.com/servo/rust-egl#88f2a13812ddbce2bf2317221663a61c31b3e220"
[[package]]
name = "encoding"
version = "0.1.0"
source = "git+https://github.com/lifthrasiir/rust-encoding#12b6610adff6eddc060691888c36017cd3ad57f7"
source = "git+https://github.com/lifthrasiir/rust-encoding#35f0d70f65f73ba16f296f9ec675eddee661ba79"
[[package]]
name = "expat-sys"
@ -140,7 +140,7 @@ source = "git+https://github.com/servo/libexpat#da2ddaf78cbef836b8790807bb76b357
[[package]]
name = "fontconfig"
version = "0.1.0"
source = "git+https://github.com/servo/rust-fontconfig#6e02b6df7815dc4bf1f8ef20b926e717891f8544"
source = "git+https://github.com/servo/rust-fontconfig#b16c1e12ecb74b1e4e9a9b23c2b98580a34cf201"
dependencies = [
"fontconfig-sys 2.11.1 (git+https://github.com/servo/libfontconfig#fcc324d2c8175d2e8e8c0aab032c03a404809f6d)",
]
@ -157,7 +157,7 @@ dependencies = [
[[package]]
name = "freetype"
version = "0.1.0"
source = "git+https://github.com/servo/rust-freetype#fb15dd309750c8ec664b2c9f245cfcb06731872e"
source = "git+https://github.com/servo/rust-freetype#0b03da276e4bdeae2300596dabc4ccb16733ad70"
[[package]]
name = "freetype-sys"
@ -167,60 +167,65 @@ source = "git+https://github.com/servo/libfreetype2#5b6499164106f094937565595c7b
[[package]]
name = "geom"
version = "0.1.0"
source = "git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489"
source = "git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692"
[[package]]
name = "gfx"
version = "0.0.1"
dependencies = [
"azure 0.1.0 (git+https://github.com/servo/rust-azure#9c5567b79d8b87e8ef3b48c5842f453978035d21)",
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)",
"core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#04bd18a4eb83a645a1a32326a33149ba2d0e81be)",
"core_text 0.1.0 (git+https://github.com/servo/rust-core-text#e2280222889c030df27ded9a378c14a0e31ab463)",
"fontconfig 0.1.0 (git+https://github.com/servo/rust-fontconfig#6e02b6df7815dc4bf1f8ef20b926e717891f8544)",
"freetype 0.1.0 (git+https://github.com/servo/rust-freetype#fb15dd309750c8ec664b2c9f245cfcb06731872e)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)",
"harfbuzz 0.1.0 (git+https://github.com/servo/rust-harfbuzz#a502be3df659cd13bac0e62638f4dac3dfb2f52d)",
"layers 0.1.0 (git+https://github.com/servo/rust-layers#e29c5cd670a0b42e8ac50e7099c265c481640dd5)",
"azure 0.1.0 (git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d)",
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#166a601ff3e0fc3a64ca1a9090d02c8d4f22b61a)",
"core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#6a9919f8a912cc67571b891ba198d5325964a104)",
"core_text 0.1.0 (git+https://github.com/servo/rust-core-text#1ad11072b31657eeccaf4879c6e98723d488bd3d)",
"fontconfig 0.1.0 (git+https://github.com/servo/rust-fontconfig#b16c1e12ecb74b1e4e9a9b23c2b98580a34cf201)",
"freetype 0.1.0 (git+https://github.com/servo/rust-freetype#0b03da276e4bdeae2300596dabc4ccb16733ad70)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
"harfbuzz 0.1.0 (git+https://github.com/servo/rust-harfbuzz#ad520942cc17232e1a40cdd8a99c2905623d35f6)",
"layers 0.1.0 (git+https://github.com/servo/rust-layers#ef89918471815dfced7aaf2f1594d5469f03eab7)",
"macros 0.0.1",
"msg 0.0.1",
"net 0.0.1",
"png 0.1.0 (git+https://github.com/servo/rust-png#f3640b37e71a02ee3e140e181cc9accb0a123e16)",
"png 0.1.0 (git+https://github.com/servo/rust-png#74418ffbf20e94b0d3bed4a9d004062a13342c79)",
"stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image#f5022de4ad6bb474a03493d1f274dde9b0f1af0c)",
"style 0.0.1",
"url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)",
"url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)",
"util 0.0.1",
]
[[package]]
name = "glfw"
version = "0.0.1"
source = "git+https://github.com/servo/glfw-rs?ref=servo#dd1a111c827994886d2cdebf91a1838603256390"
source = "git+https://github.com/servo/glfw-rs?ref=servo#955dbe919870b0536f79123232d87c0efe3c552e"
dependencies = [
"link_glfw 0.1.0 (git+https://github.com/servo/glfw-rs?ref=servo#dd1a111c827994886d2cdebf91a1838603256390)",
"semver 0.0.1 (git+https://github.com/rust-lang/semver#df163f7b22686493b037eee1f1f9d1a2742f9bbe)",
"glfw-sys 3.0.4 (git+https://github.com/servo/glfw?ref=cargo-3.0.4#65a2b4721276589d9de24f6a9999a2db37286cae)",
"semver 0.0.1 (git+https://github.com/rust-lang/semver#d04583a173395b76c1eaa15cc630a5f6f8f0ae10)",
]
[[package]]
name = "glfw-sys"
version = "3.0.4"
source = "git+https://github.com/servo/glfw?ref=cargo-3.0.4#65a2b4721276589d9de24f6a9999a2db37286cae"
[[package]]
name = "glut"
version = "0.0.1"
source = "git+https://github.com/servo/rust-glut#d351eed425464c58671c6ec33445ee896fd42ff1"
source = "git+https://github.com/servo/rust-glut#01af0162ea0322ad1a40d6adb023a39813605949"
dependencies = [
"opengles 0.1.0 (git+https://github.com/servo/rust-opengles#13cccda11011716fd75526a74dfd03122110f95a)",
"opengles 0.1.0 (git+https://github.com/servo/rust-opengles#6776e9c07feb149d34b087039ecf6b2c143e3afc)",
]
[[package]]
name = "harfbuzz"
version = "0.1.0"
source = "git+https://github.com/servo/rust-harfbuzz#a502be3df659cd13bac0e62638f4dac3dfb2f52d"
source = "git+https://github.com/servo/rust-harfbuzz#ad520942cc17232e1a40cdd8a99c2905623d35f6"
[[package]]
name = "http"
version = "0.1.0-pre"
source = "git+https://github.com/servo/rust-http?ref=servo#13be91d968d3e5ba032d19a3bb3438c2c4c6b372"
source = "git+https://github.com/servo/rust-http?ref=servo#4fdedeea8fc77149adf51bb24a37372af21c25b7"
dependencies = [
"openssl 0.0.0 (git+https://github.com/sfackler/rust-openssl.git#cd40d25cb5721064c5c2002c41a616d2dba7399a)",
"url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)",
"openssl 0.0.0 (git+https://github.com/sfackler/rust-openssl.git#a495465b75ffb18ff2303c5a11a103e00a15a13d)",
"url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)",
]
[[package]]
@ -242,17 +247,17 @@ dependencies = [
[[package]]
name = "io_surface"
version = "0.1.0"
source = "git+https://github.com/servo/rust-io-surface#05f102273e16e9432245f813e5fe6280087e2b44"
source = "git+https://github.com/servo/rust-io-surface#7038341220bd7e86e21118fac2cbc6bd50890e47"
dependencies = [
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)",
"opengles 0.1.0 (git+https://github.com/servo/rust-opengles#13cccda11011716fd75526a74dfd03122110f95a)",
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#166a601ff3e0fc3a64ca1a9090d02c8d4f22b61a)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
"opengles 0.1.0 (git+https://github.com/servo/rust-opengles#6776e9c07feb149d34b087039ecf6b2c143e3afc)",
]
[[package]]
name = "js"
version = "0.1.0"
source = "git+https://github.com/servo/rust-mozjs#c9bd679428e8e83e585702a949d593bda8ac04d6"
source = "git+https://github.com/servo/rust-mozjs#41fb0d80a5ed5614ca13a120cdb3281e599d4e04"
dependencies = [
"mozjs-sys 0.0.0 (git+https://github.com/servo/mozjs#47cd6a4e60c75642ba182f0df9a42b71ec7c2c88)",
]
@ -260,22 +265,22 @@ dependencies = [
[[package]]
name = "layers"
version = "0.1.0"
source = "git+https://github.com/servo/rust-layers#e29c5cd670a0b42e8ac50e7099c265c481640dd5"
source = "git+https://github.com/servo/rust-layers#ef89918471815dfced7aaf2f1594d5469f03eab7"
dependencies = [
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)",
"egl 0.1.0 (git+https://github.com/servo/rust-egl#48b85e30d557ab2ee536730a73dd86a8160d618b)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)",
"io_surface 0.1.0 (git+https://github.com/servo/rust-io-surface#05f102273e16e9432245f813e5fe6280087e2b44)",
"opengles 0.1.0 (git+https://github.com/servo/rust-opengles#13cccda11011716fd75526a74dfd03122110f95a)",
"xlib 0.1.0 (git+https://github.com/servo/rust-xlib#79904fb42ff8a0e888f70fae336fbf6c11f1e6c8)",
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#166a601ff3e0fc3a64ca1a9090d02c8d4f22b61a)",
"egl 0.1.0 (git+https://github.com/servo/rust-egl#88f2a13812ddbce2bf2317221663a61c31b3e220)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
"io_surface 0.1.0 (git+https://github.com/servo/rust-io-surface#7038341220bd7e86e21118fac2cbc6bd50890e47)",
"opengles 0.1.0 (git+https://github.com/servo/rust-opengles#6776e9c07feb149d34b087039ecf6b2c143e3afc)",
"xlib 0.1.0 (git+https://github.com/servo/rust-xlib#581d4faddec5188d3c3ae5307dbea28aab90644c)",
]
[[package]]
name = "layout"
version = "0.0.1"
dependencies = [
"encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#12b6610adff6eddc060691888c36017cd3ad57f7)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)",
"encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#35f0d70f65f73ba16f296f9ec675eddee661ba79)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
"gfx 0.0.1",
"layout_traits 0.0.1",
"macros 0.0.1",
@ -283,7 +288,7 @@ dependencies = [
"script 0.0.1",
"script_traits 0.0.1",
"style 0.0.1",
"url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)",
"url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)",
"util 0.0.1",
]
@ -299,9 +304,9 @@ dependencies = [
]
[[package]]
name = "link_glfw"
name = "lazy_static"
version = "0.1.0"
source = "git+https://github.com/servo/glfw-rs?ref=servo#dd1a111c827994886d2cdebf91a1838603256390"
source = "git+https://github.com/Kimundi/lazy-static.rs#e62a65372f1dd9019e37eb9381d819edff80e360"
[[package]]
name = "macros"
@ -316,12 +321,12 @@ source = "git+https://github.com/servo/mozjs#47cd6a4e60c75642ba182f0df9a42b71ec7
name = "msg"
version = "0.0.1"
dependencies = [
"azure 0.1.0 (git+https://github.com/servo/rust-azure#9c5567b79d8b87e8ef3b48c5842f453978035d21)",
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#9aeaee0bceb3241d6efca07cc6b82747339ffbff)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)",
"io_surface 0.1.0 (git+https://github.com/servo/rust-io-surface#05f102273e16e9432245f813e5fe6280087e2b44)",
"layers 0.1.0 (git+https://github.com/servo/rust-layers#e29c5cd670a0b42e8ac50e7099c265c481640dd5)",
"url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)",
"azure 0.1.0 (git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d)",
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#166a601ff3e0fc3a64ca1a9090d02c8d4f22b61a)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
"io_surface 0.1.0 (git+https://github.com/servo/rust-io-surface#7038341220bd7e86e21118fac2cbc6bd50890e47)",
"layers 0.1.0 (git+https://github.com/servo/rust-layers#ef89918471815dfced7aaf2f1594d5469f03eab7)",
"url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)",
"util 0.0.1",
]
@ -329,23 +334,23 @@ dependencies = [
name = "net"
version = "0.0.1"
dependencies = [
"geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)",
"http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#13be91d968d3e5ba032d19a3bb3438c2c4c6b372)",
"png 0.1.0 (git+https://github.com/servo/rust-png#f3640b37e71a02ee3e140e181cc9accb0a123e16)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
"http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#4fdedeea8fc77149adf51bb24a37372af21c25b7)",
"png 0.1.0 (git+https://github.com/servo/rust-png#74418ffbf20e94b0d3bed4a9d004062a13342c79)",
"stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image#f5022de4ad6bb474a03493d1f274dde9b0f1af0c)",
"url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)",
"url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)",
"util 0.0.1",
]
[[package]]
name = "opengles"
version = "0.1.0"
source = "git+https://github.com/servo/rust-opengles#13cccda11011716fd75526a74dfd03122110f95a"
source = "git+https://github.com/servo/rust-opengles#6776e9c07feb149d34b087039ecf6b2c143e3afc"
[[package]]
name = "openssl"
version = "0.0.0"
source = "git+https://github.com/sfackler/rust-openssl.git#cd40d25cb5721064c5c2002c41a616d2dba7399a"
source = "git+https://github.com/sfackler/rust-openssl.git#a495465b75ffb18ff2303c5a11a103e00a15a13d"
[[package]]
name = "parserutils-sys"
@ -355,17 +360,17 @@ source = "git+http://github.com/servo/libparserutils#651b636ba1214bceeb0907adb1e
[[package]]
name = "phf"
version = "0.0.0"
source = "git+https://github.com/sfackler/rust-phf#fa5d803428dd760287330571c919c7c5e11b2e1b"
source = "git+https://github.com/sfackler/rust-phf#06254fdde7708630a6397c41c6c17ef81a4b66a0"
[[package]]
name = "phf_mac"
version = "0.0.0"
source = "git+https://github.com/sfackler/rust-phf#fa5d803428dd760287330571c919c7c5e11b2e1b"
source = "git+https://github.com/sfackler/rust-phf#06254fdde7708630a6397c41c6c17ef81a4b66a0"
[[package]]
name = "png"
version = "0.1.0"
source = "git+https://github.com/servo/rust-png#f3640b37e71a02ee3e140e181cc9accb0a123e16"
source = "git+https://github.com/servo/rust-png#74418ffbf20e94b0d3bed4a9d004062a13342c79"
dependencies = [
"png-sys 1.6.3 (git+https://github.com/servo/libpng?ref=servo#d01f32b4eb86904695efe7fc02b574f902e21a98)",
]
@ -380,20 +385,20 @@ name = "script"
version = "0.0.1"
dependencies = [
"canvas 0.0.1",
"cssparser 0.1.0 (git+https://github.com/servo/rust-cssparser#42346400a6629b17a48d06f0a9b28ae498947c6f)",
"cssparser 0.1.0 (git+https://github.com/servo/rust-cssparser#fa619d4ffd6920dee6e7ea79f42d9cceb9015407)",
"devtools_traits 0.0.1",
"encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#12b6610adff6eddc060691888c36017cd3ad57f7)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)",
"encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#35f0d70f65f73ba16f296f9ec675eddee661ba79)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
"gfx 0.0.1",
"http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#13be91d968d3e5ba032d19a3bb3438c2c4c6b372)",
"http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#4fdedeea8fc77149adf51bb24a37372af21c25b7)",
"hubbub 0.1.0 (git+https://github.com/servo/rust-hubbub#c7f868e688de6e9cbdc26aa09292ed072bc2648b)",
"js 0.1.0 (git+https://github.com/servo/rust-mozjs#c9bd679428e8e83e585702a949d593bda8ac04d6)",
"js 0.1.0 (git+https://github.com/servo/rust-mozjs#41fb0d80a5ed5614ca13a120cdb3281e599d4e04)",
"macros 0.0.1",
"msg 0.0.1",
"net 0.0.1",
"script_traits 0.0.1",
"style 0.0.1",
"url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)",
"url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)",
"util 0.0.1",
]
@ -402,16 +407,16 @@ name = "script_traits"
version = "0.0.1"
dependencies = [
"devtools_traits 0.0.1",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
"msg 0.0.1",
"net 0.0.1",
"url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)",
"url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)",
]
[[package]]
name = "semver"
version = "0.0.1"
source = "git+https://github.com/rust-lang/semver#df163f7b22686493b037eee1f1f9d1a2742f9bbe"
source = "git+https://github.com/rust-lang/semver#d04583a173395b76c1eaa15cc630a5f6f8f0ae10"
[[package]]
name = "skia-sys"
@ -430,27 +435,30 @@ source = "git+https://github.com/servo/rust-stb-image#f5022de4ad6bb474a03493d1f2
[[package]]
name = "string_cache"
version = "0.0.0"
source = "git+https://github.com/servo/string-cache?ref=pre-rustup#37a5869d4130bf75e2f082bab54767d56d4ba63a"
source = "git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb"
dependencies = [
"phf 0.0.0 (git+https://github.com/sfackler/rust-phf#fa5d803428dd760287330571c919c7c5e11b2e1b)",
"phf_mac 0.0.0 (git+https://github.com/sfackler/rust-phf#fa5d803428dd760287330571c919c7c5e11b2e1b)",
"string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache?ref=pre-rustup#37a5869d4130bf75e2f082bab54767d56d4ba63a)",
"phf 0.0.0 (git+https://github.com/sfackler/rust-phf#06254fdde7708630a6397c41c6c17ef81a4b66a0)",
"phf_mac 0.0.0 (git+https://github.com/sfackler/rust-phf#06254fdde7708630a6397c41c6c17ef81a4b66a0)",
"string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)",
]
[[package]]
name = "string_cache_macros"
version = "0.0.0"
source = "git+https://github.com/servo/string-cache?ref=pre-rustup#37a5869d4130bf75e2f082bab54767d56d4ba63a"
source = "git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb"
dependencies = [
"lazy_static 0.1.0 (git+https://github.com/Kimundi/lazy-static.rs#e62a65372f1dd9019e37eb9381d819edff80e360)",
]
[[package]]
name = "style"
version = "0.0.1"
dependencies = [
"cssparser 0.1.0 (git+https://github.com/servo/rust-cssparser#42346400a6629b17a48d06f0a9b28ae498947c6f)",
"encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#12b6610adff6eddc060691888c36017cd3ad57f7)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)",
"cssparser 0.1.0 (git+https://github.com/servo/rust-cssparser#fa619d4ffd6920dee6e7ea79f42d9cceb9015407)",
"encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#35f0d70f65f73ba16f296f9ec675eddee661ba79)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
"macros 0.0.1",
"url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)",
"url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)",
"util 0.0.1",
]
@ -461,24 +469,24 @@ version = "0.0.1"
[[package]]
name = "url"
version = "0.1.0"
source = "git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a"
source = "git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379"
dependencies = [
"encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#12b6610adff6eddc060691888c36017cd3ad57f7)",
"encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#35f0d70f65f73ba16f296f9ec675eddee661ba79)",
]
[[package]]
name = "util"
version = "0.0.1"
dependencies = [
"azure 0.1.0 (git+https://github.com/servo/rust-azure#9c5567b79d8b87e8ef3b48c5842f453978035d21)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#2982b770db6e5e3270305e0fd6b8068f6f80a489)",
"string_cache 0.0.0 (git+https://github.com/servo/string-cache?ref=pre-rustup#37a5869d4130bf75e2f082bab54767d56d4ba63a)",
"azure 0.1.0 (git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d)",
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
"string_cache 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)",
"task_info 0.0.1",
"url 0.1.0 (git+https://github.com/servo/rust-url#678bb4d52638b1cfdab78ef8e521566c9240fb1a)",
"url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)",
]
[[package]]
name = "xlib"
version = "0.1.0"
source = "git+https://github.com/servo/rust-xlib#79904fb42ff8a0e888f70fae336fbf6c11f1e6c8"
source = "git+https://github.com/servo/rust-xlib#581d4faddec5188d3c3ae5307dbea28aab90644c"

View file

@ -22,6 +22,7 @@ use windowing::PinchZoomWindowEvent;
use azure::azure_hl::SourceSurfaceMethods;
use azure::azure_hl;
use std::cmp;
use std::time::duration::Duration;
use geom::point::{Point2D, TypedPoint2D};
use geom::rect::Rect;
use geom::size::TypedSize2D;
@ -223,7 +224,7 @@ impl IOCompositor {
self.composite();
}
sleep(10);
sleep(Duration::milliseconds(10));
// If a pinch-zoom happened recently, ask for tiles at the new resolution
if self.zoom_action && precise_time_s() - self.zoom_time > 0.3 {

View file

@ -56,8 +56,8 @@ impl ScriptListener for CompositorChan {
port.recv();
}
fn dup(&self) -> Box<ScriptListener> {
box self.clone() as Box<ScriptListener>
fn dup(&self) -> Box<ScriptListener+'static> {
box self.clone() as Box<ScriptListener+'static>
}
}

View file

@ -28,10 +28,10 @@ extern crate layout_traits;
extern crate opengles;
extern crate png;
extern crate script_traits;
extern crate servo_msg = "msg";
extern crate servo_net = "net";
extern crate "msg" as servo_msg;
extern crate "net" as servo_net;
#[phase(plugin, link)]
extern crate servo_util = "util";
extern crate "util" as servo_util;
extern crate libc;
extern crate time;

View file

@ -8,7 +8,7 @@ use std::any::{Any, AnyRefExt, AnyMutRefExt};
use std::collections::hashmap::HashMap;
use std::cell::{Cell, RefCell};
use std::io::TcpStream;
use std::mem::{transmute, transmute_copy};
use std::mem::{transmute, transmute_copy, replace};
use std::raw::TraitObject;
use serialize::json;
@ -24,7 +24,7 @@ pub trait Actor: Any {
fn name(&self) -> String;
}
impl<'a> AnyMutRefExt<'a> for &'a mut Actor {
impl<'a> AnyMutRefExt<'a> for &'a mut Actor + 'a {
fn downcast_mut<T: 'static>(self) -> Option<&'a mut T> {
if self.is::<T>() {
unsafe {
@ -40,7 +40,7 @@ impl<'a> AnyMutRefExt<'a> for &'a mut Actor {
}
}
impl<'a> AnyRefExt<'a> for &'a Actor {
impl<'a> AnyRefExt<'a> for &'a Actor + 'a {
fn is<T: 'static>(self) -> bool {
//FIXME: This implementation is bogus since get_type_id is private now.
// However, this implementation is only needed so long as there's a Rust bug
@ -162,10 +162,9 @@ impl ActorRegistry {
}
}
}
let mut new_actors = self.new_actors.borrow_mut();
for &actor in new_actors.iter() {
let mut new_actors = replace(&mut *self.new_actors.borrow_mut(), vec!());
for actor in new_actors.into_iter() {
self.actors.insert(actor.name().to_string(), actor);
}
new_actors.clear();
}
}

View file

@ -22,10 +22,9 @@ extern crate collections;
extern crate core;
extern crate devtools_traits;
extern crate debug;
extern crate std;
extern crate serialize;
extern crate sync;
extern crate servo_msg = "msg";
extern crate "msg" as servo_msg;
use actor::{Actor, ActorRegistry};
use actors::console::ConsoleActor;
@ -181,8 +180,8 @@ fn run_server(port: Receiver<DevtoolsControlMsg>) {
//TODO: make constellation send ServerExitMsg on shutdown.
// accept connections and process them, spawning a new tasks for each one
for stream in acceptor.incoming() {
match stream {
loop {
match acceptor.accept() {
Err(ref e) if e.kind == TimedOut => {
match port.try_recv() {
Ok(ServerExitMsg) | Err(Disconnected) => break,

View file

@ -8,7 +8,7 @@
#![comment = "The Servo Parallel Browser Project"]
#![license = "MPL"]
extern crate servo_msg = "msg";
extern crate "msg" as servo_msg;
/// This module contains shared types and messages for use by devtools/script.
/// The traits are here instead of in script so that the devtools crate can be

View file

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use azure::AzFloat;
use AzColor = azure::azure_hl::Color;
use azure::azure_hl::Color as AzColor;
pub type Color = AzColor;

View file

@ -134,7 +134,7 @@ impl ScaledFontExtensionMethods for ScaledFont {
&mut glyphbuf,
azure_pattern,
&mut options,
ptr::mut_null());
ptr::null_mut());
}
}
}

View file

@ -22,11 +22,11 @@ extern crate stb_image;
extern crate png;
extern crate serialize;
#[phase(plugin)]
extern crate servo_macros = "macros";
extern crate servo_net = "net";
extern crate "macros" as servo_macros;
extern crate "net" as servo_net;
#[phase(plugin, link)]
extern crate servo_util = "util";
extern crate servo_msg = "msg";
extern crate "util" as servo_util;
extern crate "msg" as servo_msg;
extern crate style;
extern crate sync;
extern crate url;

View file

@ -96,7 +96,7 @@ impl FontHandleMethods for FontHandle {
fn create_face_from_buffer(lib: FT_Library, cbuf: *const u8, cbuflen: uint, pt_size: Option<f64>)
-> Result<FT_Face, ()> {
unsafe {
let mut face: FT_Face = ptr::mut_null();
let mut face: FT_Face = ptr::null_mut();
let face_index = 0 as FT_Long;
let result = FT_New_Memory_Face(lib, cbuf, cbuflen as FT_Long,
face_index, &mut face);

View file

@ -61,13 +61,13 @@ impl FontContextHandle {
let ptr = libc::malloc(mem::size_of::<struct_FT_MemoryRec_>() as size_t);
let allocator: &mut struct_FT_MemoryRec_ = mem::transmute(ptr);
ptr::write(allocator, struct_FT_MemoryRec_ {
user: ptr::mut_null(),
user: ptr::null_mut(),
alloc: ft_alloc,
free: ft_free,
realloc: ft_realloc,
});
let mut ctx: FT_Library = ptr::mut_null();
let mut ctx: FT_Library = ptr::null_mut();
let result = FT_New_Library(ptr as FT_Memory, &mut ctx);
if !result.succeeded() { fail!("Unable to initialize FreeType library"); }

View file

@ -35,7 +35,7 @@ pub fn get_available_families(callback: |String|) {
let fontSet = FcConfigGetFonts(config, FcSetSystem);
for i in range(0, (*fontSet).nfont as int) {
let font = (*fontSet).fonts.offset(i);
let mut family: *mut FcChar8 = ptr::mut_null();
let mut family: *mut FcChar8 = ptr::null_mut();
let mut v: c_int = 0;
while FcPatternGetString(*font, FC_FAMILY.as_ptr() as *mut i8, v, &mut family) == FcResultMatch {
let family_name = string::raw::from_buf(family as *const i8 as *const u8);
@ -71,7 +71,7 @@ pub fn get_variations_for_family(family_name: &str, callback: |String|) {
for i in range(0, (*matches).nfont as int) {
let font = (*matches).fonts.offset(i);
let mut file: *mut FcChar8 = ptr::mut_null();
let mut file: *mut FcChar8 = ptr::null_mut();
let file = if FcPatternGetString(*font, FC_FILE.as_ptr() as *mut i8, 0, &mut file) == FcResultMatch {
string::raw::from_buf(file as *const i8 as *const u8)
} else {
@ -103,14 +103,14 @@ pub fn get_system_default_family(generic_name: &str) -> Option<String> {
unsafe {
let pattern = FcNameParse(generic_name_ptr as *mut FcChar8);
FcConfigSubstitute(ptr::mut_null(), pattern, FcMatchPattern);
FcConfigSubstitute(ptr::null_mut(), pattern, FcMatchPattern);
FcDefaultSubstitute(pattern);
let mut result = 0;
let family_match = FcFontMatch(ptr::mut_null(), pattern, &mut result);
let family_match = FcFontMatch(ptr::null_mut(), pattern, &mut result);
let family_name = if result == FcResultMatch {
let mut match_string: *mut FcChar8 = ptr::mut_null();
let mut match_string: *mut FcChar8 = ptr::null_mut();
FcPatternGetString(family_match, FC_FAMILY.as_ptr() as *mut i8, 0, &mut match_string);
let result = string::raw::from_buf(match_string as *const i8 as *const u8);
FcPatternDestroy(family_match);

View file

@ -138,7 +138,7 @@ impl FontHandleMethods for FontHandle {
let glyphs = [glyph as CGGlyph];
let advance = self.ctfont.get_advances_for_glyphs(kCTFontDefaultOrientation,
&glyphs[0],
ptr::mut_null(),
ptr::null_mut(),
1);
Some(advance as FractionalPixel)
}

View file

@ -175,9 +175,9 @@ impl Shaper {
// configure static function callbacks.
// NB. This funcs structure could be reused globally, as it never changes.
let hb_funcs: *mut hb_font_funcs_t = hb_font_funcs_create();
hb_font_funcs_set_glyph_func(hb_funcs, glyph_func, ptr::mut_null(), None);
hb_font_funcs_set_glyph_h_advance_func(hb_funcs, glyph_h_advance_func, ptr::mut_null(), None);
hb_font_funcs_set_glyph_h_kerning_func(hb_funcs, glyph_h_kerning_func, ptr::mut_null(), ptr::mut_null());
hb_font_funcs_set_glyph_func(hb_funcs, glyph_func, ptr::null_mut(), None);
hb_font_funcs_set_glyph_h_advance_func(hb_funcs, glyph_h_advance_func, ptr::null_mut(), None);
hb_font_funcs_set_glyph_h_kerning_func(hb_funcs, glyph_h_kerning_func, ptr::null_mut(), ptr::null_mut());
hb_font_set_funcs(hb_font, hb_funcs, font_ptr as *mut c_void, None);
Shaper {
@ -211,7 +211,7 @@ impl ShaperMethods for Shaper {
0,
text.len() as c_int);
hb_shape(self.hb_font, hb_buffer, ptr::mut_null(), 0);
hb_shape(self.hb_font, hb_buffer, ptr::null_mut(), 0);
self.save_glyph_results(text, glyphs, hb_buffer);
hb_buffer_destroy(hb_buffer);
}
@ -511,11 +511,11 @@ extern fn get_font_table_func(_: *mut hb_face_t, tag: hb_tag_t, user_data: *mut
// TODO(Issue #197): reuse font table data, which will change the unsound trickery here.
match (*font).get_table_for_tag(tag as FontTableTag) {
None => ptr::mut_null(),
None => ptr::null_mut(),
Some(ref font_table) => {
let skinny_font_table_ptr: *const FontTable = font_table; // private context
let mut blob: *mut hb_blob_t = ptr::mut_null();
let mut blob: *mut hb_blob_t = ptr::null_mut();
(*skinny_font_table_ptr).with_buffer(|buf: *const u8, len: uint| {
// HarfBuzz calls `destroy_blob_func` when the buffer is no longer needed.
blob = hb_blob_create(buf as *const c_char,

View file

@ -9,7 +9,7 @@
use text::glyph::GlyphStore;
pub use Shaper = text::shaping::harfbuzz::Shaper;
pub use text::shaping::harfbuzz::Shaper;
pub mod harfbuzz;

View file

@ -977,10 +977,16 @@ impl BlockFlow {
let mut candidate_block_size_iterator = CandidateBSizeIterator::new(
self.fragment.style(),
self.base.block_container_explicit_block_size);
for candidate_block_size in candidate_block_size_iterator {
candidate_block_size_iterator.candidate_value = match candidate_block_size {
Auto => block_size,
Specified(value) => value
// Can't use `for` because we assign to candidate_block_size_iterator.candidate_value
loop {
match candidate_block_size_iterator.next() {
Some(candidate_block_size) => {
candidate_block_size_iterator.candidate_value = match candidate_block_size {
Auto => block_size,
Specified(value) => value
}
}
None => break,
}
}
@ -1097,10 +1103,16 @@ impl BlockFlow {
let mut candidate_block_size_iterator =
CandidateBSizeIterator::new(self.fragment.style(),
self.base.block_container_explicit_block_size);
for candidate_block_size in candidate_block_size_iterator {
candidate_block_size_iterator.candidate_value = match candidate_block_size {
Auto => content_block_size,
Specified(value) => value,
// Can't use `for` because we assign to candidate_block_size_iterator.candidate_value
loop {
match candidate_block_size_iterator.next() {
Some(candidate_block_size) => {
candidate_block_size_iterator.candidate_value = match candidate_block_size {
Auto => content_block_size,
Specified(value) => value,
}
}
None => break,
}
}
@ -1241,19 +1253,26 @@ impl BlockFlow {
let mut candidate_block_size_iterator =
CandidateBSizeIterator::new(style, Some(containing_block_block_size));
for block_size_used_val in candidate_block_size_iterator {
solution =
Some(BSizeConstraintSolution::solve_vertical_constraints_abs_nonreplaced(
block_size_used_val,
margin_block_start,
margin_block_end,
block_start,
block_end,
content_block_size,
available_block_size,
static_b_offset));
// Can't use `for` because we assign to candidate_block_size_iterator.candidate_value
loop {
match candidate_block_size_iterator.next() {
Some(block_size_used_val) => {
solution =
Some(BSizeConstraintSolution::solve_vertical_constraints_abs_nonreplaced(
block_size_used_val,
margin_block_start,
margin_block_end,
block_start,
block_end,
content_block_size,
available_block_size,
static_b_offset));
candidate_block_size_iterator.candidate_value = solution.unwrap().block_size
candidate_block_size_iterator.candidate_value
= solution.unwrap().block_size;
}
None => break,
}
}
}
}
@ -1773,7 +1792,7 @@ impl Flow for BlockFlow {
// FIXME(#2010, pcwalton): This is a hack and is totally bogus in the presence of pseudo-
// elements. But until we have incremental reflow we can't do better--we recreate the flow
// for every DOM node so otherwise we nuke layers on every reflow.
LayerId(self.fragment.node.id(), fragment_index)
LayerId(self.fragment.node.id() as uint, fragment_index)
}
fn is_absolute_containing_block(&self) -> bool {

View file

@ -67,7 +67,7 @@ use style::computed_values::{clear, float, position, text_align};
///
/// Note that virtual methods have a cost; we should not overuse them in Servo. Consider adding
/// methods to `ImmutableFlowUtils` or `MutableFlowUtils` before adding more methods here.
pub trait Flow: fmt::Show + ToString + Share {
pub trait Flow: fmt::Show + ToString + Sync {
// RTTI
//
// TODO(pcwalton): Use Rust's RTTI, once that works.
@ -310,7 +310,7 @@ pub trait Flow: fmt::Show + ToString + Share {
}
}
impl<'a, E, S: Encoder<E>> Encodable<S, E> for &'a Flow {
impl<'a, E, S: Encoder<E>> Encodable<S, E> for &'a Flow + 'a {
fn encode(&self, e: &mut S) -> Result<(), E> {
e.emit_struct("flow", 0, |e| {
try!(e.emit_struct_field("class", 0, |e| self.class().encode(e)))
@ -637,8 +637,8 @@ pub struct DescendantIter<'a> {
iter: MutItems<'a, FlowRef>,
}
impl<'a> Iterator<&'a mut Flow> for DescendantIter<'a> {
fn next(&mut self) -> Option<&'a mut Flow> {
impl<'a> Iterator<&'a mut Flow + 'a> for DescendantIter<'a> {
fn next(&mut self) -> Option<&'a mut Flow + 'a> {
match self.iter.next() {
None => None,
Some(ref mut flow) => {
@ -836,7 +836,7 @@ impl BaseFlow {
}
}
impl<'a> ImmutableFlowUtils for &'a Flow {
impl<'a> ImmutableFlowUtils for &'a Flow + 'a {
/// Returns true if this flow is a block or a float flow.
fn is_block_like(self) -> bool {
match self.class() {
@ -1004,7 +1004,7 @@ impl<'a> ImmutableFlowUtils for &'a Flow {
}
}
impl<'a> MutableFlowUtils for &'a mut Flow {
impl<'a> MutableFlowUtils for &'a mut Flow + 'a {
/// Traverses the tree in preorder.
fn traverse_preorder<T:PreorderFlowTraversal>(self, traversal: &mut T) -> bool {
if traversal.should_prune(self) {

View file

@ -23,7 +23,7 @@ impl FlowRef {
pub fn new(mut flow: Box<Flow>) -> FlowRef {
unsafe {
let result = {
let flow_ref: &mut Flow = flow;
let flow_ref: &mut Flow = &mut *flow;
let object = mem::transmute::<&mut Flow, raw::TraitObject>(flow_ref);
FlowRef { object: object }
};
@ -56,14 +56,14 @@ impl Drop for FlowRef {
}
let flow_ref: FlowRef = mem::replace(self, FlowRef {
object: raw::TraitObject {
vtable: ptr::mut_null(),
data: ptr::mut_null(),
vtable: ptr::null_mut(),
data: ptr::null_mut(),
}
});
drop(mem::transmute::<raw::TraitObject, Box<Flow>>(flow_ref.object));
mem::forget(flow_ref);
self.object.vtable = ptr::mut_null();
self.object.data = ptr::mut_null();
self.object.vtable = ptr::null_mut();
self.object.data = ptr::null_mut();
}
}
}

View file

@ -23,11 +23,11 @@ extern crate script_traits;
extern crate serialize;
extern crate style;
#[phase(plugin)]
extern crate servo_macros = "macros";
extern crate servo_net = "net";
extern crate servo_msg = "msg";
extern crate "macros" as servo_macros;
extern crate "net" as servo_net;
extern crate "msg" as servo_msg;
#[phase(plugin, link)]
extern crate servo_util = "util";
extern crate "util" as servo_util;
extern crate collections;
extern crate encoding;

View file

@ -8,7 +8,7 @@
use fragment::Fragment;
use computed = style::computed_values;
use style::computed_values as computed;
use geom::SideOffsets2D;
use style::computed_values::{LPA_Auto, LPA_Length, LPA_Percentage, LP_Length, LP_Percentage};
use style::ComputedValues;

View file

@ -123,7 +123,7 @@ impl OpaqueNodeMethods for OpaqueNode {
fn from_thread_safe_layout_node(node: &ThreadSafeLayoutNode) -> OpaqueNode {
unsafe {
let abstract_node = node.get_jsmanaged();
let ptr: uintptr_t = abstract_node.reflector().get_jsobject() as uint;
let ptr: uintptr_t = abstract_node.reflector().get_jsobject() as uintptr_t;
OpaqueNode(ptr)
}
}

View file

@ -9,9 +9,9 @@
extern crate gfx;
extern crate script_traits;
extern crate servo_msg = "msg";
extern crate servo_net = "net";
extern crate servo_util = "util";
extern crate "msg" as servo_msg;
extern crate "net" as servo_net;
extern crate "util" as servo_util;
// This module contains traits in layout used generically
// in the rest of Servo.

View file

@ -109,9 +109,9 @@ impl LintPass for UnrootedPass {
}
}
fn check_fn(&mut self, cx: &Context, kind: &syntax::visit::FnKind, decl: &ast::FnDecl,
fn check_fn(&mut self, cx: &Context, kind: syntax::visit::FnKind, decl: &ast::FnDecl,
block: &ast::Block, _span: syntax::codemap::Span, _id: ast::NodeId) {
match *kind {
match kind {
syntax::visit::FkItemFn(i, _, _, _) |
syntax::visit::FkMethod(i, _, _) if i.as_str() == "new" || i.as_str() == "new_inherited" => {
return;

View file

@ -113,10 +113,10 @@ pub trait ScriptListener : Clone {
layer_id: LayerId,
point: Point2D<f32>);
fn close(&self);
fn dup(&self) -> Box<ScriptListener>;
fn dup(&self) -> Box<ScriptListener+'static>;
}
impl<E, S: Encoder<E>> Encodable<S, E> for Box<ScriptListener> {
impl<E, S: Encoder<E>> Encodable<S, E> for Box<ScriptListener+'static> {
fn encode(&self, _s: &mut S) -> Result<(), E> {
Ok(())
}

View file

@ -8,8 +8,7 @@ extern crate azure;
extern crate geom;
extern crate layers;
extern crate serialize;
extern crate servo_util = "util";
extern crate std;
extern crate "util" as servo_util;
extern crate url;
#[cfg(target_os="macos")]

View file

@ -6,8 +6,9 @@ use resource_task::{LoadResponse, Metadata, Done, LoadData, start_sending};
use file_loader;
use std::os;
use std::io::fs::PathExtensions;
use url::Url;
use StatusOk = http::status::Ok;
use http::status::Ok as StatusOk;
pub fn factory(mut load_data: LoadData, start_chan: Sender<LoadResponse>) {

View file

@ -37,7 +37,7 @@ fn load(load_data: LoadData, start_chan: Sender<LoadResponse>) {
},
None => ()
}
let parts: Vec<&str> = scheme_data.as_slice().splitn(',', 1).collect();
let parts: Vec<&str> = scheme_data.as_slice().splitn(1, ',').collect();
if parts.len() != 2 {
start_sending(start_chan, metadata).send(Done(Err("invalid data uri".to_string())));
return;

View file

@ -79,7 +79,7 @@ pub struct Request {
pub manual_redirect: bool,
pub redirect_count: uint,
pub response_tainting: ResponseTainting,
pub cache: Option<Box<CORSCache>>
pub cache: Option<Box<CORSCache+'static>>
}
impl Request {

View file

@ -4,7 +4,7 @@
use url::Url;
use http::status::{Status, UnregisteredStatus};
use StatusOk = http::status::Ok;
use http::status::Ok as StatusOk;
use http::headers::HeaderEnum;
use http::headers::response::HeaderCollection;
use std::ascii::OwnedStrAsciiExt;

View file

@ -69,7 +69,7 @@ fn load(load_data: LoadData, start_chan: Sender<LoadResponse>) {
// Preserve the `host` header set automatically by RequestWriter.
let host = writer.headers.host.clone();
writer.headers = box load_data.headers.clone();
writer.headers = load_data.headers.clone();
writer.headers.host = host;
if writer.headers.accept_encoding.is_none() {
// We currently don't support HTTP Compression (FIXME #2587)
@ -130,7 +130,7 @@ fn load(load_data: LoadData, start_chan: Sender<LoadResponse>) {
let mut metadata = Metadata::default(url);
metadata.set_content_type(&response.headers.content_type);
metadata.headers = Some(*response.headers.clone());
metadata.headers = Some(response.headers.clone());
metadata.status = response.status.clone();
let progress_chan = match start_sending_opt(start_chan, metadata) {

View file

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use std::iter::range_step;
use stb_image = stb_image::image;
use stb_image::image as stb_image;
use png;
// FIXME: Images must not be copied every frame. Instead we should atomically

View file

@ -76,7 +76,7 @@ impl<E, S: Encoder<E>> Encodable<S, E> for ImageCacheTask {
}
}
type DecoderFactory = fn() -> proc(&[u8]) -> Option<Image>;
type DecoderFactory = fn() -> (proc(&[u8]) : 'static -> Option<Image>);
impl ImageCacheTask {
pub fn new(resource_task: ResourceTask) -> ImageCacheTask {

View file

@ -14,7 +14,7 @@ extern crate png;
#[phase(plugin, link)]
extern crate log;
extern crate serialize;
extern crate servo_util = "util";
extern crate "util" as servo_util;
extern crate stb_image;
extern crate sync;
extern crate time;

View file

@ -12,12 +12,12 @@ use http_loader;
use std::comm::{channel, Receiver, Sender};
use std::task::TaskBuilder;
use http::headers::content_type::MediaType;
use ResponseHeaderCollection = http::headers::response::HeaderCollection;
use RequestHeaderCollection = http::headers::request::HeaderCollection;
use http::headers::response::HeaderCollection as ResponseHeaderCollection;
use http::headers::request::HeaderCollection as RequestHeaderCollection;
use http::method::{Method, Get};
use url::Url;
use StatusOk = http::status::Ok;
use http::status::Ok as StatusOk;
use http::status::Status;

View file

@ -16,9 +16,9 @@ use std::str::StrSlice;
use time;
use time::{now, Timespec};
use ResponseHeaderCollection = http::headers::response::HeaderCollection;
use RequestHeaderCollection = http::headers::request::HeaderCollection;
use RequestHeader = http::headers::request::Header;
use http::headers::response::HeaderCollection as ResponseHeaderCollection;
use http::headers::request::HeaderCollection as RequestHeaderCollection;
use http::headers::request::Header as RequestHeader;
use http::client::{RequestWriter, NetworkStream};
use http::headers::{HeaderConvertible, HeaderEnum, HeaderValueByteIterator};
@ -146,7 +146,7 @@ impl CORSRequest {
};
let host = writer.headers.host.clone();
writer.headers = box preflight.headers.clone();
writer.headers = preflight.headers.clone();
writer.headers.host = host;
let response = match writer.read_response() {
Ok(r) => r,
@ -158,19 +158,19 @@ impl CORSRequest {
200 .. 299 => {}
_ => return error
}
cors_response.headers = *response.headers.clone();
cors_response.headers = response.headers.clone();
// Substeps 1-3 (parsing rules: http://fetch.spec.whatwg.org/#http-new-header-syntax)
fn find_header(headers: &ResponseHeaderCollection, name: &str) -> Option<String> {
headers.iter().find(|h| h.header_name().as_slice()
.eq_ignore_ascii_case(name))
.map(|h| h.header_value())
}
let methods_string = match find_header(&*response.headers, "Access-Control-Allow-Methods") {
let methods_string = match find_header(&response.headers, "Access-Control-Allow-Methods") {
Some(s) => s,
_ => return error
};
let methods = methods_string.as_slice().split(',');
let headers_string = match find_header(&*response.headers, "Access-Control-Allow-Headers") {
let headers_string = match find_header(&response.headers, "Access-Control-Allow-Headers") {
Some(s) => s,
_ => return error
};
@ -197,7 +197,7 @@ impl CORSRequest {
}
}
// Substep 7, 8
let max_age: uint = find_header(&*response.headers, "Access-Control-Max-Age")
let max_age: uint = find_header(&response.headers, "Access-Control-Max-Age")
.and_then(|h| FromStr::from_str(h.as_slice())).unwrap_or(0);
// Substep 9: Impose restrictions on max-age, if any (unimplemented)
// Substeps 10-12: Add a cache (partially implemented, XXXManishearth)

View file

@ -121,7 +121,7 @@ pub fn WrapCallThisObject<T: Reflectable>(cx: *mut JSContext,
unsafe {
if JS_WrapObject(cx, &mut obj) == 0 {
return ptr::mut_null();
return ptr::null_mut();
}
}

View file

@ -1757,6 +1757,7 @@ class CGAbstractMethod(CGThing):
decorators.append('#[inline(always)]')
if self.extern:
decorators.append('unsafe')
decorators.append('extern')
if self.pub:
@ -4538,7 +4539,6 @@ class CGBindingRoot(CGThing):
'dom::bindings::conversions::{Default, Empty}',
'dom::bindings::codegen::*',
'dom::bindings::codegen::Bindings::*',
'dom::bindings::codegen::RegisterBindings',
'dom::bindings::codegen::UnionTypes::*',
'dom::bindings::error::{FailureUnknown, Fallible, Error, ErrorResult}',
'dom::bindings::error::throw_dom_exception',
@ -5477,12 +5477,12 @@ class GlobalGenRoots():
}
#[inline(always)]
fn from_ref<'a, T: ${fromBound}>(derived: JSRef<'a, T>) -> JSRef<'a, Self> {
fn from_ref<'a, T: ${fromBound}+Reflectable>(derived: JSRef<'a, T>) -> JSRef<'a, Self> {
unsafe { derived.transmute() }
}
#[inline(always)]
fn from_borrowed_ref<'a, 'b, T: ${fromBound}>(derived: &'a JSRef<'b, T>) -> &'a JSRef<'b, Self> {
fn from_borrowed_ref<'a, 'b, T: ${fromBound}+Reflectable>(derived: &'a JSRef<'b, T>) -> &'a JSRef<'b, Self> {
unsafe { derived.transmute_borrowed() }
}

View file

@ -97,7 +97,7 @@ static ERROR_FORMAT_STRING: JSErrorFormatString = JSErrorFormatString {
};
/// Callback used to throw `TypeError`s.
extern fn get_error_message(_user_ref: *mut libc::c_void,
unsafe extern fn get_error_message(_user_ref: *mut libc::c_void,
_locale: *const libc::c_char,
error_number: libc::c_uint) -> *const JSErrorFormatString
{
@ -109,6 +109,6 @@ extern fn get_error_message(_user_ref: *mut libc::c_void,
pub fn throw_type_error(cx: *mut JSContext, error: &str) {
let error = error.to_c_str();
unsafe {
JS_ReportErrorNumber(cx, Some(get_error_message), ptr::mut_null(), 0, error.as_ptr());
JS_ReportErrorNumber(cx, Some(get_error_message), ptr::null_mut(), 0, error.as_ptr());
}
}

View file

@ -255,7 +255,7 @@ impl<T> Assignable<T> for JS<T> {
}
}
impl<'a, T> Assignable<T> for JSRef<'a, T> {
impl<'a, T: Reflectable> Assignable<T> for JSRef<'a, T> {
unsafe fn get_js(&self) -> JS<T> {
self.unrooted()
}

View file

@ -26,11 +26,10 @@ use std::mem::size_of;
static JSPROXYSLOT_EXPANDO: u32 = 0;
pub extern fn getPropertyDescriptor(cx: *mut JSContext, proxy: *mut JSObject,
id: jsid, set: bool,
desc: *mut JSPropertyDescriptor)
-> bool {
unsafe {
pub unsafe extern fn getPropertyDescriptor(cx: *mut JSContext, proxy: *mut JSObject,
id: jsid, set: bool,
desc: *mut JSPropertyDescriptor)
-> bool {
let handler = GetProxyHandler(proxy);
if !InvokeGetOwnPropertyDescriptor(handler, cx, proxy, id, set, desc) {
return false;
@ -42,55 +41,50 @@ pub extern fn getPropertyDescriptor(cx: *mut JSContext, proxy: *mut JSObject,
//let proto = JS_GetPrototype(proxy);
let proto = GetObjectProto(proxy);
if proto.is_null() {
(*desc).obj = ptr::mut_null();
(*desc).obj = ptr::null_mut();
return true;
}
JS_GetPropertyDescriptorById(cx, proto, id, JSRESOLVE_QUALIFIED, desc) != 0
}
}
pub fn defineProperty_(cx: *mut JSContext, proxy: *mut JSObject, id: jsid,
desc: *mut JSPropertyDescriptor) -> bool {
pub unsafe fn defineProperty_(cx: *mut JSContext, proxy: *mut JSObject, id: jsid,
desc: *mut JSPropertyDescriptor) -> bool {
static JSMSG_GETTER_ONLY: libc::c_uint = 160;
unsafe {
//FIXME: Workaround for https://github.com/mozilla/rust/issues/13385
let setter: *const libc::c_void = mem::transmute((*desc).setter);
let setter_stub: *const libc::c_void = mem::transmute(JS_StrictPropertyStub);
if ((*desc).attrs & JSPROP_GETTER) != 0 && setter == setter_stub {
return JS_ReportErrorFlagsAndNumber(cx,
JSREPORT_WARNING | JSREPORT_STRICT |
JSREPORT_STRICT_MODE_ERROR,
Some(RUST_js_GetErrorMessage), ptr::mut_null(),
JSMSG_GETTER_ONLY) != 0;
}
let expando = EnsureExpandoObject(cx, proxy);
if expando.is_null() {
return false;
}
return JS_DefinePropertyById(cx, expando, id, (*desc).value, (*desc).getter,
(*desc).setter, (*desc).attrs) != 0;
//FIXME: Workaround for https://github.com/mozilla/rust/issues/13385
let setter: *const libc::c_void = mem::transmute((*desc).setter);
let setter_stub: *const libc::c_void = mem::transmute(JS_StrictPropertyStub);
if ((*desc).attrs & JSPROP_GETTER) != 0 && setter == setter_stub {
return JS_ReportErrorFlagsAndNumber(cx,
JSREPORT_WARNING | JSREPORT_STRICT |
JSREPORT_STRICT_MODE_ERROR,
Some(RUST_js_GetErrorMessage), ptr::null_mut(),
JSMSG_GETTER_ONLY) != 0;
}
let expando = EnsureExpandoObject(cx, proxy);
if expando.is_null() {
return false;
}
return JS_DefinePropertyById(cx, expando, id, (*desc).value, (*desc).getter,
(*desc).setter, (*desc).attrs) != 0;
}
pub extern fn defineProperty(cx: *mut JSContext, proxy: *mut JSObject, id: jsid,
desc: *mut JSPropertyDescriptor) -> bool {
pub unsafe extern fn defineProperty(cx: *mut JSContext, proxy: *mut JSObject, id: jsid,
desc: *mut JSPropertyDescriptor) -> bool {
defineProperty_(cx, proxy, id, desc)
}
pub extern fn delete_(cx: *mut JSContext, proxy: *mut JSObject, id: jsid,
bp: *mut bool) -> bool {
unsafe {
let expando = EnsureExpandoObject(cx, proxy);
if expando.is_null() {
return false;
}
return delete_property_by_id(cx, expando, id, &mut *bp);
pub unsafe extern fn delete_(cx: *mut JSContext, proxy: *mut JSObject, id: jsid,
bp: *mut bool) -> bool {
let expando = EnsureExpandoObject(cx, proxy);
if expando.is_null() {
return false;
}
return delete_property_by_id(cx, expando, id, &mut *bp);
}
pub fn _obj_toString(cx: *mut JSContext, className: *const libc::c_char) -> *mut JSString {
@ -99,7 +93,7 @@ pub fn _obj_toString(cx: *mut JSContext, className: *const libc::c_char) -> *mut
let nchars = "[object ]".len() + name.len();
let chars: *mut jschar = JS_malloc(cx, (nchars + 1) as libc::size_t * (size_of::<jschar>() as libc::size_t)) as *mut jschar;
if chars.is_null() {
return ptr::mut_null();
return ptr::null_mut();
}
let result = format!("[object {}]", name);
@ -121,7 +115,7 @@ pub fn GetExpandoObject(obj: *mut JSObject) -> *mut JSObject {
assert!(is_dom_proxy(obj));
let val = GetProxyExtra(obj, JSPROXYSLOT_EXPANDO);
if val.is_undefined() {
ptr::mut_null()
ptr::null_mut()
} else {
val.to_object()
}
@ -133,11 +127,11 @@ pub fn EnsureExpandoObject(cx: *mut JSContext, obj: *mut JSObject) -> *mut JSObj
assert!(is_dom_proxy(obj));
let mut expando = GetExpandoObject(obj);
if expando.is_null() {
expando = JS_NewObjectWithGivenProto(cx, ptr::mut_null(),
ptr::mut_null(),
expando = JS_NewObjectWithGivenProto(cx, ptr::null_mut(),
ptr::null_mut(),
GetObjectParent(obj));
if expando.is_null() {
return ptr::mut_null();
return ptr::null_mut();
}
SetProxyExtra(obj, JSPROXYSLOT_EXPANDO, ObjectValue(&*expando));

View file

@ -129,7 +129,7 @@ pub fn unwrap_jsmanaged<T: Reflectable>(mut obj: *mut JSObject,
let dom_class = get_dom_class(obj).or_else(|_| {
if IsWrapper(obj) == 1 {
debug!("found wrapper");
obj = UnwrapObject(obj, /* stopAtOuter = */ 0, ptr::mut_null());
obj = UnwrapObject(obj, /* stopAtOuter = */ 0, ptr::null_mut());
if obj.is_null() {
debug!("unwrapping security wrapper failed");
Err(())
@ -421,7 +421,7 @@ fn CreateInterfacePrototypeObject(cx: *mut JSContext, global: *mut JSObject,
/// A throwing constructor, for those interfaces that have neither
/// `NoInterfaceObject` nor `Constructor`.
pub extern fn ThrowingConstructor(cx: *mut JSContext, _argc: c_uint, _vp: *mut JSVal) -> JSBool {
pub unsafe extern fn ThrowingConstructor(cx: *mut JSContext, _argc: c_uint, _vp: *mut JSVal) -> JSBool {
throw_type_error(cx, "Illegal constructor.");
return 0;
}
@ -488,7 +488,7 @@ impl Reflector {
/// Create an uninitialized `Reflector`.
pub fn new() -> Reflector {
Reflector {
object: Cell::new(ptr::mut_null()),
object: Cell::new(ptr::null_mut()),
}
}
}
@ -613,7 +613,7 @@ pub fn get_dictionary_property(cx: *mut JSContext,
pub fn HasPropertyOnPrototype(cx: *mut JSContext, proxy: *mut JSObject, id: jsid) -> bool {
// MOZ_ASSERT(js::IsProxy(proxy) && js::GetProxyHandler(proxy) == handler);
let mut found = false;
return !GetPropertyOnPrototype(cx, proxy, id, &mut found, ptr::mut_null()) || found;
return !GetPropertyOnPrototype(cx, proxy, id, &mut found, ptr::null_mut()) || found;
}
/// Returns whether `obj` can be converted to a callback interface per IDL.
@ -626,9 +626,9 @@ pub fn IsConvertibleToCallbackInterface(cx: *mut JSContext, obj: *mut JSObject)
/// Create a DOM global object with the given class.
pub fn CreateDOMGlobal(cx: *mut JSContext, class: *const JSClass) -> *mut JSObject {
unsafe {
let obj = JS_NewGlobalObject(cx, class, ptr::mut_null());
let obj = JS_NewGlobalObject(cx, class, ptr::null_mut());
if obj.is_null() {
return ptr::mut_null();
return ptr::null_mut();
}
with_compartment(cx, obj, || {
JS_InitStandardClasses(cx, obj);
@ -639,18 +639,14 @@ pub fn CreateDOMGlobal(cx: *mut JSContext, class: *const JSClass) -> *mut JSObje
}
/// Callback to outerize windows when wrapping.
pub extern fn wrap_for_same_compartment(cx: *mut JSContext, obj: *mut JSObject) -> *mut JSObject {
unsafe {
JS_ObjectToOuterObject(cx, obj)
}
pub unsafe extern fn wrap_for_same_compartment(cx: *mut JSContext, obj: *mut JSObject) -> *mut JSObject {
JS_ObjectToOuterObject(cx, obj)
}
/// Callback to outerize windows before wrapping.
pub extern fn pre_wrap(cx: *mut JSContext, _scope: *mut JSObject,
pub unsafe extern fn pre_wrap(cx: *mut JSContext, _scope: *mut JSObject,
obj: *mut JSObject, _flags: c_uint) -> *mut JSObject {
unsafe {
JS_ObjectToOuterObject(cx, obj)
}
JS_ObjectToOuterObject(cx, obj)
}
/// Callback to outerize windows.
@ -675,12 +671,12 @@ pub fn global_object_for_js_object(obj: *mut JSObject) -> GlobalField {
let global = GetGlobalForObjectCrossCompartment(obj);
let clasp = JS_GetClass(global);
assert!(((*clasp).flags & (JSCLASS_IS_DOMJSCLASS | JSCLASS_IS_GLOBAL)) != 0);
match FromJSValConvertible::from_jsval(ptr::mut_null(), ObjectOrNullValue(global), ()) {
match FromJSValConvertible::from_jsval(ptr::null_mut(), ObjectOrNullValue(global), ()) {
Ok(window) => return WindowField(window),
Err(_) => (),
}
match FromJSValConvertible::from_jsval(ptr::mut_null(), ObjectOrNullValue(global), ()) {
match FromJSValConvertible::from_jsval(ptr::null_mut(), ObjectOrNullValue(global), ()) {
Ok(worker) => return WorkerField(worker),
Err(_) => (),
}

View file

@ -28,7 +28,7 @@ impl BrowserContext {
let mut context = BrowserContext {
history: vec!(SessionHistoryEntry::new(document)),
active_index: 0,
window_proxy: Traceable::new(ptr::mut_null()),
window_proxy: Traceable::new(ptr::null_mut()),
};
context.create_window_proxy();
context

View file

@ -127,7 +127,7 @@ impl DedicatedWorkerGlobalScope {
assert!(JS_ReadStructuredClone(
js_context.ptr, data as *const u64, nbytes,
JS_STRUCTURED_CLONE_VERSION, &mut message,
ptr::null(), ptr::mut_null()) != 0);
ptr::null(), ptr::null_mut()) != 0);
}
MessageEvent::dispatch_jsval(target, &Worker(scope), message);
@ -152,11 +152,11 @@ impl DedicatedWorkerGlobalScope {
impl<'a> DedicatedWorkerGlobalScopeMethods for JSRef<'a, DedicatedWorkerGlobalScope> {
fn PostMessage(self, cx: *mut JSContext, message: JSVal) {
let mut data = ptr::mut_null();
let mut data = ptr::null_mut();
let mut nbytes = 0;
unsafe {
assert!(JS_WriteStructuredClone(cx, message, &mut data, &mut nbytes,
ptr::null(), ptr::mut_null()) != 0);
ptr::null(), ptr::null_mut()) != 0);
}
let ScriptChan(ref sender) = self.parent_sender;

View file

@ -830,7 +830,7 @@ pub fn get_attribute_parts<'a>(name: &'a str) -> (Option<&'a str>, &'a str) {
//FIXME: Throw for XML-invalid names
//FIXME: Throw for XMLNS-invalid names
let (prefix, local_name) = if name.contains(":") {
let mut parts = name.splitn(':', 1);
let mut parts = name.splitn(1, ':');
(Some(parts.next().unwrap()), parts.next().unwrap())
} else {
(None, name)

View file

@ -185,7 +185,7 @@ impl<'a> EventTargetHelpers for JSRef<'a, EventTarget> {
let source: Vec<u16> = source.as_slice().utf16_units().collect();
let handler = unsafe {
JS_CompileUCFunction(cx,
ptr::mut_null(),
ptr::null_mut(),
name.as_ptr(),
nargs,
&arg_names as *const *const i8 as *mut *const i8,

View file

@ -23,7 +23,7 @@ pub trait CollectionFilter {
fn filter(&self, elem: JSRef<Element>, root: JSRef<Node>) -> bool;
}
impl<S: Encoder<E>, E> Encodable<S, E> for Box<CollectionFilter> {
impl<S: Encoder<E>, E> Encodable<S, E> for Box<CollectionFilter+'static> {
fn encode(&self, _s: &mut S) -> Result<(), E> {
Ok(())
}
@ -33,7 +33,7 @@ impl<S: Encoder<E>, E> Encodable<S, E> for Box<CollectionFilter> {
#[must_root]
pub enum CollectionTypeId {
Static(Vec<JS<Element>>),
Live(JS<Node>, Box<CollectionFilter>)
Live(JS<Node>, Box<CollectionFilter+'static>)
}
#[deriving(Encodable)]
@ -59,7 +59,7 @@ impl HTMLCollection {
impl HTMLCollection {
pub fn create(window: JSRef<Window>, root: JSRef<Node>,
filter: Box<CollectionFilter>) -> Temporary<HTMLCollection> {
filter: Box<CollectionFilter+'static>) -> Temporary<HTMLCollection> {
HTMLCollection::new(window, Live(JS::from_rooted(root), filter))
}

View file

@ -2023,12 +2023,12 @@ impl Reflectable for Node {
}
}
pub fn document_from_node<T: NodeBase>(derived: JSRef<T>) -> Temporary<Document> {
pub fn document_from_node<T: NodeBase+Reflectable>(derived: JSRef<T>) -> Temporary<Document> {
let node: JSRef<Node> = NodeCast::from_ref(derived);
node.owner_doc()
}
pub fn window_from_node<T: NodeBase>(derived: JSRef<T>) -> Temporary<Window> {
pub fn window_from_node<T: NodeBase+Reflectable>(derived: JSRef<T>) -> Temporary<Window> {
let document = document_from_node(derived).root();
Temporary::new(document.deref().window.clone())
}

View file

@ -14,7 +14,7 @@ use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
use servo_util::str::DOMString;
use encoding::all::UTF_8;
use encoding::types::{Encoding, EncodeReplace};
use encoding::types::{EncodingRef, EncodeReplace};
use std::cell::RefCell;
use std::collections::hashmap::HashMap;
@ -93,14 +93,14 @@ impl Reflectable for URLSearchParams {
}
pub trait URLSearchParamsHelpers {
fn serialize(&self, encoding: Option<&'static Encoding>) -> Vec<u8>;
fn serialize(&self, encoding: Option<EncodingRef>) -> Vec<u8>;
fn update_steps(&self);
}
impl URLSearchParamsHelpers for URLSearchParams {
fn serialize(&self, encoding: Option<&'static Encoding>) -> Vec<u8> {
fn serialize(&self, encoding: Option<EncodingRef>) -> Vec<u8> {
// http://url.spec.whatwg.org/#concept-urlencoded-serializer
fn serialize_string(value: &DOMString, encoding: &'static Encoding) -> Vec<u8> {
fn serialize_string(value: &DOMString, encoding: EncodingRef) -> Vec<u8> {
// http://url.spec.whatwg.org/#concept-urlencoded-byte-serializer
let value = value.as_slice();
@ -126,7 +126,7 @@ impl URLSearchParamsHelpers for URLSearchParams {
}
buf
}
let encoding = encoding.unwrap_or(UTF_8 as &'static Encoding);
let encoding = encoding.unwrap_or(UTF_8 as EncodingRef);
let mut buf = vec!();
let mut first_pair = true;
for (k, v) in self.data.deref().borrow().iter() {

View file

@ -138,82 +138,82 @@ pub trait VirtualMethods {
/// method call on the trait object will invoke the corresponding method on the
/// concrete type, propagating up the parent hierarchy unless otherwise
/// interrupted.
pub fn vtable_for<'a>(node: &'a JSRef<Node>) -> &'a VirtualMethods {
pub fn vtable_for<'a>(node: &'a JSRef<'a, Node>) -> &'a VirtualMethods + 'a {
match node.type_id() {
ElementNodeTypeId(HTMLAnchorElementTypeId) => {
let element: &JSRef<HTMLAnchorElement> = HTMLAnchorElementCast::to_borrowed_ref(node).unwrap();
element as &VirtualMethods
let element: &'a JSRef<'a, HTMLAnchorElement> = HTMLAnchorElementCast::to_borrowed_ref(node).unwrap();
element as &'a VirtualMethods + 'a
}
ElementNodeTypeId(HTMLAreaElementTypeId) => {
let element: &JSRef<HTMLAreaElement> = HTMLAreaElementCast::to_borrowed_ref(node).unwrap();
element as &VirtualMethods
let element: &'a JSRef<'a, HTMLAreaElement> = HTMLAreaElementCast::to_borrowed_ref(node).unwrap();
element as &'a VirtualMethods + 'a
}
ElementNodeTypeId(HTMLBodyElementTypeId) => {
let element: &JSRef<HTMLBodyElement> = HTMLBodyElementCast::to_borrowed_ref(node).unwrap();
element as &VirtualMethods
let element: &'a JSRef<'a, HTMLBodyElement> = HTMLBodyElementCast::to_borrowed_ref(node).unwrap();
element as &'a VirtualMethods + 'a
}
ElementNodeTypeId(HTMLButtonElementTypeId) => {
let element: &JSRef<HTMLButtonElement> = HTMLButtonElementCast::to_borrowed_ref(node).unwrap();
element as &VirtualMethods
let element: &'a JSRef<'a, HTMLButtonElement> = HTMLButtonElementCast::to_borrowed_ref(node).unwrap();
element as &'a VirtualMethods + 'a
}
ElementNodeTypeId(HTMLCanvasElementTypeId) => {
let element: &JSRef<HTMLCanvasElement> = HTMLCanvasElementCast::to_borrowed_ref(node).unwrap();
element as &VirtualMethods
let element: &'a JSRef<'a, HTMLCanvasElement> = HTMLCanvasElementCast::to_borrowed_ref(node).unwrap();
element as &'a VirtualMethods + 'a
}
ElementNodeTypeId(HTMLFieldSetElementTypeId) => {
let element: &JSRef<HTMLFieldSetElement> = HTMLFieldSetElementCast::to_borrowed_ref(node).unwrap();
element as &VirtualMethods
let element: &'a JSRef<'a, HTMLFieldSetElement> = HTMLFieldSetElementCast::to_borrowed_ref(node).unwrap();
element as &'a VirtualMethods + 'a
}
ElementNodeTypeId(HTMLImageElementTypeId) => {
let element: &JSRef<HTMLImageElement> = HTMLImageElementCast::to_borrowed_ref(node).unwrap();
element as &VirtualMethods
let element: &'a JSRef<'a, HTMLImageElement> = HTMLImageElementCast::to_borrowed_ref(node).unwrap();
element as &'a VirtualMethods + 'a
}
ElementNodeTypeId(HTMLIFrameElementTypeId) => {
let element: &JSRef<HTMLIFrameElement> = HTMLIFrameElementCast::to_borrowed_ref(node).unwrap();
element as &VirtualMethods
let element: &'a JSRef<'a, HTMLIFrameElement> = HTMLIFrameElementCast::to_borrowed_ref(node).unwrap();
element as &'a VirtualMethods + 'a
}
ElementNodeTypeId(HTMLInputElementTypeId) => {
let element: &JSRef<HTMLInputElement> = HTMLInputElementCast::to_borrowed_ref(node).unwrap();
element as &VirtualMethods
let element: &'a JSRef<'a, HTMLInputElement> = HTMLInputElementCast::to_borrowed_ref(node).unwrap();
element as &'a VirtualMethods + 'a
}
ElementNodeTypeId(HTMLLinkElementTypeId) => {
let element: &JSRef<HTMLLinkElement> = HTMLLinkElementCast::to_borrowed_ref(node).unwrap();
element as &VirtualMethods
let element: &'a JSRef<'a, HTMLLinkElement> = HTMLLinkElementCast::to_borrowed_ref(node).unwrap();
element as &'a VirtualMethods + 'a
}
ElementNodeTypeId(HTMLObjectElementTypeId) => {
let element: &JSRef<HTMLObjectElement> = HTMLObjectElementCast::to_borrowed_ref(node).unwrap();
element as &VirtualMethods
let element: &'a JSRef<'a, HTMLObjectElement> = HTMLObjectElementCast::to_borrowed_ref(node).unwrap();
element as &'a VirtualMethods + 'a
}
ElementNodeTypeId(HTMLOptGroupElementTypeId) => {
let element: &JSRef<HTMLOptGroupElement> = HTMLOptGroupElementCast::to_borrowed_ref(node).unwrap();
element as &VirtualMethods
let element: &'a JSRef<'a, HTMLOptGroupElement> = HTMLOptGroupElementCast::to_borrowed_ref(node).unwrap();
element as &'a VirtualMethods + 'a
}
ElementNodeTypeId(HTMLOptionElementTypeId) => {
let element: &JSRef<HTMLOptionElement> = HTMLOptionElementCast::to_borrowed_ref(node).unwrap();
element as &VirtualMethods
let element: &'a JSRef<'a, HTMLOptionElement> = HTMLOptionElementCast::to_borrowed_ref(node).unwrap();
element as &'a VirtualMethods + 'a
}
ElementNodeTypeId(HTMLSelectElementTypeId) => {
let element: &JSRef<HTMLSelectElement> = HTMLSelectElementCast::to_borrowed_ref(node).unwrap();
element as &VirtualMethods
let element: &'a JSRef<'a, HTMLSelectElement> = HTMLSelectElementCast::to_borrowed_ref(node).unwrap();
element as &'a VirtualMethods + 'a
}
ElementNodeTypeId(HTMLStyleElementTypeId) => {
let element: &JSRef<HTMLStyleElement> = HTMLStyleElementCast::to_borrowed_ref(node).unwrap();
element as &VirtualMethods
let element: &'a JSRef<'a, HTMLStyleElement> = HTMLStyleElementCast::to_borrowed_ref(node).unwrap();
element as &'a VirtualMethods + 'a
}
ElementNodeTypeId(HTMLTextAreaElementTypeId) => {
let element: &JSRef<HTMLTextAreaElement> = HTMLTextAreaElementCast::to_borrowed_ref(node).unwrap();
element as &VirtualMethods
let element: &'a JSRef<'a, HTMLTextAreaElement> = HTMLTextAreaElementCast::to_borrowed_ref(node).unwrap();
element as &'a VirtualMethods + 'a
}
ElementNodeTypeId(ElementTypeId) => {
let element: &JSRef<Element> = ElementCast::to_borrowed_ref(node).unwrap();
element as &VirtualMethods
let element: &'a JSRef<'a, Element> = ElementCast::to_borrowed_ref(node).unwrap();
element as &'a VirtualMethods + 'a
}
ElementNodeTypeId(_) => {
let element: &JSRef<HTMLElement> = HTMLElementCast::to_borrowed_ref(node).unwrap();
element as &VirtualMethods
let element: &'a JSRef<'a, HTMLElement> = HTMLElementCast::to_borrowed_ref(node).unwrap();
element as &'a VirtualMethods + 'a
}
_ => {
node as &VirtualMethods
node as &'a VirtualMethods + 'a
}
}
}

View file

@ -48,6 +48,7 @@ use std::hash::{Hash, sip};
use std::io::timer::Timer;
use std::ptr;
use std::rc::Rc;
use std::time::duration::Duration;
use time;
#[deriving(PartialEq, Encodable, Eq)]
@ -85,7 +86,7 @@ pub struct Window {
pub image_cache_task: ImageCacheTask,
pub active_timers: Traceable<RefCell<HashMap<TimerId, TimerHandle>>>,
next_timer_handle: Traceable<Cell<i32>>,
pub compositor: Untraceable<Box<ScriptListener>>,
pub compositor: Untraceable<Box<ScriptListener+'static>>,
pub browser_context: Traceable<RefCell<Option<BrowserContext>>>,
pub page: Rc<Page>,
performance: Cell<Option<JS<Performance>>>,
@ -444,7 +445,7 @@ impl<'a> WindowHelpers for JSRef<'a, Window> {
let mut rval = NullValue();
unsafe {
JS_CallFunctionValue(cx, this_value, *data.funval,
0, ptr::mut_null(), &mut rval);
0, ptr::null_mut(), &mut rval);
}
});
@ -473,10 +474,11 @@ impl<'a> PrivateWindowHelpers for JSRef<'a, Window> {
};
spawn_named(spawn_name, proc() {
let mut tm = tm;
let duration = Duration::milliseconds(timeout as i64);
let timeout_port = if is_interval {
tm.periodic(timeout)
tm.periodic(duration)
} else {
tm.oneshot(timeout)
tm.oneshot(duration)
};
let cancel_port = cancel_port;
@ -519,7 +521,7 @@ impl Window {
page: Rc<Page>,
script_chan: ScriptChan,
control_chan: ScriptControlChan,
compositor: Box<ScriptListener>,
compositor: Box<ScriptListener+'static>,
image_cache_task: ImageCacheTask)
-> Temporary<Window> {
let win = box Window {

View file

@ -89,7 +89,7 @@ impl Worker {
assert!(JS_ReadStructuredClone(
global.root_ref().get_cx(), data as *const u64, nbytes,
JS_STRUCTURED_CLONE_VERSION, &mut message,
ptr::null(), ptr::mut_null()) != 0);
ptr::null(), ptr::null_mut()) != 0);
}
let target: JSRef<EventTarget> = EventTargetCast::from_ref(*worker);
@ -131,11 +131,11 @@ impl Worker {
impl<'a> WorkerMethods for JSRef<'a, Worker> {
fn PostMessage(self, cx: *mut JSContext, message: JSVal) {
let mut data = ptr::mut_null();
let mut data = ptr::null_mut();
let mut nbytes = 0;
unsafe {
assert!(JS_WriteStructuredClone(cx, message, &mut data, &mut nbytes,
ptr::null(), ptr::mut_null()) != 0);
ptr::null(), ptr::null_mut()) != 0);
}
self.addref();

View file

@ -28,8 +28,8 @@ use encoding::all::UTF_8;
use encoding::label::encoding_from_whatwg_label;
use encoding::types::{DecodeReplace, Encoding, EncodingRef, EncodeReplace};
use ResponseHeaderCollection = http::headers::response::HeaderCollection;
use RequestHeaderCollection = http::headers::request::HeaderCollection;
use http::headers::response::HeaderCollection as ResponseHeaderCollection;
use http::headers::request::HeaderCollection as RequestHeaderCollection;
use http::headers::content_type::MediaType;
use http::headers::{HeaderEnum, HeaderValueByteIterator};
use http::headers::request::Header;
@ -56,6 +56,8 @@ use std::io::{BufReader, MemWriter, Timer};
use std::from_str::FromStr;
use std::path::BytesContainer;
use std::task::TaskBuilder;
use std::time::duration::Duration;
use std::num::Zero;
use time;
use url::{Url, UrlParser};
@ -538,7 +540,7 @@ impl<'a> XMLHttpRequestMethods for JSRef<'a, XMLHttpRequest> {
referer_url.serialize_host().map(|ref h| buf.push_str(h.as_slice()));
referer_url.port().as_ref().map(|&p| {
buf.push_str(":".as_slice());
buf.push_str(p);
buf.push_str(format!("{:u}", p).as_slice());
});
referer_url.serialize_path().map(|ref h| buf.push_str(h.as_slice()));
self.request_headers.deref().borrow_mut().referer = Some(buf);
@ -888,7 +890,8 @@ impl<'a> PrivateXMLHttpRequestHelpers for JSRef<'a, XMLHttpRequest> {
fn set_timeout(self, timeout: u32) {
// Sets up the object to timeout in a given number of milliseconds
// This will cancel all previous timeouts
let oneshot = self.timer.deref().borrow_mut().oneshot(timeout as u64);
let oneshot = self.timer.deref().borrow_mut()
.oneshot(Duration::milliseconds(timeout as i64));
let addr = unsafe {
self.to_trusted() // This will increment the pin counter by one
};
@ -923,7 +926,7 @@ impl<'a> PrivateXMLHttpRequestHelpers for JSRef<'a, XMLHttpRequest> {
self.release_once();
}
// oneshot() closes the previous channel, canceling the timeout
self.timer.deref().borrow_mut().oneshot(0);
self.timer.deref().borrow_mut().oneshot(Zero::zero());
}
fn text_response(self) -> DOMString {
let mut encoding = UTF_8 as EncodingRef;

View file

@ -33,12 +33,12 @@ extern crate time;
extern crate canvas;
extern crate script_traits;
#[phase(plugin)]
extern crate servo_macros = "macros";
extern crate servo_net = "net";
extern crate servo_util = "util";
extern crate "macros" as servo_macros;
extern crate "net" as servo_net;
extern crate "util" as servo_util;
extern crate style;
extern crate sync;
extern crate servo_msg = "msg";
extern crate "msg" as servo_msg;
extern crate url;
extern crate uuid;

View file

@ -56,7 +56,7 @@ pub struct Page {
pub layout_chan: Untraceable<LayoutChan>,
/// A handle to perform RPC calls into the layout, quickly.
layout_rpc: Untraceable<Box<LayoutRPC>>,
layout_rpc: Untraceable<Box<LayoutRPC+'static>>,
/// The port that we will use to join layout. If this is `None`, then layout is not running.
pub layout_join_port: Untraceable<RefCell<Option<Receiver<()>>>>,
@ -170,7 +170,7 @@ impl Page {
if damaged {
let frame = self.frame();
let window = frame.get_ref().window.root();
self.reflow(goal, window.control_chan.clone(), *window.compositor);
self.reflow(goal, window.control_chan.clone(), &**window.compositor);
} else {
self.avoided_reflows.set(self.avoided_reflows.get() + 1);
}
@ -182,7 +182,7 @@ impl Page {
// doing a query reflow.
self.flush_layout(ReflowForDisplay);
self.join_layout(); //FIXME: is this necessary, or is layout_rpc's mutex good enough?
let layout_rpc: &LayoutRPC = *self.layout_rpc;
let layout_rpc: &LayoutRPC = &**self.layout_rpc;
layout_rpc
}

View file

@ -163,7 +163,7 @@ pub struct ScriptTask {
/// For communicating load url messages to the constellation
constellation_chan: ConstellationChan,
/// A handle to the compositor for communicating ready state messages.
compositor: Box<ScriptListener>,
compositor: Box<ScriptListener+'static>,
/// For providing instructions to an optional devtools server.
devtools_chan: Option<DevtoolsControlChan>,
@ -243,7 +243,7 @@ impl ScriptTaskFactory for ScriptTask {
box pair.sender() as Box<Any+Send>
}
fn create<C:ScriptListener + Send>(
fn create<C:ScriptListener + Send + 'static>(
_phantom: Option<&mut ScriptTask>,
id: PipelineId,
compositor: Box<C>,
@ -284,7 +284,7 @@ impl ScriptTaskFactory for ScriptTask {
impl ScriptTask {
/// Creates a new script task.
pub fn new(id: PipelineId,
compositor: Box<ScriptListener>,
compositor: Box<ScriptListener+'static>,
layout_chan: LayoutChan,
port: Receiver<ScriptMsg>,
chan: ScriptChan,
@ -638,7 +638,7 @@ impl ScriptTask {
if page.pending_reflows.get() > 0 {
page.pending_reflows.set(0);
page.damage(MatchSelectorsDocumentDamage);
page.reflow(ReflowForDisplay, self.control_chan.clone(), self.compositor);
page.reflow(ReflowForDisplay, self.control_chan.clone(), &*self.compositor);
}
}
@ -718,7 +718,7 @@ impl ScriptTask {
*page.mut_url() = Some((loaded.clone(), false));
if needs_reflow {
page.damage(ContentChangedDocumentDamage);
page.reflow(ReflowForDisplay, self.control_chan.clone(), self.compositor);
page.reflow(ReflowForDisplay, self.control_chan.clone(), &*self.compositor);
}
return;
},
@ -879,7 +879,7 @@ impl ScriptTask {
let frame = page.frame();
if frame.is_some() {
page.damage(ReflowDocumentDamage);
page.reflow(ReflowForDisplay, self.control_chan.clone(), self.compositor)
page.reflow(ReflowForDisplay, self.control_chan.clone(), &*self.compositor)
}
let mut fragment_node = page.fragment_node.get();
@ -919,7 +919,7 @@ impl ScriptTask {
page.pending_reflows.set(page.pending_reflows.get() + 1);
} else {
page.damage(MatchSelectorsDocumentDamage);
page.reflow(ReflowForDisplay, self.control_chan.clone(), self.compositor)
page.reflow(ReflowForDisplay, self.control_chan.clone(), &*self.compositor)
}
}
}
@ -1018,7 +1018,7 @@ impl ScriptTask {
if target_compare {
if mouse_over_targets.is_some() {
page.damage(MatchSelectorsDocumentDamage);
page.reflow(ReflowForDisplay, self.control_chan.clone(), self.compositor);
page.reflow(ReflowForDisplay, self.control_chan.clone(), &*self.compositor);
}
*mouse_over_targets = Some(target_list);
}

View file

@ -9,10 +9,9 @@
extern crate devtools_traits;
extern crate geom;
extern crate servo_msg = "msg";
extern crate servo_net = "net";
extern crate "msg" as servo_msg;
extern crate "net" as servo_net;
extern crate url;
extern crate std;
extern crate serialize;
// This module contains traits in script used generically

View file

@ -24,8 +24,8 @@ extern crate cssparser;
extern crate encoding;
#[phase(plugin)]
extern crate servo_macros = "macros";
extern crate servo_util = "util";
extern crate "macros" as servo_macros;
extern crate "util" as servo_util;
// Public API

View file

@ -71,11 +71,11 @@ pub fn parse_comma_separated<T>(iter: ParserIter,
parse_one: |ParserIter| -> Result<T, ()>)
-> Result<Vec<T>, ()> {
let mut values = vec![try!(parse_one(iter))];
for component_value in iter {
match component_value {
&Comma => values.push(try!(parse_one(iter))),
_ => return Err(())
loop {
match iter.next() {
Some(&Comma) => values.push(try!(parse_one(iter))),
Some(_) => return Err(()),
None => return Ok(values),
}
}
Ok(values)
}

View file

@ -17,7 +17,7 @@ pub mod specified {
use cssparser::ast;
use cssparser::ast::*;
use super::{Au, CSSFloat};
pub use CSSColor = cssparser::Color;
pub use cssparser::Color as CSSColor;
#[deriving(Clone)]
pub enum Length {
@ -204,11 +204,10 @@ pub mod specified {
}
pub mod computed {
pub use CSSColor = cssparser::Color;
pub use compute_CSSColor = super::super::longhands::computed_as_specified;
pub use cssparser::Color as CSSColor;
pub use super::super::longhands::computed_as_specified as compute_CSSColor;
use super::*;
use super::super::longhands;
pub use servo_util::geometry::Au;
pub struct Context {
pub inherited_font_weight: longhands::font_weight::computed_value::T,

View file

@ -189,13 +189,13 @@ pub mod longhands {
values="${values}"
experimental="${experimental}">
// The computed value is the same as the specified value.
pub use to_computed_value = super::computed_as_specified;
pub use super::computed_as_specified as to_computed_value;
</%self:single_keyword_computed>
</%def>
<%def name="predefined_type(name, type, initial_value, parse_method='parse')">
<%self:single_component_value name="${name}">
pub use to_computed_value = super::super::common_types::computed::compute_${type};
pub use super::super::common_types::computed::compute_${type} as to_computed_value;
pub type SpecifiedValue = specified::${type};
pub mod computed_value {
pub type T = super::super::computed::${type};
@ -425,12 +425,7 @@ pub mod longhands {
</%self:single_component_value>
<%self:longhand name="-servo-minimum-line-height" derived_from="line-height">
use super::Au;
use super::super::common_types::DEFAULT_LINE_HEIGHT;
use super::super::longhands::display;
use super::super::longhands::line_height;
pub use to_computed_value = super::computed_as_specified;
pub use super::computed_as_specified as to_computed_value;
pub type SpecifiedValue = line_height::SpecifiedValue;
@ -534,7 +529,7 @@ pub mod longhands {
${switch_to_style_struct("Box")}
<%self:longhand name="content">
pub use to_computed_value = super::computed_as_specified;
pub use super::computed_as_specified as to_computed_value;
pub mod computed_value {
#[deriving(PartialEq, Clone)]
pub enum Content {
@ -585,7 +580,7 @@ pub mod longhands {
<%self:single_component_value name="background-image">
// The computed value is the same as the specified value.
pub use to_computed_value = super::computed_as_specified;
pub use super::computed_as_specified as to_computed_value;
pub mod computed_value {
pub use url::Url;
pub type T = Option<Url>;
@ -609,8 +604,6 @@ pub mod longhands {
</%self:single_component_value>
<%self:longhand name="background-position">
use super::super::common_types::specified;
pub mod computed_value {
use super::super::super::common_types::computed::LengthOrPercentage;
@ -723,7 +716,7 @@ pub mod longhands {
${new_style_struct("Color", is_inherited=True)}
<%self:raw_longhand name="color">
pub use to_computed_value = super::computed_as_specified;
pub use super::computed_as_specified as to_computed_value;
pub type SpecifiedValue = RGBA;
pub mod computed_value {
pub type T = super::SpecifiedValue;
@ -746,7 +739,7 @@ pub mod longhands {
${new_style_struct("Font", is_inherited=True)}
<%self:longhand name="font-family">
pub use to_computed_value = super::computed_as_specified;
pub use super::computed_as_specified as to_computed_value;
pub mod computed_value {
#[deriving(PartialEq, Clone)]
pub enum FontFamily {
@ -790,16 +783,17 @@ pub mod longhands {
}
_ => return Err(())
};
for component_value in iter {
match component_value {
&Ident(ref value) => {
loop {
match iter.next() {
Some(&Ident(ref value)) => {
idents.push(value.as_slice());
iter.next();
},
_ => {
}
Some(component_value) => {
iter.push_back(component_value);
break
}
None => break,
}
}
Ok(FamilyName(idents.connect(" ")))
@ -947,7 +941,7 @@ pub mod longhands {
${new_style_struct("Text", is_inherited=False)}
<%self:longhand name="text-decoration">
pub use to_computed_value = super::computed_as_specified;
pub use super::computed_as_specified as to_computed_value;
#[deriving(PartialEq, Clone)]
pub struct SpecifiedValue {
pub underline: bool,
@ -999,10 +993,7 @@ pub mod longhands {
<%self:longhand name="-servo-text-decorations-in-effect"
derived_from="display text-decoration">
use super::RGBA;
use super::super::longhands::display;
pub use to_computed_value = super::computed_as_specified;
pub use super::computed_as_specified as to_computed_value;
#[deriving(Clone, PartialEq)]
pub struct SpecifiedValue {
@ -1857,7 +1848,7 @@ fn initial_writing_mode_is_empty() {
trait ArcExperimental<T> {
fn make_unique_experimental<'a>(&'a mut self) -> &'a mut T;
}
impl<T: Send + Share + Clone> ArcExperimental<T> for Arc<T> {
impl<T: Send + Sync + Clone> ArcExperimental<T> for Arc<T> {
#[inline]
#[allow(experimental)]
fn make_unique_experimental<'a>(&'a mut self) -> &'a mut T {
@ -2209,10 +2200,10 @@ pub fn cascade_anonymous(parent_style: &ComputedValues) -> ComputedValues {
// Only re-export the types for computed values.
pub mod computed_values {
% for property in LONGHANDS:
pub use ${property.ident} = super::longhands::${property.ident}::computed_value;
pub use super::longhands::${property.ident}::computed_value as ${property.ident};
% endfor
// Don't use a side-specific name needlessly:
pub use border_style = super::longhands::border_top_style::computed_value;
pub use super::longhands::border_top_style::computed_value as border_style;
pub use cssparser::RGBA;
pub use super::common_types::computed::{

View file

@ -18,7 +18,6 @@ path = "../../support/rust-task_info"
[dependencies.string_cache]
git = "https://github.com/servo/string-cache"
branch = "pre-rustup"
[dependencies.url]
git = "https://github.com/servo/rust-url"
git = "https://github.com/servo/rust-url"

View file

@ -25,7 +25,7 @@ extern crate serialize;
extern crate sync;
#[cfg(target_os="macos")]
extern crate task_info;
extern crate std_time = "time";
extern crate "time" as std_time;
extern crate string_cache;
extern crate url;

View file

@ -11,7 +11,8 @@ use std::io::File;
use std::mem::size_of;
#[cfg(target_os="linux")]
use std::os::page_size;
use std::ptr::mut_null;
use std::ptr::null_mut;
use std::time::duration::Duration;
use task::spawn_named;
#[cfg(target_os="macos")]
use task_info::task_basic_info::{virtual_size,resident_size};
@ -41,7 +42,7 @@ impl MemoryProfiler {
let (chan, port) = channel();
match period {
Some(period) => {
let period = (period * 1000f64) as u64;
let period = Duration::milliseconds((period * 1000f64) as i64);
let chan = chan.clone();
spawn_named("Memory profiler timer", proc() {
loop {
@ -154,7 +155,7 @@ fn get_jemalloc_stat(name: &'static str) -> Option<u64> {
let mut oldlen = size_of::<size_t>() as size_t;
let rv: c_int;
unsafe {
rv = je_mallctl(c_name.unwrap(), oldp, &mut oldlen, mut_null(), 0);
rv = je_mallctl(c_name.unwrap(), oldp, &mut oldlen, null_mut(), 0);
}
if rv == 0 { Some(old as u64) } else { None }
}

View file

@ -5,7 +5,7 @@
//! Small vectors in various sizes. These store a certain number of elements inline and fall back
//! to the heap for larger allocations.
use i = std::mem::init;
use std::mem::init as i;
use std::cmp;
use std::intrinsics;
use std::kinds::marker::ContravariantLifetime;
@ -57,7 +57,7 @@ trait SmallVecPrivate<T> {
unsafe fn set_ptr(&mut self, new_ptr: *mut T);
}
pub trait SmallVec<T> : SmallVecPrivate<T> {
pub trait SmallVec<T> : SmallVecPrivate<T> where T: 'static {
fn inline_size(&self) -> uint;
fn len(&self) -> uint;
fn cap(&self) -> uint;
@ -300,7 +300,7 @@ pub struct SmallVecMoveIterator<'a,T> {
lifetime: ContravariantLifetime<'a>,
}
impl<'a,T> Iterator<T> for SmallVecMoveIterator<'a,T> {
impl<'a, T: 'static> Iterator<T> for SmallVecMoveIterator<'a,T> {
#[inline]
fn next(&mut self) -> Option<T> {
unsafe {
@ -317,7 +317,7 @@ impl<'a,T> Iterator<T> for SmallVecMoveIterator<'a,T> {
}
#[unsafe_destructor]
impl<'a,T> Drop for SmallVecMoveIterator<'a,T> {
impl<'a, T: 'static> Drop for SmallVecMoveIterator<'a,T> {
fn drop(&mut self) {
// Destroy the remaining elements.
for _ in *self {}
@ -350,7 +350,7 @@ macro_rules! def_small_vector(
data: [T, ..$size],
}
impl<T> SmallVecPrivate<T> for $name<T> {
impl<T: 'static> SmallVecPrivate<T> for $name<T> {
unsafe fn set_len(&mut self, new_len: uint) {
self.len = new_len
}
@ -376,7 +376,7 @@ macro_rules! def_small_vector(
}
}
impl<T> SmallVec<T> for $name<T> {
impl<T: 'static> SmallVec<T> for $name<T> {
fn inline_size(&self) -> uint {
$size
}
@ -388,7 +388,7 @@ macro_rules! def_small_vector(
}
}
impl<T> VecLike<T> for $name<T> {
impl<T: 'static> VecLike<T> for $name<T> {
#[inline]
fn vec_len(&self) -> uint {
self.len()
@ -405,7 +405,7 @@ macro_rules! def_small_vector(
}
}
impl<T> $name<T> {
impl<T: 'static> $name<T> {
#[inline]
pub fn new() -> $name<T> {
unsafe {
@ -432,7 +432,7 @@ def_small_vector!(SmallVec32, 32)
macro_rules! def_small_vector_drop_impl(
($name:ident, $size:expr) => (
#[unsafe_destructor]
impl<T> Drop for $name<T> {
impl<T: 'static> Drop for $name<T> {
fn drop(&mut self) {
if !self.spilled() {
return
@ -467,7 +467,7 @@ def_small_vector_drop_impl!(SmallVec32, 32)
macro_rules! def_small_vector_clone_impl(
($name:ident) => (
impl<T:Clone> Clone for $name<T> {
impl<T:Clone+'static> Clone for $name<T> {
fn clone(&self) -> $name<T> {
let mut new_vector = $name::new();
for element in self.iter() {

View file

@ -10,6 +10,7 @@ use std::comm::{Sender, channel, Receiver};
use std::f64;
use std::iter::AdditiveIterator;
use std::io::timer::sleep;
use std::time::duration::Duration;
use task::{spawn_named};
use url::Url;
@ -127,7 +128,7 @@ impl TimeProfiler {
let (chan, port) = channel();
match period {
Some(period) => {
let period = (period * 1000f64) as u64;
let period = Duration::milliseconds((period * 1000f64) as i64);
let chan = chan.clone();
spawn_named("Time profiler timer", proc() {
loop {

View file

@ -156,13 +156,13 @@ impl<QueueData: Send, WorkData: Send> WorkerThread<QueueData, WorkData> {
}
/// A handle to the work queue that individual work units have.
pub struct WorkerProxy<'a, QueueData, WorkData> {
pub struct WorkerProxy<'a, QueueData: 'a, WorkData: 'a> {
worker: &'a mut Worker<WorkUnit<QueueData, WorkData>>,
ref_count: *mut AtomicUint,
queue_data: *const QueueData,
}
impl<'a, QueueData, WorkData: Send> WorkerProxy<'a, QueueData, WorkData> {
impl<'a, QueueData: 'static, WorkData: Send> WorkerProxy<'a, QueueData, WorkData> {
/// Enqueues a block into the work queue.
#[inline]
pub fn push(&mut self, work_unit: WorkUnit<QueueData, WorkData>) {

View file

@ -12,7 +12,7 @@ extern crate log;
extern crate rustuv;
extern crate servo_macros = "macros";
extern crate "macros" as servo_macros;
extern crate servo;
extern crate azure;
@ -28,9 +28,9 @@ extern crate opengles;
extern crate png;
extern crate script;
extern crate servo_net = "net";
extern crate servo_msg = "msg";
extern crate servo_util = "util";
extern crate "net" as servo_net;
extern crate "msg" as servo_msg;
extern crate "util" as servo_util;
extern crate style;
extern crate sharegl;
extern crate stb_image;
@ -38,7 +38,7 @@ extern crate stb_image;
extern crate green;
extern crate native;
extern crate libc;
extern crate std_url = "url";
extern crate "url" as std_url;
#[cfg(target_os="macos")]
extern crate core_graphics;

View file

@ -1 +1 @@
9de20198aedb3c3419ee503755e04bcc198d3a94/rust-0.12.0-pre
4d2af38611cdeeb804659b5e0695ad2c251db51a/rust-0.12.0-pre

View file

@ -17,10 +17,10 @@ extern crate debug;
extern crate compositing;
extern crate devtools;
extern crate rustuv;
extern crate servo_net = "net";
extern crate servo_msg = "msg";
extern crate "net" as servo_net;
extern crate "msg" as servo_msg;
#[phase(plugin, link)]
extern crate servo_util = "util";
extern crate "util" as servo_util;
extern crate script;
extern crate layout;
extern crate green;
@ -132,11 +132,11 @@ pub fn run(opts: opts::Opts) {
// Send the URL command to the constellation.
let cwd = os::getcwd();
for &url in opts.urls.iter() {
for url in opts.urls.iter() {
let url = match url::Url::parse(url.as_slice()) {
Ok(url) => url,
Err(url::RelativeUrlWithoutBase)
=> url::Url::from_file_path(&cwd.join(url)).unwrap(),
=> url::Url::from_file_path(&cwd.join(url.as_slice())).unwrap(),
Err(_) => fail!("URL parsing failed"),
};

View file

@ -9,7 +9,7 @@
extern crate servo;
extern crate native;
extern crate servo_util = "util";
extern crate "util" as servo_util;
#[cfg(not(test),not(target_os="android"))]
use servo_util::opts;

@ -1 +1 @@
Subproject commit a646f0badaccaebd61d0f8aaec5646da0a7c2a14
Subproject commit 955dbe919870b0536f79123232d87c0efe3c552e

View file

@ -9,7 +9,6 @@
#![deny(unused_imports, unused_variable)]
extern crate std;
extern crate getopts;
extern crate regex;
extern crate test;
@ -30,7 +29,7 @@ struct Config {
fn main() {
let args = os::args();
let config = parse_config(args.move_iter().collect());
let config = parse_config(args.into_iter().collect());
let opts = test_options(config.clone());
let tests = find_tests(config);
match run_tests_console(&opts, tests) {
@ -111,7 +110,7 @@ fn run_test(file: String) {
};
let mut output = Vec::new();
loop {
let byte = prc.stdout.get_mut_ref().read_byte();
let byte = prc.stdout.as_mut().unwrap().read_byte();
match byte {
Ok(byte) => {
print!("{}", byte as char);

View file

@ -10,7 +10,6 @@
#![deny(unused_imports, unused_variable)]
extern crate png;
extern crate std;
extern crate test;
extern crate regex;
extern crate url;
@ -19,6 +18,7 @@ use std::ascii::StrAsciiExt;
use std::io;
use std::io::{File, Reader, Command};
use std::io::process::ExitStatus;
use std::io::fs::PathExtensions;
use std::os;
use std::path::Path;
use test::{AutoColor, DynTestName, DynTestFn, TestDesc, TestOpts, TestDescAndFn};