[webkit-dev] Grammer for html parsing

Nilesh Patil vniles at gmail.com
Mon Feb 9 20:36:12 PST 2009


HI

So .... When exactly RenderStyle and RenderObject will get associated
with - say <img> - element or with any HTML element
Does WebCore/rendering handles it ?

Thanks & Regards
Niilesh

On Tue, Feb 10, 2009 at 1:57 AM, Shariq Rizvi <shariq at rizvi.org> wrote:
>
>
> On Mon, Feb 9, 2009 at 12:23 PM, Nilesh Patil <vniles at gmail.com> wrote:
>>
>> Hi
>>
>> Yeah.... But still have a doubt. Doesn't  it need to compare tags with
>> what ever has come as response? i mean if some data comes then webkit
>> must be identifying it in terms of HTML tags or other type of data. So
>> is there no need of string comparison of actual HTML tags ?
>
> It is the job of the tokenizer (HTMLTokenizer.cpp) to read the HTML "tags"
> in the document and collect them into "tokens" (class Token). Once a Token
> has been created, the tokenizer calls the parser (HTMLParser.cpp) to create
> a DOM node and put it in the right place in the DOM tree.
> Hence, the "string comparison" that you mention is going on inside the
> tokenizer (during its reading of a tag to create a Token).
>
>
>
>>
>> THanks & Regards
>> Niilesh
>> On 2/9/09, Darin Adler <darin at apple.com> wrote:
>> > On Feb 9, 2009, at 3:58 AM, Nilesh Patil wrote:
>> >
>> >> I need to know where does grammer for html Parser has been defined
>> >> in webkit. Is it a string based comparison directly with tags or
>> >> done any other way?
>> >
>> > The source files are HTMLTokenizer.cpp and HTMLParser.cpp. It doesn't
>> > use a parser generator such as yacc or bison or a lexer generator such
>> > as lex or flex, if that's what you're asking.
>> >
>> >      -- Darin
>> >
>> >
>> _______________________________________________
>> webkit-dev mailing list
>> webkit-dev at lists.webkit.org
>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
>


More information about the webkit-dev mailing list