diff options
-rw-r--r-- | ports/geckolib/wrapper.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ports/geckolib/wrapper.rs b/ports/geckolib/wrapper.rs index ec913823caf..de1130639f7 100644 --- a/ports/geckolib/wrapper.rs +++ b/ports/geckolib/wrapper.rs @@ -318,6 +318,12 @@ impl<'le> GeckoElement<'le> { } } +lazy_static! { + pub static ref DUMMY_BASE_URL: Url = { + Url::parse("http://www.example.org").unwrap() + }; +} + impl<'le> TElement for GeckoElement<'le> { type ConcreteNode = GeckoNode<'le>; type ConcreteDocument = GeckoDocument<'le>; @@ -334,7 +340,7 @@ impl<'le> TElement for GeckoElement<'le> { // in the nsAttrValue. That will allow us to borrow it from here. let attr = self.get_attr(&ns!(), &atom!("style")); // FIXME(bholley): Real base URL and error reporter. - let base_url = Url::parse("http://www.example.org").unwrap(); + let base_url = &*DUMMY_BASE_URL; // FIXME(heycam): Needs real ParserContextExtraData so that URLs parse // properly. let extra_data = ParserContextExtraData::default(); |