Changeset 229729 in webkit
- Timestamp:
- Mar 19, 2018 6:08:53 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r229727 r229729 1 2018-03-19 Nan Wang <n_wang@apple.com> 2 3 AX: embedded attachments do not work correctly with text marker APIs on macOS 4 https://bugs.webkit.org/show_bug.cgi?id=183751 5 6 Reviewed by Chris Fleizach. 7 8 In WebKit1, embedded attachments are not working well with text marker APIs. 9 We should use the corresponding attachment view in the following cases: 10 1. Hit testing on an attachment object. 11 2. Getting the attachment object at a text marker position. 12 3. Asking for the associated element with NSAccessibilityAttachmentTextAttribute. 13 14 Not able to construct a layout test because it relies on embedded attachments. 15 16 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: 17 (AXAttributeStringSetElement): 18 (-[WebAccessibilityObjectWrapper accessibilityHitTest:]): 19 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): 20 1 21 2018-03-19 Jiewen Tan <jiewen_tan@apple.com> 2 22 -
trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
r229500 r229729 1016 1016 return; 1017 1017 1018 AXUIElementRef axElement = NSAccessibilityCreateAXUIElementRef(object->wrapper()); 1018 id objectWrapper = object->wrapper(); 1019 if ([attribute isEqualToString:NSAccessibilityAttachmentTextAttribute] && object->isAttachment() && [objectWrapper attachmentView]) 1020 objectWrapper = [objectWrapper attachmentView]; 1021 1022 AXUIElementRef axElement = NSAccessibilityCreateAXUIElementRef(objectWrapper); 1019 1023 if (axElement) { 1020 1024 [attrString addAttribute:attribute value:(id)axElement range:range]; … … 3308 3312 m_object->updateChildrenIfNecessary(); 3309 3313 RefPtr<AccessibilityObject> axObject = m_object->accessibilityHitTest(IntPoint(point)); 3310 if (axObject) 3314 if (axObject) { 3315 if (axObject->isAttachment() && [axObject->wrapper() attachmentView]) 3316 return [axObject->wrapper() attachmentView]; 3311 3317 return NSAccessibilityUnignoredAncestor(axObject->wrapper()); 3318 } 3312 3319 return NSAccessibilityUnignoredAncestor(self); 3313 3320 } … … 3992 3999 if (!axObject) 3993 4000 return nil; 4001 if (axObject->isAttachment() && [axObject->wrapper() attachmentView]) 4002 return [axObject->wrapper() attachmentView]; 3994 4003 return axObject->wrapper(); 3995 4004 }
Note: See TracChangeset
for help on using the changeset viewer.