diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2003-12-01 08:32:57 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2003-12-01 08:32:57 +0800 |
commit | 7e9943da6c25d64cfebd70c94f6a29d97e33d53b (patch) | |
tree | 8f5cf2995f202715de4247e36a50b6589ab4fb73 /www | |
parent | 38068195be838465d72f9e9a18b2c2b4c8118b86 (diff) | |
download | marcuscom-ports-7e9943da6c25d64cfebd70c94f6a29d97e33d53b.tar.gz marcuscom-ports-7e9943da6c25d64cfebd70c94f6a29d97e33d53b.tar.zst marcuscom-ports-7e9943da6c25d64cfebd70c94f6a29d97e33d53b.zip |
Fix the build with Mozilla 1.6.a.
Obtained from: Epiphany CVS
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@1385 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'www')
-rw-r--r-- | www/epiphany/files/patch-embed_mozilla_EphyWrapper.cpp | 72 |
1 files changed, 68 insertions, 4 deletions
diff --git a/www/epiphany/files/patch-embed_mozilla_EphyWrapper.cpp b/www/epiphany/files/patch-embed_mozilla_EphyWrapper.cpp index f3575e0ab..a1d510768 100644 --- a/www/epiphany/files/patch-embed_mozilla_EphyWrapper.cpp +++ b/www/epiphany/files/patch-embed_mozilla_EphyWrapper.cpp @@ -1,6 +1,14 @@ ---- embed/mozilla/EphyWrapper.cpp.orig Sat Nov 1 22:42:25 2003 -+++ embed/mozilla/EphyWrapper.cpp Sat Nov 1 22:53:59 2003 -@@ -582,8 +582,13 @@ +--- embed/mozilla/EphyWrapper.cpp.orig Fri Oct 17 18:57:27 2003 ++++ embed/mozilla/EphyWrapper.cpp Sun Nov 30 18:57:18 2003 +@@ -74,6 +74,7 @@ + #include "nsIPresContext.h" + #include "nsIAtom.h" + #include "nsIDocumentCharsetInfo.h" ++#include "nsPromiseFlatString.h" + #include "ContentHandler.h" + #include "EphyEventListener.h" + +@@ -590,8 +591,13 @@ nsCOMPtr<nsIDocument> doc = do_QueryInterface(DOMDocument); if(!doc) return NS_ERROR_FAILURE; @@ -14,7 +22,7 @@ return uri->GetSpec (url); } -@@ -600,8 +605,13 @@ +@@ -608,8 +614,13 @@ nsCOMPtr<nsIDocument> doc = do_QueryInterface(DOMDocument); if(!doc) return NS_ERROR_FAILURE; @@ -28,3 +36,59 @@ uri->GetSpec (url); +@@ -773,23 +784,13 @@ + info = g_new0 (EphyEncodingInfo, 1); + *infoptr = info; + +-#if MOZILLA_SNAPSHOT >= 10 +- nsCAutoString enc; +- result = doc->GetDocumentCharacterSet (enc); +- if (NS_FAILED (result)) return NS_ERROR_FAILURE; +- +- info->encoding = g_strdup (enc.get()); +-#else +- nsAutoString enc; +- result = doc->GetDocumentCharacterSet (enc); +- if (NS_FAILED (result)) return NS_ERROR_FAILURE; +- +- info->encoding = g_strdup (NS_ConvertUCS2toUTF8(enc).get()); +-#endif +- + PRInt32 source; ++#if MOZILLA_SNAPSHOT > 11 ++ source = doc->GetDocumentCharacterSetSource (); ++#else + result = doc->GetDocumentCharacterSetSource (&source); + if (NS_FAILED (result)) return NS_ERROR_FAILURE; ++#endif + info->encoding_source = (EphyEncodingSource) source; + + nsCOMPtr<nsIDocShell> ds; +@@ -831,7 +832,27 @@ + &result); + if (NS_FAILED(result) || !mdv) return NS_ERROR_FAILURE; + ++#if MOZILLA_SNAPSHOT > 11 ++ const nsACString& charsetEnc = doc->GetDocumentCharacterSet (); ++ if (charsetEnc.IsEmpty()) return NS_ERROR_FAILURE; ++ ++ info->encoding = g_strdup (PromiseFlatCString(charsetEnc).get()); ++#elif MOZILLA_SNAPSHOT >= 10 ++ nsCAutoString charsetEnc; ++ result = doc->GetDocumentCharacterSet (charsetEnc); ++ if (NS_FAILED (result)) return NS_ERROR_FAILURE; ++ ++ info->encoding = g_strdup (charsetEnc.get()); ++#else ++ nsAutoString charsetEnc; ++ result = doc->GetDocumentCharacterSet (charsetEnc); ++ if (NS_FAILED (result)) return NS_ERROR_FAILURE; ++ ++ info->encoding = g_strdup (NS_ConvertUCS2toUTF8(charsetEnc).get()); ++#endif ++ + #if MOZILLA_SNAPSHOT >= 10 ++ nsCAutoString enc; + result = mdv->GetDefaultCharacterSet (enc); + if (NS_FAILED (result)) return NS_ERROR_FAILURE; + info->default_encoding = g_strdup (enc.get()); |