페이지

2018년 7월 28일 토요일

옛날 KHTML소스코드 찾기..

자유/오픈소스 만화를 그리다 보니, 별걸 다 찾게 된다. 가장 오래된 KHTML소스코드를 찾아봤는데, 의외로 찾기 어렵다. 많은 오픈소스 프로젝트가 git으로 전환되면서 그 이전에 cvs등으로 관리하던 저장소가 접근이 안되서 초기 코드를 찾기는 정말 어렵다.

특히,  KHTML은 kdelibs에 포함되어 있어서 KHTML이라는 키워드로 찾으면 절대 옛날 코드를 찾을 수 없다. 오래된 메일링 리스트 글을 힌트로 아래 코드를 찾게 되었다.
2000년 11월 25일 마지막 커밋이 있는 것으로 보아 현재 접근 가능한 가장 오래된 KHTML소스 코드 같다. 

위 메일링 리스트 글도 언제 사라질 지 모르니 일단, 여기에 복사를 해둔다.

List:       kfm-devel
Subject:    changes in KHTML
From:       Lars Knoll 
Date:       1999-08-16 9:14:35
[Download message RAW]

Hi,

as some of you might have noticed, I checked the rewrite of khtml I've
done in the last month into CVS. Since it's (very) far from being complete
and stable, I've checked it into a seperate branch in kdelibs. You can get
it by 'cvs co -r khtml_to_dom kdelibs/khtml'.

I've rewritten khtml, to use DOM Level1 (see http://www.w3.org) for it's
internal document representation. The reason is mainly, that this is
IMO the only way, to be able to add javascript support to khtml.

Many (most) things are still not working, so don't expect too much from
this version. 

I'll just give a short description of what I've done so far:



* Dom:

The dom corresponds to the HTML DOM Level1 as defined by the w3c. It's
still not complete (HTMLCollection is for example still missing), but
already in a pretty useable state. The DOM is implemented as classes using
automatic memory management (each class in the DOM holds a pointer to a
class implementing the functionality, the implementation uses reference
counting to know, when it's not needed anymore). This has the advantage of
preventing memory holes in for example the code implementing the
javascript interface. However, khtml does internally use the
implementations directly, for speed and efficiency reasons.
The core dom is imlemented in the dom_*, html dom in the html_* files.

I've added drawing functionality to the HTMLElements of the dom, so they
can render themselves directly into the widget. Only block level elements
draw themselves, the inline elements and text are rendered by the
surrounding block level element. This makes it easier (at all possible) to
implement bidirectional behaviour and aligned objects. The old
khtmlobjects are not used at all anymore, but I've kept them in CVS for
the moment, as I still want to reuse their code.

The DOM does by the way use exceptions and namespaces, so khtml uses them
too now.

* tokenizer:

The tokenizer didn't change too much, but instead of writing the tokenized
stream into a buffer, it does now pass every token directly to the parser.

* parser

I rewrote it, since the parsing of the Attributes _has_ to be done now in
the elements (through the DOM attributes can be set even after parsing for
example by a script). It's much shorter now, and I wan't to implement some
sort of DTD support there at some point.

* probably some more things I forgot...



I've added a short test program, since kbrowser isn't linked into the lib
at the moment. 

You can also have a look at the files DESIGN for some more information,
and at the TODO file for some infromation on what's already done/working
and what still needs to be done.

Comments, critics, flames anyone?

Cheers,
Lars



애플 홈페이지에서도 옛날 흔적을 찾을 수 있다.
https://opensource.apple.com/tarballs/WebCore/ 여기서 가장 오래된 tarball을 열어보면 KHTML자취를 쉽게 찾을 수 있다.

댓글 없음:

댓글 쓰기