summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorarv@google.com <arv@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 19:32:33 +0000
committerarv@google.com <arv@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 19:32:33 +0000
commit6574b91331b8531e7e9ccb54f1c3f0e752ab3d1d (patch)
tree148f0b047517cb286797776f6fcff5d7f7a53332 /webkit
parentd5123e7e079ade51b41e90639977cc3565f3466b (diff)
downloadchromium_src-6574b91331b8531e7e9ccb54f1c3f0e752ab3d1d.zip
chromium_src-6574b91331b8531e7e9ccb54f1c3f0e752ab3d1d.tar.gz
chromium_src-6574b91331b8531e7e9ccb54f1c3f0e752ab3d1d.tar.bz2
Fix layout test related to document.hasFocus.
Note that this fixes the test for the test_shell but Chrome is still having issues with this test due to 2 reasons: 1. Focusing and blurring windows are asynchronous. 2. We explicitly prevent an unfocused window to take focus again. See http://codesearch/p?sa=N&cd=1&ct=rc#chrome/trunk/src/chrome/renderer/render_widget.cc&q=RenderWidget::didFocus&l=648 BUG=16018 TEST=LayoutTests Review URL: http://codereview.chromium.org/180047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25491 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webview_impl.cc9
-rw-r--r--webkit/tools/layout_tests/test_expectations.txt4
2 files changed, 6 insertions, 7 deletions
diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc
index b065563..bbf7d29 100644
--- a/webkit/glue/webview_impl.cc
+++ b/webkit/glue/webview_impl.cc
@@ -1068,11 +1068,12 @@ void WebViewImpl::mouseCaptureLost() {
}
void WebViewImpl::setFocus(bool enable) {
- page_->focusController()->setFocused(enable);
if (enable) {
- // Note that we don't call setActive() when disabled as this cause extra
- // focus/blur events to be dispatched.
+ // Note that we call setActive and setFocued in opposite order in focus vs
+ // blur. This is done so that setActive does not dispatch any events since
+ // the event will be dispatched in setFocused.
page_->focusController()->setActive(true);
+ page_->focusController()->setFocused(true);
ime_accept_events_ = true;
} else {
HideAutoCompletePopup();
@@ -1093,6 +1094,8 @@ void WebViewImpl::setFocus(bool enable) {
editor->confirmComposition();
ime_accept_events_ = false;
}
+ page_->focusController()->setFocused(false);
+ page_->focusController()->setActive(false);
}
}
diff --git a/webkit/tools/layout_tests/test_expectations.txt b/webkit/tools/layout_tests/test_expectations.txt
index 95fa67c..083e634 100644
--- a/webkit/tools/layout_tests/test_expectations.txt
+++ b/webkit/tools/layout_tests/test_expectations.txt
@@ -1142,10 +1142,6 @@ BUG8407 : LayoutTests/fast/loader/main-document-url-for-non-http-loads.html = FA
// <body><canvas height=100></canvas></body> is 1 px taller than upstream.
BUG13809 WIN LINUX : LayoutTests/fast/canvas/canvas-empty-image-pattern.html = FAIL
-// This test has been failing since the FocusController::setFocused API was
-// added in WebKit.
-BUG16018 : LayoutTests/fast/dom/HTMLDocument/hasFocus.html = FAIL
-
// We don't draw the spelling markers at all in test shell.
BUG11577 WIN LINUX : LayoutTests/editing/spelling/inline_spelling_markers.html = FAIL
BUG11577 LINUX : LayoutTests/editing/spelling/spellcheck-attribute.html = FAIL