- removed the guards for the "multiple forms submission" issue, which may not be
an issue anymore and the guards prevent perfectly legitimate websites from
working correctly.
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::setView):
* bridge/mac/WebCoreAXObject.mm:
(-[WebCoreAXObject accessibilityPerformAction:]):
* bridge/win/FrameWin.cpp:
(WebCore::FrameWin::keyPress):
* config.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::submitForm):
* loader/FrameLoader.h:
* loader/mac/FrameLoaderMac.mm:
(WebCore::FrameLoader::receivedMainResourceError):
* loader/qt/FrameLoaderQt.cpp:
(WebCore::FrameLoader::submitForm):
* page/Frame.cpp:
(WebCore::Frame::setView):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::keyEvent):
(WebCore::EventHandler::mouseDown):
* platform/qt/FrameQt.cpp:
(WebCore::FrameQt::keyEvent):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@18011
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-12-04 Kevin McCullough <KMcCullough@apple.com>
+
+ Reviewed by Darin.
+
+ - removed the guards for the "multiple forms submission" issue, which may not be
+ an issue anymore and the guards prevent perfectly legitimate websites from
+ working correctly.
+
+ * bridge/mac/FrameMac.mm:
+ (WebCore::FrameMac::setView):
+ * bridge/mac/WebCoreAXObject.mm:
+ (-[WebCoreAXObject accessibilityPerformAction:]):
+ * bridge/win/FrameWin.cpp:
+ (WebCore::FrameWin::keyPress):
+ * config.h:
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::submitForm):
+ * loader/FrameLoader.h:
+ * loader/mac/FrameLoaderMac.mm:
+ (WebCore::FrameLoader::receivedMainResourceError):
+ * loader/qt/FrameLoaderQt.cpp:
+ (WebCore::FrameLoader::submitForm):
+ * page/Frame.cpp:
+ (WebCore::Frame::setView):
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::EventHandler::keyEvent):
+ (WebCore::EventHandler::mouseDown):
+ * platform/qt/FrameQt.cpp:
+ (WebCore::FrameQt::keyEvent):
+
2006-12-02 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin Adler.
{
Frame::setView(view);
+#ifdef MULTIPLE_FORM_SUBMISSION_PROTECTION
// Only one form submission is allowed per view of a part.
// Since this part may be getting reused as a result of being
// pulled from the back/forward cache, reset this flag.
loader()->resetMultipleFormSubmissionProtection();
+#endif
}
void FrameMac::setStatusBarText(const String& status)
Element* actionElement = [self actionElement];
if (!actionElement)
return;
-
+#ifdef MULTIPLE_FORM_SUBMISSION_PROTECTION
if (Frame* f = actionElement->document()->frame())
f->loader()->resetMultipleFormSubmissionProtection();
-
+#endif
actionElement->accessKeyAction(true);
}
}
return false;
}
+#ifdef MULTIPLE_FORM_SUBMISSION_PROTECTION
if (!keyEvent.isKeyUp())
loader()->resetMultipleFormSubmissionProtection();
+#endif
result = !EventTargetNodeCast(node)->dispatchKeyEvent(keyEvent);
return true; // If JavaScript is disabled, a user gesture must have initiated the navigation
}
+#ifdef MULTIPLE_FORM_SUBMISSION_PROTECTION
void FrameLoader::didNotOpenURL(const KURL& URL)
{
if (m_submittedFormURL == URL)
{
m_submittedFormURL = KURL();
}
+#endif
void FrameLoader::setEncoding(const String& name, bool userChosen)
{
#if PLATFORM(MAC)
void FrameLoader::submitForm(const FrameLoadRequest& request, Event* event)
{
+#ifdef MULTIPLE_FORM_SUBMISSION_PROTECTION
// FIXME: We'd like to remove this altogether and fix the multiple form submission issue another way.
// We do not want to submit more than one form from the same page,
// nor do we want to submit a single form more than once.
return;
m_submittedFormURL = request.resourceRequest().url();
}
+#endif
// FIXME: Why do we always pass true for userGesture?
load(request, true, event, m_formAboutToBeSubmitted.get(), m_formValuesAboutToBeSubmitted);
bool userGestureHint();
+#ifdef MULTIPLE_FORM_SUBMISSION_PROTECTION
void resetMultipleFormSubmissionProtection();
void didNotOpenURL(const KURL&);
+#endif
void addData(const char* bytes, int length);
RefPtr<HTMLFormElement> m_formAboutToBeSubmitted;
HashMap<String, String> m_formValuesAboutToBeSubmitted;
+#ifdef MULTIPLE_FORM_SUBMISSION_PROTECTION
KURL m_submittedFormURL;
+#endif
Timer<FrameLoader> m_redirectionTimer;
}
if (m_state == FrameStateProvisional) {
+#ifdef MULTIPLE_FORM_SUBMISSION_PROTECTION
NSURL *failedURL = [m_provisionalDocumentLoader->originalRequestCopy() URL];
didNotOpenURL(failedURL);
-
+#endif
// We might have made a page cache item, but now we're bailing out due to an error before we ever
// transitioned to the new page (before WebFrameState == commit). The goal here is to restore any state
// so that the existing view (that wenever got far enough to replace) can continue being used.
void FrameLoader::submitForm(const FrameLoadRequest& frameLoadRequest, Event*)
{
+#ifdef MULTIPLE_FORM_SUBMISSION_PROTECTION
// FIXME: We'd like to remove this altogether and fix the multiple form submission issue another way.
// We do not want to submit more than one form from the same page,
// nor do we want to submit a single form more than once.
return;
m_submittedFormURL = frameLoadRequest.resourceRequest().url();
}
+#endif
RefPtr<FormData> formData = frameLoadRequest.resourceRequest().httpBody();
if (formData && !formData->isEmpty() && QtFrame(m_frame)->client())
d->m_doc->detach();
d->m_view = view;
+
+#ifdef MULTIPLE_FORM_SUBMISSION_PROTECTION
+ // Only one form submission is allowed per view of a part.
+ // Since this part may be getting reused as a result of being
+ // pulled from the back/forward cache, reset this flag.
+ loader()->resetMultipleFormSubmissionProtection();
+#endif
}
bool Frame::javaScriptEnabled() const
if (!node)
return false;
}
-
+#ifdef MULTIPLE_FORM_SUBMISSION_PROTECTION
if ([event type] == NSKeyDown)
m_frame->loader()->resetMultipleFormSubmissionProtection();
+#endif
NSEvent *oldCurrentEvent = currentEvent;
currentEvent = HardRetain(event);
return;
BEGIN_BLOCK_OBJC_EXCEPTIONS;
-
+#ifdef MULTIPLE_FORM_SUBMISSION_PROTECTION
m_frame->loader()->resetMultipleFormSubmissionProtection();
-
+#endif
m_mouseDownView = nil;
dragState().m_dragSrc = 0;
return false;
}
+#ifdef MULTIPLE_FORM_SUBMISSION_PROTECTION
if (!keyEvent.isKeyUp())
loader()->resetMultipleFormSubmissionProtection();
+#endif
result = !EventTargetNodeCast(node)->dispatchKeyEvent(keyEvent);