summaryrefslogtreecommitdiffstats
path: root/WebKit/qt
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/qt')
-rw-r--r--WebKit/qt/Api/qgraphicswebview.cpp21
-rw-r--r--WebKit/qt/Api/qwebhistory.cpp2
-rw-r--r--WebKit/qt/Api/qwebpage.cpp78
-rw-r--r--WebKit/qt/ChangeLog200
-rw-r--r--WebKit/qt/WebCoreSupport/ChromeClientQt.cpp6
-rw-r--r--WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp25
-rw-r--r--WebKit/qt/WebCoreSupport/PageClientQt.cpp19
-rw-r--r--WebKit/qt/WebCoreSupport/PageClientQt.h5
-rw-r--r--WebKit/qt/symbian/bwins/QtWebKitu.def1
-rw-r--r--WebKit/qt/symbian/eabi/QtWebKitu.def47
-rw-r--r--WebKit/qt/tests/qwebframe/tst_qwebframe.cpp37
-rw-r--r--WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp21
-rw-r--r--WebKit/qt/tests/qwebpage/tst_qwebpage.cpp92
13 files changed, 456 insertions, 98 deletions
diff --git a/WebKit/qt/Api/qgraphicswebview.cpp b/WebKit/qt/Api/qgraphicswebview.cpp
index 904201e..178f5c2 100644
--- a/WebKit/qt/Api/qgraphicswebview.cpp
+++ b/WebKit/qt/Api/qgraphicswebview.cpp
@@ -60,8 +60,6 @@ public:
void syncLayers();
void updateResizesToContentsForPage();
- virtual QRectF graphicsItemVisibleRect() const;
-
void detachCurrentPage();
@@ -157,25 +155,6 @@ void QGraphicsWebViewPrivate::_q_scaleChanged()
#endif
}
-QRectF QGraphicsWebViewPrivate::graphicsItemVisibleRect() const
-{
- if (!q->scene())
- return QRectF();
- QList<QGraphicsView*> views = q->scene()->views();
- if (views.size() > 1) {
-#ifndef QT_NO_DEBUG_STREAM
- qDebug() << "QGraphicsWebView is in more than one graphics views, unable to compute the visible rect";
-#endif
- return QRectF();
- }
- if (views.size() < 1)
- return QRectF();
-
- int xPosition = views[0]->horizontalScrollBar()->value();
- int yPosition = views[0]->verticalScrollBar()->value();
- return q->mapRectFromScene(QRectF(QPoint(xPosition, yPosition), views[0]->viewport()->size()));
-}
-
/*!
\class QGraphicsWebView
\brief The QGraphicsWebView class allows Web content to be added to a GraphicsView.
diff --git a/WebKit/qt/Api/qwebhistory.cpp b/WebKit/qt/Api/qwebhistory.cpp
index d852012..06e6cfa 100644
--- a/WebKit/qt/Api/qwebhistory.cpp
+++ b/WebKit/qt/Api/qwebhistory.cpp
@@ -540,6 +540,8 @@ QDataStream& operator>>(QDataStream& source, QWebHistory& history)
d->lst->addItem(item);
}
d->lst->removeItem(nullItem);
+ // Update the HistoryController.
+ history.d->lst->page()->mainFrame()->loader()->history()->setCurrentItem(history.d->lst->entries()[currentIndex].get());
history.goToItem(history.itemAt(currentIndex));
}
}
diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index 3810155..1ae8e35 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -272,7 +272,7 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
contextMenuClient = new ContextMenuClientQt();
editorClient = new EditorClientQt(q);
page = new Page(chromeClient, contextMenuClient, editorClient,
- new DragClientQt(q), new InspectorClientQt(q), 0, 0);
+ new DragClientQt(q), new InspectorClientQt(q), 0, 0, 0);
settings = new QWebSettings(page->settings());
@@ -1369,7 +1369,7 @@ QVariant QWebPage::inputMethodQuery(Qt::InputMethodQuery property) const
RefPtr<Range> range = editor->compositionRange();
return QVariant(renderTextControl->selectionEnd() - TextIterator::rangeLength(range.get()));
}
- return QVariant(renderTextControl->selectionEnd());
+ return QVariant(frame->selection()->extent().offsetInContainerNode());
}
return QVariant();
}
@@ -1401,7 +1401,7 @@ QVariant QWebPage::inputMethodQuery(Qt::InputMethodQuery property) const
RefPtr<Range> range = editor->compositionRange();
return QVariant(renderTextControl->selectionStart() - TextIterator::rangeLength(range.get()));
}
- return QVariant(renderTextControl->selectionStart());
+ return QVariant(frame->selection()->base().offsetInContainerNode());
}
return QVariant();
}
@@ -3180,12 +3180,37 @@ QString QWebPage::userAgentForUrl(const QUrl&) const
#elif defined Q_WS_X11
"X11"
#elif defined Q_OS_SYMBIAN
- "SymbianOS"
+ "Symbian"
#else
"Unknown"
#endif
);
+#if defined Q_OS_SYMBIAN
+ QSysInfo::SymbianVersion symbianVersion = QSysInfo::symbianVersion();
+ switch (symbianVersion) {
+ case QSysInfo::SV_9_2:
+ firstPartTemp += QString::fromLatin1("OS/9.2");
+ break;
+ case QSysInfo::SV_9_3:
+ firstPartTemp += QString::fromLatin1("OS/9.3");
+ break;
+ case QSysInfo::SV_9_4:
+ firstPartTemp += QString::fromLatin1("OS/9.4");
+ break;
+ case QSysInfo::SV_SF_2:
+ firstPartTemp += QString::fromLatin1("/2");
+ break;
+ case QSysInfo::SV_SF_3:
+ firstPartTemp += QString::fromLatin1("/3");
+ break;
+ case QSysInfo::SV_SF_4:
+ firstPartTemp += QString::fromLatin1("/4");
+ default:
+ break;
+ }
+#endif
+
firstPartTemp += QString::fromLatin1("; ");
// SSL support
@@ -3309,51 +3334,22 @@ QString QWebPage::userAgentForUrl(const QUrl&) const
firstPartTemp += QString::fromLatin1("Sun Solaris");
#elif defined Q_OS_ULTRIX
firstPartTemp += QString::fromLatin1("DEC Ultrix");
-#elif defined Q_OS_SYMBIAN
- firstPartTemp += QString::fromLatin1("SymbianOS");
- QSysInfo::SymbianVersion symbianVersion = QSysInfo::symbianVersion();
- switch (symbianVersion) {
- case QSysInfo::SV_9_2:
- firstPartTemp += QString::fromLatin1("/9.2");
- break;
- case QSysInfo::SV_9_3:
- firstPartTemp += QString::fromLatin1("/9.3");
- break;
- case QSysInfo::SV_9_4:
- firstPartTemp += QString::fromLatin1("/9.4");
- break;
- case QSysInfo::SV_SF_2:
- firstPartTemp += QString::fromLatin1("^2");
- break;
- case QSysInfo::SV_SF_3:
- firstPartTemp += QString::fromLatin1("^3");
- break;
- case QSysInfo::SV_SF_4:
- firstPartTemp += QString::fromLatin1("^4");
- break;
- default:
- firstPartTemp += QString::fromLatin1("/Unknown");
- }
-
-#if defined Q_WS_S60
+#elif defined Q_WS_S60
firstPartTemp += QLatin1Char(' ');
- firstPartTemp += QString::fromLatin1("Series60");
QSysInfo::S60Version s60Version = QSysInfo::s60Version();
switch (s60Version) {
case QSysInfo::SV_S60_3_1:
- firstPartTemp += QString::fromLatin1("/3.1");
+ firstPartTemp += QString::fromLatin1("Series60/3.1");
break;
case QSysInfo::SV_S60_3_2:
- firstPartTemp += QString::fromLatin1("/3.2");
+ firstPartTemp += QString::fromLatin1("Series60/3.2");
break;
case QSysInfo::SV_S60_5_0:
- firstPartTemp += QString::fromLatin1("/5.0");
+ firstPartTemp += QString::fromLatin1("Series60/5.0");
break;
default:
- firstPartTemp += QString::fromLatin1("/Unknown");
+ break;
}
-#endif
-
#elif defined Q_OS_UNIX
firstPartTemp += QString::fromLatin1("UNIX BSD/SYSV system");
#elif defined Q_OS_UNIXWARE
@@ -3383,8 +3379,8 @@ QString QWebPage::userAgentForUrl(const QUrl&) const
QString thirdPartTemp;
thirdPartTemp.reserve(150);
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
- thirdPartTemp + QLatin1String(" Mobile Safari/");
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
+ thirdPartTemp += QLatin1String(" Mobile Safari/");
#else
thirdPartTemp += QLatin1String(" Safari/");
#endif
@@ -3402,7 +3398,7 @@ QString QWebPage::userAgentForUrl(const QUrl&) const
languageName = d->client->ownerWidget()->locale().name();
else
languageName = QLocale().name();
- languageName[2] = QLatin1Char('-');
+ languageName.replace(QLatin1Char('_'), QLatin1Char('-'));
// Application name/version
QString appName = QCoreApplication::applicationName();
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index e5fabd8..bc1f45d 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,203 @@
+2010-05-23 Noam Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] GraphicsLayer: The rocket animation doesn't scroll together with the page
+ https://bugs.webkit.org/show_bug.cgi?id=39517
+
+ A previous fix to this issue was overridden by the PageClientQt refactor. Reapplying.
+
+ * WebCoreSupport/PageClientQt.cpp:
+ (WebCore::PageClientQGraphicsWidget::update):
+
+2010-05-23 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Update the Symbian version for the user agent
+ https://bugs.webkit.org/show_bug.cgi?id=38389
+
+ Fixes a regression introduced by r58648. Ensure that the "Symbian" string
+ is only listed one time in the User Agent string.
+
+ In addition make an effort to align the User Agent string to already
+ released WebKit based products for Symbian.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::userAgentForUrl):
+
+2010-05-21 Steve Block <steveblock@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ Add DeviceOrientation and DeviceOrientationClient
+ https://bugs.webkit.org/show_bug.cgi?id=39479
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+
+2010-05-21 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Symbian build fix.
+
+ [Qt] Updated the wins def file with one new export.
+
+ The DRT symbols are still missing, but I can't build DRT ;(
+
+ * symbian/bwins/QtWebKitu.def:
+
+2010-05-20 Janne Koskinen <janne.p.koskinen@digia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] WINSCW compile fix for qwebframe test
+ https://bugs.webkit.org/show_bug.cgi?id=38722
+
+ WINSCW cannot determine template type up the hierarchy
+ to common base class.
+
+ * tests/qwebframe/tst_qwebframe.cpp:
+
+2010-05-20 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Remove unused "old style" private APIs
+
+ These symbols were introduced after QtWebKit v4.6
+ so no-one should be using them
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+
+2010-05-20 Rajiv Ramanasankaran <rajiv.ramanasankaran@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] QWebPage::inputMethodQuery() returns wrong values for Qt::ImCursorPosition, Qt::ImAnchorPosition
+ https://bugs.webkit.org/show_bug.cgi?id=38779
+
+ The earlier implementation was written with the assumption that in this scenario the
+ anchor position always corresponds to the START index and that the current cursor position
+ always corresponds to the END index in WebKit.
+
+ Updated the implementation of QWebPage::inputMethodQuery(Qt::ImCursorPosition) and
+ QWebPage::inputMethodQuery(Qt::ImAnchorPosition) for the case where the Editor is not in
+ composition mode. In the non-composition mode, the Anchor and the Current cursor positions
+ correspond to the Base and Extent position offsets in WebKit.
+
+ Also added the auto-tests for the RIGHT to LEFT and LEFT to RIGHT selections.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::inputMethodQuery): Now returning correct values for Qt::ImCursorPosition and
+ Qt::ImAnchorPosition when the Editor is not in composition mode.
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::inputMethods): Added auto-tests for RIGHT to LEFT and LEFT to RIGHT selections
+
+2010-05-20 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Skipping popup focus test for maemo
+ https://bugs.webkit.org/show_bug.cgi?id=39314
+
+ Skipping popup focus test for maemo in qwebframe auto test.
+
+ The test method tst_QWebFrame::popupFocus() was testing popup focus AND input
+ field focus. The input field focus has been removed from the method popupFocus()
+ and a new test method named inputFieldFocus() has been added. Finally the test
+ method popupFocus() has been skipped for maemo.
+
+ * tests/qwebframe/tst_qwebframe.cpp:
+
+2010-05-19 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Crash fix in the HistoryController.
+
+ The problem was casued by a documented feature of the QWebFrame::setHtml().
+ The method doesn't affect a browsing history (doesn't create a HistoryItem instance), so
+ m_currentItem and m_previousItem are not set.
+
+ A null check was added.
+
+ [Qt] The QWebPage crashes on history.pushState().
+ https://bugs.webkit.org/show_bug.cgi?id=38840
+
+ * tests/qwebhistory/tst_qwebhistory.cpp:
+ (tst_QWebHistory::popPushState_data):
+ (tst_QWebHistory::popPushState):
+
+2010-05-19 Antti Koivisto <koivisto@iki.fi>
+
+ Rubber-stamped by Kenneth Rohde Christiansen.
+
+ [Qt] TiledBackingStore updates broken when not using resizesToContents mode
+ https://bugs.webkit.org/show_bug.cgi?id=39359
+
+ Put the back logic that was lost in refactoring.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::visibleRectForTiledBackingStore):
+ * WebCoreSupport/PageClientQt.cpp:
+ (WebCore::PageClientQGraphicsWidget::graphicsItemVisibleRect):
+ * WebCoreSupport/PageClientQt.h:
+ (WebCore::PageClientQWidget::viewResizesToContentsEnabled):
+ (WebCore::PageClientQGraphicsWidget::viewResizesToContentsEnabled):
+
+2010-05-19 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Symbian build fix.
+
+ [Qt] Updated the def file with exports needed for DumpRenderTree.
+
+ * symbian/eabi/QtWebKitu.def:
+
+2010-05-19 Denis Dzyubenko <denis.dzyubenko@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ When creating the UA, do not sassmue the language code is a
+ two-letter iso639-1 code.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::userAgentForUrl):
+
+2010-05-18 Antti Koivisto <koivisto@iki.fi>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Move visible rect calculation from QGraphicsWebViewPrivate to PageClientQGraphicsWidget
+ https://bugs.webkit.org/show_bug.cgi?id=39294
+
+ * Api/qgraphicswebview.cpp:
+ * WebCoreSupport/PageClientQt.cpp:
+ (WebCore::PageClientQGraphicsWidget::graphicsItemVisibleRect):
+ * WebCoreSupport/PageClientQt.h:
+
+2010-05-18 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Symbian build fix.
+
+ [Qt] Updated the def file with new exports after r59335.
+
+ * symbian/eabi/QtWebKitu.def:
+
+2010-05-18 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Fix QWebHistory serialization.
+
+ Regression was caused by bug 33224. The streaming function
+ should generate a documentSequenceNumber for all loaded values.
+
+ [Qt] tst_QWebHistory::serialize_2() fails
+ https://bugs.webkit.org/show_bug.cgi?id=37322
+
+ * Api/qwebhistory.cpp:
+ (operator>>):
+
2010-05-17 Tasuku Suzuki <tasuku.suzuki@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index 1c475b3..bcb07ee 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -571,8 +571,12 @@ bool ChromeClientQt::allowsAcceleratedCompositing() const
#if ENABLE(TILED_BACKING_STORE)
IntRect ChromeClientQt::visibleRectForTiledBackingStore() const
{
- if (!platformPageClient())
+ if (!platformPageClient() || !m_webPage)
return IntRect();
+
+ if (!platformPageClient()->viewResizesToContentsEnabled())
+ return QRect(m_webPage->mainFrame()->scrollPosition(), m_webPage->mainFrame()->geometry().size());
+
return enclosingIntRect(FloatRect(platformPageClient()->graphicsItemVisibleRect()));
}
#endif
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index 6e59a20..9d335b8 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -604,27 +604,6 @@ void QWEBKIT_EXPORT qt_dump_resource_load_callbacks(bool b)
DumpRenderTreeSupportQt::dumpResourceLoadCallbacks(b);
}
-void QWEBKIT_EXPORT qt_dump_resource_load_callbacks_path(const QString& path)
-{
- DumpRenderTreeSupportQt::dumpResourceLoadCallbacksPath(path);
-}
-
-void QWEBKIT_EXPORT qt_set_will_send_request_returns_null_on_redirect(bool b)
-{
- DumpRenderTreeSupportQt::setWillSendRequestReturnsNullOnRedirect(b);
-
-}
-
-void QWEBKIT_EXPORT qt_set_will_send_request_returns_null(bool b)
-{
- DumpRenderTreeSupportQt::setWillSendRequestReturnsNull(b);
-}
-
-void QWEBKIT_EXPORT qt_set_will_send_request_clear_headers(const QStringList& headers)
-{
- DumpRenderTreeSupportQt::setWillSendRequestClearHeaders(headers);
-}
-
void QWEBKIT_EXPORT qt_dump_editing_callbacks(bool b)
{
DumpRenderTreeSupportQt::dumpEditingCallbacks(b);
@@ -635,7 +614,3 @@ void QWEBKIT_EXPORT qt_dump_set_accepts_editing(bool b)
DumpRenderTreeSupportQt::dumpSetAcceptsEditing(b);
}
-void QWEBKIT_EXPORT qt_dump_notification(bool b)
-{
- DumpRenderTreeSupportQt::dumpNotification(b);
-}
diff --git a/WebKit/qt/WebCoreSupport/PageClientQt.cpp b/WebKit/qt/WebCoreSupport/PageClientQt.cpp
index e19f44f..4ccf34a 100644
--- a/WebKit/qt/WebCoreSupport/PageClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/PageClientQt.cpp
@@ -132,6 +132,8 @@ void PageClientQGraphicsWidget::update(const QRect& dirtyRect)
overlay->update(QRectF(dirtyRect));
#if USE(ACCELERATED_COMPOSITING)
syncLayers();
+ // This might be a slow-scroll. We ensure that the compositing layers are in the right position.
+ updateCompositingScrollPosition();
#endif
}
@@ -288,6 +290,23 @@ QRect PageClientQGraphicsWidget::geometryRelativeToOwnerWidget() const
return graphicsView->mapFromScene(view->boundingRect()).boundingRect();
}
+#if ENABLE(TILED_BACKING_STORE)
+QRectF PageClientQGraphicsWidget::graphicsItemVisibleRect() const
+{
+ if (!view->scene())
+ return QRectF();
+
+ QList<QGraphicsView*> views = view->scene()->views();
+ if (views.isEmpty())
+ return QRectF();
+
+ QGraphicsView* graphicsView = views.at(0);
+ int xOffset = graphicsView->horizontalScrollBar()->value();
+ int yOffset = graphicsView->verticalScrollBar()->value();
+ return view->mapRectFromScene(QRectF(QPointF(xOffset, yOffset), graphicsView->viewport()->size()));
+}
+#endif
+
QObject* PageClientQGraphicsWidget::pluginParent() const
{
return view;
diff --git a/WebKit/qt/WebCoreSupport/PageClientQt.h b/WebKit/qt/WebCoreSupport/PageClientQt.h
index 9341b19..6dab4e1 100644
--- a/WebKit/qt/WebCoreSupport/PageClientQt.h
+++ b/WebKit/qt/WebCoreSupport/PageClientQt.h
@@ -76,6 +76,8 @@ public:
virtual QObject* pluginParent() const;
virtual QStyle* style() const;
+
+ virtual bool viewResizesToContentsEnabled() const { return false; }
QWidget* view;
};
@@ -161,10 +163,13 @@ public:
virtual QStyle* style() const;
+ virtual bool viewResizesToContentsEnabled() const { return viewResizesToContents; }
+
void createOrDeleteOverlay();
#if ENABLE(TILED_BACKING_STORE)
void updateTiledBackingStoreScale();
+ virtual QRectF graphicsItemVisibleRect() const;
#endif
#if USE(ACCELERATED_COMPOSITING)
diff --git a/WebKit/qt/symbian/bwins/QtWebKitu.def b/WebKit/qt/symbian/bwins/QtWebKitu.def
index 729b97c..0f4e4b2 100644
--- a/WebKit/qt/symbian/bwins/QtWebKitu.def
+++ b/WebKit/qt/symbian/bwins/QtWebKitu.def
@@ -649,4 +649,5 @@ EXPORTS
?setInspectorUrl@QWebSettings@@QAEXABVQUrl@@@Z @ 648 NONAME ABSENT ; void QWebSettings::setInspectorUrl(class QUrl const &)
?setResizesToContents@QGraphicsWebView@@QAEX_N@Z @ 649 NONAME ; void QGraphicsWebView::setResizesToContents(bool)
?setTiledBackingStoreFrozen@QGraphicsWebView@@QAEX_N@Z @ 650 NONAME ; void QGraphicsWebView::setTiledBackingStoreFrozen(bool)
+ ?qtwebkit_webframe_scrollOverflow@@YA_NPAVQWebFrame@@HHABVQPoint@@@Z @ 651 NONAME ; bool qtwebkit_webframe_scrollOverflow(QWebFrame *, int, int, const QPoint&)
diff --git a/WebKit/qt/symbian/eabi/QtWebKitu.def b/WebKit/qt/symbian/eabi/QtWebKitu.def
index a9c2825..203261a 100644
--- a/WebKit/qt/symbian/eabi/QtWebKitu.def
+++ b/WebKit/qt/symbian/eabi/QtWebKitu.def
@@ -723,3 +723,50 @@ EXPORTS
_ZN23DumpRenderTreeSupportQt19webPageSetGroupNameEP8QWebPageRK7QString @ 722 NONAME
_ZN23DumpRenderTreeSupportQt16webPageGroupNameEP8QWebPage @ 723 NONAME
_ZN23DumpRenderTreeSupportQt23garbageCollectorCollectEv @ 724 NONAME
+ _Z32qtwebkit_webframe_scrollOverflowP9QWebFrameiiRK6QPoint @ 725 NONAME
+ _ZN23DumpRenderTreeSupportQt12setMediaTypeEP9QWebFrameRK7QString @ 726 NONAME
+ _ZN23DumpRenderTreeSupportQt13numberOfPagesEP9QWebFrameff @ 727 NONAME
+ _ZN23DumpRenderTreeSupportQt13selectedRangeEP8QWebPage @ 728 NONAME
+ _ZN23DumpRenderTreeSupportQt14clearFrameNameEP9QWebFrame @ 729 NONAME
+ _ZN23DumpRenderTreeSupportQt14pauseAnimationEP9QWebFrameRK7QStringdS4_ @ 730 NONAME
+ _ZN23DumpRenderTreeSupportQt15dumpFrameLoaderEb @ 731 NONAME
+ _ZN23DumpRenderTreeSupportQt16dumpNotificationEb @ 732 NONAME
+ _ZN23DumpRenderTreeSupportQt16isCommandEnabledEP8QWebPageRK7QString @ 733 NONAME
+ _ZN23DumpRenderTreeSupportQt16webInspectorShowEP8QWebPage @ 734 NONAME
+ _ZN23DumpRenderTreeSupportQt17pauseSVGAnimationEP9QWebFrameRK7QStringdS4_ @ 735 NONAME
+ _ZN23DumpRenderTreeSupportQt17webInspectorCloseEP8QWebPage @ 736 NONAME
+ _ZN23DumpRenderTreeSupportQt17workerThreadCountEv @ 737 NONAME
+ _ZN23DumpRenderTreeSupportQt18hasDocumentElementEP9QWebFrame @ 738 NONAME
+ _ZN23DumpRenderTreeSupportQt20dumpEditingCallbacksEb @ 739 NONAME
+ _ZN23DumpRenderTreeSupportQt21markerTextForListItemERK11QWebElement @ 740 NONAME
+ _ZN23DumpRenderTreeSupportQt22javaScriptObjectsCountEv @ 741 NONAME
+ _ZN23DumpRenderTreeSupportQt23setCaretBrowsingEnabledEP8QWebPageb @ 742 NONAME
+ _ZN23DumpRenderTreeSupportQt24executeCoreCommandByNameEP8QWebPageRK7QStringS4_ @ 743 NONAME
+ _ZN23DumpRenderTreeSupportQt21dumpSetAcceptsEditingEb @744 NONAME
+ _ZN23DumpRenderTreeSupportQt22resumeActiveDOMObjectsEP9QWebFrame @745 NONAME
+ _ZN23DumpRenderTreeSupportQt23suspendActiveDOMObjectsEP9QWebFrame @746 NONAME
+ _ZN23DumpRenderTreeSupportQt24numberOfActiveAnimationsEP9QWebFrame @747 NONAME
+ _ZN23DumpRenderTreeSupportQt24pageNumberForElementByIdEP9QWebFrameRK7QStringff @748 NONAME
+ _ZN23DumpRenderTreeSupportQt25dumpResourceLoadCallbacksEb @749 NONAME
+ _ZN23DumpRenderTreeSupportQt25pauseTransitionOfPropertyEP9QWebFrameRK7QStringdS4_ @750 NONAME
+ _ZN23DumpRenderTreeSupportQt25setFrameFlatteningEnabledEP8QWebPageb @751 NONAME
+ _ZN23DumpRenderTreeSupportQt25webInspectorExecuteScriptEP8QWebPagelRK7QString @752 NONAME
+ _ZN23DumpRenderTreeSupportQt25whiteListAccessFromOriginERK7QStringS2_S2_b @753 NONAME
+ _ZN23DumpRenderTreeSupportQt26counterValueForElementByIdEP9QWebFrameRK7QString @754 NONAME
+ _ZN23DumpRenderTreeSupportQt26firstRectForCharacterRangeEP8QWebPageii @755 NONAME
+ _ZN23DumpRenderTreeSupportQt26overwritePluginDirectoriesEv @756 NONAME
+ _ZN23DumpRenderTreeSupportQt27resetOriginAccessWhiteListsEv @757 NONAME
+ _ZN23DumpRenderTreeSupportQt27setSmartInsertDeleteEnabledEP8QWebPageb @758 NONAME
+ _ZN23DumpRenderTreeSupportQt27setTimelineProfilingEnabledEP8QWebPageb @759 NONAME
+ _ZN23DumpRenderTreeSupportQt28setDumpRenderTreeModeEnabledEb @760 NONAME
+ _ZN23DumpRenderTreeSupportQt29dumpResourceLoadCallbacksPathERK7QString @761 NONAME
+ _ZN23DumpRenderTreeSupportQt29evaluateScriptInIsolatedWorldEP9QWebFrameiRK7QString @762 NONAME
+ _ZN23DumpRenderTreeSupportQt29setJavaScriptProfilingEnabledEP9QWebFrameb @763 NONAME
+ _ZN23DumpRenderTreeSupportQt29setWillSendRequestReturnsNullEb @764 NONAME
+ _ZN23DumpRenderTreeSupportQt30setWillSendRequestClearHeadersERK11QStringList @765 NONAME
+ _ZN23DumpRenderTreeSupportQt33computedStyleIncludingVisitedInfoERK11QWebElement @766 NONAME
+ _ZN23DumpRenderTreeSupportQt34setSelectTrailingWhitespaceEnabledEP8QWebPageb @767 NONAME
+ _ZN23DumpRenderTreeSupportQt39elementDoesAutoCompleteForElementWithIdEP9QWebFrameRK7QString @768 NONAME
+ _ZN23DumpRenderTreeSupportQt39setWillSendRequestReturnsNullOnRedirectEb @769 NONAME
+ _ZN23DumpRenderTreeSupportQt40garbageCollectorCollectOnAlternateThreadEb @770 NONAME
+ _ZN23DumpRenderTreeSupportQt40setDomainRelaxationForbiddenForURLSchemeEbRK7QString @771 NONAME
diff --git a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
index bea7a67..76fdba3 100644
--- a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
+++ b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
@@ -600,7 +600,12 @@ private slots:
void setHtmlWithBaseURL();
void ipv6HostEncoding();
void metaData();
+#if !defined(Q_WS_MAEMO_5)
+ // as maemo 5 does not use QComboBoxes to implement the popups
+ // this test does not make sense for it.
void popupFocus();
+#endif
+ void inputFieldFocus();
void hitTestContent();
void jsByteArray();
void ownership();
@@ -686,13 +691,13 @@ private:
QWebView* m_view;
QWebPage* m_page;
MyQObject* m_myObject;
- QWebView* m_popupTestView;
- int m_popupTestPaintCount;
+ QWebView* m_inputFieldsTestView;
+ int m_inputFieldTestPaintCount;
};
tst_QWebFrame::tst_QWebFrame()
: sTrue("true"), sFalse("false"), sUndefined("undefined"), sArray("array"), sFunction("function"), sError("error"),
- sString("string"), sObject("object"), sNumber("number"), m_popupTestView(0), m_popupTestPaintCount(0)
+ sString("string"), sObject("object"), sNumber("number"), m_inputFieldsTestView(0), m_inputFieldTestPaintCount(0)
{
}
@@ -702,10 +707,10 @@ tst_QWebFrame::~tst_QWebFrame()
bool tst_QWebFrame::eventFilter(QObject* watched, QEvent* event)
{
- // used on the popupFocus test
- if (watched == m_popupTestView) {
+ // used on the inputFieldFocus test
+ if (watched == m_inputFieldsTestView) {
if (event->type() == QEvent::Paint)
- m_popupTestPaintCount++;
+ m_inputFieldTestPaintCount++;
}
return QObject::eventFilter(watched, event);
}
@@ -780,7 +785,7 @@ void tst_QWebFrame::getSetStaticProperty()
QCOMPARE(vm.size(), 3);
QCOMPARE(vm.value("a").toInt(), 123);
QCOMPARE(vm.value("b").toString(), QLatin1String("foo"));
- QCOMPARE(vm.value("c").value<QObject*>(), m_myObject);
+ QCOMPARE(vm.value("c").value<QObject*>(), static_cast<QObject*>(m_myObject));
}
QCOMPARE(evalJS("myObject.variantMapProperty.a === 123"), sTrue);
QCOMPARE(evalJS("myObject.variantMapProperty.b === 'foo'"), sTrue);
@@ -2549,6 +2554,7 @@ void tst_QWebFrame::metaData()
QCOMPARE(metaData.value("nonexistant"), QString());
}
+#if !defined(Q_WS_MAEMO_5)
void tst_QWebFrame::popupFocus()
{
QWebView view;
@@ -2580,16 +2586,27 @@ void tst_QWebFrame::popupFocus()
// hide the popup and check if focus is on the page
combo->hidePopup();
QTRY_VERIFY(view.hasFocus() && !combo->view()->hasFocus()); // Focus should be back on the WebView
+}
+#endif
+
+void tst_QWebFrame::inputFieldFocus()
+{
+ QWebView view;
+ view.setHtml("<html><body><input type=\"text\"></input></body></html>");
+ view.resize(400, 100);
+ view.show();
+ view.setFocus();
+ QTRY_VERIFY(view.hasFocus());
// double the flashing time, should at least blink once already
int delay = qApp->cursorFlashTime() * 2;
// focus the lineedit and check if it blinks
- QTest::mouseClick(&view, Qt::LeftButton, 0, QPoint(200, 25));
- m_popupTestView = &view;
+ QTest::mouseClick(&view, Qt::LeftButton, 0, QPoint(25, 25));
+ m_inputFieldsTestView = &view;
view.installEventFilter( this );
QTest::qWait(delay);
- QVERIFY2(m_popupTestPaintCount >= 3,
+ QVERIFY2(m_inputFieldTestPaintCount >= 3,
"The input field should have a blinking caret");
}
diff --git a/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp b/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp
index e967dcc..49a606b 100644
--- a/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp
+++ b/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp
@@ -59,6 +59,8 @@ private slots:
void saveAndRestore_crash_1();
void saveAndRestore_crash_2();
void saveAndRestore_crash_3();
+ void popPushState_data();
+ void popPushState();
void clear();
@@ -349,6 +351,25 @@ void tst_QWebHistory::saveAndRestore_crash_3()
delete page2;
}
+void tst_QWebHistory::popPushState_data()
+{
+ QTest::addColumn<QString>("script");
+ QTest::newRow("pushState") << "history.pushState(123, \"foo\");";
+ QTest::newRow("replaceState") << "history.replaceState(\"a\", \"b\");";
+ QTest::newRow("back") << "history.back();";
+ QTest::newRow("forward") << "history.forward();";
+ QTest::newRow("clearState") << "history.clearState();";
+}
+
+/** Crash test, WebKit bug 38840 (https://bugs.webkit.org/show_bug.cgi?id=38840) */
+void tst_QWebHistory::popPushState()
+{
+ QFETCH(QString, script);
+ QWebPage page;
+ page.mainFrame()->setHtml("<html><body>long live Qt!</body></html>");
+ page.mainFrame()->evaluateJavaScript(script);
+}
+
/** ::clear */
void tst_QWebHistory::clear()
{
diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index bbbfe09..ceb8aff 100644
--- a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -1494,6 +1494,98 @@ void tst_QWebPage::inputMethods()
QCOMPARE(value, QString("QtWebKit"));
#endif
+ // Cancel current composition first
+ inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 0, 0, QVariant());
+ QInputMethodEvent eventSelection4("", inputAttributes);
+ page->event(&eventSelection4);
+
+ // START - Tests for Selection when the Editor is NOT in Composition mode
+
+ // LEFT to RIGHT selection
+ // Deselect the selection by sending MouseButtonPress events
+ // This moves the current cursor to the end of the text
+ page->event(&evpres);
+ page->event(&evrel);
+
+ //Move to the start of the line
+ page->triggerAction(QWebPage::MoveToStartOfLine);
+
+ QKeyEvent keyRightEventPress(QEvent::KeyPress, Qt::Key_Right, Qt::NoModifier);
+ QKeyEvent keyRightEventRelease(QEvent::KeyRelease, Qt::Key_Right, Qt::NoModifier);
+
+ //Move 2 characters RIGHT
+ for (int j = 0; j < 2; ++j) {
+ page->event(&keyRightEventPress);
+ page->event(&keyRightEventRelease);
+ }
+
+ //Select to the end of the line
+ page->triggerAction(QWebPage::SelectEndOfLine);
+
+ //ImAnchorPosition QtWebKit
+ variant = page->inputMethodQuery(Qt::ImAnchorPosition);
+ anchorPosition = variant.toInt();
+ QCOMPARE(anchorPosition, 2);
+
+ //ImCursorPosition
+ variant = page->inputMethodQuery(Qt::ImCursorPosition);
+ cursorPosition = variant.toInt();
+ QCOMPARE(cursorPosition, 8);
+
+ //ImCurrentSelection
+ variant = page->inputMethodQuery(Qt::ImCurrentSelection);
+ selectionValue = variant.value<QString>();
+ QCOMPARE(selectionValue, QString("WebKit"));
+
+ //RIGHT to LEFT selection
+ //Deselect the selection (this moves the current cursor to the end of the text)
+ page->event(&evpres);
+ page->event(&evrel);
+
+ //ImAnchorPosition
+ variant = page->inputMethodQuery(Qt::ImAnchorPosition);
+ anchorPosition = variant.toInt();
+ QCOMPARE(anchorPosition, 8);
+
+ //ImCursorPosition
+ variant = page->inputMethodQuery(Qt::ImCursorPosition);
+ cursorPosition = variant.toInt();
+ QCOMPARE(cursorPosition, 8);
+
+ //ImCurrentSelection
+ variant = page->inputMethodQuery(Qt::ImCurrentSelection);
+ selectionValue = variant.value<QString>();
+ QCOMPARE(selectionValue, QString(""));
+
+ QKeyEvent keyLeftEventPress(QEvent::KeyPress, Qt::Key_Left, Qt::NoModifier);
+ QKeyEvent keyLeftEventRelease(QEvent::KeyRelease, Qt::Key_Left, Qt::NoModifier);
+
+ //Move 2 characters LEFT
+ for (int i = 0; i < 2; ++i) {
+ page->event(&keyLeftEventPress);
+ page->event(&keyLeftEventRelease);
+ }
+
+ //Select to the start of the line
+ page->triggerAction(QWebPage::SelectStartOfLine);
+
+ //ImAnchorPosition
+ variant = page->inputMethodQuery(Qt::ImAnchorPosition);
+ anchorPosition = variant.toInt();
+ QCOMPARE(anchorPosition, 6);
+
+ //ImCursorPosition
+ variant = page->inputMethodQuery(Qt::ImCursorPosition);
+ cursorPosition = variant.toInt();
+ QCOMPARE(cursorPosition, 0);
+
+ //ImCurrentSelection
+ variant = page->inputMethodQuery(Qt::ImCurrentSelection);
+ selectionValue = variant.value<QString>();
+ QCOMPARE(selectionValue, QString("QtWebK"));
+
+ //END - Tests for Selection when the Editor is not in Composition mode
+
//ImhHiddenText
QMouseEvent evpresPassword(QEvent::MouseButtonPress, inputs.at(1).geometry().center(), Qt::LeftButton, Qt::NoButton, Qt::NoModifier);
page->event(&evpresPassword);