summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/qt
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/qt')
-rw-r--r--Source/WebKit/qt/Api/qwebframe.cpp103
-rw-r--r--Source/WebKit/qt/Api/qwebframe.h4
-rw-r--r--Source/WebKit/qt/Api/qwebframe_p.h9
-rw-r--r--Source/WebKit/qt/Api/qwebkitplatformplugin.h4
-rw-r--r--Source/WebKit/qt/Api/qwebpage.cpp5
-rw-r--r--Source/WebKit/qt/ChangeLog668
-rw-r--r--Source/WebKit/qt/QtWebKit.pro22
-rw-r--r--Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp37
-rw-r--r--Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h218
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DragClientQt.h13
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp29
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h3
-rw-r--r--Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/EditorClientQt.h2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp225
-rw-r--r--Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h4
-rw-r--r--Source/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.cpp12
-rw-r--r--Source/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.h6
-rw-r--r--Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp127
-rw-r--r--Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.h39
-rw-r--r--Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp10
-rw-r--r--Source/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h4
-rw-r--r--Source/WebKit/qt/examples/platformplugin/WebPlugin.cpp6
-rw-r--r--Source/WebKit/qt/examples/platformplugin/WebPlugin.h4
-rw-r--r--Source/WebKit/qt/examples/platformplugin/platformplugin.pro4
-rw-r--r--Source/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h4
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/MIMESniffing.pro19
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/TestData.h984
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/resources.qrc23
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/resources/application_atom+xml17
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/resources/application_oggbin0 -> 382185 bytes
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/resources/application_pdfbin0 -> 218882 bytes
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/resources/application_postscript137
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/resources/application_rdf+xml50
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/resources/application_rss+xml45
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/resources/application_x-gzipbin0 -> 268 bytes
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/resources/application_x-rar-compressedbin0 -> 1478 bytes
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/resources/application_zipbin0 -> 411 bytes
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/resources/audio_x-wavebin0 -> 184320 bytes
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/resources/image_bmpbin0 -> 46182 bytes
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/resources/image_gifbin0 -> 245 bytes
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/resources/image_jpegbin0 -> 10874 bytes
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/resources/image_pngbin0 -> 850 bytes
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/resources/image_vnd.microsoft.iconbin0 -> 9662 bytes
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/resources/image_webpbin0 -> 10474 bytes
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/resources/text_html3
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/resources/text_xml19
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/resources/video_webmbin0 -> 388027 bytes
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/tst_MIMESniffing.cpp72
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.html17
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.pngbin0 -> 3961 bytes
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.qml5
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/elements.html14
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/elements.qml7
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/forward.html12
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/forward.pngbin0 -> 2377 bytes
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/javaScript.html11
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/javaScript.qml12
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/loadError.qml5
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/newwindows.html16
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/newwindows.qml34
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/propertychanges.qml34
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/resources/sethtml.qml5
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/tst_qdeclarativewebview.cpp415
-rw-r--r--Source/WebKit/qt/tests/qdeclarativewebview/tst_qdeclarativewebview.qrc18
-rw-r--r--Source/WebKit/qt/tests/qgraphicswebview/resources/56929.html8
-rw-r--r--Source/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp37
-rw-r--r--Source/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.qrc1
-rw-r--r--Source/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp2
-rw-r--r--Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp173
-rw-r--r--Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp15
-rw-r--r--Source/WebKit/qt/tests/qwebview/tst_qwebview.cpp29
-rw-r--r--Source/WebKit/qt/tests/tests.pri4
-rw-r--r--Source/WebKit/qt/tests/tests.pro2
75 files changed, 3455 insertions, 356 deletions
diff --git a/Source/WebKit/qt/Api/qwebframe.cpp b/Source/WebKit/qt/Api/qwebframe.cpp
index e5124bd..026a7df 100644
--- a/Source/WebKit/qt/Api/qwebframe.cpp
+++ b/Source/WebKit/qt/Api/qwebframe.cpp
@@ -313,7 +313,7 @@ void QWebFramePrivate::renderFromTiledBackingStore(GraphicsContext* context, con
#if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)
renderCompositedLayers(context, IntRect(clip.boundingRect()));
- renderRelativeCoords(context, (QWebFrame::RenderLayer)(QWebFrame::ScrollBarLayer | QWebFrame::PanIconLayer), clip);
+ renderFrameExtras(context, QFlags<QWebFrame::RenderLayer>(QWebFrame::ScrollBarLayer) | QWebFrame::PanIconLayer, clip);
#endif
}
#endif
@@ -342,7 +342,7 @@ void QWebFramePrivate::renderCompositedLayers(GraphicsContext* context, const In
}
#endif
-void QWebFramePrivate::renderRelativeCoords(GraphicsContext* context, QWebFrame::RenderLayer layer, const QRegion& clip)
+void QWebFramePrivate::renderRelativeCoords(GraphicsContext* context, QFlags<QWebFrame::RenderLayer> layers, const QRegion& clip)
{
if (!frame->view() || !frame->contentRenderer())
return;
@@ -356,7 +356,7 @@ void QWebFramePrivate::renderRelativeCoords(GraphicsContext* context, QWebFrame:
WebCore::FrameView* view = frame->view();
view->updateLayoutAndStyleIfNeededRecursive();
- if (layer & QWebFrame::ContentsLayer) {
+ if (layers & QWebFrame::ContentsLayer) {
for (int i = 0; i < vector.size(); ++i) {
const QRect& clipRect = vector.at(i);
@@ -385,47 +385,67 @@ void QWebFramePrivate::renderRelativeCoords(GraphicsContext* context, QWebFrame:
renderCompositedLayers(context, IntRect(clip.boundingRect()));
#endif
}
- if (layer & (QWebFrame::PanIconLayer | QWebFrame::ScrollBarLayer)) {
- for (int i = 0; i < vector.size(); ++i) {
- const QRect& clipRect = vector.at(i);
+ renderFrameExtras(context, layers, clip);
+#if ENABLE(INSPECTOR)
+ if (frame->page()->inspectorController()->highlightedNode()) {
+ context->save();
+ frame->page()->inspectorController()->drawNodeHighlight(*context);
+ context->restore();
+ }
+#endif
+}
- QRect intersectedRect = clipRect.intersected(view->frameRect());
+void QWebFramePrivate::renderFrameExtras(GraphicsContext* context, QFlags<QWebFrame::RenderLayer> layers, const QRegion& clip)
+{
+ if (!(layers & (QWebFrame::PanIconLayer | QWebFrame::ScrollBarLayer)))
+ return;
+ QPainter* painter = context->platformContext();
+ WebCore::FrameView* view = frame->view();
+ QVector<QRect> vector = clip.rects();
+ for (int i = 0; i < vector.size(); ++i) {
+ const QRect& clipRect = vector.at(i);
- painter->save();
- painter->setClipRect(clipRect, Qt::IntersectClip);
+ QRect intersectedRect = clipRect.intersected(view->frameRect());
- int x = view->x();
- int y = view->y();
+ painter->save();
+ painter->setClipRect(clipRect, Qt::IntersectClip);
- if (layer & QWebFrame::ScrollBarLayer
- && !view->scrollbarsSuppressed()
- && (view->horizontalScrollbar() || view->verticalScrollbar())) {
- QRect rect = intersectedRect;
- context->translate(x, y);
- rect.translate(-x, -y);
+ int x = view->x();
+ int y = view->y();
- view->paintScrollbars(context, rect);
+ if (layers & QWebFrame::ScrollBarLayer
+ && !view->scrollbarsSuppressed()
+ && (view->horizontalScrollbar() || view->verticalScrollbar())) {
- context->translate(-x, -y);
- }
+ QRect rect = intersectedRect;
+ context->translate(x, y);
+ rect.translate(-x, -y);
+ view->paintScrollbars(context, rect);
+ context->translate(-x, -y);
+ }
#if ENABLE(PAN_SCROLLING)
- if (layer & QWebFrame::PanIconLayer)
- view->paintPanScrollIcon(context);
+ if (layers & QWebFrame::PanIconLayer)
+ view->paintPanScrollIcon(context);
#endif
- painter->restore();
- }
+ painter->restore();
}
}
-void QWebFrame::orientationChanged()
+void QWebFramePrivate::emitUrlChanged()
+{
+ url = frame->document()->url();
+ emit q->urlChanged(url);
+}
+
+void QWebFramePrivate::_q_orientationChanged()
{
#if ENABLE(ORIENTATION_EVENTS) && ENABLE(DEVICE_ORIENTATION)
int orientation;
- WebCore::Frame* frame = QWebFramePrivate::core(this);
+ WebCore::Frame* frame = core(q);
- switch (d->m_orientation.reading()->orientation()) {
+ switch (m_orientation.reading()->orientation()) {
case QtMobility::QOrientationReading::TopUp:
orientation = 0;
break;
@@ -522,7 +542,7 @@ QWebFrame::QWebFrame(QWebPage *parent, QWebFrameData *frameData)
d->frame->loader()->load(request, frameData->name, false);
}
#if ENABLE(ORIENTATION_EVENTS) && ENABLE(DEVICE_ORIENTATION)
- connect(&d->m_orientation, SIGNAL(readingChanged()), this, SLOT(orientationChanged()));
+ connect(&d->m_orientation, SIGNAL(readingChanged()), this, SLOT(_q_orientationChanged()));
d->m_orientation.start();
#endif
}
@@ -534,7 +554,7 @@ QWebFrame::QWebFrame(QWebFrame *parent, QWebFrameData *frameData)
d->page = parent->d->page;
d->init(this, frameData);
#if ENABLE(ORIENTATION_EVENTS) && ENABLE(DEVICE_ORIENTATION)
- connect(&d->m_orientation, SIGNAL(readingChanged()), this, SLOT(orientationChanged()));
+ connect(&d->m_orientation, SIGNAL(readingChanged()), this, SLOT(_q_orientationChanged()));
d->m_orientation.start();
#endif
}
@@ -678,7 +698,7 @@ QString QWebFrame::renderTreeDump() const
QString QWebFrame::title() const
{
if (d->frame->document())
- return d->frame->loader()->documentLoader()->title();
+ return d->frame->loader()->documentLoader()->title().string();
return QString();
}
@@ -729,6 +749,17 @@ QMultiMap<QString, QString> QWebFrame::metaData() const
return map;
}
+static inline void clearCoreFrame(WebCore::Frame* frame)
+{
+ frame->loader()->activeDocumentLoader()->writer()->begin();
+ frame->loader()->activeDocumentLoader()->writer()->end();
+}
+
+static inline bool isCoreFrameClear(WebCore::Frame* frame)
+{
+ return frame->document()->url().isEmpty();
+}
+
static inline QUrl ensureAbsoluteUrl(const QUrl &url)
{
if (!url.isValid() || !url.isRelative())
@@ -758,15 +789,15 @@ static inline QUrl ensureAbsoluteUrl(const QUrl &url)
void QWebFrame::setUrl(const QUrl &url)
{
+ clearCoreFrame(d->frame);
const QUrl absolute = ensureAbsoluteUrl(url);
- d->frame->loader()->activeDocumentLoader()->writer()->begin(absolute);
- d->frame->loader()->activeDocumentLoader()->writer()->end();
+ d->url = absolute;
load(absolute);
}
QUrl QWebFrame::url() const
{
- return d->frame->document()->url();
+ return d->url;
}
/*!
@@ -791,7 +822,9 @@ QUrl QWebFrame::requestedUrl() const
QUrl QWebFrame::baseUrl() const
{
- return d->frame->loader()->baseURL();
+ if (isCoreFrameClear(d->frame))
+ return QUrl(d->url).resolved(QUrl());
+ return d->frame->document()->baseURL();
}
/*!
@@ -1913,3 +1946,5 @@ QWebFrame *QWebHitTestResult::frame() const
return 0;
return d->frame;
}
+
+#include "moc_qwebframe.cpp"
diff --git a/Source/WebKit/qt/Api/qwebframe.h b/Source/WebKit/qt/Api/qwebframe.h
index 8410962..3c5a28e 100644
--- a/Source/WebKit/qt/Api/qwebframe.h
+++ b/Source/WebKit/qt/Api/qwebframe.h
@@ -205,9 +205,6 @@ public Q_SLOTS:
void print(QPrinter *printer) const;
#endif
-private Q_SLOTS:
- void orientationChanged();
-
Q_SIGNALS:
void javaScriptWindowObjectCleared();
@@ -237,6 +234,7 @@ private:
friend class WebCore::ChromeClientQt;
friend class WebCore::PlatformLayerProxyQt;
QWebFramePrivate *d;
+ Q_PRIVATE_SLOT(d, void _q_orientationChanged())
};
#endif
diff --git a/Source/WebKit/qt/Api/qwebframe_p.h b/Source/WebKit/qt/Api/qwebframe_p.h
index ee8c463..4108972 100644
--- a/Source/WebKit/qt/Api/qwebframe_p.h
+++ b/Source/WebKit/qt/Api/qwebframe_p.h
@@ -96,20 +96,25 @@ public:
static WebCore::Frame* core(const QWebFrame*);
static QWebFrame* kit(const WebCore::Frame*);
- void renderRelativeCoords(WebCore::GraphicsContext*, QWebFrame::RenderLayer, const QRegion& clip);
+ void renderRelativeCoords(WebCore::GraphicsContext*, QFlags<QWebFrame::RenderLayer>, const QRegion& clip);
#if ENABLE(TILED_BACKING_STORE)
void renderFromTiledBackingStore(WebCore::GraphicsContext*, const QRegion& clip);
#endif
#if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)
- void renderCompositedLayers(WebCore::GraphicsContext* context, const WebCore::IntRect& clip);
+ void renderCompositedLayers(WebCore::GraphicsContext*, const WebCore::IntRect& clip);
#endif
+ void renderFrameExtras(WebCore::GraphicsContext*, QFlags<QWebFrame::RenderLayer>, const QRegion& clip);
+ void emitUrlChanged();
+ void _q_orientationChanged();
+
QWebFrame *q;
Qt::ScrollBarPolicy horizontalScrollBarPolicy;
Qt::ScrollBarPolicy verticalScrollBarPolicy;
WebCore::FrameLoaderClientQt *frameLoaderClient;
WebCore::Frame *frame;
QWebPage *page;
+ WebCore::KURL url;
bool allowsScrolling;
int marginWidth;
diff --git a/Source/WebKit/qt/Api/qwebkitplatformplugin.h b/Source/WebKit/qt/Api/qwebkitplatformplugin.h
index f274a0b..9a84973 100644
--- a/Source/WebKit/qt/Api/qwebkitplatformplugin.h
+++ b/Source/WebKit/qt/Api/qwebkitplatformplugin.h
@@ -29,7 +29,7 @@
#include <QColor>
#include <QObject>
#include <QUrl>
-#if defined(ENABLE_QT_MULTIMEDIA) && ENABLE_QT_MULTIMEDIA
+#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
#include <QMediaPlayer>
#endif
@@ -123,7 +123,7 @@ public:
virtual unsigned hitTestPaddingForTouch(const PaddingDirection) const = 0;
};
-#if defined(ENABLE_QT_MULTIMEDIA) && ENABLE_QT_MULTIMEDIA
+#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
class QWebFullScreenVideoHandler : public QObject {
Q_OBJECT
public:
diff --git a/Source/WebKit/qt/Api/qwebpage.cpp b/Source/WebKit/qt/Api/qwebpage.cpp
index ac1d562..2f51e6f 100644
--- a/Source/WebKit/qt/Api/qwebpage.cpp
+++ b/Source/WebKit/qt/Api/qwebpage.cpp
@@ -747,7 +747,7 @@ void QWebPagePrivate::handleClipboard(QEvent* ev, Qt::MouseButton button)
WebCore::Frame* focusFrame = page->focusController()->focusedOrMainFrame();
if (button == Qt::LeftButton) {
if (focusFrame && (focusFrame->editor()->canCopy() || focusFrame->editor()->canDHTMLCopy())) {
- focusFrame->editor()->copy();
+ Pasteboard::generalPasteboard()->writeSelection(focusFrame->editor()->selectedRange().get(), focusFrame->editor()->canSmartCopyOrDelete(), focusFrame);
ev->setAccepted(true);
}
} else if (button == Qt::MidButton) {
@@ -979,8 +979,7 @@ void QWebPagePrivate::dragEnterEvent(T* ev)
QCursor::pos(), dropActionToDragOp(ev->possibleActions()));
Qt::DropAction action = dragOpToDropAction(page->dragController()->dragEntered(&dragData));
ev->setDropAction(action);
- if (action != Qt::IgnoreAction)
- ev->acceptProposedAction();
+ ev->acceptProposedAction();
#endif
}
diff --git a/Source/WebKit/qt/ChangeLog b/Source/WebKit/qt/ChangeLog
index 1a922ad..97d648d 100644
--- a/Source/WebKit/qt/ChangeLog
+++ b/Source/WebKit/qt/ChangeLog
@@ -1,3 +1,671 @@
+2011-04-19 Igor Oliveira <igor.oliveira@openbossa.org>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] X11: Text selection is causing oncopy event to be called
+ https://bugs.webkit.org/show_bug.cgi?id=58656
+
+ Always when text is selected the oncopy event is fired, this behavior does
+ not exist in Firefox or Chrome. Now, when selecting a text, QtWebKit
+ is making multi part-copies (with rich text metadata), the multi-part
+ data can be obtained by data transfer items interface when supported by QtWebKit.
+ Also, copies to the clipboard of a selected image, is not supported by Chrome and
+ Firefox and was removed from QtWebKit.
+
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::handleClipboard):
+
+2011-04-18 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt][WK2] Unreviewed buildfix after r84174.
+
+ * QtWebKit.pro: Missing includepath added.
+
+2011-04-18 Yi Shen <yi.4.shen@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt][Symbian] Fix Api test failure -- tst_QWebFrame::inputFieldFocus
+ https://bugs.webkit.org/show_bug.cgi?id=57546
+
+ Disable the fullscreen VKB when testing inputFieldFocus().
+
+ * tests/qwebframe/tst_qwebframe.cpp:
+
+2011-04-18 Andreas Kling <kling@webkit.org>
+
+ [Qt] DRT: Unreviewed test fix after r84168.
+
+ Dump the original request KURL for blocked access attempts.
+ Turns out converting it to a QUrl lower-cases the hostname.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::dispatchWillSendRequest):
+
+2011-04-18 Yi Shen <yi.4.shen@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] Fix Api tests for QWebPage on Symbian
+ https://bugs.webkit.org/show_bug.cgi?id=56924
+
+ Ignores the style attribute that selectedHtml() returns.
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::cursorMovements):
+ (tst_QWebPage::textSelection):
+ (tst_QWebPage::findText):
+
+2011-04-18 Andreas Kling <kling@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ REGRESSION (r84010): [Qt] DRT: Unbreak redirection of http:/ URLs.
+ https://bugs.webkit.org/show_bug.cgi?id=58779
+
+ KURL::host() doesn't return the host part of [broken] http:/ URLs, so use
+ QUrl instead to match the behavior of other ports.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::dispatchWillSendRequest):
+
+2011-04-18 Dominic Cooney <dominicc@chromium.org>
+
+ Reviewed by Andreas Kling.
+
+ Add layoutTestController.shadowRoot to Qt DRT.
+ https://bugs.webkit.org/show_bug.cgi?id=58759
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::shadowRoot): Added.
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
+2011-04-16 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] Autotest got missed in the handover of the QML WebView element
+ https://bugs.webkit.org/show_bug.cgi?id=41449
+
+ Importing WebView QML element test cases from Qt repository. I did some
+ style modifications and simplifications in the original code but hopefully
+ without changing the behavior.
+
+ Tests that do not pass are marked with QEXPECT_FAIL or QSKIP. The two major
+ issues currently are:
+
+ - pixelCache() test checked the usage of pixel cache by using a subclass of
+ QDeclarativeWebView. We can't do that right now because this class is not
+ exported. We may need a Q_AUTOTEST_EXPORT thing for QtWebKit if we want
+ this kind of test.
+ - elementAtArea() test uses a function that is not exported. But in this case
+ I think we should test it's user, the public method "heuristicZoom".
+
+ * tests/qdeclarativewebview/resources/basic.html: Added.
+ * tests/qdeclarativewebview/resources/basic.png: Added.
+ * tests/qdeclarativewebview/resources/basic.qml: Added.
+ * tests/qdeclarativewebview/resources/elements.html: Added.
+ * tests/qdeclarativewebview/resources/elements.qml: Added.
+ * tests/qdeclarativewebview/resources/forward.html: Added.
+ * tests/qdeclarativewebview/resources/forward.png: Added.
+ * tests/qdeclarativewebview/resources/javaScript.html: Added.
+ * tests/qdeclarativewebview/resources/javaScript.qml: Added.
+ * tests/qdeclarativewebview/resources/loadError.qml: Added.
+ * tests/qdeclarativewebview/resources/newwindows.html: Added.
+ * tests/qdeclarativewebview/resources/newwindows.qml: Added.
+ * tests/qdeclarativewebview/resources/propertychanges.qml: Added.
+ * tests/qdeclarativewebview/resources/sethtml.qml: Added.
+ * tests/qdeclarativewebview/tst_qdeclarativewebview.cpp:
+ (tst_QDeclarativeWebView::tmpDir):
+ (strippedHtml):
+ (fileContents):
+ (removeRecursive):
+ (tst_QDeclarativeWebView::cleanupTestCase):
+ (tst_QDeclarativeWebView::basicProperties):
+ (tst_QDeclarativeWebView::elementAreaAt):
+ (tst_QDeclarativeWebView::historyNav):
+ (callEvaluateJavaScript):
+ (tst_QDeclarativeWebView::javaScript):
+ (tst_QDeclarativeWebView::loadError):
+ (tst_QDeclarativeWebView::multipleWindows):
+ (tst_QDeclarativeWebView::newWindowComponent):
+ (tst_QDeclarativeWebView::newWindowParent):
+ (tst_QDeclarativeWebView::pressGrabTime):
+ (tst_QDeclarativeWebView::renderingEnabled):
+ (tst_QDeclarativeWebView::setHtml):
+ (tst_QDeclarativeWebView::settings):
+ (tst_QDeclarativeWebView::checkNoErrors):
+ * tests/qdeclarativewebview/tst_qdeclarativewebview.qrc:
+
+2011-04-08 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] QWebPage MIME type handling inconsistency with other web browsers
+ https://bugs.webkit.org/show_bug.cgi?id=46968
+
+ Implementing mime type sniffing based on
+ http://tools.ietf.org/html/draft-abarth-mime-sniff-06.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::createNetworkingContext):
+ * WebCoreSupport/FrameNetworkingContextQt.cpp:
+ (WebCore::FrameNetworkingContextQt::FrameNetworkingContextQt):
+ (WebCore::FrameNetworkingContextQt::create):
+ (WebCore::FrameNetworkingContextQt::MIMESniffingEnabled):
+ * WebCoreSupport/FrameNetworkingContextQt.h:
+ * tests/MIMESniffing/MIMESniffing.pro: Added.
+ * tests/MIMESniffing/TestData.h: Added.
+ * tests/MIMESniffing/resources.qrc: Added.
+ * tests/MIMESniffing/resources/application_atom+xml: Added.
+ * tests/MIMESniffing/resources/application_ogg: Added.
+ * tests/MIMESniffing/resources/application_pdf: Added.
+ * tests/MIMESniffing/resources/application_postscript: Added.
+ * tests/MIMESniffing/resources/application_rdf+xml: Added.
+ * tests/MIMESniffing/resources/application_rss+xml: Added.
+ * tests/MIMESniffing/resources/application_x-gzip: Added.
+ * tests/MIMESniffing/resources/application_x-rar-compressed: Added.
+ * tests/MIMESniffing/resources/application_zip: Added.
+ * tests/MIMESniffing/resources/audio_x-wave: Added.
+ * tests/MIMESniffing/resources/image_bmp: Added.
+ * tests/MIMESniffing/resources/image_gif: Added.
+ * tests/MIMESniffing/resources/image_jpeg: Added.
+ * tests/MIMESniffing/resources/image_png: Added.
+ * tests/MIMESniffing/resources/image_vnd.microsoft.icon: Added.
+ * tests/MIMESniffing/resources/image_webp: Added.
+ * tests/MIMESniffing/resources/text_html: Added.
+ * tests/MIMESniffing/resources/text_xml: Added.
+ * tests/MIMESniffing/resources/video_webm: Added.
+ * tests/MIMESniffing/tst_MIMESniffing.cpp: Added.
+ (tst_MIMESniffing::tst_MIMESniffing):
+ (errorText):
+ (tst_MIMESniffing::testCase1):
+ * tests/tests.pro:
+
+2011-04-15 Andreas Kling <kling@webkit.org>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] DRT: Block access to external URLs.
+
+ Implement the "Blocked access to external URL" behavior for Qt's DRT,
+ based on what other ports are doing.
+
+ Fixes <http://webkit.org/b/57306> and <http://webkit.org/b/58523>.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::dispatchWillSendRequest):
+
+2011-01-26 Ragner Magalhaes <ragner.magalhaes@openbossa.org>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] Web Inspector does not highlight elements
+ https://bugs.webkit.org/show_bug.cgi?id=35125
+
+ Adjust Web inspector to highlight elements on the page when the mouse
+ hovers the element on DOM inspector.
+
+ * Api/qwebframe.cpp:
+ (QWebFramePrivate::renderRelativeCoords):
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientQt::highlight):
+ (WebCore::InspectorClientQt::hideHighlight):
+
+2011-04-12 George Guo <George.Guo@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] On Symbian got "Update Error" when installing QtWebkit.sis
+ http://bugs.webkit.org/show_bug.cgi?id=58141
+
+ If QtWebKit is already in Symbian ROM, we need package to be
+ both SA and RU type
+
+ * QtWebKit.pro:
+
+2011-04-12 Alexis Menard <alexis.menard@openbossa.org>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] Private Q_SLOTS void orientationChanged() can't be in qwebframe.h public header file.
+ https://bugs.webkit.org/show_bug.cgi?id=58251
+
+ Fix an issue with slot names after http://trac.webkit.org/changeset/83512.
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::QWebFrame):
+
+2011-04-11 Alexis Menard <alexis.menard@openbossa.org>
+
+ Reviewed by Benjamin Poulain.
+
+ [Qt] Private Q_SLOTS void orientationChanged() can't be in qwebframe.h public header file.
+ https://bugs.webkit.org/show_bug.cgi?id=58251
+
+ Qt coding conventions states that private slots should be located in private implementation of
+ the class. This allows us to rename/delete the slots in the future without breaking anything.
+
+ No new tests added, just a simple refactoring.
+
+ * Api/qwebframe.cpp:
+ (QWebFramePrivate::_q_orientationChanged):
+ * Api/qwebframe.h:
+ * Api/qwebframe_p.h:
+
+2011-04-11 Alexis Menard <alexis.menard@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Sub-Frame content is not updated when scrolling in certain circumstances
+ https://bugs.webkit.org/show_bug.cgi?id=50373
+
+ Make sure that we invalidate the backing store when using TILED_BACKING_STORE
+ and the page contains sub frames. This bug appears only when frame flattening is
+ disabled and scrollable subframes.
+
+ Original patch from Thomas Thrainer.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::invalidateWindow):
+
+2011-04-11 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] HTML5 Drag and Drop demos not working
+ https://bugs.webkit.org/show_bug.cgi?id=56486
+
+ Handling the drop with JavaScript was not working with Qt because if the action is ignored
+ in response to DragEnter, no further events are sent to the view.
+
+ Drag and drop is defined and used differently by webpages. The drag move events are determining
+ what action should take place. To adopt this behavior for Qt, we always accept drag enter events
+ on the widget.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::dragEnterEvent):
+
+2011-04-11 Andras Becsi <abecsi@webkit.org>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] REGRESSION(83122): tst_QWebElement::style() fails
+ https://bugs.webkit.org/show_bug.cgi?id=58032
+
+ According to the documentation of QWebElement the styleProperty method should
+ not respect style inheritance and other CSS rules for the InlineStyle enum.
+
+ r83122 fixed this behaviour.
+
+ * tests/qwebelement/tst_qwebelement.cpp:
+ (tst_QWebElement::style): Fix the expected color for QWebElement::InlineStyle.
+
+2011-04-11 Andreas Kling <andreas.kling@nokia.com>
+
+ Build fix after r83436.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::dispatchDidReceiveResponse):
+
+2011-04-11 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Benjamin Poulain.
+
+ [Qt] dumpResourceResponseMIMETypes shouldn't strip URL query string.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::dispatchDidReceiveResponse): Use KURL::lastPathComponent()
+ for the dumpResourceResponseMIMETypes display string instead of QFileInfo::fileName().
+ This is in line with the Mac port.
+
+2011-04-08 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r83295.
+ http://trac.webkit.org/changeset/83295
+ https://bugs.webkit.org/show_bug.cgi?id=58144
+
+ Broke 4 tests in QtWebKit (Requested by tonikitoo on #webkit).
+
+ * WebCoreSupport/EditorClientQt.cpp:
+ (WebCore::EditorClientQt::handleInputMethodKeydown):
+
+2011-04-08 Yi Shen <yi.4.shen@nokia.com>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt]REGRESSION(r82243): fast/events/onsearch-enter.html fails
+ https://bugs.webkit.org/show_bug.cgi?id=57472
+
+ Avoid to insert new line for both keydown event & keypress event.
+
+ * WebCoreSupport/EditorClientQt.cpp:
+ (WebCore::EditorClientQt::handleInputMethodKeydown):
+
+2011-04-07 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
+
+ Reviewed by Benjamin Poulain.
+
+ [Qt] QWebFrame::setUrl works only from second time if url fragment is present
+ https://bugs.webkit.org/show_bug.cgi?id=32723
+
+ When clearing the frame, instead of using the URL passed to QWebFrame::setUrl(),
+ use an invalid URL (the begin() without arguments). Clearing the document
+ with the same URL was causing problems when we had a fragment because it assume that
+ only scrolling was enough and did not loaded the document again.
+
+ When setUrl() is called but fails, url() is expected to return the requested value. The
+ begin(url) guaranteed that before. This patch adds a member to track the URL, which is
+ updated when the URL changes and also when setUrl() is called.
+
+ KURL was used for the member so that when setUrl() is called, and then url() is checked
+ before the page gets loaded, we perform the same conversion that will be performed by a
+ successful load, e.g. add trailing '/' to an address. This behavior is checked by
+ tst_QWebFrame::requestedUrl() test.
+
+ For the record: the second QWebPage::setUrl() worked because the load was considered a
+ FrameLoadTypeSame, and because of that, was not fit for just scrolling, a reload was
+ needed. See FrameLoader::shouldScrollToAnchor() for details on this classification.
+
+ * Api/qwebframe.cpp:
+ (QWebFramePrivate::emitUrlChanged): update our URL member and emit the signal.
+ (clearCoreFrame):
+ (isCoreFrameClear):
+ (QWebFrame::setUrl):
+ (QWebFrame::url):
+ (QWebFrame::baseUrl): look in the document for the baseURL since its contents can change
+ the baseURL, e.g. by using the <base> tag.
+ * Api/qwebframe_p.h:
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::dispatchDidChangeLocationWithinPage):
+ (WebCore::FrameLoaderClientQt::dispatchDidCommitLoad):
+
+ * tests/qwebframe/tst_qwebframe.cpp:
+ (tst_QWebFrame::setUrlWithFragment): unskip test.
+
+2011-04-07 Alexis Menard <alexis.menard@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Build fix when using Phonon as a backend for the multimedia support.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::ChromeClientQt):
+ (WebCore::ChromeClientQt::~ChromeClientQt):
+ * WebCoreSupport/ChromeClientQt.h:
+
+2011-04-06 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] LayoutTestController needs to implement numberOfPendingGeolocationPermissionRequests
+ https://bugs.webkit.org/show_bug.cgi?id=56086
+
+ Add the accessor numberOfPendingGeolocationPermissionRequests to call GeolocationClientMock::numberOfPendingPermissionRequests()
+ from the LayoutTestController.
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::numberOfPendingGeolocationPermissionRequests):
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
+2011-04-06 Anders Bakken <agbakken@gmail.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] FrameLoaderClientQt.cpp has coding-style errors
+ https://bugs.webkit.org/show_bug.cgi?id=40254
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (drtDescriptionSuitableForTestResult):
+ (WebCore::FrameLoaderClientQt::hasWebView):
+ (WebCore::FrameLoaderClientQt::setCopiesOnScroll):
+ (WebCore::FrameLoaderClientQt::dispatchDidHandleOnloadEvents):
+ (WebCore::FrameLoaderClientQt::dispatchDidReceiveTitle):
+ (WebCore::FrameLoaderClientQt::dispatchDidChangeIcons):
+ (WebCore::FrameLoaderClientQt::cancelPolicyCheck):
+ (WebCore::FrameLoaderClientQt::dispatchWillSubmitForm):
+ (WebCore::FrameLoaderClientQt::postProgressStartedNotification):
+ (WebCore::FrameLoaderClientQt::postProgressFinishedNotification):
+ (WebCore::FrameLoaderClientQt::setMainFrameDocumentReady):
+ (WebCore::FrameLoaderClientQt::willChangeTitle):
+ (WebCore::FrameLoaderClientQt::didChangeTitle):
+ (WebCore::FrameLoaderClientQt::finishedLoading):
+ (WebCore::FrameLoaderClientQt::frameLoadCompleted):
+ (WebCore::FrameLoaderClientQt::provisionalLoadStarted):
+ (WebCore::FrameLoaderClientQt::didFinishLoad):
+ (WebCore::FrameLoaderClientQt::setTitle):
+ (WebCore::FrameLoaderClientQt::dispatchDidReceiveIcon):
+ (WebCore::FrameLoaderClientQt::dispatchDidClearWindowObjectInWorld):
+ (WebCore::FrameLoaderClientQt::updateGlobalHistory):
+ (WebCore::FrameLoaderClientQt::shouldGoToHistoryItem):
+ (WebCore::FrameLoaderClientQt::shouldStopLoadingForHistoryItem):
+ (WebCore::FrameLoaderClientQt::committedLoad):
+ (WebCore::FrameLoaderClientQt::download):
+ (WebCore::FrameLoaderClientQt::dispatchWillSendRequest):
+ (WebCore::FrameLoaderClientQt::shouldUseCredentialStorage):
+ (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForResponse):
+ (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction):
+ (WebCore::FrameLoaderClientQt::createFrame):
+ (WebCore::FrameLoaderClientQt::objectContentType):
+ (WebCore::FrameLoaderClientQt::createPlugin):
+
+2011-04-06 Alexis Menard <alexis.menard@openbossa.org>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).
+ https://bugs.webkit.org/show_bug.cgi?id=57974
+
+ We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).
+
+ No new tests needed, just a config flag rename.
+
+ * Api/qwebkitplatformplugin.h:
+ * WebCoreSupport/ChromeClientQt.cpp:
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::mediaContentUrlByElementId):
+ * WebCoreSupport/FullScreenVideoQt.cpp:
+ (WebCore::FullScreenVideoQt::FullScreenVideoQt):
+ (WebCore::FullScreenVideoQt::~FullScreenVideoQt):
+ (WebCore::FullScreenVideoQt::enterFullScreenForNode):
+ (WebCore::FullScreenVideoQt::exitFullScreenForNode):
+ (WebCore::FullScreenVideoQt::requiresFullScreenForVideoPlayback):
+ (WebCore::FullScreenVideoQt::isValid):
+ * WebCoreSupport/FullScreenVideoQt.h:
+ * WebCoreSupport/QtPlatformPlugin.cpp:
+ * WebCoreSupport/QtPlatformPlugin.h:
+ * examples/platformplugin/WebPlugin.cpp:
+ (WebPlugin::supportsExtension):
+ (WebPlugin::createExtension):
+ * examples/platformplugin/WebPlugin.h:
+ * examples/platformplugin/platformplugin.pro:
+ * examples/platformplugin/qwebkitplatformplugin.h:
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::loadHtml5Video):
+ * tests/tests.pri:
+
+2011-04-06 Alexis Menard <alexis.menard@openbossa.org>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] Implement fullscreen playback for the GStreamer backend.
+ https://bugs.webkit.org/show_bug.cgi?id=56826
+
+ Implement support for fullscreen playback when building the
+ Qt port with the GStreamer backend (DEFINES+=USE_GSTREAMER=1).
+ The implementation is done in FullScreenVideoQt alongside with
+ the Qt Multimedia support.
+
+ No new tests because layout tests cover it. They are not yet activated
+ but will be any time soon.
+
+ * QtWebKit.pro:
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::ChromeClientQt):
+ (WebCore::ChromeClientQt::~ChromeClientQt):
+ (WebCore::ChromeClientQt::enterFullscreenForNode):
+ (WebCore::ChromeClientQt::exitFullscreenForNode):
+ * WebCoreSupport/ChromeClientQt.h:
+ * WebCoreSupport/FullScreenVideoQt.cpp:
+ (WebCore::GStreamerFullScreenVideoHandler::GStreamerFullScreenVideoHandler):
+ (WebCore::GStreamerFullScreenVideoHandler::setVideoElement):
+ (WebCore::GStreamerFullScreenVideoHandler::enterFullScreen):
+ (WebCore::GStreamerFullScreenVideoHandler::windowClosed):
+ (WebCore::GStreamerFullScreenVideoHandler::exitFullScreen):
+ (WebCore::DefaultFullScreenVideoHandler::DefaultFullScreenVideoHandler):
+ (WebCore::FullScreenVideoQt::FullScreenVideoQt):
+ (WebCore::FullScreenVideoQt::~FullScreenVideoQt):
+ (WebCore::FullScreenVideoQt::enterFullScreenForNode):
+ (WebCore::FullScreenVideoQt::exitFullScreenForNode):
+ (WebCore::FullScreenVideoQt::requiresFullScreenForVideoPlayback):
+ (WebCore::FullScreenVideoQt::isValid):
+ * WebCoreSupport/FullScreenVideoQt.h:
+ (WebCore::GStreamerFullScreenVideoHandler::~GStreamerFullScreenVideoHandler):
+
+2011-04-06 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Improve tests for QWebFrame::url() and related methods
+ https://bugs.webkit.org/show_bug.cgi?id=57865
+
+ * tests/qwebframe/tst_qwebframe.cpp:
+ (FakeReply::FakeReply): make more URLs reply HostNotFound. We needed two different URLs in the test.
+ (tst_QWebFrame::requestedUrlAfterSetAndLoadFailures): check the properties after an setUrl()
+ that fails and a load() that fails (for a different URL).
+
+ (tst_QWebFrame::setUrlWithFragment_data):
+ (tst_QWebFrame::setUrlWithFragment): add other test cases similar to the original, but changing
+ the URL in the frame before the test starts.
+
+ (tst_QWebFrame::setUrlSameUrl): document existing behavior of calling setUrl() twice with
+ the same URL as argument.
+
+ (extractBaseUrl):
+ (tst_QWebFrame::setUrlThenLoads_data):
+ (tst_QWebFrame::setUrlThenLoads): check the URL related properties of the frame after a
+ sequence of set and loads. Those tests are interesting because the properties
+ react different to setUrl() and load(): 'requestedUrl' always change, 'url' only when setUrl()
+ is used or after the load() is committed and baseUrl() is similar to url() but also depends
+ on the contents of the page when it loads.
+
+2011-04-04 MORITA Hajime <morrita@google.com>
+
+ Reviewed by Ryosuke Niwa.
+
+ [Refactoring] SpellCheckingResult should be replaced with TextCheckingResult
+ https://bugs.webkit.org/show_bug.cgi?id=56085
+
+ * WebCoreSupport/EditorClientQt.h:
+ (WebCore::EditorClientQt::requestCheckingOfString):
+
+2011-04-04 Chang Shu <cshu@webkit.org>
+
+ Reviewed by Ryosuke Niwa.
+
+ setContentEditable with true/false/inherit string is not working properly
+ https://bugs.webkit.org/show_bug.cgi?id=52058
+
+ Move isContentEditable from HTMLElement to Node. WebKit should only access isContentEditable
+ as rendererIsEditable is for WebCore internal use.
+
+ * WebCoreSupport/EditorClientQt.cpp:
+ (WebCore::EditorClientQt::handleKeyboardEvent):
+
+2011-04-01 Carol Szabo <carol.szabo@nokia.com>
+
+ Reviewed by Benjamin Poulain.
+
+ Changed QWebFramePrivate::renderFromTiledBackingStore to call directly into
+ Scrollbar/PanIcon rendering, bypassing the potential relayout in renderRelativeCoords.
+
+ Tiled painting still causes synchronous layout when
+ accelerated compositing and texture mapper are enabled
+ https://bugs.webkit.org/show_bug.cgi?id=56929
+
+ * Api/qwebframe.cpp:
+ (QWebFramePrivate::renderFromTiledBackingStore):
+ (QWebFramePrivate::renderRelativeCoords):
+ (QWebFramePrivate::renderFrameWidgets):
+ * Api/qwebframe_p.h:
+
+2011-04-01 Nancy Piedra <nancy.piedra@nokia.com>
+
+ Reviewed by Benjamin Poulain.
+
+ [Qt] DragClientQt.h has coding-style errors
+ https://bugs.webkit.org/show_bug.cgi?id=40425
+
+ * WebCoreSupport/DragClientQt.h:
+
+2011-03-31 Marius Storm-Olsen <marius.storm-olsen@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Properly detect phonon include, and avoid double qtLibraryTarget() call
+ https://bugs.webkit.org/show_bug.cgi?id=57017
+
+ Build fix. No new tests.
+
+ * QtWebKit.pro:
+
+2011-03-31 Evan Martin <evan@chromium.org>
+
+ Another build fix.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::updateGlobalHistory):
+
+2011-03-31 Nancy Piedra <nancy.piedra@nokia.com>
+
+ Reviewed by Benjamin Poulain.
+
+ [Qt] ChromeClientQt.h has coding-style errors
+ https://bugs.webkit.org/show_bug.cgi?id=40239
+
+ * WebCoreSupport/ChromeClientQt.h:
+ (WebCore::ChromeClientQt::scrollbarsModeDidChange):
+ (WebCore::ChromeClientQt::needTouchEvents):
+ (WebCore::ChromeClientQt::formStateDidChange):
+ (WebCore::ChromeClientQt::scrollRectIntoView):
+ (WebCore::ChromeClientQt::requestGeolocationPermissionForFrame):
+ (WebCore::ChromeClientQt::cancelGeolocationPermissionRequestForFrame):
+
+2011-03-31 Evan Martin <evan@chromium.org>
+
+ Build fix from previous change.
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::title):
+
+2011-03-31 Evan Martin <evan@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ <title> should support dir attribute
+ https://bugs.webkit.org/show_bug.cgi?id=50961
+
+ Update to new FrameLoaderClient interface.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::dispatchDidReceiveTitle):
+ (WebCore::FrameLoaderClientQt::setTitle):
+ * WebCoreSupport/FrameLoaderClientQt.h:
+
+2011-03-30 Yi Shen <yi.4.shen@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt][Symbian] Fix Api test failure -- tst_QWebView::focusInputTypes
+ https://bugs.webkit.org/show_bug.cgi?id=57020
+
+ Added a macro 'VERIFY_INPUTMETHOD_HINTS' to test inputmethodhints().
+
+ * tests/qwebview/tst_qwebview.cpp:
+ (tst_QWebView::focusInputTypes):
+
2011-03-30 Robert Hogan <robert@webkit.org>
Reviewed by Antonio Gomes.
diff --git a/Source/WebKit/qt/QtWebKit.pro b/Source/WebKit/qt/QtWebKit.pro
index 8836c4a..7529ace 100644
--- a/Source/WebKit/qt/QtWebKit.pro
+++ b/Source/WebKit/qt/QtWebKit.pro
@@ -31,6 +31,7 @@ include($$SOURCE_DIR/JavaScriptCore/JavaScriptCore.pri)
webkit2 {
include($$SOURCE_DIR/WebKit2/WebKit2.pri)
include($$SOURCE_DIR/WebKit2/WebKit2API.pri)
+ INCLUDEPATH += $$OUTPUT_DIR/WebKit2/generated
}
include($$SOURCE_DIR/WebCore/WebCore.pri)
@@ -104,6 +105,11 @@ symbian {
} else {
TARGET.UID3 = 0xE00267C2
}
+
+ sisheader = "; SIS header: name, uid, version" \
+ "$${LITERAL_HASH}{\"$$TARGET\"},($$TARGET.UID3),$$QT_WEBKIT_MAJOR_VERSION,$$QT_WEBKIT_MINOR_VERSION,$$QT_WEBKIT_PATCH_VERSION,TYPE=SA,RU"
+ webkitsisheader.pkg_prerules = sisheader
+
webkitlibs.sources = QtWebKit$${QT_LIBINFIX}.dll
v8:webkitlibs.sources += v8.dll
@@ -128,7 +134,7 @@ symbian {
DEPLOYMENT += declarativeImport
}
- DEPLOYMENT += webkitlibs webkitbackup
+ DEPLOYMENT += webkitsisheader webkitlibs webkitbackup
!CONFIG(production):CONFIG-=def_files
# Need to build these sources here because of exported symbols
@@ -211,13 +217,13 @@ contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) {
contains(DEFINES, ENABLE_VIDEO=1) {
!contains(DEFINES, USE_GSTREAMER=1):contains(MOBILITY_CONFIG, multimedia) {
- HEADERS += \
- $$PWD/WebCoreSupport/FullScreenVideoQt.h \
- $$PWD/WebCoreSupport/FullScreenVideoWidget.h
+ HEADERS += $$PWD/WebCoreSupport/FullScreenVideoWidget.h
+ SOURCES += $$PWD/WebCoreSupport/FullScreenVideoWidget.cpp
+ }
- SOURCES += \
- $$PWD/WebCoreSupport/FullScreenVideoQt.cpp \
- $$PWD/WebCoreSupport/FullScreenVideoWidget.cpp
+ contains(DEFINES, USE_GSTREAMER=1) | contains(MOBILITY_CONFIG, multimedia) {
+ HEADERS += $$PWD/WebCoreSupport/FullScreenVideoQt.h
+ SOURCES += $$PWD/WebCoreSupport/FullScreenVideoQt.cpp
}
}
@@ -322,7 +328,7 @@ contains(CONFIG, texmap) {
CONFIG += build_all
} else {
- debug_and_release:TARGET = $$qtLibraryTarget($$TARGET)
+ isEmpty(QT_SOURCE_TREE):debug_and_release:TARGET = $$qtLibraryTarget($$TARGET)
}
CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework
diff --git a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index bec4bc4..ea2c826 100644
--- a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -75,13 +75,15 @@
#include <qtooltip.h>
#include <wtf/OwnPtr.h>
-#if ENABLE(VIDEO) && ENABLE(QT_MULTIMEDIA)
+#if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA))
#include "FullScreenVideoQt.h"
#include "HTMLMediaElement.h"
#include "HTMLNames.h"
#include "HTMLVideoElement.h"
+#if USE(QT_MULTIMEDIA)
#include "MediaPlayerPrivateQt.h"
#endif
+#endif
namespace WebCore {
@@ -90,7 +92,7 @@ bool ChromeClientQt::dumpVisitedLinksCallbacks = false;
ChromeClientQt::ChromeClientQt(QWebPage* webPage)
: m_webPage(webPage)
, m_eventLoop(0)
-#if ENABLE(VIDEO) && ENABLE(QT_MULTIMEDIA)
+#if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA))
, m_fullScreenVideo(0)
#endif
{
@@ -102,7 +104,7 @@ ChromeClientQt::~ChromeClientQt()
if (m_eventLoop)
m_eventLoop->exit();
-#if ENABLE(VIDEO) && ENABLE(QT_MULTIMEDIA)
+#if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA))
delete m_fullScreenVideo;
#endif
}
@@ -397,9 +399,18 @@ IntRect ChromeClientQt::windowResizerRect() const
#endif
}
-void ChromeClientQt::invalidateWindow(const IntRect&, bool)
+void ChromeClientQt::invalidateWindow(const IntRect& windowRect, bool)
{
- notImplemented();
+#if ENABLE(TILED_BACKING_STORE)
+ if (platformPageClient()) {
+ WebCore::TiledBackingStore* backingStore = QWebFramePrivate::core(m_webPage->mainFrame())->tiledBackingStore();
+ if (!backingStore)
+ return;
+ backingStore->invalidate(windowRect);
+ }
+#else
+ Q_UNUSED(windowRect);
+#endif
}
void ChromeClientQt::invalidateContentsAndWindow(const IntRect& windowRect, bool immediate)
@@ -650,7 +661,7 @@ IntRect ChromeClientQt::visibleRectForTiledBackingStore() const
}
#endif
-#if ENABLE(VIDEO) && ENABLE(QT_MULTIMEDIA)
+#if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA))
FullScreenVideoQt* ChromeClientQt::fullScreenVideo()
{
if (!m_fullScreenVideo)
@@ -673,13 +684,6 @@ void ChromeClientQt::enterFullscreenForNode(Node* node)
{
ASSERT(node && node->hasTagName(HTMLNames::videoTag));
- HTMLVideoElement* videoElement = static_cast<HTMLVideoElement*>(node);
- PlatformMedia platformMedia = videoElement->platformMedia();
-
- ASSERT(platformMedia.type == PlatformMedia::QtMediaPlayerType);
- if (platformMedia.type != PlatformMedia::QtMediaPlayerType)
- return;
-
fullScreenVideo()->enterFullScreenForNode(node);
}
@@ -687,13 +691,6 @@ void ChromeClientQt::exitFullscreenForNode(Node* node)
{
ASSERT(node && node->hasTagName(HTMLNames::videoTag));
- HTMLVideoElement* videoElement = static_cast<HTMLVideoElement*>(node);
- PlatformMedia platformMedia = videoElement->platformMedia();
-
- ASSERT(platformMedia.type == PlatformMedia::QtMediaPlayerType);
- if (platformMedia.type != PlatformMedia::QtMediaPlayerType)
- return;
-
fullScreenVideo()->exitFullScreenForNode(node);
}
#endif
diff --git a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
index a12c2ec..c69daf5 100644
--- a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
@@ -26,15 +26,15 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef ChromeClientQt_H
-#define ChromeClientQt_H
+#ifndef ChromeClientQt_h
+#define ChromeClientQt_h
#include "ChromeClient.h"
#include "FloatRect.h"
-#include "RefCounted.h"
#include "KURL.h"
#include "PlatformString.h"
#include "QtPlatformPlugin.h"
+#include <wtf/RefCounted.h>
QT_BEGIN_NAMESPACE
class QEventLoop;
@@ -44,176 +44,172 @@ class QWebPage;
namespace WebCore {
- class FileChooser;
- class FloatRect;
- class Page;
- struct FrameLoadRequest;
- class QtAbstractWebPopup;
- struct ViewportArguments;
-#if ENABLE(VIDEO) && ENABLE(QT_MULTIMEDIA)
- class FullScreenVideoQt;
+class FileChooser;
+class FloatRect;
+class Page;
+struct FrameLoadRequest;
+class QtAbstractWebPopup;
+struct ViewportArguments;
+#if ENABLE(VIDEO)
+class FullScreenVideoQt;
#endif
- class ChromeClientQt : public ChromeClient
- {
- public:
- ChromeClientQt(QWebPage* webPage);
- virtual ~ChromeClientQt();
- virtual void chromeDestroyed();
+class ChromeClientQt : public ChromeClient {
+public:
+ ChromeClientQt(QWebPage*);
+ virtual ~ChromeClientQt();
+ virtual void chromeDestroyed();
- virtual void setWindowRect(const FloatRect&);
- virtual FloatRect windowRect();
+ virtual void setWindowRect(const FloatRect&);
+ virtual FloatRect windowRect();
- virtual FloatRect pageRect();
+ virtual FloatRect pageRect();
- virtual float scaleFactor();
+ virtual float scaleFactor();
- virtual void focus();
- virtual void unfocus();
+ virtual void focus();
+ virtual void unfocus();
- virtual bool canTakeFocus(FocusDirection);
- virtual void takeFocus(FocusDirection);
+ virtual bool canTakeFocus(FocusDirection);
+ virtual void takeFocus(FocusDirection);
- virtual void focusedNodeChanged(Node*);
- virtual void focusedFrameChanged(Frame*);
+ virtual void focusedNodeChanged(Node*);
+ virtual void focusedFrameChanged(Frame*);
- virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&);
- virtual void show();
+ virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&);
+ virtual void show();
- virtual bool canRunModal();
- virtual void runModal();
+ virtual bool canRunModal();
+ virtual void runModal();
- virtual void setToolbarsVisible(bool);
- virtual bool toolbarsVisible();
+ virtual void setToolbarsVisible(bool);
+ virtual bool toolbarsVisible();
- virtual void setStatusbarVisible(bool);
- virtual bool statusbarVisible();
+ virtual void setStatusbarVisible(bool);
+ virtual bool statusbarVisible();
- virtual void setScrollbarsVisible(bool);
- virtual bool scrollbarsVisible();
+ virtual void setScrollbarsVisible(bool);
+ virtual bool scrollbarsVisible();
- virtual void setMenubarVisible(bool);
- virtual bool menubarVisible();
+ virtual void setMenubarVisible(bool);
+ virtual bool menubarVisible();
- virtual void setResizable(bool);
+ virtual void setResizable(bool);
- virtual void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message,
- unsigned int lineNumber, const String& sourceID);
+ virtual void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, unsigned int lineNumber, const String& sourceID);
- virtual bool canRunBeforeUnloadConfirmPanel();
- virtual bool runBeforeUnloadConfirmPanel(const String& message, Frame* frame);
+ virtual bool canRunBeforeUnloadConfirmPanel();
+ virtual bool runBeforeUnloadConfirmPanel(const String& message, Frame*);
- virtual void closeWindowSoon();
+ virtual void closeWindowSoon();
- virtual void runJavaScriptAlert(Frame*, const String&);
- virtual bool runJavaScriptConfirm(Frame*, const String&);
- virtual bool runJavaScriptPrompt(Frame*, const String& message, const String& defaultValue, String& result);
- virtual bool shouldInterruptJavaScript();
+ virtual void runJavaScriptAlert(Frame*, const String&);
+ virtual bool runJavaScriptConfirm(Frame*, const String&);
+ virtual bool runJavaScriptPrompt(Frame*, const String& message, const String& defaultValue, String& result);
+ virtual bool shouldInterruptJavaScript();
- virtual void setStatusbarText(const String&);
+ virtual void setStatusbarText(const String&);
- virtual WebCore::KeyboardUIMode keyboardUIMode();
- virtual IntRect windowResizerRect() const;
+ virtual KeyboardUIMode keyboardUIMode();
+ virtual IntRect windowResizerRect() const;
- 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 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);
#if ENABLE(TILED_BACKING_STORE)
- virtual void delegatedScrollRequested(const IntPoint& scrollPoint);
+ virtual void delegatedScrollRequested(const IntPoint& scrollPoint);
#endif
- virtual IntPoint screenToWindow(const IntPoint&) const;
- virtual IntRect windowToScreen(const IntRect&) const;
- virtual PlatformPageClient platformPageClient() const;
- virtual void contentsSizeChanged(Frame*, const IntSize&) const;
+ virtual IntPoint screenToWindow(const IntPoint&) const;
+ virtual IntRect windowToScreen(const IntRect&) const;
+ virtual PlatformPageClient platformPageClient() const;
+ virtual void contentsSizeChanged(Frame*, const IntSize&) const;
- virtual void scrollbarsModeDidChange() const { }
- virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags);
+ virtual void scrollbarsModeDidChange() const { }
+ virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags);
- virtual void setToolTip(const String&, TextDirection);
+ virtual void setToolTip(const String&, TextDirection);
- virtual void print(Frame*);
+ virtual void print(Frame*);
#if ENABLE(DATABASE)
- virtual void exceededDatabaseQuota(Frame*, const String&);
+ virtual void exceededDatabaseQuota(Frame*, const String&);
#endif
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
- virtual void reachedMaxAppCacheSize(int64_t spaceNeeded);
- virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*);
+ virtual void reachedMaxAppCacheSize(int64_t spaceNeeded);
+ virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*);
#endif
#if ENABLE(CONTEXT_MENUS)
virtual void showContextMenu() { }
#endif
#if ENABLE(NOTIFICATIONS)
- virtual NotificationPresenter* notificationPresenter() const;
+ virtual NotificationPresenter* notificationPresenter() const;
#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();
- virtual CompositingTriggerFlags allowedCompositingTriggers() const;
+ // 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();
+ virtual CompositingTriggerFlags allowedCompositingTriggers() const;
#endif
#if ENABLE(TILED_BACKING_STORE)
- virtual IntRect visibleRectForTiledBackingStore() const;
+ virtual IntRect visibleRectForTiledBackingStore() const;
#endif
#if ENABLE(TOUCH_EVENTS)
- virtual void needTouchEvents(bool) { }
+ virtual void needTouchEvents(bool) { }
#endif
-#if ENABLE(VIDEO) && ENABLE(QT_MULTIMEDIA)
- virtual bool supportsFullscreenForNode(const Node*);
- virtual void enterFullscreenForNode(Node*);
- virtual void exitFullscreenForNode(Node*);
- virtual bool requiresFullscreenForVideoPlayback();
- FullScreenVideoQt* fullScreenVideo();
+#if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA))
+ virtual bool supportsFullscreenForNode(const Node*);
+ virtual void enterFullscreenForNode(Node*);
+ virtual void exitFullscreenForNode(Node*);
+ virtual bool requiresFullscreenForVideoPlayback();
+ FullScreenVideoQt* fullScreenVideo();
#endif
+ virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
+ virtual void chooseIconForFiles(const Vector<String>&, FileChooser*);
- virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
- virtual void chooseIconForFiles(const Vector<String>&, FileChooser*);
+ virtual void formStateDidChange(const Node*) { }
- virtual void formStateDidChange(const Node*) { }
+ virtual void setCursor(const Cursor&);
- virtual void setCursor(const Cursor&);
+ virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const { }
- virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const { }
+ virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*) { }
+ virtual void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*) { }
- virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*) { }
- virtual void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*) { }
+ virtual bool selectItemWritingDirectionIsNatural();
+ virtual bool selectItemAlignmentFollowsMenuWritingDirection();
+ virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const;
+ virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const;
+ virtual void populateVisitedLinks();
- virtual bool selectItemWritingDirectionIsNatural();
- virtual bool selectItemAlignmentFollowsMenuWritingDirection();
- virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const;
- virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const;
- virtual void populateVisitedLinks();
+ QWebSelectMethod* createSelectPopup() const;
- QWebSelectMethod* createSelectPopup() const;
+ virtual void dispatchViewportDataDidChange(const ViewportArguments&) const;
- virtual void dispatchViewportDataDidChange(const ViewportArguments&) const;
+ QWebPage* m_webPage;
+ KURL lastHoverURL;
+ String lastHoverTitle;
+ String lastHoverContent;
- QWebPage* m_webPage;
- WebCore::KURL lastHoverURL;
- WTF::String lastHoverTitle;
- WTF::String lastHoverContent;
+ bool toolBarsVisible;
+ bool statusBarVisible;
+ bool menuBarVisible;
+ QEventLoop* m_eventLoop;
- bool toolBarsVisible;
- bool statusBarVisible;
- bool menuBarVisible;
- QEventLoop* m_eventLoop;
-
-#if ENABLE(VIDEO) && ENABLE(QT_MULTIMEDIA)
- FullScreenVideoQt* m_fullScreenVideo;
+#if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA))
+ FullScreenVideoQt* m_fullScreenVideo;
#endif
- static bool dumpVisitedLinksCallbacks;
+ static bool dumpVisitedLinksCallbacks;
- mutable QtPlatformPlugin m_platformPlugin;
- };
+ mutable QtPlatformPlugin m_platformPlugin;
+};
}
#endif
diff --git a/Source/WebKit/qt/WebCoreSupport/DragClientQt.h b/Source/WebKit/qt/WebCoreSupport/DragClientQt.h
index 38b463b..15724f1 100644
--- a/Source/WebKit/qt/WebCoreSupport/DragClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/DragClientQt.h
@@ -23,23 +23,28 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#ifndef DragClientQt_h
+#define DragClientQt_h
+
#include "DragClient.h"
+
class QWebPage;
+
namespace WebCore {
class DragClientQt : public DragClient {
public:
DragClientQt(QWebPage* webPage) : m_webPage(webPage) {};
- virtual void willPerformDragDestinationAction(DragDestinationAction,
- DragData*);
- virtual WebCore::DragDestinationAction actionMaskForDrag(DragData*);
+ virtual void willPerformDragDestinationAction(DragDestinationAction, DragData*);
+ virtual DragDestinationAction actionMaskForDrag(DragData*);
virtual void dragControllerDestroyed();
virtual DragSourceAction dragSourceActionMaskForPoint(const IntPoint&);
virtual void willPerformDragSourceAction(DragSourceAction, const IntPoint&, Clipboard*);
- virtual void startDrag(DragImageRef dragImage, const IntPoint& dragImageOrigin, const IntPoint& eventPos, Clipboard*, Frame*, bool linkDrag = false);
+ virtual void startDrag(DragImageRef, const IntPoint& dragImageOrigin, const IntPoint& eventPos, Clipboard*, Frame*, bool linkDrag = false);
private:
QWebPage* m_webPage;
};
}
+#endif
diff --git a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index ba712d1..81102c3 100644
--- a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -26,6 +26,7 @@
#include "ApplicationCacheStorage.h"
#include "CSSComputedStyleDeclaration.h"
#include "ChromeClientQt.h"
+#include "ContainerNode.h"
#include "ContextMenu.h"
#include "ContextMenuClientQt.h"
#include "ContextMenuController.h"
@@ -82,7 +83,7 @@
#include "qwebpage_p.h"
#include "qwebscriptworld.h"
-#if ENABLE(VIDEO) && ENABLE(QT_MULTIMEDIA)
+#if ENABLE(VIDEO) && USE(QT_MULTIMEDIA)
#include "HTMLVideoElement.h"
#include "MediaPlayerPrivateQt.h"
#endif
@@ -822,6 +823,17 @@ void DumpRenderTreeSupportQt::setMockGeolocationError(QWebPage* page, int errorC
#endif
}
+int DumpRenderTreeSupportQt::numberOfPendingGeolocationPermissionRequests(QWebPage* page)
+{
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+ Page* corePage = QWebPagePrivate::core(page);
+ GeolocationClientMock* mockClient = toGeolocationClientMock(corePage->geolocationController()->client());
+ return mockClient->numberOfPendingPermissionRequests();
+#else
+ return -1;
+#endif
+}
+
bool DumpRenderTreeSupportQt::isTargetItem(const QWebHistoryItem& historyItem)
{
QWebHistoryItem it = historyItem;
@@ -1014,7 +1026,7 @@ QUrl DumpRenderTreeSupportQt::mediaContentUrlByElementId(QWebFrame* frame, const
{
QUrl res;
-#if ENABLE(VIDEO) && ENABLE(QT_MULTIMEDIA)
+#if ENABLE(VIDEO) && USE(QT_MULTIMEDIA)
Frame* coreFrame = QWebFramePrivate::core(frame);
if (!coreFrame)
return res;
@@ -1052,6 +1064,19 @@ void DumpRenderTreeSupportQt::setAlternateHtml(QWebFrame* frame, const QString&
coreFrame->loader()->load(request, substituteData, false);
}
+QVariant DumpRenderTreeSupportQt::shadowRoot(const QWebElement& element)
+{
+ WebCore::Element* webElement = element.m_element;
+ if (!webElement)
+ return QVariant();
+
+ ContainerNode* webShadowRoot = webElement->shadowRoot();
+ if (!webShadowRoot)
+ return QVariant();
+
+ return QVariant::fromValue(QDRTNode(webShadowRoot));
+}
+
// Provide a backward compatibility with previously exported private symbols as of QtWebKit 4.6 release
void QWEBKIT_EXPORT qt_resumeActiveDOMObjects(QWebFrame* frame)
diff --git a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
index 78752d8..4be6053 100644
--- a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
@@ -147,6 +147,7 @@ public:
static void setMockGeolocationPermission(QWebPage*, bool allowed);
static void setMockGeolocationPosition(QWebPage*, double latitude, double longitude, double accuracy);
static void setMockGeolocationError(QWebPage*, int errorCode, const QString& message);
+ static int numberOfPendingGeolocationPermissionRequests(QWebPage*);
static int workerThreadCount();
@@ -199,6 +200,8 @@ public:
static QUrl mediaContentUrlByElementId(QWebFrame*, const QString& elementId);
static void setAlternateHtml(QWebFrame*, const QString& html, const QUrl& baseUrl, const QUrl& failingUrl);
+
+ static QVariant shadowRoot(const QWebElement&);
};
#endif
diff --git a/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
index e7bbd2c..0110144 100644
--- a/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
@@ -420,7 +420,7 @@ void EditorClientQt::handleKeyboardEvent(KeyboardEvent* event)
return;
// FIXME: refactor all of this to use Actions or something like them
- if (start->rendererIsEditable()) {
+ if (start->isContentEditable()) {
bool doSpatialNavigation = false;
if (isSpatialNavigationEnabled(frame)) {
if (!kevent->modifiers()) {
diff --git a/Source/WebKit/qt/WebCoreSupport/EditorClientQt.h b/Source/WebKit/qt/WebCoreSupport/EditorClientQt.h
index 0450603..0d8e8c6 100644
--- a/Source/WebKit/qt/WebCoreSupport/EditorClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/EditorClientQt.h
@@ -109,7 +109,7 @@ public:
virtual void getGuessesForWord(const String& word, const String& context, Vector<String>& guesses);
virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
- virtual void requestCheckingOfString(SpellChecker*, int, const String&) {}
+ virtual void requestCheckingOfString(SpellChecker*, int, WebCore::TextCheckingTypeMask, const String&) {}
virtual TextCheckerClient* textChecker() { return this; }
bool isEditing() const;
diff --git a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index d318494..d083f8f 100644
--- a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -31,71 +31,72 @@
*/
#include "config.h"
+#include "FrameLoaderClientQt.h"
+
#include "CSSComputedStyleDeclaration.h"
#include "CSSPropertyNames.h"
+#include "DocumentLoader.h"
#include "FormState.h"
-#include "FrameLoaderClientQt.h"
#include "FrameNetworkingContextQt.h"
#include "FrameTree.h"
#include "FrameView.h"
-#include "DocumentLoader.h"
+#include "HTMLAppletElement.h"
+#include "HTMLFormElement.h"
+#include "HTMLPlugInElement.h"
+#include "HTTPParsers.h"
+#include "HistoryItem.h"
#include "HitTestResult.h"
#if ENABLE(ICONDATABASE)
#include "IconDatabaseClientQt.h"
#endif
#if USE(JSC)
#include "JSDOMWindowBase.h"
-#elif USE(V8)
-#include "V8DOMWindow.h"
#endif
#include "MIMETypeRegistry.h"
#include "MouseEvent.h"
-#include "ResourceResponse.h"
+#include "NotImplemented.h"
#include "Page.h"
#include "PluginData.h"
#include "PluginDatabase.h"
#include "ProgressTracker.h"
-#include "RenderPart.h"
-#include "ResourceRequest.h"
-#include "HistoryItem.h"
-#include "HTMLAppletElement.h"
-#include "HTMLFormElement.h"
-#include "HTMLPlugInElement.h"
-#include "HTTPParsers.h"
-#include "NotImplemented.h"
#include "QNetworkReplyHandler.h"
-#include "ResourceHandleInternal.h"
+#include "QWebPageClient.h"
+#include "RenderPart.h"
#include "ResourceHandle.h"
+#include "ResourceHandleInternal.h"
+#include "ResourceRequest.h"
+#include "ResourceResponse.h"
#include "ScriptController.h"
#include "Settings.h"
-#include "QWebPageClient.h"
+#if USE(V8)
+#include "V8DOMWindow.h"
+#endif
#include "ViewportArguments.h"
-#include "qwebpage.h"
-#include "qwebpage_p.h"
#include "qwebframe.h"
#include "qwebframe_p.h"
+#include "qwebhistory_p.h"
#include "qwebhistoryinterface.h"
+#include "qwebpage.h"
+#include "qwebpage_p.h"
#include "qwebpluginfactory.h"
-#include <qfileinfo.h>
-
#include <QCoreApplication>
#include <QDebug>
+#include <QFileInfo>
#include <QGraphicsScene>
#include <QGraphicsWidget>
-#include <QNetworkRequest>
#include <QNetworkReply>
+#include <QNetworkRequest>
#include <QStringList>
-#include "qwebhistory_p.h"
#include <wtf/OwnPtr.h>
static QMap<unsigned long, QString> dumpAssignedUrls;
-// Compare with WebKitTools/DumpRenderTree/mac/FrameLoadDelegate.mm
-static QString drtDescriptionSuitableForTestResult(WebCore::Frame* _frame)
+// Compare with the file "WebKit/Tools/DumpRenderTree/mac/FrameLoadDelegate.mm".
+static QString drtDescriptionSuitableForTestResult(WebCore::Frame* webCoreFrame)
{
- QWebFrame* frame = QWebFramePrivate::kit(_frame);
+ QWebFrame* frame = QWebFramePrivate::kit(webCoreFrame);
QString name = frame->frameName();
bool isMainFrame = frame == frame->page()->mainFrame();
@@ -103,11 +104,10 @@ static QString drtDescriptionSuitableForTestResult(WebCore::Frame* _frame)
if (!name.isEmpty())
return QString::fromLatin1("main frame \"%1\"").arg(name);
return QLatin1String("main frame");
- } else {
- if (!name.isEmpty())
- return QString::fromLatin1("frame \"%1\"").arg(name);
- return QLatin1String("frame (anonymous)");
}
+ if (!name.isEmpty())
+ return QString::fromLatin1("frame \"%1\"").arg(name);
+ return QLatin1String("frame (anonymous)");
}
static QString drtPrintFrameUserGestureStatus(WebCore::Frame* frame)
@@ -117,12 +117,12 @@ static QString drtPrintFrameUserGestureStatus(WebCore::Frame* frame)
return QString::fromLatin1("Frame with user gesture \"%1\"").arg(QLatin1String("false"));
}
-static QString drtDescriptionSuitableForTestResult(const WebCore::KURL& _url)
+static QString drtDescriptionSuitableForTestResult(const WebCore::KURL& kurl)
{
- if (_url.isEmpty() || !_url.isLocalFile())
- return _url.string();
- // Remove the leading path from file urls
- return QString(_url.string()).remove(WebCore::FrameLoaderClientQt::dumpResourceLoadCallbacksPath).mid(1);
+ if (kurl.isEmpty() || !kurl.isLocalFile())
+ return kurl.string();
+ // Remove the leading path from file urls.
+ return QString(kurl.string()).remove(WebCore::FrameLoaderClientQt::dumpResourceLoadCallbacksPath).mid(1);
}
static QString drtDescriptionSuitableForTestResult(const WebCore::ResourceError& error)
@@ -166,8 +166,7 @@ static QString drtDescriptionSuitableForTestResult(const RefPtr<WebCore::Node> n
return result;
}
-namespace WebCore
-{
+namespace WebCore {
bool FrameLoaderClientQt::dumpFrameLoaderCallbacks = false;
bool FrameLoaderClientQt::dumpUserGestureInFrameLoaderCallbacks = false;
@@ -184,7 +183,7 @@ bool FrameLoaderClientQt::policyDelegateEnabled = false;
bool FrameLoaderClientQt::policyDelegatePermissive = false;
QMap<QString, QString> FrameLoaderClientQt::URLsToRedirect = QMap<QString, QString>();
-// Taken from DumpRenderTree/chromium/WebViewHost.cpp
+// Taken from the file "WebKit/Tools/DumpRenderTree/chromium/WebViewHost.cpp".
static const char* navigationTypeToString(NavigationType type)
{
switch (type) {
@@ -250,7 +249,7 @@ void FrameLoaderClientQt::callPolicyFunction(FramePolicyFunction function, Polic
bool FrameLoaderClientQt::hasWebView() const
{
- //notImplemented();
+ // notImplemented();
return true;
}
@@ -331,7 +330,7 @@ void FrameLoaderClientQt::forceLayoutForNonHTML()
void FrameLoaderClientQt::setCopiesOnScroll()
{
- // apparently mac specific
+ // Apparently this is mac specific.
}
@@ -346,7 +345,7 @@ void FrameLoaderClientQt::detachedFromParent3()
void FrameLoaderClientQt::dispatchDidHandleOnloadEvents()
{
- // don't need this one
+ // Don't need this one.
if (dumpFrameLoaderCallbacks)
printf("%s - didHandleOnloadEventsForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
}
@@ -387,7 +386,7 @@ void FrameLoaderClientQt::dispatchDidChangeLocationWithinPage()
if (!m_webFrame)
return;
- emit m_webFrame->urlChanged(m_webFrame->url());
+ m_webFrame->d->emitUrlChanged();
m_webFrame->page()->d->updateNavigationActions();
}
@@ -447,15 +446,16 @@ void FrameLoaderClientQt::dispatchDidStartProvisionalLoad()
}
-void FrameLoaderClientQt::dispatchDidReceiveTitle(const String& title)
+void FrameLoaderClientQt::dispatchDidReceiveTitle(const StringWithDirection& title)
{
+ // FIXME: Use direction of title.
if (dumpFrameLoaderCallbacks)
- printf("%s - didReceiveTitle: %s\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)), qPrintable(QString(title)));
+ printf("%s - didReceiveTitle: %s\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)), qPrintable(QString(title.string())));
if (!m_webFrame)
return;
- emit titleChanged(title);
+ emit titleChanged(title.string());
}
@@ -467,7 +467,7 @@ void FrameLoaderClientQt::dispatchDidChangeIcons()
if (!m_webFrame)
return;
- // FIXME: To be notified of changing icon URLS add notification
+ // FIXME: In order to get notified of icon URLS' changes, add a notification.
// emit iconsChanged();
}
@@ -480,7 +480,7 @@ void FrameLoaderClientQt::dispatchDidCommitLoad()
if (m_frame->tree()->parent() || !m_webFrame)
return;
- emit m_webFrame->urlChanged(m_webFrame->url());
+ m_webFrame->d->emitUrlChanged();
m_webFrame->page()->d->updateNavigationActions();
// We should assume first the frame has no title. If it has, then the above dispatchDidReceiveTitle()
@@ -546,7 +546,7 @@ void FrameLoaderClientQt::dispatchShow()
void FrameLoaderClientQt::cancelPolicyCheck()
{
-// qDebug() << "FrameLoaderClientQt::cancelPolicyCheck";
+ // qDebug() << "FrameLoaderClientQt::cancelPolicyCheck";
}
@@ -554,7 +554,7 @@ void FrameLoaderClientQt::dispatchWillSubmitForm(FramePolicyFunction function,
PassRefPtr<FormState>)
{
notImplemented();
- // FIXME: This is surely too simple
+ // FIXME: This is surely too simple.
callPolicyFunction(function, PolicyUse);
}
@@ -573,7 +573,7 @@ void FrameLoaderClientQt::revertToProvisionalState(DocumentLoader*)
void FrameLoaderClientQt::postProgressStartedNotification()
{
if (m_webFrame && m_frame->page()) {
- // A new load starts, so lets clear the previous error.
+ // As a new load have started, clear the previous error.
m_loadError = ResourceError();
emit loadStarted();
postProgressEstimateChangedNotification();
@@ -591,9 +591,9 @@ void FrameLoaderClientQt::postProgressEstimateChangedNotification()
void FrameLoaderClientQt::postProgressFinishedNotification()
{
- // send a mousemove event to
- // (1) update the cursor to change according to whatever is underneath the mouse cursor right now
- // (2) display the tool tip if the mouse hovers a node which has a tool tip
+ // Send a mousemove event to:
+ // (1) update the cursor to change according to whatever is underneath the mouse cursor right now;
+ // (2) display the tool tip if the mouse hovers a node which has a tool tip.
if (m_frame && m_frame->eventHandler() && m_webFrame->page()) {
QWidget* view = m_webFrame->page()->view();
if (view && view->hasFocus()) {
@@ -611,19 +611,19 @@ void FrameLoaderClientQt::postProgressFinishedNotification()
void FrameLoaderClientQt::setMainFrameDocumentReady(bool)
{
- // this is only interesting once we provide an external API for the DOM
+ // This is only interesting once we provide an external API for the DOM.
}
void FrameLoaderClientQt::willChangeTitle(DocumentLoader*)
{
- // no need for, dispatchDidReceiveTitle is the right callback
+ // No need for, dispatchDidReceiveTitle is the right callback.
}
void FrameLoaderClientQt::didChangeTitle(DocumentLoader*)
{
- // no need for, dispatchDidReceiveTitle is the right callback
+ // No need for, dispatchDidReceiveTitle is the right callback.
}
@@ -631,8 +631,8 @@ void FrameLoaderClientQt::finishedLoading(DocumentLoader* loader)
{
if (!m_pluginView) {
// This is necessary to create an empty document. See bug 634004.
- // However, we only want to do this if makeRepresentation has been called, to
- // match the behavior on the Mac.
+ // However, we only want to do this if makeRepresentation has been called,
+ // to match the behavior on the Mac.
if (m_hasRepresentation)
loader->writer()->setEncoding("", false);
return;
@@ -681,7 +681,7 @@ String FrameLoaderClientQt::generatedMIMETypeForURLScheme(const String&) const
void FrameLoaderClientQt::frameLoadCompleted()
{
- // Note: Can be called multiple times.
+ // Note that this can be called multiple times.
}
@@ -695,13 +695,13 @@ void FrameLoaderClientQt::restoreViewState()
void FrameLoaderClientQt::provisionalLoadStarted()
{
- // don't need to do anything here
+ // Don't need to do anything here.
}
void FrameLoaderClientQt::didFinishLoad()
{
-// notImplemented();
+ // notImplemented();
}
@@ -709,16 +709,17 @@ void FrameLoaderClientQt::prepareForDataSourceReplacement()
{
}
-void FrameLoaderClientQt::setTitle(const String& title, const KURL& url)
+void FrameLoaderClientQt::setTitle(const StringWithDirection& title, const KURL& url)
{
// Used by Apple WebKit to update the title of an existing history item.
// QtWebKit doesn't accomodate this on history items. If it ever does,
- // it should be privateBrowsing-aware.For now, we are just passing
+ // it should be privateBrowsing-aware. For now, we are just passing
// globalhistory layout tests.
+ // FIXME: Use direction of title.
if (dumpHistoryCallbacks) {
printf("WebView updated the title for history URL \"%s\" to \"%s\".\n",
qPrintable(drtDescriptionSuitableForTestResult(url)),
- qPrintable(QString(title)));
+ qPrintable(QString(title.string())));
}
}
@@ -733,9 +734,8 @@ String FrameLoaderClientQt::userAgent(const KURL& url)
void FrameLoaderClientQt::dispatchDidReceiveIcon()
{
- if (m_webFrame) {
+ if (m_webFrame)
emit m_webFrame->iconChanged();
- }
}
void FrameLoaderClientQt::frameLoaderDestroyed()
@@ -757,9 +757,8 @@ void FrameLoaderClientQt::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld* w
if (world != mainThreadNormalWorld())
return;
- if (m_webFrame) {
+ if (m_webFrame)
emit m_webFrame->javaScriptWindowObjectCleared();
- }
}
void FrameLoaderClientQt::documentElementAvailable()
@@ -795,7 +794,7 @@ void FrameLoaderClientQt::onIconLoadedForPageURL(const QString& url)
void FrameLoaderClientQt::updateGlobalHistory()
{
- QWebHistoryInterface *history = QWebHistoryInterface::defaultInterface();
+ QWebHistoryInterface* history = QWebHistoryInterface::defaultInterface();
WebCore::DocumentLoader* loader = m_frame->loader()->documentLoader();
if (history)
history->addHistoryEntry(loader->urlForHistory().prettyURL());
@@ -803,7 +802,7 @@ void FrameLoaderClientQt::updateGlobalHistory()
if (dumpHistoryCallbacks) {
printf("WebView navigated to url \"%s\" with title \"%s\" with HTTP equivalent method \"%s\". The navigation was %s and was %s%s.\n",
qPrintable(drtDescriptionSuitableForTestResult(loader->urlForHistory())),
- qPrintable(QString(loader->title())),
+ qPrintable(QString(loader->title().string())),
qPrintable(QString(loader->request().httpMethod())),
((loader->substituteData().isValid() || (loader->response().httpStatusCode() >= 400)) ? "a failure" : "successful"),
((!loader->clientRedirectSourceForHistory().isEmpty()) ? "a client redirect from " : "not a client redirect"),
@@ -840,12 +839,12 @@ void FrameLoaderClientQt::updateGlobalHistoryRedirectLinks()
}
}
-bool FrameLoaderClientQt::shouldGoToHistoryItem(WebCore::HistoryItem *) const
+bool FrameLoaderClientQt::shouldGoToHistoryItem(WebCore::HistoryItem*) const
{
return true;
}
-bool FrameLoaderClientQt::shouldStopLoadingForHistoryItem(WebCore::HistoryItem *) const
+bool FrameLoaderClientQt::shouldStopLoadingForHistoryItem(WebCore::HistoryItem*) const
{
return true;
}
@@ -905,13 +904,13 @@ void FrameLoaderClientQt::committedLoad(WebCore::DocumentLoader* loader, const c
if (!m_pluginView)
loader->commitData(data, length);
- // We re-check here as the plugin can have been created
+ // We re-check here as the plugin can have been created.
if (m_pluginView && m_pluginView->isPluginView()) {
if (!m_hasSentResponseToPlugin) {
m_pluginView->didReceiveResponse(loader->response());
- // didReceiveResponse sets up a new stream to the plug-in. on a full-page plug-in, a failure in
- // setting up this stream can cause the main document load to be cancelled, setting m_pluginView
- // to null
+ // The function didReceiveResponse sets up a new stream to the plug-in.
+ // On a full-page plug-in, a failure in setting up this stream can cause the
+ // main document load to be cancelled, setting m_pluginView to null.
if (!m_pluginView)
return;
m_hasSentResponseToPlugin = true;
@@ -928,12 +927,12 @@ WebCore::ResourceError FrameLoaderClientQt::cancelledError(const WebCore::Resour
return error;
}
-// copied from WebKit/Misc/WebKitErrors[Private].h
+// This was copied from file "WebKit/Source/WebKit/mac/Misc/WebKitErrors.h".
enum {
WebKitErrorCannotShowMIMEType = 100,
WebKitErrorCannotShowURL = 101,
WebKitErrorFrameLoadInterruptedByPolicyChange = 102,
- WebKitErrorCannotUseRestrictedPort = 103,
+ WebKitErrorCannotUseRestrictedPort = 103,
WebKitErrorCannotFindPlugIn = 200,
WebKitErrorCannotLoadPlugIn = 201,
WebKitErrorJavaUnavailable = 202,
@@ -1011,7 +1010,7 @@ void FrameLoaderClientQt::download(WebCore::ResourceHandle* handle, const WebCor
QNetworkReplyHandler* handler = handle->getInternal()->m_job;
QNetworkReply* reply = handler->release();
if (reply) {
- QWebPage *page = m_webFrame->page();
+ QWebPage* page = m_webFrame->page();
if (page->forwardUnsupportedContent())
emit page->unsupportedContent(reply);
else
@@ -1027,6 +1026,7 @@ void FrameLoaderClientQt::assignIdentifierToInitialRequest(unsigned long identif
void FrameLoaderClientQt::dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long identifier, WebCore::ResourceRequest& newRequest, const WebCore::ResourceResponse& redirectResponse)
{
+ QUrl url = newRequest.url();
if (dumpResourceLoadCallbacks)
printf("%s - willSendRequest %s redirectResponse %s\n",
@@ -1034,28 +1034,42 @@ void FrameLoaderClientQt::dispatchWillSendRequest(WebCore::DocumentLoader*, unsi
qPrintable(drtDescriptionSuitableForTestResult(newRequest)),
(redirectResponse.isNull()) ? "(null)" : qPrintable(drtDescriptionSuitableForTestResult(redirectResponse)));
- if (sendRequestReturnsNull)
+ if (sendRequestReturnsNull) {
newRequest.setURL(QUrl());
+ return;
+ }
if (sendRequestReturnsNullOnRedirect && !redirectResponse.isNull()) {
printf("Returning null for this redirect\n");
newRequest.setURL(QUrl());
+ return;
+ }
+
+ if (QWebPagePrivate::drtRun
+ && url.isValid()
+ && (url.scheme().toLower() == QLatin1String("http") || url.scheme().toLower() == QLatin1String("https"))
+ && url.host() != QLatin1String("127.0.0.1")
+ && url.host() != QLatin1String("255.255.255.255")
+ && url.host().toLower() != QLatin1String("localhost")) {
+
+ printf("Blocked access to external URL %s\n", qPrintable(drtDescriptionSuitableForTestResult(newRequest.url())));
+ newRequest.setURL(QUrl());
+ return;
}
for (int i = 0; i < sendRequestClearHeaders.size(); ++i)
newRequest.setHTTPHeaderField(sendRequestClearHeaders.at(i).toLocal8Bit().constData(), QString());
if (QWebPagePrivate::drtRun) {
- QString url = newRequest.url().string();
- if (URLsToRedirect.contains(url))
- newRequest.setURL(QUrl(URLsToRedirect[url]));
+ QMap<QString, QString>::const_iterator it = URLsToRedirect.constFind(url.toString());
+ if (it != URLsToRedirect.constEnd())
+ newRequest.setURL(QUrl(it.value()));
}
- // seems like the Mac code doesn't do anything here by default neither
- //qDebug() << "FrameLoaderClientQt::dispatchWillSendRequest" << request.isNull() << request.url().string`();
+ // Seems like the Mac code doesn't do anything here by default neither.
+ // qDebug() << "FrameLoaderClientQt::dispatchWillSendRequest" << request.isNull() << url;
}
-bool
-FrameLoaderClientQt::shouldUseCredentialStorage(DocumentLoader*, unsigned long)
+bool FrameLoaderClientQt::shouldUseCredentialStorage(DocumentLoader*, unsigned long)
{
notImplemented();
return false;
@@ -1082,7 +1096,7 @@ void FrameLoaderClientQt::dispatchDidReceiveResponse(WebCore::DocumentLoader*, u
if (dumpResourceResponseMIMETypes) {
printf("%s has MIME type %s\n",
- qPrintable(QFileInfo(drtDescriptionSuitableForTestResult(response.url())).fileName()),
+ qPrintable(QString(response.url().lastPathComponent())),
qPrintable(QString(response.mimeType())));
}
}
@@ -1178,7 +1192,7 @@ WebCore::Frame* FrameLoaderClientQt::dispatchCreatePage(const WebCore::Navigatio
void FrameLoaderClientQt::dispatchDecidePolicyForResponse(FramePolicyFunction function, const WebCore::ResourceResponse& response, const WebCore::ResourceRequest&)
{
- // we need to call directly here
+ // We need to call directly here.
if (WebCore::contentDispositionType(response.httpHeaderField("Content-Disposition")) == WebCore::ContentDispositionAttachment)
callPolicyFunction(function, PolicyDownload);
else if (canShowMIMEType(response.mimeType()))
@@ -1215,7 +1229,7 @@ void FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction(FramePolicyFun
QWebPage*page = m_webFrame->page();
PolicyAction result;
- // Currently, this is only enabled by DRT
+ // Currently, this is only enabled by DRT.
if (policyDelegateEnabled) {
RefPtr<Node> node;
for (const Event* event = action.event(); event; event = event->underlyingEvent()) {
@@ -1296,7 +1310,7 @@ PassRefPtr<Frame> FrameLoaderClientQt::createFrame(const KURL& url, const String
emit m_webFrame->page()->frameCreated(webFrame);
- // ### set override encoding if we have one
+ // FIXME: Set override encoding if we have one.
m_frame->loader()->loadURLIntoChildFrame(frameData.url, frameData.referrer, frameData.frame.get());
@@ -1331,7 +1345,7 @@ void FrameLoaderClientQt::transferLoadingResourceFromPage(unsigned long, Documen
ObjectContentType FrameLoaderClientQt::objectContentType(const KURL& url, const String& mimeTypeIn, bool shouldPreferPlugInsForImages)
{
-// qDebug()<<" ++++++++++++++++ url is "<<url.prettyURL()<<", mime = "<<mimeTypeIn;
+ // qDebug()<<" ++++++++++++++++ url is "<<url.prettyURL()<<", mime = "<<mimeTypeIn;
QFileInfo fi(url.path());
String extension = fi.suffix();
if (mimeTypeIn == "application/x-qt-plugin" || mimeTypeIn == "application/x-qt-styled-widget")
@@ -1432,8 +1446,8 @@ private:
if (!isVisible())
return;
- // if setMask is set with an empty QRegion, no clipping will
- // be performed, so in that case we hide the platformWidget
+ // If setMask is set with an empty QRegion, no clipping will
+ // be performed, so in that case we hide the platformWidget.
QRegion mask = platformWidget()->mask();
platformWidget()->setVisible(!mask.isEmpty());
}
@@ -1467,7 +1481,7 @@ public:
IntRect windowRect = convertToContainingWindow(IntRect(0, 0, frameRect().width(), frameRect().height()));
graphicsWidget->setGeometry(QRect(windowRect));
- // FIXME: clipping of graphics widgets
+ // FIXME: Make the code handle clipping of graphics widgets.
}
virtual void show()
{
@@ -1494,8 +1508,8 @@ private:
PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, HTMLPlugInElement* element, const KURL& url, const Vector<String>& paramNames,
const Vector<String>& paramValues, const String& mimeType, bool loadManually)
{
-// qDebug()<<"------ Creating plugin in FrameLoaderClientQt::createPlugin for "<<url.prettyURL() << mimeType;
-// qDebug()<<"------\t url = "<<url.prettyURL();
+ // qDebug()<<"------ Creating plugin in FrameLoaderClientQt::createPlugin for "<<url.prettyURL() << mimeType;
+ // qDebug()<<"------\t url = "<<url.prettyURL();
if (!m_webFrame)
return 0;
@@ -1553,12 +1567,12 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize,
QWidget* parentWidget = 0;
if (m_webFrame->page()->d->client)
parentWidget = qobject_cast<QWidget*>(m_webFrame->page()->d->client->pluginParent());
- if (parentWidget) // don't reparent to nothing (i.e. keep whatever parent QWebPage::createPlugin() chose.
+ if (parentWidget) // Don't reparent to nothing (i.e. keep whatever parent QWebPage::createPlugin() chose.
widget->setParent(parentWidget);
widget->hide();
RefPtr<QtPluginWidget> w = adoptRef(new QtPluginWidget());
w->setPlatformWidget(widget);
- // Make sure it's invisible until properly placed into the layout
+ // Make sure it's invisible until properly placed into the layout.
w->setFrameRect(IntRect(0, 0, 0, 0));
return w;
}
@@ -1570,16 +1584,16 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize,
if (m_webFrame->page()->d->client)
parentWidget = qobject_cast<QGraphicsObject*>(m_webFrame->page()->d->client->pluginParent());
graphicsWidget->hide();
- if (parentWidget) // don't reparent to nothing (i.e. keep whatever parent QWebPage::createPlugin() chose.
+ if (parentWidget) // Don't reparent to nothing (i.e. keep whatever parent QWebPage::createPlugin() chose.
graphicsWidget->setParentItem(parentWidget);
RefPtr<QtPluginGraphicsWidget> w = QtPluginGraphicsWidget::create(graphicsWidget);
- // Make sure it's invisible until properly placed into the layout
+ // Make sure it's invisible until properly placed into the layout.
w->setFrameRect(IntRect(0, 0, 0, 0));
return w;
}
#endif // QT_NO_GRAPHICSVIEW
- // FIXME: make things work for widgetless plugins as well
+ // FIXME: Make things work for widgetless plugins as well.
delete object;
}
#if ENABLE(NETSCAPE_PLUGIN_API)
@@ -1592,16 +1606,16 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize,
#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO >= 5)
size_t wmodeIndex = params.find("wmode");
if (wmodeIndex == -1) {
- // Disable XEmbed mode and force it to opaque mode
+ // Disable XEmbed mode and force it to opaque mode.
params.append("wmode");
values.append("opaque");
} else if (!isQWebView) {
- // Disable transparency if client is not a QWebView
+ // Disable transparency if client is not a QWebView.
values[wmodeIndex] = "opaque";
}
#else
if (!isQWebView) {
- // inject wmode=opaque when there is no client or the client is not a QWebView
+ // 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");
@@ -1646,7 +1660,10 @@ QString FrameLoaderClientQt::chooseFile(const QString& oldFile)
PassRefPtr<FrameNetworkingContext> FrameLoaderClientQt::createNetworkingContext()
{
- return FrameNetworkingContextQt::create(m_frame, m_webFrame, m_webFrame->page()->networkAccessManager());
+ QVariant value = m_webFrame->page()->property("_q_MIMESniffingDisabled");
+ bool MIMESniffingDisabled = value.isValid() && value.toBool();
+
+ return FrameNetworkingContextQt::create(m_frame, m_webFrame, !MIMESniffingDisabled, m_webFrame->page()->networkAccessManager());
}
}
diff --git a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
index 3ec5f20..900489d 100644
--- a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
@@ -110,7 +110,7 @@ public:
virtual void dispatchWillClose();
virtual void dispatchDidReceiveIcon();
virtual void dispatchDidStartProvisionalLoad();
- virtual void dispatchDidReceiveTitle(const String& title);
+ virtual void dispatchDidReceiveTitle(const StringWithDirection&);
virtual void dispatchDidChangeIcons();
virtual void dispatchDidCommitLoad();
virtual void dispatchDidFailProvisionalLoad(const ResourceError&);
@@ -186,7 +186,7 @@ public:
virtual void prepareForDataSourceReplacement();
virtual WTF::PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
- virtual void setTitle(const String& title, const KURL&);
+ virtual void setTitle(const StringWithDirection&, const KURL&);
virtual String userAgent(const WebCore::KURL&);
diff --git a/Source/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.cpp b/Source/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.cpp
index b3b0f00..502a418 100644
--- a/Source/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.cpp
@@ -28,16 +28,17 @@
namespace WebCore {
-FrameNetworkingContextQt::FrameNetworkingContextQt(Frame* frame, QObject* originatingObject, QNetworkAccessManager* networkAccessManager)
+FrameNetworkingContextQt::FrameNetworkingContextQt(Frame* frame, QObject* originatingObject, bool mimeSniffingEnabled, QNetworkAccessManager* networkAccessManager)
: FrameNetworkingContext(frame)
, m_originatingObject(originatingObject)
, m_networkAccessManager(networkAccessManager)
+ , m_mimeSniffingEnabled(mimeSniffingEnabled)
{
}
-PassRefPtr<FrameNetworkingContextQt> FrameNetworkingContextQt::create(Frame* frame, QObject* originatingObject, QNetworkAccessManager* networkAccessManager)
+PassRefPtr<FrameNetworkingContextQt> FrameNetworkingContextQt::create(Frame* frame, QObject* originatingObject, bool mimeSniffingEnabled, QNetworkAccessManager* networkAccessManager)
{
- return adoptRef(new FrameNetworkingContextQt(frame, originatingObject, networkAccessManager));
+ return adoptRef(new FrameNetworkingContextQt(frame, originatingObject, mimeSniffingEnabled, networkAccessManager));
}
QObject* FrameNetworkingContextQt::originatingObject() const
@@ -50,4 +51,9 @@ QNetworkAccessManager* FrameNetworkingContextQt::networkAccessManager() const
return (qobject_cast<QWebFrame*>(m_originatingObject))->page()->networkAccessManager();
}
+bool FrameNetworkingContextQt::mimeSniffingEnabled() const
+{
+ return m_mimeSniffingEnabled;
+}
+
}
diff --git a/Source/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.h b/Source/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.h
index 461023e..f23ba95 100644
--- a/Source/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.h
@@ -26,16 +26,18 @@ namespace WebCore {
class FrameNetworkingContextQt : public FrameNetworkingContext {
public:
- static PassRefPtr<FrameNetworkingContextQt> create(Frame*, QObject* originatingObject, QNetworkAccessManager*);
+ static PassRefPtr<FrameNetworkingContextQt> create(Frame*, QObject* originatingObject, bool mimeSniffingEnabled, QNetworkAccessManager*);
private:
- FrameNetworkingContextQt(Frame*, QObject* originatingObject, QNetworkAccessManager*);
+ FrameNetworkingContextQt(Frame*, QObject* originatingObject, bool mimeSniffingEnabled, QNetworkAccessManager*);
virtual QObject* originatingObject() const;
virtual QNetworkAccessManager* networkAccessManager() const;
+ virtual bool mimeSniffingEnabled() const;
QObject* m_originatingObject;
QNetworkAccessManager* m_networkAccessManager;
+ bool m_mimeSniffingEnabled;
};
}
diff --git a/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp b/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp
index ccca43c..7939370 100644
--- a/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp
@@ -22,18 +22,71 @@
#include "FullScreenVideoQt.h"
#include "ChromeClientQt.h"
+#if USE(QT_MULTIMEDIA)
#include "FullScreenVideoWidget.h"
+#include "MediaPlayerPrivateQt.h"
+#endif
#include "HTMLNames.h"
#include "HTMLVideoElement.h"
-#include "MediaPlayerPrivateQt.h"
#include "Node.h"
+#if USE(GSTREAMER)
+#include "GStreamerGWorld.h"
+#include "PlatformVideoWindowPrivate.h"
+#endif
+#if USE(QT_MULTIMEDIA)
#include <QGraphicsVideoItem>
#include <QMediaPlayer>
+#endif
+#include <QWidget>
namespace WebCore {
+#if USE(GSTREAMER)
+GStreamerFullScreenVideoHandler::GStreamerFullScreenVideoHandler()
+ : m_videoElement(0)
+ , m_fullScreenWidget(0)
+{
+}
+
+void GStreamerFullScreenVideoHandler::setVideoElement(HTMLVideoElement* element)
+{
+ m_videoElement = element;
+}
+
+void GStreamerFullScreenVideoHandler::enterFullScreen()
+{
+ if (m_videoElement->platformMedia().type != WebCore::PlatformMedia::GStreamerGWorldType)
+ return;
+
+ GStreamerGWorld* gstreamerGWorld = m_videoElement->platformMedia().media.gstreamerGWorld;
+
+ if (!gstreamerGWorld->enterFullscreen())
+ return;
+
+ m_fullScreenWidget = reinterpret_cast<FullScreenVideoWindow*>(gstreamerGWorld->platformVideoWindow()->window());
+ m_fullScreenWidget->setVideoElement(m_videoElement);
+ connect(m_fullScreenWidget, SIGNAL(closed()), this, SLOT(windowClosed()));
+ m_fullScreenWidget->showFullScreen();
+}
+
+void GStreamerFullScreenVideoHandler::windowClosed()
+{
+ m_videoElement->exitFullscreen();
+}
+
+void GStreamerFullScreenVideoHandler::exitFullScreen()
+{
+ if (m_videoElement->platformMedia().type == WebCore::PlatformMedia::GStreamerGWorldType)
+ m_videoElement->platformMedia().media.gstreamerGWorld->exitFullscreen();
+
+ m_fullScreenWidget->setVideoElement(0);
+ m_fullScreenWidget->close();
+}
+#endif
+
+#if USE(QT_MULTIMEDIA)
bool DefaultFullScreenVideoHandler::s_shouldForceFullScreenVideoPlayback = false;
DefaultFullScreenVideoHandler::DefaultFullScreenVideoHandler()
@@ -42,6 +95,8 @@ DefaultFullScreenVideoHandler::DefaultFullScreenVideoHandler()
{
connect(m_fullScreenWidget, SIGNAL(didExitFullScreen()), this, SIGNAL(fullScreenClosed()));
m_fullScreenWidget->hide();
+
+ m_fullScreenWidget->close();
}
DefaultFullScreenVideoHandler::~DefaultFullScreenVideoHandler()
@@ -72,24 +127,36 @@ void DefaultFullScreenVideoHandler::exitFullScreen()
{
m_fullScreenWidget->close();
}
+#endif
FullScreenVideoQt::FullScreenVideoQt(ChromeClientQt* chromeClient)
: m_chromeClient(chromeClient)
, m_videoElement(0)
{
Q_ASSERT(m_chromeClient);
- m_FullScreenVideoHandler = m_chromeClient->m_platformPlugin.createFullScreenVideoHandler();
+#if USE(QT_MULTIMEDIA)
+ m_FullScreenVideoHandler = m_chromeClient->m_platformPlugin.createFullScreenVideoHandler();
if (!m_FullScreenVideoHandler)
m_FullScreenVideoHandler = new DefaultFullScreenVideoHandler;
if (m_FullScreenVideoHandler)
connect(m_FullScreenVideoHandler, SIGNAL(fullScreenClosed()), this, SLOT(aboutToClose()));
+#endif
+
+#if USE(GSTREAMER)
+ m_FullScreenVideoHandlerGStreamer = new GStreamerFullScreenVideoHandler;
+#endif
}
FullScreenVideoQt::~FullScreenVideoQt()
{
+#if USE(QT_MULTIMEDIA)
delete m_FullScreenVideoHandler;
+#endif
+#if USE(GSTREAMER)
+ delete m_FullScreenVideoHandlerGStreamer;
+#endif
}
void FullScreenVideoQt::enterFullScreenForNode(Node* node)
@@ -97,25 +164,54 @@ void FullScreenVideoQt::enterFullScreenForNode(Node* node)
Q_ASSERT(node);
Q_ASSERT(m_FullScreenVideoHandler);
+ m_videoElement = static_cast<HTMLVideoElement*>(node);
+
+#if USE(QT_MULTIMEDIA)
+ HTMLVideoElement* videoElement = static_cast<HTMLVideoElement*>(node);
+ PlatformMedia platformMedia = videoElement->platformMedia();
+
+ ASSERT(platformMedia.type == PlatformMedia::QtMediaPlayerType);
+ if (platformMedia.type != PlatformMedia::QtMediaPlayerType)
+ return;
+
if (!m_FullScreenVideoHandler)
return;
- MediaPlayerPrivateQt* mediaPlayerQt = mediaPlayerForNode(node);
+ MediaPlayerPrivateQt* mediaPlayerQt = mediaPlayer();
mediaPlayerQt->removeVideoItem();
m_FullScreenVideoHandler->enterFullScreen(mediaPlayerQt->mediaPlayer());
+#endif
+
+#if USE(GSTREAMER)
+ m_FullScreenVideoHandlerGStreamer->setVideoElement(m_videoElement);
+ m_FullScreenVideoHandlerGStreamer->enterFullScreen();
+#endif
}
void FullScreenVideoQt::exitFullScreenForNode(Node* node)
{
Q_ASSERT(node);
+
+#if USE(QT_MULTIMEDIA)
+ HTMLVideoElement* videoElement = static_cast<HTMLVideoElement*>(node);
+ PlatformMedia platformMedia = videoElement->platformMedia();
+
+ ASSERT(platformMedia.type == PlatformMedia::QtMediaPlayerType);
+ if (platformMedia.type != PlatformMedia::QtMediaPlayerType)
+ return;
+
Q_ASSERT(m_FullScreenVideoHandler);
if (!m_FullScreenVideoHandler)
return;
m_FullScreenVideoHandler->exitFullScreen();
- MediaPlayerPrivateQt* mediaPlayerQt = mediaPlayerForNode(node);
+ MediaPlayerPrivateQt* mediaPlayerQt = mediaPlayer();
mediaPlayerQt->restoreVideoItem();
+#endif
+#if USE(GSTREAMER)
+ m_FullScreenVideoHandlerGStreamer->exitFullScreen();
+#endif
}
void FullScreenVideoQt::aboutToClose()
@@ -124,24 +220,33 @@ void FullScreenVideoQt::aboutToClose()
m_videoElement->exitFullscreen();
}
+#if USE(QT_MULTIMEDIA)
MediaPlayerPrivateQt* FullScreenVideoQt::mediaPlayer()
{
Q_ASSERT(m_videoElement);
PlatformMedia platformMedia = m_videoElement->platformMedia();
return static_cast<MediaPlayerPrivateQt*>(platformMedia.media.qtMediaPlayer);
}
+#endif
-MediaPlayerPrivateQt* FullScreenVideoQt::mediaPlayerForNode(Node* node)
+bool FullScreenVideoQt::requiresFullScreenForVideoPlayback()
{
- Q_ASSERT(node);
- if (node)
- m_videoElement = static_cast<HTMLVideoElement*>(node);
- return mediaPlayer();
+#if USE(QT_MULTIMEDIA)
+ return m_FullScreenVideoHandler ? m_FullScreenVideoHandler->requiresFullScreenForVideoPlayback() : false;
+#endif
+#if USE(GSTREAMER)
+ return false;
+#endif
}
-bool FullScreenVideoQt::requiresFullScreenForVideoPlayback()
+bool FullScreenVideoQt::isValid() const
{
- return m_FullScreenVideoHandler ? m_FullScreenVideoHandler->requiresFullScreenForVideoPlayback() : false;
+#if USE(QT_MULTIMEDIA)
+ return m_FullScreenVideoHandler;
+#endif
+#if USE(GSTREAMER)
+ return m_FullScreenVideoHandlerGStreamer;
+#endif
}
}
diff --git a/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.h b/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.h
index a48a882..fda153d 100644
--- a/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.h
@@ -22,6 +22,7 @@
#include "qwebkitplatformplugin.h"
#include <QObject>
+#include <wtf/Platform.h>
QT_BEGIN_NAMESPACE
class QGraphicsVideoItem;
@@ -34,8 +35,35 @@ class ChromeClientQt;
class FullScreenVideoWidget;
class HTMLVideoElement;
class Node;
+#if USE(QT_MULTIMEDIA)
class MediaPlayerPrivateQt;
+#endif
+// We do not use ENABLE or USE because moc does not expand these macros.
+#if defined(WTF_USE_GSTREAMER) && WTF_USE_GSTREAMER
+class FullScreenVideoWindow;
+
+class GStreamerFullScreenVideoHandler : public QObject {
+ Q_OBJECT
+public:
+ GStreamerFullScreenVideoHandler();
+ ~GStreamerFullScreenVideoHandler() { }
+ void setVideoElement(HTMLVideoElement*);
+
+ void enterFullScreen();
+ void exitFullScreen();
+
+public Q_SLOTS:
+ void windowClosed();
+
+private:
+ HTMLVideoElement* m_videoElement;
+ FullScreenVideoWindow* m_fullScreenWidget;
+};
+#endif
+
+// We do not use ENABLE or USE because moc does not expand these macros.
+#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
class DefaultFullScreenVideoHandler : public QWebFullScreenVideoHandler {
Q_OBJECT
public:
@@ -51,6 +79,7 @@ private:
static bool s_shouldForceFullScreenVideoPlayback;
FullScreenVideoWidget *m_fullScreenWidget;
};
+#endif
class FullScreenVideoQt : public QObject {
Q_OBJECT
@@ -61,11 +90,12 @@ public:
virtual void enterFullScreenForNode(Node*);
virtual void exitFullScreenForNode(Node*);
bool requiresFullScreenForVideoPlayback();
- bool isValid() const { return m_FullScreenVideoHandler; }
+ bool isValid() const;
private:
+#if USE(QT_MULTIMEDIA)
MediaPlayerPrivateQt* mediaPlayer();
- MediaPlayerPrivateQt* mediaPlayerForNode(Node* = 0);
+#endif
private slots:
void aboutToClose();
@@ -73,7 +103,12 @@ private slots:
private:
ChromeClientQt* m_chromeClient;
HTMLVideoElement* m_videoElement;
+#if USE(QT_MULTIMEDIA)
QWebFullScreenVideoHandler* m_FullScreenVideoHandler;
+#endif
+#if USE(GSTREAMER)
+ GStreamerFullScreenVideoHandler* m_FullScreenVideoHandlerGStreamer;
+#endif
};
}
diff --git a/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
index 6b557db..36ec697 100644
--- a/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
@@ -32,6 +32,7 @@
#include "InspectorClientQt.h"
#include "Frame.h"
+#include "FrameView.h"
#include "InspectorController.h"
#include "InspectorFrontend.h"
#include "InspectorServerQt.h"
@@ -262,12 +263,17 @@ void InspectorClientQt::detachRemoteFrontend()
void InspectorClientQt::highlight(Node*)
{
- notImplemented();
+ hideHighlight();
}
void InspectorClientQt::hideHighlight()
{
- notImplemented();
+ WebCore::Frame* frame = m_inspectedWebPage->d->page->mainFrame();
+ if (frame) {
+ QRect rect = m_inspectedWebPage->mainFrame()->geometry();
+ if (!rect.isEmpty())
+ frame->view()->invalidateRect(rect);
+ }
}
bool InspectorClientQt::sendMessageToFrontend(const String& message)
diff --git a/Source/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp b/Source/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp
index ea56134..12204ac 100644
--- a/Source/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp
@@ -127,7 +127,7 @@ QWebTouchModifier* QtPlatformPlugin::createTouchModifier()
return p ? static_cast<QWebTouchModifier*>(p->createExtension(QWebKitPlatformPlugin::TouchInteraction)) : 0;
}
-#if ENABLE(VIDEO) && ENABLE(QT_MULTIMEDIA)
+#if ENABLE(VIDEO) && USE(QT_MULTIMEDIA)
QWebFullScreenVideoHandler* QtPlatformPlugin::createFullScreenVideoHandler()
{
QWebKitPlatformPlugin* p = plugin();
diff --git a/Source/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h b/Source/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h
index 71ee2bb..685195d 100644
--- a/Source/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h
+++ b/Source/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h
@@ -29,7 +29,7 @@ class QWebNotificationPresenter;
class QWebHapticFeedbackPlayer;
class QWebSelectData;
class QWebTouchModifier;
-#if ENABLE(VIDEO) && ENABLE(QT_MULTIMEDIA)
+#if ENABLE(VIDEO) && USE(QT_MULTIMEDIA)
class QWebFullScreenVideoHandler;
#endif
@@ -44,7 +44,7 @@ public:
QWebNotificationPresenter* createNotificationPresenter();
QWebHapticFeedbackPlayer* createHapticFeedbackPlayer();
QWebTouchModifier* createTouchModifier();
-#if ENABLE(VIDEO) && ENABLE(QT_MULTIMEDIA)
+#if ENABLE(VIDEO) && USE(QT_MULTIMEDIA)
QWebFullScreenVideoHandler* createFullScreenVideoHandler();
#endif
diff --git a/Source/WebKit/qt/examples/platformplugin/WebPlugin.cpp b/Source/WebKit/qt/examples/platformplugin/WebPlugin.cpp
index 320079f..b3ff4c1 100644
--- a/Source/WebKit/qt/examples/platformplugin/WebPlugin.cpp
+++ b/Source/WebKit/qt/examples/platformplugin/WebPlugin.cpp
@@ -210,7 +210,7 @@ MultipleSelectionPopup::MultipleSelectionPopup(const QWebSelectData& data)
resize(size().width(), visibleItemCount * gMaemoListItemSize);
}
-#if defined(ENABLE_QT_MULTIMEDIA) && ENABLE_QT_MULTIMEDIA
+#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
FullScreenVideoWidget::FullScreenVideoWidget(QMediaPlayer* player)
: QVideoWidget()
, m_mediaPlayer(player)
@@ -286,7 +286,7 @@ bool WebPlugin::supportsExtension(Extension extension) const
#endif
case TouchInteraction:
return true;
-#if defined(ENABLE_QT_MULTIMEDIA) && ENABLE_QT_MULTIMEDIA
+#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
case FullScreenVideoPlayer:
return true;
#endif
@@ -306,7 +306,7 @@ QObject* WebPlugin::createExtension(Extension extension) const
#endif
case TouchInteraction:
return new TouchModifier();
-#if defined(ENABLE_QT_MULTIMEDIA) && ENABLE_QT_MULTIMEDIA
+#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
case FullScreenVideoPlayer:
return new FullScreenVideoHandler();
#endif
diff --git a/Source/WebKit/qt/examples/platformplugin/WebPlugin.h b/Source/WebKit/qt/examples/platformplugin/WebPlugin.h
index 4994669..a739ee9 100644
--- a/Source/WebKit/qt/examples/platformplugin/WebPlugin.h
+++ b/Source/WebKit/qt/examples/platformplugin/WebPlugin.h
@@ -24,7 +24,7 @@
#include "WebNotificationPresenter.h"
#include <QDialog>
-#if defined(ENABLE_QT_MULTIMEDIA) && ENABLE_QT_MULTIMEDIA
+#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
#include <QVideoWidget>
#endif
@@ -97,7 +97,7 @@ public:
}
};
-#if defined(ENABLE_QT_MULTIMEDIA) && ENABLE_QT_MULTIMEDIA
+#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
class FullScreenVideoWidget : public QVideoWidget {
Q_OBJECT
public:
diff --git a/Source/WebKit/qt/examples/platformplugin/platformplugin.pro b/Source/WebKit/qt/examples/platformplugin/platformplugin.pro
index ccc0b3a..80cecb3 100644
--- a/Source/WebKit/qt/examples/platformplugin/platformplugin.pro
+++ b/Source/WebKit/qt/examples/platformplugin/platformplugin.pro
@@ -14,8 +14,8 @@ load(mobilityconfig, true)
MOBILITY += multimedia
DEFINES -= ENABLE_VIDEO=0
DEFINES += ENABLE_VIDEO=1
- DEFINES -= ENABLE_QT_MULTIMEDIA=0
- DEFINES += ENABLE_QT_MULTIMEDIA=1
+ DEFINES -= WTF_USE_QT_MULTIMEDIA=0
+ DEFINES += WTF_USE_QT_MULTIMEDIA=1
}
}
diff --git a/Source/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h b/Source/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
index 2a94e0c..7a76fe7 100644
--- a/Source/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
+++ b/Source/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
@@ -28,7 +28,7 @@
#include <QObject>
#include <QUrl>
-#if defined(ENABLE_QT_MULTIMEDIA) && ENABLE_QT_MULTIMEDIA
+#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
#include <QMediaPlayer>
#endif
@@ -118,7 +118,7 @@ public:
virtual unsigned hitTestPaddingForTouch(const PaddingDirection) const = 0;
};
-#if defined(ENABLE_QT_MULTIMEDIA) && ENABLE_QT_MULTIMEDIA
+#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
class QWebFullScreenVideoHandler : public QObject {
Q_OBJECT
public:
diff --git a/Source/WebKit/qt/tests/MIMESniffing/MIMESniffing.pro b/Source/WebKit/qt/tests/MIMESniffing/MIMESniffing.pro
new file mode 100644
index 0000000..53d80c8
--- /dev/null
+++ b/Source/WebKit/qt/tests/MIMESniffing/MIMESniffing.pro
@@ -0,0 +1,19 @@
+isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
+include(../tests.pri)
+TARGET = MIMESniffing
+CONFIG += console
+
+SOURCES += ../../../../WebCore/platform/network/MIMESniffing.cpp
+HEADERS += \
+ ../../../../WebCore/platform/network/MIMESniffing.h \
+ TestData.h
+
+INCLUDEPATH += \
+ ../../../../WebCore/platform/network \
+ ../../../../JavaScriptCore
+
+debug {
+ SOURCES += ../../../../JavaScriptCore/wtf/Assertions.cpp
+}
+
+RESOURCES += resources.qrc
diff --git a/Source/WebKit/qt/tests/MIMESniffing/TestData.h b/Source/WebKit/qt/tests/MIMESniffing/TestData.h
new file mode 100644
index 0000000..c04bd6b
--- /dev/null
+++ b/Source/WebKit/qt/tests/MIMESniffing/TestData.h
@@ -0,0 +1,984 @@
+/*
+ Copyright (C) 2011 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 TestData_h
+#define TestData_h
+
+typedef struct _TestData {
+ const char* file;
+ const char* advertisedType;
+ bool isImage;
+ const char* sniffedType;
+} TestData;
+
+static const TestData testList[] = {
+ {":/application_atom+xml", "text/plain", false, "text/plain"},
+ {":/application_atom+xml", "text/plain", true, "text/plain"},
+ {":/application_atom+xml", "unknown/unknown", false, "text/xml"},
+ {":/application_atom+xml", "unknown/unknown", true, "text/xml"},
+ {":/application_atom+xml", "application/unknown", false, "text/xml"},
+ {":/application_atom+xml", "application/unknown", true, "text/xml"},
+ {":/application_atom+xml", "*/*", false, "text/xml"},
+ {":/application_atom+xml", "*/*", true, "text/xml"},
+ {":/application_atom+xml", "text/xml", false, 0},
+ {":/application_atom+xml", "text/xml", true, 0},
+ {":/application_atom+xml", "application/xml", false, 0},
+ {":/application_atom+xml", "application/xml", true, 0},
+ {":/application_atom+xml", "text/html", false, "application/atom+xml"},
+ {":/application_atom+xml", "text/html", true, 0},
+ {":/application_atom+xml", "text/xml", false, 0},
+ {":/application_atom+xml", "text/xml", true, 0},
+ {":/application_atom+xml", "application/pdf", false, 0},
+ {":/application_atom+xml", "application/pdf", true, 0},
+ {":/application_atom+xml", "application/postscript", false, 0},
+ {":/application_atom+xml", "application/postscript", true, 0},
+ {":/application_atom+xml", "application/ogg", false, 0},
+ {":/application_atom+xml", "application/ogg", true, 0},
+ {":/application_atom+xml", "video/webm", false, 0},
+ {":/application_atom+xml", "video/webm", true, 0},
+ {":/application_atom+xml", "application/x-rar-compressed", false, 0},
+ {":/application_atom+xml", "application/x-rar-compressed", true, 0},
+ {":/application_atom+xml", "application/zip", false, 0},
+ {":/application_atom+xml", "application/zip", true, 0},
+ {":/application_atom+xml", "application/x-gzip", false, 0},
+ {":/application_atom+xml", "application/x-gzip", true, 0},
+ {":/application_atom+xml", "audio/x-wave", false, 0},
+ {":/application_atom+xml", "audio/x-wave", true, 0},
+ {":/application_atom+xml", "image/webp", false, 0},
+ {":/application_atom+xml", "image/webp", true, 0},
+ {":/application_atom+xml", "image/gif", false, 0},
+ {":/application_atom+xml", "image/gif", true, 0},
+ {":/application_atom+xml", "image/png", false, 0},
+ {":/application_atom+xml", "image/png", true, 0},
+ {":/application_atom+xml", "image/jpeg", false, 0},
+ {":/application_atom+xml", "image/jpeg", true, 0},
+ {":/application_atom+xml", "image/bmp", false, 0},
+ {":/application_atom+xml", "image/bmp", true, 0},
+ {":/application_atom+xml", "image/vnd.microsoft.icon", false, 0},
+ {":/application_atom+xml", "image/vnd.microsoft.icon", true, 0},
+ {":/application_atom+xml", "application/rdf+xml", false, 0},
+ {":/application_atom+xml", "application/rdf+xml", true, 0},
+ {":/application_atom+xml", "application/rss+xml", false, 0},
+ {":/application_atom+xml", "application/rss+xml", true, 0},
+ {":/application_atom+xml", "application/atom+xml", false, 0},
+ {":/application_atom+xml", "application/atom+xml", true, 0},
+ {":/application_ogg", "text/plain", false, "application/ogg"},
+ {":/application_ogg", "text/plain", true, "application/ogg"},
+ {":/application_ogg", "unknown/unknown", false, "application/ogg"},
+ {":/application_ogg", "unknown/unknown", true, "application/ogg"},
+ {":/application_ogg", "application/unknown", false, "application/ogg"},
+ {":/application_ogg", "application/unknown", true, "application/ogg"},
+ {":/application_ogg", "*/*", false, "application/ogg"},
+ {":/application_ogg", "*/*", true, "application/ogg"},
+ {":/application_ogg", "text/xml", false, 0},
+ {":/application_ogg", "text/xml", true, 0},
+ {":/application_ogg", "application/xml", false, 0},
+ {":/application_ogg", "application/xml", true, 0},
+ {":/application_ogg", "text/html", false, 0},
+ {":/application_ogg", "text/html", true, 0},
+ {":/application_ogg", "text/xml", false, 0},
+ {":/application_ogg", "text/xml", true, 0},
+ {":/application_ogg", "application/pdf", false, 0},
+ {":/application_ogg", "application/pdf", true, 0},
+ {":/application_ogg", "application/postscript", false, 0},
+ {":/application_ogg", "application/postscript", true, 0},
+ {":/application_ogg", "application/ogg", false, 0},
+ {":/application_ogg", "application/ogg", true, 0},
+ {":/application_ogg", "video/webm", false, 0},
+ {":/application_ogg", "video/webm", true, 0},
+ {":/application_ogg", "application/x-rar-compressed", false, 0},
+ {":/application_ogg", "application/x-rar-compressed", true, 0},
+ {":/application_ogg", "application/zip", false, 0},
+ {":/application_ogg", "application/zip", true, 0},
+ {":/application_ogg", "application/x-gzip", false, 0},
+ {":/application_ogg", "application/x-gzip", true, 0},
+ {":/application_ogg", "audio/x-wave", false, 0},
+ {":/application_ogg", "audio/x-wave", true, 0},
+ {":/application_ogg", "image/webp", false, 0},
+ {":/application_ogg", "image/webp", true, 0},
+ {":/application_ogg", "image/gif", false, 0},
+ {":/application_ogg", "image/gif", true, 0},
+ {":/application_ogg", "image/png", false, 0},
+ {":/application_ogg", "image/png", true, 0},
+ {":/application_ogg", "image/jpeg", false, 0},
+ {":/application_ogg", "image/jpeg", true, 0},
+ {":/application_ogg", "image/bmp", false, 0},
+ {":/application_ogg", "image/bmp", true, 0},
+ {":/application_ogg", "image/vnd.microsoft.icon", false, 0},
+ {":/application_ogg", "image/vnd.microsoft.icon", true, 0},
+ {":/application_ogg", "application/rdf+xml", false, 0},
+ {":/application_ogg", "application/rdf+xml", true, 0},
+ {":/application_ogg", "application/rss+xml", false, 0},
+ {":/application_ogg", "application/rss+xml", true, 0},
+ {":/application_ogg", "application/atom+xml", false, 0},
+ {":/application_ogg", "application/atom+xml", true, 0},
+ {":/application_pdf", "text/plain", false, "application/octet-stream"},
+ {":/application_pdf", "text/plain", true, "application/octet-stream"},
+ {":/application_pdf", "unknown/unknown", false, "application/pdf"},
+ {":/application_pdf", "unknown/unknown", true, "application/pdf"},
+ {":/application_pdf", "application/unknown", false, "application/pdf"},
+ {":/application_pdf", "application/unknown", true, "application/pdf"},
+ {":/application_pdf", "*/*", false, "application/pdf"},
+ {":/application_pdf", "*/*", true, "application/pdf"},
+ {":/application_pdf", "text/xml", false, 0},
+ {":/application_pdf", "text/xml", true, 0},
+ {":/application_pdf", "application/xml", false, 0},
+ {":/application_pdf", "application/xml", true, 0},
+ {":/application_pdf", "text/html", false, 0},
+ {":/application_pdf", "text/html", true, 0},
+ {":/application_pdf", "text/xml", false, 0},
+ {":/application_pdf", "text/xml", true, 0},
+ {":/application_pdf", "application/pdf", false, 0},
+ {":/application_pdf", "application/pdf", true, 0},
+ {":/application_pdf", "application/postscript", false, 0},
+ {":/application_pdf", "application/postscript", true, 0},
+ {":/application_pdf", "application/ogg", false, 0},
+ {":/application_pdf", "application/ogg", true, 0},
+ {":/application_pdf", "video/webm", false, 0},
+ {":/application_pdf", "video/webm", true, 0},
+ {":/application_pdf", "application/x-rar-compressed", false, 0},
+ {":/application_pdf", "application/x-rar-compressed", true, 0},
+ {":/application_pdf", "application/zip", false, 0},
+ {":/application_pdf", "application/zip", true, 0},
+ {":/application_pdf", "application/x-gzip", false, 0},
+ {":/application_pdf", "application/x-gzip", true, 0},
+ {":/application_pdf", "audio/x-wave", false, 0},
+ {":/application_pdf", "audio/x-wave", true, 0},
+ {":/application_pdf", "image/webp", false, 0},
+ {":/application_pdf", "image/webp", true, 0},
+ {":/application_pdf", "image/gif", false, 0},
+ {":/application_pdf", "image/gif", true, 0},
+ {":/application_pdf", "image/png", false, 0},
+ {":/application_pdf", "image/png", true, 0},
+ {":/application_pdf", "image/jpeg", false, 0},
+ {":/application_pdf", "image/jpeg", true, 0},
+ {":/application_pdf", "image/bmp", false, 0},
+ {":/application_pdf", "image/bmp", true, 0},
+ {":/application_pdf", "image/vnd.microsoft.icon", false, 0},
+ {":/application_pdf", "image/vnd.microsoft.icon", true, 0},
+ {":/application_pdf", "application/rdf+xml", false, 0},
+ {":/application_pdf", "application/rdf+xml", true, 0},
+ {":/application_pdf", "application/rss+xml", false, 0},
+ {":/application_pdf", "application/rss+xml", true, 0},
+ {":/application_pdf", "application/atom+xml", false, 0},
+ {":/application_pdf", "application/atom+xml", true, 0},
+ {":/application_postscript", "text/plain", false, "text/plain"},
+ {":/application_postscript", "text/plain", true, "text/plain"},
+ {":/application_postscript", "unknown/unknown", false, "application/postscript"},
+ {":/application_postscript", "unknown/unknown", true, "application/postscript"},
+ {":/application_postscript", "application/unknown", false, "application/postscript"},
+ {":/application_postscript", "application/unknown", true, "application/postscript"},
+ {":/application_postscript", "*/*", false, "application/postscript"},
+ {":/application_postscript", "*/*", true, "application/postscript"},
+ {":/application_postscript", "text/xml", false, 0},
+ {":/application_postscript", "text/xml", true, 0},
+ {":/application_postscript", "application/xml", false, 0},
+ {":/application_postscript", "application/xml", true, 0},
+ {":/application_postscript", "text/html", false, 0},
+ {":/application_postscript", "text/html", true, 0},
+ {":/application_postscript", "text/xml", false, 0},
+ {":/application_postscript", "text/xml", true, 0},
+ {":/application_postscript", "application/pdf", false, 0},
+ {":/application_postscript", "application/pdf", true, 0},
+ {":/application_postscript", "application/postscript", false, 0},
+ {":/application_postscript", "application/postscript", true, 0},
+ {":/application_postscript", "application/ogg", false, 0},
+ {":/application_postscript", "application/ogg", true, 0},
+ {":/application_postscript", "video/webm", false, 0},
+ {":/application_postscript", "video/webm", true, 0},
+ {":/application_postscript", "application/x-rar-compressed", false, 0},
+ {":/application_postscript", "application/x-rar-compressed", true, 0},
+ {":/application_postscript", "application/zip", false, 0},
+ {":/application_postscript", "application/zip", true, 0},
+ {":/application_postscript", "application/x-gzip", false, 0},
+ {":/application_postscript", "application/x-gzip", true, 0},
+ {":/application_postscript", "audio/x-wave", false, 0},
+ {":/application_postscript", "audio/x-wave", true, 0},
+ {":/application_postscript", "image/webp", false, 0},
+ {":/application_postscript", "image/webp", true, 0},
+ {":/application_postscript", "image/gif", false, 0},
+ {":/application_postscript", "image/gif", true, 0},
+ {":/application_postscript", "image/png", false, 0},
+ {":/application_postscript", "image/png", true, 0},
+ {":/application_postscript", "image/jpeg", false, 0},
+ {":/application_postscript", "image/jpeg", true, 0},
+ {":/application_postscript", "image/bmp", false, 0},
+ {":/application_postscript", "image/bmp", true, 0},
+ {":/application_postscript", "image/vnd.microsoft.icon", false, 0},
+ {":/application_postscript", "image/vnd.microsoft.icon", true, 0},
+ {":/application_postscript", "application/rdf+xml", false, 0},
+ {":/application_postscript", "application/rdf+xml", true, 0},
+ {":/application_postscript", "application/rss+xml", false, 0},
+ {":/application_postscript", "application/rss+xml", true, 0},
+ {":/application_postscript", "application/atom+xml", false, 0},
+ {":/application_postscript", "application/atom+xml", true, 0},
+ {":/application_rdf+xml", "text/plain", false, "text/plain"},
+ {":/application_rdf+xml", "text/plain", true, "text/plain"},
+ {":/application_rdf+xml", "unknown/unknown", false, "text/xml"},
+ {":/application_rdf+xml", "unknown/unknown", true, "text/xml"},
+ {":/application_rdf+xml", "application/unknown", false, "text/xml"},
+ {":/application_rdf+xml", "application/unknown", true, "text/xml"},
+ {":/application_rdf+xml", "*/*", false, "text/xml"},
+ {":/application_rdf+xml", "*/*", true, "text/xml"},
+ {":/application_rdf+xml", "text/xml", false, 0},
+ {":/application_rdf+xml", "text/xml", true, 0},
+ {":/application_rdf+xml", "application/xml", false, 0},
+ {":/application_rdf+xml", "application/xml", true, 0},
+ {":/application_rdf+xml", "text/html", false, "application/rdf+xml"},
+ {":/application_rdf+xml", "text/html", true, 0},
+ {":/application_rdf+xml", "text/xml", false, 0},
+ {":/application_rdf+xml", "text/xml", true, 0},
+ {":/application_rdf+xml", "application/pdf", false, 0},
+ {":/application_rdf+xml", "application/pdf", true, 0},
+ {":/application_rdf+xml", "application/postscript", false, 0},
+ {":/application_rdf+xml", "application/postscript", true, 0},
+ {":/application_rdf+xml", "application/ogg", false, 0},
+ {":/application_rdf+xml", "application/ogg", true, 0},
+ {":/application_rdf+xml", "video/webm", false, 0},
+ {":/application_rdf+xml", "video/webm", true, 0},
+ {":/application_rdf+xml", "application/x-rar-compressed", false, 0},
+ {":/application_rdf+xml", "application/x-rar-compressed", true, 0},
+ {":/application_rdf+xml", "application/zip", false, 0},
+ {":/application_rdf+xml", "application/zip", true, 0},
+ {":/application_rdf+xml", "application/x-gzip", false, 0},
+ {":/application_rdf+xml", "application/x-gzip", true, 0},
+ {":/application_rdf+xml", "audio/x-wave", false, 0},
+ {":/application_rdf+xml", "audio/x-wave", true, 0},
+ {":/application_rdf+xml", "image/webp", false, 0},
+ {":/application_rdf+xml", "image/webp", true, 0},
+ {":/application_rdf+xml", "image/gif", false, 0},
+ {":/application_rdf+xml", "image/gif", true, 0},
+ {":/application_rdf+xml", "image/png", false, 0},
+ {":/application_rdf+xml", "image/png", true, 0},
+ {":/application_rdf+xml", "image/jpeg", false, 0},
+ {":/application_rdf+xml", "image/jpeg", true, 0},
+ {":/application_rdf+xml", "image/bmp", false, 0},
+ {":/application_rdf+xml", "image/bmp", true, 0},
+ {":/application_rdf+xml", "image/vnd.microsoft.icon", false, 0},
+ {":/application_rdf+xml", "image/vnd.microsoft.icon", true, 0},
+ {":/application_rdf+xml", "application/rdf+xml", false, 0},
+ {":/application_rdf+xml", "application/rdf+xml", true, 0},
+ {":/application_rdf+xml", "application/rss+xml", false, 0},
+ {":/application_rdf+xml", "application/rss+xml", true, 0},
+ {":/application_rdf+xml", "application/atom+xml", false, 0},
+ {":/application_rdf+xml", "application/atom+xml", true, 0},
+ {":/application_rss+xml", "text/plain", false, "text/plain"},
+ {":/application_rss+xml", "text/plain", true, "text/plain"},
+ {":/application_rss+xml", "unknown/unknown", false, "text/xml"},
+ {":/application_rss+xml", "unknown/unknown", true, "text/xml"},
+ {":/application_rss+xml", "application/unknown", false, "text/xml"},
+ {":/application_rss+xml", "application/unknown", true, "text/xml"},
+ {":/application_rss+xml", "*/*", false, "text/xml"},
+ {":/application_rss+xml", "*/*", true, "text/xml"},
+ {":/application_rss+xml", "text/xml", false, 0},
+ {":/application_rss+xml", "text/xml", true, 0},
+ {":/application_rss+xml", "application/xml", false, 0},
+ {":/application_rss+xml", "application/xml", true, 0},
+ {":/application_rss+xml", "text/html", false, "application/rss+xml"},
+ {":/application_rss+xml", "text/html", true, 0},
+ {":/application_rss+xml", "text/xml", false, 0},
+ {":/application_rss+xml", "text/xml", true, 0},
+ {":/application_rss+xml", "application/pdf", false, 0},
+ {":/application_rss+xml", "application/pdf", true, 0},
+ {":/application_rss+xml", "application/postscript", false, 0},
+ {":/application_rss+xml", "application/postscript", true, 0},
+ {":/application_rss+xml", "application/ogg", false, 0},
+ {":/application_rss+xml", "application/ogg", true, 0},
+ {":/application_rss+xml", "video/webm", false, 0},
+ {":/application_rss+xml", "video/webm", true, 0},
+ {":/application_rss+xml", "application/x-rar-compressed", false, 0},
+ {":/application_rss+xml", "application/x-rar-compressed", true, 0},
+ {":/application_rss+xml", "application/zip", false, 0},
+ {":/application_rss+xml", "application/zip", true, 0},
+ {":/application_rss+xml", "application/x-gzip", false, 0},
+ {":/application_rss+xml", "application/x-gzip", true, 0},
+ {":/application_rss+xml", "audio/x-wave", false, 0},
+ {":/application_rss+xml", "audio/x-wave", true, 0},
+ {":/application_rss+xml", "image/webp", false, 0},
+ {":/application_rss+xml", "image/webp", true, 0},
+ {":/application_rss+xml", "image/gif", false, 0},
+ {":/application_rss+xml", "image/gif", true, 0},
+ {":/application_rss+xml", "image/png", false, 0},
+ {":/application_rss+xml", "image/png", true, 0},
+ {":/application_rss+xml", "image/jpeg", false, 0},
+ {":/application_rss+xml", "image/jpeg", true, 0},
+ {":/application_rss+xml", "image/bmp", false, 0},
+ {":/application_rss+xml", "image/bmp", true, 0},
+ {":/application_rss+xml", "image/vnd.microsoft.icon", false, 0},
+ {":/application_rss+xml", "image/vnd.microsoft.icon", true, 0},
+ {":/application_rss+xml", "application/rdf+xml", false, 0},
+ {":/application_rss+xml", "application/rdf+xml", true, 0},
+ {":/application_rss+xml", "application/rss+xml", false, 0},
+ {":/application_rss+xml", "application/rss+xml", true, 0},
+ {":/application_rss+xml", "application/atom+xml", false, 0},
+ {":/application_rss+xml", "application/atom+xml", true, 0},
+ {":/application_x-gzip", "text/plain", false, "application/x-gzip"},
+ {":/application_x-gzip", "text/plain", true, "application/x-gzip"},
+ {":/application_x-gzip", "unknown/unknown", false, "application/x-gzip"},
+ {":/application_x-gzip", "unknown/unknown", true, "application/x-gzip"},
+ {":/application_x-gzip", "application/unknown", false, "application/x-gzip"},
+ {":/application_x-gzip", "application/unknown", true, "application/x-gzip"},
+ {":/application_x-gzip", "*/*", false, "application/x-gzip"},
+ {":/application_x-gzip", "*/*", true, "application/x-gzip"},
+ {":/application_x-gzip", "text/xml", false, 0},
+ {":/application_x-gzip", "text/xml", true, 0},
+ {":/application_x-gzip", "application/xml", false, 0},
+ {":/application_x-gzip", "application/xml", true, 0},
+ {":/application_x-gzip", "text/html", false, 0},
+ {":/application_x-gzip", "text/html", true, 0},
+ {":/application_x-gzip", "text/xml", false, 0},
+ {":/application_x-gzip", "text/xml", true, 0},
+ {":/application_x-gzip", "application/pdf", false, 0},
+ {":/application_x-gzip", "application/pdf", true, 0},
+ {":/application_x-gzip", "application/postscript", false, 0},
+ {":/application_x-gzip", "application/postscript", true, 0},
+ {":/application_x-gzip", "application/ogg", false, 0},
+ {":/application_x-gzip", "application/ogg", true, 0},
+ {":/application_x-gzip", "video/webm", false, 0},
+ {":/application_x-gzip", "video/webm", true, 0},
+ {":/application_x-gzip", "application/x-rar-compressed", false, 0},
+ {":/application_x-gzip", "application/x-rar-compressed", true, 0},
+ {":/application_x-gzip", "application/zip", false, 0},
+ {":/application_x-gzip", "application/zip", true, 0},
+ {":/application_x-gzip", "application/x-gzip", false, 0},
+ {":/application_x-gzip", "application/x-gzip", true, 0},
+ {":/application_x-gzip", "audio/x-wave", false, 0},
+ {":/application_x-gzip", "audio/x-wave", true, 0},
+ {":/application_x-gzip", "image/webp", false, 0},
+ {":/application_x-gzip", "image/webp", true, 0},
+ {":/application_x-gzip", "image/gif", false, 0},
+ {":/application_x-gzip", "image/gif", true, 0},
+ {":/application_x-gzip", "image/png", false, 0},
+ {":/application_x-gzip", "image/png", true, 0},
+ {":/application_x-gzip", "image/jpeg", false, 0},
+ {":/application_x-gzip", "image/jpeg", true, 0},
+ {":/application_x-gzip", "image/bmp", false, 0},
+ {":/application_x-gzip", "image/bmp", true, 0},
+ {":/application_x-gzip", "image/vnd.microsoft.icon", false, 0},
+ {":/application_x-gzip", "image/vnd.microsoft.icon", true, 0},
+ {":/application_x-gzip", "application/rdf+xml", false, 0},
+ {":/application_x-gzip", "application/rdf+xml", true, 0},
+ {":/application_x-gzip", "application/rss+xml", false, 0},
+ {":/application_x-gzip", "application/rss+xml", true, 0},
+ {":/application_x-gzip", "application/atom+xml", false, 0},
+ {":/application_x-gzip", "application/atom+xml", true, 0},
+ {":/application_x-rar-compressed", "text/plain", false, "application/x-rar-compressed"},
+ {":/application_x-rar-compressed", "text/plain", true, "application/x-rar-compressed"},
+ {":/application_x-rar-compressed", "unknown/unknown", false, "application/x-rar-compressed"},
+ {":/application_x-rar-compressed", "unknown/unknown", true, "application/x-rar-compressed"},
+ {":/application_x-rar-compressed", "application/unknown", false, "application/x-rar-compressed"},
+ {":/application_x-rar-compressed", "application/unknown", true, "application/x-rar-compressed"},
+ {":/application_x-rar-compressed", "*/*", false, "application/x-rar-compressed"},
+ {":/application_x-rar-compressed", "*/*", true, "application/x-rar-compressed"},
+ {":/application_x-rar-compressed", "text/xml", false, 0},
+ {":/application_x-rar-compressed", "text/xml", true, 0},
+ {":/application_x-rar-compressed", "application/xml", false, 0},
+ {":/application_x-rar-compressed", "application/xml", true, 0},
+ {":/application_x-rar-compressed", "text/html", false, 0},
+ {":/application_x-rar-compressed", "text/html", true, 0},
+ {":/application_x-rar-compressed", "text/xml", false, 0},
+ {":/application_x-rar-compressed", "text/xml", true, 0},
+ {":/application_x-rar-compressed", "application/pdf", false, 0},
+ {":/application_x-rar-compressed", "application/pdf", true, 0},
+ {":/application_x-rar-compressed", "application/postscript", false, 0},
+ {":/application_x-rar-compressed", "application/postscript", true, 0},
+ {":/application_x-rar-compressed", "application/ogg", false, 0},
+ {":/application_x-rar-compressed", "application/ogg", true, 0},
+ {":/application_x-rar-compressed", "video/webm", false, 0},
+ {":/application_x-rar-compressed", "video/webm", true, 0},
+ {":/application_x-rar-compressed", "application/x-rar-compressed", false, 0},
+ {":/application_x-rar-compressed", "application/x-rar-compressed", true, 0},
+ {":/application_x-rar-compressed", "application/zip", false, 0},
+ {":/application_x-rar-compressed", "application/zip", true, 0},
+ {":/application_x-rar-compressed", "application/x-gzip", false, 0},
+ {":/application_x-rar-compressed", "application/x-gzip", true, 0},
+ {":/application_x-rar-compressed", "audio/x-wave", false, 0},
+ {":/application_x-rar-compressed", "audio/x-wave", true, 0},
+ {":/application_x-rar-compressed", "image/webp", false, 0},
+ {":/application_x-rar-compressed", "image/webp", true, 0},
+ {":/application_x-rar-compressed", "image/gif", false, 0},
+ {":/application_x-rar-compressed", "image/gif", true, 0},
+ {":/application_x-rar-compressed", "image/png", false, 0},
+ {":/application_x-rar-compressed", "image/png", true, 0},
+ {":/application_x-rar-compressed", "image/jpeg", false, 0},
+ {":/application_x-rar-compressed", "image/jpeg", true, 0},
+ {":/application_x-rar-compressed", "image/bmp", false, 0},
+ {":/application_x-rar-compressed", "image/bmp", true, 0},
+ {":/application_x-rar-compressed", "image/vnd.microsoft.icon", false, 0},
+ {":/application_x-rar-compressed", "image/vnd.microsoft.icon", true, 0},
+ {":/application_x-rar-compressed", "application/rdf+xml", false, 0},
+ {":/application_x-rar-compressed", "application/rdf+xml", true, 0},
+ {":/application_x-rar-compressed", "application/rss+xml", false, 0},
+ {":/application_x-rar-compressed", "application/rss+xml", true, 0},
+ {":/application_x-rar-compressed", "application/atom+xml", false, 0},
+ {":/application_x-rar-compressed", "application/atom+xml", true, 0},
+ {":/application_zip", "text/plain", false, "application/zip"},
+ {":/application_zip", "text/plain", true, "application/zip"},
+ {":/application_zip", "unknown/unknown", false, "application/zip"},
+ {":/application_zip", "unknown/unknown", true, "application/zip"},
+ {":/application_zip", "application/unknown", false, "application/zip"},
+ {":/application_zip", "application/unknown", true, "application/zip"},
+ {":/application_zip", "*/*", false, "application/zip"},
+ {":/application_zip", "*/*", true, "application/zip"},
+ {":/application_zip", "text/xml", false, 0},
+ {":/application_zip", "text/xml", true, 0},
+ {":/application_zip", "application/xml", false, 0},
+ {":/application_zip", "application/xml", true, 0},
+ {":/application_zip", "text/html", false, 0},
+ {":/application_zip", "text/html", true, 0},
+ {":/application_zip", "text/xml", false, 0},
+ {":/application_zip", "text/xml", true, 0},
+ {":/application_zip", "application/pdf", false, 0},
+ {":/application_zip", "application/pdf", true, 0},
+ {":/application_zip", "application/postscript", false, 0},
+ {":/application_zip", "application/postscript", true, 0},
+ {":/application_zip", "application/ogg", false, 0},
+ {":/application_zip", "application/ogg", true, 0},
+ {":/application_zip", "video/webm", false, 0},
+ {":/application_zip", "video/webm", true, 0},
+ {":/application_zip", "application/x-rar-compressed", false, 0},
+ {":/application_zip", "application/x-rar-compressed", true, 0},
+ {":/application_zip", "application/zip", false, 0},
+ {":/application_zip", "application/zip", true, 0},
+ {":/application_zip", "application/x-gzip", false, 0},
+ {":/application_zip", "application/x-gzip", true, 0},
+ {":/application_zip", "audio/x-wave", false, 0},
+ {":/application_zip", "audio/x-wave", true, 0},
+ {":/application_zip", "image/webp", false, 0},
+ {":/application_zip", "image/webp", true, 0},
+ {":/application_zip", "image/gif", false, 0},
+ {":/application_zip", "image/gif", true, 0},
+ {":/application_zip", "image/png", false, 0},
+ {":/application_zip", "image/png", true, 0},
+ {":/application_zip", "image/jpeg", false, 0},
+ {":/application_zip", "image/jpeg", true, 0},
+ {":/application_zip", "image/bmp", false, 0},
+ {":/application_zip", "image/bmp", true, 0},
+ {":/application_zip", "image/vnd.microsoft.icon", false, 0},
+ {":/application_zip", "image/vnd.microsoft.icon", true, 0},
+ {":/application_zip", "application/rdf+xml", false, 0},
+ {":/application_zip", "application/rdf+xml", true, 0},
+ {":/application_zip", "application/rss+xml", false, 0},
+ {":/application_zip", "application/rss+xml", true, 0},
+ {":/application_zip", "application/atom+xml", false, 0},
+ {":/application_zip", "application/atom+xml", true, 0},
+ {":/audio_x-wave", "text/plain", false, "audio/x-wave"},
+ {":/audio_x-wave", "text/plain", true, "audio/x-wave"},
+ {":/audio_x-wave", "unknown/unknown", false, "audio/x-wave"},
+ {":/audio_x-wave", "unknown/unknown", true, "audio/x-wave"},
+ {":/audio_x-wave", "application/unknown", false, "audio/x-wave"},
+ {":/audio_x-wave", "application/unknown", true, "audio/x-wave"},
+ {":/audio_x-wave", "*/*", false, "audio/x-wave"},
+ {":/audio_x-wave", "*/*", true, "audio/x-wave"},
+ {":/audio_x-wave", "text/xml", false, 0},
+ {":/audio_x-wave", "text/xml", true, 0},
+ {":/audio_x-wave", "application/xml", false, 0},
+ {":/audio_x-wave", "application/xml", true, 0},
+ {":/audio_x-wave", "text/html", false, 0},
+ {":/audio_x-wave", "text/html", true, 0},
+ {":/audio_x-wave", "text/xml", false, 0},
+ {":/audio_x-wave", "text/xml", true, 0},
+ {":/audio_x-wave", "application/pdf", false, 0},
+ {":/audio_x-wave", "application/pdf", true, 0},
+ {":/audio_x-wave", "application/postscript", false, 0},
+ {":/audio_x-wave", "application/postscript", true, 0},
+ {":/audio_x-wave", "application/ogg", false, 0},
+ {":/audio_x-wave", "application/ogg", true, 0},
+ {":/audio_x-wave", "video/webm", false, 0},
+ {":/audio_x-wave", "video/webm", true, 0},
+ {":/audio_x-wave", "application/x-rar-compressed", false, 0},
+ {":/audio_x-wave", "application/x-rar-compressed", true, 0},
+ {":/audio_x-wave", "application/zip", false, 0},
+ {":/audio_x-wave", "application/zip", true, 0},
+ {":/audio_x-wave", "application/x-gzip", false, 0},
+ {":/audio_x-wave", "application/x-gzip", true, 0},
+ {":/audio_x-wave", "audio/x-wave", false, 0},
+ {":/audio_x-wave", "audio/x-wave", true, 0},
+ {":/audio_x-wave", "image/webp", false, 0},
+ {":/audio_x-wave", "image/webp", true, 0},
+ {":/audio_x-wave", "image/gif", false, 0},
+ {":/audio_x-wave", "image/gif", true, 0},
+ {":/audio_x-wave", "image/png", false, 0},
+ {":/audio_x-wave", "image/png", true, 0},
+ {":/audio_x-wave", "image/jpeg", false, 0},
+ {":/audio_x-wave", "image/jpeg", true, 0},
+ {":/audio_x-wave", "image/bmp", false, 0},
+ {":/audio_x-wave", "image/bmp", true, 0},
+ {":/audio_x-wave", "image/vnd.microsoft.icon", false, 0},
+ {":/audio_x-wave", "image/vnd.microsoft.icon", true, 0},
+ {":/audio_x-wave", "application/rdf+xml", false, 0},
+ {":/audio_x-wave", "application/rdf+xml", true, 0},
+ {":/audio_x-wave", "application/rss+xml", false, 0},
+ {":/audio_x-wave", "application/rss+xml", true, 0},
+ {":/audio_x-wave", "application/atom+xml", false, 0},
+ {":/audio_x-wave", "application/atom+xml", true, 0},
+ {":/image_bmp", "text/plain", false, "image/bmp"},
+ {":/image_bmp", "text/plain", true, "image/bmp"},
+ {":/image_bmp", "unknown/unknown", false, "image/bmp"},
+ {":/image_bmp", "unknown/unknown", true, "image/bmp"},
+ {":/image_bmp", "application/unknown", false, "image/bmp"},
+ {":/image_bmp", "application/unknown", true, "image/bmp"},
+ {":/image_bmp", "*/*", false, "image/bmp"},
+ {":/image_bmp", "*/*", true, "image/bmp"},
+ {":/image_bmp", "text/xml", false, 0},
+ {":/image_bmp", "text/xml", true, 0},
+ {":/image_bmp", "application/xml", false, 0},
+ {":/image_bmp", "application/xml", true, 0},
+ {":/image_bmp", "text/html", false, 0},
+ {":/image_bmp", "text/html", true, "image/bmp"},
+ {":/image_bmp", "text/xml", false, 0},
+ {":/image_bmp", "text/xml", true, 0},
+ {":/image_bmp", "application/pdf", false, 0},
+ {":/image_bmp", "application/pdf", true, "image/bmp"},
+ {":/image_bmp", "application/postscript", false, 0},
+ {":/image_bmp", "application/postscript", true, "image/bmp"},
+ {":/image_bmp", "application/ogg", false, 0},
+ {":/image_bmp", "application/ogg", true, "image/bmp"},
+ {":/image_bmp", "video/webm", false, 0},
+ {":/image_bmp", "video/webm", true, "image/bmp"},
+ {":/image_bmp", "application/x-rar-compressed", false, 0},
+ {":/image_bmp", "application/x-rar-compressed", true, "image/bmp"},
+ {":/image_bmp", "application/zip", false, 0},
+ {":/image_bmp", "application/zip", true, "image/bmp"},
+ {":/image_bmp", "application/x-gzip", false, 0},
+ {":/image_bmp", "application/x-gzip", true, "image/bmp"},
+ {":/image_bmp", "audio/x-wave", false, 0},
+ {":/image_bmp", "audio/x-wave", true, "image/bmp"},
+ {":/image_bmp", "image/webp", false, 0},
+ {":/image_bmp", "image/webp", true, "image/bmp"},
+ {":/image_bmp", "image/gif", false, 0},
+ {":/image_bmp", "image/gif", true, "image/bmp"},
+ {":/image_bmp", "image/png", false, 0},
+ {":/image_bmp", "image/png", true, "image/bmp"},
+ {":/image_bmp", "image/jpeg", false, 0},
+ {":/image_bmp", "image/jpeg", true, "image/bmp"},
+ {":/image_bmp", "image/bmp", false, 0},
+ {":/image_bmp", "image/bmp", true, "image/bmp"},
+ {":/image_bmp", "image/vnd.microsoft.icon", false, 0},
+ {":/image_bmp", "image/vnd.microsoft.icon", true, "image/bmp"},
+ {":/image_bmp", "application/rdf+xml", false, 0},
+ {":/image_bmp", "application/rdf+xml", true, 0},
+ {":/image_bmp", "application/rss+xml", false, 0},
+ {":/image_bmp", "application/rss+xml", true, 0},
+ {":/image_bmp", "application/atom+xml", false, 0},
+ {":/image_bmp", "application/atom+xml", true, 0},
+ {":/image_gif", "text/plain", false, "image/gif"},
+ {":/image_gif", "text/plain", true, "image/gif"},
+ {":/image_gif", "unknown/unknown", false, "image/gif"},
+ {":/image_gif", "unknown/unknown", true, "image/gif"},
+ {":/image_gif", "application/unknown", false, "image/gif"},
+ {":/image_gif", "application/unknown", true, "image/gif"},
+ {":/image_gif", "*/*", false, "image/gif"},
+ {":/image_gif", "*/*", true, "image/gif"},
+ {":/image_gif", "text/xml", false, 0},
+ {":/image_gif", "text/xml", true, 0},
+ {":/image_gif", "application/xml", false, 0},
+ {":/image_gif", "application/xml", true, 0},
+ {":/image_gif", "text/html", false, 0},
+ {":/image_gif", "text/html", true, "image/gif"},
+ {":/image_gif", "text/xml", false, 0},
+ {":/image_gif", "text/xml", true, 0},
+ {":/image_gif", "application/pdf", false, 0},
+ {":/image_gif", "application/pdf", true, "image/gif"},
+ {":/image_gif", "application/postscript", false, 0},
+ {":/image_gif", "application/postscript", true, "image/gif"},
+ {":/image_gif", "application/ogg", false, 0},
+ {":/image_gif", "application/ogg", true, "image/gif"},
+ {":/image_gif", "video/webm", false, 0},
+ {":/image_gif", "video/webm", true, "image/gif"},
+ {":/image_gif", "application/x-rar-compressed", false, 0},
+ {":/image_gif", "application/x-rar-compressed", true, "image/gif"},
+ {":/image_gif", "application/zip", false, 0},
+ {":/image_gif", "application/zip", true, "image/gif"},
+ {":/image_gif", "application/x-gzip", false, 0},
+ {":/image_gif", "application/x-gzip", true, "image/gif"},
+ {":/image_gif", "audio/x-wave", false, 0},
+ {":/image_gif", "audio/x-wave", true, "image/gif"},
+ {":/image_gif", "image/webp", false, 0},
+ {":/image_gif", "image/webp", true, "image/gif"},
+ {":/image_gif", "image/gif", false, 0},
+ {":/image_gif", "image/gif", true, "image/gif"},
+ {":/image_gif", "image/png", false, 0},
+ {":/image_gif", "image/png", true, "image/gif"},
+ {":/image_gif", "image/jpeg", false, 0},
+ {":/image_gif", "image/jpeg", true, "image/gif"},
+ {":/image_gif", "image/bmp", false, 0},
+ {":/image_gif", "image/bmp", true, "image/gif"},
+ {":/image_gif", "image/vnd.microsoft.icon", false, 0},
+ {":/image_gif", "image/vnd.microsoft.icon", true, "image/gif"},
+ {":/image_gif", "application/rdf+xml", false, 0},
+ {":/image_gif", "application/rdf+xml", true, 0},
+ {":/image_gif", "application/rss+xml", false, 0},
+ {":/image_gif", "application/rss+xml", true, 0},
+ {":/image_gif", "application/atom+xml", false, 0},
+ {":/image_gif", "application/atom+xml", true, 0},
+ {":/image_jpeg", "text/plain", false, "image/jpeg"},
+ {":/image_jpeg", "text/plain", true, "image/jpeg"},
+ {":/image_jpeg", "unknown/unknown", false, "image/jpeg"},
+ {":/image_jpeg", "unknown/unknown", true, "image/jpeg"},
+ {":/image_jpeg", "application/unknown", false, "image/jpeg"},
+ {":/image_jpeg", "application/unknown", true, "image/jpeg"},
+ {":/image_jpeg", "*/*", false, "image/jpeg"},
+ {":/image_jpeg", "*/*", true, "image/jpeg"},
+ {":/image_jpeg", "text/xml", false, 0},
+ {":/image_jpeg", "text/xml", true, 0},
+ {":/image_jpeg", "application/xml", false, 0},
+ {":/image_jpeg", "application/xml", true, 0},
+ {":/image_jpeg", "text/html", false, 0},
+ {":/image_jpeg", "text/html", true, "image/jpeg"},
+ {":/image_jpeg", "text/xml", false, 0},
+ {":/image_jpeg", "text/xml", true, 0},
+ {":/image_jpeg", "application/pdf", false, 0},
+ {":/image_jpeg", "application/pdf", true, "image/jpeg"},
+ {":/image_jpeg", "application/postscript", false, 0},
+ {":/image_jpeg", "application/postscript", true, "image/jpeg"},
+ {":/image_jpeg", "application/ogg", false, 0},
+ {":/image_jpeg", "application/ogg", true, "image/jpeg"},
+ {":/image_jpeg", "video/webm", false, 0},
+ {":/image_jpeg", "video/webm", true, "image/jpeg"},
+ {":/image_jpeg", "application/x-rar-compressed", false, 0},
+ {":/image_jpeg", "application/x-rar-compressed", true, "image/jpeg"},
+ {":/image_jpeg", "application/zip", false, 0},
+ {":/image_jpeg", "application/zip", true, "image/jpeg"},
+ {":/image_jpeg", "application/x-gzip", false, 0},
+ {":/image_jpeg", "application/x-gzip", true, "image/jpeg"},
+ {":/image_jpeg", "audio/x-wave", false, 0},
+ {":/image_jpeg", "audio/x-wave", true, "image/jpeg"},
+ {":/image_jpeg", "image/webp", false, 0},
+ {":/image_jpeg", "image/webp", true, "image/jpeg"},
+ {":/image_jpeg", "image/gif", false, 0},
+ {":/image_jpeg", "image/gif", true, "image/jpeg"},
+ {":/image_jpeg", "image/png", false, 0},
+ {":/image_jpeg", "image/png", true, "image/jpeg"},
+ {":/image_jpeg", "image/jpeg", false, 0},
+ {":/image_jpeg", "image/jpeg", true, "image/jpeg"},
+ {":/image_jpeg", "image/bmp", false, 0},
+ {":/image_jpeg", "image/bmp", true, "image/jpeg"},
+ {":/image_jpeg", "image/vnd.microsoft.icon", false, 0},
+ {":/image_jpeg", "image/vnd.microsoft.icon", true, "image/jpeg"},
+ {":/image_jpeg", "application/rdf+xml", false, 0},
+ {":/image_jpeg", "application/rdf+xml", true, 0},
+ {":/image_jpeg", "application/rss+xml", false, 0},
+ {":/image_jpeg", "application/rss+xml", true, 0},
+ {":/image_jpeg", "application/atom+xml", false, 0},
+ {":/image_jpeg", "application/atom+xml", true, 0},
+ {":/image_png", "text/plain", false, "image/png"},
+ {":/image_png", "text/plain", true, "image/png"},
+ {":/image_png", "unknown/unknown", false, "image/png"},
+ {":/image_png", "unknown/unknown", true, "image/png"},
+ {":/image_png", "application/unknown", false, "image/png"},
+ {":/image_png", "application/unknown", true, "image/png"},
+ {":/image_png", "*/*", false, "image/png"},
+ {":/image_png", "*/*", true, "image/png"},
+ {":/image_png", "text/xml", false, 0},
+ {":/image_png", "text/xml", true, 0},
+ {":/image_png", "application/xml", false, 0},
+ {":/image_png", "application/xml", true, 0},
+ {":/image_png", "text/html", false, 0},
+ {":/image_png", "text/html", true, "image/png"},
+ {":/image_png", "text/xml", false, 0},
+ {":/image_png", "text/xml", true, 0},
+ {":/image_png", "application/pdf", false, 0},
+ {":/image_png", "application/pdf", true, "image/png"},
+ {":/image_png", "application/postscript", false, 0},
+ {":/image_png", "application/postscript", true, "image/png"},
+ {":/image_png", "application/ogg", false, 0},
+ {":/image_png", "application/ogg", true, "image/png"},
+ {":/image_png", "video/webm", false, 0},
+ {":/image_png", "video/webm", true, "image/png"},
+ {":/image_png", "application/x-rar-compressed", false, 0},
+ {":/image_png", "application/x-rar-compressed", true, "image/png"},
+ {":/image_png", "application/zip", false, 0},
+ {":/image_png", "application/zip", true, "image/png"},
+ {":/image_png", "application/x-gzip", false, 0},
+ {":/image_png", "application/x-gzip", true, "image/png"},
+ {":/image_png", "audio/x-wave", false, 0},
+ {":/image_png", "audio/x-wave", true, "image/png"},
+ {":/image_png", "image/webp", false, 0},
+ {":/image_png", "image/webp", true, "image/png"},
+ {":/image_png", "image/gif", false, 0},
+ {":/image_png", "image/gif", true, "image/png"},
+ {":/image_png", "image/png", false, 0},
+ {":/image_png", "image/png", true, "image/png"},
+ {":/image_png", "image/jpeg", false, 0},
+ {":/image_png", "image/jpeg", true, "image/png"},
+ {":/image_png", "image/bmp", false, 0},
+ {":/image_png", "image/bmp", true, "image/png"},
+ {":/image_png", "image/vnd.microsoft.icon", false, 0},
+ {":/image_png", "image/vnd.microsoft.icon", true, "image/png"},
+ {":/image_png", "application/rdf+xml", false, 0},
+ {":/image_png", "application/rdf+xml", true, 0},
+ {":/image_png", "application/rss+xml", false, 0},
+ {":/image_png", "application/rss+xml", true, 0},
+ {":/image_png", "application/atom+xml", false, 0},
+ {":/image_png", "application/atom+xml", true, 0},
+ {":/image_vnd.microsoft.icon", "text/plain", false, "image/vnd.microsoft.icon"},
+ {":/image_vnd.microsoft.icon", "text/plain", true, "image/vnd.microsoft.icon"},
+ {":/image_vnd.microsoft.icon", "unknown/unknown", false, "image/vnd.microsoft.icon"},
+ {":/image_vnd.microsoft.icon", "unknown/unknown", true, "image/vnd.microsoft.icon"},
+ {":/image_vnd.microsoft.icon", "application/unknown", false, "image/vnd.microsoft.icon"},
+ {":/image_vnd.microsoft.icon", "application/unknown", true, "image/vnd.microsoft.icon"},
+ {":/image_vnd.microsoft.icon", "*/*", false, "image/vnd.microsoft.icon"},
+ {":/image_vnd.microsoft.icon", "*/*", true, "image/vnd.microsoft.icon"},
+ {":/image_vnd.microsoft.icon", "text/xml", false, 0},
+ {":/image_vnd.microsoft.icon", "text/xml", true, 0},
+ {":/image_vnd.microsoft.icon", "application/xml", false, 0},
+ {":/image_vnd.microsoft.icon", "application/xml", true, 0},
+ {":/image_vnd.microsoft.icon", "text/html", false, 0},
+ {":/image_vnd.microsoft.icon", "text/html", true, "image/vnd.microsoft.icon"},
+ {":/image_vnd.microsoft.icon", "text/xml", false, 0},
+ {":/image_vnd.microsoft.icon", "text/xml", true, 0},
+ {":/image_vnd.microsoft.icon", "application/pdf", false, 0},
+ {":/image_vnd.microsoft.icon", "application/pdf", true, "image/vnd.microsoft.icon"},
+ {":/image_vnd.microsoft.icon", "application/postscript", false, 0},
+ {":/image_vnd.microsoft.icon", "application/postscript", true, "image/vnd.microsoft.icon"},
+ {":/image_vnd.microsoft.icon", "application/ogg", false, 0},
+ {":/image_vnd.microsoft.icon", "application/ogg", true, "image/vnd.microsoft.icon"},
+ {":/image_vnd.microsoft.icon", "video/webm", false, 0},
+ {":/image_vnd.microsoft.icon", "video/webm", true, "image/vnd.microsoft.icon"},
+ {":/image_vnd.microsoft.icon", "application/x-rar-compressed", false, 0},
+ {":/image_vnd.microsoft.icon", "application/x-rar-compressed", true, "image/vnd.microsoft.icon"},
+ {":/image_vnd.microsoft.icon", "application/zip", false, 0},
+ {":/image_vnd.microsoft.icon", "application/zip", true, "image/vnd.microsoft.icon"},
+ {":/image_vnd.microsoft.icon", "application/x-gzip", false, 0},
+ {":/image_vnd.microsoft.icon", "application/x-gzip", true, "image/vnd.microsoft.icon"},
+ {":/image_vnd.microsoft.icon", "audio/x-wave", false, 0},
+ {":/image_vnd.microsoft.icon", "audio/x-wave", true, "image/vnd.microsoft.icon"},
+ {":/image_vnd.microsoft.icon", "image/webp", false, 0},
+ {":/image_vnd.microsoft.icon", "image/webp", true, "image/vnd.microsoft.icon"},
+ {":/image_vnd.microsoft.icon", "image/gif", false, 0},
+ {":/image_vnd.microsoft.icon", "image/gif", true, "image/vnd.microsoft.icon"},
+ {":/image_vnd.microsoft.icon", "image/png", false, 0},
+ {":/image_vnd.microsoft.icon", "image/png", true, "image/vnd.microsoft.icon"},
+ {":/image_vnd.microsoft.icon", "image/jpeg", false, 0},
+ {":/image_vnd.microsoft.icon", "image/jpeg", true, "image/vnd.microsoft.icon"},
+ {":/image_vnd.microsoft.icon", "image/bmp", false, 0},
+ {":/image_vnd.microsoft.icon", "image/bmp", true, "image/vnd.microsoft.icon"},
+ {":/image_vnd.microsoft.icon", "image/vnd.microsoft.icon", false, 0},
+ {":/image_vnd.microsoft.icon", "image/vnd.microsoft.icon", true, "image/vnd.microsoft.icon"},
+ {":/image_vnd.microsoft.icon", "application/rdf+xml", false, 0},
+ {":/image_vnd.microsoft.icon", "application/rdf+xml", true, 0},
+ {":/image_vnd.microsoft.icon", "application/rss+xml", false, 0},
+ {":/image_vnd.microsoft.icon", "application/rss+xml", true, 0},
+ {":/image_vnd.microsoft.icon", "application/atom+xml", false, 0},
+ {":/image_vnd.microsoft.icon", "application/atom+xml", true, 0},
+ {":/image_webp", "text/plain", false, "image/webp"},
+ {":/image_webp", "text/plain", true, "image/webp"},
+ {":/image_webp", "unknown/unknown", false, "image/webp"},
+ {":/image_webp", "unknown/unknown", true, "image/webp"},
+ {":/image_webp", "application/unknown", false, "image/webp"},
+ {":/image_webp", "application/unknown", true, "image/webp"},
+ {":/image_webp", "*/*", false, "image/webp"},
+ {":/image_webp", "*/*", true, "image/webp"},
+ {":/image_webp", "text/xml", false, 0},
+ {":/image_webp", "text/xml", true, 0},
+ {":/image_webp", "application/xml", false, 0},
+ {":/image_webp", "application/xml", true, 0},
+ {":/image_webp", "text/html", false, 0},
+ {":/image_webp", "text/html", true, "image/webp"},
+ {":/image_webp", "text/xml", false, 0},
+ {":/image_webp", "text/xml", true, 0},
+ {":/image_webp", "application/pdf", false, 0},
+ {":/image_webp", "application/pdf", true, "image/webp"},
+ {":/image_webp", "application/postscript", false, 0},
+ {":/image_webp", "application/postscript", true, "image/webp"},
+ {":/image_webp", "application/ogg", false, 0},
+ {":/image_webp", "application/ogg", true, "image/webp"},
+ {":/image_webp", "video/webm", false, 0},
+ {":/image_webp", "video/webm", true, "image/webp"},
+ {":/image_webp", "application/x-rar-compressed", false, 0},
+ {":/image_webp", "application/x-rar-compressed", true, "image/webp"},
+ {":/image_webp", "application/zip", false, 0},
+ {":/image_webp", "application/zip", true, "image/webp"},
+ {":/image_webp", "application/x-gzip", false, 0},
+ {":/image_webp", "application/x-gzip", true, "image/webp"},
+ {":/image_webp", "audio/x-wave", false, 0},
+ {":/image_webp", "audio/x-wave", true, "image/webp"},
+ {":/image_webp", "image/webp", false, 0},
+ {":/image_webp", "image/webp", true, "image/webp"},
+ {":/image_webp", "image/gif", false, 0},
+ {":/image_webp", "image/gif", true, "image/webp"},
+ {":/image_webp", "image/png", false, 0},
+ {":/image_webp", "image/png", true, "image/webp"},
+ {":/image_webp", "image/jpeg", false, 0},
+ {":/image_webp", "image/jpeg", true, "image/webp"},
+ {":/image_webp", "image/bmp", false, 0},
+ {":/image_webp", "image/bmp", true, "image/webp"},
+ {":/image_webp", "image/vnd.microsoft.icon", false, 0},
+ {":/image_webp", "image/vnd.microsoft.icon", true, "image/webp"},
+ {":/image_webp", "application/rdf+xml", false, 0},
+ {":/image_webp", "application/rdf+xml", true, 0},
+ {":/image_webp", "application/rss+xml", false, 0},
+ {":/image_webp", "application/rss+xml", true, 0},
+ {":/image_webp", "application/atom+xml", false, 0},
+ {":/image_webp", "application/atom+xml", true, 0},
+ {":/text_html", "text/plain", false, "text/plain"},
+ {":/text_html", "text/plain", true, "text/plain"},
+ {":/text_html", "unknown/unknown", false, "text/html"},
+ {":/text_html", "unknown/unknown", true, "text/html"},
+ {":/text_html", "application/unknown", false, "text/html"},
+ {":/text_html", "application/unknown", true, "text/html"},
+ {":/text_html", "*/*", false, "text/html"},
+ {":/text_html", "*/*", true, "text/html"},
+ {":/text_html", "text/xml", false, 0},
+ {":/text_html", "text/xml", true, 0},
+ {":/text_html", "application/xml", false, 0},
+ {":/text_html", "application/xml", true, 0},
+ {":/text_html", "text/html", false, 0},
+ {":/text_html", "text/html", true, 0},
+ {":/text_html", "text/xml", false, 0},
+ {":/text_html", "text/xml", true, 0},
+ {":/text_html", "application/pdf", false, 0},
+ {":/text_html", "application/pdf", true, 0},
+ {":/text_html", "application/postscript", false, 0},
+ {":/text_html", "application/postscript", true, 0},
+ {":/text_html", "application/ogg", false, 0},
+ {":/text_html", "application/ogg", true, 0},
+ {":/text_html", "video/webm", false, 0},
+ {":/text_html", "video/webm", true, 0},
+ {":/text_html", "application/x-rar-compressed", false, 0},
+ {":/text_html", "application/x-rar-compressed", true, 0},
+ {":/text_html", "application/zip", false, 0},
+ {":/text_html", "application/zip", true, 0},
+ {":/text_html", "application/x-gzip", false, 0},
+ {":/text_html", "application/x-gzip", true, 0},
+ {":/text_html", "audio/x-wave", false, 0},
+ {":/text_html", "audio/x-wave", true, 0},
+ {":/text_html", "image/webp", false, 0},
+ {":/text_html", "image/webp", true, 0},
+ {":/text_html", "image/gif", false, 0},
+ {":/text_html", "image/gif", true, 0},
+ {":/text_html", "image/png", false, 0},
+ {":/text_html", "image/png", true, 0},
+ {":/text_html", "image/jpeg", false, 0},
+ {":/text_html", "image/jpeg", true, 0},
+ {":/text_html", "image/bmp", false, 0},
+ {":/text_html", "image/bmp", true, 0},
+ {":/text_html", "image/vnd.microsoft.icon", false, 0},
+ {":/text_html", "image/vnd.microsoft.icon", true, 0},
+ {":/text_html", "application/rdf+xml", false, 0},
+ {":/text_html", "application/rdf+xml", true, 0},
+ {":/text_html", "application/rss+xml", false, 0},
+ {":/text_html", "application/rss+xml", true, 0},
+ {":/text_html", "application/atom+xml", false, 0},
+ {":/text_html", "application/atom+xml", true, 0},
+ {":/text_xml", "text/plain", false, "text/plain"},
+ {":/text_xml", "text/plain", true, "text/plain"},
+ {":/text_xml", "unknown/unknown", false, "text/xml"},
+ {":/text_xml", "unknown/unknown", true, "text/xml"},
+ {":/text_xml", "application/unknown", false, "text/xml"},
+ {":/text_xml", "application/unknown", true, "text/xml"},
+ {":/text_xml", "*/*", false, "text/xml"},
+ {":/text_xml", "*/*", true, "text/xml"},
+ {":/text_xml", "text/xml", false, 0},
+ {":/text_xml", "text/xml", true, 0},
+ {":/text_xml", "application/xml", false, 0},
+ {":/text_xml", "application/xml", true, 0},
+ {":/text_xml", "text/html", false, 0},
+ {":/text_xml", "text/html", true, 0},
+ {":/text_xml", "text/xml", false, 0},
+ {":/text_xml", "text/xml", true, 0},
+ {":/text_xml", "application/pdf", false, 0},
+ {":/text_xml", "application/pdf", true, 0},
+ {":/text_xml", "application/postscript", false, 0},
+ {":/text_xml", "application/postscript", true, 0},
+ {":/text_xml", "application/ogg", false, 0},
+ {":/text_xml", "application/ogg", true, 0},
+ {":/text_xml", "video/webm", false, 0},
+ {":/text_xml", "video/webm", true, 0},
+ {":/text_xml", "application/x-rar-compressed", false, 0},
+ {":/text_xml", "application/x-rar-compressed", true, 0},
+ {":/text_xml", "application/zip", false, 0},
+ {":/text_xml", "application/zip", true, 0},
+ {":/text_xml", "application/x-gzip", false, 0},
+ {":/text_xml", "application/x-gzip", true, 0},
+ {":/text_xml", "audio/x-wave", false, 0},
+ {":/text_xml", "audio/x-wave", true, 0},
+ {":/text_xml", "image/webp", false, 0},
+ {":/text_xml", "image/webp", true, 0},
+ {":/text_xml", "image/gif", false, 0},
+ {":/text_xml", "image/gif", true, 0},
+ {":/text_xml", "image/png", false, 0},
+ {":/text_xml", "image/png", true, 0},
+ {":/text_xml", "image/jpeg", false, 0},
+ {":/text_xml", "image/jpeg", true, 0},
+ {":/text_xml", "image/bmp", false, 0},
+ {":/text_xml", "image/bmp", true, 0},
+ {":/text_xml", "image/vnd.microsoft.icon", false, 0},
+ {":/text_xml", "image/vnd.microsoft.icon", true, 0},
+ {":/text_xml", "application/rdf+xml", false, 0},
+ {":/text_xml", "application/rdf+xml", true, 0},
+ {":/text_xml", "application/rss+xml", false, 0},
+ {":/text_xml", "application/rss+xml", true, 0},
+ {":/text_xml", "application/atom+xml", false, 0},
+ {":/text_xml", "application/atom+xml", true, 0},
+ {":/video_webm", "text/plain", false, "video/webm"},
+ {":/video_webm", "text/plain", true, "video/webm"},
+ {":/video_webm", "unknown/unknown", false, "video/webm"},
+ {":/video_webm", "unknown/unknown", true, "video/webm"},
+ {":/video_webm", "application/unknown", false, "video/webm"},
+ {":/video_webm", "application/unknown", true, "video/webm"},
+ {":/video_webm", "*/*", false, "video/webm"},
+ {":/video_webm", "*/*", true, "video/webm"},
+ {":/video_webm", "text/xml", false, 0},
+ {":/video_webm", "text/xml", true, 0},
+ {":/video_webm", "application/xml", false, 0},
+ {":/video_webm", "application/xml", true, 0},
+ {":/video_webm", "text/html", false, 0},
+ {":/video_webm", "text/html", true, 0},
+ {":/video_webm", "text/xml", false, 0},
+ {":/video_webm", "text/xml", true, 0},
+ {":/video_webm", "application/pdf", false, 0},
+ {":/video_webm", "application/pdf", true, 0},
+ {":/video_webm", "application/postscript", false, 0},
+ {":/video_webm", "application/postscript", true, 0},
+ {":/video_webm", "application/ogg", false, 0},
+ {":/video_webm", "application/ogg", true, 0},
+ {":/video_webm", "video/webm", false, 0},
+ {":/video_webm", "video/webm", true, 0},
+ {":/video_webm", "application/x-rar-compressed", false, 0},
+ {":/video_webm", "application/x-rar-compressed", true, 0},
+ {":/video_webm", "application/zip", false, 0},
+ {":/video_webm", "application/zip", true, 0},
+ {":/video_webm", "application/x-gzip", false, 0},
+ {":/video_webm", "application/x-gzip", true, 0},
+ {":/video_webm", "audio/x-wave", false, 0},
+ {":/video_webm", "audio/x-wave", true, 0},
+ {":/video_webm", "image/webp", false, 0},
+ {":/video_webm", "image/webp", true, 0},
+ {":/video_webm", "image/gif", false, 0},
+ {":/video_webm", "image/gif", true, 0},
+ {":/video_webm", "image/png", false, 0},
+ {":/video_webm", "image/png", true, 0},
+ {":/video_webm", "image/jpeg", false, 0},
+ {":/video_webm", "image/jpeg", true, 0},
+ {":/video_webm", "image/bmp", false, 0},
+ {":/video_webm", "image/bmp", true, 0},
+ {":/video_webm", "image/vnd.microsoft.icon", false, 0},
+ {":/video_webm", "image/vnd.microsoft.icon", true, 0},
+ {":/video_webm", "application/rdf+xml", false, 0},
+ {":/video_webm", "application/rdf+xml", true, 0},
+ {":/video_webm", "application/rss+xml", false, 0},
+ {":/video_webm", "application/rss+xml", true, 0},
+ {":/video_webm", "application/atom+xml", false, 0},
+ {":/video_webm", "application/atom+xml", true, 0}
+};
+static const size_t testListSize = sizeof(testList) / sizeof(testList[0]);
+
+#endif // TestData_h
diff --git a/Source/WebKit/qt/tests/MIMESniffing/resources.qrc b/Source/WebKit/qt/tests/MIMESniffing/resources.qrc
new file mode 100644
index 0000000..b4afb32
--- /dev/null
+++ b/Source/WebKit/qt/tests/MIMESniffing/resources.qrc
@@ -0,0 +1,23 @@
+<RCC>
+ <qresource prefix="/">
+ <file alias="application_atom+xml">resources/application_atom+xml</file>
+ <file alias="application_ogg">resources/application_ogg</file>
+ <file alias="application_pdf">resources/application_pdf</file>
+ <file alias="application_postscript">resources/application_postscript</file>
+ <file alias="application_rdf+xml">resources/application_rdf+xml</file>
+ <file alias="application_rss+xml">resources/application_rss+xml</file>
+ <file alias="application_x-gzip">resources/application_x-gzip</file>
+ <file alias="application_x-rar-compressed">resources/application_x-rar-compressed</file>
+ <file alias="application_zip">resources/application_zip</file>
+ <file alias="audio_x-wave">resources/audio_x-wave</file>
+ <file alias="image_bmp">resources/image_bmp</file>
+ <file alias="image_gif">resources/image_gif</file>
+ <file alias="image_jpeg">resources/image_jpeg</file>
+ <file alias="image_png">resources/image_png</file>
+ <file alias="image_vnd.microsoft.icon">resources/image_vnd.microsoft.icon</file>
+ <file alias="image_webp">resources/image_webp</file>
+ <file alias="text_html">resources/text_html</file>
+ <file alias="text_xml">resources/text_xml</file>
+ <file alias="video_webm">resources/video_webm</file>
+ </qresource>
+</RCC>
diff --git a/Source/WebKit/qt/tests/MIMESniffing/resources/application_atom+xml b/Source/WebKit/qt/tests/MIMESniffing/resources/application_atom+xml
new file mode 100644
index 0000000..54086a7
--- /dev/null
+++ b/Source/WebKit/qt/tests/MIMESniffing/resources/application_atom+xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom">
+ <title>Example Feed</title>
+ <link href="http://example.org/"/>
+ <updated>2003-12-13T18:30:02Z</updated>
+ <author>
+ <name>John Doe</name>
+ </author>
+ <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
+ <entry>
+ <title>Atom-Powered Robots Run Amok</title>
+ <link href="http://example.org/2003/12/13/atom03"/>
+ <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
+ <updated>2003-12-13T18:30:02Z</updated>
+ <summary>Some text.</summary>
+ </entry>
+</feed>
diff --git a/Source/WebKit/qt/tests/MIMESniffing/resources/application_ogg b/Source/WebKit/qt/tests/MIMESniffing/resources/application_ogg
new file mode 100644
index 0000000..b9cc1b2
--- /dev/null
+++ b/Source/WebKit/qt/tests/MIMESniffing/resources/application_ogg
Binary files differ
diff --git a/Source/WebKit/qt/tests/MIMESniffing/resources/application_pdf b/Source/WebKit/qt/tests/MIMESniffing/resources/application_pdf
new file mode 100644
index 0000000..7f8996f
--- /dev/null
+++ b/Source/WebKit/qt/tests/MIMESniffing/resources/application_pdf
Binary files differ
diff --git a/Source/WebKit/qt/tests/MIMESniffing/resources/application_postscript b/Source/WebKit/qt/tests/MIMESniffing/resources/application_postscript
new file mode 100644
index 0000000..c4b9ae6
--- /dev/null
+++ b/Source/WebKit/qt/tests/MIMESniffing/resources/application_postscript
@@ -0,0 +1,137 @@
+%!PS-Adobe-2.0 EPSF-1.2
+%%Creator: HiJaak 2.1
+%%CreationDate: 12/29/93 13:52:08
+%%BoundingBox:126 216 486 576
+%%EndComments
+/ld {load def} bind def
+/s /stroke ld /f /fill ld /m /moveto ld /l /lineto ld /c /curveto ld /rgb {255 div 3 1 roll 255 div 3 1 roll 255 div 3 1 roll setrgbcolor} def
+126 216 translate
+360.0000 360.0000 scale
+/picstr 124 string def
+124 124 8 [124 0 0 -124 0 124] {currentfile picstr readhexstring pop} image
+65656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565ADADADADADADADADADADADADADADADADADADADADADADADADADADADADADADAD1B1B1B1B1B1B1B1B1B1BFF
+65656565656565656565656565656565656565656565656565656565656565006565656565006565656500656565656565000000656565656565656565656565656565656565656565656565656565656565ADADAD00ADADAD000000ADAD00ADADADADAD00AD00ADADADAD00ADADADAD00000000001B1B001B1B1BFF
+65656565656565656565656565656565656565656565656565656565656565000065656500006565650065006565656500656565006565656565656565656565656565656565656565656565656565656565ADADAD00ADAD00ADADAD00ADAD00ADADAD00ADAD0000ADADAD00ADADADAD001B1B1B1B001B001B1B1BFF
+65656565656565656565656565656565656565656565656565656565656565000065656500006565650065006565650065656565650065656565656565656565656565656565656565656565656565656565ADADAD00AD00ADADADADADADAD00ADADAD00ADAD00AD00ADAD00ADADADAD001B1B1B1B001B001B1B1BFF
+65656565656565656565656565656565656565656565656565656565656565006500650065006565650065006565650065656565656565656565656565656565656565656565656565656565656565656565ADADAD00AD00ADADADADADADADAD00AD00ADADAD00AD00ADAD00ADADADAD00000000001B1B001B1B1BFF
+65656565656565656565656565656565656565656565656565656565656565006500650065006565006565650065650065656500000065656565656565656565656565656565656565656565656565656565ADADAD00AD00ADADADADADADADADAD00ADADADAD00ADAD00AD00ADADADAD001B1B1B1B001B001B1B1BFF
+65656565656565656565656565656565656565656565656565656565656565006500650065006565000000000065650065656565650065656565656565656565656565656565656565656565656565656565ADADAD00AD00ADADADADADADADADAD00ADADADAD00ADAD00AD00ADADADAD001B1B1B1B001B001B1B1BFF
+65656565656565656565656565656565656565656565656565656565656565006565006565006500656565656500656500656565006565656565656565656565656565656565656565656565656565656565ADADAD00ADAD00ADADAD00ADADADAD00ADADADAD00ADADAD0000ADADADAD001B1B1B1B001B001B1B1BFF
+65656565656565656565656565656565656565656565656565656565656565006565006565006500656565656500656565000000656565656565656565656565656565656565656565656565656565656565ADADAD00ADADAD000000ADADADADAD00ADADADAD00ADADADAD00ADADADAD00000000001B1B00000000FF
+65656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565ADADAD00ADADADADADADADADADADADADADADADADADADADADADADADADADADAD1B1B1B1B1B1B1B1B1B1BFF
+65656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565ADADAD00ADADADADADADADADADADADADADADADADADADADADADADADADADADAD1B1B1B1B1B1B1B1B1B1BFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC0000DCDC0000DC0000000000DC0000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292000000009292000000000092920000929200009292929292ADADADAD00000000ADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC0000DCDC0000DC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929200009292000092000092920000920000929200009292929292ADADAD0000ADAD0000ADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC00DCDC00DCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292920000929292929292000092920000920000009200009292929292ADAD0000ADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC00000000DCDC0000000000DC0000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292920000929292929292000092920000920000009200009292929292ADAD0000ADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC0000DCDCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292920000929200000092000000000092920000920000009292929292ADAD0000ADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC0000DCDCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292920000929292000092000092000092920000920000009292929292ADAD0000ADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC0000DCDCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929200009292000092000092920000920000929200009292929292ADADAD0000ADAD0000ADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC0000DCDCDC0000000000DC000000000000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292000000009292000092929200000000929200009292929292ADADADAD00000000ADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A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CDCDCDC00000065656500000065FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A00004A4A00004A00004A4A4A4A00004A4A00004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDC0000DCDC0000DC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDC00000065656500000065FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A00004A4A00004A00004A4A4A4A00004A4A00004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDC00DCDC00DCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDC00000000650000000065FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A00004A4A00004A00000000004A00004A4A00004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDC00000000DCDC0000000000DC0000DCDCDCDCDCDCDCDCDCDCDC00000000650000000065FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A00000000004A4A00004A4A4A4A00004A4A00004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDC0000DCDCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDC00006500650065000065FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A00004A00004A4A00004A4A4A4A00004A4A00004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDC0000DCDCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDC00006500000065000065FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A00004A4A00004A00004A4A4A4A00004A4A00004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDC0000DCDCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDC00006500000065000065FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A00004A4A4A000000000000004A00000000004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDC0000DCDCDC0000000000DC000000000000DCDCDCDCDCDCDC00006565006565000065FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4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4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A00000000004A4A4A4A0000004A4A4A00000000004A4A4A4A004A4A4A4A4A00000000004A00000000004A00000000004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A004A4A4A4A004A4A004A4A4A004A4A4A4A004A4A4A4A4A4A004A4A4A4A4A004A4A4A4A4A004A4A4A4A4A4A4A004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A004A4A4A4A004A004A4A4A4A4A004A4A4A004A4A4A4A4A4A004A4A4A4A4A004A4A4A4A4A004A4A4A4A4A4A4A004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A00000000004A4A004A4A4A4A4A004A4A4A004A4A4A4A4A4A004A4A4A4A4A00000000004A000000004A4A4A4A004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A004A4A4A4A004A004A4A4A4A4A004A4A4A004A4A4A4A4A4A004A4A4A4A4A004A4A4A4A4A004A4A4A4A4A4A4A004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A004A4A4A4A004A004A4A4A4A4A004A4A4A004A4A4A4A4A4A004A4A4A4A4A004A4A4A4A4A004A4A4A4A4A4A4A004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A004A4A4A4A004A4A004A4A4A004A4A4A4A004A4A4A4A4A4A004A4A4A4A4A004A4A4A4A4A004A4A4A4A4A4A4A004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A00000000004A4A4A4A0000004A4A4A4A4A004A4A4A4A4A4A00000000004A00000000004A004A4A4A4A4A4A4A004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A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4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+showpage
+ \ No newline at end of file
diff --git a/Source/WebKit/qt/tests/MIMESniffing/resources/application_rdf+xml b/Source/WebKit/qt/tests/MIMESniffing/resources/application_rdf+xml
new file mode 100644
index 0000000..e214145
--- /dev/null
+++ b/Source/WebKit/qt/tests/MIMESniffing/resources/application_rdf+xml
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/">
+
+ <channel rdf:about="http://www.xml.com/xml/news.rss">
+ <title>XML.com</title>
+ <link>http://xml.com/pub</link>
+ <description>
+ XML.com features a rich mix of information and services
+ for the XML community.
+ </description>
+
+ <image rdf:resource="http://xml.com/universal/images/xml_tiny.gif" />
+
+ <items>
+ <rdf:Seq>
+ <rdf:li resource="http://xml.com/pub/2000/08/09/xslt/xslt.html" />
+ <rdf:li resource="http://xml.com/pub/2000/08/09/rdfdb/index.html" />
+ </rdf:Seq>
+ </items>
+
+ </channel>
+
+ <image rdf:about="http://xml.com/universal/images/xml_tiny.gif">
+ <title>XML.com</title>
+ <link>http://www.xml.com</link>
+ <url>http://xml.com/universal/images/xml_tiny.gif</url>
+ </image>
+
+ <item rdf:about="http://xml.com/pub/2000/08/09/xslt/xslt.html">
+ <title>Processing Inclusions with XSLT</title>
+ <link>http://xml.com/pub/2000/08/09/xslt/xslt.html</link>
+ <description>
+ Processing document inclusions with general XML tools can be
+ problematic. This article proposes a way of preserving inclusion
+ information through SAX-based processing.
+ </description>
+ </item>
+
+ <item rdf:about="http://xml.com/pub/2000/08/09/rdfdb/index.html">
+ <title>Putting RDF to Work</title>
+ <link>http://xml.com/pub/2000/08/09/rdfdb/index.html</link>
+ <description>
+ Tool and API support for the Resource Description Framework
+ is slowly coming of age. Edd Dumbill takes a look at RDFDB,
+ one of the most exciting new RDF toolkits.
+ </description>
+ </item>
+
+</rdf:RDF>
diff --git a/Source/WebKit/qt/tests/MIMESniffing/resources/application_rss+xml b/Source/WebKit/qt/tests/MIMESniffing/resources/application_rss+xml
new file mode 100644
index 0000000..3537c41
--- /dev/null
+++ b/Source/WebKit/qt/tests/MIMESniffing/resources/application_rss+xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<rss version="0.91">
+<channel>
+
+<title>Folha.com - Ambiente - Principal</title>
+<link>http://redir.folha.com.br/redir/online/ambiente/rss091/*http://www1.folha.uol.com.br/ambiente/</link>
+<description>Primeiro jornal em tempo real em língua portuguesa</description>
+<language>pt-br</language>
+<copyright>Copyright Folha.com. Todos os direitos reservados.</copyright>
+<docs>http://redir.folha.com.br/redir/online/ambiente/rss091/*http://www1.folha.uol.com.br/folha/conheca/arquivo_e_copyright.shtml</docs>
+<webMaster>webmaster@grupofolha.com.br (Webmaster Folha.com)</webMaster>
+
+<image>
+<title>Folha.com - Ambiente - Principal</title>
+<url>http://www1.folha.uol.com.br/folha/images/lgo-folha_com-88x31.gif</url>
+<link>http://redir.folha.com.br/redir/online/ambiente/rss091/*http://www1.folha.uol.com.br/ambiente/</link>
+<width>88</width>
+<height>31</height>
+<description>Primeiro jornal em tempo real em língua portuguesa</description>
+</image>
+
+<item>
+<title>Nasa dimensiona danos da seca na Amazônia em 2,4 mi de km2</title>
+<link>http://redir.folha.com.br/redir/online/ambiente/rss091/*http://www1.folha.uol.com.br/ambiente/895526-nasa-dimensiona-danos-da-seca-na-amazonia-em-24-mi-de-km2.shtml</link>
+<description>
+Os satélites da Nasa (agência espacial americana) forneceram material para uma análise dos estragos provocados pela &lt;a href=&quot;http://www1.folha.uol.com.br/ambiente/870588-amazonia-teve-a-pior-seca-dos-ultimos-cem-anos.shtml&quot;&gt;pior seca a atingir a Amazônia em 2010&lt;/a&gt;.
+Pela tomada aérea, estima-se que foram 2,5 milhões de quilômetros quadrados afetados --pouco menos da metade do ecossistema amazônico.
+&lt;table class=&quot;articleGraphic&quot;&gt;
+&lt;tr&gt;
+&lt;td rowspan=&quot;3&quot; class=&quot;articleGraphicSpace&quot;&gt;&lt;/td&gt;
+&lt;td class=&quot;articleGraphicCredit&quot;&gt;Universidade de Boston/Nasa&lt;/td&gt;
+&lt;td rowspan=&quot;3&quot; class=&quot;articleGraphicSpace&quot;&gt;&lt;/td&gt;
+&lt;/tr&gt;
+&lt;tr&gt;
+&lt;td class=&quot;articleGraphicImage&quot;&gt;&lt;img src=&quot;http://f.i.uol.com.br/folha/ambiente/images/11090120.jpeg&quot; alt=&quot;Área (vermelho) mostra redução do índice do verdor, onde a vegetação ficou menos verde e mais seca&quot; border=&quot;0&quot; /&gt;&lt;/td&gt;
+&lt;/tr&gt;
+&lt;tr&gt;
+&lt;td class=&quot;articleGraphicCaption&quot;&gt;Área (vermelho) mostra redução do índice do verdor, onde a vegetação ficou menos verde e mais seca&lt;/td&gt;
+&lt;/tr&gt;
+&lt;/table&gt;
+&lt;a href=&quot;http://redir.folha.com.br/redir/online/ambiente/rss091/*http://www1.folha.uol.com.br/ambiente/895526-nasa-dimensiona-danos-da-seca-na-amazonia-em-24-mi-de-km2.shtml&quot;&gt;Leia mais&lt;/a&gt; (29/03/2011 - 18h04)</description>
+<pubDate>29 Mar 2011 18:04:00 -0300</pubDate>
+</item>
+</channel>
+</rss>
diff --git a/Source/WebKit/qt/tests/MIMESniffing/resources/application_x-gzip b/Source/WebKit/qt/tests/MIMESniffing/resources/application_x-gzip
new file mode 100644
index 0000000..a5e7d31
--- /dev/null
+++ b/Source/WebKit/qt/tests/MIMESniffing/resources/application_x-gzip
Binary files differ
diff --git a/Source/WebKit/qt/tests/MIMESniffing/resources/application_x-rar-compressed b/Source/WebKit/qt/tests/MIMESniffing/resources/application_x-rar-compressed
new file mode 100644
index 0000000..d9cb6ae
--- /dev/null
+++ b/Source/WebKit/qt/tests/MIMESniffing/resources/application_x-rar-compressed
Binary files differ
diff --git a/Source/WebKit/qt/tests/MIMESniffing/resources/application_zip b/Source/WebKit/qt/tests/MIMESniffing/resources/application_zip
new file mode 100644
index 0000000..8aec52f
--- /dev/null
+++ b/Source/WebKit/qt/tests/MIMESniffing/resources/application_zip
Binary files differ
diff --git a/Source/WebKit/qt/tests/MIMESniffing/resources/audio_x-wave b/Source/WebKit/qt/tests/MIMESniffing/resources/audio_x-wave
new file mode 100644
index 0000000..a0f9b85
--- /dev/null
+++ b/Source/WebKit/qt/tests/MIMESniffing/resources/audio_x-wave
Binary files differ
diff --git a/Source/WebKit/qt/tests/MIMESniffing/resources/image_bmp b/Source/WebKit/qt/tests/MIMESniffing/resources/image_bmp
new file mode 100644
index 0000000..b61d368
--- /dev/null
+++ b/Source/WebKit/qt/tests/MIMESniffing/resources/image_bmp
Binary files differ
diff --git a/Source/WebKit/qt/tests/MIMESniffing/resources/image_gif b/Source/WebKit/qt/tests/MIMESniffing/resources/image_gif
new file mode 100644
index 0000000..32b1ea2
--- /dev/null
+++ b/Source/WebKit/qt/tests/MIMESniffing/resources/image_gif
Binary files differ
diff --git a/Source/WebKit/qt/tests/MIMESniffing/resources/image_jpeg b/Source/WebKit/qt/tests/MIMESniffing/resources/image_jpeg
new file mode 100644
index 0000000..1874576
--- /dev/null
+++ b/Source/WebKit/qt/tests/MIMESniffing/resources/image_jpeg
Binary files differ
diff --git a/Source/WebKit/qt/tests/MIMESniffing/resources/image_png b/Source/WebKit/qt/tests/MIMESniffing/resources/image_png
new file mode 100644
index 0000000..bef59c7
--- /dev/null
+++ b/Source/WebKit/qt/tests/MIMESniffing/resources/image_png
Binary files differ
diff --git a/Source/WebKit/qt/tests/MIMESniffing/resources/image_vnd.microsoft.icon b/Source/WebKit/qt/tests/MIMESniffing/resources/image_vnd.microsoft.icon
new file mode 100644
index 0000000..58921b8
--- /dev/null
+++ b/Source/WebKit/qt/tests/MIMESniffing/resources/image_vnd.microsoft.icon
Binary files differ
diff --git a/Source/WebKit/qt/tests/MIMESniffing/resources/image_webp b/Source/WebKit/qt/tests/MIMESniffing/resources/image_webp
new file mode 100644
index 0000000..0da983e
--- /dev/null
+++ b/Source/WebKit/qt/tests/MIMESniffing/resources/image_webp
Binary files differ
diff --git a/Source/WebKit/qt/tests/MIMESniffing/resources/text_html b/Source/WebKit/qt/tests/MIMESniffing/resources/text_html
new file mode 100644
index 0000000..21eeee3
--- /dev/null
+++ b/Source/WebKit/qt/tests/MIMESniffing/resources/text_html
@@ -0,0 +1,3 @@
+
+<!-- saved from url=(0017)http://127.0.0.1/ -->
+<HTML><HEAD><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"></HEAD><BODY><H1>It works!</H1></BODY></HTML> \ No newline at end of file
diff --git a/Source/WebKit/qt/tests/MIMESniffing/resources/text_xml b/Source/WebKit/qt/tests/MIMESniffing/resources/text_xml
new file mode 100644
index 0000000..38a9fe5
--- /dev/null
+++ b/Source/WebKit/qt/tests/MIMESniffing/resources/text_xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<CATALOG>
+ <CD>
+ <TITLE>Empire Burlesque</TITLE>
+ <ARTIST>Bob Dylan</ARTIST>
+ <COUNTRY>USA</COUNTRY>
+ <COMPANY>Columbia</COMPANY>
+ <PRICE>10.90</PRICE>
+ <YEAR>1985</YEAR>
+ </CD>
+ <CD>
+ <TITLE>Unchain my heart</TITLE>
+ <ARTIST>Joe Cocker</ARTIST>
+ <COUNTRY>USA</COUNTRY>
+ <COMPANY>EMI</COMPANY>
+ <PRICE>8.20</PRICE>
+ <YEAR>1987</YEAR>
+ </CD>
+</CATALOG>
diff --git a/Source/WebKit/qt/tests/MIMESniffing/resources/video_webm b/Source/WebKit/qt/tests/MIMESniffing/resources/video_webm
new file mode 100644
index 0000000..95d5031
--- /dev/null
+++ b/Source/WebKit/qt/tests/MIMESniffing/resources/video_webm
Binary files differ
diff --git a/Source/WebKit/qt/tests/MIMESniffing/tst_MIMESniffing.cpp b/Source/WebKit/qt/tests/MIMESniffing/tst_MIMESniffing.cpp
new file mode 100644
index 0000000..8c5417f
--- /dev/null
+++ b/Source/WebKit/qt/tests/MIMESniffing/tst_MIMESniffing.cpp
@@ -0,0 +1,72 @@
+/*
+ Copyright (C) 2011 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 "MIMESniffing.h"
+
+#include "TestData.h"
+
+#include <QtCore/QFile>
+#include <QtCore/QString>
+#include <QtTest/QtTest>
+
+class tst_MIMESniffing : public QObject {
+ Q_OBJECT
+
+public:
+ tst_MIMESniffing();
+
+private Q_SLOTS:
+ void testCase1();
+};
+
+tst_MIMESniffing::tst_MIMESniffing()
+{
+}
+
+static inline const char* errorText(const TestData& data, const char* sniffedType)
+{
+ return QString("file: %1, advertised: %2, image: %3. sniffed mime type was expected to be \"%4\" but instead was \"%5\"").arg(data.file).arg(data.advertisedType).arg(data.isImage).arg(data.sniffedType).arg(sniffedType).toLatin1();
+}
+
+void tst_MIMESniffing::testCase1()
+{
+
+ for (int i = 0; i < testListSize; ++i) {
+ QFile file(testList[i].file);
+ QVERIFY2(file.open(QIODevice::ReadOnly), QString("unable to open file %1").arg(file.fileName()).toLatin1());
+
+ MIMESniffer sniffer(testList[i].advertisedType, testList[i].isImage);
+ QByteArray data = file.peek(sniffer.dataSize());
+
+ const char* sniffedType = sniffer.sniff(data.constData(), data.size());
+
+ QVERIFY2(!(sniffedType || testList[i].sniffedType) || (sniffedType && testList[i].sniffedType), errorText(testList[i], sniffedType));
+
+ if (sniffedType)
+ QVERIFY2(!strcmp(sniffedType, testList[i].sniffedType), errorText(testList[i], sniffedType));
+
+ }
+
+ QVERIFY2(true, "Failure");
+}
+
+QTEST_APPLESS_MAIN(tst_MIMESniffing);
+
+#include "tst_MIMESniffing.moc"
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.html b/Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.html
new file mode 100644
index 0000000..22e3e24
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.html
@@ -0,0 +1,17 @@
+<html>
+<head><title>Basic</title>
+<link rel="icon" sizes="48x48" href="basic.png">
+<script type="text/javascript">
+<!--
+window.onload = function(){ window.status = "status here"; }
+// -->
+</script>
+</head>
+<body leftmargin="0" marginwidth="0">
+<table width="123">
+<tbody>
+<tr><td>This is a basic test.</td></tr>
+</tbody>
+</table>
+</body>
+</html>
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.png b/Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.png
new file mode 100644
index 0000000..35717cc
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.png
Binary files differ
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.qml b/Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.qml
new file mode 100644
index 0000000..b5208d0
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/basic.qml
@@ -0,0 +1,5 @@
+import QtWebKit 1.0
+
+WebView {
+ url: "basic.html"
+}
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/elements.html b/Source/WebKit/qt/tests/qdeclarativewebview/resources/elements.html
new file mode 100644
index 0000000..9236867
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/elements.html
@@ -0,0 +1,14 @@
+<body leftmargin=0 topmargin=0>
+<table width="300px" border=1 cellpadding=0 cellspacing=0>
+<tr>
+<td align=center width=25%%><p>A</p></td>
+<td width=75% height=50px>
+ <table width=100% border=1 cellpadding=0 cellspacing=0>
+ <tr>
+ <td align=center width=50% height=50px><p>B</p></td>
+ <td align=center width=50% height=50px><p>C</p></td>
+ </tr>
+ </table>
+</td>
+</tr>
+</table>
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/elements.qml b/Source/WebKit/qt/tests/qdeclarativewebview/resources/elements.qml
new file mode 100644
index 0000000..8fef8c9
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/elements.qml
@@ -0,0 +1,7 @@
+import QtWebKit 1.0
+
+WebView {
+ url: "elements.html"
+ width: 310
+ height: 100
+}
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/forward.html b/Source/WebKit/qt/tests/qdeclarativewebview/resources/forward.html
new file mode 100644
index 0000000..62ab62d
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/forward.html
@@ -0,0 +1,12 @@
+<html>
+<head><title>Forward</title>
+<link rel="icon" sizes="32x32" href="forward.png">
+</head>
+<body leftmargin="0" marginwidth="0">
+<table width="123">
+<tbody>
+<tr><td>This is more.</td></tr>
+</tbody>
+</table>
+</body>
+</html>
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/forward.png b/Source/WebKit/qt/tests/qdeclarativewebview/resources/forward.png
new file mode 100644
index 0000000..a82533e
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/forward.png
Binary files differ
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/javaScript.html b/Source/WebKit/qt/tests/qdeclarativewebview/resources/javaScript.html
new file mode 100644
index 0000000..35270bc
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/javaScript.html
@@ -0,0 +1,11 @@
+<html>
+<head><title>JavaScript</title>
+<link rel="icon" sizes="48x48" href="basic.png">
+<script type="text/javascript">
+<!--
+window.onload = function(){ window.status = "status here"; }
+// -->
+</script>
+</head>
+<body>
+This is a JS test.
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/javaScript.qml b/Source/WebKit/qt/tests/qdeclarativewebview/resources/javaScript.qml
new file mode 100644
index 0000000..527e3b9
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/javaScript.qml
@@ -0,0 +1,12 @@
+import QtQuick 1.0
+import QtWebKit 1.0
+
+WebView {
+ url: "javaScript.html"
+ javaScriptWindowObjects: [
+ QtObject {
+ property string qmlprop: "qmlvalue"
+ WebView.windowObjectName: "myjsname"
+ }
+ ]
+}
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/loadError.qml b/Source/WebKit/qt/tests/qdeclarativewebview/resources/loadError.qml
new file mode 100644
index 0000000..26cec8f
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/loadError.qml
@@ -0,0 +1,5 @@
+import QtWebKit 1.0
+
+WebView {
+ url: "does-not-exist.html"
+}
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/newwindows.html b/Source/WebKit/qt/tests/qdeclarativewebview/resources/newwindows.html
new file mode 100644
index 0000000..dd541f9
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/newwindows.html
@@ -0,0 +1,16 @@
+<html>
+<head>
+<script type="text/javascript">
+<!--
+function clickTheLink()
+{
+ var ev = document.createEvent('MouseEvents');
+ ev.initEvent( "click", true, false );
+ document.getElementById('thelink').dispatchEvent(ev);
+}
+// -->
+</script>
+</head>
+<h1>Multiple windows...</h1>
+
+<a id=thelink target="_blank" href="newwindows.html">Popup!</a>
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/newwindows.qml b/Source/WebKit/qt/tests/qdeclarativewebview/resources/newwindows.qml
new file mode 100644
index 0000000..e66631d
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/newwindows.qml
@@ -0,0 +1,34 @@
+// Demonstrates opening new WebViews from HTML
+
+import QtQuick 1.0
+import QtWebKit 1.0
+
+Grid {
+ columns: 3
+ id: pages
+ height: 300; width: 600
+ property int total: 0
+
+ Component {
+ id: webViewPage
+ Rectangle {
+ width: webView.width
+ height: webView.height
+ border.color: "gray"
+
+ WebView {
+ id: webView
+ width: 150 // force predictable for test
+ newWindowComponent: webViewPage
+ newWindowParent: pages
+ url: "newwindows.html"
+ Timer {
+ interval: 10; running: total<4; repeat: false;
+ onTriggered: { if (webView.status==WebView.Ready) { total++; webView.evaluateJavaScript("clickTheLink()") } }
+ }
+ }
+ }
+ }
+
+ Loader { sourceComponent: webViewPage }
+}
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/propertychanges.qml b/Source/WebKit/qt/tests/qdeclarativewebview/resources/propertychanges.qml
new file mode 100644
index 0000000..db06887
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/propertychanges.qml
@@ -0,0 +1,34 @@
+import QtQuick 1.0
+import QtWebKit 1.0
+
+Item {
+ width: 240
+ height: 160
+ Grid {
+ anchors.fill: parent
+ objectName: "newWindowParent"
+ id: newWindowParent
+ }
+
+ Row {
+ anchors.fill: parent
+ id: oldWindowParent
+ objectName: "oldWindowParent"
+ }
+
+ Loader {
+ sourceComponent: webViewComponent
+ }
+ Component {
+ id: webViewComponent
+ WebView {
+ id: webView
+ objectName: "webView"
+ newWindowComponent: webViewComponent
+ newWindowParent: oldWindowParent
+ url: "basic.html"
+ renderingEnabled: true
+ pressGrabTime: 200
+ }
+ }
+}
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/resources/sethtml.qml b/Source/WebKit/qt/tests/qdeclarativewebview/resources/sethtml.qml
new file mode 100644
index 0000000..5bff442
--- /dev/null
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/resources/sethtml.qml
@@ -0,0 +1,5 @@
+import QtWebKit 1.0
+
+WebView {
+ html: "<p>This is a <b>string</b> set on the WebView"
+}
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/tst_qdeclarativewebview.cpp b/Source/WebKit/qt/tests/qdeclarativewebview/tst_qdeclarativewebview.cpp
index 8fcab71..23e8bfb 100644
--- a/Source/WebKit/qt/tests/qdeclarativewebview/tst_qdeclarativewebview.cpp
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/tst_qdeclarativewebview.cpp
@@ -1,14 +1,18 @@
#include "../util.h"
+#include <QAction>
#include <QColor>
#include <QDebug>
#include <QDeclarativeComponent>
#include <QDeclarativeEngine>
+#include <QDeclarativeItem>
#include <QDeclarativeProperty>
#include <QDeclarativeView>
#include <QDir>
#include <QGraphicsWebView>
#include <QTest>
+#include <QVariant>
#include <QWebFrame>
+#include "qdeclarativewebview_p.h"
QT_BEGIN_NAMESPACE
@@ -19,16 +23,36 @@ public:
tst_QDeclarativeWebView();
private slots:
+ void cleanupTestCase();
+
+ void basicProperties();
+ void elementAreaAt();
+ void historyNav();
+ void javaScript();
+ void loadError();
+ void multipleWindows();
+ void newWindowComponent();
+ void newWindowParent();
void preferredWidthTest();
void preferredHeightTest();
void preferredWidthDefaultTest();
void preferredHeightDefaultTest();
+ void pressGrabTime();
+ void renderingEnabled();
+ void setHtml();
+ void settings();
#if QT_VERSION >= 0x040703
void backgroundColor();
#endif
private:
void checkNoErrors(const QDeclarativeComponent&);
+ QString tmpDir() const
+ {
+ static QString tmpd = QDir::tempPath() + "/tst_qdeclarativewebview-"
+ + QDateTime::currentDateTime().toString(QLatin1String("yyyyMMddhhmmss"));
+ return tmpd;
+ }
};
tst_QDeclarativeWebView::tst_QDeclarativeWebView()
@@ -36,6 +60,283 @@ tst_QDeclarativeWebView::tst_QDeclarativeWebView()
Q_UNUSED(waitForSignal)
}
+static QString strippedHtml(QString html)
+{
+ html.replace(QRegExp("\\s+"), "");
+ return html;
+}
+
+static QString fileContents(const QString& filename)
+{
+ QFile file(filename);
+ file.open(QIODevice::ReadOnly);
+ return QString::fromUtf8(file.readAll());
+}
+
+static void removeRecursive(const QString& dirname)
+{
+ QDir dir(dirname);
+ QFileInfoList entries(dir.entryInfoList(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot));
+ for (int i = 0; i < entries.count(); ++i)
+ if (entries[i].isDir())
+ removeRecursive(entries[i].filePath());
+ else
+ dir.remove(entries[i].fileName());
+ QDir().rmdir(dirname);
+}
+
+void tst_QDeclarativeWebView::cleanupTestCase()
+{
+ removeRecursive(tmpDir());
+}
+
+void tst_QDeclarativeWebView::basicProperties()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, QUrl("qrc:///resources/basic.qml"));
+ checkNoErrors(component);
+ QWebSettings::enablePersistentStorage(tmpDir());
+
+ QObject* wv = component.create();
+ QVERIFY(wv);
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+ QCOMPARE(wv->property("title").toString(), QLatin1String("Basic"));
+ QTRY_COMPARE(qvariant_cast<QPixmap>(wv->property("icon")).width(), 48);
+ QEXPECT_FAIL("", "'icon' property isn't working", Continue);
+ QCOMPARE(qvariant_cast<QPixmap>(wv->property("icon")), QPixmap("qrc:///resources/basic.png"));
+ QCOMPARE(wv->property("statusText").toString(), QLatin1String("status here"));
+ QCOMPARE(strippedHtml(fileContents(":/resources/basic.html")), strippedHtml(wv->property("html").toString()));
+ QEXPECT_FAIL("", "TODO: get preferred width from QGraphicsWebView result", Continue);
+ QCOMPARE(wv->property("preferredWidth").toInt(), 0);
+ QEXPECT_FAIL("", "TODO: get preferred height from QGraphicsWebView result", Continue);
+ QCOMPARE(wv->property("preferredHeight").toInt(), 0);
+ QCOMPARE(wv->property("url").toUrl(), QUrl("qrc:///resources/basic.html"));
+ QCOMPARE(wv->property("status").toInt(), int(QDeclarativeWebView::Ready));
+
+ QAction* reloadAction = wv->property("reload").value<QAction*>();
+ QVERIFY(reloadAction);
+ QVERIFY(reloadAction->isEnabled());
+ QAction* backAction = wv->property("back").value<QAction*>();
+ QVERIFY(backAction);
+ QVERIFY(!backAction->isEnabled());
+ QAction* forwardAction = wv->property("forward").value<QAction*>();
+ QVERIFY(forwardAction);
+ QVERIFY(!forwardAction->isEnabled());
+ QAction* stopAction = wv->property("stop").value<QAction*>();
+ QVERIFY(stopAction);
+ QVERIFY(!stopAction->isEnabled());
+
+ wv->setProperty("pixelCacheSize", 0); // mainly testing that it doesn't crash or anything!
+ QCOMPARE(wv->property("pixelCacheSize").toInt(), 0);
+ reloadAction->trigger();
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+}
+
+void tst_QDeclarativeWebView::elementAreaAt()
+{
+ QSKIP("This test should be changed to test 'heuristicZoom' instead.", SkipAll);
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, QUrl("qrc:///resources/elements.qml"));
+ checkNoErrors(component);
+ QDeclarativeWebView* wv = qobject_cast<QDeclarativeWebView*>(component.create());
+ QVERIFY(wv);
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+
+ // Areas from elements.html.
+// const QRect areaA(1, 1, 75, 54);
+// const QRect areaB(78, 3, 110, 50);
+// const QRect wholeView(0, 0, 310, 100);
+// const QRect areaBC(76, 1, 223, 54);
+
+// QCOMPARE(wv->elementAreaAt(40, 30, 100, 100), areaA);
+// QCOMPARE(wv->elementAreaAt(130, 30, 200, 100), areaB);
+// QCOMPARE(wv->elementAreaAt(40, 30, 400, 400), wholeView);
+// QCOMPARE(wv->elementAreaAt(130, 30, 280, 280), areaBC);
+// QCOMPARE(wv->elementAreaAt(130, 30, 400, 400), wholeView);
+}
+
+void tst_QDeclarativeWebView::historyNav()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, QUrl("qrc:///resources/basic.qml"));
+ checkNoErrors(component);
+ QWebSettings::enablePersistentStorage(tmpDir());
+
+ QObject* wv = component.create();
+ QVERIFY(wv);
+
+ QAction* reloadAction = wv->property("reload").value<QAction*>();
+ QVERIFY(reloadAction);
+ QAction* backAction = wv->property("back").value<QAction*>();
+ QVERIFY(backAction);
+ QAction* forwardAction = wv->property("forward").value<QAction*>();
+ QVERIFY(forwardAction);
+ QAction* stopAction = wv->property("stop").value<QAction*>();
+ QVERIFY(stopAction);
+
+ for (int i = 1; i <= 2; ++i) {
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+ QCOMPARE(wv->property("title").toString(), QLatin1String("Basic"));
+ QTRY_COMPARE(qvariant_cast<QPixmap>(wv->property("icon")).width(), 48);
+ QEXPECT_FAIL("", "'icon' property isn't working", Continue);
+ QCOMPARE(qvariant_cast<QPixmap>(wv->property("icon")), QPixmap("qrc:///data/basic.png"));
+ QCOMPARE(wv->property("statusText").toString(), QLatin1String("status here"));
+ QCOMPARE(strippedHtml(fileContents(":/resources/basic.html")), strippedHtml(wv->property("html").toString()));
+ QEXPECT_FAIL("", "TODO: get preferred width from QGraphicsWebView result", Continue);
+ QCOMPARE(wv->property("preferredWidth").toDouble(), 0.0);
+ QCOMPARE(wv->property("url").toUrl(), QUrl("qrc:///resources/basic.html"));
+ QCOMPARE(wv->property("status").toInt(), int(QDeclarativeWebView::Ready));
+ QVERIFY(reloadAction->isEnabled());
+ QVERIFY(!backAction->isEnabled());
+ QVERIFY(!forwardAction->isEnabled());
+ QVERIFY(!stopAction->isEnabled());
+ reloadAction->trigger();
+ }
+
+ wv->setProperty("url", QUrl("qrc:///resources/forward.html"));
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+ QCOMPARE(wv->property("title").toString(), QLatin1String("Forward"));
+ QTRY_COMPARE(qvariant_cast<QPixmap>(wv->property("icon")).width(), 32);
+ QEXPECT_FAIL("", "'icon' property isn't working", Continue);
+ QCOMPARE(qvariant_cast<QPixmap>(wv->property("icon")), QPixmap("qrc:///resources/forward.png"));
+ QCOMPARE(strippedHtml(fileContents(":/resources/forward.html")), strippedHtml(wv->property("html").toString()));
+ QCOMPARE(wv->property("url").toUrl(), QUrl("qrc:///resources/forward.html"));
+ QCOMPARE(wv->property("status").toInt(), int(QDeclarativeWebView::Ready));
+ QCOMPARE(wv->property("statusText").toString(), QString());
+
+ QVERIFY(reloadAction->isEnabled());
+ QVERIFY(backAction->isEnabled());
+ QVERIFY(!forwardAction->isEnabled());
+ QVERIFY(!stopAction->isEnabled());
+
+ backAction->trigger();
+
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+ QCOMPARE(wv->property("title").toString(), QLatin1String("Basic"));
+ QCOMPARE(strippedHtml(fileContents(":/resources/basic.html")), strippedHtml(wv->property("html").toString()));
+ QCOMPARE(wv->property("url").toUrl(), QUrl("qrc:///resources/basic.html"));
+ QCOMPARE(wv->property("status").toInt(), int(QDeclarativeWebView::Ready));
+
+ QVERIFY(reloadAction->isEnabled());
+ QVERIFY(!backAction->isEnabled());
+ QVERIFY(forwardAction->isEnabled());
+ QVERIFY(!stopAction->isEnabled());
+}
+
+static inline QVariant callEvaluateJavaScript(QObject *object, const QString& snippet)
+{
+ QVariant result;
+ QMetaObject::invokeMethod(object, "evaluateJavaScript", Q_RETURN_ARG(QVariant, result), Q_ARG(QString, snippet));
+ return result;
+}
+
+void tst_QDeclarativeWebView::javaScript()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, QUrl("qrc:///resources/javaScript.qml"));
+ checkNoErrors(component);
+ QObject* wv = component.create();
+ QVERIFY(wv);
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+
+ QCOMPARE(callEvaluateJavaScript(wv, "123").toInt(), 123);
+ QCOMPARE(callEvaluateJavaScript(wv, "window.status").toString(), QLatin1String("status here"));
+ QCOMPARE(callEvaluateJavaScript(wv, "window.myjsname.qmlprop").toString(), QLatin1String("qmlvalue"));
+}
+
+void tst_QDeclarativeWebView::loadError()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, QUrl("qrc:///resources/loadError.qml"));
+ checkNoErrors(component);
+ QWebSettings::enablePersistentStorage(tmpDir());
+
+ QObject* wv = component.create();
+ QVERIFY(wv);
+ QAction* reloadAction = wv->property("reload").value<QAction*>();
+ QVERIFY(reloadAction);
+
+ for (int i = 1; i <= 2; ++i) {
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+ QCOMPARE(wv->property("title").toString(), QString());
+ QCOMPARE(wv->property("statusText").toString(), QString()); // HTML 'status bar' text, not error message
+ QCOMPARE(wv->property("url").toUrl(), QUrl("qrc:///resources/does-not-exist.html")); // Unlike QWebPage, which loses url
+ QCOMPARE(wv->property("status").toInt(), int(QDeclarativeWebView::Error));
+ reloadAction->trigger();
+ }
+}
+
+void tst_QDeclarativeWebView::multipleWindows()
+{
+ QSKIP("Rework this test to not depend on QDeclarativeGrid", SkipAll);
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, QUrl("qrc:///resources/newwindows.qml"));
+ checkNoErrors(component);
+
+// QDeclarativeGrid *grid = qobject_cast<QDeclarativeGrid*>(component.create());
+// QVERIFY(grid != 0);
+// QTRY_COMPARE(grid->children().count(), 2+4); // Component, Loader (with 1 WebView), 4 new-window WebViews
+// QDeclarativeItem* popup = qobject_cast<QDeclarativeItem*>(grid->children().at(2)); // first popup after Component and Loader.
+// QVERIFY(popup != 0);
+// QTRY_COMPARE(popup->x(), 150.0);
+}
+
+void tst_QDeclarativeWebView::newWindowComponent()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, QUrl("qrc:///resources/propertychanges.qml"));
+ checkNoErrors(component);
+ QDeclarativeItem* rootItem = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(rootItem);
+ QObject* wv = rootItem->findChild<QObject*>("webView");
+ QVERIFY(wv);
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+
+ QDeclarativeComponent substituteComponent(&engine);
+ substituteComponent.setData("import QtQuick 1.0; WebView { objectName: 'newWebView'; url: 'basic.html'; }", QUrl::fromLocalFile(""));
+ QSignalSpy newWindowComponentSpy(wv, SIGNAL(newWindowComponentChanged()));
+
+ wv->setProperty("newWindowComponent", QVariant::fromValue(&substituteComponent));
+ QCOMPARE(wv->property("newWindowComponent"), QVariant::fromValue(&substituteComponent));
+ QCOMPARE(newWindowComponentSpy.count(), 1);
+
+ wv->setProperty("newWindowComponent", QVariant::fromValue(&substituteComponent));
+ QCOMPARE(newWindowComponentSpy.count(), 1);
+
+ wv->setProperty("newWindowComponent", QVariant::fromValue((QDeclarativeComponent*)0));
+ QCOMPARE(newWindowComponentSpy.count(), 2);
+}
+
+void tst_QDeclarativeWebView::newWindowParent()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, QUrl("qrc:///resources/propertychanges.qml"));
+ checkNoErrors(component);
+ QDeclarativeItem* rootItem = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(rootItem);
+ QObject* wv = rootItem->findChild<QObject*>("webView");
+ QVERIFY(wv);
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+
+ QDeclarativeItem* oldWindowParent = rootItem->findChild<QDeclarativeItem*>("oldWindowParent");
+ QCOMPARE(qvariant_cast<QDeclarativeItem*>(wv->property("newWindowParent")), oldWindowParent);
+ QSignalSpy newWindowParentSpy(wv, SIGNAL(newWindowParentChanged()));
+
+ QDeclarativeItem* newWindowParent = rootItem->findChild<QDeclarativeItem*>("newWindowParent");
+ wv->setProperty("newWindowParent", QVariant::fromValue(newWindowParent));
+ QVERIFY(newWindowParent);
+ QVERIFY(oldWindowParent);
+ QCOMPARE(oldWindowParent->childItems().count(), 0);
+ QCOMPARE(wv->property("newWindowParent"), QVariant::fromValue(newWindowParent));
+ QCOMPARE(newWindowParentSpy.count(), 1);
+
+ wv->setProperty("newWindowParent", QVariant::fromValue(newWindowParent));
+ QCOMPARE(newWindowParentSpy.count(), 1);
+
+ wv->setProperty("newWindowParent", QVariant::fromValue((QDeclarativeItem*)0));
+ QCOMPARE(newWindowParentSpy.count(), 2);
+}
+
void tst_QDeclarativeWebView::preferredWidthTest()
{
QDeclarativeEngine engine;
@@ -86,6 +387,110 @@ void tst_QDeclarativeWebView::preferredHeightDefaultTest()
QCOMPARE(wv->property("prefHeight").toDouble(), view.preferredHeight());
}
+void tst_QDeclarativeWebView::pressGrabTime()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, QUrl("qrc:///resources/propertychanges.qml"));
+ checkNoErrors(component);
+ QDeclarativeItem* rootItem = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(rootItem);
+ QObject* wv = rootItem->findChild<QObject*>("webView");
+ QVERIFY(wv);
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+ QCOMPARE(wv->property("pressGrabTime").toInt(), 200);
+ QSignalSpy pressGrabTimeSpy(wv, SIGNAL(pressGrabTimeChanged()));
+
+ wv->setProperty("pressGrabTime", 100);
+ QCOMPARE(wv->property("pressGrabTime").toInt(), 100);
+ QCOMPARE(pressGrabTimeSpy.count(), 1);
+
+ wv->setProperty("pressGrabTime", 100);
+ QCOMPARE(pressGrabTimeSpy.count(), 1);
+
+ wv->setProperty("pressGrabTime", 0);
+ QCOMPARE(pressGrabTimeSpy.count(), 2);
+}
+
+void tst_QDeclarativeWebView::renderingEnabled()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, QUrl("qrc:///resources/propertychanges.qml"));
+ checkNoErrors(component);
+ QDeclarativeItem* rootItem = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(rootItem);
+ QObject* wv = rootItem->findChild<QObject*>("webView");
+ QVERIFY(wv);
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+
+ QVERIFY(wv->property("renderingEnabled").toBool());
+ QSignalSpy renderingEnabledSpy(wv, SIGNAL(renderingEnabledChanged()));
+
+ wv->setProperty("renderingEnabled", false);
+ QVERIFY(!wv->property("renderingEnabled").toBool());
+ QCOMPARE(renderingEnabledSpy.count(), 1);
+
+ wv->setProperty("renderingEnabled", false);
+ QCOMPARE(renderingEnabledSpy.count(), 1);
+
+ wv->setProperty("renderingEnabled", true);
+ QCOMPARE(renderingEnabledSpy.count(), 2);
+}
+
+void tst_QDeclarativeWebView::setHtml()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, QUrl("qrc:///resources/sethtml.qml"));
+ checkNoErrors(component);
+ QObject* wv = component.create();
+ QVERIFY(wv);
+ QCOMPARE(wv->property("html").toString(), QLatin1String("<html><head></head><body><p>This is a <b>string</b> set on the WebView</p></body></html>"));
+
+ QSignalSpy spy(wv, SIGNAL(htmlChanged()));
+ wv->setProperty("html", QLatin1String("<html><head><title>Basic</title></head><body><p>text</p></body></html>"));
+ QCOMPARE(spy.count(), 1);
+}
+
+void tst_QDeclarativeWebView::settings()
+{
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine, QUrl("qrc:///resources/basic.qml"));
+ checkNoErrors(component);
+ QObject* wv = component.create();
+ QVERIFY(wv);
+ QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
+
+ QObject* s = QDeclarativeProperty(wv, "settings").object();
+ QVERIFY(s);
+
+ QStringList settingsList;
+ settingsList << QString::fromAscii("autoLoadImages")
+ << QString::fromAscii("developerExtrasEnabled")
+ << QString::fromAscii("javaEnabled")
+ << QString::fromAscii("javascriptCanAccessClipboard")
+ << QString::fromAscii("javascriptCanOpenWindows")
+ << QString::fromAscii("javascriptEnabled")
+ << QString::fromAscii("linksIncludedInFocusChain")
+ << QString::fromAscii("localContentCanAccessRemoteUrls")
+ << QString::fromAscii("localStorageDatabaseEnabled")
+ << QString::fromAscii("offlineStorageDatabaseEnabled")
+ << QString::fromAscii("offlineWebApplicationCacheEnabled")
+ << QString::fromAscii("pluginsEnabled")
+ << QString::fromAscii("printElementBackgrounds")
+ << QString::fromAscii("privateBrowsingEnabled")
+ << QString::fromAscii("zoomTextOnly");
+
+ // Merely tests that setting gets stored (in QWebSettings), behavioural tests are in WebKit.
+ for (int b = 0; b <= 1; b++) {
+ bool value = !!b;
+ foreach (const QString& name, settingsList)
+ s->setProperty(name.toAscii().data(), value);
+ for (int i = 0; i < 2; i++) {
+ foreach (const QString& name, settingsList)
+ QCOMPARE(s->property(name.toAscii().data()).toBool(), value);
+ }
+ }
+}
+
#if QT_VERSION >= 0x040703
void tst_QDeclarativeWebView::backgroundColor()
{
@@ -120,6 +525,16 @@ void tst_QDeclarativeWebView::checkNoErrors(const QDeclarativeComponent& compone
{
// Wait until the component is ready
QTRY_VERIFY(component.isReady() || component.isError());
+ if (component.isError()) {
+ QList<QDeclarativeError> errors = component.errors();
+ for (int ii = 0; ii < errors.count(); ++ii) {
+ const QDeclarativeError &error = errors.at(ii);
+ QByteArray errorStr = QByteArray::number(error.line()) + ":" +
+ QByteArray::number(error.column()) + ":" +
+ error.description().toUtf8();
+ qWarning() << errorStr;
+ }
+ }
QVERIFY(!component.isError());
}
diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/tst_qdeclarativewebview.qrc b/Source/WebKit/qt/tests/qdeclarativewebview/tst_qdeclarativewebview.qrc
index e14c333..fb66ad8 100644
--- a/Source/WebKit/qt/tests/qdeclarativewebview/tst_qdeclarativewebview.qrc
+++ b/Source/WebKit/qt/tests/qdeclarativewebview/tst_qdeclarativewebview.qrc
@@ -1,8 +1,22 @@
<RCC>
<qresource prefix="/">
- <file>resources/webviewtestdefault.qml</file>
- <file>resources/webviewtest.qml</file>
+ <file>resources/basic.html</file>
+ <file>resources/basic.png</file>
+ <file>resources/basic.qml</file>
+ <file>resources/elements.html</file>
+ <file>resources/elements.qml</file>
+ <file>resources/forward.html</file>
+ <file>resources/forward.png</file>
+ <file>resources/javaScript.html</file>
+ <file>resources/javaScript.qml</file>
+ <file>resources/loadError.qml</file>
+ <file>resources/newwindows.html</file>
+ <file>resources/newwindows.qml</file>
+ <file>resources/propertychanges.qml</file>
<file>resources/sample.html</file>
+ <file>resources/sethtml.qml</file>
<file>resources/webviewbackgroundcolor.qml</file>
+ <file>resources/webviewtestdefault.qml</file>
+ <file>resources/webviewtest.qml</file>
</qresource>
</RCC>
diff --git a/Source/WebKit/qt/tests/qgraphicswebview/resources/56929.html b/Source/WebKit/qt/tests/qgraphicswebview/resources/56929.html
new file mode 100644
index 0000000..2f7fa97
--- /dev/null
+++ b/Source/WebKit/qt/tests/qgraphicswebview/resources/56929.html
@@ -0,0 +1,8 @@
+<body style="background-color: white">
+ <div id="1" style="width: 50%; height: 50%; background-color: green"/>
+ <script>
+ function resizeDiv() {
+ document.getElementById("1").setAttribute("style", "width: 150%; height: 150%; background-color: green");
+ }
+ </script>
+</body>
diff --git a/Source/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp b/Source/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
index 7cc88db..ed162c4 100644
--- a/Source/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
+++ b/Source/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
@@ -21,6 +21,7 @@
#include <QtTest/QtTest>
#include <QGraphicsSceneMouseEvent>
#include <QGraphicsView>
+#include <QStyleOptionGraphicsItem>
#include <qgraphicswebview.h>
#include <qwebpage.h>
#include <qwebframe.h>
@@ -43,7 +44,9 @@ private slots:
void setPalette_data();
void setPalette();
void renderHints();
-
+#if defined(ENABLE_TILED_BACKING_STORE) && ENABLE_TILED_BACKING_STORE
+ void bug56929();
+#endif
#if defined(ENABLE_WEBGL) && ENABLE_WEBGL
void webglSoftwareFallbackVerticalOrientation();
void webglSoftwareFallbackHorizontalOrientation();
@@ -191,6 +194,38 @@ void tst_QGraphicsWebView::widgetsRenderingThroughCache()
QCOMPARE(referencePixmap.toImage(), viewWithTiling.toImage());
}
+#if defined(ENABLE_TILED_BACKING_STORE) && ENABLE_TILED_BACKING_STORE
+void tst_QGraphicsWebView::bug56929()
+{
+ // When rendering from tiles sychronous layout should not be triggered
+ // and scrollbars should be in sync with the size of the document in the displayed state.
+
+ QGraphicsWebView* webView = new QGraphicsWebView();
+ webView->setGeometry(QRectF(0.0, 0.0, 100.0, 100.0));
+ QGraphicsView view(new QGraphicsScene());
+ view.scene()->setParent(&view);
+ view.scene()->addItem(webView);
+ webView->settings()->setAttribute(QWebSettings::TiledBackingStoreEnabled, true);
+ QUrl url("qrc:///resources/56929.html");
+ webView->load(url);
+ QVERIFY(waitForSignal(webView, SIGNAL(loadFinished(bool))));
+ QStyleOptionGraphicsItem option;
+ option.exposedRect = webView->geometry();
+ QImage img(option.exposedRect.width(), option.exposedRect.height(), QImage::Format_ARGB32_Premultiplied);
+ QPainter painter(&img);
+ // This will not paint anything as the tiles are not ready, yet.
+ webView->paint(&painter, &option);
+ QApplication::processEvents();
+ webView->paint(&painter, &option);
+ QCOMPARE(img.pixel(option.exposedRect.width() - 2, option.exposedRect.height() / 2), qRgba(255, 255, 255, 255));
+ painter.fillRect(option.exposedRect, Qt::black);
+ QCOMPARE(img.pixel(option.exposedRect.width() - 2, option.exposedRect.height() / 2), qRgba(0, 0, 0, 255));
+ webView->page()->mainFrame()->evaluateJavaScript(QString("resizeDiv();"));
+ webView->paint(&painter, &option);
+ QCOMPARE(img.pixel(option.exposedRect.width() - 2, option.exposedRect.height() / 2), qRgba(255, 255, 255, 255));
+}
+#endif
+
void tst_QGraphicsWebView::microFocusCoordinates()
{
QWebPage* page = new QWebPage;
diff --git a/Source/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.qrc b/Source/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.qrc
index 1488fcf..f929fe7 100644
--- a/Source/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.qrc
+++ b/Source/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.qrc
@@ -3,5 +3,6 @@
<file>resources/input_types.html</file>
<file>resources/pointing_right.html</file>
<file>resources/pointing_up.html</file>
+ <file>resources/56929.html</file>
</qresource>
</RCC>
diff --git a/Source/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp b/Source/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
index c7c49a2..9e9948a 100644
--- a/Source/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
+++ b/Source/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
@@ -483,7 +483,7 @@ void tst_QWebElement::style()
QCOMPARE(p.styleProperty("color", QWebElement::CascadedStyle), QLatin1String("green"));
p.setStyleProperty("color", "blue");
- QCOMPARE(p.styleProperty("color", QWebElement::InlineStyle), QLatin1String("green"));
+ QCOMPARE(p.styleProperty("color", QWebElement::InlineStyle), QLatin1String("blue"));
QCOMPARE(p.styleProperty("color", QWebElement::CascadedStyle), QLatin1String("green"));
p.setStyleProperty("color", "blue !important");
diff --git a/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
index 2c44e4c..3b9324d 100644
--- a/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
+++ b/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
@@ -614,6 +614,7 @@ private slots:
void urlChange();
void domCycles();
void requestedUrl();
+ void requestedUrlAfterSetAndLoadFailures();
void javaScriptWindowObjectCleared_data();
void javaScriptWindowObjectCleared();
void javaScriptWindowObjectClearedOnEvaluate();
@@ -649,10 +650,14 @@ private slots:
void setContent();
void setCacheLoadControlAttribute();
void setUrlWithPendingLoads();
+ void setUrlWithFragment_data();
void setUrlWithFragment();
void setUrlToEmpty();
void setUrlToInvalid();
void setUrlHistory();
+ void setUrlSameUrl();
+ void setUrlThenLoads_data();
+ void setUrlThenLoads();
private:
QString evalJS(const QString&s) {
@@ -2309,7 +2314,7 @@ public:
else if (request.url() == QUrl("qrc:/fake-ssl-error.html"))
setError(QNetworkReply::SslHandshakeFailedError, tr("Fake error !")); // force a ssl error
#endif
- else if (request.url() == QUrl("http://abcdef.abcdef/"))
+ else if (request.url().host() == QLatin1String("abcdef.abcdef"))
setError(QNetworkReply::HostNotFoundError, tr("Invalid URL"));
open(QIODevice::ReadOnly);
@@ -2413,6 +2418,30 @@ void tst_QWebFrame::requestedUrl()
#endif
}
+void tst_QWebFrame::requestedUrlAfterSetAndLoadFailures()
+{
+ QWebPage page;
+ QWebFrame* frame = page.mainFrame();
+
+ QSignalSpy spy(frame, SIGNAL(loadFinished(bool)));
+
+ const QUrl first("http://abcdef.abcdef/");
+ frame->setUrl(first);
+ ::waitForSignal(frame, SIGNAL(loadFinished(bool)));
+ QCOMPARE(frame->url(), first);
+ QCOMPARE(frame->requestedUrl(), first);
+ QVERIFY(!spy.at(0).first().toBool());
+
+ const QUrl second("http://abcdef.abcdef/another_page.html");
+ QVERIFY(first != second);
+
+ frame->load(second);
+ ::waitForSignal(frame, SIGNAL(loadFinished(bool)));
+ QCOMPARE(frame->url(), first);
+ QCOMPARE(frame->requestedUrl(), second);
+ QVERIFY(!spy.at(1).first().toBool());
+}
+
void tst_QWebFrame::javaScriptWindowObjectCleared_data()
{
QTest::addColumn<QString>("html");
@@ -2671,6 +2700,8 @@ void tst_QWebFrame::inputFieldFocus()
int delay = qApp->cursorFlashTime() * 2;
// focus the lineedit and check if it blinks
+ bool autoSipEnabled = qApp->autoSipEnabled();
+ qApp->setAutoSipEnabled(false);
const QWebElement inputElement = view.page()->mainFrame()->documentElement().findFirst(QLatin1String("input[type=text]"));
QTest::mouseClick(&view, Qt::LeftButton, 0, inputElement.geometry().center());
m_inputFieldsTestView = &view;
@@ -2678,6 +2709,7 @@ void tst_QWebFrame::inputFieldFocus()
QTest::qWait(delay);
QVERIFY2(m_inputFieldTestPaintCount >= 3,
"The input field should have a blinking caret");
+ qApp->setAutoSipEnabled(autoSipEnabled);
}
void tst_QWebFrame::hitTestContent()
@@ -3323,24 +3355,42 @@ void tst_QWebFrame::setUrlWithPendingLoads()
page.mainFrame()->setUrl(QUrl("about:blank"));
}
+void tst_QWebFrame::setUrlWithFragment_data()
+{
+ QTest::addColumn<QUrl>("previousUrl");
+ QTest::newRow("empty") << QUrl();
+ QTest::newRow("same URL no fragment") << QUrl("qrc:/test1.html");
+ // See comments in setUrlSameUrl about using setUrl() with the same url().
+ QTest::newRow("same URL with same fragment") << QUrl("qrc:/test1.html#");
+ QTest::newRow("same URL with different fragment") << QUrl("qrc:/test1.html#anotherFragment");
+ QTest::newRow("another URL") << QUrl("qrc:/test2.html");
+}
+
+// Based on bug report https://bugs.webkit.org/show_bug.cgi?id=32723
void tst_QWebFrame::setUrlWithFragment()
{
- QSKIP("Bug https://bugs.webkit.org/show_bug.cgi?id=32723", SkipAll);
+ QFETCH(QUrl, previousUrl);
- // Based on bug report https://bugs.webkit.org/show_bug.cgi?id=32723
QWebPage page;
- QSignalSpy spy(&page, SIGNAL(loadFinished(bool)));
+ QWebFrame* frame = page.mainFrame();
+
+ if (!previousUrl.isEmpty()) {
+ frame->load(previousUrl);
+ ::waitForSignal(frame, SIGNAL(loadFinished(bool)));
+ QCOMPARE(frame->url(), previousUrl);
+ }
+ QSignalSpy spy(frame, SIGNAL(loadFinished(bool)));
const QUrl url("qrc:/test1.html#");
QVERIFY(!url.fragment().isNull());
- page.mainFrame()->setUrl(url);
- ::waitForSignal(&page, SIGNAL(loadFinished(bool)));
+ frame->setUrl(url);
+ ::waitForSignal(frame, SIGNAL(loadFinished(bool)));
QCOMPARE(spy.count(), 1);
- QVERIFY(!page.mainFrame()->toPlainText().isEmpty());
- QCOMPARE(page.mainFrame()->requestedUrl(), url);
- QCOMPARE(page.mainFrame()->url(), url);
+ QVERIFY(!frame->toPlainText().isEmpty());
+ QCOMPARE(frame->requestedUrl(), url);
+ QCOMPARE(frame->url(), url);
}
void tst_QWebFrame::setUrlToEmpty()
@@ -3486,5 +3536,110 @@ void tst_QWebFrame::setUrlHistory()
QCOMPARE(m_page->history()->count(), 2);
}
+void tst_QWebFrame::setUrlSameUrl()
+{
+ const QUrl url1("qrc:/test1.html");
+ const QUrl url2("qrc:/test2.html");
+
+ QWebPage page;
+ QWebFrame* frame = page.mainFrame();
+ FakeNetworkManager* networkManager = new FakeNetworkManager(&page);
+ page.setNetworkAccessManager(networkManager);
+
+ QSignalSpy spy(frame, SIGNAL(loadFinished(bool)));
+
+ frame->setUrl(url1);
+ waitForSignal(frame, SIGNAL(loadFinished(bool)));
+ QVERIFY(frame->url() != url1); // Nota bene: our QNAM redirects url1 to url2
+ QCOMPARE(frame->url(), url2);
+ QCOMPARE(spy.count(), 1);
+
+ frame->setUrl(url1);
+ waitForSignal(frame, SIGNAL(loadFinished(bool)));
+ QVERIFY(frame->url() != url1);
+ QCOMPARE(frame->url(), url2);
+ QCOMPARE(spy.count(), 2);
+
+ // Now a case without redirect. The existing behavior we have for setUrl()
+ // is more like a "clear(); load()", so the page will be loaded again, even
+ // if urlToBeLoaded == url(). This test should be changed if we want to
+ // make setUrl() early return in this case.
+ frame->setUrl(url2);
+ waitForSignal(frame, SIGNAL(loadFinished(bool)));
+ QCOMPARE(frame->url(), url2);
+ QCOMPARE(spy.count(), 3);
+
+ frame->setUrl(url1);
+ waitForSignal(frame, SIGNAL(loadFinished(bool)));
+ QCOMPARE(frame->url(), url2);
+ QCOMPARE(spy.count(), 4);
+}
+
+static inline QUrl extractBaseUrl(const QUrl& url)
+{
+ return url.resolved(QUrl());
+}
+
+void tst_QWebFrame::setUrlThenLoads_data()
+{
+ QTest::addColumn<QUrl>("url");
+ QTest::addColumn<QUrl>("baseUrl");
+
+ QTest::newRow("resource file") << QUrl("qrc:/test1.html") << extractBaseUrl(QUrl("qrc:/test1.html"));
+ QTest::newRow("base specified in HTML") << QUrl("data:text/html,<head><base href=\"http://different.base/\"></head>") << QUrl("http://different.base/");
+}
+
+void tst_QWebFrame::setUrlThenLoads()
+{
+ QFETCH(QUrl, url);
+ QFETCH(QUrl, baseUrl);
+ QWebFrame* frame = m_page->mainFrame();
+ QSignalSpy urlChangedSpy(frame, SIGNAL(urlChanged(QUrl)));
+ QSignalSpy startedSpy(frame, SIGNAL(loadStarted()));
+ QSignalSpy finishedSpy(frame, SIGNAL(loadFinished(bool)));
+
+ frame->setUrl(url);
+ QCOMPARE(startedSpy.count(), 1);
+ ::waitForSignal(frame, SIGNAL(urlChanged(QUrl)));
+ QCOMPARE(urlChangedSpy.count(), 1);
+ QVERIFY(finishedSpy.at(0).first().toBool());
+ QCOMPARE(frame->url(), url);
+ QCOMPARE(frame->requestedUrl(), url);
+ QCOMPARE(frame->baseUrl(), baseUrl);
+
+ const QUrl urlToLoad1("qrc:/test2.html");
+ const QUrl urlToLoad2("qrc:/test1.html");
+
+ // Just after first load. URL didn't changed yet.
+ frame->load(urlToLoad1);
+ QCOMPARE(startedSpy.count(), 2);
+ QCOMPARE(frame->url(), url);
+ QCOMPARE(frame->requestedUrl(), urlToLoad1);
+ QCOMPARE(frame->baseUrl(), baseUrl);
+
+ // After first URL changed.
+ ::waitForSignal(frame, SIGNAL(urlChanged(QUrl)));
+ QCOMPARE(urlChangedSpy.count(), 2);
+ QVERIFY(finishedSpy.at(1).first().toBool());
+ QCOMPARE(frame->url(), urlToLoad1);
+ QCOMPARE(frame->requestedUrl(), urlToLoad1);
+ QCOMPARE(frame->baseUrl(), extractBaseUrl(urlToLoad1));
+
+ // Just after second load. URL didn't changed yet.
+ frame->load(urlToLoad2);
+ QCOMPARE(startedSpy.count(), 3);
+ QCOMPARE(frame->url(), urlToLoad1);
+ QCOMPARE(frame->requestedUrl(), urlToLoad2);
+ QCOMPARE(frame->baseUrl(), extractBaseUrl(urlToLoad1));
+
+ // After second URL changed.
+ ::waitForSignal(frame, SIGNAL(urlChanged(QUrl)));
+ QCOMPARE(urlChangedSpy.count(), 3);
+ QVERIFY(finishedSpy.at(2).first().toBool());
+ QCOMPARE(frame->url(), urlToLoad2);
+ QCOMPARE(frame->requestedUrl(), urlToLoad2);
+ QCOMPARE(frame->baseUrl(), extractBaseUrl(urlToLoad2));
+}
+
QTEST_MAIN(tst_QWebFrame)
#include "tst_qwebframe.moc"
diff --git a/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index d43b2de..9e3337b 100644
--- a/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -434,7 +434,7 @@ void tst_QWebPage::userStyleSheet()
void tst_QWebPage::loadHtml5Video()
{
-#if defined(ENABLE_QT_MULTIMEDIA) && ENABLE_QT_MULTIMEDIA
+#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
QByteArray url("http://does.not/exist?a=1%2Cb=2");
m_view->setHtml("<p><video id ='video' src='" + url + "' autoplay/></p>");
QTest::qWait(2000);
@@ -986,7 +986,10 @@ void tst_QWebPage::cursorMovements()
"getSelection().addRange(range);";
page->mainFrame()->evaluateJavaScript(script);
QCOMPARE(page->selectedText().trimmed(), QString::fromLatin1("The quick brown fox"));
- QCOMPARE(page->selectedHtml().trimmed(), QString::fromLatin1("<span class=\"Apple-style-span\" style=\"border-collapse: separate; color: rgb(0, 0, 0); font-family: Times; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; \"><p id=\"one\">The quick brown fox</p></span>"));
+
+ QRegExp regExp(" style=\".*\"");
+ regExp.setMinimal(true);
+ QCOMPARE(page->selectedHtml().trimmed().replace(regExp, ""), QString::fromLatin1("<span class=\"Apple-style-span\"><p id=\"one\">The quick brown fox</p></span>"));
// these actions must exist
QVERIFY(page->action(QWebPage::MoveToNextChar) != 0);
@@ -1217,7 +1220,9 @@ void tst_QWebPage::textSelection()
"getSelection().addRange(range);";
page->mainFrame()->evaluateJavaScript(selectScript);
QCOMPARE(page->selectedText().trimmed(), QString::fromLatin1("The quick brown fox"));
- QCOMPARE(page->selectedHtml().trimmed(), QString::fromLatin1("<span class=\"Apple-style-span\" style=\"border-collapse: separate; color: rgb(0, 0, 0); font-family: Times; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; \"><p id=\"one\">The quick brown fox</p></span>"));
+ QRegExp regExp(" style=\".*\"");
+ regExp.setMinimal(true);
+ QCOMPARE(page->selectedHtml().trimmed().replace(regExp, ""), QString::fromLatin1("<span class=\"Apple-style-span\"><p id=\"one\">The quick brown fox</p></span>"));
// Make sure hasSelection returns true, since there is selected text now...
QCOMPARE(page->hasSelection(), true);
@@ -2671,10 +2676,12 @@ void tst_QWebPage::findText()
QVERIFY(m_page->selectedText().isEmpty());
QVERIFY(m_page->selectedHtml().isEmpty());
QStringList words = (QStringList() << "foo" << "bar");
+ QRegExp regExp(" style=\".*\"");
+ regExp.setMinimal(true);
foreach (QString subString, words) {
m_page->findText(subString, QWebPage::FindWrapsAroundDocument);
QCOMPARE(m_page->selectedText(), subString);
- QCOMPARE(m_page->selectedHtml(), QString("<span class=\"Apple-style-span\" style=\"border-collapse: separate; color: rgb(0, 0, 0); font-family: Times; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; \">%1</span>").arg(subString));
+ QCOMPARE(m_page->selectedHtml().trimmed().replace(regExp, ""), QString("<span class=\"Apple-style-span\">%1</span>").arg(subString));
m_page->findText("");
QVERIFY(m_page->selectedText().isEmpty());
QVERIFY(m_page->selectedHtml().isEmpty());
diff --git a/Source/WebKit/qt/tests/qwebview/tst_qwebview.cpp b/Source/WebKit/qt/tests/qwebview/tst_qwebview.cpp
index c7600fc..f557dc1 100644
--- a/Source/WebKit/qt/tests/qwebview/tst_qwebview.cpp
+++ b/Source/WebKit/qt/tests/qwebview/tst_qwebview.cpp
@@ -31,6 +31,16 @@
#include <qwebelement.h>
#include <qwebframe.h>
+#ifdef Q_OS_SYMBIAN
+#define VERIFY_INPUTMETHOD_HINTS(actual, expect) \
+ QVERIFY(actual & Qt::ImhNoAutoUppercase); \
+ QVERIFY(actual & Qt::ImhNoPredictiveText); \
+ QVERIFY(actual & expect);
+#else
+#define VERIFY_INPUTMETHOD_HINTS(actual, expect) \
+ QVERIFY(actual == expect);
+#endif
+
class tst_QWebView : public QObject
{
Q_OBJECT
@@ -253,37 +263,37 @@ void tst_QWebView::focusInputTypes()
// 'password' field
inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=password]"));
QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
- QVERIFY(webView.inputMethodHints() == Qt::ImhHiddenText);
+ VERIFY_INPUTMETHOD_HINTS(webView.inputMethodHints(), Qt::ImhHiddenText);
QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'tel' field
inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=tel]"));
QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
- QVERIFY(webView.inputMethodHints() == Qt::ImhDialableCharactersOnly);
+ VERIFY_INPUTMETHOD_HINTS(webView.inputMethodHints(), Qt::ImhDialableCharactersOnly);
QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'number' field
inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=number]"));
QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
- QVERIFY(webView.inputMethodHints() == Qt::ImhDigitsOnly);
+ VERIFY_INPUTMETHOD_HINTS(webView.inputMethodHints(), Qt::ImhDigitsOnly);
QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'email' field
inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=email]"));
QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
- QVERIFY(webView.inputMethodHints() == Qt::ImhEmailCharactersOnly);
+ VERIFY_INPUTMETHOD_HINTS(webView.inputMethodHints(), Qt::ImhEmailCharactersOnly);
QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'url' field
inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=url]"));
QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
- QVERIFY(webView.inputMethodHints() == Qt::ImhUrlCharactersOnly);
+ VERIFY_INPUTMETHOD_HINTS(webView.inputMethodHints(), Qt::ImhUrlCharactersOnly);
QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'password' field
inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=password]"));
QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
- QVERIFY(webView.inputMethodHints() == Qt::ImhHiddenText);
+ VERIFY_INPUTMETHOD_HINTS(webView.inputMethodHints(), Qt::ImhHiddenText);
QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'text' type
@@ -300,13 +310,18 @@ void tst_QWebView::focusInputTypes()
// 'password' field
inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=password]"));
QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
- QVERIFY(webView.inputMethodHints() == Qt::ImhHiddenText);
+ VERIFY_INPUTMETHOD_HINTS(webView.inputMethodHints(), Qt::ImhHiddenText);
QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'text area' field
inputElement = mainFrame->documentElement().findFirst(QLatin1String("textarea"));
QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
+#if defined(Q_OS_SYMBIAN)
+ QVERIFY(webView.inputMethodHints() & Qt::ImhNoAutoUppercase);
+ QVERIFY(webView.inputMethodHints() & Qt::ImhNoPredictiveText);
+#else
QVERIFY(webView.inputMethodHints() == Qt::ImhNone);
+#endif
QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
}
diff --git a/Source/WebKit/qt/tests/tests.pri b/Source/WebKit/qt/tests/tests.pri
index ebb6f8e..3b0c358 100644
--- a/Source/WebKit/qt/tests/tests.pri
+++ b/Source/WebKit/qt/tests/tests.pri
@@ -10,8 +10,8 @@ ELSE { TARGET = tst_$$TARGET }
load(mobilityconfig, true)
contains(MOBILITY_CONFIG, multimedia) {
# This define is used by tests depending on Qt Multimedia
- DEFINES -= ENABLE_QT_MULTIMEDIA=0
- DEFINES += ENABLE_QT_MULTIMEDIA=1
+ DEFINES -= WTF_USE_QT_MULTIMEDIA=0
+ DEFINES += WTF_USE_QT_MULTIMEDIA=1
}
SOURCES += $${TARGET}.cpp
diff --git a/Source/WebKit/qt/tests/tests.pro b/Source/WebKit/qt/tests/tests.pro
index 529fa04..5fffd7b 100644
--- a/Source/WebKit/qt/tests/tests.pro
+++ b/Source/WebKit/qt/tests/tests.pro
@@ -1,6 +1,6 @@
TEMPLATE = subdirs
-SUBDIRS = qwebframe qwebpage qwebelement qgraphicswebview qwebhistoryinterface qwebview qwebhistory qwebinspector hybridPixmap
+SUBDIRS = qwebframe qwebpage qwebelement qgraphicswebview qwebhistoryinterface qwebview qwebhistory qwebinspector hybridPixmap MIMESniffing
contains(QT_CONFIG, declarative): SUBDIRS += qdeclarativewebview
SUBDIRS += benchmarks/painting benchmarks/loading
contains(DEFINES, ENABLE_WEBGL=1) {