summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-02-02 13:12:51 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-02-02 13:12:51 (GMT)
commiteeaf1b14b45714cf2d7e447806f0893367dc4f6a (patch)
tree69d37edb0067bf60e2279ffe70cc88921a173c42
parent11d2c8f96697adc93ccd82e3db1de6ecde025eff (diff)
parent57d33781bd8e02904a85de7fc54f8f4e8bd299e6 (diff)
downloadQt-eeaf1b14b45714cf2d7e447806f0893367dc4f6a.zip
Qt-eeaf1b14b45714cf2d7e447806f0893367dc4f6a.tar.gz
Qt-eeaf1b14b45714cf2d7e447806f0893367dc4f6a.tar.bz2
Merge remote branch 'origin/4.6' into qt-master-from-4.6
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog58
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro2
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/qt/qt_class.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp18
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp22
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h3
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ScrollView.cpp10
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ScrollView.h10
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp9
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp13
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp7
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp104
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog95
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp7
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp69
-rw-r--r--src/corelib/thread/qthread_win.cpp2
-rw-r--r--src/gui/dialogs/qprintdialog.h6
-rw-r--r--src/gui/itemviews/qfileiconprovider.cpp5
-rw-r--r--tests/auto/maketestselftest/tst_maketestselftest.cpp3
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue.cpp2
22 files changed, 375 insertions, 76 deletions
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index 221c020..2a3c73b 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -8,4 +8,4 @@ The commit imported was from the
and has the sha1 checksum
- a54fd11a3abcd6d9c858e8162e85fd1f3aa21db1
+ afc4c208fe296f5a1dd0e73f2bd1273bd22d9b24
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index fd5606b..bded3d8 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,61 @@
+2010-01-29 Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Speed up the WebCore::String -> QString conversion
+
+ Use QString(const QChar *, int len) constructor instead of QString::fromUtf16 to
+ avoid BOM checks and byteswapping.
+
+ * bridge/qt/qt_class.cpp:
+ (JSC::Bindings::QtClass::fieldNamed):
+ * bridge/qt/qt_runtime.cpp:
+ (JSC::Bindings::convertValueToQVariant):
+
+2010-01-14 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Enable scrolling optimization for pages with embedded widgets
+
+ https://bugs.webkit.org/show_bug.cgi?id=33373
+
+ Added a basic manual test for scrolling of embedded QWidgets.
+
+ * manual-tests/qt/qtplugin-scrolling.html: Added.
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::scrollContents):
+ (WebCore::ScrollView::setParent):
+ * platform/ScrollView.h:
+ * platform/qt/ScrollViewQt.cpp:
+ (WebCore::ScrollView::platformInit):
+ (WebCore::ScrollView::platformAddChild):
+ (WebCore::ScrollView::platformRemoveChild):
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::updatePluginWidget):
+ (WebCore::PluginView::invalidateRect):
+
+2010-01-29 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Turn off websocket support by default for Qt 4.6.x
+ https://bugs.webkit.org/show_bug.cgi?id=34284
+
+ * WebCore.pro:
+
+2010-01-26 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] JavaScript prompt is currently broken.
+ https://bugs.webkit.org/show_bug.cgi?id=30914
+
+ Remove the manual test case in favor of an automated
+ test case in WebKit/qt/tests/qwebpage.
+
+ * manual-tests/qt/java-script-prompt.html: Removed.
+
2010-01-25 Janne Koskinen <janne.p.koskinen@digia.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index bf4d6f9..f364d3b 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -186,7 +186,7 @@ contains(DEFINES, ENABLE_SINGLE_THREADED=1) {
}
# Web Socket support.
-!contains(DEFINES, ENABLE_WEB_SOCKETS=.): DEFINES += ENABLE_WEB_SOCKETS=1
+!contains(DEFINES, ENABLE_WEB_SOCKETS=.): DEFINES += ENABLE_WEB_SOCKETS=0
# XSLT support with QtXmlPatterns
!contains(DEFINES, ENABLE_XSLT=.) {
diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_class.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_class.cpp
index c39b3af..09a1544 100644
--- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_class.cpp
+++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_class.cpp
@@ -127,7 +127,7 @@ Field* QtClass::fieldNamed(const Identifier& identifier, Instance* instance) con
QObject* obj = qtinst->getObject();
UString ustring = identifier.ustring();
- QString objName(QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size()));
+ QString objName((const QChar*)ustring.rep()->data(), ustring.size());
QByteArray ba = objName.toAscii();
// First check for a cached field
diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp
index 6887325..ee7aa1a 100644
--- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp
+++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp
@@ -305,7 +305,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
return QString();
} else {
UString ustring = value.toString(exec);
- ret = QVariant(QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size()));
+ ret = QVariant(QString((const QChar*)ustring.rep()->data(), ustring.size()));
if (type == String)
dist = 0;
else
@@ -329,7 +329,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
QVariant v = convertValueToQVariant(exec, val, QMetaType::Void, &objdist, visitedObjects);
if (objdist >= 0) {
UString ustring = (*it).ustring();
- QString id = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
+ QString id = QString((const QChar*)ustring.rep()->data(), ustring.size());
result.insert(id, v);
}
}
@@ -404,7 +404,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
for (int i = 0; i < len; ++i) {
JSValue val = rtarray->getConcreteArray()->valueAt(exec, i);
UString ustring = val.toString(exec);
- QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
+ QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
result.append(qstring);
}
@@ -418,7 +418,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
for (int i = 0; i < len; ++i) {
JSValue val = array->get(exec, i);
UString ustring = val.toString(exec);
- QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
+ QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
result.append(qstring);
}
@@ -427,7 +427,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
} else {
// Make a single length array
UString ustring = value.toString(exec);
- QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
+ QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
QStringList result;
result.append(qstring);
ret = QVariant(result);
@@ -443,7 +443,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
dist = 0;
} else {
UString ustring = value.toString(exec);
- ret = QVariant(QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size()).toLatin1());
+ ret = QVariant(QString((const QChar*)ustring.rep()->data(), ustring.size()).toLatin1());
if (type == String)
dist = 5;
else
@@ -485,7 +485,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
}
} else if (type == String) {
UString ustring = value.toString(exec);
- QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
+ QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
if (hint == QMetaType::QDateTime) {
QDateTime dt = QDateTime::fromString(qstring, Qt::ISODate);
@@ -534,7 +534,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
*/
// Attempt to convert.. a bit risky
UString ustring = value.toString(exec);
- QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
+ QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
// this is of the form '/xxxxxx/i'
int firstSlash = qstring.indexOf(QLatin1Char('/'));
@@ -554,7 +554,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
}
} else if (type == String) {
UString ustring = value.toString(exec);
- QString qstring = QString::fromUtf16((const ushort*)ustring.rep()->data(),ustring.size());
+ QString qstring = QString((const QChar*)ustring.rep()->data(), ustring.size());
QRegExp re(qstring);
if (re.isValid()) {
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp
index 12edc42..d270e37 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp
@@ -216,7 +216,6 @@
#include "JSWebKitCSSTransformValue.h"
#include "JSWebKitPoint.h"
#include "JSWebKitTransitionEvent.h"
-#include "JSWebSocket.h"
#include "JSWheelEvent.h"
#include "JSWorker.h"
#include "JSXMLHttpRequest.h"
@@ -247,7 +246,7 @@ ASSERT_CLASS_FITS_IN_CELL(JSDOMWindow);
/* Hash table */
-static const HashTableValue JSDOMWindowTableValues[297] =
+static const HashTableValue JSDOMWindowTableValues[296] =
{
{ "screen", DontDelete|ReadOnly, (intptr_t)jsDOMWindowScreen, (intptr_t)0 },
{ "history", DontDelete|ReadOnly, (intptr_t)jsDOMWindowHistory, (intptr_t)0 },
@@ -540,7 +539,6 @@ static const HashTableValue JSDOMWindowTableValues[297] =
{ "MessageChannel", DontDelete, (intptr_t)jsDOMWindowMessageChannelConstructor, (intptr_t)setJSDOMWindowMessageChannelConstructor },
{ "Worker", DontDelete, (intptr_t)jsDOMWindowWorkerConstructor, (intptr_t)setJSDOMWindowWorkerConstructor },
{ "SharedWorker", DontDelete, (intptr_t)jsDOMWindowSharedWorkerConstructor, (intptr_t)setJSDOMWindowSharedWorkerConstructor },
- { "WebSocket", DontDelete, (intptr_t)jsDOMWindowWebSocketConstructor, (intptr_t)setJSDOMWindowWebSocketConstructor },
{ "Plugin", DontDelete, (intptr_t)jsDOMWindowPluginConstructor, (intptr_t)setJSDOMWindowPluginConstructor },
{ "PluginArray", DontDelete, (intptr_t)jsDOMWindowPluginArrayConstructor, (intptr_t)setJSDOMWindowPluginArrayConstructor },
{ "MimeType", DontDelete, (intptr_t)jsDOMWindowMimeTypeConstructor, (intptr_t)setJSDOMWindowMimeTypeConstructor },
@@ -588,7 +586,7 @@ static JSC_CONST_HASHTABLE HashTable JSDOMWindowTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 65535, JSDOMWindowTableValues, 0 };
#else
- { 1068, 1023, JSDOMWindowTableValues, 0 };
+ { 1067, 1023, JSDOMWindowTableValues, 0 };
#endif
/* Hash table for prototype */
@@ -3275,14 +3273,6 @@ JSValue jsDOMWindowSharedWorkerConstructor(ExecState* exec, const Identifier&, c
return castedThis->sharedWorker(exec);
}
-JSValue jsDOMWindowWebSocketConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
-{
- JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase()));
- if (!castedThis->allowsAccessFrom(exec))
- return jsUndefined();
- return castedThis->webSocket(exec);
-}
-
JSValue jsDOMWindowPluginConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slot.slotBase()));
@@ -5678,14 +5668,6 @@ void setJSDOMWindowSharedWorkerConstructor(ExecState* exec, JSObject* thisObject
static_cast<JSDOMWindow*>(thisObject)->putDirect(Identifier(exec, "SharedWorker"), value);
}
-void setJSDOMWindowWebSocketConstructor(ExecState* exec, JSObject* thisObject, JSValue value)
-{
- if (!static_cast<JSDOMWindow*>(thisObject)->allowsAccessFrom(exec))
- return;
- // Shadowing a built-in constructor
- static_cast<JSDOMWindow*>(thisObject)->putDirect(Identifier(exec, "WebSocket"), value);
-}
-
void setJSDOMWindowPluginConstructor(ExecState* exec, JSObject* thisObject, JSValue value)
{
if (!static_cast<JSDOMWindow*>(thisObject)->allowsAccessFrom(exec))
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h
index afc8106..5a087e7 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h
@@ -82,7 +82,6 @@ public:
JSC::JSValue messageChannel(JSC::ExecState*) const;
JSC::JSValue worker(JSC::ExecState*) const;
JSC::JSValue sharedWorker(JSC::ExecState*) const;
- JSC::JSValue webSocket(JSC::ExecState*) const;
JSC::JSValue audio(JSC::ExecState*) const;
// Custom functions
@@ -679,8 +678,6 @@ JSC::JSValue jsDOMWindowWorkerConstructor(JSC::ExecState*, const JSC::Identifier
void setJSDOMWindowWorkerConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDOMWindowSharedWorkerConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
void setJSDOMWindowSharedWorkerConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
-JSC::JSValue jsDOMWindowWebSocketConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
-void setJSDOMWindowWebSocketConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDOMWindowPluginConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
void setJSDOMWindowPluginConstructor(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDOMWindowPluginArrayConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&);
diff --git a/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp b/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp
index ee8726a..e67daf9 100644
--- a/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp
@@ -507,7 +507,7 @@ void ScrollView::scrollContents(const IntSize& scrollDelta)
hostWindow()->repaint(panScrollIconDirtyRect, true);
}
- if (canBlitOnScroll() && !rootPreventsBlitting()) { // The main frame can just blit the WebView window
+ if (canBlitOnScroll()) { // The main frame can just blit the WebView window
// FIXME: Find a way to blit subframes without blitting overlapping content
hostWindow()->scroll(-scrollDelta, scrollViewRect, clipRect);
} else {
@@ -597,14 +597,6 @@ void ScrollView::setParent(ScrollView* parentView)
if (m_scrollbarsAvoidingResizer && parent())
parent()->adjustScrollbarsAvoidingResizerCount(-m_scrollbarsAvoidingResizer);
-#if PLATFORM(QT)
- if (m_widgetsPreventingBlitting && parent())
- parent()->adjustWidgetsPreventingBlittingCount(-m_widgetsPreventingBlitting);
-
- if (m_widgetsPreventingBlitting && parentView)
- parentView->adjustWidgetsPreventingBlittingCount(m_widgetsPreventingBlitting);
-#endif
-
Widget::setParent(parentView);
if (m_scrollbarsAvoidingResizer && parent())
diff --git a/src/3rdparty/webkit/WebCore/platform/ScrollView.h b/src/3rdparty/webkit/WebCore/platform/ScrollView.h
index 1950a54..5dacff5 100644
--- a/src/3rdparty/webkit/WebCore/platform/ScrollView.h
+++ b/src/3rdparty/webkit/WebCore/platform/ScrollView.h
@@ -305,16 +305,6 @@ private:
NSScrollView<WebCoreFrameScrollView>* scrollView() const;
#endif
-#if PLATFORM(QT)
-public:
- void adjustWidgetsPreventingBlittingCount(int delta);
-private:
- bool rootPreventsBlitting() const { return root()->m_widgetsPreventingBlitting > 0; }
- unsigned m_widgetsPreventingBlitting;
-#else
- bool rootPreventsBlitting() const { return false; }
-#endif
-
#if PLATFORM(GTK)
public:
void setGtkAdjustments(GtkAdjustment* hadj, GtkAdjustment* vadj);
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp b/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp
index f7ebbc7..48bca19 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp
@@ -36,7 +36,9 @@ QWebPopup::QWebPopup(PopupMenuClient* client)
{
Q_ASSERT(m_client);
+#if !defined(Q_WS_S60) && !defined(Q_WS_MAEMO_5)
setFont(m_client->menuStyle().font().font());
+#endif
connect(this, SIGNAL(activated(int)),
SLOT(activeChanged(int)), Qt::QueuedConnection);
}
@@ -44,9 +46,16 @@ QWebPopup::QWebPopup(PopupMenuClient* client)
void QWebPopup::exec()
{
+ // QCursor::pos() is not a great idea for a touch screen, but we don't need the coordinates
+ // as comboboxes with Qt on Maemo 5 come up in their full width on the screen.
+ // On the other platforms it's okay to use QCursor::pos().
+#if defined(Q_WS_MAEMO_5)
+ showPopup();
+#else
QMouseEvent event(QEvent::MouseButtonPress, QCursor::pos(), Qt::LeftButton,
Qt::LeftButton, Qt::NoModifier);
QCoreApplication::sendEvent(this, &event);
+#endif
}
void QWebPopup::showPopup()
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp
index ccbd751..17ad253 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/ScrollViewQt.cpp
@@ -36,32 +36,19 @@ namespace WebCore {
void ScrollView::platformInit()
{
- m_widgetsPreventingBlitting = 0;
}
void ScrollView::platformDestroy()
{
}
-// Windowed plugins are using native windows and are thus preventing
-// us from doing any kind of scrolling optimization.
-
-void ScrollView::adjustWidgetsPreventingBlittingCount(int delta)
-{
- m_widgetsPreventingBlitting += delta;
- if (parent())
- parent()->adjustWidgetsPreventingBlittingCount(delta);
-}
-
void ScrollView::platformAddChild(Widget*)
{
- adjustWidgetsPreventingBlittingCount(1);
}
void ScrollView::platformRemoveChild(Widget* child)
{
child->hide();
- adjustWidgetsPreventingBlittingCount(-1);
}
}
diff --git a/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp b/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp
index e61736b..476ab8a 100644
--- a/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp
+++ b/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp
@@ -126,6 +126,10 @@ void PluginView::updatePluginWidget()
// scroll, we need to move/resize immediately.
if (!m_windowRect.intersects(frameView->frameRect()))
setNPWindowIfNeeded();
+
+ // Make sure we get repainted afterwards. This is necessary for downward
+ // scrolling to move the plugin widget properly.
+ invalidate();
}
void PluginView::setFocus()
@@ -657,7 +661,8 @@ NPError PluginView::getValue(NPNVariable variable, void* value)
void PluginView::invalidateRect(const IntRect& rect)
{
if (m_isWindowed) {
- platformWidget()->update(rect);
+ if (platformWidget())
+ platformWidget()->update(rect);
return;
}
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp
index 1d4b46f..79538ff 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp
@@ -57,6 +57,106 @@ void QWebViewPrivate::_q_pageDestroyed()
view->setPage(0);
}
+#ifdef Q_WS_MAEMO_5
+#include "qabstractkineticscroller.h"
+
+class QWebViewKineticScroller : public QAbstractKineticScroller {
+public:
+ QWebViewKineticScroller() : QAbstractKineticScroller() {}
+ // remember the frame where the button was pressed
+ bool eventFilter(QObject* o, QEvent* ev)
+ {
+ switch (ev->type()) {
+ case QEvent::MouseButtonPress: {
+ QWebFrame* hitFrame = scrollingFrameAt(static_cast<QMouseEvent*>(ev)->pos());
+ if (hitFrame)
+ m_frame = hitFrame;
+ break;
+ }
+ default:
+ break;
+ }
+ return QAbstractKineticScroller::eventFilter(o, ev);
+ }
+
+protected:
+ QWebFrame* currentFrame() const
+ {
+ if (!m_frame.isNull())
+ return m_frame.data();
+
+ QWebView* view = static_cast<QWebView*>(widget());
+ QWebFrame* frame = view->page()->mainFrame();
+ return frame;
+ }
+
+ // Returns the innermost frame at the given position that can scroll.
+ QWebFrame* scrollingFrameAt(const QPoint& pos) const
+ {
+ QWebView* view = static_cast<QWebView*>(widget());
+ QWebFrame* mainFrame = view->page()->mainFrame();
+ QWebFrame* hitFrame = mainFrame->hitTestContent(pos).frame();
+ QSize range = hitFrame->contentsSize() - hitFrame->geometry().size();
+
+ while (hitFrame && range.width() <= 1 && range.height() <= 1)
+ hitFrame = hitFrame->parentFrame();
+
+ return hitFrame;
+ }
+
+ void attachToWidget()
+ {
+ QWebView* view = static_cast<QWebView*>(widget());
+ QWebFrame* mainFrame = view->page()->mainFrame();
+ m_oldHorizontalScrollBarPolicy = mainFrame->scrollBarPolicy(Qt::Horizontal);
+ m_oldVerticalScrollBarPolicy = mainFrame->scrollBarPolicy(Qt::Vertical);
+ mainFrame->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
+ mainFrame->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
+ view->installEventFilter(this);
+ }
+
+ void removeFromWidget()
+ {
+ QWebView* view = static_cast<QWebView*>(widget());
+ view->removeEventFilter(this);
+ QWebFrame* mainFrame = view->page()->mainFrame();
+ mainFrame->setScrollBarPolicy(Qt::Vertical, m_oldVerticalScrollBarPolicy);
+ mainFrame->setScrollBarPolicy(Qt::Horizontal, m_oldHorizontalScrollBarPolicy);
+ }
+
+ QRect positionRange() const
+ {
+ QRect r;
+ QWebFrame* frame = currentFrame();
+ r.setSize(frame->contentsSize() - frame->geometry().size());
+ return r;
+ }
+
+ QPoint position() const
+ {
+ QWebFrame* frame = currentFrame();
+ return frame->scrollPosition();
+ }
+
+ QSize viewportSize() const
+ {
+ return static_cast<QWebView*>(widget())->page()->viewportSize();
+ }
+
+ void setPosition(const QPoint& point, const QPoint& /* overShootDelta */)
+ {
+ QWebFrame* frame = currentFrame();
+ frame->setScrollPosition(point);
+ }
+
+ QPointer<QWebFrame> m_frame;
+ Qt::ScrollBarPolicy m_oldVerticalScrollBarPolicy;
+ Qt::ScrollBarPolicy m_oldHorizontalScrollBarPolicy;
+};
+
+#endif // Q_WS_MAEMO_5
+
+
/*!
\class QWebView
\since 4.4
@@ -153,6 +253,10 @@ QWebView::QWebView(QWidget *parent)
setAttribute(Qt::WA_InputMethodEnabled);
#endif
+#if defined(Q_WS_MAEMO_5)
+ QAbstractKineticScroller* scroller = new QWebViewKineticScroller();
+ scroller->setWidget(this);
+#endif
setAcceptDrops(true);
setMouseTracking(true);
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index 09acd47..1026ac5 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,98 @@
+2010-01-28 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ Do not set the combobox font on Maemo5 and S60; use the
+ default instead.
+
+ * WebCoreSupport/QtFallbackWebPopup.cpp:
+ (WebCore::QtFallbackWebPopup::populate):
+
+2010-01-28 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Support kinetic scrolling on Maemo 5
+
+ https://bugs.webkit.org/show_bug.cgi?id=34267
+
+ Patch by Ralf Engels <ralf.engels@nokia.com> and
+ Robert Griebl <rgriebl@trolltech.com>
+
+ * Api/qwebview.cpp:
+ (QWebViewKineticScroller::QWebViewKineticScroller):
+ (QWebViewKineticScroller::eventFilter):
+ (QWebViewKineticScroller::currentFrame):
+ (QWebViewKineticScroller::scrollingFrameAt):
+ (QWebViewKineticScroller::attachToWidget):
+ (QWebViewKineticScroller::removeFromWidget):
+ (QWebViewKineticScroller::positionRange):
+ (QWebViewKineticScroller::position):
+ (QWebViewKineticScroller::viewportSize):
+ (QWebViewKineticScroller::setPosition):
+ (QWebView::QWebView):
+
+2010-01-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann
+
+ Disable auto-uppercase and predictive text on Maemo5, just like the
+ build-in MicroB Browser.
+
+ * WebCoreSupport/EditorClientQt.cpp:
+ (WebCore::EditorClientQt::setInputMethodState):
+
+2010-01-28 Trond Kjernåsen <trond@trolltech.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix for endless print loop when printing web pages
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::print):
+
+2010-01-26 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Show comboboxes on Maemo 5
+ https://bugs.webkit.org/show_bug.cgi?id=34088
+
+ Don't try to show the combobox by simulating a mouse event from QCursor::pos() to
+ get the combobox position right. The position on Maemo 5 is independent from the mouse
+ and there's no QCursor::pos().
+
+ * WebCoreSupport/QtFallbackWebPopup.cpp:
+ (WebCore::QtFallbackWebPopup::show):
+
+2010-01-26 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] JavaScript prompt is currently broken
+ https://bugs.webkit.org/show_bug.cgi?id=30914
+
+ In r52152 a patch was landed to convert a null QString
+ to an empty WebCore::String in case the prompt was accepted
+ but the default implementation returned the null QString.
+
+ The patch tried to avoid assign to result twice and
+ was not checking the QString if it is null but the default
+ value. This lead to always returning an empty string on
+ successful prompts. Fix it by checking the variable 'x'
+ for isNull.
+
+ The manual test case used didn't cover the case of non
+ empty input, replace it with an automatic test case that
+ should cover all cases.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::runJavaScriptPrompt): Fix the bug.
+ * tests/qwebpage/tst_qwebpage.cpp: Add automatic test case
+ (JSPromptPage::JSPromptPage):
+ (JSPromptPage::javaScriptPrompt):
+ (tst_QWebPage::testJSPrompt):
+
2010-01-25 Janne Koskinen <janne.p.koskinen@digia.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index c5d2792..0c5df4a 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -281,7 +281,7 @@ bool ChromeClientQt::runJavaScriptPrompt(Frame* f, const String& message, const
// Fix up a quirk in the QInputDialog class. If no input happened the string should be empty
// but it is null. See https://bugs.webkit.org/show_bug.cgi?id=30914.
- if (rc && result.isNull())
+ if (rc && x.isNull())
result = String("");
else
result = x;
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
index 34241f0..2d1a1eb 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
@@ -615,7 +615,12 @@ void EditorClientQt::setInputMethodState(bool active)
}
}
webPageClient->setInputMethodHint(Qt::ImhHiddenText, isPasswordField);
-#endif
+#ifdef Q_WS_MAEMO_5
+ // Maemo 5 MicroB Browser disables auto-uppercase and predictive text, thus, so do we.
+ webPageClient->setInputMethodHint(Qt::ImhNoAutoUppercase, true);
+ webPageClient->setInputMethodHint(Qt::ImhNoPredictiveText, true);
+#endif // Q_WS_MAEMO_5
+#endif // QT_VERSION check
webPageClient->setInputMethodEnabled(active);
}
emit m_page->microFocusChanged();
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index ee1969d..0e04acc 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -1,6 +1,7 @@
/*
Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
+ Copyright (C) 2010 Holger Hans Peter Freyther
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -154,6 +155,7 @@ private slots:
void screenshot();
void originatingObjectInNetworkRequests();
+ void testJSPrompt();
private:
QWebView* m_view;
@@ -1781,5 +1783,72 @@ void tst_QWebPage::originatingObjectInNetworkRequests()
#endif
}
+/**
+ * Test fixups for https://bugs.webkit.org/show_bug.cgi?id=30914
+ *
+ * From JS we test the following conditions.
+ *
+ * OK + QString() => SUCCESS, empty string (but not null)
+ * OK + "text" => SUCCESS, "text"
+ * CANCEL + QString() => CANCEL, null string
+ * CANCEL + "text" => CANCEL, null string
+ */
+class JSPromptPage : public QWebPage {
+ Q_OBJECT
+public:
+ JSPromptPage()
+ {}
+
+ bool javaScriptPrompt(QWebFrame* frame, const QString& msg, const QString& defaultValue, QString* result)
+ {
+ if (msg == QLatin1String("test1")) {
+ *result = QString();
+ return true;
+ } else if (msg == QLatin1String("test2")) {
+ *result = QLatin1String("text");
+ return true;
+ } else if (msg == QLatin1String("test3")) {
+ *result = QString();
+ return false;
+ } else if (msg == QLatin1String("test4")) {
+ *result = QLatin1String("text");
+ return false;
+ }
+
+ qFatal("Unknown msg.");
+ return QWebPage::javaScriptPrompt(frame, msg, defaultValue, result);
+ }
+};
+
+void tst_QWebPage::testJSPrompt()
+{
+ JSPromptPage page;
+ bool res;
+
+ // OK + QString()
+ res = page.mainFrame()->evaluateJavaScript(
+ "var retval = prompt('test1');"
+ "retval=='' && retval.length == 0;").toBool();
+ QVERIFY(res);
+
+ // OK + "text"
+ res = page.mainFrame()->evaluateJavaScript(
+ "var retval = prompt('test2');"
+ "retval=='text' && retval.length == 4;").toBool();
+ QVERIFY(res);
+
+ // Cancel + QString()
+ res = page.mainFrame()->evaluateJavaScript(
+ "var retval = prompt('test3');"
+ "retval===null;").toBool();
+ QVERIFY(res);
+
+ // Cancel + "text"
+ res = page.mainFrame()->evaluateJavaScript(
+ "var retval = prompt('test4');"
+ "retval===null;").toBool();
+ QVERIFY(res);
+}
+
QTEST_MAIN(tst_QWebPage)
#include "tst_qwebpage.moc"
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index b276f0a..37d5b87 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -40,7 +40,9 @@
****************************************************************************/
//#define WINVER 0x0500
+#if _WIN32_WINNT < 0x0400
#define _WIN32_WINNT 0x0400
+#endif
#include "qthread.h"
diff --git a/src/gui/dialogs/qprintdialog.h b/src/gui/dialogs/qprintdialog.h
index 390a4a0..ecd50c1 100644
--- a/src/gui/dialogs/qprintdialog.h
+++ b/src/gui/dialogs/qprintdialog.h
@@ -97,9 +97,9 @@ public:
void done(int result);
#if defined (Q_OS_UNIX) && defined (QT3_SUPPORT)
- void setPrinter(QPrinter *, bool = false);
- QPrinter *printer() const;
- void addButton(QPushButton *button);
+ QT3_SUPPORT void setPrinter(QPrinter *, bool = false);
+ QT3_SUPPORT QPrinter *printer() const;
+ QT3_SUPPORT void addButton(QPushButton *button);
#endif
void setOption(PrintDialogOption option, bool on = true);
diff --git a/src/gui/itemviews/qfileiconprovider.cpp b/src/gui/itemviews/qfileiconprovider.cpp
index b854dc2..f321ab3 100644
--- a/src/gui/itemviews/qfileiconprovider.cpp
+++ b/src/gui/itemviews/qfileiconprovider.cpp
@@ -65,6 +65,7 @@
#ifndef SHGFI_ADDOVERLAYS
# define SHGFI_ADDOVERLAYS 0x000000020
+# define SHGFI_OVERLAYINDEX 0x000000040
#endif
QT_BEGIN_NAMESPACE
@@ -248,7 +249,7 @@ QIcon QFileIconProviderPrivate::getWinIcon(const QFileInfo &fileInfo) const
//Get the small icon
#ifndef Q_OS_WINCE
val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info,
- sizeof(SHFILEINFO), SHGFI_ICON|SHGFI_SMALLICON|SHGFI_SYSICONINDEX|SHGFI_ADDOVERLAYS);
+ sizeof(SHFILEINFO), SHGFI_ICON|SHGFI_SMALLICON|SHGFI_SYSICONINDEX|SHGFI_ADDOVERLAYS|SHGFI_OVERLAYINDEX);
#else
val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info,
sizeof(SHFILEINFO), SHGFI_SMALLICON|SHGFI_SYSICONINDEX);
@@ -287,7 +288,7 @@ QIcon QFileIconProviderPrivate::getWinIcon(const QFileInfo &fileInfo) const
//Get the big icon
#ifndef Q_OS_WINCE
val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info,
- sizeof(SHFILEINFO), SHGFI_ICON|SHGFI_LARGEICON|SHGFI_SYSICONINDEX|SHGFI_ADDOVERLAYS);
+ sizeof(SHFILEINFO), SHGFI_ICON|SHGFI_LARGEICON|SHGFI_SYSICONINDEX|SHGFI_ADDOVERLAYS|SHGFI_OVERLAYINDEX);
#else
val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info,
sizeof(SHFILEINFO), SHGFI_LARGEICON|SHGFI_SYSICONINDEX);
diff --git a/tests/auto/maketestselftest/tst_maketestselftest.cpp b/tests/auto/maketestselftest/tst_maketestselftest.cpp
index c674202..ef92c56 100644
--- a/tests/auto/maketestselftest/tst_maketestselftest.cpp
+++ b/tests/auto/maketestselftest/tst_maketestselftest.cpp
@@ -92,6 +92,9 @@ void tst_MakeTestSelfTest::auto_dot_pro_data()
QStringList subdirs = dir.entryList(QDir::AllDirs|QDir::NoDotAndDotDot);
foreach (const QString& subdir, subdirs) {
+ if (subdir == QString::fromLatin1("tmp")) {
+ continue;
+ }
QTest::newRow(qPrintable(subdir)) << subdir;
}
}
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
index 2aeabf0..ef960d0 100644
--- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
@@ -2907,7 +2907,7 @@ void tst_QScriptValue::equals()
QScriptValue qobj1 = eng.newQObject(this);
QScriptValue qobj2 = eng.newQObject(this);
QScriptValue qobj3 = eng.newQObject(0);
- QScriptValue qobj4 = eng.newQObject(new QObject());
+ QScriptValue qobj4 = eng.newQObject(new QObject(), QScriptEngine::ScriptOwnership);
QVERIFY(qobj1.equals(qobj2)); // compares the QObject pointers
QVERIFY(!qobj2.equals(qobj4)); // compares the QObject pointers
QVERIFY(!qobj2.equals(obj2)); // compares the QObject pointers