diff options
author | Jocelyn Turcotte <jocelyn.turcotte@nokia.com> | 2009-11-12 10:36:19 (GMT) |
---|---|---|
committer | Jocelyn Turcotte <jocelyn.turcotte@nokia.com> | 2009-11-12 10:36:19 (GMT) |
commit | a495b9a6ed660ac74596d3ce6700e47c2e1887eb (patch) | |
tree | a7d80c222af0bfd907a025e1ba5ecc4e4f3f4985 /src/3rdparty/webkit/WebKit/qt/Api | |
parent | 1212fbea0b6829986649dd1f237e59377f52a6cd (diff) | |
download | Qt-a495b9a6ed660ac74596d3ce6700e47c2e1887eb.zip Qt-a495b9a6ed660ac74596d3ce6700e47c2e1887eb.tar.gz Qt-a495b9a6ed660ac74596d3ce6700e47c2e1887eb.tar.bz2 |
Updated WebKit from /home/jturcott/dev/webkit/ to qtwebkit/qtwebkit-4.6 ( 361c6ae17415602fedcce8924de445feafaddebb )
Changes in WebKit/qt since the last update:
++ b/WebKit/qt/ChangeLog
2009-11-11 Liang QI <liang.qi@nokia.com>
[Qt] Fix tst_qwebpage and tst_qwebframe compilation on Symbian.
* tests/qwebframe/qwebframe.pro:
* tests/qwebframe/tst_qwebframe.cpp:
* tests/qwebpage/qwebpage.pro:
* tests/qwebpage/tst_qwebpage.cpp:
2009-11-11 Kenneth Rohde Christiansen <kenneth@webkit.org>
Reviewed by Simon Hausmann.
Fix a crash in the layout test plugins/document-open.html
* Api/qwebframe.cpp:
(QWebFrame::toPlainText):
2009-11-11 Warwick Allison <warwick.allison@nokia.com>, Simon Hausmann <simon.hausmann@nokia.com>
Reviewed by Tor Arne Vestbø.
[Qt] Regression: Preserve the parent of plugin objects when using
QtWebKit with only a QWebPage.
* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::FrameLoaderClientQt::createPlugin): Don't reparent
plugins to 0.
* tests/qwebpage/tst_qwebpage.cpp:
(PluginCounterPage::PluginCounterPage): Initialize m_pluginParent to 0.
(PluginCounterPage::~PluginCounterPage): Delete the plugin parent later
(after the page)
(PluginTracerPage::createPlugin): Assign a dummy parent to the plugin.
(PluginTracerPage::PluginTracerPage): Set up the plugin parent.
(tst_QWebPage::createViewlessPlugin): Verify that for viewless pages the
plugin parent remains unchanged.
2009-11-11 David Boddie <dboddie@trolltech.com>
[Qt] Doc: Added internal or hidden placeholder documentation.
* Api/qwebpage.cpp:
2009-11-11 Martin Smith <msmith@trolltech.com>
[Qt] doc: Changed Trolltech to Nokia
* Api/qwebview.cpp:
2009-11-10 Kenneth Rohde Christiansen <kenneth@webkit.org>
Unreviewed documentation fixes.
Added a few improvements from Jocelyn Turcotte to the
createWindow docs.
* Api/qwebview.cpp:
2009-11-10 Kenneth Rohde Christiansen <kenneth@webkit.org>
Unreviewed documentation fix.
[Qt] Make qwebpage's createWindow not qwebview dependent.
https://bugs.webkit.org/show_bug.cgi?id=30771
Update documentation to make it clear that a reimplementation
of the createWindow method of the associated QWebPage can
result in the QWebView::createWindow method to never be called.
* Api/qwebview.cpp:
2009-11-11 Simon Hausmann <simon.hausmann@nokia.com>
Reviewed by Tor Arne Vestbø.
Fix enabling of software input panel when activating editable elements
in QGraphicsWebView.
* Api/qgraphicswebview.cpp:
(QGraphicsWebViewPrivate::inputMethodEnabled): Implement method to
query for input method support.
* Api/qwebpage.cpp:
(QWebPageWidgetClient::inputMethodEnabled): Ditto for QWidget.
(QWebPagePrivate::handleSoftwareInputPanel): Don't use view() to
test for input method support. Instead query using QWebPageClient
and send the SIPR event to the ownerWidget() instead of the view().
The latter is null for QGraphicsWebView.
* tests/qwebpage/tst_qwebpage.cpp:
(EventSpy::EventSpy):
(EventSpy::eventFilter):
(tst_QWebPage::inputMethods): Modify the test to verify that SIPR
events are dispatched when activating focusable content.
Diffstat (limited to 'src/3rdparty/webkit/WebKit/qt/Api')
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp | 106 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp | 4 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp | 13 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp | 10 |
4 files changed, 36 insertions, 97 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp index 38d8c47..040a844 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp @@ -44,6 +44,7 @@ public: virtual void scroll(int dx, int dy, const QRect&); virtual void update(const QRect& dirtyRect); virtual void setInputMethodEnabled(bool enable); + virtual bool inputMethodEnabled() const; #if QT_VERSION >= 0x040600 virtual void setInputMethodHint(Qt::InputMethodHint hint, bool enable); #endif @@ -92,6 +93,15 @@ void QGraphicsWebViewPrivate::setInputMethodEnabled(bool enable) #endif } +bool QGraphicsWebViewPrivate::inputMethodEnabled() const +{ +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) + return q->flags() & QGraphicsItem::ItemAcceptsInputMethod; +#else + return false; +#endif +} + #if QT_VERSION >= 0x040600 void QGraphicsWebViewPrivate::setInputMethodHint(Qt::InputMethodHint hint, bool enable) { @@ -143,101 +153,17 @@ QObject* QGraphicsWebViewPrivate::pluginParent() const /*! \class QGraphicsWebView - \brief The QGraphicsWebView class allows Web content to be added to a GraphicsView. + \brief The QGraphicsWebView class allows web content to be added to a GraphicsView. \since 4.6 - An instance of this class renders Web content from a URL or supplied as data, using - features of the QtWebKit module. - - If the width and height of the item is not set, they will dynamically adjust to - a size appropriate for the content. This width may be large (e.g., 980 pixels or - more) for typical online Web pages. - - \section1 Browser Features - - Many of the functions, signals and properties provided by QWebView are also available - for this item, making it simple to adapt existing code to use QGraphicsWebView instead - of QWebView. - - The item uses a QWebPage object to perform the rendering of Web content, and this can - be obtained with the page() function, enabling the document itself to be accessed and - modified. - - As with QWebView, the item records the browsing history using a QWebHistory object, - accessible using the history() function. The QWebSettings object that defines the - configuration of the browser can be obtained with the settings() function, enabling - features like plugin support to be customized for each item. - - \sa QWebView, QGraphicsTextItem -*/ - -/*! - \fn void QGraphicsWebView::titleChanged(const QString &title) - - This signal is emitted whenever the \a title of the main frame changes. - - \sa title() -*/ - -/*! - \fn void QGraphicsWebView::urlChanged(const QUrl &url) - - This signal is emitted when the \a url of the view changes. - - \sa url(), load() -*/ - -/*! - \fn void QGraphicsWebView::statusChanged() + A WebGraphicsItem renders web content based on a URL or set data. - This signal is emitted when the status bar text is changed by the page. + If the width and height of the item is not set, they will + dynamically adjust to a size appropriate for the content. + This width may be large (eg. 980) for typical online web pages. */ /*! - \fn void QGraphicsWebView::iconChanged() - - This signal is emitted whenever the icon of the page is loaded or changes. - - In order for icons to be loaded, you will need to set an icon database path - using QWebSettings::setIconDatabasePath(). - - \sa icon(), QWebSettings::setIconDatabasePath() -*/ - -/*! - \fn void QGraphicsWebView::loadStarted() - - This signal is emitted when a new load of the page is started. - - \sa progressChanged(), loadFinished() -*/ - -/*! - \fn void QGraphicsWebView::loadFinished(bool ok) - - This signal is emitted when a load of the page is finished. - \a ok will indicate whether the load was successful or any error occurred. - - \sa loadStarted() -*/ - -/*! - \fn void QGraphicsWebView::progressChanged(qreal progress) - - This signal is emitted every time an element in the web page - completes loading and the overall loading progress advances. - - This signal tracks the progress of all child frames. - - The current value is provided by \a progress and scales from 0.0 to 1.0, - which is the default range of QProgressBar. - - \sa loadStarted(), loadFinished() -*/ - - - -/*! Constructs an empty QGraphicsWebView with parent \a parent. \sa load() @@ -254,7 +180,7 @@ QGraphicsWebView::QGraphicsWebView(QGraphicsItem* parent) } /*! - Destroys the item. + Destroys the web graphicsitem. */ QGraphicsWebView::~QGraphicsWebView() { diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp index 17a0118..438228c 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp @@ -471,7 +471,9 @@ QString QWebFrame::toPlainText() const d->frame->view()->layout(); Element *documentElement = d->frame->document()->documentElement(); - return documentElement->innerText(); + if (documentElement) + return documentElement->innerText(); + return QString(); } /*! diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp index d4a491b..d8ead16 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp @@ -153,6 +153,7 @@ public: virtual void scroll(int dx, int dy, const QRect&); virtual void update(const QRect& dirtyRect); virtual void setInputMethodEnabled(bool enable); + virtual bool inputMethodEnabled() const; #if QT_VERSION >= 0x040600 virtual void setInputMethodHint(Qt::InputMethodHint hint, bool enable); #endif @@ -185,6 +186,12 @@ void QWebPageWidgetClient::setInputMethodEnabled(bool enable) { view->setAttribute(Qt::WA_InputMethodEnabled, enable); } + +bool QWebPageWidgetClient::inputMethodEnabled() const +{ + return view->testAttribute(Qt::WA_InputMethodEnabled); +} + #if QT_VERSION >= 0x040600 void QWebPageWidgetClient::setInputMethodHint(Qt::InputMethodHint hint, bool enable) { @@ -857,13 +864,13 @@ void QWebPagePrivate::mouseReleaseEvent(QGraphicsSceneMouseEvent* ev) void QWebPagePrivate::handleSoftwareInputPanel(Qt::MouseButton button) { #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) - if (q->view() && q->view()->testAttribute(Qt::WA_InputMethodEnabled) + if (client && client->inputMethodEnabled() && button == Qt::LeftButton && qApp->autoSipEnabled()) { QStyle::RequestSoftwareInputPanel behavior = QStyle::RequestSoftwareInputPanel( - q->view()->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel)); + client->ownerWidget()->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel)); if (!clickCausedFocus || behavior == QStyle::RSIP_OnMouseClick) { QEvent event(QEvent::RequestSoftwareInputPanel); - QApplication::sendEvent(q->view(), &event); + QApplication::sendEvent(client->ownerWidget(), &event); } } diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp index 55ce1f7..9edec36 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp @@ -759,8 +759,12 @@ void QWebView::paintEvent(QPaintEvent *ev) } /*! - This function is called whenever WebKit wants to create a new window of the given \a type, for example as a result of - a JavaScript request to open a document in a new window. + This function is called from the createWindow() method of the associated QWebPage, + each time the page wants to create a new window of the given \a type. This might + be the result, for example, of a JavaScript request to open a document in a new window. + + \note If the createWindow() method of the associated page is reimplemented, this + method is not called, unless explicitly done so in the reimplementation. \sa QWebPage::createWindow() */ @@ -974,7 +978,7 @@ void QWebView::changeEvent(QEvent *e) /*! \fn void QWebView::statusBarMessage(const QString& text) - This signal is emitted when the status bar \a text is changed by the page. + This signal is emitted when the statusbar \a text is changed by the page. */ /*! |