[webkit-changes] cvs commit: WebCore/manual-tests bugzilla-3855.html

Vicki vicki at opensource.apple.com
Thu Jul 14 12:06:29 PDT 2005


vicki       05/07/14 12:06:29

  Modified:    .        ChangeLog
               kwq      KWQKHTMLPart.mm
  Added:       manual-tests bugzilla-3855.html
  Log:
          Reviewed by hyatt, patch from Carsten Guenther.
  
  	- fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=3855
  
          Test cases added:
          * manual-tests/bugzilla-3855.html: Added.
  
          * kwq/KWQKHTMLPart.mm:
          (KWQKHTMLPart::searchForLabelsAboveCell): check for the existence of the cell renderer
  
  Revision  Changes    Path
  1.4425    +12 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.4424
  retrieving revision 1.4425
  diff -u -r1.4424 -r1.4425
  --- ChangeLog	14 Jul 2005 18:08:00 -0000	1.4424
  +++ ChangeLog	14 Jul 2005 19:06:24 -0000	1.4425
  @@ -1,5 +1,17 @@
   2005-07-14  Vicki Murley  <vicki at apple.com>
   
  +        Reviewed by hyatt, patch from Carsten Guenther.
  +
  +	- fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=3855
  +
  +        Test cases added:
  +        * manual-tests/bugzilla-3855.html: Added.
  +
  +        * kwq/KWQKHTMLPart.mm: 
  +        (KWQKHTMLPart::searchForLabelsAboveCell): check for the existence of the cell renderer
  +
  +2005-07-14  Vicki Murley  <vicki at apple.com>
  +
   	- added manual tests for <rdar://problem/4172380> [GENENTECH] window.opener not available 
   	when child opened via target="_new"
           
  
  
  
  1.649     +18 -15    WebCore/kwq/KWQKHTMLPart.mm
  
  Index: KWQKHTMLPart.mm
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/KWQKHTMLPart.mm,v
  retrieving revision 1.648
  retrieving revision 1.649
  diff -u -r1.648 -r1.649
  --- KWQKHTMLPart.mm	14 Jul 2005 02:22:12 -0000	1.648
  +++ KWQKHTMLPart.mm	14 Jul 2005 19:06:28 -0000	1.649
  @@ -483,22 +483,25 @@
   NSString *KWQKHTMLPart::searchForLabelsAboveCell(QRegExp *regExp, HTMLTableCellElementImpl *cell)
   {
       RenderTableCell *cellRenderer = static_cast<RenderTableCell *>(cell->renderer());
  -    RenderTableCell *cellAboveRenderer = cellRenderer->table()->cellAbove(cellRenderer);
   
  -    if (cellAboveRenderer) {
  -        HTMLTableCellElementImpl *aboveCell =
  -            static_cast<HTMLTableCellElementImpl *>(cellAboveRenderer->element());
  -
  -        if (aboveCell) {
  -            // search within the above cell we found for a match
  -            for (NodeImpl *n = aboveCell->firstChild(); n; n = n->traverseNextNode(aboveCell)) {
  -                if (n->isTextNode() && n->renderer() && n->renderer()->style()->visibility() == VISIBLE)
  -                {
  -                    // For each text chunk, run the regexp
  -                    QString nodeString = n->nodeValue().string();
  -                    int pos = regExp->searchRev(nodeString);
  -                    if (pos >= 0) {
  -                        return nodeString.mid(pos, regExp->matchedLength()).getNSString();
  +    if (cellRenderer) {
  +        RenderTableCell *cellAboveRenderer = cellRenderer->table()->cellAbove(cellRenderer);
  +
  +        if (cellAboveRenderer) {
  +            HTMLTableCellElementImpl *aboveCell =
  +                static_cast<HTMLTableCellElementImpl *>(cellAboveRenderer->element());
  +
  +            if (aboveCell) {
  +                // search within the above cell we found for a match
  +                for (NodeImpl *n = aboveCell->firstChild(); n; n = n->traverseNextNode(aboveCell)) {
  +                    if (n->isTextNode() && n->renderer() && n->renderer()->style()->visibility() == VISIBLE)
  +                    {
  +                        // For each text chunk, run the regexp
  +                        QString nodeString = n->nodeValue().string();
  +                        int pos = regExp->searchRev(nodeString);
  +                        if (pos >= 0) {
  +                            return nodeString.mid(pos, regExp->matchedLength()).getNSString();
  +                        }
                       }
                   }
               }
  
  
  
  1.1                  WebCore/manual-tests/bugzilla-3855.html
  
  Index: bugzilla-3855.html
  ===================================================================
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
          "http://www.w3.org/TR/html4/strict.dtd">
  <html lang="en">
  <head>
  </head>
  <body>
  <p><b>BUG ID:</b> <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=3855">Bugzilla Bug 3855</a> Table with Form Field and Hidden DIV crashes Safari</p>
  
  <p id="test" style="background-color:skyblue; padding:3px;"><b>STEPS TO TEST:</b> 
  Type in the text field below.</p>
  
  <p id="success" style="background-color:palegreen; padding:3px;"><b>TEST PASS:</b> 
  Safari will not crash, text will show up in text field as expected.
  </p>
  
  <p id="failure" style="background-color:#FF3300; padding:3px;"><b>TEST FAIL:</b>  
  Safari will crash.
  </p>
  
  Type in the input field below:
  <form>
  <div style="display:none;">
  <table>
       <tr>
          <td>test</td>
        </tr>
     </table>
  </div>
  
  <input type='text' value='' />
  </form>
  
  </body>
  </html>
  
  
  



More information about the webkit-changes mailing list