mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Ensures that iframe navigation updates the parent iframe element subpage id.
This fixes the case of clicking a link in an iframe, going back, then clicking the link again.
This commit is contained in:
parent
5ce7d8accf
commit
06a79243a7
4 changed files with 40 additions and 0 deletions
|
@ -73,6 +73,7 @@ pub trait HTMLIFrameElementHelpers {
|
|||
fn generate_new_subpage_id(self) -> (SubpageId, Option<SubpageId>);
|
||||
fn navigate_child_browsing_context(self, url: Url);
|
||||
fn dispatch_mozbrowser_event(self, event_name: String, event_detail: Option<String>);
|
||||
fn update_subpage_id(self, new_subpage_id: SubpageId);
|
||||
}
|
||||
|
||||
impl<'a> HTMLIFrameElementHelpers for JSRef<'a, HTMLIFrameElement> {
|
||||
|
@ -156,6 +157,10 @@ impl<'a> HTMLIFrameElementHelpers for JSRef<'a, HTMLIFrameElement> {
|
|||
event.fire(target);
|
||||
}
|
||||
}
|
||||
|
||||
fn update_subpage_id(self, new_subpage_id: SubpageId) {
|
||||
self.subpage_id.set(Some(new_subpage_id));
|
||||
}
|
||||
}
|
||||
|
||||
impl HTMLIFrameElement {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue