@@ -964,7 +964,7 @@ IFACEMETHODIMP AXPlatformNodeWin::get_accDefaultAction(VARIANT var_id,
964
964
return S_FALSE;
965
965
}
966
966
967
- *def_action = ::SysAllocString (base::UTF16ToWide (action_verb).c_str ());
967
+ *def_action = ::SysAllocString (fml::Utf16ToWideString (action_verb).c_str ());
968
968
BASE_DCHECK (def_action);
969
969
return S_OK;
970
970
}
@@ -1055,7 +1055,7 @@ IFACEMETHODIMP AXPlatformNodeWin::get_accName(VARIANT var_id, BSTR* name_bstr) {
1055
1055
if (name.empty () && !has_name)
1056
1056
return S_FALSE;
1057
1057
1058
- *name_bstr = ::SysAllocString (base::UTF16ToWide (name).c_str ());
1058
+ *name_bstr = ::SysAllocString (fml::Utf16ToWideString (name).c_str ());
1059
1059
return S_OK;
1060
1060
}
1061
1061
@@ -2123,20 +2123,20 @@ HRESULT AXPlatformNodeWin::GetPropertyValueImpl(PROPERTYID property_id,
2123
2123
switch (property_id) {
2124
2124
case UIA_AriaPropertiesPropertyId:
2125
2125
result->vt = VT_BSTR;
2126
- result->bstrVal =
2127
- ::SysAllocString (base::UTF16ToWide (ComputeUIAProperties()).c_str());
2126
+ result->bstrVal = :: SysAllocString (
2127
+ fml::Utf16ToWideString (ComputeUIAProperties ()).c_str ());
2128
2128
break ;
2129
2129
2130
2130
case UIA_AriaRolePropertyId:
2131
2131
result->vt = VT_BSTR;
2132
2132
result->bstrVal =
2133
- ::SysAllocString (base::UTF16ToWide (UIAAriaRole()).c_str());
2133
+ ::SysAllocString (fml::Utf16ToWideString (UIAAriaRole()).c_str());
2134
2134
break ;
2135
2135
2136
2136
case UIA_AutomationIdPropertyId:
2137
2137
V_VT (result) = VT_BSTR;
2138
2138
V_BSTR (result) = ::SysAllocString (
2139
- base::UTF16ToWide (GetDelegate ()->GetAuthorUniqueId ()).c_str ());
2139
+ fml::Utf16ToWideString (GetDelegate ()->GetAuthorUniqueId ()).c_str ());
2140
2140
break ;
2141
2141
2142
2142
case UIA_ClassNamePropertyId:
@@ -2305,8 +2305,8 @@ HRESULT AXPlatformNodeWin::GetPropertyValueImpl(PROPERTYID property_id,
2305
2305
std::u16string localized_control_type = GetRoleDescription ();
2306
2306
if (!localized_control_type.empty ()) {
2307
2307
result->vt = VT_BSTR;
2308
- result->bstrVal =
2309
- ::SysAllocString (base::UTF16ToWide (localized_control_type).c_str());
2308
+ result->bstrVal = :: SysAllocString (
2309
+ fml::Utf16ToWideString (localized_control_type).c_str ());
2310
2310
}
2311
2311
// If a role description has not been provided, leave as VT_EMPTY.
2312
2312
// UIA core handles Localized Control type for some built-in types and
@@ -2457,7 +2457,7 @@ HRESULT AXPlatformNodeWin::GetPropertyValueImpl(PROPERTYID property_id,
2457
2457
if (!localized_landmark_type.empty ()) {
2458
2458
result->vt = VT_BSTR;
2459
2459
result->bstrVal = ::SysAllocString (
2460
- base::UTF16ToWide (localized_landmark_type).c_str ());
2460
+ fml::Utf16ToWideString (localized_landmark_type).c_str ());
2461
2461
}
2462
2462
break ;
2463
2463
}
@@ -2516,7 +2516,7 @@ HRESULT AXPlatformNodeWin::GetPropertyValueImpl(PROPERTYID property_id,
2516
2516
// convention here and when we fire events via ::NotifyWinEvent().
2517
2517
result->vt = VT_BSTR;
2518
2518
result->bstrVal = ::SysAllocString (
2519
- base::UTF16ToWide (base::NumberToString16 (-GetUniqueId ())).c_str ());
2519
+ fml::Utf16ToWideString (base::NumberToString16 (-GetUniqueId ())).c_str ());
2520
2520
}
2521
2521
2522
2522
return S_OK;
@@ -5305,7 +5305,7 @@ BSTR AXPlatformNodeWin::GetValueAttributeAsBstr(AXPlatformNodeWin* target) {
5305
5305
value_text = base::NumberToString16 (red * 100 / 255 ) + u" % red " +
5306
5306
base::NumberToString16 (green * 100 / 255 ) + u" % green " +
5307
5307
base::NumberToString16 (blue * 100 / 255 ) + u" % blue" ;
5308
- BSTR value = ::SysAllocString (base::UTF16ToWide (value_text).c_str ());
5308
+ BSTR value = ::SysAllocString (fml::Utf16ToWideString (value_text).c_str ());
5309
5309
BASE_DCHECK (value);
5310
5310
return value;
5311
5311
}
@@ -5316,7 +5316,7 @@ BSTR AXPlatformNodeWin::GetValueAttributeAsBstr(AXPlatformNodeWin* target) {
5316
5316
if (target->GetData ().role == ax::mojom::Role::kRootWebArea ||
5317
5317
target->GetData ().role == ax::mojom::Role::kWebArea ) {
5318
5318
result = base::UTF8ToUTF16 (target->GetDelegate ()->GetTreeData ().url );
5319
- BSTR value = ::SysAllocString (base::UTF16ToWide (result).c_str ());
5319
+ BSTR value = ::SysAllocString (fml::Utf16ToWideString (result).c_str ());
5320
5320
BASE_DCHECK (value);
5321
5321
return value;
5322
5322
}
@@ -5326,7 +5326,7 @@ BSTR AXPlatformNodeWin::GetValueAttributeAsBstr(AXPlatformNodeWin* target) {
5326
5326
//
5327
5327
if (target->GetData ().role == ax::mojom::Role::kLink ) {
5328
5328
result = target->GetString16Attribute (ax::mojom::StringAttribute::kUrl );
5329
- BSTR value = ::SysAllocString (base::UTF16ToWide (result).c_str ());
5329
+ BSTR value = ::SysAllocString (fml::Utf16ToWideString (result).c_str ());
5330
5330
BASE_DCHECK (value);
5331
5331
return value;
5332
5332
}
@@ -5341,7 +5341,7 @@ BSTR AXPlatformNodeWin::GetValueAttributeAsBstr(AXPlatformNodeWin* target) {
5341
5341
if (target->GetFloatAttribute (ax::mojom::FloatAttribute::kValueForRange ,
5342
5342
&fval)) {
5343
5343
result = base::NumberToString16 (fval);
5344
- BSTR value = ::SysAllocString (base::UTF16ToWide (result).c_str ());
5344
+ BSTR value = ::SysAllocString (fml::Utf16ToWideString (result).c_str ());
5345
5345
BASE_DCHECK (value);
5346
5346
return value;
5347
5347
}
@@ -5350,7 +5350,7 @@ BSTR AXPlatformNodeWin::GetValueAttributeAsBstr(AXPlatformNodeWin* target) {
5350
5350
if (result.empty () && target->IsRichTextField ())
5351
5351
result = target->GetInnerText ();
5352
5352
5353
- BSTR value = ::SysAllocString (base::UTF16ToWide (result).c_str ());
5353
+ BSTR value = ::SysAllocString (fml::Utf16ToWideString (result).c_str ());
5354
5354
BASE_DCHECK (value);
5355
5355
return value;
5356
5356
}
@@ -5363,15 +5363,15 @@ HRESULT AXPlatformNodeWin::GetStringAttributeAsBstr(
5363
5363
if (!GetString16Attribute (attribute, &str))
5364
5364
return S_FALSE;
5365
5365
5366
- *value_bstr = ::SysAllocString (base::UTF16ToWide (str).c_str ());
5366
+ *value_bstr = ::SysAllocString (fml::Utf16ToWideString (str).c_str ());
5367
5367
BASE_DCHECK (*value_bstr);
5368
5368
5369
5369
return S_OK;
5370
5370
}
5371
5371
5372
5372
HRESULT AXPlatformNodeWin::GetNameAsBstr (BSTR* value_bstr) const {
5373
5373
std::u16string str = GetNameAsString16 ();
5374
- *value_bstr = ::SysAllocString (base::UTF16ToWide (str).c_str ());
5374
+ *value_bstr = ::SysAllocString (fml::Utf16ToWideString (str).c_str ());
5375
5375
BASE_DCHECK (*value_bstr);
5376
5376
return S_OK;
5377
5377
}
@@ -5481,14 +5481,14 @@ BSTR AXPlatformNodeWin::GetFontNameAttributeAsBSTR() const {
5481
5481
const std::u16string string =
5482
5482
GetInheritedString16Attribute (ax::mojom::StringAttribute::kFontFamily );
5483
5483
5484
- return ::SysAllocString (base::UTF16ToWide (string).c_str ());
5484
+ return ::SysAllocString (fml::Utf16ToWideString (string).c_str ());
5485
5485
}
5486
5486
5487
5487
BSTR AXPlatformNodeWin::GetStyleNameAttributeAsBSTR () const {
5488
5488
std::u16string style_name =
5489
5489
GetDelegate ()->GetStyleNameAttributeAsLocalizedString ();
5490
5490
5491
- return ::SysAllocString (base::UTF16ToWide (style_name).c_str ());
5491
+ return ::SysAllocString (fml::Utf16ToWideString (style_name).c_str ());
5492
5492
}
5493
5493
5494
5494
TextDecorationLineStyle AXPlatformNodeWin::GetUIATextDecorationStyle (
0 commit comments