Bug 1236991 - part 4: add XUL tooltiptext code to tooltiptextprovider code, r?enndeakin
MozReview-Commit-ID: CssGXdD5UZ0
--- a/embedding/browser/nsDocShellTreeOwner.cpp
+++ b/embedding/browser/nsDocShellTreeOwner.cpp
@@ -1180,16 +1180,20 @@ nsDefaultTooltipTextProvider::GetNodeTex
uint32_t count = std::min(listLength, TRUNCATED_FILE_COUNT);
for (uint32_t i = 1; i < count; ++i) {
nsString fileName;
fl->UnsafeItem(i).GetAsFile()->GetName(fileName);
outText.Append(NS_LITERAL_STRING("\n"));
outText.Append(fileName);
}
}
+ } else if (content->IsXULElement() &&
+ NS_SUCCEEDED(currElement->GetAttribute(NS_LITERAL_STRING("tooltiptext"), outText)) &&
+ outText.Length()) {
+ found = true;
} else if (NS_SUCCEEDED(currElement->GetAttribute(NS_LITERAL_STRING("title"), outText)) &&
outText.Length()) {
found = true;
}
}
if (!found) {
// ...ok, that didn't work, try it in the XLink namespace
NS_NAMED_LITERAL_STRING(xlinkNS, "http://www.w3.org/1999/xlink");