Changeset 259483 in webkit
- Timestamp:
- Apr 3, 2020 12:50:42 PM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r259482 r259483 1 2020-04-03 David Kilzer <ddkilzer@apple.com> 2 3 REGRESSION (r8412): Use RetainPtr<> for NSMutableAttributedString in -[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:] 4 <https://webkit.org/b/209980> 5 6 Reviewed by Darin Adler. 7 8 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: 9 (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]): 10 Make use of RetainPtr<>. 11 1 12 2020-04-03 Kenneth Russell <kbr@chromium.org> 2 13 -
trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
r259428 r259483 1256 1256 if (!range) 1257 1257 return nil; 1258 NSMutableAttributedString* attrString = [[NSMutableAttributedString alloc] init];1258 auto attrString = adoptNS([[NSMutableAttributedString alloc] init]); 1259 1259 TextIterator it(*range); 1260 1260 while (!it.atEnd()) { … … 1266 1266 String listMarkerText = AccessibilityObject::listMarkerTextForNodeAndPosition(&node, VisiblePosition(createLegacyEditingPosition(it.range().start))); 1267 1267 if (!listMarkerText.isEmpty()) 1268 AXAttributedStringAppendText(attrString , &node, listMarkerText, spellCheck);1269 AXAttributedStringAppendText(attrString , &node, it.text(), spellCheck);1268 AXAttributedStringAppendText(attrString.get(), &node, listMarkerText, spellCheck); 1269 AXAttributedStringAppendText(attrString.get(), &node, it.text(), spellCheck); 1270 1270 } else { 1271 1271 Node* replacedNode = it.node(); … … 1282 1282 // add the attachment attribute 1283 1283 AccessibilityObject* obj = replacedNode->renderer()->document().axObjectCache()->getOrCreate(replacedNode->renderer()); 1284 AXAttributeStringSetElement(attrString , NSAccessibilityAttachmentTextAttribute, obj, attrStringRange);1284 AXAttributeStringSetElement(attrString.get(), NSAccessibilityAttachmentTextAttribute, obj, attrStringRange); 1285 1285 } 1286 1286 } … … 1288 1288 } 1289 1289 1290 return [attrString autorelease];1290 return attrString.autorelease(); 1291 1291 }); 1292 1292 }
Note: See TracChangeset
for help on using the changeset viewer.