mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-01 00:38:48 +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:
parent
172d5f6987
commit
2e96ba11e4
Notes:
github-actions[bot]
2025-01-05 21:12:56 +00:00
Author: https://github.com/AtkinsSJ
Commit: 2e96ba11e4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3150
Reviewed-by: https://github.com/tcl3 ✅
4 changed files with 26 additions and 18 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue