Bug 1597742 a11y: Make ScrollSubstringToPoint always scroll, not only when invisible r=Jamie
authorColomban Wendling <cwendling@hypra.fr>
Fri, 17 Jan 2020 02:10:31 +0000
changeset 510552 ba6cb6765a5da24754042e3ecb0647789bf9cba7
parent 510551 10e77b5ea01a0aa8f26d9fdf081c7e75a98ff763
child 510553 617fab0beb6ac70bcffb08e8eef37c55ffb5efda
push id37025
push useropoprus@mozilla.com
push dateFri, 17 Jan 2020 09:44:53 +0000
treeherdermozilla-central@cb06fe24fb3e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersJamie
bugs1597742
milestone74.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 1597742 a11y: Make ScrollSubstringToPoint always scroll, not only when invisible r=Jamie Differential Revision: https://phabricator.services.mozilla.com/D60164
accessible/generic/HyperTextAccessible.cpp
--- a/accessible/generic/HyperTextAccessible.cpp
+++ b/accessible/generic/HyperTextAccessible.cpp
@@ -1666,17 +1666,18 @@ void HyperTextAccessible::ScrollSubstrin
         // avoid divide by zero
         size.width = size.width ? size.width : 1;
         size.height = size.height ? size.height : 1;
 
         int16_t hPercent = offsetPointX * 100 / size.width;
         int16_t vPercent = offsetPointY * 100 / size.height;
 
         nsresult rv = nsCoreUtils::ScrollSubstringTo(
-            frame, range, ScrollAxis(vPercent), ScrollAxis(hPercent));
+            frame, range, ScrollAxis(vPercent, WhenToScroll::Always),
+            ScrollAxis(hPercent, WhenToScroll::Always));
         if (NS_FAILED(rv)) return;
 
         initialScrolled = true;
       } else {
         // Substring was scrolled to the given point already inside its closest
         // scrollable area. If there are nested scrollable areas then make
         // sure we scroll lower areas to the given point inside currently
         // traversed scrollable area.