Basically we should not check ShadowRoot type. However, otherwise it will break <input type="range"> Maybe we have to consider what the real solution for this issue.
mouseIsReleasedOnPressedElement() was removed in the patch for bug #145774. I do not understand the need to special case the logic for dispatching a DOM click event to a user-agent shadow DOM. It seems sufficient to use the same logic for deciding when to dispatch a DOM click event for both kinds of shadow DOM tree so long as we take care to dispatch the DOM click event to the appropriate node. Specifically, we should use the same criterion for determining whether to dispatch a DOM click event for non-shadow tree nodes as we do we shadow tree nodes(*) with the only exception that we explicitly dispatch the click event at the shadow host element if the mouse press and mouse release occur within the same shadow tree and not on the same shadow tree element (which would have been handled by (*)).
Mass move bugs into the DOM component.