[galeon] Update to new xulrunner API



commit d74bc58e13c042360e672960eb05c9b6d37a59ee
Author: Fabio Bonelli <fabiob src gnome org>
Date:   Sat May 1 21:05:36 2010 +0200

    Update to new xulrunner API
    
    Patch 81_xulrunner-1.9.1.diff from Debian.
    Author: Mike Hommey <mh+reportbug glandium org>

 mozilla/EventContext.cpp          |   11 +++++++----
 mozilla/MozRegisterComponents.cpp |    1 +
 2 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/mozilla/EventContext.cpp b/mozilla/EventContext.cpp
index 85bb022..3a15ab7 100644
--- a/mozilla/EventContext.cpp
+++ b/mozilla/EventContext.cpp
@@ -36,6 +36,7 @@
 #include <nsIURI.h>
 #include <nsIDOMNSEvent.h>
 #include <nsIDOMNSHTMLElement.h>
+#include <nsIDOMNSElement.h>
 #include <nsIDOMCharacterData.h>
 #include <nsIDOMHTMLButtonElement.h>
 #include <nsIDOMHTMLLabelElement.h>
@@ -518,19 +519,21 @@ nsresult EventContext::GetCSSBackground (nsIDOMNode *node, nsAString& url)
 nsresult EventContext::GetTargetCoords (nsIDOMEventTarget *aTarget, PRInt32 *aX, PRInt32 *aY)
 {
 	/* Calculate the node coordinates relative to the widget origin */
-	nsCOMPtr<nsIDOMNSHTMLElement> elem = do_QueryInterface(aTarget);
+	nsCOMPtr<nsIDOMNSHTMLElement> htmlelem = do_QueryInterface(aTarget);
+	nsCOMPtr<nsIDOMNSElement> elem = do_QueryInterface(aTarget);
 
 	PRInt32 x = 0, y = 0;
 	while (elem)
 	{
 		PRInt32 val;
-		elem->GetOffsetTop(&val);	y += val;
+		htmlelem->GetOffsetTop(&val);	y += val;
 		elem->GetScrollTop(&val);	y -= val;
-		elem->GetOffsetLeft(&val);	x += val;
+		htmlelem->GetOffsetLeft(&val);	x += val;
 		elem->GetScrollLeft(&val);	x -= val;
 
 		nsCOMPtr<nsIDOMElement> parent;
-		elem->GetOffsetParent(getter_AddRefs(parent));
+		htmlelem->GetOffsetParent(getter_AddRefs(parent));
+		htmlelem = do_QueryInterface(parent);
 		elem = do_QueryInterface(parent);
 	}
 	*aX = x;
diff --git a/mozilla/MozRegisterComponents.cpp b/mozilla/MozRegisterComponents.cpp
index 14527b7..edbab09 100644
--- a/mozilla/MozRegisterComponents.cpp
+++ b/mozilla/MozRegisterComponents.cpp
@@ -63,6 +63,7 @@
 #include <nsServiceManagerUtils.h>
 #include <nsDocShellCID.h>
 #include <nsXPCOMCID.h>
+#include <nsXPCOMCIDInternal.h>
 
 #include <glib.h>
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]