Don't pass nullable strings to native DOM methods that want non-nullable strings. Fixes #1207.

This commit is contained in:
Ms2ger 2013-11-10 14:11:15 +01:00
parent 803cd4b7cf
commit 08afc6d19d
75 changed files with 968 additions and 966 deletions

View file

@ -22,32 +22,32 @@ impl Navigator {
reflect_dom_object(@mut Navigator::new_inherited(), window, NavigatorBinding::Wrap)
}
pub fn DoNotTrack(&self) -> Option<DOMString> {
Some(~"unspecified")
pub fn DoNotTrack(&self) -> DOMString {
~"unspecified"
}
pub fn Vendor(&self) -> Option<DOMString> {
Some(~"") // Like Gecko
pub fn Vendor(&self) -> DOMString {
~"" // Like Gecko
}
pub fn VendorSub(&self) -> Option<DOMString> {
Some(~"") // Like Gecko
pub fn VendorSub(&self) -> DOMString {
~"" // Like Gecko
}
pub fn Product(&self) -> Option<DOMString> {
Some(~"Gecko") // This is supposed to be constant, see webidl.
pub fn Product(&self) -> DOMString {
~"Gecko"
}
pub fn ProductSub(&self) -> Option<DOMString> {
None
pub fn ProductSub(&self) -> DOMString {
~""
}
pub fn CookieEnabled(&self) -> bool {
false
}
pub fn GetBuildID(&self) -> Fallible<Option<DOMString>> {
Ok(None)
pub fn GetBuildID(&self) -> Fallible<DOMString> {
Ok(~"")
}
pub fn JavaEnabled(&self) -> Fallible<bool> {
@ -58,24 +58,24 @@ impl Navigator {
false
}
pub fn AppName(&self) -> Option<DOMString> {
Some(~"Netscape") // Like Gecko/Webkit
pub fn AppName(&self) -> DOMString {
~"Netscape" // Like Gecko/Webkit
}
pub fn GetAppCodeName(&self) -> Fallible<Option<DOMString>> {
Ok(Some(~"Mozilla")) // Like Gecko/Webkit
pub fn GetAppCodeName(&self) -> Fallible<DOMString> {
Ok(~"Mozilla") // Like Gecko/Webkit
}
pub fn GetAppVersion(&self) -> Fallible<Option<DOMString>> {
Ok(None)
pub fn GetAppVersion(&self) -> Fallible<DOMString> {
Ok(~"")
}
pub fn GetPlatform(&self) -> Fallible<Option<DOMString>> {
Ok(None)
pub fn GetPlatform(&self) -> Fallible<DOMString> {
Ok(~"")
}
pub fn GetUserAgent(&self) -> Fallible<Option<DOMString>> {
Ok(None)
pub fn GetUserAgent(&self) -> Fallible<DOMString> {
Ok(~"")
}
pub fn GetLanguage(&self) -> Option<DOMString> {