Title: [152939] trunk
- Revision
- 152939
- Author
- [email protected]
- Date
- 2013-07-19 20:37:26 -0700 (Fri, 19 Jul 2013)
Log Message
AX: VoiceOver not detecting misspelled words don't work in all cases
https://bugs.webkit.org/show_bug.cgi?id=118924
Reviewed by Tim Horton.
Source/WebCore:
VoiceOver is now looking for a new misspelled attribute.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(AXAttributeStringSetSpelling):
(AXAttributedStringAppendText):
Tools:
Make the misspelled detection dependent on both types of attributes being present.
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::attributedStringRangeIsMisspelled):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::attributedStringRangeIsMisspelled):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (152938 => 152939)
--- trunk/Source/WebCore/ChangeLog 2013-07-20 02:59:41 UTC (rev 152938)
+++ trunk/Source/WebCore/ChangeLog 2013-07-20 03:37:26 UTC (rev 152939)
@@ -1,3 +1,16 @@
+2013-07-19 Chris Fleizach <[email protected]>
+
+ AX: VoiceOver not detecting misspelled words don't work in all cases
+ https://bugs.webkit.org/show_bug.cgi?id=118924
+
+ Reviewed by Tim Horton.
+
+ VoiceOver is now looking for a new misspelled attribute.
+
+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+ (AXAttributeStringSetSpelling):
+ (AXAttributedStringAppendText):
+
2013-07-19 Ryosuke Niwa <[email protected]>
Extract computeRenderStyleForProperty and nodeOrItsAncestorNeedsStyleRecalc from ComputedStyleExtractor::propertyValue
Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (152938 => 152939)
--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2013-07-20 02:59:41 UTC (rev 152938)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2013-07-20 03:37:26 UTC (rev 152939)
@@ -737,6 +737,9 @@
for (unsigned i = 0; i < size; i++) {
const TextCheckingResult& result = results[i];
AXAttributeStringSetNumber(attrString, NSAccessibilityMisspelledTextAttribute, trueValue, NSMakeRange(result.location + range.location, result.length));
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+ AXAttributeStringSetNumber(attrString, NSAccessibilityMarkedMisspelledTextAttribute, trueValue, NSMakeRange(result.location + range.location, result.length));
+#endif
}
return;
}
@@ -754,6 +757,9 @@
NSRange spellRange = NSMakeRange(range.location + currentPosition + misspellingLocation, misspellingLength);
AXAttributeStringSetNumber(attrString, NSAccessibilityMisspelledTextAttribute, [NSNumber numberWithBool:YES], spellRange);
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+ AXAttributeStringSetNumber(attrString, NSAccessibilityMarkedMisspelledTextAttribute, [NSNumber numberWithBool:YES], spellRange);
+#endif
charLength -= (misspellingLocation + misspellingLength);
currentPosition += (misspellingLocation + misspellingLength);
}
@@ -831,6 +837,9 @@
// remove inherited attachment from prior AXAttributedStringAppendReplaced
[attrString removeAttribute:NSAccessibilityAttachmentTextAttribute range:attrStringRange];
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+ [attrString removeAttribute:NSAccessibilityMarkedMisspelledTextAttribute range:attrStringRange];
+#endif
[attrString removeAttribute:NSAccessibilityMisspelledTextAttribute range:attrStringRange];
// set new attributes
Modified: trunk/Tools/ChangeLog (152938 => 152939)
--- trunk/Tools/ChangeLog 2013-07-20 02:59:41 UTC (rev 152938)
+++ trunk/Tools/ChangeLog 2013-07-20 03:37:26 UTC (rev 152939)
@@ -1,3 +1,17 @@
+2013-07-19 Chris Fleizach <[email protected]>
+
+ AX: VoiceOver not detecting misspelled words don't work in all cases
+ https://bugs.webkit.org/show_bug.cgi?id=118924
+
+ Reviewed by Tim Horton.
+
+ Make the misspelled detection dependent on both types of attributes being present.
+
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::attributedStringRangeIsMisspelled):
+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
+ (WTR::AccessibilityUIElement::attributedStringRangeIsMisspelled):
+
2013-07-19 Alex Christensen <[email protected]>
Improved code coverage generation.
Modified: trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm (152938 => 152939)
--- trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm 2013-07-20 02:59:41 UTC (rev 152938)
+++ trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm 2013-07-20 03:37:26 UTC (rev 152939)
@@ -905,8 +905,12 @@
return false;
NSDictionary* attrs = [string attributesAtIndex:0 effectiveRange:nil];
- if([[attrs objectForKey:NSAccessibilityMisspelledTextAttribute] boolValue])
- return true;
+ BOOL misspelled = [[attrs objectForKey:NSAccessibilityMisspelledTextAttribute] boolValue];
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+ if (misspelled)
+ misspelled = [[attrs objectForKey:NSAccessibilityMarkedMisspelledTextAttribute] boolValue];
+#endif
+ return misspelled;
END_AX_OBJC_EXCEPTIONS
return false;
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm (152938 => 152939)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm 2013-07-20 02:59:41 UTC (rev 152938)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm 2013-07-20 03:37:26 UTC (rev 152939)
@@ -915,8 +915,12 @@
return false;
NSDictionary* attrs = [string attributesAtIndex:0 effectiveRange:nil];
- if([[attrs objectForKey:NSAccessibilityMisspelledTextAttribute] boolValue])
- return true;
+ BOOL misspelled = [[attrs objectForKey:NSAccessibilityMisspelledTextAttribute] boolValue];
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+ if (misspelled)
+ misspelled = [[attrs objectForKey:NSAccessibilityMarkedMisspelledTextAttribute] boolValue];
+#endif
+ return misspelled;
END_AX_OBJC_EXCEPTIONS
return false;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes