Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MozillaCompoundTextInfo: Don't skip ignored objects when determining whether the range covers the end of any ancestors of endObj. #9477

Merged
merged 3 commits into from Apr 12, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -184,3 +184,4 @@ Thomas Stivers
Eurobraille
Bachir Benanou
Arnold Loubriat
Mozilla Corporation
@@ -2,7 +2,7 @@
#A part of NonVisual Desktop Access (NVDA)
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
#Copyright (C) 2015-2017 NV Access Limited
#Copyright (C) 2015-2019 NV Access Limited, Mozilla Corporation

"""Support for the IAccessible2 rich text model first implemented by Mozilla.
This is now used by other applications as well.
@@ -324,11 +324,12 @@ def _getText(self, withFields, formatConfig=None):
field = controlStack.pop()
if field:
fields.append(textInfos.FieldCommand("controlEnd", None))
if ti.compareEndPoints(self._makeRawTextInfo(obj, textInfos.POSITION_ALL), "endToEnd") == 0:
if ti.compareEndPoints(self._makeRawTextInfo(obj, textInfos.POSITION_ALL), "endToEnd") == 0:
if field:
This conversation was marked as resolved by feerrenrut

This comment has been minimized.

Copy link
@feerrenrut

feerrenrut Apr 11, 2019

Contributor

Is there any case where field might be falsy but we also want to recognise the end of the node? For someone less than familiar with this code, how would we go about checking this?

field["_endOfNode"] = True
else:
# We're not at the end of this object, which also means we're not at the end of any ancestors.
break
else:
# We're not at the end of this object, which also means we're not at the end of any ancestors.
break
ti = self._getEmbedding(obj)
obj = ti.obj

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.