Tag Archives: Webkit

Online discussions related to browser performance.

I was checking online discussions related to browser performance improvement and throttling. Found quite a few of them. Following is the list of the same.It’s a list of bug reports and articles discussing tips to improve page rendering performance.

Browser performance optimisation is all about removing limits ;).

[WebkitGtk+]Making webkitgtk build work behind a proxy.

I have been trying to build WebkitGtk in my company PC and was stuck with dependencies update and the subsequent build. I had to work behind a proxy which complicated things a bit. The general build is supposed to work on PC’s with open network. But once you get behind a proxy with just the http port only open, things usually taken for granted like git and ftp access go for a toss. Hence I was stuck a bit. With some help from the webkigtk-dev mailing list, following changes were suggested Continue reading

Link dump : CSS 3d transforms explained.

Following are some detailed links regarding the CSS 3d transforms. The math and the syntax is all explained. So grab a coffee, notepad and pen and start reading.

Building Webkit on Windows 7 with Visual Studio 2008 Express.

I have been successful with building and running the win port of webkit. The whole process took 2 days but it was worth the effort. Below are some tips and links that I helped me in getting through.
My config: Windows 7 + Windows 7 SDK + VS 2008 Express Edition.

Some tips :

  • Don’t fetch the webkit trunk : Webkit trunk has not only the source code but the layout tests as well. Layout tests are important if you are planning to make some changes to the code. But if you just want to explore the code, then they are not needed. The layout tests is a large number of files. It takes forever to download them. Just take the Source, Tools & Webkitlibraries folder and you can start building.
  • Continue reading

Steps to debug Webkit using Eclipse.

Here are the steps to debug Webkit in Linux using Eclipse. This has been reproduced here verbatim from
.I am currently verifying these steps.

Debug Native C++ Code:
To get meaningful debug info, you do need to build WebCore with -O0. It is simple. Add the following to your buildspec.mk and rebuild webcore and xml2.
If you don’t have buildspec.mk under the root directory yet, please copy build/buildspec.mk.default to the root (android/)


"ADDITIONAL_BUILD_PROPERTIES += debug.db.uid=100000"

so that it will wait for you to connect gdb when crashed.

rm out/target/product/dream/system/build.prop
to make sure it takes effect.
To rebuild webcore and xml2:
make clean-libwebcore clean-libxml2 && make <br>

Note: If you get system image is too large, you can manually change vendor/htc/dream/BoardConfig.mk, and set BOARD_SYSTEMIMAGE_MAX_SIZE to a bigger number, e.g., 94371840
(sapphire’s cap).
Debugging native code on emulator is much better now.
Start emulator and activate browser.
In a different shell, do
"gdbclient app_process :5039 browser"
It should connect to emulator now, and you should see following
(the first three lines) in gdb. Type “c” for continue.
__futex_wait () at system/bionic/arch-arm/bionic/atomics_arm.S:121
121 ldmia sp!, {r4, r7}
Current language: auto; currently asm
(gdb) c
If you want to use Eclipse, it will be easier if you have Eclipse 3.3 instead of 3.2 (on Mac). Here is how to set up debug configuration.

Run -> Debug…, select C/C++ Local Application, then click New. Give a name to your configuration, like release_native, select android project, and
for the application.
In Debugger tab, select GDB Server for the debugger.
Under Debugger Options choose Main tab first, enter
as GDB debugger.
Choose TCP for connection and use 5039 as port.
Then under Shared Libraries, add
Davidc: Not sure if the is the same for everyone, but I had to reduce the length of the paths to avoid GDB timing out. To do this, remove the paths set in the Source tab, and add the path to
the files you are debugging.
To debug an application with Eclipse, you need to gdbserver on the target (emulator or hw) and forward the port.
In a shell, do
“adb forward tcp:5039 tcp:5039”.
In the shell, do
"adb shell gdbserver :5039 –attach `pid browser`".
Start the debugger in Eclipse
If you have trouble to use Eclipse to debug native on Linux, you can use gdb. To use gdb, you need to create a ~/.gdbinit with following content:
file ./out/target/product/dream/symbols/system/bin/app_process
set solib-search-path ./out/target/product/dream/symbols/system/lib
target remote localhost:5039
It does exact the same thing as Eclipse setup. Then you can start gdb from android/ directory:
To debug native code before the browser has fully started:
Open DevTools application, select Development Settings.Select Debug App at the top, and pick the browser from the list (com.android.Browser)
Click ‘Wait for debugger’
Go back to home and launch the browser
Follow from step #2 in the steps described above under “Debugging native code on emulator is much better now.”
At this point, GDB is attached but the browser is still waiting for the Java debugger
Attach the Java debugger and the browser will automatically continue.

07th July : Update : We are getting an error with system/bin/linker.Need to fix it to load the symbols properly.

Source code of various webkit based mobile browsers.

Now that there are so many mobile browsers based on Webkit, it makes sense to check the various implementations and designs used by them.AFAIK Nokia and Samsung have open-source’d their code. So here are the links.



I would update this post if some other device manufacturer’s also publish their code as well. If you have any other interesting links that should be updated, please do contact me.

VS2005 we need “Prompt before rebuild”.

Webkit is not a small project by any means. And it takes a cool 30-45 mins for a complete rebuild on a 2GHz, 1GB RAM PC to complete.

Now just imagine this, you have a critical feature to deliver and you have just enthusiastically coded it and want to see it running. Now you have to build it first, and being a faithful mouse user, you right click on the project and just in the heat of the moment instead of selecting the “Build” option, your hand slips a few pixels lower and clicks on the “Rebuild” option. 🙁 And so there go a full 30 mins of your valuable time.

This used to happen to me like once in a week and especially during the critical deadlines.Well I have not found any option in VS2005, where we can set to “Prompt before rebuild”.

But I have learnt to use the keyboard option to build and that has saved me some trouble. 😉

Fixing the “‘CSSValue’ : redefinition ” issue

Developing for Webkit can be a big headache. The sheer size & complexity of the architecture is mind boggling.
We were facing this error and just could find any way to fix it.

d:XXXWebCoreDerivedSourcesCSSValueKeywords.h(28) : see declaration of ‘CSSValue’
d:XXXWebCoreDerivedSourcesCSSValueKeywords.h(286) : error C2370: ‘CSSValue’ : redefinition; different storage class

The one solution mentioned in the code is to get the full code and do a rebuild :).
But we found out that the problem lies in CSSValueKeywords.in. If there are any empty lines in that file then it would generate duplicate CSSValue variables.
So just remove all those empty lines from CSSValueKeywords.in and do a rebuild and the problem should be solved.