[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    =?utf-8?q?=5Bkdelibs/KDE/4=2E7=5D_khtml=3A_Don=27t_ask_KHTMLRun_?=
From:       Maks Orlovich <maksim () kde ! org>
Date:       2011-06-22 21:47:35
Message-ID: 20110622214735.717B3A60A9 () git ! kde ! org
[Download RAW message or body]

Git commit b25d506ed4938eb858654549f0208a4948505fe8 by Maks Orlovich.
Committed on 28/05/2011 at 17:01.
Pushed by orlovich into branch 'KDE/4.7'.

Don't ask KHTMLRun to handle embedding cases with onlyLocalReferences, we \
want to swallow them ourselves given what the mode is for.

Fixes what #248478 turned to (original issue got fixed organically, follow \
up comments are technically unrelated)

+ Remove unused return and indent inconsistency while I am at it

BUG: 248478

M  +15   -16   khtml/khtml_part.cpp     
M  +1    -1    khtml/khtml_part.h     

http://commits.kde.org/kdelibs/b25d506ed4938eb858654549f0208a4948505fe8

diff --git a/khtml/khtml_part.cpp b/khtml/khtml_part.cpp
index ec89b0c..817e606 100644
--- a/khtml/khtml_part.cpp
+++ b/khtml/khtml_part.cpp
@@ -4131,7 +4131,7 @@ KParts::ScriptableExtension \
*KHTMLPart::scriptableExtension( const DOM::NodeImpl  return 0L;
 }
 
-bool KHTMLPart::loadFrameElement( DOM::HTMLPartContainerElementImpl \
*frame, const QString &url, +void KHTMLPart::loadFrameElement( \
                DOM::HTMLPartContainerElementImpl *frame, const QString \
                &url,
                                   const QString &frameName, const \
QStringList &params, bool isIFrame )  {
     //kDebug( 6050 ) << this << " requestFrame( ..., " << url << ", " << \
frameName << " )"; @@ -4165,20 +4165,18 @@ bool \
KHTMLPart::loadFrameElement( DOM::HTMLPartContainerElementImpl *frame, cons \
// ### load event on the kid?  navigateLocalProtocol(child, part, \
                KUrl("about:blank"));
         connectToChildPart(child, part, "text/html" /* mimetype of the \
                part, not what's being loaded */);
-  }
+    }
 
-  KUrl u = url.isEmpty() ? KUrl() : completeURL( url );
+    KUrl u = url.isEmpty() ? KUrl() : completeURL( url );
 
-  // Since we don't specify args here a KHTMLRun will be used to determine \
                the
-  // mimetype, which will then be  passed down at the bottom of \
                processObjectRequest
-  // inside URLArgs to the part. In our particular case, this means that \
                we can
-  // use that inside KHTMLPart::openUrl to route things appropriately.
-  child->m_bCompleted = false;
-  if (!requestObject( child, u ) && !child->m_run) {
-      child->m_bCompleted = true;
-      return false;
-  }
-  return true;
+    // Since we don't specify args here a KHTMLRun will be used to \
determine the +    // mimetype, which will then be  passed down at the \
bottom of processObjectRequest +    // inside URLArgs to the part. In our \
particular case, this means that we can +    // use that inside \
KHTMLPart::openUrl to route things appropriately. +    child->m_bCompleted \
= false; +    if (!requestObject( child, u ) && !child->m_run) {
+        child->m_bCompleted = true;
+    }
 }
 
 QString KHTMLPart::requestFrameName()
@@ -4299,11 +4297,12 @@ bool KHTMLPart::processObjectRequest( \
khtml::ChildFrame *child, const KUrl &_url  // though -> the reference \
becomes invalid -> crash is likely  KUrl url( _url );
 
-    // If we are not permitting anything remote, or khtmlrun called us \
                with
-    // empty url + mimetype to indicate a loading error, we obviosuly \
failed +    // khtmlrun called us with empty url + mimetype to indicate a \
loading error, +    // we obviosuly failed; but we can return true here \
since we don't want it +    // doing anything more, while childLoadFailure \
                is enough to notify our kid.
     if ( d->m_onlyLocalReferences || ( url.isEmpty() && mimetype.isEmpty() \
) ) {  childLoadFailure(child);
-        return false;
+        return true;
     }
 
     // we also want to ignore any spurious requests due to closing when \
                parser is being cleared. These should be
diff --git a/khtml/khtml_part.h b/khtml/khtml_part.h
index a0104e3..18d3a9a 100644
--- a/khtml/khtml_part.h
+++ b/khtml/khtml_part.h
@@ -1751,7 +1751,7 @@ private:
   QString requestFrameName();
 
   // Requests loading of a frame or iframe element
-  bool loadFrameElement( DOM::HTMLPartContainerElementImpl *frame, const \
QString &url, const QString &frameName, +  void loadFrameElement( \
DOM::HTMLPartContainerElementImpl *frame, const QString &url, const QString \
                &frameName,
                          const QStringList &args = QStringList(), bool \
isIFrame = false );  
   // Requests loading of an object or embed element. Returns true if


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic