mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 00:37:35 +00:00
LibWeb: Remove ByteString usage in NamedNodeMap
We now have a FlyString version of get_attribute_ns, so this conversion is no longer needed any more.
This commit is contained in:
parent
c63d30ce67
commit
020839ad7a
2 changed files with 1 additions and 6 deletions
|
@ -233,11 +233,7 @@ WebIDL::ExceptionOr<JS::GCPtr<Attr>> NamedNodeMap::set_attribute(Attr& attribute
|
||||||
|
|
||||||
// 2. Let oldAttr be the result of getting an attribute given attr’s namespace, attr’s local name, and element.
|
// 2. Let oldAttr be the result of getting an attribute given attr’s namespace, attr’s local name, and element.
|
||||||
size_t old_attribute_index = 0;
|
size_t old_attribute_index = 0;
|
||||||
ByteString deprecated_namespace_uri;
|
auto* old_attribute = get_attribute_ns(attribute.namespace_uri(), attribute.local_name(), &old_attribute_index);
|
||||||
if (attribute.namespace_uri().has_value())
|
|
||||||
deprecated_namespace_uri = attribute.namespace_uri().value().to_deprecated_fly_string();
|
|
||||||
|
|
||||||
auto* old_attribute = get_attribute_ns(deprecated_namespace_uri, attribute.local_name(), &old_attribute_index);
|
|
||||||
|
|
||||||
// 3. If oldAttr is attr, return attr.
|
// 3. If oldAttr is attr, return attr.
|
||||||
if (old_attribute == &attribute)
|
if (old_attribute == &attribute)
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <AK/ByteString.h>
|
|
||||||
#include <AK/StringView.h>
|
#include <AK/StringView.h>
|
||||||
#include <LibWeb/Bindings/LegacyPlatformObject.h>
|
#include <LibWeb/Bindings/LegacyPlatformObject.h>
|
||||||
#include <LibWeb/Forward.h>
|
#include <LibWeb/Forward.h>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue