mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Implement referrerpolicy attribute on remaining elements (#34736)
Fixes #11861 Signed-off-by: Shane Handley <shanehandley@fastmail.com>
This commit is contained in:
parent
09408ae10b
commit
41f27ae80b
9 changed files with 25 additions and 413 deletions
|
@ -69,8 +69,8 @@ use crate::dom::bindings::str::{DOMString, USVString};
|
|||
use crate::dom::document::{determine_policy_for_token, Document};
|
||||
use crate::dom::element::{
|
||||
cors_setting_for_element, referrer_policy_for_element, reflect_cross_origin_attribute,
|
||||
set_cross_origin_attribute, AttributeMutation, CustomElementCreationMode, Element,
|
||||
ElementCreator, LayoutElementHelpers,
|
||||
reflect_referrer_policy_attribute, set_cross_origin_attribute, AttributeMutation,
|
||||
CustomElementCreationMode, Element, ElementCreator, LayoutElementHelpers,
|
||||
};
|
||||
use crate::dom::event::Event;
|
||||
use crate::dom::eventtarget::EventTarget;
|
||||
|
@ -1691,11 +1691,9 @@ impl HTMLImageElementMethods<crate::DomTypeHolder> for HTMLImageElement {
|
|||
}
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-img-referrerpolicy
|
||||
/// <https://html.spec.whatwg.org/multipage/#dom-img-referrerpolicy>
|
||||
fn ReferrerPolicy(&self) -> DOMString {
|
||||
let element = self.upcast::<Element>();
|
||||
let current_policy_value = element.get_string_attribute(&local_name!("referrerpolicy"));
|
||||
get_correct_referrerpolicy_from_raw_token(¤t_policy_value)
|
||||
reflect_referrer_policy_attribute(self.upcast::<Element>())
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-img-referrerpolicy
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue