[webkit-dev] Porting WebKit to PalmOS
Krzysztof Kowalczyk
kkowalczyk at gmail.com
Mon Feb 13 21:04:01 PST 2006
On 2/13/06, Donald C. Kirker <dkirker at wapuniverse.com> wrote:
> Anyway. Once I get the file to actually compile
> (that will take me the longest), what functions should I be interested in
> for actually executing a script? Are there any sites that I should go to so
> that I can understand how the JSCore works (like, how would WAPUniverse
> handle a request for something like history.back();)?
You have to be aware that JavaScriptCore is only a small part of
WebKit - it's only a javascript interpreter i.e. it can execute
JavaScript scripts in source format. If you want to build a browser
you have lots more to do, including building the html parsing and
rendering engine and this stuff so far only works on MacOS (and
Symbian, I guess, thanks to Nokia's work).
For learning about JavaScript itself, either google around or read
O'Reilly's "JavaScript - The Definitive Guide".
For how to execute scripts - look at kjs\testkjs.cpp (which, on
windows, builds as testkjs.exe) and is a simple example of how to load
a javascript script from a file and execute it.
You would have to build something similar on Palm except:
* Palm OS doesn't have stdout so you would have to substitute it with
something else (e.g. writing to a database or a file on SD card or
just scrolling to the screen)
* Palm OS doesn't have command line so you would have to build some
simple app that allows picking javascript file to execute from
database or a file on SD card and then execute it
The approach I would suggest: get the WebKit sources which Nokia used
as a base of their version (I assume they just branched at some point
and did all their modifications from one, stable point) and do a diff
against Nokia sources. That will give you the best idea on how much
and what kind of work is required to port the whole thing to another
OS.
history.back() is a method call on history object which is registered
with JavaScript interpreter by WebCore (see
WebCore\khtml\ecma\kjs_window.cpp for how it's implemented in latest
sources)
-- kjk
More information about the webkit-dev
mailing list