aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmliframeelement.rs
diff options
context:
space:
mode:
authorAarya Khandelwal <119049564+Aaryakhandelwal@users.noreply.github.com>2024-03-21 12:44:12 +0530
committerGitHub <noreply@github.com>2024-03-21 07:14:12 +0000
commitda3288dd00c16f6c4ac18cd3b6ba87a2917978d1 (patch)
tree77d90e149f17137649c6331e330dc3445c4510f6 /components/script/dom/htmliframeelement.rs
parent5c0199b5687a5c0c1b2fe82235ca609c7d9ea614 (diff)
downloadservo-da3288dd00c16f6c4ac18cd3b6ba87a2917978d1.tar.gz
servo-da3288dd00c16f6c4ac18cd3b6ba87a2917978d1.zip
Clippy: Fixed clippy warnings in components/script/dom (#31801)
* fixed clippy warnings in htmlformelement.rs * Fixed clippy warnings * Fixed warnings related to matches! * made changes to compile "test-tidy" successfully
Diffstat (limited to 'components/script/dom/htmliframeelement.rs')
-rw-r--r--components/script/dom/htmliframeelement.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs
index 3de9b5ef9c7..3db0b69e30f 100644
--- a/components/script/dom/htmliframeelement.rs
+++ b/components/script/dom/htmliframeelement.rs
@@ -168,7 +168,7 @@ impl HTMLIFrameElement {
_ => {
let mut load_blocker = self.load_blocker.borrow_mut();
*load_blocker = Some(LoadBlocker::new(
- &*document,
+ &document,
LoadType::Subframe(load_data.url.clone()),
));
},
@@ -320,7 +320,7 @@ impl HTMLIFrameElement {
return;
}
}
- ancestor = a.parent().map(|p| DomRoot::from_ref(p));
+ ancestor = a.parent().map(DomRoot::from_ref);
}
let creator_pipeline_id = if url.as_str() == "about:blank" {
@@ -517,13 +517,13 @@ impl HTMLIFrameElementLayoutMethods for LayoutDom<'_, HTMLIFrameElement> {
#[inline]
#[allow(unsafe_code)]
fn pipeline_id(self) -> Option<PipelineId> {
- unsafe { (*self.unsafe_get()).pipeline_id.get() }
+ unsafe { (self.unsafe_get()).pipeline_id.get() }
}
#[inline]
#[allow(unsafe_code)]
fn browsing_context_id(self) -> Option<BrowsingContextId> {
- unsafe { (*self.unsafe_get()).browsing_context_id.get() }
+ unsafe { (self.unsafe_get()).browsing_context_id.get() }
}
fn get_width(self) -> LengthOrPercentageOrAuto {
@@ -578,7 +578,7 @@ impl HTMLIFrameElementMethods for HTMLIFrameElement {
fn GetContentWindow(&self) -> Option<DomRoot<WindowProxy>> {
self.browsing_context_id
.get()
- .and_then(|browsing_context_id| ScriptThread::find_window_proxy(browsing_context_id))
+ .and_then(ScriptThread::find_window_proxy)
}
// https://html.spec.whatwg.org/multipage/#dom-iframe-contentdocument
@@ -642,8 +642,8 @@ impl VirtualMethods for HTMLIFrameElement {
fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation) {
self.super_type().unwrap().attribute_mutated(attr, mutation);
- match attr.local_name() {
- &local_name!("sandbox") => {
+ match *attr.local_name() {
+ local_name!("sandbox") => {
self.sandbox_allowance
.set(mutation.new_value(attr).map(|value| {
let mut modes = SandboxAllowance::ALLOW_NOTHING;
@@ -661,7 +661,7 @@ impl VirtualMethods for HTMLIFrameElement {
modes
}));
},
- &local_name!("srcdoc") => {
+ local_name!("srcdoc") => {
// https://html.spec.whatwg.org/multipage/#the-iframe-element:the-iframe-element-9
// "Whenever an iframe element with a non-null nested browsing context has its
// srcdoc attribute set, changed, or removed, the user agent must process the
@@ -677,7 +677,7 @@ impl VirtualMethods for HTMLIFrameElement {
self.process_the_iframe_attributes(ProcessingMode::NotFirstTime);
}
},
- &local_name!("src") => {
+ local_name!("src") => {
// https://html.spec.whatwg.org/multipage/#the-iframe-element
// "Similarly, whenever an iframe element with a non-null nested browsing context
// but with no srcdoc attribute specified has its src attribute set, changed, or removed,