mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
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:
parent
6ff0f9e270
commit
7df51c1fae
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user