]>
Commit | Line | Data |
---|---|---|
b740f3d9 | 1 | --- a/mozilla/EventContext.cpp |
2 | +++ b/mozilla/EventContext.cpp | |
3 | @@ -35,6 +35,7 @@ | |
4 | #include <nsIDOMXULDocument.h> | |
5 | #include <nsIURI.h> | |
6 | #include <nsIDOMNSEvent.h> | |
7 | +#include <nsIDOMNSElement.h> | |
8 | #include <nsIDOMNSHTMLElement.h> | |
9 | #include <nsIDOMCharacterData.h> | |
10 | #include <nsIDOMHTMLButtonElement.h> | |
11 | @@ -518,20 +519,21 @@ | |
12 | nsresult EventContext::GetTargetCoords (nsIDOMEventTarget *aTarget, PRInt32 *aX, PRInt32 *aY) | |
13 | { | |
14 | /* Calculate the node coordinates relative to the widget origin */ | |
15 | - nsCOMPtr<nsIDOMNSHTMLElement> elem = do_QueryInterface(aTarget); | |
16 | + nsCOMPtr<nsIDOMNSHTMLElement> nsHTMLElem (do_QueryInterface(aTarget)); | |
17 | ||
18 | PRInt32 x = 0, y = 0; | |
19 | - while (elem) | |
20 | + while (nsHTMLElem) | |
21 | { | |
22 | PRInt32 val; | |
23 | - elem->GetOffsetTop(&val); y += val; | |
24 | - elem->GetScrollTop(&val); y -= val; | |
25 | - elem->GetOffsetLeft(&val); x += val; | |
26 | - elem->GetScrollLeft(&val); x -= val; | |
27 | + nsCOMPtr<nsIDOMNSElement> nsElem (do_QueryInterface(nsHTMLElem)); | |
28 | + nsHTMLElem->GetOffsetTop(&val); y += val; | |
29 | + nsElem->GetScrollTop(&val); y -= val; | |
30 | + nsHTMLElem->GetOffsetLeft(&val); x += val; | |
31 | + nsElem->GetScrollLeft(&val); x -= val; | |
32 | ||
33 | nsCOMPtr<nsIDOMElement> parent; | |
34 | - elem->GetOffsetParent(getter_AddRefs(parent)); | |
35 | - elem = do_QueryInterface(parent); | |
36 | + nsHTMLElem->GetOffsetParent (getter_AddRefs (parent)); | |
37 | + nsHTMLElem = do_QueryInterface(parent); | |
38 | } | |
39 | *aX = x; | |
40 | *aY = y; | |
41 | --- a/mozilla/MozRegisterComponents.cpp~ 2009-07-25 10:08:06.182333088 +0200 | |
42 | +++ b/mozilla/MozRegisterComponents.cpp 2009-07-25 12:06:46.254122116 +0200 | |
43 | @@ -44,6 +44,7 @@ | |
44 | ||
45 | #ifdef HAVE_NSIXULAPPINFO_H | |
46 | #include <nsXULAppAPI.h> | |
47 | +#include <nsXPCOMCIDInternal.h> | |
48 | #include "EphyXULAppInfo.h" | |
49 | #endif | |
50 |