summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2019-06-04 22:44:55 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2019-06-04 22:45:21 +0300
commitc49326e942d7cc21f78fe187020dce73befdd935 (patch)
treefaf0927eeeff4c57e998902b2085d976e588ed2b
parent72cfbd7664f21fcc0e62b869a6b01bf73eb5e7da (diff)
Import WebKit commit 5ccca3a720f7c2251c4ac8b28f25bd73524081f0
Change-Id: Idfb37cd43929536d4c67d1fa5d8cb598e9c0ad7e Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
-rw-r--r--Source/CMakeLists.txt2
-rw-r--r--Source/JavaScriptCore/bytecode/Opcode.cpp16
-rw-r--r--Source/JavaScriptCore/bytecode/Opcode.h13
-rw-r--r--Source/JavaScriptCore/parser/Parser.cpp16
-rw-r--r--Source/JavaScriptCore/parser/Parser.h3
-rw-r--r--Source/JavaScriptCore/shell/PlatformQt.cmake2
-rw-r--r--Source/WTF/wtf/CMakeLists.txt9
-rw-r--r--Source/WTF/wtf/HashTable.h2
-rw-r--r--Source/WTF/wtf/OSRandomSource.cpp5
-rw-r--r--Source/WTF/wtf/Platform.h5
-rw-r--r--Source/WTF/wtf/PlatformQt.cmake21
-rw-r--r--Source/WTF/wtf/StringPrintStream.cpp34
-rw-r--r--Source/WTF/wtf/StringPrintStream.h1
-rw-r--r--Source/WTF/wtf/Vector.h8
-rw-r--r--Source/WTF/wtf/WorkQueue.cpp2
-rw-r--r--Source/WTF/wtf/spi/darwin/CommonCryptoSPI.h41
-rw-r--r--Source/WebCore/CMakeLists.txt9
-rw-r--r--Source/WebCore/PlatformQt.cmake5
-rw-r--r--Source/WebCore/Resources/nullPlugin@2x.pngbin7181 -> 3898 bytes
-rw-r--r--Source/WebCore/Resources/textAreaResizeCorner@2x.pngbin2907 -> 167 bytes
-rw-r--r--Source/WebCore/bindings/js/JSImageConstructor.cpp2
-rw-r--r--Source/WebCore/crypto/CommonCryptoUtilities.h6
-rw-r--r--Source/WebCore/dom/Document.cpp3
-rw-r--r--Source/WebCore/dom/SlotAssignment.h1
-rw-r--r--Source/WebCore/page/qt/EventHandlerQt.cpp2
-rw-r--r--Source/WebCore/platform/FileSystem.h4
-rw-r--r--Source/WebCore/platform/HashTools.h6
-rw-r--r--Source/WebCore/platform/Length.h8
-rw-r--r--Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp7
-rw-r--r--Source/WebCore/platform/qt/FileSystemQt.cpp2
-rw-r--r--Source/WebCore/platform/qt/PasteboardQt.cpp2
-rw-r--r--Source/WebCore/platform/qt/RenderThemeQStyle.cpp8
-rw-r--r--Source/WebCore/platform/qt/RenderThemeQStyle.h2
-rw-r--r--Source/WebKit/PlatformQt.cmake21
-rw-r--r--Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp8
-rw-r--r--Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.cpp6
-rw-r--r--Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp4
-rw-r--r--Source/WebKit2/Shared/qt/ChildProcessMainQt.cpp2
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp15
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h2
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp36
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebpreferences_p.h10
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebpreferences_p_p.h4
-rw-r--r--Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp3
-rw-r--r--Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp12
-rw-r--r--Source/WebKit2/UIProcess/WebPageProxy.cpp2
-rw-r--r--Source/WebKit2/UIProcess/qt/QtPageClient.cpp3
-rw-r--r--Source/WebKit2/WebProcess/qt/WebProcessMainQt.cpp4
-rw-r--r--Source/WebKit2/WebProcess/qt/WebProcessQt.cpp6
-rw-r--r--Source/bmalloc/bmalloc/BPlatform.h3
-rw-r--r--Source/cmake/FindWOFF2Dec.cmake53
-rw-r--r--Source/cmake/OptionsQt.cmake9
-rw-r--r--Source/cmake/OptionsWin.cmake3
-rw-r--r--Source/cmake/WebKitCommon.cmake3
-rw-r--r--Source/cmake/WebKitMacros.cmake4
-rw-r--r--Source/qtwebkit.qdocconf2
-rw-r--r--Tools/QtTestBrowser/launcherwindow.cpp35
-rw-r--r--Tools/QtTestBrowser/launcherwindow.h4
-rw-r--r--Tools/QtTestBrowser/mainwindow.cpp2
-rw-r--r--Tools/TestWebKitAPI/PlatformQt.cmake2
61 files changed, 335 insertions, 172 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 9d9483ecc..a473dbf14 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -19,7 +19,7 @@ if (ENABLE_API_TESTS)
add_subdirectory(ThirdParty/gtest)
endif ()
-if (USE_WOFF2)
+if (USE_WOFF2 AND NOT WOFF2DEC_FOUND)
add_subdirectory(ThirdParty/brotli)
add_subdirectory(ThirdParty/woff2)
endif ()
diff --git a/Source/JavaScriptCore/bytecode/Opcode.cpp b/Source/JavaScriptCore/bytecode/Opcode.cpp
index 0d16dfc2f..25e857d76 100644
--- a/Source/JavaScriptCore/bytecode/Opcode.cpp
+++ b/Source/JavaScriptCore/bytecode/Opcode.cpp
@@ -49,6 +49,18 @@ const char* const opcodeNames[] = {
#if ENABLE(OPCODE_STATS)
+inline const char* padOpcodeName(OpcodeID op, unsigned width)
+{
+ auto padding = " ";
+ auto paddingLength = strlen(padding);
+ auto opcodeNameLength = strlen(opcodeNames[op]);
+ if (opcodeNameLength >= width)
+ return "";
+ if (paddingLength + opcodeNameLength < width)
+ return padding;
+ return &padding[paddingLength + opcodeNameLength - width];
+}
+
long long OpcodeStats::opcodeCounts[numOpcodeIDs];
long long OpcodeStats::opcodePairCounts[numOpcodeIDs][numOpcodeIDs];
int OpcodeStats::lastOpcode = -1;
@@ -80,9 +92,9 @@ static int compareOpcodeIndices(const void* left, const void* right)
static int compareOpcodePairIndices(const void* left, const void* right)
{
- std::pair<int, int> leftPair = *(pair<int, int>*) left;
+ std::pair<int, int> leftPair = *(std::pair<int, int>*) left;
long long leftValue = OpcodeStats::opcodePairCounts[leftPair.first][leftPair.second];
- std::pair<int, int> rightPair = *(pair<int, int>*) right;
+ std::pair<int, int> rightPair = *(std::pair<int, int>*) right;
long long rightValue = OpcodeStats::opcodePairCounts[rightPair.first][rightPair.second];
if (leftValue < rightValue)
diff --git a/Source/JavaScriptCore/bytecode/Opcode.h b/Source/JavaScriptCore/bytecode/Opcode.h
index ee667c84f..21665c5f7 100644
--- a/Source/JavaScriptCore/bytecode/Opcode.h
+++ b/Source/JavaScriptCore/bytecode/Opcode.h
@@ -85,21 +85,8 @@ typedef void* Opcode;
typedef OpcodeID Opcode;
#endif
-#define PADDING_STRING " "
-#define PADDING_STRING_LENGTH static_cast<unsigned>(strlen(PADDING_STRING))
-
extern const char* const opcodeNames[];
-inline const char* padOpcodeName(OpcodeID op, unsigned width)
-{
- unsigned pad = width - strlen(opcodeNames[op]);
- pad = std::min(pad, PADDING_STRING_LENGTH);
- return PADDING_STRING + PADDING_STRING_LENGTH - pad;
-}
-
-#undef PADDING_STRING_LENGTH
-#undef PADDING_STRING
-
#if ENABLE(OPCODE_STATS)
struct OpcodeStats {
diff --git a/Source/JavaScriptCore/parser/Parser.cpp b/Source/JavaScriptCore/parser/Parser.cpp
index c66b74282..f4751616f 100644
--- a/Source/JavaScriptCore/parser/Parser.cpp
+++ b/Source/JavaScriptCore/parser/Parser.cpp
@@ -90,7 +90,7 @@ void Parser<LexerType>::logError(bool)
return;
StringPrintStream stream;
printUnexpectedTokenText(stream);
- setErrorMessage(stream.toString());
+ setErrorMessage(stream.toStringWithLatin1Fallback());
}
template <typename LexerType> template <typename A>
@@ -104,7 +104,7 @@ void Parser<LexerType>::logError(bool shouldPrintToken, const A& value1)
stream.print(". ");
}
stream.print(value1, ".");
- setErrorMessage(stream.toString());
+ setErrorMessage(stream.toStringWithLatin1Fallback());
}
template <typename LexerType> template <typename A, typename B>
@@ -118,7 +118,7 @@ void Parser<LexerType>::logError(bool shouldPrintToken, const A& value1, const B
stream.print(". ");
}
stream.print(value1, value2, ".");
- setErrorMessage(stream.toString());
+ setErrorMessage(stream.toStringWithLatin1Fallback());
}
template <typename LexerType> template <typename A, typename B, typename C>
@@ -132,7 +132,7 @@ void Parser<LexerType>::logError(bool shouldPrintToken, const A& value1, const B
stream.print(". ");
}
stream.print(value1, value2, value3, ".");
- setErrorMessage(stream.toString());
+ setErrorMessage(stream.toStringWithLatin1Fallback());
}
template <typename LexerType> template <typename A, typename B, typename C, typename D>
@@ -146,7 +146,7 @@ void Parser<LexerType>::logError(bool shouldPrintToken, const A& value1, const B
stream.print(". ");
}
stream.print(value1, value2, value3, value4, ".");
- setErrorMessage(stream.toString());
+ setErrorMessage(stream.toStringWithLatin1Fallback());
}
template <typename LexerType> template <typename A, typename B, typename C, typename D, typename E>
@@ -160,7 +160,7 @@ void Parser<LexerType>::logError(bool shouldPrintToken, const A& value1, const B
stream.print(". ");
}
stream.print(value1, value2, value3, value4, value5, ".");
- setErrorMessage(stream.toString());
+ setErrorMessage(stream.toStringWithLatin1Fallback());
}
template <typename LexerType> template <typename A, typename B, typename C, typename D, typename E, typename F>
@@ -174,7 +174,7 @@ void Parser<LexerType>::logError(bool shouldPrintToken, const A& value1, const B
stream.print(". ");
}
stream.print(value1, value2, value3, value4, value5, value6, ".");
- setErrorMessage(stream.toString());
+ setErrorMessage(stream.toStringWithLatin1Fallback());
}
template <typename LexerType> template <typename A, typename B, typename C, typename D, typename E, typename F, typename G>
@@ -188,7 +188,7 @@ void Parser<LexerType>::logError(bool shouldPrintToken, const A& value1, const B
stream.print(". ");
}
stream.print(value1, value2, value3, value4, value5, value6, value7, ".");
- setErrorMessage(stream.toString());
+ setErrorMessage(stream.toStringWithLatin1Fallback());
}
template <typename LexerType>
diff --git a/Source/JavaScriptCore/parser/Parser.h b/Source/JavaScriptCore/parser/Parser.h
index 02a726a56..bce94ba25 100644
--- a/Source/JavaScriptCore/parser/Parser.h
+++ b/Source/JavaScriptCore/parser/Parser.h
@@ -1114,7 +1114,10 @@ private:
void setErrorMessage(const String& message)
{
+ ASSERT_WITH_MESSAGE(!message.isEmpty(), "Attempted to set the empty string as an error message. Likely caused by invalid UTF8 used when creating the message.");
m_errorMessage = message;
+ if (m_errorMessage.isEmpty())
+ m_errorMessage = ASCIILiteral("Unparseable script");
}
NEVER_INLINE void logError(bool);
diff --git a/Source/JavaScriptCore/shell/PlatformQt.cmake b/Source/JavaScriptCore/shell/PlatformQt.cmake
index 55640eb3a..8d4b260c1 100644
--- a/Source/JavaScriptCore/shell/PlatformQt.cmake
+++ b/Source/JavaScriptCore/shell/PlatformQt.cmake
@@ -1,5 +1,5 @@
if (QT_STATIC_BUILD)
list(APPEND JSC_LIBRARIES
- ${DEPEND_STATIC_LIBS}
+ ${STATIC_LIB_DEPENDENCIES}
)
endif ()
diff --git a/Source/WTF/wtf/CMakeLists.txt b/Source/WTF/wtf/CMakeLists.txt
index 09b848c7a..297589b90 100644
--- a/Source/WTF/wtf/CMakeLists.txt
+++ b/Source/WTF/wtf/CMakeLists.txt
@@ -241,15 +241,6 @@ set(WTF_LIBRARIES
${CMAKE_DL_LIBS}
)
-if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
- list(APPEND WTF_HEADERS
- spi/darwin/CommonCryptoSPI.h
- )
- list(APPEND WTF_INCLUDE_DIRECTORIES
- "${WTF_DIR}/wtf/spi/darwin"
- )
-endif ()
-
if (NOT USE_SYSTEM_MALLOC)
list(APPEND WTF_LIBRARIES bmalloc)
endif ()
diff --git a/Source/WTF/wtf/HashTable.h b/Source/WTF/wtf/HashTable.h
index 712022d71..f95167f23 100644
--- a/Source/WTF/wtf/HashTable.h
+++ b/Source/WTF/wtf/HashTable.h
@@ -845,7 +845,7 @@ namespace WTF {
// This initializes the bucket without copying the empty value.
// That makes it possible to use this with types that don't support copying.
// The memset to 0 looks like a slow operation but is optimized by the compilers.
- memset(&bucket, 0, sizeof(bucket));
+ memset(static_cast<void*>(std::addressof(bucket)), 0, sizeof(bucket));
}
};
diff --git a/Source/WTF/wtf/OSRandomSource.cpp b/Source/WTF/wtf/OSRandomSource.cpp
index 378795dc7..529acf714 100644
--- a/Source/WTF/wtf/OSRandomSource.cpp
+++ b/Source/WTF/wtf/OSRandomSource.cpp
@@ -41,7 +41,8 @@
#endif
#if OS(DARWIN)
-#include "CommonCryptoSPI.h"
+#include <CommonCrypto/CommonCryptoError.h>
+#include <CommonCrypto/CommonRandom.h>
#endif
namespace WTF {
@@ -61,7 +62,7 @@ NEVER_INLINE NO_RETURN_DUE_TO_CRASH static void crashUnableToReadFromURandom()
void cryptographicallyRandomValuesFromOS(unsigned char* buffer, size_t length)
{
#if OS(DARWIN)
- RELEASE_ASSERT(!CCRandomCopyBytes(kCCRandomDefault, buffer, length));
+ RELEASE_ASSERT(!CCRandomGenerateBytes(buffer, length));
#elif OS(UNIX)
int fd = open("/dev/urandom", O_RDONLY, 0);
if (fd < 0)
diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
index 191f3090c..5717f3ea1 100644
--- a/Source/WTF/wtf/Platform.h
+++ b/Source/WTF/wtf/Platform.h
@@ -238,7 +238,8 @@
|| defined(__ARM_ARCH_7S__)
#define WTF_ARM_ARCH_VERSION 7
-#elif defined(__ARM_ARCH_8__)
+#elif defined(__ARM_ARCH_8__) \
+ || defined(__ARM_ARCH_8A__)
#define WTF_ARM_ARCH_VERSION 8
/* MSVC sets _M_ARM */
@@ -1027,7 +1028,7 @@
#define USE_VIDEOTOOLBOX 1
#endif
-#if PLATFORM(COCOA) || PLATFORM(GTK) || (PLATFORM(WIN) && !USE(WINGDI))
+#if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(QT) || (PLATFORM(WIN) && !USE(WINGDI))
#define USE_REQUEST_ANIMATION_FRAME_TIMER 1
#endif
diff --git a/Source/WTF/wtf/PlatformQt.cmake b/Source/WTF/wtf/PlatformQt.cmake
index 684119455..b7f4149f2 100644
--- a/Source/WTF/wtf/PlatformQt.cmake
+++ b/Source/WTF/wtf/PlatformQt.cmake
@@ -27,7 +27,13 @@ if (QT_STATIC_BUILD)
)
endif ()
-if (UNIX AND NOT APPLE)
+if (USE_MACH_PORTS)
+ list(APPEND WTF_SOURCES
+ cocoa/WorkQueueCocoa.cpp
+ )
+endif ()
+
+if (USE_UNIX_DOMAIN_SOCKETS)
list(APPEND WTF_SOURCES
UniStdExtras.cpp
@@ -66,8 +72,6 @@ endif ()
if (APPLE)
list(APPEND WTF_SOURCES
- cocoa/WorkQueueCocoa.cpp
-
text/cf/AtomicStringImplCF.cpp
text/cf/StringCF.cpp
text/cf/StringImplCF.cpp
@@ -77,3 +81,14 @@ if (APPLE)
${COREFOUNDATION_LIBRARY}
)
endif ()
+
+if (UNIX AND NOT APPLE)
+ check_function_exists(clock_gettime CLOCK_GETTIME_EXISTS)
+ if (NOT CLOCK_GETTIME_EXISTS)
+ set(CMAKE_REQUIRED_LIBRARIES rt)
+ check_function_exists(clock_gettime CLOCK_GETTIME_REQUIRES_LIBRT)
+ if (CLOCK_GETTIME_REQUIRES_LIBRT)
+ list(APPEND WTF_LIBRARIES rt)
+ endif ()
+ endif ()
+endif ()
diff --git a/Source/WTF/wtf/StringPrintStream.cpp b/Source/WTF/wtf/StringPrintStream.cpp
index 0fd6e4760..6a8881c5b 100644
--- a/Source/WTF/wtf/StringPrintStream.cpp
+++ b/Source/WTF/wtf/StringPrintStream.cpp
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -52,32 +52,34 @@ void StringPrintStream::vprintf(const char* format, va_list argList)
{
ASSERT_WITH_SECURITY_IMPLICATION(m_next < m_size);
ASSERT(!m_buffer[m_next]);
-
+
va_list firstPassArgList;
va_copy(firstPassArgList, argList);
-
+
int numberOfBytesNotIncludingTerminatorThatWouldHaveBeenWritten =
vsnprintf(m_buffer + m_next, m_size - m_next, format, firstPassArgList);
-
+
+ va_end(firstPassArgList);
+
int numberOfBytesThatWouldHaveBeenWritten =
numberOfBytesNotIncludingTerminatorThatWouldHaveBeenWritten + 1;
-
+
if (m_next + numberOfBytesThatWouldHaveBeenWritten <= m_size) {
m_next += numberOfBytesNotIncludingTerminatorThatWouldHaveBeenWritten;
return; // This means that vsnprintf() succeeded.
}
-
+
increaseSize(m_next + numberOfBytesThatWouldHaveBeenWritten);
-
+
int numberOfBytesNotIncludingTerminatorThatWereWritten =
vsnprintf(m_buffer + m_next, m_size - m_next, format, argList);
-
+
int numberOfBytesThatWereWritten = numberOfBytesNotIncludingTerminatorThatWereWritten + 1;
-
+
ASSERT_UNUSED(numberOfBytesThatWereWritten, m_next + numberOfBytesThatWereWritten <= m_size);
-
+
m_next += numberOfBytesNotIncludingTerminatorThatWereWritten;
-
+
ASSERT_WITH_SECURITY_IMPLICATION(m_next < m_size);
ASSERT(!m_buffer[m_next]);
}
@@ -100,14 +102,20 @@ String StringPrintStream::toString()
return String::fromUTF8(m_buffer, m_next);
}
+String StringPrintStream::toStringWithLatin1Fallback()
+{
+ ASSERT(m_next == strlen(m_buffer));
+ return String::fromUTF8WithLatin1Fallback(m_buffer, m_next);
+}
+
void StringPrintStream::increaseSize(size_t newSize)
{
ASSERT_WITH_SECURITY_IMPLICATION(newSize > m_size);
ASSERT(newSize > sizeof(m_inlineBuffer));
-
+
// Use exponential resizing to reduce thrashing.
m_size = newSize << 1;
-
+
// Use fastMalloc instead of fastRealloc because we know that for the sizes we're using,
// fastRealloc will just do malloc+free anyway. Also, this simplifies the code since
// we can't realloc the inline buffer.
diff --git a/Source/WTF/wtf/StringPrintStream.h b/Source/WTF/wtf/StringPrintStream.h
index 18eecb208..c526b8aa1 100644
--- a/Source/WTF/wtf/StringPrintStream.h
+++ b/Source/WTF/wtf/StringPrintStream.h
@@ -43,6 +43,7 @@ public:
WTF_EXPORT_PRIVATE CString toCString();
WTF_EXPORT_PRIVATE String toString();
+ WTF_EXPORT_PRIVATE String toStringWithLatin1Fallback();
WTF_EXPORT_PRIVATE void reset();
private:
diff --git a/Source/WTF/wtf/Vector.h b/Source/WTF/wtf/Vector.h
index 18268b6ef..d9a25ac6f 100644
--- a/Source/WTF/wtf/Vector.h
+++ b/Source/WTF/wtf/Vector.h
@@ -85,7 +85,7 @@ struct VectorInitializer<true, true, T>
{
static void initialize(T* begin, T* end)
{
- memset(begin, 0, reinterpret_cast<char*>(end) - reinterpret_cast<char*>(begin));
+ memset(static_cast<void*>(begin), 0, reinterpret_cast<char*>(end) - reinterpret_cast<char*>(begin));
}
};
@@ -125,11 +125,11 @@ struct VectorMover<true, T>
{
static void move(const T* src, const T* srcEnd, T* dst)
{
- memcpy(dst, src, reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src));
+ memcpy(static_cast<void*>(dst), static_cast<void*>(const_cast<T*>(src)), reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src));
}
static void moveOverlapping(const T* src, const T* srcEnd, T* dst)
{
- memmove(dst, src, reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src));
+ memmove(static_cast<void*>(dst), static_cast<void*>(const_cast<T*>(src)), reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src));
}
};
@@ -155,7 +155,7 @@ struct VectorCopier<true, T>
{
static void uninitializedCopy(const T* src, const T* srcEnd, T* dst)
{
- memcpy(dst, src, reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src));
+ memcpy(static_cast<void*>(dst), static_cast<void*>(const_cast<T*>(src)), reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src));
}
template<typename U>
static void uninitializedCopy(const T* src, const T* srcEnd, U* dst)
diff --git a/Source/WTF/wtf/WorkQueue.cpp b/Source/WTF/wtf/WorkQueue.cpp
index e26ae3bf2..3624d3902 100644
--- a/Source/WTF/wtf/WorkQueue.cpp
+++ b/Source/WTF/wtf/WorkQueue.cpp
@@ -52,7 +52,7 @@ WorkQueue::~WorkQueue()
platformInvalidate();
}
-#if !PLATFORM(COCOA) && !(PLATFORM(QT) && OS(DARWIN))
+#if !PLATFORM(COCOA) && !(PLATFORM(QT) && USE(MACH_PORTS))
void WorkQueue::concurrentApply(size_t iterations, const std::function<void (size_t index)>& function)
{
if (!iterations)
diff --git a/Source/WTF/wtf/spi/darwin/CommonCryptoSPI.h b/Source/WTF/wtf/spi/darwin/CommonCryptoSPI.h
deleted file mode 100644
index 325cbe81b..000000000
--- a/Source/WTF/wtf/spi/darwin/CommonCryptoSPI.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef CommonCryptoSPI_h
-#define CommonCryptoSPI_h
-
-#if OS(DARWIN)
-
-#if USE(APPLE_INTERNAL_SDK)
-#include <CommonCrypto/CommonRandomSPI.h>
-#endif
-
-typedef struct __CCRandom* CCRandomRef;
-extern const CCRandomRef kCCRandomDefault;
-extern "C" int CCRandomCopyBytes(CCRandomRef rnd, void *bytes, size_t count);
-
-#endif // OS(DARWIN)
-
-#endif /* CommonCryptoSPI_h */
diff --git a/Source/WebCore/CMakeLists.txt b/Source/WebCore/CMakeLists.txt
index e9fc4e54e..56b32563a 100644
--- a/Source/WebCore/CMakeLists.txt
+++ b/Source/WebCore/CMakeLists.txt
@@ -3354,8 +3354,13 @@ if (ENABLE_USER_MESSAGE_HANDLERS)
endif ()
if (USE_WOFF2)
- list(APPEND WebCore_INCLUDE_DIRECTORIES "${THIRDPARTY_DIR}/woff2/include")
- list(APPEND WebCore_LIBRARIES woff2)
+ if (WOFF2DEC_FOUND)
+ list(APPEND WebCore_INCLUDE_DIRECTORIES "${WOFF2DEC_INCLUDE_DIRS}")
+ list(APPEND WebCore_LIBRARIES "${WOFF2DEC_LIBRARIES}")
+ else ()
+ list(APPEND WebCore_INCLUDE_DIRECTORIES "${THIRDPARTY_DIR}/woff2/include")
+ list(APPEND WebCore_LIBRARIES woff2)
+ endif ()
endif ()
set(WebCoreTestSupport_INCLUDE_DIRECTORIES
diff --git a/Source/WebCore/PlatformQt.cmake b/Source/WebCore/PlatformQt.cmake
index 49c76a8de..8414d21e5 100644
--- a/Source/WebCore/PlatformQt.cmake
+++ b/Source/WebCore/PlatformQt.cmake
@@ -446,6 +446,11 @@ endif ()
# From PlatformWin.cmake
if (WIN32)
+ # Eliminate C2139 errors
+ if (MSVC)
+ add_compile_options(/D_ENABLE_EXTENDED_ALIGNED_STORAGE)
+ endif ()
+
if (${JavaScriptCore_LIBRARY_TYPE} MATCHES STATIC)
add_definitions(-DSTATICALLY_LINKED_WITH_WTF -DSTATICALLY_LINKED_WITH_JavaScriptCore)
endif ()
diff --git a/Source/WebCore/Resources/nullPlugin@2x.png b/Source/WebCore/Resources/nullPlugin@2x.png
index ccc40188a..0c76ff343 100644
--- a/Source/WebCore/Resources/nullPlugin@2x.png
+++ b/Source/WebCore/Resources/nullPlugin@2x.png
Binary files differ
diff --git a/Source/WebCore/Resources/textAreaResizeCorner@2x.png b/Source/WebCore/Resources/textAreaResizeCorner@2x.png
index 7d26fbc42..dc6242d0e 100644
--- a/Source/WebCore/Resources/textAreaResizeCorner@2x.png
+++ b/Source/WebCore/Resources/textAreaResizeCorner@2x.png
Binary files differ
diff --git a/Source/WebCore/bindings/js/JSImageConstructor.cpp b/Source/WebCore/bindings/js/JSImageConstructor.cpp
index 923690600..de553f5fa 100644
--- a/Source/WebCore/bindings/js/JSImageConstructor.cpp
+++ b/Source/WebCore/bindings/js/JSImageConstructor.cpp
@@ -44,7 +44,7 @@ template<> JSValue JSImageConstructor::prototypeForStructure(VM& vm, const JSDOM
return JSHTMLElement::getConstructor(vm, &globalObject);
}
-template<> EncodedJSValue JSImageConstructor::construct(ExecState* state)
+template<> EncodedJSValue JSC_HOST_CALL JSImageConstructor::construct(ExecState* state)
{
JSImageConstructor* jsConstructor = jsCast<JSImageConstructor*>(state->callee());
Document* document = jsConstructor->document();
diff --git a/Source/WebCore/crypto/CommonCryptoUtilities.h b/Source/WebCore/crypto/CommonCryptoUtilities.h
index 61d82c873..32419ecc4 100644
--- a/Source/WebCore/crypto/CommonCryptoUtilities.h
+++ b/Source/WebCore/crypto/CommonCryptoUtilities.h
@@ -30,11 +30,11 @@
#include "CryptoAlgorithmIdentifier.h"
#include <CommonCrypto/CommonCryptor.h>
+#include <CommonCrypto/CommonRandom.h>
#include <wtf/Vector.h>
#if USE(APPLE_INTERNAL_SDK)
#include <CommonCrypto/CommonRSACryptor.h>
-#include <CommonCrypto/CommonRandomSPI.h>
#endif
#ifndef _CC_RSACRYPTOR_H_
@@ -67,10 +67,6 @@ enum {
typedef struct _CCBigNumRef *CCBigNumRef;
-typedef struct __CCRandom *CCRandomRef;
-extern const CCRandomRef kCCRandomDefault;
-extern "C" int CCRandomCopyBytes(CCRandomRef rnd, void *bytes, size_t count);
-
typedef struct _CCRSACryptor *CCRSACryptorRef;
extern "C" CCCryptorStatus CCRSACryptorEncrypt(CCRSACryptorRef publicKey, CCAsymmetricPadding padding, const void *plainText, size_t plainTextLen, void *cipherText, size_t *cipherTextLen, const void *tagData, size_t tagDataLen, CCDigestAlgorithm digestType);
extern "C" CCCryptorStatus CCRSACryptorDecrypt(CCRSACryptorRef privateKey, CCAsymmetricPadding padding, const void *cipherText, size_t cipherTextLen, void *plainText, size_t *plainTextLen, const void *tagData, size_t tagDataLen, CCDigestAlgorithm digestType);
diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp
index 2598b0f1e..1bca2d0a6 100644
--- a/Source/WebCore/dom/Document.cpp
+++ b/Source/WebCore/dom/Document.cpp
@@ -5315,6 +5315,9 @@ void Document::initDNSPrefetch()
void Document::parseDNSPrefetchControlHeader(const String& dnsPrefetchControl)
{
+ if (!settings()->dnsPrefetchingEnabled())
+ return;
+
if (equalLettersIgnoringASCIICase(dnsPrefetchControl, "on") && !m_haveExplicitlyDisabledDNSPrefetch) {
m_isDNSPrefetchEnabled = true;
return;
diff --git a/Source/WebCore/dom/SlotAssignment.h b/Source/WebCore/dom/SlotAssignment.h
index 0fcd4dfa6..9b9ebe429 100644
--- a/Source/WebCore/dom/SlotAssignment.h
+++ b/Source/WebCore/dom/SlotAssignment.h
@@ -28,6 +28,7 @@
#if ENABLE(SHADOW_DOM) || ENABLE(DETAILS_ELEMENT)
+#include <functional>
#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
#include <wtf/Vector.h>
diff --git a/Source/WebCore/page/qt/EventHandlerQt.cpp b/Source/WebCore/page/qt/EventHandlerQt.cpp
index b717b1f54..6aed3f43f 100644
--- a/Source/WebCore/page/qt/EventHandlerQt.cpp
+++ b/Source/WebCore/page/qt/EventHandlerQt.cpp
@@ -54,7 +54,7 @@
namespace WebCore {
#if ENABLE(DRAG_SUPPORT)
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
const double EventHandler::TextDragDelay = 0.15;
#else
const double EventHandler::TextDragDelay = 0.0;
diff --git a/Source/WebCore/platform/FileSystem.h b/Source/WebCore/platform/FileSystem.h
index 2c46e4da0..4ee276da4 100644
--- a/Source/WebCore/platform/FileSystem.h
+++ b/Source/WebCore/platform/FileSystem.h
@@ -49,7 +49,7 @@
#endif
#endif
-#if USE(CF) || (PLATFORM(QT) && defined(Q_OS_MAC))
+#if USE(CF) || (PLATFORM(QT) && defined(Q_OS_MACOS))
typedef struct __CFBundle* CFBundleRef;
typedef const struct __CFData* CFDataRef;
#endif
@@ -75,7 +75,7 @@ typedef HMODULE PlatformModule;
#elif PLATFORM(EFL)
typedef Eina_Module* PlatformModule;
#elif PLATFORM(QT)
-#if defined(Q_OS_MAC)
+#if defined(Q_OS_MACOS)
typedef CFBundleRef PlatformModule;
#elif !defined(QT_NO_LIBRARY)
typedef QLibrary* PlatformModule;
diff --git a/Source/WebCore/platform/HashTools.h b/Source/WebCore/platform/HashTools.h
index 3badbdee1..a943eb49a 100644
--- a/Source/WebCore/platform/HashTools.h
+++ b/Source/WebCore/platform/HashTools.h
@@ -37,9 +37,9 @@ struct Value {
int id;
};
-const NamedColor* findColor(register const char* str, register unsigned int len);
-const Property* findProperty(register const char* str, register unsigned int len);
-const Value* findValue(register const char* str, register unsigned int len);
+const NamedColor* findColor(const char* str, unsigned len);
+const Property* findProperty(const char* str, unsigned len);
+const Value* findValue(const char* str, unsigned len);
} // namespace WebCore
diff --git a/Source/WebCore/platform/Length.h b/Source/WebCore/platform/Length.h
index 75ccf775e..b5697ce13 100644
--- a/Source/WebCore/platform/Length.h
+++ b/Source/WebCore/platform/Length.h
@@ -170,12 +170,12 @@ inline Length::Length(const Length& other)
if (other.isCalculated())
other.ref();
- memcpy(this, &other, sizeof(Length));
+ memcpy(static_cast<void*>(this), static_cast<void*>(const_cast<Length*>(&other)), sizeof(Length));
}
inline Length::Length(Length&& other)
{
- memcpy(this, &other, sizeof(Length));
+ memcpy(static_cast<void*>(this), static_cast<void*>(&other), sizeof(Length));
other.m_type = Auto;
}
@@ -189,7 +189,7 @@ inline Length& Length::operator=(const Length& other)
if (isCalculated())
deref();
- memcpy(this, &other, sizeof(Length));
+ memcpy(static_cast<void*>(this), static_cast<void*>(const_cast<Length*>(&other)), sizeof(Length));
return *this;
}
@@ -201,7 +201,7 @@ inline Length& Length::operator=(Length&& other)
if (isCalculated())
deref();
- memcpy(this, &other, sizeof(Length));
+ memcpy(static_cast<void*>(this), static_cast<void*>(&other), sizeof(Length));
other.m_type = Auto;
return *this;
}
diff --git a/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp b/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
index 1b60c5131..631adf37d 100644
--- a/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
+++ b/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
@@ -488,12 +488,15 @@ QNetworkReply* QNetworkReplyHandler::release()
static bool shouldIgnoreHttpError(QNetworkReply* reply, bool receivedData)
{
+ int httpStatusCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
+ // Don't ignore error if we haven't received HTTP status code
+ if (httpStatusCode == 0)
+ return false;
+
// An HEAD XmlHTTPRequest shouldn't be marked as failure for HTTP errors.
if (reply->operation() == QNetworkAccessManager::HeadOperation)
return true;
- int httpStatusCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
-
if (httpStatusCode == 401 || httpStatusCode == 407)
return true;
diff --git a/Source/WebCore/platform/qt/FileSystemQt.cpp b/Source/WebCore/platform/qt/FileSystemQt.cpp
index 167ff8354..7f62d0e1f 100644
--- a/Source/WebCore/platform/qt/FileSystemQt.cpp
+++ b/Source/WebCore/platform/qt/FileSystemQt.cpp
@@ -257,7 +257,7 @@ int writeToFile(PlatformFileHandle handle, const char* data, int length)
bool unloadModule(PlatformModule module)
{
-#if defined(Q_OS_MAC)
+#if defined(Q_OS_MACOS)
CFRelease(module);
return true;
diff --git a/Source/WebCore/platform/qt/PasteboardQt.cpp b/Source/WebCore/platform/qt/PasteboardQt.cpp
index 2bc766782..2b4a2220c 100644
--- a/Source/WebCore/platform/qt/PasteboardQt.cpp
+++ b/Source/WebCore/platform/qt/PasteboardQt.cpp
@@ -131,7 +131,7 @@ void Pasteboard::writeSelection(Range& selectedRange, bool canSmartCopyOrDelete,
m_writableData->setText(text);
QString markup = createMarkup(selectedRange, 0, AnnotateForInterchange, false, ResolveNonLocalURLs);
-#ifdef Q_OS_MAC
+#ifdef Q_OS_MACOS
markup.prepend(QLatin1String("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /></head><body>"));
markup.append(QLatin1String("</body></html>"));
m_writableData->setData(QLatin1String("text/html"), markup.toUtf8());
diff --git a/Source/WebCore/platform/qt/RenderThemeQStyle.cpp b/Source/WebCore/platform/qt/RenderThemeQStyle.cpp
index 706570399..8c6bbba03 100644
--- a/Source/WebCore/platform/qt/RenderThemeQStyle.cpp
+++ b/Source/WebCore/platform/qt/RenderThemeQStyle.cpp
@@ -130,7 +130,7 @@ RenderThemeQStyle::RenderThemeQStyle(Page* page)
{
int buttonPixelSize = 0;
m_qStyle->getButtonMetrics(&m_buttonFontFamily, &buttonPixelSize);
-#ifdef Q_OS_MAC
+#ifdef Q_OS_MACOS
m_buttonFontPixelSize = buttonPixelSize;
#endif
}
@@ -288,7 +288,7 @@ void RenderThemeQStyle::adjustButtonStyle(StyleResolver& styleResolver, RenderSt
// Ditch the border.
style.resetBorder();
-#ifdef Q_OS_MAC
+#ifdef Q_OS_MACOS
if (style.appearance() == PushButtonPart) {
// The Mac ports ignore the specified height for <input type="button"> elements
// unless a border and/or background CSS property is also specified.
@@ -299,7 +299,7 @@ void RenderThemeQStyle::adjustButtonStyle(StyleResolver& styleResolver, RenderSt
FontCascadeDescription fontDescription = style.fontDescription();
fontDescription.setIsAbsoluteSize(true);
-#ifdef Q_OS_MAC // Use fixed font size and family on Mac (like Safari does)
+#ifdef Q_OS_MACOS // Use fixed font size and family on Mac (like Safari does)
fontDescription.setSpecifiedSize(m_buttonFontPixelSize);
fontDescription.setComputedSize(m_buttonFontPixelSize);
#else
@@ -601,7 +601,7 @@ ControlPart RenderThemeQStyle::initializeCommonQStyleOptions(QStyleFacadeOption
option.state &= ~(QStyleFacade::State_HasFocus | QStyleFacade::State_MouseOver);
option.state |= QStyleFacade::State_Enabled;
-#ifdef Q_OS_MAC
+#ifdef Q_OS_MACOS
// to render controls in correct positions we also should set the State_Active flag
option.state |= QStyleFacade::State_Active;
#endif
diff --git a/Source/WebCore/platform/qt/RenderThemeQStyle.h b/Source/WebCore/platform/qt/RenderThemeQStyle.h
index 665eee005..463404b7d 100644
--- a/Source/WebCore/platform/qt/RenderThemeQStyle.h
+++ b/Source/WebCore/platform/qt/RenderThemeQStyle.h
@@ -110,7 +110,7 @@ private:
QRect indicatorRect(QStyleFacade::ButtonType part, const QRect& originalRect) const;
-#ifdef Q_OS_MAC
+#ifdef Q_OS_MACOS
int m_buttonFontPixelSize;
#endif
diff --git a/Source/WebKit/PlatformQt.cmake b/Source/WebKit/PlatformQt.cmake
index 6fe440be8..2bd6342be 100644
--- a/Source/WebKit/PlatformQt.cmake
+++ b/Source/WebKit/PlatformQt.cmake
@@ -5,7 +5,7 @@ include(ECMGeneratePriFile)
macro(generate_header _file _var _content)
file(GENERATE OUTPUT ${_file} CONTENT ${_content})
list(APPEND ${_var} ${_file})
- set_source_files_properties(${_file} PROPERTIES GENERATED TRUE)
+ set_source_files_properties(${_file} PROPERTIES GENERATED TRUE SKIP_AUTOMOC TRUE)
endmacro()
macro(generate_version_header _file _var _prefix)
@@ -13,7 +13,7 @@ macro(generate_version_header _file _var _prefix)
configure_file(VersionHeader.h.in ${_file} @ONLY)
unset(HEADER_PREFIX)
list(APPEND ${_var} ${_file})
- set_source_files_properties(${_file} PROPERTIES GENERATED TRUE)
+ set_source_files_properties(${_file} PROPERTIES GENERATED TRUE SKIP_AUTOMOC TRUE)
endmacro()
macro(append_lib_names_to_list _lib_names_list)
@@ -353,6 +353,7 @@ if (NOT SHARED_CORE)
list(APPEND WebKit_SOURCES
"${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/qrc_WebInspector.cpp"
)
+ set_property(SOURCE "${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/qrc_WebInspector.cpp" PROPERTY SKIP_AUTOMOC ON)
endif ()
endif ()
@@ -427,7 +428,7 @@ install(
COMPONENT Data
)
-set(WEBKIT_PKGCONGIG_DEPS "Qt5Core Qt5Gui Qt5Network")
+set(WEBKIT_PKGCONFIG_DEPS "Qt5Core Qt5Gui Qt5Network")
set(WEBKIT_PRI_DEPS "core gui network")
set(WEBKIT_PRI_EXTRA_LIBS "")
set(WEBKIT_PRI_RUNTIME_DEPS "core_private gui_private")
@@ -448,11 +449,11 @@ if (USE_MEDIA_FOUNDATION)
set(WEBKIT_PRI_EXTRA_LIBS "-lmfuuid -lstrmiids ${WEBKIT_PRI_EXTRA_LIBS}")
endif ()
if (USE_QT_MULTIMEDIA)
- set(WEBKIT_PKGCONGIG_DEPS "${WEBKIT_PKGCONGIG_DEPS} Qt5Multimedia")
+ set(WEBKIT_PKGCONFIG_DEPS "${WEBKIT_PKGCONFIG_DEPS} Qt5Multimedia")
set(WEBKIT_PRI_RUNTIME_DEPS "multimedia ${WEBKIT_PRI_RUNTIME_DEPS}")
endif ()
-set(WEBKITWIDGETS_PKGCONGIG_DEPS "${WEBKIT_PKGCONGIG_DEPS} Qt5Widgets Qt5WebKit")
+set(WEBKITWIDGETS_PKGCONFIG_DEPS "${WEBKIT_PKGCONFIG_DEPS} Qt5Widgets Qt5WebKit")
set(WEBKITWIDGETS_PRI_DEPS "${WEBKIT_PRI_DEPS} widgets webkit")
set(WEBKITWIDGETS_PRI_RUNTIME_DEPS "${WEBKIT_PRI_RUNTIME_DEPS} widgets_private")
@@ -465,12 +466,12 @@ if (ENABLE_PRINT_SUPPORT)
endif ()
if (USE_QT_MULTIMEDIA)
- set(WEBKITWIDGETS_PKGCONGIG_DEPS "${WEBKITWIDGETS_PKGCONGIG_DEPS} Qt5MultimediaWidgets")
+ set(WEBKITWIDGETS_PKGCONFIG_DEPS "${WEBKITWIDGETS_PKGCONFIG_DEPS} Qt5MultimediaWidgets")
set(WEBKITWIDGETS_PRI_RUNTIME_DEPS "${WEBKITWIDGETS_PRI_RUNTIME_DEPS} multimediawidgets")
endif ()
if (QT_STATIC_BUILD)
- set(WEBKITWIDGETS_PKGCONGIG_DEPS "${WEBKITWIDGETS_PKGCONGIG_DEPS} Qt5PrintSupport")
+ set(WEBKITWIDGETS_PKGCONFIG_DEPS "${WEBKITWIDGETS_PKGCONFIG_DEPS} Qt5PrintSupport")
set(WEBKITWIDGETS_PRI_DEPS "${WEBKITWIDGETS_PRI_DEPS} printsupport")
set(EXTRA_LIBS_NAMES WebCore JavaScriptCore WTF)
append_lib_names_to_list(EXTRA_LIBS_NAMES ${LIBXML2_LIBRARIES} ${SQLITE_LIBRARIES} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES})
@@ -494,7 +495,7 @@ if (QT_STATIC_BUILD)
endif ()
list(REMOVE_DUPLICATES EXTRA_LIBS_NAMES)
foreach (LIB_NAME ${EXTRA_LIBS_NAMES})
- set(WEBKIT_PKGCONGIG_DEPS "${WEBKIT_PKGCONGIG_DEPS} ${LIB_PREFIX}${LIB_NAME}")
+ set(WEBKIT_PKGCONFIG_DEPS "${WEBKIT_PKGCONFIG_DEPS} ${LIB_PREFIX}${LIB_NAME}")
set(WEBKIT_PRI_EXTRA_LIBS "${WEBKIT_PRI_EXTRA_LIBS} -l${LIB_PREFIX}${LIB_NAME}")
endforeach ()
endif ()
@@ -503,7 +504,8 @@ if (NOT MACOS_BUILD_FRAMEWORKS)
ecm_generate_pkgconfig_file(
BASE_NAME Qt5WebKit
DESCRIPTION "Qt WebKit module"
- DEPS "${WEBKIT_PKGCONGIG_DEPS}"
+ INCLUDE_INSTALL_DIR "${KDE_INSTALL_INCLUDEDIR}/QtWebKit"
+ DEPS "${WEBKIT_PKGCONFIG_DEPS}"
FILENAME_VAR WebKit_PKGCONFIG_FILENAME
)
set(ECM_PKGCONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig" CACHE PATH "The directory where pkgconfig will be installed to.")
@@ -728,6 +730,7 @@ if (NOT MACOS_BUILD_FRAMEWORKS)
ecm_generate_pkgconfig_file(
BASE_NAME Qt5WebKitWidgets
DESCRIPTION "Qt WebKitWidgets module"
+ INCLUDE_INSTALL_DIR "${KDE_INSTALL_INCLUDEDIR}/QtWebKitWidgets"
DEPS "${WEBKITWIDGETS_PKGCONFIG_DEPS}"
FILENAME_VAR WebKitWidgets_PKGCONFIG_FILENAME
)
diff --git a/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
index f7316f717..b91c306f4 100644
--- a/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
@@ -469,7 +469,7 @@ void EditorClientQt::handleKeyboardEvent(KeyboardEvent* event)
if (kevent->altKey())
shouldInsertText = true;
} else {
-#ifndef Q_OS_MAC
+#ifndef Q_OS_MACOS
// We need to exclude checking for Alt because it is just a different Shift
if (!kevent->altKey())
#endif
diff --git a/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp b/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp
index 00dc0c488..1c14fcd07 100644
--- a/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp
@@ -206,7 +206,11 @@ static void openNewWindow(const QUrl& url, Frame* frame)
}
// FIXME: Find a better place
-Ref<UserContentController> s_userContentProvider = UserContentController::create();
+static UserContentController& userContentProvider()
+{
+ static NeverDestroyed<Ref<UserContentController>> s_userContentProvider(UserContentController::create());
+ return s_userContentProvider.get();
+}
QWebPageAdapter::QWebPageAdapter()
: settings(0)
@@ -242,7 +246,7 @@ void QWebPageAdapter::initializeWebCorePage()
pageConfiguration.databaseProvider = &WebDatabaseProvider::singleton();
pageConfiguration.storageNamespaceProvider = WebStorageNamespaceProvider::create(
QWebSettings::globalSettings()->localStoragePath());
- pageConfiguration.userContentController = &s_userContentProvider.get();
+ pageConfiguration.userContentController = &userContentProvider();
pageConfiguration.visitedLinkStore = &VisitedLinkStoreQt::singleton();
page = new Page(pageConfiguration);
diff --git a/Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.cpp b/Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.cpp
index b35545674..53582f821 100644
--- a/Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.cpp
+++ b/Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.cpp
@@ -224,7 +224,7 @@ void QStyleFacadeImp::getButtonMetrics(QString *buttonFontFamily, int *buttonFon
QFont defaultButtonFont = QApplication::font(&button);
*buttonFontFamily = defaultButtonFont.family();
*buttonFontPixelSize = 0;
-#ifdef Q_OS_MAC
+#ifdef Q_OS_MACOS
button.setAttribute(Qt::WA_MacSmallSize);
QFontInfo fontInfo(defaultButtonFont);
*buttonFontPixelSize = fontInfo.pixelSize();
@@ -281,7 +281,7 @@ void QStyleFacadeImp::paintComboBox(QPainter *painter, const QStyleFacadeOption
QRect rect = opt.rect;
-#if defined(Q_OS_MAC) && !defined(QT_NO_STYLE_MAC)
+#if defined(Q_OS_MACOS) && !defined(QT_NO_STYLE_MAC)
// QMacStyle makes the combo boxes a little bit smaller to leave space for the focus rect.
// Because of it, the combo button is drawn at a point to the left of where it was expect to be and may end up
// overlapped with the text. This will force QMacStyle to draw the combo box with the expected width.
@@ -366,7 +366,7 @@ void QStyleFacadeImp::paintInnerSpinButton(QPainter* painter, const QStyleFacade
// Default to moving the buttons a little bit within the editor frame.
int inflateX = -2;
int inflateY = -2;
-#if defined(Q_OS_MAC) && !defined(QT_NO_STYLE_MAC)
+#if defined(Q_OS_MACOS) && !defined(QT_NO_STYLE_MAC)
// QMacStyle will position the aqua buttons flush to the right.
// This will move them more within the control for better style, a la
// Chromium look & feel.
diff --git a/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index e545c5c0f..73427cb4b 100644
--- a/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -212,7 +212,7 @@ private Q_SLOTS:
void cssMediaTypeGlobalSetting();
void cssMediaTypePageSetting();
-#ifdef Q_OS_MAC
+#ifdef Q_OS_MACOS
void macCopyUnicodeToClipboard();
#endif
@@ -3194,7 +3194,7 @@ void tst_QWebPage::thirdPartyCookiePolicy()
}
#endif
-#ifdef Q_OS_MAC
+#ifdef Q_OS_MACOS
void tst_QWebPage::macCopyUnicodeToClipboard()
{
QString unicodeText = QString::fromUtf8("αβγδεζηθικλμπ");
diff --git a/Source/WebKit2/Shared/qt/ChildProcessMainQt.cpp b/Source/WebKit2/Shared/qt/ChildProcessMainQt.cpp
index 2db152766..85dc2a5ca 100644
--- a/Source/WebKit2/Shared/qt/ChildProcessMainQt.cpp
+++ b/Source/WebKit2/Shared/qt/ChildProcessMainQt.cpp
@@ -45,7 +45,7 @@ bool ChildProcessMainBase::parseCommandLine(int argc, char** argv)
if (argc < 2)
return false;
-#if OS(DARWIN)
+#if USE(MACH_PORTS)
QByteArray serviceName(argv[1]);
// Get the server port.
diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
index b894d7338..7e4b37012 100644
--- a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
@@ -385,8 +385,10 @@ void QQuickWebViewPrivate::initialize(WKPageConfigurationRef configurationRef)
loadClient.didChangeProgress = didChangeProgress;
loadClient.didFinishProgress = didFinishProgress;
loadClient.didChangeBackForwardList = didChangeBackForwardList;
+ // FIXME: These three functions should not be part of this client.
loadClient.processDidBecomeUnresponsive = processDidBecomeUnresponsive;
loadClient.processDidBecomeResponsive = processDidBecomeResponsive;
+ loadClient.processDidCrash = processDidCrash;
WKPageSetPageLoaderClient(webPage.get(), &loadClient.base);
}
@@ -605,20 +607,21 @@ void QQuickWebViewPrivate::didRenderFrame()
}
}
-void QQuickWebViewPrivate::processDidCrash()
+void QQuickWebViewPrivate::processDidCrash(WKPageRef, const void* clientInfo)
{
- Q_Q(QQuickWebView);
+ QQuickWebViewPrivate* d = toQQuickWebViewPrivate(clientInfo);
+ QQuickWebView* q = d->q_ptr;
- QUrl url(URL(WebCore::ParsedURLString, webPageProxy->urlAtProcessExit()));
+ QUrl url(URL(WebCore::ParsedURLString, d->webPageProxy->urlAtProcessExit()));
qWarning("WARNING: The web process experienced a crash on '%s'.", qPrintable(url.toString(QUrl::RemoveUserInfo)));
- pageEventHandler->resetGestureRecognizers();
+ d->pageEventHandler->resetGestureRecognizers();
// Check if loading was ongoing, when process crashed.
- if (m_loadProgress > 0 && m_loadProgress < 100) {
+ if (d->m_loadProgress > 0 && d->m_loadProgress < 100) {
QWebLoadRequest loadRequest(url, QQuickWebView::LoadFailedStatus, QStringLiteral("The web process crashed."), QQuickWebView::InternalErrorDomain, 0);
- loadProgressDidChange(100);
+ d->loadProgressDidChange(100);
emit q->loadingChanged(&loadRequest);
}
diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h b/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h
index cca489582..dba68e792 100644
--- a/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h
@@ -128,7 +128,6 @@ public:
// PageClient.
WebCore::IntSize viewSize() const;
virtual void pageDidRequestScroll(const QPoint& pos) { }
- void processDidCrash();
void didRelaunchProcess();
std::unique_ptr<WebKit::DrawingAreaProxy> createDrawingAreaProxy();
void handleDownloadRequest(WebKit::DownloadProxy*);
@@ -176,6 +175,7 @@ protected:
static void didChangeBackForwardList(WKPageRef, WKBackForwardListItemRef, WKArrayRef, const void *clientInfo);
static void processDidBecomeUnresponsive(WKPageRef, const void* clientInfo);
static void processDidBecomeResponsive(WKPageRef, const void* clientInfo);
+ static void processDidCrash(WKPageRef, const void* clientInfo);
QQuickWebViewPrivate(QQuickWebView* viewport);
RefPtr<WebKit::WebPageProxy> webPageProxy;
diff --git a/Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp b/Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp
index c781a97ca..82a3db952 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp
@@ -83,6 +83,10 @@ bool QWebPreferencesPrivate::testAttribute(QWebPreferencesPrivate::WebAttribute
return WKPreferencesGetUniversalAccessFromFileURLsAllowed(preferencesRef);
case FileAccessFromFileURLsAllowed:
return WKPreferencesGetFileAccessFromFileURLsAllowed(preferencesRef);
+ case LogsPageMessagesToSystemConsoleEnabled:
+ return WKPreferencesGetLogsPageMessagesToSystemConsoleEnabled(preferencesRef);
+ case WebSecurityEnabled:
+ return WKPreferencesGetWebSecurityEnabled(preferencesRef);
default:
ASSERT_NOT_REACHED();
return false;
@@ -156,6 +160,12 @@ void QWebPreferencesPrivate::setAttribute(QWebPreferencesPrivate::WebAttribute a
case FileAccessFromFileURLsAllowed:
WKPreferencesSetFileAccessFromFileURLsAllowed(preferencesRef, enable);
break;
+ case LogsPageMessagesToSystemConsoleEnabled:
+ WKPreferencesSetLogsPageMessagesToSystemConsoleEnabled(preferencesRef, enable);
+ break;
+ case WebSecurityEnabled:
+ WKPreferencesSetWebSecurityEnabled(preferencesRef, enable);
+ break;
default:
ASSERT_NOT_REACHED();
}
@@ -631,6 +641,32 @@ void QWebPreferences::setLinksIncludedInFocusChain(bool enable)
emit linksIncludedInFocusChainChanged();
}
+bool QWebPreferences::logsPageMessagesToSystemConsoleEnabled() const
+{
+ return d->testAttribute(QWebPreferencesPrivate::LogsPageMessagesToSystemConsoleEnabled);
+}
+
+void QWebPreferences::setLogsPageMessagesToSystemConsoleEnabled(bool enable)
+{
+ if (logsPageMessagesToSystemConsoleEnabled() == enable)
+ return;
+ d->setAttribute(QWebPreferencesPrivate::LogsPageMessagesToSystemConsoleEnabled, enable);
+ emit logsPageMessagesToSystemConsoleEnabledChanged();
+}
+
+bool QWebPreferences::webSecurityEnabled() const
+{
+ return d->testAttribute(QWebPreferencesPrivate::WebSecurityEnabled);
+}
+
+void QWebPreferences::setWebSecurityEnabled(bool enable)
+{
+ if (webSecurityEnabled() == enable)
+ return;
+ d->setAttribute(QWebPreferencesPrivate::WebSecurityEnabled, enable);
+ emit webSecurityEnabledChanged();
+}
+
QWebPreferencesPrivate* QWebPreferencesPrivate::get(QWebPreferences* preferences)
{
return preferences->d;
diff --git a/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p.h b/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p.h
index 08c4df2d8..702146c38 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p.h
@@ -51,6 +51,8 @@ public:
Q_PROPERTY(bool fileAccessFromFileURLsAllowed READ fileAccessFromFileURLsAllowed WRITE setFileAccessFromFileURLsAllowed NOTIFY fileAccessFromFileURLsAllowedChanged FINAL)
Q_PROPERTY(bool spatialNavigationEnabled READ spatialNavigationEnabled WRITE setSpatialNavigationEnabled NOTIFY spatialNavigationEnabledChanged FINAL)
Q_PROPERTY(bool linksIncludedInFocusChain READ linksIncludedInFocusChain WRITE setLinksIncludedInFocusChain NOTIFY linksIncludedInFocusChainChanged FINAL)
+ Q_PROPERTY(bool logsPageMessagesToSystemConsoleEnabled READ logsPageMessagesToSystemConsoleEnabled WRITE setLogsPageMessagesToSystemConsoleEnabled NOTIFY logsPageMessagesToSystemConsoleEnabledChanged FINAL)
+ Q_PROPERTY(bool webSecurityEnabled READ webSecurityEnabled WRITE setWebSecurityEnabled NOTIFY webSecurityEnabledChanged FINAL)
Q_PROPERTY(QString standardFontFamily READ standardFontFamily WRITE setStandardFontFamily NOTIFY standardFontFamilyChanged FINAL)
Q_PROPERTY(QString fixedFontFamily READ fixedFontFamily WRITE setFixedFontFamily NOTIFY fixedFontFamilyChanged FINAL)
@@ -123,6 +125,12 @@ public:
bool linksIncludedInFocusChain() const;
void setLinksIncludedInFocusChain(bool enable);
+ bool logsPageMessagesToSystemConsoleEnabled() const;
+ void setLogsPageMessagesToSystemConsoleEnabled(bool);
+
+ bool webSecurityEnabled() const;
+ void setWebSecurityEnabled(bool);
+
QString standardFontFamily() const;
void setStandardFontFamily(const QString& family);
@@ -171,6 +179,8 @@ Q_SIGNALS:
void linksIncludedInFocusChainChanged();
void universalAccessFromFileURLsAllowedChanged();
void fileAccessFromFileURLsAllowedChanged();
+ void logsPageMessagesToSystemConsoleEnabledChanged();
+ void webSecurityEnabledChanged();
void standardFontFamilyChanged();
void fixedFontFamilyChanged();
diff --git a/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p_p.h b/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p_p.h
index 2b4c804ff..a5395c3c8 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p_p.h
@@ -44,7 +44,9 @@ public:
UniversalAccessFromFileURLsAllowed,
FileAccessFromFileURLsAllowed,
SpatialNavigationEnabled,
- LinksIncludedInFocusChain
+ LinksIncludedInFocusChain,
+ LogsPageMessagesToSystemConsoleEnabled,
+ WebSecurityEnabled
};
enum FontFamily {
diff --git a/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp b/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp
index e62e18d03..f5b66cd5f 100644
--- a/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp
+++ b/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp
@@ -58,8 +58,7 @@ void ProcessLauncher::didFinishLaunchingProcess(PlatformProcessIdentifier proces
if (!m_client) {
// FIXME: Make Identifier a move-only object and release port rights/connections in the destructor.
-#if OS(DARWIN) && !PLATFORM(GTK)
- // FIXME: Should really be something like USE(MACH)
+#if USE(MACH_PORTS)
if (identifier.port)
mach_port_mod_refs(mach_task_self(), identifier.port, MACH_PORT_RIGHT_RECEIVE, -1);
#endif
diff --git a/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp b/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp
index 51a3ffbba..694a759e6 100644
--- a/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp
+++ b/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp
@@ -62,7 +62,7 @@
#include <QCoreApplication>
#endif
-#if OS(DARWIN)
+#if USE(MACH_PORTS)
#include <mach/mach_init.h>
#include <servers/bootstrap.h>
@@ -70,7 +70,7 @@ extern "C" kern_return_t bootstrap_register2(mach_port_t, name_t, mach_port_t, u
#endif
// for QNX we need SOCK_DGRAM, see https://bugs.webkit.org/show_bug.cgi?id=95553
-#if defined(SOCK_SEQPACKET) && !defined(Q_OS_MACX) && !OS(QNX)
+#if defined(SOCK_SEQPACKET) && !defined(Q_OS_MACOS) && !OS(QNX)
#define SOCKET_TYPE SOCK_SEQPACKET
#else
#define SOCKET_TYPE SOCK_DGRAM
@@ -101,7 +101,7 @@ void QtWebProcess::setupChildProcess()
#endif
prctl(PR_SET_PDEATHSIG, SIGKILL);
#endif
-#if defined(Q_OS_MACX)
+#if defined(Q_OS_MACOS)
qputenv("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM", QByteArray("1"));
#endif
}
@@ -126,7 +126,7 @@ void ProcessLauncher::launchProcess()
#if ENABLE(DATABASE_PROCESS)
} else if (m_launchOptions.processType == ProcessType::Database) {
commandLine = QLatin1String("%1 \"%2\" %3 %4");
- QByteArray processPrefix = qgetenv("QT_WEBKIT2_DP_CMD_PREFIX");
+ QByteArray processPrefix = qgetenv("QT_WEBKIT2_SP_CMD_PREFIX");
commandLine = commandLine.arg(QLatin1String(processPrefix.constData())).arg(QString(executablePathOfDatabaseProcess()));
#endif
} else {
@@ -134,7 +134,7 @@ void ProcessLauncher::launchProcess()
ASSERT_NOT_REACHED();
}
-#if OS(DARWIN)
+#if USE(MACH_PORTS)
// Create the listening port.
mach_port_t connector;
mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &connector);
@@ -216,7 +216,7 @@ void ProcessLauncher::launchProcess()
if (!webProcessOrSUIDHelper->waitForStarted()) {
qDebug() << "Failed to start" << commandLine;
ASSERT_NOT_REACHED();
-#if OS(DARWIN)
+#if USE(MACH_PORTS)
mach_port_deallocate(mach_task_self(), connector);
mach_port_mod_refs(mach_task_self(), connector, MACH_PORT_RIGHT_RECEIVE, -1);
#endif
diff --git a/Source/WebKit2/UIProcess/WebPageProxy.cpp b/Source/WebKit2/UIProcess/WebPageProxy.cpp
index 5f6a16f70..d0ff9bca5 100644
--- a/Source/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/Source/WebKit2/UIProcess/WebPageProxy.cpp
@@ -6287,7 +6287,7 @@ void WebPageProxy::setURLSchemeHandlerForScheme(Ref<WebURLSchemeHandler>&& handl
WebURLSchemeHandler* WebPageProxy::urlSchemeHandlerForScheme(const String& scheme)
{
- return m_urlSchemeHandlersByScheme.get(scheme);
+ return scheme.isNull() ? nullptr : m_urlSchemeHandlersByScheme.get(scheme);
}
void WebPageProxy::startURLSchemeHandlerTask(uint64_t handlerIdentifier, uint64_t resourceIdentifier, const WebCore::ResourceRequest& request)
diff --git a/Source/WebKit2/UIProcess/qt/QtPageClient.cpp b/Source/WebKit2/UIProcess/qt/QtPageClient.cpp
index 53faa7647..fd410ffdd 100644
--- a/Source/WebKit2/UIProcess/qt/QtPageClient.cpp
+++ b/Source/WebKit2/UIProcess/qt/QtPageClient.cpp
@@ -90,7 +90,8 @@ void QtPageClient::pageDidRequestScroll(const IntPoint& pos)
void QtPageClient::processDidExit()
{
- QQuickWebViewPrivate::get(m_webView)->processDidCrash();
+ // TODO: Do we need this signal?
+ // QQuickWebViewPrivate::get(m_webView)->processDidExit();
}
void QtPageClient::didRelaunchProcess()
diff --git a/Source/WebKit2/WebProcess/qt/WebProcessMainQt.cpp b/Source/WebKit2/WebProcess/qt/WebProcessMainQt.cpp
index 2d0d7df10..ec271b5bd 100644
--- a/Source/WebKit2/WebProcess/qt/WebProcessMainQt.cpp
+++ b/Source/WebKit2/WebProcess/qt/WebProcessMainQt.cpp
@@ -45,7 +45,7 @@
#endif
#endif
-#if OS(DARWIN) && !USE(UNIX_DOMAIN_SOCKETS)
+#if USE(MACH_PORTS)
#include <servers/bootstrap.h>
extern "C" kern_return_t bootstrap_look_up2(mach_port_t, const name_t, mach_port_t*, pid_t, uint64_t);
@@ -139,7 +139,7 @@ Q_DECL_EXPORT int WebProcessMainQt(QGuiApplication* app)
return 1;
}
-#if OS(DARWIN)
+#if USE(MACH_PORTS)
QString serviceName = app->arguments().value(1);
// Get the server port.
diff --git a/Source/WebKit2/WebProcess/qt/WebProcessQt.cpp b/Source/WebKit2/WebProcess/qt/WebProcessQt.cpp
index d4864af5b..e687966db 100644
--- a/Source/WebKit2/WebProcess/qt/WebProcessQt.cpp
+++ b/Source/WebKit2/WebProcess/qt/WebProcessQt.cpp
@@ -39,7 +39,7 @@
#include <WebCore/RuntimeEnabledFeatures.h>
#include <wtf/RAMSize.h>
-#if defined(Q_OS_MACX)
+#if defined(Q_OS_MACOS)
#include <dispatch/dispatch.h>
#include <mach/host_info.h>
#include <mach/mach.h>
@@ -99,7 +99,7 @@ void WebProcess::platformClearResourceCaches(ResourceCachesToClear)
{
}
-#if defined(Q_OS_MACX)
+#if defined(Q_OS_MACOS)
static void parentProcessDiedCallback(void*)
{
QCoreApplication::quit();
@@ -134,7 +134,7 @@ void WebProcess::platformInitializeWebProcess(WebProcessCreationParameters&& par
}
#endif
-#if defined(Q_OS_MACX)
+#if defined(Q_OS_MACOS)
pid_t ppid = getppid();
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
dispatch_source_t source = dispatch_source_create(DISPATCH_SOURCE_TYPE_PROC, ppid, DISPATCH_PROC_EXIT, queue);
diff --git a/Source/bmalloc/bmalloc/BPlatform.h b/Source/bmalloc/bmalloc/BPlatform.h
index 8d768db63..400143a63 100644
--- a/Source/bmalloc/bmalloc/BPlatform.h
+++ b/Source/bmalloc/bmalloc/BPlatform.h
@@ -120,7 +120,8 @@
|| defined(__ARM_ARCH_7S__)
#define BARM_ARCH_VERSION 7
-#elif defined(__ARM_ARCH_8__)
+#elif defined(__ARM_ARCH_8__) \
+|| defined(__ARM_ARCH_8A__)
#define BARM_ARCH_VERSION 8
/* MSVC sets _M_ARM */
diff --git a/Source/cmake/FindWOFF2Dec.cmake b/Source/cmake/FindWOFF2Dec.cmake
new file mode 100644
index 000000000..4927eeeb7
--- /dev/null
+++ b/Source/cmake/FindWOFF2Dec.cmake
@@ -0,0 +1,53 @@
+# - Try to find WOFF2Dec.
+# Once done, this will define
+#
+# WOFF2DEC_FOUND - system has WOFF2Dec.
+# WOFF2DEC_INCLUDE_DIRS - the WOFF2Dec include directories
+# WOFF2DEC_LIBRARIES - link these to use WOFF2Dec.
+#
+# Copyright (C) 2017 Igalia S.L.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+find_package(PkgConfig)
+pkg_check_modules(PC_WOFF2DEC libwoff2dec)
+
+find_path(WOFF2DEC_INCLUDE_DIRS
+ NAMES woff2/decode.h
+ HINTS ${PC_WOFF2DEC_INCLUDEDIR}
+)
+
+find_library(WOFF2DEC_LIBRARIES
+ NAMES woff2dec
+ HINTS ${PC_WOFF2DEC_LIBDIR}
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(WOFF2Dec
+ REQUIRED_VARS WOFF2DEC_INCLUDE_DIRS WOFF2DEC_LIBRARIES
+ FOUND_VAR WOFF2DEC_FOUND
+ VERSION_VAR PC_WOFF2DEC_VERSION)
+
+mark_as_advanced(
+ WOFF2DEC_INCLUDE_DIRS
+ WOFF2DEC_LIBRARIES
+)
diff --git a/Source/cmake/OptionsQt.cmake b/Source/cmake/OptionsQt.cmake
index 003fdca41..ff207fe77 100644
--- a/Source/cmake/OptionsQt.cmake
+++ b/Source/cmake/OptionsQt.cmake
@@ -793,6 +793,15 @@ if (USE_LIBHYPHEN)
endif ()
endif ()
+if (USE_WOFF2)
+ find_package(WOFF2Dec 1.0.1)
+ if (WOFF2DEC_FOUND)
+ message(STATUS "Using system WOFF2Dec library.")
+ else ()
+ message(STATUS "WOFF2Dec not found, using the bundled library.")
+ endif ()
+endif ()
+
# From OptionsGTK.cmake
if (CMAKE_MAJOR_VERSION LESS 3)
# Before CMake 3 it was necessary to use a build script instead of using cmake --build directly
diff --git a/Source/cmake/OptionsWin.cmake b/Source/cmake/OptionsWin.cmake
index be36d92d3..a568258d9 100644
--- a/Source/cmake/OptionsWin.cmake
+++ b/Source/cmake/OptionsWin.cmake
@@ -128,6 +128,9 @@ if (MSVC)
/wd6255 /wd6387
)
+ # Eliminate C2139 errors
+ add_compile_options(/D_ENABLE_EXTENDED_ALIGNED_STORAGE)
+
# Create pdb files for debugging purposes, also for Release builds
add_compile_options(/Zi /GS)
diff --git a/Source/cmake/WebKitCommon.cmake b/Source/cmake/WebKitCommon.cmake
index 1f7b4ccdf..de4ac8f65 100644
--- a/Source/cmake/WebKitCommon.cmake
+++ b/Source/cmake/WebKitCommon.cmake
@@ -41,6 +41,9 @@ if (NOT HAS_RUN_WEBKIT_COMMON)
# Helper macros and feature defines
# -----------------------------------------------------------------------------
+ # To prevent multiple inclusion, most modules should be included once here.
+ include(CheckFunctionExists)
+
include(WebKitMacros)
include(WebKitFS)
include(WebKitHelpers)
diff --git a/Source/cmake/WebKitMacros.cmake b/Source/cmake/WebKitMacros.cmake
index 07e31432a..d58c73eb4 100644
--- a/Source/cmake/WebKitMacros.cmake
+++ b/Source/cmake/WebKitMacros.cmake
@@ -373,6 +373,10 @@ macro(GENERATE_WEBKIT2_MESSAGE_SOURCES _output_source _input_files)
WORKING_DIRECTORY ${WEBKIT2_DIR}
VERBATIM)
+ if (${PORT} STREQUAL "Qt")
+ set_property(SOURCE ${DERIVED_SOURCES_WEBKIT2_DIR}/${_name}MessageReceiver.cpp PROPERTY SKIP_AUTOMOC ON)
+ endif ()
+
list(APPEND ${_output_source} ${DERIVED_SOURCES_WEBKIT2_DIR}/${_name}MessageReceiver.cpp)
endforeach ()
endmacro()
diff --git a/Source/qtwebkit.qdocconf b/Source/qtwebkit.qdocconf
index 5142b0776..8e4edbd75 100644
--- a/Source/qtwebkit.qdocconf
+++ b/Source/qtwebkit.qdocconf
@@ -35,3 +35,5 @@ exampledirs = WebKit/qt/docs
imagedirs = WebKit/qt/docs
depends += qtcore qtwidgets qtgui qtscript qtdoc qtprintsupport qtxml qtwebkitexamples qtquickcontrols
+
+tagfile = qtwebkit.tags
diff --git a/Tools/QtTestBrowser/launcherwindow.cpp b/Tools/QtTestBrowser/launcherwindow.cpp
index 716a6e3e8..6e221840d 100644
--- a/Tools/QtTestBrowser/launcherwindow.cpp
+++ b/Tools/QtTestBrowser/launcherwindow.cpp
@@ -222,6 +222,7 @@ void LauncherWindow::applyPrefs()
settings->setAttribute(QWebSettings::TiledBackingStoreEnabled, m_windowOptions.useTiledBackingStore);
settings->setAttribute(QWebSettings::FrameFlatteningEnabled, m_windowOptions.useFrameFlattening);
settings->setAttribute(QWebSettings::WebGLEnabled, m_windowOptions.useWebGL);
+ settings->setAttribute(QWebSettings::MediaEnabled, m_windowOptions.useMedia);
m_windowOptions.useWebAudio = settings->testAttribute(QWebSettings::WebAudioEnabled);
m_windowOptions.useMediaSource = settings->testAttribute(QWebSettings::MediaSourceEnabled);
@@ -326,6 +327,15 @@ void LauncherWindow::createChrome()
toggleWebGL->setEnabled(false);
#endif
+ QAction* toggleMedia = toolsMenu->addAction("Toggle Media", this, SLOT(toggleMedia(bool)));
+ toggleMedia->setCheckable(true);
+#if ENABLE(VIDEO)
+ toggleMedia->setChecked(settings->testAttribute(QWebSettings::MediaEnabled));
+#else
+ toggleMedia->setChecked(false);
+ toggleMedia->setEnabled(false);
+#endif
+
QAction* toggleWebAudio = toolsMenu->addAction("Toggle WebAudio", this, SLOT(toggleWebAudio(bool)));
toggleWebAudio->setCheckable(true);
#if ENABLE(WEB_AUDIO)
@@ -336,7 +346,7 @@ void LauncherWindow::createChrome()
QAction* toggleMediaSource = toolsMenu->addAction("Toggle MediaSource", this, SLOT(toggleMediaSource(bool)));
toggleMediaSource->setCheckable(true);
- toggleWebGL->setChecked(settings->testAttribute(QWebSettings::MediaSourceEnabled));
+ toggleMediaSource->setChecked(settings->testAttribute(QWebSettings::MediaSourceEnabled));
#if !ENABLE(MEDIA_SOURCE)
toggleMediaSource->setEnabled(false);
#endif
@@ -948,6 +958,12 @@ void LauncherWindow::toggleWebGL(bool toggle)
page()->settings()->setAttribute(QWebSettings::WebGLEnabled, toggle);
}
+void LauncherWindow::toggleMedia(bool toggle)
+{
+ m_windowOptions.useMedia = toggle;
+ page()->settings()->setAttribute(QWebSettings::MediaEnabled, toggle);
+}
+
void LauncherWindow::toggleWebAudio(bool toggle)
{
m_windowOptions.useWebAudio = toggle;
@@ -1142,6 +1158,23 @@ void LauncherWindow::showUserAgentDialog()
delete dialog;
}
+void LauncherWindow::showSSLErrorConfirmation(QNetworkReply* reply, const QList<QSslError>& errors)
+{
+ QString errorStrings = "<ul>";
+ for (const QSslError& error : errors)
+ errorStrings += "<li>" + error.errorString() + "</li>";
+ errorStrings += "</ul>";
+
+ QMessageBox sslWarningBox;
+ sslWarningBox.setText("SSL handshake problem");
+ sslWarningBox.setInformativeText(errorStrings);
+ sslWarningBox.setStandardButtons(QMessageBox::Abort | QMessageBox::Ignore);
+ sslWarningBox.setDefaultButton(QMessageBox::Abort);
+ sslWarningBox.setIcon(QMessageBox::Warning);
+ if (sslWarningBox.exec() == QMessageBox::Ignore)
+ reply->ignoreSslErrors();
+}
+
void LauncherWindow::loadURLListFromFile()
{
QString selectedFile;
diff --git a/Tools/QtTestBrowser/launcherwindow.h b/Tools/QtTestBrowser/launcherwindow.h
index e475a8022..8a8baeeda 100644
--- a/Tools/QtTestBrowser/launcherwindow.h
+++ b/Tools/QtTestBrowser/launcherwindow.h
@@ -72,6 +72,7 @@ public:
bool useCompositing { false };
bool useTiledBackingStore { false };
bool useWebGL { false };
+ bool useMedia { true };
bool useWebAudio { false };
bool useMediaSource { false };
bool useFrameFlattening { false };
@@ -134,6 +135,7 @@ protected Q_SLOTS:
void toggleTiledBackingStore(bool toggle);
void toggleResizesToContents(bool toggle);
void toggleWebGL(bool toggle);
+ void toggleMedia(bool toggle);
void toggleWebAudio(bool toggle);
void toggleMediaSource(bool toggle);
void toggleSpatialNavigation(bool enable);
@@ -170,6 +172,8 @@ protected Q_SLOTS:
void clearSelection();
void showFPS(bool enable);
void showUserAgentDialog();
+ void showSSLErrorConfirmation(QNetworkReply*, const QList<QSslError>&);
+
void printURL(const QUrl&);
#if !defined(QT_NO_FILEDIALOG) && !defined(QT_NO_MESSAGEBOX)
diff --git a/Tools/QtTestBrowser/mainwindow.cpp b/Tools/QtTestBrowser/mainwindow.cpp
index d342147ac..e22193a96 100644
--- a/Tools/QtTestBrowser/mainwindow.cpp
+++ b/Tools/QtTestBrowser/mainwindow.cpp
@@ -43,6 +43,7 @@
#include <QFileDialog>
#endif
#include <QMenuBar>
+#include <QMessageBox>
MainWindow::MainWindow()
: m_page(new WebPage(this))
@@ -85,6 +86,7 @@ void MainWindow::buildUI()
connect(page()->mainFrame(), SIGNAL(loadStarted()), this, SLOT(onLoadStarted()));
connect(page()->mainFrame(), SIGNAL(iconChanged()), this, SLOT(onIconChanged()));
connect(page()->mainFrame(), SIGNAL(titleChanged(QString)), this, SLOT(onTitleChanged(QString)));
+ connect(page()->networkAccessManager(), SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError>&)), this, SLOT(onSSLErrors(QNetworkReply*, const QList<QSslError>&)));
connect(page(), SIGNAL(windowCloseRequested()), this, SLOT(close()));
#ifndef QT_NO_SHORTCUT
diff --git a/Tools/TestWebKitAPI/PlatformQt.cmake b/Tools/TestWebKitAPI/PlatformQt.cmake
index c054c661b..81d98bcb5 100644
--- a/Tools/TestWebKitAPI/PlatformQt.cmake
+++ b/Tools/TestWebKitAPI/PlatformQt.cmake
@@ -35,7 +35,7 @@ set(test_webcore_LIBRARIES
WebCore
gtest
${Qt5Gui_LIBRARIES}
- ${DEPEND_STATIC_LIBS}
+ ${STATIC_LIB_DEPENDENCIES}
)
add_executable(TestWebCore