Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 10 of 10
  1. #1
    Senior Member mixu's Avatar
    Join Date
    Aug 2003
    Posts
    217
    Member #
    2815
    Yup, you read it. I've been away from the forums for quite while, busy - I'm writing a web browser as a school project (international baccalaureate extended essay, to be specific). Now while this sounds quite rather insane, as I'm not anywhere close to the Mozilla foundation in terms of resources, but what I'm aiming for is a object-oriented program that is capable of rendering HTML correctly (with certain limitations).

    I just have to say the project is going quite well, I've learnt a ton of new things about HTML/CSS (more than I ever did while authoring web pages).. and right now the code can parse HTML correctly to a tree.

    Now I need to learn more about writing the rendering code, and once that's done, multithreaded http connections.

  2.  

  3. #2
    Senior Member glyakk's Avatar
    Join Date
    Nov 2003
    Location
    USA
    Posts
    1,263
    Member #
    3828
    Liked
    6 times
    Sounds like lots of fun.. That is the sort of thing I would love to learn how to do if nothing else but for the experiance.. I own a small libary of programming books covering Java, C, C++, ect.. but have not poured into them to learn anything of use beyond the first "Hello World" script.

    Pathetic, I know..

    Keep us updated how the project is going, I for one am interested.


  4. #3
    Senior Member ULTiMATE's Avatar
    Join Date
    Nov 2002
    Location
    England
    Posts
    124
    Member #
    308
    It's something i would also enjoy to learn. Understanding C, C++, C#, Java, etc would come in handy. At the moment all i know is Visual Basic as far ax actual Programming Languages go. Still best of luck with your project. You could try looking on http://www.sourceforge.net to see if anyone else is making a similar project, and has his/her Source Code available for you as reference.

  5. #4
    Senior Member mixu's Avatar
    Join Date
    Aug 2003
    Posts
    217
    Member #
    2815
    oh, some posts. Good to see some interest in this ... Well, now I'm devising up algorithms for the actual drawing phase (draw order, complexities such as displacing text -> http://www.w3.org/TR/CSS21/visuren.html#img-float2p) and building up a very basic double-buffered drawing routine library.

    I can't really look at others code, since this is an individual project - and I and Google don't know about others than Mozilla that would have their source open.

    here's some performance stats for analyzing a 1,06 megabyte (1091KB) file, containing typical HTML (it's basically the "forms.html" file of the HTML4.01 spec, ten times).

    Lexical analyzer: 180 ms
    --> Tokens found: 222920
    Syntax analyzer: 107 ms
    Context handling: 20 ms
    --------------------------
    Sum: 307 ms for 1,06 MB => approx. 3MB per second on an Athlon-XP-M 2500+. Not too bad for the first attempt

    I've been building up my hate list *as a developer of an HTML engine*, i hate:
    - the CSS text clearing model
    - the obscure SGML instuctions such as <![CDATA[
    - SCRIPT and STYLE tags, don't put three different languages in one file and expect me to parse that
    - HTML4.01 stupid, error-prone nesting model for styles/fonts/modifiers
    - FRAMEs and IFRAMEs
    - relative positioning, especially floating boxes in constraining boxes

    yup. that's about it for now

  6. #5
    Senior Member mixu's Avatar
    Join Date
    Aug 2003
    Posts
    217
    Member #
    2815
    oh yeah, I forgot - I'll probably be releasing this project on SourceForge once I get the grades etc. for it. This includes documentation, as I need to write a 5000 words essay on the topic for my degree/diploma.

  7. #6
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    I think KHTML is an open source rendering engine.. http://khtml-win32.sourceforge.net/

    That's QUITE a project... even just a basic rendering engine is really complicated man. More power to you.

    BTW, how do you expect to accomplisht the GUI? XUL?
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  8. #7
    Senior Member mixu's Avatar
    Join Date
    Aug 2003
    Posts
    217
    Member #
    2815
    Thanks, Brak - you're right, it's been quite challenge to develop. The hardest part is really figuring the next step, eg. what I need to do rather than how to do it. But this should really make a good project to show to anyone once I finish it.

    All in all, the project is still only about 4000 source code lines long (110 Kb), with tons of the lines being reserved for constant definitions and so on. As I previously mentioned, right now I'm at the point of doing the final calculations before beginning the actual draw phase. The major pain is that I do want to maintain the possibility of implementing JavaScript/DHTML/CSS3 in the future, which means I need to take into account a lot more than just what the real HTML specs (1,66 MB's of HTML text) specify. Right now, I have the data as a simple tree, and I'm developing code to "make it into layers", eg. separate each of those little boxes and lines onto their own drawing stage layer. If you want to understand why this makes my head hurt occasionally, check out the CSS2.1 appendix E, "[an] Elaborate description of Stacking Contexts" - here: http://www.w3.org/TR/CSS21/zindex.html

    The rendering is/will be done thru a double-buffered Windows GDI wrapper class which I'm also developing. The development language, btw, is Delphi, which makes some GDI pains go away. I can't use XUL or code developed by other because this is essentially an individual project. Plus, as I've said to myself many times after banging my head to the wall - I enjoy the challenge

  9. #8
    Senior Member glyakk's Avatar
    Join Date
    Nov 2003
    Location
    USA
    Posts
    1,263
    Member #
    3828
    Liked
    6 times
    For the most part I am totally clueless about what you are saying, but I am cheering ya on none the less.

    As a side note. I would love to see a fully featured KHTML based browser for windows. Konqure(the awesome KDE browser) uses it, and I belive Safari does also. In my experiance it is much better and faster then the Internet explorer rending engine, and maybe even gecko(mozilla, netscape). Although I would not have any proof to back that up.


  10. #9
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    I liked KHTML when I used linux for a while, but the problem is I've never been able to compare the two (Gecko/KHTML). Hopefully it executes Javascript DOM stuff & CSS functions (:hover) as quickly as Gecko.

    On a side note... I wouldn't plan on tackling CSS3. It would most likely take you the better part of a year to learn the CSS3 specs, let alone implement them while still providing legacy support for 1/2.
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  11. #10
    Senior Member mixu's Avatar
    Join Date
    Aug 2003
    Posts
    217
    Member #
    2815
    yay, I got the layer resolving code to work! Obviously, implementing anything beyond the HTML 4.01 spec is still far away in the future - the main idea for now is just to keep the code extensible (not taking shortcuts that would limit later functionality) .. so about CSS3 you are right, Brak - that's going to be far away, althought implementing at least a subset of it later (visual parts, printing) would be fun. Well, still at this point, first things first -> once I get the first page draw done, I'll think of the future.

    but hey, it's pretty neat to have almost written a web browser.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:13 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com