Merge 129448 - Document::adoptNode for multiple fields time input UI should not crash
Reviewed by Dimitri Glazkov.
This patch changes Document::removeFocusedNodeOfSubtree() to check
focused node in shadow DOM tree for avoiding Document::m_focusedNode
not to have dangling pointer to field owner in DateTimeFieldElement.
- fast/dom/shadow/shadow-removechild-and-blur-event.html: test for removeChild dispatches blur event.
- fast/forms/time-multiple-fields/time-multiple-fields-crash-after-adoptnode.html: test for adoptNode not to crash.
- fast/forms/time-multiple-fields/time-multiple-fields-state-change-on-focus-or-blur.html: removeChild of input type "time" dispatches blur event, existing test.
(WebCore::Document::removeFocusedNodeOfSubtree): Changed to check
focused node in shadow DOM tree in addition to descendant node.
This patch adds a test for checking removeChild() of shadow host
dispatches blur event if focused node in shadow tree, a test for
checking adoptNode() doesn't causes crash and dispatches blur event
during document.adoptNode() and updates expectation for focus/blur event test.
* fast/dom/shadow/shadow-removechild-and-blur-event-expectation.txt: Added.
* fast/dom/shadow/shadow-removechild-and-blur-event.html: Added for checking removeChild of shadow host dispatchs blur event when focused node in shadow tree.
* fast/forms/time-multiple-fields/time-multiple-fields-crash-after-adoptnode-expected.txt: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-crash-after-adoptnode.html: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-state-change-on-focus-or-blur-expected.txt: Updated to expectation to have output from blur event handler.