Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
1b34c7a
Rewrite UIATextAttributeQuickNavIterator to allow previous heading qu…
michaelDCurran May 23, 2016
f0abdef
Re-implement rich text support for Edge, compatible with RS1.
michaelDCurran Jul 16, 2016
04fb955
Add missing import
michaelDCurran Jul 18, 2016
cf6b01d
EdgeTextInfo: ensure getTextWithFields never returns controlFields fo…
michaelDCurran Jul 23, 2016
5721dad
Edge: report landmarks
michaelDCurran Jul 25, 2016
2f0b581
EdgeTextInfo.getTextWithFields: chop redundant fields and text off th…
michaelDCurran Jul 25, 2016
9e94f47
Edge now correctly sets focus on its root container and or document, …
michaelDCurran Jul 25, 2016
72df067
Edge: fall back to name, value or description for embedded controls w…
michaelDCurran Jul 26, 2016
0b8dddc
UIATextInfo: implement support for more formatting (color, alignment,…
michaelDCurran Jul 26, 2016
d686581
Edge: Ensure previous heading quicknav does not skip over same-level …
michaelDCurran Jul 26, 2016
4f949c1
UIATextInfo._getControlFieldForObject: ensure controlFields stay uniq…
michaelDCurran Jul 27, 2016
eb984c7
Edge: Remove any whitespace directly after the end of an element as i…
michaelDCurran Jul 27, 2016
e5c1d27
Edge: _getTextWithFields_balanced and _getTextWithFields_unbalanced d…
michaelDCurran Jul 27, 2016
b7b8731
Edge: focusing a selectable list item (E.g. an auto suggestion) shoul…
michaelDCurran Jul 27, 2016
32bc550
Edge: Ensure a control's name is announced, (but not twice) with mov…
michaelDCurran Jul 28, 2016
2ac85de
UIA NVDAObject: Make use of UIA fullDescription in the description pr…
michaelDCurran Jul 28, 2016
0c8b95e
UIA NVDAObject's description property: only use fullDescription if it…
michaelDCurran Jul 28, 2016
9fe00d4
Edge: use localizedLandmarkType instead of localizedControlType when …
michaelDCurran Jul 28, 2016
a902070
Edge: expose the clickable state on text, groupings, sections and gra…
michaelDCurran Jul 28, 2016
14fb00f
Edge: _getTextWithFields_balanced: specifically handle detection of a…
michaelDCurran Jul 28, 2016
7039ab7
Edge: make use of some existing base code when walking formatted text.
michaelDCurran Jul 28, 2016
4e00155
Edge: integrate the main code from _getTextWithFields_balanced in to …
michaelDCurran Jul 28, 2016
9ecc0ec
Edge heading quicknav: re-implement using move by paragraph and getAt…
michaelDCurran Jul 29, 2016
1b30b65
speech.getFormatFieldSpeech: If the user has chosen to report heading…
michaelDCurran Jul 29, 2016
efe112f
Edge browseMode: allow aria-label / aria-labelledby to override conte…
michaelDCurran Jul 29, 2016
b98d4e7
Edge: detect iframes and give them an appropriate role.
michaelDCurran Jul 29, 2016
ad80630
Edge: work around MS Edge bug where expanding to character on an a co…
michaelDCurran Jul 29, 2016
924bf33
Edge browseMode: report number of items in lists such as in other bro…
michaelDCurran Jul 29, 2016
f871c63
Edge browseMode: rough implementation of quicknav/listing landmarks.
michaelDCurran Jul 29, 2016
b778343
Edge: provide _startOfNode and _endOfNode attributes on controlFields…
michaelDCurran Jul 30, 2016
f7a29a3
EdgeTextInfo: override move and expand to skip over element start pos…
michaelDCurran Jul 31, 2016
4c1e1d3
Edge: expose overridden content always via value, with a single space…
michaelDCurran Jul 31, 2016
ce57ef8
Edge: only expose heading levels in initial formatFields. Braille: su…
michaelDCurran Jul 31, 2016
4c76ce4
EdgeTextInfo.expand: don't try fixing up expanding of line and paragr…
michaelDCurran Aug 2, 2016
addb9f9
UIATextInfo: move spelling detection into getFormatfieldAtRange.
michaelDCurran Aug 10, 2016
ef752fb
UIATextInfo: abstract a lot of Edge code, replacing the old UIATextIn…
michaelDCurran Aug 15, 2016
aa22a01
Abstract more Edge code into the base UIA support, including a base U…
michaelDCurran Aug 15, 2016
ba471bb
UIA: don't raise an exception on mixed text attribute values if there…
michaelDCurran Aug 15, 2016
b6eebea
UIA: Initial support for Win10 Mail browseMode (UIA MS Word support).…
michaelDCurran Aug 16, 2016
ac83d7d
Edge: don't expose clickables if they are descendants of clickables.
michaelDCurran Aug 16, 2016
854c072
Add an appModule for Win10 Mail (hxmail) and provide browseMode autom…
michaelDCurran Aug 16, 2016
f1b1bff
Add missing imports
michaelDCurran Aug 16, 2016
d789aab
EdgeTextInfo.expand: only do special expanding for embedded children …
michaelDCurran Aug 16, 2016
8f88584
UIABrowseMode: don't use ReviewCursorManager as Mail does not need it…
michaelDCurran Aug 18, 2016
dd90809
Report position in a document when pressing tab or shift+tab.
michaelDCurran Aug 18, 2016
16b1097
UIAUtils: add more doc strings.
michaelDCurran Aug 31, 2016
e51cc5c
Win10 Mail: stop reporting 'edit' for each line of documents.
michaelDCurran Sep 5, 2016
30721d1
Improve performance of navigating in Edge browse Mode by about 20%.
michaelDCurran Sep 7, 2016
35754e6
Remove the need for overriding focusableNVDAObjectAtStart on the Edg…
michaelDCurran Sep 9, 2016
149c44a
UIATextInfo._getTextWithFieldsForUIARange: remove redundant check.
michaelDCurran Sep 9, 2016
d99d455
Review actions for #6271
michaelDCurran Sep 9, 2016
adcef1c
Edge: Report editable combo boxes as editable and allow them to be fo…
michaelDCurran Sep 12, 2016
b64d85a
Untested idea as to how to handle content overriding in controlFields.
jcsteh Sep 15, 2016
87a4c4e
Edge: Where content is replaced via aria-label etc, ensure that conte…
michaelDCurran Sep 21, 2016
1c4d6de
Braille: no longer support alwaysReportValue as it is not needed.
michaelDCurran Sep 21, 2016
cdcb25f
Address comments in #6271
michaelDCurran Sep 23, 2016
94fbd8e
EdgeTextInfo.expand: remove code that tries to exclude content from t…
michaelDCurran Sep 26, 2016
92f27b1
Edge NVDAObject: catch a case where a text range could be NULL.
michaelDCurran Sep 26, 2016
6afc061
UIATextInfo._getTextWithFieldsForUIARange: handle where IUIAutomation…
michaelDCurran Sep 29, 2016
49779ee
NVDAObjects.UIA: allow module load where UIA is unavailable (E.g. XP).
michaelDCurran Sep 30, 2016
4982945
Handle broken WPF UIA text pattern (E.g. 1Password):
michaelDCurran Oct 18, 2016
2b50f3a
Address review actions for #6271
michaelDCurran Oct 19, 2016
2316b08
Ignore COMError in IE 11 on Windows 7 during UIA text fetching.
michaelDCurran Nov 2, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Edge: _getTextWithFields_balanced and _getTextWithFields_unbalanced d…
…on't need to collect information about their root element at all. In deed, _getTextWithFields_unbalanced shuold *not* recurse after its root element. Stops an infinit loop when dealing with aria-hidden text.
  • Loading branch information
michaelDCurran committed Aug 16, 2016
commit e5c1d27b2df93adceea919766b2bd614cd96dea1
73 changes: 28 additions & 45 deletions source/NVDAObjects/UIA/edge.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,29 +114,24 @@ def _getTextWithFields_balanced(self,rootElement,textRange,formatConfig,includeR
log.debug("parentElement: %s"%parentElement.currentLocalizedControlType)
isRoot=UIAHandler.handler.clientObject.compareElements(parentElement,rootElement)
log.debug("isRoot: %s"%isRoot)
if not includeRoot and isRoot:
log.debug("root not requested. Breaking")
break
try:
obj=UIA(UIAElement=parentElement)
field=self._getControlFieldForObject(obj)
except LookupError:
log.debug("Failed to fetch controlField data for parent. Falling back to rootElement")
parents=[]
isRoot=True
try:
obj=UIA(UIAElement=rootElement.buildUpdatedCache(UIAHandler.handler.baseCacheRequest))
field=self._getControlFieldForObject(obj)
except LookupError:
log.debug("Failed to fetch controlField data on rootElement. Breaking")
break
parents.append((parentElement,field,isRoot))
log.debug("Failed to fetch controlField data for parent. Breaking")
break
parents.append((parentElement,field))
if isRoot:
break
log.debug("Fetching next parentElement")
parentElement=UIAHandler.handler.baseTreeWalker.getParentElementBuildCache(parentElement,UIAHandler.handler.baseCacheRequest)
log.debug("Done generating parents")
log.debug("Yielding parent controlStarts")
for parentElement,field,isRoot in reversed(parents):
if includeRoot or not isRoot:
yield textInfos.FieldCommand("controlStart",field)
for parentElement,field in reversed(parents):
yield textInfos.FieldCommand("controlStart",field)
log.debug("Done yielding parent controlStarts")
# Move through the text range, collecting text and recursing into children
tempRange=textRange.clone()
Expand Down Expand Up @@ -198,9 +193,8 @@ def _getTextWithFields_balanced(self,rootElement,textRange,formatConfig,includeR
yield field
log.debug("Done yielding final text")
log.debug("Yielding controlEnds for parents")
for parentElement,field,isRoot in parents:
if includeRoot or not isRoot:
yield textInfos.FieldCommand("controlEnd",field)
for parentElement,field in parents:
yield textInfos.FieldCommand("controlEnd",field)
log.debug("Done yielding controlEnds for parents")
log.debug("_getTextWithFields_balanced end")

Expand Down Expand Up @@ -232,31 +226,25 @@ def _getTextWithFields_unbalanced(self,rootElement,textRange,formatConfig,includ
log.debug("parentElement: %s"%parentElement.currentLocalizedControlType)
isRoot=UIAHandler.handler.clientObject.compareElements(parentElement,rootElement)
log.debug("isRoot: %s"%isRoot)
if not includeRoot and isRoot:
log.debug("root not requested. Breaking")
break
try:
obj=UIA(UIAElement=parentElement)
field=self._getControlFieldForObject(obj)
except LookupError:
log.debug("Failed to fetch controlField data for parentElement. Falling back to rootElement")
parents=[]
isRoot=True
try:
obj=UIA(UIAElement=rootElement.buildUpdatedCache(UIAHandler.handler.baseCacheRequest))
field=self._getControlFieldForObject(obj)
except LookupError:
log.debug("Failed to fetch controlField data on rootElement. Breaking")
break
parents.append((parentElement,field,isRoot))
log.debug("Failed to fetch controlField data for parentElement. Breaking")
break
parents.append((parentElement,field))
if isRoot:
break
log.debug("Fetching next parentElement")
parentElement=UIAHandler.handler.baseTreeWalker.getParentElementBuildCache(parentElement,UIAHandler.handler.baseCacheRequest)
log.debug("Done generating parents")
log.debug("Yielding parents in reverse order")
for parentElement,field,isRoot in reversed(parents):
if includeRoot or not isRoot:
yield textInfos.FieldCommand("controlStart",field)
for parentElement,field in reversed(parents):
yield textInfos.FieldCommand("controlStart",field)
log.debug("Done yielding parents")
enclosingRange=self.obj.UIATextPattern.rangeFromChild(enclosingElement)
startRange.MoveEndpointByRange(UIAHandler.TextPatternRangeEndpoint_End,enclosingRange,UIAHandler.TextPatternRangeEndpoint_End)
if startRange.CompareEndpoints(UIAHandler.TextPatternRangeEndpoint_End,textRange,UIAHandler.TextPatternRangeEndpoint_End)>0:
startRange.MoveEndpointByRange(UIAHandler.TextPatternRangeEndpoint_End,textRange,UIAHandler.TextPatternRangeEndpoint_End)
Expand All @@ -266,7 +254,7 @@ def _getTextWithFields_unbalanced(self,rootElement,textRange,formatConfig,includ
log.debug("Done yielding balanced fields for startRange")
tempRange=startRange.clone()
log.debug("Walking parents to yield controlEnds and recurse unbalanced endRanges")
for parentElement,field,isRoot in parents:
for parentElement,field in parents:
if log.isEnabledFor(log.DEBUG):
log.debug("parentElement: %s"%parentElement.currentLocalizedControlType)
if parentElement is not enclosingElement:
Expand All @@ -275,24 +263,19 @@ def _getTextWithFields_unbalanced(self,rootElement,textRange,formatConfig,includ
try:
parentRange=self.obj.UIATextPattern.rangeFromChild(parentElement)
except COMError:
log.debug("Error fetching parent range")
parentRange=None
if parentRange:
tempRange.MoveEndpointByRange(UIAHandler.TextPatternRangeEndpoint_End,parentRange,UIAHandler.TextPatternRangeEndpoint_End)
else:
log.debug("NULL parentRange")
if isRoot:
log.debug("falling back to textRange as parent is root")
if tempRange.CompareEndpoints(UIAHandler.TextPatternRangeEndpoint_End,textRange,UIAHandler.TextPatternRangeEndpoint_End)>0:
tempRange.MoveEndpointByRange(UIAHandler.TextPatternRangeEndpoint_End,textRange,UIAHandler.TextPatternRangeEndpoint_End)
if tempRange.CompareEndpoints(UIAHandler.TextPatternRangeEndpoint_End,textRange,UIAHandler.TextPatternRangeEndpoint_End)>0:
tempRange.MoveEndpointByRange(UIAHandler.TextPatternRangeEndpoint_End,textRange,UIAHandler.TextPatternRangeEndpoint_End)
if tempRange.CompareEndpoints(UIAHandler.TextPatternRangeEndpoint_End,tempRange,UIAHandler.TextPatternRangeEndpoint_Start)>0:
log.debug("Recursing endRange")
for endField in self._getTextWithFields_unbalanced(parentElement,tempRange,formatConfig,includeRoot=False):
yield endField
log.debug("Done recursing endRange")
if includeRoot or not isRoot:
"Yielding controlEnd for parent"
yield textInfos.FieldCommand("controlEnd",field)
if tempRange.CompareEndpoints(UIAHandler.TextPatternRangeEndpoint_End,tempRange,UIAHandler.TextPatternRangeEndpoint_Start)>0:
log.debug("Recursing endRange")
for endField in self._getTextWithFields_unbalanced(parentElement,tempRange,formatConfig,includeRoot=False):
yield endField
log.debug("Done recursing endRange")
log.debug("Yielding controlEnd for parent")
yield textInfos.FieldCommand("controlEnd",field)
log.debug("Done walking parents to yield controlEnds and recurse unbalanced endRanges")
log.debug("_getTextWithFields_unbalanced end")

Expand Down