summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-06-15 10:01:29 +0200
committerLiang Qi <liang.qi@qt.io>2016-06-15 10:02:14 +0200
commit98678e1ae981e2e7d52ac283028e352a1cba794a (patch)
tree5035bb87666620ebdd66b758701ab4d862575862 /Source
parent01fa9be55572ddb3f69befc68475ed09241eabdf (diff)
parent28077218067438fef5cdc746feb45ca6d4e755d9 (diff)
downloadqtwebkit-98678e1ae981e2e7d52ac283028e352a1cba794a.tar.gz
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: .qmake.conf Change-Id: Ic399cf8fef1f26f22338a67393066d69cd969579
Diffstat (limited to 'Source')
-rw-r--r--Source/WebCore/platform/graphics/qt/ImageDecoderQt.cpp2
-rw-r--r--Source/WebCore/platform/graphics/qt/ImageQt.cpp5
-rw-r--r--Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp1
-rw-r--r--Source/WebKit/qt/tests/qobjectbridge/tst_qobjectbridge.cpp8
-rw-r--r--Source/WebKit2/WebProcess.pro2
5 files changed, 11 insertions, 7 deletions
diff --git a/Source/WebCore/platform/graphics/qt/ImageDecoderQt.cpp b/Source/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
index 74696c23d..c93c79b1b 100644
--- a/Source/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
+++ b/Source/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
@@ -93,7 +93,7 @@ void ImageDecoderQt::setData(SharedBuffer* data, bool allDataReceived)
// QImageReader only allows retrieving the format before reading the image
m_format = m_reader->format();
- if (!isFormatWhiteListed(m_format)) {
+ if (!m_format.isEmpty() && !isFormatWhiteListed(m_format)) {
qWarning("Image of format '%s' blocked because it is not considered safe. If you are sure it is safe to do so, you can white-list the format by setting the environment variable QTWEBKIT_IMAGEFORMAT_WHITELIST=%s", m_format.constData(), m_format.constData());
setFailed();
m_reader.clear();
diff --git a/Source/WebCore/platform/graphics/qt/ImageQt.cpp b/Source/WebCore/platform/graphics/qt/ImageQt.cpp
index 9e4408b61..f30284b90 100644
--- a/Source/WebCore/platform/graphics/qt/ImageQt.cpp
+++ b/Source/WebCore/platform/graphics/qt/ImageQt.cpp
@@ -156,6 +156,8 @@ void Image::drawPattern(GraphicsContext* ctxt, const FloatRect& tileRect, const
if (tr.x() || tr.y() || tr.width() != pixmap.width() || tr.height() != pixmap.height())
pixmap = pixmap.copy(tr);
+ QPoint trTopLeft = tr.topLeft();
+
CompositeOperator previousOperator = ctxt->compositeOperation();
ctxt->setCompositeOperation(!pixmap.hasAlpha() && op == CompositeSourceOver ? CompositeCopy : op);
@@ -180,13 +182,14 @@ void Image::drawPattern(GraphicsContext* ctxt, const FloatRect& tileRect, const
painter.drawPixmap(QRect(0, 0, scaledPixmap.width(), scaledPixmap.height()), pixmap);
}
pixmap = scaledPixmap;
+ trTopLeft = transform.map(trTopLeft);
transform = QTransform::fromTranslate(transform.dx(), transform.dy());
}
}
/* Translate the coordinates as phase is not in world matrix coordinate space but the tile rect origin is. */
transform *= QTransform().translate(phase.x(), phase.y());
- transform.translate(tr.x(), tr.y());
+ transform.translate(trTopLeft.x(), trTopLeft.y());
QBrush b(pixmap);
b.setTransform(transform);
diff --git a/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp b/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp
index d1a7f6cab..554ab8927 100644
--- a/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp
@@ -1179,6 +1179,7 @@ void QWebPageAdapter::triggerAction(QWebPageAdapter::MenuAction action, QWebHitT
case ToggleMediaPlayPause:
if (HTMLMediaElement* mediaElt = mediaElement(hitTestResult->innerNonSharedNode))
mediaElt->togglePlayState();
+ break;
case ToggleMediaMute:
if (HTMLMediaElement* mediaElt = mediaElement(hitTestResult->innerNonSharedNode))
mediaElt->setMuted(!mediaElt->muted());
diff --git a/Source/WebKit/qt/tests/qobjectbridge/tst_qobjectbridge.cpp b/Source/WebKit/qt/tests/qobjectbridge/tst_qobjectbridge.cpp
index 94551eb8e..52e6422b1 100644
--- a/Source/WebKit/qt/tests/qobjectbridge/tst_qobjectbridge.cpp
+++ b/Source/WebKit/qt/tests/qobjectbridge/tst_qobjectbridge.cpp
@@ -1572,26 +1572,26 @@ void tst_QObjectBridge::connectAndDisconnect()
QString type;
QString ret = evalJS("(function() { }).connect()", type);
QCOMPARE(type, sError);
- QCOMPARE(ret, QLatin1String("TypeError: 'undefined' is not a function (evaluating '(function() { }).connect()')"));
+ QCOMPARE(ret, QLatin1String("TypeError: undefined is not a function (evaluating '(function() { }).connect()')"));
}
{
QString type;
QString ret = evalJS("var o = { }; o.connect = Function.prototype.connect; o.connect()", type);
QCOMPARE(type, sError);
- QCOMPARE(ret, QLatin1String("TypeError: 'undefined' is not a function (evaluating 'o.connect()')"));
+ QCOMPARE(ret, QLatin1String("TypeError: undefined is not a function (evaluating 'o.connect()')"));
}
{
QString type;
QString ret = evalJS("(function() { }).connect(123)", type);
QCOMPARE(type, sError);
- QCOMPARE(ret, QLatin1String("TypeError: 'undefined' is not a function (evaluating '(function() { }).connect(123)')"));
+ QCOMPARE(ret, QLatin1String("TypeError: undefined is not a function (evaluating '(function() { }).connect(123)')"));
}
{
QString type;
QString ret = evalJS("var o = { }; o.connect = Function.prototype.connect; o.connect(123)", type);
QCOMPARE(type, sError);
- QCOMPARE(ret, QLatin1String("TypeError: 'undefined' is not a function (evaluating 'o.connect(123)')"));
+ QCOMPARE(ret, QLatin1String("TypeError: undefined is not a function (evaluating 'o.connect(123)')"));
}
{
diff --git a/Source/WebKit2/WebProcess.pro b/Source/WebKit2/WebProcess.pro
index 3463b9431..d401dc23a 100644
--- a/Source/WebKit2/WebProcess.pro
+++ b/Source/WebKit2/WebProcess.pro
@@ -5,7 +5,7 @@
# -------------------------------------------------------------------
TEMPLATE = app
-!build_pass:contains(QT_CONFIG, debug_and_release):contains(QT_CONFIG, build_all): CONFIG += release
+!build_pass:contains(QT_CONFIG, debug_and_release): CONFIG += release
TARGET = QtWebProcess
DESTDIR = $${ROOT_BUILD_DIR}/bin