Bug 298972. Don't trim out whitespace in the name of accessible text objects. r=parente, sr=neil, a=mkaply
This commit is contained in:
Родитель
6c27ce0512
Коммит
a46b43d961
|
@ -54,13 +54,18 @@ nsTextAccessibleWrap(aDomNode, aShell), mFrame(aFrame)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLTextAccessible::GetName(nsAString& aName)
|
||||
{
|
||||
nsAutoString accName;
|
||||
if (NS_FAILED(mDOMNode->GetNodeValue(accName)))
|
||||
{
|
||||
aName.Truncate();
|
||||
if (!mDOMNode) {
|
||||
return NS_ERROR_FAILURE;
|
||||
accName.CompressWhitespace();
|
||||
aName = accName;
|
||||
return NS_OK;
|
||||
}
|
||||
nsAutoString name;
|
||||
nsresult rv = mDOMNode->GetNodeValue(name);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
name.ReplaceChar("\r\n\t", ' ');
|
||||
aName = name;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsIFrame* nsHTMLTextAccessible::GetFrame()
|
||||
|
|
Загрузка…
Ссылка в новой задаче