Bug 90726 - Remove unnecessary member HTMLTreeBuilder::m_lastScriptElementStartPosition
Summary: Remove unnecessary member HTMLTreeBuilder::m_lastScriptElementStartPosition
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-07 04:06 PDT by Kwang Yul Seo
Modified: 2012-07-08 21:31 PDT (History)
2 users (show)

See Also:


Attachments
Patch (4.14 KB, patch)
2012-07-07 04:10 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-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.  :)