[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 06:18:23 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 58b59828e5b455bc46f049431def81550a7f31b1
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jun 13 08:13:14 2002 +0000

            Fixed downloads.
            Now write out download files as data comes in.
            Removed useless lproj's.
    
            * Dutch.lproj/InfoPlist.strings: Removed.
            * Dutch.lproj/Localizable.strings: Removed.
            * French.lproj/InfoPlist.strings: Removed.
            * French.lproj/Localizable.strings: Removed.
            * German.lproj/InfoPlist.strings: Removed.
            * German.lproj/Localizable.strings: Removed.
            * Italian.lproj/InfoPlist.strings: Removed.
            * Italian.lproj/Localizable.strings: Removed.
            * Japanese.lproj/InfoPlist.strings: Removed.
            * Japanese.lproj/Localizable.strings: Removed.
            * MIME.subproj/IFDownloadHandler.h:
            * MIME.subproj/IFDownloadHandler.mm:
            (-[IFDownloadHandler dealloc]):
            (-[IFDownloadHandler receivedData:isComplete:]): added
            (-[IFDownloadHandler cancel]): added
            * Spanish.lproj/InfoPlist.strings: Removed.
            * Spanish.lproj/Localizable.strings: Removed.
            * WebKit.pbproj/project.pbxproj:
            * WebView.subproj/IFMainURLHandleClient.h:
            * WebView.subproj/IFMainURLHandleClient.mm:
            (-[IFMainURLHandleClient initWithDataSource:]): removed unused BOOL
            (-[IFMainURLHandleClient dealloc]):
            (-[IFMainURLHandleClient IFURLHandleResourceDidCancelLoading:]):
            (-[IFMainURLHandleClient IFURLHandleResourceDidFinishLoading:data:]):
            (-[IFMainURLHandleClient IFURLHandle:resourceDataDidBecomeAvailable:]):
            (-[IFMainURLHandleClient IFURLHandle:resourceDidFailLoadingWithResult:]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1341 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 0b0d3e9..d89c7f7 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,36 @@
+2002-06-13  Chris Blumenberg  <cblu at apple.com>
+
+	Fixed downloads.
+	Now write out download files as data comes in.
+	Removed useless lproj's.
+
+	* Dutch.lproj/InfoPlist.strings: Removed.
+	* Dutch.lproj/Localizable.strings: Removed.
+	* French.lproj/InfoPlist.strings: Removed.
+	* French.lproj/Localizable.strings: Removed.
+	* German.lproj/InfoPlist.strings: Removed.
+	* German.lproj/Localizable.strings: Removed.
+	* Italian.lproj/InfoPlist.strings: Removed.
+	* Italian.lproj/Localizable.strings: Removed.
+	* Japanese.lproj/InfoPlist.strings: Removed.
+	* Japanese.lproj/Localizable.strings: Removed.
+	* MIME.subproj/IFDownloadHandler.h:
+	* MIME.subproj/IFDownloadHandler.mm:
+	(-[IFDownloadHandler dealloc]):
+	(-[IFDownloadHandler receivedData:isComplete:]): added
+	(-[IFDownloadHandler cancel]): added
+	* Spanish.lproj/InfoPlist.strings: Removed.
+	* Spanish.lproj/Localizable.strings: Removed.
+	* WebKit.pbproj/project.pbxproj:
+	* WebView.subproj/IFMainURLHandleClient.h:
+	* WebView.subproj/IFMainURLHandleClient.mm:
+	(-[IFMainURLHandleClient initWithDataSource:]): removed unused BOOL
+	(-[IFMainURLHandleClient dealloc]): 
+	(-[IFMainURLHandleClient IFURLHandleResourceDidCancelLoading:]):
+	(-[IFMainURLHandleClient IFURLHandleResourceDidFinishLoading:data:]):
+	(-[IFMainURLHandleClient IFURLHandle:resourceDataDidBecomeAvailable:]):
+	(-[IFMainURLHandleClient IFURLHandle:resourceDidFailLoadingWithResult:]):
+
 2002-06-12  Chris Blumenberg  <cblu at apple.com>
 
 	Couldn't run ChangeLog because it hung with the massize diffs, so here's
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 0b0d3e9..d89c7f7 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,36 @@
+2002-06-13  Chris Blumenberg  <cblu at apple.com>
+
+	Fixed downloads.
+	Now write out download files as data comes in.
+	Removed useless lproj's.
+
+	* Dutch.lproj/InfoPlist.strings: Removed.
+	* Dutch.lproj/Localizable.strings: Removed.
+	* French.lproj/InfoPlist.strings: Removed.
+	* French.lproj/Localizable.strings: Removed.
+	* German.lproj/InfoPlist.strings: Removed.
+	* German.lproj/Localizable.strings: Removed.
+	* Italian.lproj/InfoPlist.strings: Removed.
+	* Italian.lproj/Localizable.strings: Removed.
+	* Japanese.lproj/InfoPlist.strings: Removed.
+	* Japanese.lproj/Localizable.strings: Removed.
+	* MIME.subproj/IFDownloadHandler.h:
+	* MIME.subproj/IFDownloadHandler.mm:
+	(-[IFDownloadHandler dealloc]):
+	(-[IFDownloadHandler receivedData:isComplete:]): added
+	(-[IFDownloadHandler cancel]): added
+	* Spanish.lproj/InfoPlist.strings: Removed.
+	* Spanish.lproj/Localizable.strings: Removed.
+	* WebKit.pbproj/project.pbxproj:
+	* WebView.subproj/IFMainURLHandleClient.h:
+	* WebView.subproj/IFMainURLHandleClient.mm:
+	(-[IFMainURLHandleClient initWithDataSource:]): removed unused BOOL
+	(-[IFMainURLHandleClient dealloc]): 
+	(-[IFMainURLHandleClient IFURLHandleResourceDidCancelLoading:]):
+	(-[IFMainURLHandleClient IFURLHandleResourceDidFinishLoading:data:]):
+	(-[IFMainURLHandleClient IFURLHandle:resourceDataDidBecomeAvailable:]):
+	(-[IFMainURLHandleClient IFURLHandle:resourceDidFailLoadingWithResult:]):
+
 2002-06-12  Chris Blumenberg  <cblu at apple.com>
 
 	Couldn't run ChangeLog because it hung with the massize diffs, so here's
diff --git a/WebKit/Dutch.lproj/InfoPlist.strings b/WebKit/Dutch.lproj/InfoPlist.strings
deleted file mode 100644
index 303cc20..0000000
--- a/WebKit/Dutch.lproj/InfoPlist.strings
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Localized versions of Info.plist keys */
-
-CFBundleName = "WebKit";
-CFBundleShortVersionString = "WebKit version 0.0.1d1";
-CFBundleGetInfoString = "WebKit version 0.0.1d1, Copyright 2000, MyGreatSoftware.";
-NSHumanReadableCopyright = "Copyright 2000, MyGreatSoftware.";
diff --git a/WebKit/Dutch.lproj/Localizable.strings b/WebKit/Dutch.lproj/Localizable.strings
deleted file mode 100644
index 449f940..0000000
--- a/WebKit/Dutch.lproj/Localizable.strings
+++ /dev/null
@@ -1,208 +0,0 @@
-/* kjs_debugwin.cpp */
-
-"JavaScript Debugger" = "JavaScript Debugger";
-
-"&Next" = "&Next";
-
-"&Step" = "&Step";
-
-"&Continue" = "&Continue";
-
-/* kjs_window.cpp */
-
-"OK" = "OK";
-
-"Cancel" = "Cancel";
-
-"This site is trying to open up a new browser window using Javascript.\n\nDo you want to allow this?" = "This site is trying to open up a new browser window using Javascript.\n\nDo you want to allow this?";
-
-"Confirmation: Javascript Popup" = "Confirmation: Javascript Popup";
-
-"Close window ?" = "Close window ?";
-
-"Confirmation required" = "Confirmation required";
-
-/* html_formimpl.cpp */
-
-"You're about to send data to the Internet\nvia an unencrypted connection.\nIt might be possible for others to see this information.\n\nDo you want to continue?" = "You're about to send data to the Internet\nvia an unencrypted connection.\nIt might be possible for others to see this information.\n\nDo you want to continue?";
-
-"KDE Web browser" = "KDE Web browser";
-
-"When you send a password unencrypted to the Internet,\nit might be possible for others to capture it as plain text.\n\nDo you want to continue?" = "When you send a password unencrypted to the Internet,\nit might be possible for others to capture it as plain text.\n\nDo you want to continue?";
-
-"You're about to transfer the following files from\nyour local computer to the Internet.\n\nDo you really want to continue?" = "You're about to transfer the following files from\nyour local computer to the Internet.\n\nDo you really want to continue?";
-
-"Your data submission is redirected to\nan insecure site. The data is sent unencrypted.\n\nDo you want to continue?" = "Your data submission is redirected to\nan insecure site. The data is sent unencrypted.\n\nDo you want to continue?";
-
-"Cannot open downloaded file.\nSubmit a bug report." = "Cannot open downloaded file.\nSubmit a bug report.";
-
-"Error fetching file for submission:\n%1" = "Error fetching file for submission:\n%1";
-
-/* html_parser.cpp */
-
-"This is a searchable index. Enter search keywords: " = "This is a searchable index. Enter search keywords: ";
-
-/* kjavaappletserver.cpp */
-
-"Loading Applet" = "Loading Applet";
-
-"Error: java executable not found" = "Error: java executable not found";
-
-/* khtml_ext.cpp */
-
-"Reload Frame" = "Reload Frame";
-
-"View Frame Source" = "View Frame Source";
-
-"Print Frame..." = "Print Frame...";
-
-"&Save Link As..." = "&Save Link As...";
-
-"Copy Link Location" = "Copy Link Location";
-
-"Stop Animations" = "Stop Animations";
-
-"Save Image As..." = "Save Image As...";
-
-"Copy Image Location" = "Copy Image Location";
-
-"View Image (%1)" = "View Image (%1)";
-
-"Save Link As" = "Save Link As";
-
-"Save Image As" = "Save Image As";
-
-"Default font size" = "Default font size";
-
-"Font Size %1" = "Font Size %1";
-
-/* khtml_find.cpp */
-
-"End of document reached.\nContinue from the beginning?" = "End of document reached.\nContinue from the beginning?";
-
-"Find" = "Find";
-
-"Beginning of document reached.\nContinue from the end?" = "Beginning of document reached.\nContinue from the end?";
-
-"Search string '%1' not found." = "Search string '%1' not found.";
-
-/* khtml_part.cpp */
-
-"View Document Source" = "View Document Source";
-
-"View Frame Source" = "View Frame Source";
-
-"Save &Background Image As..." = "Save &Background Image As...";
-
-"&Save As..." = "&Save As...";
-
-"Save &Frame As..." = "Save &Frame As...";
-
-"Security..." = "Security...";
-
-"print rendering tree to stdout" = "print rendering tree to stdout";
-
-"print DOM tree to stdout" = "print DOM tree to stdout";
-
-"Show Images" = "Show Images";
-
-"Show Animated Images" = "Show Animated Images";
-
-"Stop Animated Images" = "Stop Animated Images";
-
-"Set &Encoding" = "Set &Encoding";
-
-"Auto" = "Auto";
-
-"Increase Font Sizes" = "Increase Font Sizes";
-
-"Decrease Font Sizes" = "Decrease Font Sizes";
-
-"Print Frame" = "Print Frame";
-
-"Display Images on Page" = "Display Images on Page";
-
-"Done." = "Done.";
-
-"Loading complete" = "Loading complete";
-
-"Symbolic Link" = "Symbolic Link";
-
-"%1 (Link)" = "%1 (Link)";
-
-"%2 (%1 bytes)" = "%2 (%1 bytes)";
-
-"%1 (%2 K)" = "%1 (%2 K)";
-
-" (In new window)" = " (In new window)";
-
-" (In other frame)" = " (In other frame)";
-
-"Email to: " = "Email to: ";
-
-" - Subject: " = " - Subject: ";
-
-" - CC: " = " - CC: ";
-
-" - BCC: " = " - BCC: ";
-
-"Save As..." = "Save As...";
-
-"<qt>The link <B>%1</B><BR>leads from this untrusted page to your local filesystem.<BR>Do you want to follow the link?" = "<qt>The link <B>%1</B><BR>leads from this untrusted page to your local filesystem.<BR>Do you want to follow the link?";
-
-"Follow" = "Follow";
-
-"Save background image as" = "Save background image as";
-
-"Save as" = "Save as";
-
-"*.html *.htm|HTML files" = "*.html *.htm|HTML files";
-
-"&Find in Frame" = "&Find in Frame";
-
-"&Find" = "&Find";
-
-"<qt>The form will be submitted to <BR><B>%1</B><BR>on your local filesystem.<BR>Do you want to submit the form?" = "<qt>The form will be submitted to <BR><B>%1</B><BR>on your local filesystem.<BR>Do you want to submit the form?";
-
-"Security Warning" = "Security Warning";
-
-"<qt>This untrusted page contains a link<BR><B>%1</B><BR>to your local file system." = "<qt>This untrusted page contains a link<BR><B>%1</B><BR>to your local file system.";
-
-"Security Alert" = "Security Alert";
-
-/* khtml_run.cpp */
-
-"Do you really want to execute '%1' ? " = "Do you really want to execute '%1' ? ";
-
-"Open '%1' using '%2'?" = "Open '%1' using '%2'?";
-
-"Open '%1' ?" = "Open '%1' ?";
-
-"Save to disk" = "Save to disk";
-
-"Open" = "Open";
-
-"Save As..." = "Save As...";
-
-/* khtmlimage.cpp */
-
-"%1 - %2x%3 Pixels" = "%1 - %2x%3 Pixels";
-
-"Image - %2x%3 Pixels" = "Image - %2x%3 Pixels";
-
-/* render_applet.cpp */
-
-"Java Applet is not loaded. (Java interpreter disabled)" = "Java Applet is not loaded. (Java interpreter disabled)";
-
-/* render_form.cpp */
-
-"Submit" = "Submit";
-
-"Reset" = "Reset";
-
-"Browse..." = "Browse...";
-
-/* xml_tokenizer.cpp */
-
-"XML parsing error" = "XML parsing error";
-
diff --git a/WebKit/French.lproj/InfoPlist.strings b/WebKit/French.lproj/InfoPlist.strings
deleted file mode 100644
index 303cc20..0000000
--- a/WebKit/French.lproj/InfoPlist.strings
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Localized versions of Info.plist keys */
-
-CFBundleName = "WebKit";
-CFBundleShortVersionString = "WebKit version 0.0.1d1";
-CFBundleGetInfoString = "WebKit version 0.0.1d1, Copyright 2000, MyGreatSoftware.";
-NSHumanReadableCopyright = "Copyright 2000, MyGreatSoftware.";
diff --git a/WebKit/French.lproj/Localizable.strings b/WebKit/French.lproj/Localizable.strings
deleted file mode 100644
index e048159..0000000
--- a/WebKit/French.lproj/Localizable.strings
+++ /dev/null
@@ -1,208 +0,0 @@
-/* kjs_debugwin.cpp */
-
-"JavaScript Debugger" = "JavaScript Debugger";
-
-"&Next" = "&Next";
-
-"&Step" = "&Step";
-
-"&Continue" = "&Continue";
-
-/* kjs_window.cpp */
-
-"OK" = "OK";
-
-"Cancel" = "Cancel";
-
-"This site is trying to open up a new browser window using Javascript.\n\nDo you want to allow this?" = "This site is trying to open up a new browser window using Javascript.\n\nDo you want to allow this?";
-
-"Confirmation: Javascript Popup" = "Confirmation: Javascript Popup";
-
-"Close window ?" = "Close window ?";
-
-"Confirmation required" = "Confirmation required";
-
-/* html_formimpl.cpp */
-
-"You're about to send data to the Internet\nvia an unencrypted connection.\nIt might be possible for others to see this information.\n\nDo you want to continue?" = "You're about to send data to the Internet\nvia an unencrypted connection.\nIt might be possible for others to see this information.\n\nDo you want to continue?";
-
-"KDE Web browser" = "KDE Web browser";
-
-"When you send a password unencrypted to the Internet,\nit might be possible for others to capture it as plain text.\n\nDo you want to continue?" = "When you send a password unencrypted to the Internet,\nit might be possible for others to capture it as plain text.\n\nDo you want to continue?";
-
-"You're about to transfer the following files from\nyour local computer to the Internet.\n\nDo you really want to continue?" = "You're about to transfer the following files from\nyour local computer to the Internet.\n\nDo you really want to continue?";
-
-"Your data submission is redirected to\nan insecure site. The data is sent unencrypted.\n\nDo you want to continue?" = "Your data submission is redirected to\nan insecure site. The data is sent unencrypted.\n\nDo you want to continue?";
-
-"Cannot open downloaded file.\nSubmit a bug report." = "Cannot open downloaded file.\nSubmit a bug report.";
-
-"Error fetching file for submission:\n%1" = "Error fetching file for submission:\n%1";
-
-/* html_parser.cpp */
-
-"This is a searchable index. Enter search keywords: " = "This is a searchable index. Enter search keywords: ";
-
-/* kjavaappletserver.cpp */
-
-"Loading Applet" = "Loading Applet";
-
-"Error: java executable not found" = "Error: java executable not found";
-
-/* khtml_ext.cpp */
-
-"Reload Frame" = "Reload Frame";
-
-"View Frame Source" = "View Frame Source";
-
-"Print Frame..." = "Print Frame...";
-
-"&Save Link As..." = "&Save Link As...";
-
-"Copy Link Location" = "Copy Link Location";
-
-"Stop Animations" = "Stop Animations";
-
-"Save Image As..." = "Save Image As...";
-
-"Copy Image Location" = "Copy Image Location";
-
-"View Image (%1)" = "View Image (%1)";
-
-"Save Link As" = "Save Link As";
-
-"Save Image As" = "Save Image As";
-
-"Default font size" = "Default font size";
-
-"Font Size %1" = "Font Size %1";
-
-/* khtml_find.cpp */
-
-"End of document reached.\nContinue from the beginning?" = "End of document reached.\nContinue from the beginning?";
-
-"Find" = "Find";
-
-"Beginning of document reached.\nContinue from the end?" = "Beginning of document reached.\nContinue from the end?";
-
-"Search string '%1' not found." = "Search string '%1' not found.";
-
-/* khtml_part.cpp */
-
-"View Document Source" = "View Document Source";
-
-"View Frame Source" = "View Frame Source";
-
-"Save &Background Image As..." = "Save &Background Image As...";
-
-"&Save As..." = "&Save As...";
-
-"Save &Frame As..." = "Save &Frame As...";
-
-"Security..." = "Security...";
-
-"print rendering tree to stdout" = "print rendering tree to stdout";
-
-"print DOM tree to stdout" = "print DOM tree to stdout";
-
-"Show Images" = "Show Images";
-
-"Show Animated Images" = "Show Animated Images";
-
-"Stop Animated Images" = "Stop Animated Images";
-
-"Set &Encoding" = "Set &Encoding";
-
-"Auto" = "Auto";
-
-"Increase Font Sizes" = "Increase Font Sizes";
-
-"Decrease Font Sizes" = "Decrease Font Sizes";
-
-"Print Frame" = "Print Frame";
-
-"Display Images on Page" = "Display Images on Page";
-
-"Done." = "Done.";
-
-"Loading complete" = "Loading complete";
-
-"Symbolic Link" = "Symbolic Link";
-
-"%1 (Link)" = "%1 (Link)";
-
-"%2 (%1 bytes)" = "%2 (%1 bytes)";
-
-"%1 (%2 K)" = "%1 (%2 K)";
-
-" (In new window)" = " (In new window)";
-
-" (In other frame)" = " (In other frame)";
-
-"Email to: " = "Email to: ";
-
-" - Subject: " = " - Subject: ";
-
-" - CC: " = " - CC: ";
-
-" - BCC: " = " - BCC: ";
-
-"Save As..." = "Save As...";
-
-"<qt>The link <B>%1</B><BR>leads from this untrusted page to your local filesystem.<BR>Do you want to follow the link?" = "<qt>The link <B>%1</B><BR>leads from this untrusted page to your local filesystem.<BR>Do you want to follow the link?";
-
-"Follow" = "Follow";
-
-"Save background image as" = "Save background image as";
-
-"Save as" = "Save as";
-
-"*.html *.htm|HTML files" = "*.html *.htm|HTML files";
-
-"&Find in Frame" = "&Find in Frame";
-
-"&Find" = "&Find";
-
-"<qt>The form will be submitted to <BR><B>%1</B><BR>on your local filesystem.<BR>Do you want to submit the form?" = "<qt>The form will be submitted to <BR><B>%1</B><BR>on your local filesystem.<BR>Do you want to submit the form?";
-
-"Security Warning" = "Security Warning";
-
-"<qt>This untrusted page contains a link<BR><B>%1</B><BR>to your local file system." = "<qt>This untrusted page contains a link<BR><B>%1</B><BR>to your local file system.";
-
-"Security Alert" = "Security Alert";
-
-/* khtml_run.cpp */
-
-"Do you really want to execute '%1' ? " = "Do you really want to execute '%1' ? ";
-
-"Open '%1' using '%2'?" = "Open '%1' using '%2'?";
-
-"Open '%1' ?" = "Open '%1' ?";
-
-"Save to disk" = "Save to disk";
-
-"Open" = "Open";
-
-"Save As..." = "Save As...";
-
-/* khtmlimage.cpp */
-
-"%1 - %2x%3 Pixels" = "%1 - %2x%3 Pixels";
-
-"Image - %2x%3 Pixels" = "Image - %2x%3 Pixels";
-
-/* render_applet.cpp */
-
-"Java Applet is not loaded. (Java interpreter disabled)" = "Java Applet is not loaded. (Java interpreter disabled)";
-
-/* render_form.cpp */
-
-"Submit" = "Soumettent";
-
-"Reset" = "Remise";
-
-"Browse..." = "Browse...";
-
-/* xml_tokenizer.cpp */
-
-"XML parsing error" = "XML parsing error";
-
diff --git a/WebKit/German.lproj/InfoPlist.strings b/WebKit/German.lproj/InfoPlist.strings
deleted file mode 100644
index 303cc20..0000000
--- a/WebKit/German.lproj/InfoPlist.strings
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Localized versions of Info.plist keys */
-
-CFBundleName = "WebKit";
-CFBundleShortVersionString = "WebKit version 0.0.1d1";
-CFBundleGetInfoString = "WebKit version 0.0.1d1, Copyright 2000, MyGreatSoftware.";
-NSHumanReadableCopyright = "Copyright 2000, MyGreatSoftware.";
diff --git a/WebKit/German.lproj/Localizable.strings b/WebKit/German.lproj/Localizable.strings
deleted file mode 100644
index 449f940..0000000
--- a/WebKit/German.lproj/Localizable.strings
+++ /dev/null
@@ -1,208 +0,0 @@
-/* kjs_debugwin.cpp */
-
-"JavaScript Debugger" = "JavaScript Debugger";
-
-"&Next" = "&Next";
-
-"&Step" = "&Step";
-
-"&Continue" = "&Continue";
-
-/* kjs_window.cpp */
-
-"OK" = "OK";
-
-"Cancel" = "Cancel";
-
-"This site is trying to open up a new browser window using Javascript.\n\nDo you want to allow this?" = "This site is trying to open up a new browser window using Javascript.\n\nDo you want to allow this?";
-
-"Confirmation: Javascript Popup" = "Confirmation: Javascript Popup";
-
-"Close window ?" = "Close window ?";
-
-"Confirmation required" = "Confirmation required";
-
-/* html_formimpl.cpp */
-
-"You're about to send data to the Internet\nvia an unencrypted connection.\nIt might be possible for others to see this information.\n\nDo you want to continue?" = "You're about to send data to the Internet\nvia an unencrypted connection.\nIt might be possible for others to see this information.\n\nDo you want to continue?";
-
-"KDE Web browser" = "KDE Web browser";
-
-"When you send a password unencrypted to the Internet,\nit might be possible for others to capture it as plain text.\n\nDo you want to continue?" = "When you send a password unencrypted to the Internet,\nit might be possible for others to capture it as plain text.\n\nDo you want to continue?";
-
-"You're about to transfer the following files from\nyour local computer to the Internet.\n\nDo you really want to continue?" = "You're about to transfer the following files from\nyour local computer to the Internet.\n\nDo you really want to continue?";
-
-"Your data submission is redirected to\nan insecure site. The data is sent unencrypted.\n\nDo you want to continue?" = "Your data submission is redirected to\nan insecure site. The data is sent unencrypted.\n\nDo you want to continue?";
-
-"Cannot open downloaded file.\nSubmit a bug report." = "Cannot open downloaded file.\nSubmit a bug report.";
-
-"Error fetching file for submission:\n%1" = "Error fetching file for submission:\n%1";
-
-/* html_parser.cpp */
-
-"This is a searchable index. Enter search keywords: " = "This is a searchable index. Enter search keywords: ";
-
-/* kjavaappletserver.cpp */
-
-"Loading Applet" = "Loading Applet";
-
-"Error: java executable not found" = "Error: java executable not found";
-
-/* khtml_ext.cpp */
-
-"Reload Frame" = "Reload Frame";
-
-"View Frame Source" = "View Frame Source";
-
-"Print Frame..." = "Print Frame...";
-
-"&Save Link As..." = "&Save Link As...";
-
-"Copy Link Location" = "Copy Link Location";
-
-"Stop Animations" = "Stop Animations";
-
-"Save Image As..." = "Save Image As...";
-
-"Copy Image Location" = "Copy Image Location";
-
-"View Image (%1)" = "View Image (%1)";
-
-"Save Link As" = "Save Link As";
-
-"Save Image As" = "Save Image As";
-
-"Default font size" = "Default font size";
-
-"Font Size %1" = "Font Size %1";
-
-/* khtml_find.cpp */
-
-"End of document reached.\nContinue from the beginning?" = "End of document reached.\nContinue from the beginning?";
-
-"Find" = "Find";
-
-"Beginning of document reached.\nContinue from the end?" = "Beginning of document reached.\nContinue from the end?";
-
-"Search string '%1' not found." = "Search string '%1' not found.";
-
-/* khtml_part.cpp */
-
-"View Document Source" = "View Document Source";
-
-"View Frame Source" = "View Frame Source";
-
-"Save &Background Image As..." = "Save &Background Image As...";
-
-"&Save As..." = "&Save As...";
-
-"Save &Frame As..." = "Save &Frame As...";
-
-"Security..." = "Security...";
-
-"print rendering tree to stdout" = "print rendering tree to stdout";
-
-"print DOM tree to stdout" = "print DOM tree to stdout";
-
-"Show Images" = "Show Images";
-
-"Show Animated Images" = "Show Animated Images";
-
-"Stop Animated Images" = "Stop Animated Images";
-
-"Set &Encoding" = "Set &Encoding";
-
-"Auto" = "Auto";
-
-"Increase Font Sizes" = "Increase Font Sizes";
-
-"Decrease Font Sizes" = "Decrease Font Sizes";
-
-"Print Frame" = "Print Frame";
-
-"Display Images on Page" = "Display Images on Page";
-
-"Done." = "Done.";
-
-"Loading complete" = "Loading complete";
-
-"Symbolic Link" = "Symbolic Link";
-
-"%1 (Link)" = "%1 (Link)";
-
-"%2 (%1 bytes)" = "%2 (%1 bytes)";
-
-"%1 (%2 K)" = "%1 (%2 K)";
-
-" (In new window)" = " (In new window)";
-
-" (In other frame)" = " (In other frame)";
-
-"Email to: " = "Email to: ";
-
-" - Subject: " = " - Subject: ";
-
-" - CC: " = " - CC: ";
-
-" - BCC: " = " - BCC: ";
-
-"Save As..." = "Save As...";
-
-"<qt>The link <B>%1</B><BR>leads from this untrusted page to your local filesystem.<BR>Do you want to follow the link?" = "<qt>The link <B>%1</B><BR>leads from this untrusted page to your local filesystem.<BR>Do you want to follow the link?";
-
-"Follow" = "Follow";
-
-"Save background image as" = "Save background image as";
-
-"Save as" = "Save as";
-
-"*.html *.htm|HTML files" = "*.html *.htm|HTML files";
-
-"&Find in Frame" = "&Find in Frame";
-
-"&Find" = "&Find";
-
-"<qt>The form will be submitted to <BR><B>%1</B><BR>on your local filesystem.<BR>Do you want to submit the form?" = "<qt>The form will be submitted to <BR><B>%1</B><BR>on your local filesystem.<BR>Do you want to submit the form?";
-
-"Security Warning" = "Security Warning";
-
-"<qt>This untrusted page contains a link<BR><B>%1</B><BR>to your local file system." = "<qt>This untrusted page contains a link<BR><B>%1</B><BR>to your local file system.";
-
-"Security Alert" = "Security Alert";
-
-/* khtml_run.cpp */
-
-"Do you really want to execute '%1' ? " = "Do you really want to execute '%1' ? ";
-
-"Open '%1' using '%2'?" = "Open '%1' using '%2'?";
-
-"Open '%1' ?" = "Open '%1' ?";
-
-"Save to disk" = "Save to disk";
-
-"Open" = "Open";
-
-"Save As..." = "Save As...";
-
-/* khtmlimage.cpp */
-
-"%1 - %2x%3 Pixels" = "%1 - %2x%3 Pixels";
-
-"Image - %2x%3 Pixels" = "Image - %2x%3 Pixels";
-
-/* render_applet.cpp */
-
-"Java Applet is not loaded. (Java interpreter disabled)" = "Java Applet is not loaded. (Java interpreter disabled)";
-
-/* render_form.cpp */
-
-"Submit" = "Submit";
-
-"Reset" = "Reset";
-
-"Browse..." = "Browse...";
-
-/* xml_tokenizer.cpp */
-
-"XML parsing error" = "XML parsing error";
-
diff --git a/WebKit/Italian.lproj/InfoPlist.strings b/WebKit/Italian.lproj/InfoPlist.strings
deleted file mode 100644
index 303cc20..0000000
--- a/WebKit/Italian.lproj/InfoPlist.strings
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Localized versions of Info.plist keys */
-
-CFBundleName = "WebKit";
-CFBundleShortVersionString = "WebKit version 0.0.1d1";
-CFBundleGetInfoString = "WebKit version 0.0.1d1, Copyright 2000, MyGreatSoftware.";
-NSHumanReadableCopyright = "Copyright 2000, MyGreatSoftware.";
diff --git a/WebKit/Italian.lproj/Localizable.strings b/WebKit/Italian.lproj/Localizable.strings
deleted file mode 100644
index 449f940..0000000
--- a/WebKit/Italian.lproj/Localizable.strings
+++ /dev/null
@@ -1,208 +0,0 @@
-/* kjs_debugwin.cpp */
-
-"JavaScript Debugger" = "JavaScript Debugger";
-
-"&Next" = "&Next";
-
-"&Step" = "&Step";
-
-"&Continue" = "&Continue";
-
-/* kjs_window.cpp */
-
-"OK" = "OK";
-
-"Cancel" = "Cancel";
-
-"This site is trying to open up a new browser window using Javascript.\n\nDo you want to allow this?" = "This site is trying to open up a new browser window using Javascript.\n\nDo you want to allow this?";
-
-"Confirmation: Javascript Popup" = "Confirmation: Javascript Popup";
-
-"Close window ?" = "Close window ?";
-
-"Confirmation required" = "Confirmation required";
-
-/* html_formimpl.cpp */
-
-"You're about to send data to the Internet\nvia an unencrypted connection.\nIt might be possible for others to see this information.\n\nDo you want to continue?" = "You're about to send data to the Internet\nvia an unencrypted connection.\nIt might be possible for others to see this information.\n\nDo you want to continue?";
-
-"KDE Web browser" = "KDE Web browser";
-
-"When you send a password unencrypted to the Internet,\nit might be possible for others to capture it as plain text.\n\nDo you want to continue?" = "When you send a password unencrypted to the Internet,\nit might be possible for others to capture it as plain text.\n\nDo you want to continue?";
-
-"You're about to transfer the following files from\nyour local computer to the Internet.\n\nDo you really want to continue?" = "You're about to transfer the following files from\nyour local computer to the Internet.\n\nDo you really want to continue?";
-
-"Your data submission is redirected to\nan insecure site. The data is sent unencrypted.\n\nDo you want to continue?" = "Your data submission is redirected to\nan insecure site. The data is sent unencrypted.\n\nDo you want to continue?";
-
-"Cannot open downloaded file.\nSubmit a bug report." = "Cannot open downloaded file.\nSubmit a bug report.";
-
-"Error fetching file for submission:\n%1" = "Error fetching file for submission:\n%1";
-
-/* html_parser.cpp */
-
-"This is a searchable index. Enter search keywords: " = "This is a searchable index. Enter search keywords: ";
-
-/* kjavaappletserver.cpp */
-
-"Loading Applet" = "Loading Applet";
-
-"Error: java executable not found" = "Error: java executable not found";
-
-/* khtml_ext.cpp */
-
-"Reload Frame" = "Reload Frame";
-
-"View Frame Source" = "View Frame Source";
-
-"Print Frame..." = "Print Frame...";
-
-"&Save Link As..." = "&Save Link As...";
-
-"Copy Link Location" = "Copy Link Location";
-
-"Stop Animations" = "Stop Animations";
-
-"Save Image As..." = "Save Image As...";
-
-"Copy Image Location" = "Copy Image Location";
-
-"View Image (%1)" = "View Image (%1)";
-
-"Save Link As" = "Save Link As";
-
-"Save Image As" = "Save Image As";
-
-"Default font size" = "Default font size";
-
-"Font Size %1" = "Font Size %1";
-
-/* khtml_find.cpp */
-
-"End of document reached.\nContinue from the beginning?" = "End of document reached.\nContinue from the beginning?";
-
-"Find" = "Find";
-
-"Beginning of document reached.\nContinue from the end?" = "Beginning of document reached.\nContinue from the end?";
-
-"Search string '%1' not found." = "Search string '%1' not found.";
-
-/* khtml_part.cpp */
-
-"View Document Source" = "View Document Source";
-
-"View Frame Source" = "View Frame Source";
-
-"Save &Background Image As..." = "Save &Background Image As...";
-
-"&Save As..." = "&Save As...";
-
-"Save &Frame As..." = "Save &Frame As...";
-
-"Security..." = "Security...";
-
-"print rendering tree to stdout" = "print rendering tree to stdout";
-
-"print DOM tree to stdout" = "print DOM tree to stdout";
-
-"Show Images" = "Show Images";
-
-"Show Animated Images" = "Show Animated Images";
-
-"Stop Animated Images" = "Stop Animated Images";
-
-"Set &Encoding" = "Set &Encoding";
-
-"Auto" = "Auto";
-
-"Increase Font Sizes" = "Increase Font Sizes";
-
-"Decrease Font Sizes" = "Decrease Font Sizes";
-
-"Print Frame" = "Print Frame";
-
-"Display Images on Page" = "Display Images on Page";
-
-"Done." = "Done.";
-
-"Loading complete" = "Loading complete";
-
-"Symbolic Link" = "Symbolic Link";
-
-"%1 (Link)" = "%1 (Link)";
-
-"%2 (%1 bytes)" = "%2 (%1 bytes)";
-
-"%1 (%2 K)" = "%1 (%2 K)";
-
-" (In new window)" = " (In new window)";
-
-" (In other frame)" = " (In other frame)";
-
-"Email to: " = "Email to: ";
-
-" - Subject: " = " - Subject: ";
-
-" - CC: " = " - CC: ";
-
-" - BCC: " = " - BCC: ";
-
-"Save As..." = "Save As...";
-
-"<qt>The link <B>%1</B><BR>leads from this untrusted page to your local filesystem.<BR>Do you want to follow the link?" = "<qt>The link <B>%1</B><BR>leads from this untrusted page to your local filesystem.<BR>Do you want to follow the link?";
-
-"Follow" = "Follow";
-
-"Save background image as" = "Save background image as";
-
-"Save as" = "Save as";
-
-"*.html *.htm|HTML files" = "*.html *.htm|HTML files";
-
-"&Find in Frame" = "&Find in Frame";
-
-"&Find" = "&Find";
-
-"<qt>The form will be submitted to <BR><B>%1</B><BR>on your local filesystem.<BR>Do you want to submit the form?" = "<qt>The form will be submitted to <BR><B>%1</B><BR>on your local filesystem.<BR>Do you want to submit the form?";
-
-"Security Warning" = "Security Warning";
-
-"<qt>This untrusted page contains a link<BR><B>%1</B><BR>to your local file system." = "<qt>This untrusted page contains a link<BR><B>%1</B><BR>to your local file system.";
-
-"Security Alert" = "Security Alert";
-
-/* khtml_run.cpp */
-
-"Do you really want to execute '%1' ? " = "Do you really want to execute '%1' ? ";
-
-"Open '%1' using '%2'?" = "Open '%1' using '%2'?";
-
-"Open '%1' ?" = "Open '%1' ?";
-
-"Save to disk" = "Save to disk";
-
-"Open" = "Open";
-
-"Save As..." = "Save As...";
-
-/* khtmlimage.cpp */
-
-"%1 - %2x%3 Pixels" = "%1 - %2x%3 Pixels";
-
-"Image - %2x%3 Pixels" = "Image - %2x%3 Pixels";
-
-/* render_applet.cpp */
-
-"Java Applet is not loaded. (Java interpreter disabled)" = "Java Applet is not loaded. (Java interpreter disabled)";
-
-/* render_form.cpp */
-
-"Submit" = "Submit";
-
-"Reset" = "Reset";
-
-"Browse..." = "Browse...";
-
-/* xml_tokenizer.cpp */
-
-"XML parsing error" = "XML parsing error";
-
diff --git a/WebKit/Japanese.lproj/InfoPlist.strings b/WebKit/Japanese.lproj/InfoPlist.strings
deleted file mode 100644
index 303cc20..0000000
--- a/WebKit/Japanese.lproj/InfoPlist.strings
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Localized versions of Info.plist keys */
-
-CFBundleName = "WebKit";
-CFBundleShortVersionString = "WebKit version 0.0.1d1";
-CFBundleGetInfoString = "WebKit version 0.0.1d1, Copyright 2000, MyGreatSoftware.";
-NSHumanReadableCopyright = "Copyright 2000, MyGreatSoftware.";
diff --git a/WebKit/Japanese.lproj/Localizable.strings b/WebKit/Japanese.lproj/Localizable.strings
deleted file mode 100644
index 449f940..0000000
--- a/WebKit/Japanese.lproj/Localizable.strings
+++ /dev/null
@@ -1,208 +0,0 @@
-/* kjs_debugwin.cpp */
-
-"JavaScript Debugger" = "JavaScript Debugger";
-
-"&Next" = "&Next";
-
-"&Step" = "&Step";
-
-"&Continue" = "&Continue";
-
-/* kjs_window.cpp */
-
-"OK" = "OK";
-
-"Cancel" = "Cancel";
-
-"This site is trying to open up a new browser window using Javascript.\n\nDo you want to allow this?" = "This site is trying to open up a new browser window using Javascript.\n\nDo you want to allow this?";
-
-"Confirmation: Javascript Popup" = "Confirmation: Javascript Popup";
-
-"Close window ?" = "Close window ?";
-
-"Confirmation required" = "Confirmation required";
-
-/* html_formimpl.cpp */
-
-"You're about to send data to the Internet\nvia an unencrypted connection.\nIt might be possible for others to see this information.\n\nDo you want to continue?" = "You're about to send data to the Internet\nvia an unencrypted connection.\nIt might be possible for others to see this information.\n\nDo you want to continue?";
-
-"KDE Web browser" = "KDE Web browser";
-
-"When you send a password unencrypted to the Internet,\nit might be possible for others to capture it as plain text.\n\nDo you want to continue?" = "When you send a password unencrypted to the Internet,\nit might be possible for others to capture it as plain text.\n\nDo you want to continue?";
-
-"You're about to transfer the following files from\nyour local computer to the Internet.\n\nDo you really want to continue?" = "You're about to transfer the following files from\nyour local computer to the Internet.\n\nDo you really want to continue?";
-
-"Your data submission is redirected to\nan insecure site. The data is sent unencrypted.\n\nDo you want to continue?" = "Your data submission is redirected to\nan insecure site. The data is sent unencrypted.\n\nDo you want to continue?";
-
-"Cannot open downloaded file.\nSubmit a bug report." = "Cannot open downloaded file.\nSubmit a bug report.";
-
-"Error fetching file for submission:\n%1" = "Error fetching file for submission:\n%1";
-
-/* html_parser.cpp */
-
-"This is a searchable index. Enter search keywords: " = "This is a searchable index. Enter search keywords: ";
-
-/* kjavaappletserver.cpp */
-
-"Loading Applet" = "Loading Applet";
-
-"Error: java executable not found" = "Error: java executable not found";
-
-/* khtml_ext.cpp */
-
-"Reload Frame" = "Reload Frame";
-
-"View Frame Source" = "View Frame Source";
-
-"Print Frame..." = "Print Frame...";
-
-"&Save Link As..." = "&Save Link As...";
-
-"Copy Link Location" = "Copy Link Location";
-
-"Stop Animations" = "Stop Animations";
-
-"Save Image As..." = "Save Image As...";
-
-"Copy Image Location" = "Copy Image Location";
-
-"View Image (%1)" = "View Image (%1)";
-
-"Save Link As" = "Save Link As";
-
-"Save Image As" = "Save Image As";
-
-"Default font size" = "Default font size";
-
-"Font Size %1" = "Font Size %1";
-
-/* khtml_find.cpp */
-
-"End of document reached.\nContinue from the beginning?" = "End of document reached.\nContinue from the beginning?";
-
-"Find" = "Find";
-
-"Beginning of document reached.\nContinue from the end?" = "Beginning of document reached.\nContinue from the end?";
-
-"Search string '%1' not found." = "Search string '%1' not found.";
-
-/* khtml_part.cpp */
-
-"View Document Source" = "View Document Source";
-
-"View Frame Source" = "View Frame Source";
-
-"Save &Background Image As..." = "Save &Background Image As...";
-
-"&Save As..." = "&Save As...";
-
-"Save &Frame As..." = "Save &Frame As...";
-
-"Security..." = "Security...";
-
-"print rendering tree to stdout" = "print rendering tree to stdout";
-
-"print DOM tree to stdout" = "print DOM tree to stdout";
-
-"Show Images" = "Show Images";
-
-"Show Animated Images" = "Show Animated Images";
-
-"Stop Animated Images" = "Stop Animated Images";
-
-"Set &Encoding" = "Set &Encoding";
-
-"Auto" = "Auto";
-
-"Increase Font Sizes" = "Increase Font Sizes";
-
-"Decrease Font Sizes" = "Decrease Font Sizes";
-
-"Print Frame" = "Print Frame";
-
-"Display Images on Page" = "Display Images on Page";
-
-"Done." = "Done.";
-
-"Loading complete" = "Loading complete";
-
-"Symbolic Link" = "Symbolic Link";
-
-"%1 (Link)" = "%1 (Link)";
-
-"%2 (%1 bytes)" = "%2 (%1 bytes)";
-
-"%1 (%2 K)" = "%1 (%2 K)";
-
-" (In new window)" = " (In new window)";
-
-" (In other frame)" = " (In other frame)";
-
-"Email to: " = "Email to: ";
-
-" - Subject: " = " - Subject: ";
-
-" - CC: " = " - CC: ";
-
-" - BCC: " = " - BCC: ";
-
-"Save As..." = "Save As...";
-
-"<qt>The link <B>%1</B><BR>leads from this untrusted page to your local filesystem.<BR>Do you want to follow the link?" = "<qt>The link <B>%1</B><BR>leads from this untrusted page to your local filesystem.<BR>Do you want to follow the link?";
-
-"Follow" = "Follow";
-
-"Save background image as" = "Save background image as";
-
-"Save as" = "Save as";
-
-"*.html *.htm|HTML files" = "*.html *.htm|HTML files";
-
-"&Find in Frame" = "&Find in Frame";
-
-"&Find" = "&Find";
-
-"<qt>The form will be submitted to <BR><B>%1</B><BR>on your local filesystem.<BR>Do you want to submit the form?" = "<qt>The form will be submitted to <BR><B>%1</B><BR>on your local filesystem.<BR>Do you want to submit the form?";
-
-"Security Warning" = "Security Warning";
-
-"<qt>This untrusted page contains a link<BR><B>%1</B><BR>to your local file system." = "<qt>This untrusted page contains a link<BR><B>%1</B><BR>to your local file system.";
-
-"Security Alert" = "Security Alert";
-
-/* khtml_run.cpp */
-
-"Do you really want to execute '%1' ? " = "Do you really want to execute '%1' ? ";
-
-"Open '%1' using '%2'?" = "Open '%1' using '%2'?";
-
-"Open '%1' ?" = "Open '%1' ?";
-
-"Save to disk" = "Save to disk";
-
-"Open" = "Open";
-
-"Save As..." = "Save As...";
-
-/* khtmlimage.cpp */
-
-"%1 - %2x%3 Pixels" = "%1 - %2x%3 Pixels";
-
-"Image - %2x%3 Pixels" = "Image - %2x%3 Pixels";
-
-/* render_applet.cpp */
-
-"Java Applet is not loaded. (Java interpreter disabled)" = "Java Applet is not loaded. (Java interpreter disabled)";
-
-/* render_form.cpp */
-
-"Submit" = "Submit";
-
-"Reset" = "Reset";
-
-"Browse..." = "Browse...";
-
-/* xml_tokenizer.cpp */
-
-"XML parsing error" = "XML parsing error";
-
diff --git a/WebKit/MIME.subproj/IFDownloadHandler.h b/WebKit/MIME.subproj/IFDownloadHandler.h
index dba6d02..ad2a839 100644
--- a/WebKit/MIME.subproj/IFDownloadHandler.h
+++ b/WebKit/MIME.subproj/IFDownloadHandler.h
@@ -11,9 +11,10 @@
 
 @interface IFDownloadHandler : NSObject {
     IFWebDataSource *dataSource;
+    NSFileHandle *fileHandle;
 }
 
 - initWithDataSource:(IFWebDataSource *)dSource;
-- (void)downloadCompletedWithData:(NSData *)data;
-
+- (void)receivedData:(NSData *)data isComplete:(BOOL)isComplete;
+- (void)cancel;
 @end
diff --git a/WebKit/MIME.subproj/IFDownloadHandler.mm b/WebKit/MIME.subproj/IFDownloadHandler.mm
index 4467a95..5dec18d 100644
--- a/WebKit/MIME.subproj/IFDownloadHandler.mm
+++ b/WebKit/MIME.subproj/IFDownloadHandler.mm
@@ -21,30 +21,48 @@
 
 - (void)dealloc
 {
+    [fileHandle release];
     [dataSource release];
 }
 
-- (void)downloadCompletedWithData:(NSData *)data;
+- (void)receivedData:(NSData *)data isComplete:(BOOL)isComplete
 {
     NSString *path = [dataSource downloadPath];
     NSFileManager *fileManager;
     NSWorkspace *workspace;
     
-    // FIXME: Should probably not replace existing file
-    // FIXME: Should report error if there is one
-    fileManager = [NSFileManager defaultManager];
-    [fileManager createFileAtPath:path contents:data attributes:nil];
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_DOWNLOAD, "Download complete. Saved to: %s", [path cString]);
+    if(!fileHandle){
+        // FIXME: Should not replace existing file
+        // FIXME: Handle errors
+        fileManager = [NSFileManager defaultManager];
+        [fileManager createFileAtPath:path contents:nil attributes:nil];
+        fileHandle = [[NSFileHandle fileHandleForWritingAtPath:path] retain];
+        
+        workspace = [NSWorkspace sharedWorkspace];
+        [workspace noteFileSystemChanged:path];
+    }
+    
+    [fileHandle writeData:data];
     
-    // Send Finder notification
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_DOWNLOAD, "Notifying Finder");
-    workspace = [NSWorkspace sharedWorkspace];
-    [workspace noteFileSystemChanged:path];
+    if(isComplete){
     
-    if([dataSource contentPolicy] == IFContentPolicyOpenExternally){
-        [workspace openFile:path];
+        [fileHandle closeFile];
+        WEBKITDEBUGLEVEL(WEBKIT_LOG_DOWNLOAD, "Download complete. Saved to: %s", [path cString]);
+        
+        workspace = [NSWorkspace sharedWorkspace];
+        [workspace noteFileSystemChanged:path];
+        
+        if([dataSource contentPolicy] == IFContentPolicyOpenExternally){
+            [workspace openFile:path];
+        }
     }
 }
 
+- (void)cancel
+{
+    [fileHandle closeFile];
+    // FIXME: Do something to mark it as resumable?
+}
+
 
 @end
diff --git a/WebKit/Spanish.lproj/InfoPlist.strings b/WebKit/Spanish.lproj/InfoPlist.strings
deleted file mode 100644
index 9f00ab9..0000000
--- a/WebKit/Spanish.lproj/InfoPlist.strings
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Localized versions of Info.plist keys */
-
-CFBundleName = "WebKit";
-CFBundleShortVersionString = "WebKit version 0.0.1d1";
-CFBundleGetInfoString = "WebKit version 0.0.1d1, Copyright 2000, MyGreatSoftware.";
-NSHumanReadableCopyright = "Copyright 2000, MyGreatSoftware.";
\ No newline at end of file
diff --git a/WebKit/Spanish.lproj/Localizable.strings b/WebKit/Spanish.lproj/Localizable.strings
deleted file mode 100644
index 449f940..0000000
--- a/WebKit/Spanish.lproj/Localizable.strings
+++ /dev/null
@@ -1,208 +0,0 @@
-/* kjs_debugwin.cpp */
-
-"JavaScript Debugger" = "JavaScript Debugger";
-
-"&Next" = "&Next";
-
-"&Step" = "&Step";
-
-"&Continue" = "&Continue";
-
-/* kjs_window.cpp */
-
-"OK" = "OK";
-
-"Cancel" = "Cancel";
-
-"This site is trying to open up a new browser window using Javascript.\n\nDo you want to allow this?" = "This site is trying to open up a new browser window using Javascript.\n\nDo you want to allow this?";
-
-"Confirmation: Javascript Popup" = "Confirmation: Javascript Popup";
-
-"Close window ?" = "Close window ?";
-
-"Confirmation required" = "Confirmation required";
-
-/* html_formimpl.cpp */
-
-"You're about to send data to the Internet\nvia an unencrypted connection.\nIt might be possible for others to see this information.\n\nDo you want to continue?" = "You're about to send data to the Internet\nvia an unencrypted connection.\nIt might be possible for others to see this information.\n\nDo you want to continue?";
-
-"KDE Web browser" = "KDE Web browser";
-
-"When you send a password unencrypted to the Internet,\nit might be possible for others to capture it as plain text.\n\nDo you want to continue?" = "When you send a password unencrypted to the Internet,\nit might be possible for others to capture it as plain text.\n\nDo you want to continue?";
-
-"You're about to transfer the following files from\nyour local computer to the Internet.\n\nDo you really want to continue?" = "You're about to transfer the following files from\nyour local computer to the Internet.\n\nDo you really want to continue?";
-
-"Your data submission is redirected to\nan insecure site. The data is sent unencrypted.\n\nDo you want to continue?" = "Your data submission is redirected to\nan insecure site. The data is sent unencrypted.\n\nDo you want to continue?";
-
-"Cannot open downloaded file.\nSubmit a bug report." = "Cannot open downloaded file.\nSubmit a bug report.";
-
-"Error fetching file for submission:\n%1" = "Error fetching file for submission:\n%1";
-
-/* html_parser.cpp */
-
-"This is a searchable index. Enter search keywords: " = "This is a searchable index. Enter search keywords: ";
-
-/* kjavaappletserver.cpp */
-
-"Loading Applet" = "Loading Applet";
-
-"Error: java executable not found" = "Error: java executable not found";
-
-/* khtml_ext.cpp */
-
-"Reload Frame" = "Reload Frame";
-
-"View Frame Source" = "View Frame Source";
-
-"Print Frame..." = "Print Frame...";
-
-"&Save Link As..." = "&Save Link As...";
-
-"Copy Link Location" = "Copy Link Location";
-
-"Stop Animations" = "Stop Animations";
-
-"Save Image As..." = "Save Image As...";
-
-"Copy Image Location" = "Copy Image Location";
-
-"View Image (%1)" = "View Image (%1)";
-
-"Save Link As" = "Save Link As";
-
-"Save Image As" = "Save Image As";
-
-"Default font size" = "Default font size";
-
-"Font Size %1" = "Font Size %1";
-
-/* khtml_find.cpp */
-
-"End of document reached.\nContinue from the beginning?" = "End of document reached.\nContinue from the beginning?";
-
-"Find" = "Find";
-
-"Beginning of document reached.\nContinue from the end?" = "Beginning of document reached.\nContinue from the end?";
-
-"Search string '%1' not found." = "Search string '%1' not found.";
-
-/* khtml_part.cpp */
-
-"View Document Source" = "View Document Source";
-
-"View Frame Source" = "View Frame Source";
-
-"Save &Background Image As..." = "Save &Background Image As...";
-
-"&Save As..." = "&Save As...";
-
-"Save &Frame As..." = "Save &Frame As...";
-
-"Security..." = "Security...";
-
-"print rendering tree to stdout" = "print rendering tree to stdout";
-
-"print DOM tree to stdout" = "print DOM tree to stdout";
-
-"Show Images" = "Show Images";
-
-"Show Animated Images" = "Show Animated Images";
-
-"Stop Animated Images" = "Stop Animated Images";
-
-"Set &Encoding" = "Set &Encoding";
-
-"Auto" = "Auto";
-
-"Increase Font Sizes" = "Increase Font Sizes";
-
-"Decrease Font Sizes" = "Decrease Font Sizes";
-
-"Print Frame" = "Print Frame";
-
-"Display Images on Page" = "Display Images on Page";
-
-"Done." = "Done.";
-
-"Loading complete" = "Loading complete";
-
-"Symbolic Link" = "Symbolic Link";
-
-"%1 (Link)" = "%1 (Link)";
-
-"%2 (%1 bytes)" = "%2 (%1 bytes)";
-
-"%1 (%2 K)" = "%1 (%2 K)";
-
-" (In new window)" = " (In new window)";
-
-" (In other frame)" = " (In other frame)";
-
-"Email to: " = "Email to: ";
-
-" - Subject: " = " - Subject: ";
-
-" - CC: " = " - CC: ";
-
-" - BCC: " = " - BCC: ";
-
-"Save As..." = "Save As...";
-
-"<qt>The link <B>%1</B><BR>leads from this untrusted page to your local filesystem.<BR>Do you want to follow the link?" = "<qt>The link <B>%1</B><BR>leads from this untrusted page to your local filesystem.<BR>Do you want to follow the link?";
-
-"Follow" = "Follow";
-
-"Save background image as" = "Save background image as";
-
-"Save as" = "Save as";
-
-"*.html *.htm|HTML files" = "*.html *.htm|HTML files";
-
-"&Find in Frame" = "&Find in Frame";
-
-"&Find" = "&Find";
-
-"<qt>The form will be submitted to <BR><B>%1</B><BR>on your local filesystem.<BR>Do you want to submit the form?" = "<qt>The form will be submitted to <BR><B>%1</B><BR>on your local filesystem.<BR>Do you want to submit the form?";
-
-"Security Warning" = "Security Warning";
-
-"<qt>This untrusted page contains a link<BR><B>%1</B><BR>to your local file system." = "<qt>This untrusted page contains a link<BR><B>%1</B><BR>to your local file system.";
-
-"Security Alert" = "Security Alert";
-
-/* khtml_run.cpp */
-
-"Do you really want to execute '%1' ? " = "Do you really want to execute '%1' ? ";
-
-"Open '%1' using '%2'?" = "Open '%1' using '%2'?";
-
-"Open '%1' ?" = "Open '%1' ?";
-
-"Save to disk" = "Save to disk";
-
-"Open" = "Open";
-
-"Save As..." = "Save As...";
-
-/* khtmlimage.cpp */
-
-"%1 - %2x%3 Pixels" = "%1 - %2x%3 Pixels";
-
-"Image - %2x%3 Pixels" = "Image - %2x%3 Pixels";
-
-/* render_applet.cpp */
-
-"Java Applet is not loaded. (Java interpreter disabled)" = "Java Applet is not loaded. (Java interpreter disabled)";
-
-/* render_form.cpp */
-
-"Submit" = "Submit";
-
-"Reset" = "Reset";
-
-"Browse..." = "Browse...";
-
-/* xml_tokenizer.cpp */
-
-"XML parsing error" = "XML parsing error";
-
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index 9b7c287..e4025ce 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -365,13 +365,7 @@
 		};
 		089C1666FE841158C02AAC07 = {
 			children = (
-				35F357790198A6100ACA1520,
 				089C1667FE841158C02AAC07,
-				35F3577A0198A99D0ACA1520,
-				35F357780198A6100ACA1520,
-				35F3577C0198AA000ACA1520,
-				35F3577B0198A9AD0ACA1520,
-				35F357760198A3970ACA1520,
 			);
 			isa = PBXVariantGroup;
 			name = InfoPlist.strings;
@@ -711,36 +705,6 @@
 			settings = {
 			};
 		};
-		354B0A1A0198BD810ACA1520 = {
-			isa = PBXFileReference;
-			name = French;
-			path = French.lproj/Localizable.strings;
-			refType = 4;
-		};
-		359D289A0198D3B50ACA1520 = {
-			isa = PBXFileReference;
-			name = Dutch;
-			path = Dutch.lproj/Localizable.strings;
-			refType = 4;
-		};
-		359D289B0198D3B50ACA1520 = {
-			isa = PBXFileReference;
-			name = German;
-			path = German.lproj/Localizable.strings;
-			refType = 4;
-		};
-		359D289C0198D3B50ACA1520 = {
-			isa = PBXFileReference;
-			name = Italian;
-			path = Italian.lproj/Localizable.strings;
-			refType = 4;
-		};
-		359D289D0198D3B50ACA1520 = {
-			isa = PBXFileReference;
-			name = Japanese;
-			path = Japanese.lproj/Localizable.strings;
-			refType = 4;
-		};
 		35F3577401986B740ACA1520 = {
 			isa = PBXFileReference;
 			name = html4.css;
@@ -753,51 +717,9 @@
 			settings = {
 			};
 		};
-		35F357760198A3970ACA1520 = {
-			isa = PBXFileReference;
-			name = Spanish;
-			path = Spanish.lproj/InfoPlist.strings;
-			refType = 4;
-		};
-		35F357780198A6100ACA1520 = {
-			isa = PBXFileReference;
-			name = German;
-			path = German.lproj/InfoPlist.strings;
-			refType = 4;
-		};
-		35F357790198A6100ACA1520 = {
-			isa = PBXFileReference;
-			name = Dutch;
-			path = Dutch.lproj/InfoPlist.strings;
-			refType = 4;
-		};
-		35F3577A0198A99D0ACA1520 = {
-			isa = PBXFileReference;
-			name = French;
-			path = French.lproj/InfoPlist.strings;
-			refType = 4;
-		};
-		35F3577B0198A9AD0ACA1520 = {
-			isa = PBXFileReference;
-			name = Japanese;
-			path = Japanese.lproj/InfoPlist.strings;
-			refType = 4;
-		};
-		35F3577C0198AA000ACA1520 = {
-			isa = PBXFileReference;
-			name = Italian;
-			path = Italian.lproj/InfoPlist.strings;
-			refType = 4;
-		};
 		35F3577E0198AAB80ACA1520 = {
 			children = (
-				359D289A0198D3B50ACA1520,
 				35F3577F0198AAB80ACA1520,
-				354B0A1A0198BD810ACA1520,
-				359D289B0198D3B50ACA1520,
-				359D289C0198D3B50ACA1520,
-				359D289D0198D3B50ACA1520,
-				35F357840198AD6B0ACA1520,
 			);
 			isa = PBXVariantGroup;
 			name = Localizable.strings;
@@ -816,12 +738,6 @@
 			settings = {
 			};
 		};
-		35F357840198AD6B0ACA1520 = {
-			isa = PBXFileReference;
-			name = Spanish;
-			path = Spanish.lproj/Localizable.strings;
-			refType = 4;
-		};
 //350
 //351
 //352
diff --git a/WebKit/WebView.subproj/IFMainURLHandleClient.h b/WebKit/WebView.subproj/IFMainURLHandleClient.h
index 835a670..42d185a 100644
--- a/WebKit/WebView.subproj/IFMainURLHandleClient.h
+++ b/WebKit/WebView.subproj/IFMainURLHandleClient.h
@@ -14,16 +14,13 @@
 @class IFWebDataSource;
 @protocol IFURLHandleClient;
 
-class KHTMLPart;
-
 @interface IFMainURLHandleClient : NSObject <IFURLHandleClient>
 {
     NSURL *url;
     id dataSource;
-    KHTMLPart *part;
     BOOL processedBufferedData;
-    BOOL examinedInitialData;
     BOOL isFirstChunk;
+    IFDownloadHandler *downloadHandler;
 }
 - initWithDataSource: (IFWebDataSource *)ds;
 
diff --git a/WebKit/WebView.subproj/IFMainURLHandleClient.mm b/WebKit/WebView.subproj/IFMainURLHandleClient.mm
index d5ba7b6..bdfd8b2 100644
--- a/WebKit/WebView.subproj/IFMainURLHandleClient.mm
+++ b/WebKit/WebView.subproj/IFMainURLHandleClient.mm
@@ -5,6 +5,7 @@
 */
 
 #import <WebKit/IFDocument.h>
+#import <WebKit/IFDownloadHandler.h>
 #import <WebKit/IFHTMLRepresentation.h>
 #import <WebKit/IFLoadProgress.h>
 #import <WebKit/IFLocationChangeHandler.h>
@@ -30,7 +31,6 @@
 {
     if ((self = [super init])) {
         dataSource = [ds retain];
-        examinedInitialData = NO;
         processedBufferedData = NO;
         isFirstChunk = YES;
         return self;
@@ -42,7 +42,7 @@
 - (void)dealloc
 {
     WEBKIT_ASSERT(url == nil);
-    
+
     [dataSource release];
     [super dealloc];
 }
@@ -73,6 +73,10 @@
     [(IFWebController *)[dataSource controller] _didStopLoading:url];
     [url release];
     url = nil;
+    
+    [downloadHandler cancel];
+    [downloadHandler release];
+    downloadHandler = nil;
 }
 
 
@@ -82,7 +86,10 @@
     
     WEBKIT_ASSERT([url isEqual:[sender redirectedURL] ? [sender redirectedURL] : [sender url]]);
     
-    [dataSource _setResourceData:data];
+    // Don't retain download data
+    if([dataSource contentPolicy] != IFContentPolicySave &&
+       [dataSource contentPolicy] != IFContentPolicyOpenExternally)
+       [dataSource _setResourceData:data];
     
     // update progress
     IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
@@ -94,10 +101,13 @@
     [(IFWebController *)[dataSource controller] _didStopLoading:url];
     [url release];
     url = nil;
+    
+    [downloadHandler release];
+    downloadHandler = nil;
 }
 
 
-- (void)IFURLHandle:(IFURLHandle *)sender resourceDataDidBecomeAvailable:(NSData *)data
+- (void)IFURLHandle:(IFURLHandle *)sender resourceDataDidBecomeAvailable:(NSData *)incomingData
 {
     int contentLength = [sender contentLength];
     int contentLengthReceived = [sender contentLengthReceived];
@@ -106,41 +116,52 @@
     IFWebFrame *frame = [dataSource webFrame];
     IFWebView *view = [frame view];
     IFContentPolicy contentPolicy;
+    NSData *data;
     
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "url = %s, data = %p, length %d\n", DEBUG_OBJECT([sender url]), data, [data length]);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "url = %s, data = %p, length %d\n", DEBUG_OBJECT([sender url]), incomingData, [incomingData length]);
     
     WEBKIT_ASSERT([url isEqual:[sender redirectedURL] ? [sender redirectedURL] : [sender url]]);
     
     // Check the mime type and ask the client for the content policy.
-    if(!examinedInitialData){
+    if(isFirstChunk){
         WEBKITDEBUGLEVEL(WEBKIT_LOG_DOWNLOAD, "main content type: %s", DEBUG_OBJECT(contentType));
         [dataSource _setContentType:contentType];
         [dataSource _setEncoding:[sender characterSet]];
         [[dataSource _locationChangeHandler] requestContentPolicyForMIMEType:contentType];
-        examinedInitialData = YES;
     }
     
     contentPolicy = [dataSource contentPolicy];
-    if(contentPolicy == IFContentPolicyIgnore){
-        [sender cancelLoadInBackground];
-        return;
-    }
-    
+
     if(contentPolicy != IFContentPolicyNone){
         if(!processedBufferedData){
             // Process all data that has been received now that we have a content policy
             // and don't call resourceData if this is the first chunk since resourceData is a copy
             if(isFirstChunk){
-                [[dataSource representation] receivedData:data withDataSource:dataSource isComplete:isComplete];
+                data = incomingData;
             }else{
-                [[dataSource representation] receivedData:[sender resourceData] 
-                    withDataSource:dataSource isComplete:isComplete];
+                data = [sender resourceData];
             }
             processedBufferedData = YES;          
         }else{
-            [[dataSource representation] receivedData:data withDataSource:dataSource isComplete:isComplete];
+            data = incomingData;
         }
+    }
+    
+    if(contentPolicy == IFContentPolicyShow){
+        [[dataSource representation] receivedData:data withDataSource:dataSource isComplete:isComplete];
         [[view documentView] dataSourceUpdated:dataSource];
+        
+    }else if(contentPolicy == IFContentPolicySave || contentPolicy == IFContentPolicyOpenExternally){
+        if(!downloadHandler){
+            [frame->_private setProvisionalDataSource:nil];
+            [[dataSource _locationChangeHandler] locationChangeDone:nil];
+            downloadHandler = [[IFDownloadHandler alloc] initWithDataSource:dataSource];
+        }
+        [downloadHandler receivedData:data isComplete:isComplete];
+        
+    }else if(contentPolicy == IFContentPolicyIgnore){
+        [sender cancelLoadInBackground];
+        return;
     }
     
     WEBKITDEBUGLEVEL(WEBKIT_LOG_DOWNLOAD, "%d of %d", contentLengthReceived, contentLength);
@@ -178,6 +199,10 @@
     [(IFWebController *)[dataSource controller] _didStopLoading:url];
     [url release];
     url = nil;
+    
+    [downloadHandler cancel];
+    [downloadHandler release];
+    downloadHandler = nil;
 }
 
 
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.h b/WebKit/WebView.subproj/WebMainResourceClient.h
index 835a670..42d185a 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.h
+++ b/WebKit/WebView.subproj/WebMainResourceClient.h
@@ -14,16 +14,13 @@
 @class IFWebDataSource;
 @protocol IFURLHandleClient;
 
-class KHTMLPart;
-
 @interface IFMainURLHandleClient : NSObject <IFURLHandleClient>
 {
     NSURL *url;
     id dataSource;
-    KHTMLPart *part;
     BOOL processedBufferedData;
-    BOOL examinedInitialData;
     BOOL isFirstChunk;
+    IFDownloadHandler *downloadHandler;
 }
 - initWithDataSource: (IFWebDataSource *)ds;
 
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index d5ba7b6..bdfd8b2 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -5,6 +5,7 @@
 */
 
 #import <WebKit/IFDocument.h>
+#import <WebKit/IFDownloadHandler.h>
 #import <WebKit/IFHTMLRepresentation.h>
 #import <WebKit/IFLoadProgress.h>
 #import <WebKit/IFLocationChangeHandler.h>
@@ -30,7 +31,6 @@
 {
     if ((self = [super init])) {
         dataSource = [ds retain];
-        examinedInitialData = NO;
         processedBufferedData = NO;
         isFirstChunk = YES;
         return self;
@@ -42,7 +42,7 @@
 - (void)dealloc
 {
     WEBKIT_ASSERT(url == nil);
-    
+
     [dataSource release];
     [super dealloc];
 }
@@ -73,6 +73,10 @@
     [(IFWebController *)[dataSource controller] _didStopLoading:url];
     [url release];
     url = nil;
+    
+    [downloadHandler cancel];
+    [downloadHandler release];
+    downloadHandler = nil;
 }
 
 
@@ -82,7 +86,10 @@
     
     WEBKIT_ASSERT([url isEqual:[sender redirectedURL] ? [sender redirectedURL] : [sender url]]);
     
-    [dataSource _setResourceData:data];
+    // Don't retain download data
+    if([dataSource contentPolicy] != IFContentPolicySave &&
+       [dataSource contentPolicy] != IFContentPolicyOpenExternally)
+       [dataSource _setResourceData:data];
     
     // update progress
     IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
@@ -94,10 +101,13 @@
     [(IFWebController *)[dataSource controller] _didStopLoading:url];
     [url release];
     url = nil;
+    
+    [downloadHandler release];
+    downloadHandler = nil;
 }
 
 
-- (void)IFURLHandle:(IFURLHandle *)sender resourceDataDidBecomeAvailable:(NSData *)data
+- (void)IFURLHandle:(IFURLHandle *)sender resourceDataDidBecomeAvailable:(NSData *)incomingData
 {
     int contentLength = [sender contentLength];
     int contentLengthReceived = [sender contentLengthReceived];
@@ -106,41 +116,52 @@
     IFWebFrame *frame = [dataSource webFrame];
     IFWebView *view = [frame view];
     IFContentPolicy contentPolicy;
+    NSData *data;
     
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "url = %s, data = %p, length %d\n", DEBUG_OBJECT([sender url]), data, [data length]);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "url = %s, data = %p, length %d\n", DEBUG_OBJECT([sender url]), incomingData, [incomingData length]);
     
     WEBKIT_ASSERT([url isEqual:[sender redirectedURL] ? [sender redirectedURL] : [sender url]]);
     
     // Check the mime type and ask the client for the content policy.
-    if(!examinedInitialData){
+    if(isFirstChunk){
         WEBKITDEBUGLEVEL(WEBKIT_LOG_DOWNLOAD, "main content type: %s", DEBUG_OBJECT(contentType));
         [dataSource _setContentType:contentType];
         [dataSource _setEncoding:[sender characterSet]];
         [[dataSource _locationChangeHandler] requestContentPolicyForMIMEType:contentType];
-        examinedInitialData = YES;
     }
     
     contentPolicy = [dataSource contentPolicy];
-    if(contentPolicy == IFContentPolicyIgnore){
-        [sender cancelLoadInBackground];
-        return;
-    }
-    
+
     if(contentPolicy != IFContentPolicyNone){
         if(!processedBufferedData){
             // Process all data that has been received now that we have a content policy
             // and don't call resourceData if this is the first chunk since resourceData is a copy
             if(isFirstChunk){
-                [[dataSource representation] receivedData:data withDataSource:dataSource isComplete:isComplete];
+                data = incomingData;
             }else{
-                [[dataSource representation] receivedData:[sender resourceData] 
-                    withDataSource:dataSource isComplete:isComplete];
+                data = [sender resourceData];
             }
             processedBufferedData = YES;          
         }else{
-            [[dataSource representation] receivedData:data withDataSource:dataSource isComplete:isComplete];
+            data = incomingData;
         }
+    }
+    
+    if(contentPolicy == IFContentPolicyShow){
+        [[dataSource representation] receivedData:data withDataSource:dataSource isComplete:isComplete];
         [[view documentView] dataSourceUpdated:dataSource];
+        
+    }else if(contentPolicy == IFContentPolicySave || contentPolicy == IFContentPolicyOpenExternally){
+        if(!downloadHandler){
+            [frame->_private setProvisionalDataSource:nil];
+            [[dataSource _locationChangeHandler] locationChangeDone:nil];
+            downloadHandler = [[IFDownloadHandler alloc] initWithDataSource:dataSource];
+        }
+        [downloadHandler receivedData:data isComplete:isComplete];
+        
+    }else if(contentPolicy == IFContentPolicyIgnore){
+        [sender cancelLoadInBackground];
+        return;
     }
     
     WEBKITDEBUGLEVEL(WEBKIT_LOG_DOWNLOAD, "%d of %d", contentLengthReceived, contentLength);
@@ -178,6 +199,10 @@
     [(IFWebController *)[dataSource controller] _didStopLoading:url];
     [url release];
     url = nil;
+    
+    [downloadHandler cancel];
+    [downloadHandler release];
+    downloadHandler = nil;
 }
 
 
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.h b/WebKit/WebView.subproj/WebMainResourceLoader.h
index 835a670..42d185a 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.h
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.h
@@ -14,16 +14,13 @@
 @class IFWebDataSource;
 @protocol IFURLHandleClient;
 
-class KHTMLPart;
-
 @interface IFMainURLHandleClient : NSObject <IFURLHandleClient>
 {
     NSURL *url;
     id dataSource;
-    KHTMLPart *part;
     BOOL processedBufferedData;
-    BOOL examinedInitialData;
     BOOL isFirstChunk;
+    IFDownloadHandler *downloadHandler;
 }
 - initWithDataSource: (IFWebDataSource *)ds;
 
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index d5ba7b6..bdfd8b2 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -5,6 +5,7 @@
 */
 
 #import <WebKit/IFDocument.h>
+#import <WebKit/IFDownloadHandler.h>
 #import <WebKit/IFHTMLRepresentation.h>
 #import <WebKit/IFLoadProgress.h>
 #import <WebKit/IFLocationChangeHandler.h>
@@ -30,7 +31,6 @@
 {
     if ((self = [super init])) {
         dataSource = [ds retain];
-        examinedInitialData = NO;
         processedBufferedData = NO;
         isFirstChunk = YES;
         return self;
@@ -42,7 +42,7 @@
 - (void)dealloc
 {
     WEBKIT_ASSERT(url == nil);
-    
+
     [dataSource release];
     [super dealloc];
 }
@@ -73,6 +73,10 @@
     [(IFWebController *)[dataSource controller] _didStopLoading:url];
     [url release];
     url = nil;
+    
+    [downloadHandler cancel];
+    [downloadHandler release];
+    downloadHandler = nil;
 }
 
 
@@ -82,7 +86,10 @@
     
     WEBKIT_ASSERT([url isEqual:[sender redirectedURL] ? [sender redirectedURL] : [sender url]]);
     
-    [dataSource _setResourceData:data];
+    // Don't retain download data
+    if([dataSource contentPolicy] != IFContentPolicySave &&
+       [dataSource contentPolicy] != IFContentPolicyOpenExternally)
+       [dataSource _setResourceData:data];
     
     // update progress
     IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
@@ -94,10 +101,13 @@
     [(IFWebController *)[dataSource controller] _didStopLoading:url];
     [url release];
     url = nil;
+    
+    [downloadHandler release];
+    downloadHandler = nil;
 }
 
 
-- (void)IFURLHandle:(IFURLHandle *)sender resourceDataDidBecomeAvailable:(NSData *)data
+- (void)IFURLHandle:(IFURLHandle *)sender resourceDataDidBecomeAvailable:(NSData *)incomingData
 {
     int contentLength = [sender contentLength];
     int contentLengthReceived = [sender contentLengthReceived];
@@ -106,41 +116,52 @@
     IFWebFrame *frame = [dataSource webFrame];
     IFWebView *view = [frame view];
     IFContentPolicy contentPolicy;
+    NSData *data;
     
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "url = %s, data = %p, length %d\n", DEBUG_OBJECT([sender url]), data, [data length]);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "url = %s, data = %p, length %d\n", DEBUG_OBJECT([sender url]), incomingData, [incomingData length]);
     
     WEBKIT_ASSERT([url isEqual:[sender redirectedURL] ? [sender redirectedURL] : [sender url]]);
     
     // Check the mime type and ask the client for the content policy.
-    if(!examinedInitialData){
+    if(isFirstChunk){
         WEBKITDEBUGLEVEL(WEBKIT_LOG_DOWNLOAD, "main content type: %s", DEBUG_OBJECT(contentType));
         [dataSource _setContentType:contentType];
         [dataSource _setEncoding:[sender characterSet]];
         [[dataSource _locationChangeHandler] requestContentPolicyForMIMEType:contentType];
-        examinedInitialData = YES;
     }
     
     contentPolicy = [dataSource contentPolicy];
-    if(contentPolicy == IFContentPolicyIgnore){
-        [sender cancelLoadInBackground];
-        return;
-    }
-    
+
     if(contentPolicy != IFContentPolicyNone){
         if(!processedBufferedData){
             // Process all data that has been received now that we have a content policy
             // and don't call resourceData if this is the first chunk since resourceData is a copy
             if(isFirstChunk){
-                [[dataSource representation] receivedData:data withDataSource:dataSource isComplete:isComplete];
+                data = incomingData;
             }else{
-                [[dataSource representation] receivedData:[sender resourceData] 
-                    withDataSource:dataSource isComplete:isComplete];
+                data = [sender resourceData];
             }
             processedBufferedData = YES;          
         }else{
-            [[dataSource representation] receivedData:data withDataSource:dataSource isComplete:isComplete];
+            data = incomingData;
         }
+    }
+    
+    if(contentPolicy == IFContentPolicyShow){
+        [[dataSource representation] receivedData:data withDataSource:dataSource isComplete:isComplete];
         [[view documentView] dataSourceUpdated:dataSource];
+        
+    }else if(contentPolicy == IFContentPolicySave || contentPolicy == IFContentPolicyOpenExternally){
+        if(!downloadHandler){
+            [frame->_private setProvisionalDataSource:nil];
+            [[dataSource _locationChangeHandler] locationChangeDone:nil];
+            downloadHandler = [[IFDownloadHandler alloc] initWithDataSource:dataSource];
+        }
+        [downloadHandler receivedData:data isComplete:isComplete];
+        
+    }else if(contentPolicy == IFContentPolicyIgnore){
+        [sender cancelLoadInBackground];
+        return;
     }
     
     WEBKITDEBUGLEVEL(WEBKIT_LOG_DOWNLOAD, "%d of %d", contentLengthReceived, contentLength);
@@ -178,6 +199,10 @@
     [(IFWebController *)[dataSource controller] _didStopLoading:url];
     [url release];
     url = nil;
+    
+    [downloadHandler cancel];
+    [downloadHandler release];
+    downloadHandler = nil;
 }
 
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list