mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-07 00:29:47 +00:00
LibWeb: Add a DOM::Element::set_attribute override for UTF-16 strings
This just transcodes to UTF-8 for now, but primarily serves to to keep compatibility with generated IDL definitions.
This commit is contained in:
parent
9d993143de
commit
e7b08cf291
Notes:
github-actions[bot]
2025-07-28 10:26:37 +00:00
Author: https://github.com/trflynn89
Commit: e7b08cf291
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5610
6 changed files with 14 additions and 7 deletions
|
@ -1505,7 +1505,7 @@ void force_the_value(GC::Ref<DOM::Node> node, FlyString const& command, Optional
|
|||
// ownerDocument of node, then set the face attribute of new parent to new value.
|
||||
if (command == CommandNames::fontName) {
|
||||
new_parent = MUST(DOM::create_element(document, HTML::TagNames::font, Namespace::HTML));
|
||||
MUST(new_parent->set_attribute(HTML::AttributeNames::face, new_value.value().to_utf8_but_should_be_ported_to_utf16()));
|
||||
MUST(new_parent->set_attribute(HTML::AttributeNames::face, *new_value));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1515,7 +1515,7 @@ void force_the_value(GC::Ref<DOM::Node> node, FlyString const& command, Optional
|
|||
new_parent = MUST(DOM::create_element(document, HTML::TagNames::a, Namespace::HTML));
|
||||
|
||||
// 2. Set the href attribute of new parent to new value.
|
||||
MUST(new_parent->set_attribute(HTML::AttributeNames::href, new_value.value().to_utf8_but_should_be_ported_to_utf16()));
|
||||
MUST(new_parent->set_attribute(HTML::AttributeNames::href, *new_value));
|
||||
|
||||
// 3. Let ancestor be node's parent.
|
||||
GC::Ptr<DOM::Node> ancestor = node->parent();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue