The overhead of fetching a spell checked attributed string via AX API is substantial. In some cases on the order of 7/8 of the total time spent fetching the string. Overhead for style is much smaller, but still a substantial portion of total time spent fetching an attributed string. I propose: 1. Introducing two new attributes - AXSimpleAttributedStringForTextMarkerRange - includes neither style nor spell checking AXMisspelledAttributedStringForTextMarkerRange - includes both style and spell checking 2. Modifying the existing property AXAttributedStringForTextMarkerRange to not include spell checking, but retain style attributes. (AXAttributedStringForRange will be unchanged.) Spell checking is only relevant in editable nodes. Assistive technology clients can detect if they or their ancestors are editable and choose the appropriate attribute. Style is often not output via speech or braille and in those cases is wasted overhead. Again assistive technology can make contextual decisions to ask for the correct attribute. Other approaches considered: Leaving AXAttributedStringForTextMarkerRange unchanged and introducing AXAttributedStringForTextMarkerRangeWithOptions allowing spell checking, style and future attributes to be toggled on and off. The overhead of boxing and unboxing these parameters outweighed the cost savings of skipping any individual attribute except spelling in most cases.
<rdar://problem/27791714>
Created attachment 285753 [details] Patch
Comment on attachment 285753 [details] Patch Attachment 285753 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/1847779 New failing tests: accessibility/mac/attributed-string/attributed-string-for-range-not-misspelled .html accessibility/mac/attributed-string/attributed-string-for-range.html accessibility/mac/attributed-string/misspelled-attributed-string-for-range.html accessibility/mac/bounds-for-range.html accessibility/mac/attributed-string/simple-attributed-string-for-range.html
Created attachment 285758 [details] Archive of layout-test-results from ews101 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-yosemite Platform: Mac OS X 10.10.5
Comment on attachment 285753 [details] Patch Attachment 285753 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/1847789 New failing tests: accessibility/mac/bounds-for-range.html
Created attachment 285759 [details] Archive of layout-test-results from ews107 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Comment on attachment 285753 [details] Patch Attachment 285753 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/1847798 New failing tests: accessibility/mac/attributed-string/attributed-string-for-range-not-misspelled .html accessibility/mac/attributed-string/attributed-string-for-range.html accessibility/mac/attributed-string/misspelled-attributed-string-for-range.html accessibility/mac/bounds-for-range.html accessibility/mac/attributed-string/simple-attributed-string-for-range.html
Created attachment 285760 [details] Archive of layout-test-results from ews115 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-yosemite Platform: Mac OS X 10.10.5
Created attachment 285771 [details] Patch
Comment on attachment 285771 [details] Patch Attachment 285771 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/1848210 New failing tests: accessibility/mac/bounds-for-range.html
Created attachment 285776 [details] Archive of layout-test-results from ews100 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-yosemite Platform: Mac OS X 10.10.5
Comment on attachment 285771 [details] Patch Attachment 285771 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/1848243 New failing tests: accessibility/mac/bounds-for-range.html
Created attachment 285777 [details] Archive of layout-test-results from ews107 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Comment on attachment 285771 [details] Patch Attachment 285771 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/1848223 New failing tests: accessibility/mac/bounds-for-range.html
Created attachment 285779 [details] Archive of layout-test-results from ews115 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-yosemite Platform: Mac OS X 10.10.5
Created attachment 285812 [details] Patch
Created attachment 334666 [details] Updated patch only introduce one new attribute. omit parameter for style for now. leave AXAttributedStringForTextMarkerRange behavior intact.
Created attachment 334667 [details] Updated patch
Created attachment 334668 [details] Updated patch fix atk build
Created attachment 334669 [details] Updated patch try again
Comment on attachment 334669 [details] Updated patch View in context: https://bugs.webkit.org/attachment.cgi?id=334669&action=review > Source/WebCore/ChangeLog:28 > + AX: Spell check and style attributes should be optional when fetching attributed string duplicate entries in changelog > Tools/ChangeLog:44 > + AX: Spell check and style attributes should be optional when fetching attributed string duplicate entries > Tools/DumpRenderTree/AccessibilityUIElement.cpp:886 > + AccessibilityTextMarkerRange* markerRange = 0; = nullptr > Tools/DumpRenderTree/AccessibilityUIElement.cpp:896 > + AccessibilityTextMarkerRange* markerRange = 0; ditto
Created attachment 334702 [details] Updated patch Updates based on review
Comment on attachment 334702 [details] Updated patch Clearing flags on attachment: 334702 Committed r229080: <https://trac.webkit.org/changeset/229080>
All reviewed patches have been landed. Closing bug.