mirror of
https://github.com/servo/servo.git
synced 2025-07-24 07:40:27 +01:00
Make Document::url return the page's URL to avoid stale URLs after redirects.
This commit is contained in:
parent
19fbb9e568
commit
ae2b74c783
4 changed files with 8 additions and 7 deletions
|
@ -170,7 +170,7 @@ pub trait DocumentHelpers<'a> {
|
|||
fn window(self) -> Temporary<Window>;
|
||||
fn encoding_name(self) -> Ref<'a, DOMString>;
|
||||
fn is_html_document(self) -> bool;
|
||||
fn url(self) -> &'a Url;
|
||||
fn url(self) -> Url;
|
||||
fn quirks_mode(self) -> QuirksMode;
|
||||
fn set_quirks_mode(self, mode: QuirksMode);
|
||||
fn set_last_modified(self, value: DOMString);
|
||||
|
@ -206,8 +206,9 @@ impl<'a> DocumentHelpers<'a> for JSRef<'a, Document> {
|
|||
self.is_html_document
|
||||
}
|
||||
|
||||
fn url(self) -> &'a Url {
|
||||
&self.extended_deref().url
|
||||
fn url(self) -> Url {
|
||||
let window = self.window().root();
|
||||
window.page().get_url()
|
||||
}
|
||||
|
||||
fn quirks_mode(self) -> QuirksMode {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue