First step toward iOS Support

This commit is contained in:
Jonathan Jayet 2017-08-22 16:30:32 +02:00
parent 8ca9542de6
commit 1a447c6984
7 changed files with 22 additions and 15 deletions

View file

@ -24,7 +24,6 @@ serde_json = "1.0"
tinyfiledialogs = "2.5.9"
[dependencies]
angle = {git = "https://github.com/servo/angle", branch = "servo"}
app_units = "0.5"
audio-video-metadata = "0.1.2"
base64 = "0.5.2"
@ -94,3 +93,6 @@ xml5ever = {version = "0.9"}
webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]}
webvr = {path = "../webvr"}
webvr_traits = {path = "../webvr_traits"}
[target.'cfg(not(target_os = "ios"))'.dependencies]
angle = {git = "https://github.com/servo/angle", branch = "servo"}

View file

@ -36,6 +36,11 @@ pub fn Platform() -> DOMString {
DOMString::from("Mac")
}
#[cfg(target_os = "ios")]
pub fn Platform() -> DOMString {
DOMString::from("iOS")
}
pub fn UserAgent() -> DOMString {
DOMString::from(&*opts::get().user_agent)
}