Changeset 38386 in webkit


Ignore:
Timestamp:
Nov 13, 2008 8:39:12 PM (15 years ago)
Author:
mrowe@apple.com
Message:

Fix the build.

Don't use NSPICTPboardType on systems where it is deprecated. The system will take care of converting
from this format to a format that we can understand.

  • WebCoreSupport/WebPasteboardHelper.mm:

(WebPasteboardHelper::insertablePasteboardTypes):

  • WebView/WebHTMLView.mm:

(-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]):
(+[WebHTMLView _insertablePasteboardTypes]):
(-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):

Location:
trunk/WebKit/mac
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/mac/ChangeLog

    r38373 r38386  
     12008-11-13  Mark Rowe  <mrowe@apple.com>
     2
     3        Fix the build.
     4
     5        Don't use NSPICTPboardType on systems where it is deprecated.  The system will take care of converting
     6        from this format to a format that we can understand.
     7
     8        * WebCoreSupport/WebPasteboardHelper.mm:
     9        (WebPasteboardHelper::insertablePasteboardTypes):
     10        * WebView/WebHTMLView.mm:
     11        (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]):
     12        (+[WebHTMLView _insertablePasteboardTypes]):
     13        (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
     14
    1152008-11-13  John Sullivan  <sullivan@apple.com>
    216
  • trunk/WebKit/mac/WebCoreSupport/WebPasteboardHelper.mm

    r29663 r38386  
    9191
    9292NSArray *WebPasteboardHelper::insertablePasteboardTypes() const
    93 {   
    94     static RetainPtr<NSArray> types = [[NSArray alloc] initWithObjects:WebArchivePboardType, NSHTMLPboardType,
    95            NSFilenamesPboardType, NSTIFFPboardType, NSPICTPboardType, NSURLPboardType,
    96            NSRTFDPboardType, NSRTFPboardType, NSStringPboardType, NSColorPboardType, nil];
    97    
     93{
     94    static RetainPtr<NSArray> types = [[NSArray alloc] initWithObjects:WebArchivePboardType, NSHTMLPboardType, NSFilenamesPboardType, NSTIFFPboardType,
     95#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
     96           NSPICTPboardType,
     97#endif
     98           NSURLPboardType, NSRTFDPboardType, NSRTFPboardType, NSStringPboardType, NSColorPboardType, nil];
     99
    98100    return types.get();
    99101}
  • trunk/WebKit/mac/WebView/WebHTMLView.mm

    r38277 r38386  
    662662        return fragment;
    663663
     664#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
    664665    if ([types containsObject:NSPICTPboardType] &&
    665666        (fragment = [self _documentFragmentFromPasteboard:pasteboard
     
    668669                                             subresources:0]))
    669670        return fragment;
    670        
     671#endif
     672
    671673    // Only 10.5 and higher support setting and retrieving pasteboard types with UTIs, but we don't believe
    672674    // that any applications on Tiger put types for which we only have a UTI, like PNG, on the pasteboard.
     
    14651467    static NSArray *types = nil;
    14661468    if (!types) {
    1467         types = [[NSArray alloc] initWithObjects:WebArchivePboardType, NSHTMLPboardType,
    1468             NSFilenamesPboardType, NSTIFFPboardType, NSPICTPboardType, NSURLPboardType,
    1469             NSRTFDPboardType, NSRTFPboardType, NSStringPboardType, NSColorPboardType,
    1470             kUTTypePNG, nil];
     1469        types = [[NSArray alloc] initWithObjects:WebArchivePboardType, NSHTMLPboardType, NSFilenamesPboardType, NSTIFFPboardType,
     1470#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
     1471            NSPICTPboardType,
     1472#endif
     1473            NSURLPboardType, NSRTFDPboardType, NSRTFPboardType, NSStringPboardType, NSColorPboardType, kUTTypePNG, nil];
    14711474        CFRetain(types);
    14721475    }
     
    19321935        return fragment;
    19331936    }
     1937#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
    19341938    if (pboardType == NSPICTPboardType) {
    19351939        WebResource *resource = [[WebResource alloc] initWithData:[pasteboard dataForType:NSPICTPboardType]
     
    19421946        return fragment;
    19431947    }
     1948#endif
    19441949    // Only 10.5 and higher support setting and retrieving pasteboard types with UTIs, but we don't believe
    19451950    // that any applications on Tiger put types for which we only have a UTI, like PNG, on the pasteboard.
Note: See TracChangeset for help on using the changeset viewer.