mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
clippy: Fix warnings in shared
and config
, fonts
, layout
, and layout_2020
components (#32674)
This commit is contained in:
parent
99c1f886b8
commit
4b63043c6a
20 changed files with 72 additions and 78 deletions
|
@ -176,13 +176,11 @@ where
|
|||
if self.type_id() != ScriptLayoutNodeType::Element(LayoutElementType::HTMLObjectElement) {
|
||||
return None;
|
||||
}
|
||||
let Some(element) = self.to_threadsafe().as_element() else {
|
||||
return None;
|
||||
};
|
||||
|
||||
// TODO: This is the what the legacy layout system does, but really if Servo
|
||||
// supports any `<object>` that's an image, it should support those with URLs
|
||||
// and `type` attributes with image mime types.
|
||||
let element = self.to_threadsafe().as_element()?;
|
||||
if element.get_attr(&ns!(), &local_name!("type")).is_some() {
|
||||
return None;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue