[webkit-changes] cvs commit: WebCore/layout-tests/fast/text line-breaks-expected.txt line-breaks.html

Darin darin at opensource.apple.com
Sat Aug 27 11:55:03 PDT 2005


darin       05/08/27 11:55:02

  Modified:    .        ChangeLog
               khtml/rendering break_lines.cpp
  Added:       layout-tests/fast/text line-breaks-expected.txt
                        line-breaks.html
  Log:
          Reviewed and landed by Darin.
  
          - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3963
            Trailing space included in line if next line begins with non-Latin-1 character
  
          Test cases added:
          * layout-tests/fast/text/line-breaks.html: Added.
          * layout-tests/fast/text/line-breaks-expected.txt: Added.
  
          * khtml/rendering/break_lines.cpp: (khtml::isBreakable): Disallow breaks in a few cases where UCFindTextBreak
          says things are breakable. This is only an intermediate step. We're going to improve this code and consider a port
          to ICU instead of Carbon.
  
  Revision  Changes    Path
  1.23      +15 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- ChangeLog	27 Aug 2005 05:28:42 -0000	1.22
  +++ ChangeLog	27 Aug 2005 18:54:59 -0000	1.23
  @@ -1,3 +1,18 @@
  +2005-08-27  Mitz Pettel  <opendarwin.org at mitzpettel.com>
  +
  +        Reviewed and landed by Darin.
  +
  +        - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3963
  +          Trailing space included in line if next line begins with non-Latin-1 character
  +
  +        Test cases added:
  +        * layout-tests/fast/text/line-breaks.html: Added.
  +        * layout-tests/fast/text/line-breaks-expected.txt: Added.
  +
  +        * khtml/rendering/break_lines.cpp: (khtml::isBreakable): Disallow breaks in a few cases where UCFindTextBreak
  +        says things are breakable. This is only an intermediate step. We're going to improve this code and consider a port
  +        to ICU instead of Carbon.
  +
   2005-08-26  Darin Adler  <darin at apple.com>
   
           - fixed a few things in the DOM test suite
  
  
  
  1.23      +3 -3      WebCore/khtml/rendering/break_lines.cpp
  
  Index: break_lines.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/break_lines.cpp,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- break_lines.cpp	25 Aug 2005 17:47:13 -0000	1.22
  +++ break_lines.cpp	27 Aug 2005 18:55:00 -0000	1.23
  @@ -102,10 +102,10 @@
               status = UCCreateTextBreakLocator(NULL, 0, kUCTextBreakLineMask, &breakLocator);
           if (status == 0)
               findStatus = UCFindTextBreak(breakLocator, kUCTextBreakLineMask, 0, (const UniChar *)s, len, pos, &end);
  -
  -        // If carbon fails, fail back on simple white space detection.
           if (findStatus == 0)
  -            return ((int)end == pos) ? true : false;
  +            return (int)end == pos && !(lastCh == ' ' || lastCh == '\n' || lastCh == '\t' || (breakNBSP && lastCh == 0xa0));
  +
  +        // If Carbon fails, fail back on simple white space detection.
       }
       
       // Match WinIE's breaking strategy, which is to always allow breaks after hyphens and question marks.
  
  
  
  1.1                  WebCore/layout-tests/fast/text/line-breaks-expected.txt
  
  Index: line-breaks-expected.txt
  ===================================================================
  layer at (0,0) size 800x600
    RenderCanvas at (0,0) size 800x600
  layer at (0,0) size 800x480
    RenderBlock {HTML} at (0,0) size 800x480
      RenderBody {BODY} at (8,8) size 784x451
        RenderBlock (anonymous) at (0,0) size 784x18
          RenderText {TEXT} at (0,0) size 82x18
            text run at (0,0) width 82: "This is good:"
        RenderBlock {DIV} at (0,39) size 100x50
          RenderBlock {P} at (0,0) size 100x50 [border: (1px solid #008000)]
            RenderText {TEXT} at (35,1) size 64x48
              text run at (35,1) width 64: "Lorem"
              text run at (36,25) width 63: "ipsum"
        RenderBlock (anonymous) at (0,110) size 784x18
          RenderText {TEXT} at (0,0) size 284x18
            text run at (0,0) width 284: "The following three should look like \x{201C}good\x{201D}:"
        RenderBlock {DIV} at (0,149) size 100x192
          RenderBlock {P} at (0,0) size 100x50 [border: (1px solid #0000FF)]
            RenderText {TEXT} at (35,1) size 64x48
              text run at (35,1) width 64: "Lorem"
              text run at (36,25) width 63: "\x{131}psum"
          RenderBlock {P} at (0,71) size 100x50 [border: (1px solid #0000FF)]
            RenderText {TEXT} at (35,1) size 64x48
              text run at (35,1) width 64: "Lorem"
              text run at (36,25) width 63: "\x{131}psum"
          RenderBlock {P} at (0,142) size 100x50 [border: (1px solid #0000FF)]
            RenderText {TEXT} at (35,1) size 64x48
              text run at (35,1) width 64: "Lore\x{1E3F}"
              text run at (36,25) width 63: "ipsum"
        RenderBlock (anonymous) at (0,362) size 784x18
          RenderText {TEXT} at (0,0) size 73x18
            text run at (0,0) width 73: "This is bad:"
        RenderBlock {DIV} at (0,401) size 100x50
          RenderBlock {P} at (0,0) size 100x50 [border: (1px solid #FF0000)]
            RenderText {TEXT} at (28,1) size 71x48
              text run at (28,1) width 71: "Lorem "
              text run at (36,25) width 63: "ipsum"
  
  
  
  1.1                  WebCore/layout-tests/fast/text/line-breaks.html
  
  	<<Binary file>>
  
  



More information about the webkit-changes mailing list