<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
+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.
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;
DOM::Range markedRange() const;
void setMarkedRange(const DOM::Range &);
+
+ bool canGoBackOrForward(int distance);
private:
virtual void khtmlMousePressEvent(khtml::MousePressEvent *);
virtual void khtmlMouseDoubleClickEvent(khtml::MouseDoubleClickEvent *);
m_markedRange.startContainer().handle()->renderer()->repaint();
}
}
+
+bool KWQKHTMLPart::canGoBackOrForward(int distance)
+{
+ return [_bridge canGoBackOrForward:distance];
+}
QVariant property(const char *name) const;
void callMethod(const char *name, const QVariant &argument);
+
private:
KWQKHTMLPart *_part;
- (int)historyLength;
- (void)goBackOrForward:(int)distance;
+- (BOOL)canGoBackOrForward:(int)distance;
- (void)controlTextDidBeginEditing:(NSNotification *)obj;
- (void)controlTextDidEndEditing:(NSNotification *)obj;