Residual Style 

This page is the topmost page for testing residual style. Residual style handling refers to automatic document conversions performed by Gecko when encounters mal-formed HTML fontstyle elements (explicit style tags -- not CSS). For example:

<html><body><b><div>text</div></b></body></html>
 
 
Expected Result
Result defined by HTML4.0
div text here div text here

According to the spec, <b> is a fontstyle element, whereas <div> is a block element. As a rule, fontstyle tags can't contain block elements, which means that the preceding example is malformed. In order to remain backward compatible and simultaneously maintain well-formed documents, Gecko may have to rewrite the document to be correct. The prior example is rewritten by Gecko like this:

<html><body><div><b>text</b></div></body></html>
 
 
How To Create Your Own Tests

You can make your own residual style tests either manually, or by using the htmlgen program that is checked into the tree at mozilla\htmlparser\htmlgen. Most residual style problems fall into one of two categories: 1) illegal containment; 2) malformed closures. Note that these problems can exist for fontstyle, phrasal and special tags (see the list below). Also note that navigator behavior is very inconsistent with respect to these problems, so don't assume that one testcase covers all cases.

Illegal Containment Sample
This example shows a <b> containing a <div>, which is illegal under HTML.

<html><body><b><div>text</div></b></body></html>

Malformed Containment Sample
This example shows misplaced close tags, which often wreak havoc with style in navigator.

<html><body><b><div>text1</i>text2</div></body></html>
 
 
List of FontStyle Tags:  <b>, <big>, <i>, <s>, <small>, <strike>, <tt>, <u>
List of Phrase Tags: <abbr>, <acronym>, <cite>, <code>, <dfn>, <em>, <kbd>, <samp>, <strong>, <var>
List of Special Tags: <a>, <applet>, <basefont>, <bdo>, <br>, <font>, <iframe>, <img>, <obect>, <map>, <q>, <script>, <span>, <sub>, <sup>

 
 
Residual Style Testcases

The following testcases were taken from real bugs. In most cases, these have been reduced to a minimum sample, and they have been linked together so that you compare them in sequence against other browsers.

Click on any of the following links to begin...
 
Bug466 Bug991 Bug1239 Bug1259 Bug2419 Bug2447 Bug3073
Bug4814 Bug4809 Bug4958 Bug5859 Bug6233 Bug6925 Bug7447
Bug7723 Bug7724 Bug7823 Bug7889 Bug8080 Bug8056 Bug8681
Bug8738 Bug8771 Bug8913 Bug8996 Bug9563 Bug10049 Bug10324
Bug11381 Bug12118 Bug12632 Bug12468 Bug13107 Bug14276 Bug14636
Bug14981 Bug18159 Bug18185 Bug18403 Bug18865 Bug19172 Bug19194
Bug20030 Bug20178 Bug20199 Bug21186 Bug21318 Bug21424 Bug21689
Bug21692 Bug21779 Bug22025 Bug22142 Bug22157 Bug23529 Bug23680
Bug23780 Bug23831 Bug24003


Residual style:  This term describes the case where malformed fontstyle elements that get closed out by block elements need to be reopened later in the document. The term can about for two reasons: 1) because style gets reopened "residually" -- later in the document; 2) because explicit style tags tend to leave an unpleasant "residue" on html documents.