[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:55:00 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit c2152707e13d9c569ce90d2f314e47bdb7743fd5
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Feb 2 01:28:20 2002 +0000

    Changes for dynamic scrolling views (not complete).
    Added simple support for WKLocationChangeHandler so Alexander will diplsay
    page when load is done.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@583 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 8397557..d324779 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,11 @@
+2002-02-01  Richard Williamson  <rjw at apple.com>
+
+    Added support for dynamic scrolling frames.  Also added first callback for
+    WKLocationChangeHandler.
+    
+	* src/kwq/KWQKHTMLPart.mm: (KHTMLPart::end), (KHTMLPart::khtmlMouseReleaseEvent),
+	(KHTMLPart::checkCompleted):
+
 2002-02-01  Kenneth Kocienda  <kocienda at apple.com>
 
         Made some cleanups to the no-copy NSData API, and those changes
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 8397557..d324779 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,11 @@
+2002-02-01  Richard Williamson  <rjw at apple.com>
+
+    Added support for dynamic scrolling frames.  Also added first callback for
+    WKLocationChangeHandler.
+    
+	* src/kwq/KWQKHTMLPart.mm: (KHTMLPart::end), (KHTMLPart::khtmlMouseReleaseEvent),
+	(KHTMLPart::checkCompleted):
+
 2002-02-01  Kenneth Kocienda  <kocienda at apple.com>
 
         Made some cleanups to the no-copy NSData API, and those changes
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 8397557..d324779 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,11 @@
+2002-02-01  Richard Williamson  <rjw at apple.com>
+
+    Added support for dynamic scrolling frames.  Also added first callback for
+    WKLocationChangeHandler.
+    
+	* src/kwq/KWQKHTMLPart.mm: (KHTMLPart::end), (KHTMLPart::khtmlMouseReleaseEvent),
+	(KHTMLPart::checkCompleted):
+
 2002-02-01  Kenneth Kocienda  <kocienda at apple.com>
 
         Made some cleanups to the no-copy NSData API, and those changes
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 5505d8b..476f92a 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -56,6 +56,42 @@
 
 #import <KWQView.h>
 
+ at class WKWebDataSource;
+ at class WKWebView;
+ at class WKWebFrame;
+ at class WKError;
+
+ at protocol WKWebController
+- (WKWebFrame *)createFrameNamed: (NSString *)name for: (WKWebDataSource *)dataSource inParent: (WKWebDataSource *)dataSource;
+- (void)locationChangeDone: (WKError *)error forDataSource: (WKWebDataSource *)dataSource;
+ at end
+
+ at protocol WKLocationChangeHandler
+- (void)locationChangeDone: (WKError *)error forDataSource: (WKWebDataSource *)dataSource;
+ at end
+
+ at interface WKWebDataSource : NSObject
+- initWithURL: (NSURL *)url;
+- (void)_setFrameName: (NSString *)fName;
+- (id <WKWebController>)controller;
+- (void)startLoading: (BOOL)forceRefresh;
+- frameNamed: (NSString *)f;
+ at end
+
+// This should not be allowed here.  data source should not reference view
+// API.
+ at interface WKWebView: NSObject
+- (QWidget *)_widget;
+- (void)_resetView;
+- documentView;
+ at end
+
+ at interface WKWebFrame: NSObject
+- initWithName: (NSString *)n view: v dataSource: (WKWebDataSource *)d;
+- view;
+ at end
+
+
 static bool cache_init = false;
 
 static void recursive(const DOM::Node &pNode, const DOM::Node &node)
@@ -691,7 +727,7 @@ void KHTMLPart::end()
     //    write(d->m_decoder->flush());
     //d->m_doc->finishParsing();
 
-    QString str = d->m_doc->recursive_toHTML(1);
+    //QString str = d->m_doc->recursive_toHTML(1);
     
     d->m_doc->close();
 }
@@ -1237,11 +1273,7 @@ void KHTMLPart::khtmlMouseMoveEvent( khtml::MouseMoveEvent *event )
 
 }
 
-// [rjw]:  hack-o-rama.  This will all have to change once we
-// implement this correctly.
- at interface WKWebView : NSObject
-- (void)_resetView;
- at end
+
 
 void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
 {
@@ -1257,7 +1289,11 @@ void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
 
     // HACK!  FIXME!
     if (d->m_strSelectedURL != QString::null) {
-        [((WKWebView *)((QWidget *)view())->getView()) _resetView];
+        id nsview = ((WKWebView *)((QWidget *)view())->getView());
+        
+        if ([nsview isKindOfClass: NSClassFromString(@"WKDynamicScrollBarsView")])
+            nsview = [nsview documentView];
+        [nsview _resetView];
         KURL clickedURL(completeURL( splitUrlTarget(d->m_strSelectedURL)));
         openURL (clickedURL);
         // [kocienda]: shield your eyes!
@@ -1487,34 +1523,6 @@ void KHTMLPart::urlSelected( const QString &url, int button, int state, const QS
     _logNeverImplemented();
 }
 
- at class WKWebDataSource;
- at class WKWebView;
- at class WKWebFrame;
-
- at protocol WKWebController
-- (WKWebFrame *)createFrameNamed: (NSString *)name for: (WKWebDataSource *)dataSource inParent: (WKWebDataSource *)dataSource;
- at end
-
- at interface WKWebDataSource : NSObject
-- initWithURL: (NSURL *)url;
-- (void)_setFrameName: (NSString *)fName;
-- (id <WKWebController>)controller;
-- (void)startLoading: (BOOL)forceRefresh;
-- frameNamed: (NSString *)f;
- at end
-
-// This should not be allowed here.  data source should not reference view
-// API.
- at interface WKWebView (Foo)
-- (QWidget *)_widget;
- at end
-
- at interface WKWebFrame: NSObject
-- initWithName: (NSString *)n view: v dataSource: (WKWebDataSource *)d;
-- view;
- at end
-
-
 bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const QString &url, const QString &frameName,
                     const QStringList &params, bool isIFrame)
 {
@@ -1658,6 +1666,13 @@ void KHTMLPart::checkCompleted()
         // tell anyone who's interested that we're done
         [[NSNotificationCenter defaultCenter] postNotificationName:@"uri-done" object:urlString];
 
+        WKWebDataSource *dataSource;
+        id <WKWebController> controller;
+        
+        dataSource = getDataSource();
+        controller = [dataSource controller];
+        [controller locationChangeDone: nil forDataSource: dataSource];
+        
         end();
     }
 }
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index 5505d8b..476f92a 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -56,6 +56,42 @@
 
 #import <KWQView.h>
 
+ at class WKWebDataSource;
+ at class WKWebView;
+ at class WKWebFrame;
+ at class WKError;
+
+ at protocol WKWebController
+- (WKWebFrame *)createFrameNamed: (NSString *)name for: (WKWebDataSource *)dataSource inParent: (WKWebDataSource *)dataSource;
+- (void)locationChangeDone: (WKError *)error forDataSource: (WKWebDataSource *)dataSource;
+ at end
+
+ at protocol WKLocationChangeHandler
+- (void)locationChangeDone: (WKError *)error forDataSource: (WKWebDataSource *)dataSource;
+ at end
+
+ at interface WKWebDataSource : NSObject
+- initWithURL: (NSURL *)url;
+- (void)_setFrameName: (NSString *)fName;
+- (id <WKWebController>)controller;
+- (void)startLoading: (BOOL)forceRefresh;
+- frameNamed: (NSString *)f;
+ at end
+
+// This should not be allowed here.  data source should not reference view
+// API.
+ at interface WKWebView: NSObject
+- (QWidget *)_widget;
+- (void)_resetView;
+- documentView;
+ at end
+
+ at interface WKWebFrame: NSObject
+- initWithName: (NSString *)n view: v dataSource: (WKWebDataSource *)d;
+- view;
+ at end
+
+
 static bool cache_init = false;
 
 static void recursive(const DOM::Node &pNode, const DOM::Node &node)
@@ -691,7 +727,7 @@ void KHTMLPart::end()
     //    write(d->m_decoder->flush());
     //d->m_doc->finishParsing();
 
-    QString str = d->m_doc->recursive_toHTML(1);
+    //QString str = d->m_doc->recursive_toHTML(1);
     
     d->m_doc->close();
 }
@@ -1237,11 +1273,7 @@ void KHTMLPart::khtmlMouseMoveEvent( khtml::MouseMoveEvent *event )
 
 }
 
-// [rjw]:  hack-o-rama.  This will all have to change once we
-// implement this correctly.
- at interface WKWebView : NSObject
-- (void)_resetView;
- at end
+
 
 void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
 {
@@ -1257,7 +1289,11 @@ void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
 
     // HACK!  FIXME!
     if (d->m_strSelectedURL != QString::null) {
-        [((WKWebView *)((QWidget *)view())->getView()) _resetView];
+        id nsview = ((WKWebView *)((QWidget *)view())->getView());
+        
+        if ([nsview isKindOfClass: NSClassFromString(@"WKDynamicScrollBarsView")])
+            nsview = [nsview documentView];
+        [nsview _resetView];
         KURL clickedURL(completeURL( splitUrlTarget(d->m_strSelectedURL)));
         openURL (clickedURL);
         // [kocienda]: shield your eyes!
@@ -1487,34 +1523,6 @@ void KHTMLPart::urlSelected( const QString &url, int button, int state, const QS
     _logNeverImplemented();
 }
 
- at class WKWebDataSource;
- at class WKWebView;
- at class WKWebFrame;
-
- at protocol WKWebController
-- (WKWebFrame *)createFrameNamed: (NSString *)name for: (WKWebDataSource *)dataSource inParent: (WKWebDataSource *)dataSource;
- at end
-
- at interface WKWebDataSource : NSObject
-- initWithURL: (NSURL *)url;
-- (void)_setFrameName: (NSString *)fName;
-- (id <WKWebController>)controller;
-- (void)startLoading: (BOOL)forceRefresh;
-- frameNamed: (NSString *)f;
- at end
-
-// This should not be allowed here.  data source should not reference view
-// API.
- at interface WKWebView (Foo)
-- (QWidget *)_widget;
- at end
-
- at interface WKWebFrame: NSObject
-- initWithName: (NSString *)n view: v dataSource: (WKWebDataSource *)d;
-- view;
- at end
-
-
 bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const QString &url, const QString &frameName,
                     const QStringList &params, bool isIFrame)
 {
@@ -1658,6 +1666,13 @@ void KHTMLPart::checkCompleted()
         // tell anyone who's interested that we're done
         [[NSNotificationCenter defaultCenter] postNotificationName:@"uri-done" object:urlString];
 
+        WKWebDataSource *dataSource;
+        id <WKWebController> controller;
+        
+        dataSource = getDataSource();
+        controller = [dataSource controller];
+        [controller locationChangeDone: nil forDataSource: dataSource];
+        
         end();
     }
 }
diff --git a/WebCore/src/kwq/KWQKHTMLPart.mm b/WebCore/src/kwq/KWQKHTMLPart.mm
index 5505d8b..476f92a 100644
--- a/WebCore/src/kwq/KWQKHTMLPart.mm
+++ b/WebCore/src/kwq/KWQKHTMLPart.mm
@@ -56,6 +56,42 @@
 
 #import <KWQView.h>
 
+ at class WKWebDataSource;
+ at class WKWebView;
+ at class WKWebFrame;
+ at class WKError;
+
+ at protocol WKWebController
+- (WKWebFrame *)createFrameNamed: (NSString *)name for: (WKWebDataSource *)dataSource inParent: (WKWebDataSource *)dataSource;
+- (void)locationChangeDone: (WKError *)error forDataSource: (WKWebDataSource *)dataSource;
+ at end
+
+ at protocol WKLocationChangeHandler
+- (void)locationChangeDone: (WKError *)error forDataSource: (WKWebDataSource *)dataSource;
+ at end
+
+ at interface WKWebDataSource : NSObject
+- initWithURL: (NSURL *)url;
+- (void)_setFrameName: (NSString *)fName;
+- (id <WKWebController>)controller;
+- (void)startLoading: (BOOL)forceRefresh;
+- frameNamed: (NSString *)f;
+ at end
+
+// This should not be allowed here.  data source should not reference view
+// API.
+ at interface WKWebView: NSObject
+- (QWidget *)_widget;
+- (void)_resetView;
+- documentView;
+ at end
+
+ at interface WKWebFrame: NSObject
+- initWithName: (NSString *)n view: v dataSource: (WKWebDataSource *)d;
+- view;
+ at end
+
+
 static bool cache_init = false;
 
 static void recursive(const DOM::Node &pNode, const DOM::Node &node)
@@ -691,7 +727,7 @@ void KHTMLPart::end()
     //    write(d->m_decoder->flush());
     //d->m_doc->finishParsing();
 
-    QString str = d->m_doc->recursive_toHTML(1);
+    //QString str = d->m_doc->recursive_toHTML(1);
     
     d->m_doc->close();
 }
@@ -1237,11 +1273,7 @@ void KHTMLPart::khtmlMouseMoveEvent( khtml::MouseMoveEvent *event )
 
 }
 
-// [rjw]:  hack-o-rama.  This will all have to change once we
-// implement this correctly.
- at interface WKWebView : NSObject
-- (void)_resetView;
- at end
+
 
 void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
 {
@@ -1257,7 +1289,11 @@ void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
 
     // HACK!  FIXME!
     if (d->m_strSelectedURL != QString::null) {
-        [((WKWebView *)((QWidget *)view())->getView()) _resetView];
+        id nsview = ((WKWebView *)((QWidget *)view())->getView());
+        
+        if ([nsview isKindOfClass: NSClassFromString(@"WKDynamicScrollBarsView")])
+            nsview = [nsview documentView];
+        [nsview _resetView];
         KURL clickedURL(completeURL( splitUrlTarget(d->m_strSelectedURL)));
         openURL (clickedURL);
         // [kocienda]: shield your eyes!
@@ -1487,34 +1523,6 @@ void KHTMLPart::urlSelected( const QString &url, int button, int state, const QS
     _logNeverImplemented();
 }
 
- at class WKWebDataSource;
- at class WKWebView;
- at class WKWebFrame;
-
- at protocol WKWebController
-- (WKWebFrame *)createFrameNamed: (NSString *)name for: (WKWebDataSource *)dataSource inParent: (WKWebDataSource *)dataSource;
- at end
-
- at interface WKWebDataSource : NSObject
-- initWithURL: (NSURL *)url;
-- (void)_setFrameName: (NSString *)fName;
-- (id <WKWebController>)controller;
-- (void)startLoading: (BOOL)forceRefresh;
-- frameNamed: (NSString *)f;
- at end
-
-// This should not be allowed here.  data source should not reference view
-// API.
- at interface WKWebView (Foo)
-- (QWidget *)_widget;
- at end
-
- at interface WKWebFrame: NSObject
-- initWithName: (NSString *)n view: v dataSource: (WKWebDataSource *)d;
-- view;
- at end
-
-
 bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const QString &url, const QString &frameName,
                     const QStringList &params, bool isIFrame)
 {
@@ -1658,6 +1666,13 @@ void KHTMLPart::checkCompleted()
         // tell anyone who's interested that we're done
         [[NSNotificationCenter defaultCenter] postNotificationName:@"uri-done" object:urlString];
 
+        WKWebDataSource *dataSource;
+        id <WKWebController> controller;
+        
+        dataSource = getDataSource();
+        controller = [dataSource controller];
+        [controller locationChangeDone: nil forDataSource: dataSource];
+        
         end();
     }
 }
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index e753383..00ab910 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,18 @@
+2002-02-01  Richard Williamson  <rjw at apple.com>
+
+    Changes for dynamic scrolling frames.  Added notification of complete
+    load.
+    
+	* WebView.subproj/WKDefaultWebController.mm: (-[WKDefaultWebController
+	createFrameNamed:for:inParent:]), (-[WKDefaultWebController
+	locationChangeDone:forDataSource:]):
+	* WebView.subproj/WKWebController.h:
+	* WebView.subproj/WKWebView.mm: (-[WKWebView dataSourceChanged]):
+	* WebView.subproj/WKWebViewPrivate.h:
+	* WebView.subproj/WKWebViewPrivate.mm: (-[WKWebViewPrivate dealloc]),
+	(-[WKWebView _widget]), (-[WKWebView _setFrameScrollView:]), (-[WKWebView
+	_frameScrollView]):
+
 2002-02-01  John Sullivan  <sullivan at apple.com>
 
 	Added call to examine the entry at the current index in
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index e753383..00ab910 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,18 @@
+2002-02-01  Richard Williamson  <rjw at apple.com>
+
+    Changes for dynamic scrolling frames.  Added notification of complete
+    load.
+    
+	* WebView.subproj/WKDefaultWebController.mm: (-[WKDefaultWebController
+	createFrameNamed:for:inParent:]), (-[WKDefaultWebController
+	locationChangeDone:forDataSource:]):
+	* WebView.subproj/WKWebController.h:
+	* WebView.subproj/WKWebView.mm: (-[WKWebView dataSourceChanged]):
+	* WebView.subproj/WKWebViewPrivate.h:
+	* WebView.subproj/WKWebViewPrivate.mm: (-[WKWebViewPrivate dealloc]),
+	(-[WKWebView _widget]), (-[WKWebView _setFrameScrollView:]), (-[WKWebView
+	_frameScrollView]):
+
 2002-02-01  John Sullivan  <sullivan at apple.com>
 
 	Added call to examine the entry at the current index in
diff --git a/WebKit/WebView.subproj/IFBaseWebController.mm b/WebKit/WebView.subproj/IFBaseWebController.mm
index 2393fbd..f2e0454 100644
--- a/WebKit/WebView.subproj/IFBaseWebController.mm
+++ b/WebKit/WebView.subproj/IFBaseWebController.mm
@@ -137,6 +137,7 @@
     WKDefaultWebControllerPrivate *data = ((WKDefaultWebControllerPrivate *)_controllerPrivate);
     WKWebView *childView;
     WKWebFrame *newFrame;
+    //WKDynamicScrollBarsView *scrollView;
 
     childView = [[WKWebView alloc] initWithFrame: NSMakeRect (0,0,0,0)];
 
@@ -149,6 +150,10 @@
     [data->dataSourceMap setObject: childDataSource forKey: [WKObjectHolder holderWithObject:childView]];
     [childDataSource _setController: self];
 
+    
+    //scrollView  = [[[WKDynamicScrollBarsView alloc] initWithFrame: NSMakeRect(0,0,0,0)] autorelease];
+    //[childView _setFrameScrollView: scrollView];
+        
     [childView dataSourceChanged];
         
     return newFrame;
@@ -263,10 +268,14 @@
 
 - (void)locationChangeDone: (WKError *)error forDataSource: (WKWebDataSource *)dataSource
 {
-    [NSException raise:WKMethodNotYetImplemented format:@"WKDefaultWebController::locationChangeDone:forDataSource: is not implemented"];
+    WKDefaultWebControllerPrivate *data = ((WKDefaultWebControllerPrivate *)_controllerPrivate);
+    
+    // FIXME:  Should be smart about only laying out necessary views.  This is
+    // important for frames and iframes.
+    [data->mainView setNeedsLayout: YES];
+    [data->mainView setNeedsDisplay: YES];
 }
 
-
 - (void)receivedPageTitle: (NSString *)title forDataSource: (WKWebDataSource *)dataSource
 {
     [NSException raise:WKMethodNotYetImplemented format:@"WKDefaultWebController::receivedPageTitle:forDataSource: is not implemented"];
diff --git a/WebKit/WebView.subproj/IFDefaultWebController.mm b/WebKit/WebView.subproj/IFDefaultWebController.mm
index 2393fbd..f2e0454 100644
--- a/WebKit/WebView.subproj/IFDefaultWebController.mm
+++ b/WebKit/WebView.subproj/IFDefaultWebController.mm
@@ -137,6 +137,7 @@
     WKDefaultWebControllerPrivate *data = ((WKDefaultWebControllerPrivate *)_controllerPrivate);
     WKWebView *childView;
     WKWebFrame *newFrame;
+    //WKDynamicScrollBarsView *scrollView;
 
     childView = [[WKWebView alloc] initWithFrame: NSMakeRect (0,0,0,0)];
 
@@ -149,6 +150,10 @@
     [data->dataSourceMap setObject: childDataSource forKey: [WKObjectHolder holderWithObject:childView]];
     [childDataSource _setController: self];
 
+    
+    //scrollView  = [[[WKDynamicScrollBarsView alloc] initWithFrame: NSMakeRect(0,0,0,0)] autorelease];
+    //[childView _setFrameScrollView: scrollView];
+        
     [childView dataSourceChanged];
         
     return newFrame;
@@ -263,10 +268,14 @@
 
 - (void)locationChangeDone: (WKError *)error forDataSource: (WKWebDataSource *)dataSource
 {
-    [NSException raise:WKMethodNotYetImplemented format:@"WKDefaultWebController::locationChangeDone:forDataSource: is not implemented"];
+    WKDefaultWebControllerPrivate *data = ((WKDefaultWebControllerPrivate *)_controllerPrivate);
+    
+    // FIXME:  Should be smart about only laying out necessary views.  This is
+    // important for frames and iframes.
+    [data->mainView setNeedsLayout: YES];
+    [data->mainView setNeedsDisplay: YES];
 }
 
-
 - (void)receivedPageTitle: (NSString *)title forDataSource: (WKWebDataSource *)dataSource
 {
     [NSException raise:WKMethodNotYetImplemented format:@"WKDefaultWebController::receivedPageTitle:forDataSource: is not implemented"];
diff --git a/WebKit/WebView.subproj/IFWebController.h b/WebKit/WebView.subproj/IFWebController.h
index e3ec214..88c098b 100644
--- a/WebKit/WebView.subproj/IFWebController.h
+++ b/WebKit/WebView.subproj/IFWebController.h
@@ -10,36 +10,14 @@
 /*
    ============================================================================= 
 
-    WKWebController manages the interaction between WKWebView and WKWebDataSource.
-    Intances of WKWebController retain their view and data source.
-    
-    [As in the appkit classes NSWindow and NSWindowController, it will be necessary 
-     to have non-retained back pointers from WKWebView and WKWebDataSource to their
-     controller.  Not retaining the controller will prevent cycles.  Of course, not
-     retaining is bad, as it can lead to dangling references.  We could invert the reference
-     graph and add ...inView: and ...inDataSource: to the API, but that's ugly.  If it's
-     good enough for the appkit, it's good enough for us.  Ugh.]
-     
-                                 .--(p)WKWebController --.
-                                 |      .    .           |
-                                 |     .      .          |
-                                \|/   .        .        \|/
-    (p)WKWebViewDelegate <-- (c)WKWebView     (c)WKWebDataSource --> (p)WKWebDataSourceDelegate
-    
-    (c) indicates a class, (p) indicates a protocol.  The solid lines indicate an 
-    retained reference.  The dotted lines indicate a non-retained reference.
-    
+    WKWebController manages the interaction between WKWebView(s) and WKWebDataSource(s).
+
     The WKWebController implements required behavior.  WKWebView and WKWebDataSource
     cannot function without a controller.  
     
-    Delegates implement optional behavior.  WKWebView doesn't require a WKWebViewDelegate,
-    nor does WKWebDataSource require a WKWebDataSourceDelegate.
-    
     It it expected that alternate implementations of WKWebController will be written for
-    alternate views of the web page described by WKWebDataSource.  For example, a 
-    view that draws the DOM tree would require both a subclass of NSView and an
-    implementation of WKWebController.  It is also possible that a web crawler
-    may implement a WKWebController with no corresponding view.
+    alternate views of the web pages described by WKWebDataSources.  For example, a web
+    crawler may implement a WKWebController with no corresponding view.
     
     WKDefaultWebController may be subclassed to modify the behavior of the standard
     WKWebView and WKWebDataSource.
diff --git a/WebKit/WebView.subproj/IFWebView.mm b/WebKit/WebView.subproj/IFWebView.mm
index bcba506..2c7eeb4 100644
--- a/WebKit/WebView.subproj/IFWebView.mm
+++ b/WebKit/WebView.subproj/IFWebView.mm
@@ -6,6 +6,7 @@
 #import <WebKit/WKWebDataSource.h>
 #import <WebKit/WKWebDataSourcePrivate.h>
 #import <WebKit/WKDefaultWebController.h>
+#import <WebKit/WKDynamicScrollBarsView.h>
 #import <WebKit/WKException.h>
 #import <WebKit/WebKitDebug.h>
 
@@ -63,8 +64,12 @@
 
     data->widget = new KHTMLView (part, 0);
     part->setView (data->widget);
-    
-    data->widget->setView (self);
+
+    // Check to see if we're a frame.
+    //if ([self _frameScrollView])
+    //    data->widget->setView ([self _frameScrollView]);
+    //else
+        data->widget->setView (self);
     
     data->widget->resize (r.size.width,r.size.height);
 
diff --git a/WebKit/WebView.subproj/IFWebViewPrivate.h b/WebKit/WebView.subproj/IFWebViewPrivate.h
index 6f754d1..79b55cd 100644
--- a/WebKit/WebView.subproj/IFWebViewPrivate.h
+++ b/WebKit/WebView.subproj/IFWebViewPrivate.h
@@ -8,6 +8,7 @@
 #import <Cocoa/Cocoa.h>
 
 #import <WebKit/WKWebController.h>
+#import <WebKit/WKDynamicScrollBarsView.h>
 #import <WebKit/WKWebView.h>
 
 class QWidget;
@@ -18,6 +19,7 @@ class KHTMLView;
 {
     id <WKWebController>controller;
     KHTMLView *widget;
+    WKDynamicScrollBarsView *frameScrollView;
     bool isFlipped;
     bool needsLayout;
 }
@@ -28,4 +30,6 @@ class KHTMLView;
 - (void)_setController: (id <WKWebController>)controller;
 - (void)_resetView;
 - (KHTMLView *)_widget;
+- (void)_setFrameScrollView: (WKDynamicScrollBarsView *)sv;
+- (WKDynamicScrollBarsView *)_frameScrollView;
 @end
diff --git a/WebKit/WebView.subproj/IFWebViewPrivate.mm b/WebKit/WebView.subproj/IFWebViewPrivate.mm
index 84b5c9c..40f6b56 100644
--- a/WebKit/WebView.subproj/IFWebViewPrivate.mm
+++ b/WebKit/WebView.subproj/IFWebViewPrivate.mm
@@ -28,6 +28,8 @@
     // controller is not retained!  WKWebControllers maintain
     // a reference to their view and main data source.
 
+    [frameScrollView release];
+
     if (widget)
         delete widget;
 }
@@ -64,4 +66,16 @@
     return ((WKWebViewPrivate *)_viewPrivate)->widget;    
 }
 
+- (void)_setFrameScrollView: (WKDynamicScrollBarsView *)sv
+{
+    ((WKWebViewPrivate *)_viewPrivate)->frameScrollView = [sv retain];    
+    [self setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
+    [sv setDocumentView: self];
+}
+
+- (WKDynamicScrollBarsView *)_frameScrollView
+{
+    return ((WKWebViewPrivate *)_viewPrivate)->frameScrollView;    
+}
+
 @end
diff --git a/WebKit/WebView.subproj/WKDefaultWebController.mm b/WebKit/WebView.subproj/WKDefaultWebController.mm
index 2393fbd..f2e0454 100644
--- a/WebKit/WebView.subproj/WKDefaultWebController.mm
+++ b/WebKit/WebView.subproj/WKDefaultWebController.mm
@@ -137,6 +137,7 @@
     WKDefaultWebControllerPrivate *data = ((WKDefaultWebControllerPrivate *)_controllerPrivate);
     WKWebView *childView;
     WKWebFrame *newFrame;
+    //WKDynamicScrollBarsView *scrollView;
 
     childView = [[WKWebView alloc] initWithFrame: NSMakeRect (0,0,0,0)];
 
@@ -149,6 +150,10 @@
     [data->dataSourceMap setObject: childDataSource forKey: [WKObjectHolder holderWithObject:childView]];
     [childDataSource _setController: self];
 
+    
+    //scrollView  = [[[WKDynamicScrollBarsView alloc] initWithFrame: NSMakeRect(0,0,0,0)] autorelease];
+    //[childView _setFrameScrollView: scrollView];
+        
     [childView dataSourceChanged];
         
     return newFrame;
@@ -263,10 +268,14 @@
 
 - (void)locationChangeDone: (WKError *)error forDataSource: (WKWebDataSource *)dataSource
 {
-    [NSException raise:WKMethodNotYetImplemented format:@"WKDefaultWebController::locationChangeDone:forDataSource: is not implemented"];
+    WKDefaultWebControllerPrivate *data = ((WKDefaultWebControllerPrivate *)_controllerPrivate);
+    
+    // FIXME:  Should be smart about only laying out necessary views.  This is
+    // important for frames and iframes.
+    [data->mainView setNeedsLayout: YES];
+    [data->mainView setNeedsDisplay: YES];
 }
 
-
 - (void)receivedPageTitle: (NSString *)title forDataSource: (WKWebDataSource *)dataSource
 {
     [NSException raise:WKMethodNotYetImplemented format:@"WKDefaultWebController::receivedPageTitle:forDataSource: is not implemented"];
diff --git a/WebKit/WebView.subproj/WKWebController.h b/WebKit/WebView.subproj/WKWebController.h
index e3ec214..88c098b 100644
--- a/WebKit/WebView.subproj/WKWebController.h
+++ b/WebKit/WebView.subproj/WKWebController.h
@@ -10,36 +10,14 @@
 /*
    ============================================================================= 
 
-    WKWebController manages the interaction between WKWebView and WKWebDataSource.
-    Intances of WKWebController retain their view and data source.
-    
-    [As in the appkit classes NSWindow and NSWindowController, it will be necessary 
-     to have non-retained back pointers from WKWebView and WKWebDataSource to their
-     controller.  Not retaining the controller will prevent cycles.  Of course, not
-     retaining is bad, as it can lead to dangling references.  We could invert the reference
-     graph and add ...inView: and ...inDataSource: to the API, but that's ugly.  If it's
-     good enough for the appkit, it's good enough for us.  Ugh.]
-     
-                                 .--(p)WKWebController --.
-                                 |      .    .           |
-                                 |     .      .          |
-                                \|/   .        .        \|/
-    (p)WKWebViewDelegate <-- (c)WKWebView     (c)WKWebDataSource --> (p)WKWebDataSourceDelegate
-    
-    (c) indicates a class, (p) indicates a protocol.  The solid lines indicate an 
-    retained reference.  The dotted lines indicate a non-retained reference.
-    
+    WKWebController manages the interaction between WKWebView(s) and WKWebDataSource(s).
+
     The WKWebController implements required behavior.  WKWebView and WKWebDataSource
     cannot function without a controller.  
     
-    Delegates implement optional behavior.  WKWebView doesn't require a WKWebViewDelegate,
-    nor does WKWebDataSource require a WKWebDataSourceDelegate.
-    
     It it expected that alternate implementations of WKWebController will be written for
-    alternate views of the web page described by WKWebDataSource.  For example, a 
-    view that draws the DOM tree would require both a subclass of NSView and an
-    implementation of WKWebController.  It is also possible that a web crawler
-    may implement a WKWebController with no corresponding view.
+    alternate views of the web pages described by WKWebDataSources.  For example, a web
+    crawler may implement a WKWebController with no corresponding view.
     
     WKDefaultWebController may be subclassed to modify the behavior of the standard
     WKWebView and WKWebDataSource.
diff --git a/WebKit/WebView.subproj/WKWebView.mm b/WebKit/WebView.subproj/WKWebView.mm
index bcba506..2c7eeb4 100644
--- a/WebKit/WebView.subproj/WKWebView.mm
+++ b/WebKit/WebView.subproj/WKWebView.mm
@@ -6,6 +6,7 @@
 #import <WebKit/WKWebDataSource.h>
 #import <WebKit/WKWebDataSourcePrivate.h>
 #import <WebKit/WKDefaultWebController.h>
+#import <WebKit/WKDynamicScrollBarsView.h>
 #import <WebKit/WKException.h>
 #import <WebKit/WebKitDebug.h>
 
@@ -63,8 +64,12 @@
 
     data->widget = new KHTMLView (part, 0);
     part->setView (data->widget);
-    
-    data->widget->setView (self);
+
+    // Check to see if we're a frame.
+    //if ([self _frameScrollView])
+    //    data->widget->setView ([self _frameScrollView]);
+    //else
+        data->widget->setView (self);
     
     data->widget->resize (r.size.width,r.size.height);
 
diff --git a/WebKit/WebView.subproj/WKWebViewPrivate.h b/WebKit/WebView.subproj/WKWebViewPrivate.h
index 6f754d1..79b55cd 100644
--- a/WebKit/WebView.subproj/WKWebViewPrivate.h
+++ b/WebKit/WebView.subproj/WKWebViewPrivate.h
@@ -8,6 +8,7 @@
 #import <Cocoa/Cocoa.h>
 
 #import <WebKit/WKWebController.h>
+#import <WebKit/WKDynamicScrollBarsView.h>
 #import <WebKit/WKWebView.h>
 
 class QWidget;
@@ -18,6 +19,7 @@ class KHTMLView;
 {
     id <WKWebController>controller;
     KHTMLView *widget;
+    WKDynamicScrollBarsView *frameScrollView;
     bool isFlipped;
     bool needsLayout;
 }
@@ -28,4 +30,6 @@ class KHTMLView;
 - (void)_setController: (id <WKWebController>)controller;
 - (void)_resetView;
 - (KHTMLView *)_widget;
+- (void)_setFrameScrollView: (WKDynamicScrollBarsView *)sv;
+- (WKDynamicScrollBarsView *)_frameScrollView;
 @end
diff --git a/WebKit/WebView.subproj/WKWebViewPrivate.mm b/WebKit/WebView.subproj/WKWebViewPrivate.mm
index 84b5c9c..40f6b56 100644
--- a/WebKit/WebView.subproj/WKWebViewPrivate.mm
+++ b/WebKit/WebView.subproj/WKWebViewPrivate.mm
@@ -28,6 +28,8 @@
     // controller is not retained!  WKWebControllers maintain
     // a reference to their view and main data source.
 
+    [frameScrollView release];
+
     if (widget)
         delete widget;
 }
@@ -64,4 +66,16 @@
     return ((WKWebViewPrivate *)_viewPrivate)->widget;    
 }
 
+- (void)_setFrameScrollView: (WKDynamicScrollBarsView *)sv
+{
+    ((WKWebViewPrivate *)_viewPrivate)->frameScrollView = [sv retain];    
+    [self setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
+    [sv setDocumentView: self];
+}
+
+- (WKDynamicScrollBarsView *)_frameScrollView
+{
+    return ((WKWebViewPrivate *)_viewPrivate)->frameScrollView;    
+}
+
 @end
diff --git a/WebKit/WebView.subproj/WebController.h b/WebKit/WebView.subproj/WebController.h
index e3ec214..88c098b 100644
--- a/WebKit/WebView.subproj/WebController.h
+++ b/WebKit/WebView.subproj/WebController.h
@@ -10,36 +10,14 @@
 /*
    ============================================================================= 
 
-    WKWebController manages the interaction between WKWebView and WKWebDataSource.
-    Intances of WKWebController retain their view and data source.
-    
-    [As in the appkit classes NSWindow and NSWindowController, it will be necessary 
-     to have non-retained back pointers from WKWebView and WKWebDataSource to their
-     controller.  Not retaining the controller will prevent cycles.  Of course, not
-     retaining is bad, as it can lead to dangling references.  We could invert the reference
-     graph and add ...inView: and ...inDataSource: to the API, but that's ugly.  If it's
-     good enough for the appkit, it's good enough for us.  Ugh.]
-     
-                                 .--(p)WKWebController --.
-                                 |      .    .           |
-                                 |     .      .          |
-                                \|/   .        .        \|/
-    (p)WKWebViewDelegate <-- (c)WKWebView     (c)WKWebDataSource --> (p)WKWebDataSourceDelegate
-    
-    (c) indicates a class, (p) indicates a protocol.  The solid lines indicate an 
-    retained reference.  The dotted lines indicate a non-retained reference.
-    
+    WKWebController manages the interaction between WKWebView(s) and WKWebDataSource(s).
+
     The WKWebController implements required behavior.  WKWebView and WKWebDataSource
     cannot function without a controller.  
     
-    Delegates implement optional behavior.  WKWebView doesn't require a WKWebViewDelegate,
-    nor does WKWebDataSource require a WKWebDataSourceDelegate.
-    
     It it expected that alternate implementations of WKWebController will be written for
-    alternate views of the web page described by WKWebDataSource.  For example, a 
-    view that draws the DOM tree would require both a subclass of NSView and an
-    implementation of WKWebController.  It is also possible that a web crawler
-    may implement a WKWebController with no corresponding view.
+    alternate views of the web pages described by WKWebDataSources.  For example, a web
+    crawler may implement a WKWebController with no corresponding view.
     
     WKDefaultWebController may be subclassed to modify the behavior of the standard
     WKWebView and WKWebDataSource.
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index bcba506..2c7eeb4 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -6,6 +6,7 @@
 #import <WebKit/WKWebDataSource.h>
 #import <WebKit/WKWebDataSourcePrivate.h>
 #import <WebKit/WKDefaultWebController.h>
+#import <WebKit/WKDynamicScrollBarsView.h>
 #import <WebKit/WKException.h>
 #import <WebKit/WebKitDebug.h>
 
@@ -63,8 +64,12 @@
 
     data->widget = new KHTMLView (part, 0);
     part->setView (data->widget);
-    
-    data->widget->setView (self);
+
+    // Check to see if we're a frame.
+    //if ([self _frameScrollView])
+    //    data->widget->setView ([self _frameScrollView]);
+    //else
+        data->widget->setView (self);
     
     data->widget->resize (r.size.width,r.size.height);
 
diff --git a/WebKit/WebView.subproj/WebFrameViewInternal.h b/WebKit/WebView.subproj/WebFrameViewInternal.h
index 6f754d1..79b55cd 100644
--- a/WebKit/WebView.subproj/WebFrameViewInternal.h
+++ b/WebKit/WebView.subproj/WebFrameViewInternal.h
@@ -8,6 +8,7 @@
 #import <Cocoa/Cocoa.h>
 
 #import <WebKit/WKWebController.h>
+#import <WebKit/WKDynamicScrollBarsView.h>
 #import <WebKit/WKWebView.h>
 
 class QWidget;
@@ -18,6 +19,7 @@ class KHTMLView;
 {
     id <WKWebController>controller;
     KHTMLView *widget;
+    WKDynamicScrollBarsView *frameScrollView;
     bool isFlipped;
     bool needsLayout;
 }
@@ -28,4 +30,6 @@ class KHTMLView;
 - (void)_setController: (id <WKWebController>)controller;
 - (void)_resetView;
 - (KHTMLView *)_widget;
+- (void)_setFrameScrollView: (WKDynamicScrollBarsView *)sv;
+- (WKDynamicScrollBarsView *)_frameScrollView;
 @end
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.h b/WebKit/WebView.subproj/WebFrameViewPrivate.h
index 6f754d1..79b55cd 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.h
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.h
@@ -8,6 +8,7 @@
 #import <Cocoa/Cocoa.h>
 
 #import <WebKit/WKWebController.h>
+#import <WebKit/WKDynamicScrollBarsView.h>
 #import <WebKit/WKWebView.h>
 
 class QWidget;
@@ -18,6 +19,7 @@ class KHTMLView;
 {
     id <WKWebController>controller;
     KHTMLView *widget;
+    WKDynamicScrollBarsView *frameScrollView;
     bool isFlipped;
     bool needsLayout;
 }
@@ -28,4 +30,6 @@ class KHTMLView;
 - (void)_setController: (id <WKWebController>)controller;
 - (void)_resetView;
 - (KHTMLView *)_widget;
+- (void)_setFrameScrollView: (WKDynamicScrollBarsView *)sv;
+- (WKDynamicScrollBarsView *)_frameScrollView;
 @end
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.m b/WebKit/WebView.subproj/WebFrameViewPrivate.m
index 84b5c9c..40f6b56 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.m
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.m
@@ -28,6 +28,8 @@
     // controller is not retained!  WKWebControllers maintain
     // a reference to their view and main data source.
 
+    [frameScrollView release];
+
     if (widget)
         delete widget;
 }
@@ -64,4 +66,16 @@
     return ((WKWebViewPrivate *)_viewPrivate)->widget;    
 }
 
+- (void)_setFrameScrollView: (WKDynamicScrollBarsView *)sv
+{
+    ((WKWebViewPrivate *)_viewPrivate)->frameScrollView = [sv retain];    
+    [self setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
+    [sv setDocumentView: self];
+}
+
+- (WKDynamicScrollBarsView *)_frameScrollView
+{
+    return ((WKWebViewPrivate *)_viewPrivate)->frameScrollView;    
+}
+
 @end
diff --git a/WebKit/WebView.subproj/WebView.h b/WebKit/WebView.subproj/WebView.h
index e3ec214..88c098b 100644
--- a/WebKit/WebView.subproj/WebView.h
+++ b/WebKit/WebView.subproj/WebView.h
@@ -10,36 +10,14 @@
 /*
    ============================================================================= 
 
-    WKWebController manages the interaction between WKWebView and WKWebDataSource.
-    Intances of WKWebController retain their view and data source.
-    
-    [As in the appkit classes NSWindow and NSWindowController, it will be necessary 
-     to have non-retained back pointers from WKWebView and WKWebDataSource to their
-     controller.  Not retaining the controller will prevent cycles.  Of course, not
-     retaining is bad, as it can lead to dangling references.  We could invert the reference
-     graph and add ...inView: and ...inDataSource: to the API, but that's ugly.  If it's
-     good enough for the appkit, it's good enough for us.  Ugh.]
-     
-                                 .--(p)WKWebController --.
-                                 |      .    .           |
-                                 |     .      .          |
-                                \|/   .        .        \|/
-    (p)WKWebViewDelegate <-- (c)WKWebView     (c)WKWebDataSource --> (p)WKWebDataSourceDelegate
-    
-    (c) indicates a class, (p) indicates a protocol.  The solid lines indicate an 
-    retained reference.  The dotted lines indicate a non-retained reference.
-    
+    WKWebController manages the interaction between WKWebView(s) and WKWebDataSource(s).
+
     The WKWebController implements required behavior.  WKWebView and WKWebDataSource
     cannot function without a controller.  
     
-    Delegates implement optional behavior.  WKWebView doesn't require a WKWebViewDelegate,
-    nor does WKWebDataSource require a WKWebDataSourceDelegate.
-    
     It it expected that alternate implementations of WKWebController will be written for
-    alternate views of the web page described by WKWebDataSource.  For example, a 
-    view that draws the DOM tree would require both a subclass of NSView and an
-    implementation of WKWebController.  It is also possible that a web crawler
-    may implement a WKWebController with no corresponding view.
+    alternate views of the web pages described by WKWebDataSources.  For example, a web
+    crawler may implement a WKWebController with no corresponding view.
     
     WKDefaultWebController may be subclassed to modify the behavior of the standard
     WKWebView and WKWebDataSource.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list