Modified: trunk/Source/WebCore/ChangeLog (259482 => 259483)
--- trunk/Source/WebCore/ChangeLog 2020-04-03 19:25:25 UTC (rev 259482)
+++ trunk/Source/WebCore/ChangeLog 2020-04-03 19:50:42 UTC (rev 259483)
@@ -1,3 +1,14 @@
+2020-04-03 David Kilzer <[email protected]>
+
+ REGRESSION (r8412): Use RetainPtr<> for NSMutableAttributedString in -[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]
+ <https://webkit.org/b/209980>
+
+ Reviewed by Darin Adler.
+
+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+ (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
+ Make use of RetainPtr<>.
+
2020-04-03 Kenneth Russell <[email protected]>
Fix bugs related to VideoTextureCopierCV and ANGLE roll script
Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (259482 => 259483)
--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2020-04-03 19:25:25 UTC (rev 259482)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2020-04-03 19:50:42 UTC (rev 259483)
@@ -1255,7 +1255,7 @@
RefPtr<Range> range = [protectedSelf rangeForTextMarkerRange:textMarkerRange];
if (!range)
return nil;
- NSMutableAttributedString* attrString = [[NSMutableAttributedString alloc] init];
+ auto attrString = adoptNS([[NSMutableAttributedString alloc] init]);
TextIterator it(*range);
while (!it.atEnd()) {
Node& node = it.range().start.container;
@@ -1265,8 +1265,8 @@
// Add the text of the list marker item if necessary.
String listMarkerText = AccessibilityObject::listMarkerTextForNodeAndPosition(&node, VisiblePosition(createLegacyEditingPosition(it.range().start)));
if (!listMarkerText.isEmpty())
- AXAttributedStringAppendText(attrString, &node, listMarkerText, spellCheck);
- AXAttributedStringAppendText(attrString, &node, it.text(), spellCheck);
+ AXAttributedStringAppendText(attrString.get(), &node, listMarkerText, spellCheck);
+ AXAttributedStringAppendText(attrString.get(), &node, it.text(), spellCheck);
} else {
Node* replacedNode = it.node();
NSString *attachmentString = nsStringForReplacedNode(replacedNode);
@@ -1281,13 +1281,13 @@
// add the attachment attribute
AccessibilityObject* obj = replacedNode->renderer()->document().axObjectCache()->getOrCreate(replacedNode->renderer());
- AXAttributeStringSetElement(attrString, NSAccessibilityAttachmentTextAttribute, obj, attrStringRange);
+ AXAttributeStringSetElement(attrString.get(), NSAccessibilityAttachmentTextAttribute, obj, attrStringRange);
}
}
it.advance();
}
- return [attrString autorelease];
+ return attrString.autorelease();
});
}