Bug 90726

Summary: Remove unnecessary member HTMLTreeBuilder::m_lastScriptElementStartPosition
Product: WebKit Reporter: Kwang Yul Seo <skyul>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch abarth: review+

Description Kwang Yul Seo 2012-07-07 04:06:43 PDT
HTMLTreeBuilder::m_lastScriptElementStartPosition is of no use. Currently, m_lastScriptElementStartPosition is used to store the text position in "script" start tag, and then the stored position is passed to m_scriptToProcessStartPosition later in "script" end tag. Because HTMLTreeBuilder handles one script tag at a time, we can store the text position directly to m_scriptToProcessStartPosition in "script" start tag.
Comment 1 Kwang Yul Seo 2012-07-07 04:10:28 PDT
Created attachment 151138 [details]
Patch
Comment 2 Adam Barth 2012-07-08 20:38:49 PDT
Comment on attachment 151138 [details]
Patch

I haven't paged all this code back in, but I believe this is correct.  There's also lots of test coverage for this issue since DRT prints out the line number with every script error.
Comment 3 Kwang Yul Seo 2012-07-08 21:28:10 PDT
(In reply to comment #2)
> (From update of attachment 151138 [details])
> I haven't paged all this code back in, but I believe this is correct.  There's also lots of test coverage for this issue since DRT prints out the line number with every script error.

I ran the layout tests and confirmed that there is no regression.
Comment 4 Kwang Yul Seo 2012-07-08 21:30:22 PDT
Committed r122081: <http://trac.webkit.org/changeset/122081>
Comment 5 Adam Barth 2012-07-08 21:31:04 PDT
> I ran the layout tests and confirmed that there is no regression.

The cr-linux bot also runs the tests and confirms that as well.  :)