[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 06:20:05 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit b5870a83b177c65ba05e5203e5a25f685170e627
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sun Jun 16 17:27:01 2002 +0000
WebCore:
Add a separate WebCoreFrame alongside WebCoreBridge to facilitate
handling of frames with no HTML content in them. This probably fixes
frames named "_blank".
Also fixed the build, because a clean build failed.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPartImpl::openURLInFrame):
(KWQKHTMLPartImpl::urlSelected):
(KWQKHTMLPartImpl::requestFrame):
(KWQKHTMLPartImpl::submitForm):
(KWQKHTMLPartImpl::parentPart):
Work with WebCoreFrame objects instead of WebCoreBridge objects when dealing with
frame operations -- loading new URLs mainly.
* kwq/WebCoreBridge.h: Removed frame-related operations, now they are on WebCoreFrame.
Broke out WebCoreResourceLoader into its own file. Added comments.
* kwq/WebCoreFrame.h: Added.
* kwq/WebCoreResourceLoader.h: Added.
* kwq/KWQKloader.mm: Include WebCoreResourceLoader.h now that it's broken out.
* WebCore-tests.exp: Tests still need QString::latin1(), although we don't need
to export it for WebKit any more.
WebKit:
* WebCoreSupport.subproj/IFResourceURLHandleClient.m:
* WebCoreSupport.subproj/IFWebCoreBridge.mm:
(-[IFWebCoreBridge frame]): Added.
(-[IFWebCoreBridge parent]): Changed name from parentFrame, to emphasize that this gives a WebCoreBridge.
(-[IFWebCoreBridge childFrames]): Return IFWebCoreFrame objects.
(-[IFWebCoreBridge childFrameNamed:]): Return IFWebCoreFrame object.
(-[IFWebCoreBridge descendantFrameNamed:]): Return IFWebCoreFrame object.
(-[IFWebCoreBridge createChildFrameNamed:withURL:renderPart:khtml::allowsScrolling:marginWidth:marginHeight:]):
Use the loadURL operation in IFWebCoreFrame.
(-[IFWebCoreBridge mainFrame]): Return IFWebCoreFrame object.
(-[IFWebCoreBridge frameNamed:]): Return IFWebCoreFrame object.
* WebCoreSupport.subproj/IFWebCoreFrame.h: Added.
* WebCoreSupport.subproj/IFWebCoreFrame.m: Added.
* WebKit.pbproj/project.pbxproj: Update for added files.
* WebView.subproj/IFHTMLViewPrivate.h: Made this includable from plain Objective C.
* WebView.subproj/IFWebFrame.mm:
(-[IFWebFrame initWithName:webView:provisionalDataSource:controller:]): Create the IFWebCoreFrame.
* WebView.subproj/IFWebFramePrivate.h: Add _bridgeFrame method for getting IFWebCoreFrame.
* WebView.subproj/IFWebFramePrivate.mm:
(-[IFWebFramePrivate dealloc]): Release the IFWebCoreFrame.
(-[IFWebFrame _bridgeFrame]): Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1386 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 852e972..6b5eb1a 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,33 @@
2002-06-16 Darin Adler <darin at apple.com>
+ Add a separate WebCoreFrame alongside WebCoreBridge to facilitate
+ handling of frames with no HTML content in them. This probably fixes
+ frames named "_blank".
+
+ Also fixed the build, because a clean build failed.
+
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPartImpl::openURLInFrame):
+ (KWQKHTMLPartImpl::urlSelected):
+ (KWQKHTMLPartImpl::requestFrame):
+ (KWQKHTMLPartImpl::submitForm):
+ (KWQKHTMLPartImpl::parentPart):
+ Work with WebCoreFrame objects instead of WebCoreBridge objects when dealing with
+ frame operations -- loading new URLs mainly.
+
+ * kwq/WebCoreBridge.h: Removed frame-related operations, now they are on WebCoreFrame.
+ Broke out WebCoreResourceLoader into its own file. Added comments.
+
+ * kwq/WebCoreFrame.h: Added.
+
+ * kwq/WebCoreResourceLoader.h: Added.
+ * kwq/KWQKloader.mm: Include WebCoreResourceLoader.h now that it's broken out.
+
+ * WebCore-tests.exp: Tests still need QString::latin1(), although we don't need
+ to export it for WebKit any more.
+
+2002-06-16 Darin Adler <darin at apple.com>
+
Moved the IFURLHandleClient subclass to WebKit, so it can some day be merged
with the one for the frames themselves; this one is for resources.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 852e972..6b5eb1a 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,33 @@
2002-06-16 Darin Adler <darin at apple.com>
+ Add a separate WebCoreFrame alongside WebCoreBridge to facilitate
+ handling of frames with no HTML content in them. This probably fixes
+ frames named "_blank".
+
+ Also fixed the build, because a clean build failed.
+
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPartImpl::openURLInFrame):
+ (KWQKHTMLPartImpl::urlSelected):
+ (KWQKHTMLPartImpl::requestFrame):
+ (KWQKHTMLPartImpl::submitForm):
+ (KWQKHTMLPartImpl::parentPart):
+ Work with WebCoreFrame objects instead of WebCoreBridge objects when dealing with
+ frame operations -- loading new URLs mainly.
+
+ * kwq/WebCoreBridge.h: Removed frame-related operations, now they are on WebCoreFrame.
+ Broke out WebCoreResourceLoader into its own file. Added comments.
+
+ * kwq/WebCoreFrame.h: Added.
+
+ * kwq/WebCoreResourceLoader.h: Added.
+ * kwq/KWQKloader.mm: Include WebCoreResourceLoader.h now that it's broken out.
+
+ * WebCore-tests.exp: Tests still need QString::latin1(), although we don't need
+ to export it for WebKit any more.
+
+2002-06-16 Darin Adler <darin at apple.com>
+
Moved the IFURLHandleClient subclass to WebKit, so it can some day be merged
with the one for the frames themselves; this one is for resources.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 852e972..6b5eb1a 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,33 @@
2002-06-16 Darin Adler <darin at apple.com>
+ Add a separate WebCoreFrame alongside WebCoreBridge to facilitate
+ handling of frames with no HTML content in them. This probably fixes
+ frames named "_blank".
+
+ Also fixed the build, because a clean build failed.
+
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPartImpl::openURLInFrame):
+ (KWQKHTMLPartImpl::urlSelected):
+ (KWQKHTMLPartImpl::requestFrame):
+ (KWQKHTMLPartImpl::submitForm):
+ (KWQKHTMLPartImpl::parentPart):
+ Work with WebCoreFrame objects instead of WebCoreBridge objects when dealing with
+ frame operations -- loading new URLs mainly.
+
+ * kwq/WebCoreBridge.h: Removed frame-related operations, now they are on WebCoreFrame.
+ Broke out WebCoreResourceLoader into its own file. Added comments.
+
+ * kwq/WebCoreFrame.h: Added.
+
+ * kwq/WebCoreResourceLoader.h: Added.
+ * kwq/KWQKloader.mm: Include WebCoreResourceLoader.h now that it's broken out.
+
+ * WebCore-tests.exp: Tests still need QString::latin1(), although we don't need
+ to export it for WebKit any more.
+
+2002-06-16 Darin Adler <darin at apple.com>
+
Moved the IFURLHandleClient subclass to WebKit, so it can some day be merged
with the one for the frames themselves; this one is for resources.
diff --git a/WebCore/WebCore-tests.exp b/WebCore/WebCore-tests.exp
index 753ac1b..5056176 100644
--- a/WebCore/WebCore-tests.exp
+++ b/WebCore/WebCore-tests.exp
@@ -58,8 +58,8 @@ __ZN14KWQPtrDictImpl6assignERKS_b
__ZN14KWQPtrDictImpl6insertEPvPKv
__ZN14KWQPtrDictImpl6removeEPvb
__ZN14KWQPtrDictImplC1ERKS_
-__ZN14KWQPtrDictImplC2ERKS_
__ZN14KWQPtrDictImplC1EiPFvPvEPK24CFDictionaryKeyCallBacks
+__ZN14KWQPtrDictImplC2ERKS_
__ZN14KWQPtrDictImplD1Ev
__ZN14KWQPtrDictImplD2Ev
__ZN14QPtrCollectionD2Ev
@@ -262,6 +262,7 @@ __ZNK7QString5lowerEv
__ZNK7QString5rightEj
__ZNK7QString5toIntEPbi
__ZNK7QString6isNullEv
+__ZNK7QString6latin1Ev
__ZNK7QString6toLongEPbi
__ZNK7QString6toUIntEPbi
__ZNK7QString7findRevEPKci
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index ad78963..8d0c688 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -26,17 +26,14 @@
#import <KWQKHTMLPartImpl.h>
#import <html/htmltokenizer.h>
-
#import <html/html_documentimpl.h>
-
#import <rendering/render_frames.h>
-
-#import <khtmlview.h>
-
#import <khtmlpart_p.h>
+#import <khtmlview.h>
-#import <WebCoreViewFactory.h>
#import <WebCoreBridge.h>
+#import <WebCoreFrame.h>
+#import <WebCoreViewFactory.h>
#import <kwqdebug.h>
@@ -70,7 +67,7 @@ KWQKHTMLPartImpl::~KWQKHTMLPartImpl()
bool KWQKHTMLPartImpl::openURLInFrame( const KURL &url, const KParts::URLArgs &urlArgs )
{
- WebCoreBridge *frame;
+ id <WebCoreFrame> frame;
if (!urlArgs.frameName.isEmpty()) {
frame = [bridge frameNamed:urlArgs.frameName.getNSString()];
@@ -78,7 +75,7 @@ bool KWQKHTMLPartImpl::openURLInFrame( const KURL &url, const KParts::URLArgs &u
frame = [bridge mainFrame];
}
} else {
- frame = bridge;
+ frame = [bridge frame];
}
[frame loadURL:url.getNSURL()];
@@ -382,7 +379,7 @@ void KWQKHTMLPartImpl::urlSelected( const QString &url, int button, int state, c
{
KURL clickedURL(part->completeURL( url));
KURL refLess(clickedURL);
- WebCoreBridge *frame;
+ id <WebCoreFrame> frame;
if ( url.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 )
{
@@ -406,10 +403,10 @@ void KWQKHTMLPartImpl::urlSelected( const QString &url, int button, int state, c
if (_target.isEmpty()) {
// If we're the only frame in a frameset then pop the frame.
- if ([[[bridge parentFrame] childFrames] count] == 1) {
- frame = [bridge parentFrame];
+ if ([[[bridge parent] childFrames] count] == 1) {
+ frame = [[bridge parent] frame];
} else {
- frame = bridge;
+ frame = [bridge frame];
}
}
else {
@@ -430,10 +427,10 @@ bool KWQKHTMLPartImpl::requestFrame( khtml::RenderPart *frame, const QString &ur
NSString *name = frameName.getNSString();
KWQDEBUGLEVEL(KWQ_LOG_FRAMES, "name %s\n", DEBUG_OBJECT(name));
- WebCoreBridge *framePart = [bridge childFrameNamed:name];
- if (framePart) {
+ id <WebCoreFrame> wcFrame = [bridge childFrameNamed:name];
+ if (wcFrame) {
KWQDEBUGLEVEL(KWQ_LOG_FRAMES, "found %s\n", DEBUG_OBJECT(name));
- frame->setWidget([framePart widget]);
+ frame->setWidget([wcFrame widget]);
}
else {
KWQDEBUGLEVEL(KWQ_LOG_FRAMES, "creating %s\n", DEBUG_OBJECT(name));
@@ -545,7 +542,7 @@ void KWQKHTMLPartImpl::submitForm( const char *action, const QString &url, const
if ( strcmp( action, "get" ) == 0 )
{
u.setQuery( QString( formData.data(), formData.size() ) );
- [bridge loadURL:u.getNSURL()];
+ [[bridge frame] loadURL:u.getNSURL()];
#ifdef NEED_THIS
args.frameName = target;
@@ -566,7 +563,7 @@ void KWQKHTMLPartImpl::submitForm( const char *action, const QString &url, const
args.setContentType( "Content-Type: " + contentType + "; boundary=" + boundary );
#endif
NSData *postData = [NSData dataWithBytes:formData.data() length:formData.size()];
- [bridge postWithURL:u.getNSURL() data:postData];
+ [[bridge frame] postWithURL:u.getNSURL() data:postData];
}
#ifdef NEED_THIS
@@ -636,5 +633,5 @@ void KWQKHTMLPartImpl::setTitle(const DOMString &title)
KHTMLPart *KWQKHTMLPartImpl::parentPart()
{
- return [[bridge parentFrame] part];
+ return [[bridge parent] part];
}
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index ad78963..8d0c688 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -26,17 +26,14 @@
#import <KWQKHTMLPartImpl.h>
#import <html/htmltokenizer.h>
-
#import <html/html_documentimpl.h>
-
#import <rendering/render_frames.h>
-
-#import <khtmlview.h>
-
#import <khtmlpart_p.h>
+#import <khtmlview.h>
-#import <WebCoreViewFactory.h>
#import <WebCoreBridge.h>
+#import <WebCoreFrame.h>
+#import <WebCoreViewFactory.h>
#import <kwqdebug.h>
@@ -70,7 +67,7 @@ KWQKHTMLPartImpl::~KWQKHTMLPartImpl()
bool KWQKHTMLPartImpl::openURLInFrame( const KURL &url, const KParts::URLArgs &urlArgs )
{
- WebCoreBridge *frame;
+ id <WebCoreFrame> frame;
if (!urlArgs.frameName.isEmpty()) {
frame = [bridge frameNamed:urlArgs.frameName.getNSString()];
@@ -78,7 +75,7 @@ bool KWQKHTMLPartImpl::openURLInFrame( const KURL &url, const KParts::URLArgs &u
frame = [bridge mainFrame];
}
} else {
- frame = bridge;
+ frame = [bridge frame];
}
[frame loadURL:url.getNSURL()];
@@ -382,7 +379,7 @@ void KWQKHTMLPartImpl::urlSelected( const QString &url, int button, int state, c
{
KURL clickedURL(part->completeURL( url));
KURL refLess(clickedURL);
- WebCoreBridge *frame;
+ id <WebCoreFrame> frame;
if ( url.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 )
{
@@ -406,10 +403,10 @@ void KWQKHTMLPartImpl::urlSelected( const QString &url, int button, int state, c
if (_target.isEmpty()) {
// If we're the only frame in a frameset then pop the frame.
- if ([[[bridge parentFrame] childFrames] count] == 1) {
- frame = [bridge parentFrame];
+ if ([[[bridge parent] childFrames] count] == 1) {
+ frame = [[bridge parent] frame];
} else {
- frame = bridge;
+ frame = [bridge frame];
}
}
else {
@@ -430,10 +427,10 @@ bool KWQKHTMLPartImpl::requestFrame( khtml::RenderPart *frame, const QString &ur
NSString *name = frameName.getNSString();
KWQDEBUGLEVEL(KWQ_LOG_FRAMES, "name %s\n", DEBUG_OBJECT(name));
- WebCoreBridge *framePart = [bridge childFrameNamed:name];
- if (framePart) {
+ id <WebCoreFrame> wcFrame = [bridge childFrameNamed:name];
+ if (wcFrame) {
KWQDEBUGLEVEL(KWQ_LOG_FRAMES, "found %s\n", DEBUG_OBJECT(name));
- frame->setWidget([framePart widget]);
+ frame->setWidget([wcFrame widget]);
}
else {
KWQDEBUGLEVEL(KWQ_LOG_FRAMES, "creating %s\n", DEBUG_OBJECT(name));
@@ -545,7 +542,7 @@ void KWQKHTMLPartImpl::submitForm( const char *action, const QString &url, const
if ( strcmp( action, "get" ) == 0 )
{
u.setQuery( QString( formData.data(), formData.size() ) );
- [bridge loadURL:u.getNSURL()];
+ [[bridge frame] loadURL:u.getNSURL()];
#ifdef NEED_THIS
args.frameName = target;
@@ -566,7 +563,7 @@ void KWQKHTMLPartImpl::submitForm( const char *action, const QString &url, const
args.setContentType( "Content-Type: " + contentType + "; boundary=" + boundary );
#endif
NSData *postData = [NSData dataWithBytes:formData.data() length:formData.size()];
- [bridge postWithURL:u.getNSURL() data:postData];
+ [[bridge frame] postWithURL:u.getNSURL() data:postData];
}
#ifdef NEED_THIS
@@ -636,5 +633,5 @@ void KWQKHTMLPartImpl::setTitle(const DOMString &title)
KHTMLPart *KWQKHTMLPartImpl::parentPart()
{
- return [[bridge parentFrame] part];
+ return [[bridge parent] part];
}
diff --git a/WebCore/kwq/KWQKloader.mm b/WebCore/kwq/KWQKloader.mm
index 207ec03..b2bd547 100644
--- a/WebCore/kwq/KWQKloader.mm
+++ b/WebCore/kwq/KWQKloader.mm
@@ -28,11 +28,11 @@
#import <kio/jobclasses.h>
#import <misc/loader.h>
-#import <WebFoundation/IFError.h>
-#import <WebFoundation/IFURLHandle.h>
-
#import <KWQKHTMLPartImpl.h>
+
#import <WebCoreBridge.h>
+#import <WebCoreResourceLoader.h>
+
#import <kwqdebug.h>
using khtml::DocLoader;
diff --git a/WebCore/kwq/KWQLoader.mm b/WebCore/kwq/KWQLoader.mm
index 207ec03..b2bd547 100644
--- a/WebCore/kwq/KWQLoader.mm
+++ b/WebCore/kwq/KWQLoader.mm
@@ -28,11 +28,11 @@
#import <kio/jobclasses.h>
#import <misc/loader.h>
-#import <WebFoundation/IFError.h>
-#import <WebFoundation/IFURLHandle.h>
-
#import <KWQKHTMLPartImpl.h>
+
#import <WebCoreBridge.h>
+#import <WebCoreResourceLoader.h>
+
#import <kwqdebug.h>
using khtml::DocLoader;
diff --git a/WebCore/kwq/KWQLoaderImpl.mm b/WebCore/kwq/KWQLoaderImpl.mm
index 207ec03..b2bd547 100644
--- a/WebCore/kwq/KWQLoaderImpl.mm
+++ b/WebCore/kwq/KWQLoaderImpl.mm
@@ -28,11 +28,11 @@
#import <kio/jobclasses.h>
#import <misc/loader.h>
-#import <WebFoundation/IFError.h>
-#import <WebFoundation/IFURLHandle.h>
-
#import <KWQKHTMLPartImpl.h>
+
#import <WebCoreBridge.h>
+#import <WebCoreResourceLoader.h>
+
#import <kwqdebug.h>
using khtml::DocLoader;
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index ed672d8..ad36449 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -38,9 +38,9 @@ typedef khtml::RenderPart KHTMLRenderPart;
#else
-typedef struct KHTMLPart KHTMLPart;
-typedef struct KHTMLView KHTMLView;
-typedef struct KHTMLRenderPart KHTMLRenderPart;
+ at class KHTMLPart;
+ at class KHTMLView;
+ at class KHTMLRenderPart;
#endif
@@ -49,17 +49,17 @@ typedef struct KHTMLRenderPart KHTMLRenderPart;
@class WebCoreBridge;
- at protocol WebCoreResourceLoader <NSObject>
+ at protocol WebCoreFrame;
+ at protocol WebCoreResourceLoader;
-- (void)addData:(NSData *)data;
+// WebCoreBridge objects are used by WebCore to abstract away operations that need
+// to be implemented by library clients, for example WebKit. The objects are also
+// used in the opposite direction, for simple access to WebCore functions without dealing
+// directly with the KHTML C++ classes.
-// Either cancel or finish will be called before the loader is released, but never both.
-- (void)cancel;
-- (void)finish;
+// A WebCoreBridge creates and holds a reference to a KHTMLPart.
- at end
-
-// The WebCoreBridge class contains methods for use by the non-WebCore side of the bridge.
+// The WebCoreBridge interface contains methods for use by the non-WebCore side of the bridge.
@interface WebCoreBridge : NSObject
{
@@ -89,18 +89,17 @@ typedef struct KHTMLRenderPart KHTMLRenderPart;
@protocol WebCoreBridge
-- (WebCoreBridge *)parentFrame;
-- (NSArray *)childFrames; // WebCoreBridge objects
-- (WebCoreBridge *)childFrameNamed:(NSString *)name;
-- (WebCoreBridge *)descendantFrameNamed:(NSString *)name;
+- (WebCoreBridge *)parent;
-- (WebCoreBridge *)mainFrame;
-- (WebCoreBridge *)frameNamed:(NSString *)name; // searches entire hierarchy starting with mainFrame
+- (id <WebCoreFrame>)frame;
+- (NSArray *)childFrames; // WebCoreFrame objects
+- (id <WebCoreFrame>)childFrameNamed:(NSString *)name;
+- (id <WebCoreFrame>)descendantFrameNamed:(NSString *)name;
-- (void)setTitle:(NSString *)title;
+- (id <WebCoreFrame>)mainFrame;
+- (id <WebCoreFrame>)frameNamed:(NSString *)name; // searches entire hierarchy starting with mainFrame
-- (void)loadURL:(NSURL *)URL;
-- (void)postWithURL:(NSURL *)URL data:(NSData *)data;
+- (void)setTitle:(NSString *)title;
- (BOOL)createChildFrameNamed:(NSString *)frameName
withURL:(NSURL *)URL renderPart:(KHTMLRenderPart *)renderPart
@@ -108,11 +107,13 @@ typedef struct KHTMLRenderPart KHTMLRenderPart;
- (void)openNewWindowWithURL:(NSURL *)URL;
-- (KHTMLView *)widget;
-
-- (IFURLHandle *)startLoadingResource:(id <WebCoreResourceLoader>)resourceLoader withURL:(NSURL *)URL;
+- (IFURLHandle *)startLoadingResource:(id <WebCoreResourceLoader>)loader withURL:(NSURL *)URL;
@end
+// This interface definition allows those who hold a WebCoreBridge * to call all the methods
+// in the WebCoreBridge protocol without requiring the base implementation to supply the methods.
+// This idiom is appropriate because WebCoreBridge is an abstract class.
+
@interface WebCoreBridge (SubclassResponsibility) <WebCoreBridge>
@end
diff --git a/WebCore/kwq/KWQKPartsPartManager.h b/WebCore/kwq/WebCoreFrame.h
similarity index 76%
copy from WebCore/kwq/KWQKPartsPartManager.h
copy to WebCore/kwq/WebCoreFrame.h
index dff5a24..d643360 100644
--- a/WebCore/kwq/KWQKPartsPartManager.h
+++ b/WebCore/kwq/WebCoreFrame.h
@@ -23,19 +23,23 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef KPARTS_PARTMANAGER_H
-#define KPARTS_PARTMANAGER_H
+#import <Foundation/Foundation.h>
-#include <qguardedptr.h>
-#include <qtimer.h>
-#include <qdatetime.h>
+#ifdef __cplusplus
+class KHTMLView;
+#else
+ at class KHTMLView;
+#endif
-namespace KParts {
+// The main difference between a WebCoreFrame and a WebCoreBridge
+// is that there's no guarantee a WebCoreFrame will have any HTML in
+// it, thus no guarantee that it will have a KHTMLPart.
-class PartManager;
+ at protocol WebCoreFrame <NSObject>
-}
+- (void)loadURL:(NSURL *)URL;
+- (void)postWithURL:(NSURL *)URL data:(NSData *)data;
-class DCOPObject { };
+- (KHTMLView *)widget;
-#endif
+ at end
diff --git a/WebCore/kwq/KWQKPartsPartManager.h b/WebCore/kwq/WebCoreFrameBridge.h
similarity index 76%
copy from WebCore/kwq/KWQKPartsPartManager.h
copy to WebCore/kwq/WebCoreFrameBridge.h
index dff5a24..d643360 100644
--- a/WebCore/kwq/KWQKPartsPartManager.h
+++ b/WebCore/kwq/WebCoreFrameBridge.h
@@ -23,19 +23,23 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef KPARTS_PARTMANAGER_H
-#define KPARTS_PARTMANAGER_H
+#import <Foundation/Foundation.h>
-#include <qguardedptr.h>
-#include <qtimer.h>
-#include <qdatetime.h>
+#ifdef __cplusplus
+class KHTMLView;
+#else
+ at class KHTMLView;
+#endif
-namespace KParts {
+// The main difference between a WebCoreFrame and a WebCoreBridge
+// is that there's no guarantee a WebCoreFrame will have any HTML in
+// it, thus no guarantee that it will have a KHTMLPart.
-class PartManager;
+ at protocol WebCoreFrame <NSObject>
-}
+- (void)loadURL:(NSURL *)URL;
+- (void)postWithURL:(NSURL *)URL data:(NSData *)data;
-class DCOPObject { };
+- (KHTMLView *)widget;
-#endif
+ at end
diff --git a/WebCore/kwq/KWQKPartsPartManager.h b/WebCore/kwq/WebCoreResourceLoader.h
similarity index 85%
copy from WebCore/kwq/KWQKPartsPartManager.h
copy to WebCore/kwq/WebCoreResourceLoader.h
index dff5a24..d7e3e23 100644
--- a/WebCore/kwq/KWQKPartsPartManager.h
+++ b/WebCore/kwq/WebCoreResourceLoader.h
@@ -23,19 +23,14 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef KPARTS_PARTMANAGER_H
-#define KPARTS_PARTMANAGER_H
+#import <Foundation/Foundation.h>
-#include <qguardedptr.h>
-#include <qtimer.h>
-#include <qdatetime.h>
+ at protocol WebCoreResourceLoader <NSObject>
-namespace KParts {
+- (void)addData:(NSData *)data;
-class PartManager;
+// Either cancel or finish will be called before the loader is released, but never both.
+- (void)cancel;
+- (void)finish;
-}
-
-class DCOPObject { };
-
-#endif
+ at end
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 0b5a0be..94e8b2e 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,37 @@
2002-06-16 Darin Adler <darin at apple.com>
+ Add a separate WebCoreFrame alongside WebCoreBridge to facilitate
+ handling of frames with no HTML content in them. This probably fixes
+ frames named "_blank".
+
+ * WebCoreSupport.subproj/IFResourceURLHandleClient.m:
+ * WebCoreSupport.subproj/IFWebCoreBridge.mm:
+ (-[IFWebCoreBridge frame]): Added.
+ (-[IFWebCoreBridge parent]): Changed name from parentFrame, to emphasize that this gives a WebCoreBridge.
+ (-[IFWebCoreBridge childFrames]): Return IFWebCoreFrame objects.
+ (-[IFWebCoreBridge childFrameNamed:]): Return IFWebCoreFrame object.
+ (-[IFWebCoreBridge descendantFrameNamed:]): Return IFWebCoreFrame object.
+ (-[IFWebCoreBridge createChildFrameNamed:withURL:renderPart:khtml::allowsScrolling:marginWidth:marginHeight:]):
+ Use the loadURL operation in IFWebCoreFrame.
+ (-[IFWebCoreBridge mainFrame]): Return IFWebCoreFrame object.
+ (-[IFWebCoreBridge frameNamed:]): Return IFWebCoreFrame object.
+
+ * WebCoreSupport.subproj/IFWebCoreFrame.h: Added.
+ * WebCoreSupport.subproj/IFWebCoreFrame.m: Added.
+ * WebKit.pbproj/project.pbxproj: Update for added files.
+
+ * WebView.subproj/IFHTMLViewPrivate.h: Made this includable from plain Objective C.
+
+ * WebView.subproj/IFWebFrame.mm:
+ (-[IFWebFrame initWithName:webView:provisionalDataSource:controller:]): Create the IFWebCoreFrame.
+
+ * WebView.subproj/IFWebFramePrivate.h: Add _bridgeFrame method for getting IFWebCoreFrame.
+ * WebView.subproj/IFWebFramePrivate.mm:
+ (-[IFWebFramePrivate dealloc]): Release the IFWebCoreFrame.
+ (-[IFWebFrame _bridgeFrame]): Added.
+
+2002-06-16 Darin Adler <darin at apple.com>
+
Moved the IFURLHandleClient subclass here from WebCore, so it can some day be merged
with the one for the frames themselves; this one is for resources.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 0b5a0be..94e8b2e 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,5 +1,37 @@
2002-06-16 Darin Adler <darin at apple.com>
+ Add a separate WebCoreFrame alongside WebCoreBridge to facilitate
+ handling of frames with no HTML content in them. This probably fixes
+ frames named "_blank".
+
+ * WebCoreSupport.subproj/IFResourceURLHandleClient.m:
+ * WebCoreSupport.subproj/IFWebCoreBridge.mm:
+ (-[IFWebCoreBridge frame]): Added.
+ (-[IFWebCoreBridge parent]): Changed name from parentFrame, to emphasize that this gives a WebCoreBridge.
+ (-[IFWebCoreBridge childFrames]): Return IFWebCoreFrame objects.
+ (-[IFWebCoreBridge childFrameNamed:]): Return IFWebCoreFrame object.
+ (-[IFWebCoreBridge descendantFrameNamed:]): Return IFWebCoreFrame object.
+ (-[IFWebCoreBridge createChildFrameNamed:withURL:renderPart:khtml::allowsScrolling:marginWidth:marginHeight:]):
+ Use the loadURL operation in IFWebCoreFrame.
+ (-[IFWebCoreBridge mainFrame]): Return IFWebCoreFrame object.
+ (-[IFWebCoreBridge frameNamed:]): Return IFWebCoreFrame object.
+
+ * WebCoreSupport.subproj/IFWebCoreFrame.h: Added.
+ * WebCoreSupport.subproj/IFWebCoreFrame.m: Added.
+ * WebKit.pbproj/project.pbxproj: Update for added files.
+
+ * WebView.subproj/IFHTMLViewPrivate.h: Made this includable from plain Objective C.
+
+ * WebView.subproj/IFWebFrame.mm:
+ (-[IFWebFrame initWithName:webView:provisionalDataSource:controller:]): Create the IFWebCoreFrame.
+
+ * WebView.subproj/IFWebFramePrivate.h: Add _bridgeFrame method for getting IFWebCoreFrame.
+ * WebView.subproj/IFWebFramePrivate.mm:
+ (-[IFWebFramePrivate dealloc]): Release the IFWebCoreFrame.
+ (-[IFWebFrame _bridgeFrame]): Added.
+
+2002-06-16 Darin Adler <darin at apple.com>
+
Moved the IFURLHandleClient subclass here from WebCore, so it can some day be merged
with the one for the frames themselves; this one is for resources.
diff --git a/WebKit/WebCoreSupport.subproj/IFResourceURLHandleClient.m b/WebKit/WebCoreSupport.subproj/IFResourceURLHandleClient.m
index f4d245d..8b3898e 100644
--- a/WebKit/WebCoreSupport.subproj/IFResourceURLHandleClient.m
+++ b/WebKit/WebCoreSupport.subproj/IFResourceURLHandleClient.m
@@ -10,14 +10,15 @@
#import <WebFoundation/IFError.h>
#import <WebFoundation/IFURLHandle.h>
+
+#import <WebCoreResourceLoader.h>
+
#import <WebKit/IFLoadProgress.h>
#import <WebKit/IFWebControllerPrivate.h>
#import <WebKit/IFWebCoreBridge.h>
#import <WebKit/IFWebDataSourcePrivate.h>
#import <WebKit/WebKitDebug.h>
-#import <WebCoreBridge.h>
-
@implementation IFResourceURLHandleClient
- initWithLoader:(id <WebCoreResourceLoader>)l dataSource:(IFWebDataSource *)s
diff --git a/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm b/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm
index b563050..dd690fe 100644
--- a/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm
+++ b/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm
@@ -5,23 +5,15 @@
#import <WebKit/IFWebCoreBridge.h>
-#import <WebKit/IFHTMLRepresentation.h>
-#import <WebKit/IFHTMLViewPrivate.h>
-#import <WebKit/IFLoadProgress.h>
#import <WebKit/IFResourceURLHandleClient.h>
#import <WebKit/IFWebControllerPrivate.h>
+#import <WebKit/IFWebCoreFrame.h>
#import <WebKit/IFWebDataSourcePrivate.h>
#import <WebKit/IFWebFramePrivate.h>
#import <WebKit/IFWebViewPrivate.h>
-#import <WebFoundation/IFURLCacheLoaderConstants.h>
-#import <WebFoundation/IFURLHandle.h>
#import <WebKit/WebKitDebug.h>
- at interface IFWebFrame (IFWebCoreBridge)
-- (IFWebCoreBridge *)_bridge;
- at end
-
@implementation IFWebDataSource (IFWebCoreBridge)
- (IFWebCoreBridge *)_bridge
@@ -32,20 +24,6 @@
@end
- at implementation IFWebFrame (IFWebCoreBridge)
-
-- (IFWebCoreBridge *)_bridge
-{
- IFWebCoreBridge *bridge;
-
- bridge = [[self provisionalDataSource] _bridge];
- if (!bridge)
- bridge = [[self dataSource] _bridge];
- return bridge;
-}
-
- at end
-
@implementation IFWebCoreBridge
- (void)dealloc
@@ -55,23 +33,12 @@
[super dealloc];
}
-- (IFWebFrame *)frame
-{
- WEBKIT_ASSERT(dataSource);
- return [dataSource webFrame];
-}
-
-- (IFWebView *)view
-{
- return [[self frame] webView];
-}
-
-- (IFHTMLView *)HTMLView
+- (id <WebCoreFrame>)frame
{
- return [[self view] documentView];
+ return [[dataSource webFrame] _bridgeFrame];
}
-- (WebCoreBridge *)parentFrame
+- (WebCoreBridge *)parent
{
WEBKIT_ASSERT(dataSource);
return [[dataSource parent] _bridge];
@@ -82,53 +49,24 @@
WEBKIT_ASSERT(dataSource);
NSArray *frames = [dataSource children];
NSEnumerator *e = [frames objectEnumerator];
- NSMutableArray *bridges = [NSMutableArray arrayWithCapacity:[frames count]];
+ NSMutableArray *bridgeFrames = [NSMutableArray arrayWithCapacity:[frames count]];
IFWebFrame *frame;
while ((frame = [e nextObject])) {
- IFWebCoreBridge *bridge = [frame _bridge];
- if (bridge)
- [bridges addObject:bridge];
+ id bridgeFrame = [frame _bridgeFrame];
+ if (bridgeFrame)
+ [bridgeFrames addObject:bridgeFrame];
}
- return bridges;
-}
-
-- (WebCoreBridge *)childFrameNamed:(NSString *)name
-{
- return [[dataSource frameNamed:name] _bridge];
-}
-
-- (WebCoreBridge *)descendantFrameNamed:(NSString *)name
-{
- return [[[self frame] frameNamed:name] _bridge];
+ return bridgeFrames;
}
-- (void)loadURL:(NSURL *)URL attributes:(NSDictionary *)attributes flags:(unsigned)flags inFrame:(IFWebFrame *)frame withParent:(WebCoreBridge *)parent
+- (id <WebCoreFrame>)childFrameNamed:(NSString *)name
{
- IFWebDataSource *newDataSource = [[IFWebDataSource alloc] initWithURL:URL attributes:attributes flags:flags];
- IFWebCoreBridge *parentPrivate = (IFWebCoreBridge *)parent;
- [newDataSource _setParent:parent ? parentPrivate->dataSource : nil];
- [frame setProvisionalDataSource:newDataSource];
- [newDataSource release];
- [frame startLoading];
+ return [[dataSource frameNamed:name] _bridgeFrame];
}
-- (void)loadURL:(NSURL *)URL
+- (id <WebCoreFrame>)descendantFrameNamed:(NSString *)name
{
- [self loadURL:URL attributes:nil flags:0 inFrame:[self frame] withParent:[self parentFrame]];
-}
-
-- (void)postWithURL:(NSURL *)URL data:(NSData *)data
-{
- // When posting, use the IFURLHandleFlagLoadFromOrigin load flag.
- // This prevents a potential bug which may cause a page
- // with a form that uses itself as an action to be returned
- // from the cache without submitting.
- NSDictionary *attributes = [[NSDictionary alloc] initWithObjectsAndKeys:
- data, IFHTTPURLHandleRequestData,
- @"POST", IFHTTPURLHandleRequestMethod,
- nil];
- [self loadURL:URL attributes:attributes flags:IFURLHandleFlagLoadFromOrigin inFrame:[self frame] withParent:[self parentFrame]];
- [attributes release];
+ return [[[dataSource webFrame] frameNamed:name] _bridgeFrame];
}
- (BOOL)createChildFrameNamed:(NSString *)frameName
@@ -147,7 +85,7 @@
[[frame webView] _setMarginWidth:width];
[[frame webView] _setMarginHeight:height];
- [self loadURL:URL attributes:nil flags:0 inFrame:frame withParent:self];
+ [[frame _bridgeFrame] loadURL:URL attributes:nil flags:0 withParent:dataSource];
return YES;
}
@@ -163,24 +101,14 @@
[dataSource _setTitle:title];
}
-- (WebCoreBridge *)mainFrame
+- (id <WebCoreFrame>)mainFrame
{
- return [[[dataSource controller] mainFrame] _bridge];
+ return [[[dataSource controller] mainFrame] _bridgeFrame];
}
-- (WebCoreBridge *)frameNamed:(NSString *)name
+- (id <WebCoreFrame>)frameNamed:(NSString *)name
{
- return [[[dataSource controller] frameNamed:name] _bridge];
-}
-
-- (KHTMLView *)widget
-{
- WEBKIT_ASSERT([self HTMLView]);
- KHTMLView *widget = [[self HTMLView] _provisionalWidget];
- if (widget) {
- return widget;
- }
- return [[self HTMLView] _widget];
+ return [[[dataSource controller] frameNamed:name] _bridgeFrame];
}
- (void)receivedData:(NSData *)data withDataSource:(IFWebDataSource *)withDataSource
diff --git a/WebKit/WebCoreSupport.subproj/IFWebCoreFrame.h b/WebKit/WebCoreSupport.subproj/IFWebCoreFrame.h
new file mode 100644
index 0000000..0aef6e4
--- /dev/null
+++ b/WebKit/WebCoreSupport.subproj/IFWebCoreFrame.h
@@ -0,0 +1,23 @@
+//
+// IFWebCoreFrame.h
+// WebKit
+//
+// Created by Darin Adler on Sun Jun 16 2002.
+// Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import <WebCoreFrame.h>
+
+ at class IFWebDataSource;
+ at class IFWebFrame;
+
+ at interface IFWebCoreFrame : NSObject <WebCoreFrame>
+{
+ IFWebFrame *frame;
+}
+
+- initWithWebFrame:(IFWebFrame *)frame;
+
+- (void)loadURL:(NSURL *)URL attributes:(NSDictionary *)attributes flags:(unsigned)flags withParent:(IFWebDataSource *)parent;
+
+ at end
diff --git a/WebKit/WebCoreSupport.subproj/IFWebCoreFrame.m b/WebKit/WebCoreSupport.subproj/IFWebCoreFrame.m
new file mode 100644
index 0000000..035da48
--- /dev/null
+++ b/WebKit/WebCoreSupport.subproj/IFWebCoreFrame.m
@@ -0,0 +1,80 @@
+//
+// IFWebCoreFrame.m
+// WebKit
+//
+// Created by Darin Adler on Sun Jun 16 2002.
+// Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import <WebKit/IFWebCoreFrame.h>
+
+#import <WebFoundation/IFURLCacheLoaderConstants.h>
+
+#import <WebKit/IFHTMLViewPrivate.h>
+#import <WebKit/IFWebDataSourcePrivate.h>
+#import <WebKit/IFWebFrame.h>
+#import <WebKit/IFWebView.h>
+#import <WebKit/WebKitDebug.h>
+
+ at implementation IFWebCoreFrame
+
+// owned by the IFWebFrame
+
+- initWithWebFrame:(IFWebFrame *)f
+{
+ [super init];
+
+ frame = f; // don't retain
+
+ return self;
+}
+
+- (IFWebView *)view
+{
+ return [frame webView];
+}
+
+- (IFHTMLView *)HTMLView
+{
+ return [[self view] documentView];
+}
+
+- (KHTMLView *)widget
+{
+ WEBKIT_ASSERT([self HTMLView]);
+ KHTMLView *widget = [[self HTMLView] _provisionalWidget];
+ if (widget) {
+ return widget;
+ }
+ return [[self HTMLView] _widget];
+}
+
+- (void)loadURL:(NSURL *)URL attributes:(NSDictionary *)attributes flags:(unsigned)flags withParent:(IFWebDataSource *)parent
+{
+ IFWebDataSource *newDataSource = [[IFWebDataSource alloc] initWithURL:URL attributes:attributes flags:flags];
+ [newDataSource _setParent:parent];
+ [frame setProvisionalDataSource:newDataSource];
+ [newDataSource release];
+ [frame startLoading];
+}
+
+- (void)loadURL:(NSURL *)URL
+{
+ [self loadURL:URL attributes:nil flags:0 withParent:[[frame dataSource] parent]];
+}
+
+- (void)postWithURL:(NSURL *)URL data:(NSData *)data
+{
+ // When posting, use the IFURLHandleFlagLoadFromOrigin load flag.
+ // This prevents a potential bug which may cause a page
+ // with a form that uses itself as an action to be returned
+ // from the cache without submitting.
+ NSDictionary *attributes = [[NSDictionary alloc] initWithObjectsAndKeys:
+ data, IFHTTPURLHandleRequestData,
+ @"POST", IFHTTPURLHandleRequestMethod,
+ nil];
+ [self loadURL:URL attributes:attributes flags:IFURLHandleFlagLoadFromOrigin withParent:[[frame dataSource] parent]];
+ [attributes release];
+}
+
+ at end
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index b563050..dd690fe 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -5,23 +5,15 @@
#import <WebKit/IFWebCoreBridge.h>
-#import <WebKit/IFHTMLRepresentation.h>
-#import <WebKit/IFHTMLViewPrivate.h>
-#import <WebKit/IFLoadProgress.h>
#import <WebKit/IFResourceURLHandleClient.h>
#import <WebKit/IFWebControllerPrivate.h>
+#import <WebKit/IFWebCoreFrame.h>
#import <WebKit/IFWebDataSourcePrivate.h>
#import <WebKit/IFWebFramePrivate.h>
#import <WebKit/IFWebViewPrivate.h>
-#import <WebFoundation/IFURLCacheLoaderConstants.h>
-#import <WebFoundation/IFURLHandle.h>
#import <WebKit/WebKitDebug.h>
- at interface IFWebFrame (IFWebCoreBridge)
-- (IFWebCoreBridge *)_bridge;
- at end
-
@implementation IFWebDataSource (IFWebCoreBridge)
- (IFWebCoreBridge *)_bridge
@@ -32,20 +24,6 @@
@end
- at implementation IFWebFrame (IFWebCoreBridge)
-
-- (IFWebCoreBridge *)_bridge
-{
- IFWebCoreBridge *bridge;
-
- bridge = [[self provisionalDataSource] _bridge];
- if (!bridge)
- bridge = [[self dataSource] _bridge];
- return bridge;
-}
-
- at end
-
@implementation IFWebCoreBridge
- (void)dealloc
@@ -55,23 +33,12 @@
[super dealloc];
}
-- (IFWebFrame *)frame
-{
- WEBKIT_ASSERT(dataSource);
- return [dataSource webFrame];
-}
-
-- (IFWebView *)view
-{
- return [[self frame] webView];
-}
-
-- (IFHTMLView *)HTMLView
+- (id <WebCoreFrame>)frame
{
- return [[self view] documentView];
+ return [[dataSource webFrame] _bridgeFrame];
}
-- (WebCoreBridge *)parentFrame
+- (WebCoreBridge *)parent
{
WEBKIT_ASSERT(dataSource);
return [[dataSource parent] _bridge];
@@ -82,53 +49,24 @@
WEBKIT_ASSERT(dataSource);
NSArray *frames = [dataSource children];
NSEnumerator *e = [frames objectEnumerator];
- NSMutableArray *bridges = [NSMutableArray arrayWithCapacity:[frames count]];
+ NSMutableArray *bridgeFrames = [NSMutableArray arrayWithCapacity:[frames count]];
IFWebFrame *frame;
while ((frame = [e nextObject])) {
- IFWebCoreBridge *bridge = [frame _bridge];
- if (bridge)
- [bridges addObject:bridge];
+ id bridgeFrame = [frame _bridgeFrame];
+ if (bridgeFrame)
+ [bridgeFrames addObject:bridgeFrame];
}
- return bridges;
-}
-
-- (WebCoreBridge *)childFrameNamed:(NSString *)name
-{
- return [[dataSource frameNamed:name] _bridge];
-}
-
-- (WebCoreBridge *)descendantFrameNamed:(NSString *)name
-{
- return [[[self frame] frameNamed:name] _bridge];
+ return bridgeFrames;
}
-- (void)loadURL:(NSURL *)URL attributes:(NSDictionary *)attributes flags:(unsigned)flags inFrame:(IFWebFrame *)frame withParent:(WebCoreBridge *)parent
+- (id <WebCoreFrame>)childFrameNamed:(NSString *)name
{
- IFWebDataSource *newDataSource = [[IFWebDataSource alloc] initWithURL:URL attributes:attributes flags:flags];
- IFWebCoreBridge *parentPrivate = (IFWebCoreBridge *)parent;
- [newDataSource _setParent:parent ? parentPrivate->dataSource : nil];
- [frame setProvisionalDataSource:newDataSource];
- [newDataSource release];
- [frame startLoading];
+ return [[dataSource frameNamed:name] _bridgeFrame];
}
-- (void)loadURL:(NSURL *)URL
+- (id <WebCoreFrame>)descendantFrameNamed:(NSString *)name
{
- [self loadURL:URL attributes:nil flags:0 inFrame:[self frame] withParent:[self parentFrame]];
-}
-
-- (void)postWithURL:(NSURL *)URL data:(NSData *)data
-{
- // When posting, use the IFURLHandleFlagLoadFromOrigin load flag.
- // This prevents a potential bug which may cause a page
- // with a form that uses itself as an action to be returned
- // from the cache without submitting.
- NSDictionary *attributes = [[NSDictionary alloc] initWithObjectsAndKeys:
- data, IFHTTPURLHandleRequestData,
- @"POST", IFHTTPURLHandleRequestMethod,
- nil];
- [self loadURL:URL attributes:attributes flags:IFURLHandleFlagLoadFromOrigin inFrame:[self frame] withParent:[self parentFrame]];
- [attributes release];
+ return [[[dataSource webFrame] frameNamed:name] _bridgeFrame];
}
- (BOOL)createChildFrameNamed:(NSString *)frameName
@@ -147,7 +85,7 @@
[[frame webView] _setMarginWidth:width];
[[frame webView] _setMarginHeight:height];
- [self loadURL:URL attributes:nil flags:0 inFrame:frame withParent:self];
+ [[frame _bridgeFrame] loadURL:URL attributes:nil flags:0 withParent:dataSource];
return YES;
}
@@ -163,24 +101,14 @@
[dataSource _setTitle:title];
}
-- (WebCoreBridge *)mainFrame
+- (id <WebCoreFrame>)mainFrame
{
- return [[[dataSource controller] mainFrame] _bridge];
+ return [[[dataSource controller] mainFrame] _bridgeFrame];
}
-- (WebCoreBridge *)frameNamed:(NSString *)name
+- (id <WebCoreFrame>)frameNamed:(NSString *)name
{
- return [[[dataSource controller] frameNamed:name] _bridge];
-}
-
-- (KHTMLView *)widget
-{
- WEBKIT_ASSERT([self HTMLView]);
- KHTMLView *widget = [[self HTMLView] _provisionalWidget];
- if (widget) {
- return widget;
- }
- return [[self HTMLView] _widget];
+ return [[[dataSource controller] frameNamed:name] _bridgeFrame];
}
- (void)receivedData:(NSData *)data withDataSource:(IFWebDataSource *)withDataSource
diff --git a/WebKit/WebCoreSupport.subproj/WebFrameBridge.h b/WebKit/WebCoreSupport.subproj/WebFrameBridge.h
new file mode 100644
index 0000000..0aef6e4
--- /dev/null
+++ b/WebKit/WebCoreSupport.subproj/WebFrameBridge.h
@@ -0,0 +1,23 @@
+//
+// IFWebCoreFrame.h
+// WebKit
+//
+// Created by Darin Adler on Sun Jun 16 2002.
+// Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import <WebCoreFrame.h>
+
+ at class IFWebDataSource;
+ at class IFWebFrame;
+
+ at interface IFWebCoreFrame : NSObject <WebCoreFrame>
+{
+ IFWebFrame *frame;
+}
+
+- initWithWebFrame:(IFWebFrame *)frame;
+
+- (void)loadURL:(NSURL *)URL attributes:(NSDictionary *)attributes flags:(unsigned)flags withParent:(IFWebDataSource *)parent;
+
+ at end
diff --git a/WebKit/WebCoreSupport.subproj/WebFrameBridge.m b/WebKit/WebCoreSupport.subproj/WebFrameBridge.m
new file mode 100644
index 0000000..035da48
--- /dev/null
+++ b/WebKit/WebCoreSupport.subproj/WebFrameBridge.m
@@ -0,0 +1,80 @@
+//
+// IFWebCoreFrame.m
+// WebKit
+//
+// Created by Darin Adler on Sun Jun 16 2002.
+// Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+//
+
+#import <WebKit/IFWebCoreFrame.h>
+
+#import <WebFoundation/IFURLCacheLoaderConstants.h>
+
+#import <WebKit/IFHTMLViewPrivate.h>
+#import <WebKit/IFWebDataSourcePrivate.h>
+#import <WebKit/IFWebFrame.h>
+#import <WebKit/IFWebView.h>
+#import <WebKit/WebKitDebug.h>
+
+ at implementation IFWebCoreFrame
+
+// owned by the IFWebFrame
+
+- initWithWebFrame:(IFWebFrame *)f
+{
+ [super init];
+
+ frame = f; // don't retain
+
+ return self;
+}
+
+- (IFWebView *)view
+{
+ return [frame webView];
+}
+
+- (IFHTMLView *)HTMLView
+{
+ return [[self view] documentView];
+}
+
+- (KHTMLView *)widget
+{
+ WEBKIT_ASSERT([self HTMLView]);
+ KHTMLView *widget = [[self HTMLView] _provisionalWidget];
+ if (widget) {
+ return widget;
+ }
+ return [[self HTMLView] _widget];
+}
+
+- (void)loadURL:(NSURL *)URL attributes:(NSDictionary *)attributes flags:(unsigned)flags withParent:(IFWebDataSource *)parent
+{
+ IFWebDataSource *newDataSource = [[IFWebDataSource alloc] initWithURL:URL attributes:attributes flags:flags];
+ [newDataSource _setParent:parent];
+ [frame setProvisionalDataSource:newDataSource];
+ [newDataSource release];
+ [frame startLoading];
+}
+
+- (void)loadURL:(NSURL *)URL
+{
+ [self loadURL:URL attributes:nil flags:0 withParent:[[frame dataSource] parent]];
+}
+
+- (void)postWithURL:(NSURL *)URL data:(NSData *)data
+{
+ // When posting, use the IFURLHandleFlagLoadFromOrigin load flag.
+ // This prevents a potential bug which may cause a page
+ // with a form that uses itself as an action to be returned
+ // from the cache without submitting.
+ NSDictionary *attributes = [[NSDictionary alloc] initWithObjectsAndKeys:
+ data, IFHTTPURLHandleRequestData,
+ @"POST", IFHTTPURLHandleRequestMethod,
+ nil];
+ [self loadURL:URL attributes:attributes flags:IFURLHandleFlagLoadFromOrigin withParent:[[frame dataSource] parent]];
+ [attributes release];
+}
+
+ at end
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
index f4d245d..8b3898e 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
@@ -10,14 +10,15 @@
#import <WebFoundation/IFError.h>
#import <WebFoundation/IFURLHandle.h>
+
+#import <WebCoreResourceLoader.h>
+
#import <WebKit/IFLoadProgress.h>
#import <WebKit/IFWebControllerPrivate.h>
#import <WebKit/IFWebCoreBridge.h>
#import <WebKit/IFWebDataSourcePrivate.h>
#import <WebKit/WebKitDebug.h>
-#import <WebCoreBridge.h>
-
@implementation IFResourceURLHandleClient
- initWithLoader:(id <WebCoreResourceLoader>)l dataSource:(IFWebDataSource *)s
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
index f4d245d..8b3898e 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
@@ -10,14 +10,15 @@
#import <WebFoundation/IFError.h>
#import <WebFoundation/IFURLHandle.h>
+
+#import <WebCoreResourceLoader.h>
+
#import <WebKit/IFLoadProgress.h>
#import <WebKit/IFWebControllerPrivate.h>
#import <WebKit/IFWebCoreBridge.h>
#import <WebKit/IFWebDataSourcePrivate.h>
#import <WebKit/WebKitDebug.h>
-#import <WebCoreBridge.h>
-
@implementation IFResourceURLHandleClient
- initWithLoader:(id <WebCoreResourceLoader>)l dataSource:(IFWebDataSource *)s
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index 81c63b5..06c3513 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -255,6 +255,7 @@
F5E0A77002B8FEE401C1A525,
F5A55DC802BAA2E8018635CC,
F5E0E10A02BC45F8018635CA,
+ F5A7B11B02BC8413018635CA,
);
isa = PBXHeadersBuildPhase;
};
@@ -332,6 +333,7 @@
F5AFB46102B94DC8018635CA,
F5E0A77102B8FEE401C1A525,
F5E0E10B02BC45F8018635CA,
+ F5A7B11C02BC8413018635CA,
);
isa = PBXSourcesBuildPhase;
};
@@ -1664,6 +1666,30 @@
settings = {
};
};
+ F5A7B11902BC8413018635CA = {
+ isa = PBXFileReference;
+ name = IFWebCoreFrame.h;
+ path = WebCoreSupport.subproj/IFWebCoreFrame.h;
+ refType = 4;
+ };
+ F5A7B11A02BC8413018635CA = {
+ isa = PBXFileReference;
+ name = IFWebCoreFrame.m;
+ path = WebCoreSupport.subproj/IFWebCoreFrame.m;
+ refType = 4;
+ };
+ F5A7B11B02BC8413018635CA = {
+ fileRef = F5A7B11902BC8413018635CA;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ F5A7B11C02BC8413018635CA = {
+ fileRef = F5A7B11A02BC8413018635CA;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
F5AEBB3D024A527601C1A526 = {
isa = PBXFileReference;
name = IFPreferences.mm;
@@ -1716,6 +1742,8 @@
F5AFB45F02B94DC8018635CA,
F5E0E10802BC45F8018635CA,
F5E0E10902BC45F8018635CA,
+ F5A7B11902BC8413018635CA,
+ F5A7B11A02BC8413018635CA,
);
isa = PBXGroup;
name = "WebCore Support";
diff --git a/WebKit/WebView.subproj/IFHTMLViewPrivate.h b/WebKit/WebView.subproj/IFHTMLViewPrivate.h
index 556f89b..e5c9992 100644
--- a/WebKit/WebView.subproj/IFHTMLViewPrivate.h
+++ b/WebKit/WebView.subproj/IFHTMLViewPrivate.h
@@ -3,14 +3,16 @@
Private header file. This file may reference classes (both ObjectiveC and C++)
in WebCore. Instances of this class are referenced by _private in
- NSWebPageView.
+ IFHTMLView.
*/
#import <WebKit/IFHTMLView.h>
-class QWidget;
-class KHTMLPart;
+#ifdef __cplusplus
class KHTMLView;
+#else
+ at class KHTMLView;
+#endif
@interface IFHTMLViewPrivate : NSObject
{
diff --git a/WebKit/WebView.subproj/IFWebFrame.mm b/WebKit/WebView.subproj/IFWebFrame.mm
index 2b19730..de2abc4 100644
--- a/WebKit/WebView.subproj/IFWebFrame.mm
+++ b/WebKit/WebView.subproj/IFWebFrame.mm
@@ -3,9 +3,12 @@
Copyright 2001, Apple, Inc. All rights reserved.
*/
-#import <Cocoa/Cocoa.h>
#import <WebKit/IFWebFrame.h>
+
+#import <Cocoa/Cocoa.h>
+
+#import <WebKit/IFWebCoreFrame.h>
#import <WebKit/IFWebFramePrivate.h>
#import <WebKit/IFWebViewPrivate.h>
#import <WebKit/IFWebDataSourcePrivate.h>
@@ -32,7 +35,8 @@
{
[super init];
- _private = [[IFWebFramePrivate alloc] init];
+ _private = [[IFWebFramePrivate alloc] init];
+ _private->bridgeFrame = [[IFWebCoreFrame alloc] initWithWebFrame:self];
[self _setState: IFWEBFRAMESTATE_UNINITIALIZED];
diff --git a/WebKit/WebView.subproj/IFWebFramePrivate.h b/WebKit/WebView.subproj/IFWebFramePrivate.h
index 69b4422..3a81b69 100644
--- a/WebKit/WebView.subproj/IFWebFramePrivate.h
+++ b/WebKit/WebView.subproj/IFWebFramePrivate.h
@@ -8,6 +8,7 @@
#import <WebKit/IFWebFrame.h>
+ at class IFWebCoreFrame;
@class IFWebView;
@protocol IFDocumentLoading;
@@ -46,6 +47,7 @@ typedef enum {
IFWebController *controller;
IFWebFrameState state;
BOOL scheduledLayoutPending;
+ IFWebCoreFrame *bridgeFrame;
}
- (void)setName: (NSString *)n;
@@ -76,4 +78,5 @@ typedef enum {
- (void)_isLoadComplete;
- (void)_checkLoadComplete;
- (void)_timedLayout: userInfo;
+- (IFWebCoreFrame *)_bridgeFrame;
@end
diff --git a/WebKit/WebView.subproj/IFWebFramePrivate.mm b/WebKit/WebView.subproj/IFWebFramePrivate.mm
index 5c8e43c..98bdbe8 100644
--- a/WebKit/WebView.subproj/IFWebFramePrivate.mm
+++ b/WebKit/WebView.subproj/IFWebFramePrivate.mm
@@ -10,6 +10,7 @@
#import <WebKit/IFPreferencesPrivate.h>
#import <WebKit/IFWebController.h>
#import <WebKit/IFWebCoreBridge.h>
+#import <WebKit/IFWebCoreFrame.h>
#import <WebKit/IFWebDataSource.h>
#import <WebKit/IFWebDataSourcePrivate.h>
#import <WebKit/IFWebFramePrivate.h>
@@ -45,6 +46,8 @@ static const char * const stateNames[6] = {
[provisionalDataSource autorelease];
if (renderFramePart)
renderFramePart->deref();
+ [bridgeFrame release];
+
[super dealloc];
}
@@ -439,5 +442,9 @@ static const char * const stateNames[6] = {
[IFWebFrame _recursiveCheckCompleteFromFrame: [[self controller] mainFrame]];
}
+- (IFWebCoreFrame *)_bridgeFrame
+{
+ return _private->bridgeFrame;
+}
@end
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index 2b19730..de2abc4 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -3,9 +3,12 @@
Copyright 2001, Apple, Inc. All rights reserved.
*/
-#import <Cocoa/Cocoa.h>
#import <WebKit/IFWebFrame.h>
+
+#import <Cocoa/Cocoa.h>
+
+#import <WebKit/IFWebCoreFrame.h>
#import <WebKit/IFWebFramePrivate.h>
#import <WebKit/IFWebViewPrivate.h>
#import <WebKit/IFWebDataSourcePrivate.h>
@@ -32,7 +35,8 @@
{
[super init];
- _private = [[IFWebFramePrivate alloc] init];
+ _private = [[IFWebFramePrivate alloc] init];
+ _private->bridgeFrame = [[IFWebCoreFrame alloc] initWithWebFrame:self];
[self _setState: IFWEBFRAMESTATE_UNINITIALIZED];
diff --git a/WebKit/WebView.subproj/WebFramePrivate.h b/WebKit/WebView.subproj/WebFramePrivate.h
index 69b4422..3a81b69 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.h
+++ b/WebKit/WebView.subproj/WebFramePrivate.h
@@ -8,6 +8,7 @@
#import <WebKit/IFWebFrame.h>
+ at class IFWebCoreFrame;
@class IFWebView;
@protocol IFDocumentLoading;
@@ -46,6 +47,7 @@ typedef enum {
IFWebController *controller;
IFWebFrameState state;
BOOL scheduledLayoutPending;
+ IFWebCoreFrame *bridgeFrame;
}
- (void)setName: (NSString *)n;
@@ -76,4 +78,5 @@ typedef enum {
- (void)_isLoadComplete;
- (void)_checkLoadComplete;
- (void)_timedLayout: userInfo;
+- (IFWebCoreFrame *)_bridgeFrame;
@end
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 5c8e43c..98bdbe8 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -10,6 +10,7 @@
#import <WebKit/IFPreferencesPrivate.h>
#import <WebKit/IFWebController.h>
#import <WebKit/IFWebCoreBridge.h>
+#import <WebKit/IFWebCoreFrame.h>
#import <WebKit/IFWebDataSource.h>
#import <WebKit/IFWebDataSourcePrivate.h>
#import <WebKit/IFWebFramePrivate.h>
@@ -45,6 +46,8 @@ static const char * const stateNames[6] = {
[provisionalDataSource autorelease];
if (renderFramePart)
renderFramePart->deref();
+ [bridgeFrame release];
+
[super dealloc];
}
@@ -439,5 +442,9 @@ static const char * const stateNames[6] = {
[IFWebFrame _recursiveCheckCompleteFromFrame: [[self controller] mainFrame]];
}
+- (IFWebCoreFrame *)_bridgeFrame
+{
+ return _private->bridgeFrame;
+}
@end
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.h b/WebKit/WebView.subproj/WebHTMLViewPrivate.h
index 556f89b..e5c9992 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.h
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.h
@@ -3,14 +3,16 @@
Private header file. This file may reference classes (both ObjectiveC and C++)
in WebCore. Instances of this class are referenced by _private in
- NSWebPageView.
+ IFHTMLView.
*/
#import <WebKit/IFHTMLView.h>
-class QWidget;
-class KHTMLPart;
+#ifdef __cplusplus
class KHTMLView;
+#else
+ at class KHTMLView;
+#endif
@interface IFHTMLViewPrivate : NSObject
{
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list