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


The following commit has been merged in the debian/unstable branch:
commit 2620bcb2254a12a37b8e7017207dc9a00474711e
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jul 16 23:17:47 2002 +0000

    WebCore:
    
    	- fixed 2997244 -- crash when visiting cnn.com followed by another page
    
    	Turns out the requestFrame code I've been tinkering with used to be
    	dead code until we accidentally re-triggered the code path.
    
            * khtml/html/html_baseimpl.cpp: (HTMLFrameElementImpl::attach):
    	Remove APPLE_CHANGES that were causing us to reuse the same frame which
    	were an attempt to fix a frame targeting problem that was actually elsewhere.
    
            * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::requestFrame): Remove the code
    	that handles the case of an already-existing frame with the same name. This
    	is handled at a higher level.
    
            * kwq/WebCoreBridge.h: Remove now-unneeded childFrameNamed method.
    
    WebKit:
    
            * WebCoreSupport.subproj/WebBridge.m:
    	Remove childFrameNamed since it's not needed, and every one of these bridge
    	methods adds potential confusion.
    	(-[WebBridge descendantFrameNamed:]): Make this look for descendants in the
    	provisional data sources first. This is the same change Richard made to
    	childFrameNamed, but it turns out that this is the method that's really used.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1574 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index d71c91c..01eb2f4 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,22 @@
 2002-07-16  Darin Adler  <darin at apple.com>
 
+	- fixed 2997244 -- crash when visiting cnn.com followed by another page
+
+	Turns out the requestFrame code I've been tinkering with used to be
+	dead code until we accidentally re-triggered the code path.
+
+        * khtml/html/html_baseimpl.cpp: (HTMLFrameElementImpl::attach):
+	Remove APPLE_CHANGES that were causing us to reuse the same frame which
+	were an attempt to fix a frame targeting problem that was actually elsewhere.
+
+        * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::requestFrame): Remove the code
+	that handles the case of an already-existing frame with the same name. This
+	is handled at a higher level.
+
+        * kwq/WebCoreBridge.h: Remove now-unneeded childFrameNamed method.
+
+2002-07-16  Darin Adler  <darin at apple.com>
+
 	- fixed 2998692 -- crash when you type "googl" into the page address
 
         * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::requestFrame): Check for
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index d71c91c..01eb2f4 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,22 @@
 2002-07-16  Darin Adler  <darin at apple.com>
 
+	- fixed 2997244 -- crash when visiting cnn.com followed by another page
+
+	Turns out the requestFrame code I've been tinkering with used to be
+	dead code until we accidentally re-triggered the code path.
+
+        * khtml/html/html_baseimpl.cpp: (HTMLFrameElementImpl::attach):
+	Remove APPLE_CHANGES that were causing us to reuse the same frame which
+	were an attempt to fix a frame targeting problem that was actually elsewhere.
+
+        * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::requestFrame): Remove the code
+	that handles the case of an already-existing frame with the same name. This
+	is handled at a higher level.
+
+        * kwq/WebCoreBridge.h: Remove now-unneeded childFrameNamed method.
+
+2002-07-16  Darin Adler  <darin at apple.com>
+
 	- fixed 2998692 -- crash when you type "googl" into the page address
 
         * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::requestFrame): Check for
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index d71c91c..01eb2f4 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,22 @@
 2002-07-16  Darin Adler  <darin at apple.com>
 
+	- fixed 2997244 -- crash when visiting cnn.com followed by another page
+
+	Turns out the requestFrame code I've been tinkering with used to be
+	dead code until we accidentally re-triggered the code path.
+
+        * khtml/html/html_baseimpl.cpp: (HTMLFrameElementImpl::attach):
+	Remove APPLE_CHANGES that were causing us to reuse the same frame which
+	were an attempt to fix a frame targeting problem that was actually elsewhere.
+
+        * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::requestFrame): Remove the code
+	that handles the case of an already-existing frame with the same name. This
+	is handled at a higher level.
+
+        * kwq/WebCoreBridge.h: Remove now-unneeded childFrameNamed method.
+
+2002-07-16  Darin Adler  <darin at apple.com>
+
 	- fixed 2998692 -- crash when you type "googl" into the page address
 
         * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::requestFrame): Check for
diff --git a/WebCore/khtml/html/html_baseimpl.cpp b/WebCore/khtml/html/html_baseimpl.cpp
index 1dfaf4c..0be0b0d 100644
--- a/WebCore/khtml/html/html_baseimpl.cpp
+++ b/WebCore/khtml/html/html_baseimpl.cpp
@@ -318,11 +318,7 @@ void HTMLFrameElementImpl::attach()
         return;
 
     // we need a unique name for every frame in the frameset. Hope that's unique enough.
-#ifdef APPLE_CHANGES
-    if(name.isEmpty())
-#else
     if(name.isEmpty() || w->part()->frameExists( name.string() ) )
-#endif
       name = DOMString(w->part()->requestFrameName());
 
     // load the frame contents
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 642804a..09d2735 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -425,32 +425,19 @@ void KWQKHTMLPartImpl::urlSelected( const QString &url, int button, int state, c
 bool KWQKHTMLPartImpl::requestFrame( khtml::RenderPart *frame, const QString &url, const QString &frameName,
                                      const QStringList &params, bool isIFrame )
 {
-    NSString *name = frameName.getNSString();
-
-    KWQDEBUGLEVEL(KWQ_LOG_FRAMES, "name %s\n", DEBUG_OBJECT(name));
-    WebCoreFrameBridge *wcFrame = [bridge childFrameNamed:name];
-    if (wcFrame) {
-        KWQDEBUGLEVEL(KWQ_LOG_FRAMES, "found %s\n", DEBUG_OBJECT(name));
-        KHTMLPart *part = [[wcFrame bridge] part];
-        if (part) {
-            frame->setWidget(part->impl->getView());
-        }
+    NSURL *childURL = part->completeURL(url).getNSURL();
+    if (childURL == nil || [childURL path] == nil) {
+        NSLog (@"ERROR (probably need to fix CFURL): unable to create URL with path");
+        return false;
     }
-    else {
-        KWQDEBUGLEVEL(KWQ_LOG_FRAMES, "creating %s\n", DEBUG_OBJECT(name));
-        
-        NSURL *childURL = part->completeURL(url).getNSURL();
-        if (childURL == nil || [childURL path] == nil) {
-            NSLog (@"ERROR (probably need to fix CFURL): unable to create URL with path");
-            return false;
-        }
-        
-        HTMLIFrameElementImpl *o = static_cast<HTMLIFrameElementImpl *>(frame->element());
-        if (![bridge createChildFrameNamed:name withURL:childURL
-                renderPart:frame allowsScrolling:o->scrollingMode() != QScrollView::AlwaysOff
-                marginWidth:o->getMarginWidth() marginHeight:o->getMarginHeight()]) {
-            return false;
-        }
+    
+    KWQDEBUGLEVEL(KWQ_LOG_FRAMES, "name %s\n", frameName.ascii());
+    
+    HTMLIFrameElementImpl *o = static_cast<HTMLIFrameElementImpl *>(frame->element());
+    if (![bridge createChildFrameNamed:frameName.getNSString() withURL:childURL
+            renderPart:frame allowsScrolling:o->scrollingMode() != QScrollView::AlwaysOff
+            marginWidth:o->getMarginWidth() marginHeight:o->getMarginHeight()]) {
+        return false;
     }
 
 #ifdef _SUPPORT_JAVASCRIPT_URL_    
@@ -471,7 +458,6 @@ bool KWQKHTMLPartImpl::requestFrame( khtml::RenderPart *frame, const QString &ur
     }
 #endif
 
-
     return true;
 }
 
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index 642804a..09d2735 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -425,32 +425,19 @@ void KWQKHTMLPartImpl::urlSelected( const QString &url, int button, int state, c
 bool KWQKHTMLPartImpl::requestFrame( khtml::RenderPart *frame, const QString &url, const QString &frameName,
                                      const QStringList &params, bool isIFrame )
 {
-    NSString *name = frameName.getNSString();
-
-    KWQDEBUGLEVEL(KWQ_LOG_FRAMES, "name %s\n", DEBUG_OBJECT(name));
-    WebCoreFrameBridge *wcFrame = [bridge childFrameNamed:name];
-    if (wcFrame) {
-        KWQDEBUGLEVEL(KWQ_LOG_FRAMES, "found %s\n", DEBUG_OBJECT(name));
-        KHTMLPart *part = [[wcFrame bridge] part];
-        if (part) {
-            frame->setWidget(part->impl->getView());
-        }
+    NSURL *childURL = part->completeURL(url).getNSURL();
+    if (childURL == nil || [childURL path] == nil) {
+        NSLog (@"ERROR (probably need to fix CFURL): unable to create URL with path");
+        return false;
     }
-    else {
-        KWQDEBUGLEVEL(KWQ_LOG_FRAMES, "creating %s\n", DEBUG_OBJECT(name));
-        
-        NSURL *childURL = part->completeURL(url).getNSURL();
-        if (childURL == nil || [childURL path] == nil) {
-            NSLog (@"ERROR (probably need to fix CFURL): unable to create URL with path");
-            return false;
-        }
-        
-        HTMLIFrameElementImpl *o = static_cast<HTMLIFrameElementImpl *>(frame->element());
-        if (![bridge createChildFrameNamed:name withURL:childURL
-                renderPart:frame allowsScrolling:o->scrollingMode() != QScrollView::AlwaysOff
-                marginWidth:o->getMarginWidth() marginHeight:o->getMarginHeight()]) {
-            return false;
-        }
+    
+    KWQDEBUGLEVEL(KWQ_LOG_FRAMES, "name %s\n", frameName.ascii());
+    
+    HTMLIFrameElementImpl *o = static_cast<HTMLIFrameElementImpl *>(frame->element());
+    if (![bridge createChildFrameNamed:frameName.getNSString() withURL:childURL
+            renderPart:frame allowsScrolling:o->scrollingMode() != QScrollView::AlwaysOff
+            marginWidth:o->getMarginWidth() marginHeight:o->getMarginHeight()]) {
+        return false;
     }
 
 #ifdef _SUPPORT_JAVASCRIPT_URL_    
@@ -471,7 +458,6 @@ bool KWQKHTMLPartImpl::requestFrame( khtml::RenderPart *frame, const QString &ur
     }
 #endif
 
-
     return true;
 }
 
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 2f1b2a9..54b35ae 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -116,7 +116,6 @@ typedef khtml::RenderPart KHTMLRenderPart;
 
 - (WebCoreFrameBridge *)frame;
 - (NSArray *)childFrames; // WebCoreFrameBridge objects
-- (WebCoreFrameBridge *)childFrameNamed:(NSString *)name;
 - (WebCoreFrameBridge *)descendantFrameNamed:(NSString *)name;
 
 - (WebCoreFrameBridge *)mainFrame;
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 53d96e3..29f3f39 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,14 @@
 2002-07-16  Darin Adler  <darin at apple.com>
 
+        * WebCoreSupport.subproj/WebBridge.m:
+	Remove childFrameNamed since it's not needed, and every one of these bridge
+	methods adds potential confusion.
+	(-[WebBridge descendantFrameNamed:]): Make this look for descendants in the
+	provisional data sources first. This is the same change Richard made to
+	childFrameNamed, but it turns out that this is the method that's really used.
+
+2002-07-16  Darin Adler  <darin at apple.com>
+
         * almost every file: Renamed IF* -> Web*.
 
 2002-07-15  Richard Williamson (Home)  <rjw at apple.com>
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 53d96e3..29f3f39 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,5 +1,14 @@
 2002-07-16  Darin Adler  <darin at apple.com>
 
+        * WebCoreSupport.subproj/WebBridge.m:
+	Remove childFrameNamed since it's not needed, and every one of these bridge
+	methods adds potential confusion.
+	(-[WebBridge descendantFrameNamed:]): Make this look for descendants in the
+	provisional data sources first. This is the same change Richard made to
+	childFrameNamed, but it turns out that this is the method that's really used.
+
+2002-07-16  Darin Adler  <darin at apple.com>
+
         * almost every file: Renamed IF* -> Web*.
 
 2002-07-15  Richard Williamson (Home)  <rjw at apple.com>
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 0fd1459..46cbf52 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -60,19 +60,12 @@
     return frameBridges;
 }
 
-- (WebCoreFrameBridge *)childFrameNamed:(NSString *)name
-{
-    WebDataSource *pd;
-    
-    pd = [[dataSource webFrame] provisionalDataSource];
-    if (pd)
-        return [[pd frameNamed: name] _frameBridge];
-
-    return [[dataSource frameNamed:name] _frameBridge];
-}
-
 - (WebCoreFrameBridge *)descendantFrameNamed:(NSString *)name
 {
+    WebCoreFrameBridge *provisionalBridge = [[[[dataSource webFrame] provisionalDataSource] frameNamed:name] _frameBridge];
+    if (provisionalBridge) {
+        return provisionalBridge;
+    }
     return [[[dataSource webFrame] frameNamed:name] _frameBridge];
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list