Source/core/page/EventHandler.cpp
// Refetch the event target node if it is removed or currently is the shadow node inside an <input> element.
// If a mouse event handler changes the input element type to one that has a widget associated,
// we'd like to EventHandler::handleMousePressEvent to pass the event to the widget and thus the
// event target node can't still be the shadow node.
Refetch the event target node if it is removed or currently is the shadow node inside an  element.
If a mouse event handler changes the input element type to one that has a widget associated,
we'd like to EventHandler::handleMousePressEvent to pass the event to the widget and thus the
event target node can't still be the shadow node.
Refetch the event target node if it is removed or currently is the shadow node inside an element . If a mouse event handler changes the input element type to one that has a widget associated we ' d like to EventHandler :: handleMousePressEvent to pass the event to the widget and thus the event target node can ' t still be the shadow node .
static inline bool shouldRefetchEventTarget(const MouseEventWithHitTestResults& mev)
{
    Node* targetNode = mev.targetNode();
    if (!targetNode || !targetNode->parentNode())
        return true;
    return targetNode->isShadowRoot() && isHTMLInputElement(*toShadowRoot(targetNode)->host());
}
static inline bool shouldRefetchEventTarget ( const MouseEventWithHitTestResults & mev ) { Node * targetNode = mev . targetNode ( ) ; if ( ! targetNode || ! targetNode -> parentNode ( ) ) return true ; return targetNode -> isShadowRoot ( ) && isHTMLInputElement ( * toShadowRoot ( targetNode ) -> host ( ) ) ; }
Refetch the event target node if it is removed or currently is the shadow node inside an <input> element.
Refetch the event target node if it is removed or currently is the shadow node inside an <input > element .