GSoC libDOM proposal

Bo Yang struggleyb.nku at
Sun Mar 22 08:27:45 GMT 2009

Hi dear developers,
       I am a GSoC applicant (my nickname in #netsurf is struggleyb),
generally I am interested in the project libDOM. Netsurf is really a small &
fast browser now, but there is no complete DOM implementation in it. Many
modern web pages contain Javascript, which is mostly used to manipulate the
DOM of the web page. So, it is necessary to add DOM support to Netsurf as
soon as possible. And that is just what I want to do in this summer.

      The DOM implementation in libDOM is part of the DOM core level 3 now.
It is created by John-Mark Bell(jmb) at July 2007. Generally, my work is to
complete the Core module , add Events/HTML modules support to it and
integrate it into Netsurf. For details:

1. The final DOM implementation will use a vtable structure, so the first
step is to convert the existing implementation to use the vtable structure.
This task has been completed partly. I think this part will be completed
before the summer start.

2. Complete the missing implementation of Core module and test it. There are
some functions left as unimplemented in the existing Core module, I will
complete these functions firstly. And I think it is better to test earlier
than later, so it is testing time after the Core module completion. W3C
provides a DOM Test Suite at which is used to
test whether any DOM implementation is standard compliant. I will write some
XSLT files to translate the test files, and test the Core implementation.
This task will cost me about one month, I estimate.

3. After the core module pass the tests, the Events module will be
implemented. The Events module is a relatively small module and some of its
interfaces should implemented in Core module's objects. Just like, the
EventTarget interface should be implemented by the Node object. So, the
Events module comes earlier than the HTML module in my plane. Of course, we
need the XSLT file to create tests and make sure the Events module pass
them. I will spend two weeks to do this.

4. And then it is the HTML module. Just implement it and the make it pass
the tests. I think two weeks is needed for this task.

5. After all  these modules passed the tests, I will integrate the libDOM
into Netsurf to replace the libxml2 library's xmlDocPtr with dom_document.
And there are many other changes like this. I will change the the Netsurf
parser binding code to use the new DOM structure and the corresponding Node
instead of xmlNode. And then, I will make DOM events available in Netsurf. I
mean, all events such as
mouseover/mouseout/DOMNodeInserted/DOMNodeRemoved/DOMAttrModified will hook
up with Netsurf rendering code. Three or four weeks are necessary to
complete this task.

6. Finally, the new libDOM's features will be written down on wiki or some
other place. Most of the DOM interfaces/methods are explained very well on
the W3C's standard, I think we have no need to write another document to
explain our interfaces. But, we should write documents to explain how each
Interface in DOM mapped into our implementation. And how should our clients
to use our library and how it is designed internally to help later
developers to catch up easily. This task will be done in one week.

      The above is my proposal for summer project, and it is based on my
understanding and recent work for Netsurf. Could you please give me some
advice? Any comment will be appreciated very much! Thanks!

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the netsurf-dev mailing list