Bug 1431255 - Part VII, Trap mouse/touch/pointer events in audio/video element for UI Widgets r=smaug

This is akin to what's done in bug 1327097.

MozReview-Commit-ID: EERkjrxWZOu
This commit is contained in:
Timothy Guan-tin Chien
2018-07-12 12:32:44 +08:00
parent c5391de2f3
commit f1861cda63

View File

@@ -4380,7 +4380,8 @@ HTMLMediaElement::GetEventTargetParent(EventChainPreVisitor& aVisitor)
case ePointerMove:
case eMouseMove:
node = do_QueryInterface(aVisitor.mEvent->mOriginalTarget);
if (node->IsInNativeAnonymousSubtree()) {
if (node->IsInNativeAnonymousSubtree() ||
node->IsInUAWidget()) {
if (node->IsHTMLElement(nsGkAtoms::input)) {
// The node is a <input type="range">
el = static_cast<HTMLInputElement*>(node.get());