[gnome-web-photo] Port to xulrunner 1.9.2



Hi,

Here's a patch to port xulrunner to 1.9.2. There's also a second patch
to apparently make sure we use some API in the correct order (see
https://bugzilla.novell.com/show_bug.cgi?id=611541#c1)

Thanks,

Vincent

-- 
Les gens heureux ne sont pas pressés.
>From ffc24447bf4fb8f0af9ab0a279869a68e86194b0 Mon Sep 17 00:00:00 2001
From: Vincent Untz <vuntz gnome org>
Date: Fri, 4 Jun 2010 12:51:47 +0200
Subject: [PATCH 1/2] Port to xulrunner 1.9.2

---
 m4/libxul.m4   |    2 +-
 src/Writer.cpp |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/m4/libxul.m4 b/m4/libxul.m4
index ef275fe..cb1fdd6 100644
--- a/m4/libxul.m4
+++ b/m4/libxul.m4
@@ -59,7 +59,7 @@ libxul_cv_sdkdir="$($PKG_CONFIG --variable=sdkdir $libxul_cv_libxul_pkg)"
 # I can figure this out, do it like this:
 libxul_cv_libdir="$($PKG_CONFIG --variable=sdkdir $libxul_cv_libxul_pkg)/bin"
 
-libxul_cv_includes="$($PKG_CONFIG --cflags-only-I libxul-unstable libxul)"
+libxul_cv_includes="$($PKG_CONFIG --cflags-only-I libxul)"
 
 AC_DEFINE([HAVE_LIBXUL],[1],[Define for libxul])
 
diff --git a/src/Writer.cpp b/src/Writer.cpp
index 48d6675..1e974b3 100644
--- a/src/Writer.cpp
+++ b/src/Writer.cpp
@@ -197,7 +197,7 @@ Writer::Write()
       width = NSAppUnitsToIntPixels(cutout.width, p2a);
       height = NSAppUnitsToIntPixels(cutout.height, p2a);
 
-      rv = presShell->RenderDocument(cutout, PR_FALSE, PR_TRUE,
+      rv = presShell->RenderDocument(cutout, nsIPresShell::RENDER_IGNORE_VIEWPORT_SCROLLING,
                                      NS_RGB(255, 255, 255), context);
       if (NS_SUCCEEDED(rv)) {
         imgContext->DrawSurface(surface, gfxSize(width, height));
-- 
1.7.1

>From faa8b3aba76c128718e4ee337b8f9ae3a4aeea64 Mon Sep 17 00:00:00 2001
From: Wolfgang Rosenauer <wolfgang rosenauer org>
Date: Fri, 4 Jun 2010 12:52:27 +0200
Subject: [PATCH 2/2] Call setup before GetContentDOMWindow

It should happen in this order.

See http://bugzilla.novell.com/show_bug.cgi?id=611541#c1
---
 src/Listener.cpp |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/Listener.cpp b/src/Listener.cpp
index 7b4a036..09a40c0 100644
--- a/src/Listener.cpp
+++ b/src/Listener.cpp
@@ -56,6 +56,15 @@ Listener::Attach ()
   gtk_moz_embed_get_nsIWebBrowser (mEmbed, getter_AddRefs (browser));
   NS_ENSURE_TRUE (browser, rv);
 
+  nsCOMPtr<nsIWebBrowserSetup> setup (do_QueryInterface (browser, &rv));
+  NS_ENSURE_SUCCESS (rv, rv);
+
+  rv = setup->SetProperty (nsIWebBrowserSetup::SETUP_ALLOW_META_REDIRECTS, PR_FALSE);
+  /* set this for now, since sizing doesn't work right with frames */
+  rv |= setup->SetProperty (nsIWebBrowserSetup::SETUP_ALLOW_SUBFRAMES , PR_FALSE);
+  rv |= setup->SetProperty (nsIWebBrowserSetup::SETUP_USE_GLOBAL_HISTORY , PR_FALSE);
+  NS_ENSURE_SUCCESS (rv, rv);
+
   nsCOMPtr<nsIDOMWindow> domWin;
   rv = browser->GetContentDOMWindow (getter_AddRefs (domWin));
   NS_ENSURE_SUCCESS (rv, rv);
@@ -72,14 +81,6 @@ Listener::Attach ()
 
   mAttached = PR_TRUE;
 
-  nsCOMPtr<nsIWebBrowserSetup> setup (do_QueryInterface (browser, &rv));
-  NS_ENSURE_SUCCESS (rv, rv);
-
-  rv = setup->SetProperty (nsIWebBrowserSetup::SETUP_ALLOW_META_REDIRECTS, PR_FALSE);
-  /* set this for now, since sizing doesn't work right with frames */
-  rv |= setup->SetProperty (nsIWebBrowserSetup::SETUP_ALLOW_SUBFRAMES , PR_FALSE);
-  rv |= setup->SetProperty (nsIWebBrowserSetup::SETUP_USE_GLOBAL_HISTORY , PR_FALSE);
-
   return rv;
 }
 
-- 
1.7.1



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