Bug 49545 - [Qt] [WK2] The focus switching does not seems to work with QGraphicsWKView
Summary: [Qt] [WK2] The focus switching does not seems to work with QGraphicsWKView
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P4 Minor
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2010-11-15 08:33 PST by Benjamin Poulain
Modified: 2010-11-17 09:36 PST (History)
2 users (show)

See Also:


Attachments
Inputs for testing (27 bytes, text/html)
2010-11-15 08:33 PST, Benjamin Poulain
no flags Details
Patch (5.52 KB, patch)
2010-11-16 09:49 PST, Benjamin Poulain
kenneth: review+
commit-queue: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2010-11-15 08:33:27 PST
Created attachment 73902 [details]
Inputs for testing

It seems tabbing between fields does not work with QGraphicsWKView.

To reproduce, open Minibrowser on the attached file and enjoy :)
Comment 1 Benjamin Poulain 2010-11-16 09:49:42 PST
Created attachment 74006 [details]
Patch

The FriendlyWidget of QGraphicsWKView::focusNextPrevChildCallback() is one hell of a ugly hack. Any idea to do that better is welcome.
Comment 2 Kenneth Rohde Christiansen 2010-11-17 01:56:48 PST
Comment on attachment 74006 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=74006&action=review

> WebKit2/UIProcess/API/qt/qgraphicswkview.cpp:146
> +class FriendlyWidget : public QWidget

Simon says that this is OK :-)
Comment 3 WebKit Commit Bot 2010-11-17 02:40:33 PST
Comment on attachment 74006 [details]
Patch

Rejecting patch 74006 from commit-queue.

Failed to run "['./WebKitTools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=abarth-cq-sl', 'apply-attachment', '--force-clean', '--non-interactive', 74006]" exit_code: 2
Last 500 characters of output:
ceeded at 81 (offset 6 lines).
patching file WebKit2/UIProcess/API/qt/qwkpage.cpp
patching file WebKit2/UIProcess/API/qt/qwkpage.h
Hunk #1 FAILED at 112.
1 out of 1 hunk FAILED -- saving rejects to file WebKit2/UIProcess/API/qt/qwkpage.h.rej
patching file WebKit2/UIProcess/API/qt/qwkpage_p.h
Hunk #1 succeeded at 55 with fuzz 1 (offset 1 line).

Failed to run "[u'/Users/abarth/git/webkit-queue/WebKitTools/Scripts/svn-apply', u'--reviewer', u'Kenneth Rohde Christiansen', u'--force']" exit_code: 1

Full output: http://queues.webkit.org/results/6182013
Comment 4 Benjamin Poulain 2010-11-17 05:51:35 PST
Committed r72202: <http://trac.webkit.org/changeset/72202>
Comment 5 Balazs Kelemen 2010-11-17 08:48:06 PST
(In reply to comment #1)
> Created an attachment (id=74006) [details]
> Patch
> 
> The FriendlyWidget of QGraphicsWKView::focusNextPrevChildCallback() is one hell of a ugly hack. Any idea to do that better is welcome.

What is the purpose of that? We are assuming the concrete type of the QWidget, 
right? Why not qobject_cast? Or am I misinterpreting it?
Comment 6 Benjamin Poulain 2010-11-17 09:36:48 PST
(In reply to comment #5)
> > The FriendlyWidget of QGraphicsWKView::focusNextPrevChildCallback() is one hell of a ugly hack. Any idea to do that better is welcome.
> 
> What is the purpose of that? We are assuming the concrete type of the QWidget, 
> right? Why not qobject_cast? Or am I misinterpreting it?

It is to change the visibility of a method. This method is usually available through QWidget, but here we are in a QGraphicsWidget, so we can't access it directly.

This cast is a way to make a protected method public.