Testing performance impact of backout of what's left of the patch from
bug 115289. See bug 123947 for details. a=mcafee git-svn-id: svn://10.0.0.236/trunk@114152 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1466,27 +1466,27 @@ ChromeContextMenuListener :: ContextMenu ( nsIDOMEvent* aMouseEvent )
|
||||
element->GetTagName(tag);
|
||||
|
||||
// Test what kind of element we're dealing with here
|
||||
if (tag.Equals(NS_LITERAL_STRING("img"), nsCaseInsensitiveStringComparator()))
|
||||
if (!Compare(tag, NS_LITERAL_STRING("img"), nsCaseInsensitiveStringComparator()))
|
||||
{
|
||||
flags |= nsIContextMenuListener::CONTEXT_IMAGE;
|
||||
targetDOMnode = node;
|
||||
// if we see an image, keep searching for a possible anchor
|
||||
}
|
||||
else if (tag.Equals(NS_LITERAL_STRING("input"), nsCaseInsensitiveStringComparator()))
|
||||
else if (!Compare(tag, NS_LITERAL_STRING("input"), nsCaseInsensitiveStringComparator()))
|
||||
{
|
||||
// INPUT element - button, combo, checkbox, text etc.
|
||||
flags |= nsIContextMenuListener::CONTEXT_INPUT;
|
||||
targetDOMnode = node;
|
||||
break; // exit do-while
|
||||
}
|
||||
else if (tag.Equals(NS_LITERAL_STRING("textarea"), nsCaseInsensitiveStringComparator()))
|
||||
else if (!Compare(tag, NS_LITERAL_STRING("textarea"), nsCaseInsensitiveStringComparator()))
|
||||
{
|
||||
// text area
|
||||
flags |= nsIContextMenuListener::CONTEXT_TEXT;
|
||||
targetDOMnode = node;
|
||||
break; // exit do-while
|
||||
}
|
||||
else if (tag.Equals(NS_LITERAL_STRING("html"), nsCaseInsensitiveStringComparator()))
|
||||
else if (!Compare(tag, NS_LITERAL_STRING("html"), nsCaseInsensitiveStringComparator()))
|
||||
{
|
||||
// only care about this if no other context was found.
|
||||
if (!flags) {
|
||||
@@ -1508,7 +1508,8 @@ ChromeContextMenuListener :: ContextMenu ( nsIDOMEvent* aMouseEvent )
|
||||
if (attributes)
|
||||
{
|
||||
nsCOMPtr<nsIDOMNode> hrefNode;
|
||||
attributes->GetNamedItem(NS_LITERAL_STRING("href"), getter_AddRefs(hrefNode));
|
||||
nsAutoString href(NS_LITERAL_STRING("href"));
|
||||
attributes->GetNamedItem(href, getter_AddRefs(hrefNode));
|
||||
if (hrefNode)
|
||||
{
|
||||
flags |= nsIContextMenuListener::CONTEXT_LINK;
|
||||
|
||||
Reference in New Issue
Block a user