[webkit-changes] cvs commit: WebCore/khtml/rendering render_form.cpp

Adele adele at opensource.apple.com
Thu Nov 10 19:16:21 PST 2005


adele       05/11/10 19:16:21

  Modified:    .        ChangeLog
               .        ChangeLog
               khtml/rendering render_form.cpp
  Added:       fast/forms option-strip-whitespace-expected.checksum
                        option-strip-whitespace-expected.png
                        option-strip-whitespace-expected.txt
                        option-strip-whitespace.html
  Log:
  LayoutTests:
  
          Reviewed by Maciej.
  
          Layout test for <rdar://problem/4327363> GAP: tabs not treated as whitespace in option element
  
          * fast/forms/option-strip-whitespace-expected.checksum: Added.
          * fast/forms/option-strip-whitespace-expected.png: Added.
          * fast/forms/option-strip-whitespace-expected.txt: Added.
          * fast/forms/option-strip-whitespace.html: Added.
  
  WebCore:
  
          Reviewed by Maciej.
  
          - fixed <rdar://problem/4327363> GAP: tabs not treated as whitespace in option element
  
          Added
          * fast/forms/option-strip-whitespace.html
  
          * khtml/rendering/render_form.cpp: (RenderSelect::updateFromElement): call simplifyWhiteSpace() on the itemText or label to collapse whitespace.
  
  Revision  Changes    Path
  1.82      +11 -0     LayoutTests/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/LayoutTests/ChangeLog,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- ChangeLog	11 Nov 2005 02:15:38 -0000	1.81
  +++ ChangeLog	11 Nov 2005 03:16:16 -0000	1.82
  @@ -2,6 +2,17 @@
   
           Reviewed by Maciej.
   
  +        Layout test for <rdar://problem/4327363> GAP: tabs not treated as whitespace in option element
  +
  +        * fast/forms/option-strip-whitespace-expected.checksum: Added.
  +        * fast/forms/option-strip-whitespace-expected.png: Added.
  +        * fast/forms/option-strip-whitespace-expected.txt: Added.
  +        * fast/forms/option-strip-whitespace.html: Added.
  +
  +2005-11-10  Adele Peterson  <adele at apple.com>
  +
  +        Reviewed by Maciej.
  +
           Layout test for <rdar://problem/4228997> selecting a new radio button does not automatically clear the previous selected (outside <form> element)
   
           * fast/forms/radio_checked-expected.checksum: Added.
  
  
  
  1.1                  LayoutTests/fast/forms/option-strip-whitespace-expected.checksum
  
  Index: option-strip-whitespace-expected.checksum
  ===================================================================
  c1cd5cc8236349b60c8d8dafc40706e0
  
  
  1.1                  LayoutTests/fast/forms/option-strip-whitespace-expected.png
  
  	<<Binary file>>
  
  
  1.1                  LayoutTests/fast/forms/option-strip-whitespace-expected.txt
  
  Index: option-strip-whitespace-expected.txt
  ===================================================================
  layer at (0,0) size 800x600
    RenderCanvas at (0,0) size 800x600
  layer at (0,0) size 800x600
    RenderBlock {HTML} at (0,0) size 800x600
      RenderBody {BODY} at (8,8) size 784x584
        RenderBlock {P} at (0,0) size 784x18
          RenderText {TEXT} at (0,0) size 403x18
            text run at (0,0) width 403: "All of these selects should have the same amount of whitespace."
        RenderBlock (anonymous) at (0,34) size 784x262
          RenderText {TEXT} at (0,41) size 71x18
            text run at (0,41) width 71: "Five Tabs: "
          RenderSelect {SELECT} at (73,2) size 67x58
          RenderBR {BR} at (0,0) size 0x0
          RenderBR {BR} at (0,62) size 0x18
          RenderText {TEXT} at (0,121) size 84x18
            text run at (0,121) width 84: "Five Spaces: "
          RenderSelect {SELECT} at (86,82) size 67x58
          RenderBR {BR} at (0,0) size 0x0
          RenderBR {BR} at (0,142) size 0x18
          RenderText {TEXT} at (0,161) size 298x18
            text run at (0,161) width 298: "Five Spaces (with leading/trailing whitespace): "
          RenderSelect {SELECT} at (300,162) size 92x18
          RenderBR {BR} at (0,0) size 0x0
          RenderBR {BR} at (0,182) size 0x18
          RenderText {TEXT} at (0,201) size 285x18
            text run at (0,201) width 285: "Five Tabs (with leading/trailing whitespace): "
          RenderSelect {SELECT} at (287,202) size 81x18
          RenderBR {BR} at (0,0) size 0x0
          RenderBR {BR} at (0,222) size 0x18
          RenderText {TEXT} at (0,241) size 126x18
            text run at (0,241) width 126: "Mixed Whitespace: "
          RenderSelect {SELECT} at (128,242) size 81x18
          RenderText {TEXT} at (0,0) size 0x0
          RenderText {TEXT} at (0,0) size 0x0
          RenderText {TEXT} at (0,0) size 0x0
  
  
  
  1.1                  LayoutTests/fast/forms/option-strip-whitespace.html
  
  Index: option-strip-whitespace.html
  ===================================================================
  <body>
  <p>All of these selects should have the same amount of whitespace.</p>
  Five Tabs: <select multiple><option>Five						Tabs</option></select><br/><br/>
  Five Spaces: <select multiple><option>Five     Tabs</option></select><br/><br/>
  
  Five Spaces (with leading/trailing whitespace): <select><option>       Five     Spaces                 </option></select><br/><br/>
  Five Tabs (with leading/trailing whitespace): <select><option>       Five                   Tabs        </option></select><br/><br/>
  Mixed Whitespace: <select><option>       Five                         Tabs        </option></select>
  </body>
  </html>
  
  
  
  1.354     +11 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.353
  retrieving revision 1.354
  diff -u -r1.353 -r1.354
  --- ChangeLog	11 Nov 2005 02:15:33 -0000	1.353
  +++ ChangeLog	11 Nov 2005 03:16:18 -0000	1.354
  @@ -2,6 +2,17 @@
   
           Reviewed by Maciej.
   
  +        - fixed <rdar://problem/4327363> GAP: tabs not treated as whitespace in option element
  +
  +        Added
  +        * fast/forms/option-strip-whitespace.html
  +
  +        * khtml/rendering/render_form.cpp: (RenderSelect::updateFromElement): call simplifyWhiteSpace() on the itemText or label to collapse whitespace.
  +
  +2005-11-10  Adele Peterson  <adele at apple.com>
  +
  +        Reviewed by Maciej.
  +
           -fixed <rdar://problem/4228997> selecting a new radio button does not automatically clear the previous selected (outside <form> element)
   
           Moved the radio button checking code to the document, since we shouldn't need a form to keep track of grouped radio buttons.
  
  
  
  1.130     +4 -0      WebCore/khtml/rendering/render_form.cpp
  
  Index: render_form.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_form.cpp,v
  retrieving revision 1.129
  retrieving revision 1.130
  diff -u -r1.129 -r1.130
  --- render_form.cpp	21 Oct 2005 21:27:46 -0000	1.129
  +++ render_form.cpp	11 Nov 2005 03:16:20 -0000	1.130
  @@ -974,6 +974,8 @@
                   // In WinIE, an optgroup can't start or end with whitespace (other than the indent
                   // we give it).  We match this behavior.
                   label = label.stripWhiteSpace();
  +                // We want to collapse our whitespace too.  This will match other browsers.
  +                label = label.simplifyWhiteSpace();
                   
   #if APPLE_CHANGES
                   if (m_useListBox)
  @@ -997,6 +999,8 @@
   
                   // In WinIE, leading and trailing whitespace is ignored in options. We match this behavior.
                   itemText = itemText.stripWhiteSpace();
  +                // We want to collapse our whitespace too.  This will match other browsers.
  +                itemText = itemText.simplifyWhiteSpace();
                   
                   if (listItems[listIndex]->parentNode()->hasTagName(optgroupTag))
                       itemText.prepend("    ");
  
  
  



More information about the webkit-changes mailing list