Re: [webkit-dev] WebKit displays page source instead of rendering html (Gtk+DirectfFB)

2010-01-26 Thread Jenson Lui
Hello all,

   You are using gtk port of webkit? If it is, check the MIME datatype
of your target board
(/usr/share/mime) as the glib is using it.

Regards,
jenson

On Wed, Jan 27, 2010 at 11:17 AM, Richard Kung richardk...@linpus.com wrote:
 Hi all,

 This may be an old question, but I can't find an answer on internet.

 WebKit is cross-compiled for ARM against Gtk+DirectfFB.
 GtkLauncher can render http://www.google.com and many other websites I
 tried.
 But it just won't render local html files.
 $ ./GtkLauncer file://testfile.html
 It opens the file and displays page source like plain text.

 I don't have this problem on x86. Any suggestion?

 Richard


 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] want to port JIT to MIPS - why GtkLaunder needs gcc?

2009-03-18 Thread Jenson Lui
Hello,

  Do you mean the Programs/GtkLauncher? Since the GtkLauncher is a wrapper
script and will create the actual lt-GtkLauncher under
Programs/.libs/.  My way is to
just run the Programs/GtkLauncher in host (with your cross toolchain
in PATH) and let
the script create the lt-GtkLauncher. Just ignore the error and copy the
Programs/.libs/lt-GtkLauncher created to your target.
 Hope this helps.

Regards,
Jenson

2009/3/19 x yz last...@yahoo.com:

 we cross-compiled webkit and when we run GtkLaunder it says /bin/...gcc not 
 found.
 thanks for help.
 rgds
 joe



 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] strange behaviour when loading local webpage using file://

2009-03-02 Thread Jenson Lui
Hello all,

After some codes trace and I find that the g_file_info_get_content_type
is not function properly on my target board. So I wrote a simple test program
to test the g_file_info_get_content_type and discover that my target root
fs is missing the MIME database. By copy the MIME database, everything is
working fine now.
 Anyway, thanks for the helps!

Regards,
Jenson

 On Sun, Mar 1, 2009 at 6:48 AM, x yz last...@yahoo.com wrote:

 you cross compile to which CPU/OS? using which version/compiler?


 --- On Sat, 2/28/09, Jenson Lui jhn...@gmail.com wrote:

 From: Jenson Lui jhn...@gmail.com
 Subject: Re: [webkit-dev] strange behaviour when loading local webpage 
 using file://
 To: webkit-dev@lists.webkit.org
 Date: Saturday, February 28, 2009, 4:32 PM
 Hello,

   hmm...actually I did a search and only find something
 related by
 Dhananjoy Chutia's email. However, look like no one
 reply to
 the issue (or i miss the email reply?) It would be nice if
 anyone can
 help to copy the reply or show the link to it. Thanks!

 Regards,
 Hung

 the email is quoted here
 begin==
 Hi,
  Here are some observations:

 When I try to load file:///home/dhananjoy/index.html , the
 following error
 is shown.
 GLib-GIO-CRITICAL **: g_file_read_async: assertion
 `G_IS_FILE (file)'
 failed.

 As per my observation d-m_gfile is not NULL upto the
 statement
  client-didReceiveResponse(handle, response); : line no
 590 in
 WebCore/platform/network/soup/ResourceHandleSoup.cpp
 But, afterward d-m_gfile becomes NULL.

 It is to be noted that my I am using glib-2.15.3.

 Regards
 Dhananjoy
 end==

 On Sat, Feb 28, 2009 at 1:36 AM, x yz
 last...@yahoo.com wrote:
 
  search for previous discussions.
 
 
  --- On Fri, 2/27/09, Jenson Lui
 jhn...@gmail.com wrote:
 
  From: Jenson Lui jhn...@gmail.com
  Subject: [webkit-dev] strange behaviour when
 loading local webpage using file://
  To: webkit-dev@lists.webkit.org
  Date: Friday, February 27, 2009, 3:52 PM
  Hello all,
 
          I encounter a strange problem.
  I cross compile latest webkit engine and use it in
 my
  application.
  When I try to load a web page from local using
 file://,
  instead of
  rendering the html,
  the actual html text is display, i.e.
  html... is shown.
  I try the lt-Gtklauncher in my target, same
 result.
  However, when I try the x86 build of the same
 revision with
  the same html page.
  The html page is rendered as normal.
  I am using the same set of options when do the
 cross
  compile  x86 build.
  I am not sure if there is anything wrong? Does
 anyone have
  the same problem?
 
  Thanks!
 
  Regards,
  Jenson
  ___
  webkit-dev mailing list
  webkit-dev@lists.webkit.org
 
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
 
 
 
 
 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev





___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] WebKitGTK+ 1.1.1 released

2009-03-01 Thread Jenson Lui
Hello,

   May I ask which revision of webkit it is based on.

Regards,
Jenson

On Mon, Mar 2, 2009 at 2:06 AM, Christian Dywan christ...@twotoasts.de wrote:
 Heya,

 in the past months the activity of WebKitGTK+ has been increasing
 greatly and we are really coming nearer to a real good tool here. So I
 proudly announce the release of WebKitGTK+ 1.1.1.

 http://cafe.minaslivre.org/webkit/webkit-1.1.1.tar.gz

 md5sum: d3a5d7233beab310e9d3e5568fae49a1

 For the moment Gustavo is kindly providing space to host the tarball
 while we are working on a website and space to use in the future. We
 also plan to release more often from now on, with the next release
 coming right in time for GNOME 2.26.

 The NEWS file for this release:

 
 WebKitGTK+ 1.1.1
 

 What's new in WebKitGTK+ 1.1.1?

  - ABI compatibility with 1.0.3 was broken, so you will need to
    recompile your application against 1.1.1
  - Support for the CURL backend was dropped, libsoup is the only HTTP
    backend now.
  - webkit_get_default_session, to get the SoupSession used internally
    by WebKit.
  - 'create-web-view' signal, emitted when the creation of a new
    window is requested.
  - 'navigation-policy-decision-requested' signal, emitted when a
    navigation to another page is requested.
  - 'mime-type-policy-decision-requested' signal, emitted each time
    WebKit is about to show a URI with a given MIME type.
  - Support for the Web Inspector
    (see http://webkit.org/blog/197/web-inspector-redesign/)
  - HTTP authentication support, with optional gnome-keyring storage.
  - New load functions: webkit_web_view_open, webkit_web_view_load_uri
    and webkit_web_view_load_request. The old
    webkit_web_view_load_string and webkit_web_view_load_html_string
    are now deprecated.
  - webkit_web_view_reload_bypass_cache
  - webkit_web_view_{get,set}_custom_encoding, to override the
    encoding of the current page.
  - Improved stability and lots of bugfixes.

 So fetch the tarball now!

 Yours,
    Christian
    on behalf of the WebKitGTK+ team
 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] strange behaviour when loading local webpage using file://

2009-02-28 Thread Jenson Lui
Hello,

  hmm...actually I did a search and only find something related by
Dhananjoy Chutia's email. However, look like no one reply to
the issue (or i miss the email reply?) It would be nice if anyone can
help to copy the reply or show the link to it. Thanks!

Regards,
Hung

the email is quoted here
begin==
Hi,
 Here are some observations:

When I try to load file:///home/dhananjoy/index.html , the following error
is shown.
GLib-GIO-CRITICAL **: g_file_read_async: assertion `G_IS_FILE (file)'
failed.

As per my observation d-m_gfile is not NULL upto the statement
 client-didReceiveResponse(handle, response); : line no 590 in
WebCore/platform/network/soup/ResourceHandleSoup.cpp
But, afterward d-m_gfile becomes NULL.

It is to be noted that my I am using glib-2.15.3.

Regards
Dhananjoy
end==

On Sat, Feb 28, 2009 at 1:36 AM, x yz last...@yahoo.com wrote:

 search for previous discussions.


 --- On Fri, 2/27/09, Jenson Lui jhn...@gmail.com wrote:

 From: Jenson Lui jhn...@gmail.com
 Subject: [webkit-dev] strange behaviour when loading local webpage using 
 file://
 To: webkit-dev@lists.webkit.org
 Date: Friday, February 27, 2009, 3:52 PM
 Hello all,

         I encounter a strange problem.
 I cross compile latest webkit engine and use it in my
 application.
 When I try to load a web page from local using file://,
 instead of
 rendering the html,
 the actual html text is display, i.e.
 html... is shown.
 I try the lt-Gtklauncher in my target, same result.
 However, when I try the x86 build of the same revision with
 the same html page.
 The html page is rendered as normal.
 I am using the same set of options when do the cross
 compile  x86 build.
 I am not sure if there is anything wrong? Does anyone have
 the same problem?

 Thanks!

 Regards,
 Jenson
 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev




___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


[webkit-dev] strange behaviour when loading local webpage using file://

2009-02-26 Thread Jenson Lui
Hello all,

I encounter a strange problem.
I cross compile latest webkit engine and use it in my application.
When I try to load a web page from local using file://, instead of
rendering the html,
the actual html text is display, i.e. html... is shown.
I try the lt-Gtklauncher in my target, same result.
However, when I try the x86 build of the same revision with the same html page.
The html page is rendered as normal.
I am using the same set of options when do the cross compile  x86 build.
I am not sure if there is anything wrong? Does anyone have the same problem?

Thanks!

Regards,
Jenson
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Error Handling in webkit

2009-02-19 Thread Jenson Lui
Hello,

 For the errorcode, my code just directly pass the curl error
code. Refer to the
curl header file for the error code and do a curl error - http error convert.

Regards,
Jenson


On Thu, Feb 19, 2009 at 9:02 PM, Nitin Walke nitwa...@gmail.com wrote:
 Hi,
 Finally I can get errorcode in gtkapplication.Thanks for your
 suggestion.
 I have emitted a GTK signal (error-load-page) in the
 FrameLoaderClientGtk::shouldFallBack method
 and handled it in gtkapplication.
 Here I can get errorcode but errorcode are not matching with standard
 errorcode.For wrong url ie HTTP error it give errorcode '6' but standard
 errorcode is '404',
 for security exception it gives errorcode is '60'.If network is not
 available then errorcode is '7'.
 How can I do mapping this errorcode with standard errorcode?How can I give
 proper errormessage on browser using this errorcode?

 Regards,
 Nitin


___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Error Handling in webkit

2009-02-17 Thread Jenson Lui
Hello all,

   Here is one of the ways to send the error signal to the upper layer from
the webkit core codes. Basically I just comment out the
ASSERT code in DocumentLoader::mainReceiveError()
and emit a GTK signal (error-load-page) in the
FrameLoaderClientGtk::shouldFallBack.
with the corresponding error code from Curl. So the main application
could just subscribe
the signal error-load-page, do error handling when the signal callback.

However, as I am new to webkit, I am not sure if it is the proper way
to fire event in this
particular method. Or someone could show me a better way to do it.

Please note my webkit build is using r41053, GTK+ and Curl backend.
Enjoy!

Regards,
Jenson

Hi all
How can I do error handling in webkit? Suppose I have given wrong URL then
how can I show proper message? How can I handle this situation?Can you give
sample example?

Thanks in advance..

Regards,
Nitin Walke
Index: WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
===
--- WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp	(revision 41053)
+++ WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp	(working copy)
@@ -803,9 +803,12 @@
 return ResourceError(, 0, , );
 }
 
-bool FrameLoaderClient::shouldFallBack(const ResourceError)
+bool FrameLoaderClient::shouldFallBack(const ResourceError error)
 {
-notImplemented();
+//notImplemented();
+gint errorCode = error.errorCode();
+WebKitWebView* webView = getViewFromFrame(m_frame);
+g_signal_emit_by_name(webView, error-load-page, (gpointer)errorCode);
 return false;
 }
 
Index: WebKit/gtk/webkit/webkitwebview.cpp
===
--- WebKit/gtk/webkit/webkitwebview.cpp	(revision 41053)
+++ WebKit/gtk/webkit/webkitwebview.cpp	(working copy)
@@ -132,6 +132,7 @@
 COPY_CLIPBOARD,
 PASTE_CLIPBOARD,
 CUT_CLIPBOARD,
+ERROR_LOAD_PAGE,
 LAST_SIGNAL
 };
 
@@ -1376,6 +1377,24 @@
 g_cclosure_marshal_VOID__VOID,
 G_TYPE_NONE, 0);
 
+/**
+  * WebKitWebView::error-load-page:
+  * @web_view: the object which received the signal
+  *
+  * The #WebKitWebView::error-load-page signal is a signal which
+  * gets emitted when there is error when loading the page.
+  *
+  */
+ webkit_web_view_signals[ERROR_LOAD_PAGE] = g_signal_new(error-load-page,
+ G_TYPE_FROM_CLASS(webViewClass),
+ (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
+ 0,
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__INT,
+ G_TYPE_NONE,1,
+ G_TYPE_INT);
+
 /*
  * implementations of virtual methods
  */
Index: WebCore/platform/network/curl/ResourceHandleManager.cpp
===
--- WebCore/platform/network/curl/ResourceHandleManager.cpp	(revision 41053)
+++ WebCore/platform/network/curl/ResourceHandleManager.cpp	(working copy)
@@ -325,8 +325,10 @@
 curl_easy_getinfo(d-m_handle, CURLINFO_EFFECTIVE_URL, url);
 fprintf(stderr, Curl ERROR for url='%s', error: '%s'\n, url, curl_easy_strerror(msg-data.result));
 #endif
-if (d-client())
-d-client()-didFail(job, ResourceError());
+if (d-client()) {
+ResourceError error = ResourceError(String(), (int)msg-data.result, String(), String());
+d-client()-didFail(job, error);
+}
 }
 
 removeFromCurl(job);
Index: WebCore/loader/DocumentLoader.cpp
===
--- WebCore/loader/DocumentLoader.cpp	(revision 41053)
+++ WebCore/loader/DocumentLoader.cpp	(working copy)
@@ -255,7 +255,7 @@
 
 void DocumentLoader::mainReceivedError(const ResourceError error, bool isComplete)
 {
-ASSERT(!error.isNull());
+//ASSERT(!error.isNull());
 
 #if ENABLE(OFFLINE_WEB_APPLICATIONS)
 ApplicationCacheGroup* group = m_candidateApplicationCacheGroup;
Index: WebKitTools/GtkLauncher/main.c
===
--- WebKitTools/GtkLauncher/main.c	(revision 41053)
+++ WebKitTools/GtkLauncher/main.c	(working copy)
@@ -65,6 +65,13 @@
 }
 
 static void
+error_load_page_cb (WebKitWebView* page, gpointer data)
+{
+	gint *error= (gint *)data;
+	g_printf(Error loading page, return:[%d]\n, *error);
+}
+
+static void
 title_change_cb (WebKitWebView* web_view, WebKitWebFrame* web_frame, const gchar* title, gpointer data)
 {
 if (main_title)
@@ -119,6 +126,7 @@
 g_signal_connect (G_OBJECT (web_view), load-progress-changed, G_CALLBACK (progress_change_cb), web_view);
 g_signal_connect (G_OBJECT (web_view), load-committed, G_CALLBACK (load_commit_cb), web_view);
 g_signal_connect (G_OBJECT (web_view), hovering-over-link, G_CALLBACK (link_hover_cb), web_view);
+g_signal_connect (G_OBJECT