RESOLVED FIXED 41817
AX: Misspellings not shown in AXAttributedStringForTextMarkerRange when selection is on word
https://bugs.webkit.org/show_bug.cgi?id=41817
Summary AX: Misspellings not shown in AXAttributedStringForTextMarkerRange when selec...
chris fleizach
Reported Thursday, July 8, 2010 1:31:47 AM UTC
the misspelling attribute should continue to be returned even when the selection is on that piece of misspelled. The red underline for misspelled text temporarily disappear when the insertion point is within the misspelled text. That does not mean the misspelled attribute is not available. The misspelled attribute should still be returned in this case.
Attachments
Patch (21.22 KB, patch)
2010-07-08 12:05 PDT, chris fleizach
no flags
Patch (21.32 KB, patch)
2010-07-08 14:51 PDT, chris fleizach
no flags
patch to test against other bots (9.49 KB, patch)
2010-07-24 20:31 PDT, chris fleizach
ddkilzer: review+
chris fleizach
Comment 1 Thursday, July 8, 2010 5:02:26 PM UTC
Right now when asking for an attributed string for a range, it returns appropriate markers like misspelled, color, font, etc. the problem is that when the cursor is on a misspelled word, the misspelled underline disappears visually and AX no longer says that this word is misspelled The fix I have here is to not rely on the document's cached markings, because they don't account for this case, and instead just check the spelling of the range.
chris fleizach
Comment 2 Thursday, July 8, 2010 8:03:17 PM UTC
I have two layout tests. One to handle the case where misspelled attribute was not returned when selection was on the word and 2) to generally test the misspelled attributed string stuff since there was no layout test before and because i re-wrote the method
chris fleizach
Comment 3 Thursday, July 8, 2010 8:05:46 PM UTC
WebKit Review Bot
Comment 4 Thursday, July 8, 2010 8:58:36 PM UTC
chris fleizach
Comment 5 Thursday, July 8, 2010 10:51:22 PM UTC
chris fleizach
Comment 6 Sunday, July 25, 2010 3:51:21 AM UTC
i added the DRT changes and the other layout test in a separate bug. this bug will now just address the actual issue
chris fleizach
Comment 7 Sunday, July 25, 2010 4:31:08 AM UTC
Created attachment 62519 [details] patch to test against other bots
David Kilzer (:ddkilzer)
Comment 8 Sunday, July 25, 2010 6:21:43 AM UTC
Comment on attachment 62519 [details] patch to test against other bots WebCore/ChangeLog:10 + circumstances (like when selection has not moved across words, of if the cursor is in the middle Typo: "of if the cursor" should be "or if the cursor". WebCore/accessibility/mac/AccessibilityObjectWrapper.mm:396 + // Check the spelling directly since document->markersForNode() does not store the misspelled marking when the cursor is in a word. Should document->markersforNode() store the misspelled marking? I'm not an editing expert, but that fix may be simpler if it makes sense (and doesn't cause any performance issues). I CCed Enrica on this bug in case she has input. Other than that the patch looks fine, but I think someone with more text editing knowledge should look over the patch before I r+ it.
chris fleizach
Comment 9 Sunday, July 25, 2010 7:23:32 AM UTC
> Should document->markersforNode() store the misspelled marking? I'm not an editing expert, but that fix may be simpler if it makes sense (and doesn't cause any performance issues). I CCed Enrica on this bug in case she has input. > From what I discovered that method mirrors what is displayed and when the visuals update it relies on the cache inside there. It also doesn't get updated until selection is moved within the range > Other than that the patch looks fine, but I think someone with more text editing knowledge should look over the patch before I r+ it.
David Kilzer (:ddkilzer)
Comment 10 Tuesday, July 27, 2010 7:56:55 PM UTC
Comment on attachment 62519 [details] patch to test against other bots I looked over the patch again and this seems fine. r=me
chris fleizach
Comment 11 Tuesday, July 27, 2010 8:39:05 PM UTC
Note You need to log in before you can comment on or make changes to this bug.