Bug 30618 - Bug in viewsource when EOF right after <script>/<style>
Summary: Bug in viewsource when EOF right after <script>/<style>
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-20 22:28 PDT by Keishi Hattori
Modified: 2014-01-27 15:10 PST (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Keishi Hattori 2009-10-20 22:28:32 PDT
SourceView in Resources is weird when there is an EOF right after a style or script element.

<style>
    a {}
</style>

is shown as

<style> 
    a {}
</style> 
    a {}
</style>
Comment 1 Keishi Hattori 2009-10-21 08:12:14 PDT
Seems to go wrong here.
http://trac.webkit.org/browser/trunk/WebCore/html/HTMLTokenizer.cpp#L1565
Comment 2 Pavel Feldman 2009-10-29 14:13:17 PDT
Same happens to:

BEGIN ================================
<script>
function testAPI() {
        var resultStr = "";
        var toolstrips = chrome.extension.getToolstrips();
        resultStr += "toolstrips count: " + toolstrips.length;
        var reportWin = window.open("result.html", "reportWin");
        var resultDiv = reportWin.document.getElementById("result");
        resultDiv.innerHTML = resultStr;
}
</script>
END ==================================

but when i remove the last function line and make it

BEGIN ================================
<script>
function testAPI() {
        var resultStr = "";
        var toolstrips = chrome.extension.getToolstrips();
        resultStr += "toolstrips count: " + toolstrips.length;
        var reportWin = window.open("result.html", "reportWin");
        var resultDiv = reportWin.document.getElementById("result");
}
</script>
END ==================================

It shows up right. So it is not the EOF that triggers it - it could be something different.