Closed Bug 495663 Opened 15 years ago Closed 15 years ago

[jsd] The title element causes the jsdIScript baselineNumber to be incorrect

Categories

(Core :: DOM: HTML Parser, defect)

1.9.0 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: johnjbarton, Assigned: mrbkap)

Details

(Keywords: fixed1.9.1, Whiteboard: [firebug-p2])

Attachments

(1 file)

From Firebug Issue 1403, http://code.google.com/p/fbug/issues/detail?id=1403

Test case:

<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title /><!-- This line causes the script to have the wrong baseline -->
<script type="text/javascript">
debugger;
</script>
</head>
<body>
<p>Firebug Issue 1403. The title element causes the line numbers to be off</p>
</body>
</html>

If the <title /> element is removed, the baseLineNumber is correct.
Flags: wanted1.9.1?
Also fails on
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1pre) Gecko/20090527 Shiretoko/3.5pre
Whiteboard: [firebug-p2]
At least for HTML (not XHTML!) rendered pages, this appears to get the line number offset (increased) by the number of lines from <title/> to the end of the document - suggesting it is the parser "unwinding", after not finding a </title>, that is causing this.
Need more testcases!
Assignee: nobody → mrbkap
Status: NEW → ASSIGNED
Attachment #380878 - Flags: superreview?(jst)
Attachment #380878 - Flags: review?(jst)
Attachment #380878 - Flags: superreview?(jst)
Attachment #380878 - Flags: superreview+
Attachment #380878 - Flags: review?(jst)
Attachment #380878 - Flags: review+
Comment on attachment 380878 [details] [diff] [review]
Proposed fix (sans testcase)

Tests please!

kthxbai
Comment on attachment 380878 [details] [diff] [review]
Proposed fix (sans testcase)

a191=shaver contingent on test passage; please hurry, the train is about to leave
Attachment #380878 - Flags: approval1.9.1+
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/a9b031d7f407 and http://hg.mozilla.org/mozilla-central/rev/1471a79f6336
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Keywords: fixed1.9.1
Resolution: --- → FIXED
This fix does not verify because FF3.5 crashes, see Bug 497119.  I don't believe the crash is related to this fix in any way.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: