mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-30 05:35:31 +00:00
277 lines
12 KiB
HTML
277 lines
12 KiB
HTML
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<meta name="Author" content="Rick Gessner">
|
|
<meta name="GENERATOR" content="Mozilla/4.6 [en] (WinNT; U) [Netscape]">
|
|
<title>ResidualStyle</title>
|
|
</head>
|
|
<body>
|
|
|
|
<table COLS=1 WIDTH="30%" BGCOLOR="#FFFFCC" >
|
|
<tr>
|
|
<td><b><font face="Verdana"><font size=-1>Residual Style </font></font></b></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p><font face="Verdana"><font size=-1>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:</font></font>
|
|
<p><font face="Verdana"><font size=-1><html><body><font color="#009900"><b></font><font color="#3366FF"><div>text</div></font><font color="#009900"></b></font></body></html></font></font>
|
|
<br>
|
|
<br>
|
|
<table BORDER COLS=2 WIDTH="50%" >
|
|
<tr BGCOLOR="#FFFFCC">
|
|
<td>
|
|
<center><b><font face="Verdana"><font size=-1>Expected Result</font></font></b></center>
|
|
</td>
|
|
|
|
<td>
|
|
<center><b><font face="Verdana"><font size=-1>Result defined by HTML4.0</font></font></b></center>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><b>div text here</b></td>
|
|
|
|
<td>div text here</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p><font face="Verdana"><font size=-1>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 preceeding 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:</font></font>
|
|
<p><font face="Verdana"><font size=-1><html><body><font color="#3366FF"><div></font><font color="#009900"><b></font><font color="#3366FF">text</font><font color="#009900"></b></font><font color="#3366FF"></div></font></body></html></font></font>
|
|
<br>
|
|
<br>
|
|
<table COLS=1 WIDTH="30%" BGCOLOR="#FFFFCC" >
|
|
<tr>
|
|
<td><b><font face="Verdana"><font size=-1>How To Create Your Own Tests</font></font></b></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p><font face="Verdana"><font size=-1>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.</font></font><font face="Verdana"><font size=-1></font></font>
|
|
<p><b><font face="Verdana"><font size=-1>Illegal Containment Sample</font></font></b>
|
|
<br><font face="Verdana"><font size=-1>This example shows a <b> containing
|
|
a <div>, which is illegal under HTML.</font></font><font face="Verdana"><font size=-1></font></font>
|
|
<p><font face="Verdana"><font size=-1><html><body><font color="#009900"><b></font><font color="#3366FF"><div>text</div></font><font color="#009900"></b></font></body></html></font></font><font face="Verdana"><font size=-1></font></font>
|
|
<p><b><font face="Verdana"><font size=-1>Malformed Containment Sample</font></font></b>
|
|
<br><font face="Verdana"><font size=-1>This example shows misplaced close
|
|
tags, which often wreak havoc with style in navigator.</font></font><font face="Verdana"><font size=-1></font></font>
|
|
<p><font face="Verdana"><font size=-1><html><body><font color="#009900"><b></font><font color="#3366FF"><div>text1</i>text2</div></font></body></html></font></font>
|
|
<br><b><font face="Verdana"><font size=-1></font></font></b>
|
|
<br><b><font face="Verdana"><font size=-1></font></font></b>
|
|
<table WIDTH="100%" >
|
|
<tr>
|
|
<td><b><font face="Verdana"><font size=-1>List of FontStyle Tags: </font></font></b></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><b>, <big>, <i>, <s>,
|
|
<small>, <strike>, <tt>, <u></font></font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><b><font face="Verdana"><font size=-1>List of Phrase Tags:</font></font></b></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><abbr>, <acronym>, <cite>,
|
|
<code>, <dfn>, <em>, <kbd>, <samp>, <strong>, <var></font></font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><b><font face="Verdana"><font size=-1>List of Special Tags:</font></font></b></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a>, <applet>, <basefont>,
|
|
<bdo>, <br>, <font>, <iframe>, <img>, <obect>, <map>,
|
|
<q>, <script>, <span>, <sub>, <sup></font></font></td>
|
|
</tr>
|
|
</table>
|
|
<font face="Verdana"><font size=-1></font></font>
|
|
<br><font face="Verdana"><font size=-1></font></font>
|
|
<br><font face="Verdana"><font size=-1></font></font>
|
|
<table COLS=1 WIDTH="30%" BGCOLOR="#FFFFCC" >
|
|
<tr>
|
|
<td><b><font face="Verdana"><font size=-1>Residual Style Testcases</font></font></b></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p><font face="Verdana"><font size=-1>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.</font></font>
|
|
<p><font face="Verdana"><font size=-1>Click on any of the following links
|
|
to begin...</font></font>
|
|
<br>
|
|
<table BORDER COLS=7 WIDTH="90%" >
|
|
<tr>
|
|
<td><font face="Verdana"><font size=-1><a href="bug466.html">Bug466</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug991.html">Bug991</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug1239.html">Bug1239</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug1259.html">Bug1259</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug2419.html">Bug2419</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug2447.html">Bug2447</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug3073.html">Bug3073</a></font></font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font face="Verdana"><font size=-1><a href="Bug4814.html">Bug4814</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug4809.html">Bug4809</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug4956.html">Bug4958</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug5859.html">Bug5859</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug6233.html">Bug6233</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug6925.html">Bug6925</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug7447.html">Bug7447</a></font></font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font face="Verdana"><font size=-1><a href="Bug7723.html">Bug7723</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug7724.html">Bug7724</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug7823.html">Bug7823</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug7889.html">Bug7889</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug8080.html">Bug8080</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug8056.html">Bug8056</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug8681.html">Bug8681</a></font></font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font face="Verdana"><font size=-1><a href="Bug8738.html">Bug8738</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug8771.html">Bug8771</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug8913.html">Bug8913</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug8996.html">Bug8996</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug9563.html">Bug9563</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug10049.html">Bug10049</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug10324.html">Bug10324</a></font></font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font face="Verdana"><font size=-1><a href="Bug11381.html">Bug11381</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug12118.html">Bug12118</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug12632.html">Bug12632</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug12468.html">Bug12468</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug13107.html">Bug13107</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug14276.html">Bug14276</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug14636.html">Bug14636</a></font></font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font face="Verdana"><font size=-1><a href="Bug14981.html">Bug14981</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug18159.html">Bug18159</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug18185.html">Bug18185</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug18403.html">Bug18403</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug18865.html">Bug18865</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug19172.html">Bug19172</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug19194.html">Bug19194</a></font></font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font face="Verdana"><font size=-1><a href="Bug20030.html">Bug20030</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug20178.html">Bug20178</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug20199.html">Bug20199</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug21186.html">Bug21186</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug21318.html">Bug21318</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug21424.html">Bug21424</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug21689.html">Bug21689</a></font></font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font face="Verdana"><font size=-1><a href="Bug21692.html">Bug21692</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug21779.html">Bug21779</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug22025.html">Bug22025</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug22142.html">Bug22142</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug22157.html">Bug22157</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug23529.html">Bug23529</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug23680.html">Bug23680</a></font></font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><font face="Verdana"><font size=-1><a href="Bug23780.html">Bug23780</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug23831.html">Bug23831</a></font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-1><a href="Bug24003.html">Bug24003</a></font></font></td>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p>
|
|
<hr WIDTH="100%">
|
|
<table WIDTH="100%" BGCOLOR="#FFFFFF" >
|
|
<tr>
|
|
<td VALIGN=TOP><font face="Verdana"><font size=-2>Residual style: </font></font></td>
|
|
|
|
<td><font face="Verdana"><font size=-2>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.</font></font></td>
|
|
</tr>
|
|
</table>
|
|
|
|
</body>
|
|
</html>
|