2009-11-13 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Nov 2009 13:21:34 +0000 (13:21 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Nov 2009 13:21:34 +0000 (13:21 +0000)
        Reviewed by Kenneth Rohde Christiansen.

        [Qt] Fix initial QWebView focus behavior.

        focusController->setFocused(true) was not always called.
        https://bugs.webkit.org/show_bug.cgi?id=31466

        * Api/qwebpage.cpp:
        (QWebPagePrivate::focusInEvent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@50937 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/qt/Api/qwebpage.cpp
WebKit/qt/ChangeLog

index febc391e51fdeae9426249ee29841c2d43d32cb1..56cb4d4836082cf47bc611cb3b58f4e75f2f845b 100644 (file)
@@ -1062,11 +1062,9 @@ void QWebPagePrivate::keyReleaseEvent(QKeyEvent *ev)
 void QWebPagePrivate::focusInEvent(QFocusEvent*)
 {
     FocusController *focusController = page->focusController();
-    Frame *frame = focusController->focusedFrame();
     focusController->setActive(true);
-    if (frame)
-        focusController->setFocused(true);
-    else
+    focusController->setFocused(true);
+    if (!focusController->focusedFrame())
         focusController->setFocusedFrame(QWebFramePrivate::core(mainFrame));
 }
 
index 39ffa95104505eb49f26ee01e3a9d7c5db22ecde..886ec287fa6e19ec0865971062275da34d6053c7 100644 (file)
@@ -1,3 +1,15 @@
+2009-11-13  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Fix initial QWebView focus behavior.
+
+        focusController->setFocused(true) was not always called.
+        https://bugs.webkit.org/show_bug.cgi?id=31466
+
+        * Api/qwebpage.cpp:
+        (QWebPagePrivate::focusInEvent):
+
 2009-11-13  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
 
         Reviewed by Simon Hausmann.