summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@digia.com>2013-11-08 18:19:26 +0100
committerSergio Ahumada <sergio.ahumada@digia.com>2013-11-08 18:19:27 +0100
commitc617e2a25aca6cb95ab9d1a7cc55b363a12e861e (patch)
tree6d6f74338e81973c5f5d11984d822ee450205074
parent056b920c01121c095b20fa7ee3886c0bfebd3536 (diff)
parent8c7a7606acbb2083c8077cce57054f43744cb1c0 (diff)
downloadqtwebkit-c617e2a25aca6cb95ab9d1a7cc55b363a12e861e.tar.gz
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I4e82a7abec9b95d3148e1eddc786ee5a16d1f768
-rw-r--r--Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp14
-rw-r--r--Source/JavaScriptCore/assembler/SH4Assembler.h14
-rw-r--r--Source/JavaScriptCore/bytecode/ArrayProfile.cpp1
-rw-r--r--Source/JavaScriptCore/bytecode/PreciseJumpTargets.cpp1
-rw-r--r--Source/JavaScriptCore/config.h9
-rw-r--r--Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h6
-rw-r--r--Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp2
-rw-r--r--Source/JavaScriptCore/heap/CopyVisitor.cpp1
-rw-r--r--Source/JavaScriptCore/llint/LowLevelInterpreter.asm2
-rw-r--r--Source/JavaScriptCore/runtime/FunctionExecutableDump.cpp1
-rw-r--r--Source/JavaScriptCore/runtime/JSCellInlines.h1
-rw-r--r--Source/JavaScriptCore/runtime/StructureInlines.h1
-rw-r--r--Source/JavaScriptCore/runtime/SymbolTable.cpp2
-rw-r--r--Source/JavaScriptCore/tools/CodeProfiling.cpp8
-rw-r--r--Source/WTF/WTF.pri6
-rw-r--r--Source/WTF/WTF.pro1
-rw-r--r--Source/WTF/config.h9
-rw-r--r--Source/WTF/wtf/Assertions.cpp12
-rw-r--r--Source/WTF/wtf/Atomics.cpp110
-rw-r--r--Source/WTF/wtf/Atomics.h37
-rw-r--r--Source/WTF/wtf/CurrentTime.cpp4
-rw-r--r--Source/WTF/wtf/MathExtras.h8
-rw-r--r--Source/WTF/wtf/Platform.h51
-rw-r--r--Source/WTF/wtf/ThreadIdentifierDataPthreads.cpp2
-rw-r--r--Source/WebCore/Target.pri20
-rw-r--r--Source/WebCore/WebCore.pri10
-rw-r--r--Source/WebCore/WebCorePrefix.h9
-rw-r--r--Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp33
-rw-r--r--Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h71
-rw-r--r--Source/WebCore/bindings/js/JSBindingsAllInOne.cpp3
-rw-r--r--Source/WebCore/config.h9
-rw-r--r--Source/WebCore/css/MediaAllInOne.cpp1
-rw-r--r--Source/WebCore/dom/DOMAllInOne.cpp5
-rw-r--r--Source/WebCore/dom/EventRetargeter.h3
-rw-r--r--Source/WebCore/html/HTMLAnchorElement.cpp2
-rw-r--r--Source/WebCore/html/canvas/CanvasStyle.cpp9
-rw-r--r--Source/WebCore/page/ContextMenuController.cpp9
-rw-r--r--Source/WebCore/platform/LocalizedStrings.cpp7
-rw-r--r--Source/WebCore/platform/LocalizedStrings.h6
-rw-r--r--Source/WebCore/platform/graphics/gstreamer/PlatformVideoWindowPrivate.h5
-rw-r--r--Source/WebCore/platform/graphics/gstreamer/PlatformVideoWindowQt.cpp17
-rw-r--r--Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp1
-rw-r--r--Source/WebCore/platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp2
-rw-r--r--Source/WebCore/platform/qt/FileSystemQt.cpp10
-rw-r--r--Source/WebCore/platform/qt/GamepadsQt.cpp123
-rw-r--r--Source/WebCore/platform/qt/LocalizedStringsQt.cpp47
-rw-r--r--Source/WebCore/platform/qt/RenderThemeQStyle.cpp2
-rw-r--r--Source/WebKit/qt/Api/qwebsettings.cpp7
-rw-r--r--Source/WebKit/qt/Api/qwebsettings.h1
-rw-r--r--Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp17
-rw-r--r--Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.h4
-rw-r--r--Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.cpp2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.h1
-rw-r--r--Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp65
-rw-r--r--Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.h11
-rw-r--r--Source/WebKit/qt/WidgetApi/qwebframe.cpp11
-rw-r--r--Source/WebKit/qt/WidgetApi/qwebframe.h1
-rw-r--r--Source/WebKit/qt/WidgetApi/qwebpage.cpp27
-rw-r--r--Source/WebKit/qt/WidgetApi/qwebpage.h8
-rw-r--r--Source/WebKit2/Platform/CoreIPC/Connection.cpp6
-rw-r--r--Source/WebKit2/Platform/CoreIPC/Connection.h4
-rw-r--r--Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp40
-rw-r--r--Source/WebKit2/Target.pri3
-rw-r--r--Source/WebKit2/UIProcess/StatisticsRequest.cpp10
-rw-r--r--Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp2
-rw-r--r--Source/WebKit2/WebKit2.pri2
-rw-r--r--Source/WebKit2/WebKit2.pro7
-rw-r--r--Source/WebKit2/WebKit2QML.pri80
-rw-r--r--Source/WebKit2/config.h13
-rw-r--r--Source/api.pri5
-rw-r--r--Tools/DumpRenderTree/config.h6
-rw-r--r--Tools/qmake/mkspecs/features/configure.prf4
-rw-r--r--Tools/qmake/mkspecs/features/features.prf31
-rw-r--r--Tools/qmake/mkspecs/features/production_build.prf2
-rw-r--r--Tools/qmake/mkspecs/features/unix/default_post.prf3
-rw-r--r--Tools/qmake/mkspecs/features/webkit_modules.prf2
-rw-r--r--Tools/qmake/mkspecs/modules/webkit2qml.prf9
80 files changed, 578 insertions, 519 deletions
diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp b/Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp
index 98dc3e987..a523939b7 100644
--- a/Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp
+++ b/Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp
@@ -36,7 +36,19 @@
#include <fcntl.h>
#include <unistd.h>
#include <elf.h>
-#include <asm/hwcap.h>
+#if !OS(ANDROID) && !PLATFORM(QT)
+# include <asm/hwcap.h>
+# else
+# include <asm/procinfo.h>
+typedef struct
+{
+ uint32_t a_type;
+ union
+ {
+ uint32_t a_val;
+ } a_un;
+} Elf32_auxv_t;
+# endif
#endif
namespace JSC {
diff --git a/Source/JavaScriptCore/assembler/SH4Assembler.h b/Source/JavaScriptCore/assembler/SH4Assembler.h
index fded7df89..55f974a29 100644
--- a/Source/JavaScriptCore/assembler/SH4Assembler.h
+++ b/Source/JavaScriptCore/assembler/SH4Assembler.h
@@ -1545,17 +1545,11 @@ public:
insn[0] = getOpcodeGroup3(MOVL_READ_OFFPC_OPCODE, SH4Registers::r13, insn[0] & 0x00ff);
insn[1] = (insn[1] & 0xf00f) | (rd << 8) | (SH4Registers::r13 << 4);
cacheFlush(insn, 2 * sizeof(SH4Word));
- changePCrelativeAddress(insn[0] & 0x00ff, insn, imm);
- return;
- }
-
- if ((insn[0] & 0x00ff) == 1)
+ } else {
insn[1] = getOpcodeGroup6(BRA_OPCODE, 3);
- else
- insn[1] = NOP_OPCODE;
-
- insn[2] = NOP_OPCODE;
- cacheFlush(&insn[1], 2 * sizeof(SH4Word));
+ insn[2] = NOP_OPCODE;
+ cacheFlush(&insn[1], 2 * sizeof(SH4Word));
+ }
changePCrelativeAddress(insn[0] & 0x00ff, insn, imm);
}
diff --git a/Source/JavaScriptCore/bytecode/ArrayProfile.cpp b/Source/JavaScriptCore/bytecode/ArrayProfile.cpp
index ae3c8f94a..7ea31da10 100644
--- a/Source/JavaScriptCore/bytecode/ArrayProfile.cpp
+++ b/Source/JavaScriptCore/bytecode/ArrayProfile.cpp
@@ -24,6 +24,7 @@
*/
#include "config.h"
+#include "JSCellInlines.h"
#include "ArrayProfile.h"
#include "CodeBlock.h"
diff --git a/Source/JavaScriptCore/bytecode/PreciseJumpTargets.cpp b/Source/JavaScriptCore/bytecode/PreciseJumpTargets.cpp
index 0cdf51a98..b789da104 100644
--- a/Source/JavaScriptCore/bytecode/PreciseJumpTargets.cpp
+++ b/Source/JavaScriptCore/bytecode/PreciseJumpTargets.cpp
@@ -24,6 +24,7 @@
*/
#include "config.h"
+#include "JSCellInlines.h"
#include "PreciseJumpTargets.h"
namespace JSC {
diff --git a/Source/JavaScriptCore/config.h b/Source/JavaScriptCore/config.h
index 4e1d2b91c..a5df3aa7a 100644
--- a/Source/JavaScriptCore/config.h
+++ b/Source/JavaScriptCore/config.h
@@ -34,15 +34,6 @@
#endif
#if OS(WINDOWS)
-
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0502
-#endif
-
-#ifndef WINVER
-#define WINVER 0x0502
-#endif
-
// If we don't define these, they get defined in windef.h.
// We want to use std::min and std::max
#define max max
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
index c6fd0d4d6..54f736600 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
@@ -1675,13 +1675,15 @@ public:
JITCompiler::Call appendCallWithExceptionCheckSetResult(const FunctionPtr& function, FPRReg result)
{
JITCompiler::Call call = appendCallWithExceptionCheck(function);
- m_jit.moveDouble(result, FPRInfo::argumentFPR0);
+ if (result != InvalidFPRReg)
+ m_jit.moveDouble(FPRInfo::argumentFPR0, result);
return call;
}
JITCompiler::Call appendCallSetResult(const FunctionPtr& function, FPRReg result)
{
JITCompiler::Call call = m_jit.appendCall(function);
- m_jit.moveDouble(result, FPRInfo::argumentFPR0);
+ if (result != InvalidFPRReg)
+ m_jit.moveDouble(FPRInfo::argumentFPR0, result);
return call;
}
#else
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
index 1d213c6fe..de4ca9674 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
@@ -4399,7 +4399,7 @@ void SpeculativeJIT::compile(Node* node)
JITCompiler::Jump isNotCell = m_jit.branch32(JITCompiler::NotEqual, tagGPR, JITCompiler::TrustedImm32(JSValue::CellTag));
if (node->child1().useKind() != UntypedUse)
- speculationCheck(BadType, JSValueRegs(tagGPR, payloadGPR), node->child1(), isNotCell);
+ DFG_TYPE_CHECK(JSValueRegs(tagGPR, payloadGPR), node->child1(), SpecCell, isNotCell);
if (!node->child1()->shouldSpeculateObject() || node->child1().useKind() == StringUse) {
m_jit.loadPtr(JITCompiler::Address(payloadGPR, JSCell::structureOffset()), tempGPR);
diff --git a/Source/JavaScriptCore/heap/CopyVisitor.cpp b/Source/JavaScriptCore/heap/CopyVisitor.cpp
index 281d4bd3b..2e2172f76 100644
--- a/Source/JavaScriptCore/heap/CopyVisitor.cpp
+++ b/Source/JavaScriptCore/heap/CopyVisitor.cpp
@@ -30,6 +30,7 @@
#include "CopyWorkList.h"
#include "GCThreadSharedData.h"
#include "JSCell.h"
+#include "JSCellInlines.h"
#include "JSObject.h"
#include <wtf/Threading.h>
diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
index 85917a512..2b5a23c24 100644
--- a/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
@@ -118,7 +118,7 @@ const FunctionCode = 2
const LLIntReturnPC = ArgumentCount + TagOffset
# String flags.
-const HashFlags8BitBuffer = 32
+const HashFlags8BitBuffer = 64
# Copied from PropertyOffset.h
const firstOutOfLineOffset = 100
diff --git a/Source/JavaScriptCore/runtime/FunctionExecutableDump.cpp b/Source/JavaScriptCore/runtime/FunctionExecutableDump.cpp
index 1577ed57a..f4ba3e98c 100644
--- a/Source/JavaScriptCore/runtime/FunctionExecutableDump.cpp
+++ b/Source/JavaScriptCore/runtime/FunctionExecutableDump.cpp
@@ -24,6 +24,7 @@
*/
#include "config.h"
+#include "JSCellInlines.h"
#include "FunctionExecutableDump.h"
namespace JSC {
diff --git a/Source/JavaScriptCore/runtime/JSCellInlines.h b/Source/JavaScriptCore/runtime/JSCellInlines.h
index 5312cae35..1b2d13ada 100644
--- a/Source/JavaScriptCore/runtime/JSCellInlines.h
+++ b/Source/JavaScriptCore/runtime/JSCellInlines.h
@@ -32,6 +32,7 @@
#include "JSObject.h"
#include "JSString.h"
#include "Structure.h"
+#include "StructureInlines.h"
namespace JSC {
diff --git a/Source/JavaScriptCore/runtime/StructureInlines.h b/Source/JavaScriptCore/runtime/StructureInlines.h
index 75ca40dd7..8407ca791 100644
--- a/Source/JavaScriptCore/runtime/StructureInlines.h
+++ b/Source/JavaScriptCore/runtime/StructureInlines.h
@@ -26,6 +26,7 @@
#ifndef StructureInlines_h
#define StructureInlines_h
+#include "JSGlobalObject.h"
#include "PropertyMapHashTable.h"
#include "Structure.h"
diff --git a/Source/JavaScriptCore/runtime/SymbolTable.cpp b/Source/JavaScriptCore/runtime/SymbolTable.cpp
index 8c5a00b03..f70fb4e5b 100644
--- a/Source/JavaScriptCore/runtime/SymbolTable.cpp
+++ b/Source/JavaScriptCore/runtime/SymbolTable.cpp
@@ -27,6 +27,8 @@
*/
#include "config.h"
+#include "JSDestructibleObject.h"
+#include "JSCellInlines.h"
#include "SymbolTable.h"
namespace JSC {
diff --git a/Source/JavaScriptCore/tools/CodeProfiling.cpp b/Source/JavaScriptCore/tools/CodeProfiling.cpp
index 740595e3e..f545be903 100644
--- a/Source/JavaScriptCore/tools/CodeProfiling.cpp
+++ b/Source/JavaScriptCore/tools/CodeProfiling.cpp
@@ -48,7 +48,7 @@ WTF::MetaAllocatorTracker* CodeProfiling::s_tracker = 0;
#pragma clang diagnostic ignored "-Wmissing-noreturn"
#endif
-#if (PLATFORM(MAC) && CPU(X86_64)) || (OS(LINUX) && CPU(X86))
+#if (PLATFORM(MAC) && CPU(X86_64)) || (OS(LINUX) && CPU(X86) && !OS(ANDROID))
// Helper function to start & stop the timer.
// Presently we're using the wall-clock timer, since this seems to give the best results.
static void setProfileTimer(unsigned usec)
@@ -73,7 +73,7 @@ static void profilingTimer(int, siginfo_t*, void* uap)
CodeProfiling::sample(reinterpret_cast<void*>(context->__ss.__rip),
reinterpret_cast<void**>(context->__ss.__rbp));
}
-#elif OS(LINUX) && CPU(X86)
+#elif OS(LINUX) && CPU(X86) && !OS(ANDROID)
static void profilingTimer(int, siginfo_t*, void* uap)
{
mcontext_t context = static_cast<ucontext_t*>(uap)->uc_mcontext;
@@ -143,7 +143,7 @@ void CodeProfiling::begin(const SourceCode& source)
if (alreadyProfiling)
return;
-#if (PLATFORM(MAC) && CPU(X86_64)) || (OS(LINUX) && CPU(X86))
+#if (PLATFORM(MAC) && CPU(X86_64)) || (OS(LINUX) && CPU(X86) && !OS(ANDROID))
// Regsiter a signal handler & itimer.
struct sigaction action;
action.sa_sigaction = reinterpret_cast<void (*)(int, siginfo_t *, void *)>(profilingTimer);
@@ -167,7 +167,7 @@ void CodeProfiling::end()
if (s_profileStack)
return;
-#if (PLATFORM(MAC) && CPU(X86_64)) || (OS(LINUX) && CPU(X86))
+#if (PLATFORM(MAC) && CPU(X86_64)) || (OS(LINUX) && CPU(X86) && !OS(ANDROID))
// Stop profiling
setProfileTimer(0);
#endif
diff --git a/Source/WTF/WTF.pri b/Source/WTF/WTF.pri
index 6055540bc..2697d7720 100644
--- a/Source/WTF/WTF.pri
+++ b/Source/WTF/WTF.pri
@@ -16,13 +16,13 @@ mac {
} else {
contains(QT_CONFIG,icu) {
win32: LIBS += -licuin -licuuc -licudt
+ else:android: LIBS += -licui18n -licuuc
else: LIBS += -licui18n -licuuc -licudata
}
}
-linux-*:use?(GSTREAMER) {
- DEFINES += WTF_USE_GLIB=1
- PKGCONFIG += glib-2.0 gio-2.0
+use?(GLIB) {
+ PKGCONFIG *= glib-2.0 gio-2.0
}
win32-* {
diff --git a/Source/WTF/WTF.pro b/Source/WTF/WTF.pro
index 2187e6dfe..f3a77dd06 100644
--- a/Source/WTF/WTF.pro
+++ b/Source/WTF/WTF.pro
@@ -187,7 +187,6 @@ SOURCES += \
ArrayBuffer.cpp \
ArrayBufferView.cpp \
Assertions.cpp \
- Atomics.cpp \
BitVector.cpp \
CryptographicallyRandomNumber.cpp \
CurrentTime.cpp \
diff --git a/Source/WTF/config.h b/Source/WTF/config.h
index 5552be3ee..175b29c7c 100644
--- a/Source/WTF/config.h
+++ b/Source/WTF/config.h
@@ -31,15 +31,6 @@
#include <wtf/ExportMacros.h>
#if OS(WINDOWS)
-
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0502
-#endif
-
-#ifndef WINVER
-#define WINVER 0x0502
-#endif
-
// If we don't define these, they get defined in windef.h.
// We want to use std::min and std::max
#define max max
diff --git a/Source/WTF/wtf/Assertions.cpp b/Source/WTF/wtf/Assertions.cpp
index f462a3ffd..1b2091f53 100644
--- a/Source/WTF/wtf/Assertions.cpp
+++ b/Source/WTF/wtf/Assertions.cpp
@@ -61,12 +61,16 @@
#include <windows.h>
#endif
-#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
+#if (OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))) && !OS(ANDROID)
#include <cxxabi.h>
#include <dlfcn.h>
#include <execinfo.h>
#endif
+#if HAVE(ANDROID_SDK)
+#include <android/log.h>
+#endif
+
#if PLATFORM(BLACKBERRY)
#include <BlackBerryPlatformLog.h>
#endif
@@ -115,6 +119,8 @@ static void vprintf_stderr_common(const char* format, va_list args)
#elif PLATFORM(BLACKBERRY)
BBLOGV(BlackBerry::Platform::LogLevelCritical, format, args);
+#elif HAVE(ANDROID_SDK)
+ __android_log_vprint(ANDROID_LOG_WARN, "WebKit", format, args);
#elif HAVE(ISDEBUGGERPRESENT)
if (IsDebuggerPresent()) {
size_t size = 1024;
@@ -239,7 +245,7 @@ void WTFReportArgumentAssertionFailure(const char* file, int line, const char* f
void WTFGetBacktrace(void** stack, int* size)
{
-#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
+#if (OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))) && !OS(ANDROID)
*size = backtrace(stack, *size);
#elif OS(WINDOWS) && !OS(WINCE)
// The CaptureStackBackTrace function is available in XP, but it is not defined
@@ -278,7 +284,7 @@ void WTFReportBacktrace()
# if defined(__GLIBC__) && !defined(__UCLIBC__)
# define WTF_USE_BACKTRACE_SYMBOLS 1
# endif
-# else
+# elif !OS(ANDROID)
# define WTF_USE_DLADDR 1
# endif
#endif
diff --git a/Source/WTF/wtf/Atomics.cpp b/Source/WTF/wtf/Atomics.cpp
deleted file mode 100644
index 0feea1532..000000000
--- a/Source/WTF/wtf/Atomics.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (C) 2007, 2008, 2010, 2012 Apple Inc. All rights reserved.
- * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com)
- *
- * 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE 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 APPLE 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.
- *
- *
- * Note: The implementations of InterlockedIncrement and InterlockedDecrement are based
- * on atomic_increment and atomic_exchange_and_add from the Boost C++ Library. The license
- * is virtually identical to the Apple license above but is included here for completeness.
- *
- * Boost Software License - Version 1.0 - August 17th, 2003
- *
- * Permission is hereby granted, free of charge, to any person or organization
- * obtaining a copy of the software and accompanying documentation covered by
- * this license (the "Software") to use, reproduce, display, distribute,
- * execute, and transmit the Software, and to prepare derivative works of the
- * Software, and to permit third-parties to whom the Software is furnished to
- * do so, all subject to the following:
- *
- * The copyright notices in the Software and this entire statement, including
- * the above license grant, this restriction and the following disclaimer,
- * must be included in all copies of the Software, in whole or in part, and
- * all derivative works of the Software, unless such copies or derivative
- * works are solely in the form of machine-executable object code generated by
- * a source language processor.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
- * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#include "config.h"
-#include "Atomics.h"
-
-// Some architectures, like MIPS32, don't have GCC implementation for builtin __sync_* functions
-// with 64 bits variable size. Official GCC answer for the problem: If a target doesn't support
-// atomic operations on certain variable sizes, you are out of luck with atomicity in that case
-// (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56296). GCC >= 4.8 will support __atomic_* builtin
-// functions for this purpose for all the GCC targets, but for current compilers we have to include
-// our own implementation.
-#if COMPILER(GCC) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) && USE(LOCKFREE_THREADSAFEREFCOUNTED) && USE(PTHREADS)
-
-#include "ThreadingPrimitives.h"
-
-namespace WTF {
-
-static const size_t kSwapLockCount = 32;
-static Mutex s_swapLocks[kSwapLockCount];
-
-static inline Mutex& getSwapLock(const volatile int64_t* addr)
-{
- return s_swapLocks[(reinterpret_cast<intptr_t>(addr) >> 3U) % kSwapLockCount];
-}
-
-static int64_t atomicStep(int64_t volatile* addend, int64_t step)
-{
- Mutex& mutex = getSwapLock(addend);
-
- mutex.lock();
- int64_t value = *addend + step;
- *addend = value;
- mutex.unlock();
-
- return value;
-}
-
-extern "C" {
-
-int64_t __sync_add_and_fetch_8(int64_t volatile* addend, int64_t value)
-{
- return atomicStep(addend, value);
-}
-
-int64_t __sync_sub_and_fetch_8(int64_t volatile* addend, int64_t value)
-{
- return atomicStep(addend, -value);
-}
-
-} // extern "C"
-
-} // namespace WTF
-
-#endif
diff --git a/Source/WTF/wtf/Atomics.h b/Source/WTF/wtf/Atomics.h
index d7b1597a5..ea4f55f95 100644
--- a/Source/WTF/wtf/Atomics.h
+++ b/Source/WTF/wtf/Atomics.h
@@ -72,28 +72,22 @@ extern "C" void _ReadWriteBarrier(void);
#include <windows.h>
#elif OS(QNX)
#include <atomic.h>
+#elif OS(ANDROID)
+#include <sys/atomics.h>
#endif
namespace WTF {
+// 32bit atomicIncrement/atomicDecrement
#if OS(WINDOWS)
#define WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED 1
-#if OS(WINCE)
-inline int atomicIncrement(int* addend) { return InterlockedIncrement(reinterpret_cast<long*>(addend)); }
-inline int atomicDecrement(int* addend) { return InterlockedDecrement(reinterpret_cast<long*>(addend)); }
-#elif COMPILER(MINGW)
+#if OS(WINCE) || COMPILER(MINGW)
inline int atomicIncrement(int* addend) { return InterlockedIncrement(reinterpret_cast<long*>(addend)); }
inline int atomicDecrement(int* addend) { return InterlockedDecrement(reinterpret_cast<long*>(addend)); }
-
-inline int64_t atomicIncrement(int64_t* addend) { return InterlockedIncrement64(reinterpret_cast<long long*>(addend)); }
-inline int64_t atomicDecrement(int64_t* addend) { return InterlockedDecrement64(reinterpret_cast<long long*>(addend)); }
#else
inline int atomicIncrement(int volatile* addend) { return InterlockedIncrement(reinterpret_cast<long volatile*>(addend)); }
inline int atomicDecrement(int volatile* addend) { return InterlockedDecrement(reinterpret_cast<long volatile*>(addend)); }
-
-inline int64_t atomicIncrement(int64_t volatile* addend) { return InterlockedIncrement64(reinterpret_cast<long long volatile*>(addend)); }
-inline int64_t atomicDecrement(int64_t volatile* addend) { return InterlockedDecrement64(reinterpret_cast<long long volatile*>(addend)); }
#endif
#elif OS(QNX)
@@ -103,16 +97,35 @@ inline int64_t atomicDecrement(int64_t volatile* addend) { return InterlockedDec
inline int atomicIncrement(int volatile* addend) { return static_cast<int>(atomic_add_value(reinterpret_cast<unsigned volatile*>(addend), 1)) + 1; }
inline int atomicDecrement(int volatile* addend) { return static_cast<int>(atomic_sub_value(reinterpret_cast<unsigned volatile*>(addend), 1)) - 1; }
-#elif COMPILER(GCC) && !CPU(SPARC64) // sizeof(_Atomic_word) != sizeof(int) on sparc64 gcc
+#elif OS(ANDROID)
+#define WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED 1
+
+// Note, __atomic_{inc, dec}() return the previous value of addend's content.
+inline int atomicIncrement(int volatile* addend) { return __atomic_inc(addend) + 1; }
+inline int atomicDecrement(int volatile* addend) { return __atomic_dec(addend) - 1; }
+
+inline int64_t atomicIncrement(int64_t volatile* addend) { return __sync_add_and_fetch(addend, 1); }
+inline int64_t atomicDecrement(int64_t volatile* addend) { return __sync_sub_and_fetch(addend, 1); }
+
+#elif COMPILER(GCC)
#define WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED 1
inline int atomicIncrement(int volatile* addend) { return __sync_add_and_fetch(addend, 1); }
inline int atomicDecrement(int volatile* addend) { return __sync_sub_and_fetch(addend, 1); }
+#endif
+
+// 64bit atomicIncrement/atomicDecrement
+#if HAVE(ATOMICS_64BIT)
+#if COMPILER(GCC)
inline int64_t atomicIncrement(int64_t volatile* addend) { return __sync_add_and_fetch(addend, 1); }
inline int64_t atomicDecrement(int64_t volatile* addend) { return __sync_sub_and_fetch(addend, 1); }
-
+#elif OS(WINDOWS)
+inline int64_t atomicIncrement(int64_t volatile* addend) { return InterlockedIncrement64(reinterpret_cast<long long volatile*>(addend)); }
+inline int64_t atomicDecrement(int64_t volatile* addend) { return InterlockedDecrement64(reinterpret_cast<long long volatile*>(addend)); }
#endif
+#endif
+
#if OS(WINDOWS)
inline bool weakCompareAndSwap(volatile unsigned* location, unsigned expected, unsigned newValue)
diff --git a/Source/WTF/wtf/CurrentTime.cpp b/Source/WTF/wtf/CurrentTime.cpp
index 627d25573..e7326df04 100644
--- a/Source/WTF/wtf/CurrentTime.cpp
+++ b/Source/WTF/wtf/CurrentTime.cpp
@@ -55,7 +55,7 @@
#include <sys/time.h>
#endif
-#if USE(GLIB) && !PLATFORM(EFL)
+#if USE(GLIB) && !PLATFORM(EFL) && !PLATFORM(QT)
#include <glib.h>
#endif
@@ -222,7 +222,7 @@ double currentTime()
#endif // USE(QUERY_PERFORMANCE_COUNTER)
-#elif USE(GLIB) && !PLATFORM(EFL)
+#elif USE(GLIB) && !PLATFORM(EFL) && !PLATFORM(QT)
// Note: GTK on Windows will pick up the PLATFORM(WIN) implementation above which provides
// better accuracy compared with Windows implementation of g_get_current_time:
diff --git a/Source/WTF/wtf/MathExtras.h b/Source/WTF/wtf/MathExtras.h
index ce72c4aed..f07bce6a3 100644
--- a/Source/WTF/wtf/MathExtras.h
+++ b/Source/WTF/wtf/MathExtras.h
@@ -151,17 +151,17 @@ inline double trunc(double num) { return num > 0 ? floor(num) : ceil(num); }
inline long long abs(long num) { return labs(num); }
#endif
-#if COMPILER(MSVC)
-// MSVC's math.h does not currently supply log2 or log2f.
+#if OS(ANDROID) || COMPILER(MSVC)
+// ANDROID and MSVC's math.h does not currently supply log2 or log2f.
inline double log2(double num)
{
- // This constant is roughly M_LN2, which is not provided by default on Windows.
+ // This constant is roughly M_LN2, which is not provided by default on Windows and Android.
return log(num) / 0.693147180559945309417232121458176568;
}
inline float log2f(float num)
{
- // This constant is roughly M_LN2, which is not provided by default on Windows.
+ // This constant is roughly M_LN2, which is not provided by default on Windows and Android.
return logf(num) / 0.693147180559945309417232121458176568f;
}
#endif
diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
index d61c20383..3a9b509f2 100644
--- a/Source/WTF/wtf/Platform.h
+++ b/Source/WTF/wtf/Platform.h
@@ -186,7 +186,8 @@
#elif !defined(__ARM_EABI__) \
&& !defined(__EABI__) \
&& !defined(__VFP_FP__) \
- && !defined(_WIN32_WCE)
+ && !defined(_WIN32_WCE) \
+ && !defined(ANDROID)
#define WTF_CPU_MIDDLE_ENDIAN 1
#endif
@@ -328,6 +329,15 @@
/* ==== OS() - underlying operating system; only to be used for mandated low-level services like
virtual memory, not to choose a GUI toolkit ==== */
+/* OS(ANDROID) - Android */
+#ifdef ANDROID
+#define WTF_OS_ANDROID 1
+#endif
+
+#if OS(ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#define WTF_HAVE_ANDROID_SDK 1
+#endif
+
/* OS(AIX) - AIX */
#ifdef _AIX
#define WTF_OS_AIX 1
@@ -414,7 +424,8 @@
#define WTF_OS_MAC ERROR "USE MAC_OS_X WITH OS NOT MAC"
/* OS(UNIX) - Any Unix-like system */
-#if OS(AIX) \
+#if OS(AIX) \
+ || OS(ANDROID) \
|| OS(DARWIN) \
|| OS(FREEBSD) \
|| OS(HURD) \
@@ -429,6 +440,33 @@
#define WTF_OS_UNIX 1
#endif
+#if OS(WINDOWS)
+// Minimum supported windows is Windows XP.
+// The original WinXP was NT 5.1, but Win XP 64bit was NT 5.2
+#if CPU(X86_64)
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0502
+#endif
+
+#ifndef WINVER
+#define WINVER 0x0502
+#endif
+
+#else /* !CPU(X86_64) */
+
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#endif
+
+#ifndef WINVER
+#define WINVER 0x0501
+#endif
+
+#endif
+
+#endif
+
+
/* Operating environments */
/* FIXME: these are all mixes of OS, operating environment and policy choices. */
@@ -579,7 +617,7 @@
#define WTF_USE_PTHREADS 1
#endif /* OS(UNIX) */
-#if OS(UNIX) && !OS(QNX)
+#if OS(UNIX) && !OS(ANDROID) && !OS(QNX)
#define HAVE_LANGINFO_H 1
#endif
@@ -599,7 +637,7 @@
#endif
#endif
-#if !OS(WINDOWS) && !OS(SOLARIS)
+#if !OS(WINDOWS) && !OS(SOLARIS) && !OS(ANDROID)
#define HAVE_TM_GMTOFF 1
#define HAVE_TM_ZONE 1
#define HAVE_TIMEGM 1
@@ -1009,6 +1047,11 @@
#define WTF_USE_CONTENT_FILTERING 1
#endif
+#if COMPILER(GCC) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8)
+#define HAVE_ATOMICS_64BIT 1
+#elif OS(WINDOWS) && (_WIN32_WINNT >= 0x0502)
+#define HAVE_ATOMICS_64BIT 1
+#endif
#define WTF_USE_GRAMMAR_CHECKING 1
diff --git a/Source/WTF/wtf/ThreadIdentifierDataPthreads.cpp b/Source/WTF/wtf/ThreadIdentifierDataPthreads.cpp
index bd62288f8..4ad20c8bc 100644
--- a/Source/WTF/wtf/ThreadIdentifierDataPthreads.cpp
+++ b/Source/WTF/wtf/ThreadIdentifierDataPthreads.cpp
@@ -36,7 +36,7 @@
#include "Threading.h"
-#if OS(HURD)
+#if OS(ANDROID) || OS(HURD)
// PTHREAD_KEYS_MAX is not defined in bionic nor in Hurd, so explicitly define it here.
#define PTHREAD_KEYS_MAX 1024
#else
diff --git a/Source/WebCore/Target.pri b/Source/WebCore/Target.pri
index a2f22d4a9..e2044bcaa 100644
--- a/Source/WebCore/Target.pri
+++ b/Source/WebCore/Target.pri
@@ -158,7 +158,6 @@ SOURCES += \
bindings/js/JSMessageChannelCustom.cpp \
bindings/js/JSMessageEventCustom.cpp \
bindings/js/JSMessagePortCustom.cpp \
- bindings/js/JSMessagePortCustom.h \
bindings/js/JSMicroDataItemValueCustom.cpp \
bindings/js/JSMutationCallback.cpp \
bindings/js/JSMutationObserverCustom.cpp \
@@ -1365,6 +1364,7 @@ HEADERS += \
bindings/js/JSHTMLSelectElementCustom.h \
bindings/js/JSImageConstructor.h \
bindings/js/JSLazyEventListener.h \
+ bindings/js/JSMessagePortCustom.h \
bindings/js/JSMutationCallback.h \
bindings/js/JSNodeCustom.h \
bindings/js/JSNodeFilterCondition.h \
@@ -3335,9 +3335,11 @@ enable?(VIDEO) {
use?(NATIVE_FULLSCREEN_VIDEO) {
HEADERS += \
+ platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.h \
platform/graphics/gstreamer/PlatformVideoWindow.h \
platform/graphics/gstreamer/PlatformVideoWindowPrivate.h
SOURCES += \
+ platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.cpp \
platform/graphics/gstreamer/PlatformVideoWindowQt.cpp
}
@@ -4269,7 +4271,6 @@ enable?(opencl) {
use?(GRAPHICS_SURFACE) {
mac {
SOURCES += platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp
- INCLUDEPATH += /System/Library/Frameworks/CoreFoundation.framework/Headers
}
win32 {
SOURCES += platform/graphics/surfaces/win/GraphicsSurfaceWin.cpp
@@ -4297,16 +4298,11 @@ ALL_IN_ONE_SOURCES += \
rendering/style/StyleAllInOne.cpp \
html/HTMLElementsAllInOne.cpp \
editing/EditingAllInOne.cpp \
- rendering/RenderingAllInOne.cpp
-
-enable?(XSLT):use?(LIBXML2) {
- ALL_IN_ONE_SOURCES += \
- dom/DOMAllInOne.cpp
-}
-
-# These do not compile at the moment:
-# css/MediaAllInOne.cpp
-# css/CSSAllInOne.cpp
+ rendering/RenderingAllInOne.cpp \
+ css/CSSAllInOne.cpp \
+ css/MediaAllInOne.cpp \
+ dom/DOMAllInOne.cpp \
+ bindings/js/JSBindingsAllInOne.cpp
# Make sure the derived sources are built
include(DerivedSources.pri)
diff --git a/Source/WebCore/WebCore.pri b/Source/WebCore/WebCore.pri
index d3aa6fd03..28dae593a 100644
--- a/Source/WebCore/WebCore.pri
+++ b/Source/WebCore/WebCore.pri
@@ -165,17 +165,19 @@ enable?(GAMEPAD) {
INCLUDEPATH += \
$$SOURCE_DIR/platform/linux \
$$SOURCE_DIR/Modules/gamepad
- PKGCONFIG += libudev
+}
+
+use?(GLIB) {
+ PKGCONFIG *= glib-2.0 gio-2.0
}
use?(GSTREAMER) {
- DEFINES += WTF_USE_GLIB=1
use?(GSTREAMER010) {
- PKGCONFIG += glib-2.0 gio-2.0 gstreamer-0.10 gstreamer-app-0.10 gstreamer-base-0.10 gstreamer-interfaces-0.10 gstreamer-pbutils-0.10 gstreamer-plugins-base-0.10 gstreamer-video-0.10
+ PKGCONFIG += gstreamer-0.10 gstreamer-app-0.10 gstreamer-base-0.10 gstreamer-interfaces-0.10 gstreamer-pbutils-0.10 gstreamer-plugins-base-0.10 gstreamer-video-0.10
} else {
DEFINES += GST_API_VERSION=1.0
DEFINES += GST_API_VERSION_1
- PKGCONFIG += glib-2.0 gio-2.0 gstreamer-1.0 gstreamer-app-1.0 gstreamer-base-1.0 gstreamer-pbutils-1.0 gstreamer-plugins-base-1.0 gstreamer-video-1.0 gstreamer-audio-1.0
+ PKGCONFIG += gstreamer-1.0 gstreamer-app-1.0 gstreamer-base-1.0 gstreamer-pbutils-1.0 gstreamer-plugins-base-1.0 gstreamer-video-1.0 gstreamer-audio-1.0
}
}
diff --git a/Source/WebCore/WebCorePrefix.h b/Source/WebCore/WebCorePrefix.h
index 543f50f61..575687226 100644
--- a/Source/WebCore/WebCorePrefix.h
+++ b/Source/WebCore/WebCorePrefix.h
@@ -38,15 +38,6 @@
#endif
#if OS(WINDOWS)
-
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0502
-#endif
-
-#ifndef WINVER
-#define WINVER 0x0502
-#endif
-
#if !USE(CURL)
#ifndef _WINSOCKAPI_
#define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h
diff --git a/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp b/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
index 4fa266cd8..1bf53ab8c 100644
--- a/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
+++ b/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
@@ -53,7 +53,6 @@ bool RuntimeEnabledFeatures::isTouchEnabled = true;
bool RuntimeEnabledFeatures::isDeviceMotionEnabled = true;
bool RuntimeEnabledFeatures::isDeviceOrientationEnabled = true;
bool RuntimeEnabledFeatures::isSpeechInputEnabled = true;
-bool RuntimeEnabledFeatures::isCanvasPathEnabled = false;
bool RuntimeEnabledFeatures::isCSSExclusionsEnabled = true;
bool RuntimeEnabledFeatures::isCSSShapesEnabled = true;
bool RuntimeEnabledFeatures::isCSSRegionsEnabled = false;
@@ -73,10 +72,6 @@ bool RuntimeEnabledFeatures::isPeerConnectionEnabled = true;
bool RuntimeEnabledFeatures::isLegacyCSSVendorPrefixesEnabled = false;
#endif
-#if ENABLE(GAMEPAD)
-bool RuntimeEnabledFeatures::isGamepadEnabled = false;
-#endif
-
#if ENABLE(FILE_SYSTEM)
bool RuntimeEnabledFeatures::isFileSystemEnabled = false;
@@ -153,30 +148,6 @@ bool RuntimeEnabledFeatures::webSocketEnabled()
}
#endif
-#if ENABLE(SQL_DATABASE)
-bool RuntimeEnabledFeatures::openDatabaseEnabled()
-{
- return DatabaseManager::manager().isAvailable();
-}
-
-bool RuntimeEnabledFeatures::openDatabaseSyncEnabled()
-{
- return DatabaseManager::manager().isAvailable();
-}
-#endif
-
-#if ENABLE(QUOTA)
-bool RuntimeEnabledFeatures::isQuotaEnabled = false;
-#endif
-
-#if ENABLE(FULLSCREEN_API)
-bool RuntimeEnabledFeatures::isFullScreenAPIEnabled = true;
-#endif
-
-#if ENABLE(MEDIA_SOURCE)
-bool RuntimeEnabledFeatures::isMediaSourceEnabled = false;
-#endif
-
#if ENABLE(VIDEO_TRACK)
#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(BLACKBERRY) || PLATFORM(WIN) || PLATFORM(QT)
bool RuntimeEnabledFeatures::isVideoTrackEnabled = true;
@@ -185,10 +156,6 @@ bool RuntimeEnabledFeatures::isMediaSourceEnabled = false;
#endif
#endif
-#if ENABLE(ENCRYPTED_MEDIA)
-bool RuntimeEnabledFeatures::isEncryptedMediaEnabled = false;
-#endif
-
#if ENABLE(SHADOW_DOM)
bool RuntimeEnabledFeatures::isShadowDOMEnabled = false;
diff --git a/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h b/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h
index be92f7935..825458c4c 100644
--- a/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h
+++ b/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h
@@ -63,14 +63,6 @@ public:
static bool webkitIndexedDBEnabled() { return isIndexedDBEnabled; }
static bool indexedDBEnabled() { return isIndexedDBEnabled; }
-#if ENABLE(CANVAS_PATH)
- static void setCanvasPathEnabled(bool isEnabled) { isCanvasPathEnabled = isEnabled; }
- static bool canvasPathEnabled() { return isCanvasPathEnabled; }
-#else
- static void setCanvasPathEnabled(bool) { }
- static bool canvasPathEnabled() { return false; }
-#endif
-
#if ENABLE(CSS_EXCLUSIONS)
static void setCSSExclusionsEnabled(bool isEnabled) { isCSSExclusionsEnabled = isEnabled; }
static bool cssExclusionsEnabled() { return isCSSExclusionsEnabled; }
@@ -106,23 +98,6 @@ public:
static bool fontLoadEventsEnabled() { return false; }
#endif
-#if ENABLE(FULLSCREEN_API)
- // Mozilla version
- static bool webkitFullScreenAPIEnabled() { return isFullScreenAPIEnabled; }
- static void setWebkitFullScreenAPIEnabled(bool isEnabled) { isFullScreenAPIEnabled = isEnabled; }
- static bool webkitRequestFullScreenEnabled() { return isFullScreenAPIEnabled; }
- static bool webkitIsFullScreenEnabled() { return isFullScreenAPIEnabled; }
- static bool webkitFullScreenKeyboardInputAllowedEnabled() { return isFullScreenAPIEnabled; }
- static bool webkitCurrentFullScreenElementEnabled() { return isFullScreenAPIEnabled; }
- static bool webkitCancelFullScreenEnabled() { return isFullScreenAPIEnabled; }
-
- // W3C version
- static bool webkitFullscreenEnabledEnabled() { return isFullScreenAPIEnabled; }
- static bool webkitFullscreenElementEnabled() { return isFullScreenAPIEnabled; }
- static bool webkitExitFullscreenEnabled() { return isFullScreenAPIEnabled; }
- static bool webkitRequestFullscreenEnabled() { return isFullScreenAPIEnabled; }
-#endif
-
#if ENABLE(VIDEO)
static bool audioEnabled();
static bool htmlMediaElementEnabled();
@@ -142,11 +117,6 @@ public:
static bool webSocketEnabled();
#endif
-#if ENABLE(SQL_DATABASE)
- static bool openDatabaseEnabled();
- static bool openDatabaseSyncEnabled();
-#endif
-
#if ENABLE(TOUCH_EVENTS)
static bool touchEnabled() { return isTouchEnabled; }
static void setTouchEnabled(bool isEnabled) { isTouchEnabled = isEnabled; }
@@ -203,26 +173,6 @@ public:
static bool legacyCSSVendorPrefixesEnabled() { return isLegacyCSSVendorPrefixesEnabled; }
#endif
-#if ENABLE(GAMEPAD)
- static void setWebkitGetGamepadsEnabled(bool isEnabled) { isGamepadEnabled = isEnabled; }
- static bool webkitGetGamepadsEnabled() { return isGamepadEnabled; }
-#endif
-
-#if ENABLE(QUOTA)
- static bool quotaEnabled() { return isQuotaEnabled; }
- static void setQuotaEnabled(bool isEnabled) { isQuotaEnabled = isEnabled; }
-#endif
-
-#if ENABLE(MEDIA_SOURCE)
- static bool mediaSourceEnabled() { return isMediaSourceEnabled; }
- static void setMediaSourceEnabled(bool isEnabled) { isMediaSourceEnabled = isEnabled; }
-#endif
-
-#if ENABLE(ENCRYPTED_MEDIA)
- static bool encryptedMediaEnabled() { return isEncryptedMediaEnabled; }
- static void setEncryptedMediaEnabled(bool isEnabled) { isEncryptedMediaEnabled = isEnabled; }
-#endif
-
#if ENABLE(VIDEO_TRACK)
static bool webkitVideoTrackEnabled() { return isVideoTrackEnabled; }
static void setWebkitVideoTrackEnabled(bool isEnabled) { isVideoTrackEnabled = isEnabled; }
@@ -310,7 +260,6 @@ private:
static bool isDeviceMotionEnabled;
static bool isDeviceOrientationEnabled;
static bool isSpeechInputEnabled;
- static bool isCanvasPathEnabled;
static bool isCSSExclusionsEnabled;
static bool isCSSShapesEnabled;
static bool isCSSRegionsEnabled;
@@ -332,30 +281,10 @@ private:
static bool isPeerConnectionEnabled;
#endif
-#if ENABLE(GAMEPAD)
- static bool isGamepadEnabled;
-#endif
-
#if ENABLE(LEGACY_CSS_VENDOR_PREFIXES)
static bool isLegacyCSSVendorPrefixesEnabled;
#endif
-#if ENABLE(QUOTA)
- static bool isQuotaEnabled;
-#endif
-
-#if ENABLE(FULLSCREEN_API)
- static bool isFullScreenAPIEnabled;
-#endif
-
-#if ENABLE(MEDIA_SOURCE)
- static bool isMediaSourceEnabled;
-#endif
-
-#if ENABLE(ENCRYPTED_MEDIA)
- static bool isEncryptedMediaEnabled;
-#endif
-
#if ENABLE(VIDEO_TRACK)
static bool isVideoTrackEnabled;
#endif
diff --git a/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp b/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp
index 3edbebffa..c10fcd545 100644
--- a/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp
+++ b/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp
@@ -113,7 +113,6 @@
#include "JSMediaListCustom.cpp"
#include "JSMessageChannelCustom.cpp"
#include "JSMessageEventCustom.cpp"
-#include "JSMessagePortCustom.cpp"
#include "JSMicroDataItemValueCustom.cpp"
#include "JSMutationCallback.cpp"
#include "JSMutationObserverCustom.cpp"
@@ -159,11 +158,9 @@
#include "JSXPathResultCustom.cpp"
#include "JSXSLTProcessorCustom.cpp"
#include "JavaScriptCallFrame.cpp"
-#include "PageScriptDebugServer.cpp"
#include "ScheduledAction.cpp"
#include "ScriptCachedFrameData.cpp"
#include "ScriptCallStackFactory.cpp"
-#include "ScriptController.cpp"
#include "ScriptDebugServer.cpp"
#include "ScriptEventListener.cpp"
#include "ScriptFunctionCall.cpp"
diff --git a/Source/WebCore/config.h b/Source/WebCore/config.h
index 30bed8e6a..d0be35d94 100644
--- a/Source/WebCore/config.h
+++ b/Source/WebCore/config.h
@@ -47,15 +47,6 @@
#endif /* __APPLE__ */
#if OS(WINDOWS)
-
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0502
-#endif
-
-#ifndef WINVER
-#define WINVER 0x0502
-#endif
-
// If we don't define these, they get defined in windef.h.
// We want to use std::min and std::max.
#ifndef max
diff --git a/Source/WebCore/css/MediaAllInOne.cpp b/Source/WebCore/css/MediaAllInOne.cpp
index 3c71b8215..fb8748c12 100644
--- a/Source/WebCore/css/MediaAllInOne.cpp
+++ b/Source/WebCore/css/MediaAllInOne.cpp
@@ -25,7 +25,6 @@
// This all-in-one cpp file cuts down on template bloat to allow us to build our Windows release build.
-#include "MediaFeatureNames.cpp"
#include "MediaList.cpp"
#include "MediaQuery.cpp"
#include "MediaQueryEvaluator.cpp"
diff --git a/Source/WebCore/dom/DOMAllInOne.cpp b/Source/WebCore/dom/DOMAllInOne.cpp
index cd52fdf03..90a8e2cdb 100644
--- a/Source/WebCore/dom/DOMAllInOne.cpp
+++ b/Source/WebCore/dom/DOMAllInOne.cpp
@@ -139,7 +139,9 @@
#include "Touch.cpp"
#include "TouchEvent.cpp"
#include "TouchList.cpp"
+#if ENABLE(XSLT) && USE(LIBXML2)
#include "TransformSourceLibxslt.cpp"
+#endif
#include "TransitionEvent.cpp"
#include "Traversal.cpp"
#include "TreeScope.cpp"
@@ -158,5 +160,6 @@
#include "WheelEvent.cpp"
#include "WindowEventContext.cpp"
#include "XMLDocumentParser.cpp"
+#if USE(LIBXML2)
#include "XMLDocumentParserScope.cpp"
-
+#endif
diff --git a/Source/WebCore/dom/EventRetargeter.h b/Source/WebCore/dom/EventRetargeter.h
index 7d39ae137..2cc62742c 100644
--- a/Source/WebCore/dom/EventRetargeter.h
+++ b/Source/WebCore/dom/EventRetargeter.h
@@ -89,7 +89,8 @@ inline EventTarget* EventRetargeter::eventTargetRespectingTargetRules(Node* refe
// Spec: The event handling for the non-exposed tree works as if the referenced element had been textually included
// as a deeply cloned child of the 'use' element, except that events are dispatched to the SVGElementInstance objects
- Element* shadowHostElement = toShadowRoot(referenceNode->treeScope()->rootNode())->host();
+ Node* rootNode = referenceNode->treeScope()->rootNode();
+ Element* shadowHostElement = rootNode->isShadowRoot() ? toShadowRoot(rootNode)->host() : 0;
// At this time, SVG nodes are not supported in non-<use> shadow trees.
if (!shadowHostElement || !shadowHostElement->hasTagName(SVGNames::useTag))
return referenceNode;
diff --git a/Source/WebCore/html/HTMLAnchorElement.cpp b/Source/WebCore/html/HTMLAnchorElement.cpp
index b4c836414..6ef3a6ab6 100644
--- a/Source/WebCore/html/HTMLAnchorElement.cpp
+++ b/Source/WebCore/html/HTMLAnchorElement.cpp
@@ -511,7 +511,7 @@ bool HTMLAnchorElement::isLiveLink() const
void HTMLAnchorElement::sendPings(const KURL& destinationURL)
{
- if (!hasAttribute(pingAttr) || !document()->settings()->hyperlinkAuditingEnabled())
+ if (!hasAttribute(pingAttr) || !document()->settings() || !document()->settings()->hyperlinkAuditingEnabled())
return;
SpaceSplitString pingURLs(getAttribute(pingAttr), false);
diff --git a/Source/WebCore/html/canvas/CanvasStyle.cpp b/Source/WebCore/html/canvas/CanvasStyle.cpp
index 5fa11987b..ea9001b4f 100644
--- a/Source/WebCore/html/canvas/CanvasStyle.cpp
+++ b/Source/WebCore/html/canvas/CanvasStyle.cpp
@@ -238,13 +238,8 @@ CanvasStyle::CanvasStyle(const CanvasStyle& other)
CanvasStyle& CanvasStyle::operator=(const CanvasStyle& other)
{
if (this != &other) {
- memcpy(this, &other, sizeof(CanvasStyle));
- if (m_type == Gradient)
- m_gradient->ref();
- else if (m_type == ImagePattern)
- m_pattern->ref();
- else if (m_type == CMYKA)
- m_cmyka = new CMYKAValues(other.m_cmyka->rgba, other.m_cmyka->c, other.m_cmyka->m, other.m_cmyka->y, other.m_cmyka->k, other.m_cmyka->a);
+ this->~CanvasStyle();
+ new (this) CanvasStyle(other);
}
return *this;
}
diff --git a/Source/WebCore/page/ContextMenuController.cpp b/Source/WebCore/page/ContextMenuController.cpp
index a7152259a..ba6047766 100644
--- a/Source/WebCore/page/ContextMenuController.cpp
+++ b/Source/WebCore/page/ContextMenuController.cpp
@@ -739,7 +739,7 @@ static bool selectionContainsPossibleWord(Frame* frame)
#endif
#endif
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) || PLATFORM(QT)
#define SUPPORTS_TOGGLE_VIDEO_FULLSCREEN 1
#else
#define SUPPORTS_TOGGLE_VIDEO_FULLSCREEN 0
@@ -775,7 +775,7 @@ void ContextMenuController::populate()
ContextMenuItem CopyMediaLinkItem(ActionType, ContextMenuItemTagCopyMediaLinkToClipboard, String());
ContextMenuItem MediaPlayPause(ActionType, ContextMenuItemTagMediaPlayPause,
contextMenuItemTagMediaPlay());
- ContextMenuItem MediaMute(ActionType, ContextMenuItemTagMediaMute,
+ ContextMenuItem MediaMute(ActionType, ContextMenuItemTagMediaMute,
contextMenuItemTagMediaMute());
#if SUPPORTS_TOGGLE_SHOW_HIDE_MEDIA_CONTROLS
ContextMenuItem ToggleMediaControls(ActionType, ContextMenuItemTagToggleMediaControls,
@@ -1434,6 +1434,11 @@ void ContextMenuController::checkOrEnableIfNeeded(ContextMenuItem& item) const
item.setTitle(contextMenuItemTagMediaPlay());
break;
case ContextMenuItemTagMediaMute:
+ if (m_hitTestResult.mediaMuted())
+ item.setTitle(contextMenuItemTagMediaUnmute());
+ else
+ item.setTitle(contextMenuItemTagMediaMute());
+ break;
shouldEnable = m_hitTestResult.mediaHasAudio();
shouldCheck = shouldEnable && m_hitTestResult.mediaMuted();
break;
diff --git a/Source/WebCore/platform/LocalizedStrings.cpp b/Source/WebCore/platform/LocalizedStrings.cpp
index 0ebc8e824..faaa1b703 100644
--- a/Source/WebCore/platform/LocalizedStrings.cpp
+++ b/Source/WebCore/platform/LocalizedStrings.cpp
@@ -533,7 +533,12 @@ String contextMenuItemTagMediaMute()
{
return WEB_UI_STRING("Mute", "Media Mute context menu item");
}
-
+
+String contextMenuItemTagMediaUnmute()
+{
+ return WEB_UI_STRING("Unmute", "Media Unmute context menu item");
+}
+
String contextMenuItemTagInspectElement()
{
return WEB_UI_STRING("Inspect Element", "Inspect Element context menu item");
diff --git a/Source/WebCore/platform/LocalizedStrings.h b/Source/WebCore/platform/LocalizedStrings.h
index 43b611858..b1aa3f575 100644
--- a/Source/WebCore/platform/LocalizedStrings.h
+++ b/Source/WebCore/platform/LocalizedStrings.h
@@ -132,19 +132,25 @@ namespace WebCore {
#endif
String contextMenuItemTagOpenVideoInNewWindow();
String contextMenuItemTagOpenAudioInNewWindow();
+ String contextMenuItemTagOpenMediaInNewWindow();
String contextMenuItemTagDownloadVideoToDisk();
String contextMenuItemTagDownloadAudioToDisk();
+ String contextMenuItemTagDownloadMediaToDisk();
String contextMenuItemTagCopyVideoLinkToClipboard();
String contextMenuItemTagCopyAudioLinkToClipboard();
+ String contextMenuItemTagCopyMediaLinkToClipboard();
String contextMenuItemTagToggleMediaControls();
String contextMenuItemTagShowMediaControls();
String contextMenuItemTagHideMediaControls();
String contextMenuItemTagToggleMediaLoop();
String contextMenuItemTagEnterVideoFullscreen();
String contextMenuItemTagExitVideoFullscreen();
+ String contextMenuItemTagToggleVideoFullscreen();
+ String contextMenuItemTagMediaPlayPause();
String contextMenuItemTagMediaPlay();
String contextMenuItemTagMediaPause();
String contextMenuItemTagMediaMute();
+ String contextMenuItemTagMediaUnmute();
String contextMenuItemTagInspectElement();
#endif // ENABLE(CONTEXT_MENUS)
diff --git a/Source/WebCore/platform/graphics/gstreamer/PlatformVideoWindowPrivate.h b/Source/WebCore/platform/graphics/gstreamer/PlatformVideoWindowPrivate.h
index 972b522be..1346ea0eb 100644
--- a/Source/WebCore/platform/graphics/gstreamer/PlatformVideoWindowPrivate.h
+++ b/Source/WebCore/platform/graphics/gstreamer/PlatformVideoWindowPrivate.h
@@ -19,7 +19,8 @@
#ifndef PlatformVideoWindowPrivate_h
#define PlatformVideoWindowPrivate_h
-#if ENABLE(VIDEO) && USE(GSTREAMER) && USE(NATIVE_FULLSCREEN_VIDEO)
+// We do not use ENABLE or USE because moc does not expand these macros.
+#if defined(WTF_USE_GSTREAMER) && WTF_USE_GSTREAMER && defined(WTF_USE_NATIVE_FULLSCREEN_VIDEO) && WTF_USE_NATIVE_FULLSCREEN_VIDEO
#include <QEvent>
#include <QTimer>
@@ -56,5 +57,5 @@ private:
} // namespace WebCore
-#endif // ENABLE(VIDEO) && USE(GSTREAMER) && USE(NATIVE_FULLSCREEN_VIDEO)
+#endif // defined(WTF_USE_GSTREAMER) && WTF_USE_GSTREAMER && defined(WTF_USE_NATIVE_FULLSCREEN_VIDEO) && WTF_USE_NATIVE_FULLSCREEN_VIDEO
#endif // PlatformVideoWindowPrivate_h
diff --git a/Source/WebCore/platform/graphics/gstreamer/PlatformVideoWindowQt.cpp b/Source/WebCore/platform/graphics/gstreamer/PlatformVideoWindowQt.cpp
index 1dcfd014f..f22bd2eed 100644
--- a/Source/WebCore/platform/graphics/gstreamer/PlatformVideoWindowQt.cpp
+++ b/Source/WebCore/platform/graphics/gstreamer/PlatformVideoWindowQt.cpp
@@ -25,9 +25,7 @@
#include "PlatformVideoWindowPrivate.h"
#include <QCursor>
-#include <QGuiApplication>
#include <QKeyEvent>
-#include <QPalette>
using namespace WebCore;
@@ -77,35 +75,36 @@ bool FullScreenVideoWindow::event(QEvent* ev)
case QEvent::Close:
#ifndef QT_NO_CURSOR
m_cursorTimer.stop();
-#endif
-#ifndef QT_NO_CURSOR
- QGuiApplication::restoreOverrideCursor();
+ unsetCursor();
#endif
break;
default:
break;
}
+
return QWindow::event(ev);
}
void FullScreenVideoWindow::showFullScreen()
{
- QWindow::showFullScreen();
+ setWindowState(Qt::WindowFullScreen);
+ requestActivate();
raise();
+ setVisible(true);
hideCursor();
}
void FullScreenVideoWindow::hideCursor()
{
#ifndef QT_NO_CURSOR
- QGuiApplication::setOverrideCursor(QCursor(Qt::BlankCursor));
+ setCursor(QCursor(Qt::BlankCursor));
#endif
}
void FullScreenVideoWindow::showCursor()
{
#ifndef QT_NO_CURSOR
- QGuiApplication::restoreOverrideCursor();
+ unsetCursor();
m_cursorTimer.start(gHideMouseCursorDelay);
#endif
}
@@ -116,8 +115,6 @@ PlatformVideoWindow::PlatformVideoWindow()
QWindow* win = new FullScreenVideoWindow();
m_window = win;
win->setFlags(win->flags() | Qt::FramelessWindowHint);
- // FIXME: Port to Qt 5.
- win->showFullScreen();
m_videoWindowId = win->winId();
}
diff --git a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index 17dc4142c..541aae91c 100644
--- a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -717,6 +717,7 @@ void GraphicsContext::strokePath(const Path& path)
QPainterPathStroker pathStroker;
pathStroker.setJoinStyle(pen.joinStyle());
pathStroker.setDashOffset(pen.dashOffset());
+ pathStroker.setDashPattern(pen.dashPattern());
pathStroker.setMiterLimit(pen.miterLimit());
pathStroker.setCapStyle(pen.capStyle());
pathStroker.setWidth(pen.widthF());
diff --git a/Source/WebCore/platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp b/Source/WebCore/platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp
index c4d2d5418..71a829551 100644
--- a/Source/WebCore/platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp
+++ b/Source/WebCore/platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp
@@ -22,7 +22,7 @@
#if USE(GRAPHICS_SURFACE) && OS(DARWIN)
#include "TextureMapperGL.h"
-#include <CFNumber.h>
+#include <CoreFoundation/CFNumber.h>
#include <CGLContext.h>
#include <CGLCurrent.h>
#include <CGLIOSurface.h>
diff --git a/Source/WebCore/platform/qt/FileSystemQt.cpp b/Source/WebCore/platform/qt/FileSystemQt.cpp
index 16f4d7420..b5d0096e7 100644
--- a/Source/WebCore/platform/qt/FileSystemQt.cpp
+++ b/Source/WebCore/platform/qt/FileSystemQt.cpp
@@ -42,7 +42,9 @@
#include <wtf/text/CString.h>
#include <wtf/text/WTFString.h>
-#if !defined(Q_OS_WIN)
+#if OS(ANDROID)
+#include <sys/vfs.h>
+#elif !defined(Q_OS_WIN)
#include <sys/statvfs.h>
#endif
@@ -215,9 +217,15 @@ uint64_t getVolumeFreeSizeForPath(const char* path)
return 0;
return static_cast<uint64_t>(freeBytesToCaller.QuadPart);
#else
+#if OS(ANDROID)
+ struct statfs volumeInfo;
+ if (statfs(path, &volumeInfo))
+ return 0;
+#else
struct statvfs volumeInfo;
if (statvfs(path, &volumeInfo))
return 0;
+#endif
return static_cast<uint64_t>(volumeInfo.f_bavail) * static_cast<uint64_t>(volumeInfo.f_frsize);
#endif
diff --git a/Source/WebCore/platform/qt/GamepadsQt.cpp b/Source/WebCore/platform/qt/GamepadsQt.cpp
index dc4f16a7a..60ff317cb 100644
--- a/Source/WebCore/platform/qt/GamepadsQt.cpp
+++ b/Source/WebCore/platform/qt/GamepadsQt.cpp
@@ -30,19 +30,23 @@
#include "GamepadDeviceLinux.h"
#include "GamepadList.h"
+#include <QLibrary>
#include <QObject>
#include <QSocketNotifier>
-extern "C" {
-#include <libudev.h>
-}
-
#include <unistd.h>
#include <wtf/HashMap.h>
#include <wtf/PassOwnPtr.h>
#include <wtf/text/CString.h>
#include <wtf/text/StringHash.h>
+// Forward declarations for libudev, they are all used opaque so we don't need the definitions.
+struct udev;
+struct udev_device;
+struct udev_monitor;
+struct udev_enumerate;
+struct udev_list_entry;
+
namespace WebCore {
class GamepadDeviceLinuxQt : public QObject, public GamepadDeviceLinux {
@@ -87,7 +91,107 @@ bool GamepadDeviceLinuxQt::readCallback()
return true;
}
-class GamepadsQt : public QObject {
+class LibUdevWrapper {
+public:
+ LibUdevWrapper() : m_loaded(false)
+ {
+ load();
+ }
+
+ virtual ~LibUdevWrapper()
+ {
+ m_libUdev.unload();
+ }
+
+ bool isLoaded() const { return m_loaded; }
+
+private:
+ QLibrary m_libUdev;
+ bool m_loaded;
+ bool load()
+ {
+ m_libUdev.setLoadHints(QLibrary::ResolveAllSymbolsHint);
+ m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 1);
+ m_loaded = m_libUdev.load();
+ if (resolveMethods())
+ return true;
+
+ m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 0);
+ m_loaded = m_libUdev.load();
+ return resolveMethods();
+ }
+
+ QFunctionPointer resolve(const char* name)
+ {
+ QFunctionPointer ptr = m_libUdev.resolve(name);
+ if (!ptr) {
+ qWarning("libudev could not resolve expected symbol %s", name);
+ m_loaded = false;
+ }
+ return ptr;
+ }
+
+ bool resolveMethods()
+ {
+ if (!m_loaded)
+ return false;
+ udev_new = (udev* (*)())resolve("udev_new");
+ udev_unref = (void (*)(udev*))resolve("udev_unref");
+ udev_monitor_new_from_netlink = (udev_monitor* (*)(udev*, const char*))resolve("udev_monitor_new_from_netlink");
+ udev_monitor_unref = (void (*)(udev_monitor*))resolve("udev_monitor_unref");
+ udev_monitor_enable_receiving = (int (*)(udev_monitor*))resolve("udev_monitor_enable_receiving");
+ udev_monitor_get_fd = (int (*)(udev_monitor*))resolve("udev_monitor_get_fd");
+ udev_monitor_filter_add_match_subsystem_devtype = (int (*)(udev_monitor*, const char*, const char*))resolve("udev_monitor_filter_add_match_subsystem_devtype");
+ udev_monitor_receive_device = (udev_device* (*)(udev_monitor*))resolve("udev_monitor_receive_device");
+ udev_enumerate_new = (udev_enumerate* (*)(udev*))resolve("udev_enumerate_new");
+ udev_enumerate_unref = (void (*)(udev_enumerate*))resolve("udev_enumerate_unref");
+ udev_enumerate_add_match_subsystem = (int (*)(udev_enumerate*, const char*))resolve("udev_enumerate_add_match_subsystem");
+ udev_enumerate_add_match_property = (int (*)(udev_enumerate*, const char*, const char*))resolve("udev_enumerate_add_match_property");
+ udev_enumerate_scan_devices = (int (*)(udev_enumerate*))resolve("udev_enumerate_scan_devices");
+ udev_enumerate_get_list_entry = (udev_list_entry* (*)(udev_enumerate*))resolve("udev_enumerate_get_list_entry");
+ udev_list_entry_get_next = (udev_list_entry* (*)(udev_list_entry*))resolve("udev_list_entry_get_next");
+ udev_list_entry_get_name = (const char* (*)(udev_list_entry*))resolve("udev_list_entry_get_name");
+ udev_device_new_from_syspath = (udev_device* (*)(udev*, const char*))resolve("udev_device_new_from_syspath");
+ udev_device_unref = (void (*)(udev_device*))resolve("udev_device_unref");
+ udev_device_get_syspath = (const char* (*)(udev_device*))resolve("udev_device_get_syspath");
+ udev_device_get_devnode = (const char* (*)(udev_device*))resolve("udev_device_get_devnode");
+ udev_device_get_property_value = (const char* (*)(udev_device*, const char*))resolve("udev_device_get_property_value");
+ udev_device_get_action = (const char* (*)(udev_device*))resolve("udev_device_get_action");
+
+ return m_loaded;
+ }
+
+public:
+ struct udev* (*udev_new)();
+ void (*udev_unref)(struct udev*);
+
+ struct udev_monitor* (*udev_monitor_new_from_netlink)(struct udev*, const char *name);
+ void (*udev_monitor_unref)(struct udev_monitor*);
+ int (*udev_monitor_enable_receiving)(struct udev_monitor*);
+ int (*udev_monitor_get_fd)(struct udev_monitor*);
+ int (*udev_monitor_filter_add_match_subsystem_devtype)(struct udev_monitor*, const char *subsystem, const char *devtype);
+ struct udev_device* (*udev_monitor_receive_device)(struct udev_monitor*);
+
+ struct udev_enumerate* (*udev_enumerate_new)(struct udev*);
+ void (*udev_enumerate_unref)(struct udev_enumerate*);
+ int (*udev_enumerate_add_match_subsystem)(struct udev_enumerate*, const char *subsystem);
+ int (*udev_enumerate_add_match_property)(struct udev_enumerate*, const char *property, const char *value);
+ int (*udev_enumerate_scan_devices)(struct udev_enumerate*);
+ struct udev_list_entry* (*udev_enumerate_get_list_entry)(struct udev_enumerate*);
+
+ struct udev_list_entry* (*udev_list_entry_get_next)(struct udev_list_entry*);
+ const char* (*udev_list_entry_get_name)(struct udev_list_entry*);
+
+ struct udev_device* (*udev_device_new_from_syspath)(struct udev *udev, const char *syspath);
+ void (*udev_device_unref)(struct udev_device *udev_device);
+ const char* (*udev_device_get_syspath)(struct udev_device *udev_device);
+ const char* (*udev_device_get_devnode)(struct udev_device *udev_device);
+ const char* (*udev_device_get_property_value)(struct udev_device *udev_device, const char *key);
+ const char* (*udev_device_get_action)(struct udev_device *udev_device);
+};
+
+
+class GamepadsQt : public QObject, protected LibUdevWrapper {
Q_OBJECT
public:
GamepadsQt(unsigned);
@@ -114,8 +218,12 @@ private:
GamepadsQt::GamepadsQt(unsigned length)
: QObject()
+ , LibUdevWrapper()
, m_slots(length)
{
+ if (!LibUdevWrapper::isLoaded())
+ return;
+
m_udev = udev_new();
m_gamepadsMonitor = udev_monitor_new_from_netlink(m_udev, "udev");
udev_monitor_enable_receiving(m_gamepadsMonitor);
@@ -129,8 +237,7 @@ GamepadsQt::GamepadsQt(unsigned length)
udev_enumerate_scan_devices(enumerate);
struct udev_list_entry* cur;
struct udev_list_entry* devs = udev_enumerate_get_list_entry(enumerate);
- udev_list_entry_foreach(cur, devs)
- {
+ for (cur = devs; cur != NULL; cur = udev_list_entry_get_next(cur)) {
const char* devname = udev_list_entry_get_name(cur);
struct udev_device* device = udev_device_new_from_syspath(m_udev, devname);
if (isGamepadDevice(device))
@@ -142,6 +249,8 @@ GamepadsQt::GamepadsQt(unsigned length)
GamepadsQt::~GamepadsQt()
{
+ if (!LibUdevWrapper::isLoaded())
+ return;
udev_unref(m_udev);
udev_monitor_unref(m_gamepadsMonitor);
}
diff --git a/Source/WebCore/platform/qt/LocalizedStringsQt.cpp b/Source/WebCore/platform/qt/LocalizedStringsQt.cpp
index bf1f6ff0e..def96e1e4 100644
--- a/Source/WebCore/platform/qt/LocalizedStringsQt.cpp
+++ b/Source/WebCore/platform/qt/LocalizedStringsQt.cpp
@@ -133,6 +133,11 @@ String contextMenuItemTagOpenAudioInNewWindow()
return QCoreApplication::translate("QWebPage", "Open Audio", "Open Audio in New Window");
}
+String contextMenuItemTagOpenMediaInNewWindow()
+{
+ return QCoreApplication::translate("QWebPage", "Open Media", "Open Media in New Window context menu item");
+}
+
String contextMenuItemTagDownloadVideoToDisk()
{
return QCoreApplication::translate("QWebPage", "Download Video", "Download Video context menu item");
@@ -143,19 +148,29 @@ String contextMenuItemTagDownloadAudioToDisk()
return QCoreApplication::translate("QWebPage", "Download Audio", "Download Audio context menu item");
}
+String contextMenuItemTagDownloadMediaToDisk()
+{
+ return QCoreApplication::translate("QWebPage", "Download Media", "Download Media context menu item");
+}
+
String contextMenuItemTagCopyVideoLinkToClipboard()
{
- return QCoreApplication::translate("QWebPage", "Copy Video", "Copy Video Link Location");
+ return QCoreApplication::translate("QWebPage", "Copy Video Address", "Copy Video Link to Clipboard");
}
String contextMenuItemTagCopyAudioLinkToClipboard()
{
- return QCoreApplication::translate("QWebPage", "Copy Audio", "Copy Audio Link Location");
+ return QCoreApplication::translate("QWebPage", "Copy Audio Address", "Copy Audio Link to Clipboard");
+}
+
+String contextMenuItemTagCopyMediaLinkToClipboard()
+{
+ return QCoreApplication::translate("QWebPage", "Copy Media Address", "Copy Media Link to Clipboard");
}
String contextMenuItemTagToggleMediaControls()
{
- return QCoreApplication::translate("QWebPage", "Toggle Controls", "Toggle Media Controls");
+ return QCoreApplication::translate("QWebPage", "Show Controls", "Toggle Media Controls checkable context menu item");
}
String contextMenuItemTagShowMediaControls()
@@ -170,12 +185,22 @@ String contextMenuItemTagHideMediaControls()
String contextMenuItemTagToggleMediaLoop()
{
- return QCoreApplication::translate("QWebPage", "Toggle Loop", "Toggle Media Loop Playback");
+ return QCoreApplication::translate("QWebPage", "Looping", "Toggle Media Loop Playback");
+}
+
+String contextMenuItemTagToggleVideoFullscreen()
+{
+ return QCoreApplication::translate("QWebPage", "Toggle Fullscreen", "Toggle Fullscreen Mode of Video context menu item");
}
String contextMenuItemTagEnterVideoFullscreen()
{
- return QCoreApplication::translate("QWebPage", "Enter Fullscreen", "Switch Video to Fullscreen");
+ return QCoreApplication::translate("QWebPage", "Enter Fullscreen", "Switch Video to Fullscreen context menu item");
+}
+
+String contextMenuItemTagExitVideoFullscreen()
+{
+ return QCoreApplication::translate("QWebPage", "Exit Fullscreen", "Switch Video out of Fullscreen context menu item");
}
String contextMenuItemTagMediaPlay()
@@ -188,9 +213,19 @@ String contextMenuItemTagMediaPause()
return QCoreApplication::translate("QWebPage", "Pause", "Pause");
}
+String contextMenuItemTagMediaPlayPause()
+{
+ return QCoreApplication::translate("QWebPage", "Play/Pause", "Toggle Play and Pause state");
+}
+
String contextMenuItemTagMediaMute()
{
- return QCoreApplication::translate("QWebPage", "Mute", "Mute");
+ return QCoreApplication::translate("QWebPage", "Mute", "Media Mute context menu item");
+}
+
+String contextMenuItemTagMediaUnmute()
+{
+ return QCoreApplication::translate("QWebPage", "Unmute", "Media Unmute context menu item");
}
String contextMenuItemTagOpenFrameInNewWindow()
diff --git a/Source/WebCore/platform/qt/RenderThemeQStyle.cpp b/Source/WebCore/platform/qt/RenderThemeQStyle.cpp
index 8ba71e279..f85a75bd4 100644
--- a/Source/WebCore/platform/qt/RenderThemeQStyle.cpp
+++ b/Source/WebCore/platform/qt/RenderThemeQStyle.cpp
@@ -437,7 +437,7 @@ bool RenderThemeQStyle::paintSliderTrack(RenderObject* o, const PaintInfo& pi, c
// some styles need this to show a highlight on one side of the groove
HTMLInputElement* slider = o->node()->toInputElement();
- if (slider) {
+ if (slider && slider->isSteppable()) {
p.styleOption.slider.upsideDown = (p.appearance == SliderHorizontalPart) && !o->style()->isLeftToRightDirection();
// Use the width as a multiplier in case the slider values are <= 1
const int width = r.width() > 0 ? r.width() : 100;
diff --git a/Source/WebKit/qt/Api/qwebsettings.cpp b/Source/WebKit/qt/Api/qwebsettings.cpp
index 5e3cee7bb..242404055 100644
--- a/Source/WebKit/qt/Api/qwebsettings.cpp
+++ b/Source/WebKit/qt/Api/qwebsettings.cpp
@@ -174,9 +174,7 @@ void QWebSettingsPrivate::apply()
value = attributes.value(QWebSettings::CSSRegionsEnabled,
global->attributes.value(QWebSettings::CSSRegionsEnabled));
WebCore::RuntimeEnabledFeatures::setCSSRegionsEnabled(value);
- value = attributes.value(QWebSettings::CSSCompositingEnabled,
- global->attributes.value(QWebSettings::CSSCompositingEnabled));
- WebCore::RuntimeEnabledFeatures::setCSSCompositingEnabled(value);
+
value = attributes.value(QWebSettings::CSSGridLayoutEnabled,
global->attributes.value(QWebSettings::CSSGridLayoutEnabled));
settings->setCSSGridLayoutEnabled(value);
@@ -497,6 +495,8 @@ QWebSettings* QWebSettings::globalSettings()
This is disabled by default.
\value SiteSpecificQuirksEnabled This setting enables WebKit's workaround for broken sites. It is
enabled by default.
+ \value CSSGridLayoutEnabled This setting enables support for the CSS 3 Grid Layout module. This
+ CSS module is currently only a draft and support for it is disabled by default.
\value ScrollAnimatorEnabled This setting enables animated scrolling. It is disabled by default.
\value CaretBrowsingEnabled This setting enables caret browsing. It is disabled by default.
\value NotificationsEnabled Specifies whether support for the HTML 5 web notifications is enabled
@@ -548,7 +548,6 @@ QWebSettings::QWebSettings()
d->attributes.insert(QWebSettings::WebGLEnabled, true);
d->attributes.insert(QWebSettings::WebAudioEnabled, false);
d->attributes.insert(QWebSettings::CSSRegionsEnabled, true);
- d->attributes.insert(QWebSettings::CSSCompositingEnabled, true);
d->attributes.insert(QWebSettings::CSSGridLayoutEnabled, false);
d->attributes.insert(QWebSettings::HyperlinkAuditingEnabled, false);
d->attributes.insert(QWebSettings::TiledBackingStoreEnabled, false);
diff --git a/Source/WebKit/qt/Api/qwebsettings.h b/Source/WebKit/qt/Api/qwebsettings.h
index 61ff930c8..afffb2aec 100644
--- a/Source/WebKit/qt/Api/qwebsettings.h
+++ b/Source/WebKit/qt/Api/qwebsettings.h
@@ -80,7 +80,6 @@ public:
JavascriptCanCloseWindows,
WebGLEnabled,
CSSRegionsEnabled,
- CSSCompositingEnabled,
HyperlinkAuditingEnabled,
CSSGridLayoutEnabled,
ScrollAnimatorEnabled,
diff --git a/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp b/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp
index bd578e97b..63d73c069 100644
--- a/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp
@@ -28,8 +28,9 @@
#include "HTMLNames.h"
#include "HTMLVideoElement.h"
#include "Node.h"
+#include "QWebPageClient.h"
-#if USE(GSTREAMER)
+#if USE(GSTREAMER) && USE(NATIVE_FULLSCREEN_VIDEO)
#include "GStreamerGWorld.h"
#include "PlatformVideoWindowPrivate.h"
#endif
@@ -41,9 +42,10 @@
namespace WebCore {
#if USE(GSTREAMER) && USE(NATIVE_FULLSCREEN_VIDEO)
-GStreamerFullScreenVideoHandler::GStreamerFullScreenVideoHandler()
+GStreamerFullScreenVideoHandler::GStreamerFullScreenVideoHandler(ChromeClientQt* chromeClient)
: m_videoElement(0)
, m_fullScreenWidget(0)
+ , m_chromeClient(chromeClient)
{
}
@@ -65,6 +67,8 @@ void GStreamerFullScreenVideoHandler::enterFullScreen()
m_fullScreenWidget = reinterpret_cast<FullScreenVideoWindow*>(gstreamerGWorld->platformVideoWindow()->window());
m_fullScreenWidget->setVideoElement(m_videoElement);
connect(m_fullScreenWidget, SIGNAL(closed()), this, SLOT(windowClosed()));
+
+ m_fullScreenWidget->setTransientParent(m_chromeClient->platformPageClient()->ownerWindow());
m_fullScreenWidget->showFullScreen();
}
@@ -75,8 +79,12 @@ void GStreamerFullScreenVideoHandler::windowClosed()
void GStreamerFullScreenVideoHandler::exitFullScreen()
{
- if (m_videoElement->platformMedia().type == WebCore::PlatformMedia::GStreamerGWorldType)
+ if (m_videoElement->platformMedia().type == WebCore::PlatformMedia::GStreamerGWorldType) {
m_videoElement->platformMedia().media.gstreamerGWorld->exitFullscreen();
+ // GStreamerWorld::exitFullscreen() deletes the PlatformVideoWindow.
+ m_fullScreenWidget = 0;
+ return;
+ }
m_fullScreenWidget->setVideoElement(0);
m_fullScreenWidget->close();
@@ -96,7 +104,7 @@ FullScreenVideoQt::FullScreenVideoQt(ChromeClientQt* chromeClient)
#endif
#if USE(GSTREAMER) && USE(NATIVE_FULLSCREEN_VIDEO)
- m_FullScreenVideoHandlerGStreamer = new GStreamerFullScreenVideoHandler;
+ m_FullScreenVideoHandlerGStreamer = new GStreamerFullScreenVideoHandler(chromeClient);
#endif
}
@@ -131,7 +139,6 @@ void FullScreenVideoQt::enterFullScreenForNode(Node* node)
mediaPlayerQt->removeVideoItem();
m_FullScreenVideoHandler->enterFullScreen(mediaPlayerQt->mediaPlayer());
#endif
-
#if USE(GSTREAMER) && USE(NATIVE_FULLSCREEN_VIDEO)
m_FullScreenVideoHandlerGStreamer->setVideoElement(m_videoElement);
m_FullScreenVideoHandlerGStreamer->enterFullScreen();
diff --git a/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.h b/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.h
index f5ba0793c..256794d41 100644
--- a/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.h
@@ -32,7 +32,6 @@ QT_END_NAMESPACE
namespace WebCore {
class ChromeClientQt;
-class FullScreenVideoWidget;
class HTMLVideoElement;
class Node;
#if USE(QT_MULTIMEDIA)
@@ -46,7 +45,7 @@ class FullScreenVideoWindow;
class GStreamerFullScreenVideoHandler : public QObject {
Q_OBJECT
public:
- GStreamerFullScreenVideoHandler();
+ GStreamerFullScreenVideoHandler(ChromeClientQt*);
~GStreamerFullScreenVideoHandler() { }
void setVideoElement(HTMLVideoElement*);
@@ -59,6 +58,7 @@ public Q_SLOTS:
private:
HTMLVideoElement* m_videoElement;
FullScreenVideoWindow* m_fullScreenWidget;
+ ChromeClientQt* m_chromeClient;
};
#endif
diff --git a/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp b/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp
index 8e56ad347..113eefbe2 100644
--- a/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp
@@ -40,6 +40,7 @@
#include "Page.h"
#include "PlatformStrategiesQt.h"
#include "RenderThemeQStyle.h"
+#include "RuntimeEnabledFeatures.h"
#include "ScriptController.h"
#include "ScrollbarThemeQStyle.h"
#include "SecurityPolicy.h"
@@ -106,6 +107,7 @@ Q_DECL_EXPORT void initializeWebCoreQt()
if (!WebCore::memoryCache()->disabled())
WebCore::memoryCache()->setDeadDecodedDataDeletionInterval(60);
+ WebCore::RuntimeEnabledFeatures::setCSSCompositingEnabled(true);
initialized = true;
}
diff --git a/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp b/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp
index 15a3daf39..4f7685c98 100644
--- a/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp
@@ -282,7 +282,7 @@ int InspectorServerRequestHandlerQt::webSocketSend(const char* data, size_t leng
m_tcpConnection->putChar(0x81);
if (length <= 125)
m_tcpConnection->putChar(static_cast<uint8_t>(length));
- else if (length <= pow(2, 16)) {
+ else if (length <= (1<<16)) {
m_tcpConnection->putChar(126);
quint16 length16 = qToBigEndian<quint16>(static_cast<quint16>(length));
m_tcpConnection->write(reinterpret_cast<char*>(&length16), 2);
diff --git a/Source/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.cpp b/Source/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.cpp
index d049fe3b7..a8487f2c4 100644
--- a/Source/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.cpp
@@ -169,7 +169,7 @@ void PlatformStrategiesQt::getPluginInfo(const WebCore::Page* page, Vector<WebCo
PluginDatabase* db = PluginDatabase::installedPlugins();
const Vector<PluginPackage*> &plugins = db->plugins();
- for (int i = 0; i < plugins.size(); ++i) {
+ for (size_t i = 0; i < plugins.size(); ++i) {
PluginInfo info;
PluginPackage* package = plugins[i];
diff --git a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
index 6f18e0486..8b7552023 100644
--- a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
@@ -832,6 +832,7 @@ QWebHitTestResultPrivate::QWebHitTestResultPrivate(const WebCore::HitTestResult
linkTitle = hitTest.titleDisplayString();
alternateText = hitTest.altDisplayString();
imageUrl = hitTest.absoluteImageURL();
+ mediaUrl = hitTest.absoluteMediaURL();
innerNode = hitTest.innerNode();
innerNode->ref();
innerNonSharedNode = hitTest.innerNonSharedNode();
@@ -883,6 +884,7 @@ QWebHitTestResultPrivate& QWebHitTestResultPrivate::operator=(const QWebHitTestR
linkElement = other.linkElement;
alternateText = other.alternateText;
imageUrl = other.imageUrl;
+ mediaUrl = other.mediaUrl;
pixmap = other.pixmap;
isContentEditable = other.isContentEditable;
isContentSelected = other.isContentSelected;
diff --git a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.h b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.h
index 8c65007db..4cca4d7a5 100644
--- a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.h
+++ b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.h
@@ -81,6 +81,7 @@ public:
QWebElement linkElement;
QString alternateText;
QUrl imageUrl;
+ QUrl mediaUrl;
QPixmap pixmap;
bool isContentEditable;
bool isContentSelected;
diff --git a/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp b/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp
index 658566f5c..6f9cebce1 100644
--- a/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp
@@ -61,6 +61,7 @@
#include "GeolocationPermissionClientQt.h"
#include "HTMLFrameOwnerElement.h"
#include "HTMLInputElement.h"
+#include "HTMLMediaElement.h"
#include "HitTestResult.h"
#include "InitWebCoreQt.h"
#include "InspectorClientQt.h"
@@ -89,6 +90,7 @@
#include "Settings.h"
#include "UndoStepQt.h"
#include "UserAgentQt.h"
+#include "UserGestureIndicator.h"
#include "WebEventConversion.h"
#include "WebKitVersion.h"
#include "WindowFeatures.h"
@@ -887,6 +889,7 @@ QList<MenuItem> descriptionForPlatformMenu(const Vector<ContextMenuItem>& items,
if (it.checked())
description.traits |= MenuItem::Checked;
}
+ description.title = item.title();
}
break;
}
@@ -896,7 +899,7 @@ QList<MenuItem> descriptionForPlatformMenu(const Vector<ContextMenuItem>& items,
case WebCore::SubmenuType: {
description.type = MenuItem::SubMenu;
description.subMenu = descriptionForPlatformMenu(item.subMenuItems(), page);
- description.subMenuTitle = item.title();
+ description.title = item.title();
// Don't append empty submenu descriptions.
if (description.subMenu.isEmpty())
continue;
@@ -1049,6 +1052,21 @@ void QWebPageAdapter::updateActionInternal(QWebPageAdapter::MenuAction action, c
}
}
+#if ENABLE(VIDEO)
+static WebCore::HTMLMediaElement* mediaElement(WebCore::Node* innerNonSharedNode)
+{
+ if (!(innerNonSharedNode && innerNonSharedNode->document()))
+ return 0;
+
+ if (!(innerNonSharedNode->renderer() && innerNonSharedNode->renderer()->isMedia()))
+ return 0;
+
+ if (innerNonSharedNode->hasTagName(WebCore::HTMLNames::videoTag) || innerNonSharedNode->hasTagName(WebCore::HTMLNames::audioTag))
+ return WebCore::toHTMLMediaElement(innerNonSharedNode);
+ return 0;
+}
+#endif
+
void QWebPageAdapter::triggerAction(QWebPageAdapter::MenuAction action, QWebHitTestResultPrivate* hitTestResult, const char* commandName, bool endToEndReload)
{
Frame* frame = page->focusController()->focusedOrMainFrame();
@@ -1100,6 +1118,9 @@ void QWebPageAdapter::triggerAction(QWebPageAdapter::MenuAction action, QWebHitT
case DownloadLinkToDisk:
frame->loader()->client()->startDownload(WebCore::ResourceRequest(hitTestResult->linkUrl, frame->loader()->outgoingReferrer()));
break;
+ case DownloadMediaToDisk:
+ frame->loader()->client()->startDownload(WebCore::ResourceRequest(hitTestResult->mediaUrl, frame->loader()->outgoingReferrer()));
+ break;
case Back:
page->goBack();
break;
@@ -1123,6 +1144,31 @@ void QWebPageAdapter::triggerAction(QWebPageAdapter::MenuAction action, QWebHitT
case SetTextDirectionRightToLeft:
editor.setBaseWritingDirection(RightToLeftWritingDirection);
break;
+#if ENABLE(VIDEO)
+ case ToggleMediaControls:
+ if (HTMLMediaElement* mediaElt = mediaElement(hitTestResult->innerNonSharedNode))
+ mediaElt->setControls(!mediaElt->controls());
+ break;
+ case ToggleMediaLoop:
+ if (HTMLMediaElement* mediaElt = mediaElement(hitTestResult->innerNonSharedNode))
+ mediaElt->setLoop(!mediaElt->loop());
+ break;
+ case ToggleMediaPlayPause:
+ if (HTMLMediaElement* mediaElt = mediaElement(hitTestResult->innerNonSharedNode))
+ mediaElt->togglePlayState();
+ case ToggleMediaMute:
+ if (HTMLMediaElement* mediaElt = mediaElement(hitTestResult->innerNonSharedNode))
+ mediaElt->setMuted(!mediaElt->muted());
+ break;
+ case ToggleVideoFullscreen:
+ if (HTMLMediaElement* mediaElt = mediaElement(hitTestResult->innerNonSharedNode)) {
+ if (mediaElt->isVideo() && mediaElt->supportsFullscreen()) {
+ UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
+ mediaElt->toggleFullscreenState();
+ }
+ }
+ break;
+#endif
#if ENABLE(INSPECTOR)
case InspectElement: {
ASSERT(hitTestResult != &hitTest);
@@ -1201,6 +1247,23 @@ QString QWebPageAdapter::contextMenuItemTagForAction(QWebPageAdapter::MenuAction
case ToggleUnderline:
*checkable = true;
return contextMenuItemTagUnderline();
+ case DownloadMediaToDisk:
+ return contextMenuItemTagDownloadMediaToDisk();
+ case CopyMediaUrlToClipboard:
+ return contextMenuItemTagCopyMediaLinkToClipboard();
+ case ToggleMediaControls:
+ *checkable = true;
+ return contextMenuItemTagShowMediaControls();
+ case ToggleMediaLoop:
+ *checkable = true;
+ return contextMenuItemTagToggleMediaLoop();
+ case ToggleMediaPlayPause:
+ return contextMenuItemTagMediaPlayPause();
+ case ToggleMediaMute:
+ *checkable = true;
+ return contextMenuItemTagMediaMute();
+ case ToggleVideoFullscreen:
+ return contextMenuItemTagToggleVideoFullscreen();
#if ENABLE(INSPECTOR)
case InspectElement:
diff --git a/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.h b/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.h
index 26de9d0bb..09d569c0f 100644
--- a/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.h
+++ b/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.h
@@ -91,7 +91,14 @@ public:
F(ToggleBold, WebCore::ContextMenuItemTagBold) SEPARATOR \
F(ToggleItalic, WebCore::ContextMenuItemTagItalic) SEPARATOR \
F(ToggleUnderline, WebCore::ContextMenuItemTagUnderline) SEPARATOR \
- F(SelectAll, WebCore::ContextMenuItemTagSelectAll)
+ F(SelectAll, WebCore::ContextMenuItemTagSelectAll) SEPARATOR \
+ F(DownloadMediaToDisk, WebCore::ContextMenuItemTagDownloadMediaToDisk) SEPARATOR \
+ F(CopyMediaUrlToClipboard, WebCore::ContextMenuItemTagCopyMediaLinkToClipboard) SEPARATOR \
+ F(ToggleMediaControls, WebCore::ContextMenuItemTagToggleMediaControls) SEPARATOR \
+ F(ToggleMediaLoop, WebCore::ContextMenuItemTagToggleMediaLoop) SEPARATOR \
+ F(ToggleMediaPlayPause, WebCore::ContextMenuItemTagMediaPlayPause) SEPARATOR \
+ F(ToggleMediaMute, WebCore::ContextMenuItemTagMediaMute) SEPARATOR \
+ F(ToggleVideoFullscreen, WebCore::ContextMenuItemTagToggleVideoFullscreen)
#define COMMA_SEPARATOR ,
#define SEMICOLON_SEPARATOR ;
#define DEFINE_ACTION(Name, Value) \
@@ -250,7 +257,7 @@ public:
Q_DECLARE_FLAGS(Traits, Trait);
Traits traits;
QList<MenuItemDescription> subMenu;
- QString subMenuTitle;
+ QString title;
};
virtual void createAndSetCurrentContextMenu(const QList<MenuItemDescription>&, QBitArray*) = 0;
virtual bool handleScrollbarContextMenuEvent(QContextMenuEvent*, bool, ScrollDirection*, ScrollGranularity*) = 0;
diff --git a/Source/WebKit/qt/WidgetApi/qwebframe.cpp b/Source/WebKit/qt/WidgetApi/qwebframe.cpp
index f3e563cb5..27cc73989 100644
--- a/Source/WebKit/qt/WidgetApi/qwebframe.cpp
+++ b/Source/WebKit/qt/WidgetApi/qwebframe.cpp
@@ -1217,6 +1217,17 @@ QUrl QWebHitTestResult::imageUrl() const
}
/*!
+ Returns the url of the video or audio element.
+ \since 5.2
+*/
+QUrl QWebHitTestResult::mediaUrl() const
+{
+ if (!d)
+ return QUrl();
+ return d->mediaUrl;
+}
+
+/*!
Returns a QPixmap containing the image. A null pixmap is returned if the
element being tested is not an image.
*/
diff --git a/Source/WebKit/qt/WidgetApi/qwebframe.h b/Source/WebKit/qt/WidgetApi/qwebframe.h
index 481d019ae..d665bd12f 100644
--- a/Source/WebKit/qt/WidgetApi/qwebframe.h
+++ b/Source/WebKit/qt/WidgetApi/qwebframe.h
@@ -87,6 +87,7 @@ public:
QUrl imageUrl() const;
QPixmap pixmap() const;
+ QUrl mediaUrl() const;
bool isContentEditable() const;
bool isContentSelected() const;
diff --git a/Source/WebKit/qt/WidgetApi/qwebpage.cpp b/Source/WebKit/qt/WidgetApi/qwebpage.cpp
index d69d673bb..48c9bf365 100644
--- a/Source/WebKit/qt/WidgetApi/qwebpage.cpp
+++ b/Source/WebKit/qt/WidgetApi/qwebpage.cpp
@@ -497,6 +497,7 @@ QMenu *createContextMenu(QWebPage* page, const QList<MenuItem>& items, QBitArray
QWebPage::WebAction action = webActionForAdapterMenuAction(item.action);
QAction *a = page->action(action);
if (a) {
+ a->setText(item.title);
a->setEnabled(item.traits & MenuItem::Enabled);
a->setCheckable(item.traits & MenuItem::Checkable);
a->setChecked(item.traits & MenuItem::Checked);
@@ -523,7 +524,7 @@ QMenu *createContextMenu(QWebPage* page, const QList<MenuItem>& items, QBitArray
// don't show sub-menus with just disabled actions
if (anyEnabledAction) {
- subMenu->setTitle(item.subMenuTitle);
+ subMenu->setTitle(item.title);
menu->addAction(subMenu->menuAction());
} else
delete subMenu;
@@ -1182,7 +1183,13 @@ QWebInspector* QWebPagePrivate::getOrCreateInspector()
\value AlignJustified Applies full justification to content. (Added in Qt 4.6)
\value AlignLeft Applies left justification to content. (Added in Qt 4.6)
\value AlignRight Applies right justification to content. (Added in Qt 4.6)
-
+ \value DownloadMediaToDisk Download the hovered audio or video to the disk. (Added in Qt 5.2)
+ \value CopyMediaUrlToClipboard Copy the hovered audio or video's URL to the clipboard. (Added in Qt 5.2)
+ \value ToggleMediaControls Toggles between showing and hiding the controls for the hovered audio or video element. (Added in Qt 5.2)
+ \value ToggleMediaLoop Toggles whether the hovered audio or video should loop on completetion or not. (Added in Qt 5.2)
+ \value ToggleMediaPlayPause Toggles the play/pause state of the hovered audio or video element. (Added in Qt 5.2)
+ \value ToggleMediaMute Mutes or unmutes the hovered audio or video element. (Added in Qt 5.2)
+ \value ToggleVideoFullscreen Switches the hovered video element into or out of fullscreen mode. (Added in Qt 5.2)
\omitvalue WebActionCount
@@ -1721,6 +1728,12 @@ void QWebPage::triggerAction(WebAction action, bool)
case SetTextDirectionDefault:
case SetTextDirectionLeftToRight:
case SetTextDirectionRightToLeft:
+ case DownloadMediaToDisk:
+ case ToggleMediaControls:
+ case ToggleMediaLoop:
+ case ToggleMediaPlayPause:
+ case ToggleMediaMute:
+ case ToggleVideoFullscreen:
mappedAction = adapterMenuActionForWebAction(action);
break;
case ReloadAndBypassCache: // Manual mapping
@@ -1733,6 +1746,9 @@ void QWebPage::triggerAction(WebAction action, bool)
case CopyImageUrlToClipboard:
QApplication::clipboard()->setText(d->hitTestResult.imageUrl().toString());
break;
+ case CopyMediaUrlToClipboard:
+ QApplication::clipboard()->setText(d->hitTestResult.mediaUrl().toString());
+ break;
#endif
case InspectElement: {
#if ENABLE(INSPECTOR)
@@ -2204,6 +2220,13 @@ QAction *QWebPage::action(WebAction action) const
case ToggleBold:
case ToggleItalic:
case ToggleUnderline:
+ case DownloadMediaToDisk:
+ case CopyMediaUrlToClipboard:
+ case ToggleMediaControls:
+ case ToggleMediaLoop:
+ case ToggleMediaPlayPause:
+ case ToggleMediaMute:
+ case ToggleVideoFullscreen:
mappedAction = adapterMenuActionForWebAction(action);
break;
case InspectElement:
diff --git a/Source/WebKit/qt/WidgetApi/qwebpage.h b/Source/WebKit/qt/WidgetApi/qwebpage.h
index e5a093a49..2e3f6aa50 100644
--- a/Source/WebKit/qt/WidgetApi/qwebpage.h
+++ b/Source/WebKit/qt/WidgetApi/qwebpage.h
@@ -181,6 +181,14 @@ public:
OpenLinkInThisWindow,
+ DownloadMediaToDisk,
+ CopyMediaUrlToClipboard,
+ ToggleMediaControls,
+ ToggleMediaLoop,
+ ToggleMediaPlayPause,
+ ToggleMediaMute,
+ ToggleVideoFullscreen,
+
WebActionCount
};
diff --git a/Source/WebKit2/Platform/CoreIPC/Connection.cpp b/Source/WebKit2/Platform/CoreIPC/Connection.cpp
index b6cdf9325..e618e9d1b 100644
--- a/Source/WebKit2/Platform/CoreIPC/Connection.cpp
+++ b/Source/WebKit2/Platform/CoreIPC/Connection.cpp
@@ -348,9 +348,15 @@ PassOwnPtr<MessageEncoder> Connection::createSyncMessageEncoder(StringReference
OwnPtr<MessageEncoder> encoder = MessageEncoder::create(messageReceiverName, messageName, destinationID);
encoder->setIsSyncMessage(true);
+#if HAVE(ATOMICS_64BIT)
// Encode the sync request ID.
COMPILE_ASSERT(sizeof(m_syncRequestID) == sizeof(int64_t), CanUseAtomicIncrement);
syncRequestID = atomicIncrement(reinterpret_cast<int64_t*>(&m_syncRequestID));
+#else
+ m_syncRequestLock.lock();
+ syncRequestID = ++m_syncRequestID;
+ m_syncRequestLock.unlock();
+#endif
*encoder << syncRequestID;
return encoder.release();
diff --git a/Source/WebKit2/Platform/CoreIPC/Connection.h b/Source/WebKit2/Platform/CoreIPC/Connection.h
index 50a9c9876..be1923699 100644
--- a/Source/WebKit2/Platform/CoreIPC/Connection.h
+++ b/Source/WebKit2/Platform/CoreIPC/Connection.h
@@ -254,6 +254,10 @@ private:
Mutex m_waitForMessageMutex;
HashMap<std::pair<std::pair<StringReference, StringReference>, uint64_t>, OwnPtr<MessageDecoder> > m_waitForMessageMap;
+#if !HAVE(ATOMICS_64BIT)
+ Mutex m_syncRequestLock;
+#endif
+
// Represents a sync request for which we're waiting on a reply.
struct PendingSyncReply {
// The request ID.
diff --git a/Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp b/Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp
index 760a8ab1c..6a4d52792 100644
--- a/Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp
+++ b/Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp
@@ -44,6 +44,10 @@
#include <wtf/UniStdExtras.h>
#include <wtf/text/CString.h>
+#if OS(ANDROID)
+#include <linux/ashmem.h>
+#endif
+
namespace WebKit {
SharedMemory::Handle::Handle()
@@ -97,6 +101,41 @@ void SharedMemory::Handle::adoptFromAttachment(int fileDescriptor, size_t size)
m_size = size;
}
+#if OS(ANDROID)
+PassRefPtr<SharedMemory> SharedMemory::create(size_t size)
+{
+ int fileDescriptor = open("/dev/ashmem", O_RDWR);
+ if (fileDescriptor < 0) {
+ WTFLogAlways("Failed to open ashmem device");
+ return 0;
+ }
+
+ String name = String("/WK2SharedMemory.") + String::number(static_cast<unsigned>(WTF::randomNumber() * (std::numeric_limits<unsigned>::max() + 1.0)));
+ char buf[ASHMEM_NAME_LEN];
+ strlcpy(buf,name.utf8().data(), sizeof(buf));
+ // Ashmem names does not need to be unique.
+ ioctl(fileDescriptor, ASHMEM_SET_NAME, buf);
+
+ int ret = ioctl(fileDescriptor, ASHMEM_SET_SIZE, size);
+ if (ret < 0) {
+ closeWithRetry(fileDescriptor);
+ WTFLogAlways("Failed to create shared memory of size %d", size);
+ return 0;
+ }
+
+ void* data = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fileDescriptor, 0);
+ if (data == MAP_FAILED) {
+ closeWithRetry(fileDescriptor);
+ return 0;
+ }
+
+ RefPtr<SharedMemory> instance = adoptRef(new SharedMemory());
+ instance->m_data = data;
+ instance->m_fileDescriptor = fileDescriptor;
+ instance->m_size = size;
+ return instance.release();
+}
+#else
PassRefPtr<SharedMemory> SharedMemory::create(size_t size)
{
CString tempName;
@@ -138,6 +177,7 @@ PassRefPtr<SharedMemory> SharedMemory::create(size_t size)
instance->m_size = size;
return instance.release();
}
+#endif
static inline int accessModeMMap(SharedMemory::Protection protection)
{
diff --git a/Source/WebKit2/Target.pri b/Source/WebKit2/Target.pri
index 597e01088..c4f57b0e0 100644
--- a/Source/WebKit2/Target.pri
+++ b/Source/WebKit2/Target.pri
@@ -793,6 +793,8 @@ have?(QTQUICK) {
UIProcess/API/qt/qwebnavigationrequest_p.h \
UIProcess/API/qt/qquickwebpage_p.h \
UIProcess/API/qt/qquickwebpage_p_p.h \
+ UIProcess/API/qt/qwebnavigationhistory_p.h \
+ UIProcess/API/qt/qwebnavigationhistory_p_p.h \
UIProcess/API/qt/qquickwebview_p.h \
UIProcess/API/qt/qquickwebview_p_p.h \
UIProcess/API/qt/qquicknetworkreply_p.h \
@@ -825,6 +827,7 @@ have?(QTQUICK) {
UIProcess/API/qt/qwebloadrequest.cpp \
UIProcess/API/qt/qwebnavigationrequest.cpp \
UIProcess/API/qt/qquickwebpage.cpp \
+ UIProcess/API/qt/qwebnavigationhistory.cpp \
UIProcess/API/qt/qquickwebview.cpp \
UIProcess/API/qt/qwebiconimageprovider.cpp \
UIProcess/API/qt/qquicknetworkreply.cpp \
diff --git a/Source/WebKit2/UIProcess/StatisticsRequest.cpp b/Source/WebKit2/UIProcess/StatisticsRequest.cpp
index 0fa1fb7a7..6f81ccbb3 100644
--- a/Source/WebKit2/UIProcess/StatisticsRequest.cpp
+++ b/Source/WebKit2/UIProcess/StatisticsRequest.cpp
@@ -28,7 +28,7 @@
#include "ImmutableArray.h"
#include "MutableDictionary.h"
-#include <wtf/Atomics.h>
+#include <wtf/Threading.h>
namespace WebKit {
@@ -47,7 +47,15 @@ uint64_t StatisticsRequest::addOutstandingRequest()
{
static int64_t uniqueRequestID;
+#if HAVE(ATOMICS_64BIT)
uint64_t requestID = atomicIncrement(&uniqueRequestID);
+#else
+ static Mutex uniqueRequestMutex;
+ uniqueRequestMutex.lock();
+ uint64_t requestID = ++uniqueRequestID;
+ uniqueRequestMutex.unlock();
+#endif
+
m_outstandingRequests.add(requestID);
return requestID;
}
diff --git a/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp b/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp
index 128379f26..01ea5e6bd 100644
--- a/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp
+++ b/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp
@@ -250,7 +250,7 @@ void PopupMenuItemModel::buildItems(const Vector<WebPopupItem>& webPopupItems)
{
QString currentGroup;
m_items.reserveInitialCapacity(webPopupItems.size());
- for (int i = 0; i < webPopupItems.size(); i++) {
+ for (size_t i = 0; i < webPopupItems.size(); i++) {
const WebPopupItem& webPopupItem = webPopupItems[i];
if (webPopupItem.m_isLabel) {
currentGroup = webPopupItem.m_text;
diff --git a/Source/WebKit2/WebKit2.pri b/Source/WebKit2/WebKit2.pri
index cf154cc19..e8d4b80d0 100644
--- a/Source/WebKit2/WebKit2.pri
+++ b/Source/WebKit2/WebKit2.pri
@@ -75,7 +75,7 @@ INCLUDEPATH += $${ROOT_WEBKIT_DIR}/Source/WTF/wtf/qt
INCLUDEPATH += $$WEBKIT2_GENERATED_SOURCES_DIR
-linux-*: {
+linux-*:!android {
# -lrt is required for shm_open and shm_unlink.
LIBS += -lrt
}
diff --git a/Source/WebKit2/WebKit2.pro b/Source/WebKit2/WebKit2.pro
index 3426ff08f..66129d359 100644
--- a/Source/WebKit2/WebKit2.pro
+++ b/Source/WebKit2/WebKit2.pro
@@ -12,10 +12,3 @@ target.file = Target.pri
SUBDIRS += derived_sources target
addStrictSubdirOrderBetween(derived_sources, target)
-
-have?(QTQUICK) {
- webkit2qml.file = WebKit2QML.pri
- SUBDIRS += webkit2qml
-
- addStrictSubdirOrderBetween(target, webkit2qml)
-}
diff --git a/Source/WebKit2/WebKit2QML.pri b/Source/WebKit2/WebKit2QML.pri
deleted file mode 100644
index bd805e94e..000000000
--- a/Source/WebKit2/WebKit2QML.pri
+++ /dev/null
@@ -1,80 +0,0 @@
-# -------------------------------------------------------------------
-# Target file for the WebKit2 QML static library
-#
-# See 'Tools/qmake/README' for an overview of the build system
-# -------------------------------------------------------------------
-
-TEMPLATE = lib
-TARGET = WebKit2QML
-
-WEBKIT += wtf javascriptcore webcore webkit2
-
-load(webkit_modules)
-
-SOURCE_DIR = $${ROOT_WEBKIT_DIR}/Source/WebKit2
-
-# Remove include paths that point to directories containing
-# internal API, to prevent the accidental inclusion.
-INCLUDEPATH -= \
- $$SOURCE_DIR \
- $$SOURCE_DIR/Platform \
- $$SOURCE_DIR/Platform/CoreIPC \
- $$SOURCE_DIR/Platform/qt \
- $$SOURCE_DIR/Shared \
- $$SOURCE_DIR/Shared/linux/SandboxProcess \
- $$SOURCE_DIR/Shared/Authentication \
- $$SOURCE_DIR/Shared/CoordinatedGraphics \
- $$SOURCE_DIR/Shared/CoreIPCSupport \
- $$SOURCE_DIR/Shared/Downloads \
- $$SOURCE_DIR/Shared/Downloads/qt \
- $$SOURCE_DIR/Shared/Network \
- $$SOURCE_DIR/Shared/Plugins \
- $$SOURCE_DIR/Shared/Plugins/Netscape \
- $$SOURCE_DIR/Shared/qt \
- $$SOURCE_DIR/UIProcess \
- $$SOURCE_DIR/UIProcess/API/qt \
- $$SOURCE_DIR/UIProcess/Authentication \
- $$SOURCE_DIR/UIProcess/CoordinatedGraphics \
- $$SOURCE_DIR/UIProcess/Downloads \
- $$SOURCE_DIR/UIProcess/InspectorServer \
- $$SOURCE_DIR/UIProcess/InspectorServer/qt \
- $$SOURCE_DIR/UIProcess/Launcher \
- $$SOURCE_DIR/UIProcess/Notifications \
- $$SOURCE_DIR/UIProcess/Plugins \
- $$SOURCE_DIR/UIProcess/Storage \
- $$SOURCE_DIR/UIProcess/qt \
- $$SOURCE_DIR/UIProcess/texmap \
- $$SOURCE_DIR/WebProcess \
- $$SOURCE_DIR/WebProcess/ApplicationCache \
- $$SOURCE_DIR/WebProcess/Battery \
- $$SOURCE_DIR/WebProcess/Cookies \
- $$SOURCE_DIR/WebProcess/Cookies/qt \
- $$SOURCE_DIR/WebProcess/FullScreen \
- $$SOURCE_DIR/WebProcess/Geolocation \
- $$SOURCE_DIR/WebProcess/IconDatabase \
- $$SOURCE_DIR/WebProcess/InjectedBundle \
- $$SOURCE_DIR/WebProcess/InjectedBundle/DOM \
- $$SOURCE_DIR/WebProcess/InjectedBundle/API/c \
- $$SOURCE_DIR/WebProcess/MediaCache \
- $$SOURCE_DIR/WebProcess/NetworkInfo \
- $$SOURCE_DIR/WebProcess/Notifications \
- $$SOURCE_DIR/WebProcess/Plugins \
- $$SOURCE_DIR/WebProcess/Plugins/Netscape \
- $$SOURCE_DIR/WebProcess/ResourceCache \
- $$SOURCE_DIR/WebProcess/Storage \
- $$SOURCE_DIR/WebProcess/WebCoreSupport \
- $$SOURCE_DIR/WebProcess/WebCoreSupport/qt \
- $$SOURCE_DIR/WebProcess/WebPage \
- $$SOURCE_DIR/WebProcess/WebPage/CoordinatedGraphics \
- $$SOURCE_DIR/WebProcess/qt \
- $$SOURCE_DIR/PluginProcess
-
-CONFIG += staticlib
-
-SOURCES += \
- UIProcess/API/qt/qwebnavigationhistory.cpp
-
-HEADERS += \
- UIProcess/API/qt/qwebnavigationhistory_p.h \
- UIProcess/API/qt/qwebnavigationhistory_p_p.h
-
diff --git a/Source/WebKit2/config.h b/Source/WebKit2/config.h
index c80c29ef4..37cc06f6a 100644
--- a/Source/WebKit2/config.h
+++ b/Source/WebKit2/config.h
@@ -55,16 +55,7 @@ static const type& name() \
return name##Value; \
}
-#if defined(WIN32) || defined(_WIN32)
-
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0502
-#endif
-
-#ifndef WINVER
-#define WINVER 0x0502
-#endif
-
+#if OS(WINDOWS)
/* If we don't define these, they get defined in windef.h. */
/* We want to use std::min and std::max. */
#ifndef max
@@ -87,7 +78,7 @@ static const type& name() \
#include <CoreGraphics/CoreGraphics.h>
#endif
-#endif /* defined(WIN32) || defined(_WIN32) */
+#endif /* OS(WINDOWS) */
#ifdef __cplusplus
diff --git a/Source/api.pri b/Source/api.pri
index f1f2a0922..ccd206cc3 100644
--- a/Source/api.pri
+++ b/Source/api.pri
@@ -15,10 +15,7 @@ WEBKIT_DESTDIR = $${ROOT_BUILD_DIR}/lib
WEBKIT += wtf javascriptcore webcore
build?(webkit1): WEBKIT += webkit1
-build?(webkit2) {
- WEBKIT += webkit2
- have?(QTQUICK): WEBKIT += webkit2qml
-}
+build?(webkit2): WEBKIT += webkit2
# Ensure that changes to the WebKit1 and WebKit2 API will trigger a qmake of this
# file, which in turn runs syncqt to update the forwarding headers.
diff --git a/Tools/DumpRenderTree/config.h b/Tools/DumpRenderTree/config.h
index 6424465dc..05b264ed1 100644
--- a/Tools/DumpRenderTree/config.h
+++ b/Tools/DumpRenderTree/config.h
@@ -75,12 +75,6 @@
#define WTF_USE_CFNETWORK 1
#endif
-#undef _WIN32_WINNT
-#define _WIN32_WINNT 0x0502
-
-#undef WINVER
-#define WINVER 0x0502
-
#undef _WINSOCKAPI_
#define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h
#endif // PLATFORM(WIN)
diff --git a/Tools/qmake/mkspecs/features/configure.prf b/Tools/qmake/mkspecs/features/configure.prf
index f295f4641..2791b87cb 100644
--- a/Tools/qmake/mkspecs/features/configure.prf
+++ b/Tools/qmake/mkspecs/features/configure.prf
@@ -113,8 +113,8 @@ defineTest(finalizeConfigure) {
!mac:!contains(QT_CONFIG,icu) {
addReasonForSkippingBuild("ICU is required. To build QtWebKit with Qt 5 you need to build Qt 5 with libICU support. Check for ICU support being mentioned in qtbase/config.summary.")
}
- production_build:blackberry {
- addReasonForSkippingBuild("Build not supported on BB10 yet.")
+ production_build:blackberry|qnx {
+ addReasonForSkippingBuild("Build not supported on BB10/QNX yet.")
}
requiredPrograms = gperf python perl bison ruby flex
for(program, requiredPrograms): \
diff --git a/Tools/qmake/mkspecs/features/features.prf b/Tools/qmake/mkspecs/features/features.prf
index c532fcf6f..8649780a3 100644
--- a/Tools/qmake/mkspecs/features/features.prf
+++ b/Tools/qmake/mkspecs/features/features.prf
@@ -48,10 +48,10 @@ defineTest(detectFeatures) {
# We can't use Qt's 3rdparty sources for libjpeg and libpng outside of qtbase, but if Qt
# is using the system libraries, use them to take advantage of the WebCore image decoders as well.
contains(QT_CONFIG, system-jpeg): WEBKIT_CONFIG += use_libjpeg
- else: CONFIGURE_WARNINGS += "JPEG library not found, QImageDecoder will decode JPEG images"
+ else: CONFIGURE_WARNINGS += "Qt not configured to use system libjpeg, QImageDecoder will decode JPEG images"
contains(QT_CONFIG, system-png): WEBKIT_CONFIG += use_libpng
- else: CONFIGURE_WARNINGS += "PNG library not found, QImageDecoder will decode PNG images"
+ else: CONFIGURE_WARNINGS += "Qt not configured to use system libpng, QImageDecoder will decode PNG images"
linux-* {
config_libXcomposite: WEBKIT_CONFIG += have_xcomposite
@@ -97,15 +97,14 @@ defineTest(detectFeatures) {
# Enable CSS shaders when CSS filters and WebGL are enabled
enable?(css_filters):enable?(webgl): WEBKIT_CONFIG += css_shaders
- # HTML5 Media Support for non-Mac builds
- !mac {
- !contains(QT_CONFIG, no-pkg-config) {
- packagesExist("glib-2.0 gio-2.0 gstreamer-1.0 gstreamer-plugins-base-1.0") {
- WEBKIT_CONFIG += video use_gstreamer
- } else: packagesExist("glib-2.0 gio-2.0 \'gstreamer-0.10 >= 0.10.30\' \'gstreamer-plugins-base-0.10 >= 0.10.30\'") {
- WEBKIT_CONFIG += video use_gstreamer use_gstreamer010
- }
+ # HTML5 Media Support for builds with GStreamer
+ unix:!mac:!contains(QT_CONFIG, no-pkg-config) {
+ packagesExist("glib-2.0 gio-2.0 gstreamer-1.0 gstreamer-plugins-base-1.0") {
+ WEBKIT_CONFIG += video use_gstreamer
+ } else: packagesExist("glib-2.0 gio-2.0 \'gstreamer-0.10 >= 0.10.30\' \'gstreamer-plugins-base-0.10 >= 0.10.30\'") {
+ WEBKIT_CONFIG += video use_gstreamer use_gstreamer010
}
+ use?(gstreamer): WEBKIT_CONFIG += use_native_fullscreen_video
}
!enable?(video):qtHaveModule(multimediawidgets) {
@@ -113,7 +112,7 @@ defineTest(detectFeatures) {
}
!enable?(video) {
- CONFIGURE_WARNINGS += "Missing GStreamer, QTKit or QtMultimedia, disabling media element support"
+ CONFIGURE_WARNINGS += "Missing GStreamer or QtMultimedia, disabling HTML5 media element support"
}
# Try to use an system wide SQlite installation
@@ -124,8 +123,8 @@ defineTest(detectFeatures) {
isEmpty(SQLITE3SRCDIR):isEmpty(_QMAKE_SUPER_CACHE_): error("WebKit requires SQLite. Either make it available via pkg-config, set $SQLITE3SRCDIR or build WebKit under qt5.git.")
}
- # Gamepad API Support
- packagesExist(libudev): WEBKIT_CONFIG += gamepad
+ # Gamepad API Support (depends on udev)
+ linux: WEBKIT_CONFIG += gamepad
# Support for Graphics Surface
# GraphicsSurface requires GraphicsContext3D and hence use_3d_graphics
@@ -162,15 +161,15 @@ defineTest(santizeFeatures) {
# Disable animated smooth scrolling if request-animation-frame is disabled
!enable?(request_animation_frame): WEBKIT_CONFIG -= smooth_scrolling
- # Fullscreen API relies on WebKit2
- !build?(webkit2): WEBKIT_CONFIG -= fullscreen_api
-
# WK2's plugin process code requires NPAPI
!enable?(netscape_plugin_api): WEBKIT_CONFIG -= plugin_process
# Web Audio requires GStreamer.
!use?(gstreamer): WEBKIT_CONFIG -= web_audio
+ # GStreamer uses Glib
+ use?(gstreamer): WEBKIT_CONFIG += use_glib
+
# Minibrowser must be able to query for QtTestSupport
build?(qttestsupport): WEBKIT_CONFIG += have_qttestsupport
diff --git a/Tools/qmake/mkspecs/features/production_build.prf b/Tools/qmake/mkspecs/features/production_build.prf
index c980d09d0..478d1e770 100644
--- a/Tools/qmake/mkspecs/features/production_build.prf
+++ b/Tools/qmake/mkspecs/features/production_build.prf
@@ -7,7 +7,7 @@ CONFIG *= use_all_in_one_files
# resulting in the need of several gigabytes of memory at link-time. Reduce the pressure
# by compiling any static library like WTF or JSC with release flags instead and keep debug
# symbols for the static libraries that implement API.
-linux-*|win32-g++*:if(CONFIG(debug, debug|release)|contains(QT_CONFIG,separate_debug_info)):contains(TEMPLATE, lib):staticlib {
+if(linux-*:!contains(QMAKE_HOST.arch, x86_64))|win32-g++*:if(CONFIG(debug, debug|release)|contains(QT_CONFIG,separate_debug_info)):contains(TEMPLATE, lib):staticlib {
!equals(TARGET, WebKit2):!equals(TARGET, WebKitWidgets) {
CONFIG += no_debug_info
CONFIG -= separate_debug_info
diff --git a/Tools/qmake/mkspecs/features/unix/default_post.prf b/Tools/qmake/mkspecs/features/unix/default_post.prf
index 8c36146b6..a29534d3a 100644
--- a/Tools/qmake/mkspecs/features/unix/default_post.prf
+++ b/Tools/qmake/mkspecs/features/unix/default_post.prf
@@ -21,6 +21,9 @@ linux-*g++* {
# Treat warnings as errors on x86/Linux/GCC
isEqual(QT_ARCH,x86_64)|isEqual(QT_ARCH,i386): QMAKE_CXXFLAGS += -Werror
}
+}
+
+*-g++* {
greaterThan(QT_GCC_MAJOR_VERSION, 3):greaterThan(QT_GCC_MINOR_VERSION, 5) {
!contains(QMAKE_CXXFLAGS, -std=(c|gnu)\\+\\+(0x|11)) {
# We need to deactivate those warnings because some names conflicts with upcoming c++0x types (e.g.nullptr).
diff --git a/Tools/qmake/mkspecs/features/webkit_modules.prf b/Tools/qmake/mkspecs/features/webkit_modules.prf
index 2a520d7f4..189387835 100644
--- a/Tools/qmake/mkspecs/features/webkit_modules.prf
+++ b/Tools/qmake/mkspecs/features/webkit_modules.prf
@@ -7,7 +7,7 @@
# Reorder libraries so that the link and include order is correct,
# and make sure the case matches the original case.
-libraries = WebKit1 WebKit2QML WebKit2 WebCore ANGLE JavaScriptCore WTF
+libraries = WebKit1 WebKit2 WebCore ANGLE JavaScriptCore WTF
for(library, libraries) {
contains(WEBKIT, $$lower($$library)) {
WEBKIT -= $$lower($$library)
diff --git a/Tools/qmake/mkspecs/modules/webkit2qml.prf b/Tools/qmake/mkspecs/modules/webkit2qml.prf
deleted file mode 100644
index 06566f4b9..000000000
--- a/Tools/qmake/mkspecs/modules/webkit2qml.prf
+++ /dev/null
@@ -1,9 +0,0 @@
-# -------------------------------------------------------------------
-# Module file for WebKit2, used by targets that depend on WebKit2
-#
-# See 'Tools/qmake/README' for an overview of the build system
-# -------------------------------------------------------------------
-
-WEBKIT.webkit2qml.root_source_dir = $${ROOT_WEBKIT_DIR}/Source/WebKit2
-
-#include($${WEBKIT.webkit2.root_source_dir}/WebKit2QML.pri)