DescriptionMerge 129448 - Document::adoptNode for multiple fields time input UI should not crash
https://bugs.webkit.org/show_bug.cgi?id=97428
Reviewed by Dimitri Glazkov.
Source/WebCore:
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.
Test:
- 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.
* dom/Document.cpp:
(WebCore::Document::removeFocusedNodeOfSubtree): Changed to check
focused node in shadow DOM tree in addition to descendant node.
LayoutTests:
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.
TBR=yosin@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=129463
Patch Set 1 #
Messages
Total messages: 1 (0 generated)
|