Bug 17833

Summary: Don't force source file types, imply the type from the extension. Rename a few files with incorrect extensions.
Product: WebKit Reporter: Mark Mentovai <mark>
Component: WebCore Misc.Assignee: Mark Mentovai <mark>
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Description Flags
Use lastKnownFileType instead of explicitFileType; rename files to have the correct extension darin: review+

Description Mark Mentovai 2008-03-13 13:08:22 PDT
Following up from bug 17809:

In WebCore.xcodeproj, there are a few instances of "explicitFileType" for source files, which need not be.  Most of these can be changed to "lastKnownFileType" with the type being implied from the extension, equivalent to setting "File Type:" to "Default for File" in Xcode's Get [File] Info window's General tab.

There are three files in WebCore for which this change cannot be made, because the file's extension indicates a file type other than the source contained in the file:


Each of these files actually contains Objective-C++ source, and deserves an .mm extension.  It's obvious that the latter two files are already Mac-only files and that there won't be any problems renaming them to .mm.  jni_jsobject.cpp contains heavily Mac-specific source, unguarded, and therefore it, too, is safe to rename as .mm.  None of these files are even mentioned in WebCore.vcproj/WebCore.vcproj.

Until yesterday, r30980, loader/FrameLoader.cpp also used Objective-C, but the file itself was a cross-platform file and would have been unsuitable for renaming.  As of r30980, the Objective-C call has been removed from that file, which no longer needs to be treated as Objective-C++ on the Mac.
Comment 1 Mark Mentovai 2008-03-13 13:11:58 PDT
Created attachment 19741 [details]
Use lastKnownFileType instead of explicitFileType; rename files to have the correct extension

Note for checkin: this patch should only be used to patch the ChangeLog and project file.  To preserve svn history, the file adds/removes should be performed with "svn move", as there are no changes to the file contents, only to their names:

svn move bridge/jni/jni_jsobject.cpp bridge/jni/jni_jsobject.mm
svn move loader/mac/LoaderNSURLExtras.m loader/mac/LoaderNSURLExtras.mm
svn move platform/mac/SharedTimerMac.cpp platform/mac/SharedTimerMac.mm
Comment 2 Darin Adler 2008-03-15 10:31:31 PDT
We've been doing this periodically. I'm sure this won't be the last time!
Comment 3 Darin Adler 2008-03-15 10:37:37 PDT
It was a little harder than it should have been to land this because there were tab characters in the ChangeLog.

Committed revision 31076.