EVALUATION
Now HTML.Attribute.BORDER is translated into CSS.Attribute[]{CSS.Attribute.BORDER_TOP_WIDTH, CSS.Attribute.BORDER_RIGHT_WIDTH, CSS.Attribute.BORDER_BOTTOM_WIDTH, CSS.Attribute.BORDER_LEFT_WIDTH} (see javax.swing.text.html.CSS#htmlAttrToCssAttrMap). After that every CSS attribute converted via javax.swing.text.html.CSS.BorderWidthValue. That's incorrect because
1. BORDER attribute of the TABLE tag can be only an integer (but CSS.Attribute.BORDER_TOP_WIDTH can be "thick", "medium" and "thin")
2. Almost all (actually on IE, Firefox and Google Chrome) accepts <table border> and <table border=""> and that means BORDER=1 (see http://www.w3.org/TR/REC-html32-19970114#table, "Note that some browsers also accept <TABLE BORDER> with the same semantics as BORDER=1")
3. BORDER attribute of the TABLE tag specifies the width of the outer border around the table, but now the same value used for cells borders as well.
4. By default cellSpacing = 2, but we use cellSpacing = 0
We should fix all described problems.
|