Changeset 70611 in webkit


Ignore:
Timestamp:
Oct 26, 2010 10:29:18 PM (13 years ago)
Author:
ddkilzer@apple.com
Message:

Extract call to -[WebHTMLRepresentation supportedNonImageMIMETypes] from WebArchiveDumpSupport.mm

Reviewed by Adam Roben.

Part 1 of 4: <http://webkit.org/b/48278> Convert DumpRenderTree webarchive code to CoreFoundation

The call to -[WebHTMLRepresentation supportedNonImageMIMETypes]
is not cross-platform between Mac and Windows, so extract it
into a platform-specific source file.

  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Added

WebArchiveDumpSupportMac.mm to the project.

  • DumpRenderTree/mac/WebArchiveDumpSupport.h:

(supportedNonImageMIMETypes): Added declaration.

  • DumpRenderTree/mac/WebArchiveDumpSupport.mm:

(convertWebResourceDataToString): Replaced call to
-[WebHTMLRepresentation supportedNonImageMIMETypes] with
supportedNonImageMIMETypes().

  • DumpRenderTree/mac/WebArchiveDumpSupportMac.mm: Added.

(supportedNonImageMIMETypes): Added. Extracted from
WebArchiveDumpSupport.mm.

Location:
trunk/WebKitTools
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r70609 r70611  
     12010-10-26  David Kilzer  <ddkilzer@apple.com>
     2
     3        Extract call to -[WebHTMLRepresentation supportedNonImageMIMETypes] from WebArchiveDumpSupport.mm
     4
     5        Reviewed by Adam Roben.
     6
     7        Part 1 of 4: <http://webkit.org/b/48278> Convert DumpRenderTree webarchive code to CoreFoundation
     8
     9        The call to -[WebHTMLRepresentation supportedNonImageMIMETypes]
     10        is not cross-platform between Mac and Windows, so extract it
     11        into a platform-specific source file.
     12
     13        * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Added
     14        WebArchiveDumpSupportMac.mm to the project.
     15        * DumpRenderTree/mac/WebArchiveDumpSupport.h:
     16        (supportedNonImageMIMETypes): Added declaration.
     17        * DumpRenderTree/mac/WebArchiveDumpSupport.mm:
     18        (convertWebResourceDataToString): Replaced call to
     19        -[WebHTMLRepresentation supportedNonImageMIMETypes] with
     20        supportedNonImageMIMETypes().
     21        * DumpRenderTree/mac/WebArchiveDumpSupportMac.mm: Added.
     22        (supportedNonImageMIMETypes): Added.  Extracted from
     23        WebArchiveDumpSupport.mm.
     24
    1252010-10-26  Antonio Gomes  <agomes@rim.com>
    226
  • trunk/WebKitTools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj

    r70244 r70611  
    4949                3713EDE2115BE19300705720 /* ColorBits-A.png in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 3713EDDF115BE16F00705720 /* ColorBits-A.png */; };
    5050                3713EDE3115BE19300705720 /* ColorBits.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 3713EDE0115BE16F00705720 /* ColorBits.ttf */; };
     51                440590711268453800CFD48D /* WebArchiveDumpSupportMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 440590701268453800CFD48D /* WebArchiveDumpSupportMac.mm */; };
    5152                4437730E125CBC3600AAE02C /* WebArchiveDumpSupport.mm in Sources */ = {isa = PBXBuildFile; fileRef = 44A997830FCDE86400580F10 /* WebArchiveDumpSupport.mm */; };
    5253                4437730F125CBC4D00AAE02C /* WebArchiveDumpSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 44A997820FCDE86400580F10 /* WebArchiveDumpSupport.h */; };
     
    224225                375F09780DAC3CB600C8B4E5 /* WebKitWeightWatcher800.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher800.ttf; path = fonts/WebKitWeightWatcher800.ttf; sourceTree = "<group>"; };
    225226                375F09790DAC3CB600C8B4E5 /* WebKitWeightWatcher900.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher900.ttf; path = fonts/WebKitWeightWatcher900.ttf; sourceTree = "<group>"; };
     227                440590701268453800CFD48D /* WebArchiveDumpSupportMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebArchiveDumpSupportMac.mm; path = mac/WebArchiveDumpSupportMac.mm; sourceTree = "<group>"; };
    226228                44A997820FCDE86400580F10 /* WebArchiveDumpSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebArchiveDumpSupport.h; path = mac/WebArchiveDumpSupport.h; sourceTree = "<group>"; };
    227229                44A997830FCDE86400580F10 /* WebArchiveDumpSupport.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebArchiveDumpSupport.mm; path = mac/WebArchiveDumpSupport.mm; sourceTree = "<group>"; };
     
    367369                                44A997820FCDE86400580F10 /* WebArchiveDumpSupport.h */,
    368370                                44A997830FCDE86400580F10 /* WebArchiveDumpSupport.mm */,
     371                                440590701268453800CFD48D /* WebArchiveDumpSupportMac.mm */,
    369372                                BC9D90210C97472D0099A4A3 /* WorkQueue.cpp */,
    370373                                BC9D90220C97472E0099A4A3 /* WorkQueue.h */,
     
    784787                                BCA18B6A0C9B08C200114369 /* UIDelegate.mm in Sources */,
    785788                                4437730E125CBC3600AAE02C /* WebArchiveDumpSupport.mm in Sources */,
     789                                440590711268453800CFD48D /* WebArchiveDumpSupportMac.mm in Sources */,
    786790                                BC9D90240C97472E0099A4A3 /* WorkQueue.cpp in Sources */,
    787791                                BCA18B260C9B015C00114369 /* WorkQueueItemMac.mm in Sources */,
  • trunk/WebKitTools/DumpRenderTree/mac/WebArchiveDumpSupport.h

    r69199 r70611  
    2727#define WebArchiveDumpSupport_h
    2828
     29#include <CoreFoundation/CoreFoundation.h>
     30
    2931@class NSString;
    3032@class WebArchive;
     
    3234NSString *serializeWebArchiveToXML(WebArchive *webArchive);
    3335
     36#pragma mark -
     37#pragma mark Platform-specific methods
     38
     39CFArrayRef supportedNonImageMIMETypes();
     40
    3441#endif /* WebArchiveDumpSupport_h */
  • trunk/WebKitTools/DumpRenderTree/mac/WebArchiveDumpSupport.mm

    r70403 r70611  
    2828#import <Foundation/Foundation.h>
    2929#import <WebKit/WebArchive.h>
    30 #import <WebKit/WebHTMLRepresentation.h>
    3130
    3231static void convertMIMEType(NSMutableString *mimeType)
     
    4746    convertMIMEType(mimeType);
    4847
    49     if ([mimeType hasPrefix:@"text/"] || [[WebHTMLRepresentation supportedNonImageMIMETypes] containsObject:mimeType]) {
     48    if ([mimeType hasPrefix:@"text/"] || [(NSArray *)supportedNonImageMIMETypes() containsObject:mimeType]) {
    5049        NSString *textEncodingName = [resource objectForKey:@"WebResourceTextEncodingName"];
    5150        NSStringEncoding stringEncoding;
  • trunk/WebKitTools/DumpRenderTree/mac/WebArchiveDumpSupportMac.mm

    r70610 r70611  
    11/*
    2  * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2010 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 #ifndef WebArchiveDumpSupport_h
    27 #define WebArchiveDumpSupport_h
     26#import "WebArchiveDumpSupport.h"
    2827
    29 @class NSString;
    30 @class WebArchive;
     28#import <WebKit/WebHTMLRepresentation.h>
    3129
    32 NSString *serializeWebArchiveToXML(WebArchive *webArchive);
    33 
    34 #endif /* WebArchiveDumpSupport_h */
     30CFArrayRef supportedNonImageMIMETypes()
     31{
     32    return (CFArrayRef)[WebHTMLRepresentation supportedNonImageMIMETypes];
     33}
Note: See TracChangeset for help on using the changeset viewer.