Bug 90544 - Stop tracking line number in tokenizer
Summary: Stop tracking line number in tokenizer
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-04 04:44 PDT by Kwang Yul Seo
Modified: 2012-07-04 08:32 PDT (History)
6 users (show)

See Also:


Attachments
Patch (15.61 KB, patch)
2012-07-04 04:48 PDT, Kwang Yul Seo
no flags Details | Formatted Diff | Diff
Patch (16.68 KB, patch)
2012-07-04 05:11 PDT, Kwang Yul Seo
abarth: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.