From 8330eabac191af1d724621a18b85e2c61539612a Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 15 May 2015 15:48:35 -0400 Subject: [PATCH] temp re-set default url for cef while I figure out wtf is going on --- ports/cef/browser.rs | 6 +++--- ports/cef/core.rs | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ports/cef/browser.rs b/ports/cef/browser.rs index 8b2ab3b2b0f..6903c63505d 100644 --- a/ports/cef/browser.rs +++ b/ports/cef/browser.rs @@ -238,9 +238,9 @@ fn browser_host_create(window_info: &cef_window_info_t, if callback_executed { browser_callback_after_created(browser.clone()); } - if url != ptr::null() { - unsafe { browser.downcast().frame.load_url(CefWrap::to_rust(url)); } - } + //if url != ptr::null() { + //unsafe { browser.downcast().frame.load_url(CefWrap::to_rust(url)); } + //} BROWSERS.with(|browsers| { browsers.borrow_mut().push(browser.clone()); }); diff --git a/ports/cef/core.rs b/ports/cef/core.rs index 04218bd9ae9..a06df477eb9 100644 --- a/ports/cef/core.rs +++ b/ports/cef/core.rs @@ -12,10 +12,11 @@ use util::opts; use std::ffi; use std::str; use browser; +use std_url::Url; const MAX_RENDERING_THREADS: usize = 128; -//static HOME_URL: &'static str = "http://s27.postimg.org/vqbtrolyr/servo.jpg"; +static HOME_URL: &'static str = "http://s27.postimg.org/vqbtrolyr/servo.jpg"; static CEF_API_HASH_UNIVERSAL: &'static [u8] = b"8efd129f4afc344bd04b2feb7f73a149b6c4e27f\0"; #[cfg(target_os="windows")] @@ -66,6 +67,7 @@ pub extern "C" fn cef_initialize(args: *const cef_main_args_t, temp_opts.hard_fail = false; temp_opts.enable_text_antialiasing = true; temp_opts.resources_path = None; + temp_opts.url = Url::parse(HOME_URL).unwrap(); opts::set(temp_opts); init_window();