[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
cblu
cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:15:26 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 6c27fc02469a42ca914365e15f54ce1470c1b1e7
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Dec 16 08:11:10 2002 +0000
WebFoundation:
Fixed: 3094928 - Apply Finder bits to decoded downloads
Reviewed by darin.
* Misc.subproj/WebNSFileManagerExtras.h:
* Misc.subproj/WebNSFileManagerExtras.m:
(-[NSFileManager _web_createFileAtPath:contents:attributes:]): new, creates file and sets Finder bits.
WebKit:
Fixed: 3094928 - Apply Finder bits to decoded downloads
Reviewed by darin.
* Downloads.subproj/WebDownloadHandler.m:
(-[WebDownloadHandler createFileIfNecessary]): call _web_createFileAtPath:contents:attributes: so we set Finder bits
* Downloads.subproj/WebMacBinaryDecoder.h:
* Downloads.subproj/WebMacBinaryDecoder.m:
(-[WebMacBinaryDecoder decodeData:dataForkData:resourceForkData:]): save Finder bits
(-[WebMacBinaryDecoder fileAttributes]): return Finder bits
WebBrowser:
Fixed: 3094928 - Apply Finder bits to decoded downloads
Reviewed by darin.
* DownloadRow.m:
(-[DownloadRow _updateIconAndFilename]): no changes, moved up
(-[DownloadRow _stopProgressAnimation]): call _updateIconAndFilename so we pick up icon changes. The Finder will update the icon after we close the file if it has the custom icon bit.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3077 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index b0299dc..c9be68d 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,4 +1,15 @@
-=== WebKit-37u2 ===
+2002-12-15 Chris Blumenberg <cblu at apple.com>
+
+ Fixed: 3094928 - Apply Finder bits to decoded downloads
+
+ Reviewed by darin.
+
+ * Downloads.subproj/WebDownloadHandler.m:
+ (-[WebDownloadHandler createFileIfNecessary]): call _web_createFileAtPath:contents:attributes: so we set Finder bits
+ * Downloads.subproj/WebMacBinaryDecoder.h:
+ * Downloads.subproj/WebMacBinaryDecoder.m:
+ (-[WebMacBinaryDecoder decodeData:dataForkData:resourceForkData:]): save Finder bits
+ (-[WebMacBinaryDecoder fileAttributes]): return Finder bits
2002-12-15 Maciej Stachowiak <mjs at apple.com>
diff --git a/WebKit/Downloads.subproj/WebDownload.m b/WebKit/Downloads.subproj/WebDownload.m
index 1bb914a..a1d5244 100644
--- a/WebKit/Downloads.subproj/WebDownload.m
+++ b/WebKit/Downloads.subproj/WebDownload.m
@@ -17,6 +17,7 @@
#import <WebKit/WebMacBinaryDecoder.h>
#import <WebFoundation/WebError.h>
+#import <WebFoundation/WebNSFileManagerExtras.h>
#import <WebFoundation/WebResourceRequest.h>
#import <WebFoundation/WebResourceResponse.h>
@@ -183,8 +184,8 @@
[response lastModifiedDate], NSFileModificationDate, nil];
}
- if (![fileManager createFileAtPath:path contents:nil attributes:fileAttributes]) {
- ERROR("-[NSFileManager createFileAtPath:contents:attributes:] failed.");
+ if (![fileManager _web_createFileAtPath:path contents:nil attributes:fileAttributes]) {
+ ERROR("-[NSFileManager _web_createFileAtPath:contents:attributes:] failed.");
return [self errorWithCode:WebErrorCannotCreateFile];
}
diff --git a/WebKit/Downloads.subproj/WebDownloadHandler.m b/WebKit/Downloads.subproj/WebDownloadHandler.m
index 1bb914a..a1d5244 100644
--- a/WebKit/Downloads.subproj/WebDownloadHandler.m
+++ b/WebKit/Downloads.subproj/WebDownloadHandler.m
@@ -17,6 +17,7 @@
#import <WebKit/WebMacBinaryDecoder.h>
#import <WebFoundation/WebError.h>
+#import <WebFoundation/WebNSFileManagerExtras.h>
#import <WebFoundation/WebResourceRequest.h>
#import <WebFoundation/WebResourceResponse.h>
@@ -183,8 +184,8 @@
[response lastModifiedDate], NSFileModificationDate, nil];
}
- if (![fileManager createFileAtPath:path contents:nil attributes:fileAttributes]) {
- ERROR("-[NSFileManager createFileAtPath:contents:attributes:] failed.");
+ if (![fileManager _web_createFileAtPath:path contents:nil attributes:fileAttributes]) {
+ ERROR("-[NSFileManager _web_createFileAtPath:contents:attributes:] failed.");
return [self errorWithCode:WebErrorCannotCreateFile];
}
diff --git a/WebKit/Downloads.subproj/WebMacBinaryDecoder.h b/WebKit/Downloads.subproj/WebMacBinaryDecoder.h
index dda8e6c..57ba542 100644
--- a/WebKit/Downloads.subproj/WebMacBinaryDecoder.h
+++ b/WebKit/Downloads.subproj/WebMacBinaryDecoder.h
@@ -17,6 +17,8 @@
int _dataForkLength;
int _resourceForkLength;
+ u_int16_t _finderInfo;
+ u_int16_t _extendedFinderInfo;
u_int32_t _creationDate;
u_int32_t _modificationDate;
OSType _fileType;
diff --git a/WebKit/Downloads.subproj/WebMacBinaryDecoder.m b/WebKit/Downloads.subproj/WebMacBinaryDecoder.m
index ac4236a..dd9c3a0 100644
--- a/WebKit/Downloads.subproj/WebMacBinaryDecoder.m
+++ b/WebKit/Downloads.subproj/WebMacBinaryDecoder.m
@@ -7,11 +7,13 @@
// This decoder decodes MacBinary II and might also work for MacBinary III.
// There's also MacBinary I, which we do not attempt to support.
+#import <WebKit/WebDownloadDecoder.h>
#import <WebKit/WebMacBinaryDecoder.h>
-#import "crc16.h"
#import <WebFoundation/WebAssertions.h>
-#import <WebKit/WebDownloadDecoder.h>
+#import <WebFoundation/WebNSFileManagerExtras.h>
+
+#import "crc16.h"
#define HEADER_SIZE 128
@@ -95,6 +97,12 @@
_resourceForkLength = (((((header[87] << 8) | header[88]) << 8) | header[89]) << 8) | header[90];
_creationDate = (((((header[91] << 8) | header[92]) << 8) | header[93]) << 8) | header[94];
_modificationDate = (((((header[95] << 8) | header[96]) << 8) | header[97]) << 8) | header[98];
+ _finderInfo = ((header[73] << 8) | header[101]);
+ _extendedFinderInfo = header[107];
+
+ // Clear reserved bits or bits not applicable after transfer as defined in Finder.h.
+ _finderInfo &= kColor | kIsShared | kHasCustomIcon | kIsStationery | kHasBundle | kIsAlias;
+ _extendedFinderInfo &= kExtendedFlagHasCustomBadge | kExtendedFlagHasRoutingInfo;
// MacBinary III.
if (header[102] == 'm' && header[103] == 'B' && header[104] == 'I' && header[105] == 'N') {
@@ -151,6 +159,8 @@
[NSDate dateWithTimeIntervalSinceReferenceDate:kCFAbsoluteTimeIntervalSince1904 + _modificationDate], NSFileModificationDate,
[NSNumber numberWithUnsignedLong:_fileType], NSFileHFSTypeCode,
[NSNumber numberWithUnsignedLong:_fileCreator], NSFileHFSCreatorCode,
+ [NSNumber numberWithUnsignedShort:_finderInfo], WebFinderInfo,
+ [NSNumber numberWithUnsignedShort:_extendedFinderInfo], WebExtendedFinderInfo,
nil];
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list