mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 17:28:30 +00:00
LibWeb/HTML: Update cloning steps to current spec algorithms
Reflects the changes in https://github.com/whatwg/html/pull/10859 I've also added missing calls to the Base::cloned() method, and modified a couple of spec links to point to the multipage version. I took the liberty to fix a spec typo, and submitted a PR for it: https://github.com/whatwg/html/pull/10892
This commit is contained in:
committed by
Tim Ledbetter
parent
172d5f6987
commit
2e96ba11e4
@@ -136,9 +136,11 @@ void HTMLTextAreaElement::clear_algorithm()
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/forms.html#the-textarea-element:concept-node-clone-ext
|
||||
WebIDL::ExceptionOr<void> HTMLTextAreaElement::cloned(DOM::Node& copy, bool)
|
||||
WebIDL::ExceptionOr<void> HTMLTextAreaElement::cloned(DOM::Node& copy, bool subtree)
|
||||
{
|
||||
// The cloning steps for textarea elements must propagate the raw value and dirty value flag from the node being cloned to the copy.
|
||||
TRY(Base::cloned(copy, subtree));
|
||||
|
||||
// The cloning steps for textarea elements given node, copy, and subtree are to propagate the raw value and dirty value flag from node to copy.
|
||||
auto& textarea_copy = verify_cast<HTMLTextAreaElement>(copy);
|
||||
textarea_copy.m_raw_value = m_raw_value;
|
||||
textarea_copy.m_dirty_value = m_dirty_value;
|
||||
|
||||
Reference in New Issue
Block a user