Bug 30618
Summary: | Bug in viewsource when EOF right after <script>/<style> | ||
---|---|---|---|
Product: | WebKit | Reporter: | Keishi Hattori <keishi> |
Component: | Web Inspector (Deprecated) | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | bburg, bweinstein, hyatt, joepeck, keishi, pfeldman, pmuellr, rik |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Keishi Hattori
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>
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Keishi Hattori
Seems to go wrong here.
http://trac.webkit.org/browser/trunk/WebCore/html/HTMLTokenizer.cpp#L1565
Pavel Feldman
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.