diff options
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/webview_impl.cc | 9 | ||||
-rw-r--r-- | webkit/tools/layout_tests/test_expectations.txt | 4 |
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 |