WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
62126
[Qt] fast/dom/HTMLDocument/hasFocus.html failed
https://bugs.webkit.org/show_bug.cgi?id=62126
Summary
[Qt] fast/dom/HTMLDocument/hasFocus.html failed
qi
Reported
2011-06-06 07:08:27 PDT
Title say everything.
Attachments
patch
(2.36 KB, patch)
2011-06-06 07:21 PDT
,
qi
menard
: review-
menard
: commit-queue-
Details
Formatted Diff
Diff
patch2
(3.06 KB, patch)
2011-06-15 08:25 PDT
,
qi
no flags
Details
Formatted Diff
Diff
patch3
(3.16 KB, patch)
2011-08-11 07:56 PDT
,
qi
no flags
Details
Formatted Diff
Diff
patch3
(1.14 KB, patch)
2011-08-11 08:02 PDT
,
qi
no flags
Details
Formatted Diff
Diff
patch4
(1.08 KB, patch)
2011-08-11 08:09 PDT
,
qi
no flags
Details
Formatted Diff
Diff
patch5
(1.12 KB, patch)
2011-08-11 08:48 PDT
,
qi
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
qi
Comment 1
2011-06-06 07:21:07 PDT
Created
attachment 96090
[details]
patch
Chang Shu
Comment 2
2011-06-06 08:08:30 PDT
Comment on
attachment 96090
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=96090&action=review
> Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp:176 > + m_webPage->d->page->focusController()->setFocusedFrame(0);
Since ChromeClientQt::focus() does not call setFocusedFrame(), it's unlikely the best place to reset focused frame is in this unfocus() function. It seems to me a better place would be QWebPagePrivate::focusOutEvent or somewhere in QWebFrame. You can try if it works. :)
qi
Comment 3
2011-06-06 10:23:59 PDT
In this case, ChromeClientQt::unfocus() was called by "window.blur()", QWebPagePrivate::focusOutEvent is not touched. Currently, the code only clear the focus for qwidget, I think it should also notify the FocusController.
Chang Shu
Comment 4
2011-06-14 06:25:57 PDT
QtTestBrowser works ok, right? You don't have to call setFocusedFrame directly. The event handling mechanism should get it done. I think the problem is in DRT. Probably my patch
http://trac.webkit.org/changeset/88461
will provide a clue. It's a fix to WTR but DRT may have the similar issue.
qi
Comment 5
2011-06-15 06:24:43 PDT
I am looking into qt code to find why view->clearFocus() in ChromeClientQt doesn't issue a "FocusOut" event which suppose to trigger focusController to reset focuse frame. What I found is: in QWidget::clearFocus(), it found it doesn't have focus! (line 6500 in qwidget.cpp). The reason why the QWidget doesn't have focus is because QWidget will call QApplicationPirvate::setFocusWidget (line 6423 in qwidget.cpp) to set itself as focus widget, in QApplicationPrivate::setFocusWidget, it will find the focus widget is in hidden status then it will save the widget into hidden_focus_widget in QApplication (line 2187 in qapplication.cpp), if the focus widget is visible, it will be saved into focus_widget instead of hidden_focus_widget (line 2197 in qapplication.cpp) . When we call hasFocus() in qwidget.cpp which will call QApplication::focusWidget (line 6331 in qwidget.cpp) to find focus widget, which only return QApplicationPrivate::focus_widget. So, for our case, our view is hidden, even we set it to focus, we will never find it has focus! Not sure anybody has a idea about it?
Alexis Menard (darktears)
Comment 6
2011-06-15 07:24:05 PDT
Comment on
attachment 96090
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=96090&action=review
> Source/WebKit/qt/ChangeLog:8 > + Clean the FocusController when the windows lose the focus.
Clear is better than clean :D. Typo -> "when the window loses"
>> Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp:176 >> + m_webPage->d->page->focusController()->setFocusedFrame(0); > > Since ChromeClientQt::focus() does not call setFocusedFrame(), it's unlikely the best place to reset focused frame is in this unfocus() function. > It seems to me a better place would be QWebPagePrivate::focusOutEvent or somewhere in QWebFrame. You can try if it works. :)
Yep, the view get the focus cleared therefore the page will receive a focusOutEvent, sounds like a better place. focusController->setFocusedFrame(QWebFramePrivate::core(mainFrame)); is done in the focusInEvent, perhaps we should clear it in the focusOutEvent.
Antonio Gomes
Comment 7
2011-06-15 08:14:14 PDT
Note that you should do informal reviews :) "Making unofficial reviews before you become a reviewer is encouraged. This is an excellent way to show your skills. Note that you should not put r+ nor r- on patches in such unofficial reviews."
http://www.webkit.org/coding/commit-review-policy.html
qi
Comment 8
2011-06-15 08:25:21 PDT
Created
attachment 97298
[details]
patch2 Because the QWidget will not able to send out FocusIn or FocusOut event when it is hidden (See
comment#5
), I let ChormeClientQt send the event out. I put the code only for DumpRenderTree because I don't want to change the browser behavior.
Alexis Menard (darktears)
Comment 9
2011-06-28 11:00:14 PDT
Comment on
attachment 97298
[details]
patch2 View in context:
https://bugs.webkit.org/attachment.cgi?id=97298&action=review
otherwise LGTM
> Source/WebKit/qt/ChangeLog:9 > + manually send out FocusOut event when it is hidden. And same thing for setFocus.
"When QWidget in hidden status" -> When QWidget is in a hidden status. "manually send" is enough, you don't need "out". "And same thing for setFocus" -> could be a bit better like "The same applies for setFocus". I'm nitpicking.
Robert Hogan
Comment 10
2011-08-10 12:23:10 PDT
Comment on
attachment 97298
[details]
patch2 View in context:
https://bugs.webkit.org/attachment.cgi?id=97298&action=review
As long as you fixed that nit when landing, I would r+ this.
> Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp:67 > +#include "qapplication.h"
Better to use <QApplication>
qi
Comment 11
2011-08-11 07:56:10 PDT
Created
attachment 103623
[details]
patch3 Under the latest revision, this bug is not reproducible anymore, I remove this test case from skip list.
qi
Comment 12
2011-08-11 08:02:07 PDT
Created
attachment 103625
[details]
patch3 Sorry, update wrong patch.
Chang Shu
Comment 13
2011-08-11 08:05:05 PDT
Comment on
attachment 103625
[details]
patch3 View in context:
https://bugs.webkit.org/attachment.cgi?id=103625&action=review
> LayoutTests/ChangeLog:3 > + Need a short description and bug URL (OOPS!)
remove this line before landing.
qi
Comment 14
2011-08-11 08:09:05 PDT
Created
attachment 103627
[details]
patch4 Modify based on comments.
Chang Shu
Comment 15
2011-08-11 08:11:20 PDT
Comment on
attachment 103627
[details]
patch4 LGTM
WebKit Review Bot
Comment 16
2011-08-11 08:34:07 PDT
Comment on
attachment 103627
[details]
patch4 Rejecting
attachment 103627
[details]
from commit-queue. Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=ec2-cq-03', '--port..." exit_code: 1 Last 500 characters of output: s/API/qt/qdesktopwebview.cpp M Source/WebKit2/UIProcess/API/qt/qtouchwebview.cpp M Source/WebKit2/ChangeLog
r92851
= e9115cc6db9aa5f59ab997c94d77b9288193c9e0 (refs/remotes/origin/master) First, rewinding head to replay your work on top of it... Fast-forwarded master to refs/remotes/origin/master. Updating chromium port dependencies using gclient... ________ running '/usr/bin/python gyp_webkit' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium' Updating webkit projects from gyp files... Full output:
http://queues.webkit.org/results/9351233
qi
Comment 17
2011-08-11 08:48:34 PDT
Created
attachment 103631
[details]
patch5 Resend patch and put "Chang Shu" as reviewer.
WebKit Review Bot
Comment 18
2011-08-11 09:47:44 PDT
Comment on
attachment 103631
[details]
patch5 Clearing flags on attachment: 103631 Committed
r92858
: <
http://trac.webkit.org/changeset/92858
>
WebKit Review Bot
Comment 19
2011-08-11 09:47:49 PDT
All reviewed patches have been landed. Closing bug.
Balazs Kelemen
Comment 20
2011-08-11 11:03:53 PDT
I don't know what's going on here. How many patches have you finally landed from here? By the way the hasFocus test failed on the Szeged bots (x86_64-Release, 4.8, WK2) so I skipped it again in
http://trac.webkit.org/changeset/92869
.
Balazs Kelemen
Comment 21
2011-08-11 11:04:42 PDT
***
Bug 66076
has been marked as a duplicate of this bug. ***
Chang Shu
Comment 22
2011-08-11 11:10:35 PDT
(In reply to
comment #20
)
> I don't know what's going on here. How many patches have you finally landed from here? By the way the hasFocus test failed on the Szeged bots (x86_64-Release, 4.8, WK2) so I skipped it again in
http://trac.webkit.org/changeset/92869
.
Balazs, is the test failing on WK2 only? Then we should put it into WK2 skip list. We can reuse this bug for the WK2 failure, but we should change the title.
qi
Comment 23
2011-08-11 11:13:59 PDT
(In reply to
comment #20
)
> I don't know what's going on here. How many patches have you finally landed from here? By the way the hasFocus test failed on the Szeged bots (x86_64-Release, 4.8, WK2) so I skipped it again in
http://trac.webkit.org/changeset/92869
.
I just landed one patch, because of the commit failed I repatched it. You said it failed on WK2, why you revert the skip file for WK1?
Balazs Kelemen
Comment 24
2011-08-11 12:27:06 PDT
(In reply to
comment #23
)
> (In reply to
comment #20
) > > I don't know what's going on here. How many patches have you finally landed from here? By the way the hasFocus test failed on the Szeged bots (x86_64-Release, 4.8, WK2) so I skipped it again in
http://trac.webkit.org/changeset/92869
. > > I just landed one patch, because of the commit failed I repatched it. You said it failed on WK2, why you revert the skip file for WK1?
No. I sad it failed on the x86_64-Release, the Qt-4.8 and the WK2 bots. Sorry if I was not clear. These bots are hosted at
http://build.webkit.sed.hu/waterfall
. I still don't get the picture. You just landed the patch that removes the test from the skipped list? Or did you also land something that actually fix the issue?
qi
Comment 25
2011-08-11 12:30:13 PDT
I just landed the patch that removes the test from the skipped list.
qi
Comment 26
2011-08-11 12:43:33 PDT
It is weird, my workspace and Chang's workspace still pass this case. Since I can't reproduce this bug, my original patch(patch2) can't be landed.
Balazs Kelemen
Comment 27
2011-08-15 05:55:54 PDT
(In reply to
comment #26
)
> It is weird, my workspace and Chang's workspace still pass this case. Since I can't reproduce this bug, my original patch(patch2) can't be landed.
Probably you could reproduce the bug in a 64 bit environment.
Chang Shu
Comment 28
2011-08-15 08:35:09 PDT
I don't think we need the workaround in patch2. The original problem is either a DRT issue or Qt issue. Since the bug is showing up in DRT only, I would lower down the priority or even mark this bug as FIX LATER.
Eric Seidel (no email)
Comment 29
2011-09-06 15:29:42 PDT
Comment on
attachment 103625
[details]
patch3 Cleared Chang Shu's review+ from obsolete
attachment 103625
[details]
so that this bug does not appear in
http://webkit.org/pending-commit
.
Eric Seidel (no email)
Comment 30
2011-09-06 15:29:46 PDT
Comment on
attachment 103627
[details]
patch4 Cleared Chang Shu's review+ from obsolete
attachment 103627
[details]
so that this bug does not appear in
http://webkit.org/pending-commit
.
Jocelyn Turcotte
Comment 31
2014-02-03 03:17:55 PST
=== Bulk closing of Qt bugs === If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary. If you believe that this is still an important QtWebKit bug, please fill a new report at
https://bugreports.qt-project.org
and add a link to this issue. See
http://qt-project.org/wiki/ReportingBugsInQt
for additional guidelines.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug