Rubberstamped by Anders.
authoraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Oct 2006 21:09:30 +0000 (21:09 +0000)
committeraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Oct 2006 21:09:30 +0000 (21:09 +0000)
        Clean up FileChooser::create and Icon::newIconForFile.

        * WebCore.xcodeproj/project.pbxproj:
        * platform/mac/FileChooserMac.mm:
        (WebCore::FileChooser::create):
        * platform/mac/IconMac.mm:
        (WebCore::Icon::newIconForFile):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16996 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/mac/FileChooserMac.mm
WebCore/platform/mac/IconMac.mm

index f950f962745b1f76f03eef7cd83a4d3ee6951496..e41d7c21093a35c03a634c771b97d33714ddba22 100644 (file)
@@ -1,3 +1,15 @@
+2006-10-11  Adam Roben  <aroben@apple.com>
+
+        Rubberstamped by Anders.
+
+        Clean up FileChooser::create and Icon::newIconForFile.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/mac/FileChooserMac.mm:
+        (WebCore::FileChooser::create):
+        * platform/mac/IconMac.mm:
+        (WebCore::Icon::newIconForFile):
+
 2006-10-11  Oliver Hunt  <oliver@apple.com>
 
         Reviewed by Adam.
 2006-10-11  Oliver Hunt  <oliver@apple.com>
 
         Reviewed by Adam.
index db9151e4306951827b4f4aa281700dc4be950996..d8540235ba088c2322282630d6e3b6a045284ca9 100644 (file)
@@ -87,8 +87,7 @@ namespace WebCore {
     
 PassRefPtr<FileChooser> FileChooser::create(Document* document, RenderFileUploadControl* uploadControl)
 {
     
 PassRefPtr<FileChooser> FileChooser::create(Document* document, RenderFileUploadControl* uploadControl)
 {
-    PassRefPtr<FileChooser> fileChooser(new FileChooser(document, uploadControl));
-    return fileChooser;
+    return new FileChooser(document, uploadControl);
 }
 
 FileChooser::FileChooser(Document* document, RenderFileUploadControl* uploadControl)
 }
 
 FileChooser::FileChooser(Document* document, RenderFileUploadControl* uploadControl)
index f2f133de937f4307fb81a490f21f763aa1bb4a43..a900b6af98229e907b7e741e3fb96e168606b595 100644 (file)
@@ -42,9 +42,9 @@ PassRefPtr<Icon> Icon::newIconForFile(const String& filename)
 {
     NSImage* fileIcon = [[[NSWorkspace sharedWorkspace] iconForFile:filename] retain];
     if (!fileIcon)
 {
     NSImage* fileIcon = [[[NSWorkspace sharedWorkspace] iconForFile:filename] retain];
     if (!fileIcon)
-        return PassRefPtr<Icon>(0);
+        return 0;
     
     
-    PassRefPtr<Icon> icon(new Icon());
+    Icon* icon = new Icon();
 
     icon->m_nsImage = fileIcon;
     
 
     icon->m_nsImage = fileIcon;