[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:02:04 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit b1961817f6f7da009866fa78aac12ab496d40255
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sun Nov 17 21:25:38 2002 +0000
WebCore:
- moved all NSURL and CFURL use out of WebCore
* kwq/KWQKURL.h: Remove getNSURL() and getNSURLFromString().
* kwq/KWQKURL.mm: Ditto.
* kwq/KWQKCookieJar.mm:
(KWQKCookieJar::cookie): Pass an NSString instead of an NSURL.
(KWQKCookieJar::setCookie): Ditto.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::openURL): Ditto.
(KWQKHTMLPart::openURLRequest): Ditto.
(KWQKHTMLPart::submitForm): Ditto.
(KWQKHTMLPart::urlSelected): Ditto.
(KWQKHTMLPart::createPart): Ditto.
(KWQKHTMLPart::redirectionTimerStartedOrStopped): Ditto.
(KWQKHTMLPart::userAgent): Ditto.
(KWQKHTMLPart::requestedURLString): Receive an NSString instead of an NSURL.
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::createNewWindow): Pass an NSString instead of an NSURL.
(KHTMLPartBrowserExtension::setIconURL): Ditto.
(KHTMLPartBrowserExtension::setTypedIconURL): Ditto.
* kwq/KWQKJavaAppletWidget.h: Remove use of NSURL, just use QString instead.
* kwq/KWQKJavaAppletWidget.mm:
(KJavaAppletWidget::KJavaAppletWidget): No need to set the QString to nil.
(KJavaAppletWidget::~KJavaAppletWidget): No need to release the QString.
(KJavaAppletWidget::showApplet): Pass an NSString instead of an NSURL.
* kwq/KWQLoader.mm:
(KWQServeRequest): Pass an NSString instead of an NSURL.
(KWQCheckCacheObjectStatus): Ditto.
* kwq/WebCoreBridge.h: Change all methods to use NSString instead of NSURL.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge openURL:reload:headers:]): Receive an NSString instead of an NSURL.
(-[WebCoreBridge completeURLForDOMString:]): Return an NSString instead of an NSURL.
(-[WebCoreBridge elementAtPoint:]): WebCoreElementLinkURL and WebCoreElementImageURL
are now strings.
(-[WebCoreBridge URL]): Return an NSString instead of an NSURL.
* kwq/WebCoreCookieAdapter.h: Change all methods to use NSString instead of NSURL.
* kwq/WebCoreCookieAdapter.m:
(-[WebCoreCookieAdapter cookiesForURL:]): Ditto.
(-[WebCoreCookieAdapter setCookies:forURL:policyBaseURL:]): Ditto.
* khtml/rendering/render_applet.cpp: (RenderApplet::processArguments):
Tweaked this file a tiny bit, mainly because header dependencies weren't working
and we need this file to be recompiled due to inline function changes.
WebKit:
- update for change to WebCore API so it never uses NSURL
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge createWindowWithURL:frameName:]): Take NSString instead of NSURL.
(-[WebBridge startLoadingResource:withURL:]): Ditto.
(-[WebBridge objectLoadedFromCacheWithURL:response:size:]): Ditto.
(-[WebBridge reportClientRedirectToURL:delay:fireDate:]): Ditto.
(-[WebBridge setIconURL:]): Ditto.
(-[WebBridge setIconURL:withType:]): Ditto.
(-[WebBridge loadURL:reload:triggeringEvent:isFormSubmission:]): Ditto.
(-[WebBridge postWithURL:data:contentType:triggeringEvent:]): Ditto.
(-[WebBridge createChildFrameNamed:withURL:renderPart:allowsScrolling:marginWidth:marginHeight:]): Ditto.
(-[WebBridge userAgentForURL:]): Ditto.
(-[WebBridge requestedURL]): Return NSString instead of NSURL.
(-[WebBridge viewForPluginWithURL:attributes:baseURL:MIMEType:]): Take NSString instead of NSURL.
(-[WebBridge viewForJavaAppletWithFrame:attributes:baseURL:]): Take NSString instead of NSURL.
* WebCoreSupport.subproj/WebCookieAdapter.m:
(-[WebCookieAdapter cookiesForURL:]): Take NSString instead of NSURL.
(-[WebCookieAdapter setCookies:forURL:policyBaseURL:]): Ditto.
* WebView.subproj/WebDataSourcePrivate.m:
(-[WebDataSource _commitIfReady]): Pass NSString instead of NSURL.
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _continueFragmentScrollAfterNavigationPolicy:request:]): Pass NSString instead of NSURL
(-[WebFrame _loadURL:loadType:triggeringEvent:isFormSubmission:]): Turn bridge URL into NSURL so we
can call _web_URLByRemovingFragment on it.
* WebView.subproj/WebHTMLViewPrivate.m:
(-[WebHTMLView _elementAtPoint:]): Convert NSString to NSURL when making the WebKit element dictionary.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2720 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 0f3ffab..ce0ea9c 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,50 @@
+2002-11-17 Darin Adler <darin at apple.com>
+
+ - moved all NSURL and CFURL use out of WebCore
+
+ * kwq/KWQKURL.h: Remove getNSURL() and getNSURLFromString().
+ * kwq/KWQKURL.mm: Ditto.
+
+ * kwq/KWQKCookieJar.mm:
+ (KWQKCookieJar::cookie): Pass an NSString instead of an NSURL.
+ (KWQKCookieJar::setCookie): Ditto.
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPart::openURL): Ditto.
+ (KWQKHTMLPart::openURLRequest): Ditto.
+ (KWQKHTMLPart::submitForm): Ditto.
+ (KWQKHTMLPart::urlSelected): Ditto.
+ (KWQKHTMLPart::createPart): Ditto.
+ (KWQKHTMLPart::redirectionTimerStartedOrStopped): Ditto.
+ (KWQKHTMLPart::userAgent): Ditto.
+ (KWQKHTMLPart::requestedURLString): Receive an NSString instead of an NSURL.
+ * kwq/KWQKHTMLPartBrowserExtension.mm:
+ (KHTMLPartBrowserExtension::createNewWindow): Pass an NSString instead of an NSURL.
+ (KHTMLPartBrowserExtension::setIconURL): Ditto.
+ (KHTMLPartBrowserExtension::setTypedIconURL): Ditto.
+ * kwq/KWQKJavaAppletWidget.h: Remove use of NSURL, just use QString instead.
+ * kwq/KWQKJavaAppletWidget.mm:
+ (KJavaAppletWidget::KJavaAppletWidget): No need to set the QString to nil.
+ (KJavaAppletWidget::~KJavaAppletWidget): No need to release the QString.
+ (KJavaAppletWidget::showApplet): Pass an NSString instead of an NSURL.
+ * kwq/KWQLoader.mm:
+ (KWQServeRequest): Pass an NSString instead of an NSURL.
+ (KWQCheckCacheObjectStatus): Ditto.
+ * kwq/WebCoreBridge.h: Change all methods to use NSString instead of NSURL.
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge openURL:reload:headers:]): Receive an NSString instead of an NSURL.
+ (-[WebCoreBridge completeURLForDOMString:]): Return an NSString instead of an NSURL.
+ (-[WebCoreBridge elementAtPoint:]): WebCoreElementLinkURL and WebCoreElementImageURL
+ are now strings.
+ (-[WebCoreBridge URL]): Return an NSString instead of an NSURL.
+ * kwq/WebCoreCookieAdapter.h: Change all methods to use NSString instead of NSURL.
+ * kwq/WebCoreCookieAdapter.m:
+ (-[WebCoreCookieAdapter cookiesForURL:]): Ditto.
+ (-[WebCoreCookieAdapter setCookies:forURL:policyBaseURL:]): Ditto.
+
+ * khtml/rendering/render_applet.cpp: (RenderApplet::processArguments):
+ Tweaked this file a tiny bit, mainly because header dependencies weren't working
+ and we need this file to be recompiled due to inline function changes.
+
2002-11-17 David Hyatt <hyatt at apple.com>
Add support for specifying whether repaint should be immediate or
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 0f3ffab..ce0ea9c 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,50 @@
+2002-11-17 Darin Adler <darin at apple.com>
+
+ - moved all NSURL and CFURL use out of WebCore
+
+ * kwq/KWQKURL.h: Remove getNSURL() and getNSURLFromString().
+ * kwq/KWQKURL.mm: Ditto.
+
+ * kwq/KWQKCookieJar.mm:
+ (KWQKCookieJar::cookie): Pass an NSString instead of an NSURL.
+ (KWQKCookieJar::setCookie): Ditto.
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPart::openURL): Ditto.
+ (KWQKHTMLPart::openURLRequest): Ditto.
+ (KWQKHTMLPart::submitForm): Ditto.
+ (KWQKHTMLPart::urlSelected): Ditto.
+ (KWQKHTMLPart::createPart): Ditto.
+ (KWQKHTMLPart::redirectionTimerStartedOrStopped): Ditto.
+ (KWQKHTMLPart::userAgent): Ditto.
+ (KWQKHTMLPart::requestedURLString): Receive an NSString instead of an NSURL.
+ * kwq/KWQKHTMLPartBrowserExtension.mm:
+ (KHTMLPartBrowserExtension::createNewWindow): Pass an NSString instead of an NSURL.
+ (KHTMLPartBrowserExtension::setIconURL): Ditto.
+ (KHTMLPartBrowserExtension::setTypedIconURL): Ditto.
+ * kwq/KWQKJavaAppletWidget.h: Remove use of NSURL, just use QString instead.
+ * kwq/KWQKJavaAppletWidget.mm:
+ (KJavaAppletWidget::KJavaAppletWidget): No need to set the QString to nil.
+ (KJavaAppletWidget::~KJavaAppletWidget): No need to release the QString.
+ (KJavaAppletWidget::showApplet): Pass an NSString instead of an NSURL.
+ * kwq/KWQLoader.mm:
+ (KWQServeRequest): Pass an NSString instead of an NSURL.
+ (KWQCheckCacheObjectStatus): Ditto.
+ * kwq/WebCoreBridge.h: Change all methods to use NSString instead of NSURL.
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge openURL:reload:headers:]): Receive an NSString instead of an NSURL.
+ (-[WebCoreBridge completeURLForDOMString:]): Return an NSString instead of an NSURL.
+ (-[WebCoreBridge elementAtPoint:]): WebCoreElementLinkURL and WebCoreElementImageURL
+ are now strings.
+ (-[WebCoreBridge URL]): Return an NSString instead of an NSURL.
+ * kwq/WebCoreCookieAdapter.h: Change all methods to use NSString instead of NSURL.
+ * kwq/WebCoreCookieAdapter.m:
+ (-[WebCoreCookieAdapter cookiesForURL:]): Ditto.
+ (-[WebCoreCookieAdapter setCookies:forURL:policyBaseURL:]): Ditto.
+
+ * khtml/rendering/render_applet.cpp: (RenderApplet::processArguments):
+ Tweaked this file a tiny bit, mainly because header dependencies weren't working
+ and we need this file to be recompiled due to inline function changes.
+
2002-11-17 David Hyatt <hyatt at apple.com>
Add support for specifying whether repaint should be immediate or
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 0f3ffab..ce0ea9c 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,50 @@
+2002-11-17 Darin Adler <darin at apple.com>
+
+ - moved all NSURL and CFURL use out of WebCore
+
+ * kwq/KWQKURL.h: Remove getNSURL() and getNSURLFromString().
+ * kwq/KWQKURL.mm: Ditto.
+
+ * kwq/KWQKCookieJar.mm:
+ (KWQKCookieJar::cookie): Pass an NSString instead of an NSURL.
+ (KWQKCookieJar::setCookie): Ditto.
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPart::openURL): Ditto.
+ (KWQKHTMLPart::openURLRequest): Ditto.
+ (KWQKHTMLPart::submitForm): Ditto.
+ (KWQKHTMLPart::urlSelected): Ditto.
+ (KWQKHTMLPart::createPart): Ditto.
+ (KWQKHTMLPart::redirectionTimerStartedOrStopped): Ditto.
+ (KWQKHTMLPart::userAgent): Ditto.
+ (KWQKHTMLPart::requestedURLString): Receive an NSString instead of an NSURL.
+ * kwq/KWQKHTMLPartBrowserExtension.mm:
+ (KHTMLPartBrowserExtension::createNewWindow): Pass an NSString instead of an NSURL.
+ (KHTMLPartBrowserExtension::setIconURL): Ditto.
+ (KHTMLPartBrowserExtension::setTypedIconURL): Ditto.
+ * kwq/KWQKJavaAppletWidget.h: Remove use of NSURL, just use QString instead.
+ * kwq/KWQKJavaAppletWidget.mm:
+ (KJavaAppletWidget::KJavaAppletWidget): No need to set the QString to nil.
+ (KJavaAppletWidget::~KJavaAppletWidget): No need to release the QString.
+ (KJavaAppletWidget::showApplet): Pass an NSString instead of an NSURL.
+ * kwq/KWQLoader.mm:
+ (KWQServeRequest): Pass an NSString instead of an NSURL.
+ (KWQCheckCacheObjectStatus): Ditto.
+ * kwq/WebCoreBridge.h: Change all methods to use NSString instead of NSURL.
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge openURL:reload:headers:]): Receive an NSString instead of an NSURL.
+ (-[WebCoreBridge completeURLForDOMString:]): Return an NSString instead of an NSURL.
+ (-[WebCoreBridge elementAtPoint:]): WebCoreElementLinkURL and WebCoreElementImageURL
+ are now strings.
+ (-[WebCoreBridge URL]): Return an NSString instead of an NSURL.
+ * kwq/WebCoreCookieAdapter.h: Change all methods to use NSString instead of NSURL.
+ * kwq/WebCoreCookieAdapter.m:
+ (-[WebCoreCookieAdapter cookiesForURL:]): Ditto.
+ (-[WebCoreCookieAdapter setCookies:forURL:policyBaseURL:]): Ditto.
+
+ * khtml/rendering/render_applet.cpp: (RenderApplet::processArguments):
+ Tweaked this file a tiny bit, mainly because header dependencies weren't working
+ and we need this file to be recompiled due to inline function changes.
+
2002-11-17 David Hyatt <hyatt at apple.com>
Add support for specifying whether repaint should be immediate or
diff --git a/WebCore/khtml/rendering/render_applet.cpp b/WebCore/khtml/rendering/render_applet.cpp
index 9ae84c2..7321841 100644
--- a/WebCore/khtml/rendering/render_applet.cpp
+++ b/WebCore/khtml/rendering/render_applet.cpp
@@ -120,11 +120,12 @@ void RenderApplet::layout()
void RenderApplet::processArguments(const QMap<QString, QString> &args)
{
KJavaAppletWidget *w = static_cast<KJavaAppletWidget*>(m_widget);
+ KJavaApplet* applet = w ? w->applet() : 0;
+
#if APPLE_CHANGES
if (w)
w->processArguments(args);
#endif
- KJavaApplet* applet = w ? w->applet() : 0;
if ( applet ) {
applet->setBaseURL( args[QString::fromLatin1("baseURL") ] );
diff --git a/WebCore/kwq/KWQKCookieJar.mm b/WebCore/kwq/KWQKCookieJar.mm
index 2f00bc3..9346c28 100644
--- a/WebCore/kwq/KWQKCookieJar.mm
+++ b/WebCore/kwq/KWQKCookieJar.mm
@@ -24,12 +24,13 @@
*/
#import "KWQKCookieJar.h"
+
#import "WebCoreCookieAdapter.h"
#import "KWQKURL.h"
QString KWQKCookieJar::cookie(const KURL &url)
{
- NSString *result = [[WebCoreCookieAdapter sharedAdapter] cookiesForURL:url.getNSURL()];
+ NSString *result = [[WebCoreCookieAdapter sharedAdapter] cookiesForURL:url.url().getNSString()];
if (result != nil) {
return QString::fromNSString(result);
} else {
@@ -39,7 +40,8 @@ QString KWQKCookieJar::cookie(const KURL &url)
void KWQKCookieJar::setCookie(const KURL &url, const KURL &policyBaseURL, const QString &cookie)
{
- [[WebCoreCookieAdapter sharedAdapter] setCookies:cookie.getNSString() forURL:url.getNSURL() policyBaseURL:policyBaseURL.getNSURL()];
+ [[WebCoreCookieAdapter sharedAdapter] setCookies:cookie.getNSString()
+ forURL:url.url().getNSString() policyBaseURL:policyBaseURL.url().getNSString()];
}
bool KWQKCookieJar::cookieEnabled()
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index f589505..ef17fa4 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -137,43 +137,25 @@ QString KWQKHTMLPart::generateFrameName()
void KWQKHTMLPart::openURL(const KURL &url)
{
- NSURL *cocoaURL = url.getNSURL();
- if (cocoaURL == nil) {
- // FIXME: Do we need to report an error to someone?
- return;
- }
-
// FIXME: The lack of args here to get the reload flag from
// indicates a problem in how we use KHTMLPart::processObjectRequest,
// where we are opening the URL before the args are set up.
- [_bridge loadURL:cocoaURL reload:NO triggeringEvent:nil isFormSubmission:NO];
+ [_bridge loadURL:url.url().getNSString() reload:NO triggeringEvent:nil isFormSubmission:NO];
}
void KWQKHTMLPart::openURLRequest(const KURL &url, const URLArgs &args)
{
- NSURL *cocoaURL = url.getNSURL();
- if (cocoaURL == nil) {
- // FIXME: Do we need to report an error to someone?
- return;
- }
-
- [bridgeForFrameName(args.frameName) loadURL:cocoaURL reload:args.reload triggeringEvent:nil isFormSubmission:NO];
+ [bridgeForFrameName(args.frameName) loadURL:url.url().getNSString() reload:args.reload triggeringEvent:nil isFormSubmission:NO];
}
void KWQKHTMLPart::submitForm(const KURL &url, const URLArgs &args)
{
- NSURL *cocoaURL = url.getNSURL();
- if (cocoaURL == nil) {
- // FIXME: Do we need to report an error to someone?
- return;
- }
-
if (!args.doPost()) {
- [bridgeForFrameName(args.frameName) loadURL:cocoaURL reload:args.reload triggeringEvent:_currentEvent isFormSubmission:YES];
+ [bridgeForFrameName(args.frameName) loadURL:url.url().getNSString() reload:args.reload triggeringEvent:_currentEvent isFormSubmission:YES];
} else {
QString contentType = args.contentType();
ASSERT(contentType.startsWith("Content-Type: "));
- [bridgeForFrameName(args.frameName) postWithURL:cocoaURL
+ [bridgeForFrameName(args.frameName) postWithURL:url.url().getNSString()
data:[NSData dataWithBytes:args.postData.data() length:args.postData.size()]
contentType:contentType.mid(14).getNSString() triggeringEvent:_currentEvent];
}
@@ -199,13 +181,7 @@ void KWQKHTMLPart::slotData(NSString *encoding, bool forceEncoding, const char *
void KWQKHTMLPart::urlSelected(const KURL &url, int button, int state, const URLArgs &args)
{
- NSURL *cocoaURL = url.getNSURL();
- if (cocoaURL == nil) {
- // FIXME: Do we need to report an error to someone?
- return;
- }
-
- [bridgeForFrameName(args.frameName) loadURL:cocoaURL reload:args.reload triggeringEvent:_currentEvent isFormSubmission:NO];
+ [bridgeForFrameName(args.frameName) loadURL:url.url().getNSString() reload:args.reload triggeringEvent:_currentEvent isFormSubmission:NO];
}
class KWQPluginPart : public ReadOnlyPart
@@ -216,12 +192,6 @@ class KWQPluginPart : public ReadOnlyPart
ReadOnlyPart *KWQKHTMLPart::createPart(const ChildFrame &child, const KURL &url, const QString &mimeType)
{
- NSURL *childURL = url.getNSURL();
- if (childURL == nil) {
- // FIXME: Do we need to report an error to someone?
- return 0;
- }
-
if (child.m_type == ChildFrame::Object) {
NSMutableArray *attributesArray = [NSMutableArray arrayWithCapacity:child.m_params.count()];
for (uint i = 0; i < child.m_params.count(); i++) {
@@ -229,17 +199,20 @@ ReadOnlyPart *KWQKHTMLPart::createPart(const ChildFrame &child, const KURL &url,
}
KWQPluginPart *newPart = new KWQPluginPart;
- newPart->setWidget(new QWidget([_bridge viewForPluginWithURL:childURL
+ newPart->setWidget(new QWidget([_bridge viewForPluginWithURL:url.url().getNSString()
attributes:attributesArray
- baseURL:KURL(d->m_doc->baseURL()).getNSURL()
+ baseURL:d->m_doc->baseURL().getNSString()
MIMEType:child.m_args.serviceType.getNSString()]));
return newPart;
} else {
LOG(Frames, "name %s", child.m_name.ascii());
HTMLIFrameElementImpl *o = static_cast<HTMLIFrameElementImpl *>(child.m_frame->element());
- WebCoreBridge *childBridge = [_bridge createChildFrameNamed:child.m_name.getNSString() withURL:childURL
- renderPart:child.m_frame allowsScrolling:o->scrollingMode() != QScrollView::AlwaysOff
- marginWidth:o->getMarginWidth() marginHeight:o->getMarginHeight()];
+ WebCoreBridge *childBridge = [_bridge createChildFrameNamed:child.m_name.getNSString()
+ withURL:url.url().getNSString()
+ renderPart:child.m_frame
+ allowsScrolling:o->scrollingMode() != QScrollView::AlwaysOff
+ marginWidth:o->getMarginWidth()
+ marginHeight:o->getMarginHeight()];
return [childBridge part];
}
}
@@ -298,9 +271,9 @@ void KWQKHTMLPart::jumpToSelection()
void KWQKHTMLPart::redirectionTimerStartedOrStopped()
{
if (d->m_redirectionTimer.isActive()) {
- [_bridge reportClientRedirectTo:KURL(d->m_redirectURL).getNSURL()
- delay:d->m_delayRedirect
- fireDate:[d->m_redirectionTimer.getNSTimer() fireDate]];
+ [_bridge reportClientRedirectToURL:d->m_redirectURL.getNSString()
+ delay:d->m_delayRedirect
+ fireDate:[d->m_redirectionTimer.getNSTimer() fireDate]];
} else {
[_bridge reportClientRedirectCancelled];
}
@@ -357,7 +330,7 @@ RenderObject *KWQKHTMLPart::renderer()
QString KWQKHTMLPart::userAgent() const
{
- return QString::fromNSString([_bridge userAgentForURL:part->m_url.getNSURL()]);
+ return QString::fromNSString([_bridge userAgentForURL:part->m_url.url().getNSString()]);
}
NSView *KWQKHTMLPart::nextKeyViewInFrame(NodeImpl *node, KWQSelectionDirection direction)
@@ -507,7 +480,7 @@ void KWQKHTMLPart::setPolicyBaseURL(const DOM::DOMString &s)
QString KWQKHTMLPart::requestedURLString() const
{
- return QString::fromNSString([[_bridge requestedURL] absoluteString]);
+ return QString::fromNSString([_bridge requestedURL]);
}
void KWQKHTMLPart::forceLayout()
diff --git a/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm b/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm
index 9a6ae2b..1aba073 100644
--- a/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm
+++ b/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm
@@ -69,15 +69,14 @@ void KHTMLPartBrowserExtension::createNewWindow(const KURL &url,
bridge = [m_part->kwq->bridge() findFramedNamed:frameName];
if (bridge != nil) {
if (!url.isEmpty()) {
- [bridge loadURL:url.getNSURL() reload:urlArgs.reload triggeringEvent:nil isFormSubmission:NO];
+ [bridge loadURL:url.url().getNSString() reload:urlArgs.reload triggeringEvent:nil isFormSubmission:NO];
}
*partResult = [bridge part];
return;
}
}
- NSURL *cocoaURL = url.isEmpty() ? nil : url.getNSURL();
- bridge = [m_part->kwq->bridge() createWindowWithURL:cocoaURL frameName:frameName];
+ bridge = [m_part->kwq->bridge() createWindowWithURL:url.url().getNSString() frameName:frameName];
if (!winArgs.toolBarsVisible) {
[bridge setToolbarsVisible:NO];
@@ -129,10 +128,10 @@ void KHTMLPartBrowserExtension::createNewWindow(const KURL &url,
void KHTMLPartBrowserExtension::setIconURL(const KURL &url)
{
- [m_part->kwq->bridge() setIconURL:url.getNSURL()];
+ [m_part->kwq->bridge() setIconURL:url.url().getNSString()];
}
void KHTMLPartBrowserExtension::setTypedIconURL(const KURL &url, const QString &type)
{
- [m_part->kwq->bridge() setIconURL:url.getNSURL() withType:type.getNSString()];
+ [m_part->kwq->bridge() setIconURL:url.url().getNSString() withType:type.getNSString()];
}
diff --git a/WebCore/kwq/KWQKJavaAppletWidget.h b/WebCore/kwq/KWQKJavaAppletWidget.h
index dba2340..c35c579 100644
--- a/WebCore/kwq/KWQKJavaAppletWidget.h
+++ b/WebCore/kwq/KWQKJavaAppletWidget.h
@@ -31,10 +31,8 @@ class KJavaAppletContext;
class KJavaAppletWidget;
#ifdef __OBJC__
- at class NSURL;
@class NSMutableDictionary;
#else
-class NSURL;
class NSMutableDictionary;
#endif
@@ -63,18 +61,18 @@ public:
void processArguments(const QMap<QString, QString>&);
- KJavaApplet *applet() { return &m_applet; }
+ KJavaApplet *applet() { return &_applet; }
- void setBaseURL(const QString &);
+ void setBaseURL(const QString &baseURL) { _baseURL = baseURL; }
void setParameter(const QString &, const QString &);
void showApplet();
private:
- KJavaApplet m_applet;
- KJavaAppletContext *m_context;
- NSURL *m_baseURL;
- NSMutableDictionary *m_parameters;
+ KJavaApplet _applet;
+ KJavaAppletContext *_context;
+ QString _baseURL;
+ NSMutableDictionary *_parameters;
};
inline void KJavaApplet::setBaseURL(const QString &URL) { m_widget.setBaseURL(URL); }
diff --git a/WebCore/kwq/KWQKJavaAppletWidget.mm b/WebCore/kwq/KWQKJavaAppletWidget.mm
index e134094..6d01fb1 100644
--- a/WebCore/kwq/KWQKJavaAppletWidget.mm
+++ b/WebCore/kwq/KWQKJavaAppletWidget.mm
@@ -31,23 +31,15 @@
#import "WebCoreBridge.h"
KJavaAppletWidget::KJavaAppletWidget(KJavaAppletContext *c, QWidget *)
- : m_applet(*this)
- , m_baseURL(nil)
- , m_parameters([[NSMutableDictionary alloc] init])
+ : _applet(*this)
+ , _context(c)
+ , _parameters([[NSMutableDictionary alloc] init])
{
- m_context = c;
}
KJavaAppletWidget::~KJavaAppletWidget()
{
- [m_baseURL release];
- [m_parameters release];
-}
-
-void KJavaAppletWidget::setBaseURL(const QString &baseURL)
-{
- [m_baseURL release];
- m_baseURL = [KURL(baseURL).getNSURL() retain];
+ [_parameters release];
}
void KJavaAppletWidget::setParameter(const QString &name, const QString &value)
@@ -55,7 +47,7 @@ void KJavaAppletWidget::setParameter(const QString &name, const QString &value)
// When putting strings into dictionaries, we should use an immutable copy.
// That's not necessary for keys, because they are copied.
NSString *immutableString = [value.getNSString() copy];
- [m_parameters setObject:immutableString forKey:name.getNSString()];
+ [_parameters setObject:immutableString forKey:name.getNSString()];
[immutableString release];
}
@@ -68,8 +60,8 @@ void KJavaAppletWidget::processArguments(const QMap<QString, QString> &arguments
void KJavaAppletWidget::showApplet()
{
- setView([m_context->part()->kwq->bridge()
-viewForJavaAppletWithFrame:NSMakeRect(pos().x(), pos().y(), size().width(), size().height())
- attributes:m_parameters
- baseURL:m_baseURL]);
+ setView([_context->part()->kwq->bridge()
+ viewForJavaAppletWithFrame:NSMakeRect(pos().x(), pos().y(), size().width(), size().height())
+ attributes:_parameters
+ baseURL:_baseURL.getNSString()]);
}
diff --git a/WebCore/kwq/KWQKURL.h b/WebCore/kwq/KWQKURL.h
index bb75ba0..ae279d2 100644
--- a/WebCore/kwq/KWQKURL.h
+++ b/WebCore/kwq/KWQKURL.h
@@ -30,12 +30,6 @@
#include "KWQValueList.h"
#include "KWQRefPtr.h"
-#ifdef __OBJC__
- at class NSURL;
-#else
-class NSURL;
-#endif
-
class KURL {
public:
KURL();
@@ -71,11 +65,8 @@ public:
QString prettyURL(int trailing=0) const;
- NSURL *getNSURL() const;
-
static QString decode_string(const QString &);
static QString encode_string(const QString &);
- static NSURL *getNSURLFromString(const QString &);
friend bool operator==(const KURL &, const KURL &);
diff --git a/WebCore/kwq/KWQKURL.mm b/WebCore/kwq/KWQKURL.mm
index 1b962a2..fc0b14e 100644
--- a/WebCore/kwq/KWQKURL.mm
+++ b/WebCore/kwq/KWQKURL.mm
@@ -1055,11 +1055,6 @@ void KURL::parse(const char *url, const QString *originalString)
}
}
-NSURL *KURL::getNSURL() const
-{
- return KURL::getNSURLFromString(urlString);
-}
-
QString KURL::encodedHtmlRef() const
{
return ref();
@@ -1113,31 +1108,3 @@ QString KURL::encode_string(const QString& notEncodedString)
return result;
}
-
-NSURL *KURL::getNSURLFromString(const QString &urlString)
-{
- NSString *string = urlString.getNSString();
-
- // Had to re-add this hack to work around CFURL bug 2908969, and to prevent the symptoms
- // described in bug 3032058.
- if ([string hasPrefix:@"file:/"] && ![string hasPrefix:@"file://"]) {
- string = [NSString stringWithFormat:@"file://%@", [string substringFromIndex:5]];
- }
-
- NSURL *URL = [NSURL URLWithString:string];
- if (!URL) {
- // Try to create URL again, but this time do some more string escaping first.
- // Eventually, we would prefer not to have to take this extra step, as the extra
- // escaping causes bugs like 3064743.
- // Note the set of unescaped characters contains the square brackets.
- // This is a bit of license we take with CFURL and its code to detect characters
- // it considers illegal. See 3102332 for more information.
- CFStringRef stricterString = CFURLCreateStringByAddingPercentEscapes(NULL, (CFStringRef)string, CFSTR("[]%"), NULL, kCFStringEncodingUTF8);
- if (stricterString) {
- URL = [NSURL URLWithString:(NSString *)stricterString];
- CFRelease(stricterString);
- }
- }
-
- return URL;
-}
diff --git a/WebCore/kwq/KWQLoader.mm b/WebCore/kwq/KWQLoader.mm
index 8bc5ba4..215471c 100644
--- a/WebCore/kwq/KWQLoader.mm
+++ b/WebCore/kwq/KWQLoader.mm
@@ -47,15 +47,8 @@ bool KWQServeRequest(Loader *loader, Request *request, TransferJob *job)
WebCoreBridge *bridge = ((KHTMLPart *)request->m_docLoader->part())->kwq->bridge();
- NSURL *URL = job->url().getNSURL();
- if (URL == nil) {
- [bridge reportBadURL:job->url().url().getNSString()];
- delete job;
- return false;
- }
-
KWQResourceLoader *resourceLoader = [[KWQResourceLoader alloc] initWithLoader:loader job:job];
- id <WebCoreResourceHandle> handle = [bridge startLoadingResource:resourceLoader withURL:URL];
+ id <WebCoreResourceHandle> handle = [bridge startLoadingResource:resourceLoader withURL:job->url().url().getNSString()];
[resourceLoader setHandle:handle];
[resourceLoader release];
@@ -88,10 +81,10 @@ void KWQCheckCacheObjectStatus(DocLoader *loader, CachedObject *cachedObject)
// Notify the caller that we "loaded".
WebCoreBridge *bridge = ((KHTMLPart *)loader->part())->kwq->bridge();
- NSURL *URL = KURL::getNSURLFromString(cachedObject->url().string());
- ASSERT(URL);
CachedImage *cachedImage = dynamic_cast<CachedImage *>(cachedObject);
- [bridge objectLoadedFromCache:URL response:(id)cachedObject->response() size:cachedImage ? cachedImage->dataSize() : cachedObject->size()];
+ [bridge objectLoadedFromCacheWithURL:cachedObject->url().string().getNSString()
+ response:(id)cachedObject->response()
+ size:cachedImage ? cachedImage->dataSize() : cachedObject->size()];
}
void KWQRetainResponse(void *response)
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 368f918..9fabf30 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -94,7 +94,7 @@ enum FrameBorderStyle {
- (void)setParent:(WebCoreBridge *)parent;
-- (void)openURL:(NSURL *)URL reload:(BOOL)reload headers:(NSDictionary *)headers;
+- (void)openURL:(NSString *)URL reload:(BOOL)reload headers:(NSDictionary *)headers;
- (void)addData:(NSData *)data withEncoding:(NSString *)encoding;
- (void)addData:(NSData *)data withOverrideEncoding:(NSString *)encoding;
- (void)closeURL;
@@ -102,7 +102,7 @@ enum FrameBorderStyle {
- (void)restoreDocumentState;
- (void)end;
-- (NSURL *)URL;
+- (NSString *)URL;
- (NSString *)referrer;
- (void)installInFrame:(NSView *)view;
@@ -179,21 +179,21 @@ enum FrameBorderStyle {
/* Creates a name for an frame unnamed in the HTML. It should produce repeatable results for loads of the same frameset. */
- (NSString *)generateFrameName;
-- (void)loadURL:(NSURL *)URL reload:(BOOL)reload triggeringEvent:(NSEvent *)event isFormSubmission:(BOOL)isFormSubmission;
-- (void)postWithURL:(NSURL *)URL data:(NSData *)data contentType:(NSString *)contentType triggeringEvent:(NSEvent *)event;
+- (void)loadURL:(NSString *)URL reload:(BOOL)reload triggeringEvent:(NSEvent *)event isFormSubmission:(BOOL)isFormSubmission;
+- (void)postWithURL:(NSString *)URL data:(NSData *)data contentType:(NSString *)contentType triggeringEvent:(NSEvent *)event;
-- (WebCoreBridge *)createWindowWithURL:(NSURL *)URL frameName:(NSString *)name;
+- (WebCoreBridge *)createWindowWithURL:(NSString *)URL frameName:(NSString *)name;
- (void)showWindow;
-- (NSString *)userAgentForURL:(NSURL *)URL;
+- (NSString *)userAgentForURL:(NSString *)URL;
- (void)setTitle:(NSString *)title;
- (void)setStatusText:(NSString *)status;
-- (void)setIconURL:(NSURL *)URL;
-- (void)setIconURL:(NSURL *)URL withType:(NSString *)string;
+- (void)setIconURL:(NSString *)URL;
+- (void)setIconURL:(NSString *)URL withType:(NSString *)string;
-- (WebCoreBridge *)createChildFrameNamed:(NSString *)frameName withURL:(NSURL *)URL
+- (WebCoreBridge *)createChildFrameNamed:(NSString *)frameName withURL:(NSString *)URL
renderPart:(KHTMLRenderPart *)renderPart
allowsScrolling:(BOOL)allowsScrolling marginWidth:(int)width marginHeight:(int)height;
@@ -206,12 +206,11 @@ enum FrameBorderStyle {
- (NSWindow *)window;
- (void)setWindowFrame:(NSRect)frame;
-- (id <WebCoreResourceHandle>)startLoadingResource:(id <WebCoreResourceLoader>)loader withURL:(NSURL *)URL;
-- (void)reportBadURL:(NSString *)badURL;
-- (void)objectLoadedFromCache:(NSURL *)URL response:(id)response size:(unsigned)bytes;
+- (id <WebCoreResourceHandle>)startLoadingResource:(id <WebCoreResourceLoader>)loader withURL:(NSString *)URL;
+- (void)objectLoadedFromCacheWithURL:(NSString *)URL response:(id)response size:(unsigned)bytes;
- (BOOL)isReloading;
-- (void)reportClientRedirectTo:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date;
+- (void)reportClientRedirectToURL:(NSString *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date;
- (void)reportClientRedirectCancelled;
- (void)unfocusWindow;
@@ -227,10 +226,10 @@ enum FrameBorderStyle {
- (void)setNeedsReapplyStyles;
- (void)setNeedsLayout;
-- (NSURL *)requestedURL;
+- (NSString *)requestedURL;
-- (NSView *)viewForPluginWithURL:(NSURL *)URL attributes:(NSArray *)attributesArray baseURL:(NSURL *)baseURL MIMEType:(NSString *)MIMEType;
-- (NSView *)viewForJavaAppletWithFrame:(NSRect)frame attributes:(NSDictionary *)attributes baseURL:(NSURL *)baseURL;
+- (NSView *)viewForPluginWithURL:(NSString *)URL attributes:(NSArray *)attributesArray baseURL:(NSString *)baseURL MIMEType:(NSString *)MIMEType;
+- (NSView *)viewForJavaAppletWithFrame:(NSRect)frame attributes:(NSDictionary *)attributes baseURL:(NSString *)baseURL;
@end
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index 57ffa65..40de49e 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -110,7 +110,7 @@ using khtml::RenderPart;
_part->setParent([parent part]);
}
-- (void)openURL:(NSURL *)URL reload:(BOOL)reload headers:(NSDictionary *)headers
+- (void)openURL:(NSString *)URL reload:(BOOL)reload headers:(NSDictionary *)headers
{
URLArgs args(_part->browserExtension()->urlArgs());
@@ -126,7 +126,7 @@ using khtml::RenderPart;
_part->browserExtension()->setURLArgs(args);
// URL
- _part->openURL([[URL absoluteString] cString]);
+ _part->openURL([URL cString]);
// Refresh
NSString *refreshHeader = [headers objectForKey:@"Refresh"];
@@ -443,9 +443,9 @@ using khtml::RenderPart;
}
}
-- (NSURL *)completeURLForDOMString:(const DOMString &)s
+- (NSString *)completeURLForDOMString:(const DOMString &)s
{
- return KURL(_part->kwq->document()->completeURL(s.string())).getNSURL();
+ return _part->kwq->document()->completeURL(s.string()).getNSString();
}
- (NSDictionary *)elementAtPoint:(NSPoint)point
@@ -463,7 +463,7 @@ using khtml::RenderPart;
if (URLNode) {
ElementImpl* e = static_cast<ElementImpl*>(URLNode);
- NSURL *URL = [self completeURLForDOMString:parseURL(e->getAttribute(ATTR_HREF))];
+ NSString *URL = [self completeURLForDOMString:parseURL(e->getAttribute(ATTR_HREF))];
if (URL) {
// Look for the first #text node to use as a label.
NodeImpl *labelParent = e;
@@ -495,7 +495,7 @@ using khtml::RenderPart;
NodeImpl *node = nodeInfo.innerNonSharedNode();
if (node && isImage(node)) {
ElementImpl* i = static_cast<ElementImpl*>(node);
- NSURL *URL = [self completeURLForDOMString:parseURL(i->getAttribute(ATTR_SRC))];
+ NSString *URL = [self completeURLForDOMString:parseURL(i->getAttribute(ATTR_SRC))];
if (URL) {
[elementInfo setObject:URL forKey:WebCoreElementImageURL];
RenderImage *r = (RenderImage *)node->renderer();
@@ -781,9 +781,9 @@ static NSAttributedString *attributedString(DOM::NodeImpl *_startNode, int start
return _part->name().getNSString();
}
-- (NSURL *)URL
+- (NSString *)URL
{
- return _part->url().getNSURL();
+ return _part->url().url().getNSString();
}
- (NSString *)referrer
diff --git a/WebCore/kwq/WebCoreCookieAdapter.h b/WebCore/kwq/WebCoreCookieAdapter.h
index 5aa64ba..b873aa5 100644
--- a/WebCore/kwq/WebCoreCookieAdapter.h
+++ b/WebCore/kwq/WebCoreCookieAdapter.h
@@ -32,7 +32,7 @@
+ (WebCoreCookieAdapter *)sharedAdapter;
- (BOOL)cookiesEnabled;
-- (NSString *)cookiesForURL:(NSURL *)url;
-- (void)setCookies:(NSString *)cookies forURL:(NSURL *)url policyBaseURL:(NSURL *)url;
+- (NSString *)cookiesForURL:(NSString *)URL;
+- (void)setCookies:(NSString *)cookies forURL:(NSString *)URL policyBaseURL:(NSString *)URL;
@end
diff --git a/WebCore/kwq/WebCoreCookieAdapter.m b/WebCore/kwq/WebCoreCookieAdapter.m
index d0aa751..89d829e 100644
--- a/WebCore/kwq/WebCoreCookieAdapter.m
+++ b/WebCore/kwq/WebCoreCookieAdapter.m
@@ -50,12 +50,12 @@ static WebCoreCookieAdapter *sharedAdapter;
return FALSE;
}
-- (NSString *)cookiesForURL:(NSURL *)url
+- (NSString *)cookiesForURL:(NSString *)URL
{
return nil;
}
-- (void)setCookies:(NSString *)cookies forURL:(NSURL *)url policyBaseURL:(NSURL *)policyBaseURL
+- (void)setCookies:(NSString *)cookies forURL:(NSString *)URL policyBaseURL:(NSString *)policyBaseURL
{
}
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 6a43789..f52ed2b 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,35 @@
+2002-11-17 Darin Adler <darin at apple.com>
+
+ - update for change to WebCore API so it never uses NSURL
+
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge createWindowWithURL:frameName:]): Take NSString instead of NSURL.
+ (-[WebBridge startLoadingResource:withURL:]): Ditto.
+ (-[WebBridge objectLoadedFromCacheWithURL:response:size:]): Ditto.
+ (-[WebBridge reportClientRedirectToURL:delay:fireDate:]): Ditto.
+ (-[WebBridge setIconURL:]): Ditto.
+ (-[WebBridge setIconURL:withType:]): Ditto.
+ (-[WebBridge loadURL:reload:triggeringEvent:isFormSubmission:]): Ditto.
+ (-[WebBridge postWithURL:data:contentType:triggeringEvent:]): Ditto.
+ (-[WebBridge createChildFrameNamed:withURL:renderPart:allowsScrolling:marginWidth:marginHeight:]): Ditto.
+ (-[WebBridge userAgentForURL:]): Ditto.
+ (-[WebBridge requestedURL]): Return NSString instead of NSURL.
+ (-[WebBridge viewForPluginWithURL:attributes:baseURL:MIMEType:]): Take NSString instead of NSURL.
+ (-[WebBridge viewForJavaAppletWithFrame:attributes:baseURL:]): Take NSString instead of NSURL.
+
+ * WebCoreSupport.subproj/WebCookieAdapter.m:
+ (-[WebCookieAdapter cookiesForURL:]): Take NSString instead of NSURL.
+ (-[WebCookieAdapter setCookies:forURL:policyBaseURL:]): Ditto.
+
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (-[WebDataSource _commitIfReady]): Pass NSString instead of NSURL.
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _continueFragmentScrollAfterNavigationPolicy:request:]): Pass NSString instead of NSURL
+ (-[WebFrame _loadURL:loadType:triggeringEvent:isFormSubmission:]): Turn bridge URL into NSURL so we
+ can call _web_URLByRemovingFragment on it.
+ * WebView.subproj/WebHTMLViewPrivate.m:
+ (-[WebHTMLView _elementAtPoint:]): Convert NSString to NSURL when making the WebKit element dictionary.
+
2002-11-17 Maciej Stachowiak <mjs at apple.com>
- fixed 2949193 - implement onKeyDown, onKeyPress, and onKeyUp event handlers
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 6a43789..f52ed2b 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,35 @@
+2002-11-17 Darin Adler <darin at apple.com>
+
+ - update for change to WebCore API so it never uses NSURL
+
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge createWindowWithURL:frameName:]): Take NSString instead of NSURL.
+ (-[WebBridge startLoadingResource:withURL:]): Ditto.
+ (-[WebBridge objectLoadedFromCacheWithURL:response:size:]): Ditto.
+ (-[WebBridge reportClientRedirectToURL:delay:fireDate:]): Ditto.
+ (-[WebBridge setIconURL:]): Ditto.
+ (-[WebBridge setIconURL:withType:]): Ditto.
+ (-[WebBridge loadURL:reload:triggeringEvent:isFormSubmission:]): Ditto.
+ (-[WebBridge postWithURL:data:contentType:triggeringEvent:]): Ditto.
+ (-[WebBridge createChildFrameNamed:withURL:renderPart:allowsScrolling:marginWidth:marginHeight:]): Ditto.
+ (-[WebBridge userAgentForURL:]): Ditto.
+ (-[WebBridge requestedURL]): Return NSString instead of NSURL.
+ (-[WebBridge viewForPluginWithURL:attributes:baseURL:MIMEType:]): Take NSString instead of NSURL.
+ (-[WebBridge viewForJavaAppletWithFrame:attributes:baseURL:]): Take NSString instead of NSURL.
+
+ * WebCoreSupport.subproj/WebCookieAdapter.m:
+ (-[WebCookieAdapter cookiesForURL:]): Take NSString instead of NSURL.
+ (-[WebCookieAdapter setCookies:forURL:policyBaseURL:]): Ditto.
+
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (-[WebDataSource _commitIfReady]): Pass NSString instead of NSURL.
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _continueFragmentScrollAfterNavigationPolicy:request:]): Pass NSString instead of NSURL
+ (-[WebFrame _loadURL:loadType:triggeringEvent:isFormSubmission:]): Turn bridge URL into NSURL so we
+ can call _web_URLByRemovingFragment on it.
+ * WebView.subproj/WebHTMLViewPrivate.m:
+ (-[WebHTMLView _elementAtPoint:]): Convert NSString to NSURL when making the WebKit element dictionary.
+
2002-11-17 Maciej Stachowiak <mjs at apple.com>
- fixed 2949193 - implement onKeyDown, onKeyPress, and onKeyUp event handlers
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index d63a080..a17f856 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -95,11 +95,11 @@
return [[frame findOrCreateFramedNamed:name] _bridge];
}
-- (WebCoreBridge *)createWindowWithURL:(NSURL *)URL frameName:(NSString *)name
+- (WebCoreBridge *)createWindowWithURL:(NSString *)URL frameName:(NSString *)name
{
ASSERT(frame != nil);
- WebResourceRequest *request = URL ? [WebResourceRequest requestWithURL:URL] : nil;
+ WebResourceRequest *request = [WebResourceRequest requestWithURL:[NSURL _web_URLWithString:URL]];
WebController *newController = [[[frame controller] windowOperationsDelegate] createWindowWithRequest:request];
[newController _setTopLevelFrameName:name];
return [[newController mainFrame] _bridge];
@@ -193,20 +193,20 @@
}
}
-- (id <WebCoreResourceHandle>)startLoadingResource:(id <WebCoreResourceLoader>)resourceLoader withURL:(NSURL *)URL
+- (id <WebCoreResourceHandle>)startLoadingResource:(id <WebCoreResourceLoader>)resourceLoader withURL:(NSString *)URL
{
return [WebSubresourceClient startLoadingResource:resourceLoader
- withURL:URL
+ withURL:[NSURL _web_URLWithString:URL]
referrer:[self referrer]
forDataSource:[self dataSource]];
}
-- (void)objectLoadedFromCache:(NSURL *)URL response: response size:(unsigned)bytes
+- (void)objectLoadedFromCacheWithURL:(NSString *)URL response: response size:(unsigned)bytes
{
ASSERT(frame != nil);
ASSERT(response != nil);
- WebResourceRequest *request = [[WebResourceRequest alloc] initWithURL:URL];
+ WebResourceRequest *request = [[WebResourceRequest alloc] initWithURL:[NSURL _web_URLWithString:URL]];
id <WebResourceLoadDelegate> delegate = [[frame controller] resourceLoadDelegate];
id identifier;
@@ -225,9 +225,9 @@
return [[[self dataSource] request] requestCachePolicy] == WebRequestCachePolicyLoadFromOrigin;
}
-- (void)reportClientRedirectTo:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date
+- (void)reportClientRedirectToURL:(NSString *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date
{
- [frame _clientRedirectedTo:URL delay:seconds fireDate:date];
+ [frame _clientRedirectedTo:[NSURL _web_URLWithString:URL] delay:seconds fireDate:date];
}
- (void)reportClientRedirectCancelled
@@ -255,24 +255,24 @@
}
}
-- (void)setIconURL:(NSURL *)URL
+- (void)setIconURL:(NSString *)URL
{
- [[self dataSource] _setIconURL:URL];
+ [[self dataSource] _setIconURL:[NSURL _web_URLWithString:URL]];
}
-- (void)setIconURL:(NSURL *)URL withType:(NSString *)type
+- (void)setIconURL:(NSString *)URL withType:(NSString *)type
{
- [[self dataSource] _setIconURL:URL withType:type];
+ [[self dataSource] _setIconURL:[NSURL _web_URLWithString:URL] withType:type];
}
-- (void)loadURL:(NSURL *)URL reload:(BOOL)reload triggeringEvent:(NSEvent *)event isFormSubmission:(BOOL)isFormSubmission
+- (void)loadURL:(NSString *)URL reload:(BOOL)reload triggeringEvent:(NSEvent *)event isFormSubmission:(BOOL)isFormSubmission
{
- [frame _loadURL:URL loadType:(reload ? WebFrameLoadTypeReload : WebFrameLoadTypeStandard) triggeringEvent:event isFormSubmission:isFormSubmission];
+ [frame _loadURL:[NSURL _web_URLWithString:URL] loadType:(reload ? WebFrameLoadTypeReload : WebFrameLoadTypeStandard) triggeringEvent:event isFormSubmission:isFormSubmission];
}
-- (void)postWithURL:(NSURL *)URL data:(NSData *)data contentType:(NSString *)contentType triggeringEvent:(NSEvent *)event
+- (void)postWithURL:(NSString *)URL data:(NSData *)data contentType:(NSString *)contentType triggeringEvent:(NSEvent *)event
{
- [frame _postWithURL:URL data:data contentType:contentType triggeringEvent:event];
+ [frame _postWithURL:[NSURL _web_URLWithString:URL] data:data contentType:contentType triggeringEvent:event];
}
- (NSString *)generateFrameName
@@ -280,7 +280,7 @@
return [frame _generateFrameName];
}
-- (WebCoreBridge *)createChildFrameNamed:(NSString *)frameName withURL:(NSURL *)URL
+- (WebCoreBridge *)createChildFrameNamed:(NSString *)frameName withURL:(NSString *)URL
renderPart:(KHTMLRenderPart *)childRenderPart
allowsScrolling:(BOOL)allowsScrolling marginWidth:(int)width marginHeight:(int)height
{
@@ -296,24 +296,14 @@
[[newFrame webView] _setMarginHeight:height];
// We must avoid loading the document itself as a subframe, like
- // other browsers do, otherwise bugs like Radar 3083732 occur
- if (![[[URL _web_URLByRemovingFragment] absoluteURL] isEqual:[[[frame dataSource] URL] absoluteURL]]) {
- [frame _loadURL:URL intoChild:newFrame];
+ // other browsers do, otherwise bugs like Radar 3083732 occur.
+ if (![[[[NSURL _web_URLWithString:URL] _web_URLByRemovingFragment] absoluteURL] isEqual:[[[frame dataSource] URL] absoluteURL]]) {
+ [frame _loadURL:[NSURL _web_URLWithString:URL] intoChild:newFrame];
}
return [newFrame _bridge];
}
-- (void)reportBadURL:(NSString *)badURL
-{
- WebError *badURLError = [[WebError alloc] initWithErrorCode:WebErrorCodeBadURLError
- inDomain:WebErrorDomainWebFoundation
- failingURL:badURL];
- [[frame controller] _receivedError:badURLError
- fromDataSource:[self dataSource]];
- [badURLError release];
-}
-
- (void)saveDocumentState: (NSArray *)documentState
{
WebHistoryItem *item = [frame _itemForSavingDocState];
@@ -332,9 +322,9 @@
return [[frame _itemForRestoringDocState] documentState];
}
-- (NSString *)userAgentForURL:(NSURL *)URL
+- (NSString *)userAgentForURL:(NSString *)URL
{
- return [[frame controller] userAgentForURL:URL];
+ return [[frame controller] userAgentForURL:[NSURL _web_URLWithString:URL]];
}
- (NSView *)nextKeyViewOutsideWebViews
@@ -374,9 +364,9 @@
[view setNeedsDisplay:YES];
}
-- (NSURL *)requestedURL
+- (NSString *)requestedURL
{
- return [[[self dataSource] request] URL];
+ return [[[[self dataSource] request] URL] absoluteString];
}
- (NSView <WebPlugin> *)pluginViewWithPackage:(WebPluginPackage *)pluginPackage
@@ -398,9 +388,9 @@
return view;
}
-- (NSView *)viewForPluginWithURL:(NSURL *)URL
+- (NSView *)viewForPluginWithURL:(NSString *)URL
attributes:(NSArray *)attributesArray
- baseURL:(NSURL *)baseURL
+ baseURL:(NSString *)baseURL
MIMEType:(NSString *)MIMEType
{
NSRange r1, r2, r3;
@@ -425,7 +415,7 @@
if ([MIMEType length]) {
pluginPackage = [[WebPluginDatabase installedPlugins] pluginForMIMEType:MIMEType];
} else {
- NSString *extension = [[URL path] pathExtension];
+ NSString *extension = [URL pathExtension];
pluginPackage = [[WebPluginDatabase installedPlugins] pluginForExtension:extension];
MIMEType = [pluginPackage MIMETypeForExtension:extension];
}
@@ -434,13 +424,13 @@
if([pluginPackage isKindOfClass:[WebPluginPackage class]]){
view = [self pluginViewWithPackage:(WebPluginPackage *)pluginPackage
attributes:attributes
- baseURL:baseURL];
+ baseURL:[NSURL _web_URLWithString:baseURL]];
}
else if([pluginPackage isKindOfClass:[WebNetscapePluginPackage class]]){
view = [[[WebNetscapePluginEmbeddedView alloc] initWithFrame:NSZeroRect
plugin:(WebNetscapePluginPackage *)pluginPackage
- URL:URL
- baseURL:baseURL
+ URL:[NSURL _web_URLWithString:URL]
+ baseURL:[NSURL _web_URLWithString:baseURL]
MIMEType:MIMEType
attributes:attributes] autorelease];
}else{
@@ -463,7 +453,7 @@
}
WebPluginError *error = [WebPluginError pluginErrorWithCode:errorCode
- URL:URL
+ URL:[NSURL _web_URLWithString:URL]
pluginPageURL:pluginPageURL
pluginName:[pluginPackage name]
MIMEType:MIMEType];
@@ -476,7 +466,7 @@
return view;
}
-- (NSView *)viewForJavaAppletWithFrame:(NSRect)theFrame attributes:(NSDictionary *)attributes baseURL:(NSURL *)baseURL
+- (NSView *)viewForJavaAppletWithFrame:(NSRect)theFrame attributes:(NSDictionary *)attributes baseURL:(NSString *)baseURL
{
NSString *MIMEType = @"application/x-java-applet";
WebBasePluginPackage *pluginPackage;
@@ -493,13 +483,13 @@
view = [self pluginViewWithPackage:(WebPluginPackage *)pluginPackage
attributes:theAttributes
- baseURL:baseURL];
+ baseURL:[NSURL _web_URLWithString:baseURL]];
}
else if([pluginPackage isKindOfClass:[WebNetscapePluginPackage class]]){
view = [[[WebNetscapePluginEmbeddedView alloc] initWithFrame:theFrame
plugin:(WebNetscapePluginPackage *)pluginPackage
URL:nil
- baseURL:baseURL
+ baseURL:[NSURL _web_URLWithString:baseURL]
MIMEType:MIMEType
attributes:attributes] autorelease];
}else{
diff --git a/WebKit/WebCoreSupport.subproj/WebCookieAdapter.m b/WebKit/WebCoreSupport.subproj/WebCookieAdapter.m
index 714c2f8..b47ad29 100644
--- a/WebKit/WebCoreSupport.subproj/WebCookieAdapter.m
+++ b/WebKit/WebCoreSupport.subproj/WebCookieAdapter.m
@@ -7,10 +7,11 @@
//
#import "WebCookieAdapter.h"
-#import <WebFoundation/WebCookieManager.h>
+
#import <WebFoundation/WebAssertions.h>
#import <WebFoundation/WebCookieConstants.h>
-
+#import <WebFoundation/WebCookieManager.h>
+#import <WebFoundation/WebNSURLExtras.h>
@implementation WebCookieAdapter
@@ -32,14 +33,15 @@
return result;
}
-- (NSString *)cookiesForURL:(NSURL *)URL
+- (NSString *)cookiesForURL:(NSString *)URL
{
- return [[[WebCookieManager sharedCookieManager] cookieRequestHeadersForURL:URL] objectForKey:@"Cookie"];
+ return [[[WebCookieManager sharedCookieManager] cookieRequestHeadersForURL:[NSURL _web_URLWithString:URL]] objectForKey:@"Cookie"];
}
-- (void)setCookies:(NSString *)cookies forURL:(NSURL *)URL policyBaseURL:(NSURL *)policyBaseURL
+- (void)setCookies:(NSString *)cookies forURL:(NSString *)URL policyBaseURL:(NSString *)policyBaseURL
{
- [[WebCookieManager sharedCookieManager] setCookiesFromResponseHeaders:[NSDictionary dictionaryWithObject:cookies forKey:@"Set-Cookie"] forURL:URL policyBaseURL:policyBaseURL];
+ [[WebCookieManager sharedCookieManager] setCookiesFromResponseHeaders:[NSDictionary dictionaryWithObject:cookies forKey:@"Set-Cookie"]
+ forURL:[NSURL _web_URLWithString:URL] policyBaseURL:[NSURL _web_URLWithString:policyBaseURL]];
}
@end
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 8128363..3a9e3f2 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -435,7 +435,7 @@
_private->committed = TRUE;
[self _makeRepresentation];
[[self webFrame] _transitionToCommitted];
- [[self _bridge] openURL:[_private->response URL] reload:reload headers:headers];
+ [[self _bridge] openURL:[[_private->response URL] absoluteString] reload:reload headers:headers];
}
}
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 2676509..ca50744 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -1051,7 +1051,7 @@ static const char * const stateNames[] = {
ASSERT(![_private previousItem]);
// will save form state to current item, since prevItem not set
- [_private->bridge openURL:URL reload:NO headers:nil];
+ [_private->bridge openURL:[URL absoluteString] reload:NO headers:nil];
[dataSrc _setURL:URL];
// NB: must happen after _setURL, since we add based on the current request
[self _addBackForwardItemClippedAtTarget:NO];
@@ -1083,7 +1083,7 @@ static const char * const stateNames[] = {
// FIXME: This logic doesn't exactly match what KHTML does in openURL, so it's possible
// this will screw up in some cases involving framesets.
- if (loadType != WebFrameLoadTypeReload && [URL fragment] && [[URL _web_URLByRemovingFragment] isEqual:[[_private->bridge URL] _web_URLByRemovingFragment]]) {
+ if (loadType != WebFrameLoadTypeReload && [URL fragment] && [[URL _web_URLByRemovingFragment] isEqual:[[NSURL _web_URLWithString:[_private->bridge URL]] _web_URLByRemovingFragment]]) {
// Just do anchor navigation within the existing content. Note we only do this if there is
// an anchor in the URL - otherwise this check might prevent us from reloading a document
// that has subframes that are different than what we're displaying (in other words, a link
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.m b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
index d082d92..9478d53 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.m
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
@@ -8,6 +8,7 @@
#import <AppKit/NSResponder_Private.h>
#import <WebFoundation/WebAssertions.h>
+#import <WebFoundation/WebNSURLExtras.h>
#import <WebKit/WebBridge.h>
#import <WebKit/WebContextMenuDelegate.h>
@@ -155,9 +156,9 @@
NSDictionary *elementInfoWC = [[self _bridge] elementAtPoint:point];
NSMutableDictionary *elementInfo = [NSMutableDictionary dictionary];
- [elementInfo _web_setObjectIfNotNil:[elementInfoWC objectForKey:WebCoreElementLinkURL] forKey:WebElementLinkURLKey];
+ [elementInfo _web_setObjectIfNotNil:[NSURL _web_URLWithString:[elementInfoWC objectForKey:WebCoreElementLinkURL]] forKey:WebElementLinkURLKey];
[elementInfo _web_setObjectIfNotNil:[elementInfoWC objectForKey:WebCoreElementLinkLabel] forKey:WebElementLinkLabelKey];
- [elementInfo _web_setObjectIfNotNil:[elementInfoWC objectForKey:WebCoreElementImageURL] forKey:WebElementImageURLKey];
+ [elementInfo _web_setObjectIfNotNil:[NSURL _web_URLWithString:[elementInfoWC objectForKey:WebCoreElementImageURL]] forKey:WebElementImageURLKey];
[elementInfo _web_setObjectIfNotNil:[elementInfoWC objectForKey:WebCoreElementString] forKey:WebElementStringKey];
[elementInfo _web_setObjectIfNotNil:[elementInfoWC objectForKey:WebCoreElementImage] forKey:WebElementImageKey];
[elementInfo _web_setObjectIfNotNil:[elementInfoWC objectForKey:WebCoreElementImageLocation] forKey:WebElementImageLocationKey];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list