Bug 1230267 - Inconsistent display of SVG title as tooltip when multi-process is enabled. r=jst

This commit is contained in:
Robert Longson 2016-01-09 11:12:58 +00:00
parent 8a3f816bd8
commit 19096b9236

View File

@ -1139,8 +1139,7 @@ DefaultTooltipTextProvider::GetNodeText(nsIDOMNode* aNode, char16_t** aText,
nsCOMPtr<nsIURI> uri(linkContent->GetURIExternal()); nsCOMPtr<nsIURI> uri(linkContent->GetURIExternal());
if (uri) { if (uri) {
currElement->GetAttributeNS( currElement->GetAttributeNS(
NS_LITERAL_STRING("http://www.w3.org/1999/xlink"), xlinkNS, NS_LITERAL_STRING("title"), outText);
NS_LITERAL_STRING("title"), outText);
if (outText.Length()) { if (outText.Length()) {
found = true; found = true;
} }
@ -1150,7 +1149,7 @@ DefaultTooltipTextProvider::GetNodeText(nsIDOMNode* aNode, char16_t** aText,
lookingForSVGTitle = UseSVGTitle(currElement); lookingForSVGTitle = UseSVGTitle(currElement);
} }
if (lookingForSVGTitle) { if (lookingForSVGTitle) {
nsINodeList* childNodes = node->ChildNodes(); nsINodeList* childNodes = content->ChildNodes();
uint32_t childNodeCount = childNodes->Length(); uint32_t childNodeCount = childNodes->Length();
for (uint32_t i = 0; i < childNodeCount; i++) { for (uint32_t i = 0; i < childNodeCount; i++) {
nsIContent* child = childNodes->Item(i); nsIContent* child = childNodes->Item(i);