Bug 90544

Summary: Stop tracking line number in tokenizer
Product: WebKit Reporter: Kwang Yul Seo <skyul>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dglazkov, eric, gustavo, webkit.review.bot, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch abarth: review+

Description Kwang Yul Seo 2012-07-04 04:44:45 PDT
Because SegmentedString knows how to track the current line and column, a tokenizer does not need to keep track of the current line by itself.
Comment 1 Kwang Yul Seo 2012-07-04 04:48:11 PDT
Created attachment 150771 [details]
Patch
Comment 2 WebKit Review Bot 2012-07-04 04:53:33 PDT
Comment on attachment 150771 [details]
Patch

Attachment 150771 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/13139491
Comment 3 Gyuyoung Kim 2012-07-04 04:55:31 PDT
Comment on attachment 150771 [details]
Patch

Attachment 150771 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/13131774
Comment 4 Gustavo Noronha (kov) 2012-07-04 04:56:23 PDT
Comment on attachment 150771 [details]
Patch

Attachment 150771 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/13134749
Comment 5 Kwang Yul Seo 2012-07-04 05:11:25 PDT
Created attachment 150775 [details]
Patch
Comment 6 Kwang Yul Seo 2012-07-04 05:13:02 PDT
Fix build break with ENABLE_VIDEO_TRACK guard.
Comment 7 Adam Barth 2012-07-04 08:20:37 PDT
Comment on attachment 150775 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=150775&action=review

This looks great.

> Source/WebCore/html/parser/HTMLDocumentParser.cpp:452
> +    const SegmentedString& currentString = m_input.current();
> +    return currentString.currentLine();

I would just combine these two lines to avoid having the temporary.
Comment 8 Kwang Yul Seo 2012-07-04 08:32:07 PDT
Committed r121858: <http://trac.webkit.org/changeset/121858>
Comment 9 Kwang Yul Seo 2012-07-04 08:32:56 PDT
(In reply to comment #7)
> (From update of attachment 150775 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=150775&action=review
> 
> This looks great.
> 
> > Source/WebCore/html/parser/HTMLDocumentParser.cpp:452
> > +    const SegmentedString& currentString = m_input.current();
> > +    return currentString.currentLine();
> 
> I would just combine these two lines to avoid having the temporary.

Thanks. I combined the two lines and landed the patch.