Bug 1596502 - Remove GetBindingParent in WeelHandlingHelper. r=smaug
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 15 Nov 2019 12:32:07 +0000
changeset 502183 f22a913450cb3f5fd722b7864429fb12554a41bd
parent 502182 52a8e787a8642a2c5ad6d8cb8ffee4770f742758
child 502184 f5b772f54a1874b92274e8eab74f929db6346747
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1596502
milestone72.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 1596502 - Remove GetBindingParent in WeelHandlingHelper. r=smaug It was dealing only with NAC anyway. Differential Revision: https://phabricator.services.mozilla.com/D53057
dom/events/WheelHandlingHelper.cpp
--- a/dom/events/WheelHandlingHelper.cpp
+++ b/dom/events/WheelHandlingHelper.cpp
@@ -83,17 +83,19 @@ bool WheelHandlingUtils::CanScrollOn(nsI
 
 /*static*/ Maybe<layers::ScrollDirection>
 WheelHandlingUtils::GetDisregardedWheelScrollDirection(const nsIFrame* aFrame) {
   nsIContent* content = aFrame->GetContent();
   if (!content) {
     return Nothing();
   }
   nsCOMPtr<nsITextControlElement> ctrl = do_QueryInterface(
-      content->IsInAnonymousSubtree() ? content->GetBindingParent() : content);
+      content->IsInNativeAnonymousSubtree()
+          ? content->GetClosestNativeAnonymousSubtreeRootParent()
+          : content);
   if (!ctrl || !ctrl->IsSingleLineTextControl()) {
     return Nothing();
   }
   // Disregard scroll in the block-flow direction by mouse wheel on a
   // single-line text control. For instance, in tranditional Chinese writing
   // system, a single-line text control cannot be scrolled horizontally with
   // mouse wheel even if they overflow at the right and left edges; Whereas in
   // latin-based writing system, a single-line text control cannot be scrolled