United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-8014863 Line break calculations in Java 7 are incorrect.
JDK-8014863 : Line break calculations in Java 7 are incorrect.

Details
Type:
Bug
Submit Date:
2013-05-20
Status:
Resolved
Updated Date:
2013-12-17
Project Name:
JDK
Resolved Date:
2013-05-29
Component:
client-libs
OS:
generic
Sub-Component:
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7,8
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:
Duplicate:
Duplicate:
Relates:
Relates:
Relates:
Relates:

Sub Tasks

Description
Run HTMLEditorTest which will display a frame with a HTMLEditorKit backed
JEditorPane.

Inorder to see as described below, do not resize the Window.
Insert the cursor before the first qqqq in the text.

Step 1 type "o"
Expected: The last pp in the first line is moved to the next line.
Actual: The last pp is moved to the next line, but it is proceeded by a
space.

Step 2 type "n"
Expected: n is added after the o
Actual: n is added after the o, but also the last q in the last qqqq on the
first line is moved to the next line.

Step 3 type "e tw".
Expected: the last qqqq is moved to the next line.
Actual: Everything after the first qqqq is moved to the next line. 
                                    

Comments
URL:   http://hg.openjdk.java.net/jdk8/awt/jdk/rev/c8a0abc1fd2d
User:  mcherkas
Date:  2013-05-29 14:47:01 +0000

                                     
2013-05-29
URL:   http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/c8a0abc1fd2d
User:  lana
Date:  2013-06-04 17:27:56 +0000

                                     
2013-06-04
When a document contains several elements and some text is inserted, only the views around the insertion are updated. The other views, (e.g. GlyphView) keep using the previously calculated break points. This will cause an incorrect line break calculation.
Suggested fix: GlyphView should not cache the break points.
                                     
2013-05-22



Hardware and Software, Engineered to Work Together