Reviewed by Adam.
Get the new focus window from the wParam instead of calling GetFocus().
Also, send blur even if there is no focused frame.
* WebView.cpp:
(WebViewWndProc):
WebKitTools:
Reviewed by Adam.
<rdar://problem/
5141186>
window.layoutTestController.setWindowIsKey is not implemented in DRT.
Implement setWindowIsKey.
* DumpRenderTree/win/LayoutTestControllerWin.cpp:
(LayoutTestController::setWindowIsKey):
LayoutTests:
Reviewed by Adam.
* platform/win/Skipped:
Remove fast/dom/Window/window-onFocus.html since it succeeds now.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27788
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-11-14 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam.
+
+ * platform/win/Skipped:
+ Remove fast/dom/Window/window-onFocus.html since it succeeds now.
+
2007-11-13 Brady Eidson <beidson@apple.com>
Reviewed by Adam
http/tests/multipart/invalid-image-data.html
# Random sizing issues (Renderblock, RenderTableCells)
-fast/dom/Window/window-onFocus.html
fast/forms/searchfield-heights.html
fast/table/frame-and-rules.html
fast/table/giantCellspacing.html
+2007-11-14 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam.
+
+ Get the new focus window from the wParam instead of calling GetFocus().
+ Also, send blur even if there is no focused frame.
+
+ * WebView.cpp:
+ (WebViewWndProc):
+
2007-11-14 Adam Roben <aroben@apple.com>
Another build fix for systems without Cygwin in their PATH
case WM_KILLFOCUS: {
COMPtr<IWebUIDelegate> uiDelegate;
COMPtr<IWebUIDelegatePrivate> uiDelegatePrivate;
+ HWND newFocusWnd = reinterpret_cast<HWND>(wParam);
if (SUCCEEDED(webView->uiDelegate(&uiDelegate)) && uiDelegate &&
SUCCEEDED(uiDelegate->QueryInterface(IID_IWebUIDelegatePrivate, (void**) &uiDelegatePrivate)) && uiDelegatePrivate)
- uiDelegatePrivate->webViewLostFocus(webView, (OLE_HANDLE)(ULONG64)wParam);
+ uiDelegatePrivate->webViewLostFocus(webView, (OLE_HANDLE)(ULONG64)newFocusWnd);
// FIXME: Merge this logic with updateActiveState, and switch this over to use updateActiveState
// However here we have to be careful. If we are losing focus because of a deactivate,
// and we need to clear out the focused target.
FocusController* focusController = webView->page()->focusController();
webView->resetIME(focusController->focusedOrMainFrame());
- if (GetAncestor(hWnd, GA_ROOT) != GetFocus()) {
- if (Frame* frame = focusController->focusedFrame()) {
+ if (GetAncestor(hWnd, GA_ROOT) != newFocusWnd) {
+ if (Frame* frame = focusController->focusedOrMainFrame()) {
frame->setIsActive(false);
// If we're losing focus to a child of ours, don't send blur events.
- if (!IsChild(hWnd, reinterpret_cast<HWND>(wParam)))
+ if (!IsChild(hWnd, newFocusWnd))
frame->setWindowHasFocus(false);
}
} else
+2007-11-14 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam.
+
+ <rdar://problem/5141186>
+ window.layoutTestController.setWindowIsKey is not implemented in DRT.
+
+ Implement setWindowIsKey.
+
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::setWindowIsKey):
+
2007-11-13 Sam Weinig <sam@webkit.org>
Reviewed by Adam Roben.
void LayoutTestController::setWindowIsKey(bool flag)
{
- // FIXME: Implement!
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ COMPtr<IWebViewPrivate> viewPrivate;
+ if (FAILED(webView->QueryInterface(&viewPrivate)))
+ return;
+
+ HWND webViewWindow;
+ if (FAILED(viewPrivate->viewWindow((OLE_HANDLE*)&webViewWindow)))
+ return;
+
+ ::SendMessage(webViewWindow, flag ? WM_SETFOCUS : WM_KILLFOCUS, (WPARAM)::GetDesktopWindow(), 0);
}
static const CFTimeInterval waitToDumpWatchdogInterval = 10.0;