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

David harrison at opensource.apple.com
Wed Aug 31 16:05:03 PDT 2005


harrison    05/08/31 16:05:02

  Modified:    .        ChangeLog
               kwq      KWQKHTMLPart.mm
  Added:       manual-tests drag_with_opacity.html
  Log:
          Reviewed by Dave Hyatt.
  
          <rdar://problem/4234658> SUTiDenver8F17: Dragging in this HTML example crashes Safari
  
          Problem is KWQKHTMLPart::snapshotDragImage() leaves the layout needing updating, that
          layout gets triggered (in this case) by the foreground draw in the RenderLayer code,
          thereby deleting the RenderLayer itself.   Simple fix is for snapshotDragImage() to
          updateLayout() after resetting the drag state.
  
          Test cases added:
          * manual-tests/drag_with_opacity.html: Added.
  
          * kwq/KWQKHTMLPart.mm:
          (KWQKHTMLPart::snapshotDragImage):  Call updateLayout() after resetting the drag state
  
  Revision  Changes    Path
  1.59      +17 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- ChangeLog	31 Aug 2005 23:02:18 -0000	1.58
  +++ ChangeLog	31 Aug 2005 23:04:58 -0000	1.59
  @@ -1,3 +1,20 @@
  +2005-08-31  David Harrison  <harrison at apple.com>
  +
  +        Reviewed by Dave Hyatt.
  +
  +        <rdar://problem/4234658> SUTiDenver8F17: Dragging in this HTML example crashes Safari
  +
  +        Problem is KWQKHTMLPart::snapshotDragImage() leaves the layout needing updating, that
  +        layout gets triggered (in this case) by the foreground draw in the RenderLayer code,
  +        thereby deleting the RenderLayer itself.   Simple fix is for snapshotDragImage() to
  +        updateLayout() after resetting the drag state.
  +
  +        Test cases added:
  +        * manual-tests/drag_with_opacity.html: Added.
  +
  +        * kwq/KWQKHTMLPart.mm:
  +        (KWQKHTMLPart::snapshotDragImage):  Call updateLayout() after resetting the drag state 
  +
   2005-08-31  Vicki Murley  <vicki at apple.com>
   
           Reviewed by hyatt.
  
  
  
  1.668     +1 -0      WebCore/kwq/KWQKHTMLPart.mm
  
  Index: KWQKHTMLPart.mm
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/KWQKHTMLPart.mm,v
  retrieving revision 1.667
  retrieving revision 1.668
  diff -u -r1.667 -r1.668
  --- KWQKHTMLPart.mm	31 Aug 2005 04:38:43 -0000	1.667
  +++ KWQKHTMLPart.mm	31 Aug 2005 23:05:00 -0000	1.668
  @@ -3445,6 +3445,7 @@
       _elementToDraw.reset(node);              // invoke special sub-tree drawing mode
       NSImage *result = imageFromRect(paintingRect);
       renderer->updateDragState(false);
  +    d->m_doc->updateLayout();
       _elementToDraw.reset();
   
       if (elementRect) {
  
  
  
  1.1                  WebCore/manual-tests/drag_with_opacity.html
  
  Index: drag_with_opacity.html
  ===================================================================
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.draggable {
	-khtml-user-drag: element;
	-apple-dashboard-region:dashboard-region(control rectangle);
}

.draggable:hover {
	background: #cccccc;
}

.draggable:-khtml-drag { 
	opacity: 0.50;
}
-->
</style>
</head>
<body>
   <p>This is the test case for crashing bug &lt;rdar://problem/4234658&gt;<p>
  <table width="100%" border="1" cellspacing="0" cellpadding="0">
    <tr>
      <td>
      <div class="draggable">Click to right of this text and drag</div>
      </td>
    </tr>
  </table>
</body>
</html>
  
  



More information about the webkit-changes mailing list