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

List:       kde-commits
Subject:    branches/KDE/4.1/kdelibs/khtml
From:       Maks Orlovich <maksim () kde ! org>
Date:       2008-08-23 22:30:56
Message-ID: 1219530656.999783.28261.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 851523 by orlovich:

Cancels any  pending redirections on form submit.
Fixes regression in forms/form_checkbox.html and #159932

BUG:159932


 M  +13 -5     khtml_part.cpp  
 M  +2 -0      khtmlpart_p.h  


--- branches/KDE/4.1/kdelibs/khtml/khtml_part.cpp #851522:851523
@@ -1510,9 +1510,7 @@
   connect( partManager(), SIGNAL( activePartChanged( KParts::Part * ) ),
              this, SLOT( slotActiveFrameChanged( KParts::Part * ) ) );
 
-  d->m_delayRedirect = 0;
-  d->m_redirectURL.clear();
-  d->m_redirectionTimer.stop();
+  d->clearRedirection();
   d->m_redirectLockHistory = true;
   d->m_bClearing = false;
   d->m_frameNameId = 1;
@@ -2435,13 +2433,19 @@
   }
 }
 
+void KHTMLPartPrivate::clearRedirection()
+{
+  m_delayRedirect = 0;
+  m_redirectURL.clear();
+  m_redirectionTimer.stop();
+}
+
 void KHTMLPart::slotRedirect()
 {
   kDebug(6050) << this << " slotRedirect()";
   QString u = d->m_redirectURL;
   KUrl url( u );
-  d->m_delayRedirect = 0;
-  d->m_redirectURL.clear();
+  d->clearRedirection();
 
   if ( d->isInPageURL(u) )
   {
@@ -4945,6 +4949,10 @@
                          i18n( "Submit" )))
     return;
 
+  // OK. We're actually going to submit stuff. Clear any redirections,
+  // we should win over them
+  d->clearRedirection();
+
   KParts::OpenUrlArguments args;
 
   if (!d->m_referrer.isEmpty())
--- branches/KDE/4.1/kdelibs/khtml/khtmlpart_p.h #851522:851523
@@ -488,6 +488,8 @@
   KHTMLWalletQueue *m_wq;
 #endif
 
+  void clearRedirection();
+
   bool isLocalAnchorJump(const KUrl& url);
   void executeAnchorJump(const KUrl& url, bool lockHistory);
 
[prev in list] [next in list] [prev in thread] [next in thread] 

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