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

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:31:53 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 630623124b705d0c2caf97a48554e073c609e25a
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Mar 27 18:52:20 2003 +0000

            Reviewed by Trey.
    
    	- fixed 3156509 -- Safari fills src="" frame with current contents of frameset instead of leaving it empty
    
            The trick here is to always use "about:blank" when the frame URL is empty string.
            If we pass the empty string elsewhere, it's going to get passed to completeURL and
            turned into a reference to the current document, and we have to avoid doing that
            ourselves explicitly too.
    
            * khtml/html/html_baseimpl.cpp:
            (HTMLFrameElementImpl::HTMLFrameElementImpl): Let the URL default to null rather
            than "about:blank". We do want to treat the frame as "about:blank", but that's not
            something people should see when inspecting the frame via the DOM.
            (HTMLFrameElementImpl::isURLAllowed): Allow empty URLs explicitly, so we don't
            call completeURL on them.
            (HTMLFrameElementImpl::updateForNewURL): Map empty URLs to "about:blank" at this level.
            (HTMLFrameElementImpl::attach): Do the same thing here. At some point we can share more
            code between these two.
            (HTMLFrameElementImpl::setLocation): Change this to call updateForNewURL. Not only does
            this make us handle the empty URL case properly, it also gets the benefit of other things
            we do in updateForNewURL, like handling the "isURLAllowed" rule, and properly handling
            the case where we already have a suitable frame.
    
            - other changes
    
            * kwq/KWQKHTMLView.mm: Improved a comment.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3941 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 64d3a56..1c009c6 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,32 @@
+2003-03-27  Darin Adler  <darin at apple.com>
+
+        Reviewed by Trey.
+
+	- fixed 3156509 -- Safari fills src="" frame with current contents of frameset instead of leaving it empty
+
+        The trick here is to always use "about:blank" when the frame URL is empty string.
+        If we pass the empty string elsewhere, it's going to get passed to completeURL and
+        turned into a reference to the current document, and we have to avoid doing that
+        ourselves explicitly too.
+
+        * khtml/html/html_baseimpl.cpp:
+        (HTMLFrameElementImpl::HTMLFrameElementImpl): Let the URL default to null rather
+        than "about:blank". We do want to treat the frame as "about:blank", but that's not
+        something people should see when inspecting the frame via the DOM.
+        (HTMLFrameElementImpl::isURLAllowed): Allow empty URLs explicitly, so we don't
+        call completeURL on them.
+        (HTMLFrameElementImpl::updateForNewURL): Map empty URLs to "about:blank" at this level.
+        (HTMLFrameElementImpl::attach): Do the same thing here. At some point we can share more
+        code between these two.
+        (HTMLFrameElementImpl::setLocation): Change this to call updateForNewURL. Not only does
+        this make us handle the empty URL case properly, it also gets the benefit of other things
+        we do in updateForNewURL, like handling the "isURLAllowed" rule, and properly handling
+        the case where we already have a suitable frame.
+
+        - other changes
+
+        * kwq/KWQKHTMLView.mm: Improved a comment.
+
 === Safari-69 ===
 
 2003-03-26  Maciej Stachowiak  <mjs at apple.com>
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 64d3a56..1c009c6 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,32 @@
+2003-03-27  Darin Adler  <darin at apple.com>
+
+        Reviewed by Trey.
+
+	- fixed 3156509 -- Safari fills src="" frame with current contents of frameset instead of leaving it empty
+
+        The trick here is to always use "about:blank" when the frame URL is empty string.
+        If we pass the empty string elsewhere, it's going to get passed to completeURL and
+        turned into a reference to the current document, and we have to avoid doing that
+        ourselves explicitly too.
+
+        * khtml/html/html_baseimpl.cpp:
+        (HTMLFrameElementImpl::HTMLFrameElementImpl): Let the URL default to null rather
+        than "about:blank". We do want to treat the frame as "about:blank", but that's not
+        something people should see when inspecting the frame via the DOM.
+        (HTMLFrameElementImpl::isURLAllowed): Allow empty URLs explicitly, so we don't
+        call completeURL on them.
+        (HTMLFrameElementImpl::updateForNewURL): Map empty URLs to "about:blank" at this level.
+        (HTMLFrameElementImpl::attach): Do the same thing here. At some point we can share more
+        code between these two.
+        (HTMLFrameElementImpl::setLocation): Change this to call updateForNewURL. Not only does
+        this make us handle the empty URL case properly, it also gets the benefit of other things
+        we do in updateForNewURL, like handling the "isURLAllowed" rule, and properly handling
+        the case where we already have a suitable frame.
+
+        - other changes
+
+        * kwq/KWQKHTMLView.mm: Improved a comment.
+
 === Safari-69 ===
 
 2003-03-26  Maciej Stachowiak  <mjs at apple.com>
diff --git a/WebCore/khtml/html/html_baseimpl.cpp b/WebCore/khtml/html/html_baseimpl.cpp
index 2410c41..ea2b5b2 100644
--- a/WebCore/khtml/html/html_baseimpl.cpp
+++ b/WebCore/khtml/html/html_baseimpl.cpp
@@ -203,7 +203,6 @@ HTMLFrameElementImpl::HTMLFrameElementImpl(DocumentPtr *doc)
     marginHeight = -1;
     scrolling = QScrollView::Auto;
     noresize = false;
-    url = "about:blank";
 }
 
 HTMLFrameElementImpl::~HTMLFrameElementImpl()
@@ -217,6 +216,10 @@ NodeImpl::Id HTMLFrameElementImpl::id() const
 
 bool HTMLFrameElementImpl::isURLAllowed(const DOMString &URLString) const
 {
+    if (URLString.isEmpty()) {
+        return true;
+    }
+    
     KHTMLView *w = getDocument()->view();
 
     KURL newURL(getDocument()->completeURL(URLString.string()));
@@ -256,7 +259,6 @@ bool HTMLFrameElementImpl::isURLAllowed(const DOMString &URLString) const
     return true;
 }
 
-// FIXME: Why is this different from setLocation?
 void HTMLFrameElementImpl::updateForNewURL()
 {
     if (!attached()) {
@@ -270,8 +272,13 @@ void HTMLFrameElementImpl::updateForNewURL()
         attach();
         return;
     }
+    
+    DOMString relativeURL = url;
+    if (relativeURL.isEmpty()) {
+        relativeURL = "about:blank";
+    }
 
-    if (!isURLAllowed(url)) {
+    if (!isURLAllowed(relativeURL)) {
         return;
     }
 
@@ -283,19 +290,19 @@ void HTMLFrameElementImpl::updateForNewURL()
     // Load the frame contents.
     KHTMLPart *part = w->part();
     KHTMLPart *framePart = part->findFrame(name.string());
-    KURL kurl = getDocument()->completeURL(url.string());
+    KURL kurl = getDocument()->completeURL(relativeURL.string());
 
     // Temporarily treat javascript: URLs as about:blank, until we can
     // properly support them as frame sources.
     if (kurl.protocol() == "javascript") {
-	url = "about:blank";
+	relativeURL = "about:blank";
 	kurl = "about:blank";
     }
 
     if (framePart) {
         framePart->openURL(kurl);
     } else {
-        part->requestFrame(static_cast<RenderFrame *>(m_render), url.string(), name.string());
+        part->requestFrame(static_cast<RenderFrame *>(m_render), relativeURL.string(), name.string());
     }
 }
 
@@ -397,12 +404,16 @@ void HTMLFrameElementImpl::attach()
     KHTMLView* w = getDocument()->view();
 
     w->part()->incrementFrameCount();
+    
+    DOMString relativeURL = url;
+    if (relativeURL.isEmpty()) {
+        relativeURL = "about:blank";
+    }
 
     // Temporarily treat javascript: URLs as about:blank, until we can
     // properly support them as frame sources.
-    KURL kurl = getDocument()->completeURL(url.string());
-    if (kurl.protocol() == "javascript") {
-	url = "about:blank";
+    if (KURL(getDocument()->completeURL(relativeURL.string())).protocol() == "javascript") {
+	relativeURL = "about:blank";
     }
 
     // we need a unique name for every frame in the frameset. Hope that's unique enough.
@@ -410,7 +421,7 @@ void HTMLFrameElementImpl::attach()
       name = DOMString(w->part()->requestFrameName());
 
     // load the frame contents
-    w->part()->requestFrame( static_cast<RenderFrame*>(m_render), url.string(), name.string() );
+    w->part()->requestFrame( static_cast<RenderFrame*>(m_render), relativeURL.string(), name.string() );
 }
 
 void HTMLFrameElementImpl::detach()
@@ -423,14 +434,10 @@ void HTMLFrameElementImpl::detach()
     HTMLElementImpl::detach();
 }
 
-// FIXME: Why is this different from updateForNewURL?
 void HTMLFrameElementImpl::setLocation( const DOMString& str )
 {
     url = str;
-    KHTMLView* w = getDocument()->view();
-    if ( m_render && w && w->part() )
-        // don't call this for an iframe
-        w->part()->requestFrame( static_cast<khtml::RenderFrame *>(m_render), url.string(), name.string() );
+    updateForNewURL();
 }
 
 bool HTMLFrameElementImpl::isSelectable() const
diff --git a/WebCore/kwq/KWQKHTMLView.mm b/WebCore/kwq/KWQKHTMLView.mm
index 6dc60b9..9c563ef 100644
--- a/WebCore/kwq/KWQKHTMLView.mm
+++ b/WebCore/kwq/KWQKHTMLView.mm
@@ -24,13 +24,13 @@
  */
 
 #import "khtmlview.h"
+
 #import "KWQKHTMLPart.h"
 #import "KWQWindowWidget.h"
 
 /*
-    Currently this files just extends the kde implementation.
-    See src/kdelibs/khtml/khtmlview.cpp for the complete
-    implementation.
+    Currently this file just extends the KDE implementation.
+    See khtml/khtmlview.cpp for the rest of the implementation.
 */
 
 QWidget *KHTMLView::topLevelWidget() const 
@@ -43,6 +43,5 @@ QPoint KHTMLView::mapToGlobal(const QPoint &p) const
     // This is only used by JavaScript to implement the getting
     // the screenX and screen Y coordinates.
 
-    return (static_cast<KWQWindowWidget *>(topLevelWidget()))->mapToGlobal(p);
+    return static_cast<KWQWindowWidget *>(topLevelWidget())->mapToGlobal(p);
 }
-

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list