Closed Bug 1270866 Opened 9 years ago Closed 9 years ago

HTML font style stops changing after about 200 times in one page

Categories

(Core :: DOM: HTML Parser, defect)

45 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 256180

People

(Reporter: donald.osselaer, Unassigned)

Details

Attachments

(2 files)

Attached file S.html
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0 Build ID: 20160407164938 Steps to reproduce: I made a tool to create a list of a music collection. It makes HTML pages and uses font colors to differentiate between artists and albums. When a listing is very large and after about 200 times of changing the font color with <FONT COLOR="color"> in one page, Firefox completely stops changing anything to the font halfway the page. Actual results: Firefox stops changing HTML font color and size after it has changed about 200 times in a single HTML page. See attached file for an example. Expected results: The FONT should keep changing, obviously. It does work, with exactly the same page, in Internet Explorer and Chrome.
Attached file 1270866.html
Closing one <font> tag is enough. Just fix your broken code, because the HTML parser of Firefox is lost.
Component: Untriaged → HTML: Parser
Product: Firefox → Core
Similar to Bug 268474 And this broken html will cause Bug 256180
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
(In reply to Loic from comment #1) > Created attachment 8750008 [details] > 1270866.html > > Closing one <font> tag is enough. Just fix your broken code, because the > HTML parser of Firefox is lost. Thanks for pointing out my error there. I thought it was a bug since IE and chrome displayed it as intended, but FF didn't. In fact it makes sense to stop nesting at some point and I understand it now. The reason for my error is that I've always been quite proficient at actual programming, but I've never used HTML before this project. Every day is a new chance to learn, right ;)
(In reply to Loic from comment #1) > Created attachment 8750008 [details] > 1270866.html > > Closing one <font> tag is enough. Just fix your broken code, because the > HTML parser of Firefox is lost. I don't think so. Looking at the example you are only closing the second <FONT> tag so technically you are still nesting. You must close every <font> tag, because they may be nested. I think a lot of beginners assume that <font> acts like <p> and thus doesn't need closing tags, but that is wrong. It would be interesting to see what rules IE / chrome use to close the tags. As regards the list, better markup than <FONT COLOR="Silver">S.U.N. Project : <FONT COLOR="Grey">The Remixes</FONT><br> <FONT COLOR="Silver">Sade : <FONT COLOR="Grey">Diamond Life - Love Deluxe - Lovers Live - Lover's Rock - Promise - The Best Of</FONT><br> <FONT COLOR="Silver">Sadie Glutz : <FONT COLOR="Grey">The Boy From Outer Space</FONT><br> would be this:L <style> #albums li { color:grey; } #albums .artist { color:silver; } </style> <ul id="albums"> <li><span class="artist">S.U.N. Project : </span>The Remixes</li> <li><span class="artist">Sade : </span>Diamond Life - Love Deluxe - Lovers Live - Lover's Rock - Promise - The Best Of</li> <li><span class="artist">Sadie Glutz : </span>The Boy From Outer Space</li> ... </ul> With the added benefits of cleaner markup and an easier way to recolor should you ever want to redesign your site. You could even move the style to an external css file and then the user can choose her own color scheme very easily.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: