Changeset 75119 in webkit


Ignore:
Timestamp:
Jan 5, 2011 4:41:48 PM (13 years ago)
Author:
Girish Ramakrishnan
Message:

[Qt] QML WebView does not transfer focus to underlying QGraphicsWebView

QML WebView creates QGraphicsWebView as it's child. The WebView is not
setup as a focus proxy of the QGraphicsWebView. Thus, even though the
WebView gets focus, the QGraphicsWebView does not get focus.
In QML, focus proxies or "focus scopes" are created using FocusScope.
This change makes WebView a FocusScope and sets the focus on the
QGraphicsWebView.

Reviewed by Simon Hausmann.
Acked by Aaron Kennedy <aaron.kennedy@nokia.com>

https://bugs.webkit.org/show_bug.cgi?id=51094

  • declarative/qdeclarativewebview.cpp:

(QDeclarativeWebView::init):

Location:
trunk/WebKit/qt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/qt/ChangeLog

    r75078 r75119  
     12011-01-04  Girish Ramakrishnan  <girish@forwardbias.in>
     2
     3        Reviewed by Simon Hausmann.
     4        Acked by Aaron Kennedy <aaron.kennedy@nokia.com>
     5
     6        [Qt] QML WebView does not transfer focus to underlying QGraphicsWebView
     7
     8        QML WebView creates QGraphicsWebView as it's child. The WebView is not
     9        setup as a focus proxy of the QGraphicsWebView. Thus, even though the
     10        WebView gets focus, the QGraphicsWebView does not get focus.
     11        In QML, focus proxies or "focus scopes" are created using FocusScope.
     12        This change makes WebView a FocusScope and sets the focus on the
     13        QGraphicsWebView.
     14
     15        https://bugs.webkit.org/show_bug.cgi?id=51094
     16
     17        * declarative/qdeclarativewebview.cpp:
     18        (QDeclarativeWebView::init):
     19
    1202011-01-05  Yi Shen  <yi.4.shen@nokia.com>
    221
  • trunk/WebKit/qt/declarative/qdeclarativewebview.cpp

    r67347 r75119  
    254254    setAcceptedMouseButtons(Qt::LeftButton);
    255255    setFlag(QGraphicsItem::ItemHasNoContents, true);
     256    setFlag(QGraphicsItem::ItemIsFocusScope, true);
    256257    setClip(true);
    257258
    258259    d->view = new GraphicsWebView(this);
    259260    d->view->setResizesToContents(true);
     261    d->view->setFocus();
    260262    QWebPage* wp = new QDeclarativeWebPage(this);
    261263    setPage(wp);
Note: See TracChangeset for help on using the changeset viewer.