WebPositive emerges

Blog post by stippi on Tue, 2010-03-02 21:18

Wow, it's been 10 days already since I posted my first blog entry on my work on WebKit and the native web browser. Of course my continous updates to the package I posted in my first article will probably have spoiled most of the surprise, but HaikuLauncher has been reduced again into just a bare browser shell, while a new codebase, WebPositive, has been split off from it. Using WebPositive has become a whole lot more pleasing in the meantime. For those of you who have not followed the comments to the original blog, these are the things implemented since my first post on the project:

  • Big WebKit API cleanup (BWebView, BWebPage, etc).
  • Fixed crashes and oddities with downloads.
  • Fixed various other crashing bugs.
  • Fixed rendering bugs with transparent text.
  • Vastly improved desktop integration.
  • Big improvements in rendering efficiency.
  • Handling of WebCore navigation events has been greatly improved which results in a lot more sites working.
  • Added stop loading button.
  • Mouse wheel event fixes (Michael Lotz).
  • Fixed dispatching keyboard events to the correct frame (Michael Lotz).
  • Completely rewritten tab view.
  • Favicon support.
  • Many more keyboard shortcuts and some convenience mouse actions (in part by Ryan Leavengood).
  • Rewritten timer implementation has vastly improved redraw lags.
  • Autocompletion for the URL text field (using, with his permission, great quality code from Beam by Oliver Tappe).
  • Smooth scrolling by avoiding to redraw the whole frame on each scroll.

So far, I've been working fulltime on WebPositive, often from ninish in the morning to about midnight, with some pauses in between of course. Except for missing bookmark support and an almost useless browsing history menu (because seemingly unsorted), WebPositive has become quite usable - which makes me very happy of course. Some stuff doesn't work yet, like sending mails in the advanced GMail interface, or clicking links which open new pages from within sub-frames. There need to be application settings, like download location or default fonts. Context menu support is completely missing yet, although some work has already been done to implement them in the original WebKit port. There needs to be persistency across WebPositive sessions. And of course once these more basic features are all in place, I would like to tackle plugin support or maybe HTML5 audio/video support even before that (unless Ryan beats me to it :-). And the browser needs to become an optional package when building Haiku.

All that will probably take the better half of tomorrow, but I should still have some time left for web surfing as a reward.

The feedback I have gotten to my first blog post, but also via mail and in IRC, has been overwhelming! I am glad for the useful feature requests, some of which have been low hanging fruit and I tried to implement them quickly. From what I hear, the donations to Haiku, Inc. have increased a lot, and this makes me feel very glad! Without the sponsoring, I wouldn't be able to work on WebPositive as much as I am right now, and progress would be much slower. Some bugs are really hard to track down and it can be frustrating and take hours. WebPositive would be nowhere as nice to use as it already is without your support! So thank you!

The next days I will just continue by working on any random missing feature that will make basic browsing more usable. Thanks for reading and all the encouragement already given! Oh and I almost forgot:

Download WebPositive (svn revision 444)

Have fun!

Comments

Re: WebPositive emerges

This really is quite impressive - using webpositive to post this comment :)

Am I right in thinking that https support isn't fully functional yet? I attempted to log in to a Salesforce org wiith it, as I think the Salesforce interface will be a great test of the browser, as soon as I log in I'm logged back out again though.

Re: WebPositive emerges

https is working in principle, but there may be problems with certificates. WebPositive also doesn't store cookies yet, so that may be a problem as well. You did install that certs file, though, did you? The certs file sort of hardcodes trusted sites.

Re: WebPositive emerges

Stippi, WebPositive is the fastest browser that I have seem in my life.

Seems that my ADSL connection doubled the speed..

BLAZING FAST!

Re: WebPositive emerges

Great work Stippi (and the other contributors you mentioned)- I'm writing this comment with WebPositive !!!!

Really appreciated,

hey68you

Re: WebPositive emerges

Puh, I don't know about being fast... it certainly launches fast. It may even load pages quite fast, but there is no network cache at all. So I doubt it loads pages as fast as BeZillaBrowser the second time around. :-)

Re: WebPositive emerges

With all the keyboard shortcuts its already a pleasure to use...

One reason more to donate now...
Is there another way to donate within Germany?
To your Account Stippi? Same like Wonderbrush and Exposer?

Re: WebPositive emerges

I just donated some money to Haiku, Inc through WebPositive. So I hope for your sake it works :)

Re: WebPositive emerges

It is realy very fast if you use it on older machines. I just tried to load the haiku-os..org page with Mozilla and WebPositiv...
To open the page in Mozilla it takes about 10sec. With WebPositiv it takes around 4sec.
After fully loading the page i clicked on the webpositiv emerges link which took 4 sec. on Mozilla and 1sec. only on WebPositiv...
I use a P3 400Mhz System for this small tests.

Re: WebPositive emerges

I think WebPositive crashes when trying to access the following site: www.hushmail.com

Re: WebPositive emerges

Wow. This is great! Keep it up stippi!!

Re: WebPositive emerges

I don't have a HushMail account, so I can only check to access the site without logging in, which seems to work fine. Have you tried multiple times? And does it crash only when logging in or just by navigating to the URL you posted? The latter works here.

Re: WebPositive emerges

Excellent work, thanks!

Re: WebPositive emerges

Excellent work! I'm currently sitting in an easy chair with my laptop using WebPositive and wireless internet. Haiku is getting dangerously close to claiming the default option in my boot manager. Rendering is very fast, and even the javascript NES emulator works !

And, since I can't help but make suggestions (and haven't spotted a bug tracker):

  • Facebook caused a crash for me upon logging in.
  • Personally, I'd advise making a "private browsing" mode first, since it's basically how it currently behaves. Then allow whitelisting/blacklisting for persistant cookies, and history options.
  • Status bar text is rather minimal. Consider making it a bit more descriptive: "Locating www.server.com", "Connecting to www.example.com (1.2.3.4)", "Requesting http://www.example.com/page.html", "Downloading http://www.example.com/page.html (Status: 200 - OK)", "Downloading http://www.example.com/image.jpg, http://www.example.net/...ad.js, http://www.example.com/style.css ", "Done".
  • With downloads, NetPositive had a neat feature where the partial file had a progress bar overlayed on its icon (e.g. in Tracker when you opened the containing folder).
  • A nice feature would be for Alt-Y to optimally resize the current page (e.g. so that there's no horizonal scroll bar).

Re: WebPositive emerges

Thanks for the suggestions. The Facebook crash could be either a bug in the Haiku WebKit port, or it could be a problem of the specific WebKit SVN revision we are using. Although that's less likely, it's not completely unlikely. Whenever a version was quite stable, we have been sticking to that version like glue. The problem area here is not WebKit per se, but the fact that we are using the system allocator, whereas the WebKit engines you are used to, in Google Chrome or Safari for example, use another allocator built into WebKit. Using the system allocator can lead to incompatible alignment of memory locations, although the WebCore code which depends on that is actually incorrect, since the malloc() specification does not actually guarantee such alignments. In the particular SVN revision we are using now, the most problematic of this situation has been fixed, but we cannot be sure that a similar problem still exists elsewhere in WebCore code. When WebPositive has matured some more, I will look into trying to switch to the internal WebKit allocator. Experimenting with this is painful, since it changes global defines that require a complete rebuild, so I've avoided it so far. :-)

As for your other suggestions - the status bar becoming more verbose is an easy one. Will do it together with an overhaul of the progress bar, which is also currently not matched to the active page.

The private browsing is indeed available as a feature in WebCore, it can simply be turned on. The persistency features in WebPositive are most important and I'll try to implement them one by one. Exposure to the GUI will come later, since I personally never bother with this stuff in any browser, I just want it to work.

The overlay on icons of downloaded files is definitely a cool feature, but it's a bit more involved to do now with the vector icons. I was thinking to add support for this right in Haiku.

Alt-Y will definitely not become a shortcut for fitting the page, since it is already reserved for Undo. On German keyboards at least, Z and Y are reversed, and that's why Undo has to be on both Alt-Z and Alt-Y.

Re: WebPositive emerges - Stack and Tile browsing suggestion

Hi,

great work, congratulations and many thanks!!

I would love to have tabbed browsing function by means of 'Stack & Tile'.

That would really make WebPositive stand out of the crowd, both as browser and native app,
in all its simplicity, uniqueness, beauty and glory ;)

Cheers,
JDf

Re: WebPositive emerges

Ryan had the idea to use Stack & Tile for tabbed browsing since a long time, and I've been thinking along the same lines. But first Stack & Tile has to be integrated properly into Haiku. It is not ready yet, a lot more work needs to be done. Right now, the feature isn't really built into the window management, but kind of "slapped on top" by forcing windows to move and resize together. IMHO, Stack & Tile would integrate tabbed documents while maintaining the idea that a window represents a document. Just consider that DeskBar would display each web page in the window list of WebPositive. The same can be said about Terminal and other apps making use of it.

All that being said, it isn't high priority for me at all, since there would be almost no benefit, except for it being cleaner and system wide. Other missing features in WebPositive really degrade the browsing experience, so I want to work on those first. In order to provide a fully compliant WebKit port, the app_server graphics features will have to be extended anyway (affine transformations, clipping paths, more compositing modes, ...), which is again much more important than Stack & Tile. Hope you understand.

Re: WebPositive emerges

My other post yesterday was flagged as spam, so I'll try again with it slightly reworded. To any admins who notice it in the moderation queue: feel free to delete it.

  • Loading is still not that obvious - a spinning icon in the favicon position of the active tab (and perhaps changing the title of the tab to "Loading...") might make this more obvious.

Re: WebPositive emerges

That list was meant to be much longer, but the Spam filter is really over-zealous.

  • Cursor changes for link hover and loading states would help with instant feedback when a link is hovered/selected.

Re: WebPositive emerges

Maybe the last post...

Could the download window be a bit bigger by default, and positioned relative to the active window? I wonder whether a "download panel" somewhere docked in the browser might look neater (I like the lack of floaters in WonderBrush)

I like that you've got the URL bar contained in the tab, where it logically belongs. It's so annoying to see the firefox URL changing when the tab is switched, even though the address bar is seemingly outside the tab.

On stack and tile: As stippi says, it needs some work. I know people who regularly open more than 20 browser tabs, and I don't know how that would be handled. I agree it would be nice to have a solution on the OS level. Windows 7 does something confusingly half-way - when you alt-tab through windows it presents all tabs from all IE windows separately, however the individual windows still have their own identity in the task bar. That is confusing and should be done better somehow. For now the tabbed solution seems to work OK.

Is caching on your roadmap Stippi? Having the back button be instant would be nice!

Simon

Re: WebPositive emerges

WebKit has internal in-memory caching of resources loaded during one session. And it has the "page cache" which keeps fully loaded/constructed pages alive for a while. The first form of caching obviously works, since back and forward are much faster than initial loading of a page. I had also believed that the page cache was active, but I could be mistaken about that. Back/forward are definitely much faster than in BeZillaBrowser, but not as fast as in Google Chrome on my Windows box. I am comparing very different machines though, I should test WebPositive on my quad core to be sure.

Re: WebPositive emerges

It is already pretty fast. Testing on my university network, so initial page load time is also almost instant. Watching the progress bar when going back looks like it loads multiple resources, so I'd guess the page cache isn't enabled, or else something about the page is preventing it from being used.

Re: WebPositive emerges

The page cache was indeed not turned on. It will be working in the next package I post. However, WebCore decides for some pages that it cannot put them into the page cache. Most likely because of some onload handlers which it estimates could get broken, dunno. It definitely works now for some sites I checked.

Re: WebPositive emerges

Great progress, Stippi!
Concerning tabs: While ALT+[1-9] is OK for Terminal to directly jump to a tab, as they are labeled "Shell [1-9]", it may not work as well for a browser. ALT+Tab would be a sensible solution, but going the other direction via ALT+SHIFT+TAB is a bit awkward.
Since ALT+Left|Right is already established as back/forward, how about using CTRL+Left|Right for changing tabs? Alternatively, ALT+Up|Down...

Have you thought about detaching tabs into their own or an already open browser window?
Also, rearranging tabs would be nice.

Having the Download (and Bookmark) window as a tab would also be nice. the tab title could reflect the download status, like "86% - 16% - 20% - 0%" for four concurrent downloads. Detachable tabs would offer the possibility to still have everything as seperate windows.
These tabs could be slightly tinted and right aligned for better distinction.

The "Text | In/Decrease/Reset Size" menu items may be better as a symbol + context menu in the status bar. That way you always see if you have some zoomlevel activated. Another nice option in this menu would be to toggle "Also zoom images", so have the option to only zoom text.
Zooming images could use ShowImage-style filtered zoom.

Someone mentioned automatic resizing to avoid horizontal scrollbars. This could be done with the window tab's zoom button (== CTRL+ALT+Z). A space conserving fullscreen mode could then have the usual ALT+RETURN.

Keep it up!
Humdinger

Re: WebPositive emerges

Those are good ideas, Humdinger. The download and bookmark windows as right-aligned tabs is something I could imagine to work, although I personally don't find a separate download window bad at all. If this was implemented, do you imagine each browser window has the tab and all download tabs in all browser windows mirror the same information?

Re: WebPositive emerges

stippi wrote:

Those are good ideas, Humdinger. The download and bookmark windows as right-aligned tabs is something I could imagine to work, although I personally don't find a separate download window bad at all.

If the download-tab has been detached into its own window, this setting should be remembered between sessions.

Quote:

If this was implemented, do you imagine each browser window has the tab and all download tabs in all browser windows mirror the same information?

If the download-tab isn't detached, having it mirrored in every window seems to be the way to go. It's important that these special tabs are as narrow as possible so they only take minimal space away from "real" tabs. The tab title could be limited to 4 download items with a "..." if there are more.

Maybe download, bookmarks and history could even be combined in one tab.

Regards,
Humdinger

Re: WebPositive emerges

Could you be so kind as to humor us with a screen shot?

Re: WebPositive emerges

@cosmotic:
The Italian HUG has a nice story showing all available Haiku browsers (yes, it's italian... :) Web+ is the last screenshot). Of course, you could test it yourself by trying the built linked by stippi.

Regards,
Humdinger

Re: WebPositive emerges

It's great to see so much progress with WebPositive. My favourite feature request would be customisable keyboard shortcuts. Most power users cannot live without keyboard shortcuts.

Eg. since Opera is hard wired into my central nervous system, switching tabs means pressing '1' or '2', and going back/forward through page history is 'z' and 'x'. Any other key combination doesn't compute :)

Re: WebPositive emerges

Excellent work stippi!!

Finally a native Haiku browser, great work indeed. Yeah I'm this excited even before trying it, but since I'm one of those (or the only one?) who hate using non-Haiku apps (mainly just bloated Firefox/SeaMonkey/Bon Echo/whatever wacky name for XUL based crap - no offense to the porters) in Haiku I appreciate this effort :)

Hm, where is the obligatory screeny?

- Ram.

Re: WebPositive emerges

http://twitpic.com/16zfrv

There's a screeny for you. I'm using arora now to post this because webpositive is a bit crashy at the moment.

Re: WebPositive emerges

I'm writting this coment on WebPositive. Must say it's really fast and works just fine. Congrats.

Re: WebPositive emerges

What dependencies do I need to install to run WebPositive on latest GCC4 SVN compile of Haiku?

Re: WebPositive emerges

It's all included in the Web+ package linked in the article: libcurl, libjavascriptcore, libwebcore, libwebkit.

Regards,
Humdinger

Re: WebPositive emerges

Thanks,

I'm missing the sqlite3.so.0 library and libxml2.so.2 library - I went to http://haiku-files.org/files/optional-packages/ but they are gcc2 versions. How are you guys getting this to work?

Re: WebPositive emerges

Are you on a recent gcc4 (or gcc4 Hybrid) build? For those only the Web+ package is needed.

P.

Re: WebPositive emerges

Thanks pistooli, panic over, I needed to include LibXML2 and SQLite in my Optional packages and although they are gcc2, so are a lot of the other packages. It seems to work fine now!

Re: WebPositive emerges

Welcome to the club of Web+ users then. :)

Re: WebPositive emerges

Stippi update Web+, please.

Re: WebPositive emerges

What do you mean, "update it"? The next version is not ready yet. ;-)

BTW, if you guys are getting more crashes than usual, it is most likely because of a version mismatch of the libjpeg library. The last few Web+ packages were linked against the current libjpeg in trunk. If you have another package installed which comes with it's own libjpeg, that one could cause the crashes. If Web+ crashes because of a libjpeg version mismatch, it most often has something to do with "setlongjmp" in the backtrace. If you are running a current Haiku version, either remove the extra libjpeg from home/config/libs or common/libs, or link the system libjpeg into the Web+ libs folder.

Re: WebPositive emerges

Seems that Libjpeg in haiku is really broken

I don't succed running wormux 0.90 in haiku because of this..

Re: WebPositive emerges

Ok, I've finally found out what's wrong with libjpeg.so. Michael is simply running an old Haiku version (prior to the libjpeg update) on his server. So if you download a WebPositive "nightly" from his server, and try to run it on a newer build of Haiku, it will crash left and right. Simply use the package I posted above (r272). I do update WebPositive as soon as it is worth it, the version above should run stable and should be the version to use for the time being.

Re: WebPositive emerges

Ah, that explains, thanks for the update. I suppose if we build it ourselves using a recent haiku, it should work fine then.

Re: WebPositive emerges

"comparing very different machines though, I should test WebPositive on my quad core to be sure." It would be better to test chrome on the slower machine to compare speed :)

Relating to the download window. The best for haiku would be to eventually start a general/global download window. The browser is in development, a transmission GUI will eventually need to be made and all kind of other app that will download. I would like to eventually see it integrated even with the tracker copy window (as it's essentially the same as downloading, just locally and faster).

Re: WebPositive emerges

The 2 and 8 keys on the number pad are not working in WebPositive in the address bar. They work just fine in a web form input field. Using svn revision 272 of WebPositive.

Re: WebPositive emerges

Thanks for the report, I've fixed the number pad issue in r302.

Re: WebPositive emerges

Ok, a new package has been overdue... I'm a bit in a hurry, since I'll leave for Chemnitzer Linux Days tomorrow already, even though they start Friday night. But I didn't want to go without updating the package once more. Also I don't know how much time I can devote to WebPositive until next Monday, but then I'll be working full steam again. :-)

To recap what's happened since r272:

  • Improvements and bug