maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   WebKit engine for default browser (https://talk.maemo.org/showthread.php?t=25752)

hns 2009-03-16 17:48

Re: WebKit engine for default browser
 
I uploaded a new interim package to my site, source code is in the garage repository. The new features in 0.0.9.5 are:
  • Implement tap-and-hold context menu for open-link-in-new-window functionality
  • Check for connection status on page load and request a connection if necessary
  • Remember zoom level between sessions

And the accumulated list of changes since pronvit's 0.0.9 release:
  • Switch to bundyo's libwebkit package
  • Re-implement kinetic scrolling
  • Make Plugins and Javascript switchable via browser UI
  • Implement simple save-as file download functionality
  • Make install script less intrusive, but require browser-daemon restart or reboot for first install
  • Improve browser engine chooser applet
  • Implement back/forward button popup menu

Unfortunately, I couldn't figure out the stop button crashes so far. If you press the stop button after the first bytes of a page have been read but before the main resource is fully loaded, the engine is pretty likely to crash. I can't reproduce this with Tear, so it must be something with the webkit-eal code. I'm having a hard time debugging browserd in a meaningful way, any help is greatly appreciated.

Apart from the stop button, the code is pretty stable for me now, so I guess the next release will be a more official 0.0.11. Just remember to restart the browser daemon or reboot your tablet if you upgrade from pronvit's package or get any strange behaviour, and let me know how this is working for you.

tso 2009-03-16 17:58

Re: WebKit engine for default browser
 
the crashes would not be so bad, if it only loaded webkit rather then a partially broken microb (iirc).

hns 2009-03-16 18:33

Re: WebKit engine for default browser
 
Quote:

Originally Posted by tso (Post 272083)
the crashes would not be so bad, if it only loaded webkit rather then a partially broken microb (iirc).

You mean it uses the microb engine, ignoring the setting in the browser engine chooser? This happens sometimes, restarting the browser daemon (as root) helps:

/etc/init.d/tablet-browser-daemon restart

Another interesting thing I noticed is that webkit is much slower when booting from SD-card on my N800, even a fast Sandisk Extreme III, than when booting from internal flash. No idea why this is so, but I found it a bit surprising.

qole 2009-03-16 18:56

Re: WebKit engine for default browser
 
hns: Thanks for picking up the torch here.

tso 2009-03-16 19:10

Re: WebKit engine for default browser
 
Quote:

Originally Posted by hns (Post 272089)
You mean it uses the microb engine, ignoring the setting in the browser engine chooser? This happens sometimes, restarting the browser daemon (as root) helps:

/etc/init.d/tablet-browser-daemon restart

no, iirc, sometimes the the webkit engine would crash (say thanks to the stop button issue) but then browserd would recover without the browser window closing.

but then it would use microb rather then webkit, and would have some odd input issues that i do not recall the specifics off, sadly...

interesting, i just tried to follow a link, then stop the browser before a connection was made (the tablet was disconnected from wifi), end result, it stopped fine, the connection came up then it tried to download the page, only to crash the whole browser window...

skatebiker 2009-03-16 19:14

Re: WebKit engine for default browser
 
I tried the Webkit engine for Microb.

It is faster than microb.
Maybe stupid questiion, does it support cookies ? (Local) sites using cookies do not recognize any cookie.
And opening wikimapia opens a lot faster but I cannot drag on the map. Is this normal ?

hns 2009-03-16 20:03

Re: WebKit engine for default browser
 
Quote:

Originally Posted by tso (Post 272100)
no, iirc, sometimes the the webkit engine would crash (say thanks to the stop button issue) but then browserd would recover without the browser window closing.

but then it would use microb rather then webkit, and would have some odd input issues that i do not recall the specifics off, sadly...

I was refering to that behaviour, except I didn't notice the input issues.

Quote:

interesting, i just tried to follow a link, then stop the browser before a connection was made (the tablet was disconnected from wifi), end result, it stopped fine, the connection came up then it tried to download the page, only to crash the whole browser window...
It's amazing what one little character can do. :) I just built and uploaded a fixed package. Thanks for the find!

skatebiker 2009-03-17 07:54

Re: WebKit engine for default browser
 
Can the developer of this webkit check whether cookies do not work ?
Here an example URL to reproduce, it is an RPN and expression javascript scientific calculator which saves its data (RPN stack and numbers) as a cookie, so a reload of the page retains the numbers on the stack which is similar to the good old 'permanent memory' calculators.
http://tools.velp.info/scicalc.html
This works in ANY browser, even on Nokia phone mobile browsers, except this webkit engine where it always starts with 0, so it is easy to reproduce.

hns 2009-03-17 08:28

Re: WebKit engine for default browser
 
Quote:

Originally Posted by skatebiker (Post 272251)
Can the developer of this webkit check whether cookies do not work ?

Cookies are working for me, but you are right, they don't seem to work on that calculator page. It may be an issue with script-generated cookies (vs. server generated ones). I can't find a setting for this in WebKit, but I'll look into it.

skatebiker 2009-03-17 10:55

Re: WebKit engine for default browser
 
Quote:

Originally Posted by hns (Post 272254)
Cookies are working for me, but you are right, they don't seem to work on that calculator page. It may be an issue with script-generated cookies (vs. server generated ones). I can't find a setting for this in WebKit, but I'll look into it.

Here I'll show you the javascript which generates the cookies:

I hope this will help you, e.g. by creating a simple page which just does as listed below.

BTW I use these files also locally (i.e. with file://). I have a scrabble game which uses the same functions for saving the game which works excellent on all browsers except the webkit engine on microb.

Hope this helps you to looking at this problem.

Code:


<!-- saved from url=(0014)about:internet -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
  <head>
    <title>cookie test</title>
    </head>
<body>
<script type="text/javascript">

function getcookievalue(name)
{
    var ind;
    name += '=';
    str = document.cookie;
    if ((ind = str.indexOf(name)) != -1)
    {
        var end = str.indexOf(';', ind);
        if (end == -1) end = str.length;
        str = str.substr(ind+name.length, end-ind-name.length);
        str = unescape(str);
        return str;
    }
    return '';
}

function setcookievalue(name, value)
{
    name += '=';
    var expDays = 100;
    var exp = new Date();
    exp.setTime(exp.getTime() + (expDays*24*60*60*1000));

    var expire = '; expires=' + exp.toGMTString();
    var str = name + escape(value) + expire;
    document.cookie = str;
}

alert(getcookievalue('test'));
setcookievalue('test', new Date());


</script>
</body>
</html>



All times are GMT. The time now is 10:39.

vBulletin® Version 3.8.8