mirror of
https://github.com/servo/servo.git
synced 2025-08-18 03:45:33 +01:00
add navigation state data to LoadComplete messages, finish cef load state cbs
This commit is contained in:
parent
3481c752cd
commit
0d46a3b89a
10 changed files with 27 additions and 16 deletions
|
@ -331,13 +331,20 @@ impl WindowMethods for Window {
|
|||
}
|
||||
}
|
||||
|
||||
fn load_end(&self) {
|
||||
fn load_end(&self, back: bool, forward: bool) {
|
||||
// FIXME(pcwalton): The status code 200 is a lie.
|
||||
let browser = self.cef_browser.borrow();
|
||||
let browser = match *browser {
|
||||
None => return,
|
||||
Some(ref browser) => browser,
|
||||
};
|
||||
if check_ptr_exist!(browser.get_host().get_client(), get_load_handler) &&
|
||||
check_ptr_exist!(browser.get_host().get_client().get_load_handler(), on_loading_state_change) {
|
||||
browser.get_host()
|
||||
.get_client()
|
||||
.get_load_handler()
|
||||
.on_loading_state_change((*browser).clone(), 0i32, back as i32, forward as i32);
|
||||
}
|
||||
if check_ptr_exist!(browser.get_host().get_client(), get_load_handler) &&
|
||||
check_ptr_exist!(browser.get_host().get_client().get_load_handler(), on_load_end) {
|
||||
browser.get_host()
|
||||
|
|
|
@ -508,7 +508,7 @@ impl WindowMethods for Window {
|
|||
fn load_start(&self, _: bool, _: bool) {
|
||||
}
|
||||
|
||||
fn load_end(&self) {
|
||||
fn load_end(&self, _: bool, _: bool) {
|
||||
}
|
||||
|
||||
/// Has no effect on Android.
|
||||
|
|
|
@ -805,7 +805,7 @@ impl WindowMethods for Window {
|
|||
fn load_start(&self, _: bool, _: bool) {
|
||||
}
|
||||
|
||||
fn load_end(&self) {
|
||||
fn load_end(&self, _: bool, _: bool) {
|
||||
}
|
||||
|
||||
fn hidpi_factor(&self) -> ScaleFactor<ScreenPx, DevicePixel, f32> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue