[orca] Remove unused support for AtspiComponent's scrollToPoint



commit fe6f7c894ed1a954efa7a687ea7bb0d32dd8dbab
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Jul 2 11:57:58 2019 -0400

    Remove unused support for AtspiComponent's scrollToPoint
    
    This support was added along with the rest of the component-based
    scrolling API, but we're not using it. And at the present time, I
    don't see that changing. We do have a need for, and are currently
    using, the ability to scroll an object into view and to a particular
    location (e.g. top edge). But I cannot see a reason why a screen
    reader would need to scroll a particular object to a particular
    point. Furthermore, with the new AtspiText's scrollSubstringTo,
    we can ensure that a given substring is scrolled into view and even
    scrolled to a particular location. We'll rely upon that instead of
    AtspiComponent's scrollToPoint.

 src/orca/eventsynthesizer.py | 30 ------------------------------
 1 file changed, 30 deletions(-)
---
diff --git a/src/orca/eventsynthesizer.py b/src/orca/eventsynthesizer.py
index 8e4896aa0..31f92e226 100644
--- a/src/orca/eventsynthesizer.py
+++ b/src/orca/eventsynthesizer.py
@@ -170,36 +170,6 @@ def releaseAtPoint(x, y, button=1):
 
     return _generateMouseEvent(x, y, "b%dr" % button)
 
-def scrollToPoint(obj, x, y, startOffset=None, endOffset=None):
-    """Attemps to scroll obj to the specified point."""
-
-    if not _canScrollTo:
-        msg = "INFO: Installed version of AT-SPI2 doesn't support scrolling."
-        debug.println(debug.LEVEL_INFO, msg, True)
-        return
-
-    try:
-        component = obj.queryComponent()
-    except:
-        msg = "ERROR: Exception querying component of %s" % obj
-        debug.println(debug.LEVEL_INFO, msg, True)
-        return
-
-    before = component.getExtents(pyatspi.WINDOW_COORDS)
-    try:
-        component.scrollToPoint(pyatspi.WINDOW_COORDS, x, y)
-    except:
-        msg = "ERROR: Exception scrolling %s to %i,%i." % (obj, x, y)
-        debug.println(debug.LEVEL_INFO, msg, True)
-    else:
-        msg = "INFO: Attemped to scroll %s to %i,%i" % (obj, x, y)
-        debug.println(debug.LEVEL_INFO, msg, True)
-
-    after = component.getExtents(pyatspi.WINDOW_COORDS)
-    msg = "EVENT SYNTHESIZER: Before scroll: %i,%i. After scroll: %i,%i." % \
-          (before[0], before[1], after[0], after[1])
-    debug.println(debug.LEVEL_INFO, msg, True)
-
 def _scrollSubstringToLocation(obj, location, startOffset, endOffset):
     """Attemps to scroll the given substring to the specified location."""
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]