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>


skatebiker 2009-03-17 12:01

Re: WebKit engine for default browser
 
In order to conserve internal memory space (10 MB) , I tried the following:

mkdir /media/mmc2/usr_lib
cp /usr/lib/libwebkit-1.0.so.1.0.0 /media/mmc2/usr_lib
remove /usr/lib/libwebkit-1.0.so.1.0.0
ln -s /media/mmc2/usr_lib/libwebkit-1.0.so.1.0.0 libwebkit-1.0.so.1.0.0
the symlink exists (I tested)

But the browser did not start properly in webkit mode.
Why ? For the OS a symlink is the same as a 'real' file ?

fredoll 2009-03-17 12:10

Re: WebKit engine for default browser
 
I think the problem is linked to the fact that your mmc2 is FAT formatted : it doesn't support file attributes ...

TA-t3 2009-03-17 13:35

Re: WebKit engine for default browser
 
Attributes shouldn't matter, a shared lib does not need to have the executable bit set (and if you look in /lib you'll see that they don't).

tso 2009-03-20 21:12

Re: WebKit engine for default browser
 
something dawned on me about that full screen osk. there is one other place where one of the same issues (specifically, that about not including previous input into its text area) shows up, and thats in the terminal.

if one have part of a command written, and tries to use the full screen osk, its text area will show up blank.

this is a behavior thats been around as far back as the 770, iirc. this makes me wonder about how the full screen osk interfaces with the rest of the setup, as the normal osk seems to have no such problems.

jcharpak 2009-03-24 05:02

Re: WebKit engine for default browser
 
Quote:



It's amazing what one little character can do. :)
This is why c is a stupid language.

hns 2009-03-24 08:45

Re: WebKit engine for default browser
 
Quote:

Originally Posted by tso (Post 273345)
something dawned on me about that full screen osk. there is one other place where one of the same issues (specifically, that about not including previous input into its text area) shows up, and thats in the terminal.

I figured out the reason for the wrong text in the full screen keyboard. It's because you have to bind a function to the GtkIMContext retrieve-surrounding signal and call set_surrounding() from there with the content of the textarea. I have this halfway working, except that webkit crashes when the content of the full screen keyboard is committed...

But something else: Do you even bring up the full screen osk for HTML forms in bundyo's libwebkit? I couldn't get the full screen osk at all with the d-pad center button until i figured out how to trigger that (calling gtk_im_context_filter_keypress() in the key release function).

hns 2009-03-24 16:08

Re: WebKit engine for default browser
 
Good news: I think I fixed both the stop button crashes in webkit-eal and most of the on-screen keyboard issues with libwebkit, including copy-paste and editing existing text with the full screen keyboard.

New webkit-eal package is here, see the changes file or garage svn for details.

New libwebkit package is here, that diff is against webkit revision 41128 with bundyo's patch applied. (This also disables most advanced HTML5 features which are enabled in bundyo's build).

Please let me know how this is working for you! Also, let me know what features you're missing for the next major release. I guess it'll be mostly more and better gconf backed options.

tso 2009-03-24 17:30

Re: WebKit engine for default browser
 
Quote:

Originally Posted by hns (Post 274108)
I figured out the reason for the wrong text in the full screen keyboard. It's because you have to bind a function to the GtkIMContext retrieve-surrounding signal and call set_surrounding() from there with the content of the textarea. I have this halfway working, except that webkit crashes when the content of the full screen keyboard is committed...

But something else: Do you even bring up the full screen osk for HTML forms in bundyo's libwebkit? I couldn't get the full screen osk at all with the d-pad center button until i figured out how to trigger that (calling gtk_im_context_filter_keypress() in the key release function).

finger tap all the way ;)

and ill give the new version a spin! :D

tso 2009-03-24 17:51

Re: WebKit engine for default browser
 
just tested a bit, and the text is correctly imported on opening the osk with existing text in a box.

but it still closes the keyboard on a enter event, rather then producing a new line...

tso 2009-03-24 20:07

Re: WebKit engine for default browser
 
seems the new webkit plays havoc with the tear dashboard. specifically, the tabs on the left side shows the text as horizontal, not vertical.

Bundyo 2009-03-24 20:15

Re: WebKit engine for default browser
 
Yep, I'm building a new one, since the hns one is with disabled SVG. I'm also doing some changes.

qwerty12 2009-03-24 20:30

Re: WebKit engine for default browser
 
hns, many, many thanks for actually making browser-ui & browserd for diablo (*shock*) useful. And thanks to Bundyo for his libwebkit work and the awesomeness that is Tear.

But with your libwebkit, both webkit-eal & Tear have the input method mode in caps lock mode for the small keyboard. Maybe AUTOCAP could be used (if not already doing so)?

Also, in your postinst, can you change:
maemo-select-menu-location webkit-settings.desktop tana_fi_settings

to:
Code:

[ -z "$2" ] && maemo-select-menu-location webkit-settings.desktop tana_fi_settings
Should stop asking me (on upgrades only, not new installs) as to where the "Webkit Settings" menu entry should go.

Also, I have an issue of both webkit-eal and tear crashing with some fast presses of the return button with the libwebkit.

Bundyo 2009-03-24 20:54

Re: WebKit engine for default browser
 
The new libwebkit with SVG is uploaded here. It includes hns' fixes to hildon-input-mode.

tso 2009-03-24 20:57

Re: WebKit engine for default browser
 
Quote:

Originally Posted by Bundyo (Post 274289)
The new libwebkit with SVG is uploaded here. It includes hns' fixes to hildon-input-mode.

you still have not fixed the mime type of deb's on your server...

Bundyo 2009-03-24 21:05

Re: WebKit engine for default browser
 
Yup, but you can now use tap and hold -> download. ;)

tso 2009-03-24 21:08

Re: WebKit engine for default browser
 
just noticed something interesting. when the full screen osk is opened, a newline is inserted.

or at least it do when its a empty line already...

i any case, could we be looking at a mixup between the enter on the d-pad, and the return on the keyboard (only on N810)?

tso 2009-03-24 21:09

Re: WebKit engine for default browser
 
Quote:

Originally Posted by Bundyo (Post 274295)
Yup, but you can now use tap and hold -> download. ;)

yep, but its still a "oh, snap" when i tap the link and get a window full of binary-as-ascii...

Bundyo 2009-03-24 21:11

Re: WebKit engine for default browser
 
Quote:

Originally Posted by tso (Post 274297)
yep, but its still a "oh, snap" when i tap the link and get a window full of binary-as-ascii...

Okay, I'll fix it if it is possible with cpanel :)

daperl 2009-03-24 21:13

Re: WebKit engine for default browser
 
Quote:

Originally Posted by Bundyo (Post 274289)
The new libwebkit with SVG is uploaded here. It includes hns' fixes to hildon-input-mode.

Thanks for the update.

Would you mind maintaining a diff per deb. Also, do you think you could create some kind "cook book" for your exact webkit build environment. I've seen earlier where you said you were using scratchbox 2. I was having some lib linking issues with it so I stopped. Also, have you done more to the tools than just a bison upgrade? I'm not there yet, but in the not-too-distant future I want to start chasing some webkit bugs and as of yet, I have not had a successful build of a recent version. Thanks again.

hns 2009-03-24 21:17

Re: WebKit engine for default browser
 
Quote:

Originally Posted by tso (Post 274236)
but it still closes the keyboard on a enter event, rather then producing a new line...

Thanks, will be fixed in the next build.

Quote:

Originally Posted by tso (Post 274279)
seems the new webkit plays havoc with the tear dashboard. specifically, the tabs on the left side shows the text as horizontal, not vertical.

I guess this is caused by disabled SVG support. I'll switch SVG back on again.

tso 2009-03-24 21:22

Re: WebKit engine for default browser
 
bundyo's deb fixed the dashboard issue.

Bundyo 2009-03-24 21:26

Re: WebKit engine for default browser
 
Quote:

Originally Posted by daperl (Post 274302)
Thanks for the update.

Would you mind maintaining a diff per deb. Also, do you think you could create some kind "cook book" for your exact webkit build environment. I've seen earlier where you said you were using scratchbox 2. I was having some lib linking issues with it so I stopped. Also, have you done more to the tools than just a bison upgrade? I'm not there yet, but in the not-too-distant future I want to start chasing some webkit bugs and as of yet, I have not had a successful build of a recent version. Thanks again.

The current diff is 41128 + hns' one. I will post if there are significant changes. My current build environment is Scratchbox 2 only, and whatever i have in my system. Bison 2.2 is required, 2.4 fails. Nothing more I think, maybe hns' can correct me if I forgot something.

daperl 2009-03-24 21:39

Re: WebKit engine for default browser
 
Quote:

Originally Posted by Bundyo (Post 274313)
The current diff is 41128 + hns' one. I will post if there are significant changes. My current build environment is Scratchbox 2 only, and whatever i have in my system. Bison 2.2 is required, 2.4 fails. Nothing more I think, maybe hns' can correct me if I forgot something.

I see, you just added hns' changes. Thanks for the info. Can you upload your latest config.log file? That might help me in times of trouble.

Bundyo 2009-03-24 21:47

Re: WebKit engine for default browser
 
Okay, added config.log there.

I never checked since libwebkit compiled and ran from the first time, seems I'm actually using the older CodeSourcery chain 2005q3-1 and not the newer I installed at the time, so gcc4 is not required. This will help to get libwebkit in extras-devel.

hns 2009-03-24 22:00

Re: WebKit engine for default browser
 
We should really get that code (and patches) into some SVN repository somewhere.

daperl 2009-03-24 22:04

Re: WebKit engine for default browser
 
Thank you. Okay, 3 last questions and then I'll leave you alone (for now). So, should the following work for me:

Update fresh scratchbox 2 install with bison 2.2
download and unpack webkit svn 41128
change to webkit directory
patch
cd build
../autogen.sh --prefix=/usr --with-hildon --with-unicode-backend=glib --disable-dashboard-support --enable-optimizations --enable-workers --with-http-backend=curl
../configure --prefix=/usr --with-hildon --with-unicode-backend=glib --disable-dashboard-support --enable-optimizations --enable-workers --with-http-backend=curl --disable-xslt
make

Why do you cd to build? Is it because someone broke the GTK build?

Bundyo 2009-03-24 22:05

Re: WebKit engine for default browser
 
Maybe a garage project would be good.

Bundyo 2009-03-24 22:06

Re: WebKit engine for default browser
 
I don't cd, the debian rules script is :) Just get the patch, the debian dir is in it.

daperl 2009-03-24 22:12

Re: WebKit engine for default browser
 
Quote:

Originally Posted by Bundyo (Post 274328)
I don't cd, the debian rules script is :) Just get the patch, the debian dir is in it.

I lied. You just go straight to dpkg-buildpackage?

Bundyo 2009-03-24 22:27

Re: WebKit engine for default browser
 
Yup.

sb2 dpkg-buildpackage -rfakeroot


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

vBulletin® Version 3.8.8