Bug 1431255 - Part VII, Trap mouse/touch/pointer events in audio/video element for UI Widgets r=smaug
authorTimothy Guan-tin Chien <timdream@gmail.com>
Thu, 12 Jul 2018 12:32:44 +0800
changeset 486757 06335a11cf2ad167ad4118747fd102485a712c4b
parent 486756 0974d8fc7f03d9330658276a2bed4cdf9fdb1ba9
child 486758 b12fb0dc3b49780879096c4d844fe5c9b057d502
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1431255, 1327097
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -4375,17 +4375,18 @@ HTMLMediaElement::GetEventTargetParent(E
       aVisitor.mCanHandle = false;
       return;
 
     // The *move events however are only comsumed when the range input is being
     // dragged.
     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());
         } else if (node->GetParentNode() &&
                    node->GetParentNode()->IsHTMLElement(nsGkAtoms::input)) {
           // The node is a child of <input type="range">
           el = static_cast<HTMLInputElement*>(node->GetParentNode());
         }