From 2caa61dc485dc7d38c847ed6c6cff774fcf80061 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 4 Nov 2015 21:32:42 +0100 Subject: Check m_socket in SocketStreamHandlePrivate::close. m_socket can be set to 0 in the constructor, e.g. when Qt is compiled without SSL support. Change-Id: Ic3bb18f6c801d463e2277b4c19ef2c790216bf69 Task-number: QTBUG-49027 Reviewed-by: Richard J. Moore --- Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp b/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp index ca7b60cd2..d4cbdc78c 100644 --- a/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp +++ b/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp @@ -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; -- cgit v1.2.1 From 06b0ebd66fb1a7c536c96572ad8a3b55b713b177 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 4 Nov 2015 21:35:31 +0100 Subject: Check QT_NO_SSL in SocketStreamHandleQt. Since Qt 5.5, Secure Transport is used instead of OpenSSL on OS X. This means secure websockets (wss://) were disabled on OS X despite QSslSocket being available. Change-Id: Ic584a6ed81b625c84a85e54dba84c8fc920b861a Task-number: QTBUG-49027 Reviewed-by: Richard J. Moore Reviewed-by: Timur Pocheptsov --- Source/WebCore/platform/network/qt/SocketStreamHandlePrivate.h | 2 +- Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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&); #endif public: diff --git a/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp b/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp index d4cbdc78c..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(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(m_socket)) connect(m_socket, SIGNAL(sslErrors(const QList&)), this, SLOT(socketSslErrors(const QList&))); #endif @@ -176,7 +176,7 @@ void SocketStreamHandlePrivate::socketErrorCallback(int error) } } -#ifndef QT_NO_OPENSSL +#ifndef QT_NO_SSL void SocketStreamHandlePrivate::socketSslErrors(const QList& error) { QMetaObject::invokeMethod(this, "socketErrorCallback", Qt::QueuedConnection, Q_ARG(int, error[0].error())); -- cgit v1.2.1 From 11ce03bd807504559961dc69bdf6ccc382b61812 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 4 Nov 2015 21:49:48 +0100 Subject: Check QT_NO_SSL for QtWebKit user agent. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When QT_NO_OPENSSL is checked, the user agent says "no SSL support" even when there *is* SSL support via Secure Transport on OS X. Change-Id: Idb8bf3ee95689f60adab332b3cbac7b6bdf6a738 Reviewed-by: Timur Pocheptsov Reviewed-by: Michael BrĂ¼ning --- Source/WebCore/platform/qt/UserAgentQt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.1 From ccff714c4a863ec4285f9a2ab5e881ba4f8ed42f Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 16 Nov 2015 14:27:39 +0100 Subject: Fix link error in MSVC Since qtbase/e88334e0 we must not put MSVC linker flags into LIBS or LIBS_PRIVATE. QMAKE_LFLAGS is the right place. This fixes a build error with MSVC: LINK : fatal error LNK1181: cannot open input file '\OPT:REF.obj' A similar fix was already applied to qtwebengine (295a915b5ae66). Change-Id: I7972651cd6e61ef3ecd413be290e49baec29a770 Reviewed-by: Joerg Bornemann --- Tools/qmake/mkspecs/features/functions.prf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.1 From 1d849b5b575987cd08e134e1bc339ac8746c01b2 Mon Sep 17 00:00:00 2001 From: Konstantin Tokarev Date: Wed, 25 Nov 2015 19:39:28 +0300 Subject: Changes for 5.6.0 Change-Id: I4cc8c77871530f6578c95cc53d794b61f5c05f5e Reviewed-by: Allan Sandfeld Jensen --- dist/changes-5.6.0 | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 dist/changes-5.6.0 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 -- cgit v1.2.1 From c255643360af6b7067ab97687f3724418eee2dd6 Mon Sep 17 00:00:00 2001 From: Konstantin Tokarev Date: Thu, 3 Dec 2015 19:53:06 +0300 Subject: % unit heights don't work if parent block height is set in vh https://bugs.webkit.org/show_bug.cgi?id=118516 Patch by Gurpreet Kaur on 2013-12-04 Reviewed by Simon Fraser. From Blink r156449 by Source/WebCore: An element having height as percentage needs to have the containingblock's height or availableheight to calculate its own height. The containing block having a height set in vh unit was not being considered for calculating the child's height. * rendering/RenderBox.cpp: (WebCore::RenderBox::computePercentageLogicalHeight): Correct child's height(in pecentage) was not being calculated incase of parent having height set in vh unit. Added condition to calculate the containing block height in terms of viewport size. Change-Id: Id0158323c6d1b5a43b267133bfe0c7ce5fe4b472 Reviewed-by: Allan Sandfeld Jensen --- Source/WebCore/rendering/RenderBox.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) 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(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(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. -- cgit v1.2.1 From 7f70d2b795976c1ddbe9c2866012f91b7e0eafd0 Mon Sep 17 00:00:00 2001 From: Vivin Paliath Date: Sat, 24 Oct 2015 17:36:27 -0700 Subject: Quality in toDataURL only applies to JPEGs now Prior to the fix, quality would default to 100 irrespective of the image type, if an explicit quality-argument was not provided, or if the quality was outside the valid range. In the case where toDataURL is called without any arguments, the image type defaults to "image/png" and quality eventually defaults to 100. However, quality in the context of a PNG applies to the quality of compression and not the quality of the image. Since PNG is a lossless format, compression only affects the size of the image and not its quality. This resulted in PNG images of a large size, with no compression at all. The same behavior could be observed when toDataURL is called with the image type explicitly set to "image/png", without a quality argument. The expected behavior is only observed if toDataURL is called with the image type set to "image/png" and the quality set to 0, since this provides the highest level of compression. According to section 4.12.4.4 of the HTML5 spec, the quality argument should only apply to images of type "image/jpeg", and if quality is not provided, the user-agent should use a default value. This means that the spec was being violated, since the quality was set to 100 regardless of the image type. The fix was to consider the quality argument (along with the associated sanity-checks) only if the image type is "jpeg"; otherwise quality is set to -1. This change results in PNG images being encoded to properly-sized base64 strings. [ChangeLog][WebKit][Behavior Change] The quality parameter in canvas.toDataURL only applies to JPEG images now, in accordance with section 4.12.4.4 of the HTML5 spec. Change-Id: Ie87a32ec368e70e7736d4d2e684e2528ce37f745 Reviewed-by: Allan Sandfeld Jensen --- Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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(*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(*quality * 100 + 0.5); + } QBuffer buffer(&data); buffer.open(QBuffer::WriteOnly); -- cgit v1.2.1 From 5fff3df31cfa18682fc061a31267fdd3c302ed01 Mon Sep 17 00:00:00 2001 From: Rob Buis Date: Fri, 9 Aug 2013 23:30:32 +0000 Subject: ASSERTION FAILED: stroke->opacity != other->stroke->opacity in WebCore::SVGRenderStyle::diff https://bugs.webkit.org/show_bug.cgi?id=119623 Reviewed by Dirk Schulze. Source/WebCore: Include all the stroke attributes in the style diff comparison, the visited links ones were missing. Test: svg/animations/animate-stroke-crasher.html * rendering/style/SVGRenderStyle.cpp: (WebCore::SVGRenderStyle::diff): LayoutTests: Add testcase from bug with small adjustments. * svg/animations/animate-stroke-crasher-expected.txt: Added. * svg/animations/animate-stroke-crasher.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153914 268f45cc-cd09-0410-ab3c-d52691b4dbfc Change-Id: I71ff999dab89127600b4a57b5cee58a6fa4687fd Reviewed-by: Allan Sandfeld Jensen --- Source/WebCore/rendering/style/SVGRenderStyle.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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. -- cgit v1.2.1 From 18f9f56c2f8b87dd15127e111ced70c4b8b7d3d4 Mon Sep 17 00:00:00 2001 From: Konstantin Tokarev Date: Wed, 20 Jan 2016 19:17:35 +0300 Subject: Fixed EventHandler::TextDragDelay setting for OS X. https://bugs.webkit.org/show_bug.cgi?id=18167 explains that 0.0 value was added specifically to create Windows-like behavior. In Qt port OSX-like behavior was added in r59846, but this behavior was lost after transition to Qt 5. Change-Id: I2d618a356d494805c2d8f9d2fc7751744e040741 Reviewed-by: Allan Sandfeld Jensen --- Source/WebCore/page/qt/EventHandlerQt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.1 From bbdf00cf0913dcdf900c541a2dbf418b7f23788f Mon Sep 17 00:00:00 2001 From: Konstantin Tokarev Date: Thu, 21 Jan 2016 16:45:51 +0300 Subject: Improved documentation of evaluateJavaScript(). Change-Id: I47d8f4c0e392ffb70655db9725b035d22a7cad91 Reviewed-by: Allan Sandfeld Jensen --- Source/WebKit/qt/Api/qwebelement.cpp | 9 ++++++++- Source/WebKit/qt/WidgetApi/qwebframe.cpp | 17 ++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) 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/WidgetApi/qwebframe.cpp b/Source/WebKit/qt/WidgetApi/qwebframe.cpp index e8faab881..38c649887 100644 --- a/Source/WebKit/qt/WidgetApi/qwebframe.cpp +++ b/Source/WebKit/qt/WidgetApi/qwebframe.cpp @@ -910,7 +910,22 @@ 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 + + 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) { -- cgit v1.2.1 From da00247a0446551e543a5c714c84d347cec58b34 Mon Sep 17 00:00:00 2001 From: Konstantin Tokarev Date: Wed, 27 Jan 2016 14:31:50 +0300 Subject: Fixed typo in QWebSecurityOrigin::addLocalScheme documentation. Change-Id: Ife7db164671b84f28b03b6d86a038d1370486cae Reviewed-by: Allan Sandfeld Jensen --- Source/WebKit/qt/Api/qwebsecurityorigin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/WebKit/qt/Api/qwebsecurityorigin.cpp b/Source/WebKit/qt/Api/qwebsecurityorigin.cpp index 58fe79519..c2ba8148b 100644 --- a/Source/WebKit/qt/Api/qwebsecurityorigin.cpp +++ b/Source/WebKit/qt/Api/qwebsecurityorigin.cpp @@ -224,7 +224,7 @@ QList 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 concidered to be in the same security origin, and local schemes can not access remote content. */ void QWebSecurityOrigin::addLocalScheme(const QString& scheme) -- cgit v1.2.1 From 072f6acce94a98b5aca33cb2cacd567eaafaf9f3 Mon Sep 17 00:00:00 2001 From: Konstantin Tokarev Date: Wed, 27 Jan 2016 14:54:35 +0300 Subject: Fixed another typo in QWebSecurityOrigin::addLocalScheme() documentation. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I7013829d4e30a85374a4f63ab6a45b97b44313d7 Reviewed-by: Michael BrĂ¼ning --- Source/WebKit/qt/Api/qwebsecurityorigin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/WebKit/qt/Api/qwebsecurityorigin.cpp b/Source/WebKit/qt/Api/qwebsecurityorigin.cpp index c2ba8148b..a76ee975c 100644 --- a/Source/WebKit/qt/Api/qwebsecurityorigin.cpp +++ b/Source/WebKit/qt/Api/qwebsecurityorigin.cpp @@ -224,7 +224,7 @@ QList QWebSecurityOrigin::databases() const to the \c file: scheme. Cross domain restrictions depend on the two web settings QWebSettings::LocalContentCanAccessFileUrls - and QWebSettings::LocalContentCanAccessRemoteUrls. 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) -- cgit v1.2.1 From 76f23fc070e4ab8f0383f864585a0493a68d9b0d Mon Sep 17 00:00:00 2001 From: Youenn Fablet Date: Wed, 12 Feb 2014 00:02:31 +0000 Subject: XMLHttpRequest should not send DNT header https://bugs.webkit.org/show_bug.cgi?id=128533 The DNT header should be set by web engines according user preferences. That includes all HTTP requests, including XHR requests. Unpriviledged web apps should not be allowed to override/interfere with user preferences. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163915 268f45cc-cd09-0410-ab3c-d52691b4dbfc Change-Id: I80bed1eb13826cdb3cfade3d51297f439b5016f4 Reviewed-by: Allan Sandfeld Jensen --- Source/WebCore/xml/XMLHttpRequest.cpp | 1 + 1 file changed, 1 insertion(+) 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"); -- cgit v1.2.1 From bccaed38b0c7aacac12e3140ed571aa2a8fadd87 Mon Sep 17 00:00:00 2001 From: Joni Poikelin Date: Tue, 8 Dec 2015 07:26:51 +0200 Subject: Handle WebKitErrorDomain error like other errors Change-Id: Ie4dd08b18706e44947a00b4d61a185b5fc43f478 Reviewed-by: Konstantin Tokarev Reviewed-by: Allan Sandfeld Jensen --- Source/WebKit/qt/WidgetApi/qwebpage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.1 From 999ff247a5a0ca31ba21d24933789541ca790fce Mon Sep 17 00:00:00 2001 From: Bem Jones-Bey Date: Fri, 28 Feb 2014 19:19:03 +0000 Subject: Properly clear m_logicallyLastRun to remove use-after-free possibility https://bugs.webkit.org/show_bug.cgi?id=129489 Reviewed by David Hyatt. A use-after-free issue was caught in Blink because m_logicallyLastRun is not cleared when the item it points to is deleted. Clearing it turns the use-after-free into a segfault, and prevents any future use-after-frees from happening. * platform/text/BidiRunList.h: (WebCore::BidiRunList::deleteRuns): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164876 268f45cc-cd09-0410-ab3c-d52691b4dbfc Change-Id: Ia76a5723ea649e7a3609fc26025dd5bbd96f3302 Reviewed-by: Allan Sandfeld Jensen --- Source/WebCore/platform/text/BidiRunList.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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::deleteRuns() curr = s; } - m_firstRun = 0; - m_lastRun = 0; - m_runCount = 0; + clearWithoutDestroyingRuns(); } template -- cgit v1.2.1 From 629e101715f3e5b58a3b0ee54295af4d957d7e78 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 2 Feb 2016 12:15:40 +0100 Subject: Skip building on android While it was building at some point, Android was never fully working or supported. Change-Id: I6ce77904e4db7830969664910eea143fa184f848 Reviewed-by: Simon Hausmann --- Tools/qmake/mkspecs/features/configure.prf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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.") -- cgit v1.2.1 From c895e640860b54b7f9c2be5e1f19d2a3fcee2aeb Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Wed, 6 Nov 2013 08:05:09 +0000 Subject: Assertion failure end < m_runCount in WebCore::BidiRunList::reverseRuns https://bugs.webkit.org/show_bug.cgi?id=123863 Reviewed by Andreas Kling. Source/WebCore: Merge https://chromium.googlesource.com/chromium/blink/+/cbaa92c763a37d89eeabd01658e522219299290c Test: fast/text/bidi-reverse-runs-crash.html * platform/text/BidiResolver.h: (WebCore::BidiResolver::createBidiRunsForLine): Don't reverse the runs if there's nothing to be reversed. LayoutTests: * fast/text/bidi-reverse-runs-crash-expected.txt: Added. * fast/text/bidi-reverse-runs-crash.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158729 268f45cc-cd09-0410-ab3c-d52691b4dbfc Change-Id: I6bf0902444acf98db29c3cfa2cd3535e1a0c1bef Reviewed-by: Allan Sandfeld Jensen --- Source/WebCore/platform/text/BidiResolver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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::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; } -- cgit v1.2.1 From be8e169ba38c84562194906047d0da04bf3ae91a Mon Sep 17 00:00:00 2001 From: Konstantin Tokarev Date: Wed, 3 Feb 2016 17:20:28 +0300 Subject: Fixed unfinished phrase in documentation of evaluateJavaScript. Change-Id: I5b5f43c68feedbace330494e7eb051cfe8a54128 Reviewed-by: Dmitry Shachnev Reviewed-by: Allan Sandfeld Jensen --- Source/WebKit/qt/WidgetApi/qwebframe.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/WebKit/qt/WidgetApi/qwebframe.cpp b/Source/WebKit/qt/WidgetApi/qwebframe.cpp index 38c649887..dd08725eb 100644 --- a/Source/WebKit/qt/WidgetApi/qwebframe.cpp +++ b/Source/WebKit/qt/WidgetApi/qwebframe.cpp @@ -910,10 +910,9 @@ 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. - \note This method may be very inefficient if \a scriptSource returns - - For example, evaluation of the next innocuously looking code may take a lot - of CPU and memory to execute: + \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'); -- cgit v1.2.1 From d2ff5a085572b1ee24dcb42ae107063f3142d14e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 8 Feb 2016 14:58:25 +0100 Subject: Bump version Change-Id: I046c6c4bab94412ff67c5a3a35720dd91c667a2a --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index 0be656f9e..d3a37eb80 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -3,4 +3,4 @@ MODULE_QMAKE_OUTDIR = $$shadowed($$PWD/Tools/qmake) QMAKEPATH += $$PWD/Tools/qmake $$MODULE_QMAKE_OUTDIR load(qt_build_config) -MODULE_VERSION = 5.6.0 +MODULE_VERSION = 5.6.1 -- cgit v1.2.1 From 5dd4bb67cfce812fd7686e43616e2069f354a7df Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 22 Feb 2016 10:57:32 +0100 Subject: Fix linking with libpthread WebKit use libpthread directly but is depending on other qt modules causing it to be linked against, which might break unless -lpthread is last. Instead just add it explicitly after the static libraries. Change-Id: I2b95cff2c96373f8dce6f95052c4fccbe1982b33 Reviewed-by: Simon Hausmann --- Tools/qmake/mkspecs/features/default_post.prf | 1 + 1 file changed, 1 insertion(+) diff --git a/Tools/qmake/mkspecs/features/default_post.prf b/Tools/qmake/mkspecs/features/default_post.prf index 67276b74b..39bb3f7ae 100644 --- a/Tools/qmake/mkspecs/features/default_post.prf +++ b/Tools/qmake/mkspecs/features/default_post.prf @@ -201,6 +201,7 @@ needToLink() { linkAgainstLibrary($$library, $$eval(WEBKIT.$${library_identifier}.root_source_dir)) LIBS += $$eval(WEBKIT.$${library_identifier}.dependent_libs) } + posix:!darwin: LIBS += -lpthread } creating_module { -- cgit v1.2.1 From 2e8517924b70a778463e463873eb3d8d0b623eed Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 23 Feb 2016 16:48:43 +0100 Subject: Crude hack to disable build on Ubuntu Touch This is an awful hack to disable the build. We are short of a reliable way of detecting the platform and we are facing the issue that cross-compilation against Ubuntu Touch with a sysroot produces linking errors due to the linker in the cross-compilation toolchain not respecting --sysroot when reading /etc/ld.so.conf in order to find the directory that provides libEGL.so.1. Change-Id: I19583ce31d62b0165877dedd3d6ce62bfdb71db4 Reviewed-by: Christian Stromme --- Tools/qmake/mkspecs/features/configure.prf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tools/qmake/mkspecs/features/configure.prf b/Tools/qmake/mkspecs/features/configure.prf index 757ddfe4e..a01788df8 100644 --- a/Tools/qmake/mkspecs/features/configure.prf +++ b/Tools/qmake/mkspecs/features/configure.prf @@ -129,6 +129,9 @@ defineTest(finalizeConfigure) { production_build:android { addReasonForSkippingBuild("Build not supported on Android.") } + production_build:contains(QT_CONFIG, mirclient) { + addReasonForSkippingBuild("Build not supported on Ubuntu Touch.") + } !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.") } -- cgit v1.2.1