Skip to content

Commit dcff483

Browse files
kemzebtrflynn89
authored andcommitted
LibWeb/HTML: Use MimeType::is_xml() in HTMLObjectElement for DRYness
Now that we implement this member function, let's use it to keep things DRY.
1 parent fd157b9 commit dcff483

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,7 @@ static bool is_xml_mime_type(StringView resource_type)
229229
if (!mime_type.has_value())
230230
return false;
231231

232-
// An XML MIME type is any MIME type whose subtype ends in "+xml" or whose essence is "text/xml" or "application/xml". [RFC7303]
233-
if (mime_type->subtype().ends_with_bytes("+xml"sv))
234-
return true;
235-
236-
return mime_type->essence().is_one_of("text/xml"sv, "application/xml"sv);
232+
return mime_type->is_xml();
237233
}
238234

239235
// https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-object-element:plugin-11

0 commit comments

Comments
 (0)