[webkit-changes] cvs commit: WebKit/WebView.subproj WebHTMLView.m

Eric eseidel at opensource.apple.com
Tue Nov 29 18:07:50 PST 2005


eseidel     05/11/29 18:07:50

  Modified:    .        ChangeLog
               WebView.subproj WebHTMLView.m
  Log:
  Bug #: 4726
  Submitted by: Andrew Wellington <proton at wiretapped.net>
  Reviewed by: darin
          Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=4726
          Drop of multiple non-image file URLs only yields one item
  
          * WebView.subproj/WebHTMLView.m:
          (-[WebHTMLView _documentFragmentWithPaths:]):
  
  Revision  Changes    Path
  1.3378    +10 -0     WebKit/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebKit/ChangeLog,v
  retrieving revision 1.3377
  retrieving revision 1.3378
  diff -u -r1.3377 -r1.3378
  --- ChangeLog	29 Nov 2005 22:34:57 -0000	1.3377
  +++ ChangeLog	30 Nov 2005 02:07:41 -0000	1.3378
  @@ -1,3 +1,13 @@
  +2005-11-29  Andrew Wellington  <proton at wiretapped.net>
  +
  +        Reviewed by darin.  Committed by eseidel.
  +
  +        Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=4726
  +        Drop of multiple non-image file URLs only yields one item
  +
  +        * WebView.subproj/WebHTMLView.m:
  +        (-[WebHTMLView _documentFragmentWithPaths:]):
  +
   2005-11-29  Tim Omernick  <timo at apple.com>
   
           Reviewed by John Sullivan, Eric Seidel
  
  
  
  1.481     +11 -2     WebKit/WebView.subproj/WebHTMLView.m
  
  Index: WebHTMLView.m
  ===================================================================
  RCS file: /cvs/root/WebKit/WebView.subproj/WebHTMLView.m,v
  retrieving revision 1.480
  retrieving revision 1.481
  diff -u -r1.480 -r1.481
  --- WebHTMLView.m	28 Nov 2005 22:39:59 -0000	1.480
  +++ WebHTMLView.m	30 Nov 2005 02:07:49 -0000	1.481
  @@ -273,10 +273,11 @@
   
   - (DOMDocumentFragment *)_documentFragmentWithPaths:(NSArray *)paths
   {
  -    DOMDocumentFragment *fragment = [[[self _bridge] DOMDocument] createDocumentFragment];
  +    DOMDocumentFragment *fragment;
       NSArray *imageMIMETypes = [[WebImageRendererFactory sharedFactory] supportedMIMETypes];
       NSEnumerator *enumerator = [paths objectEnumerator];
       WebDataSource *dataSource = [self _dataSource];
  +    NSMutableArray *domNodes = [[NSMutableArray alloc] init];
       NSString *path;
       
       while ((path = [enumerator nextObject]) != nil) {
  @@ -288,12 +289,20 @@
                                                        textEncodingName:nil
                                                               frameName:nil];
               if (resource) {
  -                [fragment appendChild:[dataSource _imageElementWithImageResource:resource]];
  +                [domNodes addObject:[dataSource _imageElementWithImageResource:resource]];
                   [resource release];
               }
  +        } else {
  +            // Non-image file types
  +            NSString *url = [[[NSURL fileURLWithPath:path] _webkit_canonicalize] _web_userVisibleString];
  +            [domNodes addObject:[[[self _bridge] DOMDocument] createTextNode: url]];
           }
       }
       
  +    fragment = [[self _bridge] documentFragmentWithNodesAsParagraphs:domNodes]; 
  +    
  +    [domNodes release];
  +    
       return [fragment firstChild] != nil ? fragment : nil;
   }
   
  
  
  



More information about the webkit-changes mailing list