aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/EventContext.cpp
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-08-08 19:54:11 +0800
committerChristian Persch <chpe@src.gnome.org>2004-08-08 19:54:11 +0800
commitd0bf32aad9e7f27f50ffc45abe0e1e0cb0a433ad (patch)
tree7ad675294866c78ab859941928b876c421c185d3 /embed/mozilla/EventContext.cpp
parent1bb4b10ce6a3e857b14e0637e17203960dcc9543 (diff)
downloadgsoc2013-epiphany-d0bf32aad9e7f27f50ffc45abe0e1e0cb0a433ad.tar
gsoc2013-epiphany-d0bf32aad9e7f27f50ffc45abe0e1e0cb0a433ad.tar.gz
gsoc2013-epiphany-d0bf32aad9e7f27f50ffc45abe0e1e0cb0a433ad.tar.bz2
gsoc2013-epiphany-d0bf32aad9e7f27f50ffc45abe0e1e0cb0a433ad.tar.lz
gsoc2013-epiphany-d0bf32aad9e7f27f50ffc45abe0e1e0cb0a433ad.tar.xz
gsoc2013-epiphany-d0bf32aad9e7f27f50ffc45abe0e1e0cb0a433ad.tar.zst
gsoc2013-epiphany-d0bf32aad9e7f27f50ffc45abe0e1e0cb0a433ad.zip
Consistent naming for nsresult vars. Since 'rv' had the majority, 'rv' it
2004-08-08 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/EphyBrowser.cpp: * embed/mozilla/EphySingle.cpp: * embed/mozilla/EventContext.cpp: * embed/mozilla/MozillaPrivate.cpp: * embed/mozilla/mozilla-embed-single.cpp: * embed/mozilla/mozilla-embed.cpp: Consistent naming for nsresult vars. Since 'rv' had the majority, 'rv' it is.
Diffstat (limited to 'embed/mozilla/EventContext.cpp')
-rw-r--r--embed/mozilla/EventContext.cpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/embed/mozilla/EventContext.cpp b/embed/mozilla/EventContext.cpp
index 82407e1b0..5f5f7e99d 100644
--- a/embed/mozilla/EventContext.cpp
+++ b/embed/mozilla/EventContext.cpp
@@ -578,9 +578,7 @@ nsresult EventContext::GetCSSBackground (nsIDOMNode *node, nsAString& url)
nsresult EventContext::GetMouseEventInfo (nsIDOMMouseEvent *aMouseEvent, MozillaEmbedEvent *info)
{
- nsresult result;
-
- /* casting 32-bit guint* to PRUint16* below will break on big-endian */
+ /* FIXME: casting 32-bit guint* to PRUint16* below will break on big-endian */
PRUint16 btn;
aMouseEvent->GetButton (&btn);
@@ -613,12 +611,13 @@ nsresult EventContext::GetMouseEventInfo (nsIDOMMouseEvent *aMouseEvent, Mozilla
/* be sure we are not clicking on the scroolbars */
- nsCOMPtr<nsIDOMNSEvent> nsEvent = do_QueryInterface(aMouseEvent, &result);
- if (NS_FAILED(result) || !nsEvent) return NS_ERROR_FAILURE;
+ nsCOMPtr<nsIDOMNSEvent> nsEvent = do_QueryInterface(aMouseEvent);
+ if (!nsEvent) return NS_ERROR_FAILURE;
+ nsresult rv;
nsCOMPtr<nsIDOMEventTarget> OriginalTarget;
- result = nsEvent->GetOriginalTarget(getter_AddRefs(OriginalTarget));
- if (NS_FAILED(result) || !OriginalTarget) return NS_ERROR_FAILURE;
+ rv = nsEvent->GetOriginalTarget(getter_AddRefs(OriginalTarget));
+ if (NS_FAILED (rv) || !OriginalTarget) return NS_ERROR_FAILURE;
nsCOMPtr<nsIDOMNode> OriginalNode = do_QueryInterface(OriginalTarget);
if (!OriginalNode) return NS_ERROR_FAILURE;
@@ -636,11 +635,11 @@ nsresult EventContext::GetMouseEventInfo (nsIDOMMouseEvent *aMouseEvent, Mozilla
return NS_ERROR_FAILURE;
nsCOMPtr<nsIDOMEventTarget> EventTarget;
- result = aMouseEvent->GetTarget(getter_AddRefs(EventTarget));
- if (NS_FAILED(result) || !EventTarget) return NS_ERROR_FAILURE;
+ rv = aMouseEvent->GetTarget(getter_AddRefs(EventTarget));
+ if (NS_FAILED (rv) || !EventTarget) return NS_ERROR_FAILURE;
- result = GetEventContext (EventTarget, info);
- if (NS_FAILED(result)) return result;
+ rv = GetEventContext (EventTarget, info);
+ if (NS_FAILED (rv)) return rv;
/* Get the modifier */
@@ -725,15 +724,15 @@ nsresult EventContext::GetKeyEventInfo (nsIDOMKeyEvent *aKeyEvent, MozillaEmbedE
nsresult EventContext::IsPageFramed (nsIDOMNode *node, PRBool *Framed)
{
- nsresult result;
+ nsresult rv;
nsCOMPtr<nsIDOMDocument> mainDocument;
- result = mBrowser->GetDocument (getter_AddRefs(mainDocument));
- if (NS_FAILED(result) || !mainDocument) return NS_ERROR_FAILURE;
+ rv = mBrowser->GetDocument (getter_AddRefs(mainDocument));
+ if (NS_FAILED (rv) || !mainDocument) return NS_ERROR_FAILURE;
nsCOMPtr<nsIDOMDocument> nodeDocument;
- result = node->GetOwnerDocument (getter_AddRefs(nodeDocument));
- if (NS_FAILED(result) || !nodeDocument) return NS_ERROR_FAILURE;
+ rv = node->GetOwnerDocument (getter_AddRefs(nodeDocument));
+ if (NS_FAILED (rv) || !nodeDocument) return NS_ERROR_FAILURE;
*Framed = (mainDocument != nodeDocument);