Closed Bug 1650066 Opened 4 years ago Closed 3 years ago

Fix View Source error reporting for template upon EOF

Categories

(Core :: DOM: HTML Parser, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox93 --- fixed

People

(Reporter: hsivonen, Assigned: hsivonen)

Details

Attachments

(3 files, 2 obsolete files)

No description provided.

errListUnclosedStartTags is not available to C++, so this patch doesn't compile.

Doing errUnclosedElements(eltPos, "template") for EOF in the “in
template” state results in the error message “End tag template seen, but
there were open elements”, which is all wrong because the actual problem is
that though a template end tag was expected, EOF was reached without a
template end tag being seen.

So let’s instead when we reach this just report the list of open elements.

Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
Attachment #9160920 - Attachment is obsolete: true
Severity: -- → S3

Doing errUnclosedElements(eltPos, "template") for EOF in the “in
template” state results in the error message “End tag template seen, but
there were open elements”, which is all wrong because the actual problem is
that though a template end tag was expected, EOF was reached without a
template end tag being seen.

So let’s instead when we reach this just report the list of open elements.

Attachment #9236181 - Attachment is obsolete: true
Pushed by hsivonen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6e85069514f9
preparation - Add errListUnclosedStartTags for HTML tree builder error reporting. r=smaug
https://hg.mozilla.org/integration/autoland/rev/2f58a8d24883
Correct error for EOF in “in template” state r=smaug
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: