mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Auto merge of #25633 - pshaughn:localnames, r=jdm
Remove unnecessary LocalName::from(constant) calls Changing calls to LocalName::from with a constant argument to use the interned local name instead doesn't really save a meaningful amount of time (when it's not in a loop or on a critical path), but it's good for codebase consistency.
This commit is contained in:
commit
b3ac17b82f
2 changed files with 3 additions and 3 deletions
|
@ -1293,7 +1293,7 @@ impl HTMLImageElement {
|
|||
.filter_map(DomRoot::downcast::<HTMLMapElement>)
|
||||
.find(|n| {
|
||||
n.upcast::<Element>()
|
||||
.get_string_attribute(&LocalName::from("name")) ==
|
||||
.get_string_attribute(&local_name!("name")) ==
|
||||
last
|
||||
});
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ impl TokenSink for PrefetchSink {
|
|||
self.origin.clone(),
|
||||
self.pipeline_id,
|
||||
self.get_cors_settings(tag, local_name!("crossorigin")),
|
||||
self.get_referrer_policy(tag, LocalName::from("referrerpolicy")),
|
||||
self.get_referrer_policy(tag, local_name!("referrerpolicy")),
|
||||
FromPictureOrSrcSet::No,
|
||||
);
|
||||
let _ = self
|
||||
|
@ -145,7 +145,7 @@ impl TokenSink for PrefetchSink {
|
|||
let cors_setting =
|
||||
self.get_cors_settings(tag, local_name!("crossorigin"));
|
||||
let referrer_policy =
|
||||
self.get_referrer_policy(tag, LocalName::from("referrerpolicy"));
|
||||
self.get_referrer_policy(tag, local_name!("referrerpolicy"));
|
||||
let integrity_metadata = self
|
||||
.get_attr(tag, local_name!("integrity"))
|
||||
.map(|attr| String::from(&attr.value))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue