mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-09 04:25:38 +00:00
remove dead code from fix for 329337. followup. thanks to bz for catching this.
This commit is contained in:
parent
c73db17eff
commit
fa432825f4
@ -283,24 +283,9 @@ NS_METHOD nsMenuItemX::DoCommand()
|
||||
|
||||
NS_IMETHODIMP nsMenuItemX::DispatchDOMEvent(const nsString &eventName, PRBool *preventDefaultCalled)
|
||||
{
|
||||
if (!mContent || !mDocShellWeakRef)
|
||||
if (!mContent)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsresult rv;
|
||||
|
||||
// get a pres context
|
||||
nsPresContext* ourPresContext;
|
||||
nsCOMPtr<nsIDocShell> docShell = do_QueryReferent(mDocShellWeakRef);
|
||||
if (!docShell) {
|
||||
NS_WARNING("Failed to QI weak docshell ref to nsIDocShell");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
rv = MenuHelpersX::DocShellToPresContext(docShell, &ourPresContext);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Failed to get pres context from docshell");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
// get owner document for content
|
||||
nsCOMPtr<nsIDocument> parentDoc = mContent->GetOwnerDoc();
|
||||
if (!parentDoc) {
|
||||
@ -326,7 +311,7 @@ NS_IMETHODIMP nsMenuItemX::DispatchDOMEvent(const nsString &eventName, PRBool *p
|
||||
|
||||
// send DOM event
|
||||
nsCOMPtr<nsIDOMEventTarget> eventTarget = do_QueryInterface(mContent);
|
||||
rv = eventTarget->DispatchEvent(event, preventDefaultCalled);
|
||||
nsresult rv = eventTarget->DispatchEvent(event, preventDefaultCalled);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Failed to send DOM event via nsIDOMEventTarget");
|
||||
return NS_ERROR_FAILURE;
|
||||
|
@ -270,24 +270,9 @@ NS_METHOD nsMenuItemX::DoCommand()
|
||||
|
||||
NS_IMETHODIMP nsMenuItemX::DispatchDOMEvent(const nsString &eventName, PRBool *preventDefaultCalled)
|
||||
{
|
||||
if (!mContent || !mDocShellWeakRef)
|
||||
if (!mContent)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsresult rv;
|
||||
|
||||
// get a pres context
|
||||
nsPresContext* ourPresContext;
|
||||
nsCOMPtr<nsIDocShell> docShell = do_QueryReferent(mDocShellWeakRef);
|
||||
if (!docShell) {
|
||||
NS_WARNING("Failed to QI weak docshell ref to nsIDocShell");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
rv = MenuHelpersX::DocShellToPresContext(docShell, &ourPresContext);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Failed to get pres context from docshell");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
// get owner document for content
|
||||
nsCOMPtr<nsIDocument> parentDoc = mContent->GetOwnerDoc();
|
||||
if (!parentDoc) {
|
||||
@ -313,7 +298,7 @@ NS_IMETHODIMP nsMenuItemX::DispatchDOMEvent(const nsString &eventName, PRBool *p
|
||||
|
||||
// send DOM event
|
||||
nsCOMPtr<nsIDOMEventTarget> eventTarget = do_QueryInterface(mContent);
|
||||
rv = eventTarget->DispatchEvent(event, preventDefaultCalled);
|
||||
nsresult rv = eventTarget->DispatchEvent(event, preventDefaultCalled);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Failed to send DOM event via nsIDOMEventTarget");
|
||||
return NS_ERROR_FAILURE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user