mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Fix CEF
This commit is contained in:
parent
2a4f9fd8a3
commit
5b866e9e46
8 changed files with 17 additions and 58 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -363,6 +363,10 @@ name = "phf_mac"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
source = "git+https://github.com/sfackler/rust-phf#06254fdde7708630a6397c41c6c17ef81a4b66a0"
|
source = "git+https://github.com/sfackler/rust-phf#06254fdde7708630a6397c41c6c17ef81a4b66a0"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "plugins"
|
||||||
|
version = "0.0.1"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "png"
|
name = "png"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
* `components/net`: Networking, caching, image decoding.
|
* `components/net`: Networking, caching, image decoding.
|
||||||
* `components/msg`: Message structure definitions for inter-task communication.
|
* `components/msg`: Message structure definitions for inter-task communication.
|
||||||
* `components/*_traits`: Trait definitions to break crate dependencies.
|
* `components/*_traits`: Trait definitions to break crate dependencies.
|
||||||
* `components/macros`: Macros used by the rest of Servo.
|
* `components/plugins`: Various compiler plugins and macros used by the rest of Servo.
|
||||||
* `components/util`: Various utility functions used by other Servo components.
|
* `components/util`: Various utility functions used by other Servo components.
|
||||||
|
|
||||||
## Supporting libraries
|
## Supporting libraries
|
||||||
|
|
|
@ -20,8 +20,6 @@ use rustc::plugin::Registry;
|
||||||
|
|
||||||
mod lints;
|
mod lints;
|
||||||
mod macros;
|
mod macros;
|
||||||
#[cfg(test)]
|
|
||||||
mod tests;
|
|
||||||
|
|
||||||
|
|
||||||
#[plugin_registrar]
|
#[plugin_registrar]
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
use syntax::{ast, codemap, visit};
|
use syntax::{ast, codemap, visit};
|
||||||
use syntax::attr::AttrMetaMethods;
|
use syntax::attr::AttrMetaMethods;
|
||||||
use rustc::lint::{Context, LintPass, LintArray};
|
use rustc::lint::{Context, LintPass, LintArray};
|
||||||
|
@ -95,9 +91,9 @@ impl LintPass for UnrootedPass {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn check_fn(&mut self, cx: &Context, kind: &visit::FnKind, decl: &ast::FnDecl,
|
fn check_fn(&mut self, cx: &Context, kind: visit::FnKind, decl: &ast::FnDecl,
|
||||||
block: &ast::Block, _span: codemap::Span, _id: ast::NodeId) {
|
block: &ast::Block, _span: codemap::Span, _id: ast::NodeId) {
|
||||||
match *kind {
|
match kind {
|
||||||
visit::FkItemFn(i, _, _, _) |
|
visit::FkItemFn(i, _, _, _) |
|
||||||
visit::FkMethod(i, _, _) if i.as_str() == "new" || i.as_str() == "new_inherited" => {
|
visit::FkMethod(i, _, _) if i.as_str() == "new" || i.as_str() == "new_inherited" => {
|
||||||
return;
|
return;
|
||||||
|
@ -144,4 +140,4 @@ impl LintPass for UnrootedPass {
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,39 +0,0 @@
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
use std::collections::hashmap::HashMap;
|
|
||||||
|
|
||||||
lazy_init! {
|
|
||||||
static ref NUMBER: uint = times_two(3);
|
|
||||||
static ref VEC: [Box<uint>, ..3] = [box 1, box 2, box 3];
|
|
||||||
static ref OWNED_STRING: String = "hello".to_string();
|
|
||||||
static ref HASHMAP: HashMap<uint, &'static str> = {
|
|
||||||
let mut m = HashMap::new();
|
|
||||||
m.insert(0u, "abc");
|
|
||||||
m.insert(1, "def");
|
|
||||||
m.insert(2, "ghi");
|
|
||||||
m
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
fn times_two(n: uint) -> uint {
|
|
||||||
n * 2
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_basic() {
|
|
||||||
assert_eq!(*OWNED_STRING, "hello".to_string());
|
|
||||||
assert_eq!(*NUMBER, 6);
|
|
||||||
assert!(HASHMAP.find(&1).is_some());
|
|
||||||
assert!(HASHMAP.find(&3).is_none());
|
|
||||||
assert_eq!(VEC.as_slice(), &[box 1, box 2, box 3]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_repeat() {
|
|
||||||
assert_eq!(*NUMBER, 6);
|
|
||||||
assert_eq!(*NUMBER, 6);
|
|
||||||
assert_eq!(*NUMBER, 6);
|
|
||||||
}
|
|
||||||
|
|
12
ports/cef/Cargo.lock
generated
12
ports/cef/Cargo.lock
generated
|
@ -12,7 +12,7 @@ dependencies = [
|
||||||
"glut 0.0.1 (git+https://github.com/servo/rust-glut#01af0162ea0322ad1a40d6adb023a39813605949)",
|
"glut 0.0.1 (git+https://github.com/servo/rust-glut#01af0162ea0322ad1a40d6adb023a39813605949)",
|
||||||
"js 0.1.0 (git+https://github.com/servo/rust-mozjs#41fb0d80a5ed5614ca13a120cdb3281e599d4e04)",
|
"js 0.1.0 (git+https://github.com/servo/rust-mozjs#41fb0d80a5ed5614ca13a120cdb3281e599d4e04)",
|
||||||
"layers 0.1.0 (git+https://github.com/servo/rust-layers#ef89918471815dfced7aaf2f1594d5469f03eab7)",
|
"layers 0.1.0 (git+https://github.com/servo/rust-layers#ef89918471815dfced7aaf2f1594d5469f03eab7)",
|
||||||
"macros 0.0.1",
|
"plugins 0.0.1",
|
||||||
"msg 0.0.1",
|
"msg 0.0.1",
|
||||||
"net 0.0.1",
|
"net 0.0.1",
|
||||||
"opengles 0.1.0 (git+https://github.com/servo/rust-opengles#6776e9c07feb149d34b087039ecf6b2c143e3afc)",
|
"opengles 0.1.0 (git+https://github.com/servo/rust-opengles#6776e9c07feb149d34b087039ecf6b2c143e3afc)",
|
||||||
|
@ -194,7 +194,7 @@ dependencies = [
|
||||||
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
|
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
|
||||||
"harfbuzz 0.1.0 (git+https://github.com/servo/rust-harfbuzz#ad520942cc17232e1a40cdd8a99c2905623d35f6)",
|
"harfbuzz 0.1.0 (git+https://github.com/servo/rust-harfbuzz#ad520942cc17232e1a40cdd8a99c2905623d35f6)",
|
||||||
"layers 0.1.0 (git+https://github.com/servo/rust-layers#ef89918471815dfced7aaf2f1594d5469f03eab7)",
|
"layers 0.1.0 (git+https://github.com/servo/rust-layers#ef89918471815dfced7aaf2f1594d5469f03eab7)",
|
||||||
"macros 0.0.1",
|
"plugins 0.0.1",
|
||||||
"msg 0.0.1",
|
"msg 0.0.1",
|
||||||
"net 0.0.1",
|
"net 0.0.1",
|
||||||
"png 0.1.0 (git+https://github.com/servo/rust-png#74418ffbf20e94b0d3bed4a9d004062a13342c79)",
|
"png 0.1.0 (git+https://github.com/servo/rust-png#74418ffbf20e94b0d3bed4a9d004062a13342c79)",
|
||||||
|
@ -295,7 +295,7 @@ dependencies = [
|
||||||
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
|
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
|
||||||
"gfx 0.0.1",
|
"gfx 0.0.1",
|
||||||
"layout_traits 0.0.1",
|
"layout_traits 0.0.1",
|
||||||
"macros 0.0.1",
|
"plugins 0.0.1",
|
||||||
"net 0.0.1",
|
"net 0.0.1",
|
||||||
"script 0.0.1",
|
"script 0.0.1",
|
||||||
"script_traits 0.0.1",
|
"script_traits 0.0.1",
|
||||||
|
@ -321,7 +321,7 @@ version = "0.1.0"
|
||||||
source = "git+https://github.com/Kimundi/lazy-static.rs#e62a65372f1dd9019e37eb9381d819edff80e360"
|
source = "git+https://github.com/Kimundi/lazy-static.rs#e62a65372f1dd9019e37eb9381d819edff80e360"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "macros"
|
name = "plugins"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -405,7 +405,7 @@ dependencies = [
|
||||||
"http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#4fdedeea8fc77149adf51bb24a37372af21c25b7)",
|
"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)",
|
"hubbub 0.1.0 (git+https://github.com/servo/rust-hubbub#c7f868e688de6e9cbdc26aa09292ed072bc2648b)",
|
||||||
"js 0.1.0 (git+https://github.com/servo/rust-mozjs#41fb0d80a5ed5614ca13a120cdb3281e599d4e04)",
|
"js 0.1.0 (git+https://github.com/servo/rust-mozjs#41fb0d80a5ed5614ca13a120cdb3281e599d4e04)",
|
||||||
"macros 0.0.1",
|
"plugins 0.0.1",
|
||||||
"msg 0.0.1",
|
"msg 0.0.1",
|
||||||
"net 0.0.1",
|
"net 0.0.1",
|
||||||
"script_traits 0.0.1",
|
"script_traits 0.0.1",
|
||||||
|
@ -484,7 +484,7 @@ dependencies = [
|
||||||
"encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#35f0d70f65f73ba16f296f9ec675eddee661ba79)",
|
"encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#35f0d70f65f73ba16f296f9ec675eddee661ba79)",
|
||||||
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
|
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
|
||||||
"lazy_static 0.1.0 (git+https://github.com/Kimundi/lazy-static.rs#e62a65372f1dd9019e37eb9381d819edff80e360)",
|
"lazy_static 0.1.0 (git+https://github.com/Kimundi/lazy-static.rs#e62a65372f1dd9019e37eb9381d819edff80e360)",
|
||||||
"macros 0.0.1",
|
"plugins 0.0.1",
|
||||||
"url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)",
|
"url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)",
|
||||||
"util 0.0.1",
|
"util 0.0.1",
|
||||||
]
|
]
|
||||||
|
|
|
@ -11,8 +11,8 @@ crate-type = ["dylib"]
|
||||||
[dependencies.servo]
|
[dependencies.servo]
|
||||||
path = "../.."
|
path = "../.."
|
||||||
|
|
||||||
[dependencies.macros]
|
[dependencies.plugins]
|
||||||
path = "../../components/macros"
|
path = "../../components/plugins"
|
||||||
|
|
||||||
[dependencies.gfx]
|
[dependencies.gfx]
|
||||||
path = "../../components/gfx"
|
path = "../../components/gfx"
|
||||||
|
|
|
@ -12,7 +12,7 @@ extern crate log;
|
||||||
|
|
||||||
extern crate rustuv;
|
extern crate rustuv;
|
||||||
|
|
||||||
extern crate "macros" as servo_macros;
|
extern crate "plugins" as servo_plugins;
|
||||||
extern crate servo;
|
extern crate servo;
|
||||||
|
|
||||||
extern crate azure;
|
extern crate azure;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue