mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02: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
Notes:
github-actions[bot]
2025-01-05 21:12:56 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/2e96ba11e43 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3150 Reviewed-by: https://github.com/tcl3 ✅
@@ -1660,9 +1660,11 @@ void HTMLInputElement::apply_presentational_hints(GC::Ref<CSS::CascadedPropertie
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/input.html#the-input-element%3Aconcept-node-clone-ext
|
||||
WebIDL::ExceptionOr<void> HTMLInputElement::cloned(DOM::Node& copy, bool)
|
||||
WebIDL::ExceptionOr<void> HTMLInputElement::cloned(DOM::Node& copy, bool subtree)
|
||||
{
|
||||
// The cloning steps for input elements must propagate the value, dirty value flag, checkedness, and dirty checkedness flag from the node being cloned to the copy.
|
||||
TRY(Base::cloned(copy, subtree));
|
||||
|
||||
// The cloning steps for input elements given node, copy, and subtree are to propagate the value, dirty value flag, checkedness, and dirty checkedness flag from node to copy.
|
||||
auto& input_clone = verify_cast<HTMLInputElement>(copy);
|
||||
input_clone.m_value = m_value;
|
||||
input_clone.m_dirty_value = m_dirty_value;
|
||||
|
||||
Reference in New Issue
Block a user