Bug 17833 - Don't force source file types, imply the type from the extension. Rename a few files with incorrect extensions.
Summary: Don't force source file types, imply the type from the extension. Rename a f...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Mark Mentovai
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-13 13:08 PDT by Mark Mentovai
Modified: 2008-03-15 10:37 PDT (History)
0 users

See Also:


Attachments
Use lastKnownFileType instead of explicitFileType; rename files to have the correct extension (89.28 KB, patch)
2008-03-13 13:11 PDT, Mark Mentovai
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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:

bridge/jni/jni_jsobject.cpp
loader/mac/LoaderNSURLExtras.m
platform/mac/SharedTimerMac.cpp

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.