mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 718627 - Part 5: fix the missing implementations of the text protocol. r=surkov
This commit is contained in:
parent
b20b0faf57
commit
ced4ea20e1
@ -240,7 +240,24 @@ ToNSString(id aValue)
|
||||
}
|
||||
|
||||
if ([attribute isEqualToString:NSAccessibilitySelectedTextAttribute]) {
|
||||
// XXX to do
|
||||
NSString* stringValue = ToNSString(value);
|
||||
if (!stringValue)
|
||||
return;
|
||||
|
||||
PRInt32 start = 0;
|
||||
PRInt32 end = 0;
|
||||
|
||||
nsresult rv = mGeckoTextAccessible->GetSelectionBounds(0, &start, &end);
|
||||
NS_ENSURE_SUCCESS(rv,);
|
||||
|
||||
rv = mGeckoTextAccessible->DeleteText(start, end - start);
|
||||
NS_ENSURE_SUCCESS(rv,);
|
||||
|
||||
nsString text;
|
||||
nsCocoaUtils::GetStringForNSString(stringValue, text);
|
||||
rv = mGeckoTextAccessible->InsertText(text, start);
|
||||
NS_ENSURE_SUCCESS(rv,);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user