Skip to content

Commit 72456dd

Browse files
Merge f78ca00 into f5e5514
2 parents f5e5514 + f78ca00 commit 72456dd

8 files changed

Lines changed: 7 additions & 40 deletions

File tree

source/NVDAObjects/IAccessible/__init__.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,6 @@ class IA2TextTextInfo(textInfos.offsets.OffsetsTextInfo):
122122

123123
detectFormattingAfterCursorMaybeSlow=False
124124

125-
def scrollIntoView(self):
126-
self.obj.IAccessibleTextObject.scrollSubstringTo(
127-
self._startOffset, self._endOffset,
128-
IA2.IA2_SCROLL_TYPE_TOP_LEFT
129-
)
130-
131125
def _get_encoding(self):
132126
return super().encoding
133127

source/NVDAObjects/UIA/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@
4545

4646
class UIATextInfo(textInfos.TextInfo):
4747

48-
def scrollIntoView(self):
49-
self._rangeObj.scrollIntoView(True)
50-
5148
_cache_controlFieldNVDAObjectClass=True
5249
def _get_controlFieldNVDAObjectClass(self):
5350
"""

source/NVDAObjects/window/winword.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -888,12 +888,6 @@ def _normalizeFormatField(self,field,extraDetail=False):
888888
field['line-prefix']=mapPUAToUnicode.get(bullet,bullet)
889889
return field
890890

891-
def scrollIntoView(self):
892-
try:
893-
self.obj.WinwordWindowObject.ScrollIntoView(self._rangeObj, True)
894-
except COMError:
895-
log.debugWarning("Can't scroll", exc_info=True)
896-
897891
def expand(self,unit):
898892
if unit==textInfos.UNIT_LINE:
899893
try:

source/browseMode.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,6 @@ def _get_focusableNVDAObjectAtStart(self):
12381238
return self.obj.rootNVDAObject
12391239
return item.obj
12401240

1241-
12421241
class BrowseModeDocumentTreeInterceptor(documentBase.DocumentWithTableNavigation,cursorManager.CursorManager,BrowseModeTreeInterceptor,treeInterceptorHandler.DocumentTreeInterceptor):
12431242

12441243
programmaticScrollMayFireEvent = False
@@ -1356,7 +1355,13 @@ def _set_selection(self, info, reason=OutputReason.CARET):
13561355
else:
13571356
self._lastCaretMoveWasFocus = False
13581357
focusObj=info.focusableNVDAObjectAtStart
1359-
info.scrollIntoView()
1358+
obj=info.NVDAObjectAtStart
1359+
if not obj:
1360+
log.debugWarning("Invalid NVDAObjectAtStart")
1361+
return
1362+
if obj==self.rootNVDAObject:
1363+
return
1364+
obj.scrollIntoView()
13601365
if self.programmaticScrollMayFireEvent:
13611366
self._lastProgrammaticScrollTime = time.time()
13621367
if focusObj:

source/textInfos/__init__.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -640,13 +640,6 @@ def getMathMl(self, field):
640640
"""
641641
raise NotImplementedError
642642

643-
def scrollIntoView(self):
644-
"""
645-
Scrolls the window to ensure that this text range is visible.
646-
"""
647-
raise NotImplementedError
648-
649-
650643
RE_EOL = re.compile("\r\n|[\n\r]")
651644
def convertToCrlf(text):
652645
"""Convert a string so that it contains only CRLF line endings.

source/treeInterceptorHandler.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,6 @@ def _get__rangeObj(self):
186186
def _set__rangeObj(self,r):
187187
self.innerTextInfo._rangeObj=r
188188

189-
def scrollIntoView(self):
190-
self.innerTextInfo.scrollIntoView()
191-
192189
def _get_locationText(self):
193190
return self.innerTextInfo.locationText
194191

source/virtualBuffers/__init__.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -394,18 +394,6 @@ def getMathMl(self, field):
394394
obj = self.obj.getNVDAObjectFromIdentifier(docHandle, nodeId)
395395
return obj.mathMl
396396

397-
def scrollIntoView(self):
398-
# Scroll the deepest object at this point into view.
399-
obj = self.NVDAObjectAtStart
400-
if not obj:
401-
log.debugWarning("Invalid NVDAObjectAtStart")
402-
return
403-
if obj == self.obj.rootNVDAObject:
404-
# However never scroll to the document itself
405-
return
406-
obj.scrollIntoView()
407-
408-
409397
class VirtualBuffer(browseMode.BrowseModeDocumentTreeInterceptor):
410398

411399
TextInfo=VirtualBufferTextInfo

user_docs/en/changes.t2t

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ If you need this functionality please assign a gesture to the appropriate script
4040
-
4141
- If a disabled addon is uninstalled and then re-installed it is re-enabled. (#12792)
4242
- Fixed bugs around updating and removing addons where the addon folder has been renamed or has files opened. (#12792, #12629)
43-
- Reading / navigating with browse mode in Microsoft Word via UI automation now ensures the document is always scrolled so that current browse mode position is visible, and that the caret position in focus mode correctly reflects the browse mode position. (#9611)
4443
-
4544

4645

0 commit comments

Comments
 (0)