mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 10:37:17 +02:00
LibWeb: Add initial implementation of foreign content parsing
Plus sneak in a FIXME for the list of active formatting elements and a test for Element.namespaceURI
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 01:48:41 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/4e8cb4558b1 Pull-request: https://github.com/SerenityOS/serenity/pull/3748
@@ -132,6 +132,20 @@ public:
|
||||
return {};
|
||||
}
|
||||
|
||||
bool has_attribute(const FlyString& attribute_name)
|
||||
{
|
||||
return !attribute(attribute_name).is_null();
|
||||
}
|
||||
|
||||
void adjust_tag_name(const FlyString& old_name, const FlyString& new_name)
|
||||
{
|
||||
ASSERT(is_start_tag() || is_end_tag());
|
||||
if (old_name == m_tag.tag_name.string_view()) {
|
||||
m_tag.tag_name.clear();
|
||||
m_tag.tag_name.append(new_name);
|
||||
}
|
||||
}
|
||||
|
||||
void adjust_attribute_name(const FlyString& old_name, const FlyString& new_name)
|
||||
{
|
||||
ASSERT(is_start_tag() || is_end_tag());
|
||||
|
||||
Reference in New Issue
Block a user