JDK-5097973 : REGRESSION: table border nonumerical width is broken
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2004-09-07
  • Updated: 2004-10-25
  • Resolved: 2004-09-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6
5.0u1 betaFixed 6Fixed
Description
###@###.### 2004-09-07

J2SE Version (please include all output from java -version flag):
  java version "1.5.0-rc"
  Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-rc-b63)
  Java HotSpot(TM) Client VM (build 1.5.0-rc-b63, mixed mode)

Does this problem occur on J2SE 1.3, 1.4 or 1.4.1?  Yes / No (pick one)
  Yes, it works fine with 1.3, 1.4 and even tiger build58 and b59.


Operating System Configuration Information (be specific):
 Windows XP (version 5.1 Service Pack 1 (Build 2600))

Bug Description:
 html support is totally broken:

 1) tables are not displayed, check and compare 2 screenshots; one for
    build58 and one for build63.

 2) it even causes hang at the end of applications:
    
    - untar VisualMust.tar and start VisualMust
    - to the question "What would you like to do" answer "cancel"
    - click right on VisualMust desktop
    - use the Help General menu 

   In the best case, nothing happens. Otherwise, if you work
   a while with the application, the application cannot be stopped,
   it hangs...
###@###.### 10/6/04 22:52 GMT

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.5.0_01 mustang FIXED IN: 1.5.0_01 mustang INTEGRATED IN: 1.5.0_01 mustang
28-09-2004

EVALUATION > First, the general help html file wont show at all with b60, but it shows with > b59 and b58. then you can not close the apps, you can only kill the apps which > I think it hangs.... This is yet another manifestation of 5089077 [Regression: NPE when relative font sizes used in html] 5089077 will be integrated in the first tiger update release. relative sizes are used in VisualMust.jar: ./jbc/ide/helpfiles/stylesheet.css ./jbc/ide/helpfiles/DefaultStyleSheet.css ./jbc/ide/helpfiles/HelpStyleSheet.css ./jbc/ide/helpfiles/DefaultStyleSheet150.css Because of 5089077 NullPointerException is thrown and documents are not getting displayed. There are some workarounds for 1.5 for this. Simple one is to remove all CSSs files from the jar (this is what I did to verify it) The other one is to rewrite CSSs not to use relative sizes. There might be a way to do similar things in java. In any case either html/css or java code is to be altered for the client application. > tables are not displayed, check and compare 2 screenshots; one for > build58 and one for build63. The only difference between b58.jpg and b63.jpg is b58 has table border and b63 does not. I would rephrase the description wording. "tables are not displayed" to "tables borders are not displayed" I could not reproduce it yet. I will evaluate it as soon as I have html test case ###@###.### 2004-09-07 >in some cases table's borders are not displayed thanks to ###@###.### for the test case. Because of the fix for 5042095 [GTK+ theming needs to happen for JEditorPane] support for non numerical border width is broken in b60 border-width "", "medium", "thick" and "thin" is zero now. ("" the same as "medium") (Numerical width is handled by CSS.LengthValue) It happened because CSS.BorderWidthValue did not override CSS.LengthValue.getValue(boolean isW3CLengthUnits) CSS.BorderWidthValue extends CSS.LengthValue but does not initialize parent's properties such as float span. Because getValue(boolean isW3CLengthUnits) was not overridden the parent method is invoked. Because parent properties were not initialized properly LengthValue.getValue(boolean isW3CLengthUnits) returns 0. I suggest to initialized parent properties in CSS.BorderWidthValue.BorderWidthValue. With this change we do not need to have CSS.BorderWidthValue.getValue(*) methods because parent's method would work. *** /tmp/geta9930 Tue Sep 7 23:12:42 2004 --- CSS.java Tue Sep 7 23:09:20 2004 *************** *** 2249,2263 **** static class BorderWidthValue extends LengthValue { BorderWidthValue(String svalue, int index) { this.svalue = svalue; ! this.index = index; ! } ! ! float getValue() { ! return values[index]; ! } ! ! float getValue(float currentValue) { ! return values[index]; } Object parseCssValue(String value) { --- 2249,2256 ---- static class BorderWidthValue extends LengthValue { BorderWidthValue(String svalue, int index) { this.svalue = svalue; ! span = values[index]; ! percentage = false; } Object parseCssValue(String value) { *************** *** 2283,2290 **** return parseCssValue(value); } - /** Index into values. */ - private int index; /** Values used to represent border width. */ private static final float[] values = { 1, 2, 4 }; } --- 2276,2281 ---- ###@###.### 2004-09-07 since p1 part of this bug is covered by 5089077 I am changing priority to p3. Also I am changing synopsis to "REGRESSION: table border nonumerical width is broken" ###@###.### 2004-09-09
09-09-2004