Bug 21381 - Incremental parsing of html causes bogus line numbers in some cases
Summary: Incremental parsing of html causes bogus line numbers in some cases
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Oliver Hunt
URL: http://webkit.org
Depends on:
Reported: 2008-10-04 23:50 PDT by Oliver Hunt
Modified: 2008-10-05 01:29 PDT (History)
2 users (show)

See Also:

Fixeration, but no layout test (3.01 KB, patch)
2008-10-05 00:01 PDT, Oliver Hunt
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2008-10-04 23:50:03 PDT
When incremental parsing of an html document pauses midway through a <script> element, reentry to the parser resets the script start line number, leading to somewhat borken behaviour.  Originally reported by Tim on bug #20187 but it turned out be an unrelated issue.

(from tim's comment:
With the fix for bug 19053, this bug can be seen on webkit.org. Just attach the
debugger, pause and reload the page.
Comment 1 Oliver Hunt 2008-10-05 00:01:07 PDT
Created attachment 24099 [details]
Fixeration, but no layout test

I haaven't been able to make a layout test, but i'm sure it should be possible.  I am going to see if weinig can help out -- however the patch itself should be reviewable.
Comment 2 Oliver Hunt 2008-10-05 01:29:15 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	LayoutTests/ChangeLog
	A	LayoutTests/http/tests/incremental/pause-in-script-element-expected.txt
	A	LayoutTests/http/tests/incremental/pause-in-script-element.pl
	M	WebCore/ChangeLog
	M	WebCore/html/HTMLTokenizer.cpp
Committed r37315