[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:54:47 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit d2f57520e288cfa5fcc6bfb00a83c469a159c418
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 30 23:37:49 2002 +0000

    Cleanuped up frame code a bit.  Fixed duplicate content problem.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@567 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index d28b42e..8498c70 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,12 @@
+2002-01-30  Richard Williamson  <rjw at apple.com>
+    
+    Cleaned up frame code a bit.  Fixed duplicate content problem.
+
+	* src/kdelibs/khtml/html/html_headimpl.cpp: (HTMLLinkElementImpl::detach):
+	* src/kdelibs/khtml/khtmlview.cpp: (KHTMLView::layout):
+	* src/kwq/KWQKHTMLPart.mm: (KHTMLPart::~KHTMLPart), (KHTMLPart::openURL),
+	(KHTMLPart::requestFrame):
+
 2002-01-30  Kenneth Kocienda  <kocienda at apple.com>
 
         Added *.lo, *.la, and .libs to .cvsignore files
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index d28b42e..8498c70 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,12 @@
+2002-01-30  Richard Williamson  <rjw at apple.com>
+    
+    Cleaned up frame code a bit.  Fixed duplicate content problem.
+
+	* src/kdelibs/khtml/html/html_headimpl.cpp: (HTMLLinkElementImpl::detach):
+	* src/kdelibs/khtml/khtmlview.cpp: (KHTMLView::layout):
+	* src/kwq/KWQKHTMLPart.mm: (KHTMLPart::~KHTMLPart), (KHTMLPart::openURL),
+	(KHTMLPart::requestFrame):
+
 2002-01-30  Kenneth Kocienda  <kocienda at apple.com>
 
         Added *.lo, *.la, and .libs to .cvsignore files
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index d28b42e..8498c70 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,12 @@
+2002-01-30  Richard Williamson  <rjw at apple.com>
+    
+    Cleaned up frame code a bit.  Fixed duplicate content problem.
+
+	* src/kdelibs/khtml/html/html_headimpl.cpp: (HTMLLinkElementImpl::detach):
+	* src/kdelibs/khtml/khtmlview.cpp: (KHTMLView::layout):
+	* src/kwq/KWQKHTMLPart.mm: (KHTMLPart::~KHTMLPart), (KHTMLPart::openURL),
+	(KHTMLPart::requestFrame):
+
 2002-01-30  Kenneth Kocienda  <kocienda at apple.com>
 
         Added *.lo, *.la, and .libs to .cvsignore files
diff --git a/WebCore/khtml/html/html_headimpl.cpp b/WebCore/khtml/html/html_headimpl.cpp
index d0b9397..6bc329b 100644
--- a/WebCore/khtml/html/html_headimpl.cpp
+++ b/WebCore/khtml/html/html_headimpl.cpp
@@ -148,6 +148,7 @@ void HTMLLinkElementImpl::attach()
 
 void HTMLLinkElementImpl::detach()
 {
+    // RJW:  Why is this done here?
     if ( sheet() )
         getDocument()->createSelector();
 
diff --git a/WebCore/khtml/khtmlview.cpp b/WebCore/khtml/khtmlview.cpp
index ca3f73f..8c33567 100644
--- a/WebCore/khtml/khtmlview.cpp
+++ b/WebCore/khtml/khtmlview.cpp
@@ -334,26 +334,28 @@ void KHTMLView::layout(bool)
 
         khtml::RenderRoot* root = static_cast<khtml::RenderRoot *>(document->renderer());
 
-        if (document->isHTMLDocument()) {
-            NodeImpl *body = static_cast<HTMLDocumentImpl*>(document)->body();
-            if(body && body->renderer() && body->id() == ID_FRAMESET) {
-                QScrollView::setVScrollBarMode(AlwaysOff);
-                QScrollView::setHScrollBarMode(AlwaysOff);
-                _width = visibleWidth();
-                body->renderer()->setLayouted(false);
-                body->renderer()->layout();
-                root->layout();
-                return;
+        if (root != 0){
+            if (document->isHTMLDocument()) {
+                NodeImpl *body = static_cast<HTMLDocumentImpl*>(document)->body();
+                if(body && body->renderer() && body->id() == ID_FRAMESET) {
+                    QScrollView::setVScrollBarMode(AlwaysOff);
+                    QScrollView::setHScrollBarMode(AlwaysOff);
+                    _width = visibleWidth();
+                    body->renderer()->setLayouted(false);
+                    body->renderer()->layout();
+                    root->layout();
+                    return;
+                }
             }
-        }
-
-        _height = visibleHeight();
-        _width = visibleWidth();
-
-        //QTime qt;
-        //qt.start();
+        
+            _height = visibleHeight();
+            _width = visibleWidth();
+        
+            //QTime qt;
+            //qt.start();
             root->layout();
             //kdDebug( 6000 ) << "TIME: layout() dt=" << qt.elapsed() << endl;
+        }
     } else {
         _width = visibleWidth();
     }
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index c354746..3f58f64 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -219,16 +219,6 @@ public:
 
     ~KHTMLPartPrivate()
     {
-        if ( m_doc )
-             m_doc->detach();
-
-        if (m_doc->refCount() != 1)
-            fprintf (stdout, "Warning:  document reference count not 1 as expect,  ref = %d\n", m_doc->refCount());
-        if ( m_doc )
-           m_doc->deref();
-        
-        m_doc = 0;
-
         delete m_settings;
 
         [m_recv autorelease];   
@@ -258,6 +248,16 @@ void KHTMLPart::init()
 
 KHTMLPart::~KHTMLPart()
 {
+    if ( d->m_doc )
+            d->m_doc->detach();
+
+    if (d->m_doc->refCount() != 1)
+        fprintf (stdout, "Warning:  document reference count not 1 as expect,  ref = %d\n", d->m_doc->refCount());
+    if ( d->m_doc )
+        d->m_doc->deref();
+    
+    d->m_doc = 0;
+
     delete d;
     NSLog(@"destructing KHTMLPart");
 }
@@ -308,6 +308,8 @@ void KHTMLPart::slotData(id handle, const char *bytes, int length)
 
 bool KHTMLPart::openURL( const KURL &url )
 {
+    fprintf (stdout, "0x%08x openURL(): for url %s\n", (unsigned int)this, url.url().latin1());
+
     // Close the previous URL.
     closeURL();
     
@@ -1459,10 +1461,10 @@ void KHTMLPart::urlSelected( const QString &url, int button, int state, const QS
 
 @class WKWebDataSource;
 @class WKWebView;
+ at class WKWebFrame;
 
 @protocol WKWebController
-- (void)addFrame: child toParent: parent;
-- (void)viewForFrameNamed: (NSString *)name inDataSource: (WKWebDataSource *)dataSource;
+- (WKWebFrame *)createFrameNamed: (NSString *)name for: (WKWebDataSource *)dataSource inParent: (WKWebDataSource *)dataSource;
 @end
 
 @interface WKWebDataSource : NSObject
@@ -1470,12 +1472,12 @@ void KHTMLPart::urlSelected( const QString &url, int button, int state, const QS
 - (void)_setFrameName: (NSString *)fName;
 - (id <WKWebController>)controller;
 - (void)startLoading: (BOOL)forceRefresh;
-- (void)addFrame: frame;
 - frameNamed: (NSString *)f;
 @end
 
+// This should not be allowed here.  data source should not reference view
+// API.
 @interface WKWebView (Foo)
-- initWithFrame: (NSRect)frame;
 - (QWidget *)_widget;
 @end
 
@@ -1490,34 +1492,35 @@ bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const QString &url, cons
 {
     NSString *nsframeName = QSTRING_TO_NSSTRING(frameName);
     WKWebFrame *aFrame;
-    WKWebDataSource *childDataSource;
-    NSURL *childURL;
-    WKWebView *childView;
-    WKWebFrame *newFrame;
-    
+    WKWebDataSource *dataSource;
     
     fprintf (stdout, "0x%08x requestFrame():  part = 0x%08x, name = %s, url = %s\n", (unsigned int)this, (unsigned int)frame, frameName.latin1(), url.latin1());    
-    aFrame =[getDataSource() frameNamed: nsframeName];
+    dataSource = getDataSource();
+
+    aFrame =[dataSource frameNamed: nsframeName];
     if (aFrame){
         fprintf (stdout, "0x%08x requestFrame():  part = 0x%08x frame found\n", (unsigned int)this, (unsigned int)frame);    
         // ?
         frame->setWidget ([[aFrame view] _widget]);
     }
     else {        
+        WKWebDataSource *childDataSource, *dataSource;
+        NSURL *childURL;
+        WKWebFrame *newFrame;
+        id <WKWebController> controller;
+
         fprintf (stdout, "0x%08x requestFrame():  part = 0x%08x creating frame\n", (unsigned int)this, (unsigned int)frame);    
         childURL = [NSURL URLWithString: QSTRING_TO_NSSTRING (completeURL( url ).url() )];
         childDataSource = [[WKWebDataSource alloc] initWithURL: childURL];
         [childDataSource _setFrameName: nsframeName];
-        childView = [[WKWebView alloc] initWithFrame: 
-                NSMakeRect (0,0,frame->intrinsicWidth(),frame->intrinsicHeight())];
-    
-        newFrame = [[[WKWebFrame alloc] initWithName: nsframeName view: childView dataSource: childDataSource] autorelease];
-        
-        [getDataSource() addFrame: newFrame];
         
-        [[getDataSource() controller] addFrame: newFrame toParent: getDataSource()];
+        dataSource = getDataSource();
+        controller = [dataSource controller];
+        newFrame = [controller createFrameNamed: nsframeName for: childDataSource inParent: dataSource];
     
-        frame->setWidget ([childView _widget]);
+        // This should not be called here.  This introduces a nasty dependency on
+        // the view.
+        frame->setWidget ([[newFrame view] _widget]);
         
         [childDataSource startLoading: YES];
     }
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index c354746..3f58f64 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -219,16 +219,6 @@ public:
 
     ~KHTMLPartPrivate()
     {
-        if ( m_doc )
-             m_doc->detach();
-
-        if (m_doc->refCount() != 1)
-            fprintf (stdout, "Warning:  document reference count not 1 as expect,  ref = %d\n", m_doc->refCount());
-        if ( m_doc )
-           m_doc->deref();
-        
-        m_doc = 0;
-
         delete m_settings;
 
         [m_recv autorelease];   
@@ -258,6 +248,16 @@ void KHTMLPart::init()
 
 KHTMLPart::~KHTMLPart()
 {
+    if ( d->m_doc )
+            d->m_doc->detach();
+
+    if (d->m_doc->refCount() != 1)
+        fprintf (stdout, "Warning:  document reference count not 1 as expect,  ref = %d\n", d->m_doc->refCount());
+    if ( d->m_doc )
+        d->m_doc->deref();
+    
+    d->m_doc = 0;
+
     delete d;
     NSLog(@"destructing KHTMLPart");
 }
@@ -308,6 +308,8 @@ void KHTMLPart::slotData(id handle, const char *bytes, int length)
 
 bool KHTMLPart::openURL( const KURL &url )
 {
+    fprintf (stdout, "0x%08x openURL(): for url %s\n", (unsigned int)this, url.url().latin1());
+
     // Close the previous URL.
     closeURL();
     
@@ -1459,10 +1461,10 @@ void KHTMLPart::urlSelected( const QString &url, int button, int state, const QS
 
 @class WKWebDataSource;
 @class WKWebView;
+ at class WKWebFrame;
 
 @protocol WKWebController
-- (void)addFrame: child toParent: parent;
-- (void)viewForFrameNamed: (NSString *)name inDataSource: (WKWebDataSource *)dataSource;
+- (WKWebFrame *)createFrameNamed: (NSString *)name for: (WKWebDataSource *)dataSource inParent: (WKWebDataSource *)dataSource;
 @end
 
 @interface WKWebDataSource : NSObject
@@ -1470,12 +1472,12 @@ void KHTMLPart::urlSelected( const QString &url, int button, int state, const QS
 - (void)_setFrameName: (NSString *)fName;
 - (id <WKWebController>)controller;
 - (void)startLoading: (BOOL)forceRefresh;
-- (void)addFrame: frame;
 - frameNamed: (NSString *)f;
 @end
 
+// This should not be allowed here.  data source should not reference view
+// API.
 @interface WKWebView (Foo)
-- initWithFrame: (NSRect)frame;
 - (QWidget *)_widget;
 @end
 
@@ -1490,34 +1492,35 @@ bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const QString &url, cons
 {
     NSString *nsframeName = QSTRING_TO_NSSTRING(frameName);
     WKWebFrame *aFrame;
-    WKWebDataSource *childDataSource;
-    NSURL *childURL;
-    WKWebView *childView;
-    WKWebFrame *newFrame;
-    
+    WKWebDataSource *dataSource;
     
     fprintf (stdout, "0x%08x requestFrame():  part = 0x%08x, name = %s, url = %s\n", (unsigned int)this, (unsigned int)frame, frameName.latin1(), url.latin1());    
-    aFrame =[getDataSource() frameNamed: nsframeName];
+    dataSource = getDataSource();
+
+    aFrame =[dataSource frameNamed: nsframeName];
     if (aFrame){
         fprintf (stdout, "0x%08x requestFrame():  part = 0x%08x frame found\n", (unsigned int)this, (unsigned int)frame);    
         // ?
         frame->setWidget ([[aFrame view] _widget]);
     }
     else {        
+        WKWebDataSource *childDataSource, *dataSource;
+        NSURL *childURL;
+        WKWebFrame *newFrame;
+        id <WKWebController> controller;
+
         fprintf (stdout, "0x%08x requestFrame():  part = 0x%08x creating frame\n", (unsigned int)this, (unsigned int)frame);    
         childURL = [NSURL URLWithString: QSTRING_TO_NSSTRING (completeURL( url ).url() )];
         childDataSource = [[WKWebDataSource alloc] initWithURL: childURL];
         [childDataSource _setFrameName: nsframeName];
-        childView = [[WKWebView alloc] initWithFrame: 
-                NSMakeRect (0,0,frame->intrinsicWidth(),frame->intrinsicHeight())];
-    
-        newFrame = [[[WKWebFrame alloc] initWithName: nsframeName view: childView dataSource: childDataSource] autorelease];
-        
-        [getDataSource() addFrame: newFrame];
         
-        [[getDataSource() controller] addFrame: newFrame toParent: getDataSource()];
+        dataSource = getDataSource();
+        controller = [dataSource controller];
+        newFrame = [controller createFrameNamed: nsframeName for: childDataSource inParent: dataSource];
     
-        frame->setWidget ([childView _widget]);
+        // This should not be called here.  This introduces a nasty dependency on
+        // the view.
+        frame->setWidget ([[newFrame view] _widget]);
         
         [childDataSource startLoading: YES];
     }
diff --git a/WebCore/src/kdelibs/khtml/html/html_headimpl.cpp b/WebCore/src/kdelibs/khtml/html/html_headimpl.cpp
index d0b9397..6bc329b 100644
--- a/WebCore/src/kdelibs/khtml/html/html_headimpl.cpp
+++ b/WebCore/src/kdelibs/khtml/html/html_headimpl.cpp
@@ -148,6 +148,7 @@ void HTMLLinkElementImpl::attach()
 
 void HTMLLinkElementImpl::detach()
 {
+    // RJW:  Why is this done here?
     if ( sheet() )
         getDocument()->createSelector();
 
diff --git a/WebCore/src/kdelibs/khtml/khtmlview.cpp b/WebCore/src/kdelibs/khtml/khtmlview.cpp
index ca3f73f..8c33567 100644
--- a/WebCore/src/kdelibs/khtml/khtmlview.cpp
+++ b/WebCore/src/kdelibs/khtml/khtmlview.cpp
@@ -334,26 +334,28 @@ void KHTMLView::layout(bool)
 
         khtml::RenderRoot* root = static_cast<khtml::RenderRoot *>(document->renderer());
 
-        if (document->isHTMLDocument()) {
-            NodeImpl *body = static_cast<HTMLDocumentImpl*>(document)->body();
-            if(body && body->renderer() && body->id() == ID_FRAMESET) {
-                QScrollView::setVScrollBarMode(AlwaysOff);
-                QScrollView::setHScrollBarMode(AlwaysOff);
-                _width = visibleWidth();
-                body->renderer()->setLayouted(false);
-                body->renderer()->layout();
-                root->layout();
-                return;
+        if (root != 0){
+            if (document->isHTMLDocument()) {
+                NodeImpl *body = static_cast<HTMLDocumentImpl*>(document)->body();
+                if(body && body->renderer() && body->id() == ID_FRAMESET) {
+                    QScrollView::setVScrollBarMode(AlwaysOff);
+                    QScrollView::setHScrollBarMode(AlwaysOff);
+                    _width = visibleWidth();
+                    body->renderer()->setLayouted(false);
+                    body->renderer()->layout();
+                    root->layout();
+                    return;
+                }
             }
-        }
-
-        _height = visibleHeight();
-        _width = visibleWidth();
-
-        //QTime qt;
-        //qt.start();
+        
+            _height = visibleHeight();
+            _width = visibleWidth();
+        
+            //QTime qt;
+            //qt.start();
             root->layout();
             //kdDebug( 6000 ) << "TIME: layout() dt=" << qt.elapsed() << endl;
+        }
     } else {
         _width = visibleWidth();
     }
diff --git a/WebCore/src/kwq/KWQKHTMLPart.mm b/WebCore/src/kwq/KWQKHTMLPart.mm
index c354746..3f58f64 100644
--- a/WebCore/src/kwq/KWQKHTMLPart.mm
+++ b/WebCore/src/kwq/KWQKHTMLPart.mm
@@ -219,16 +219,6 @@ public:
 
     ~KHTMLPartPrivate()
     {
-        if ( m_doc )
-             m_doc->detach();
-
-        if (m_doc->refCount() != 1)
-            fprintf (stdout, "Warning:  document reference count not 1 as expect,  ref = %d\n", m_doc->refCount());
-        if ( m_doc )
-           m_doc->deref();
-        
-        m_doc = 0;
-
         delete m_settings;
 
         [m_recv autorelease];   
@@ -258,6 +248,16 @@ void KHTMLPart::init()
 
 KHTMLPart::~KHTMLPart()
 {
+    if ( d->m_doc )
+            d->m_doc->detach();
+
+    if (d->m_doc->refCount() != 1)
+        fprintf (stdout, "Warning:  document reference count not 1 as expect,  ref = %d\n", d->m_doc->refCount());
+    if ( d->m_doc )
+        d->m_doc->deref();
+    
+    d->m_doc = 0;
+
     delete d;
     NSLog(@"destructing KHTMLPart");
 }
@@ -308,6 +308,8 @@ void KHTMLPart::slotData(id handle, const char *bytes, int length)
 
 bool KHTMLPart::openURL( const KURL &url )
 {
+    fprintf (stdout, "0x%08x openURL(): for url %s\n", (unsigned int)this, url.url().latin1());
+
     // Close the previous URL.
     closeURL();
     
@@ -1459,10 +1461,10 @@ void KHTMLPart::urlSelected( const QString &url, int button, int state, const QS
 
 @class WKWebDataSource;
 @class WKWebView;
+ at class WKWebFrame;
 
 @protocol WKWebController
-- (void)addFrame: child toParent: parent;
-- (void)viewForFrameNamed: (NSString *)name inDataSource: (WKWebDataSource *)dataSource;
+- (WKWebFrame *)createFrameNamed: (NSString *)name for: (WKWebDataSource *)dataSource inParent: (WKWebDataSource *)dataSource;
 @end
 
 @interface WKWebDataSource : NSObject
@@ -1470,12 +1472,12 @@ void KHTMLPart::urlSelected( const QString &url, int button, int state, const QS
 - (void)_setFrameName: (NSString *)fName;
 - (id <WKWebController>)controller;
 - (void)startLoading: (BOOL)forceRefresh;
-- (void)addFrame: frame;
 - frameNamed: (NSString *)f;
 @end
 
+// This should not be allowed here.  data source should not reference view
+// API.
 @interface WKWebView (Foo)
-- initWithFrame: (NSRect)frame;
 - (QWidget *)_widget;
 @end
 
@@ -1490,34 +1492,35 @@ bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const QString &url, cons
 {
     NSString *nsframeName = QSTRING_TO_NSSTRING(frameName);
     WKWebFrame *aFrame;
-    WKWebDataSource *childDataSource;
-    NSURL *childURL;
-    WKWebView *childView;
-    WKWebFrame *newFrame;
-    
+    WKWebDataSource *dataSource;
     
     fprintf (stdout, "0x%08x requestFrame():  part = 0x%08x, name = %s, url = %s\n", (unsigned int)this, (unsigned int)frame, frameName.latin1(), url.latin1());    
-    aFrame =[getDataSource() frameNamed: nsframeName];
+    dataSource = getDataSource();
+
+    aFrame =[dataSource frameNamed: nsframeName];
     if (aFrame){
         fprintf (stdout, "0x%08x requestFrame():  part = 0x%08x frame found\n", (unsigned int)this, (unsigned int)frame);    
         // ?
         frame->setWidget ([[aFrame view] _widget]);
     }
     else {        
+        WKWebDataSource *childDataSource, *dataSource;
+        NSURL *childURL;
+        WKWebFrame *newFrame;
+        id <WKWebController> controller;
+
         fprintf (stdout, "0x%08x requestFrame():  part = 0x%08x creating frame\n", (unsigned int)this, (unsigned int)frame);    
         childURL = [NSURL URLWithString: QSTRING_TO_NSSTRING (completeURL( url ).url() )];
         childDataSource = [[WKWebDataSource alloc] initWithURL: childURL];
         [childDataSource _setFrameName: nsframeName];
-        childView = [[WKWebView alloc] initWithFrame: 
-                NSMakeRect (0,0,frame->intrinsicWidth(),frame->intrinsicHeight())];
-    
-        newFrame = [[[WKWebFrame alloc] initWithName: nsframeName view: childView dataSource: childDataSource] autorelease];
-        
-        [getDataSource() addFrame: newFrame];
         
-        [[getDataSource() controller] addFrame: newFrame toParent: getDataSource()];
+        dataSource = getDataSource();
+        controller = [dataSource controller];
+        newFrame = [controller createFrameNamed: nsframeName for: childDataSource inParent: dataSource];
     
-        frame->setWidget ([childView _widget]);
+        // This should not be called here.  This introduces a nasty dependency on
+        // the view.
+        frame->setWidget ([[newFrame view] _widget]);
         
         [childDataSource startLoading: YES];
     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list