[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
mjs
mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:14:37 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 6c245b9cb4d85656089d8bc2301d8367fcb9567e
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu May 23 13:13:45 2002 +0000
WebKit:
Move authentication panel to WebKit and make it a sheet, fixing:
Radar 2876445 - Authentication panel should be a sheet
Radar 2876449 - The Alexander authentication panel should be moved
to WebKit for use as a standard one
* Panels.subproj/English.lproj/IFAuthenticationPanel.nib: Added.
* Panels.subproj/IFAuthenticationPanel.h: Added.
* Panels.subproj/IFAuthenticationPanel.m: Added.
* Panels.subproj/IFPanelAuthenticationHandler.h: Added.
* Panels.subproj/IFPanelAuthenticationHandler.m: Added.
* Panels.subproj/IFStandardPanels.h: Added.
* Panels.subproj/IFStandardPanels.m: Added.
* Panels.subproj/IFStandardPanelsPrivate.h: Added.
* WebKit.pbproj/project.pbxproj: Add new files to build.
* Plugins.subproj/IFPluginStream.mm:
(-[IFPluginStream IFURLHandleResourceDidBeginLoading:]): Notify of
load start.
(-[IFPluginStream IFURLHandleResourceDidFinishLoading:data:]): Notify
of load end.
(-[IFPluginStream IFURLHandleResourceDidCancelLoading:]): Likewise.
(-[IFPluginStream IFURLHandle:resourceDidFailLoadingWithResult:]): Likewise.
(-[IFPluginStream IFURLHandle:didRedirectToURL:]): Notify that old
URL is no longer loading, but new one is.
* WebView.subproj/IFBaseWebControllerPrivate.h:
* WebView.subproj/IFBaseWebControllerPrivate.mm:
(-[IFBaseWebController _didStartLoading:]): New private method
used to track what URLs are loading on behalf of this controller.
(-[IFBaseWebController _didStopLoading:]): Likewise.
* WebView.subproj/IFMainURLHandleClient.mm:
(-[IFMainURLHandleClient IFURLHandleResourceDidBeginLoading:]): Notify
of load start.
(-[IFMainURLHandleClient IFURLHandleResourceDidCancelLoading:]): Notify
of load end.
(-[IFMainURLHandleClient IFURLHandleResourceDidFinishLoading:data:]): Likewise.
(-[IFMainURLHandleClient IFURLHandle:resourceDataDidBecomeAvailable:]): Likewise.
(-[IFMainURLHandleClient IFURLHandle:resourceDidFailLoadingWithResult:]): Likewise.
(-[IFMainURLHandleClient IFURLHandle:didRedirectToURL:]): Notify of
load end and start.
WebCore:
Notify when loads of sub-URLs start and stop, so panels for these
can be attached to the right windows.
* kwq/KWQKloader.mm:
(-[URLLoadClient IFURLHandleResourceDidBeginLoading:]):
(-[URLLoadClient IFURLHandleResourceDidCancelLoading:]):
(-[URLLoadClient IFURLHandleResourceDidFinishLoading:data:]):
(-[URLLoadClient IFURLHandle:resourceDidFailLoadingWithResult:]):
(-[URLLoadClient IFURLHandle:didRedirectToURL:]):
* kwq/external.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1204 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index eecee7d..7740962 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,16 @@
+2002-05-23 Maciej Stachowiak <mjs at apple.com>
+
+ Notify when loads of sub-URLs start and stop, so panels for these
+ can be attached to the right windows.
+
+ * kwq/KWQKloader.mm:
+ (-[URLLoadClient IFURLHandleResourceDidBeginLoading:]):
+ (-[URLLoadClient IFURLHandleResourceDidCancelLoading:]):
+ (-[URLLoadClient IFURLHandleResourceDidFinishLoading:data:]):
+ (-[URLLoadClient IFURLHandle:resourceDidFailLoadingWithResult:]):
+ (-[URLLoadClient IFURLHandle:didRedirectToURL:]):
+ * kwq/external.h:
+
2002-05-22 Richard J. Williamson <rjw at apple.com>
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index eecee7d..7740962 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,16 @@
+2002-05-23 Maciej Stachowiak <mjs at apple.com>
+
+ Notify when loads of sub-URLs start and stop, so panels for these
+ can be attached to the right windows.
+
+ * kwq/KWQKloader.mm:
+ (-[URLLoadClient IFURLHandleResourceDidBeginLoading:]):
+ (-[URLLoadClient IFURLHandleResourceDidCancelLoading:]):
+ (-[URLLoadClient IFURLHandleResourceDidFinishLoading:data:]):
+ (-[URLLoadClient IFURLHandle:resourceDidFailLoadingWithResult:]):
+ (-[URLLoadClient IFURLHandle:didRedirectToURL:]):
+ * kwq/external.h:
+
2002-05-22 Richard J. Williamson <rjw at apple.com>
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index eecee7d..7740962 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,16 @@
+2002-05-23 Maciej Stachowiak <mjs at apple.com>
+
+ Notify when loads of sub-URLs start and stop, so panels for these
+ can be attached to the right windows.
+
+ * kwq/KWQKloader.mm:
+ (-[URLLoadClient IFURLHandleResourceDidBeginLoading:]):
+ (-[URLLoadClient IFURLHandleResourceDidCancelLoading:]):
+ (-[URLLoadClient IFURLHandleResourceDidFinishLoading:data:]):
+ (-[URLLoadClient IFURLHandle:resourceDidFailLoadingWithResult:]):
+ (-[URLLoadClient IFURLHandle:didRedirectToURL:]):
+ * kwq/external.h:
+
2002-05-22 Richard J. Williamson <rjw at apple.com>
diff --git a/WebCore/kwq/KWQKloader.mm b/WebCore/kwq/KWQKloader.mm
index c14c2b5..5c2f039 100644
--- a/WebCore/kwq/KWQKloader.mm
+++ b/WebCore/kwq/KWQKloader.mm
@@ -1041,6 +1041,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
controller = [m_dataSource controller];
[controller _receivedProgress: (IFLoadProgress *)loadProgress forResource: QSTRING_TO_NSSTRING(urlString) fromDataSource: m_dataSource];
+ [controller _didStartLoading:job->url().getNSURL()];
}
- (void)IFURLHandleResourceDidCancelLoading:(IFURLHandle *)sender
@@ -1067,6 +1068,8 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
controller = [m_dataSource controller];
[controller _receivedProgress: (IFLoadProgress *)loadProgress forResource: QSTRING_TO_NSSTRING(urlString) fromDataSource: m_dataSource];
+ [controller _didStopLoading:job->url().getNSURL()];
+
delete job;
}
@@ -1093,6 +1096,8 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
controller = [m_dataSource controller];
[controller _receivedProgress: (IFLoadProgress *)loadProgress forResource: QSTRING_TO_NSSTRING(urlString) fromDataSource: m_dataSource];
+ [controller _didStopLoading:job->url().getNSURL()];
+
delete job;
}
@@ -1130,10 +1135,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
- (void)IFURLHandle:(IFURLHandle *)sender resourceDidFailLoadingWithResult:(IFError *)result
{
- void *userData;
-
- userData = [[sender attributeForKey:IFURLHandleUserData] pointerValue];
-
+ void *userData = [[sender attributeForKey:IFURLHandleUserData] pointerValue];
KIO::TransferJob *job = static_cast<KIO::TransferJob *>(userData);
KWQDEBUGLEVEL (KWQ_LOG_LOADING, "dataSource = %p, result = %s, URL = %s\n", m_dataSource, [[result errorDescription] lossyCString], job->url().url().latin1());
@@ -1150,17 +1152,25 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
[(IFBaseWebController *)controller _receivedError: result forResource: QSTRING_TO_NSSTRING(job->url().url()) partialProgress: loadProgress fromDataSource: m_dataSource];
+ [(IFBaseWebController *)controller _didStopLoading:job->url().getNSURL()];
+
delete job;
}
- (void)IFURLHandle:(IFURLHandle *)sender didRedirectToURL:(NSURL *)url
{
+ void *userData = [[sender attributeForKey:IFURLHandleUserData] pointerValue];
+ KIO::TransferJob *job = static_cast<KIO::TransferJob *>(userData);
+ NSURL *oldURL = job->url().getNSURL();
+
KWQDEBUGLEVEL (KWQ_LOG_LOADING, "url = %s\n", [[url absoluteString] cString]);
[m_dataSource _part]->setBaseURL([[url absoluteString] cString]);
[m_dataSource _setFinalURL: url];
[(id <IFLocationChangeHandler>)[m_dataSource controller] serverRedirectTo: url forDataSource: m_dataSource];
+ [(IFBaseWebController *)[m_dataSource controller] _didStopLoading:oldURL];
+ [(IFBaseWebController *)[m_dataSource controller] _didStartLoading:url];
}
@end
diff --git a/WebCore/kwq/KWQLoader.mm b/WebCore/kwq/KWQLoader.mm
index c14c2b5..5c2f039 100644
--- a/WebCore/kwq/KWQLoader.mm
+++ b/WebCore/kwq/KWQLoader.mm
@@ -1041,6 +1041,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
controller = [m_dataSource controller];
[controller _receivedProgress: (IFLoadProgress *)loadProgress forResource: QSTRING_TO_NSSTRING(urlString) fromDataSource: m_dataSource];
+ [controller _didStartLoading:job->url().getNSURL()];
}
- (void)IFURLHandleResourceDidCancelLoading:(IFURLHandle *)sender
@@ -1067,6 +1068,8 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
controller = [m_dataSource controller];
[controller _receivedProgress: (IFLoadProgress *)loadProgress forResource: QSTRING_TO_NSSTRING(urlString) fromDataSource: m_dataSource];
+ [controller _didStopLoading:job->url().getNSURL()];
+
delete job;
}
@@ -1093,6 +1096,8 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
controller = [m_dataSource controller];
[controller _receivedProgress: (IFLoadProgress *)loadProgress forResource: QSTRING_TO_NSSTRING(urlString) fromDataSource: m_dataSource];
+ [controller _didStopLoading:job->url().getNSURL()];
+
delete job;
}
@@ -1130,10 +1135,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
- (void)IFURLHandle:(IFURLHandle *)sender resourceDidFailLoadingWithResult:(IFError *)result
{
- void *userData;
-
- userData = [[sender attributeForKey:IFURLHandleUserData] pointerValue];
-
+ void *userData = [[sender attributeForKey:IFURLHandleUserData] pointerValue];
KIO::TransferJob *job = static_cast<KIO::TransferJob *>(userData);
KWQDEBUGLEVEL (KWQ_LOG_LOADING, "dataSource = %p, result = %s, URL = %s\n", m_dataSource, [[result errorDescription] lossyCString], job->url().url().latin1());
@@ -1150,17 +1152,25 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
[(IFBaseWebController *)controller _receivedError: result forResource: QSTRING_TO_NSSTRING(job->url().url()) partialProgress: loadProgress fromDataSource: m_dataSource];
+ [(IFBaseWebController *)controller _didStopLoading:job->url().getNSURL()];
+
delete job;
}
- (void)IFURLHandle:(IFURLHandle *)sender didRedirectToURL:(NSURL *)url
{
+ void *userData = [[sender attributeForKey:IFURLHandleUserData] pointerValue];
+ KIO::TransferJob *job = static_cast<KIO::TransferJob *>(userData);
+ NSURL *oldURL = job->url().getNSURL();
+
KWQDEBUGLEVEL (KWQ_LOG_LOADING, "url = %s\n", [[url absoluteString] cString]);
[m_dataSource _part]->setBaseURL([[url absoluteString] cString]);
[m_dataSource _setFinalURL: url];
[(id <IFLocationChangeHandler>)[m_dataSource controller] serverRedirectTo: url forDataSource: m_dataSource];
+ [(IFBaseWebController *)[m_dataSource controller] _didStopLoading:oldURL];
+ [(IFBaseWebController *)[m_dataSource controller] _didStartLoading:url];
}
@end
diff --git a/WebCore/kwq/KWQLoaderImpl.mm b/WebCore/kwq/KWQLoaderImpl.mm
index c14c2b5..5c2f039 100644
--- a/WebCore/kwq/KWQLoaderImpl.mm
+++ b/WebCore/kwq/KWQLoaderImpl.mm
@@ -1041,6 +1041,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
controller = [m_dataSource controller];
[controller _receivedProgress: (IFLoadProgress *)loadProgress forResource: QSTRING_TO_NSSTRING(urlString) fromDataSource: m_dataSource];
+ [controller _didStartLoading:job->url().getNSURL()];
}
- (void)IFURLHandleResourceDidCancelLoading:(IFURLHandle *)sender
@@ -1067,6 +1068,8 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
controller = [m_dataSource controller];
[controller _receivedProgress: (IFLoadProgress *)loadProgress forResource: QSTRING_TO_NSSTRING(urlString) fromDataSource: m_dataSource];
+ [controller _didStopLoading:job->url().getNSURL()];
+
delete job;
}
@@ -1093,6 +1096,8 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
controller = [m_dataSource controller];
[controller _receivedProgress: (IFLoadProgress *)loadProgress forResource: QSTRING_TO_NSSTRING(urlString) fromDataSource: m_dataSource];
+ [controller _didStopLoading:job->url().getNSURL()];
+
delete job;
}
@@ -1130,10 +1135,7 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
- (void)IFURLHandle:(IFURLHandle *)sender resourceDidFailLoadingWithResult:(IFError *)result
{
- void *userData;
-
- userData = [[sender attributeForKey:IFURLHandleUserData] pointerValue];
-
+ void *userData = [[sender attributeForKey:IFURLHandleUserData] pointerValue];
KIO::TransferJob *job = static_cast<KIO::TransferJob *>(userData);
KWQDEBUGLEVEL (KWQ_LOG_LOADING, "dataSource = %p, result = %s, URL = %s\n", m_dataSource, [[result errorDescription] lossyCString], job->url().url().latin1());
@@ -1150,17 +1152,25 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
[(IFBaseWebController *)controller _receivedError: result forResource: QSTRING_TO_NSSTRING(job->url().url()) partialProgress: loadProgress fromDataSource: m_dataSource];
+ [(IFBaseWebController *)controller _didStopLoading:job->url().getNSURL()];
+
delete job;
}
- (void)IFURLHandle:(IFURLHandle *)sender didRedirectToURL:(NSURL *)url
{
+ void *userData = [[sender attributeForKey:IFURLHandleUserData] pointerValue];
+ KIO::TransferJob *job = static_cast<KIO::TransferJob *>(userData);
+ NSURL *oldURL = job->url().getNSURL();
+
KWQDEBUGLEVEL (KWQ_LOG_LOADING, "url = %s\n", [[url absoluteString] cString]);
[m_dataSource _part]->setBaseURL([[url absoluteString] cString]);
[m_dataSource _setFinalURL: url];
[(id <IFLocationChangeHandler>)[m_dataSource controller] serverRedirectTo: url forDataSource: m_dataSource];
+ [(IFBaseWebController *)[m_dataSource controller] _didStopLoading:oldURL];
+ [(IFBaseWebController *)[m_dataSource controller] _didStartLoading:url];
}
@end
diff --git a/WebCore/kwq/external.h b/WebCore/kwq/external.h
index 03e5b6e..dd3350e 100644
--- a/WebCore/kwq/external.h
+++ b/WebCore/kwq/external.h
@@ -46,6 +46,8 @@
- (void)_receivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
- (void)_mainReceivedProgress: (IFLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (IFWebDataSource *)dataSource;
- (void)_mainReceivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
+- (void)_didStartLoading: (NSURL *)url;
+- (void)_didStopLoading: (NSURL *)url;
@end
@protocol IFLocationChangeHandler
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 5bc71b0..fd96455 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,46 @@
+2002-05-23 Maciej Stachowiak <mjs at apple.com>
+
+ Move authentication panel to WebKit and make it a sheet, fixing:
+
+ Radar 2876445 - Authentication panel should be a sheet
+ Radar 2876449 - The Alexander authentication panel should be moved
+ to WebKit for use as a standard one
+
+ * Panels.subproj/English.lproj/IFAuthenticationPanel.nib: Added.
+ * Panels.subproj/IFAuthenticationPanel.h: Added.
+ * Panels.subproj/IFAuthenticationPanel.m: Added.
+ * Panels.subproj/IFPanelAuthenticationHandler.h: Added.
+ * Panels.subproj/IFPanelAuthenticationHandler.m: Added.
+ * Panels.subproj/IFStandardPanels.h: Added.
+ * Panels.subproj/IFStandardPanels.m: Added.
+ * Panels.subproj/IFStandardPanelsPrivate.h: Added.
+ * WebKit.pbproj/project.pbxproj: Add new files to build.
+ * Plugins.subproj/IFPluginStream.mm:
+ (-[IFPluginStream IFURLHandleResourceDidBeginLoading:]): Notify of
+ load start.
+ (-[IFPluginStream IFURLHandleResourceDidFinishLoading:data:]): Notify
+ of load end.
+ (-[IFPluginStream IFURLHandleResourceDidCancelLoading:]): Likewise.
+ (-[IFPluginStream IFURLHandle:resourceDidFailLoadingWithResult:]): Likewise.
+ (-[IFPluginStream IFURLHandle:didRedirectToURL:]): Notify that old
+ URL is no longer loading, but new one is.
+ * WebView.subproj/IFBaseWebControllerPrivate.h:
+ * WebView.subproj/IFBaseWebControllerPrivate.mm:
+ (-[IFBaseWebController _didStartLoading:]): New private method
+ used to track what URLs are loading on behalf of this controller.
+ (-[IFBaseWebController _didStopLoading:]): Likewise.
+
+ * WebView.subproj/IFMainURLHandleClient.mm:
+ (-[IFMainURLHandleClient IFURLHandleResourceDidBeginLoading:]): Notify
+ of load start.
+ (-[IFMainURLHandleClient IFURLHandleResourceDidCancelLoading:]): Notify
+ of load end.
+ (-[IFMainURLHandleClient IFURLHandleResourceDidFinishLoading:data:]): Likewise.
+ (-[IFMainURLHandleClient IFURLHandle:resourceDataDidBecomeAvailable:]): Likewise.
+ (-[IFMainURLHandleClient IFURLHandle:resourceDidFailLoadingWithResult:]): Likewise.
+ (-[IFMainURLHandleClient IFURLHandle:didRedirectToURL:]): Notify of
+ load end and start.
+
2002-05-22 Chris Blumenberg <cblu at apple.com>
Fixed download data source leaks when downloads are cancelled.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 5bc71b0..fd96455 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,46 @@
+2002-05-23 Maciej Stachowiak <mjs at apple.com>
+
+ Move authentication panel to WebKit and make it a sheet, fixing:
+
+ Radar 2876445 - Authentication panel should be a sheet
+ Radar 2876449 - The Alexander authentication panel should be moved
+ to WebKit for use as a standard one
+
+ * Panels.subproj/English.lproj/IFAuthenticationPanel.nib: Added.
+ * Panels.subproj/IFAuthenticationPanel.h: Added.
+ * Panels.subproj/IFAuthenticationPanel.m: Added.
+ * Panels.subproj/IFPanelAuthenticationHandler.h: Added.
+ * Panels.subproj/IFPanelAuthenticationHandler.m: Added.
+ * Panels.subproj/IFStandardPanels.h: Added.
+ * Panels.subproj/IFStandardPanels.m: Added.
+ * Panels.subproj/IFStandardPanelsPrivate.h: Added.
+ * WebKit.pbproj/project.pbxproj: Add new files to build.
+ * Plugins.subproj/IFPluginStream.mm:
+ (-[IFPluginStream IFURLHandleResourceDidBeginLoading:]): Notify of
+ load start.
+ (-[IFPluginStream IFURLHandleResourceDidFinishLoading:data:]): Notify
+ of load end.
+ (-[IFPluginStream IFURLHandleResourceDidCancelLoading:]): Likewise.
+ (-[IFPluginStream IFURLHandle:resourceDidFailLoadingWithResult:]): Likewise.
+ (-[IFPluginStream IFURLHandle:didRedirectToURL:]): Notify that old
+ URL is no longer loading, but new one is.
+ * WebView.subproj/IFBaseWebControllerPrivate.h:
+ * WebView.subproj/IFBaseWebControllerPrivate.mm:
+ (-[IFBaseWebController _didStartLoading:]): New private method
+ used to track what URLs are loading on behalf of this controller.
+ (-[IFBaseWebController _didStopLoading:]): Likewise.
+
+ * WebView.subproj/IFMainURLHandleClient.mm:
+ (-[IFMainURLHandleClient IFURLHandleResourceDidBeginLoading:]): Notify
+ of load start.
+ (-[IFMainURLHandleClient IFURLHandleResourceDidCancelLoading:]): Notify
+ of load end.
+ (-[IFMainURLHandleClient IFURLHandleResourceDidFinishLoading:data:]): Likewise.
+ (-[IFMainURLHandleClient IFURLHandle:resourceDataDidBecomeAvailable:]): Likewise.
+ (-[IFMainURLHandleClient IFURLHandle:resourceDidFailLoadingWithResult:]): Likewise.
+ (-[IFMainURLHandleClient IFURLHandle:didRedirectToURL:]): Notify of
+ load end and start.
+
2002-05-22 Chris Blumenberg <cblu at apple.com>
Fixed download data source leaks when downloads are cancelled.
diff --git a/WebKit/Panels.subproj/English.lproj/IFAuthenticationPanel.nib/classes.nib b/WebKit/Panels.subproj/English.lproj/IFAuthenticationPanel.nib/classes.nib
new file mode 100644
index 0000000..cc06ca2
--- /dev/null
+++ b/WebKit/Panels.subproj/English.lproj/IFAuthenticationPanel.nib/classes.nib
@@ -0,0 +1,20 @@
+{
+ IBClasses = (
+ {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
+ {
+ ACTIONS = {cancel = id; logIn = id; };
+ CLASS = IFAuthenticationPanel;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ imageView = id;
+ mainLabel = id;
+ panel = id;
+ password = id;
+ smallLabel = id;
+ username = id;
+ };
+ SUPERCLASS = NSObject;
+ }
+ );
+ IBVersion = 1;
+}
\ No newline at end of file
diff --git a/WebKit/Panels.subproj/English.lproj/IFAuthenticationPanel.nib/info.nib b/WebKit/Panels.subproj/English.lproj/IFAuthenticationPanel.nib/info.nib
new file mode 100644
index 0000000..5b2bbe0
--- /dev/null
+++ b/WebKit/Panels.subproj/English.lproj/IFAuthenticationPanel.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IBDocumentLocation</key>
+ <string>194 447 356 240 0 0 1024 746 </string>
+ <key>IBFramework Version</key>
+ <string>273.0</string>
+ <key>IBOpenObjects</key>
+ <array>
+ <integer>5</integer>
+ </array>
+ <key>IBSystem Version</key>
+ <string>6C31</string>
+</dict>
+</plist>
diff --git a/WebKit/Panels.subproj/English.lproj/IFAuthenticationPanel.nib/objects.nib b/WebKit/Panels.subproj/English.lproj/IFAuthenticationPanel.nib/objects.nib
new file mode 100644
index 0000000..4c05ed0
Binary files /dev/null and b/WebKit/Panels.subproj/English.lproj/IFAuthenticationPanel.nib/objects.nib differ
diff --git a/WebKit/Panels.subproj/IFAuthenticationPanel.h b/WebKit/Panels.subproj/IFAuthenticationPanel.h
new file mode 100644
index 0000000..5487683
--- /dev/null
+++ b/WebKit/Panels.subproj/IFAuthenticationPanel.h
@@ -0,0 +1,39 @@
+/*
+ IFAuthenticationPanel.h
+
+ Copyright 2002 Apple, Inc. All rights reserved.
+*/
+
+#import <Cocoa/Cocoa.h>
+#import <WebFoundation/IFAuthenticationManager.h>
+
+ at interface IFAuthenticationPanel : NSObject
+{
+ IBOutlet id mainLabel;
+ IBOutlet id panel;
+ IBOutlet id password;
+ IBOutlet id smallLabel;
+ IBOutlet id username;
+ IBOutlet id imageView;
+ BOOL nibLoaded;
+ BOOL usingSheet;
+ id callback;
+ SEL selector;
+ IFAuthenticationRequest *request;
+}
+
+-(id)initWithCallback:(id)cb selector:(SEL)sel;
+
+// Interface-related methods
+- (IBAction)cancel:(id)sender;
+- (IBAction)logIn:(id)sender;
+
+- (BOOL)loadNib;
+
+- (void)runAsModalDialogWithRequest:(IFAuthenticationRequest *)req;
+- (void)runAsSheetOnWindow:(NSWindow *)window withRequest:(IFAuthenticationRequest *)req;
+
+- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo;
+
+
+ at end
diff --git a/WebKit/Panels.subproj/IFAuthenticationPanel.m b/WebKit/Panels.subproj/IFAuthenticationPanel.m
new file mode 100644
index 0000000..3a7cf57
--- /dev/null
+++ b/WebKit/Panels.subproj/IFAuthenticationPanel.m
@@ -0,0 +1,135 @@
+/*
+ IFAuthenticationPanel.m
+
+ Copyright 2002 Apple, Inc. All rights reserved.
+*/
+
+
+#import <WebKit/IFAuthenticationPanel.h>
+#import <WebKit/IFStandardPanelsPrivate.h>
+
+
+#define IFAuthenticationPanelNibName @"IFAuthenticationPanel"
+
+ at implementation IFAuthenticationPanel
+
+-(id)initWithCallback:(id)cb selector:(SEL)sel
+{
+ self = [self init];
+ if (self != nil) {
+ callback = [cb retain];
+ selector = sel;
+ }
+ return self;
+}
+
+
+- (void)dealloc
+{
+ [panel release];
+
+ [callback release];
+
+ [super dealloc];
+}
+
+// IB actions
+
+- (IBAction)cancel:(id)sender
+{
+ [panel close];
+ if (usingSheet) {
+ [[NSApplication sharedApplication] endSheet:panel returnCode:1];
+ } else {
+ [[NSApplication sharedApplication] stopModalWithCode:1];
+ }
+}
+
+- (IBAction)logIn:(id)sender
+{
+ [panel close];
+ if (usingSheet) {
+ [[NSApplication sharedApplication] endSheet:panel returnCode:0];
+ } else {
+ [[NSApplication sharedApplication] stopModalWithCode:0];
+ }
+}
+
+- (BOOL)loadNib
+{
+ if (!nibLoaded) {
+ if ([NSBundle loadNibNamed:IFAuthenticationPanelNibName owner:self]) {
+ nibLoaded = YES;
+ [imageView setImage:[NSImage imageNamed:@"NSApplicationIcon"]];
+ } else {
+ NSLog(@"%s:%d %s: couldn't load nib named '%@'",
+ __FILE__, __LINE__, __FUNCTION__,IFAuthenticationPanelNibName);
+ return FALSE;
+ }
+ }
+ return TRUE;
+}
+
+// Methods related to displaying the panel
+
+
+-(void)setUpForRequest:(IFAuthenticationRequest *)req
+{
+ [self loadNib];
+
+ // FIXME Radar 2876448: we should display a different dialog depending on the
+ // failure count (if the user tried and failed, the dialog should
+ // explain possible reasons)
+ // FIXME Radar 2876446: need to automatically adjust height of main label
+ [mainLabel setStringValue:[NSString stringWithFormat:@"To view this page, you need to log in to area \"%@\" on %@.", [req realm], [[req url] host]]];
+ if ([req willPasswordBeSentInClear]) {
+ [smallLabel setStringValue:@"Your password will be sent in the clear."];
+ } else {
+ [smallLabel setStringValue:@"Your log-in information will be sent securely."];
+ }
+
+ if ([req username] != nil) {
+ [username setStringValue:[req username]];
+ [panel setInitialFirstResponder:password];
+ } else {
+ [username setStringValue:@""];
+ [password setStringValue:@""];
+ [panel setInitialFirstResponder:username];
+ }
+}
+
+- (void)runAsModalDialogWithRequest:(IFAuthenticationRequest *)req
+{
+ [self setUpForRequest:req];
+ usingSheet = FALSE;
+ IFAuthenticationResult *result = nil;
+
+ if ([[NSApplication sharedApplication] runModalForWindow:panel] == 0) {
+ result = [IFAuthenticationResult authenticationResultWithUsername:[username stringValue] password:[password stringValue]];
+ }
+
+ [callback performSelector:selector withObject:req withObject:result];
+}
+
+- (void)runAsSheetOnWindow:(NSWindow *)window withRequest:(IFAuthenticationRequest *)req
+{
+ [self setUpForRequest:req];
+
+ usingSheet = TRUE;
+ request = [req retain];
+
+ [[NSApplication sharedApplication] beginSheet:panel modalForWindow:window modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:NULL];
+}
+
+- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo
+{
+ IFAuthenticationResult *result = nil;
+ if (returnCode == 0) {
+ result = [IFAuthenticationResult authenticationResultWithUsername:[username stringValue] password:[password stringValue]];
+ }
+
+ [callback performSelector:selector withObject:request withObject:result];
+ [request release];
+}
+
+ at end
diff --git a/WebKit/Panels.subproj/IFPanelAuthenticationHandler.h b/WebKit/Panels.subproj/IFPanelAuthenticationHandler.h
new file mode 100644
index 0000000..09755ba
--- /dev/null
+++ b/WebKit/Panels.subproj/IFPanelAuthenticationHandler.h
@@ -0,0 +1,23 @@
+/*
+ IFPanelAuthenticationHandler.h
+
+ Copyright 2002 Apple, Inc. All rights reserved.
+ */
+
+#import <Foundation/Foundation.h>
+#import <WebFoundation/IFAuthenticationManager.h>
+
+
+ at interface IFPanelAuthenticationHandler : NSObject <IFAuthenticationHandler>
+{
+ NSMutableDictionary *windowToPanel;
+ NSMutableDictionary *requestToWindow;
+}
+
+// IFAuthenticationHandler methods
+-(BOOL)readyToStartAuthentication:(IFAuthenticationRequest *)request;
+-(void)startAuthentication:(IFAuthenticationRequest *)request;
+-(void)cancelAuthentication:(IFAuthenticationRequest *)request;
+
+
+ at end
diff --git a/WebKit/Panels.subproj/IFPanelAuthenticationHandler.m b/WebKit/Panels.subproj/IFPanelAuthenticationHandler.m
new file mode 100644
index 0000000..6842d30
--- /dev/null
+++ b/WebKit/Panels.subproj/IFPanelAuthenticationHandler.m
@@ -0,0 +1,91 @@
+/*
+ IFPanelAuthenticationHandler.m
+
+ Copyright 2002 Apple, Inc. All rights reserved.
+ */
+
+
+#import <WebKit/IFPanelAuthenticationHandler.h>
+#import <WebKit/IFAuthenticationPanel.h>
+#import <WebKit/IFStandardPanels.h>
+#import <WebFoundation/IFNSDictionaryExtensions.h>
+
+static NSString *IFModalDialogPretendWindow = @"IFModalDialogPretendWindow";
+
+ at implementation IFPanelAuthenticationHandler
+
+-(id)init
+{
+ self = [super init];
+ if (self != nil) {
+ windowToPanel = [[NSMutableDictionary alloc] init];
+ requestToWindow = [[NSMutableDictionary alloc] init];
+ }
+ return self;
+}
+
+-(void)dealloc
+{
+ [windowToPanel release];
+ [requestToWindow release];
+ [super dealloc];
+}
+
+// IFAuthenticationHandler methods
+-(BOOL)readyToStartAuthentication:(IFAuthenticationRequest *)request
+{
+ id window = [[IFStandardPanels sharedStandardPanels] frontmostWindowLoadingURL:[request url]];
+
+ if (window == nil) {
+ window = IFModalDialogPretendWindow;
+ }
+
+ return [windowToPanel objectForKey:window] == nil;
+}
+
+-(void)startAuthentication:(IFAuthenticationRequest *)request
+{
+ id window = [[IFStandardPanels sharedStandardPanels] frontmostWindowLoadingURL:[request url]];
+
+ if (window == nil) {
+ window = IFModalDialogPretendWindow;
+ }
+
+ if ([windowToPanel objectForKey:window] != nil) {
+ [request authenticationDone:nil];
+ return;
+ }
+
+ IFAuthenticationPanel *panel = [[IFAuthenticationPanel alloc] initWithCallback:self selector:@selector(_authenticationDoneWithRequest:result:)];
+ [requestToWindow _IF_setObject:window forUncopiedKey:request];
+ [windowToPanel _IF_setObject:panel forUncopiedKey:window];
+ [panel release];
+
+ if (window == IFModalDialogPretendWindow) {
+ [panel runAsModalDialogWithRequest:request];
+ } else {
+ [panel runAsSheetOnWindow:window withRequest:request];
+ }
+}
+
+-(void)cancelAuthentication:(IFAuthenticationRequest *)request
+{
+ id window = [requestToWindow objectForKey:request];
+ if (window != nil) {
+ IFAuthenticationPanel *panel = [windowToPanel objectForKey:window];
+ [panel cancel:self];
+ }
+}
+
+-(void)_authenticationDoneWithRequest:(IFAuthenticationRequest *)request result:(IFAuthenticationResult *)result
+{
+ id window = [requestToWindow objectForKey:request];
+ if (window != nil) {
+ [windowToPanel removeObjectForKey:window];
+ [requestToWindow removeObjectForKey:request];
+ }
+
+ [request authenticationDone:result];
+}
+
+ at end
diff --git a/WebKit/Panels.subproj/IFStandardPanels.h b/WebKit/Panels.subproj/IFStandardPanels.h
new file mode 100644
index 0000000..8f25f34
--- /dev/null
+++ b/WebKit/Panels.subproj/IFStandardPanels.h
@@ -0,0 +1,29 @@
+/*
+ IFStandardPanels.h
+
+ Copyright 2002 Apple, Inc. All rights reserved.
+*/
+
+#import <Cocoa/Cocoa.h>
+
+ at class IFStandardPanelsPrivate;
+
+ at interface IFStandardPanels : NSObject
+{
+ at private
+ IFStandardPanelsPrivate *_privatePanels;
+}
+
++(IFStandardPanels *)sharedStandardPanels;
+
+-(void)setUseStandardAuthenticationPanel:(BOOL)use;
+-(BOOL)useStandardAuthenticationPanel;
+-(void)setUseStandardCookieAcceptPanel:(BOOL)use;
+-(BOOL)useStandardCookieAcceptPanel;
+
+-(void)didStartLoadingURL:(NSURL *)url inWindow:(NSWindow *)window;
+-(void)didStopLoadingURL:(NSURL *)url inWindow:(NSWindow *)window;
+
+-(NSWindow *)frontmostWindowLoadingURL:(NSURL *)url;
+
+ at end
diff --git a/WebKit/Panels.subproj/IFStandardPanels.m b/WebKit/Panels.subproj/IFStandardPanels.m
new file mode 100644
index 0000000..62d06f0
--- /dev/null
+++ b/WebKit/Panels.subproj/IFStandardPanels.m
@@ -0,0 +1,218 @@
+/*
+ IFStandardPanels.h
+
+ Copyright 2002 Apple, Inc. All rights reserved.
+*/
+
+#import <WebKit/IFStandardPanels.h>
+#import <WebKit/IFStandardPanelsPrivate.h>
+#import <WebKit/IFPanelAuthenticationHandler.h>
+#import <WebKit/IFWebFrame.h>
+#import <WebFoundation/IFAuthenticationManager.h>
+#import <WebFoundation/IFCookieManager.h>
+
+#import <Carbon/Carbon.h>
+
+ at interface IFStandardPanelsPrivate : NSObject
+{
+ at public
+ IFPanelAuthenticationHandler *panelAuthenticationHandler;
+ NSMutableDictionary *urlContainers;
+}
+ at end
+
+ at interface IFStandardPanels (Internal)
+-(id)_init;
+ at end
+
+ at implementation IFStandardPanelsPrivate
+-(id)init
+{
+ self = [super init];
+ if (self != nil) {
+ urlContainers = [[NSMutableDictionary alloc] init];
+ }
+ return self;
+}
+
+-(void)dealloc
+{
+ [urlContainers release];
+ [panelAuthenticationHandler release];
+ [super dealloc];
+}
+ at end
+
+ at implementation IFStandardPanels (Internal)
+// Private init method to implement the singleton pattern
+-(id)_init
+{
+ self = [super init];
+ if (self != nil) {
+ _privatePanels = [[IFStandardPanelsPrivate alloc] init];
+ }
+ return self;
+}
+ at end
+
+
+ at implementation IFStandardPanels
+-(id)init
+{
+ // FIXME: should assert instead (or return a reference to the
+ // shared instance)
+ [self release];
+ return nil;
+}
+
+-(void)dealloc
+{
+ [_privatePanels release];
+ [super dealloc];
+}
+
+// The next line is a workaround for Radar 2905545. Once that's fixed, it can use PTHREAD_ONCE_INIT.
+pthread_once_t sharedStandardPanelsOnce = {_PTHREAD_ONCE_SIG_init, {}};
+IFStandardPanels *sharedStandardPanels = NULL;
+
+static void initSharedStandardPanels(void)
+{
+ sharedStandardPanels = [[IFStandardPanels alloc] _init];
+}
+
++(IFStandardPanels *)sharedStandardPanels
+{
+ pthread_once(&sharedStandardPanelsOnce, initSharedStandardPanels);
+ return sharedStandardPanels;
+}
+
+-(void)setUseStandardAuthenticationPanel:(BOOL)use
+{
+ if (use) {
+ if (![self useStandardAuthenticationPanel]) {
+ _privatePanels->panelAuthenticationHandler = [[IFPanelAuthenticationHandler alloc] init];
+ [[IFAuthenticationManager sharedAuthenticationManager] addAuthenticationHandler:_privatePanels->panelAuthenticationHandler];
+ }
+ } else {
+ if ([self useStandardAuthenticationPanel]) {
+ [[IFAuthenticationManager sharedAuthenticationManager] removeAuthenticationHandler:_privatePanels->panelAuthenticationHandler];
+ [_privatePanels->panelAuthenticationHandler release];
+ _privatePanels->panelAuthenticationHandler = nil;
+ }
+ }
+}
+
+-(BOOL)useStandardAuthenticationPanel
+{
+ return _privatePanels->panelAuthenticationHandler != nil;
+}
+
+-(void)setUseStandardCookieAcceptPanel:(BOOL)use
+{
+}
+
+-(BOOL)useStandardCookieAcceptPanel
+{
+ return FALSE;
+}
+
+-(void)didStartLoadingURL:(NSURL *)url inWindow:(NSWindow *)window
+{
+ NSCountedSet *set = [_privatePanels->urlContainers objectForKey:url];
+
+ if (set == nil) {
+ set = [NSCountedSet set];
+ [_privatePanels->urlContainers setObject:set forKey:url];
+ }
+
+ [set addObject:window];
+}
+
+-(void)didStopLoadingURL:(NSURL *)url inWindow:(NSWindow *)window
+{
+ NSCountedSet *set = [_privatePanels->urlContainers objectForKey:url];
+
+ if (set == nil) {
+ return;
+ }
+
+ [set removeObject:window];
+
+ if ([set count] == 0) {
+ [_privatePanels->urlContainers objectForKey:url];
+ }
+}
+
+-(void)_didStartLoadingURL:(NSURL *)url inController:(id<IFWebController>)controller
+{
+ NSCountedSet *set = [_privatePanels->urlContainers objectForKey:url];
+
+ if (set == nil) {
+ set = [NSCountedSet set];
+ [_privatePanels->urlContainers setObject:set forKey:url];
+ }
+
+ [set addObject:controller];
+}
+
+-(void)_didStopLoadingURL:(NSURL *)url inController:(id<IFWebController>)controller
+{
+ NSCountedSet *set = [_privatePanels->urlContainers objectForKey:url];
+
+ if (set == nil) {
+ return;
+ }
+
+ [set removeObject:controller];
+
+ if ([set count] == 0) {
+ [_privatePanels->urlContainers objectForKey:url];
+ }
+}
+
+static BOOL WindowInFront(NSWindow *a, NSWindow *b)
+{
+ UInt32 aIndex;
+ UInt32 bIndex;
+
+ GetWindowIndex([a windowRef], NULL, kWindowGroupContentsReturnWindows, &aIndex);
+ GetWindowIndex([b windowRef], NULL, kWindowGroupContentsReturnWindows, &bIndex);
+
+ return aIndex < bIndex;
+ // void NSWindowList(int size, int list[])
+ // void NSCountWindowsForContext(int context, int *count)
+ // void NSWindowListForContext(int context, int size, int list[])
+}
+
+-(NSWindow *)frontmostWindowLoadingURL:(NSURL *)url
+{
+ NSCountedSet *set = [_privatePanels->urlContainers objectForKey:url];
+
+ if (set == nil) {
+ return nil;
+ }
+
+ NSEnumerator *enumerator = [set objectEnumerator];
+ NSWindow *frontmostWindow = nil;
+ id object;
+
+ while ((object = [enumerator nextObject]) != nil) {
+ NSWindow *window;
+ if ([object isKindOfClass:[NSWindow class]]) {
+ window = object;
+ } else {
+ window = [[[object mainFrame] view] window];
+ }
+
+ if (window != nil && (frontmostWindow == nil || WindowInFront(window, frontmostWindow))) {
+ frontmostWindow = window;
+ }
+ }
+
+ return frontmostWindow;
+}
+
+ at end
+
+
+
diff --git a/WebKit/Panels.subproj/IFStandardPanelsPrivate.h b/WebKit/Panels.subproj/IFStandardPanelsPrivate.h
new file mode 100644
index 0000000..9812dec
--- /dev/null
+++ b/WebKit/Panels.subproj/IFStandardPanelsPrivate.h
@@ -0,0 +1,15 @@
+/*
+ IFStandardPanelsPrivate.h
+
+ Copyright 2002 Apple, Inc. All rights reserved.
+*/
+
+#import <WebKit/IFStandardPanels.h>
+#import <WebKit/IFWebController.h>
+
+ at interface IFStandardPanels (Private)
+
+-(void)_didStartLoadingURL:(NSURL *)url inController:(id<IFWebController>)controller;
+-(void)_didStopLoadingURL:(NSURL *)url inController:(id<IFWebController>)controller;
+
+ at end
diff --git a/WebKit/Panels.subproj/WebAuthenticationPanel.h b/WebKit/Panels.subproj/WebAuthenticationPanel.h
new file mode 100644
index 0000000..5487683
--- /dev/null
+++ b/WebKit/Panels.subproj/WebAuthenticationPanel.h
@@ -0,0 +1,39 @@
+/*
+ IFAuthenticationPanel.h
+
+ Copyright 2002 Apple, Inc. All rights reserved.
+*/
+
+#import <Cocoa/Cocoa.h>
+#import <WebFoundation/IFAuthenticationManager.h>
+
+ at interface IFAuthenticationPanel : NSObject
+{
+ IBOutlet id mainLabel;
+ IBOutlet id panel;
+ IBOutlet id password;
+ IBOutlet id smallLabel;
+ IBOutlet id username;
+ IBOutlet id imageView;
+ BOOL nibLoaded;
+ BOOL usingSheet;
+ id callback;
+ SEL selector;
+ IFAuthenticationRequest *request;
+}
+
+-(id)initWithCallback:(id)cb selector:(SEL)sel;
+
+// Interface-related methods
+- (IBAction)cancel:(id)sender;
+- (IBAction)logIn:(id)sender;
+
+- (BOOL)loadNib;
+
+- (void)runAsModalDialogWithRequest:(IFAuthenticationRequest *)req;
+- (void)runAsSheetOnWindow:(NSWindow *)window withRequest:(IFAuthenticationRequest *)req;
+
+- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo;
+
+
+ at end
diff --git a/WebKit/Panels.subproj/WebAuthenticationPanel.m b/WebKit/Panels.subproj/WebAuthenticationPanel.m
new file mode 100644
index 0000000..3a7cf57
--- /dev/null
+++ b/WebKit/Panels.subproj/WebAuthenticationPanel.m
@@ -0,0 +1,135 @@
+/*
+ IFAuthenticationPanel.m
+
+ Copyright 2002 Apple, Inc. All rights reserved.
+*/
+
+
+#import <WebKit/IFAuthenticationPanel.h>
+#import <WebKit/IFStandardPanelsPrivate.h>
+
+
+#define IFAuthenticationPanelNibName @"IFAuthenticationPanel"
+
+ at implementation IFAuthenticationPanel
+
+-(id)initWithCallback:(id)cb selector:(SEL)sel
+{
+ self = [self init];
+ if (self != nil) {
+ callback = [cb retain];
+ selector = sel;
+ }
+ return self;
+}
+
+
+- (void)dealloc
+{
+ [panel release];
+
+ [callback release];
+
+ [super dealloc];
+}
+
+// IB actions
+
+- (IBAction)cancel:(id)sender
+{
+ [panel close];
+ if (usingSheet) {
+ [[NSApplication sharedApplication] endSheet:panel returnCode:1];
+ } else {
+ [[NSApplication sharedApplication] stopModalWithCode:1];
+ }
+}
+
+- (IBAction)logIn:(id)sender
+{
+ [panel close];
+ if (usingSheet) {
+ [[NSApplication sharedApplication] endSheet:panel returnCode:0];
+ } else {
+ [[NSApplication sharedApplication] stopModalWithCode:0];
+ }
+}
+
+- (BOOL)loadNib
+{
+ if (!nibLoaded) {
+ if ([NSBundle loadNibNamed:IFAuthenticationPanelNibName owner:self]) {
+ nibLoaded = YES;
+ [imageView setImage:[NSImage imageNamed:@"NSApplicationIcon"]];
+ } else {
+ NSLog(@"%s:%d %s: couldn't load nib named '%@'",
+ __FILE__, __LINE__, __FUNCTION__,IFAuthenticationPanelNibName);
+ return FALSE;
+ }
+ }
+ return TRUE;
+}
+
+// Methods related to displaying the panel
+
+
+-(void)setUpForRequest:(IFAuthenticationRequest *)req
+{
+ [self loadNib];
+
+ // FIXME Radar 2876448: we should display a different dialog depending on the
+ // failure count (if the user tried and failed, the dialog should
+ // explain possible reasons)
+ // FIXME Radar 2876446: need to automatically adjust height of main label
+ [mainLabel setStringValue:[NSString stringWithFormat:@"To view this page, you need to log in to area \"%@\" on %@.", [req realm], [[req url] host]]];
+ if ([req willPasswordBeSentInClear]) {
+ [smallLabel setStringValue:@"Your password will be sent in the clear."];
+ } else {
+ [smallLabel setStringValue:@"Your log-in information will be sent securely."];
+ }
+
+ if ([req username] != nil) {
+ [username setStringValue:[req username]];
+ [panel setInitialFirstResponder:password];
+ } else {
+ [username setStringValue:@""];
+ [password setStringValue:@""];
+ [panel setInitialFirstResponder:username];
+ }
+}
+
+- (void)runAsModalDialogWithRequest:(IFAuthenticationRequest *)req
+{
+ [self setUpForRequest:req];
+ usingSheet = FALSE;
+ IFAuthenticationResult *result = nil;
+
+ if ([[NSApplication sharedApplication] runModalForWindow:panel] == 0) {
+ result = [IFAuthenticationResult authenticationResultWithUsername:[username stringValue] password:[password stringValue]];
+ }
+
+ [callback performSelector:selector withObject:req withObject:result];
+}
+
+- (void)runAsSheetOnWindow:(NSWindow *)window withRequest:(IFAuthenticationRequest *)req
+{
+ [self setUpForRequest:req];
+
+ usingSheet = TRUE;
+ request = [req retain];
+
+ [[NSApplication sharedApplication] beginSheet:panel modalForWindow:window modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:NULL];
+}
+
+- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo
+{
+ IFAuthenticationResult *result = nil;
+ if (returnCode == 0) {
+ result = [IFAuthenticationResult authenticationResultWithUsername:[username stringValue] password:[password stringValue]];
+ }
+
+ [callback performSelector:selector withObject:request withObject:result];
+ [request release];
+}
+
+ at end
diff --git a/WebKit/Panels.subproj/WebPanelAuthenticationHandler.h b/WebKit/Panels.subproj/WebPanelAuthenticationHandler.h
new file mode 100644
index 0000000..09755ba
--- /dev/null
+++ b/WebKit/Panels.subproj/WebPanelAuthenticationHandler.h
@@ -0,0 +1,23 @@
+/*
+ IFPanelAuthenticationHandler.h
+
+ Copyright 2002 Apple, Inc. All rights reserved.
+ */
+
+#import <Foundation/Foundation.h>
+#import <WebFoundation/IFAuthenticationManager.h>
+
+
+ at interface IFPanelAuthenticationHandler : NSObject <IFAuthenticationHandler>
+{
+ NSMutableDictionary *windowToPanel;
+ NSMutableDictionary *requestToWindow;
+}
+
+// IFAuthenticationHandler methods
+-(BOOL)readyToStartAuthentication:(IFAuthenticationRequest *)request;
+-(void)startAuthentication:(IFAuthenticationRequest *)request;
+-(void)cancelAuthentication:(IFAuthenticationRequest *)request;
+
+
+ at end
diff --git a/WebKit/Panels.subproj/WebPanelAuthenticationHandler.m b/WebKit/Panels.subproj/WebPanelAuthenticationHandler.m
new file mode 100644
index 0000000..6842d30
--- /dev/null
+++ b/WebKit/Panels.subproj/WebPanelAuthenticationHandler.m
@@ -0,0 +1,91 @@
+/*
+ IFPanelAuthenticationHandler.m
+
+ Copyright 2002 Apple, Inc. All rights reserved.
+ */
+
+
+#import <WebKit/IFPanelAuthenticationHandler.h>
+#import <WebKit/IFAuthenticationPanel.h>
+#import <WebKit/IFStandardPanels.h>
+#import <WebFoundation/IFNSDictionaryExtensions.h>
+
+static NSString *IFModalDialogPretendWindow = @"IFModalDialogPretendWindow";
+
+ at implementation IFPanelAuthenticationHandler
+
+-(id)init
+{
+ self = [super init];
+ if (self != nil) {
+ windowToPanel = [[NSMutableDictionary alloc] init];
+ requestToWindow = [[NSMutableDictionary alloc] init];
+ }
+ return self;
+}
+
+-(void)dealloc
+{
+ [windowToPanel release];
+ [requestToWindow release];
+ [super dealloc];
+}
+
+// IFAuthenticationHandler methods
+-(BOOL)readyToStartAuthentication:(IFAuthenticationRequest *)request
+{
+ id window = [[IFStandardPanels sharedStandardPanels] frontmostWindowLoadingURL:[request url]];
+
+ if (window == nil) {
+ window = IFModalDialogPretendWindow;
+ }
+
+ return [windowToPanel objectForKey:window] == nil;
+}
+
+-(void)startAuthentication:(IFAuthenticationRequest *)request
+{
+ id window = [[IFStandardPanels sharedStandardPanels] frontmostWindowLoadingURL:[request url]];
+
+ if (window == nil) {
+ window = IFModalDialogPretendWindow;
+ }
+
+ if ([windowToPanel objectForKey:window] != nil) {
+ [request authenticationDone:nil];
+ return;
+ }
+
+ IFAuthenticationPanel *panel = [[IFAuthenticationPanel alloc] initWithCallback:self selector:@selector(_authenticationDoneWithRequest:result:)];
+ [requestToWindow _IF_setObject:window forUncopiedKey:request];
+ [windowToPanel _IF_setObject:panel forUncopiedKey:window];
+ [panel release];
+
+ if (window == IFModalDialogPretendWindow) {
+ [panel runAsModalDialogWithRequest:request];
+ } else {
+ [panel runAsSheetOnWindow:window withRequest:request];
+ }
+}
+
+-(void)cancelAuthentication:(IFAuthenticationRequest *)request
+{
+ id window = [requestToWindow objectForKey:request];
+ if (window != nil) {
+ IFAuthenticationPanel *panel = [windowToPanel objectForKey:window];
+ [panel cancel:self];
+ }
+}
+
+-(void)_authenticationDoneWithRequest:(IFAuthenticationRequest *)request result:(IFAuthenticationResult *)result
+{
+ id window = [requestToWindow objectForKey:request];
+ if (window != nil) {
+ [windowToPanel removeObjectForKey:window];
+ [requestToWindow removeObjectForKey:request];
+ }
+
+ [request authenticationDone:result];
+}
+
+ at end
diff --git a/WebKit/Panels.subproj/WebStandardPanels.h b/WebKit/Panels.subproj/WebStandardPanels.h
new file mode 100644
index 0000000..8f25f34
--- /dev/null
+++ b/WebKit/Panels.subproj/WebStandardPanels.h
@@ -0,0 +1,29 @@
+/*
+ IFStandardPanels.h
+
+ Copyright 2002 Apple, Inc. All rights reserved.
+*/
+
+#import <Cocoa/Cocoa.h>
+
+ at class IFStandardPanelsPrivate;
+
+ at interface IFStandardPanels : NSObject
+{
+ at private
+ IFStandardPanelsPrivate *_privatePanels;
+}
+
++(IFStandardPanels *)sharedStandardPanels;
+
+-(void)setUseStandardAuthenticationPanel:(BOOL)use;
+-(BOOL)useStandardAuthenticationPanel;
+-(void)setUseStandardCookieAcceptPanel:(BOOL)use;
+-(BOOL)useStandardCookieAcceptPanel;
+
+-(void)didStartLoadingURL:(NSURL *)url inWindow:(NSWindow *)window;
+-(void)didStopLoadingURL:(NSURL *)url inWindow:(NSWindow *)window;
+
+-(NSWindow *)frontmostWindowLoadingURL:(NSURL *)url;
+
+ at end
diff --git a/WebKit/Panels.subproj/WebStandardPanels.m b/WebKit/Panels.subproj/WebStandardPanels.m
new file mode 100644
index 0000000..62d06f0
--- /dev/null
+++ b/WebKit/Panels.subproj/WebStandardPanels.m
@@ -0,0 +1,218 @@
+/*
+ IFStandardPanels.h
+
+ Copyright 2002 Apple, Inc. All rights reserved.
+*/
+
+#import <WebKit/IFStandardPanels.h>
+#import <WebKit/IFStandardPanelsPrivate.h>
+#import <WebKit/IFPanelAuthenticationHandler.h>
+#import <WebKit/IFWebFrame.h>
+#import <WebFoundation/IFAuthenticationManager.h>
+#import <WebFoundation/IFCookieManager.h>
+
+#import <Carbon/Carbon.h>
+
+ at interface IFStandardPanelsPrivate : NSObject
+{
+ at public
+ IFPanelAuthenticationHandler *panelAuthenticationHandler;
+ NSMutableDictionary *urlContainers;
+}
+ at end
+
+ at interface IFStandardPanels (Internal)
+-(id)_init;
+ at end
+
+ at implementation IFStandardPanelsPrivate
+-(id)init
+{
+ self = [super init];
+ if (self != nil) {
+ urlContainers = [[NSMutableDictionary alloc] init];
+ }
+ return self;
+}
+
+-(void)dealloc
+{
+ [urlContainers release];
+ [panelAuthenticationHandler release];
+ [super dealloc];
+}
+ at end
+
+ at implementation IFStandardPanels (Internal)
+// Private init method to implement the singleton pattern
+-(id)_init
+{
+ self = [super init];
+ if (self != nil) {
+ _privatePanels = [[IFStandardPanelsPrivate alloc] init];
+ }
+ return self;
+}
+ at end
+
+
+ at implementation IFStandardPanels
+-(id)init
+{
+ // FIXME: should assert instead (or return a reference to the
+ // shared instance)
+ [self release];
+ return nil;
+}
+
+-(void)dealloc
+{
+ [_privatePanels release];
+ [super dealloc];
+}
+
+// The next line is a workaround for Radar 2905545. Once that's fixed, it can use PTHREAD_ONCE_INIT.
+pthread_once_t sharedStandardPanelsOnce = {_PTHREAD_ONCE_SIG_init, {}};
+IFStandardPanels *sharedStandardPanels = NULL;
+
+static void initSharedStandardPanels(void)
+{
+ sharedStandardPanels = [[IFStandardPanels alloc] _init];
+}
+
++(IFStandardPanels *)sharedStandardPanels
+{
+ pthread_once(&sharedStandardPanelsOnce, initSharedStandardPanels);
+ return sharedStandardPanels;
+}
+
+-(void)setUseStandardAuthenticationPanel:(BOOL)use
+{
+ if (use) {
+ if (![self useStandardAuthenticationPanel]) {
+ _privatePanels->panelAuthenticationHandler = [[IFPanelAuthenticationHandler alloc] init];
+ [[IFAuthenticationManager sharedAuthenticationManager] addAuthenticationHandler:_privatePanels->panelAuthenticationHandler];
+ }
+ } else {
+ if ([self useStandardAuthenticationPanel]) {
+ [[IFAuthenticationManager sharedAuthenticationManager] removeAuthenticationHandler:_privatePanels->panelAuthenticationHandler];
+ [_privatePanels->panelAuthenticationHandler release];
+ _privatePanels->panelAuthenticationHandler = nil;
+ }
+ }
+}
+
+-(BOOL)useStandardAuthenticationPanel
+{
+ return _privatePanels->panelAuthenticationHandler != nil;
+}
+
+-(void)setUseStandardCookieAcceptPanel:(BOOL)use
+{
+}
+
+-(BOOL)useStandardCookieAcceptPanel
+{
+ return FALSE;
+}
+
+-(void)didStartLoadingURL:(NSURL *)url inWindow:(NSWindow *)window
+{
+ NSCountedSet *set = [_privatePanels->urlContainers objectForKey:url];
+
+ if (set == nil) {
+ set = [NSCountedSet set];
+ [_privatePanels->urlContainers setObject:set forKey:url];
+ }
+
+ [set addObject:window];
+}
+
+-(void)didStopLoadingURL:(NSURL *)url inWindow:(NSWindow *)window
+{
+ NSCountedSet *set = [_privatePanels->urlContainers objectForKey:url];
+
+ if (set == nil) {
+ return;
+ }
+
+ [set removeObject:window];
+
+ if ([set count] == 0) {
+ [_privatePanels->urlContainers objectForKey:url];
+ }
+}
+
+-(void)_didStartLoadingURL:(NSURL *)url inController:(id<IFWebController>)controller
+{
+ NSCountedSet *set = [_privatePanels->urlContainers objectForKey:url];
+
+ if (set == nil) {
+ set = [NSCountedSet set];
+ [_privatePanels->urlContainers setObject:set forKey:url];
+ }
+
+ [set addObject:controller];
+}
+
+-(void)_didStopLoadingURL:(NSURL *)url inController:(id<IFWebController>)controller
+{
+ NSCountedSet *set = [_privatePanels->urlContainers objectForKey:url];
+
+ if (set == nil) {
+ return;
+ }
+
+ [set removeObject:controller];
+
+ if ([set count] == 0) {
+ [_privatePanels->urlContainers objectForKey:url];
+ }
+}
+
+static BOOL WindowInFront(NSWindow *a, NSWindow *b)
+{
+ UInt32 aIndex;
+ UInt32 bIndex;
+
+ GetWindowIndex([a windowRef], NULL, kWindowGroupContentsReturnWindows, &aIndex);
+ GetWindowIndex([b windowRef], NULL, kWindowGroupContentsReturnWindows, &bIndex);
+
+ return aIndex < bIndex;
+ // void NSWindowList(int size, int list[])
+ // void NSCountWindowsForContext(int context, int *count)
+ // void NSWindowListForContext(int context, int size, int list[])
+}
+
+-(NSWindow *)frontmostWindowLoadingURL:(NSURL *)url
+{
+ NSCountedSet *set = [_privatePanels->urlContainers objectForKey:url];
+
+ if (set == nil) {
+ return nil;
+ }
+
+ NSEnumerator *enumerator = [set objectEnumerator];
+ NSWindow *frontmostWindow = nil;
+ id object;
+
+ while ((object = [enumerator nextObject]) != nil) {
+ NSWindow *window;
+ if ([object isKindOfClass:[NSWindow class]]) {
+ window = object;
+ } else {
+ window = [[[object mainFrame] view] window];
+ }
+
+ if (window != nil && (frontmostWindow == nil || WindowInFront(window, frontmostWindow))) {
+ frontmostWindow = window;
+ }
+ }
+
+ return frontmostWindow;
+}
+
+ at end
+
+
+
diff --git a/WebKit/Panels.subproj/WebStandardPanelsPrivate.h b/WebKit/Panels.subproj/WebStandardPanelsPrivate.h
new file mode 100644
index 0000000..9812dec
--- /dev/null
+++ b/WebKit/Panels.subproj/WebStandardPanelsPrivate.h
@@ -0,0 +1,15 @@
+/*
+ IFStandardPanelsPrivate.h
+
+ Copyright 2002 Apple, Inc. All rights reserved.
+*/
+
+#import <WebKit/IFStandardPanels.h>
+#import <WebKit/IFWebController.h>
+
+ at interface IFStandardPanels (Private)
+
+-(void)_didStartLoadingURL:(NSURL *)url inController:(id<IFWebController>)controller;
+-(void)_didStopLoadingURL:(NSURL *)url inController:(id<IFWebController>)controller;
+
+ at end
diff --git a/WebKit/Plugins.subproj/IFPluginStream.mm b/WebKit/Plugins.subproj/IFPluginStream.mm
index 7bd722e..89e0b46 100644
--- a/WebKit/Plugins.subproj/IFPluginStream.mm
+++ b/WebKit/Plugins.subproj/IFPluginStream.mm
@@ -8,6 +8,7 @@
#import <WebKitDebug.h>
#import <WebKit/IFLoadProgress.h>
#import <WebKit/IFBaseWebController.h>
+#import <WebKit/IFBaseWebControllerPrivate.h>
#import <WebKit/IFWebController.h>
static NSString *getCarbonPath(NSString *posixPath);
@@ -90,7 +91,7 @@ static NSString *getCarbonPath(NSString *posixPath);
- (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)sender
{
-
+ [(IFBaseWebController *)[view webController] _didStartLoading:URL];
}
- (void)IFURLHandle:(IFURLHandle *)sender resourceDataDidBecomeAvailable:(NSData *)data
@@ -179,6 +180,7 @@ static NSString *getCarbonPath(NSString *posixPath);
[loadProgress release];
[self stop];
+ [(IFBaseWebController *)[view webController] _didStopLoading:URL];
}
- (void)IFURLHandleResourceDidCancelLoading:(IFURLHandle *)sender
@@ -192,6 +194,7 @@ static NSString *getCarbonPath(NSString *posixPath);
[loadProgress release];
[self stop];
+ [(IFBaseWebController *)[view webController] _didStopLoading:URL];
}
- (void)IFURLHandle:(IFURLHandle *)sender resourceDidFailLoadingWithResult:(IFError *)result
@@ -206,11 +209,13 @@ static NSString *getCarbonPath(NSString *posixPath);
[loadProgress release];
[self stop];
+ [(IFBaseWebController *)[view webController] _didStopLoading:URL];
}
- (void)IFURLHandle:(IFURLHandle *)sender didRedirectToURL:(NSURL *)url
{
-
+ [(IFBaseWebController *)[view webController] _didStopLoading:URL];
+ [(IFBaseWebController *)[view webController] _didStartLoading:url];
}
diff --git a/WebKit/Plugins.subproj/WebPluginStream.m b/WebKit/Plugins.subproj/WebPluginStream.m
index 7bd722e..89e0b46 100644
--- a/WebKit/Plugins.subproj/WebPluginStream.m
+++ b/WebKit/Plugins.subproj/WebPluginStream.m
@@ -8,6 +8,7 @@
#import <WebKitDebug.h>
#import <WebKit/IFLoadProgress.h>
#import <WebKit/IFBaseWebController.h>
+#import <WebKit/IFBaseWebControllerPrivate.h>
#import <WebKit/IFWebController.h>
static NSString *getCarbonPath(NSString *posixPath);
@@ -90,7 +91,7 @@ static NSString *getCarbonPath(NSString *posixPath);
- (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)sender
{
-
+ [(IFBaseWebController *)[view webController] _didStartLoading:URL];
}
- (void)IFURLHandle:(IFURLHandle *)sender resourceDataDidBecomeAvailable:(NSData *)data
@@ -179,6 +180,7 @@ static NSString *getCarbonPath(NSString *posixPath);
[loadProgress release];
[self stop];
+ [(IFBaseWebController *)[view webController] _didStopLoading:URL];
}
- (void)IFURLHandleResourceDidCancelLoading:(IFURLHandle *)sender
@@ -192,6 +194,7 @@ static NSString *getCarbonPath(NSString *posixPath);
[loadProgress release];
[self stop];
+ [(IFBaseWebController *)[view webController] _didStopLoading:URL];
}
- (void)IFURLHandle:(IFURLHandle *)sender resourceDidFailLoadingWithResult:(IFError *)result
@@ -206,11 +209,13 @@ static NSString *getCarbonPath(NSString *posixPath);
[loadProgress release];
[self stop];
+ [(IFBaseWebController *)[view webController] _didStopLoading:URL];
}
- (void)IFURLHandle:(IFURLHandle *)sender didRedirectToURL:(NSURL *)url
{
-
+ [(IFBaseWebController *)[view webController] _didStopLoading:URL];
+ [(IFBaseWebController *)[view webController] _didStartLoading:url];
}
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index bf4f0af..15d5b0e 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -89,6 +89,7 @@
};
0867D691FE84028FC02AAC07 = {
children = (
+ F8CA15B4029A399401000122,
9C7CABBB0190A37C0ECA16EA,
25A8176801B5474B0ECA149E,
F5065217027F555001C1A526,
@@ -233,6 +234,10 @@
F5F71748028855C5018635CA,
F5F7174E02885C5B018635CA,
F5C81E4302994EA401C1A525,
+ F8CA15B9029A39D901000122,
+ F8CA15BB029A39D901000122,
+ F8CA15C2029A3E0D01000122,
+ F83DCC73029D09F301000131,
);
isa = PBXHeadersBuildPhase;
};
@@ -248,6 +253,7 @@
F5E638640265FC0D01000102,
F5E638650265FC0D01000102,
F599A818028C6D0D0124FDD6,
+ F8CA15C0029A39FC01000122,
);
isa = PBXResourcesBuildPhase;
};
@@ -292,6 +298,9 @@
F5F717290288493C018635CA,
F5F7174F02885C5B018635CA,
F5C81E4402994EA401C1A525,
+ F8CA15BA029A39D901000122,
+ F8CA15BC029A39D901000122,
+ F83DCC74029D09F301000131,
);
isa = PBXSourcesBuildPhase;
};
@@ -1863,6 +1872,147 @@
settings = {
};
};
+//F50
+//F51
+//F52
+//F53
+//F54
+//F80
+//F81
+//F82
+//F83
+//F84
+ F83DCC71029D09F301000131 = {
+ isa = PBXFileReference;
+ name = IFPanelAuthenticationHandler.h;
+ path = Panels.subproj/IFPanelAuthenticationHandler.h;
+ refType = 4;
+ };
+ F83DCC72029D09F301000131 = {
+ isa = PBXFileReference;
+ name = IFPanelAuthenticationHandler.m;
+ path = Panels.subproj/IFPanelAuthenticationHandler.m;
+ refType = 4;
+ };
+ F83DCC73029D09F301000131 = {
+ fileRef = F83DCC71029D09F301000131;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ F83DCC74029D09F301000131 = {
+ fileRef = F83DCC72029D09F301000131;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ F8CA15B4029A399401000122 = {
+ children = (
+ F8CA15B5029A39D901000122,
+ F8CA15B6029A39D901000122,
+ F8CA15B7029A39D901000122,
+ F8CA15B8029A39D901000122,
+ F8CA15BD029A39DF01000122,
+ F8CA15C1029A3E0D01000122,
+ F83DCC71029D09F301000131,
+ F83DCC72029D09F301000131,
+ );
+ isa = PBXGroup;
+ name = Panels;
+ refType = 4;
+ };
+ F8CA15B5029A39D901000122 = {
+ isa = PBXFileReference;
+ name = IFAuthenticationPanel.h;
+ path = Panels.subproj/IFAuthenticationPanel.h;
+ refType = 4;
+ };
+ F8CA15B6029A39D901000122 = {
+ isa = PBXFileReference;
+ name = IFAuthenticationPanel.m;
+ path = Panels.subproj/IFAuthenticationPanel.m;
+ refType = 4;
+ };
+ F8CA15B7029A39D901000122 = {
+ isa = PBXFileReference;
+ name = IFStandardPanels.h;
+ path = Panels.subproj/IFStandardPanels.h;
+ refType = 4;
+ };
+ F8CA15B8029A39D901000122 = {
+ isa = PBXFileReference;
+ name = IFStandardPanels.m;
+ path = Panels.subproj/IFStandardPanels.m;
+ refType = 4;
+ };
+ F8CA15B9029A39D901000122 = {
+ fileRef = F8CA15B5029A39D901000122;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ F8CA15BA029A39D901000122 = {
+ fileRef = F8CA15B6029A39D901000122;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ F8CA15BB029A39D901000122 = {
+ fileRef = F8CA15B7029A39D901000122;
+ isa = PBXBuildFile;
+ settings = {
+ ATTRIBUTES = (
+ Public,
+ );
+ };
+ };
+ F8CA15BC029A39D901000122 = {
+ fileRef = F8CA15B8029A39D901000122;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ F8CA15BD029A39DF01000122 = {
+ children = (
+ F8CA15BE029A39FC01000122,
+ );
+ isa = PBXGroup;
+ name = Resources;
+ refType = 4;
+ };
+ F8CA15BE029A39FC01000122 = {
+ children = (
+ F8CA15BF029A39FC01000122,
+ );
+ isa = PBXVariantGroup;
+ name = IFAuthenticationPanel.nib;
+ path = "";
+ refType = 4;
+ };
+ F8CA15BF029A39FC01000122 = {
+ isa = PBXFileReference;
+ name = English;
+ path = Panels.subproj/English.lproj/IFAuthenticationPanel.nib;
+ refType = 4;
+ };
+ F8CA15C0029A39FC01000122 = {
+ fileRef = F8CA15BE029A39FC01000122;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ F8CA15C1029A3E0D01000122 = {
+ isa = PBXFileReference;
+ name = IFStandardPanelsPrivate.h;
+ path = Panels.subproj/IFStandardPanelsPrivate.h;
+ refType = 4;
+ };
+ F8CA15C2029A3E0D01000122 = {
+ fileRef = F8CA15C1029A3E0D01000122;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
};
rootObject = 0867D690FE84028FC02AAC07;
}
diff --git a/WebKit/WebView.subproj/IFBaseWebControllerPrivate.h b/WebKit/WebView.subproj/IFBaseWebControllerPrivate.h
index 6fe0322..d246cc6 100644
--- a/WebKit/WebView.subproj/IFBaseWebControllerPrivate.h
+++ b/WebKit/WebView.subproj/IFBaseWebControllerPrivate.h
@@ -20,4 +20,6 @@
- (void)_receivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
- (void)_mainReceivedProgress: (IFLoadProgress *)progress forResource: (NSString *)resourceDescription fromDataSource: (IFWebDataSource *)dataSource;
- (void)_mainReceivedError: (IFError *)error forResource: (NSString *)resourceDescription partialProgress: (IFLoadProgress *)progress fromDataSource: (IFWebDataSource *)dataSource;
+- (void)_didStartLoading: (NSURL *)url;
+- (void)_didStopLoading: (NSURL *)url;
@end
diff --git a/WebKit/WebView.subproj/IFBaseWebControllerPrivate.mm b/WebKit/WebView.subproj/IFBaseWebControllerPrivate.mm
index 38488ee..5a3dc50 100644
--- a/WebKit/WebView.subproj/IFBaseWebControllerPrivate.mm
+++ b/WebKit/WebView.subproj/IFBaseWebControllerPrivate.mm
@@ -9,6 +9,7 @@
#import <WebKit/IFPreferencesPrivate.h>
#import <WebKit/IFLoadProgress.h>
#import <WebKit/IFWebController.h>
+#import <WebKit/IFStandardPanelsPrivate.h>
#import <WebFoundation/IFError.h>
#import <WebFoundation/IFURLCacheLoaderConstants.h>
@@ -179,6 +180,14 @@
[frame _checkLoadComplete];
}
+- (void)_didStartLoading: (NSURL *)url
+{
+ [[IFStandardPanels sharedStandardPanels] _didStartLoadingURL:url inController:self];
+}
+- (void)_didStopLoading: (NSURL *)url
+{
+ [[IFStandardPanels sharedStandardPanels] _didStopLoadingURL:url inController:self];
+}
@end
diff --git a/WebKit/WebView.subproj/IFMainURLHandleClient.mm b/WebKit/WebView.subproj/IFMainURLHandleClient.mm
index 228576a..785c262 100644
--- a/WebKit/WebView.subproj/IFMainURLHandleClient.mm
+++ b/WebKit/WebView.subproj/IFMainURLHandleClient.mm
@@ -69,6 +69,8 @@
- (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)sender
{
WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "url = %s\n", [[[sender url] absoluteString] cString]);
+ url = [[sender url] retain];
+ [(IFBaseWebController *)[dataSource controller] _didStartLoading:url];
}
@@ -84,6 +86,7 @@
[(IFBaseWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
forResource: [[sender url] absoluteString] fromDataSource: dataSource];
[loadProgress release];
+ [(IFBaseWebController *)[dataSource controller] _didStopLoading:url];
}
@@ -107,6 +110,7 @@
[(IFBaseWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
forResource: [[sender url] absoluteString] fromDataSource: dataSource];
[loadProgress release];
+ [(IFBaseWebController *)[dataSource controller] _didStopLoading:url];
}
@@ -127,7 +131,6 @@
handlerType = [IFMIMEHandler MIMEHandlerTypeForMIMEType:MIMEType];
encoding = [[sender characterSet] retain];
- url = [[sender url] retain];
examinedInitialData = YES;
}
@@ -176,6 +179,7 @@
loadProgress->bytesSoFar = [sender contentLengthReceived];
[(IFBaseWebController *)[dataSource controller] _mainReceivedError: result forResource: [[sender url] absoluteString] partialProgress: loadProgress fromDataSource: dataSource];
+ [(IFBaseWebController *)[dataSource controller] _didStopLoading:url];
}
@@ -187,6 +191,10 @@
[dataSource _setFinalURL: URL];
[[dataSource _locationChangeHandler] serverRedirectTo: URL forDataSource: dataSource];
+ [(IFBaseWebController *)[dataSource controller] _didStopLoading: url];
+ [(IFBaseWebController *)[dataSource controller] _didStartLoading: URL];
+ [url release];
+ url = [URL retain];
}
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index 228576a..785c262 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -69,6 +69,8 @@
- (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)sender
{
WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "url = %s\n", [[[sender url] absoluteString] cString]);
+ url = [[sender url] retain];
+ [(IFBaseWebController *)[dataSource controller] _didStartLoading:url];
}
@@ -84,6 +86,7 @@
[(IFBaseWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
forResource: [[sender url] absoluteString] fromDataSource: dataSource];
[loadProgress release];
+ [(IFBaseWebController *)[dataSource controller] _didStopLoading:url];
}
@@ -107,6 +110,7 @@
[(IFBaseWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
forResource: [[sender url] absoluteString] fromDataSource: dataSource];
[loadProgress release];
+ [(IFBaseWebController *)[dataSource controller] _didStopLoading:url];
}
@@ -127,7 +131,6 @@
handlerType = [IFMIMEHandler MIMEHandlerTypeForMIMEType:MIMEType];
encoding = [[sender characterSet] retain];
- url = [[sender url] retain];
examinedInitialData = YES;
}
@@ -176,6 +179,7 @@
loadProgress->bytesSoFar = [sender contentLengthReceived];
[(IFBaseWebController *)[dataSource controller] _mainReceivedError: result forResource: [[sender url] absoluteString] partialProgress: loadProgress fromDataSource: dataSource];
+ [(IFBaseWebController *)[dataSource controller] _didStopLoading:url];
}
@@ -187,6 +191,10 @@
[dataSource _setFinalURL: URL];
[[dataSource _locationChangeHandler] serverRedirectTo: URL forDataSource: dataSource];
+ [(IFBaseWebController *)[dataSource controller] _didStopLoading: url];
+ [(IFBaseWebController *)[dataSource controller] _didStartLoading: URL];
+ [url release];
+ url = [URL retain];
}
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index 228576a..785c262 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -69,6 +69,8 @@
- (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)sender
{
WEBKITDEBUGLEVEL (WEBKIT_LOG_LOADING, "url = %s\n", [[[sender url] absoluteString] cString]);
+ url = [[sender url] retain];
+ [(IFBaseWebController *)[dataSource controller] _didStartLoading:url];
}
@@ -84,6 +86,7 @@
[(IFBaseWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
forResource: [[sender url] absoluteString] fromDataSource: dataSource];
[loadProgress release];
+ [(IFBaseWebController *)[dataSource controller] _didStopLoading:url];
}
@@ -107,6 +110,7 @@
[(IFBaseWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress
forResource: [[sender url] absoluteString] fromDataSource: dataSource];
[loadProgress release];
+ [(IFBaseWebController *)[dataSource controller] _didStopLoading:url];
}
@@ -127,7 +131,6 @@
handlerType = [IFMIMEHandler MIMEHandlerTypeForMIMEType:MIMEType];
encoding = [[sender characterSet] retain];
- url = [[sender url] retain];
examinedInitialData = YES;
}
@@ -176,6 +179,7 @@
loadProgress->bytesSoFar = [sender contentLengthReceived];
[(IFBaseWebController *)[dataSource controller] _mainReceivedError: result forResource: [[sender url] absoluteString] partialProgress: loadProgress fromDataSource: dataSource];
+ [(IFBaseWebController *)[dataSource controller] _didStopLoading:url];
}
@@ -187,6 +191,10 @@
[dataSource _setFinalURL: URL];
[[dataSource _locationChangeHandler] serverRedirectTo: URL forDataSource: dataSource];
+ [(IFBaseWebController *)[dataSource controller] _didStopLoading: url];
+ [(IFBaseWebController *)[dataSource controller] _didStartLoading: URL];
+ [url release];
+ url = [URL retain];
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list