Reviewed by John.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 29 Aug 2004 21:47:25 +0000 (21:47 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 29 Aug 2004 21:47:25 +0000 (21:47 +0000)
<rdar://problem/3778314> REGRESSION: Can't proceed to survey questions on Lominger's Apple website

Because we will stop parsing when there is a pending redirection,
avoid setting one if no navigation would actually take place
because the number of steps is out of range.

        * khtml/khtml_part.cpp:
        (KHTMLPart::scheduleHistoryNavigation):
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::canGoBackOrForward):
        * kwq/KWQKPartsBrowserInterface.h:
        * kwq/WebCoreBridge.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7397 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2005-08-23
WebCore/khtml/khtml_part.cpp
WebCore/kwq/KWQKHTMLPart.h
WebCore/kwq/KWQKHTMLPart.mm
WebCore/kwq/KWQKPartsBrowserInterface.h
WebCore/kwq/WebCoreBridge.h

index e5ed944d536139ca852d68564e0bc0ec379a1bd4..b298eaec6d54612b1ba9491fe98a99eca1089ece 100644 (file)
@@ -1,3 +1,21 @@
+2004-08-27  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by John.
+
+       <rdar://problem/3778314> REGRESSION: Can't proceed to survey questions on Lominger's Apple website
+
+       Because we will stop parsing when there is a pending redirection,
+       avoid setting one if no navigation would actually take place
+       because the number of steps is out of range.
+       
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::scheduleHistoryNavigation):
+        * kwq/KWQKHTMLPart.h:
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::canGoBackOrForward):
+        * kwq/KWQKPartsBrowserInterface.h:
+        * kwq/WebCoreBridge.h:
+
 2004-08-27  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Chris.
index 66532000897444df475a61674cf8738f8034231a..6fa13fa56f9fd71413a7405f174324fdf3e52502 100644 (file)
@@ -1990,6 +1990,13 @@ bool KHTMLPart::isImmediateRedirectPending() const
 
 void KHTMLPart::scheduleHistoryNavigation( int steps )
 {
+#if APPLE_CHANGES
+    // navigation will always be allowed in the 0 steps case, which is OK because
+    // that's supposed to force a reload.
+    if (!KWQ(this)->canGoBackOrForward(steps))
+        return;
+#endif
+
     d->m_scheduledRedirection = historyNavigationScheduled;
     d->m_delayRedirect = 0;
     d->m_redirectURL = QString::null;
index bc5b5e55ce3a8fb66494722c73b0338de6f35894..6858bde6d7ff9affe3edc4de35e515e7b696d20a 100644 (file)
@@ -329,6 +329,8 @@ public:
 
     DOM::Range markedRange() const;
     void setMarkedRange(const DOM::Range &);
+
+    bool canGoBackOrForward(int distance);
 private:
     virtual void khtmlMousePressEvent(khtml::MousePressEvent *);
     virtual void khtmlMouseDoubleClickEvent(khtml::MouseDoubleClickEvent *);
index ac538b4409df469b187ee1c72028695572e972e3..6a31c0eacd880f7c3f7b210eb028dca6ebab153d 100644 (file)
@@ -3807,3 +3807,8 @@ void KWQKHTMLPart::setMarkedRange(const DOM::Range &range)
        m_markedRange.startContainer().handle()->renderer()->repaint();
     }
 }
+
+bool KWQKHTMLPart::canGoBackOrForward(int distance)
+{
+    return [_bridge canGoBackOrForward:distance];
+}
index 4b5ed309774f3f7f2b205aa28de50efc4303b0ca..1c59056effa9c8dbe96a0f6e1abacd04036e4ed5 100644 (file)
@@ -39,6 +39,7 @@ public:
     
     QVariant property(const char *name) const;
     void callMethod(const char *name, const QVariant &argument);
+    
 
 private:
     KWQKHTMLPart *_part;
index a839f84cf93c5e25d1831e490694d35e6d404285..65743ffe6848e23ce8d67f2769760958071b8b4e 100644 (file)
@@ -457,6 +457,7 @@ typedef enum {
 
 - (int)historyLength;
 - (void)goBackOrForward:(int)distance;
+- (BOOL)canGoBackOrForward:(int)distance;
 
 - (void)controlTextDidBeginEditing:(NSNotification *)obj;
 - (void)controlTextDidEndEditing:(NSNotification *)obj;