diff options
author | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2016-02-22 16:11:09 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2016-02-22 16:11:09 +0000 |
commit | 50f20864b536982ea9aafa1851a2e647144ed6ac (patch) | |
tree | 537f4bde6fcf72a50abec64b27d4c9f709adb6da | |
parent | 5dd4bb67cfce812fd7686e43616e2069f354a7df (diff) | |
parent | bfa56c39850f4db30ffe6a5026d8bcf34ebaf3e2 (diff) | |
download | qtwebkit-50f20864b536982ea9aafa1851a2e647144ed6ac.tar.gz |
Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7
-rw-r--r-- | Source/WebCore/page/qt/EventHandlerQt.cpp | 2 | ||||
-rw-r--r-- | Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp | 9 | ||||
-rw-r--r-- | Source/WebCore/platform/network/qt/SocketStreamHandlePrivate.h | 2 | ||||
-rw-r--r-- | Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp | 10 | ||||
-rw-r--r-- | Source/WebCore/platform/qt/UserAgentQt.cpp | 2 | ||||
-rw-r--r-- | Source/WebCore/platform/text/BidiResolver.h | 2 | ||||
-rw-r--r-- | Source/WebCore/platform/text/BidiRunList.h | 4 | ||||
-rw-r--r-- | Source/WebCore/rendering/RenderBox.cpp | 11 | ||||
-rw-r--r-- | Source/WebCore/rendering/style/SVGRenderStyle.cpp | 5 | ||||
-rw-r--r-- | Source/WebCore/xml/XMLHttpRequest.cpp | 1 | ||||
-rw-r--r-- | Source/WebKit/qt/Api/qwebelement.cpp | 9 | ||||
-rw-r--r-- | Source/WebKit/qt/Api/qwebsecurityorigin.cpp | 2 | ||||
-rw-r--r-- | Source/WebKit/qt/WidgetApi/qwebframe.cpp | 16 | ||||
-rw-r--r-- | Source/WebKit/qt/WidgetApi/qwebpage.cpp | 2 | ||||
-rw-r--r-- | Tools/qmake/mkspecs/features/configure.prf | 5 | ||||
-rw-r--r-- | Tools/qmake/mkspecs/features/functions.prf | 3 | ||||
-rw-r--r-- | dist/changes-5.6.0 | 42 |
17 files changed, 105 insertions, 22 deletions
diff --git a/Source/WebCore/page/qt/EventHandlerQt.cpp b/Source/WebCore/page/qt/EventHandlerQt.cpp index f45f81dc7..4bdf95673 100644 --- a/Source/WebCore/page/qt/EventHandlerQt.cpp +++ b/Source/WebCore/page/qt/EventHandlerQt.cpp @@ -52,7 +52,7 @@ namespace WebCore { -#if defined(Q_WS_MAC) +#if defined(Q_OS_OSX) const double EventHandler::TextDragDelay = 0.15; #else const double EventHandler::TextDragDelay = 0.0; diff --git a/Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp b/Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp index f8a929c3f..a796284c5 100644 --- a/Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp +++ b/Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp @@ -196,9 +196,12 @@ void ImageBuffer::putByteArray(Multiply multiplied, Uint8ClampedArray* source, c static bool encodeImage(const QPixmap& pixmap, const String& format, const double* quality, QByteArray& data) { - int compressionQuality = 100; - if (quality && *quality >= 0.0 && *quality <= 1.0) - compressionQuality = static_cast<int>(*quality * 100 + 0.5); + int compressionQuality = -1; + if (format == "jpeg" || format == "webp") { + compressionQuality = 100; + if (quality && *quality >= 0.0 && *quality <= 1.0) + compressionQuality = static_cast<int>(*quality * 100 + 0.5); + } QBuffer buffer(&data); buffer.open(QBuffer::WriteOnly); diff --git a/Source/WebCore/platform/network/qt/SocketStreamHandlePrivate.h b/Source/WebCore/platform/network/qt/SocketStreamHandlePrivate.h index f447cc206..647c4efa5 100644 --- a/Source/WebCore/platform/network/qt/SocketStreamHandlePrivate.h +++ b/Source/WebCore/platform/network/qt/SocketStreamHandlePrivate.h @@ -60,7 +60,7 @@ public Q_SLOTS: void socketError(QAbstractSocket::SocketError); void socketClosedCallback(); void socketErrorCallback(int); -#ifndef QT_NO_OPENSSL +#ifndef QT_NO_SSL void socketSslErrors(const QList<QSslError>&); #endif public: diff --git a/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp b/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp index ca7b60cd2..cd711907e 100644 --- a/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp +++ b/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp @@ -48,7 +48,7 @@ SocketStreamHandlePrivate::SocketStreamHandlePrivate(SocketStreamHandle* streamH bool isSecure = url.protocolIs("wss"); if (isSecure) { -#ifndef QT_NO_OPENSSL +#ifndef QT_NO_SSL m_socket = new QSslSocket(this); #endif } else @@ -63,7 +63,7 @@ SocketStreamHandlePrivate::SocketStreamHandlePrivate(SocketStreamHandle* streamH QString host = url.host(); if (isSecure) { -#ifndef QT_NO_OPENSSL +#ifndef QT_NO_SSL static_cast<QSslSocket*>(m_socket)->connectToHostEncrypted(host, port); #endif } else @@ -88,7 +88,7 @@ void SocketStreamHandlePrivate::initConnections() connect(m_socket, SIGNAL(readyRead()), this, SLOT(socketReadyRead())); connect(m_socket, SIGNAL(disconnected()), this, SLOT(socketClosed())); connect(m_socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(socketError(QAbstractSocket::SocketError))); -#ifndef QT_NO_OPENSSL +#ifndef QT_NO_SSL if (qobject_cast<QSslSocket*>(m_socket)) connect(m_socket, SIGNAL(sslErrors(const QList<QSslError>&)), this, SLOT(socketSslErrors(const QList<QSslError>&))); #endif @@ -127,7 +127,7 @@ int SocketStreamHandlePrivate::send(const char* data, int len) void SocketStreamHandlePrivate::close() { - if (m_streamHandle && m_streamHandle->m_state == SocketStreamHandleBase::Connecting) { + if (m_socket && m_streamHandle && m_streamHandle->m_state == SocketStreamHandleBase::Connecting) { m_socket->abort(); m_streamHandle->client()->didCloseSocketStream(m_streamHandle); return; @@ -176,7 +176,7 @@ void SocketStreamHandlePrivate::socketErrorCallback(int error) } } -#ifndef QT_NO_OPENSSL +#ifndef QT_NO_SSL void SocketStreamHandlePrivate::socketSslErrors(const QList<QSslError>& error) { QMetaObject::invokeMethod(this, "socketErrorCallback", Qt::QueuedConnection, Q_ARG(int, error[0].error())); diff --git a/Source/WebCore/platform/qt/UserAgentQt.cpp b/Source/WebCore/platform/qt/UserAgentQt.cpp index 6f1da23c9..80996a223 100644 --- a/Source/WebCore/platform/qt/UserAgentQt.cpp +++ b/Source/WebCore/platform/qt/UserAgentQt.cpp @@ -74,7 +74,7 @@ String UserAgentQt::standardUserAgent(const String &applicationNameForUserAgent, // Security strength. QString securityStrength; -#if defined(QT_NO_OPENSSL) +#if defined(QT_NO_SSL) securityStrength = QLatin1String("N; "); #endif ua = ua.arg(securityStrength); diff --git a/Source/WebCore/platform/text/BidiResolver.h b/Source/WebCore/platform/text/BidiResolver.h index e0649fcb4..d970eaa4d 100644 --- a/Source/WebCore/platform/text/BidiResolver.h +++ b/Source/WebCore/platform/text/BidiResolver.h @@ -546,7 +546,7 @@ void BidiResolver<Iterator, Run>::createBidiRunsForLine(const Iterator& end, Vis m_direction = override == VisualLeftToRightOverride ? LeftToRight : RightToLeft; appendRun(); m_runs.setLogicallyLastRun(m_runs.lastRun()); - if (override == VisualRightToLeftOverride) + if (override == VisualRightToLeftOverride && m_runs.runCount()) m_runs.reverseRuns(0, m_runs.runCount() - 1); return; } diff --git a/Source/WebCore/platform/text/BidiRunList.h b/Source/WebCore/platform/text/BidiRunList.h index d6db7ee49..c5d6ba648 100644 --- a/Source/WebCore/platform/text/BidiRunList.h +++ b/Source/WebCore/platform/text/BidiRunList.h @@ -193,9 +193,7 @@ void BidiRunList<Run>::deleteRuns() curr = s; } - m_firstRun = 0; - m_lastRun = 0; - m_runCount = 0; + clearWithoutDestroyingRuns(); } template <class Run> diff --git a/Source/WebCore/rendering/RenderBox.cpp b/Source/WebCore/rendering/RenderBox.cpp index 03b81ac9a..355a4f958 100644 --- a/Source/WebCore/rendering/RenderBox.cpp +++ b/Source/WebCore/rendering/RenderBox.cpp @@ -2680,6 +2680,17 @@ LayoutUnit RenderBox::computePercentageLogicalHeight(const Length& height) const LayoutUnit contentBoxHeight = cb->constrainContentBoxLogicalHeightByMinMax(contentBoxHeightWithScrollbar - cb->scrollbarLogicalHeight()); availableHeight = max<LayoutUnit>(0, contentBoxHeight); } + } else if (cbstyle->logicalHeight().isViewportPercentage()) { + LayoutUnit heightWithScrollbar = valueForLength(cbstyle->logicalHeight(), 0, view()); + if (heightWithScrollbar != -1) { + LayoutUnit contentBoxHeightWithScrollbar = cb->adjustContentBoxLogicalHeightForBoxSizing(heightWithScrollbar); + // We need to adjust for min/max height because this method does + // not handle the min/max of the current block, its caller does. + // So the return value from the recursive call will not have been + // adjusted yet. + LayoutUnit contentBoxHeight = cb->constrainContentBoxLogicalHeightByMinMax(contentBoxHeightWithScrollbar - cb->scrollbarLogicalHeight()); + availableHeight = std::max<LayoutUnit>(0, contentBoxHeight); + } } else if (isOutOfFlowPositionedWithSpecifiedHeight) { // Don't allow this to affect the block' height() member variable, since this // can get called while the block is still laying out its kids. diff --git a/Source/WebCore/rendering/style/SVGRenderStyle.cpp b/Source/WebCore/rendering/style/SVGRenderStyle.cpp index cbd16cd42..aca245aef 100644 --- a/Source/WebCore/rendering/style/SVGRenderStyle.cpp +++ b/Source/WebCore/rendering/style/SVGRenderStyle.cpp @@ -183,7 +183,10 @@ StyleDifference SVGRenderStyle::diff(const SVGRenderStyle* other) const || stroke->paintUri != other->stroke->paintUri || stroke->miterLimit != other->stroke->miterLimit || stroke->dashArray != other->stroke->dashArray - || stroke->dashOffset != other->stroke->dashOffset) + || stroke->dashOffset != other->stroke->dashOffset + || stroke->visitedLinkPaintColor != other->stroke->visitedLinkPaintColor + || stroke->visitedLinkPaintUri != other->stroke->visitedLinkPaintUri + || stroke->visitedLinkPaintType != other->stroke->visitedLinkPaintType) return StyleDifferenceLayout; // Only the stroke-opacity case remains, where we only need a repaint. diff --git a/Source/WebCore/xml/XMLHttpRequest.cpp b/Source/WebCore/xml/XMLHttpRequest.cpp index 853ec4756..e854019bc 100644 --- a/Source/WebCore/xml/XMLHttpRequest.cpp +++ b/Source/WebCore/xml/XMLHttpRequest.cpp @@ -104,6 +104,7 @@ XMLHttpRequestStaticData::XMLHttpRequestStaticData() m_forbiddenRequestHeaders.add("cookie"); m_forbiddenRequestHeaders.add("cookie2"); m_forbiddenRequestHeaders.add("date"); + m_forbiddenRequestHeaders.add("dnt"); m_forbiddenRequestHeaders.add("expect"); m_forbiddenRequestHeaders.add("host"); m_forbiddenRequestHeaders.add("keep-alive"); diff --git a/Source/WebKit/qt/Api/qwebelement.cpp b/Source/WebKit/qt/Api/qwebelement.cpp index 26aedc1f5..8f54d4abc 100644 --- a/Source/WebKit/qt/Api/qwebelement.cpp +++ b/Source/WebKit/qt/Api/qwebelement.cpp @@ -740,7 +740,14 @@ static bool setupScriptContext(WebCore::Element* element, ScriptState*& state, S } /*! - Executes \a scriptSource with this element as \c this object. + Executes \a scriptSource with this element as \c this object + and returns the result of the last executed statement. + + \note This method may be very inefficient if \a scriptSource returns + a DOM element as a result. See \l{QWebFrame::evaluateJavaScript()} + for more details. + + \sa QWebFrame::evaluateJavaScript() */ QVariant QWebElement::evaluateJavaScript(const QString& scriptSource) { diff --git a/Source/WebKit/qt/Api/qwebsecurityorigin.cpp b/Source/WebKit/qt/Api/qwebsecurityorigin.cpp index 58fe79519..a76ee975c 100644 --- a/Source/WebKit/qt/Api/qwebsecurityorigin.cpp +++ b/Source/WebKit/qt/Api/qwebsecurityorigin.cpp @@ -224,7 +224,7 @@ QList<QWebDatabase> QWebSecurityOrigin::databases() const to the \c file: scheme. Cross domain restrictions depend on the two web settings QWebSettings::LocalContentCanAccessFileUrls - and QWebSettings::LocalContentCanAccessFileUrls. By default all local schemes are concidered to be + and QWebSettings::LocalContentCanAccessRemoteUrls. By default all local schemes are considered to be in the same security origin, and local schemes can not access remote content. */ void QWebSecurityOrigin::addLocalScheme(const QString& scheme) diff --git a/Source/WebKit/qt/WidgetApi/qwebframe.cpp b/Source/WebKit/qt/WidgetApi/qwebframe.cpp index e8faab881..dd08725eb 100644 --- a/Source/WebKit/qt/WidgetApi/qwebframe.cpp +++ b/Source/WebKit/qt/WidgetApi/qwebframe.cpp @@ -910,7 +910,21 @@ void QWebFrame::print(QPrinter *printer) const Evaluates the JavaScript defined by \a scriptSource using this frame as context and returns the result of the last executed statement. - \sa addToJavaScriptWindowObject(), javaScriptWindowObjectCleared() + \note This method may be very inefficient if \a scriptSource returns a DOM element + as a result. For example, evaluation of the next innocuously looking code may take + a lot of CPU and memory to execute: + + \code + var img = document.createElement('img'); + document.getElementById(\"foo\").appendChild(img); + \endcode + + This code returns appended DOM element, which is converted to QVariantMap + containing all its properties. To avoid this issue you can add "true" after + the last statement. + + \sa addToJavaScriptWindowObject(), javaScriptWindowObjectCleared(), + QWebElement::evaluateJavaScript() */ QVariant QWebFrame::evaluateJavaScript(const QString& scriptSource) { diff --git a/Source/WebKit/qt/WidgetApi/qwebpage.cpp b/Source/WebKit/qt/WidgetApi/qwebpage.cpp index 02bddebda..863621391 100644 --- a/Source/WebKit/qt/WidgetApi/qwebpage.cpp +++ b/Source/WebKit/qt/WidgetApi/qwebpage.cpp @@ -410,7 +410,7 @@ bool QWebPagePrivate::errorPageExtension(QWebPageAdapter::ErrorPageOption *opt, option.domain = QWebPage::QtNetwork; else if (opt->domain == QLatin1String("HTTP")) option.domain = QWebPage::Http; - else if (opt->domain == QLatin1String("WebKit")) + else if (opt->domain == QLatin1String("WebKit") || opt->domain == QLatin1String("WebKitErrorDomain")) option.domain = QWebPage::WebKit; else return false; diff --git a/Tools/qmake/mkspecs/features/configure.prf b/Tools/qmake/mkspecs/features/configure.prf index 0df5ee49e..757ddfe4e 100644 --- a/Tools/qmake/mkspecs/features/configure.prf +++ b/Tools/qmake/mkspecs/features/configure.prf @@ -124,7 +124,10 @@ defineTest(finalizeConfigure) { addReasonForSkippingBuild("ICU is required.") } production_build:blackberry { - addReasonForSkippingBuild("Build not supported on BB10 yet.") + addReasonForSkippingBuild("Build not supported on BB10.") + } + production_build:android { + addReasonForSkippingBuild("Build not supported on Android.") } !gnu_thin_archives:!win32-msvc2013:!mingw:contains(QT_CONFIG, static) { addReasonForSkippingBuild("QtWebKit cannot be built as a static library on this platform. Check your configuration in qtbase/config.summary.") diff --git a/Tools/qmake/mkspecs/features/functions.prf b/Tools/qmake/mkspecs/features/functions.prf index 9602c2051..dc0c78f97 100644 --- a/Tools/qmake/mkspecs/features/functions.prf +++ b/Tools/qmake/mkspecs/features/functions.prf @@ -269,7 +269,8 @@ defineTest(linkAgainstLibrary) { mac { LIBS += -Wl,-force_load,$${path}$${QMAKE_DIR_SEP}lib$${target}.a } else:win32-msvc*|wince*|win32-icc { - LIBS += /OPT:REF -l$$target + LIBS += -l$$target + QMAKE_LFLAGS += /OPT:REF } else { CONFIG *= no_smart_library_merge LIBS += -Wl,-whole-archive -l$$target -Wl,-no-whole-archive diff --git a/dist/changes-5.6.0 b/dist/changes-5.6.0 new file mode 100644 index 000000000..0964b19b2 --- /dev/null +++ b/dist/changes-5.6.0 @@ -0,0 +1,42 @@ +Qt 5.6 introduces many new features and improvements as well as bugfixes +over the 5.5.x series. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + + http://doc.qt.io/qt-5.6 + +The Qt version 5.6 series is binary compatible with the 5.5.x series. +Applications compiled for 5.5 will continue to run with 5.6. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + + http://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + + +**************************************************************************** +* Library * +**************************************************************************** + +QtWebkit +-------- + - [QTBUG-44563] Render anchors as clickable links in PDF documents + +QtWebkitQML +----------- + - WebView.experimental got several features which were previously available + only via widgets API: spatial navigation, links included in focus chain, + and user style sheets + - Fixed missing text in QQuickItem::inputMethodQuery when text element is + focused in WebView + + +**************************************************************************** +* Platform Specific Changes * +**************************************************************************** + +- Various build fixes |