Reviewed by hyatt.
Fix html editing input & basic form submission.
* Spinneret/Spinneret/WebFrame.cpp:
(WebKit::WebFrame::submitForm):
(WebKit::WebFrame::loadURL):
* Spinneret/Spinneret/WebFrame.h:
* Spinneret/Spinneret/WebView.cpp:
(WebKit::WebView::keyPress):
(WebKit::WebViewWndProc):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@13584
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-03-30 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by hyatt.
+
+ Fix html editing input & basic form submission.
+
+ * Spinneret/Spinneret/WebFrame.cpp:
+ (WebKit::WebFrame::submitForm):
+ (WebKit::WebFrame::loadURL):
+ * Spinneret/Spinneret/WebFrame.h:
+ * Spinneret/Spinneret/WebView.cpp:
+ (WebKit::WebView::keyPress):
+ (WebKit::WebViewWndProc):
+
2006-03-28 Justin Garcia <justin.garcia@apple.com>
Reviewed by darin
#include "WebView.h"
#include "Spinneret.h"
+#include "Document.h"
#include "FrameView.h"
#include "FrameWin.h"
#include "GraphicsContext.h"
loadURL(str.ascii());
}
+void WebFrame::submitForm(const String& method, const KURL& url, const FormData* submitFormData)
+{
+ // FIXME: This is a dumb implementation, doesn't handle subframes, etc.
+ d->frame->didOpenURL(url);
+ d->frame->begin(url);
+ TransferJob* job;
+ if (method == "GET" || !submitFormData)
+ job = new TransferJob(this, method, url);
+ else
+ job = new TransferJob(this, method, url, *submitFormData);
+ job->start(d->frame->document()->docLoader());
+}
+
void WebFrame::loadURL(const char* URL)
{
d->frame->didOpenURL(URL);
d->frame->begin(URL);
WebCore::TransferJob* job = new TransferJob(this, "GET", URL);
- job->start(0);
+ job->start(d->frame->document()->docLoader());
}
void WebFrame::receivedData(WebCore::TransferJob*, const char* data, int length)
#include "TransferJobClient.h"
#include "FrameWin.h"
+class KURL;
+
namespace WebCore {
+ class FormData;
class Frame;
class FrameView;
+ class String;
class TransferJob;
}
void loadHTMLString(char* html, char* baseURL = 0);
virtual void openURL(const DeprecatedString&);
+ virtual void submitForm(const WebCore::String& method, const KURL&, const WebCore::FormData*);
void loadURL(const char*);
};
const LPCWSTR kWebViewWindowClassName = L"WebViewWindowClass";
+static bool nextCharIsInputText = false;
LRESULT CALLBACK WebViewWndProc(HWND, UINT, WPARAM, LPARAM);
frame->selection().modify(SelectionController::MOVE, SelectionController::FORWARD, ParagraphGranularity);
break;
default:
- TypingCommand::insertText(frame->document(), keyEvent.text(), false);
+ nextCharIsInputText = true;
}
handled = true;
}
// through to the top level webview and do things like scrolling
if (webview->keyPress(wParam, lParam))
break;
-
WORD wScrollNotify = scrollMessageForKey(wParam);
if (wScrollNotify != -1)
SendMessage(hWnd, WM_VSCROLL, MAKELONG(wScrollNotify, 0), 0L);
+ break;
+ }
+ case WM_CHAR: {
+ // FIXME: We need to use WM_UNICHAR to support international text.
+ if (nextCharIsInputText) {
+ TypingCommand::insertText(webview->mainFrame()->impl()->document(), QChar(wParam), false);
+ nextCharIsInputText = false;
+ }
+ break;
}
case WM_KEYUP: {
webview->keyPress(wParam, lParam);