Changeset 261687 in webkit
- Timestamp:
- May 14, 2020 5:44:28 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r261686 r261687 1 2020-05-14 Andres Gonzalez <andresg_22@apple.com> 2 3 Replacing and inserting text need to be dispatched to the main thread. 4 https://bugs.webkit.org/show_bug.cgi?id=211863 5 6 Reviewed by Chris Fleizach. 7 8 Covered by existing tests. 9 10 In isolated tree mode WebAccessibilityObjectWrapper accessibilityReplaceRange 11 and InsertText may be called on the secondary thread. Thus the AXIsolatedObject 12 implementation of this functionality needs to forward these calls to the 13 associated AXObject on the main thread. 14 15 * accessibility/isolatedtree/AXIsolatedObject.cpp: 16 (WebCore::AXIsolatedObject::replaceTextInRange): 17 (WebCore::AXIsolatedObject::insertText): 18 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: 19 (-[WebAccessibilityObjectWrapper accessibilityReplaceRange:withText:]): 20 (-[WebAccessibilityObjectWrapper accessibilityInsertText:]): 21 1 22 2020-05-14 Antoine Quint <graouts@apple.com> 2 23 -
trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
r261644 r261687 928 928 } 929 929 930 bool AXIsolatedObject::replaceTextInRange(const String&, const PlainTextRange&) 931 { 932 ASSERT_NOT_REACHED(); 933 return false; 934 } 935 936 bool AXIsolatedObject::insertText(const String&) 937 { 938 ASSERT_NOT_REACHED(); 939 return false; 930 bool AXIsolatedObject::replaceTextInRange(const String& replacementText, const PlainTextRange& textRange) 931 { 932 return Accessibility::retrieveValueFromMainThread<bool>([&replacementText, &textRange, this] () -> bool { 933 if (auto* axObject = associatedAXObject()) 934 return axObject->replaceTextInRange(replacementText, textRange); 935 return false; 936 }); 937 } 938 939 bool AXIsolatedObject::insertText(const String& text) 940 { 941 return Accessibility::retrieveValueFromMainThread<bool>([&text, this] () -> bool { 942 if (auto* axObject = associatedAXObject()) 943 return axObject->insertText(text); 944 return false; 945 }); 940 946 } 941 947 -
trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
r261653 r261687 3473 3473 return NO; 3474 3474 3475 return backingObject->replaceTextInRange( string, PlainTextRange(range));3475 return backingObject->replaceTextInRange(String(string).isolatedCopy(), PlainTextRange(range)); 3476 3476 } 3477 3477 … … 3482 3482 return NO; 3483 3483 3484 return backingObject->insertText( text);3484 return backingObject->insertText(String(text).isolatedCopy()); 3485 3485 } 3486 3486
Note: See TracChangeset
for help on using the changeset viewer.