Fix 63721: removing extraneous code from nsHTMLButtonElement.cpp. It's Dead Code Removal week, so I'm just doing my part. r=jst sr=alecf

This commit is contained in:
blakeross%telocity.com 2000-12-27 08:41:29 +00:00
parent 0144ba99dc
commit 7d3fb8a274
2 changed files with 0 additions and 60 deletions

View File

@ -432,36 +432,6 @@ nsHTMLButtonElement::HandleDOMEvent(nsIPresContext* aPresContext,
}
break;
case NS_MOUSE_LEFT_BUTTON_UP:
{
nsIEventStateManager *stateManager;
nsIContent *activeLink = nsnull;
if (NS_OK == aPresContext->GetEventStateManager(&stateManager)) {
//stateManager->GetActiveLink(&activeLink);
NS_RELEASE(stateManager);
}
if (activeLink == this) {
if (nsEventStatus_eConsumeNoDefault != *aEventStatus) {
nsAutoString href, target, disabled;
nsIURI* baseURL = nsnull;
GetBaseURL(baseURL);
GetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::href, href);
GetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::target, target);
GetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::disabled, disabled);
if (target.Length() == 0) {
GetBaseTarget(target);
}
ret = TriggerLink(aPresContext, eLinkVerb_Replace, baseURL,
href, target, PR_TRUE);
NS_IF_RELEASE(baseURL);
*aEventStatus = nsEventStatus_eConsumeNoDefault;
}
}
}
break;
// cancel all of these events for buttons
case NS_MOUSE_MIDDLE_BUTTON_DOWN:
case NS_MOUSE_MIDDLE_BUTTON_UP:

View File

@ -432,36 +432,6 @@ nsHTMLButtonElement::HandleDOMEvent(nsIPresContext* aPresContext,
}
break;
case NS_MOUSE_LEFT_BUTTON_UP:
{
nsIEventStateManager *stateManager;
nsIContent *activeLink = nsnull;
if (NS_OK == aPresContext->GetEventStateManager(&stateManager)) {
//stateManager->GetActiveLink(&activeLink);
NS_RELEASE(stateManager);
}
if (activeLink == this) {
if (nsEventStatus_eConsumeNoDefault != *aEventStatus) {
nsAutoString href, target, disabled;
nsIURI* baseURL = nsnull;
GetBaseURL(baseURL);
GetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::href, href);
GetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::target, target);
GetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::disabled, disabled);
if (target.Length() == 0) {
GetBaseTarget(target);
}
ret = TriggerLink(aPresContext, eLinkVerb_Replace, baseURL,
href, target, PR_TRUE);
NS_IF_RELEASE(baseURL);
*aEventStatus = nsEventStatus_eConsumeNoDefault;
}
}
}
break;
// cancel all of these events for buttons
case NS_MOUSE_MIDDLE_BUTTON_DOWN:
case NS_MOUSE_MIDDLE_BUTTON_UP: