summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebKit/qt
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@nokia.com>2010-04-06 10:36:47 (GMT)
committerJocelyn Turcotte <jocelyn.turcotte@nokia.com>2010-04-06 10:36:47 (GMT)
commitbb35b65bbfba82e0dd0ac306d3dab54436cdaff6 (patch)
tree8174cb262a960ff7b2e4aa8f1aaf154db71d2636 /src/3rdparty/webkit/WebKit/qt
parent4b27d0d887269583a0f76e922948f8c25e96ab88 (diff)
downloadQt-bb35b65bbfba82e0dd0ac306d3dab54436cdaff6.zip
Qt-bb35b65bbfba82e0dd0ac306d3dab54436cdaff6.tar.gz
Qt-bb35b65bbfba82e0dd0ac306d3dab54436cdaff6.tar.bz2
Update src/3rdparty/webkit from trunk.
Imported from 839d8709327f925aacb3b6362c06152594def97e in branch qtwebkit-2.0 of repository git://gitorious.org/+qtwebkit-developers/webkit/qtwebkit.git Rubber-stamped-by: Simon Hausmann
Diffstat (limited to 'src/3rdparty/webkit/WebKit/qt')
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro107
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp447
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.h13
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp19
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h9
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp412
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebframe.h11
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebframe_p.h9
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.cpp18
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.h2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebkitglobal.h11
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp334
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h22
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h21
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.cpp5
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp107
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h15
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp203
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebview.h6
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog2833
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp155
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.h34
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/DragClientQt.cpp39
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditCommandQt.cpp1
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp34
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp161
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h10
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp212
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.h67
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp225
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h68
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtMaemoWebPopup.cpp220
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtMaemoWebPopup.h89
-rw-r--r--src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdocconf2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/webelement/main.cpp4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def21
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/benchmarks/loading/loading.pro2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/benchmarks/loading/tst_loading.pro11
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/benchmarks/painting/painting.pro2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/benchmarks/painting/tst_painting.pro11
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/hybridPixmap.pro11
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/resources.qrc5
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/test.html65
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/tst_hybridPixmap.cpp52
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/widget.cpp119
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/widget.h70
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/widget.ui95
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro12
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp29
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebelement/qwebelement.pro14
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebelement/qwebelement.qrc7
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebelement/resources/image.png (renamed from src/3rdparty/webkit/WebKit/qt/tests/qwebframe/image.png)bin14743 -> 14743 bytes
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebelement/resources/style.css (renamed from src/3rdparty/webkit/WebKit/qt/tests/qwebelement/style.css)0
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebelement/resources/style2.css (renamed from src/3rdparty/webkit/WebKit/qt/tests/qwebelement/style2.css)0
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp30
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.qrc7
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.pro15
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.qrc10
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/image.png (renamed from src/3rdparty/webkit/WebKit/qt/tests/qwebelement/image.png)bin14743 -> 14743 bytes
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/style.css (renamed from src/3rdparty/webkit/WebKit/qt/tests/qwebframe/style.css)0
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/test1.html (renamed from src/3rdparty/webkit/WebKit/qt/tests/qwebframe/test1.html)0
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/test2.html (renamed from src/3rdparty/webkit/WebKit/qt/tests/qwebframe/test2.html)0
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/testiframe.html (renamed from src/3rdparty/webkit/WebKit/qt/tests/qwebframe/testiframe.html)0
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/testiframe2.html (renamed from src/3rdparty/webkit/WebKit/qt/tests/qwebframe/testiframe2.html)0
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp232
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.qrc10
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/qwebhistory.pro14
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page1.html (renamed from src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page1.html)0
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page2.html (renamed from src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page2.html)0
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page3.html (renamed from src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page3.html)0
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page4.html (renamed from src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page4.html)0
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page5.html (renamed from src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page5.html)0
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page6.html (renamed from src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page6.html)0
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/tst_qwebhistory.qrc12
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro13
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebinspector/qwebinspector.pro2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebinspector/tst_qwebinspector.cpp68
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/qwebpage.pro15
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/resources/frame_a.html (renamed from src/3rdparty/webkit/WebKit/qt/tests/qwebview/data/frame_a.html)0
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/resources/iframe.html (renamed from src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe.html)0
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/resources/iframe2.html (renamed from src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe2.html)0
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/resources/iframe3.html (renamed from src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe3.html)0
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/resources/index.html (renamed from src/3rdparty/webkit/WebKit/qt/tests/qwebview/data/index.html)0
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp196
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.qrc10
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro13
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebview/qwebview.pro14
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebview/resources/frame_a.html (renamed from src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/frame_a.html)0
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebview/resources/index.html (renamed from src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/index.html)0
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp25
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.qrc4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/resources/image2.png (renamed from src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/image2.png)bin14743 -> 14743 bytes
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/tests.pri24
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/tests.pro4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/util.h32
96 files changed, 5932 insertions, 1271 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro b/src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro
new file mode 100644
index 0000000..389fb5f
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro
@@ -0,0 +1,107 @@
+TEMPLATE = lib
+TARGET = dummy
+
+include(headers.pri)
+
+CONFIG -= debug_and_release
+
+DESTDIR = ../../../include/QtWebKit
+
+QUOTE = ""
+DOUBLE_ESCAPED_QUOTE = ""
+ESCAPE = ""
+win32-msvc*|symbian {
+ ESCAPE = "^"
+} else:win32-g++:isEmpty(QMAKE_SH) {
+ # MinGW's make will run makefile commands using sh, even if make
+ # was run from the Windows shell, if it finds sh in the path.
+ ESCAPE = "^"
+} else {
+ QUOTE = "\'"
+ DOUBLE_ESCAPED_QUOTE = "\\\'"
+}
+
+qtheader_module.target = $${DESTDIR}/QtWebKit
+qtheader_module.depends = $${_PRO_FILE_}
+qtheader_module.commands = echo $${QUOTE}$${LITERAL_HASH}ifndef QT_QTWEBKIT_MODULE_H$${QUOTE} > $${qtheader_module.target} &&
+qtheader_module.commands += echo $${QUOTE}$${LITERAL_HASH}define QT_QTWEBKIT_MODULE_H$${QUOTE} >> $${qtheader_module.target} &&
+qtheader_module.commands += echo $${QUOTE}$${LITERAL_HASH}include $${ESCAPE}<QtNetwork/QtNetwork$${ESCAPE}>$${QUOTE} >> $${qtheader_module.target} &&
+WEBKIT_CLASS_HEADERS = $${LITERAL_DOLLAR}$${LITERAL_DOLLAR}$${LITERAL_DOLLAR}$${LITERAL_DOLLAR}PWD/QtWebKit
+
+regex = ".*\sclass\sQWEBKIT_EXPORT\s(\w+)\s(.*)"
+
+for(HEADER, WEBKIT_API_HEADERS) {
+ # 1. Append to QtWebKit header that includes all other header files
+ # Quotes need to be escaped once more when placed in eval()
+ eval(qtheader_module.commands += echo $${DOUBLE_ESCAPED_QUOTE}\$${LITERAL_HASH}include \\\"$$basename(HEADER)\\\"$${DOUBLE_ESCAPED_QUOTE} >> $${qtheader_module.target} &&)
+
+ HEADER_NAME = $$basename(HEADER)
+ HEADER_TARGET = $$replace(HEADER_NAME, [^a-zA-Z0-9_], -)
+ HEADER_TARGET = "qtheader-$${HEADER_TARGET}"
+
+ # 2. Create forwarding header files for qwebframe.h, etc.
+ # Normally they contain absolute paths, for package builds we make the path relative so that
+ # the package sources are relocatable.
+
+ PATH_TO_HEADER = $$HEADER
+ CONFIG(standalone_package): PATH_TO_HEADER = ../../WebKit/qt/Api/$$basename(HEADER)
+
+ eval($${HEADER_TARGET}.target = $${DESTDIR}/$${HEADER_NAME})
+ eval($${HEADER_TARGET}.depends = $$HEADER)
+ eval($${HEADER_TARGET}.commands = echo $${DOUBLE_ESCAPED_QUOTE}\$${LITERAL_HASH}include \\\"$$PATH_TO_HEADER\\\"$${DOUBLE_ESCAPED_QUOTE} > $$eval($${HEADER_TARGET}.target))
+
+ QMAKE_EXTRA_TARGETS += $$HEADER_TARGET
+ qtheader_module.depends += $$eval($${HEADER_TARGET}.target)
+
+ # 3. Extract class names of exported classes from the headers and generate
+ # the class name header files
+
+ src_words = $$cat($$HEADER)
+ # Really make sure we're dealing with words
+ src_words = $$split(src_words, " ")
+
+ src = $$join(src_words, $${LITERAL_WHITESPACE})
+ for(ever) {
+ # Looking up by line is faster, so we try that first
+ res = $$find(src_words, "QWEBKIT_EXPORT")
+ isEmpty(res):break()
+
+ # Then do a slow lookup to ensure we're dealing with an exported class
+ res = $$find(src, $$regex)
+ isEmpty(res):break()
+
+ exp = $$replace(src, $$regex, "EXPORTED_CLASS = \1")
+ eval($$exp)
+
+ CLASS_TARGET = "qtheader_$${EXPORTED_CLASS}"
+
+ eval($${CLASS_TARGET}.target = $${DESTDIR}/$${EXPORTED_CLASS})
+ eval($${CLASS_TARGET}.depends = $$eval($${HEADER_TARGET}.target))
+ eval($${CLASS_TARGET}.commands = echo $${DOUBLE_ESCAPED_QUOTE}\$${LITERAL_HASH}include \\\"$$basename(HEADER)\\\"$${DOUBLE_ESCAPED_QUOTE} > $$eval($${CLASS_TARGET}.target))
+
+ QMAKE_EXTRA_TARGETS += $$CLASS_TARGET
+ WEBKIT_CLASS_HEADERS += $${LITERAL_DOLLAR}$${LITERAL_DOLLAR}$${LITERAL_DOLLAR}$${LITERAL_DOLLAR}PWD/$${EXPORTED_CLASS}
+
+ generated_files.depends += $$eval($${CLASS_TARGET}.target)
+ qtheader_pri.depends += $$eval($${CLASS_TARGET}.target)
+
+ # Qt's QRegExp does not support inline non-greedy matching,
+ # so we'll have to work around it by updating the haystack
+ src = $$replace(src, $$regex, "\2")
+ src_words = $$join(src, $${LITERAL_WHITESPACE})
+ }
+}
+
+qtheader_module.commands += echo $${QUOTE}$${LITERAL_HASH}endif // QT_QTWEBKIT_MODULE_H$${QUOTE} >> $${qtheader_module.target}
+QMAKE_EXTRA_TARGETS += qtheader_module
+
+qtheader_pri.target = $${DESTDIR}/classheaders.pri
+qtheader_pri.depends += $${_PRO_FILE_}
+qtheader_pri.commands = echo $${QUOTE}WEBKIT_CLASS_HEADERS = $${WEBKIT_CLASS_HEADERS}$${QUOTE} > $${qtheader_pri.target}
+QMAKE_EXTRA_TARGETS += qtheader_pri
+
+generated_files.depends += $${qtheader_module.target} $${qtheader_pri.target}
+QMAKE_EXTRA_TARGETS += generated_files
+
+
+
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp
index 490ada1..2878960 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp
@@ -22,27 +22,80 @@
#include "qgraphicswebview.h"
#include "qwebframe.h"
+#include "qwebframe_p.h"
#include "qwebpage.h"
#include "qwebpage_p.h"
#include "QWebPageClient.h"
-#include <QtGui/QGraphicsScene>
-#include <QtGui/QGraphicsView>
+#include "FrameView.h"
+#include "GraphicsContext.h"
+#include "IntRect.h"
+#include "TiledBackingStore.h"
+#include <QtCore/qmetaobject.h>
+#include <QtCore/qsharedpointer.h>
+#include <QtCore/qtimer.h>
#include <QtGui/qapplication.h>
+#include <QtGui/qgraphicsscene.h>
#include <QtGui/qgraphicssceneevent.h>
+#include <QtGui/qgraphicsview.h>
+#include <QtGui/qpixmapcache.h>
+#include <QtGui/qscrollbar.h>
#include <QtGui/qstyleoption.h>
#include <QtGui/qinputcontext.h>
#if defined(Q_WS_X11)
#include <QX11Info>
#endif
+#include <Settings.h>
+
+// the overlay is here for one reason only: to have the scroll-bars and other
+// extra UI elements appear on top of any QGraphicsItems created by CSS compositing layers
+class QGraphicsWebViewOverlay : public QGraphicsItem {
+ public:
+ QGraphicsWebViewOverlay(QGraphicsWebView* view)
+ :QGraphicsItem(view)
+ , q(view)
+ {
+ setPos(0, 0);
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true);
+#endif
+ setCacheMode(QGraphicsItem::DeviceCoordinateCache);
+ }
+
+ QRectF boundingRect() const
+ {
+ return q->boundingRect();
+ }
+
+ void paint(QPainter* painter, const QStyleOptionGraphicsItem* options, QWidget*)
+ {
+ q->page()->mainFrame()->render(painter, static_cast<QWebFrame::RenderLayer>(QWebFrame::AllLayers&(~QWebFrame::ContentsLayer)), options->exposedRect.toRect());
+ }
+
+ friend class QGraphicsWebView;
+ QGraphicsWebView* q;
+};
class QGraphicsWebViewPrivate : public QWebPageClient {
public:
QGraphicsWebViewPrivate(QGraphicsWebView* parent)
: q(parent)
, page(0)
- {}
+ , resizesToContents(false)
+#if USE(ACCELERATED_COMPOSITING)
+ , rootGraphicsLayer(0)
+ , shouldSync(false)
+#endif
+ {
+#if USE(ACCELERATED_COMPOSITING)
+ // the overlay and stays alive for the lifetime of
+ // this QGraphicsWebView as the scrollbars are needed when there's no compositing
+ q->setFlag(QGraphicsItem::ItemUsesExtendedStyleOption);
+ syncMetaMethod = q->metaObject()->method(q->metaObject()->indexOfMethod("syncLayers()"));
+#endif
+ }
virtual ~QGraphicsWebViewPrivate();
+
virtual void scroll(int dx, int dy, const QRect&);
virtual void update(const QRect& dirtyRect);
virtual void setInputMethodEnabled(bool enable);
@@ -59,20 +112,135 @@ public:
virtual QPalette palette() const;
virtual int screenNumber() const;
virtual QWidget* ownerWidget() const;
+ virtual QRect geometryRelativeToOwnerWidget() const;
virtual QObject* pluginParent() const;
+ virtual QStyle* style() const;
+
+#if USE(ACCELERATED_COMPOSITING)
+ virtual void setRootGraphicsLayer(QGraphicsItem* layer);
+ virtual void markForSync(bool scheduleSync);
+ void updateCompositingScrollPosition();
+#endif
+
+ void updateResizesToContentsForPage();
+ QRectF graphicsItemVisibleRect() const;
+#if ENABLE(TILED_BACKING_STORE)
+ void updateTiledBackingStoreScale();
+#endif
+
+ void createOrDeleteOverlay();
+
+ void syncLayers();
+
+ void unsetPageIfExists();
+
void _q_doLoadFinished(bool success);
+ void _q_contentsSizeChanged(const QSize&);
+ void _q_scaleChanged();
void _q_updateMicroFocus();
void _q_pageDestroyed();
QGraphicsWebView* q;
QWebPage* page;
+
+ bool resizesToContents;
+
+ // the overlay gets instantiated when the root layer is attached, and get deleted when it's detached
+ QSharedPointer<QGraphicsWebViewOverlay> overlay;
+
+ // we need to put the root graphics layer behind the overlay (which contains the scrollbar)
+ enum { RootGraphicsLayerZValue, OverlayZValue };
+
+#if USE(ACCELERATED_COMPOSITING)
+ QGraphicsItem* rootGraphicsLayer;
+ // we need to sync the layers if we get a special call from the WebCore
+ // compositor telling us to do so. We'll get that call from ChromeClientQt
+ bool shouldSync;
+
+ // we have to flush quite often, so we use a meta-method instead of QTimer::singleShot for putting the event in the queue
+ QMetaMethod syncMetaMethod;
+#endif
};
QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate()
{
+#if USE(ACCELERATED_COMPOSITING)
+ if (rootGraphicsLayer) {
+ // we don't need to delete the root graphics layer
+ // The lifecycle is managed in GraphicsLayerQt.cpp
+ rootGraphicsLayer->setParentItem(0);
+ q->scene()->removeItem(rootGraphicsLayer);
+ }
+#endif
+}
+
+void QGraphicsWebViewPrivate::createOrDeleteOverlay()
+{
+ bool useOverlay = false;
+ if (!resizesToContents) {
+#if USE(ACCELERATED_COMPOSITING)
+ useOverlay = useOverlay || rootGraphicsLayer;
+#endif
+#if ENABLE(TILED_BACKING_STORE)
+ useOverlay = useOverlay || QWebFramePrivate::core(q->page()->mainFrame())->tiledBackingStore();
+#endif
+ }
+ if (useOverlay == !!overlay)
+ return;
+ if (useOverlay) {
+ overlay = QSharedPointer<QGraphicsWebViewOverlay>(new QGraphicsWebViewOverlay(q));
+ overlay->setZValue(OverlayZValue);
+ } else
+ overlay.clear();
+}
+
+#if USE(ACCELERATED_COMPOSITING)
+void QGraphicsWebViewPrivate::setRootGraphicsLayer(QGraphicsItem* layer)
+{
+ if (rootGraphicsLayer) {
+ rootGraphicsLayer->setParentItem(0);
+ q->scene()->removeItem(rootGraphicsLayer);
+ QWebFramePrivate::core(q->page()->mainFrame())->view()->syncCompositingStateRecursive();
+ }
+
+ rootGraphicsLayer = layer;
+
+ if (layer) {
+ layer->setFlag(QGraphicsItem::ItemClipsChildrenToShape, true);
+ layer->setParentItem(q);
+ layer->setZValue(RootGraphicsLayerZValue);
+ updateCompositingScrollPosition();
+ }
+ createOrDeleteOverlay();
+}
+
+void QGraphicsWebViewPrivate::markForSync(bool scheduleSync)
+{
+ shouldSync = true;
+ if (scheduleSync)
+ syncMetaMethod.invoke(q, Qt::QueuedConnection);
+}
+
+void QGraphicsWebViewPrivate::updateCompositingScrollPosition()
+{
+ if (rootGraphicsLayer && q->page() && q->page()->mainFrame()) {
+ const QPoint scrollPosition = q->page()->mainFrame()->scrollPosition();
+ rootGraphicsLayer->setPos(-scrollPosition);
+ }
+}
+#endif
+
+void QGraphicsWebViewPrivate::syncLayers()
+{
+#if USE(ACCELERATED_COMPOSITING)
+ if (shouldSync) {
+ QWebFramePrivate::core(q->page()->mainFrame())->view()->syncCompositingStateRecursive();
+ shouldSync = false;
+ }
+#endif
}
void QGraphicsWebViewPrivate::_q_doLoadFinished(bool success)
@@ -107,11 +275,22 @@ void QGraphicsWebViewPrivate::_q_pageDestroyed()
void QGraphicsWebViewPrivate::scroll(int dx, int dy, const QRect& rectToScroll)
{
q->scroll(qreal(dx), qreal(dy), QRectF(rectToScroll));
+
+#if USE(ACCELERATED_COMPOSITING)
+ updateCompositingScrollPosition();
+#endif
}
void QGraphicsWebViewPrivate::update(const QRect & dirtyRect)
{
q->update(QRectF(dirtyRect));
+
+ createOrDeleteOverlay();
+ if (overlay)
+ overlay->update(QRectF(dirtyRect));
+#if USE(ACCELERATED_COMPOSITING)
+ syncLayers();
+#endif
}
@@ -160,10 +339,12 @@ QPalette QGraphicsWebViewPrivate::palette() const
int QGraphicsWebViewPrivate::screenNumber() const
{
#if defined(Q_WS_X11)
- const QList<QGraphicsView*> views = q->scene()->views();
+ if (QGraphicsScene* scene = q->scene()) {
+ const QList<QGraphicsView*> views = scene->views();
- if (!views.isEmpty())
- return views.at(0)->x11Info().screen();
+ if (!views.isEmpty())
+ return views.at(0)->x11Info().screen();
+ }
#endif
return 0;
@@ -171,8 +352,24 @@ int QGraphicsWebViewPrivate::screenNumber() const
QWidget* QGraphicsWebViewPrivate::ownerWidget() const
{
- const QList<QGraphicsView*> views = q->scene()->views();
- return views.value(0);
+ if (QGraphicsScene* scene = q->scene()) {
+ const QList<QGraphicsView*> views = scene->views();
+ return views.value(0);
+ }
+ return 0;
+}
+
+QRect QGraphicsWebViewPrivate::geometryRelativeToOwnerWidget() const
+{
+ if (!q->scene())
+ return QRect();
+
+ QList<QGraphicsView*> views = q->scene()->views();
+ if (views.isEmpty())
+ return QRect();
+
+ QGraphicsView* view = views.at(0);
+ return view->mapFromScene(q->boundingRect()).boundingRect();
}
QObject* QGraphicsWebViewPrivate::pluginParent() const
@@ -180,6 +377,74 @@ QObject* QGraphicsWebViewPrivate::pluginParent() const
return q;
}
+QStyle* QGraphicsWebViewPrivate::style() const
+{
+ return q->style();
+}
+
+void QGraphicsWebViewPrivate::updateResizesToContentsForPage()
+{
+ ASSERT(page);
+
+ if (resizesToContents) {
+ // resizes to contents mode requires preferred contents size to be set
+ if (!page->preferredContentsSize().isValid())
+ page->setPreferredContentsSize(QSize(960, 800));
+
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ QObject::connect(page->mainFrame(), SIGNAL(contentsSizeChanged(QSize)),
+ q, SLOT(_q_contentsSizeChanged(const QSize&)), Qt::UniqueConnection);
+#else
+ QObject::connect(page->mainFrame(), SIGNAL(contentsSizeChanged(QSize)),
+ q, SLOT(_q_contentsSizeChanged(const QSize&)));
+#endif
+ } else {
+ QObject::disconnect(page->mainFrame(), SIGNAL(contentsSizeChanged(QSize)),
+ q, SLOT(_q_contentsSizeChanged(const QSize&)));
+ }
+}
+
+void QGraphicsWebViewPrivate::_q_contentsSizeChanged(const QSize& size)
+{
+ if (!resizesToContents)
+ return;
+ q->setGeometry(QRectF(q->geometry().topLeft(), size));
+}
+
+void QGraphicsWebViewPrivate::_q_scaleChanged()
+{
+#if ENABLE(TILED_BACKING_STORE)
+ updateTiledBackingStoreScale();
+#endif
+}
+
+QRectF QGraphicsWebViewPrivate::graphicsItemVisibleRect() const
+{
+ if (!q->scene())
+ return QRectF();
+ QList<QGraphicsView*> views = q->scene()->views();
+ if (views.size() > 1) {
+ qDebug() << "QGraphicsWebView is in more than one graphics views, unable to compute the visible rect";
+ 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()));
+}
+
+#if ENABLE(TILED_BACKING_STORE)
+void QGraphicsWebViewPrivate::updateTiledBackingStoreScale()
+{
+ WebCore::TiledBackingStore* backingStore = QWebFramePrivate::core(page->mainFrame())->tiledBackingStore();
+ if (!backingStore)
+ return;
+ backingStore->setContentsScale(q->scale());
+}
+#endif
+
/*!
\class QGraphicsWebView
\brief The QGraphicsWebView class allows Web content to be added to a GraphicsView.
@@ -266,8 +531,16 @@ QGraphicsWebView::QGraphicsWebView(QGraphicsItem* parent)
#if QT_VERSION >= 0x040600
setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true);
#endif
+ setAcceptDrops(true);
setAcceptHoverEvents(true);
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ setAcceptTouchEvents(true);
+#endif
setFocusPolicy(Qt::StrongFocus);
+ setFlag(QGraphicsItem::ItemClipsChildrenToShape, true);
+#if ENABLE(TILED_BACKING_STORE)
+ QObject::connect(this, SIGNAL(scaleChanged()), this, SLOT(_q_scaleChanged()));
+#endif
}
/*!
@@ -317,7 +590,26 @@ QWebPage* QGraphicsWebView::page() const
*/
void QGraphicsWebView::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget*)
{
- page()->mainFrame()->render(painter, option->exposedRect.toRect());
+#if ENABLE(TILED_BACKING_STORE)
+ if (WebCore::TiledBackingStore* backingStore = QWebFramePrivate::core(page()->mainFrame())->tiledBackingStore()) {
+ // FIXME: We should set the backing store viewport earlier than in paint
+ if (d->resizesToContents)
+ backingStore->viewportChanged(WebCore::IntRect(d->graphicsItemVisibleRect()));
+ else {
+ QRectF visibleRect(d->page->mainFrame()->scrollPosition(), d->page->mainFrame()->geometry().size());
+ backingStore->viewportChanged(WebCore::IntRect(visibleRect));
+ }
+ // QWebFrame::render is a public API, bypass it for tiled rendering so behavior does not need to change.
+ WebCore::GraphicsContext context(painter);
+ page()->mainFrame()->d->renderFromTiledBackingStore(&context, option->exposedRect.toAlignedRect());
+ return;
+ }
+#endif
+#if USE(ACCELERATED_COMPOSITING)
+ page()->mainFrame()->render(painter, d->overlay ? QWebFrame::ContentsLayer : QWebFrame::AllLayers, option->exposedRect.toAlignedRect());
+#else
+ page()->mainFrame()->render(painter, QWebFrame::AllLayers, option->exposedRect.toRect());
+#endif
}
/*! \reimp
@@ -325,6 +617,17 @@ void QGraphicsWebView::paint(QPainter* painter, const QStyleOptionGraphicsItem*
bool QGraphicsWebView::sceneEvent(QEvent* event)
{
// Re-implemented in order to allows fixing event-related bugs in patch releases.
+
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ if (d->page && (event->type() == QEvent::TouchBegin
+ || event->type() == QEvent::TouchEnd
+ || event->type() == QEvent::TouchUpdate)) {
+ d->page->event(event);
+ if (event->isAccepted())
+ return true;
+ }
+#endif
+
return QGraphicsWidget::sceneEvent(event);
}
@@ -391,7 +694,6 @@ bool QGraphicsWebView::event(QEvent* event)
#endif // QT_NO_CONTEXTMENU
{
#ifndef QT_NO_CURSOR
-#if QT_VERSION >= 0x040400
if (event->type() == QEvent::CursorChange) {
// An unsetCursor will set the cursor to Qt::ArrowCursor.
// Thus this cursor change might be a QWidget::unsetCursor()
@@ -405,12 +707,34 @@ bool QGraphicsWebView::event(QEvent* event)
d->resetCursor();
}
#endif
-#endif
}
}
return QGraphicsWidget::event(event);
}
+void QGraphicsWebViewPrivate::unsetPageIfExists()
+{
+ if (!page)
+ return;
+
+ // if the page client is the special client constructed for
+ // delegating the responsibilities to a QWidget, we need
+ // to destroy it.
+
+ if (page->d->client && page->d->client->isQWidgetClient())
+ delete page->d->client;
+
+ page->d->client = 0;
+
+ // if the page was created by us, we own it and need to
+ // destroy it as well.
+
+ if (page->parent() == q)
+ delete page;
+ else
+ page->disconnect(q);
+}
+
/*!
Makes \a page the new web page of the web graphicsitem.
@@ -425,22 +749,23 @@ void QGraphicsWebView::setPage(QWebPage* page)
if (d->page == page)
return;
- if (d->page) {
- d->page->d->client = 0; // unset the page client
- if (d->page->parent() == this)
- delete d->page;
- else
- d->page->disconnect(this);
- }
-
+ d->unsetPageIfExists();
d->page = page;
+
if (!d->page)
return;
+
d->page->d->client = d; // set the page client
+ if (d->overlay)
+ d->overlay->prepareGeometryChange();
+
QSize size = geometry().size().toSize();
page->setViewportSize(size);
+ if (d->resizesToContents)
+ d->updateResizesToContentsForPage();
+
QWebFrame* mainFrame = d->page->mainFrame();
connect(mainFrame, SIGNAL(titleChanged(QString)),
@@ -523,7 +848,6 @@ QIcon QGraphicsWebView::icon() const
/*!
\property QGraphicsWebView::zoomFactor
- \since 4.5
\brief the zoom factor for the view
*/
@@ -544,6 +868,9 @@ qreal QGraphicsWebView::zoomFactor() const
*/
void QGraphicsWebView::updateGeometry()
{
+ if (d->overlay)
+ d->overlay->prepareGeometryChange();
+
QGraphicsWidget::updateGeometry();
if (!d->page)
@@ -559,6 +886,9 @@ void QGraphicsWebView::setGeometry(const QRectF& rect)
{
QGraphicsWidget::setGeometry(rect);
+ if (d->overlay)
+ d->overlay->prepareGeometryChange();
+
if (!d->page)
return;
@@ -766,6 +1096,77 @@ bool QGraphicsWebView::findText(const QString &subString, QWebPage::FindFlags op
return false;
}
+/*!
+ \property QGraphicsWebView::resizesToContents
+ \brief whether the size of the QGraphicsWebView and its viewport changes to match the contents size
+ \since 4.7
+
+ If this property is set, the QGraphicsWebView will automatically change its
+ size to match the size of the main frame contents. As a result the top level frame
+ will never have scrollbars. It will also make CSS fixed positioning to behave like absolute positioning
+ with elements positioned relative to the document instead of the viewport.
+
+ This property should be used in conjunction with the QWebPage::preferredContentsSize property.
+ If not explicitly set, the preferredContentsSize is automatically set to a reasonable value.
+
+ \sa QWebPage::setPreferredContentsSize()
+*/
+void QGraphicsWebView::setResizesToContents(bool enabled)
+{
+ if (d->resizesToContents == enabled)
+ return;
+ d->resizesToContents = enabled;
+ if (d->page)
+ d->updateResizesToContentsForPage();
+}
+
+bool QGraphicsWebView::resizesToContents() const
+{
+ return d->resizesToContents;
+}
+
+/*!
+ \property QGraphicsWebView::tiledBackingStoreFrozen
+ \brief whether the tiled backing store updates its contents
+ \since 4.7
+
+ If the tiled backing store is enabled using QWebSettings::TiledBackingStoreEnabled attribute, this property
+ can be used to disable backing store updates temporarily. This can be useful for example for running
+ a smooth animation that changes the scale of the QGraphicsWebView.
+
+ When the backing store is unfrozen, its contents will be automatically updated to match the current
+ state of the document. If the QGraphicsWebView scale was changed, the backing store is also
+ re-rendered using the new scale.
+
+ If the tiled backing store is not enabled, this property does nothing.
+
+ \sa QWebSettings::TiledBackingStoreEnabled
+ \sa QGraphicsObject::scale
+*/
+bool QGraphicsWebView::isTiledBackingStoreFrozen() const
+{
+#if ENABLE(TILED_BACKING_STORE)
+ WebCore::TiledBackingStore* backingStore = QWebFramePrivate::core(page()->mainFrame())->tiledBackingStore();
+ if (!backingStore)
+ return false;
+ return backingStore->contentsFrozen();
+#else
+ return false;
+#endif
+}
+
+void QGraphicsWebView::setTiledBackingStoreFrozen(bool frozen)
+{
+#if ENABLE(TILED_BACKING_STORE)
+ WebCore::TiledBackingStore* backingStore = QWebFramePrivate::core(page()->mainFrame())->tiledBackingStore();
+ if (!backingStore)
+ return;
+ backingStore->setContentsFrozen(frozen);
+#else
+ UNUSED_PARAM(frozen);
+#endif
+}
+
/*! \reimp
*/
void QGraphicsWebView::hoverMoveEvent(QGraphicsSceneHoverEvent* ev)
@@ -903,10 +1304,8 @@ bool QGraphicsWebView::focusNextPrevChild(bool next)
void QGraphicsWebView::dragEnterEvent(QGraphicsSceneDragDropEvent* ev)
{
#ifndef QT_NO_DRAGANDDROP
- //if (d->page)
- // d->page->event(ev);
- //Just remove this line below when the code above is working
- Q_UNUSED(ev);
+ if (d->page)
+ d->page->event(ev);
#else
Q_UNUSED(ev);
#endif
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.h b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.h
index 1b02f35..88729d3 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.h
@@ -45,6 +45,8 @@ class QWEBKIT_EXPORT QGraphicsWebView : public QGraphicsWidget {
Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged)
Q_PROPERTY(bool modified READ isModified)
+ Q_PROPERTY(bool resizesToContents READ resizesToContents WRITE setResizesToContents)
+ Q_PROPERTY(bool tiledBackingStoreFrozen READ isTiledBackingStoreFrozen WRITE setTiledBackingStoreFrozen)
public:
explicit QGraphicsWebView(QGraphicsItem* parent = 0);
@@ -79,6 +81,12 @@ public:
bool findText(const QString& subString, QWebPage::FindFlags options = 0);
+ bool resizesToContents() const;
+ void setResizesToContents(bool enabled);
+
+ bool isTiledBackingStoreFrozen() const;
+ void setTiledBackingStoreFrozen(bool frozen);
+
virtual void setGeometry(const QRectF& rect);
virtual void updateGeometry();
virtual void paint(QPainter*, const QStyleOptionGraphicsItem* options, QWidget* widget = 0);
@@ -136,6 +144,11 @@ private:
Q_PRIVATE_SLOT(d, void _q_doLoadFinished(bool success))
Q_PRIVATE_SLOT(d, void _q_updateMicroFocus())
Q_PRIVATE_SLOT(d, void _q_pageDestroyed())
+ // we don't want to change the moc based on USE() macro, so this function is here
+ // but will be empty if ACCLERATED_COMPOSITING is disabled
+ Q_PRIVATE_SLOT(d, void syncLayers())
+ Q_PRIVATE_SLOT(d, void _q_contentsSizeChanged(const QSize&))
+ Q_PRIVATE_SLOT(d, void _q_scaleChanged())
QGraphicsWebViewPrivate* const d;
friend class QGraphicsWebViewPrivate;
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp
index 441bec7..955206d 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp
@@ -38,7 +38,6 @@
#include "NodeList.h"
#include "PropertyNameArray.h"
#include "RenderImage.h"
-#include "ScriptFunctionCall.h"
#include "StaticNodeList.h"
#include "qt_runtime.h"
#include "qwebframe.h"
@@ -865,25 +864,7 @@ QStringList QWebElement::classes() const
return QStringList();
QStringList classes = attribute(QLatin1String("class")).simplified().split(QLatin1Char(' '), QString::SkipEmptyParts);
-#if QT_VERSION >= 0x040500
classes.removeDuplicates();
-#else
- int n = classes.size();
- int j = 0;
- QSet<QString> seen;
- seen.reserve(n);
- for (int i = 0; i < n; ++i) {
- const QString& s = classes.at(i);
- if (seen.contains(s))
- continue;
- seen.insert(s);
- if (j != i)
- classes[j] = s;
- ++j;
- }
- if (n != j)
- classes.erase(classes.begin() + j, classes.end());
-#endif
return classes;
}
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h
index 13c341c..a87d388 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h
@@ -32,6 +32,12 @@ namespace WebCore {
class Node;
}
+namespace JSC {
+namespace Bindings {
+ class QtWebElementRuntime;
+}
+}
+
QT_BEGIN_NAMESPACE
class QPainter;
QT_END_NAMESPACE
@@ -153,6 +159,7 @@ private:
friend class QWebHitTestResult;
friend class QWebHitTestResultPrivate;
friend class QWebPage;
+ friend class JSC::Bindings::QtWebElementRuntime;
QWebElementPrivate* d;
WebCore::Element* m_element;
@@ -255,4 +262,6 @@ private:
QExplicitlySharedDataPointer<QWebElementCollectionPrivate> d;
};
+Q_DECLARE_METATYPE(QWebElement)
+
#endif // QWEBELEMENT_H
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
index 710e11b..06c82ba 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
@@ -21,6 +21,7 @@
#include "config.h"
#include "qwebframe.h"
+#include "Bridge.h"
#include "CallFrame.h"
#include "Document.h"
#include "DocumentLoader.h"
@@ -56,6 +57,8 @@
#include "Scrollbar.h"
#include "SelectionController.h"
#include "SubstituteData.h"
+#include "SVGSMILElement.h"
+#include "TiledBackingStore.h"
#include "htmlediting.h"
#include "markup.h"
#include "qt_instance.h"
@@ -66,7 +69,6 @@
#include "qwebpage_p.h"
#include "qwebsecurityorigin.h"
#include "qwebsecurityorigin_p.h"
-#include "runtime.h"
#include "runtime_object.h"
#include "runtime_root.h"
#include "wtf/HashMap.h"
@@ -77,14 +79,7 @@
#include <qpainter.h>
#include <qprinter.h>
#include <qregion.h>
-
-#if QT_VERSION < 0x040400
-#include "qwebnetworkinterface.h"
-#endif
-
-#if QT_VERSION >= 0x040400
#include <qnetworkrequest.h>
-#endif
using namespace WebCore;
@@ -93,6 +88,20 @@ QT_BEGIN_NAMESPACE
extern Q_GUI_EXPORT int qt_defaultDpi();
QT_END_NAMESPACE
+void QWEBKIT_EXPORT qt_drt_setMediaType(QWebFrame* qframe, const QString& type)
+{
+ WebCore::Frame* frame = QWebFramePrivate::core(qframe);
+ WebCore::FrameView* view = frame->view();
+ view->setMediaType(type);
+ frame->document()->updateStyleSelector();
+ view->forceLayout();
+}
+
+bool QWEBKIT_EXPORT qt_drt_hasDocumentElement(QWebFrame* qframe)
+{
+ return QWebFramePrivate::core(qframe)->document()->documentElement();
+}
+
void QWEBKIT_EXPORT qt_drt_setJavaScriptProfilingEnabled(QWebFrame* qframe, bool enabled)
{
#if ENABLE(JAVASCRIPT_DEBUGGER)
@@ -150,6 +159,31 @@ bool QWEBKIT_EXPORT qt_drt_pauseTransitionOfProperty(QWebFrame *qframe, const QS
return controller->pauseTransitionAtTime(coreNode->renderer(), propertyName, time);
}
+// Pause a given SVG animation on the target node at a specific time.
+// This method is only intended to be used for testing the SVG animation system.
+bool QWEBKIT_EXPORT qt_drt_pauseSVGAnimation(QWebFrame *qframe, const QString &animationId, double time, const QString &elementId)
+{
+#if !ENABLE(SVG)
+ return false;
+#else
+ Frame* frame = QWebFramePrivate::core(qframe);
+ if (!frame)
+ return false;
+
+ Document* doc = frame->document();
+ Q_ASSERT(doc);
+
+ if (!doc->svgExtensions())
+ return false;
+
+ Node* coreNode = doc->getElementById(animationId);
+ if (!coreNode || !SVGSMILElement::isSMILElement(coreNode))
+ return false;
+
+ return doc->accessSVGExtensions()->sampleAnimationAtTime(elementId, static_cast<SVGSMILElement*>(coreNode), time);
+#endif
+}
+
// Returns the total number of currently running animations (includes both CSS transitions and CSS animations).
int QWEBKIT_EXPORT qt_drt_numberOfActiveAnimations(QWebFrame *qframe)
{
@@ -196,6 +230,28 @@ QString QWEBKIT_EXPORT qt_drt_counterValueForElementById(QWebFrame* qFrame, cons
return QString();
}
+int QWEBKIT_EXPORT qt_drt_pageNumberForElementById(QWebFrame* qFrame, const QString& id, float width, float height)
+{
+ Frame* frame = QWebFramePrivate::core(qFrame);
+ if (!frame)
+ return -1;
+
+ Element* element = frame->document()->getElementById(AtomicString(id));
+ if (!element)
+ return -1;
+
+ return PrintContext::pageNumberForElement(element, FloatSize(width, height));
+}
+
+int QWEBKIT_EXPORT qt_drt_numberOfPages(QWebFrame* qFrame, float width, float height)
+{
+ Frame* frame = QWebFramePrivate::core(qFrame);
+ if (!frame)
+ return -1;
+
+ return PrintContext::numberOfPages(frame, FloatSize(width, height));
+}
+
// Suspend active DOM objects in this frame.
void QWEBKIT_EXPORT qt_suspendActiveDOMObjects(QWebFrame* qFrame)
{
@@ -212,6 +268,93 @@ void QWEBKIT_EXPORT qt_resumeActiveDOMObjects(QWebFrame* qFrame)
frame->document()->resumeActiveDOMObjects();
}
+void QWEBKIT_EXPORT qt_drt_evaluateScriptInIsolatedWorld(QWebFrame* qFrame, int worldId, const QString& script)
+{
+ Frame* frame = QWebFramePrivate::core(qFrame);
+ if (frame)
+ JSC::JSValue result = frame->script()->executeScriptInWorld(mainThreadNormalWorld(), script, true).jsValue();
+}
+
+static bool webframe_scrollOverflow(WebCore::Frame* frame, int dx, int dy, const QPoint& pos)
+{
+ if (!frame || !frame->document() || !frame->eventHandler())
+ return false;
+
+ Node* node = frame->document()->elementFromPoint(pos.x(), pos.y());
+ if (!node)
+ return false;
+
+ RenderObject* renderer = node->renderer();
+ if (!renderer)
+ return false;
+
+ if (renderer->isListBox())
+ return false;
+
+ RenderLayer* renderLayer = renderer->enclosingLayer();
+ if (!renderLayer)
+ return false;
+
+ bool scrolledHorizontal = false;
+ bool scrolledVertical = false;
+
+ if (dx > 0)
+ scrolledHorizontal = renderLayer->scroll(ScrollRight, ScrollByPixel, dx);
+ else if (dx < 0)
+ scrolledHorizontal = renderLayer->scroll(ScrollLeft, ScrollByPixel, qAbs(dx));
+
+ if (dy > 0)
+ scrolledVertical = renderLayer->scroll(ScrollDown, ScrollByPixel, dy);
+ else if (dy < 0)
+ scrolledVertical = renderLayer->scroll(ScrollUp, ScrollByPixel, qAbs(dy));
+
+ return (scrolledHorizontal || scrolledVertical);
+}
+
+
+/*!
+ \internal
+ Scrolls nested frames starting at this frame, \a dx pixels to the right
+ and \a dy pixels downward. Both \a dx and \a dy may be negative. First attempts
+ to scroll elements with CSS overflow at position pos, followed by this frame. If this
+ frame doesn't scroll, attempts to scroll the parent
+*/
+void QWEBKIT_EXPORT qtwebkit_webframe_scrollRecursively(QWebFrame* qFrame, int dx, int dy, const QPoint& pos)
+{
+ Frame* frame = QWebFramePrivate::core(qFrame);
+
+ if (!frame || !frame->view())
+ return;
+
+ if (!webframe_scrollOverflow(frame, dx, dy, pos)) {
+ do {
+ bool scrolledHorizontal = false;
+ bool scrolledVertical = false;
+
+ IntSize scrollOffset = frame->view()->scrollOffset();
+ IntPoint maxScrollOffset = frame->view()->maximumScrollPosition();
+
+ if (dx > 0) // scroll right
+ scrolledHorizontal = scrollOffset.width() < maxScrollOffset.x();
+ else if (dx < 0) // scroll left
+ scrolledHorizontal = scrollOffset.width() > 0;
+
+ if (dy > 0) // scroll down
+ scrolledVertical = scrollOffset.height() < maxScrollOffset.y();
+ else if (dy < 0) //scroll up
+ scrolledVertical = scrollOffset.height() > 0;
+
+ if (scrolledHorizontal || scrolledVertical) {
+ frame->view()->scrollBy(IntSize(dx, dy));
+ return;
+ }
+
+ frame = frame->tree()->parent();
+ } while (frame && frame->view());
+ }
+}
+
+
QWebFrameData::QWebFrameData(WebCore::Page* parentPage, WebCore::Frame* parentFrame,
WebCore::HTMLFrameOwnerElement* ownerFrameElement,
const WebCore::String& frameName)
@@ -245,6 +388,21 @@ void QWebFramePrivate::init(QWebFrame *qframe, QWebFrameData *frameData)
frame->init();
}
+void QWebFramePrivate::setPage(QWebPage* newPage)
+{
+ if (page == newPage)
+ return;
+
+ // The QWebFrame is created as a child of QWebPage or a parent QWebFrame.
+ // That adds it to QObject's internal children list and ensures it will be
+ // deleted when parent QWebPage is deleted. Reparent if needed.
+ if (q->parent() == qobject_cast<QObject*>(page))
+ q->setParent(newPage);
+
+ page = newPage;
+ emit q->pageChanged();
+}
+
WebCore::Scrollbar* QWebFramePrivate::horizontalScrollBar() const
{
if (!frame->view())
@@ -259,8 +417,11 @@ WebCore::Scrollbar* QWebFramePrivate::verticalScrollBar() const
return frame->view()->verticalScrollbar();
}
-void QWebFramePrivate::renderPrivate(QPainter *painter, QWebFrame::RenderLayer layer, const QRegion &clip)
+#if ENABLE(TILED_BACKING_STORE)
+void QWebFramePrivate::renderFromTiledBackingStore(GraphicsContext* context, const QRegion& clip)
{
+ ASSERT(frame->tiledBackingStore());
+
if (!frame->view() || !frame->contentRenderer())
return;
@@ -268,15 +429,46 @@ void QWebFramePrivate::renderPrivate(QPainter *painter, QWebFrame::RenderLayer l
if (vector.isEmpty())
return;
- GraphicsContext context(painter);
- if (context.paintingDisabled() && !context.updatingControlTints())
+ QPainter* painter = context->platformContext();
+
+ WebCore::FrameView* view = frame->view();
+
+ int scrollX = view->scrollX();
+ int scrollY = view->scrollY();
+ context->translate(-scrollX, -scrollY);
+
+ for (int i = 0; i < vector.size(); ++i) {
+ const QRect& clipRect = vector.at(i);
+
+ painter->save();
+
+ QRect rect = clipRect.translated(scrollX, scrollY);
+ painter->setClipRect(rect, Qt::IntersectClip);
+
+ frame->tiledBackingStore()->paint(context, rect);
+
+ painter->restore();
+ }
+}
+#endif
+
+void QWebFramePrivate::renderRelativeCoords(GraphicsContext* context, QWebFrame::RenderLayer layer, const QRegion& clip)
+{
+ if (!frame->view() || !frame->contentRenderer())
+ return;
+
+ QVector<QRect> vector = clip.rects();
+ if (vector.isEmpty())
return;
+ QPainter* painter = context->platformContext();
+
WebCore::FrameView* view = frame->view();
view->layoutIfNeededRecursive();
for (int i = 0; i < vector.size(); ++i) {
const QRect& clipRect = vector.at(i);
+
QRect intersectedRect = clipRect.intersected(view->frameRect());
painter->save();
@@ -286,84 +478,46 @@ void QWebFramePrivate::renderPrivate(QPainter *painter, QWebFrame::RenderLayer l
int y = view->y();
if (layer & QWebFrame::ContentsLayer) {
- context.save();
+ context->save();
int scrollX = view->scrollX();
int scrollY = view->scrollY();
QRect rect = intersectedRect;
- context.translate(x, y);
+ context->translate(x, y);
rect.translate(-x, -y);
- context.translate(-scrollX, -scrollY);
+ context->translate(-scrollX, -scrollY);
rect.translate(scrollX, scrollY);
- context.clip(view->visibleContentRect());
+ context->clip(view->visibleContentRect());
- view->paintContents(&context, rect);
+ view->paintContents(context, rect);
- context.restore();
+ context->restore();
}
if (layer & QWebFrame::ScrollBarLayer
&& !view->scrollbarsSuppressed()
&& (view->horizontalScrollbar() || view->verticalScrollbar())) {
- context.save();
+ context->save();
QRect rect = intersectedRect;
- context.translate(x, y);
+ context->translate(x, y);
rect.translate(-x, -y);
- view->paintScrollbars(&context, rect);
+ view->paintScrollbars(context, rect);
- context.restore();
+ context->restore();
}
+#if ENABLE(PAN_SCROLLING)
if (layer & QWebFrame::PanIconLayer)
- view->paintPanScrollIcon(&context);
+ view->paintPanScrollIcon(context);
+#endif
painter->restore();
}
}
-static bool webframe_scrollOverflow(WebCore::Frame* frame, int dx, int dy, const QPoint& pos)
-{
- if (!frame || !frame->document() || !frame->eventHandler())
- return false;
-
- Node* node = frame->document()->elementFromPoint(pos.x(), pos.y());
- if (!node)
- return false;
-
- RenderObject* renderer = node->renderer();
- if (!renderer)
- return false;
-
- if (renderer->isListBox())
- return false;
-
- RenderLayer* renderLayer = renderer->enclosingLayer();
- if (!renderLayer)
- return false;
-
- bool scrolledHorizontal = false;
- bool scrolledVertical = false;
-
- if (dx > 0)
- scrolledHorizontal = renderLayer->scroll(ScrollRight, ScrollByPixel, dx);
- else if (dx < 0)
- scrolledHorizontal = renderLayer->scroll(ScrollLeft, ScrollByPixel, qAbs(dx));
-
- if (dy > 0)
- scrolledVertical = renderLayer->scroll(ScrollDown, ScrollByPixel, dy);
- else if (dy < 0)
- scrolledVertical = renderLayer->scroll(ScrollUp, ScrollByPixel, qAbs(dy));
-
- return (scrolledHorizontal || scrolledVertical);
-}
-
-
-
-
-
/*!
\class QWebFrame
\since 4.4
@@ -554,7 +708,7 @@ QString QWebFrame::renderTreeDump() const
if (d->frame->view() && d->frame->view()->layoutPending())
d->frame->view()->layout();
- return externalRepresentation(d->frame->contentRenderer());
+ return externalRepresentation(d->frame);
}
/*!
@@ -726,58 +880,16 @@ QWebPage *QWebFrame::page() const
*/
void QWebFrame::load(const QUrl &url)
{
-#if QT_VERSION < 0x040400
- load(QWebNetworkRequest(ensureAbsoluteUrl(url)));
-#else
load(QNetworkRequest(ensureAbsoluteUrl(url)));
-#endif
-}
-
-#if QT_VERSION < 0x040400
-/*!
- Loads a network request, \a req, into this frame.
-
- \note The view remains the same until enough data has arrived to display the new url.
-*/
-void QWebFrame::load(const QWebNetworkRequest &req)
-{
- if (d->parentFrame())
- d->page->d->insideOpenCall = true;
-
- QUrl url = ensureAbsoluteUrl(req.url());
- QHttpRequestHeader httpHeader = req.httpHeader();
- QByteArray postData = req.postData();
-
- WebCore::ResourceRequest request(url);
-
- QString method = httpHeader.method();
- if (!method.isEmpty())
- request.setHTTPMethod(method);
-
- QList<QPair<QString, QString> > values = httpHeader.values();
- for (int i = 0; i < values.size(); ++i) {
- const QPair<QString, QString> &val = values.at(i);
- request.addHTTPHeaderField(val.first, val.second);
- }
-
- if (!postData.isEmpty())
- request.setHTTPBody(WebCore::FormData::create(postData.constData(), postData.size()));
-
- d->frame->loader()->load(request, false);
-
- if (d->parentFrame())
- d->page->d->insideOpenCall = false;
}
-#else
-
/*!
Loads a network request, \a req, into this frame, using the method specified in \a
operation.
\a body is optional and is only used for POST operations.
- \note The view remains the same until enough data has arrived to display the new \a url.
+ \note The view remains the same until enough data has arrived to display the new content.
\sa setUrl()
*/
@@ -829,7 +941,6 @@ void QWebFrame::load(const QNetworkRequest &req,
if (d->parentFrame())
d->page->d->insideOpenCall = false;
}
-#endif
/*!
Sets the content of this frame to \a html. \a baseUrl is optional and used to resolve relative
@@ -837,10 +948,6 @@ void QWebFrame::load(const QNetworkRequest &req,
The \a html is loaded immediately; external objects are loaded asynchronously.
- If a script in the \a html runs longer than the default script timeout (currently 10 seconds),
- for example due to being blocked by a modal JavaScript alert dialog, this method will return
- as soon as possible after the timeout and any subsequent \a html will be loaded asynchronously.
-
When using this method WebKit assumes that external resources such as JavaScript programs or style
sheets are encoded in UTF-8 unless otherwise specified. For example, the encoding of an external
script can be specified through the charset attribute of the HTML script tag. It is also possible
@@ -942,11 +1049,13 @@ void QWebFrame::setScrollBarPolicy(Qt::Orientation orientation, Qt::ScrollBarPol
d->horizontalScrollBarPolicy = policy;
if (d->frame->view()) {
d->frame->view()->setHorizontalScrollbarMode((ScrollbarMode)policy);
+ d->frame->view()->updateCanHaveScrollbars();
}
} else {
d->verticalScrollBarPolicy = policy;
if (d->frame->view()) {
d->frame->view()->setVerticalScrollbarMode((ScrollbarMode)policy);
+ d->frame->view()->updateCanHaveScrollbars();
}
}
}
@@ -1048,48 +1157,6 @@ void QWebFrame::scroll(int dx, int dy)
}
/*!
- \internal
- Scrolls nested frames starting at this frame, \a dx pixels to the right
- and \a dy pixels downward. Both \a dx and \a dy may be negative. First attempts
- to scroll elements with CSS overflow at position pos, followed by this frame. If this
- frame doesn't scroll, attempts to scroll the parent
-*/
-void QWEBKIT_EXPORT qtwebkit_webframe_scrollRecursively(QWebFrame* qFrame, int dx, int dy, const QPoint& pos)
-{
- Frame* frame = QWebFramePrivate::core(qFrame);
-
- if (!frame || !frame->view())
- return;
-
- if (!webframe_scrollOverflow(frame, dx, dy, pos)) {
- do {
- bool scrolledHorizontal = false;
- bool scrolledVertical = false;
-
- IntSize scrollOffset = frame->view()->scrollOffset();
- IntPoint maxScrollOffset = frame->view()->maximumScrollPosition();
-
- if (dx > 0) // scroll right
- scrolledHorizontal = scrollOffset.width() < maxScrollOffset.x();
- else if (dx < 0) // scroll left
- scrolledHorizontal = scrollOffset.width() > 0;
-
- if (dy > 0) // scroll down
- scrolledVertical = scrollOffset.height() < maxScrollOffset.y();
- else if (dy < 0) //scroll up
- scrolledVertical = scrollOffset.height() > 0;
-
- if (scrolledHorizontal || scrolledVertical) {
- frame->view()->scrollBy(IntSize(dx, dy));
- return;
- }
-
- frame = frame->tree()->parent();
- } while (frame && frame->view());
- }
-}
-
-/*!
\property QWebFrame::scrollPosition
\since 4.5
\brief the position the frame is currently scrolled to.
@@ -1113,6 +1180,17 @@ void QWebFrame::setScrollPosition(const QPoint &pos)
}
/*!
+ \since 4.7
+ Scrolls the frame to the given \a anchor name.
+*/
+void QWebFrame::scrollToAnchor(const QString& anchor)
+{
+ FrameView *view = d->frame->view();
+ if (view)
+ view->scrollToAnchor(anchor);
+}
+
+/*!
\since 4.6
Render the \a layer of the frame using \a painter clipping to \a clip.
@@ -1121,29 +1199,41 @@ void QWebFrame::setScrollPosition(const QPoint &pos)
void QWebFrame::render(QPainter* painter, RenderLayer layer, const QRegion& clip)
{
+ GraphicsContext context(painter);
+ if (context.paintingDisabled() && !context.updatingControlTints())
+ return;
+
if (!clip.isEmpty())
- d->renderPrivate(painter, layer, clip);
+ d->renderRelativeCoords(&context, layer, clip);
else if (d->frame->view())
- d->renderPrivate(painter, layer, QRegion(d->frame->view()->frameRect()));
+ d->renderRelativeCoords(&context, layer, QRegion(d->frame->view()->frameRect()));
}
/*!
Render the frame into \a painter clipping to \a clip.
*/
-void QWebFrame::render(QPainter *painter, const QRegion &clip)
+void QWebFrame::render(QPainter* painter, const QRegion& clip)
{
- d->renderPrivate(painter, AllLayers, clip);
+ GraphicsContext context(painter);
+ if (context.paintingDisabled() && !context.updatingControlTints())
+ return;
+
+ d->renderRelativeCoords(&context, AllLayers, clip);
}
/*!
Render the frame into \a painter.
*/
-void QWebFrame::render(QPainter *painter)
+void QWebFrame::render(QPainter* painter)
{
if (!d->frame->view())
return;
- d->renderPrivate(painter, AllLayers, QRegion(d->frame->view()->frameRect()));
+ GraphicsContext context(painter);
+ if (context.paintingDisabled() && !context.updatingControlTints())
+ return;
+
+ d->renderRelativeCoords(&context, AllLayers, QRegion(d->frame->view()->frameRect()));
}
/*!
@@ -1164,7 +1254,7 @@ void QWebFrame::render(QPainter *painter)
*/
void QWebFrame::setTextSizeMultiplier(qreal factor)
{
- d->frame->setZoomFactor(factor, /*isTextOnly*/true);
+ d->frame->setZoomFactor(factor, ZoomTextOnly);
}
/*!
@@ -1183,7 +1273,7 @@ qreal QWebFrame::textSizeMultiplier() const
void QWebFrame::setZoomFactor(qreal factor)
{
- d->frame->setZoomFactor(factor, d->frame->isZoomFactorTextOnly());
+ d->frame->setZoomFactor(factor, d->frame->zoomMode());
}
qreal QWebFrame::zoomFactor() const
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.h
index 08285f8..ce9805b 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.h
@@ -26,9 +26,7 @@
#include <QtCore/qvariant.h>
#include <QtGui/qicon.h>
#include <QtScript/qscriptengine.h>
-#if QT_VERSION >= 0x040400
#include <QtNetwork/qnetworkaccessmanager.h>
-#endif
#include "qwebkitglobal.h"
QT_BEGIN_NAMESPACE
@@ -123,13 +121,9 @@ public:
QWebPage *page() const;
void load(const QUrl &url);
-#if QT_VERSION < 0x040400
- void load(const QWebNetworkRequest &request);
-#else
void load(const QNetworkRequest &request,
QNetworkAccessManager::Operation operation = QNetworkAccessManager::GetOperation,
const QByteArray &body = QByteArray());
-#endif
void setHtml(const QString &html, const QUrl &baseUrl = QUrl());
void setContent(const QByteArray &data, const QString &mimeType = QString(), const QUrl &baseUrl = QUrl());
@@ -165,6 +159,8 @@ public:
QPoint scrollPosition() const;
void setScrollPosition(const QPoint &pos);
+ void scrollToAnchor(const QString& anchor);
+
enum RenderLayer {
ContentsLayer = 0x10,
ScrollBarLayer = 0x20,
@@ -222,7 +218,10 @@ Q_SIGNALS:
void loadStarted();
void loadFinished(bool ok);
+ void pageChanged();
+
private:
+ friend class QGraphicsWebView;
friend class QWebPage;
friend class QWebPagePrivate;
friend class QWebFramePrivate;
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe_p.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe_p.h
index 095d134..fcc37e7 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe_p.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe_p.h
@@ -25,6 +25,7 @@
#include "qwebpage_p.h"
#include "EventHandler.h"
+#include "GraphicsContext.h"
#include "KURL.h"
#include "PlatformString.h"
#include "qwebelement.h"
@@ -72,6 +73,7 @@ public:
, marginHeight(-1)
{}
void init(QWebFrame* qframe, QWebFrameData* frameData);
+ void setPage(QWebPage*);
inline QWebFrame *parentFrame() { return qobject_cast<QWebFrame*>(q->parent()); }
@@ -81,9 +83,10 @@ public:
static WebCore::Frame* core(QWebFrame*);
static QWebFrame* kit(WebCore::Frame*);
- void renderPrivate(QPainter*, QWebFrame::RenderLayer, const QRegion& clip);
-
- bool scrollOverflow(int dx, int dy);
+ void renderRelativeCoords(WebCore::GraphicsContext*, QWebFrame::RenderLayer, const QRegion& clip);
+#if ENABLE(TILED_BACKING_STORE)
+ void renderFromTiledBackingStore(WebCore::GraphicsContext*, const QRegion& clip);
+#endif
QWebFrame *q;
Qt::ScrollBarPolicy horizontalScrollBarPolicy;
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.cpp
index 1145744..c0e5277 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.cpp
@@ -139,9 +139,6 @@ QSize QWebInspector::sizeHint() const
/*! \reimp */
bool QWebInspector::event(QEvent* ev)
{
- if (ev->type() == QEvent::Close && d->page)
- d->page->d->inspectorController()->setWindowVisible(false);
-
return QWidget::event(ev);
}
@@ -154,14 +151,29 @@ void QWebInspector::resizeEvent(QResizeEvent* event)
/*! \reimp */
void QWebInspector::showEvent(QShowEvent* event)
{
+#if ENABLE(INSPECTOR)
// Allows QWebInspector::show() to init the inspector.
if (d->page)
d->page->d->inspectorController()->show();
+#endif
}
/*! \reimp */
void QWebInspector::hideEvent(QHideEvent* event)
{
+#if ENABLE(INSPECTOR)
+ if (d->page)
+ d->page->d->inspectorController()->close();
+#endif
+}
+
+/*! \reimp */
+void QWebInspector::closeEvent(QCloseEvent* event)
+{
+#if ENABLE(INSPECTOR)
+ if (d->page)
+ d->page->d->inspectorController()->close();
+#endif
}
/*! \internal */
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.h
index a5c1ed5..f192e92 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.h
@@ -43,6 +43,7 @@ protected:
void resizeEvent(QResizeEvent* event);
void showEvent(QShowEvent* event);
void hideEvent(QHideEvent* event);
+ void closeEvent(QCloseEvent* event);
private:
QWebInspectorPrivate* d;
@@ -51,5 +52,6 @@ private:
friend class QWebPage;
friend class QWebPagePrivate;
friend class WebCore::InspectorClientQt;
+ friend class WebCore::InspectorFrontendClientQt;
};
#endif
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebkitglobal.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebkitglobal.h
index 0885bdc..9e8979f 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebkitglobal.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebkitglobal.h
@@ -40,15 +40,4 @@
# endif
#endif
-#if QT_VERSION < 0x040400
- #ifndef QT_BEGIN_NAMESPACE
- #define QT_BEGIN_NAMESPACE
- #endif
-
- #ifndef QT_END_NAMESPACE
- #define QT_END_NAMESPACE
- #endif
-#endif
-
-
#endif // QWEBKITGLOBAL_H
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
index 97a4e4e..4c92c9f 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
@@ -32,6 +32,8 @@
#include "qwebsettings.h"
#include "qwebkitversion.h"
+#include "Chrome.h"
+#include "ContextMenuController.h"
#include "Frame.h"
#include "FrameTree.h"
#include "FrameLoader.h"
@@ -79,6 +81,7 @@
#include "runtime/InitializeThreading.h"
#include "PageGroup.h"
#include "QWebPageClient.h"
+#include "WorkerThread.h"
#include <QApplication>
#include <QBasicTimer>
@@ -102,18 +105,29 @@
#include <QStyle>
#include <QSysInfo>
#include <QTextCharFormat>
-#if QT_VERSION >= 0x040400
+#include <QTextDocument>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
-#else
-#include "qwebnetworkinterface.h"
-#endif
#if defined(Q_WS_X11)
#include <QX11Info>
#endif
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+#include <QTouchEvent>
+#include "PlatformTouchEvent.h"
+#endif
+
using namespace WebCore;
+void QWEBKIT_EXPORT qt_wrt_setViewMode(QWebPage* page, const QString& mode)
+{
+ QWebPagePrivate::priv(page)->viewMode = mode;
+ WebCore::Frame* frame = QWebFramePrivate::core(page->mainFrame());
+ WebCore::FrameView* view = frame->view();
+ frame->document()->updateStyleSelector();
+ view->forceLayout();
+}
+
void QWEBKIT_EXPORT qt_drt_overwritePluginDirectories()
{
PluginDatabase* db = PluginDatabase::installedPlugins(/* populate */ false);
@@ -126,12 +140,26 @@ void QWEBKIT_EXPORT qt_drt_overwritePluginDirectories()
db->refresh();
}
+int QWEBKIT_EXPORT qt_drt_workerThreadCount()
+{
+#if ENABLE(WORKERS)
+ return WebCore::WorkerThread::workerThreadCount();
+#else
+ return 0;
+#endif
+}
+
bool QWebPagePrivate::drtRun = false;
void QWEBKIT_EXPORT qt_drt_run(bool b)
{
QWebPagePrivate::drtRun = b;
}
+void QWEBKIT_EXPORT qt_drt_setFrameFlatteningEnabled(QWebPage* page, bool enabled)
+{
+ QWebPagePrivate::core(page)->settings()->setFrameFlatteningEnabled(enabled);
+}
+
void QWEBKIT_EXPORT qt_webpage_setGroupName(QWebPage* page, const QString& groupName)
{
page->handle()->page->setGroupName(groupName);
@@ -142,6 +170,45 @@ QString QWEBKIT_EXPORT qt_webpage_groupName(QWebPage* page)
return page->handle()->page->groupName();
}
+#if ENABLE(INSPECTOR)
+void QWEBKIT_EXPORT qt_drt_webinspector_executeScript(QWebPage* page, long callId, const QString& script)
+{
+ if (!page->handle()->page->inspectorController())
+ return;
+ page->handle()->page->inspectorController()->evaluateForTestInFrontend(callId, script);
+}
+
+void QWEBKIT_EXPORT qt_drt_webinspector_close(QWebPage* page)
+{
+ if (!page->handle()->page->inspectorController())
+ return;
+ page->handle()->page->inspectorController()->close();
+}
+
+void QWEBKIT_EXPORT qt_drt_webinspector_show(QWebPage* page)
+{
+ if (!page->handle()->page->inspectorController())
+ return;
+ page->handle()->page->inspectorController()->show();
+}
+
+void QWEBKIT_EXPORT qt_drt_setTimelineProfilingEnabled(QWebPage* page, bool enabled)
+{
+ InspectorController* controller = page->handle()->page->inspectorController();
+ if (!controller)
+ return;
+ if (enabled)
+ controller->startTimelineProfiler();
+ else
+ controller->stopTimelineProfiler();
+}
+#endif
+
+void QWEBKIT_EXPORT qt_drt_enableCaretBrowsing(QWebPage* page, bool value)
+{
+ page->handle()->page->settings()->setCaretBrowsingEnabled(value);
+}
+
class QWebPageWidgetClient : public QWebPageClient {
public:
QWebPageWidgetClient(QWidget* view)
@@ -150,6 +217,8 @@ public:
Q_ASSERT(view);
}
+ virtual bool isQWidgetClient() const { return true; }
+
virtual void scroll(int dx, int dy, const QRect&);
virtual void update(const QRect& dirtyRect);
virtual void setInputMethodEnabled(bool enable);
@@ -166,9 +235,12 @@ public:
virtual QPalette palette() const;
virtual int screenNumber() const;
virtual QWidget* ownerWidget() const;
+ virtual QRect geometryRelativeToOwnerWidget() const;
virtual QObject* pluginParent() const;
+ virtual QStyle* style() const;
+
QWidget* view;
};
@@ -221,10 +293,8 @@ QPalette QWebPageWidgetClient::palette() const
int QWebPageWidgetClient::screenNumber() const
{
#if defined(Q_WS_X11)
- if (view)
- return view->x11Info().screen();
+ return view->x11Info().screen();
#endif
-
return 0;
}
@@ -233,11 +303,21 @@ QWidget* QWebPageWidgetClient::ownerWidget() const
return view;
}
+QRect QWebPageWidgetClient::geometryRelativeToOwnerWidget() const
+{
+ return view->geometry();
+}
+
QObject* QWebPageWidgetClient::pluginParent() const
{
return view;
}
+QStyle* QWebPageWidgetClient::style() const
+{
+ return view->style();
+}
+
// Lookup table mapping QWebPage::WebActions to the associated Editor commands
static const char* editorCommandWebActions[] =
{
@@ -341,8 +421,10 @@ static inline DragOperation dropActionToDragOp(Qt::DropActions actions)
unsigned result = 0;
if (actions & Qt::CopyAction)
result |= DragOperationCopy;
+ // DragOperationgeneric represents InternetExplorer's equivalent of Move operation,
+ // hence it should be considered as "move"
if (actions & Qt::MoveAction)
- result |= DragOperationMove;
+ result |= (DragOperationMove | DragOperationGeneric);
if (actions & Qt::LinkAction)
result |= DragOperationLink;
return (DragOperation)result;
@@ -355,6 +437,10 @@ static inline Qt::DropAction dragOpToDropAction(unsigned actions)
result = Qt::CopyAction;
else if (actions & DragOperationMove)
result = Qt::MoveAction;
+ // DragOperationgeneric represents InternetExplorer's equivalent of Move operation,
+ // hence it should be considered as "move"
+ else if (actions & DragOperationGeneric)
+ result = Qt::MoveAction;
else if (actions & DragOperationLink)
result = Qt::LinkAction;
return result;
@@ -366,11 +452,11 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
#if QT_VERSION < 0x040600
, view(0)
#endif
+ , clickCausedFocus(false)
+ , viewportSize(QSize(0, 0))
, inspectorFrontend(0)
, inspector(0)
, inspectorIsInternalOnly(false)
- , viewportSize(QSize(0, 0))
- , clickCausedFocus(false)
{
WebCore::InitializeLoggingChannelsIfNecessary();
JSC::initializeThreading();
@@ -380,7 +466,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);
+ new DragClientQt(q), new InspectorClientQt(q), 0, 0);
settings = new QWebSettings(page->settings());
@@ -388,11 +474,7 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
undoStack = 0;
#endif
mainFrame = 0;
-#if QT_VERSION < 0x040400
- networkInterface = 0;
-#else
networkManager = 0;
-#endif
pluginFactory = 0;
insideOpenCall = false;
forwardUnsupportedContent = false;
@@ -421,15 +503,16 @@ QWebPagePrivate::~QWebPagePrivate()
delete page;
}
-#if QT_VERSION < 0x040400
-bool QWebPagePrivate::acceptNavigationRequest(QWebFrame *frame, const QWebNetworkRequest &request, QWebPage::NavigationType type)
+WebCore::Page* QWebPagePrivate::core(QWebPage* page)
{
- if (insideOpenCall
- && frame == mainFrame)
- return true;
- return q->acceptNavigationRequest(frame, request, type);
+ return page->d->page;
}
-#else
+
+QWebPagePrivate* QWebPagePrivate::priv(QWebPage* page)
+{
+ return page->d;
+}
+
bool QWebPagePrivate::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type)
{
if (insideOpenCall
@@ -437,7 +520,6 @@ bool QWebPagePrivate::acceptNavigationRequest(QWebFrame *frame, const QNetworkRe
return true;
return q->acceptNavigationRequest(frame, request, type);
}
-#endif
void QWebPagePrivate::createMainFrame()
{
@@ -473,7 +555,9 @@ static QWebPage::WebAction webActionForContextMenuAction(WebCore::ContextMenuAct
case WebCore::ContextMenuItemTagBold: return QWebPage::ToggleBold;
case WebCore::ContextMenuItemTagItalic: return QWebPage::ToggleItalic;
case WebCore::ContextMenuItemTagUnderline: return QWebPage::ToggleUnderline;
+#if ENABLE(INSPECTOR)
case WebCore::ContextMenuItemTagInspectElement: return QWebPage::InspectElement;
+#endif
default: break;
}
return QWebPage::NoWebAction;
@@ -483,7 +567,10 @@ static QWebPage::WebAction webActionForContextMenuAction(WebCore::ContextMenuAct
QMenu *QWebPagePrivate::createContextMenu(const WebCore::ContextMenu *webcoreMenu,
const QList<WebCore::ContextMenuItem> *items, QBitArray *visitedWebActions)
{
- QMenu* menu = new QMenu(q->view());
+ if (!client)
+ return 0;
+
+ QMenu* menu = new QMenu(client->ownerWidget());
for (int i = 0; i < items->count(); ++i) {
const ContextMenuItem &item = items->at(i);
switch (item.type()) {
@@ -991,10 +1078,8 @@ QWebPage::WebAction QWebPagePrivate::editorActionForKeyEvent(QKeyEvent* event)
{ QKeySequence::SelectEndOfDocument, QWebPage::SelectEndOfDocument },
{ QKeySequence::DeleteStartOfWord, QWebPage::DeleteStartOfWord },
{ QKeySequence::DeleteEndOfWord, QWebPage::DeleteEndOfWord },
-#if QT_VERSION >= 0x040500
{ QKeySequence::InsertParagraphSeparator, QWebPage::InsertParagraphSeparator },
{ QKeySequence::InsertLineSeparator, QWebPage::InsertLineSeparator },
-#endif
{ QKeySequence::SelectAll, QWebPage::SelectAll },
{ QKeySequence::UnknownKey, QWebPage::NoWebAction }
};
@@ -1019,8 +1104,8 @@ void QWebPagePrivate::keyPressEvent(QKeyEvent *ev)
if (!handled) {
handled = true;
QFont defaultFont;
- if (q->view())
- defaultFont = q->view()->font();
+ if (client)
+ defaultFont = client->ownerWidget()->font();
QFontMetrics fm(defaultFont);
if (!handleScrolling(ev, frame)) {
switch (ev->key()) {
@@ -1079,8 +1164,9 @@ void QWebPagePrivate::focusOutEvent(QFocusEvent*)
// and the focus frame. But don't tell the focus controller so that upon
// focusInEvent() we can re-activate the frame.
FocusController *focusController = page->focusController();
- focusController->setActive(false);
+ // Call setFocused first so that window.onblur doesn't get called twice
focusController->setFocused(false);
+ focusController->setActive(false);
}
void QWebPagePrivate::dragEnterEvent(QGraphicsSceneDragDropEvent* ev)
@@ -1102,8 +1188,9 @@ void QWebPagePrivate::dragEnterEvent(QDragEnterEvent* ev)
dropActionToDragOp(ev->possibleActions()));
Qt::DropAction action = dragOpToDropAction(page->dragController()->dragEntered(&dragData));
ev->setDropAction(action);
- if (action != Qt::IgnoreAction)
- ev->accept();
+ // We must accept this event in order to receive the drag move events that are sent
+ // while the drag and drop action is in progress.
+ ev->accept();
#endif
}
@@ -1143,9 +1230,11 @@ void QWebPagePrivate::dragMoveEvent(QDragMoveEvent* ev)
DragData dragData(ev->mimeData(), ev->pos(), QCursor::pos(),
dropActionToDragOp(ev->possibleActions()));
Qt::DropAction action = dragOpToDropAction(page->dragController()->dragUpdated(&dragData));
+ m_lastDropAction = action;
ev->setDropAction(action);
- if (action != Qt::IgnoreAction)
- ev->accept();
+ // We must accept this event in order to receive the drag move events that are sent
+ // while the drag and drop action is in progress.
+ ev->accept();
#endif
}
@@ -1154,8 +1243,7 @@ void QWebPagePrivate::dropEvent(QGraphicsSceneDragDropEvent* ev)
#ifndef QT_NO_DRAGANDDROP
DragData dragData(ev->mimeData(), ev->pos().toPoint(),
QCursor::pos(), dropActionToDragOp(ev->possibleActions()));
- Qt::DropAction action = dragOpToDropAction(page->dragController()->performDrag(&dragData));
- if (action != Qt::IgnoreAction)
+ if (page->dragController()->performDrag(&dragData))
ev->accept();
#endif
}
@@ -1163,10 +1251,11 @@ void QWebPagePrivate::dropEvent(QGraphicsSceneDragDropEvent* ev)
void QWebPagePrivate::dropEvent(QDropEvent* ev)
{
#ifndef QT_NO_DRAGANDDROP
+ // Overwrite the defaults set by QDragManager::defaultAction()
+ ev->setDropAction(m_lastDropAction);
DragData dragData(ev->mimeData(), ev->pos(), QCursor::pos(),
- dropActionToDragOp(ev->possibleActions()));
- Qt::DropAction action = dragOpToDropAction(page->dragController()->performDrag(&dragData));
- if (action != Qt::IgnoreAction)
+ dropActionToDragOp(Qt::DropAction(ev->dropAction())));
+ if (page->dragController()->performDrag(&dragData))
ev->accept();
#endif
}
@@ -1235,7 +1324,7 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev)
break;
}
case QInputMethodEvent::Cursor: {
- frame->setCaretVisible(a.length); //if length is 0 cursor is invisible
+ frame->selection()->setCaretVisible(a.length); //if length is 0 cursor is invisible
if (a.length > 0) {
RenderObject* caretRenderer = frame->selection()->caretRenderer();
if (caretRenderer) {
@@ -1313,16 +1402,16 @@ bool QWebPagePrivate::handleScrolling(QKeyEvent *ev, Frame *frame)
granularity = ScrollByPage;
direction = ScrollDown;
} else if (ev == QKeySequence::MoveToPreviousPage
- || (ev->key() == Qt::Key_Space) && (ev->modifiers() & Qt::ShiftModifier)) {
+ || ((ev->key() == Qt::Key_Space) && (ev->modifiers() & Qt::ShiftModifier))) {
granularity = ScrollByPage;
direction = ScrollUp;
} else
#endif // QT_NO_SHORTCUT
- if (ev->key() == Qt::Key_Up && ev->modifiers() & Qt::ControlModifier
+ if ((ev->key() == Qt::Key_Up && ev->modifiers() & Qt::ControlModifier)
|| ev->key() == Qt::Key_Home) {
granularity = ScrollByDocument;
direction = ScrollUp;
- } else if (ev->key() == Qt::Key_Down && ev->modifiers() & Qt::ControlModifier
+ } else if ((ev->key() == Qt::Key_Down && ev->modifiers() & Qt::ControlModifier)
|| ev->key() == Qt::Key_End) {
granularity = ScrollByDocument;
direction = ScrollDown;
@@ -1352,6 +1441,18 @@ bool QWebPagePrivate::handleScrolling(QKeyEvent *ev, Frame *frame)
return frame->eventHandler()->scrollRecursively(direction, granularity);
}
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+void QWebPagePrivate::touchEvent(QTouchEvent* event)
+{
+ WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
+ if (!frame->view())
+ return;
+
+ bool accepted = frame->eventHandler()->handleTouchEvent(PlatformTouchEvent(event));
+ event->setAccepted(accepted);
+}
+#endif
+
/*!
This method is used by the input method to query a set of properties of the page
to be able to support complex input method operations as support for surrounding
@@ -1380,6 +1481,11 @@ QVariant QWebPage::inputMethodQuery(Qt::InputMethodQuery property) const
switch (property) {
case Qt::ImMicroFocus: {
+ WebCore::FrameView* view = frame->view();
+ if (view && view->needsLayout()) {
+ // We can't access absoluteCaretBounds() while the view needs to layout.
+ return QVariant();
+ }
return QVariant(frame->selection()->absoluteCaretBounds());
}
case Qt::ImFont: {
@@ -1478,6 +1584,7 @@ void QWebPagePrivate::setInspector(QWebInspector* insp)
*/
QWebInspector* QWebPagePrivate::getOrCreateInspector()
{
+#if ENABLE(INSPECTOR)
if (!inspector) {
QWebInspector* insp = new QWebInspector;
insp->setPage(q);
@@ -1485,13 +1592,18 @@ QWebInspector* QWebPagePrivate::getOrCreateInspector()
Q_ASSERT(inspector); // Associated through QWebInspector::setPage(q)
}
+#endif
return inspector;
}
/*! \internal */
InspectorController* QWebPagePrivate::inspectorController()
{
+#if ENABLE(INSPECTOR)
return page->inspectorController();
+#else
+ return 0;
+#endif
}
@@ -1691,7 +1803,7 @@ QWebPage::QWebPage(QObject *parent)
: QObject(parent)
, d(new QWebPagePrivate(this))
{
- setView(qobject_cast<QWidget *>(parent));
+ setView(qobject_cast<QWidget*>(parent));
connect(this, SIGNAL(loadProgress(int)), this, SLOT(_q_onLoadProgressChanged(int)));
#ifndef NDEBUG
@@ -1775,21 +1887,28 @@ QWebHistory *QWebPage::history() const
\sa view()
*/
-void QWebPage::setView(QWidget *view)
-{
- if (this->view() != view) {
- d->view = view;
- if (!view) {
- delete d->client;
- d->client = 0;
- } else {
- if (!d->client)
- d->client = new QWebPageWidgetClient(view);
- else
- static_cast<QWebPageWidgetClient*>(d->client)->view = view;
- }
- setViewportSize(view ? view->size() : QSize(0, 0));
+void QWebPage::setView(QWidget* view)
+{
+ if (this->view() == view)
+ return;
+
+ d->view = view;
+ setViewportSize(view ? view->size() : QSize(0, 0));
+
+ // If we have no client, we install a special client delegating
+ // the responsibility to the QWidget. This is the code path
+ // handling a.o. the "legacy" QWebView.
+ //
+ // If such a special delegate already exist, we substitute the view.
+
+ if (d->client) {
+ if (d->client->isQWidgetClient())
+ static_cast<QWebPageWidgetClient*>(d->client)->view = view;
+ return;
}
+
+ if (view)
+ d->client = new QWebPageWidgetClient(view);
}
/*!
@@ -1830,7 +1949,8 @@ void QWebPage::javaScriptAlert(QWebFrame *frame, const QString& msg)
{
Q_UNUSED(frame)
#ifndef QT_NO_MESSAGEBOX
- QMessageBox::information(view(), tr("JavaScript Alert - %1").arg(mainFrame()->url().host()), msg, QMessageBox::Ok);
+ QWidget* parent = (d->client) ? d->client->ownerWidget() : 0;
+ QMessageBox::information(parent, tr("JavaScript Alert - %1").arg(mainFrame()->url().host()), Qt::escape(msg), QMessageBox::Ok);
#endif
}
@@ -1846,7 +1966,8 @@ bool QWebPage::javaScriptConfirm(QWebFrame *frame, const QString& msg)
#ifdef QT_NO_MESSAGEBOX
return true;
#else
- return QMessageBox::Yes == QMessageBox::information(view(), tr("JavaScript Confirm - %1").arg(mainFrame()->url().host()), msg, QMessageBox::Yes, QMessageBox::No);
+ QWidget* parent = (d->client) ? d->client->ownerWidget() : 0;
+ return QMessageBox::Yes == QMessageBox::information(parent, tr("JavaScript Confirm - %1").arg(mainFrame()->url().host()), Qt::escape(msg), QMessageBox::Yes, QMessageBox::No);
#endif
}
@@ -1865,7 +1986,8 @@ bool QWebPage::javaScriptPrompt(QWebFrame *frame, const QString& msg, const QStr
Q_UNUSED(frame)
bool ok = false;
#ifndef QT_NO_INPUTDIALOG
- QString x = QInputDialog::getText(view(), tr("JavaScript Prompt - %1").arg(mainFrame()->url().host()), msg, QLineEdit::Normal, defaultValue, &ok);
+ QWidget* parent = (d->client) ? d->client->ownerWidget() : 0;
+ QString x = QInputDialog::getText(parent, tr("JavaScript Prompt - %1").arg(mainFrame()->url().host()), Qt::escape(msg), QLineEdit::Normal, defaultValue, &ok);
if (ok && result)
*result = x;
#endif
@@ -1890,7 +2012,8 @@ bool QWebPage::shouldInterruptJavaScript()
#ifdef QT_NO_MESSAGEBOX
return false;
#else
- return QMessageBox::Yes == QMessageBox::information(view(), tr("JavaScript Problem - %1").arg(mainFrame()->url().host()), tr("The script on this page appears to have a problem. Do you want to stop the script?"), QMessageBox::Yes, QMessageBox::No);
+ QWidget* parent = (d->client) ? d->client->ownerWidget() : 0;
+ return QMessageBox::Yes == QMessageBox::information(parent, tr("JavaScript Problem - %1").arg(mainFrame()->url().host()), tr("The script on this page appears to have a problem. Do you want to stop the script?"), QMessageBox::Yes, QMessageBox::No);
#endif
}
@@ -1903,11 +2026,13 @@ bool QWebPage::shouldInterruptJavaScript()
If the view associated with the web page is a QWebView object, then the default implementation forwards
the request to QWebView's createWindow() function; otherwise it returns a null pointer.
+ If \a type is WebModalDialog, the application must call setWindowModality(Qt::ApplicationModal) on the new window.
+
\sa acceptNavigationRequest()
*/
QWebPage *QWebPage::createWindow(WebWindowType type)
{
- QWebView *webView = qobject_cast<QWebView *>(view());
+ QWebView *webView = qobject_cast<QWebView*>(view());
if (webView) {
QWebView *newView = webView->createWindow(type);
if (newView)
@@ -2033,11 +2158,13 @@ void QWebPage::triggerAction(WebAction action, bool)
editor->setBaseWritingDirection(RightToLeftWritingDirection);
break;
case InspectElement: {
+#if ENABLE(INSPECTOR)
if (!d->hitTestResult.isNull()) {
d->getOrCreateInspector(); // Make sure the inspector is created
d->inspector->show(); // The inspector is expected to be shown on inspection
d->page->inspectorController()->inspect(d->hitTestResult.d->innerNonSharedNode.get());
}
+#endif
break;
}
default:
@@ -2134,11 +2261,7 @@ void QWebPage::setPreferredContentsSize(const QSize &size) const
\sa createWindow()
*/
-#if QT_VERSION >= 0x040400
bool QWebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type)
-#else
-bool QWebPage::acceptNavigationRequest(QWebFrame *frame, const QWebNetworkRequest &request, QWebPage::NavigationType type)
-#endif
{
Q_UNUSED(frame)
if (type == NavigationTypeLinkClicked) {
@@ -2193,7 +2316,7 @@ QAction *QWebPage::action(WebAction action) const
QString text;
QIcon icon;
- QStyle *style = view() ? view()->style() : qApp->style();
+ QStyle *style = d->client ? d->client->style() : qApp->style();
bool checkable = false;
switch (action) {
@@ -2226,27 +2349,19 @@ QAction *QWebPage::action(WebAction action) const
case Back:
text = contextMenuItemTagGoBack();
-#if QT_VERSION >= 0x040400
icon = style->standardIcon(QStyle::SP_ArrowBack);
-#endif
break;
case Forward:
text = contextMenuItemTagGoForward();
-#if QT_VERSION >= 0x040400
icon = style->standardIcon(QStyle::SP_ArrowForward);
-#endif
break;
case Stop:
text = contextMenuItemTagStop();
-#if QT_VERSION >= 0x040400
icon = style->standardIcon(QStyle::SP_BrowserStop);
-#endif
break;
case Reload:
text = contextMenuItemTagReload();
-#if QT_VERSION >= 0x040400
icon = style->standardIcon(QStyle::SP_BrowserReload);
-#endif
break;
case Cut:
@@ -2579,6 +2694,13 @@ bool QWebPage::event(QEvent *ev)
case QEvent::Leave:
d->leaveEvent(ev);
break;
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ case QEvent::TouchBegin:
+ case QEvent::TouchUpdate:
+ case QEvent::TouchEnd:
+ d->touchEvent(static_cast<QTouchEvent*>(ev));
+ break;
+#endif
default:
return QObject::event(ev);
}
@@ -2736,8 +2858,11 @@ void QWebPage::updatePositionDependentActions(const QPoint &pos)
d->hitTestResult = QWebHitTestResult(new QWebHitTestResultPrivate(result));
WebCore::ContextMenu menu(result);
menu.populate();
+
+#if ENABLE(INSPECTOR)
if (d->page->inspectorController()->enabled())
menu.addInspectElementItem();
+#endif
QBitArray visitedWebActions(QWebPage::WebActionCount);
@@ -2888,7 +3013,8 @@ bool QWebPage::extension(Extension extension, const ExtensionOption *option, Ext
if (extension == ChooseMultipleFilesExtension) {
// FIXME: do not ignore suggestedFiles
QStringList suggestedFiles = static_cast<const ChooseMultipleFilesExtensionOption*>(option)->suggestedFileNames;
- QStringList names = QFileDialog::getOpenFileNames(view(), QString::null);
+ QWidget* parent = (d->client) ? d->client->ownerWidget() : 0;
+ QStringList names = QFileDialog::getOpenFileNames(parent, QString::null);
static_cast<ChooseMultipleFilesExtensionReturn*>(output)->fileNames = names;
return true;
}
@@ -2970,41 +3096,13 @@ QString QWebPage::chooseFile(QWebFrame *parentFrame, const QString& suggestedFil
{
Q_UNUSED(parentFrame)
#ifndef QT_NO_FILEDIALOG
- return QFileDialog::getOpenFileName(view(), QString::null, suggestedFile);
+ QWidget* parent = (d->client) ? d->client->ownerWidget() : 0;
+ return QFileDialog::getOpenFileName(parent, QString::null, suggestedFile);
#else
return QString::null;
#endif
}
-#if QT_VERSION < 0x040400 && !defined qdoc
-
-void QWebPage::setNetworkInterface(QWebNetworkInterface *interface)
-{
- d->networkInterface = interface;
-}
-
-QWebNetworkInterface *QWebPage::networkInterface() const
-{
- if (d->networkInterface)
- return d->networkInterface;
- else
- return QWebNetworkInterface::defaultInterface();
-}
-
-#ifndef QT_NO_NETWORKPROXY
-void QWebPage::setNetworkProxy(const QNetworkProxy& proxy)
-{
- d->networkProxy = proxy;
-}
-
-QNetworkProxy QWebPage::networkProxy() const
-{
- return d->networkProxy;
-}
-#endif
-
-#else
-
/*!
Sets the QNetworkAccessManager \a manager responsible for serving network requests for this
QWebPage.
@@ -3038,8 +3136,6 @@ QNetworkAccessManager *QWebPage::networkAccessManager() const
return d->networkManager;
}
-#endif
-
/*!
Sets the QWebPluginFactory \a factory responsible for creating plugins embedded into this
QWebPage.
@@ -3072,6 +3168,8 @@ QWebPluginFactory *QWebPage::pluginFactory() const
"Mozilla/5.0 (%Platform%; %Security%; %Subplatform%; %Locale%) AppleWebKit/%WebKitVersion% (KHTML, like Gecko) %AppVersion Safari/%WebKitVersion%"
+ On mobile platforms such as Symbian S60 and Maemo, "Mobile Safari" is used instead of "Safari".
+
In this string the following values are replaced at run-time:
\list
\o %Platform% and %Subplatform% are expanded to the windowing system and the operation system.
@@ -3279,8 +3377,8 @@ QString QWebPage::userAgentForUrl(const QUrl& url) const
// Language
QLocale locale;
- if (view())
- locale = view()->locale();
+ if (d->client)
+ locale = d->client->ownerWidget()->locale();
QString name = locale.name();
name[2] = QLatin1Char('-');
ua.append(name);
@@ -3294,20 +3392,20 @@ QString QWebPage::userAgentForUrl(const QUrl& url) const
QString appName = QCoreApplication::applicationName();
if (!appName.isEmpty()) {
ua.append(appName);
-#if QT_VERSION >= 0x040400
QString appVer = QCoreApplication::applicationVersion();
if (!appVer.isEmpty())
ua.append(QLatin1Char('/') + appVer);
-#endif
} else {
// Qt version
ua.append(QLatin1String("Qt/"));
ua.append(QLatin1String(qVersion()));
}
- ua.append(QString(QLatin1String(" Safari/%1"))
- .arg(qWebKitVersion()));
-
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+ ua.append(QString(QLatin1String(" Mobile Safari/%1")).arg(qWebKitVersion()));
+#else
+ ua.append(QString(QLatin1String(" Safari/%1")).arg(qWebKitVersion()));
+#endif
return ua;
}
@@ -3460,7 +3558,11 @@ quint64 QWebPage::bytesReceived() const
/*!
\fn void QWebPage::unsupportedContent(QNetworkReply *reply)
- This signal is emitted when WebKit cannot handle a link the user navigated to.
+ This signal is emitted when WebKit cannot handle a link the user navigated to or a
+ web server's response includes a "Content-Disposition" header with the 'attachment'
+ directive. If "Content-Disposition" is present in \a reply, the web server is indicating
+ that the client should prompt the user to save the content regardless of content-type.
+ See RFC 2616 sections 19.5.1 for details about Content-Disposition.
At signal emission time the meta-data of the QNetworkReply \a reply is available.
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h
index 8c455b1..24d0ed9 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h
@@ -54,6 +54,7 @@ namespace WebCore {
class EditorClientQt;
class FrameLoaderClientQt;
class InspectorClientQt;
+ class InspectorFrontendClientQt;
class ResourceHandle;
class HitTestResult;
class QNetworkReplyHandler;
@@ -208,20 +209,8 @@ public:
QUndoStack *undoStack() const;
#endif
-#if QT_VERSION < 0x040400 && !defined(qdoc)
- void setNetworkInterface(QWebNetworkInterface *interface);
- QWebNetworkInterface *networkInterface() const;
-
- // #### why is this in the page itself?
-#ifndef QT_NO_NETWORKPROXY
- void setNetworkProxy(const QNetworkProxy& proxy);
- QNetworkProxy networkProxy() const;
-#endif
-
-#else
void setNetworkAccessManager(QNetworkAccessManager *manager);
QNetworkAccessManager *networkAccessManager() const;
-#endif
void setPluginFactory(QWebPluginFactory *factory);
QWebPluginFactory *pluginFactory() const;
@@ -334,10 +323,8 @@ Q_SIGNALS:
void statusBarVisibilityChangeRequested(bool visible);
void menuBarVisibilityChangeRequested(bool visible);
-#if QT_VERSION >= 0x040400
void unsupportedContent(QNetworkReply *reply);
void downloadRequested(const QNetworkRequest &request);
-#endif
void microFocusChanged();
void contentsChanged();
@@ -350,11 +337,7 @@ protected:
virtual QWebPage *createWindow(WebWindowType type);
virtual QObject *createPlugin(const QString &classid, const QUrl &url, const QStringList &paramNames, const QStringList &paramValues);
-#if QT_VERSION >= 0x040400
virtual bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type);
-#else
- virtual bool acceptNavigationRequest(QWebFrame *frame, const QWebNetworkRequest &request, NavigationType type);
-#endif
virtual QString chooseFile(QWebFrame *originatingFrame, const QString& oldFile);
virtual void javaScriptAlert(QWebFrame *originatingFrame, const QString& msg);
virtual bool javaScriptConfirm(QWebFrame *originatingFrame, const QString& msg);
@@ -373,12 +356,15 @@ private:
friend class QWebFrame;
friend class QWebPagePrivate;
friend class QWebView;
+ friend class QWebViewPrivate;
friend class QGraphicsWebView;
+ friend class QGraphicsWebViewPrivate;
friend class QWebInspector;
friend class WebCore::ChromeClientQt;
friend class WebCore::EditorClientQt;
friend class WebCore::FrameLoaderClientQt;
friend class WebCore::InspectorClientQt;
+ friend class WebCore::InspectorFrontendClientQt;
friend class WebCore::ResourceHandle;
friend class WebCore::QNetworkReplyHandler;
};
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h
index f0f842d..0712d0c 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h
@@ -62,6 +62,10 @@ class QWebPagePrivate {
public:
QWebPagePrivate(QWebPage*);
~QWebPagePrivate();
+
+ static WebCore::Page* core(QWebPage*);
+ static QWebPagePrivate* priv(QWebPage*);
+
void createMainFrame();
#ifndef QT_NO_CONTEXTMENU
QMenu* createContextMenu(const WebCore::ContextMenu* webcoreMenu, const QList<WebCore::ContextMenuItem>* items, QBitArray* visitedWebActions);
@@ -114,6 +118,10 @@ public:
void handleSoftwareInputPanel(Qt::MouseButton);
bool handleScrolling(QKeyEvent*, WebCore::Frame*);
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ void touchEvent(QTouchEvent*);
+#endif
+
void setInspector(QWebInspector*);
QWebInspector* getOrCreateInspector();
WebCore::InspectorController* inspectorController();
@@ -151,18 +159,8 @@ public:
bool clickCausedFocus;
-#if QT_VERSION < 0x040400
- bool acceptNavigationRequest(QWebFrame *frame, const QWebNetworkRequest &request, QWebPage::NavigationType type);
-
- QWebNetworkInterface *networkInterface;
-#ifndef QT_NO_NETWORKPROXY
- QNetworkProxy networkProxy;
-#endif
-
-#else
bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type);
QNetworkAccessManager *networkManager;
-#endif
bool forwardUnsupportedContent;
QWebPage::LinkDelegationPolicy linkPolicy;
@@ -186,6 +184,9 @@ public:
QWidget* inspectorFrontend;
QWebInspector* inspector;
bool inspectorIsInternalOnly; // True if created through the Inspect context menu action
+ Qt::DropAction m_lastDropAction;
+
+ QString viewMode;
static bool drtRun;
};
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.cpp
index 2a225c5..6c26bd7 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.cpp
@@ -40,6 +40,11 @@ void QWEBKIT_EXPORT qt_drt_resetOriginAccessWhiteLists()
SecurityOrigin::resetOriginAccessWhiteLists();
}
+void QWEBKIT_EXPORT qt_drt_setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme)
+{
+ SecurityOrigin::setDomainRelaxationForbiddenForURLScheme(forbidden, scheme);
+}
+
/*!
\class QWebSecurityOrigin
\since 4.5
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp
index 79ef16f..c759445 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp
@@ -26,6 +26,7 @@
#include "Cache.h"
#include "CrossOriginPreflightResultCache.h"
+#include "Database.h"
#include "FontCache.h"
#include "Page.h"
#include "PageCache.h"
@@ -73,6 +74,7 @@ public:
QString localStoragePath;
QString offlineWebApplicationCachePath;
qint64 offlineStorageDefaultQuota;
+ QUrl inspectorLocation;
void apply();
WebCore::Settings* settings;
@@ -90,6 +92,7 @@ static WebGraphicHash* graphics()
hash->insert(QWebSettings::MissingPluginGraphic, QPixmap(QLatin1String(":webkit/resources/nullPlugin.png")));
hash->insert(QWebSettings::DefaultFrameIconGraphic, QPixmap(QLatin1String(":webkit/resources/urlIcon.png")));
hash->insert(QWebSettings::TextAreaSizeGripCornerGraphic, QPixmap(QLatin1String(":webkit/resources/textAreaResizeCorner.png")));
+ hash->insert(QWebSettings::DeleteButtonGraphic, QPixmap(QLatin1String(":webkit/resources/deleteButton.png")));
}
return hash;
@@ -151,7 +154,19 @@ void QWebSettingsPrivate::apply()
value = attributes.value(QWebSettings::JavascriptEnabled,
global->attributes.value(QWebSettings::JavascriptEnabled));
settings->setJavaScriptEnabled(value);
+#if USE(ACCELERATED_COMPOSITING)
+ value = attributes.value(QWebSettings::AcceleratedCompositingEnabled,
+ global->attributes.value(QWebSettings::AcceleratedCompositingEnabled));
+ settings->setAcceleratedCompositingEnabled(value);
+#endif
+#if ENABLE(3D_CANVAS)
+ value = attributes.value(QWebSettings::WebGLEnabled,
+ global->attributes.value(QWebSettings::WebGLEnabled));
+
+ settings->setWebGLEnabled(value);
+#endif
+
value = attributes.value(QWebSettings::JavascriptCanOpenWindows,
global->attributes.value(QWebSettings::JavascriptCanOpenWindows));
settings->setJavaScriptCanOpenWindowsAutomatically(value);
@@ -168,6 +183,10 @@ void QWebSettingsPrivate::apply()
global->attributes.value(QWebSettings::PrivateBrowsingEnabled));
settings->setPrivateBrowsingEnabled(value);
+ value = attributes.value(QWebSettings::SpatialNavigationEnabled,
+ global->attributes.value(QWebSettings::SpatialNavigationEnabled));
+ settings->setSpatialNavigationEnabled(value);
+
value = attributes.value(QWebSettings::JavascriptCanAccessClipboard,
global->attributes.value(QWebSettings::JavascriptCanAccessClipboard));
settings->setDOMPasteAllowed(value);
@@ -176,6 +195,10 @@ void QWebSettingsPrivate::apply()
global->attributes.value(QWebSettings::DeveloperExtrasEnabled));
settings->setDeveloperExtrasEnabled(value);
+ value = attributes.value(QWebSettings::FrameFlatteningEnabled,
+ global->attributes.value(QWebSettings::FrameFlatteningEnabled));
+ settings->setFrameFlatteningEnabled(value);
+
QUrl location = !userStyleSheetLocation.isEmpty() ? userStyleSheetLocation : global->userStyleSheetLocation;
settings->setUserStyleSheetLocation(WebCore::KURL(location));
@@ -187,15 +210,17 @@ void QWebSettingsPrivate::apply()
value = attributes.value(QWebSettings::ZoomTextOnly,
global->attributes.value(QWebSettings::ZoomTextOnly));
- settings->setZoomsTextOnly(value);
+ settings->setZoomMode(value ? WebCore::ZoomTextOnly : WebCore::ZoomPage);
value = attributes.value(QWebSettings::PrintElementBackgrounds,
global->attributes.value(QWebSettings::PrintElementBackgrounds));
settings->setShouldPrintBackgrounds(value);
+#if ENABLE(DATABASE)
value = attributes.value(QWebSettings::OfflineStorageDatabaseEnabled,
global->attributes.value(QWebSettings::OfflineStorageDatabaseEnabled));
- settings->setDatabasesEnabled(value);
+ WebCore::Database::setIsAvailable(value);
+#endif
value = attributes.value(QWebSettings::OfflineWebApplicationCacheEnabled,
global->attributes.value(QWebSettings::OfflineWebApplicationCacheEnabled));
@@ -203,12 +228,26 @@ void QWebSettingsPrivate::apply()
value = attributes.value(QWebSettings::LocalStorageEnabled,
global->attributes.value(QWebSettings::LocalStorageEnabled));
-
settings->setLocalStorageEnabled(value);
value = attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls,
global->attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls));
settings->setAllowUniversalAccessFromFileURLs(value);
+
+ value = attributes.value(QWebSettings::LocalContentCanAccessFileUrls,
+ global->attributes.value(QWebSettings::LocalContentCanAccessFileUrls));
+ settings->setAllowFileAccessFromFileURLs(value);
+
+ value = attributes.value(QWebSettings::XSSAuditorEnabled,
+ global->attributes.value(QWebSettings::XSSAuditorEnabled));
+ settings->setXSSAuditorEnabled(value);
+
+#if ENABLE(TILED_BACKING_STORE)
+ value = attributes.value(QWebSettings::TiledBackingStoreEnabled,
+ global->attributes.value(QWebSettings::TiledBackingStoreEnabled));
+ settings->setTiledBackingStoreEnabled(value);
+#endif
+
settings->setUsesPageCache(WebCore::pageCache()->capacity());
} else {
QList<QWebSettingsPrivate*> settings = *::allSettings();
@@ -338,6 +377,13 @@ QWebSettings* QWebSettings::globalSettings()
Currently this enables the "Inspect" element in the context menu as
well as the use of QWebInspector which controls the WebKit WebInspector
for web site debugging.
+ \value SpatialNavigationEnabled Enables or disables the Spatial Navigation
+ feature, which consists in the ability to navigate between focusable
+ elements in a Web page, such as hyperlinks and form controls, by using
+ Left, Right, Up and Down arrow keys. For example, if an user presses the
+ Right key, heuristics determine whether there is an element he might be
+ trying to reach towards the right, and if there are multiple elements,
+ which element he probably wants.
\value LinksIncludedInFocusChain Specifies whether hyperlinks should be
included in the keyboard focus chain.
\value ZoomTextOnly Specifies whether the zoom factor on a frame applies to
@@ -353,6 +399,25 @@ QWebSettings* QWebSettings::globalSettings()
\value LocalStorageDatabaseEnabled \e{This enum value is deprecated.} Use
QWebSettings::LocalStorageEnabled instead.
\value LocalContentCanAccessRemoteUrls Specifies whether locally loaded documents are allowed to access remote urls.
+ \value LocalContentCanAccessFileUrls Specifies whether locally loaded documents are allowed to access other local urls.
+ \value XSSAuditorEnabled Specifies whether load requests should be monitored for cross-site scripting attempts.
+ \value AcceleratedCompositingEnabled This feature, when used in conjunction with
+ QGraphicsWebView, accelerates animations of web content. CSS animations of the transform and
+ opacity properties will be rendered by composing the cached content of the animated elements.
+ This feature is enabled by default
+ \value TiledBackingStoreEnabled This setting enables the tiled backing store feature
+ for a QGraphicsWebView. With the tiled backing store enabled, the web page contents in and around
+ the current visible area is speculatively cached to bitmap tiles. The tiles are automatically kept
+ in sync with the web page as it changes. Enabling tiling can significantly speed up painting heavy
+ operations like scrolling. Enabling the feature increases memory consumption. It does not work well
+ with contents using CSS fixed positioning (see also \l{QGraphicsWebView::}{resizesToContents} property).
+ \l{QGraphicsWebView::}{tiledBackingStoreFrozen} property allows application to temporarily freeze the contents of the backing store.
+ \value FrameFlatteningEnabled With this setting each subframe is expanded to its contents.
+ On touch devices, it is desired to not have any scrollable sub parts of the page
+ as it results in a confusing user experience, with scrolling sometimes scrolling sub parts
+ and at other times scrolling the page itself. For this reason iframes and framesets are
+ barely usable on touch devices. This will flatten all the frames to become one scrollable page.
+ Disabled by default.
*/
/*!
@@ -376,6 +441,7 @@ QWebSettings::QWebSettings()
d->attributes.insert(QWebSettings::AutoLoadImages, true);
d->attributes.insert(QWebSettings::DnsPrefetchEnabled, false);
d->attributes.insert(QWebSettings::JavascriptEnabled, true);
+ d->attributes.insert(QWebSettings::SpatialNavigationEnabled, false);
d->attributes.insert(QWebSettings::LinksIncludedInFocusChain, true);
d->attributes.insert(QWebSettings::ZoomTextOnly, false);
d->attributes.insert(QWebSettings::PrintElementBackgrounds, true);
@@ -383,6 +449,11 @@ QWebSettings::QWebSettings()
d->attributes.insert(QWebSettings::OfflineWebApplicationCacheEnabled, false);
d->attributes.insert(QWebSettings::LocalStorageEnabled, false);
d->attributes.insert(QWebSettings::LocalContentCanAccessRemoteUrls, false);
+ d->attributes.insert(QWebSettings::LocalContentCanAccessFileUrls, true);
+ d->attributes.insert(QWebSettings::AcceleratedCompositingEnabled, true);
+ d->attributes.insert(QWebSettings::WebGLEnabled, false);
+ d->attributes.insert(QWebSettings::TiledBackingStoreEnabled, false);
+ d->attributes.insert(QWebSettings::FrameFlatteningEnabled, false);
d->offlineStorageDefaultQuota = 5 * 1024 * 1024;
d->defaultTextEncoding = QLatin1String("iso-8859-1");
}
@@ -451,7 +522,8 @@ void QWebSettings::resetFontSize(FontSize type)
The \a location must be either a path on the local filesystem, or a data URL
with UTF-8 and Base64 encoded data, such as:
- "data:text/css;charset=utf-8;base64,cCB7IGJhY2tncm91bmQtY29sb3I6IHJlZCB9Ow==;"
+ "data:text/css;charset=utf-8;base64,cCB7IGJhY2tncm91bmQtY29sb3I6IHJlZCB9Ow=="
+ NOTE: In case the base 64 data is not valid the style will not be applied.
\sa userStyleSheetUrl()
*/
@@ -884,6 +956,8 @@ QString QWebSettings::offlineWebApplicationCachePath()
void QWebSettings::setOfflineWebApplicationCacheQuota(qint64 maximumSize)
{
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
+ WebCore::cacheStorage().empty();
+ WebCore::cacheStorage().vacuumDatabaseFile();
WebCore::cacheStorage().setMaximumSize(maximumSize);
#endif
}
@@ -923,6 +997,31 @@ void QWebSettings::setLocalStoragePath(const QString& path)
}
/*!
+ \since 4.7
+
+ Specifies the \a location of a frontend to load with each web page when using Web Inspector.
+
+ \sa inspectorUrl()
+*/
+void QWebSettings::setInspectorUrl(const QUrl& location)
+{
+ d->inspectorLocation = location;
+ d->apply();
+}
+
+/*!
+ \since 4.7
+
+ Returns the location of the Web Inspector frontend.
+
+ \sa setInspectorUrl()
+*/
+QUrl QWebSettings::inspectorUrl() const
+{
+ return d->inspectorLocation;
+}
+
+/*!
\since 4.6
\relates QWebSettings
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h
index 50cf424..caba0d5 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h
@@ -67,13 +67,21 @@ public:
LocalStorageDatabaseEnabled = LocalStorageEnabled,
#endif
LocalContentCanAccessRemoteUrls,
- DnsPrefetchEnabled
+ DnsPrefetchEnabled,
+ XSSAuditorEnabled,
+ AcceleratedCompositingEnabled,
+ WebGLEnabled,
+ SpatialNavigationEnabled,
+ LocalContentCanAccessFileUrls,
+ TiledBackingStoreEnabled,
+ FrameFlatteningEnabled
};
enum WebGraphic {
MissingImageGraphic,
MissingPluginGraphic,
DefaultFrameIconGraphic,
- TextAreaSizeGripCornerGraphic
+ TextAreaSizeGripCornerGraphic,
+ DeleteButtonGraphic
};
enum FontSize {
MinimumFontSize,
@@ -129,6 +137,9 @@ public:
void setLocalStoragePath(const QString& path);
QString localStoragePath() const;
+ void setInspectorUrl(const QUrl &location);
+ QUrl inspectorUrl() const;
+
static void clearMemoryCaches();
static void enablePersistentStorage(const QString& path = QString());
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp
index 79538ff..4387f4a 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp
@@ -22,10 +22,11 @@
#include "config.h"
#include "qwebview.h"
+#include "Page.h"
#include "QWebPageClient.h"
+#include "Settings.h"
#include "qwebframe.h"
#include "qwebpage_p.h"
-
#include "qbitmap.h"
#include "qevent.h"
#include "qpainter.h"
@@ -44,6 +45,7 @@ public:
}
void _q_pageDestroyed();
+ void unsetPageIfExists();
QWebView *view;
QWebPage *page;
@@ -59,96 +61,141 @@ void QWebViewPrivate::_q_pageDestroyed()
#ifdef Q_WS_MAEMO_5
#include "qabstractkineticscroller.h"
+#include "qapplication.h"
+
+// QCoreApplication::sendSpontaneousEvent() is private, hence this friend wrapper
+bool qt_sendSpontaneousEvent(QObject* receiver, QEvent* ev)
+{
+ return QCoreApplication::sendSpontaneousEvent(receiver, ev);
+}
-class QWebViewKineticScroller : public QAbstractKineticScroller {
+class QWebViewKineticScroller : public QObject, public QAbstractKineticScroller {
public:
- QWebViewKineticScroller() : QAbstractKineticScroller() {}
- // remember the frame where the button was pressed
+ QWebViewKineticScroller()
+ : QObject()
+ , QAbstractKineticScroller()
+ , m_view(0)
+ , m_ignoreEvents(false)
+ {
+ }
+
+ void setWidget(QWebView* widget)
+ {
+ if (m_view) {
+ m_view->removeEventFilter(this);
+ QWebFrame* frame = m_view->page()->mainFrame();
+ frame->setScrollBarPolicy(Qt::Vertical, m_oldVerticalScrollBarPolicy);
+ frame->setScrollBarPolicy(Qt::Horizontal, m_oldHorizontalScrollBarPolicy);
+ }
+
+ m_view = widget;
+ setParent(m_view);
+ if (m_view) {
+ QWebFrame* frame = m_view->page()->mainFrame();
+ m_oldHorizontalScrollBarPolicy = frame->scrollBarPolicy(Qt::Horizontal);
+ m_oldVerticalScrollBarPolicy = frame->scrollBarPolicy(Qt::Vertical);
+ frame->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
+ frame->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
+ m_view->installEventFilter(this);
+ }
+ }
+
+protected:
bool eventFilter(QObject* o, QEvent* ev)
{
+ if (!o || m_view != o || m_ignoreEvents || !m_view->isEnabled())
+ return QObject::eventFilter(o, ev);
+
+ bool res = false;
+
switch (ev->type()) {
case QEvent::MouseButtonPress: {
+ // remember the frame where the button was pressed
QWebFrame* hitFrame = scrollingFrameAt(static_cast<QMouseEvent*>(ev)->pos());
if (hitFrame)
m_frame = hitFrame;
- break;
+ // fall through
}
+ case QEvent::MouseMove:
+ case QEvent::MouseButtonRelease:
+ case QEvent::MouseButtonDblClick:
+ res = handleMouseEvent(static_cast<QMouseEvent*>(ev));
+ break;
default:
break;
}
- return QAbstractKineticScroller::eventFilter(o, ev);
+ return res ? true : QObject::eventFilter(o, ev);
}
-protected:
- QWebFrame* currentFrame() const
+ void cancelLeftMouseButtonPress(const QPoint& /* globalPressPos */)
{
- if (!m_frame.isNull())
- return m_frame.data();
-
- QWebView* view = static_cast<QWebView*>(widget());
- QWebFrame* frame = view->page()->mainFrame();
- return frame;
+ QMouseEvent cmem(QEvent::MouseMove, QPoint(-INT_MAX, -INT_MAX), Qt::LeftButton, QApplication::mouseButtons() | Qt::LeftButton, QApplication::keyboardModifiers());
+ sendEvent(m_view, &cmem);
+ QMouseEvent cmer(QEvent::MouseButtonRelease, QPoint(-INT_MAX, -INT_MAX), Qt::LeftButton, QApplication::mouseButtons() & ~Qt::LeftButton, QApplication::keyboardModifiers());
+ sendEvent(m_view, &cmer);
}
- // Returns the innermost frame at the given position that can scroll.
- QWebFrame* scrollingFrameAt(const QPoint& pos) const
+ QWebFrame* currentFrame() 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();
+ if (m_frame)
+ return m_frame;
- while (hitFrame && range.width() <= 1 && range.height() <= 1)
- hitFrame = hitFrame->parentFrame();
+ if (m_view)
+ return m_view->page()->mainFrame();
- return hitFrame;
+ return 0;
}
- void attachToWidget()
+ // 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();
- 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);
- }
+ QWebFrame* hitFrame = 0;
+ if (m_view) {
+ QWebFrame* frame = m_view->page()->mainFrame();
+ hitFrame = frame->hitTestContent(pos).frame();
+ QSize range = hitFrame->contentsSize() - hitFrame->geometry().size();
- 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);
+ while (hitFrame && range.width() <= 1 && range.height() <= 1)
+ hitFrame = hitFrame->parentFrame();
+
+ return hitFrame;
+ }
}
- QRect positionRange() const
+ QPoint maximumScrollPosition() const
{
- QRect r;
QWebFrame* frame = currentFrame();
- r.setSize(frame->contentsSize() - frame->geometry().size());
- return r;
+ QSize s = frame ? frame->contentsSize() - frame->geometry().size() : QSize(0, 0);
+ return QPoint(qMax(0, s.width()), qMax(0, s.height()));
}
- QPoint position() const
+ QPoint scrollPosition() const
{
QWebFrame* frame = currentFrame();
- return frame->scrollPosition();
+ return frame ? frame->scrollPosition() : QPoint();
}
QSize viewportSize() const
{
- return static_cast<QWebView*>(widget())->page()->viewportSize();
+ return m_view ? m_view->page()->viewportSize() : QSize();
}
- void setPosition(const QPoint& point, const QPoint& /* overShootDelta */)
+ void setScrollPosition(const QPoint& point, const QPoint& /* overShootDelta */)
{
QWebFrame* frame = currentFrame();
- frame->setScrollPosition(point);
+ if (frame)
+ frame->setScrollPosition(point);
}
+ void sendEvent(QWidget* w, QEvent* ev)
+ {
+ m_ignoreEvents = true;
+ qt_sendSpontaneousEvent(w, ev);
+ m_ignoreEvents = false;
+ }
+
+ QWebView* m_view;
+ bool m_ignoreEvents;
QPointer<QWebFrame> m_frame;
Qt::ScrollBarPolicy m_oldVerticalScrollBarPolicy;
Qt::ScrollBarPolicy m_oldHorizontalScrollBarPolicy;
@@ -253,9 +300,13 @@ QWebView::QWebView(QWidget *parent)
setAttribute(Qt::WA_InputMethodEnabled);
#endif
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ setAttribute(Qt::WA_AcceptTouchEvents);
+#endif
#if defined(Q_WS_MAEMO_5)
QAbstractKineticScroller* scroller = new QWebViewKineticScroller();
- scroller->setWidget(this);
+ static_cast<QWebViewKineticScroller*>(scroller)->setWidget(this);
+ setProperty("kineticScroller", QVariant::fromValue(scroller));
#endif
setAcceptDrops(true);
@@ -297,6 +348,29 @@ QWebPage *QWebView::page() const
return d->page;
}
+void QWebViewPrivate::unsetPageIfExists()
+{
+ if (!page)
+ return;
+
+ // if the page client is the special client constructed for
+ // delegating the responsibilities to a QWidget, we need
+ // to destroy it.
+
+ if (page->d->client && page->d->client->isQWidgetClient())
+ delete page->d->client;
+
+ page->d->client = 0;
+
+ // if the page was created by us, we own it and need to
+ // destroy it as well.
+
+ if (page->parent() == view)
+ delete page;
+ else
+ page->disconnect(view);
+}
+
/*!
Makes \a page the new web page of the web view.
@@ -310,14 +384,10 @@ void QWebView::setPage(QWebPage* page)
{
if (d->page == page)
return;
- if (d->page) {
- d->page->d->client = 0; // unset the page client
- if (d->page->parent() == this)
- delete d->page;
- else
- d->page->disconnect(this);
- }
+
+ d->unsetPageIfExists();
d->page = page;
+
if (d->page) {
d->page->setView(this);
d->page->setPalette(palette());
@@ -345,6 +415,9 @@ void QWebView::setPage(QWebPage* page)
this, SLOT(updateMicroFocus()));
connect(d->page, SIGNAL(destroyed()),
this, SLOT(_q_pageDestroyed()));
+#if USE(ACCELERATED_COMPOSITING)
+ d->page->d->page->settings()->setAcceleratedCompositingEnabled(false);
+#endif
}
setAttribute(Qt::WA_OpaquePaintEvent, d->page);
update();
@@ -374,19 +447,11 @@ void QWebView::load(const QUrl &url)
\sa url(), urlChanged()
*/
-#if QT_VERSION < 0x040400 && !defined(qdoc)
-void QWebView::load(const QWebNetworkRequest &request)
-#else
void QWebView::load(const QNetworkRequest &request,
QNetworkAccessManager::Operation operation,
const QByteArray &body)
-#endif
{
- page()->mainFrame()->load(request
-#if QT_VERSION >= 0x040400
- , operation, body
-#endif
- );
+ page()->mainFrame()->load(request, operation, body);
}
/*!
@@ -740,7 +805,6 @@ bool QWebView::event(QEvent *e)
if (e->type() == QEvent::ShortcutOverride) {
d->page->event(e);
#ifndef QT_NO_CURSOR
-#if QT_VERSION >= 0x040400
} else if (e->type() == QEvent::CursorChange) {
// An unsetCursor will set the cursor to Qt::ArrowCursor.
// Thus this cursor change might be a QWidget::unsetCursor()
@@ -753,6 +817,13 @@ bool QWebView::event(QEvent *e)
if (cursor().shape() == Qt::ArrowCursor)
d->page->d->client->resetCursor();
#endif
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ } else if (e->type() == QEvent::TouchBegin
+ || e->type() == QEvent::TouchEnd
+ || e->type() == QEvent::TouchUpdate) {
+ d->page->event(e);
+ if (e->isAccepted())
+ return true;
#endif
} else if (e->type() == QEvent::Leave)
d->page->event(e);
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.h
index 0f79c70..f681fbc 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.h
@@ -27,9 +27,7 @@
#include <QtGui/qicon.h>
#include <QtGui/qpainter.h>
#include <QtCore/qurl.h>
-#if QT_VERSION >= 0x040400
#include <QtNetwork/qnetworkaccessmanager.h>
-#endif
QT_BEGIN_NAMESPACE
class QNetworkRequest;
@@ -61,13 +59,9 @@ public:
void setPage(QWebPage* page);
void load(const QUrl& url);
-#if QT_VERSION < 0x040400 && !defined(qdoc)
- void load(const QWebNetworkRequest& request);
-#else
void load(const QNetworkRequest& request,
QNetworkAccessManager::Operation operation = QNetworkAccessManager::GetOperation,
const QByteArray &body = QByteArray());
-#endif
void setHtml(const QString& html, const QUrl& baseUrl = QUrl());
void setContent(const QByteArray& data, const QString& mimeType = QString(), const QUrl& baseUrl = QUrl());
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index 64726c2..b6176de 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,340 @@
+2010-04-02 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Maemo5 theme - customized popup for <select multiple> elements
+ https://bugs.webkit.org/show_bug.cgi?id=36368
+
+ Using QtMaemoWebPopup instead of QtFallbackWebPopup for Maemo.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::createSelectPopup):
+ * WebCoreSupport/QtFallbackWebPopup.cpp:
+ (WebCore::QtFallbackWebPopup::show):
+ (WebCore::QtFallbackWebPopup::populate):
+
+2010-04-01 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add Single and Multiple Selection Popup for Maemo 5.
+
+ [Qt] Maemo5 theme - popup dialogs
+ https://bugs.webkit.org/show_bug.cgi?id=36789
+
+ * WebCoreSupport/QtMaemoWebPopup.cpp:
+ (WebCore::Maemo5Popup::populateList):
+ (WebCore::Maemo5Popup::onItemSelected):
+ (WebCore::QtMaemoWebPopup::createSingleSelectionPopup):
+ (WebCore::QtMaemoWebPopup::createMultipleSelectionPopup):
+ (WebCore::Maemo5SingleSelectionPopup::Maemo5SingleSelectionPopup):
+ (WebCore::MultipleItemListDelegate::MultipleItemListDelegate):
+ (WebCore::MultipleItemListDelegate::paint):
+ (WebCore::Maemo5MultipleSelectionPopup::Maemo5MultipleSelectionPopup):
+ * WebCoreSupport/QtMaemoWebPopup.h:
+
+2010-03-30 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Maemo5 theme - QtMaemoWebPopup class
+ https://bugs.webkit.org/show_bug.cgi?id=36790
+
+ A new QtAbstractWebPopup descendant class to be used for maemo menu lists.
+ This is the first step. The next step will be the dialogs implementation that
+ will come in bug 36789 and finally to use QtMaemoWebPopup instead of QtFallbackWebPopup
+ that will come in bug 36368.
+
+ * WebCoreSupport/QtMaemoWebPopup.cpp: Added.
+ (WebCore::QtMaemoWebPopup::QtMaemoWebPopup):
+ (WebCore::QtMaemoWebPopup::~QtMaemoWebPopup):
+ (WebCore::QtMaemoWebPopup::createSingleSelectionPopup):
+ (WebCore::QtMaemoWebPopup::createMultipleSelectionPopup):
+ (WebCore::QtMaemoWebPopup::createPopup):
+ (WebCore::QtMaemoWebPopup::show):
+ (WebCore::QtMaemoWebPopup::hide):
+ (WebCore::QtMaemoWebPopup::popupClosed):
+ (WebCore::QtMaemoWebPopup::itemClicked):
+ * WebCoreSupport/QtMaemoWebPopup.h: Added.
+ (WebCore::Maemo5Popup::Maemo5Popup):
+
+2010-03-31 Antti Koivisto <koivisto@iki.fi>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36446
+ [Qt] QWebSettings::TiledBackingStoreEnabled attribute lacks documentation and default value
+
+ * Api/qgraphicswebview.cpp:
+ * Api/qwebsettings.cpp:
+ (QWebSettings::QWebSettings):
+
+2010-03-26 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Antti Koivisto.
+
+ Change due to renaming of frame flattening setting.
+
+ * Api/qwebpage.cpp:
+ (qt_drt_setFrameFlatteningEnabled):
+ * Api/qwebsettings.cpp:
+ (QWebSettingsPrivate::apply):
+ * symbian/eabi/QtWebKitu.def:
+
+2010-03-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Antti Koivisto.
+
+ Use 'Mobile Safari' instead of 'Safari' on mobile Qt platforms.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::userAgentForUrl):
+
+2010-03-22 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Fraser.
+
+ Add support for Widgets 1.0: View Mode Media Feature
+ https://bugs.webkit.org/show_bug.cgi?id=35446
+
+ Add an internal Qt API for changing the view mode media feature
+ (http://www.w3.org/TR/widgets-vmmf/).
+
+ * Api/qwebpage.cpp:
+ (qt_wrt_setViewMode):
+ (QWebPagePrivate::priv):
+ * Api/qwebpage_p.h:
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::isDocked):
+ (WebCore::ChromeClientQt::isFloating):
+ (WebCore::ChromeClientQt::isApplication):
+ (WebCore::ChromeClientQt::isFullscreen):
+ * WebCoreSupport/ChromeClientQt.h:
+
+2010-03-29 Dawit Alemayehu <adawit@kde.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Added support for handling the HTTP "Content-Disposition" header.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36395
+
+ Whenever a server response contains a "Content-Disposition: attachment..." header,
+ treat the request as a download and emit the unsupportedContent signal.
+
+ * Api/qwebpage.cpp:
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::download):
+ (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForMIMEType):
+
+2010-03-29 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] unit tests don't compile inside of Qt
+
+ https://bugs.webkit.org/show_bug.cgi?id=36756
+
+ * tests/tests.pri: Don't do the target substitution inside Qt and find the sources
+ through VPATH instead of relying on the location of the .pro file exclusively.
+
+2010-03-25 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] QtLauncher crashes on Mac OS and Linux when exiting with QGraphicsView mode enabled
+ https://bugs.webkit.org/show_bug.cgi?id=35251
+
+ Followed the way QWebView registers for the signal QWebPage::destroyed(), to prevent
+ QGraphicsWebView from referencing QWebPage after it was deleted.
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewPrivate::_q_pageDestroyed):
+ (QGraphicsWebView::setPage):
+ * Api/qgraphicswebview.h:
+
+2010-03-26 Olivier Goffart <ogoffart@trolltech.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Compile with QT_USE_FAST_OPERATOR_PLUS
+
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientQt::populateSetting):
+ (WebCore::InspectorClientQt::storeSetting):
+
+2010-03-26 David Boddie <dboddie@trolltech.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Doc: Simplified Commercial Editions for Qt 4.7.
+
+ * docs/qtwebkit.qdoc:
+
+2010-03-25 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Make QWebPage not depend on view() but use the client->ownerWidget()
+ instead. Also, handle the case where there is not page client.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::createContextMenu):
+ (QWebPagePrivate::keyPressEvent):
+ (QWebPage::javaScriptAlert):
+ (QWebPage::javaScriptConfirm):
+ (QWebPage::javaScriptPrompt):
+ (QWebPage::shouldInterruptJavaScript):
+ (QWebPage::createWindow):
+ (QWebPage::action):
+ (QWebPage::extension):
+ (QWebPage::chooseFile):
+ (QWebPage::userAgentForUrl):
+
+2010-03-23 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ Calling setView(0) on a QWebPage being shown by a QGraphicsWebView,
+ would uninstall the page client, deleting the QGraphicsWebViewPrivate
+ instance. If called with an argument, it would do a wrong static_cast
+ and crash.
+
+ * Api/qwebpage.cpp:
+ (QWebPageWidgetClient::QWebPageWidgetClient):
+ (QWebPageWidgetClient::isQWidgetClient):
+ (QWebPageWidgetClient::screenNumber):
+ (QWebPage::QWebPage):
+ (QWebPage::setView):
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewPrivate::unsetPageIfExists):
+ (QGraphicsWebView::setPage):
+ * Api/qwebpage.cpp:
+ (QWebPageWidgetClient::isQWidgetClient):
+ (QWebPageWidgetClient::screenNumber):
+ (QWebPage::QWebPage):
+ (QWebPage::setView):
+ * Api/qwebpage.h:
+ * Api/qwebview.cpp:
+ (QWebViewPrivate::unsetPageIfExists):
+ (QWebView::setPage):
+
+2010-03-25 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Implement ChromeClient::windowResizerRect()
+
+ https://bugs.webkit.org/show_bug.cgi?id=21300
+
+ We assume the resize corner to be in the lower right corner of
+ the window and having the width and height of the scrollbars.
+
+ The helper function geometryRelativeToOwnerWidget() in the page
+ client is used to clip the resize rect to the actual size of the
+ viewport, not the size of the QGraphicsView.
+
+ * Api/qgraphicswebview.cpp:
+ * Api/qwebpage.cpp:
+ * WebCoreSupport/ChromeClientQt.cpp:
+
+2010-03-24 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add the FrameFlatteningEnabled WebAttribute to QWebSettings.
+
+ [Qt] Missing QWebSettings for Frame Flattening
+ https://bugs.webkit.org/show_bug.cgi?id=36553
+
+ * Api/qwebsettings.cpp:
+ (QWebSettingsPrivate::apply):
+ (QWebSettings::QWebSettings):
+ * Api/qwebsettings.h:
+
+2010-03-26 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Symbian build fix.
+
+ [Qt] Updated the def file with new exports used by QtLauncher.
+
+ * symbian/eabi/QtWebKitu.def:
+
+2010-03-24 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Make Icon::createIconForFiles() optional.
+ https://bugs.webkit.org/show_bug.cgi?id=35072
+
+ - Rename iconForFiles() to chooseIconForFiles().
+ - Call Icon::createIconForFiles() from chooseIconForFiles().
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::chooseIconForFiles):
+ * WebCoreSupport/ChromeClientQt.h:
+
+2010-03-23 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ QGraphicsWebView crash when calling setView on the QWebPage...
+ https://bugs.webkit.org/show_bug.cgi?id=36436
+
+ Checking for pageClient existance before showing popups.
+
+ * WebCoreSupport/QtFallbackWebPopup.cpp:
+ (WebCore::QtFallbackWebPopup::show):
+
+2010-03-23 Anders Bakken <anders.bakken@nokia.com>, Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Check if q->scene() is available before actually using it
+ on QGraphicsWebViewPrivate.
+
+ QGraphicsWebView crash
+ https://bugs.webkit.org/show_bug.cgi?id=32670
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewPrivate::screenNumber):
+ (QGraphicsWebViewPrivate::ownerWidget):
+
+2010-03-23 David Leong <david.leong@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ Build fix for Symbian Def file.
+
+ * symbian/eabi/QtWebKitu.def:
+
+2010-03-23 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Remove support for Qt v4.4
+ https://bugs.webkit.org/show_bug.cgi?id=36389
+
+ * Api/qwebelement.cpp:
+ (QWebElement::classes):
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::editorActionForKeyEvent):
+ (QWebPage::userAgentForUrl):
+ * WebCoreSupport/EditorClientQt.cpp:
+ (WebCore::EditorClientQt::handleKeyboardEvent):
+ * tests/tests.pro:
+
+2010-03-22 Kent Hansen <kent.hansen@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] Fix qdoc warnings
+ https://bugs.webkit.org/show_bug.cgi?id=36447
+
+ * Api/qgraphicswebview.cpp: Add missing ().
+ * Api/qwebframe.cpp: Remove reference to non-existent parameter "url".
+ * Api/qwebsettings.cpp: Document parameter "location".
+
2010-03-22 Jakub Wieczorek <jwieczorek@webkit.org>
Reviewed by Simon Hausmann.
@@ -23,28 +360,36 @@
* tests/qwebpage/tst_qwebpage.cpp:
(tst_QWebPage::inputMethods):
-2010-03-25 Yael Aharon <yael.aharon@nokia.com>
-
- Reviewed by Kenneth Rohde Christiansen.
+2010-03-21 Kristian Amlie <kristian.amlie@nokia.com>
- [Qt] QtLauncher crashes on Mac OS and Linux when exiting with QGraphicsView mode enabled
- https://bugs.webkit.org/show_bug.cgi?id=35251
+ Reviewed by Simon Hausmann.
- Followed the way QWebView registers for the signal QWebPage::destroyed(), to prevent
- QGraphicsWebView from referencing QWebPage after it was deleted.
+ Fixed updating the VKB display when inputting into QGraphicsWebView.
+ https://bugs.webkit.org/show_bug.cgi?id=36292
* Api/qgraphicswebview.cpp:
- (QGraphicsWebViewPrivate::_q_pageDestroyed):
+ (QGraphicsWebViewPrivate::_q_updateMicroFocus):
(QGraphicsWebView::setPage):
* Api/qgraphicswebview.h:
-2010-03-23 David Leong <david.leong@nokia.com>
+2010-03-19 Laszlo Gombos <laszlo.1.gombos@nokia.com>
- Reviewed by Laszlo Gombos.
+ Unreviewed.
- Build fix for Symbian Def file.
+ Buildfix for Qt v4.5.
- * symbian/eabi/QtWebKitu.def:
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewOverlay::q):
+
+2010-03-18 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Make it possible for the Qt DRT to set the media type from
+ the LayoutTestController.
+
+ * Api/qwebframe.cpp:
+ (qt_drt_setMediaType):
2010-03-18 Joe Ligman <joseph.ligman@nokia.com>
@@ -64,35 +409,286 @@
* Api/qwebframe_p.h:
* tests/qwebframe/tst_qwebframe.cpp:
-2009-12-18 Joe Ligman <joseph.ligman@nokia.com>
+2010-03-18 Antti Koivisto <koivisto@iki.fi>
Reviewed by Kenneth Rohde Christiansen.
- [Qt] Add new API to QWebFrame to scrollRecursively starting with any css overflow
- then checking current frame and then ancestors
- https://bugs.webkit.org/show_bug.cgi?id=32668
+ https://bugs.webkit.org/show_bug.cgi?id=36102
+ [Qt] Scaling control API for tiled backing store
+
+ The scale is set by passing the QGraphicsWebView scale to the backing store. The
+ only new API is the tiledBackingStoreFrozen property which allows disabling
+ all updates (for example during zoom animation).
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewPrivate::_q_scaleChanged):
+ (QGraphicsWebViewPrivate::updateTiledBackingStoreScale):
+ (QGraphicsWebView::QGraphicsWebView):
+ (QGraphicsWebView::isTiledBackingStoreFrozen):
+ (QGraphicsWebView::setTiledBackingStoreFrozen):
+ * Api/qgraphicswebview.h:
* Api/qwebframe.cpp:
- (QWebFramePrivate::scrollOverflow):
- (QWebFrame::scrollRecursively):
- * Api/qwebframe.h:
* Api/qwebframe_p.h:
- * tests/qwebframe/qwebframe.qrc:
- * tests/qwebframe/testiframe.html: Added.
- * tests/qwebframe/testiframe2.html: Added.
- * tests/qwebframe/tst_qwebframe.cpp:
-2010-03-21 Kristian Amlie <kristian.amlie@nokia.com>
+2010-03-17 Antti Koivisto <koivisto@iki.fi>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Fix Qt build with tiled backing store disabled.
+
+ * Api/qwebframe.cpp:
+ * Api/qwebframe_p.h:
+
+2010-03-17 Chang Shu <chang.shu@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36139
+ [Qt] Clean up cache while setting cache quota. This behavior matches other platforms,
+ such as mac and gtk.
+
+ * Api/qwebsettings.cpp:
+ (QWebSettings::setOfflineWebApplicationCacheQuota):
+
+2010-03-17 Csaba Osztrogonác <ossy@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Enable accelerated compositing by default
+ https://bugs.webkit.org/show_bug.cgi?id=35866
+
+ * Api/qwebsettings.cpp:
+ (QWebSettings::QWebSettings):
+
+2010-03-15 Antti Koivisto <koivisto@iki.fi>
Reviewed by Simon Hausmann.
- Fixed updating the VKB display when inputting into QGraphicsWebView.
- https://bugs.webkit.org/show_bug.cgi?id=36292
+ https://bugs.webkit.org/show_bug.cgi?id=36121
+ [Qt] Make WebKit scrollbars work with tiling
+
+ - Use the scrollbar overlay (implemented for accelerated compositing) when in tiled mode.
+ - Make overlay compile unconditionally, enable on demand. This removes bunch of unneeded ifdefs.
+ - Update the scroll position to the backing store as needed.
+ - Renamed some methods.
* Api/qgraphicswebview.cpp:
- (QGraphicsWebViewPrivate::_q_updateMicroFocus):
+ (QGraphicsWebViewPrivate::):
+ (QGraphicsWebViewPrivate::createOrDeleteOverlay):
+ (QGraphicsWebViewPrivate::setRootGraphicsLayer):
+ (QGraphicsWebViewPrivate::updateCompositingScrollPosition):
+ (QGraphicsWebViewPrivate::scroll):
+ (QGraphicsWebViewPrivate::update):
+ (QGraphicsWebViewPrivate::graphicsItemVisibleRect):
+ (QGraphicsWebView::paint):
(QGraphicsWebView::setPage):
- * Api/qgraphicswebview.h:
+ (QGraphicsWebView::updateGeometry):
+ (QGraphicsWebView::setGeometry):
+ * Api/qwebframe.cpp:
+ (QWebFramePrivate::renderFromTiledBackingStore):
+ * Api/qwebframe_p.h:
+
+2010-03-15 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix crash in QWebView::setPage()
+
+ tst_qwebpage was crashing on setPage(0)
+
+ https://bugs.webkit.org/show_bug.cgi?id=36137
+
+ * Api/qwebview.cpp:
+ (QWebView::setPage):
+
+2010-03-16 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Introduce InspectorFrontendClient that provides InspectorFrontend with an interface to the embedder. InspectorClient now serves as a delegate for InspectorController and does not contain methods for managing inspector frontend window. That allows to create remote InspectorFrontendHost.
+
+ Introduce InspectorFrontendClient that would provide InspectorFrontend with an interface to the embedder
+ https://bugs.webkit.org/show_bug.cgi?id=35036
+
+ * Api/qwebinspector.cpp:
+ (QWebInspector::hideEvent):
+ (QWebInspector::closeEvent):
+ * Api/qwebinspector.h:
+ * Api/qwebpage.h:
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientQt::openInspectorFrontend):
+ (WebCore::InspectorFrontendClientQt::InspectorFrontendClientQt):
+ (WebCore::InspectorFrontendClientQt::frontendLoaded):
+ (WebCore::InspectorFrontendClientQt::localizedStringsURL):
+ (WebCore::InspectorFrontendClientQt::hiddenPanels):
+ (WebCore::InspectorFrontendClientQt::bringToFront):
+ (WebCore::InspectorFrontendClientQt::closeWindow):
+ (WebCore::InspectorFrontendClientQt::attachWindow):
+ (WebCore::InspectorFrontendClientQt::detachWindow):
+ (WebCore::InspectorFrontendClientQt::setAttachedWindowHeight):
+ (WebCore::InspectorFrontendClientQt::inspectedURLChanged):
+ (WebCore::InspectorFrontendClientQt::updateWindowTitle):
+ * WebCoreSupport/InspectorClientQt.h:
+
+2010-03-15 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Unreviewed.
+
+ [Qt] Build fix if TILED_BACKING_STORE is disabled.
+
+ * Api/qwebframe.cpp:
+ (QWebFramePrivate::renderContentsLayerAbsoluteCoords):
+
+2010-03-14 Chang Shu <chang.shu@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] [Symbian] Use Symbian native dialog providers for combo pupups.
+ https://bugs.webkit.org/show_bug.cgi?id=35919
+
+ * WebCoreSupport/QtFallbackWebPopup.cpp:
+ (WebCore::QtFallbackWebPopup::show):
+ (WebCore::ResetAndDestroy):
+ (WebCore::QtFallbackWebPopup::showS60BrowserDialog):
+ * WebCoreSupport/QtFallbackWebPopup.h:
+
+2010-03-14 Antti Koivisto <koivisto@iki.fi>
+
+ Reviewed by Simon Hausmann.
+
+ https://bugs.webkit.org/show_bug.cgi?id=35146
+ Support tiled backing store
+
+ Implements a basic tiled backing store mechanism. Tiles are created and
+ deleted on demand. The page content is cached to the tiles. Tile content
+ is kept in sync with the document. Since the backing store covers area
+ larger than the currently visible viewport, the document can be scrolled
+ quickly without having to enter rendering tree painting.
+
+ The tile management code is platform independent. This patch has simple QPixmap
+ based tile implementation for Qt.
+
+ The feature is behind ENABLE_TILED_BACKING_STORE flag.
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewPrivate::visibleRect):
+ (QGraphicsWebView::paint):
+ * Api/qwebframe.cpp:
+ (QWebFramePrivate::renderContentsLayerAbsoluteCoords):
+ * Api/qwebframe.h:
+ * Api/qwebsettings.cpp:
+ (QWebSettingsPrivate::apply):
+ * Api/qwebsettings.h:
+
+2010-03-13 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Enable accelerated compositing by default
+ https://bugs.webkit.org/show_bug.cgi?id=35866
+
+ Unreviewed. Roll-out r55955, because it broke 3 tests:
+ - animations/fill-mode-transform.html
+ - animations/play-state.html
+ - animations/simultaneous-start-left.html
+
+ * Api/qwebsettings.cpp:
+ (QWebSettings::QWebSettings):
+
+2010-03-13 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Enable accelerated compositing by default
+ https://bugs.webkit.org/show_bug.cgi?id=35866
+
+ * Api/qwebsettings.cpp:
+ (QWebSettings::QWebSettings):
+
+2010-03-11 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by David Hyatt.
+
+ Remove invalidateContents, it isn't used and it never makes sense to only invalidate the contents.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ * WebCoreSupport/ChromeClientQt.h:
+
+2010-03-10 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Add Support for WebKitEnableCaretBrowsing to Qt DRT
+
+ Unskip test fast/events/multiline-link-arrow-navigation.html
+ Fix typo (superfluous space) in QWebSettings docs.
+
+ https://bugs.webkit.org/show_bug.cgi?id=35593
+
+ * Api/qwebpage.cpp:
+ (qt_drt_enableCaretBrowsing):
+ * Api/qwebsettings.cpp:
+ (QWebSettingsPrivate::apply): fix typo in docs
+
+2010-03-02 Adam Treat <atreat@rim.com>
+
+ Reviewed by Dave Hyatt.
+
+ Adapt the qt port to the refactoring of repaint methods.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34214
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::invalidateContents):
+ (WebCore::ChromeClientQt::invalidateWindow):
+ (WebCore::ChromeClientQt::invalidateContentsAndWindow):
+ (WebCore::ChromeClientQt::invalidateContentsForSlowScroll):
+ * WebCoreSupport/ChromeClientQt.h:
+
+2010-03-08 Eric Uhrhane <ericu@chromium.org>
+
+ Reviewed by David Levin.
+
+ Remove the now-redundant Settings fields for the Database
+ https://bugs.webkit.org/show_bug.cgi?id=35763
+
+ No new tests; this code isn't called.
+
+ * Api/qwebsettings.cpp:
+ (QWebSettingsPrivate::apply): Remove the call into Settings.
+
+2010-03-08 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] Binary incompatibility between Qt 4.6's WebKit and trunk in QWebSettings
+ https://bugs.webkit.org/show_bug.cgi?id=35858
+
+ Moved the enum value added in r54873 to the end of the enum, to preserve
+ binary compatibility. DnsPrefetchEnabled was in the last release and needs
+ to remain after LocalContentCanAccessRemoteUrls.
+
+ * Api/qwebsettings.h:
+
+2010-03-06 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Sam Weinig.
+
+ Remove unnecessary includes of wtf/Platform.h. This is already pulled in by the prefix header.
+
+ * WebCoreSupport/EditCommandQt.cpp:
+
+2010-03-02 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Simon Hausmann.
+ Patch by Antonio Gomes <tonikitoo@webkit.org>
+
+ [Qt] QWebSettings attribute for toggle Spatial Navigation on/off
+ https://bugs.webkit.org/show_bug.cgi?id=33714 (Qt API part)
+
+ Added 'SpatialNavigationEnabled' attribute to QWebSettings.
+
+ * Api/qwebsettings.cpp:
+ (QWebSettingsPrivate::apply):
+ * Api/qwebsettings.h:
2010-03-04 Simon Hausmann <simon.hausmann@nokia.com>
@@ -107,15 +703,683 @@
* Api/qwebelement.h:
-2010-01-28 Kenneth Rohde Christiansen <kenneth@webkit.org>
+2010-03-04 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Make the OUTPUT_DIR variable in qmake projects independent of build-webkit's logic.
+
+ This also allows shadow builds relying only on qmake to work properly.
+
+ * tests/benchmarks/loading/loading.pro:
+ * tests/benchmarks/painting/painting.pro:
+ * tests/hybridPixmap/hybridPixmap.pro:
+ * tests/qgraphicswebview/qgraphicswebview.pro:
+ * tests/qwebelement/qwebelement.pro:
+ * tests/qwebframe/qwebframe.pro:
+ * tests/qwebhistory/qwebhistory.pro:
+ * tests/qwebhistoryinterface/qwebhistoryinterface.pro:
+ * tests/qwebinspector/qwebinspector.pro:
+ * tests/qwebpage/qwebpage.pro:
+ * tests/qwebplugindatabase/qwebplugindatabase.pro:
+
+2010-03-02 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Fix generation of forwarding headers
+
+ The dependencies were a bit wrong, so we ended up not generating
+ forwarding headers for qwebkitversion.h and qwebkitglobal.h
+
+ The forwarding headers are now the only targets depending on the
+ real headers. All other targets either depend on the generated
+ class headers, or the forwarding headers.
+
+ * Api/DerivedSources.pro:
+
+2010-03-02 Eric Uhrhane <ericu@chromium.org>
+
+ Reviewed by David Levin.
+
+ Move database enable bit fully out of settings
+ This is stage one of a three-stage commit [webkit, then chromium, then
+ webkit again]. In this change I'm adding calls to
+ Database::setIsAvailable inside Settings::setDatabaseEnabled and
+ anywhere else that called it, and switching webkit fully over to using
+ that flag [added in a previous checkin]. Phase two will remove
+ Chromium's use of Settings for the Database, and phase three will remove
+ the Setting for the Database enable entirely, leaving only
+ Database::isAvailable/setIsAvailable.
+
+ No new tests; tested by existing storage tests.
+
+ https://bugs.webkit.org/show_bug.cgi?id=35310
+
+ * Api/qwebsettings.cpp:
+ (QWebSettingsPrivate::apply): Add a call to Database::setIsAvailable
+
+2010-03-02 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Symbian build fix.
+
+ [Qt] Updated the def file with one new export, to fix
+ QtLauncher linkage.
+
+ * symbian/eabi/QtWebKitu.def:
+
+2010-03-01 Jakob Petsovits <jpetsovits@rim.com>
+
+ Reviewed by Adam Barth.
+
+ Adapt to the new ZoomMode enum.
+ https://bugs.webkit.org/show_bug.cgi?id=35347
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::setTextSizeMultiplier):
+ (QWebFrame::setZoomFactor):
+ * Api/qwebsettings.cpp:
+ (QWebSettingsPrivate::apply):
+
+2010-02-26 Diego Gonzalez <diego.gonzalez@openbossa.org>
Reviewed by Simon Hausmann.
- Do not set the combobox font on Maemo5 and S60; use the
- default instead.
+ Fix documentation of QWebSettings::setUserStyleSheetUrl method
+
+ The base 64 data in the exemple shows a not valid code.
+
+ REGRESSION: QWebSettings::setUserStyleSheetUrl is not working with a data URL (Base64)
+ https://bugs.webkit.org/show_bug.cgi?id=34802
+
+ * Api/qwebsettings.cpp:
+
+2010-02-26 Jamey Hicks <jamey.hicks@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] added QWebSettings::setInspectorUrl() and QWebSettings::inspectorUrl()
+
+ Enables the use of alternate Web Inspector frontends by changing
+ the location of the frontend.
+
+ This is required so that the Web Inspector may be run from an
+ external process or an external tool such as Eclipse or Aptana may
+ be used instead of the in-process Web Inspector UI.
+
+ https://bugs.webkit.org/show_bug.cgi?id=35340
+
+ * Api/qwebsettings.cpp:
+ (QWebSettings::QWebSettings):
+ (QWebSettings::setInspectorUrl):
+ (QWebSettings::inspectorUrl):
+ * Api/qwebsettings.h:
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientQt::createPage):
+
+2010-02-25 Jarkko Sakkinen <jarkko.sakkinen@tieto.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Qt WebGL support
+
+ Adds enabling and disabling of WebGL support to QWebSettings.
+ https://bugs.webkit.org/show_bug.cgi?id=35153
+
+ * Api/qwebsettings.cpp:
+ (QWebSettingsPrivate::apply):
+ (QWebSettings::QWebSettings):
+ * Api/qwebsettings.h:
+
+2010-02-19 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Remove QGVLauncher
+
+ https://bugs.webkit.org/show_bug.cgi?id=35292
+
+ * QGVLauncher/QGVLauncher.pro: Removed.
+ * QGVLauncher/main.cpp: Removed.
+
+2010-02-23 Steve Block <steveblock@google.com>
+
+ Reviewed by Darin Adler.
+
+ Adds ChromeClient::cancelGeolocationPermissionRequestForFrame
+ https://bugs.webkit.org/show_bug.cgi?id=34962
+
+ This method is required so that a Geolocation object can cancel an
+ asynchronous permission request. This allows the chrome client to cancel
+ any UI it is showing for the permission request.
+
+ * WebCoreSupport/ChromeClientQt.h:
+ (WebCore::ChromeClientQt::cancelGeolocationPermissionRequestForFrame):
+
+2010-02-22 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Unreviewed Symbian build fix.
+
+ [Qt] Updated the def file with new exports to enable
+ building DumpRenderTree.
+
+ * symbian/eabi/QtWebKitu.def:
+
+2010-02-18 Noam Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Minor improvement to hybrid QPixmap
+ https://bugs.webkit.org/show_bug.cgi?id=34507
+
+ * tests/hybridPixmap/test.html: use assignToHTMLImageElement on an
+ existing element instead of toHTMLImageElement which creates a new one
+
+2010-02-17 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by David Levin, Darin Fisher, Simon Hausmann.
+
+ When a live iframe element is moved between pages, it still depends on the old page.
+ https://bugs.webkit.org/show_bug.cgi?id=34382
+
+ * Api/qwebframe_p.h:
+ (QWebFramePrivate::setPage): Added.
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::didTransferChildFrameToNewDocument):
+ The QWebFrame caches a QWebPage which should be replaced when Frame is re-parented.
+ Also, the QWebFrame is a child (in QT terms) of QWebPage - so update that relationship as well.
+ Emit a signal that QWebFrame moved to a different QWebPage.
+
+ * WebCoreSupport/FrameLoaderClientQt.h:
+
+2010-02-17 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Introduces new Icon loading interface in order to support
+ asynchronous loading.
+ https://bugs.webkit.org/show_bug.cgi?id=32054
+
+ Add an empty implementation of ChromeClient::iconForFiles().
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::iconForFiles):
+ * WebCoreSupport/ChromeClientQt.h:
+
+2010-02-17 Diego Gonzalez <diego.gonzalez@openbossa.org>
+
+ Reviewed by Ariya Hidayat.
+
+ Make possible Qt DRT to get total number of pages to be printed
+
+ LayoutTests:
+ printing/numberOfPages.html
+
+ [Qt] DRT: Get total number of pages to be printed
+ https://bugs.webkit.org/show_bug.cgi?id=34955
+
+ * Api/qwebframe.cpp:
+ (qt_drt_numberOfPages):
+ (qt_drt_evaluateScriptInIsolatedWorld):
+
+2010-02-16 Ariya Hidayat <ariya.hidayat@gmail.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Allow scrolling to an anchor programmatically.
+ https://bugs.webkit.org/show_bug.cgi?id=29856
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::scrollToAnchor): New API function.
+ * Api/qwebframe.h:
+ * tests/qwebframe/tst_qwebframe.cpp: New tests for scrollToAnchor().
+
+2010-02-16 Ariya Hidayat <ariya.hidayat@gmail.com>
+
+ Reviewed by Laszlo Gombos.
+
+ Fix building with Qt < 4.6.
+ https://bugs.webkit.org/show_bug.cgi?id=34885
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewPrivate::updateResizesToContentsForPage):
+
+2010-02-16 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Unreviewed Symbian build fix.
+
+ Updated the def file with two new exports used by QtLauncher.
+
+ * symbian/eabi/QtWebKitu.def:
+
+2010-02-16 Ismail Donmez <ismail@namtrac.org>
+
+ Reviewed by Pavel Feldman.
+
+ Fix compilation with inspector disabled.
+ https://bugs.webkit.org/show_bug.cgi?id=32724
+
+ * Api/qwebpage.cpp:
+ (qt_drt_webinspector_executeScript):
+ (qt_drt_webinspector_close):
+ (qt_drt_webinspector_show):
+ (qt_drt_setTimelineProfilingEnabled):
+
+2010-02-16 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Simon Hausman.
+
+ [Qt] Fix include paths for forwarding headers in standalone builds.
+
+ * Api/DerivedSources.pro: Use relative paths for package builds and added some
+ documentation.
+
+2010-02-15 Noam Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] QtWebkit bridge: enable passing a QWebElement to a signal/slot/property
+ Add Q_DECLARE_METATYPE to QWebElement, add relevant tests to
+ tst_qwebframe
+ https://bugs.webkit.org/show_bug.cgi?id=34901
+
+ * Api/qwebelement.h: declare metatype
+ * tests/qwebframe/tst_qwebframe.cpp:
+ (MyQObject::webElementProperty): new test for QWebElement
+ (MyQObject::setWebElementProperty): new test for QWebElement
+ (MyQObject::myOverloadedSlot): new test for QWebElement
+
+2010-02-15 Robert Hogan <robert@roberthogan.net>, Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] DRT: Support evaluateInWebInspector(), setTimelineProfilingEnabled().
+
+ Support LayoutTestController.evaluateInWebInspector(), setTimelineProfilingEnabled() in Qt DRT.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33096
+
+ This allows the following tests to pass:
+
+ inspector/console-format-collections.html
+ inspector/styles-iframe.html
+ inspector/syntax-highlight-css.html
+ inspector/syntax-highlight-javascript.html
+ inspector/timeline-enum-stability.html
+ inspector/timeline-layout.html
+ inspector/timeline-mark-timeline.html
+ inspector/timeline-paint.html
+ inspector/timeline-parse-html.html
+ inspector/timeline-recalculate-styles.html
+ inspector/timeline-script-tag-1.html
+ inspector/timeline-script-tag-2.html
+ inspector/timeline-trivial.html
+ inspector/cookie-resource-match.html
+ inspector/elements-img-tooltip.html
+ inspector/elements-panel-selection-on-refresh.html
+ inspector/inspected-objects-not-overriden.html
+ inspector/timeline-event-dispatch.html
+ inspector/timeline-network-resource.html
+ inspector/elements-panel-rewrite-href.html
+ inspector/console-dir.html
+ inspector/console-dirxml.html
+ inspector/console-format.html
+ inspector/console-tests.html
+ inspector/elements-panel-structure.html
+ inspector/evaluate-in-frontend.html
+ inspector/console-clear.html
+
+ * Api/qwebpage.cpp:
+ (qt_drt_webinspector_executeScript):
+ (qt_drt_webinspector_close):
+ (qt_drt_webinspector_show):
+ (qt_drt_setTimelineProfilingEnabled):
+
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (InspectorClientQt::createPage)
+
+2010-02-12 Antti Koivisto <koivisto@iki.fi>
+
+ Reviewed by Kenneth Rohde Christiansen and Simon Hausmann.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34885
+ Add a QGraphicsWebView mode that makes it automatically resize itself to the size of the content.
+
+ This is useful for cases where the client wants to implement page panning and zooming by manipulating
+ the graphics item.
+
+ Add a option to QGVLauncher to test this mode.
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate):
+ (QGraphicsWebViewPrivate::updateResizesToContentsForPage):
+ (QGraphicsWebViewPrivate::_q_contentsSizeChanged):
+ (QGraphicsWebView::setPage):
+ (QGraphicsWebView::setResizesToContents):
+ (QGraphicsWebView::resizesToContents):
+ * Api/qgraphicswebview.h:
+ * QGVLauncher/main.cpp:
+ (WebView::WebView):
+ (MainView::MainView):
+ (MainView::setMainWidget):
+ (MainView::resizeEvent):
+ (main):
+
+2010-02-12 Diego Gonzalez <diego.gonzalez@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Qt DRT now dump the frame loader callbacks when LayoutTestController()
+ method is called.
+
+ LayoutTests:
+ http/tests/security/mixedContent/data-url-script-in-iframe.html
+ http/tests/security/mixedContent/empty-url-plugin-in-frame.html
+ http/tests/security/mixedContent/insecure-css-in-iframe.html
+ http/tests/security/mixedContent/insecure-iframe-in-iframe.html
+ http/tests/security/mixedContent/insecure-image-in-iframe.html
+ http/tests/security/mixedContent/insecure-plugin-in-iframe.html
+ http/tests/security/mixedContent/insecure-script-in-iframe.html
+ http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe.html
+ http/tests/security/mixedContent/redirect-https-to-http-script-in-iframe.html
+
+ [Qt] Make possible Qt DRT dump frame load callbacks
+ https://bugs.webkit.org/show_bug.cgi?id=34702
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::didDisplayInsecureContent):
+ (WebCore::FrameLoaderClientQt::didRunInsecureContent):
+
+2010-02-10 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Make qtlauncher and qgvlauncher use the generated headers
+ path to make sure they are correctly generated.
+
+ * tests/tests.pri:
+
+2010-02-10 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Ensure relative paths in generated .pri files to ensure that
+ a source package with pre-generated derived sources can be compiled.
+
+ - Re-add a separate headers.pri file for WEBKIT_API_HEADERS
+ - Rename the generated headers.pri to classheaders.pri to avoid
+ confusion with the one generated by synqt since they don't have the
+ same content.
+ - Remove private headers list variable from classheaders.pri
+ - Use $$PWD in classheaders.pri
+ - Remove classheaders.pri from the installed files
+
+ * Api/DerivedSources.pro:
+
+2010-02-10 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Minor fixes on QtWebKit headers generation.
+
+ - Adds QtWebKit to the generated headers destination path
+ - Improve compatibility with MinGW
+
+ * Api/DerivedSources.pro:
+
+2010-02-09 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by nobody, build fix.
+
+ [Qt] Fix standalone build with MinGW.
+
+ * tests/qwebelement/tst_qwebelement.cpp:
+ * tests/tests.pri:
+
+2010-02-10 Diego Gonzalez <diego.gonzalez@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Implement pageNumberForElementById() method in Qt DRT LayoutTestController,
+ to make Qt DRT able to get page number.
+
+ LayoutTests:
+ printing/page-break-always.html
+ printing/pageNumerForElementById.html
+ printing/css2.1/page-break-before-000.html
+ printing/css2.1/page-break-after-000.html
+ printing/css2.1/page-break-after-004.html
+ printing/css2.1/page-break-before-001.html
+ printing/css2.1/page-break-after-001.html
+ printing/css2.1/page-break-after-002.html
+ printing/css2.1/page-break-before-002.html
+ printing/css2.1/page-break-inside-000.html
+
+ [Qt] Make possible Qt DRT get a page number for element by ID
+ https://bugs.webkit.org/show_bug.cgi?id=34777
+
+ * Api/qwebframe.cpp:
+ (qt_drt_pageNumberForElementById):
+
+2010-02-09 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Adam Barth.
+
+ [Qt] Unit test for window.runModalDialog
+ https://bugs.webkit.org/show_bug.cgi?id=34755
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (TestModalPage::TestModalPage):
+ (TestModalPage::createWindow):
+ (tst_QWebPage::showModalDialog):
+
+2010-02-09 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Sync with API changes in Maemo 5 kinetic scrolling
+
+ https://bugs.webkit.org/show_bug.cgi?id=34747
+
+ This is a forward-port of http://qt.gitorious.org/+qt-developers/qt/x11-maemo/commit/08497561
+
+ * Api/qwebview.cpp:
+ (qt_sendSpontaneousEvent):
+ (QWebViewKineticScroller::QWebViewKineticScroller):
+ (QWebViewKineticScroller::setWidget):
+ (QWebViewKineticScroller::eventFilter):
+ (QWebViewKineticScroller::cancelLeftMouseButtonPress):
+ (QWebViewKineticScroller::currentFrame):
+ (QWebViewKineticScroller::scrollingFrameAt):
+ (QWebViewKineticScroller::maximumScrollPosition):
+ (QWebViewKineticScroller::scrollPosition):
+ (QWebViewKineticScroller::viewportSize):
+ (QWebViewKineticScroller::setScrollPosition):
+ (QWebViewKineticScroller::sendEvent):
+ (QWebView::QWebView):
+
+2010-02-09 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Webkit in Qt does not have window.showModalDialog
+ https://bugs.webkit.org/show_bug.cgi?id=25585
+
+ Create a new eventloop when runModal() is called.
+ Added comemnt in QWebPage::createWindow that the application is responsible
+ for setting the modality of the appropriate window.
+
+ * Api/qwebpage.cpp:
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::ChromeClientQt):
+ (WebCore::ChromeClientQt::~ChromeClientQt):
+ (WebCore::ChromeClientQt::canRunModal):
+ (WebCore::ChromeClientQt::runModal):
+ * WebCoreSupport/ChromeClientQt.h:
+
+2010-01-19 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Dave Hyatt.
+
+ Implement flattening of framesets
+ https://bugs.webkit.org/show_bug.cgi?id=32717
+
+ Privately export the setFrameSetFlatteningEnabled setting for
+ use with the Qt DRT.
+
+ * Api/qwebpage.cpp:
+ (qt_drt_setFrameSetFlatteningEnabled):
+ (QWebPagePrivate::core):
+ * Api/qwebpage_p.h:
+
+2010-02-05 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Fix build on Windows
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ DerivedSources for our API headers failed on Windows,
+ due to Windows not accepting ; as a command separator,
+ not needing quotes for echo, and needing < and > escaped.
+
+ We now detect Windows and set these quote markers and
+ escape markers accordingly, as well as use && for separating
+ individual commands.
+
+ * Api/DerivedSources.pro:
+
+2010-02-05 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Remove unused inmport of ScriptFunctionCall.h
+
+ https://bugs.webkit.org/show_bug.cgi?id=33592
+
+ * Api/qwebelement.cpp:
+
+2010-02-05 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Generate convenience headers (QWebView, etc) using qmake
+
+ In Qt this is done using syncqt, but we use a pro-file instead
+ that generates makefile-rules for each of the extra headers.
+
+ These extra headers are installed alongside the normal headers.
+
+ * Api/DerivedSources.pro: Added. List of headers + pro file magic
+ * Api/headers.pri: Removed, list of headers is now in the above file
+
+2010-02-04 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] Tuning and optimizations to GraphicsLayerQt. Mainly reduced usage
+ of QTimer::singleShot, and moved syncLayers() from paint() to update()
+ https://bugs.webkit.org/show_bug.cgi?id=34062
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewPrivate::update): Moved the sync operation to update
+ (QGraphicsWebView::paint): Moved the sync operation to update
+
+2010-02-03 Andras Becsi <abecsi@webkit.org>
+
+ Unreviewed build fix.
+
+ [Qt] Roll-out r54281 because it broke the build on the Qt Release bot.
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate):
+ (QGraphicsWebViewPrivate::markForSync):
+ (QGraphicsWebViewPrivate::update):
+ (QGraphicsWebView::paint):
+
+2010-02-02 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Ariya Hidayat.
+
+ Do not use a proxy widget for the QComboBox on Maemo 5, as it
+ is not working properly and it is not needed at all, as the
+ comboboxes comes up in their full width on the screen and
+ do not depend on view.
* WebCoreSupport/QtFallbackWebPopup.cpp:
- (WebCore::QtFallbackWebPopup::populate):
+ (WebCore::QtFallbackWebPopup::show):
+
+2010-02-02 Jessie Berlin <jberlin@webkit.org>
+
+ Rubber Stamped by Holger Freyther.
+
+ [Qt] Fix style issue identified in bug:
+ https://bugs.webkit.org/show_bug.cgi?id=34329
+
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientWebPage::InspectorClientWebPage):
+ Fix indentation.
+
+2010-02-01 Jessie Berlin <jberlin@webkit.org>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] Enable inspecting the Web Inspector in QtLauncher
+
+ https://bugs.webkit.org/show_bug.cgi?id=34329
+
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientWebPage::InspectorClientWebPage):
+ Allow the DeveloperExtrasEnabled setting to default to true for the page containing the Web Inspector.
+
+2010-02-02 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Display HTML tags verbatim in JS alert/confirm/prompt boxes
+
+ https://bugs.webkit.org/show_bug.cgi?id=34429
+
+ * Api/qwebpage.cpp:
+ (QWebPage::javaScriptAlert):
+ (QWebPage::javaScriptConfirm):
+ (QWebPage::javaScriptPrompt):
+
+2010-02-02 Noam Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Enable a way to measure FPS in QGVLauncher
+ run QGVLauncher with --show-fps to see ongoing fps measurements
+ This is not meant as accurate FPS, but rather as a way to find
+ improvements/regressions
+ https://bugs.webkit.org/show_bug.cgi?id=34450
+
+ * QGVLauncher/main.cpp:
+ (MainView::MainView): initialize FPS values
+ (MainView::paintEvent): count a painted frame here
+ (MainView::printFps): we print the fps with qDebug every 5 seconds.
+
+2010-01-29 Ben Murdoch <benm@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Android] Android needs functionality in the ChromeClient to be informed when touch events are and are not needed by the webpage.
+ https://bugs.webkit.org/show_bug.cgi?id=34215
+
+ Add needTouchEvents() to the ChromeClient which is called when the page decides it needs or no longer needs to be informed of touch events.
+
+ * WebCoreSupport/ChromeClientQt.h:
+ (WebCore::ChromeClientQt::needTouchEvents): Add an empty implementation.
+
+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 Andreas Kling <andreas.kling@nokia.com>
@@ -141,15 +1405,15 @@
(QWebViewKineticScroller::setPosition):
(QWebView::QWebView):
-2010-01-29 Kenneth Rohde Christiansen <kenneth@webkit.org>
+2010-01-28 Kenneth Rohde Christiansen <kenneth@webkit.org>
- Reviewed by Simon Hausmann
+ Reviewed by Simon Hausmann.
- Disable auto-uppercase and predictive text on Maemo5, just like the
- build-in MicroB Browser.
+ Do not set the combobox font on Maemo5 and S60; use the
+ default instead.
- * WebCoreSupport/EditorClientQt.cpp:
- (WebCore::EditorClientQt::setInputMethodState):
+ * WebCoreSupport/QtFallbackWebPopup.cpp:
+ (WebCore::QtFallbackWebPopup::populate):
2010-01-28 Trond Kjernåsen <trond@trolltech.com>
@@ -160,6 +1424,44 @@
* Api/qwebframe.cpp:
(QWebFrame::print):
+2010-01-27 Diego Gonzalez <diego.gonzalez@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] DRT Provide worker thread ability to track counters
+ https://bugs.webkit.org/show_bug.cgi?id=34221
+
+ Implement workerThreadCount() in LayoutTestController of Qt DRT
+
+ Tests:
+ fast/workers/dedicated-worker-lifecycle.html
+ fast/workers/shared-worker-frame-lifecycle.html
+ fast/workers/shared-worker-lifecycle.html
+ fast/workers/worker-lifecycle.html
+
+ * Api/qwebpage.cpp:
+ (qt_drt_workerThreadCount):
+
+2010-01-27 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] Update the .def files with exported symbols
+
+ * symbian/eabi/QtWebKitu.def: Add two mangled missing new symbols for arm eabi.
+
+2010-01-27 Kent Hansen <kent.hansen@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Meta-methods can't be introspected using ES5 API
+ https://bugs.webkit.org/show_bug.cgi?id=34087
+
+ Test that Object.getOwnPropertyDescriptor and
+ Object.getOwnPropertyNames work with meta-methods.
+
+ * tests/qwebframe/tst_qwebframe.cpp:
+
2010-01-26 Simon Hausmann <simon.hausmann@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
@@ -174,6 +1476,24 @@
* WebCoreSupport/QtFallbackWebPopup.cpp:
(WebCore::QtFallbackWebPopup::show):
+2010-01-26 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ First steps of the QtScript API.
+
+ Two new classes were created; QScriptEngine and QScriptValue.
+ The first should encapsulate a javascript context and the second a script
+ value.
+
+ This API is still in development, so it isn't compiled by default.
+ To trigger compilation, pass --qmakearg="CONFIG+=build-qtscript" to
+ build-webkit.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32565
+
+ * docs/qtwebkit.qdocconf:
+
2010-01-26 Holger Hans Peter Freyther <zecke@selfish.org>
Reviewed by Simon Hausmann.
@@ -202,6 +1522,19 @@
(JSPromptPage::javaScriptPrompt):
(tst_QWebPage::testJSPrompt):
+2010-01-25 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] In RenderThemeQt determine the QStyle from the page client instead of the page's view
+ https://bugs.webkit.org/show_bug.cgi?id=34053
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewPrivate::style): Implement QWebPageClient::style() and return the graphics
+ widget's style.
+ * Api/qwebpage.cpp:
+ (QWebPageWidgetClient::style): Implement QWebPageClient::style() and return the widget's style.
+
2010-01-25 Janne Koskinen <janne.p.koskinen@digia.com>
Reviewed by Simon Hausmann.
@@ -211,15 +1544,240 @@
* symbian/backup_registration.xml: Added.
-2009-11-19 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+2010-01-23 Girish Ramakrishnan <girish@forwardbias.in>
Reviewed by Kenneth Rohde Christiansen.
- [Qt] Fix QWebInspector destruction problem.
- https://bugs.webkit.org/show_bug.cgi?id=31664
+ [Qt] Fix positioning of ComboBox popup in QGraphicsWebView.
+
+ Wrap the popup in a QGraphicsProxyWidget, so that the popup
+ transforms with the item.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33887
- * Api/qwebpage.cpp:
- (QWebPage::~QWebPage):
+ * WebCoreSupport/QtFallbackWebPopup.cpp:
+ (WebCore::QtFallbackWebPopupCombo::hidePopup):
+ (WebCore::QtFallbackWebPopup::QtFallbackWebPopup):
+ (WebCore::QtFallbackWebPopup::~QtFallbackWebPopup):
+ (WebCore::QtFallbackWebPopup::show):
+ * WebCoreSupport/QtFallbackWebPopup.h:
+
+2010-01-22 Peter Kasting <pkasting@google.com>
+
+ Not reviewed, backout.
+
+ Back out r52673, which caused several regressions.
+ https://bugs.webkit.org/show_bug.cgi?id=32533
+
+ * WebCoreSupport/QtFallbackWebPopup.cpp:
+ (WebCore::QtFallbackWebPopupCombo::hidePopup):
+
+2010-01-22 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Save the QWebPageClient instead of the ownerWidget in QtAbstractWebPopup
+
+ The QWebPageClient is required for the QtFallbackWebPopup. QtFallbackWebPopup will
+ need it to create a QGraphicsProxyWidget (in a future commit) for the
+ QGraphicsWebView's web popup.
+
+ * WebCoreSupport/QtFallbackWebPopup.cpp:
+ (WebCore::QtFallbackWebPopup::show):
+
+2010-01-22 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ QState::polished() was renamed to QState::propertiesAssigned() when
+ Qt 4.6.0 was released.
+
+ * QGVLauncher/main.cpp:
+ (MainWindow::init):
+
+2010-01-21 Diego Gonzalez <diego.gonzalez@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] add setDomainRelaxationForbiddenForURLScheme in Qt DRT
+ https://bugs.webkit.org/show_bug.cgi?id=33945
+
+ * Api/qwebsecurityorigin.cpp:
+ (qt_drt_setDomainRelaxationForbiddenForURLScheme):
+
+2010-01-21 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Antti Koivisto.
+
+ [Qt] Implement GraphicsLayer for accelerated layer compositing
+ https://bugs.webkit.org/show_bug.cgi?id=33514
+
+ Here we have the QGraphicsWebView support for accelerated compositing
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewOverlay::q): access to container object
+ (QGraphicsWebViewOverlay::boundingRect): overlay has same rect as the
+ webview
+ (QGraphicsWebViewOverlay::paint): paint everything but the contents
+ (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate): some vars needed
+ for accelerated compositing
+ (QGraphicsWebViewPrivate::):
+ (QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate):
+ (QGraphicsWebViewPrivate::setRootGraphicsLayer): make sure we have a
+ scrollbar overlay, and that the new graphics layer is parented by the
+ web-view
+ (QGraphicsWebViewPrivate::markForSync): flush changes at earliest
+ convenience or during the next draw
+
+ (QGraphicsWebViewPrivate::updateCompositingScrollPosition): sync the
+ position of the compositing layer with the scroll position
+ (QGraphicsWebViewPrivate::syncLayers): flush changes now
+ (QGraphicsWebViewPrivate::scroll): make sure we also move the
+ compositing layer
+ (QGraphicsWebViewPrivate::update): also update the overlay if needed
+ (QGraphicsWebView::QGraphicsWebView): initialize overlay with 0
+ (QGraphicsWebView::paint): paint only contents if we have an overlay,
+ sync the compositing layers now if needed
+ (QGraphicsWebView::setPage): also clean up the compositing
+ (QGraphicsWebView::updateGeometry): also update overlay geo
+ (QGraphicsWebView::setGeometry): also update overlay geo
+ * Api/qgraphicswebview.h: reimp compositing stuff from QWebPageClient
+ * Api/qwebsettings.cpp: init new settings flag for compositing as
+ false
+ (QWebSettingsPrivate::apply): apply new settings flag for compositing
+ (QWebSettings::QWebSettings):
+ * Api/qwebsettings.h: new settings flag for compositing
+ * Api/qwebview.cpp:
+ (QWebView::setPage): qwebview doesn't support compositing: always false
+ * QGVLauncher/main.cpp:
+ (WebView::WebView): some more cmdline arguments + compositing
+ (MainWindow::init): some more cmdline arguments
+ (main): ditto
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::attachRootGraphicsLayer): reimp for
+ accel-compositing
+ (WebCore::ChromeClientQt::setNeedsOneShotDrawingSynchronization):
+ reimp for accel compositing
+ (WebCore::ChromeClientQt::scheduleCompositingLayerSync): reimp for
+ accel compositing
+ * WebCoreSupport/ChromeClientQt.h: reimps for accel compositing
+
+2010-01-21 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Improve the autotests of QtWebkit
+ https://bugs.webkit.org/show_bug.cgi?id=32216
+
+ Remove qWait() of the test when possible.
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::loadFinished):
+ (tst_QWebPage::database):
+ (tst_QWebPage::testEnablePersistentStorage):
+ (tst_QWebPage::errorPageExtension):
+ (tst_QWebPage::screenshot):
+
+2010-01-21 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Prospective build fix for the Qt build.
+
+ Fix compilation against Qt without WebKit support by not including QtWebKit/QWebView
+ but widget.h instead and instantiating QWebView through a typedef, to ensure we're using
+ our locally built WebKit.
+
+ * tests/hybridPixmap/widget.h:
+ * tests/hybridPixmap/widget.ui:
+
+2010-01-21 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Adding QPixmap/QImage support for the Qt hybrid layer
+ https://bugs.webkit.org/show_bug.cgi?id=32461
+
+ * tests/hybridPixmap: Added.
+ * tests/hybridPixmap/hybridPixmap.pro: Added.
+ * tests/hybridPixmap/resources.qrc: Added.
+ * tests/hybridPixmap/test.html: Added.
+ * tests/hybridPixmap/tst_hybridPixmap.cpp: Added.
+ (tst_hybridPixmap::tst_hybridPixmap): tests most of the use cases for
+ hybrid pixmap/image manipulation
+ (tst_hybridPixmap::init): QTestLib initialization
+ (tst_hybridPixmap::cleanup): QTestLib cleanup
+ (tst_hybridPixmap::hybridPixmap): run the html file
+ * tests/hybridPixmap/widget.cpp: Added.
+ (Widget::Widget):
+ (Widget::refreshJS):
+ (Widget::start):
+ (Widget::completeTest):
+ (Widget::setPixmap):
+ (Widget::pixmap):
+ (Widget::setImage):
+ (Widget::image):
+ (Widget::~Widget):
+ (Widget::changeEvent):
+ (Widget::compare):
+ (Widget::imageSlot):
+ (Widget::pixmapSlot):
+ (Widget::randomSlot):
+ * tests/hybridPixmap/widget.h: Added.
+ * tests/hybridPixmap/widget.ui: Added.
+ * tests/tests.pro:
+
+2010-01-21 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Custom select popups.
+ https://bugs.webkit.org/show_bug.cgi?id=33418
+
+ Adjusting QtFallbackWebPopupCombo to the changes in WebCore layer.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::createSelectPopup):
+ * WebCoreSupport/ChromeClientQt.h:
+ * WebCoreSupport/QtFallbackWebPopup.cpp:
+ (WebCore::QtFallbackWebPopupCombo::QtFallbackWebPopupCombo):
+ (WebCore::QtFallbackWebPopupCombo::showPopup):
+ (WebCore::QtFallbackWebPopupCombo::hidePopup):
+ (WebCore::QtFallbackWebPopup::QtFallbackWebPopup):
+ (WebCore::QtFallbackWebPopup::~QtFallbackWebPopup):
+ (WebCore::QtFallbackWebPopup::show):
+ (WebCore::QtFallbackWebPopup::hide):
+ (WebCore::QtFallbackWebPopup::populate):
+ * WebCoreSupport/QtFallbackWebPopup.h:
+
+2010-01-19 Steve Block <steveblock@google.com>
+
+ Reviewed by Adam Barth.
+
+ Renames WebCore/bridge/runtime.[cpp|h] to WebCore/bridge/Bridge.[cpp|h]
+ https://bugs.webkit.org/show_bug.cgi?id=33801
+
+ * Api/qwebframe.cpp:
+
+2010-01-14 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Drag and Drop source/destination code needs cleanup.
+ <https://bugs.webkit.org/show_bug.cgi?id=33691>.
+
+ Update to new way of calling sourceOperation.
+
+ * WebCoreSupport/DragClientQt.cpp:
+ (WebCore::DragClientQt::startDrag):
+
+2010-01-14 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Symbian build fixes.
+
+ * tests/qwebpage/tst_qwebpage.cpp: Include util.h
+ * tests/tests.pri: Don't define TESTS_SOURCE_DIR, it doesn't work.
+ * tests/util.h: Define TESTS_SOURCE_DIR here, just like it's done in Qt.
2010-01-14 Simon Hausmann <simon.hausmann@nokia.com>
@@ -230,23 +1788,89 @@
* symbian/bwins/QtWebKitu.def:
* symbian/eabi/QtWebKitu.def:
-2009-12-18 Joe Ligman <joseph.ligman@nokia.com>
+2010-01-13 Darin Adler <darin@apple.com>
- Reviewed by Kenneth Rohde Christiansen.
+ Reviewed by Dan Bernstein.
- [Qt] Add new API to QWebFrame to scrollRecursively starting with any css overflow
- then checking current frame and then ancestors
- https://bugs.webkit.org/show_bug.cgi?id=32668
+ Move more of the selection and caret painting code from Frame to SelectionController.
+ https://bugs.webkit.org/show_bug.cgi?id=33619
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::inputMethodEvent): Seems possibly wrong to be directly invoking this
+ setCaretVisible here, but I updated it to call it in its new location.
+
+2010-01-11 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] Add private API for QWebFrame scrolling, to maintain binary compatibility with Qt 4.6.
+
+ This is just a temporary addition until we have introduced #ifdefs to allow
+ safely removing the private API again.
* Api/qwebframe.cpp:
- (QWebFramePrivate::scrollOverflow):
- (QWebFrame::scrollRecursively):
- * Api/qwebframe.h:
- * Api/qwebframe_p.h:
- * tests/qwebframe/qwebframe.qrc:
- * tests/qwebframe/testiframe.html: Added.
- * tests/qwebframe/testiframe2.html: Added.
- * tests/qwebframe/tst_qwebframe.cpp:
+ (qtwebkit_webframe_scrollRecursively):
+
+2010-01-10 Robert Hogan <robert@roberthogan.net>
+
+ Reviewed by Adam Barth.
+
+ [Qt] Add enableXSSAuditor support to QWebSettings and DRT.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33419
+
+ * Api/qwebsettings.cpp:
+ (QWebSettingsPrivate::apply):
+ * Api/qwebsettings.h:
+
+2010-01-09 Daniel Bates <dbates@webkit.org>
+
+ No review, rolling out r53044.
+ http://trac.webkit.org/changeset/53044
+ https://bugs.webkit.org/show_bug.cgi?id=33419
+
+ We need to look into this some more because the Qt
+ bot is failing the XSSAuditor tests. See bug #33419
+ for more details.
+
+ * Api/qwebsettings.cpp:
+ * Api/qwebsettings.h:
+
+2010-01-09 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33419
+
+ Adds support for the XSSAuditor to the Qt DRT.
+
+ * Api/qwebsettings.cpp: Updated comment to reflect added key XSSAuditorEnabled.
+ * Api/qwebsettings.h: Adds settings key XSSAuditorEnabled.
+
+2010-01-08 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Delegation client
+ https://bugs.webkit.org/show_bug.cgi?id=32826
+
+ Added method createPopup to ChromeClientQt used to create popups.
+ QtFallbackWebPopup moved from WebCore/platform/qt to
+ WebKit/qt/WebCoreSupport.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::createPopup):
+ * WebCoreSupport/ChromeClientQt.h:
+ * WebCoreSupport/QtFallbackWebPopup.cpp: Added.
+ (WebCore::QtFallbackWebPopup::QtFallbackWebPopup):
+ (WebCore::QtFallbackWebPopup::show):
+ (WebCore::QtFallbackWebPopup::populate):
+ (WebCore::QtFallbackWebPopup::showPopup):
+ (WebCore::QtFallbackWebPopup::hidePopup):
+ (WebCore::QtFallbackWebPopup::activeChanged):
+ (WebCore::QtFallbackWebPopup::setParent):
+ * WebCoreSupport/QtFallbackWebPopup.h: Added.
+ (WebCore::QtFallbackWebPopup::hide):
2010-01-07 Yael Aharon <yael.aharon@nokia.com>
@@ -275,6 +1899,93 @@
(qt_suspendActiveDOMObjects):
(qt_resumeActiveDOMObjects):
+2010-01-06 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Return an invalid Qt::ImMicroFocus if queried while the view needs to layout.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33204
+
+ * Api/qwebpage.cpp:
+ (QWebPage::inputMethodQuery):
+
+2010-01-05 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Drag & drop layout tests fail even when run manually
+ https://bugs.webkit.org/show_bug.cgi?id=33055
+
+ No new tests. Fix 3 layout tests when run manually.
+ fast/events/drag-and-drop.html
+ fast/events/drag-and-drop-dataTransfer-types-nocrash.html
+ fast/events/drag-and-drop-fire-drag-dragover.html
+ Running these tests in DRT will be fixed in 31332.
+
+ * Api/qwebpage.cpp:
+ (dropActionToDragOp):
+ (dragOpToDropAction):
+ (QWebPagePrivate::dragEnterEvent):
+ (QWebPagePrivate::dragMoveEvent):
+ (QWebPagePrivate::dropEvent):
+ Accept drag events even if they are not over a drop target.
+ This is to ensure that drag events will continue to be delivered.
+
+ * Api/qwebpage_p.h:
+ * WebCoreSupport/DragClientQt.cpp:
+ (WebCore::dragOperationToDropActions):
+ (WebCore::dropActionToDragOperation):
+ (WebCore::DragClientQt::startDrag):
+ Send dragEnd event.
+
+2010-01-04 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33097
+
+ Cleans up the File menu to better conform to the File menu in Safari
+ both in terms of options and keyboard shortcuts. Adds a "Quit" menu
+ options to close all open windows.
+
+ * QGVLauncher/main.cpp:
+ (MainWindow::buildUI):
+
+2009-12-31 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Enable all HTML5 persistent features for QGVLauncher
+ https://bugs.webkit.org/show_bug.cgi?id=33086
+
+ * QGVLauncher/main.cpp: Call enablePersistentStorage()
+ (main):
+
+2009-12-30 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] It should be possible to disable inspector
+ https://bugs.webkit.org/show_bug.cgi?id=32724
+
+ This change fixes the build break. Some QtWebKit interfaces
+ will not be fully functional (most notable QWebInspector) if
+ INSPECTOR is disabled.
+
+ * Api/qwebinspector.cpp:
+ (QWebInspector::showEvent):
+ (QWebInspector::closeEvent):
+ * Api/qwebpage.cpp:
+ (webActionForContextMenuAction):
+ (QWebPagePrivate::getOrCreateInspector):
+ (QWebPagePrivate::inspectorController):
+ (QWebPage::triggerAction):
+ (QWebPage::updatePositionDependentActions):
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientQt::showWindow):
+ (WebCore::InspectorClientQt::closeWindow):
+
2009-12-30 Janne Koskinen <janne.p.koskinen@digia.com>
Reviewed by Simon Hausmann.
@@ -286,6 +1997,267 @@
* symbian/bwins/QtWebKitu.def: Added.
* symbian/eabi/QtWebKitu.def: Added.
+2009-12-29 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Ariya Hidayat.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32925
+
+ Adds an Open File dialog to make it convenient to open a file
+ to view in the browser.
+
+ * QGVLauncher/main.cpp:
+ (MainWindow::load): Modified to call loadURL.
+ (MainWindow::openFile): Added.
+ (MainWindow::loadURL): Added.
+ (MainWindow::buildUI): Added menu item Open File.
+
+2009-12-29 Robert Hogan <robert@roberthogan.net>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Fix crash on LayoutTests/fast/loader/empty-embed-src-attribute.html
+
+ Related to https://bugs.webkit.org/show_bug.cgi?id=23806
+
+ If an embedded document is loaded within a page and it has an empty
+ URL, use a blank URL for the load request.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33017
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::createFrame):
+
+2009-12-29 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Rubber-stamped by Simon Hausmann and Holger Freyther.
+
+ [Qt] Remove WebKit/qt/WebKitPart empty directory
+
+ The content of the directory has been removed by r34888.
+
+ * WebKitPart: Removed.
+
+2009-12-29 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] DRT: Frame loader callbacks differ from the Mac port
+ https://bugs.webkit.org/show_bug.cgi?id=32989
+
+ Remove messages from the callbacks that should not dump them to match
+ the expected results for the http/loading tests.
+
+ Unskip some http/loading tests which succeed now.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::dispatchDidPopStateWithinPage):
+ (WebCore::FrameLoaderClientQt::dispatchWillClose):
+ (WebCore::FrameLoaderClientQt::dispatchDidReceiveIcon):
+ (WebCore::FrameLoaderClientQt::dispatchDidClearWindowObjectInWorld):
+
+2009-12-29 Robert Hogan <robert@roberthogan.net>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] fix fast/dom/Window/window-onFocus.html
+
+ Add support for layouttestcontroller.windowIsKey to Qt DRT and fix issue where
+ window.onblur was getting dispatched twice from QtWebKit.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32990
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::focusOutEvent):
+
+2009-12-24 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Gustavo Noronha.
+
+ Doc : QGraphicsWebView::zoomFactor was introduced in 4.6.
+
+ * Api/qgraphicswebview.cpp:
+
+2009-12-22 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Rubber-stamped by Holger Freyther.
+
+ Moved QtLauncher to WebKitTools/
+
+ * QtLauncher: Removed.
+ * QtLauncher/QtLauncher.pro: Removed.
+ * QtLauncher/main.cpp: Removed.
+
+2009-12-21 David Boddie <dboddie@trolltech.com>
+
+ Reviewed by Simon Hausmann.
+
+ Doc: Minor fixes to language.
+
+ * Api/qwebpage.cpp:
+
+2009-12-21 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Clean up the WebKit layer unit-tests
+
+ - Use tests.pri for common options
+ - Standardize file naming
+ - Move all resources to 'resources' subdir
+ - Standardize how TESTS_SOURCE_DIR is used
+ - Get rid of UID3 for symbian (autogenerated)
+ - Don't build app bundles on Mac OS X
+
+ * tests/benchmarks/loading/loading.pro: Added.
+ * tests/benchmarks/loading/tst_loading.pro: Removed.
+ * tests/benchmarks/painting/painting.pro: Added.
+ * tests/benchmarks/painting/tst_painting.pro: Removed.
+ * tests/qgraphicswebview/qgraphicswebview.pro:
+ * tests/qwebelement/qwebelement.pro:
+ * tests/qwebelement/qwebelement.qrc: Removed.
+ * tests/qwebelement/resources/image.png: Renamed from WebKit/qt/tests/qwebelement/image.png.
+ * tests/qwebelement/resources/style.css: Renamed from WebKit/qt/tests/qwebelement/style.css.
+ * tests/qwebelement/resources/style2.css: Renamed from WebKit/qt/tests/qwebelement/style2.css.
+ * tests/qwebelement/tst_qwebelement.qrc: Added.
+ * tests/qwebframe/qwebframe.pro:
+ * tests/qwebframe/qwebframe.qrc: Removed.
+ * tests/qwebframe/resources/image.png: Renamed from WebKit/qt/tests/qwebframe/image.png.
+ * tests/qwebframe/resources/style.css: Renamed from WebKit/qt/tests/qwebframe/style.css.
+ * tests/qwebframe/resources/test1.html: Renamed from WebKit/qt/tests/qwebframe/test1.html.
+ * tests/qwebframe/resources/test2.html: Renamed from WebKit/qt/tests/qwebframe/test2.html.
+ * tests/qwebframe/resources/testiframe.html: Renamed from WebKit/qt/tests/qwebframe/testiframe.html.
+ * tests/qwebframe/resources/testiframe2.html: Renamed from WebKit/qt/tests/qwebframe/testiframe2.html.
+ * tests/qwebframe/tst_qwebframe.cpp:
+ * tests/qwebframe/tst_qwebframe.qrc: Added.
+ * tests/qwebhistory/qwebhistory.pro:
+ * tests/qwebhistory/resources/page1.html: Renamed from WebKit/qt/tests/qwebhistory/data/page1.html.
+ * tests/qwebhistory/resources/page2.html: Renamed from WebKit/qt/tests/qwebhistory/data/page2.html.
+ * tests/qwebhistory/resources/page3.html: Renamed from WebKit/qt/tests/qwebhistory/data/page3.html.
+ * tests/qwebhistory/resources/page4.html: Renamed from WebKit/qt/tests/qwebhistory/data/page4.html.
+ * tests/qwebhistory/resources/page5.html: Renamed from WebKit/qt/tests/qwebhistory/data/page5.html.
+ * tests/qwebhistory/resources/page6.html: Renamed from WebKit/qt/tests/qwebhistory/data/page6.html.
+ * tests/qwebhistory/tst_qwebhistory.cpp:
+ (tst_QWebHistory::):
+ * tests/qwebhistory/tst_qwebhistory.qrc:
+ * tests/qwebhistoryinterface/qwebhistoryinterface.pro:
+ * tests/qwebinspector/qwebinspector.pro:
+ * tests/qwebpage/qwebpage.pro:
+ * tests/qwebpage/resources/frame_a.html: Renamed from WebKit/qt/tests/qwebpage/frametest/frame_a.html.
+ * tests/qwebpage/resources/iframe.html: Renamed from WebKit/qt/tests/qwebpage/frametest/iframe.html.
+ * tests/qwebpage/resources/iframe2.html: Renamed from WebKit/qt/tests/qwebpage/frametest/iframe2.html.
+ * tests/qwebpage/resources/iframe3.html: Renamed from WebKit/qt/tests/qwebpage/frametest/iframe3.html.
+ * tests/qwebpage/resources/index.html: Renamed from WebKit/qt/tests/qwebpage/frametest/index.html.
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::backActionUpdate):
+ (tst_QWebPage::frameAt):
+ (tst_QWebPage::errorPageExtensionInFrameset):
+ (tst_QWebPage::screenshot):
+ * tests/qwebpage/tst_qwebpage.qrc:
+ * tests/qwebplugindatabase/qwebplugindatabase.pro:
+ * tests/qwebview/qwebview.pro:
+ * tests/qwebview/resources/frame_a.html: Renamed from WebKit/qt/tests/qwebview/data/frame_a.html.
+ * tests/qwebview/resources/index.html: Renamed from WebKit/qt/tests/qwebview/data/index.html.
+ * tests/qwebview/tst_qwebview.cpp:
+ (tst_QWebView::reusePage):
+ (tst_QWebView::crashTests):
+ * tests/qwebview/tst_qwebview.qrc:
+ * tests/resources/image2.png: Renamed from WebKit/qt/tests/qwebframe/resources/image2.png.
+ * tests/tests.pri: Added.
+ * tests/tests.pro:
+
+2009-12-18 Ariya Hidayat <ariya.hidayat@gmail.com>
+
+ Build fix, not reviewed.
+
+ * QtLauncher/main.cpp:
+ (MainWindow::setTouchMocking): Leave setTouchMocking as an empty
+ function for Qt < 4.6 so that moc still creates a slot for that.
+ Otherwise, it would have generated a linker error.
+
+2009-12-18 Adam Roben <aroben@apple.com>
+
+ Qt build fix
+
+ * Api/qwebpage.cpp: Added #include.
+
+2009-12-18 Adam Roben <aroben@apple.com>
+
+ Qt build fix
+
+ * Api/qwebpage.cpp:
+ Added #includes.
+
+2009-12-18 Joe Ligman <joseph.ligman@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Add new API to QWebFrame to scrollRecursively starting with any css overflow
+ then checking current frame and then ancestors
+ https://bugs.webkit.org/show_bug.cgi?id=32668
+
+ * Api/qwebframe.cpp:
+ (QWebFramePrivate::scrollOverflow):
+ (QWebFrame::scrollRecursively):
+ * Api/qwebframe.h:
+ * Api/qwebframe_p.h:
+ * tests/qwebframe/qwebframe.qrc:
+ * tests/qwebframe/testiframe.html: Added.
+ * tests/qwebframe/testiframe2.html: Added.
+ * tests/qwebframe/tst_qwebframe.cpp:
+
+2009-12-18 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Fix infinite recursion in touch mocking.
+
+ Don't send the fake touch events to the view, as that'll trigger the
+ event filter again.
+
+ * QtLauncher/main.cpp:
+ (MainWindow::sendTouchEvent):
+
+2009-12-17 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Add support for mocking touch events with Q(GV)Launcher
+ https://bugs.webkit.org/show_bug.cgi?id=32434
+
+ The event delivery should go through QCoreApplication::sendEvent()
+
+ * QtLauncher/main.cpp:
+ (MainWindow::sendTouchEvent):
+
+2009-12-17 Kim Grönholm <kim.gronholm@nomovok.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Add support for touch events in QWebView and QGraphicsWebView
+ https://bugs.webkit.org/show_bug.cgi?id=32432
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebView::QGraphicsWebView):
+ (QGraphicsWebView::sceneEvent):
+ * Api/qwebview.cpp:
+ (QWebView::QWebView):
+ (QWebView::event):
+
+2009-12-17 Kim Grönholm <kim.gronholm@nomovok.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Add support for mocking touch events with QtLauncher
+ https://bugs.webkit.org/show_bug.cgi?id=32434
+
+ * QtLauncher/main.cpp:
+ (MainWindow::MainWindow):
+ (MainWindow::sendTouchEvent):
+ (MainWindow::eventFilter):
+ (MainWindow::setTouchMocking):
+ (MainWindow::setupUI):
+
2009-12-14 Holger Hans Peter Freyther <zecke@selfish.org>
Reviewed by Kenneth Rohde Christiansen.
@@ -311,18 +2283,10 @@
* WebCoreSupport/ChromeClientQt.cpp:
(WebCore::ChromeClientQt::runJavaScriptPrompt): Fixup null QString
-2009-12-21 David Boddie <dboddie@trolltech.com>
+2009-11-24 Holger Hans Peter Freyther <zecke@selfish.org>
Reviewed by Simon Hausmann.
- Doc: Minor fixes to language.
-
- * Api/qwebpage.cpp:
-
-2009-12-15 Holger Hans Peter Freyther <zecke@selfish.org>
-
- Reviewed by NOBODY (OOPS!).
-
[Qt] Do not disable the inspector on show and hide
https://bugs.webkit.org/show_bug.cgi?id=31851
@@ -335,8 +2299,58 @@
user of the inspector client.
* Api/qwebinspector.cpp:
- (QWebInspector::event):
(QWebInspector::hideEvent):
+ (QWebInspector::closeEvent):
+ * Api/qwebinspector.h:
+
+2009-12-14 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Improve the autotests of QtWebkit
+ https://bugs.webkit.org/show_bug.cgi?id=32216
+
+ Refactor tst_qwebelement to remove the qWait()
+
+ * tests/qwebelement/tst_qwebelement.cpp:
+ (tst_QWebElement::style):
+
+2009-12-14 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Fix the QWebPage inputMethods() autotest after r51758
+ to compare the Qt::ImFont property's family against an explicitly
+ previously configured family.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32491
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::inputMethods):
+
+2009-12-13 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=32499
+ Add client based Geolocation provider
+
+ Add first cut of a client based Geolocation provider. This is guarded by
+ ENABLE(CLIENT_BASED_GEOLOCATION) and is off by default for now. This adds a
+ GeolocationControllerClient interface that no-one currently implements,
+ but will in a subsequent patch.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+
+2009-12-13 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Add a test in Qt for https://bugs.webkit.org/show_bug.cgi?id=29005
+ https://bugs.webkit.org/show_bug.cgi?id=29008
+
+ * tests/qwebframe/tst_qwebframe.cpp:
2009-12-13 Simon Hausmann <hausmann@webkit.org>
@@ -351,6 +2365,263 @@
* Api/qwebview.h:
+2009-12-11 Yael Aharon <yael.aharon@nokia.com>
+
+ Unreviewed build fix for Qt versions < 4.6.
+
+ * tests/qwebframe/tst_qwebframe.cpp:
+ * tests/qwebview/tst_qwebview.cpp:
+ (tst_QWebView::reusePage):
+
+2009-12-11 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Updated QWebElement documentation
+
+ findAll() returns a QWebElementCollection, not QList<QWebElement>.
+
+ * docs/webkitsnippets/webelement/main.cpp:
+ (findAll):
+
+2009-12-11 Simon Hausmann <hausmann@webkit.org>, Kim Grönholm <kim.gronholm@nomovok.com>
+
+ Reviewed by Antti Koivisto.
+
+ Forward Qt touch events to the event handler as platform touch events.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32114
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::touchEvent):
+ (QWebPage::event):
+ * Api/qwebpage_p.h:
+
+2009-12-07 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Improve the autotests of QtWebkit
+ https://bugs.webkit.org/show_bug.cgi?id=32216
+
+ Remove the calls to qWait() of the autotest of QWebView
+
+ * tests/qwebview/tst_qwebview.cpp:
+ (tst_QWebView::reusePage):
+
+2009-12-07 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Improve the autotests of QtWebkit
+ https://bugs.webkit.org/show_bug.cgi?id=32216
+
+ Refactor tst_qwebframe to remove qWait() and use
+ the function waitForSignal() from util.h
+
+ * tests/qwebframe/tst_qwebframe.cpp:
+
+2009-12-07 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Improve the autotests of QtWebkit
+ https://bugs.webkit.org/show_bug.cgi?id=32216
+
+ Refactor the test of QGraphicsWebView:
+ -make waitForSignal() available to all the tests.
+ -remove QTest::qWait()
+
+ * tests/qgraphicswebview/tst_qgraphicswebview.cpp:
+ (tst_QGraphicsWebView::crashOnViewlessWebPages):
+ * tests/util.h:
+ (waitForSignal):
+
+2009-12-07 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Plugins: Force windowless mode when there is no native window handle
+
+ Inject wmode=opaque while instantiating the plugin for the case when the
+ webpage is not backed by a native window handle.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32059
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::createPlugin):
+
+2009-12-04 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Corrects QtLauncher style
+
+ * QtLauncher/main.cpp:
+ (WebPage::acceptNavigationRequest):
+ (MainWindow::MainWindow):
+ (MainWindow::webPage):
+ (MainWindow::webView):
+ (MainWindow::changeLocation):
+ (MainWindow::loadFinished):
+ (MainWindow::showLinkHover):
+ (MainWindow::zoomIn):
+ (MainWindow::zoomOut):
+ (MainWindow::print):
+ (MainWindow::setEditable):
+ (MainWindow::dumpHtml):
+ (MainWindow::selectElements):
+ (MainWindow::newWindow):
+ (MainWindow::setupUI):
+ (WebPage::createWindow):
+ (WebPage::createPlugin):
+ (main):
+
+2009-12-04 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] QtLauncher: add a menu to show or hide the web inspector.
+ https://bugs.webkit.org/show_bug.cgi?id=32149
+
+ * QtLauncher/main.cpp:
+ (WebInspector::WebInspector):
+ (WebInspector::showEvent):
+ (WebInspector::hideEvent):
+ (MainWindow::MainWindow):
+ (MainWindow::setupUI):
+
+2009-12-04 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Antti Koivisto.
+
+ Split out the renderPrivate in two methods, one for working on
+ relative coordinates (relative to the viewport) and one for
+ working on absolute coordinates. The latter is more effecient
+ for implementing tiling, as you don't need translate the coords,
+ and because it avoid clipping to the viewport.
+
+ No behaviour changes, so no new tests.
+
+ * Api/qwebframe.cpp:
+ (QWebFramePrivate::renderContentsLayerAbsoluteCoords):
+ (QWebFramePrivate::renderRelativeCoords):
+ (QWebFrame::render):
+ * Api/qwebframe_p.h:
+
+2009-12-04 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Allow removing 'qrc' as a local security origin scheme
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+
+2009-12-04 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Clean up argument parsing in the QtLauncher
+
+ * QtLauncher/main.cpp:
+
+2009-12-04 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Prevent the inspector from closing its wrapping widget.
+ This is not necessary anymore since we now hide the embedded
+ close button.
+ https://bugs.webkit.org/show_bug.cgi?id=32149
+
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientQt::showWindow):
+ (WebCore::InspectorClientQt::closeWindow):
+
+2009-12-03 İsmail Dönmez <ismail@namtrac.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix compilation when SVG is disabled.
+
+ * Api/qwebframe.cpp:
+ (qt_drt_pauseSVGAnimation):
+
+2009-12-03 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/7214236> and http://webkit.org/b/32052 - Implement HTML5 state object history API
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::dispatchDidPushStateWithinPage):
+ (WebCore::FrameLoaderClientQt::dispatchDidReplaceStateWithinPage):
+ (WebCore::FrameLoaderClientQt::dispatchDidPopStateWithinPage):
+ * WebCoreSupport/FrameLoaderClientQt.h:
+
+2009-12-03 Pavel Feldman <pfeldman@dhcp-172-28-174-220.spb.corp.google.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Simplify the settings support in inspector controller.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32076
+
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientQt::populateSetting):
+ (WebCore::InspectorClientQt::storeSetting):
+ (WebCore::variantToSetting):
+ (WebCore::settingToVariant):
+ * WebCoreSupport/InspectorClientQt.h:
+
+2009-12-03 Ben Murdoch <benm@google.com>
+
+ Reviewed by Brady Eidson.
+
+ [Android] The FrameLoaderClient is unaware of BackForwardList changes.
+ https://bugs.webkit.org/show_bug.cgi?id=31914
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::dispatchDidAddBackForwardItem): Add an empty implementation. Method added to FrameLoaderClient by Android (see bug).
+ (WebCore::FrameLoaderClientQt::dispatchDidRemoveBackForwardItem): ditto.
+ (WebCore::FrameLoaderClientQt::dispatchDidChangeBackForwardIndex): ditto.
+ * WebCoreSupport/FrameLoaderClientQt.h:
+
+2009-12-01 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Not reviewed. Try to fix Qt build.
+
+ * Api/qwebframe.cpp:
+ (qt_drt_pauseSVGAnimation):
+
+2009-12-01 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Simon Fraser.
+
+ Add SVG animation test framework with 'snapshot' functionality
+ https://bugs.webkit.org/show_bug.cgi?id=31897
+
+ Add API used by the new 'sampleSVGAnimationForElementAtTime' DRT method,
+ forwarding the call to SVGDocumentExtensions, if SVG is enabled.
+
+ Implemented just like the existing pauseAnimation* methods for CSS animations.
+
+ * Api/qwebframe.cpp:
+ (qt_drt_pauseSVGAnimation):
+
+2009-12-01 Daniel Bates <dbates@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31898
+
+ Makes QtLauncher default to the http scheme for URLs.
+
+ * QtLauncher/main.cpp:
+ (MainWindow::MainWindow):
+ (MainWindow::changeLocation):
+ (main):
+
2009-11-30 Abhinav Mithal <abhinav.mithal@nokia.com>
Reviewed by Simon Hausmann.
@@ -361,6 +2632,17 @@
* Api/qwebpage.cpp:
(QWebPage::userAgentForUrl):
+2009-11-30 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Fix minor waning in QtWebKit
+ https://bugs.webkit.org/show_bug.cgi?id=31963
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (ErrorPage::extension): Remove info wariable as it is
+ not used.
+
2009-11-28 Simon Hausmann <simon.hausmann@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
@@ -377,6 +2659,32 @@
* tests/qwebpage/tst_qwebpage.cpp:
(tst_QWebPage::inputMethods):
+2009-11-26 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Rubber-stamped by Holger Freyther.
+
+ Removed unused ICO image plugin handler.
+
+ * Plugins/ICOHandler.cpp: Removed.
+ * Plugins/ICOHandler.h: Removed.
+ * Plugins/Plugins.pro: Removed.
+
+2009-11-12 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Do not show the QWidget when the WebCore::Widget is hidden
+ https://bugs.webkit.org/show_bug.cgi?id=31203
+
+ The clipping code was making a QWidget visible even if the
+ WebCore::Widget was hidden. Fix the bug by calling setVisible
+ only if the WebCore::Widget Widget::isSelfVisible.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::QtPluginWidget::show): Override WebCore::Widget::show to call handleVisibility
+ (WebCore::QtPluginWidget::handleVisibility): New method to call setVisible when we are visible
+ (FrameLoaderClientQt::createPlugin): Hide the QWidget by default
+
2009-11-23 David Boddie <dboddie@trolltech.com>
Reviewed by Simon Hausmann.
@@ -405,6 +2713,27 @@
* tests/qwebframe/tst_qwebframe.cpp:
+2009-11-19 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Add instantiation tests for QWebInspector.
+
+ * tests/qwebinspector/qwebinspector.pro: Added.
+ * tests/qwebinspector/tst_qwebinspector.cpp: Added.
+ (tst_QWebInspector::attachAndDestroy):
+ * tests/tests.pro:
+
+2009-11-19 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Fix QWebInspector destruction problem.
+ https://bugs.webkit.org/show_bug.cgi?id=31664
+
+ * Api/qwebpage.cpp:
+ (QWebPage::~QWebPage):
+
2009-11-19 Olivier Goffart <ogoffart@trolltech.com>
Reviewed by Simon Hausmann.
@@ -424,6 +2753,60 @@
(tst_QWebPage::modified):
(tst_QWebPage::database):
+2009-11-18 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Remove support for Qt v4.3 or older versions
+ https://bugs.webkit.org/show_bug.cgi?id=29469
+
+ * Api/qcookiejar.cpp: Removed.
+ * Api/qcookiejar.h: Removed.
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebView::event):
+ * Api/qwebframe.cpp:
+ (QWebFrame::load):
+ * Api/qwebframe.h:
+ * Api/qwebkitglobal.h:
+ * Api/qwebnetworkinterface.cpp: Removed.
+ * Api/qwebnetworkinterface.h: Removed.
+ * Api/qwebnetworkinterface_p.h: Removed.
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+ (QWebPagePrivate::acceptNavigationRequest):
+ (QWebPage::acceptNavigationRequest):
+ (QWebPage::action):
+ (QWebPage::userAgentForUrl):
+ * Api/qwebpage.h:
+ * Api/qwebpage_p.h:
+ * Api/qwebview.cpp:
+ (QWebView::load):
+ (QWebView::event):
+ * Api/qwebview.h:
+ * QtLauncher/main.cpp:
+ (MainWindow::print):
+ (MainWindow::setupUI):
+ (main):
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::download):
+ (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNewWindowAction):
+ (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction):
+ (WebCore::FrameLoaderClientQt::startDownload):
+ (WebCore::FrameLoaderClientQt::createPlugin):
+
+2009-11-18 Shu Chang <Chang.Shu@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Add support for displaying deleteButton.
+ https://bugs.webkit.org/show_bug.cgi?id=31560
+
+ Test: LayoutTests/editing/deleting/5408255.html
+
+ * Api/qwebsettings.cpp:
+ (graphics):
+ * Api/qwebsettings.h:
+
2009-11-18 Paul Olav Tvete <paul.tvete@nokia.com>
Reviewed by Simon Hausmann.
@@ -442,16 +2825,49 @@
* docs/qtwebkit.qdoc:
-2009-11-18 Simon Hausmann <simon.hausmann@nokia.com>
+2009-11-18 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
- Reviewed and suggested by Tor Arne Vestbø.
+ Reviewed by Simon Hausmann.
- Fix the autotest after commit ecbb2c0dd21bfc197e1f7b53150ec9b1a1d8cb8f
- to compare the Qt::ImFont property's family against an explicitly
- previously configured family.
+ [Qt] Add QtLauncher support for opening links in the default browser
+
+ This can be triggered by either the context menu or by clicking a link
+ while holding down the Alt key. Opening a link in a new windows is
+ triggered by holding down Shift.
+
+ * QtLauncher/main.cpp:
+
+2009-11-17 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] QGLLauncher does not support drag&drop of local files
+ https://bugs.webkit.org/show_bug.cgi?id=31057
+
+ Enable accepting files in QGraphicsWebView.
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebView::QGraphicsWebView):
+ (QGraphicsWebView::dragEnterEvent):
+
+2009-11-17 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Kenneth Christiansen.
+
+ [Qt] better test coverage for ErrorPageExtension
+ https://bugs.webkit.org/show_bug.cgi?id=31583
+
+ Improved the coverage of current ErrorPageExtension tests by
+ adding autotests involving frameset and iframes.
* tests/qwebpage/tst_qwebpage.cpp:
- (tst_QWebPage::inputMethods):
+ (ErrorPage::extension): Make the ErrorPageExtension
+ to work for all frames, not only the main frame.
+ (tst_QWebPage::errorPageExtension): Stop using
+ the 'frameset.html' resouce in this method since
+ an autotest specific for frameset's is being added.
+ (tst_QWebPage::errorPageExtensionInIFrames): Added.
+ (tst_QWebPage::errorPageExtensionInFrameset): Added.
2009-11-16 Simon Hausmann <simon.hausmann@nokia.com>
@@ -476,35 +2892,20 @@
* tests/qwebpage/tst_qwebpage.cpp:
(tst_QWebPage::errorPageExtension):
-2009-11-16 Holger Hans Peter Freyther <zecke@selfish.org>
+2009-11-13 Adam Roben <aroben@apple.com>
- Reviewed by NOBODY (OOPS!).
+ Update for changes to FrameLoaderClient
- [Qt] Do not show the QWidget when the WebCore::Widget is hidden
- https://bugs.webkit.org/show_bug.cgi?id=31203
+ Fixes <http://webkit.org/b/31124> Tell the WebFrameLoadDelegate when
+ window objects in isolated worlds are cleared
- The clipping code was making a QWidget visible even if the
- WebCore::Widget was hidden. Fix the bug by calling setVisible
- only if the WebCore::Widget is shown.
+ Reviewed by Dave Hyatt.
* WebCoreSupport/FrameLoaderClientQt.cpp:
- (WebCore::QtPluginWidget::show): Override WebCore::Widget
- (WebCore::QtPluginWidget::hide): Override WebCore::Widget
- (WebCore::QtPluginWidget::handleVisibility): New method to call setVisible when we are visible
- (FrameLoaderClientQt::createPlugin): Hide the QWidget by default
-
-2009-11-09 Benjamin Poulain <benjamin.poulain@nokia.com>
-
- Reviewed by Kenneth Rohde Christiansen.
-
- https://bugs.webkit.org/show_bug.cgi?id=30628
- Add an API to get all the attributes from a QWebElement.
-
- * Api/qwebelement.cpp:
- (QWebElement::attributesName):
- * Api/qwebelement.h:
- * tests/qwebelement/tst_qwebelement.cpp:
- (tst_QWebElement::listAttributes):
+ (WebCore::FrameLoaderClientQt::dispatchDidClearWindowObjectInWorld):
+ * WebCoreSupport/FrameLoaderClientQt.h:
+ Replaced windowObjectCleared with this function. Does nothing if the
+ passed-in world is not the mainThreadNormalWorld().
2009-11-13 Andras Becsi <becsi.andras@stud.u-szeged.hu>
@@ -517,6 +2918,18 @@
(QWebSettingsPrivate::apply):
(QWebSettings::setMaximumPagesInCache):
+2009-11-13 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Fix initial QWebView focus behavior.
+
+ focusController->setFocused(true) was not always called.
+ https://bugs.webkit.org/show_bug.cgi?id=31466
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::focusInEvent):
+
2009-11-13 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed by Simon Hausmann.
@@ -537,6 +2950,18 @@
* docs/docs.pri:
+2009-11-12 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ externalRepresentation should take Frame as the argument
+ https://bugs.webkit.org/show_bug.cgi?id=31393
+
+ No new tests as this is just a refactoring.
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::renderTreeDump):
+
2009-11-12 Antonio Gomes <tonikitoo@webkit.org>
Reviewed by Jan Alonzo.
@@ -549,6 +2974,21 @@
* Api/qwebpage.cpp:
+2009-11-12 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Custom printing shrink factors
+ https://bugs.webkit.org/show_bug.cgi?id=29042
+
+ This reverts commit r49769. The public API for this needs to be reviewed
+ before its inclusion in Qt.
+
+ * Api/qwebsettings.cpp:
+ (QWebSettingsPrivate::apply):
+ (QWebSettings::QWebSettings):
+ * Api/qwebsettings.h:
+
2009-11-11 Antonio Gomes <tonikitoo@webkit.org>
Reviewed by Kenneth Christiansen.
@@ -576,73 +3016,17 @@
* Api/qgraphicswebview.cpp:
* Api/qwebview.cpp:
-2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
-
- Reviewed by Kenneth Rohde Christiansen.
-
- [Qt] Few classes have virtual functions but non-virtual destructor
- https://bugs.webkit.org/show_bug.cgi?id=31269
-
- * Api/qgraphicswebview.cpp:
- (QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate): Add virtual
- destructor.
-
-2009-10-30 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by NOBODY (OOPS!).
-
- [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml()
-
- This ensures that long-running JavaScript (for example due to a modal alert() dialog),
- will not trigger a deferred load after only 500ms (the default tokenizer delay) while
- still giving a reasonable timeout (10 seconds) to prevent deadlock.
-
- https://bugs.webkit.org/show_bug.cgi?id=29381
-
- * Api/qwebframe.cpp: Document the behaviour
- * WebCoreSupport/FrameLoaderClientQt.cpp: set the custom tokenizer delay for substitute loads
- * tests/qwebframe/tst_qwebframe.cpp: Add test
-
-2009-11-13 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
-
- Reviewed by Kenneth Rohde Christiansen.
-
- [Qt] Fix initial QWebView focus behavior.
-
- focusController->setFocused(true) was not always called.
- https://bugs.webkit.org/show_bug.cgi?id=31466
-
- * Api/qwebpage.cpp:
- (QWebPagePrivate::focusInEvent):
-
-2009-11-12 Benjamin Poulain <benjamin.poulain@nokia.com>
+2009-11-11 Kenneth Rohde Christiansen <kenneth@webkit.org>
- Reviewed by Kenneth Rohde Christiansen.
+ Unreviewed buildbot fix.
- Custom printing shrink factors
- https://bugs.webkit.org/show_bug.cgi?id=29042
-
- This reverts commit r49769. The public API for this needs to be reviewed
- before its inclusion in Qt.
-
- * Api/qwebsettings.cpp:
- (QWebSettingsPrivate::apply):
- (QWebSettings::QWebSettings):
- * Api/qwebsettings.h:
+ Export a method to the DRT to know if the document has a
+ document element.
-2009-11-11 Liang QI <liang.qi@nokia.com>
- Update documentation for the Qt API
-
- * Api/qgraphicswebview.cpp:
- * Api/qwebelement.cpp:
* Api/qwebframe.cpp:
- * Api/qwebsettings.cpp:
- * Api/qwebview.cpp:
-
-2009-11-13 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
-
- Reviewed by Simon Hausmann.
+ (qt_drt_hasDocumentElement):
+2009-11-11 Liang QI <liang.qi@nokia.com>
[Qt] Fix tst_qwebpage and tst_qwebframe compilation on Symbian.
@@ -691,6 +3075,38 @@
* Api/qwebview.cpp:
+2009-11-11 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31323
+ Fix a few compiler warnings
+
+ * tests/qwebframe/tst_qwebframe.cpp: Add extra brackets
+ to make it explicit where the else case belongs
+
+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.
+
2009-11-10 Kenneth Rohde Christiansen <kenneth@webkit.org>
Unreviewed documentation fixes.
@@ -713,27 +3129,58 @@
* Api/qwebview.cpp:
-2009-11-11 Simon Hausmann <simon.hausmann@nokia.com>
+2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
- Reviewed by Tor Arne Vestbø.
+ Reviewed by Kenneth Rohde Christiansen.
- Fix enabling of software input panel when activating editable elements
- in QGraphicsWebView.
+ [Qt] Few classes have virtual functions but non-virtual destructor
+ https://bugs.webkit.org/show_bug.cgi?id=31269
* Api/qgraphicswebview.cpp:
- (QGraphicsWebViewPrivate::inputMethodEnabled): Implement method to
- query for input method support.
+ (QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate): Add virtual
+ destructor.
+
+2009-11-09 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30628
+ Add an API to get all the attributes from a QWebElement.
+
+ * Api/qwebelement.cpp:
+ (QWebElement::attributesName):
+ * Api/qwebelement.h:
+ * tests/qwebelement/tst_qwebelement.cpp:
+ (tst_QWebElement::listAttributes):
+
+2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings
+ https://bugs.webkit.org/show_bug.cgi?id=31040
+
* 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.
+ (QWebPagePrivate::handleScrolling):
+
+2009-11-09 Mark Mentovai <mark@chromium.org>
+
+ Reviewed by Dan Bernstein.
+
+ Track "can have scrollbar" state within FrameView independently of the
+ individual scrollbar states in ScrollView.
+
+ rdar://problem/7215132, https://bugs.webkit.org/show_bug.cgi?id=29167
+ REGRESSION (r48064): mint.com loses scrollbars after coming out of
+ edit mode.
+
+ rdar://problem/7314421, https://bugs.webkit.org/show_bug.cgi?id=30517
+ REGRESSION (r48064): Extra scroll bars in GarageBand Lesson Store.
+
+ Test: fast/overflow/scrollbar-restored.html
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::setScrollBarPolicy):
2009-11-09 Benjamin Poulain <benjamin.poulain@nokia.com>
@@ -908,6 +3355,18 @@
* Api/qgraphicswebview.h:
+2009-11-05 Shu Chang <Chang.Shu@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Add support for Shift-PageUp and Shift-PageDown key events.
+ https://bugs.webkit.org/show_bug.cgi?id=31166
+
+ Test: LayoutTests/editing/selection/shrink-selection-after-shift-pagedown.html
+
+ * WebCoreSupport/EditorClientQt.cpp:
+ (WebCore::EditorClientQt::handleKeyboardEvent):
+
2009-11-05 Simon Hausmann <hausmann@webkit.org>
Last Qt 4.5 build fix (*sigh*)
@@ -1087,6 +3546,32 @@
(WebViewCrashTest::loading):
(tst_QWebView::crashTests):
+2009-11-01 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ Turn on warnings for QtWebKit for gcc
+ https://bugs.webkit.org/show_bug.cgi?id=30958
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate): Reorder initialization list
+ to fix compiler warnings.
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::FrameLoaderClientQt): Ditto.
+
+2009-10-30 Evan Stade <estade@chromium.org>
+
+ Reviewed by David Levin.
+
+ Notify the chrome when the focused node has changed.
+ https://bugs.webkit.org/show_bug.cgi?id=30832
+
+ Added stub implementation for new ChromeClient function.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::focusedNodeChanged):
+ * WebCoreSupport/ChromeClientQt.h:
+
2009-10-30 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Reviewed by Tor Arne Vestbø.
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index 0c5df4a..45986b3 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -25,6 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
#include "config.h"
#include "ChromeClientQt.h"
@@ -35,11 +36,23 @@
#include "FrameLoaderClientQt.h"
#include "FrameView.h"
#include "HitTestResult.h"
+#include "Icon.h"
#include "NotImplemented.h"
+#include "ScrollbarTheme.h"
#include "WindowFeatures.h"
#include "DatabaseTracker.h"
-#include "SecurityOrigin.h"
+#if defined(Q_WS_MAEMO_5)
+#include "QtMaemoWebPopup.h"
+#else
+#include "QtFallbackWebPopup.h"
+#endif
#include "QWebPageClient.h"
+#include "SecurityOrigin.h"
+
+#include <qdebug.h>
+#include <qeventloop.h>
+#include <qtextdocument.h>
+#include <qtooltip.h>
#include "qwebpage.h"
#include "qwebpage_p.h"
@@ -48,22 +61,23 @@
#include "qwebsecurityorigin_p.h"
#include "qwebview.h"
-#include <qtooltip.h>
-#include <qtextdocument.h>
-
-namespace WebCore
-{
+#if USE(ACCELERATED_COMPOSITING)
+#include "GraphicsLayerQt.h"
+#endif
+namespace WebCore {
ChromeClientQt::ChromeClientQt(QWebPage* webPage)
: m_webPage(webPage)
+ , m_eventLoop(0)
{
toolBarsVisible = statusBarVisible = menuBarVisible = true;
}
ChromeClientQt::~ChromeClientQt()
{
-
+ if (m_eventLoop)
+ m_eventLoop->exit();
}
void ChromeClientQt::setWindowRect(const FloatRect& rect)
@@ -141,6 +155,11 @@ void ChromeClientQt::takeFocus(FocusDirection)
}
+void ChromeClientQt::focusedNodeChanged(WebCore::Node*)
+{
+}
+
+
Page* ChromeClientQt::createWindow(Frame*, const FrameLoadRequest& request, const WindowFeatures& features)
{
QWebPage *newPage = m_webPage->createWindow(features.dialog ? QWebPage::WebModalDialog : QWebPage::WebBrowserWindow);
@@ -163,14 +182,16 @@ void ChromeClientQt::show()
bool ChromeClientQt::canRunModal()
{
- notImplemented();
- return false;
+ return true;
}
void ChromeClientQt::runModal()
{
- notImplemented();
+ m_eventLoop = new QEventLoop();
+ QEventLoop* eventLoop = m_eventLoop;
+ m_eventLoop->exec();
+ delete eventLoop;
}
@@ -309,26 +330,62 @@ bool ChromeClientQt::tabsToLinks() const
IntRect ChromeClientQt::windowResizerRect() const
{
- return IntRect();
+ if (!m_webPage)
+ return IntRect();
+
+ QWebPageClient* pageClient = platformPageClient();
+ if (!pageClient)
+ return IntRect();
+
+ QWidget* ownerWidget = pageClient->ownerWidget();
+ if (!ownerWidget)
+ return IntRect();
+
+ QWidget* topLevelWidget = ownerWidget->topLevelWidget();
+ QRect topLevelGeometry(topLevelWidget->geometry());
+
+ // There's no API in Qt to query for the size of the resizer, so we assume
+ // it has the same width and height as the scrollbar thickness.
+ int scollbarThickness = ScrollbarTheme::nativeTheme()->scrollbarThickness();
+
+ // There's no API in Qt to query for the position of the resizer. Sometimes
+ // it's drawn by the system, and sometimes it's a QSizeGrip. For RTL locales
+ // it might even be on the lower left side of the window, but in WebKit we
+ // always draw scrollbars on the right hand side, so we assume this to be the
+ // location when computing the resize rect to reserve for WebKit.
+ QPoint resizeCornerTopLeft = ownerWidget->mapFrom(topLevelWidget,
+ QPoint(topLevelGeometry.width(), topLevelGeometry.height())
+ - QPoint(scollbarThickness, scollbarThickness));
+
+ QRect resizeCornerRect = QRect(resizeCornerTopLeft, QSize(scollbarThickness, scollbarThickness));
+ return resizeCornerRect.intersected(pageClient->geometryRelativeToOwnerWidget());
+}
+
+void ChromeClientQt::invalidateWindow(const IntRect&, bool)
+{
+ notImplemented();
}
-void ChromeClientQt::repaint(const IntRect& windowRect, bool contentChanged, bool, bool)
+void ChromeClientQt::invalidateContentsAndWindow(const IntRect& windowRect, bool immediate)
{
// No double buffer, so only update the QWidget if content changed.
- if (contentChanged) {
- if (platformPageClient()) {
- QRect rect(windowRect);
- rect = rect.intersected(QRect(QPoint(0, 0), m_webPage->viewportSize()));
- if (!rect.isEmpty())
- platformPageClient()->update(rect);
- }
- emit m_webPage->repaintRequested(windowRect);
+ if (platformPageClient()) {
+ QRect rect(windowRect);
+ rect = rect.intersected(QRect(QPoint(0, 0), m_webPage->viewportSize()));
+ if (!rect.isEmpty())
+ platformPageClient()->update(rect);
}
+ emit m_webPage->repaintRequested(windowRect);
// FIXME: There is no "immediate" support for window painting. This should be done always whenever the flag
// is set.
}
+void ChromeClientQt::invalidateContentsForSlowScroll(const IntRect& windowRect, bool immediate)
+{
+ invalidateContentsAndWindow(windowRect, immediate);
+}
+
void ChromeClientQt::scroll(const IntSize& delta, const IntRect& scrollViewRect, const IntRect&)
{
if (platformPageClient())
@@ -448,6 +505,11 @@ void ChromeClientQt::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> prpFileC
}
}
+void ChromeClientQt::chooseIconForFiles(const Vector<String>& filenames, PassRefPtr<FileChooser> chooser)
+{
+ chooser->iconLoaded(Icon::createIconForFiles(filenames));
+}
+
bool ChromeClientQt::setCursor(PlatformCursorHandle)
{
notImplemented();
@@ -460,4 +522,57 @@ void ChromeClientQt::requestGeolocationPermissionForFrame(Frame*, Geolocation*)
notImplemented();
}
+#if USE(ACCELERATED_COMPOSITING)
+void ChromeClientQt::attachRootGraphicsLayer(Frame* frame, GraphicsLayer* graphicsLayer)
+{
+ if (platformPageClient())
+ platformPageClient()->setRootGraphicsLayer(graphicsLayer ? graphicsLayer->nativeLayer() : 0);
+}
+
+void ChromeClientQt::setNeedsOneShotDrawingSynchronization()
+{
+ // we want the layers to synchronize next time we update the screen anyway
+ if (platformPageClient())
+ platformPageClient()->markForSync(false);
+}
+
+void ChromeClientQt::scheduleCompositingLayerSync()
+{
+ // we want the layers to synchronize ASAP
+ if (platformPageClient())
+ platformPageClient()->markForSync(true);
+}
+#endif
+
+QtAbstractWebPopup* ChromeClientQt::createSelectPopup()
+{
+#if defined(Q_WS_MAEMO_5)
+ return new QtMaemoWebPopup;
+#else
+ return new QtFallbackWebPopup;
+#endif
+}
+
+#if ENABLE(WIDGETS_10_SUPPORT)
+bool ChromeClientQt::isDocked()
+{
+ return m_webPage->d->viewMode == "mini";
+}
+
+bool ChromeClientQt::isFloating()
+{
+ return m_webPage->d->viewMode == "floating";
+}
+
+bool ChromeClientQt::isApplication()
+{
+ return m_webPage->d->viewMode == "application";
+}
+
+bool ChromeClientQt::isFullscreen()
+{
+ return m_webPage->d->viewMode == "fullscreen";
+}
+#endif
+
}
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.h
index 196c4fc..90ad29e 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.h
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.h
@@ -34,6 +34,7 @@
#include "KURL.h"
#include "PlatformString.h"
+class QEventLoop;
class QWebPage;
namespace WebCore {
@@ -42,6 +43,7 @@ namespace WebCore {
class FloatRect;
class Page;
struct FrameLoadRequest;
+ class QtAbstractWebPopup;
class ChromeClientQt : public ChromeClient
{
@@ -63,6 +65,8 @@ namespace WebCore {
virtual bool canTakeFocus(FocusDirection);
virtual void takeFocus(FocusDirection);
+ virtual void focusedNodeChanged(Node*);
+
virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&);
virtual void show();
@@ -101,8 +105,11 @@ namespace WebCore {
virtual bool tabsToLinks() const;
virtual IntRect windowResizerRect() const;
- virtual void repaint(const IntRect&, bool contentChanged, bool immediate = false, bool repaintContentOnly = false);
+ virtual void invalidateWindow(const IntRect&, bool);
+ virtual void invalidateContentsAndWindow(const IntRect&, bool);
+ virtual void invalidateContentsForSlowScroll(const IntRect&, bool);
virtual void scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect);
+
virtual IntPoint screenToWindow(const IntPoint&) const;
virtual IntRect windowToScreen(const IntRect&) const;
virtual PlatformPageClient platformPageClient() const;
@@ -120,7 +127,21 @@ namespace WebCore {
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
virtual void reachedMaxAppCacheSize(int64_t spaceNeeded);
#endif
+
+#if USE(ACCELERATED_COMPOSITING)
+ // see ChromeClient.h
+ // this is a hook for WebCore to tell us what we need to do with the GraphicsLayers
+ virtual void attachRootGraphicsLayer(Frame*, GraphicsLayer*);
+ virtual void setNeedsOneShotDrawingSynchronization();
+ virtual void scheduleCompositingLayerSync();
+#endif
+
+#if ENABLE(TOUCH_EVENTS)
+ virtual void needTouchEvents(bool) { }
+#endif
+
virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
+ virtual void chooseIconForFiles(const Vector<String>&, PassRefPtr<FileChooser>);
virtual void formStateDidChange(const Node*) { }
@@ -131,6 +152,16 @@ namespace WebCore {
virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const {}
virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*);
+ virtual void cancelGeolocationPermissionRequestForFrame(Frame*) { }
+
+#if ENABLE(WIDGETS_10_SUPPORT)
+ virtual bool isDocked();
+ virtual bool isFloating();
+ virtual bool isApplication();
+ virtual bool isFullscreen();
+#endif
+
+ QtAbstractWebPopup* createSelectPopup();
QWebPage* m_webPage;
WebCore::KURL lastHoverURL;
@@ -140,6 +171,7 @@ namespace WebCore {
bool toolBarsVisible;
bool statusBarVisible;
bool menuBarVisible;
+ QEventLoop* m_eventLoop;
};
}
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/DragClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/DragClientQt.cpp
index 99e438d..e48c3e3 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/DragClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/DragClientQt.cpp
@@ -27,6 +27,8 @@
#include "DragClientQt.h"
#include "ClipboardQt.h"
+#include "Frame.h"
+#include "PlatformMouseEvent.h"
#include "qwebpage.h"
#include <QDrag>
@@ -35,6 +37,32 @@
namespace WebCore {
+static inline Qt::DropActions dragOperationsToDropActions(unsigned op)
+{
+ Qt::DropActions result = Qt::IgnoreAction;
+ if (op & DragOperationCopy)
+ result = Qt::CopyAction;
+ if (op & DragOperationMove)
+ result |= Qt::MoveAction;
+ if (op & DragOperationGeneric)
+ result |= Qt::MoveAction;
+ if (op & DragOperationLink)
+ result |= Qt::LinkAction;
+ return result;
+}
+
+static inline DragOperation dropActionToDragOperation(Qt::DropActions action)
+{
+ DragOperation result = DragOperationNone;
+ if (action & Qt::CopyAction)
+ result = DragOperationCopy;
+ if (action & Qt::LinkAction)
+ result = DragOperationLink;
+ if (action & Qt::MoveAction)
+ result = DragOperationMove;
+ return result;
+}
+
DragDestinationAction DragClientQt::actionMaskForDrag(DragData*)
{
return DragDestinationActionAny;
@@ -58,7 +86,7 @@ void DragClientQt::willPerformDragSourceAction(DragSourceAction, const IntPoint&
{
}
-void DragClientQt::startDrag(DragImageRef, const IntPoint&, const IntPoint&, Clipboard* clipboard, Frame*, bool)
+void DragClientQt::startDrag(DragImageRef, const IntPoint&, const IntPoint&, Clipboard* clipboard, Frame* frame, bool)
{
#ifndef QT_NO_DRAGANDDROP
QMimeData* clipboardData = static_cast<ClipboardQt*>(clipboard)->clipboardData();
@@ -66,10 +94,15 @@ void DragClientQt::startDrag(DragImageRef, const IntPoint&, const IntPoint&, Cli
QWidget* view = m_webPage->view();
if (view) {
QDrag *drag = new QDrag(view);
- if (clipboardData->hasImage())
+ if (clipboardData && clipboardData->hasImage())
drag->setPixmap(qvariant_cast<QPixmap>(clipboardData->imageData()));
+ DragOperation dragOperationMask = clipboard->sourceOperation();
drag->setMimeData(clipboardData);
- drag->start();
+ Qt::DropAction actualDropAction = drag->exec(dragOperationsToDropActions(dragOperationMask));
+
+ // Send dragEnd event
+ PlatformMouseEvent me(m_webPage->view()->mapFromGlobal(QCursor::pos()), QCursor::pos(), LeftButton, MouseEventMoved, 0, false, false, false, false, 0);
+ frame->eventHandler()->dragSourceEndedAt(me, dropActionToDragOperation(actualDropAction));
}
#endif
}
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditCommandQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditCommandQt.cpp
index a166840..756ba4c 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditCommandQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditCommandQt.cpp
@@ -18,7 +18,6 @@
*/
#include "config.h"
-#include <wtf/Platform.h>
#include "EditCommandQt.h"
using namespace WebCore;
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
index 2d1a1eb..7b7f610 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
@@ -384,18 +384,6 @@ void EditorClientQt::handleKeyboardEvent(KeyboardEvent* event)
} else
#endif // QT_NO_SHORTCUT
switch (kevent->windowsVirtualKeyCode()) {
-#if QT_VERSION < 0x040500
- case VK_RETURN:
-#ifdef QT_WS_MAC
- if (kevent->shiftKey() || kevent->metaKey())
-#else
- if (kevent->shiftKey())
-#endif
- frame->editor()->command("InsertLineBreak").execute();
- else
- frame->editor()->command("InsertNewline").execute();
- break;
-#endif
case VK_BACK:
frame->editor()->deleteWithDirection(SelectionController::BACKWARD,
CharacterGranularity, false, true);
@@ -407,28 +395,38 @@ void EditorClientQt::handleKeyboardEvent(KeyboardEvent* event)
case VK_LEFT:
if (kevent->shiftKey())
frame->editor()->command("MoveLeftAndModifySelection").execute();
- else frame->editor()->command("MoveLeft").execute();
+ else
+ frame->editor()->command("MoveLeft").execute();
break;
case VK_RIGHT:
if (kevent->shiftKey())
frame->editor()->command("MoveRightAndModifySelection").execute();
- else frame->editor()->command("MoveRight").execute();
+ else
+ frame->editor()->command("MoveRight").execute();
break;
case VK_UP:
if (kevent->shiftKey())
frame->editor()->command("MoveUpAndModifySelection").execute();
- else frame->editor()->command("MoveUp").execute();
+ else
+ frame->editor()->command("MoveUp").execute();
break;
case VK_DOWN:
if (kevent->shiftKey())
frame->editor()->command("MoveDownAndModifySelection").execute();
- else frame->editor()->command("MoveDown").execute();
+ else
+ frame->editor()->command("MoveDown").execute();
break;
case VK_PRIOR: // PageUp
- frame->editor()->command("MovePageUp").execute();
+ if (kevent->shiftKey())
+ frame->editor()->command("MovePageUpAndModifySelection").execute();
+ else
+ frame->editor()->command("MovePageUp").execute();
break;
case VK_NEXT: // PageDown
- frame->editor()->command("MovePageDown").execute();
+ if (kevent->shiftKey())
+ frame->editor()->command("MovePageDownAndModifySelection").execute();
+ else
+ frame->editor()->command("MovePageDown").execute();
break;
case VK_TAB:
return;
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 5cabca0..c5c5739 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -1,9 +1,10 @@
/*
* Copyright (C) 2006 Zack Rusin <zack@kde.org>
* Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
* Copyright (C) 2008 Collabora Ltd. All rights reserved.
* Coypright (C) 2008 Holger Hans Peter Freyther
+ * Coypright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
*
* All rights reserved.
*
@@ -37,7 +38,6 @@
#include "FrameTree.h"
#include "FrameView.h"
#include "DocumentLoader.h"
-#include "JSDOMWindowBase.h"
#include "MIMETypeRegistry.h"
#include "ResourceResponse.h"
#include "Page.h"
@@ -50,12 +50,14 @@
#include "HTMLAppletElement.h"
#include "HTMLFormElement.h"
#include "HTMLPlugInElement.h"
+#include "HTTPParsers.h"
#include "NotImplemented.h"
#include "QNetworkReplyHandler.h"
#include "ResourceHandleInternal.h"
#include "ResourceHandle.h"
-#include "Settings.h"
+#include "ScriptController.h"
#include "ScriptString.h"
+#include "Settings.h"
#include "QWebPageClient.h"
#include "qwebpage.h"
@@ -69,14 +71,10 @@
#include <QCoreApplication>
#include <QDebug>
-#if QT_VERSION >= 0x040400
#include <QGraphicsScene>
#include <QGraphicsWidget>
#include <QNetworkRequest>
#include <QNetworkReply>
-#else
-#include "qwebnetworkinterface_p.h"
-#endif
#include "qwebhistory_p.h"
static bool dumpFrameLoaderCallbacks = false;
@@ -146,9 +144,9 @@ namespace WebCore
FrameLoaderClientQt::FrameLoaderClientQt()
: m_frame(0)
, m_webFrame(0)
+ , m_firstData(false)
, m_pluginView(0)
, m_hasSentResponseToPlugin(false)
- , m_firstData(false)
, m_loadError (ResourceError())
{
}
@@ -308,11 +306,32 @@ void FrameLoaderClientQt::dispatchDidChangeLocationWithinPage()
m_webFrame->page()->d->updateNavigationActions();
}
+void FrameLoaderClientQt::dispatchDidPushStateWithinPage()
+{
+ if (dumpFrameLoaderCallbacks)
+ printf("%s - dispatchDidPushStateWithinPage\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
+
+ notImplemented();
+}
-void FrameLoaderClientQt::dispatchWillClose()
+void FrameLoaderClientQt::dispatchDidReplaceStateWithinPage()
{
if (dumpFrameLoaderCallbacks)
- printf("%s - willCloseFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
+ printf("%s - dispatchDidReplaceStateWithinPage\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
+
+ notImplemented();
+}
+
+void FrameLoaderClientQt::dispatchDidPopStateWithinPage()
+{
+ if (dumpFrameLoaderCallbacks)
+ printf("%s - dispatchDidPopStateWithinPage\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
+
+ notImplemented();
+}
+
+void FrameLoaderClientQt::dispatchWillClose()
+{
}
@@ -579,9 +598,6 @@ String FrameLoaderClientQt::userAgent(const KURL& url)
void FrameLoaderClientQt::dispatchDidReceiveIcon()
{
- if (dumpFrameLoaderCallbacks)
- printf("%s - didReceiveIconForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
-
if (m_webFrame) {
emit m_webFrame->iconChanged();
}
@@ -601,10 +617,10 @@ bool FrameLoaderClientQt::canHandleRequest(const WebCore::ResourceRequest&) cons
return true;
}
-void FrameLoaderClientQt::windowObjectCleared()
+void FrameLoaderClientQt::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld* world)
{
- if (dumpFrameLoaderCallbacks)
- printf("%s - didClearWindowObjectForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
+ if (world != mainThreadNormalWorld())
+ return;
if (m_webFrame)
emit m_webFrame->javaScriptWindowObjectCleared();
@@ -643,13 +659,31 @@ bool FrameLoaderClientQt::shouldGoToHistoryItem(WebCore::HistoryItem *) const
return true;
}
+void FrameLoaderClientQt::dispatchDidAddBackForwardItem(WebCore::HistoryItem*) const
+{
+}
+
+void FrameLoaderClientQt::dispatchDidRemoveBackForwardItem(WebCore::HistoryItem*) const
+{
+}
+
+void FrameLoaderClientQt::dispatchDidChangeBackForwardIndex() const
+{
+}
+
void FrameLoaderClientQt::didDisplayInsecureContent()
{
+ if (dumpFrameLoaderCallbacks)
+ printf("didDisplayInsecureContent\n");
+
notImplemented();
}
void FrameLoaderClientQt::didRunInsecureContent(WebCore::SecurityOrigin*)
{
+ if (dumpFrameLoaderCallbacks)
+ printf("didRunInsecureContent\n");
+
notImplemented();
}
@@ -771,22 +805,13 @@ bool FrameLoaderClientQt::shouldFallBack(const WebCore::ResourceError&)
WTF::PassRefPtr<WebCore::DocumentLoader> FrameLoaderClientQt::createDocumentLoader(const WebCore::ResourceRequest& request, const SubstituteData& substituteData)
{
RefPtr<DocumentLoader> loader = DocumentLoader::create(request, substituteData);
- if (substituteData.isValid()) {
+ if (substituteData.isValid())
loader->setDeferMainResourceDataLoad(false);
- // Use the default timeout interval for JS as the HTML tokenizer delay. This ensures
- // that long-running JavaScript will still allow setHtml() to be synchronous, while
- // still giving a reasonable timeout to prevent deadlock.
- double delay = JSDOMWindowBase::commonJSGlobalData()->timeoutChecker.timeoutInterval() / 1000.0f;
- m_frame->page()->setCustomHTMLTokenizerTimeDelay(delay);
- } else {
- m_frame->page()->setCustomHTMLTokenizerTimeDelay(-1);
- }
return loader.release();
}
void FrameLoaderClientQt::download(WebCore::ResourceHandle* handle, const WebCore::ResourceRequest&, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&)
{
-#if QT_VERSION >= 0x040400
if (!m_webFrame)
return;
@@ -795,11 +820,10 @@ void FrameLoaderClientQt::download(WebCore::ResourceHandle* handle, const WebCor
if (reply) {
QWebPage *page = m_webFrame->page();
if (page->forwardUnsupportedContent())
- emit m_webFrame->page()->unsupportedContent(reply);
+ emit page->unsupportedContent(reply);
else
reply->abort();
}
-#endif
}
void FrameLoaderClientQt::assignIdentifierToInitialRequest(unsigned long identifier, WebCore::DocumentLoader*, const WebCore::ResourceRequest& request)
@@ -943,7 +967,9 @@ WebCore::Frame* FrameLoaderClientQt::dispatchCreatePage()
void FrameLoaderClientQt::dispatchDecidePolicyForMIMEType(FramePolicyFunction function, const WebCore::String& MIMEType, const WebCore::ResourceRequest&)
{
// we need to call directly here
- if (canShowMIMEType(MIMEType))
+ if (WebCore::shouldTreatAsAttachment(m_frame->loader()->activeDocumentLoader()->response()))
+ callPolicyFunction(function, PolicyDownload);
+ else if (canShowMIMEType(MIMEType))
callPolicyFunction(function, PolicyUse);
else
callPolicyFunction(function, PolicyDownload);
@@ -952,11 +978,7 @@ void FrameLoaderClientQt::dispatchDecidePolicyForMIMEType(FramePolicyFunction fu
void FrameLoaderClientQt::dispatchDecidePolicyForNewWindowAction(FramePolicyFunction function, const WebCore::NavigationAction& action, const WebCore::ResourceRequest& request, PassRefPtr<WebCore::FormState>, const WebCore::String&)
{
Q_ASSERT(m_webFrame);
-#if QT_VERSION < 0x040400
- QWebNetworkRequest r(request);
-#else
QNetworkRequest r(request.toNetworkRequest(m_webFrame));
-#endif
QWebPage* page = m_webFrame->page();
if (!page->d->acceptNavigationRequest(0, r, QWebPage::NavigationType(action.type()))) {
@@ -977,11 +999,7 @@ void FrameLoaderClientQt::dispatchDecidePolicyForNewWindowAction(FramePolicyFunc
void FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction(FramePolicyFunction function, const WebCore::NavigationAction& action, const WebCore::ResourceRequest& request, PassRefPtr<WebCore::FormState>)
{
Q_ASSERT(m_webFrame);
-#if QT_VERSION < 0x040400
- QWebNetworkRequest r(request);
-#else
QNetworkRequest r(request.toNetworkRequest(m_webFrame));
-#endif
QWebPage*page = m_webFrame->page();
if (!page->d->acceptNavigationRequest(m_webFrame, r, QWebPage::NavigationType(action.type()))) {
@@ -1006,12 +1024,10 @@ void FrameLoaderClientQt::dispatchUnableToImplementPolicy(const WebCore::Resourc
void FrameLoaderClientQt::startDownload(const WebCore::ResourceRequest& request)
{
-#if QT_VERSION >= 0x040400
if (!m_webFrame)
return;
emit m_webFrame->page()->downloadRequested(request.toNetworkRequest(m_webFrame));
-#endif
}
PassRefPtr<Frame> FrameLoaderClientQt::createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
@@ -1021,7 +1037,12 @@ PassRefPtr<Frame> FrameLoaderClientQt::createFrame(const KURL& url, const String
return 0;
QWebFrameData frameData(m_frame->page(), m_frame, ownerElement, name);
- frameData.url = url;
+
+ if (url.isEmpty())
+ frameData.url = blankURL();
+ else
+ frameData.url = url;
+
frameData.referrer = referrer;
frameData.allowsScrolling = allowsScrolling;
frameData.marginWidth = marginWidth;
@@ -1048,6 +1069,24 @@ PassRefPtr<Frame> FrameLoaderClientQt::createFrame(const KURL& url, const String
return frameData.frame.release();
}
+void FrameLoaderClientQt::didTransferChildFrameToNewDocument()
+{
+ ASSERT(m_frame->ownerElement());
+
+ if (!m_webFrame)
+ return;
+
+ Frame* parentFrame = m_webFrame->d->frame->tree()->parent();
+ ASSERT(parentFrame);
+
+ if (QWebFrame* parent = QWebFramePrivate::kit(parentFrame)) {
+ m_webFrame->d->setPage(parent->page());
+
+ if (m_webFrame->parent() != qobject_cast<QObject*>(parent))
+ m_webFrame->setParent(parent);
+ }
+}
+
ObjectContentType FrameLoaderClientQt::objectContentType(const KURL& url, const String& _mimeType)
{
// qDebug()<<" ++++++++++++++++ url is "<<url.prettyURL()<<", mime = "<<_mimeType;
@@ -1097,11 +1136,7 @@ const unsigned numqStyleSheetProperties = sizeof(qstyleSheetProperties) / sizeof
class QtPluginWidget: public Widget
{
public:
- QtPluginWidget(QWidget* w = 0)
- : Widget(w)
- , m_visible(false)
- {}
-
+ QtPluginWidget(QWidget* w = 0): Widget(w) {}
~QtPluginWidget()
{
if (platformWidget())
@@ -1135,25 +1170,16 @@ public:
handleVisibility();
}
- virtual void hide()
- {
- m_visible = false;
- Widget::hide();
- }
-
virtual void show()
{
- m_visible = true;
- if (!platformWidget())
- return;
-
- handleVisibility();
+ Widget::show();
+ handleVisibility();
}
private:
void handleVisibility()
{
- if (!m_visible)
+ if (!isVisible())
return;
// if setMask is set with an empty QRegion, no clipping will
@@ -1161,8 +1187,6 @@ private:
QRegion mask = platformWidget()->mask();
platformWidget()->setVisible(!mask.isEmpty());
}
-
- bool m_visible;
};
#if QT_VERSION >= 0x040600
@@ -1262,13 +1286,11 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize,
#endif // QT_NO_STYLE_STYLESHEET
}
-#if QT_VERSION >= 0x040400
if (!object) {
QWebPluginFactory* factory = m_webFrame->page()->pluginFactory();
if (factory)
object = factory->create(mimeType, qurl, params, values);
}
-#endif
if (object) {
QWidget* widget = qobject_cast<QWidget*>(object);
@@ -1303,8 +1325,23 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize,
// FIXME: make things work for widgetless plugins as well
delete object;
} else { // NPAPI Plugins
+ Vector<String> params = paramNames;
+ Vector<String> values = paramValues;
+ if (mimeType == "application/x-shockwave-flash") {
+ QWebPageClient* client = m_webFrame->page()->d->client;
+ if (!client || !qobject_cast<QWidget*>(client->pluginParent())) {
+ // inject wmode=opaque when there is no client or the client is not a QWebView
+ size_t wmodeIndex = params.find("wmode");
+ if (wmodeIndex == -1) {
+ params.append("wmode");
+ values.append("opaque");
+ } else
+ values[wmodeIndex] = "opaque";
+ }
+ }
+
RefPtr<PluginView> pluginView = PluginView::create(m_frame, pluginSize, element, url,
- paramNames, paramValues, mimeType, loadManually);
+ params, values, mimeType, loadManually);
return pluginView;
}
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
index 66c4252..adeb31c 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
@@ -103,6 +103,9 @@ namespace WebCore {
virtual void dispatchDidCancelClientRedirect();
virtual void dispatchWillPerformClientRedirect(const KURL&, double interval, double fireDate);
virtual void dispatchDidChangeLocationWithinPage();
+ virtual void dispatchDidPushStateWithinPage();
+ virtual void dispatchDidReplaceStateWithinPage();
+ virtual void dispatchDidPopStateWithinPage();
virtual void dispatchWillClose();
virtual void dispatchDidReceiveIcon();
virtual void dispatchDidStartProvisionalLoad();
@@ -148,7 +151,9 @@ namespace WebCore {
virtual void updateGlobalHistory();
virtual void updateGlobalHistoryRedirectLinks();
virtual bool shouldGoToHistoryItem(HistoryItem*) const;
-
+ virtual void dispatchDidAddBackForwardItem(HistoryItem*) const;
+ virtual void dispatchDidRemoveBackForwardItem(HistoryItem*) const;
+ virtual void dispatchDidChangeBackForwardIndex() const;
virtual void didDisplayInsecureContent();
virtual void didRunInsecureContent(SecurityOrigin*);
@@ -189,6 +194,7 @@ namespace WebCore {
virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) ;
+ virtual void didTransferChildFrameToNewDocument();
virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool);
virtual void redirectDataToPlugin(Widget* pluginWidget);
@@ -197,7 +203,7 @@ namespace WebCore {
virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType);
virtual String overrideMediaType() const;
- virtual void windowObjectCleared();
+ virtual void dispatchDidClearWindowObjectInWorld(DOMWrapperWorld*);
virtual void documentElementAvailable();
virtual void didPerformFirstNavigation() const;
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
index 5fbc876..139499d 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
@@ -50,17 +50,16 @@ namespace WebCore {
static const QLatin1String settingStoragePrefix("Qt/QtWebKit/QWebInspector/");
static const QLatin1String settingStorageTypeSuffix(".type");
-static InspectorController::Setting variantToSetting(const QVariant& qvariant);
-static QVariant settingToVariant(const InspectorController::Setting& icSetting);
+static String variantToSetting(const QVariant& qvariant);
+static QVariant settingToVariant(const String& value);
class InspectorClientWebPage : public QWebPage {
Q_OBJECT
friend class InspectorClientQt;
public:
InspectorClientWebPage(QObject* parent = 0)
- : QWebPage(parent)
+ : QWebPage(parent)
{
- settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, false);
}
QWebPage* createWindow(QWebPage::WebWindowType)
@@ -82,190 +81,159 @@ void InspectorClientQt::inspectorDestroyed()
delete this;
}
-Page* InspectorClientQt::createPage()
+
+void InspectorClientQt::openInspectorFrontend(WebCore::InspectorController*)
{
QWebView* inspectorView = new QWebView;
InspectorClientWebPage* inspectorPage = new InspectorClientWebPage(inspectorView);
inspectorView->setPage(inspectorPage);
- m_inspectorView.set(inspectorView);
- inspectorPage->mainFrame()->load(QString::fromLatin1("qrc:/webkit/inspector/inspector.html"));
+ QUrl inspectorUrl = m_inspectedWebPage->settings()->inspectorUrl();
+ if (!inspectorUrl.isValid())
+ inspectorUrl = QUrl("qrc:/webkit/inspector/inspector.html");
+ inspectorView->page()->mainFrame()->load(inspectorUrl);
m_inspectedWebPage->d->inspectorFrontend = inspectorView;
m_inspectedWebPage->d->getOrCreateInspector()->d->setFrontend(inspectorView);
- return m_inspectorView->page()->d->page;
+ inspectorView->page()->d->page->inspectorController()->setInspectorFrontendClient(new InspectorFrontendClientQt(m_inspectedWebPage, inspectorView));
}
-String InspectorClientQt::localizedStringsURL()
+void InspectorClientQt::highlight(Node*)
{
notImplemented();
- return String();
}
-String InspectorClientQt::hiddenPanels()
+void InspectorClientQt::hideHighlight()
{
notImplemented();
- return String();
}
-void InspectorClientQt::showWindow()
+void InspectorClientQt::populateSetting(const String& key, String* setting)
{
- updateWindowTitle();
+ QSettings qsettings;
+ if (qsettings.status() == QSettings::AccessError) {
+ // QCoreApplication::setOrganizationName and QCoreApplication::setApplicationName haven't been called
+ qWarning("QWebInspector: QSettings couldn't read configuration setting [%s].",
+ qPrintable(static_cast<QString>(key)));
+ return;
+ }
- m_inspectedWebPage->d->inspectorController()->setWindowVisible(true, true);
- // We don't allow the inspector to ask for widget visibility itself because showWindow is
- // not always called when we want.
- // Inspecting an element or calling QWebInspector::show() should already have made the
- // widget visible.
+ QString settingKey(settingStoragePrefix + QString(key));
+ QString storedValueType = qsettings.value(settingKey + settingStorageTypeSuffix).toString();
+ QVariant storedValue = qsettings.value(settingKey);
+ storedValue.convert(QVariant::nameToType(storedValueType.toAscii().data()));
+ *setting = variantToSetting(storedValue);
}
-void InspectorClientQt::closeWindow()
+void InspectorClientQt::storeSetting(const String& key, const String& setting)
{
- if (m_inspectedWebPage->d->inspector)
- m_inspectedWebPage->d->inspector->close();
-}
+ QSettings qsettings;
+ if (qsettings.status() == QSettings::AccessError) {
+ qWarning("QWebInspector: QSettings couldn't persist configuration setting [%s].",
+ qPrintable(static_cast<QString>(key)));
+ return;
+ }
-void InspectorClientQt::attachWindow()
-{
- notImplemented();
+ QVariant valueToStore = settingToVariant(setting);
+ QString settingKey(settingStoragePrefix + QString(key));
+ qsettings.setValue(settingKey, valueToStore);
+ qsettings.setValue(settingKey + settingStorageTypeSuffix, QVariant::typeToName(valueToStore.type()));
}
-void InspectorClientQt::detachWindow()
+static String variantToSetting(const QVariant& qvariant)
{
- notImplemented();
+ String retVal;
+
+ switch (qvariant.type()) {
+ case QVariant::Bool:
+ retVal = qvariant.toBool() ? "true" : "false";
+ case QVariant::String:
+ retVal = qvariant.toString();
+ }
+
+ return retVal;
}
-void InspectorClientQt::setAttachedWindowHeight(unsigned)
+static QVariant settingToVariant(const String& setting)
{
- notImplemented();
+ QVariant retVal;
+ retVal.setValue(static_cast<QString>(setting));
+ return retVal;
}
-void InspectorClientQt::highlight(Node*)
+InspectorFrontendClientQt::InspectorFrontendClientQt(QWebPage* inspectedWebPage, PassOwnPtr<QWebView> inspectorView)
+ : InspectorFrontendClientLocal(inspectedWebPage->d->page->inspectorController(), inspectorView->page()->d->page)
+ , m_inspectedWebPage(inspectedWebPage)
+ , m_inspectorView(inspectorView)
+ , m_destroyingInspectorView(false)
{
- notImplemented();
}
-void InspectorClientQt::hideHighlight()
+void InspectorFrontendClientQt::frontendLoaded()
{
- notImplemented();
+ InspectorFrontendClientLocal::frontendLoaded();
+ setAttachedWindow(true);
}
-void InspectorClientQt::inspectedURLChanged(const String& newURL)
+String InspectorFrontendClientQt::localizedStringsURL()
{
- m_inspectedURL = newURL;
- updateWindowTitle();
+ notImplemented();
+ return String();
}
-void InspectorClientQt::inspectorWindowObjectCleared()
+String InspectorFrontendClientQt::hiddenPanels()
{
notImplemented();
+ return String();
}
-void InspectorClientQt::updateWindowTitle()
+void InspectorFrontendClientQt::bringToFront()
{
- if (m_inspectedWebPage->d->inspector) {
- QString caption = QCoreApplication::translate("QWebPage", "Web Inspector - %2").arg(m_inspectedURL);
- m_inspectedWebPage->d->inspector->setWindowTitle(caption);
- }
+ updateWindowTitle();
}
-void InspectorClientQt::populateSetting(const String& key, InspectorController::Setting& setting)
+void InspectorFrontendClientQt::closeWindow()
{
- QSettings qsettings;
- if (qsettings.status() == QSettings::AccessError) {
- // QCoreApplication::setOrganizationName and QCoreApplication::setApplicationName haven't been called
- qWarning("QWebInspector: QSettings couldn't read configuration setting [%s].",
- qPrintable(static_cast<QString>(key)));
+ if (m_destroyingInspectorView)
return;
- }
+ m_destroyingInspectorView = true;
- QString settingKey(settingStoragePrefix + QString(key));
- QString storedValueType = qsettings.value(settingKey + settingStorageTypeSuffix).toString();
- QVariant storedValue = qsettings.value(settingKey);
- storedValue.convert(QVariant::nameToType(storedValueType.toAscii().data()));
- setting = variantToSetting(storedValue);
+ // Clear reference from QWebInspector to the frontend view.
+ m_inspectedWebPage->d->getOrCreateInspector()->d->setFrontend(0);
+#if ENABLE(INSPECTOR)
+ m_inspectedWebPage->d->inspectorController()->disconnectFrontend();
+#endif
+ // Clear pointer before deleting WebView to avoid recursive calls to its destructor.
+ delete m_inspectorView.release();
}
-void InspectorClientQt::storeSetting(const String& key, const InspectorController::Setting& setting)
+void InspectorFrontendClientQt::attachWindow()
{
- QSettings qsettings;
- if (qsettings.status() == QSettings::AccessError) {
- qWarning("QWebInspector: QSettings couldn't persist configuration setting [%s].",
- qPrintable(static_cast<QString>(key)));
- return;
- }
-
- QVariant valueToStore = settingToVariant(setting);
- QString settingKey(settingStoragePrefix + QString(key));
- qsettings.setValue(settingKey, valueToStore);
- qsettings.setValue(settingKey + settingStorageTypeSuffix, QVariant::typeToName(valueToStore.type()));
+ notImplemented();
}
-void InspectorClientQt::removeSetting(const String&)
+void InspectorFrontendClientQt::detachWindow()
{
notImplemented();
}
-static InspectorController::Setting variantToSetting(const QVariant& qvariant)
+void InspectorFrontendClientQt::setAttachedWindowHeight(unsigned)
{
- InspectorController::Setting retVal;
-
- switch (qvariant.type()) {
- case QVariant::Bool:
- retVal.set(qvariant.toBool());
- break;
- case QVariant::Double:
- retVal.set(qvariant.toDouble());
- break;
- case QVariant::Int:
- retVal.set((long)qvariant.toInt());
- break;
- case QVariant::String:
- retVal.set(qvariant.toString());
- break;
- case QVariant::StringList: {
- QStringList qsList = qvariant.toStringList();
- int listCount = qsList.count();
- Vector<String> vector(listCount);
- for (int i = 0; i < listCount; ++i)
- vector[i] = qsList[i];
- retVal.set(vector);
- break;
- }
- }
-
- return retVal;
+ notImplemented();
}
-static QVariant settingToVariant(const InspectorController::Setting& icSetting)
+void InspectorFrontendClientQt::inspectedURLChanged(const String& newURL)
{
- QVariant retVal;
+ m_inspectedURL = newURL;
+ updateWindowTitle();
+}
- switch (icSetting.type()) {
- case InspectorController::Setting::StringType:
- retVal.setValue(static_cast<QString>(icSetting.string()));
- break;
- case InspectorController::Setting::StringVectorType: {
- const Vector<String>& vector = icSetting.stringVector();
- Vector<String>::const_iterator iter;
- QStringList qsList;
- for (iter = vector.begin(); iter != vector.end(); ++iter)
- qsList << *iter;
- retVal.setValue(qsList);
- break;
- }
- case InspectorController::Setting::DoubleType:
- retVal.setValue(icSetting.doubleValue());
- break;
- case InspectorController::Setting::IntegerType:
- retVal.setValue((int)icSetting.integerValue());
- break;
- case InspectorController::Setting::BooleanType:
- retVal.setValue(icSetting.booleanValue());
- break;
+void InspectorFrontendClientQt::updateWindowTitle()
+{
+ if (m_inspectedWebPage->d->inspector) {
+ QString caption = QCoreApplication::translate("QWebPage", "Web Inspector - %2").arg(m_inspectedURL);
+ m_inspectedWebPage->d->inspector->setWindowTitle(caption);
}
-
- return retVal;
}
}
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.h b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.h
index ccf8b69..4beadab 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.h
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.h
@@ -31,53 +31,64 @@
#define InspectorClientQt_h
#include "InspectorClient.h"
+#include "InspectorFrontendClientLocal.h"
#include "OwnPtr.h"
+#include "PassOwnPtr.h"
#include <QtCore/QString>
class QWebPage;
class QWebView;
namespace WebCore {
- class Node;
- class Page;
- class String;
+class Node;
+class Page;
+class String;
- class InspectorClientQt : public InspectorClient {
- public:
- InspectorClientQt(QWebPage*);
+class InspectorClientQt : public InspectorClient {
+public:
+ InspectorClientQt(QWebPage*);
- virtual void inspectorDestroyed();
+ virtual void inspectorDestroyed();
- virtual Page* createPage();
+ virtual void openInspectorFrontend(WebCore::InspectorController*);
- virtual String localizedStringsURL();
+ virtual void highlight(Node*);
+ virtual void hideHighlight();
- virtual String hiddenPanels();
+ virtual void populateSetting(const String& key, String* value);
+ virtual void storeSetting(const String& key, const String& value);
- virtual void showWindow();
- virtual void closeWindow();
+private:
+ QWebPage* m_inspectedWebPage;
+};
- virtual void attachWindow();
- virtual void detachWindow();
+class InspectorFrontendClientQt : public InspectorFrontendClientLocal {
+public:
+ InspectorFrontendClientQt(QWebPage* inspectedWebPage, PassOwnPtr<QWebView> inspectorView);
- virtual void setAttachedWindowHeight(unsigned height);
+ virtual void frontendLoaded();
- virtual void highlight(Node*);
- virtual void hideHighlight();
- virtual void inspectedURLChanged(const String& newURL);
+ virtual String localizedStringsURL();
- virtual void populateSetting(const String& key, InspectorController::Setting&);
- virtual void storeSetting(const String& key, const InspectorController::Setting&);
- virtual void removeSetting(const String& key);
+ virtual String hiddenPanels();
- virtual void inspectorWindowObjectCleared();
+ virtual void bringToFront();
+ virtual void closeWindow();
- private:
- void updateWindowTitle();
- QWebPage* m_inspectedWebPage;
- OwnPtr<QWebView> m_inspectorView;
- QString m_inspectedURL;
- };
+ virtual void attachWindow();
+ virtual void detachWindow();
+
+ virtual void setAttachedWindowHeight(unsigned height);
+
+ virtual void inspectedURLChanged(const String& newURL);
+
+private:
+ void updateWindowTitle();
+ QWebPage* m_inspectedWebPage;
+ OwnPtr<QWebView> m_inspectorView;
+ QString m_inspectedURL;
+ bool m_destroyingInspectorView;
+};
}
#endif
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp
new file mode 100644
index 0000000..65a28fe
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp
@@ -0,0 +1,225 @@
+/*
+ * Copyright (C) 2010 Girish Ramakrishnan <girish@forwardbias.in>
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+#include "config.h"
+#include "QtFallbackWebPopup.h"
+
+#include "HostWindow.h"
+#include "PopupMenuClient.h"
+#include "QWebPageClient.h"
+#include "qgraphicswebview.h"
+#include <QAbstractItemView>
+#include <QApplication>
+#include <QGraphicsProxyWidget>
+#include <QGraphicsScene>
+#include <QGraphicsView>
+#include <QInputContext>
+#include <QMouseEvent>
+#include <QStandardItemModel>
+
+#if ENABLE(SYMBIAN_DIALOG_PROVIDERS)
+#include <BrCtlDialogsProvider.h>
+#include <BrowserDialogsProvider.h> // S60 platform private header file
+#include <e32base.h>
+#endif
+
+namespace WebCore {
+
+QtFallbackWebPopupCombo::QtFallbackWebPopupCombo(QtFallbackWebPopup& ownerPopup)
+ : m_ownerPopup(ownerPopup)
+{
+}
+
+void QtFallbackWebPopupCombo::showPopup()
+{
+ QComboBox::showPopup();
+ m_ownerPopup.m_popupVisible = true;
+}
+
+void QtFallbackWebPopupCombo::hidePopup()
+{
+ QWidget* activeFocus = QApplication::focusWidget();
+ if (activeFocus && activeFocus == QComboBox::view()
+ && activeFocus->testAttribute(Qt::WA_InputMethodEnabled)) {
+ QInputContext* qic = activeFocus->inputContext();
+ if (qic) {
+ qic->reset();
+ qic->setFocusWidget(0);
+ }
+ }
+
+ QComboBox::hidePopup();
+
+ if (QGraphicsProxyWidget* proxy = graphicsProxyWidget())
+ proxy->setVisible(false);
+
+ if (!m_ownerPopup.m_popupVisible)
+ return;
+
+ m_ownerPopup.m_popupVisible = false;
+ m_ownerPopup.popupDidHide();
+}
+
+// QtFallbackWebPopup
+
+QtFallbackWebPopup::QtFallbackWebPopup()
+ : QtAbstractWebPopup()
+ , m_popupVisible(false)
+ , m_combo(new QtFallbackWebPopupCombo(*this))
+ , m_proxy(0)
+{
+ connect(m_combo, SIGNAL(activated(int)),
+ SLOT(activeChanged(int)), Qt::QueuedConnection);
+}
+
+QtFallbackWebPopup::~QtFallbackWebPopup()
+{
+ // If we create a proxy, then the deletion of the proxy and the
+ // combo will be done by the proxy's parent (QGraphicsWebView)
+ if (!m_proxy)
+ delete m_combo;
+}
+
+void QtFallbackWebPopup::show()
+{
+ if (!pageClient())
+ return;
+
+#if ENABLE(SYMBIAN_DIALOG_PROVIDERS)
+ TRAP_IGNORE(showS60BrowserDialog());
+#else
+ populate();
+ m_combo->setCurrentIndex(currentIndex());
+
+ QRect rect = geometry();
+ if (QGraphicsWebView *webView = qobject_cast<QGraphicsWebView*>(pageClient()->pluginParent())) {
+ if (!m_proxy) {
+ m_proxy = new QGraphicsProxyWidget(webView);
+ m_proxy->setWidget(m_combo);
+ } else
+ m_proxy->setVisible(true);
+ m_proxy->setGeometry(rect);
+ } else {
+ m_combo->setParent(pageClient()->ownerWidget());
+ m_combo->setGeometry(QRect(rect.left(), rect.top(),
+ rect.width(), m_combo->sizeHint().height()));
+
+ }
+
+ QMouseEvent event(QEvent::MouseButtonPress, QCursor::pos(), Qt::LeftButton,
+ Qt::LeftButton, Qt::NoModifier);
+ QCoreApplication::sendEvent(m_combo, &event);
+#endif
+}
+
+#if ENABLE(SYMBIAN_DIALOG_PROVIDERS)
+
+static void ResetAndDestroy(TAny* aPtr)
+{
+ RPointerArray<HBufC>* items = reinterpret_cast<RPointerArray<HBufC>* >(aPtr);
+ items->ResetAndDestroy();
+}
+
+void QtFallbackWebPopup::showS60BrowserDialog()
+{
+ static MBrCtlDialogsProvider* dialogs = CBrowserDialogsProvider::NewL(0);
+ if (!dialogs)
+ return;
+
+ int size = itemCount();
+ CArrayFix<TBrCtlSelectOptionData>* options = new CArrayFixFlat<TBrCtlSelectOptionData>(qMax(1, size));
+ RPointerArray<HBufC> items(qMax(1, size));
+ CleanupStack::PushL(TCleanupItem(&ResetAndDestroy, &items));
+
+ for (int i = 0; i < size; i++) {
+ if (itemType(i) == Separator) {
+ TBrCtlSelectOptionData data(_L("----------"), false, false, false);
+ options->AppendL(data);
+ } else {
+ HBufC16* itemStr = HBufC16::NewL(itemText(i).length());
+ itemStr->Des().Copy((const TUint16*)itemText(i).utf16(), itemText(i).length());
+ CleanupStack::PushL(itemStr);
+ TBrCtlSelectOptionData data(*itemStr, i == currentIndex(), false, itemIsEnabled(i));
+ options->AppendL(data);
+ items.AppendL(itemStr);
+ CleanupStack::Pop();
+ }
+ }
+
+ dialogs->DialogSelectOptionL(KNullDesC(), (TBrCtlSelectOptionType)(ESelectTypeSingle | ESelectTypeWithFindPane), *options);
+
+ CleanupStack::PopAndDestroy(&items);
+
+ int newIndex;
+ for (newIndex = 0; newIndex < options->Count() && !options->At(newIndex).IsSelected(); newIndex++) {}
+ if (newIndex == options->Count())
+ newIndex = currentIndex();
+
+ m_popupVisible = false;
+ popupDidHide();
+
+ if (currentIndex() != newIndex && newIndex >= 0)
+ valueChanged(newIndex);
+
+ delete options;
+}
+#endif
+
+void QtFallbackWebPopup::hide()
+{
+ m_combo->hidePopup();
+}
+
+void QtFallbackWebPopup::populate()
+{
+ m_combo->clear();
+
+ QStandardItemModel* model = qobject_cast<QStandardItemModel*>(m_combo->model());
+ Q_ASSERT(model);
+
+#if !defined(Q_WS_S60)
+ m_combo->setFont(font());
+#endif
+ for (int i = 0; i < itemCount(); ++i) {
+ switch (itemType(i)) {
+ case Separator:
+ m_combo->insertSeparator(i);
+ break;
+ case Group:
+ m_combo->insertItem(i, itemText(i));
+ model->item(i)->setEnabled(false);
+ break;
+ case Option:
+ m_combo->insertItem(i, itemText(i));
+ model->item(i)->setEnabled(itemIsEnabled(i));
+ break;
+ }
+ }
+}
+
+void QtFallbackWebPopup::activeChanged(int index)
+{
+ if (index < 0)
+ return;
+
+ valueChanged(index);
+}
+
+}
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h
new file mode 100644
index 0000000..9d1183f
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+#ifndef QtFallbackWebPopup_h
+#define QtFallbackWebPopup_h
+
+#include "QtAbstractWebPopup.h"
+#include <QComboBox>
+
+class QGraphicsProxyWidget;
+
+namespace WebCore {
+
+class QtFallbackWebPopupCombo;
+
+class QtFallbackWebPopup : public QObject, public QtAbstractWebPopup {
+ Q_OBJECT
+public:
+ QtFallbackWebPopup();
+ ~QtFallbackWebPopup();
+
+ virtual void show();
+ virtual void hide();
+
+private slots:
+ void activeChanged(int);
+
+private:
+ friend class QtFallbackWebPopupCombo;
+ bool m_popupVisible;
+ QtFallbackWebPopupCombo* m_combo;
+ QGraphicsProxyWidget* m_proxy;
+
+ void populate();
+#if ENABLE(SYMBIAN_DIALOG_PROVIDERS)
+ void showS60BrowserDialog();
+#endif
+};
+
+class QtFallbackWebPopupCombo : public QComboBox {
+public:
+ QtFallbackWebPopupCombo(QtFallbackWebPopup& ownerPopup);
+ virtual void showPopup();
+ virtual void hidePopup();
+
+private:
+ QtFallbackWebPopup& m_ownerPopup;
+};
+
+}
+
+#endif // QtFallbackWebPopup_h
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtMaemoWebPopup.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtMaemoWebPopup.cpp
new file mode 100644
index 0000000..29a16cb
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtMaemoWebPopup.cpp
@@ -0,0 +1,220 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+#include "config.h"
+#include "QtMaemoWebPopup.h"
+
+#include <QHBoxLayout>
+#include <QListWidget>
+#include <QListWidgetItem>
+#include <QPainter>
+#include <QPushButton>
+#include <QStyledItemDelegate>
+#include <QVBoxLayout>
+
+#include <libintl.h>
+
+
+namespace WebCore {
+
+static const int gMaemoListItemSize = 70;
+static const int gMaemoListPadding = 38;
+static const int gMaemoMaxVisibleItems = 5;
+
+void Maemo5Popup::populateList()
+{
+ QListWidgetItem* listItem;
+ for (int i = 0; i < m_data.itemCount(); ++i) {
+ if (m_data.itemType(i) == QtAbstractWebPopup::Option) {
+ listItem = new QListWidgetItem(m_data.itemText(i));
+ m_list->addItem(listItem);
+ listItem->setSelected(m_data.itemIsSelected(i));
+ } else if (m_data.itemType(i) == QtAbstractWebPopup::Group) {
+ listItem = new QListWidgetItem(m_data.itemText(i));
+ m_list->addItem(listItem);
+ listItem->setSelected(false);
+ listItem->setFlags(Qt::NoItemFlags);
+ }
+ }
+ connect(m_list, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(onItemSelected(QListWidgetItem*)));
+}
+
+void Maemo5Popup::onItemSelected(QListWidgetItem* item)
+{
+ if (item->flags() != Qt::NoItemFlags)
+ emit itemClicked(m_list->row(item));
+}
+
+QtMaemoWebPopup::QtMaemoWebPopup()
+ : QtAbstractWebPopup()
+ , m_popup(0)
+{
+}
+
+QtMaemoWebPopup::~QtMaemoWebPopup()
+{
+ if (m_popup)
+ m_popup->deleteLater();
+}
+
+Maemo5Popup* QtMaemoWebPopup::createSingleSelectionPopup()
+{
+ return new Maemo5SingleSelectionPopup(*this);
+}
+
+Maemo5Popup* QtMaemoWebPopup::createMultipleSelectionPopup()
+{
+ return new Maemo5MultipleSelectionPopup(*this);
+}
+
+Maemo5Popup* QtMaemoWebPopup::createPopup()
+{
+ Maemo5Popup* result = multiple() ? createMultipleSelectionPopup() : createSingleSelectionPopup();
+ connect(result, SIGNAL(finished(int)), this, SLOT(popupClosed()));
+ connect(result, SIGNAL(itemClicked(int)), this, SLOT(itemClicked(int)));
+ return result;
+}
+
+void QtMaemoWebPopup::show()
+{
+ if (!pageClient() || m_popup)
+ return;
+
+ m_popup = createPopup();
+ m_popup->show();
+}
+
+void QtMaemoWebPopup::hide()
+{
+ if (!m_popup)
+ return;
+
+ m_popup->accept();
+}
+
+void QtMaemoWebPopup::popupClosed()
+{
+ if (!m_popup)
+ return;
+
+ m_popup->deleteLater();
+ m_popup = 0;
+ popupDidHide();
+}
+
+void QtMaemoWebPopup::itemClicked(int idx)
+{
+ selectItem(idx, true, false);
+}
+
+Maemo5SingleSelectionPopup::Maemo5SingleSelectionPopup(QtAbstractWebPopup& data)
+ : Maemo5Popup(data)
+{
+ // we try to get the standard list title the web browser is using
+ const char* title = ::dgettext("osso-browser-ui", "weba_ti_texlist_single");
+ if (qstrcmp(title, "weba_ti_texlist_single"))
+ setWindowTitle(QString::fromUtf8(title));
+ else
+ setWindowTitle("Select item");
+
+ QHBoxLayout* hLayout = new QHBoxLayout(this);
+ hLayout->setContentsMargins(0, 0, 0, 0);
+
+ m_list = new QListWidget(this);
+ populateList();
+
+ hLayout->addSpacing(gMaemoListPadding);
+ hLayout->addWidget(m_list);
+ hLayout->addSpacing(gMaemoListPadding);
+
+ connect(m_list, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(accept()));
+
+ const int visibleItemCount = (m_list->count() > gMaemoMaxVisibleItems) ? gMaemoMaxVisibleItems : m_list->count();
+ resize(size().width(), visibleItemCount * gMaemoListItemSize);
+}
+
+
+class MultipleItemListDelegate : public QStyledItemDelegate {
+public:
+ MultipleItemListDelegate(QObject* parent = 0)
+ : QStyledItemDelegate(parent)
+ {
+ tickMark = QIcon::fromTheme("widgets_tickmark_list").pixmap(48, 48);
+ }
+
+ void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const
+ {
+ QStyledItemDelegate::paint(painter, option, index);
+
+ if (option.state & QStyle::State_Selected)
+ painter->drawPixmap(option.rect.width() - tickMark.rect().width(), option.rect.y() + (option.rect.height() / 2 - tickMark.rect().height() / 2), tickMark);
+ }
+
+private:
+ QPixmap tickMark;
+};
+
+Maemo5MultipleSelectionPopup::Maemo5MultipleSelectionPopup(QtAbstractWebPopup& data)
+ : Maemo5Popup(data)
+{
+ // we try to get the standard list title the web browser is using
+ const char* title = ::dgettext("osso-browser-ui", "weba_ti_textlist_multi");
+ if (qstrcmp(title, "weba_ti_textlist_multi"))
+ setWindowTitle(QString::fromUtf8(title));
+ else
+ setWindowTitle("Select items");
+
+ QHBoxLayout* hLayout = new QHBoxLayout(this);
+ hLayout->setContentsMargins(0, 0, 0, 0);
+
+ m_list = new QListWidget(this);
+ m_list->setSelectionMode(QAbstractItemView::MultiSelection);
+ populateList();
+
+ MultipleItemListDelegate* delegate = new MultipleItemListDelegate(this);
+ m_list->setItemDelegate(delegate);
+
+ hLayout->addSpacing(gMaemoListPadding);
+ hLayout->addWidget(m_list);
+
+ QVBoxLayout* vLayout = new QVBoxLayout();
+
+ const int visibleItemCount = (m_list->count() > gMaemoMaxVisibleItems) ? gMaemoMaxVisibleItems : m_list->count();
+ vLayout->addSpacing((visibleItemCount - 1) * gMaemoListItemSize);
+
+ // we try to get the standard Done button title
+ QPushButton* done = new QPushButton(this);
+ title = ::dgettext("hildon-libs", "wdgt_bd_done");
+ if (qstrcmp(title, "wdgt_bd_done"))
+ done->setText(QString::fromUtf8(title));
+ else
+ done->setText("Done");
+
+ done->setMinimumWidth(178);
+ vLayout->addWidget(done);
+
+ hLayout->addSpacing(8);
+ hLayout->addLayout(vLayout);
+ hLayout->addSpacing(18);
+
+ connect(done, SIGNAL(clicked()), this, SLOT(accept()));
+ resize(size().width(), visibleItemCount * gMaemoListItemSize);
+}
+
+}
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtMaemoWebPopup.h b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtMaemoWebPopup.h
new file mode 100644
index 0000000..a163a20
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtMaemoWebPopup.h
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+#ifndef QtMaemoWebPopup_h
+#define QtMaemoWebPopup_h
+
+#include "QtAbstractWebPopup.h"
+
+#include <QDialog>
+
+class QListWidgetItem;
+class QListWidget;
+
+
+namespace WebCore {
+
+class Maemo5Popup : public QDialog {
+ Q_OBJECT
+public:
+ Maemo5Popup(QtAbstractWebPopup& data) : m_data(data) {}
+
+signals:
+ void itemClicked(int idx);
+
+protected slots:
+ void onItemSelected(QListWidgetItem* item);
+
+protected:
+ void populateList();
+
+ QtAbstractWebPopup& m_data;
+ QListWidget* m_list;
+};
+
+
+class QtMaemoWebPopup : public QObject, public QtAbstractWebPopup {
+ Q_OBJECT
+public:
+ QtMaemoWebPopup();
+ ~QtMaemoWebPopup();
+
+ virtual void show();
+ virtual void hide();
+
+private slots:
+ void popupClosed();
+ void itemClicked(int idx);
+
+private:
+ Maemo5Popup* m_popup;
+
+ Maemo5Popup* createPopup();
+ Maemo5Popup* createSingleSelectionPopup();
+ Maemo5Popup* createMultipleSelectionPopup();
+};
+
+
+class Maemo5SingleSelectionPopup : public Maemo5Popup {
+ Q_OBJECT
+public:
+ Maemo5SingleSelectionPopup(QtAbstractWebPopup& data);
+};
+
+
+class Maemo5MultipleSelectionPopup : public Maemo5Popup {
+ Q_OBJECT
+public:
+ Maemo5MultipleSelectionPopup(QtAbstractWebPopup& data);
+};
+
+}
+
+#endif // QtMaemoWebPopup_h
diff --git a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdocconf b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdocconf
index 8ee8f69..292c124 100644
--- a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdocconf
+++ b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdocconf
@@ -4,7 +4,7 @@ project = qtwebkit
description = "Qt WebKit API Documentation"
headerdirs = $SRCDIR/WebKit/qt/Api
-sourcedirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/docs
+sourcedirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/docs $SRCDIR/JavaScriptCore/qt/api
outputdir = $OUTPUT_DIR/doc/html
outputformats = HTML
sources.fileextensions = "*.cpp *.doc *.qdoc *.h"
diff --git a/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/webelement/main.cpp b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/webelement/main.cpp
index 2707ffb..822b61c 100644
--- a/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/webelement/main.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/webelement/main.cpp
@@ -53,8 +53,8 @@ static void findAll()
*/
//! [FindAll intro]
- QList<QWebElement> allSpans = document.findAll("span");
- QList<QWebElement> introSpans = document.findAll("p.intro span");
+ QWebElementCollection allSpans = document.findAll("span");
+ QWebElementCollection introSpans = document.findAll("p.intro span");
//! [FindAll intro] //! [FindAll]
}
diff --git a/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def b/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def
index cfa8f7f..582305f 100644
--- a/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def
+++ b/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def
@@ -694,4 +694,25 @@ EXPORTS
_Z25qt_resumeActiveDOMObjectsP9QWebFrame @ 693 NONAME
_Z26qt_suspendActiveDOMObjectsP9QWebFrame @ 694 NONAME
_Z35qtwebkit_webframe_scrollRecursivelyP9QWebFrameii @ 695 NONAME ABSENT
+ _ZN13QWebInspector10closeEventEP11QCloseEvent @ 696 NONAME
+ _ZN9QWebFrame17scrollRecursivelyEii @ 697 NONAME ABSENT
+ _ZN16QGraphicsWebView20setResizesToContentsEb @ 698 NONAME
+ _ZNK16QGraphicsWebView17resizesToContentsEv @ 699 NONAME
+ _Z20qt_drt_numberOfPagesP9QWebFrameff @ 700 NONAME
+ _Z24qt_drt_pauseSVGAnimationP9QWebFrameRK7QStringdS3_ @ 701 NONAME
+ _Z24qt_drt_webinspector_showP8QWebPage @ 702 NONAME
+ _Z24qt_drt_workerThreadCountv @ 703 NONAME
+ _Z25qt_drt_hasDocumentElementP9QWebFrame @ 704 NONAME
+ _Z25qt_drt_webinspector_closeP8QWebPage @ 705 NONAME
+ _Z31qt_drt_pageNumberForElementByIdP9QWebFrameRK7QStringff @ 706 NONAME
+ _Z33qt_drt_webinspector_executeScriptP8QWebPagelRK7QString @ 707 NONAME
+ _Z34qt_drt_setTimelineProfilingEnabledP8QWebPageb @ 708 NONAME
+ _Z35qt_drt_setFrameFlatteningEnabledP8QWebPageb @ 709 NONAME
+ _Z36qt_drt_evaluateScriptInIsolatedWorldP9QWebFrameiRK7QString @ 710 NONAME
+ _Z47qt_drt_setDomainRelaxationForbiddenForURLSchemebRK7QString @ 711 NONAME
+ _ZN9QWebFrame11pageChangedEv @ 712 NONAME
+ _ZN9QWebFrame14scrollToAnchorERK7QString @ 713 NONAME
+ _ZN12QWebSettings15setInspectorUrlERK4QUrl @ 714 NONAME
_Z35qtwebkit_webframe_scrollRecursivelyP9QWebFrameiiRK6QPoint @ 715 NONAME
+ _ZN16QGraphicsWebView26setTiledBackingStoreFrozenEb @ 716 NONAME
+ _ZNK16QGraphicsWebView25isTiledBackingStoreFrozenEv @ 717 NONAME
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/loading/loading.pro b/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/loading/loading.pro
new file mode 100644
index 0000000..024211f
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/loading/loading.pro
@@ -0,0 +1,2 @@
+isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../../..
+include(../../tests.pri)
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/loading/tst_loading.pro b/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/loading/tst_loading.pro
deleted file mode 100644
index bc5e75f..0000000
--- a/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/loading/tst_loading.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-TEMPLATE = app
-TARGET = tst_loading
-include(../../../../../WebKit.pri)
-SOURCES += tst_loading.cpp
-QT += testlib network
-QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-
-symbian {
- TARGET.UID3 = 0xA000E541
- TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
-}
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/painting/painting.pro b/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/painting/painting.pro
new file mode 100644
index 0000000..b4fc56a
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/painting/painting.pro
@@ -0,0 +1,2 @@
+isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../../..
+include(../../tests.pri) \ No newline at end of file
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/painting/tst_painting.pro b/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/painting/tst_painting.pro
deleted file mode 100644
index 48c7072..0000000
--- a/src/3rdparty/webkit/WebKit/qt/tests/benchmarks/painting/tst_painting.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-TEMPLATE = app
-TARGET = tst_painting
-include(../../../../../WebKit.pri)
-SOURCES += tst_painting.cpp
-QT += testlib network
-QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-
-symbian {
- TARGET.UID3 = 0xA000E542
- TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
-}
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/hybridPixmap.pro b/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/hybridPixmap.pro
new file mode 100644
index 0000000..9e80870
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/hybridPixmap.pro
@@ -0,0 +1,11 @@
+# -------------------------------------------------
+# Project created by QtCreator 2009-12-10T11:25:02
+# -------------------------------------------------
+isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
+include(../tests.pri)
+TARGET = hybridPixmap
+SOURCES += widget.cpp
+HEADERS += widget.h
+FORMS += widget.ui
+RESOURCES += resources.qrc
+CONFIG += console
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/resources.qrc b/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/resources.qrc
new file mode 100644
index 0000000..5fd47e3
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/resources.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/">
+ <file>test.html</file>
+ </qresource>
+</RCC>
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/test.html b/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/test.html
new file mode 100644
index 0000000..0f2c345
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/test.html
@@ -0,0 +1,65 @@
+<html>
+ <head>
+ <style>
+ img { display: block; border-style: groove}
+ </style>
+ <script>
+ function startTest()
+ {
+ var obj = myWidget.image;
+ var pxm = myWidget.pixmap;
+
+ var img = new Image;
+ obj.assignToHTMLImageElement(img);
+ var img1 = document.getElementById("img1");
+ var img2 = document.getElementById("img2");
+ var img3 = document.getElementById("img3");
+ var img4 = document.getElementById("img4");
+ document.body.appendChild(img);
+ obj.assignToHTMLImageElement(img3);
+ pxm.assignToHTMLImageElement(img4);
+ myWidget.compare(pxm.width, img4.width);
+ myWidget.compare(obj.width, img3.width);
+ var signalsFired = 0;
+ myWidget.compare(obj.toString(),"[Qt Native Pixmap "+obj.width+","+obj.height+"]");
+ myWidget.compare(String(pxm),"[Qt Native Pixmap "+pxm.width+","+pxm.height+"]");
+
+ // this shouldn't work but shouldn't crash
+ myWidget.randomSlot("foobar");
+
+ myWidget.pixmapSignal.connect(function(imgFromSignal) {
+ myWidget.compare(imgFromSignal.height, img2.height);
+ if (++signalsFired == 2)
+ myWidget.completeTest();
+ });
+
+ myWidget.imageSignal.connect(function(imgFromSignal) {
+ myWidget.compare(pxm.height, img2.height);
+ if (++signalsFired == 2)
+ myWidget.completeTest();
+ });
+
+ function continueTestAfterImagesAreLoaded()
+ {
+ if (img1.complete && img2.complete) {
+ myWidget.compare(pxm.height, img2.height);
+ myWidget.pixmapSlot(img);
+ myWidget.imageSlot(pxm);
+ }
+ }
+ img1.onload = continueTestAfterImagesAreLoaded;
+ img2.onload = continueTestAfterImagesAreLoaded;
+ img1.src = obj.toDataUrl();
+ img2.src = myWidget.pixmap.toDataUrl();
+ myWidget.image = pxm;
+ myWidget.pixmap = img;
+ }
+ </script>
+ </head>
+ <body onload="startTest()">
+ <img id="img1" />
+ <img id="img2" />
+ <img id="img3" />
+ <img id="img4" />
+ </body>
+</html>
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/tst_hybridPixmap.cpp b/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/tst_hybridPixmap.cpp
new file mode 100644
index 0000000..72dbb3b
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/tst_hybridPixmap.cpp
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "../util.h"
+
+#include "widget.h"
+#include <QtTest/QtTest>
+
+class tst_hybridPixmap : public QObject {
+ Q_OBJECT
+
+public:
+ tst_hybridPixmap(QObject* o = 0) : QObject(o) {}
+
+public slots:
+ void init()
+ {
+ }
+
+ void cleanup()
+ {
+ }
+
+private slots:
+ void hybridPixmap()
+ {
+ Widget widget;
+ widget.show();
+ widget.start();
+ waitForSignal(&widget, SIGNAL(testComplete()));
+ }
+};
+
+QTEST_MAIN(tst_hybridPixmap)
+
+#include <tst_hybridPixmap.moc>
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/widget.cpp b/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/widget.cpp
new file mode 100644
index 0000000..cfdb1d6
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/widget.cpp
@@ -0,0 +1,119 @@
+/*
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include "widget.h"
+
+#include "qwebelement.h"
+#include "qwebframe.h"
+#include "ui_widget.h"
+#include <QPainter>
+#include <QtTest/QtTest>
+
+Widget::Widget(QWidget* parent) :
+ QWidget(parent),
+ ui(new Ui::Widget)
+{
+ ui->setupUi(this);
+}
+
+void Widget::refreshJS()
+{
+ ui->webView->page()->mainFrame()->addToJavaScriptWindowObject("myWidget", this);
+}
+void Widget::start()
+{
+ ui->webView->load(QUrl("qrc:///test.html"));
+ connect(ui->webView->page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(refreshJS()));
+ ui->webView->page()->mainFrame()->addToJavaScriptWindowObject("myWidget", this);
+}
+
+void Widget::completeTest()
+{
+ QCOMPARE(ui->lbl1->pixmap()->size(), ui->lbl2->size());
+ QCOMPARE(ui->lbl3->size(), ui->lbl4->pixmap()->size());
+ QCOMPARE(ui->lbl2->size().width(), ui->webView->page()->mainFrame()->findFirstElement("#img1").evaluateJavaScript("this.width").toInt());
+ QCOMPARE(ui->lbl3->size().width(), ui->webView->page()->mainFrame()->findFirstElement("#img2").evaluateJavaScript("this.width").toInt());
+ emit testComplete();
+}
+
+void Widget::setPixmap(const QPixmap& p)
+{
+ ui->lbl1->setPixmap(p);
+}
+QPixmap Widget::pixmap() const
+{
+ QPixmap px(ui->lbl3->size());
+ {
+ QPainter p(&px);
+ ui->lbl3->render(&p);
+ }
+ return px;
+}
+void Widget::setImage(const QImage& img)
+{
+ ui->lbl4->setPixmap(QPixmap::fromImage(img));
+}
+
+QImage Widget::image() const
+{
+ QImage img(ui->lbl2->size(), QImage::Format_ARGB32);
+ {
+ QPainter p(&img);
+ ui->lbl2->render(&p);
+ }
+ return img;
+}
+
+Widget::~Widget()
+{
+ delete ui;
+}
+
+void Widget::changeEvent(QEvent* e)
+{
+ QWidget::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
+void Widget::compare(const QVariant& a, const QVariant& b)
+{
+ QCOMPARE(a, b);
+}
+
+void Widget::imageSlot(const QImage& img)
+{
+ QCOMPARE(img.size(), ui->lbl3->size());
+ emit pixmapSignal(QPixmap::fromImage(img));
+}
+
+void Widget::pixmapSlot(const QPixmap& pxm)
+{
+ QCOMPARE(pxm.size(), ui->lbl2->size());
+ emit imageSignal(ui->lbl4->pixmap()->toImage());
+}
+
+void Widget::randomSlot(const QPixmap& pxm)
+{
+ QVERIFY(pxm.isNull());
+}
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/widget.h b/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/widget.h
new file mode 100644
index 0000000..a49f8ba
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/widget.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef widget_h
+#define widget_h
+
+#include <QImage>
+#include <QPixmap>
+#include <QWidget>
+#include "qwebview.h"
+
+typedef QWebView WebView;
+
+namespace Ui {
+class Widget;
+}
+
+class Widget : public QWidget {
+ Q_OBJECT
+ Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap)
+ Q_PROPERTY(QImage image READ image WRITE setImage)
+
+public:
+ Widget(QWidget* parent = 0);
+ ~Widget();
+ void setPixmap(const QPixmap&);
+ QPixmap pixmap() const;
+ void setImage(const QImage&);
+ QImage image() const;
+
+private slots:
+ void refreshJS();
+
+public slots:
+ void completeTest();
+ void start();
+ void compare(const QVariant& a, const QVariant& b);
+ void imageSlot(const QImage&);
+ void pixmapSlot(const QPixmap&);
+ void randomSlot(const QPixmap&);
+
+signals:
+ void testComplete();
+ void imageSignal(const QImage&);
+ void pixmapSignal(const QPixmap&);
+
+protected:
+ void changeEvent(QEvent* e);
+
+private:
+ Ui::Widget* ui;
+};
+
+#endif // widget_h
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/widget.ui b/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/widget.ui
new file mode 100644
index 0000000..4f2b3b8
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/widget.ui
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Widget</class>
+ <widget class="QWidget" name="Widget">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>600</width>
+ <height>400</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Widget</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="WebView" name="webView" native="true">
+ <property name="url" stdset="0">
+ <url>
+ <string>about:blank</string>
+ </url>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLabel" name="lbl1">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="lbl2">
+ <property name="minimumSize">
+ <size>
+ <width>120</width>
+ <height>30</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>120</width>
+ <height>30</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Image from Qt to HTML</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="lbl3">
+ <property name="text">
+ <string>Pixmap from Qt to HTML</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="lbl4">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <customwidgets>
+ <customwidget>
+ <class>WebView</class>
+ <extends>QWidget</extends>
+ <header>widget.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro b/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro
index 57b4437..d056014 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro
@@ -1,10 +1,2 @@
-TEMPLATE = app
-TARGET = tst_qgraphicswebview
-include(../../../../WebKit.pri)
-SOURCES += tst_qgraphicswebview.cpp
-QT += testlib network
-QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-
-symbian {
- TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
-}
+isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
+include(../tests.pri) \ No newline at end of file
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
index a52e167..657e09f 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
@@ -17,36 +17,13 @@
Boston, MA 02110-1301, USA.
*/
+#include "../util.h"
#include <QtTest/QtTest>
-
#include <QGraphicsView>
#include <qgraphicswebview.h>
#include <qwebpage.h>
#include <qwebframe.h>
-/**
- * Starts an event loop that runs until the given signal is received.
- * Optionally the event loop
- * can return earlier on a timeout.
- *
- * \return \p true if the requested signal was received
- * \p false on timeout
- */
-static bool waitForSignal(QObject* obj, const char* signal, int timeout = 10000)
-{
- QEventLoop loop;
- QObject::connect(obj, signal, &loop, SLOT(quit()));
- QTimer timer;
- QSignalSpy timeoutSpy(&timer, SIGNAL(timeout()));
- if (timeout > 0) {
- QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
- timer.setSingleShot(true);
- timer.start(timeout);
- }
- loop.exec();
- return timeoutSpy.isEmpty();
-}
-
class tst_QGraphicsWebView : public QObject
{
Q_OBJECT
@@ -113,7 +90,7 @@ void tst_QGraphicsWebView::crashOnViewlessWebPages()
view.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
view.resize(600, 480);
webView->resize(view.geometry().size());
- QTest::qWait(200);
+ QCoreApplication::processEvents();
view.show();
page->mainFrame()->setHtml(QString("data:text/html,"
@@ -122,7 +99,7 @@ void tst_QGraphicsWebView::crashOnViewlessWebPages()
"<frame src=\"data:text/html,bar\">"
"</frameset>"));
- QVERIFY(::waitForSignal(page, SIGNAL(loadFinished(bool))));
+ QVERIFY(waitForSignal(page, SIGNAL(loadFinished(bool))));
}
QTEST_MAIN(tst_QGraphicsWebView)
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/qwebelement.pro b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/qwebelement.pro
index c45a9ac..d056014 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/qwebelement.pro
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/qwebelement.pro
@@ -1,12 +1,2 @@
-TEMPLATE = app
-TARGET = tst_qwebelement
-include(../../../../WebKit.pri)
-SOURCES += tst_qwebelement.cpp
-RESOURCES += qwebelement.qrc
-QT += testlib network
-QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-
-symbian {
- TARGET.UID3 = 0xA000E53A
- TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
-}
+isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
+include(../tests.pri) \ No newline at end of file
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/qwebelement.qrc b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/qwebelement.qrc
deleted file mode 100644
index 28b9d7b..0000000
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/qwebelement.qrc
+++ /dev/null
@@ -1,7 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource prefix="/">
-<file>style.css</file>
-<file>style2.css</file>
-<file>image.png</file>
-</qresource>
-</RCC>
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/image.png b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/resources/image.png
index 8d70364..8d70364 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/image.png
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/resources/image.png
Binary files differ
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/style.css b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/resources/style.css
index 2713dfd..2713dfd 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/style.css
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/resources/style.css
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/style2.css b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/resources/style2.css
index 6575dcb..6575dcb 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/style2.css
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/resources/style2.css
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
index e9dae18..8db0ec3 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
@@ -19,38 +19,15 @@
#include <QtTest/QtTest>
-
#include <qwebpage.h>
#include <qwidget.h>
#include <qwebview.h>
#include <qwebframe.h>
#include <qwebelement.h>
+#include <util.h>
//TESTED_CLASS=
//TESTED_FILES=
-/**
- * Starts an event loop that runs until the given signal is received.
- Optionally the event loop
- * can return earlier on a timeout.
- *
- * \return \p true if the requested signal was received
- * \p false on timeout
- */
-static bool waitForSignal(QObject* obj, const char* signal, int timeout = 0)
-{
- QEventLoop loop;
- QObject::connect(obj, signal, &loop, SLOT(quit()));
- QTimer timer;
- QSignalSpy timeoutSpy(&timer, SIGNAL(timeout()));
- if (timeout > 0) {
- QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
- timer.setSingleShot(true);
- timer.start(timeout);
- }
- loop.exec();
- return timeoutSpy.isEmpty();
-}
-
class tst_QWebElement : public QObject
{
Q_OBJECT
@@ -576,9 +553,8 @@ void tst_QWebElement::style()
"</body>";
// in few seconds, the CSS should be completey loaded
- QSignalSpy spy(m_page, SIGNAL(loadFinished(bool)));
m_mainFrame->setHtml(html6);
- QTest::qWait(200);
+ waitForSignal(m_page, SIGNAL(loadFinished(bool)), 200);
p = m_mainFrame->documentElement().findAll("p").at(0);
QCOMPARE(p.styleProperty("color", QWebElement::InlineStyle), QLatin1String("blue"));
@@ -596,7 +572,7 @@ void tst_QWebElement::style()
// in few seconds, the style should be completey loaded
m_mainFrame->setHtml(html7);
- QTest::qWait(200);
+ waitForSignal(m_page, SIGNAL(loadFinished(bool)), 200);
p = m_mainFrame->documentElement().findAll("p").at(0);
QCOMPARE(p.styleProperty("color", QWebElement::CascadedStyle), QLatin1String("black"));
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.qrc b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.qrc
new file mode 100644
index 0000000..7384c76
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.qrc
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+<file alias="style.css">resources/style.css</file>
+<file alias="style2.css">resources/style2.css</file>
+<file alias="image.png">resources/image.png</file>
+</qresource>
+</RCC>
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.pro b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.pro
index b8734cd..d056014 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.pro
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.pro
@@ -1,13 +1,2 @@
-TEMPLATE = app
-TARGET = tst_qwebframe
-include(../../../../WebKit.pri)
-SOURCES += tst_qwebframe.cpp
-RESOURCES += qwebframe.qrc
-QT += testlib network
-QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-!symbian:DEFINES += SRCDIR=\\\"$$PWD/resources\\\"
-
-symbian {
- TARGET.UID3 = 0xA000E53D
- TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
-}
+isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
+include(../tests.pri) \ No newline at end of file
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.qrc b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.qrc
deleted file mode 100644
index 8afa0c1..0000000
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.qrc
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource prefix="/">
-<file>image.png</file>
-<file>style.css</file>
-<file>test1.html</file>
-<file>test2.html</file>
-<file>testiframe.html</file>
-<file>testiframe2.html</file>
-</qresource>
-</RCC>
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/image.png b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/image.png
index 8d70364..8d70364 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/image.png
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/image.png
Binary files differ
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/style.css b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/style.css
index c05b747..c05b747 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/style.css
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/style.css
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/test1.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/test1.html
index b323f96..b323f96 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/test1.html
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/test1.html
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/test2.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/test2.html
index 63ac1f6..63ac1f6 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/test2.html
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/test2.html
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/testiframe.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/testiframe.html
index 9f3ae85..9f3ae85 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/testiframe.html
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/testiframe.html
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/testiframe2.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/testiframe2.html
index 1913a89..1913a89 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/testiframe2.html
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/testiframe2.html
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
index 8cc7953..37f7b88 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
@@ -38,40 +38,6 @@
#endif
#include "../util.h"
-#if defined(Q_OS_SYMBIAN)
-# define SRCDIR ""
-#endif
-
-//TESTED_CLASS=
-//TESTED_FILES=
-
-// Task 160192
-/**
- * Starts an event loop that runs until the given signal is received.
- Optionally the event loop
- * can return earlier on a timeout.
- *
- * \return \p true if the requested signal was received
- * \p false on timeout
- */
-static bool waitForSignal(QObject* obj, const char* signal, int timeout = 0)
-{
- QEventLoop loop;
- QObject::connect(obj, signal, &loop, SLOT(quit()));
- QTimer timer;
- QSignalSpy timeoutSpy(&timer, SIGNAL(timeout()));
- if (timeout > 0) {
- QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
- timer.setSingleShot(true);
- timer.start(timeout);
- }
- loop.exec();
- return timeoutSpy.isEmpty();
-}
-
-/* Mostly a test for the JavaScript related parts of QWebFrame */
-
-
struct CustomType {
QString string;
};
@@ -100,6 +66,7 @@ class MyQObject : public QObject
Q_PROPERTY(int readOnlyProperty READ readOnlyProperty)
Q_PROPERTY(QKeySequence shortcut READ shortcut WRITE setShortcut)
Q_PROPERTY(CustomType propWithCustomType READ propWithCustomType WRITE setPropWithCustomType)
+ Q_PROPERTY(QWebElement webElementProperty READ webElementProperty WRITE setWebElementProperty)
Q_ENUMS(Policy Strategy)
Q_FLAGS(Ability)
@@ -215,6 +182,14 @@ public:
m_shortcut = seq;
}
+ QWebElement webElementProperty() const {
+ return m_webElement;
+ }
+
+ void setWebElementProperty(const QWebElement& element) {
+ m_webElement = element;
+ }
+
CustomType propWithCustomType() const {
return m_customType;
}
@@ -467,6 +442,10 @@ public Q_SLOTS:
m_qtFunctionInvoked = 35;
m_actuals << arg;
}
+ void myOverloadedSlot(const QWebElement &arg) {
+ m_qtFunctionInvoked = 36;
+ m_actuals << QVariant::fromValue<QWebElement>(arg);
+ }
void qscript_call(int arg) {
m_qtFunctionInvoked = 40;
@@ -501,6 +480,7 @@ private:
int m_writeOnlyValue;
int m_readOnlyValue;
QKeySequence m_shortcut;
+ QWebElement m_webElement;
CustomType m_customType;
int m_qtFunctionInvoked;
QVariantList m_actuals;
@@ -580,6 +560,7 @@ private slots:
void enumerate();
void objectDeleted();
void typeConversion();
+ void arrayObjectEnumerable();
void symmetricUrl();
void progressSignal();
void urlChange();
@@ -591,7 +572,6 @@ private slots:
void setHtml();
void setHtmlWithResource();
void setHtmlWithBaseURL();
- void setHtmlWithJSAlert();
void ipv6HostEncoding();
void metaData();
void popupFocus();
@@ -604,8 +584,11 @@ private slots:
void hasSetFocus();
void render();
void scrollPosition();
+ void scrollToAnchor();
void evaluateWillCauseRepaint();
void qObjectWrapperWithSameIdentity();
+ void introspectQtMethods_data();
+ void introspectQtMethods();
private:
QString evalJS(const QString&s) {
@@ -706,7 +689,6 @@ void tst_QWebFrame::init()
m_page = m_view->page();
m_myObject = new MyQObject();
m_page->mainFrame()->addToJavaScriptWindowObject("myObject", m_myObject);
- QDir::setCurrent(SRCDIR);
}
void tst_QWebFrame::cleanup()
@@ -717,6 +699,7 @@ void tst_QWebFrame::cleanup()
void tst_QWebFrame::getSetStaticProperty()
{
+ m_page->mainFrame()->setHtml("<html><head><body></body></html>");
QCOMPARE(evalJS("typeof myObject.noSuchProperty"), sUndefined);
// initial value (set in MyQObject constructor)
@@ -856,6 +839,8 @@ void tst_QWebFrame::getSetStaticProperty()
QCOMPARE(evalJS("myObject.stringListProperty[1]"), QLatin1String("two"));
QCOMPARE(evalJS("typeof myObject.stringListProperty[2]"), sString);
QCOMPARE(evalJS("myObject.stringListProperty[2]"), QLatin1String("true"));
+ evalJS("myObject.webElementProperty=document.body;");
+ QCOMPARE(evalJS("myObject.webElementProperty.tagName"), QLatin1String("BODY"));
// try to delete
QCOMPARE(evalJS("delete myObject.intProperty"), sFalse);
@@ -1918,6 +1903,12 @@ void tst_QWebFrame::overloadedSlots()
f.call(QString(), QStringList() << m_engine->newVariant(QVariant("ciao")));
QCOMPARE(m_myObject->qtFunctionInvoked(), 35);
*/
+
+ // should pick myOverloadedSlot(QRegExp)
+ m_myObject->resetQtFunctionInvoked();
+ evalJS("myObject.myOverloadedSlot(document.body)");
+ QCOMPARE(m_myObject->qtFunctionInvoked(), 36);
+
// should pick myOverloadedSlot(QObject*)
m_myObject->resetQtFunctionInvoked();
evalJS("myObject.myOverloadedSlot(myObject)");
@@ -2101,6 +2092,31 @@ void tst_QWebFrame::typeConversion()
// ### RegExps
}
+class StringListTestObject : public QObject {
+ Q_OBJECT
+public Q_SLOTS:
+ QVariant stringList()
+ {
+ return QStringList() << "Q" << "t";
+ };
+};
+
+void tst_QWebFrame::arrayObjectEnumerable()
+{
+ QWebPage page;
+ QWebFrame* frame = page.mainFrame();
+ QObject* qobject = new StringListTestObject();
+ frame->addToJavaScriptWindowObject("test", qobject, QScriptEngine::ScriptOwnership);
+
+ const QString script("var stringArray = test.stringList();"
+ "var result = '';"
+ "for (var i in stringArray) {"
+ " result += stringArray[i];"
+ "}"
+ "result;");
+ QCOMPARE(frame->evaluateJavaScript(script).toString(), QString::fromLatin1("Qt"));
+}
+
void tst_QWebFrame::symmetricUrl()
{
QVERIFY(m_view->url().isEmpty());
@@ -2244,7 +2260,7 @@ protected:
virtual QNetworkReply* createRequest(Operation op, const QNetworkRequest& request, QIODevice* outgoingData)
{
QString url = request.url().toString();
- if (op == QNetworkAccessManager::GetOperation)
+ if (op == QNetworkAccessManager::GetOperation) {
if (url == "qrc:/test1.html" || url == "http://abcdef.abcdef/")
return new FakeReply(request, this);
#ifndef QT_NO_OPENSSL
@@ -2255,6 +2271,7 @@ protected:
return reply;
}
#endif
+ }
return QNetworkAccessManager::createRequest(op, request, outgoingData);
}
@@ -2271,19 +2288,19 @@ void tst_QWebFrame::requestedUrl()
page.setNetworkAccessManager(networkManager);
frame->setUrl(QUrl("qrc:/test1.html"));
- QTest::qWait(200);
+ waitForSignal(frame, SIGNAL(loadFinished(bool)), 200);
QCOMPARE(spy.count(), 1);
QCOMPARE(frame->requestedUrl(), QUrl("qrc:/test1.html"));
QCOMPARE(frame->url(), QUrl("qrc:/test2.html"));
frame->setUrl(QUrl("qrc:/non-existent.html"));
- QTest::qWait(200);
+ waitForSignal(frame, SIGNAL(loadFinished(bool)), 200);
QCOMPARE(spy.count(), 2);
QCOMPARE(frame->requestedUrl(), QUrl("qrc:/non-existent.html"));
QCOMPARE(frame->url(), QUrl("qrc:/non-existent.html"));
frame->setUrl(QUrl("http://abcdef.abcdef"));
- QTest::qWait(200);
+ waitForSignal(frame, SIGNAL(loadFinished(bool)), 200);
QCOMPARE(spy.count(), 3);
QCOMPARE(frame->requestedUrl(), QUrl("http://abcdef.abcdef/"));
QCOMPARE(frame->url(), QUrl("http://abcdef.abcdef/"));
@@ -2294,7 +2311,7 @@ void tst_QWebFrame::requestedUrl()
QSignalSpy spy2(page.networkAccessManager(), SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)));
frame->setUrl(QUrl("qrc:/fake-ssl-error.html"));
- QTest::qWait(200);
+ waitForSignal(frame, SIGNAL(loadFinished(bool)), 200);
QCOMPARE(spy2.count(), 1);
QCOMPARE(frame->requestedUrl(), QUrl("qrc:/fake-ssl-error.html"));
QCOMPARE(frame->url(), QUrl("qrc:/fake-ssl-error.html"));
@@ -2352,7 +2369,7 @@ void tst_QWebFrame::setHtmlWithResource()
// in few seconds, the image should be completey loaded
QSignalSpy spy(&page, SIGNAL(loadFinished(bool)));
frame->setHtml(html);
- QTest::qWait(200);
+ waitForSignal(frame, SIGNAL(loadFinished(bool)), 200);
QCOMPARE(spy.count(), 1);
QCOMPARE(frame->evaluateJavaScript("document.images.length").toInt(), 1);
@@ -2371,7 +2388,7 @@ void tst_QWebFrame::setHtmlWithResource()
// in few seconds, the CSS should be completey loaded
frame->setHtml(html2);
- QTest::qWait(200);
+ waitForSignal(frame, SIGNAL(loadFinished(bool)), 200);
QCOMPARE(spy.size(), 2);
QWebElement p = frame->documentElement().findAll("p").at(0);
@@ -2380,6 +2397,11 @@ void tst_QWebFrame::setHtmlWithResource()
void tst_QWebFrame::setHtmlWithBaseURL()
{
+ if (!QDir(TESTS_SOURCE_DIR).exists())
+ QSKIP(QString("This test requires access to resources found in '%1'").arg(TESTS_SOURCE_DIR).toLatin1().constData(), SkipAll);
+
+ QDir::setCurrent(TESTS_SOURCE_DIR);
+
QString html("<html><body><p>hello world</p><img src='resources/image2.png'/></body></html>");
QWebPage page;
@@ -2388,8 +2410,8 @@ void tst_QWebFrame::setHtmlWithBaseURL()
// in few seconds, the image should be completey loaded
QSignalSpy spy(&page, SIGNAL(loadFinished(bool)));
- frame->setHtml(html, QUrl::fromLocalFile(QDir::currentPath()));
- QTest::qWait(200);
+ frame->setHtml(html, QUrl::fromLocalFile(TESTS_SOURCE_DIR));
+ waitForSignal(frame, SIGNAL(loadFinished(bool)), 200);
QCOMPARE(spy.count(), 1);
QCOMPARE(frame->evaluateJavaScript("document.images.length").toInt(), 1);
@@ -2400,33 +2422,6 @@ void tst_QWebFrame::setHtmlWithBaseURL()
QCOMPARE(m_view->page()->history()->count(), 0);
}
-class MyPage : public QWebPage
-{
-public:
- MyPage() : QWebPage(), alerts(0) {}
- int alerts;
-
-protected:
- virtual void javaScriptAlert(QWebFrame*, const QString& msg)
- {
- alerts++;
- QCOMPARE(msg, QString("foo"));
- // Should not be enough to trigger deferred loading, since we've upped the HTML
- // tokenizer delay in the Qt frameloader. See HTMLTokenizer::continueProcessing()
- QTest::qWait(1000);
- }
-};
-
-void tst_QWebFrame::setHtmlWithJSAlert()
-{
- QString html("<html><head></head><body><script>alert('foo');</script><p>hello world</p></body></html>");
- MyPage page;
- m_view->setPage(&page);
- page.mainFrame()->setHtml(html);
- QCOMPARE(page.alerts, 1);
- QCOMPARE(m_view->page()->mainFrame()->toHtml(), html);
-}
-
class TestNetworkManager : public QNetworkAccessManager
{
public:
@@ -2521,21 +2516,22 @@ void tst_QWebFrame::popupFocus()
QTest::mouseClick(&view, Qt::LeftButton, 0, QPoint(25, 25));
QObject* webpopup = firstChildByClassName(&view, "WebCore::QWebPopup");
QComboBox* combo = qobject_cast<QComboBox*>(webpopup);
+ QVERIFY(combo != 0);
QTRY_VERIFY(!view.hasFocus() && combo->view()->hasFocus()); // Focus should be on the popup
// 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
- // triple the flashing time, should at least blink twice already
- int delay = qApp->cursorFlashTime() * 3;
+ // 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;
view.installEventFilter( this );
QTest::qWait(delay);
- QVERIFY2(m_popupTestPaintCount >= 4,
+ QVERIFY2(m_popupTestPaintCount >= 3,
"The input field should have a blinking caret");
}
@@ -2679,7 +2675,7 @@ void tst_QWebFrame::hasSetFocus()
QSignalSpy loadSpy(m_page, SIGNAL(loadFinished(bool)));
m_page->mainFrame()->setHtml(html);
- QTest::qWait(200);
+ waitForSignal(m_page->mainFrame(), SIGNAL(loadFinished(bool)), 200);
QCOMPARE(loadSpy.size(), 1);
QList<QWebFrame*> children = m_page->mainFrame()->childFrames();
@@ -2689,7 +2685,7 @@ void tst_QWebFrame::hasSetFocus()
"</body></html>");
frame->setHtml(innerHtml);
- QTest::qWait(200);
+ waitForSignal(frame, SIGNAL(loadFinished(bool)), 200);
QCOMPARE(loadSpy.size(), 2);
m_page->mainFrame()->setFocus();
@@ -2768,6 +2764,38 @@ void tst_QWebFrame::scrollPosition()
QCOMPARE(y, 29);
}
+void tst_QWebFrame::scrollToAnchor()
+{
+ QWebPage page;
+ page.setViewportSize(QSize(480, 800));
+ QWebFrame* frame = page.mainFrame();
+
+ QString html("<html><body><p style=\"margin-bottom: 1500px;\">Hello.</p>"
+ "<p><a id=\"foo\">This</a> is an anchor</p>"
+ "<p style=\"margin-bottom: 1500px;\"><a id=\"bar\">This</a> is another anchor</p>"
+ "</body></html>");
+ frame->setHtml(html);
+ frame->setScrollPosition(QPoint(0, 0));
+ QCOMPARE(frame->scrollPosition().x(), 0);
+ QCOMPARE(frame->scrollPosition().y(), 0);
+
+ QWebElement fooAnchor = frame->findFirstElement("a[id=foo]");
+
+ frame->scrollToAnchor("foo");
+ QCOMPARE(frame->scrollPosition().y(), fooAnchor.geometry().top());
+
+ frame->scrollToAnchor("bar");
+ frame->scrollToAnchor("foo");
+ QCOMPARE(frame->scrollPosition().y(), fooAnchor.geometry().top());
+
+ frame->scrollToAnchor("top");
+ QCOMPARE(frame->scrollPosition().y(), 0);
+
+ frame->scrollToAnchor("bar");
+ frame->scrollToAnchor("notexist");
+ QVERIFY(frame->scrollPosition().y() != 0);
+}
+
void tst_QWebFrame::evaluateWillCauseRepaint()
{
QWebView view;
@@ -2776,14 +2804,16 @@ void tst_QWebFrame::evaluateWillCauseRepaint()
view.setHtml(html);
view.show();
- QTest::qWait(200);
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ QTest::qWaitForWindowShown(&view);
+#else
+ QTest::qWait(2000);
+#endif
view.page()->mainFrame()->evaluateJavaScript(
"document.getElementById('junk').style.display = 'none';");
::waitForSignal(view.page(), SIGNAL(repaintRequested(QRect)));
-
- QTest::qWait(2000);
}
class TestFactory : public QObject
@@ -2824,5 +2854,47 @@ void tst_QWebFrame::qObjectWrapperWithSameIdentity()
QCOMPARE(mainFrame->toPlainText(), QString("test2"));
}
+void tst_QWebFrame::introspectQtMethods_data()
+{
+ QTest::addColumn<QString>("objectExpression");
+ QTest::addColumn<QString>("methodName");
+ QTest::addColumn<QStringList>("expectedPropertyNames");
+
+ QTest::newRow("myObject.mySignal")
+ << "myObject" << "mySignal" << (QStringList() << "connect" << "disconnect" << "length" << "name");
+ QTest::newRow("myObject.mySlot")
+ << "myObject" << "mySlot" << (QStringList() << "connect" << "disconnect" << "length" << "name");
+ QTest::newRow("myObject.myInvokable")
+ << "myObject" << "myInvokable" << (QStringList() << "connect" << "disconnect" << "length" << "name");
+ QTest::newRow("myObject.mySignal.connect")
+ << "myObject.mySignal" << "connect" << (QStringList() << "length" << "name");
+ QTest::newRow("myObject.mySignal.disconnect")
+ << "myObject.mySignal" << "disconnect" << (QStringList() << "length" << "name");
+}
+
+void tst_QWebFrame::introspectQtMethods()
+{
+ QFETCH(QString, objectExpression);
+ QFETCH(QString, methodName);
+ QFETCH(QStringList, expectedPropertyNames);
+
+ QString methodLookup = QString::fromLatin1("%0['%1']").arg(objectExpression).arg(methodName);
+ QCOMPARE(evalJSV(QString::fromLatin1("Object.getOwnPropertyNames(%0).sort()").arg(methodLookup)).toStringList(), expectedPropertyNames);
+
+ for (int i = 0; i < expectedPropertyNames.size(); ++i) {
+ QString name = expectedPropertyNames.at(i);
+ QCOMPARE(evalJS(QString::fromLatin1("%0.hasOwnProperty('%1')").arg(methodLookup).arg(name)), sTrue);
+ evalJS(QString::fromLatin1("var descriptor = Object.getOwnPropertyDescriptor(%0, '%1')").arg(methodLookup).arg(name));
+ QCOMPARE(evalJS("typeof descriptor"), QString::fromLatin1("object"));
+ QCOMPARE(evalJS("descriptor.get"), sUndefined);
+ QCOMPARE(evalJS("descriptor.set"), sUndefined);
+ QCOMPARE(evalJS(QString::fromLatin1("descriptor.value === %0['%1']").arg(methodLookup).arg(name)), sTrue);
+ QCOMPARE(evalJS(QString::fromLatin1("descriptor.enumerable")), sFalse);
+ QCOMPARE(evalJS(QString::fromLatin1("descriptor.configurable")), sFalse);
+ }
+
+ QVERIFY(evalJSV("var props=[]; for (var p in myObject.deleteLater) {props.push(p);}; props.sort()").toStringList().isEmpty());
+}
+
QTEST_MAIN(tst_QWebFrame)
#include "tst_qwebframe.moc"
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.qrc b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.qrc
new file mode 100644
index 0000000..2a7d0b9
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.qrc
@@ -0,0 +1,10 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+<file alias="image.png">resources/image.png</file>
+<file alias="style.css">resources/style.css</file>
+<file alias="test1.html">resources/test1.html</file>
+<file alias="test2.html">resources/test2.html</file>
+<file alias="testiframe.html">resources/testiframe.html</file>
+<file alias="testiframe2.html">resources/testiframe2.html</file>
+</qresource>
+</RCC>
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/qwebhistory.pro b/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/qwebhistory.pro
index 7445e3b..d056014 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/qwebhistory.pro
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/qwebhistory.pro
@@ -1,12 +1,2 @@
-TEMPLATE = app
-TARGET = tst_qwebhistory
-include(../../../../WebKit.pri)
-SOURCES += tst_qwebhistory.cpp
-RESOURCES += tst_qwebhistory.qrc
-QT += testlib network
-QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-
-symbian {
- TARGET.UID3 = 0xA000E53B
- TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
-}
+isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
+include(../tests.pri) \ No newline at end of file
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page1.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page1.html
index 82fa4af..82fa4af 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page1.html
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page1.html
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page2.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page2.html
index 5307bdc..5307bdc 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page2.html
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page2.html
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page3.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page3.html
index 4e5547c..4e5547c 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page3.html
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page3.html
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page4.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page4.html
index 3c57aed..3c57aed 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page4.html
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page4.html
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page5.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page5.html
index 8593552..8593552 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page5.html
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page5.html
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page6.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page6.html
index c5bbc6f..c5bbc6f 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page6.html
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page6.html
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp
index ec2d497..e967dcc 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp
@@ -37,7 +37,7 @@ public:
protected :
void loadPage(int nr)
{
- frame->load(QUrl("qrc:/data/page" + QString::number(nr) + ".html"));
+ frame->load(QUrl("qrc:/resources/page" + QString::number(nr) + ".html"));
waitForLoadFinished.exec();
}
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/tst_qwebhistory.qrc b/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/tst_qwebhistory.qrc
index 7c5ff0e..6e2f50a 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/tst_qwebhistory.qrc
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/tst_qwebhistory.qrc
@@ -1,11 +1,11 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
- <file>data/page1.html</file>
- <file>data/page2.html</file>
- <file>data/page3.html</file>
- <file>data/page4.html</file>
- <file>data/page5.html</file>
- <file>data/page6.html</file>
+ <file>resources/page1.html</file>
+ <file>resources/page2.html</file>
+ <file>resources/page3.html</file>
+ <file>resources/page4.html</file>
+ <file>resources/page5.html</file>
+ <file>resources/page6.html</file>
</qresource>
</RCC>
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro b/src/3rdparty/webkit/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro
index 764f806..d056014 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebhistoryinterface/qwebhistoryinterface.pro
@@ -1,11 +1,2 @@
-TEMPLATE = app
-TARGET = tst_qwebhistoryinterface
-include(../../../../WebKit.pri)
-SOURCES += tst_qwebhistoryinterface.cpp
-QT += testlib network
-QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-
-symbian {
- TARGET.UID3 = 0xA000E53C
- TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
-}
+isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
+include(../tests.pri) \ No newline at end of file
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebinspector/qwebinspector.pro b/src/3rdparty/webkit/WebKit/qt/tests/qwebinspector/qwebinspector.pro
new file mode 100644
index 0000000..ac51929
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebinspector/qwebinspector.pro
@@ -0,0 +1,2 @@
+isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
+include(../tests.pri)
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebinspector/tst_qwebinspector.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebinspector/tst_qwebinspector.cpp
new file mode 100644
index 0000000..12cd630
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebinspector/tst_qwebinspector.cpp
@@ -0,0 +1,68 @@
+/*
+ Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <QtTest/QtTest>
+
+#include <qdir.h>
+#include <qwebinspector.h>
+#include <qwebpage.h>
+#include <qwebsettings.h>
+
+class tst_QWebInspector : public QObject {
+ Q_OBJECT
+
+private slots:
+ void attachAndDestroy();
+};
+
+void tst_QWebInspector::attachAndDestroy()
+{
+ { // External inspector + manual destruction of page first
+ QWebPage* page = new QWebPage();
+ page->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
+ QWebInspector* inspector = new QWebInspector();
+ inspector->setPage(page);
+ page->updatePositionDependentActions(QPoint(0, 0));
+ page->triggerAction(QWebPage::InspectElement);
+
+ delete page;
+ delete inspector;
+ }
+ { // External inspector + manual destruction of inspector first
+ QWebPage* page = new QWebPage();
+ page->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
+ QWebInspector* inspector = new QWebInspector();
+ inspector->setPage(page);
+ page->updatePositionDependentActions(QPoint(0, 0));
+ page->triggerAction(QWebPage::InspectElement);
+
+ delete inspector;
+ delete page;
+ }
+ { // Internal inspector
+ QWebPage page;
+ page.settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
+ page.updatePositionDependentActions(QPoint(0, 0));
+ page.triggerAction(QWebPage::InspectElement);
+ }
+}
+
+QTEST_MAIN(tst_QWebInspector)
+
+#include "tst_qwebinspector.moc"
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/qwebpage.pro b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/qwebpage.pro
index 7853b28..d056014 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/qwebpage.pro
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/qwebpage.pro
@@ -1,13 +1,2 @@
-TEMPLATE = app
-TARGET = tst_qwebpage
-include(../../../../WebKit.pri)
-SOURCES += tst_qwebpage.cpp
-RESOURCES += tst_qwebpage.qrc
-QT += testlib network
-QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-!symbian:DEFINES += SRCDIR=\\\"$$PWD/\\\"
-
-symbian {
- TARGET.UID3 = 0xA000E53E
- TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
-}
+isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
+include(../tests.pri) \ No newline at end of file
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/data/frame_a.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/resources/frame_a.html
index 9ff68f1..9ff68f1 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/data/frame_a.html
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/resources/frame_a.html
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/resources/iframe.html
index f17027c..f17027c 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe.html
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/resources/iframe.html
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe2.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/resources/iframe2.html
index 5017435..5017435 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe2.html
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/resources/iframe2.html
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe3.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/resources/iframe3.html
index ed6ac5b..ed6ac5b 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe3.html
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/resources/iframe3.html
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/data/index.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/resources/index.html
index c53ad09..c53ad09 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/data/index.html
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/resources/index.html
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 55ee42a..4425bac 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -19,72 +19,24 @@
Boston, MA 02110-1301, USA.
*/
-
+#include "../util.h"
+#include <QDir>
+#include <QGraphicsWidget>
+#include <QLineEdit>
+#include <QMenu>
+#include <QPushButton>
#include <QtTest/QtTest>
-
#include <qgraphicsscene.h>
#include <qgraphicsview.h>
#include <qgraphicswebview.h>
+#include <qnetworkrequest.h>
+#include <qwebdatabase.h>
#include <qwebelement.h>
-#include <qwebpage.h>
-#include <qwidget.h>
-#include <QGraphicsWidget>
-#include <qwebview.h>
#include <qwebframe.h>
#include <qwebhistory.h>
-#include <qnetworkrequest.h>
-#include <QDebug>
-#include <QLineEdit>
-#include <QMenu>
+#include <qwebpage.h>
#include <qwebsecurityorigin.h>
-#include <qwebdatabase.h>
-#include <QPushButton>
-#include <QDir>
-
-#if defined(Q_OS_SYMBIAN)
-# define SRCDIR ""
-#endif
-
-// Will try to wait for the condition while allowing event processing
-#define QTRY_COMPARE(__expr, __expected) \
- do { \
- const int __step = 50; \
- const int __timeout = 5000; \
- if ((__expr) != (__expected)) { \
- QTest::qWait(0); \
- } \
- for (int __i = 0; __i < __timeout && ((__expr) != (__expected)); __i+=__step) { \
- QTest::qWait(__step); \
- } \
- QCOMPARE(__expr, __expected); \
- } while(0)
-
-//TESTED_CLASS=
-//TESTED_FILES=
-
-// Task 160192
-/**
- * Starts an event loop that runs until the given signal is received.
- Optionally the event loop
- * can return earlier on a timeout.
- *
- * \return \p true if the requested signal was received
- * \p false on timeout
- */
-static bool waitForSignal(QObject* obj, const char* signal, int timeout = 10000)
-{
- QEventLoop loop;
- QObject::connect(obj, signal, &loop, SLOT(quit()));
- QTimer timer;
- QSignalSpy timeoutSpy(&timer, SIGNAL(timeout()));
- if (timeout > 0) {
- QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
- timer.setSingleShot(true);
- timer.start(timeout);
- }
- loop.exec();
- return timeoutSpy.isEmpty();
-}
+#include <qwebview.h>
class EventSpy : public QObject, public QList<QEvent::Type>
{
@@ -148,6 +100,8 @@ private slots:
void inputMethods();
void defaultTextEncoding();
void errorPageExtension();
+ void errorPageExtensionInIFrames();
+ void errorPageExtensionInFrameset();
void crashTests_LazyInitializationOfMainFrame();
@@ -156,6 +110,7 @@ private slots:
void originatingObjectInNetworkRequests();
void testJSPrompt();
+ void showModalDialog();
private:
QWebView* m_view;
@@ -270,10 +225,8 @@ void tst_QWebPage::loadFinished()
"<frame src=\"data:text/html,bar\"></frameset>"), QUrl());
QTRY_COMPARE(spyLoadFinished.count(), 1);
- QTest::qWait(3000);
-
- QVERIFY(spyLoadStarted.count() > 1);
- QVERIFY(spyLoadFinished.count() > 1);
+ QTRY_VERIFY(spyLoadStarted.count() > 1);
+ QTRY_VERIFY(spyLoadFinished.count() > 1);
spyLoadFinished.clear();
@@ -520,7 +473,6 @@ void tst_QWebPage::database()
// Remove removed test :-)
QWebDatabase::removeAllDatabases();
QVERIFY(!origin.databases().size());
- QTest::qWait(1000);
}
class PluginPage : public QWebPage
@@ -1275,7 +1227,7 @@ void tst_QWebPage::backActionUpdate()
QAction *action = page->action(QWebPage::Back);
QVERIFY(!action->isEnabled());
QSignalSpy loadSpy(page, SIGNAL(loadFinished(bool)));
- QUrl url = QUrl("qrc:///frametest/index.html");
+ QUrl url = QUrl("qrc:///resources/index.html");
page->mainFrame()->load(url);
QTRY_COMPARE(loadSpy.count(), 1);
QVERIFY(!action->isEnabled());
@@ -1306,7 +1258,7 @@ void tst_QWebPage::frameAt()
QWebView webView;
QWebPage* webPage = webView.page();
QSignalSpy loadSpy(webPage, SIGNAL(loadFinished(bool)));
- QUrl url = QUrl("qrc:///frametest/iframe.html");
+ QUrl url = QUrl("qrc:///resources/iframe.html");
webPage->mainFrame()->load(url);
QTRY_COMPARE(loadSpy.count(), 1);
frameAtHelper(webPage, webPage->mainFrame(), webPage->mainFrame()->pos());
@@ -1555,10 +1507,17 @@ void tst_QWebPage::protectBindingsRuntimeObjectsFromCollector()
void tst_QWebPage::localURLSchemes()
{
int i = QWebSecurityOrigin::localSchemes().size();
+
QWebSecurityOrigin::removeLocalScheme("file");
QTRY_COMPARE(QWebSecurityOrigin::localSchemes().size(), i);
QWebSecurityOrigin::addLocalScheme("file");
QTRY_COMPARE(QWebSecurityOrigin::localSchemes().size(), i);
+
+ QWebSecurityOrigin::removeLocalScheme("qrc");
+ QTRY_COMPARE(QWebSecurityOrigin::localSchemes().size(), i - 1);
+ QWebSecurityOrigin::addLocalScheme("qrc");
+ QTRY_COMPARE(QWebSecurityOrigin::localSchemes().size(), i);
+
QString myscheme = "myscheme";
QWebSecurityOrigin::addLocalScheme(myscheme);
QTRY_COMPARE(QWebSecurityOrigin::localSchemes().size(), i + 1);
@@ -1613,16 +1572,14 @@ void tst_QWebPage::testEnablePersistentStorage()
QWebSettings::enablePersistentStorage();
- // Give it some time to initialize - icon database needs it
- QTest::qWait(1000);
- QCOMPARE(webPage.settings()->testAttribute(QWebSettings::LocalStorageEnabled), true);
- QCOMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineStorageDatabaseEnabled), true);
- QCOMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineWebApplicationCacheEnabled), true);
+ QTRY_COMPARE(webPage.settings()->testAttribute(QWebSettings::LocalStorageEnabled), true);
+ QTRY_COMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineStorageDatabaseEnabled), true);
+ QTRY_COMPARE(webPage.settings()->testAttribute(QWebSettings::OfflineWebApplicationCacheEnabled), true);
- QVERIFY(!webPage.settings()->offlineStoragePath().isEmpty());
- QVERIFY(!webPage.settings()->offlineWebApplicationCachePath().isEmpty());
- QVERIFY(!webPage.settings()->iconDatabasePath().isEmpty());
+ QTRY_VERIFY(!webPage.settings()->offlineStoragePath().isEmpty());
+ QTRY_VERIFY(!webPage.settings()->offlineWebApplicationCachePath().isEmpty());
+ QTRY_VERIFY(!webPage.settings()->iconDatabasePath().isEmpty());
}
void tst_QWebPage::defaultTextEncoding()
@@ -1664,15 +1621,10 @@ public:
virtual bool extension(Extension, const ExtensionOption* option, ExtensionReturn* output)
{
- const ErrorPageExtensionOption* info = static_cast<const ErrorPageExtensionOption*>(option);
ErrorPageExtensionReturn* errorPage = static_cast<ErrorPageExtensionReturn*>(output);
- if (info->frame == mainFrame()) {
- errorPage->content = "data:text/html,error";
- return true;
- }
-
- return false;
+ errorPage->content = "data:text/html,error";
+ return true;
}
};
@@ -1683,11 +1635,10 @@ void tst_QWebPage::errorPageExtension()
QSignalSpy spyLoadFinished(m_view, SIGNAL(loadFinished(bool)));
- page->mainFrame()->load(QUrl("qrc:///frametest/index.html"));
+ m_view->setUrl(QUrl("data:text/html,foo"));
QTRY_COMPARE(spyLoadFinished.count(), 1);
page->mainFrame()->setUrl(QUrl("http://non.existent/url"));
- QTest::qWait(2000);
QTRY_COMPARE(spyLoadFinished.count(), 2);
QCOMPARE(page->mainFrame()->toPlainText(), QString("data:text/html,error"));
QCOMPARE(page->history()->count(), 2);
@@ -1696,20 +1647,48 @@ void tst_QWebPage::errorPageExtension()
QCOMPARE(page->history()->canGoForward(), false);
page->triggerAction(QWebPage::Back);
- QTest::qWait(2000);
- QCOMPARE(page->history()->canGoBack(), false);
- QCOMPARE(page->history()->canGoForward(), true);
+ QTRY_COMPARE(page->history()->canGoBack(), false);
+ QTRY_COMPARE(page->history()->canGoForward(), true);
page->triggerAction(QWebPage::Forward);
- QTest::qWait(2000);
- QCOMPARE(page->history()->canGoBack(), true);
- QCOMPARE(page->history()->canGoForward(), false);
+ QTRY_COMPARE(page->history()->canGoBack(), true);
+ QTRY_COMPARE(page->history()->canGoForward(), false);
page->triggerAction(QWebPage::Back);
- QTest::qWait(2000);
- QCOMPARE(page->history()->canGoBack(), false);
- QCOMPARE(page->history()->canGoForward(), true);
- QCOMPARE(page->history()->currentItem().url(), QUrl("qrc:///frametest/index.html"));
+ QTRY_COMPARE(page->history()->canGoBack(), false);
+ QTRY_COMPARE(page->history()->canGoForward(), true);
+ QTRY_COMPARE(page->history()->currentItem().url(), QUrl("data:text/html,foo"));
+
+ m_view->setPage(0);
+}
+
+void tst_QWebPage::errorPageExtensionInIFrames()
+{
+ ErrorPage* page = new ErrorPage;
+ m_view->setPage(page);
+
+ m_view->setHtml(QString("data:text/html,"
+ "<h1>h1</h1>"
+ "<iframe src='data:text/html,<p/>p'></iframe>"
+ "<iframe src='non-existent.html'></iframe>"));
+ QSignalSpy spyLoadFinished(m_view, SIGNAL(loadFinished(bool)));
+ QTRY_COMPARE(spyLoadFinished.count(), 1);
+
+ QCOMPARE(page->mainFrame()->childFrames()[1]->toPlainText(), QString("data:text/html,error"));
+
+ m_view->setPage(0);
+}
+
+void tst_QWebPage::errorPageExtensionInFrameset()
+{
+ ErrorPage* page = new ErrorPage;
+ m_view->setPage(page);
+
+ m_view->load(QUrl("qrc:///resources/index.html"));
+
+ QSignalSpy spyLoadFinished(m_view, SIGNAL(loadFinished(bool)));
+ QTRY_COMPARE(spyLoadFinished.count(), 1);
+ QCOMPARE(page->mainFrame()->childFrames()[1]->toPlainText(), QString("data:text/html,error"));
m_view->setPage(0);
}
@@ -1754,17 +1733,17 @@ void tst_QWebPage::screenshot_data()
void tst_QWebPage::screenshot()
{
- QDir::setCurrent(SRCDIR);
+ if (!QDir(TESTS_SOURCE_DIR).exists())
+ QSKIP(QString("This test requires access to resources found in '%1'").arg(TESTS_SOURCE_DIR).toLatin1().constData(), SkipAll);
+
+ QDir::setCurrent(TESTS_SOURCE_DIR);
QFETCH(QString, html);
QWebPage* page = new QWebPage;
page->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
QWebFrame* mainFrame = page->mainFrame();
- mainFrame->setHtml(html, QUrl::fromLocalFile(QDir::currentPath()));
- if (html.contains("</embed>")) {
- // some reasonable time for the PluginStream to feed test.swf to flash and start painting
- QTest::qWait(2000);
- }
+ mainFrame->setHtml(html, QUrl::fromLocalFile(TESTS_SOURCE_DIR));
+ ::waitForSignal(mainFrame, SIGNAL(loadFinished(bool)), 2000);
// take screenshot without a view
takeScreenshot(page);
@@ -1870,5 +1849,26 @@ void tst_QWebPage::testJSPrompt()
QVERIFY(res);
}
+class TestModalPage : public QWebPage
+{
+ Q_OBJECT
+public:
+ TestModalPage(QObject* parent = 0) : QWebPage(parent) {
+ }
+ virtual QWebPage* createWindow(WebWindowType) {
+ QWebPage* page = new TestModalPage();
+ connect(page, SIGNAL(windowCloseRequested()), page, SLOT(deleteLater()));
+ return page;
+ }
+};
+
+void tst_QWebPage::showModalDialog()
+{
+ TestModalPage page;
+ page.mainFrame()->setHtml(QString("<html></html>"));
+ QString res = page.mainFrame()->evaluateJavaScript("window.showModalDialog('javascript:window.returnValue=dialogArguments; window.close();', 'This is a test');").toString();
+ QCOMPARE(res, QString("This is a test"));
+}
+
QTEST_MAIN(tst_QWebPage)
#include "tst_qwebpage.moc"
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.qrc b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.qrc
index 3085ce2..0627cb4 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.qrc
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.qrc
@@ -1,10 +1,10 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
- <file>frametest/index.html</file>
- <file>frametest/frame_a.html</file>
- <file>frametest/iframe.html</file>
- <file>frametest/iframe2.html</file>
- <file>frametest/iframe3.html</file>
+ <file>resources/index.html</file>
+ <file>resources/frame_a.html</file>
+ <file>resources/iframe.html</file>
+ <file>resources/iframe2.html</file>
+ <file>resources/iframe3.html</file>
</qresource>
</RCC>
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro b/src/3rdparty/webkit/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro
index 569146a..ac51929 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro
@@ -1,11 +1,2 @@
-TEMPLATE = app
-TARGET = tst_qwebplugindatabase
-include(../../../../WebKit.pri)
-SOURCES += tst_qwebplugindatabase.cpp
-QT += testlib network
-QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-
-symbian {
- TARGET.UID3 = 0xA000E540
- TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
-}
+isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
+include(../tests.pri)
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/qwebview.pro b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/qwebview.pro
index 735537b..4ca2bf6 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/qwebview.pro
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/qwebview.pro
@@ -1,13 +1 @@
-TEMPLATE = app
-TARGET = tst_qwebview
-include(../../../../WebKit.pri)
-SOURCES += tst_qwebview.cpp
-QT += testlib network
-QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
-RESOURCES += tst_qwebview.qrc
-DEFINES += SRCDIR=\\\"$$PWD/\\\"
-
-symbian {
- TARGET.UID3 = 0xA000E53F
- TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
-}
+include(../tests.pri) \ No newline at end of file
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/frame_a.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/resources/frame_a.html
index 9ff68f1..9ff68f1 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/frame_a.html
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/resources/frame_a.html
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/index.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/resources/index.html
index c53ad09..c53ad09 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/index.html
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/resources/index.html
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp
index 27daf38..ebcf4bb 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp
@@ -30,6 +30,8 @@
#include <qwebkitversion.h>
#include <qwebframe.h>
+#include <QDebug>
+
class tst_QWebView : public QObject
{
Q_OBJECT
@@ -121,7 +123,10 @@ void tst_QWebView::reusePage_data()
void tst_QWebView::reusePage()
{
- QDir::setCurrent(SRCDIR);
+ if (!QDir(TESTS_SOURCE_DIR).exists())
+ QSKIP(QString("This test requires access to resources found in '%1'").arg(TESTS_SOURCE_DIR).toLatin1().constData(), SkipAll);
+
+ QDir::setCurrent(TESTS_SOURCE_DIR);
QFETCH(QString, html);
QWebView* view1 = new QWebView;
@@ -129,21 +134,29 @@ void tst_QWebView::reusePage()
view1->setPage(page);
page->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
QWebFrame* mainFrame = page->mainFrame();
- mainFrame->setHtml(html, QUrl::fromLocalFile(QDir::currentPath()));
+ mainFrame->setHtml(html, QUrl::fromLocalFile(TESTS_SOURCE_DIR));
if (html.contains("</embed>")) {
// some reasonable time for the PluginStream to feed test.swf to flash and start painting
- QTest::qWait(2000);
+ waitForSignal(view1, SIGNAL(loadFinished(bool)), 2000);
}
view1->show();
- QTest::qWait(2000);
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ QTest::qWaitForWindowShown(view1);
+#else
+ QTest::qWait(2000);
+#endif
delete view1;
QVERIFY(page != 0); // deleting view must not have deleted the page, since it's not a child of view
QWebView *view2 = new QWebView;
view2->setPage(page);
view2->show(); // in Windowless mode, you should still be able to see the plugin here
- QTest::qWait(2000);
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ QTest::qWaitForWindowShown(view2);
+#else
+ QTest::qWait(2000);
+#endif
delete view2;
delete page; // must not crash
@@ -185,7 +198,7 @@ void tst_QWebView::crashTests()
// Test page should have frames.
QWebView view;
WebViewCrashTest tester(&view);
- QUrl url("qrc:///data/index.html");
+ QUrl url("qrc:///resources/index.html");
view.load(url);
QTRY_VERIFY(tester.m_executed); // If fail it means that the test wasn't executed.
}
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.qrc b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.qrc
index ede34a9..5abc64c 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.qrc
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.qrc
@@ -1,7 +1,7 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
- <file>data/index.html</file>
- <file>data/frame_a.html</file>
+ <file>resources/index.html</file>
+ <file>resources/frame_a.html</file>
</qresource>
</RCC>
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/image2.png b/src/3rdparty/webkit/WebKit/qt/tests/resources/image2.png
index 8d70364..8d70364 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/image2.png
+++ b/src/3rdparty/webkit/WebKit/qt/tests/resources/image2.png
Binary files differ
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/tests.pri b/src/3rdparty/webkit/WebKit/qt/tests/tests.pri
new file mode 100644
index 0000000..0bdf6f6
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/tests/tests.pri
@@ -0,0 +1,24 @@
+TEMPLATE = app
+CONFIG -= app_bundle
+
+VPATH += $$_PRO_FILE_PWD_
+!CONFIG(QTDIR_build):TARGET = tst_$$TARGET
+SOURCES += $${TARGET}.cpp
+INCLUDEPATH += \
+ $$PWD \
+ $$PWD/../Api
+
+exists($$_PRO_FILE_PWD_/$${TARGET}.qrc):RESOURCES += $$_PRO_FILE_PWD_/$${TARGET}.qrc
+
+include(../../../WebKit.pri)
+QT += testlib network
+
+QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
+
+symbian {
+ TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices
+}
+
+# This define is used by some tests to look up resources in the source tree
+!symbian: DEFINES += TESTS_SOURCE_DIR=\\\"$$PWD/\\\"
+
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/tests.pro b/src/3rdparty/webkit/WebKit/qt/tests/tests.pro
index 939cd22..22fece5 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/tests.pro
+++ b/src/3rdparty/webkit/WebKit/qt/tests/tests.pro
@@ -1,4 +1,4 @@
TEMPLATE = subdirs
-SUBDIRS = qwebframe qwebpage qwebelement qgraphicswebview qwebhistoryinterface qwebview qwebhistory
-greaterThan(QT_MINOR_VERSION, 4): SUBDIRS += benchmarks/painting/tst_painting.pro benchmarks/loading/tst_loading.pro
+SUBDIRS = qwebframe qwebpage qwebelement qgraphicswebview qwebhistoryinterface qwebview qwebhistory qwebinspector hybridPixmap
+SUBDIRS += benchmarks/painting benchmarks/loading
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/util.h b/src/3rdparty/webkit/WebKit/qt/tests/util.h
index 7f7e613..c61bc6b 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/util.h
+++ b/src/3rdparty/webkit/WebKit/qt/tests/util.h
@@ -18,6 +18,37 @@
*/
// Functions and macros that really need to be in QTestLib
+#include <QEventLoop>
+#include <QSignalSpy>
+#include <QTimer>
+
+#if !defined(TESTS_SOURCE_DIR)
+#define TESTS_SOURCE_DIR ""
+#endif
+
+/**
+ * Starts an event loop that runs until the given signal is received.
+ * Optionally the event loop
+ * can return earlier on a timeout.
+ *
+ * \return \p true if the requested signal was received
+ * \p false on timeout
+ */
+static bool waitForSignal(QObject* obj, const char* signal, int timeout = 10000)
+{
+ QEventLoop loop;
+ QObject::connect(obj, signal, &loop, SLOT(quit()));
+ QTimer timer;
+ QSignalSpy timeoutSpy(&timer, SIGNAL(timeout()));
+ if (timeout > 0) {
+ QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
+ timer.setSingleShot(true);
+ timer.start(timeout);
+ }
+ loop.exec();
+ return timeoutSpy.isEmpty();
+}
+
// Will try to wait for the condition while allowing event processing
#define QTRY_VERIFY(__expr) \
do { \
@@ -45,4 +76,3 @@
} \
QCOMPARE(__expr, __expected); \
} while(0)
-