summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2016-11-07 09:36:50 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2017-02-02 12:31:10 +0000
commit5ae3854f795ac5c1a0f104bd8b66ed6f988181cd (patch)
tree197aac0ea37c400dfa582379b2bac84029e794a0
parent747609969d3a8bd95ed2293bb5d943660188ede4 (diff)
Imported WebKit commit 490f716dd2dd07fb0d6652795c62586e2e28ae27
Change-Id: I9f66467721cf923468af87915c260c1bb44e013e Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
-rw-r--r--Source/JavaScriptCore/CMakeLists.txt3
-rw-r--r--Source/JavaScriptCore/llint/LowLevelInterpreter.cpp2
-rw-r--r--Source/JavaScriptCore/offlineasm/asm.rb13
-rw-r--r--Source/JavaScriptCore/offlineasm/x86.rb29
-rw-r--r--Source/JavaScriptCore/shell/CMakeLists.txt2
-rw-r--r--Source/PlatformQt.cmake12
-rw-r--r--Source/WTF/wtf/Assertions.h5
-rw-r--r--Source/WTF/wtf/InlineASM.h9
-rw-r--r--Source/WTF/wtf/PlatformQt.cmake12
-rw-r--r--Source/WTF/wtf/win/GDIObject.h2
-rw-r--r--Source/WebCore/CMakeLists.txt1
-rw-r--r--Source/WebCore/PlatformQt.cmake7
-rw-r--r--Source/WebCore/bridge/qt/qt_class.cpp5
-rw-r--r--Source/WebCore/bridge/qt/qt_class.h11
-rw-r--r--Source/WebCore/bridge/qt/qt_instance.cpp10
-rw-r--r--Source/WebCore/bridge/qt/qt_instance.h23
-rw-r--r--Source/WebCore/bridge/qt/qt_runtime.h8
-rw-r--r--Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp12
-rw-r--r--Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp2
-rw-r--r--Source/WebCore/platform/graphics/qt/ImageDecoderQt.h16
-rw-r--r--Source/WebCore/platform/network/qt/CookieJarQt.h6
-rw-r--r--Source/WebCore/platform/network/qt/NetworkStateNotifierPrivate.h2
-rw-r--r--Source/WebCore/platform/network/qt/QNetworkReplyHandler.h18
-rw-r--r--Source/WebCore/platform/network/qt/SocketStreamHandle.h8
-rw-r--r--Source/WebCore/platform/network/qt/SocketStreamHandlePrivate.h2
-rw-r--r--Source/WebCore/platform/qt/DeviceMotionClientQt.h14
-rw-r--r--Source/WebCore/platform/qt/DeviceMotionProviderQt.h6
-rw-r--r--Source/WebCore/platform/qt/DeviceOrientationClientQt.h12
-rw-r--r--Source/WebCore/platform/qt/DeviceOrientationProviderQt.h6
-rw-r--r--Source/WebCore/platform/qt/GamepadsQt.cpp4
-rw-r--r--Source/WebCore/platform/qt/MainThreadSharedTimerQt.cpp2
-rw-r--r--Source/WebCore/platform/qt/RenderThemeQStyle.cpp24
-rw-r--r--Source/WebCore/platform/qt/RenderThemeQStyle.h62
-rw-r--r--Source/WebCore/platform/qt/RenderThemeQt.cpp12
-rw-r--r--Source/WebCore/platform/qt/RenderThemeQt.h4
-rw-r--r--Source/WebCore/platform/qt/RenderThemeQtMobile.cpp4
-rw-r--r--Source/WebCore/platform/qt/RenderThemeQtMobile.h44
-rw-r--r--Source/WebCore/platform/qt/ScrollbarThemeQStyle.h22
-rw-r--r--Source/WebCore/platform/qt/WidgetQt.cpp2
-rw-r--r--Source/WebKit/CMakeLists.txt2
-rw-r--r--Source/WebKit/PlatformQt.cmake3
-rw-r--r--Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp11
-rw-r--r--Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h151
-rw-r--r--Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.cpp5
-rw-r--r--Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.h20
-rw-r--r--Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp1
-rw-r--r--Source/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.cpp1
-rw-r--r--Source/WebKit/qt/WebCoreSupport/IconDatabaseClientQt.h14
-rw-r--r--Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp3
-rw-r--r--Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h10
-rw-r--r--Source/WebKit/qt/WebCoreSupport/PopupMenuQt.h10
-rw-r--r--Source/WebKit/qt/WebCoreSupport/ProgressTrackerClientQt.cpp1
-rw-r--r--Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp24
-rw-r--r--Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.h24
-rw-r--r--Source/WebKit/qt/WebCoreSupport/QWebFrameData.cpp51
-rw-r--r--Source/WebKit/qt/WebCoreSupport/QWebFrameData.h47
-rw-r--r--Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp1
-rw-r--r--Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.h5
-rw-r--r--Source/WebKit/qt/WebCoreSupport/TextCheckerClientQt.h18
-rw-r--r--Source/WebKit/qt/WebCoreSupport/TextureMapperLayerClientQt.h2
-rw-r--r--Source/WebKit/qt/WidgetApi/qgraphicswebview.h54
-rw-r--r--Source/WebKit/qt/WidgetApi/qwebframe.cpp3
-rw-r--r--Source/WebKit/qt/WidgetApi/qwebframe.h2
-rw-r--r--Source/WebKit/qt/WidgetApi/qwebinspector.h12
-rw-r--r--Source/WebKit/qt/WidgetApi/qwebpage.cpp2
-rw-r--r--Source/WebKit/qt/WidgetApi/qwebpage.h2
-rw-r--r--Source/WebKit/qt/WidgetApi/qwebview.h48
-rw-r--r--Source/WebKit/qt/WidgetApi/qwebviewaccessible_p.h32
-rw-r--r--Source/WebKit/qt/WidgetSupport/InspectorClientWebPage.h4
-rw-r--r--Source/WebKit/qt/WidgetSupport/PageClientQt.h96
-rw-r--r--Source/WebKit/qt/WidgetSupport/QGraphicsWidgetPluginImpl.h16
-rw-r--r--Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.h54
-rw-r--r--Source/WebKit/qt/WidgetSupport/QWebUndoCommand.h6
-rw-r--r--Source/WebKit/qt/WidgetSupport/QWidgetPluginImpl.h16
-rw-r--r--Source/WebKit/qt/WidgetSupport/QtFallbackWebPopup.h10
-rw-r--r--Source/WebKit/qt/WidgetSupport/QtWebComboBox.h6
-rw-r--r--Source/WebKit/qt/declarative/experimental/plugin.cpp2
-rw-r--r--Source/WebKit/qt/declarative/plugin.cpp4
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qquickwebpage_p.h2
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h46
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h22
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebchannelwebkittransport_p.h2
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebiconimageprovider_p.h2
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory_p.h6
-rw-r--r--Source/WebKit2/UIProcess/InspectorServer/WebInspectorServer.h12
-rw-r--r--Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp4
-rw-r--r--Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.h18
-rw-r--r--Source/WebKit2/UIProcess/qt/QtDialogRunner.h2
-rw-r--r--Source/WebKit2/UIProcess/qt/QtPageClient.h2
-rw-r--r--Source/WebKit2/UIProcess/qt/QtTapGestureRecognizer.h4
-rw-r--r--Source/WebKit2/UIProcess/qt/QtWebIconDatabaseClient.h2
-rw-r--r--Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.h4
-rw-r--r--Source/WebKit2/UIProcess/qt/QtWebPageSGNode.cpp12
-rw-r--r--Source/WebKit2/UIProcess/qt/QtWebPageSGNode.h2
-rw-r--r--Source/WebKit2/UIProcess/qt/WebColorPickerQt.h6
-rw-r--r--Source/WebKit2/UIProcess/qt/WebGeolocationProviderQt.h2
-rw-r--r--Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp8
-rw-r--r--Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.h6
-rw-r--r--Source/WebKit2/WebProcess/qt/QtNetworkReply.h14
-rw-r--r--Source/cmake/ECMGeneratePkgConfigFile.cmake10
-rw-r--r--Source/cmake/OptionsCommon.cmake7
-rw-r--r--Source/cmake/OptionsQt.cmake115
-rw-r--r--Source/cmake/WebKitHelpers.cmake8
-rw-r--r--Source/cmake_uninstall.cmake.in21
-rw-r--r--Source/sync.profile11
-rw-r--r--Tools/PlatformQt.cmake6
-rwxr-xr-xTools/qt/convert-prl-libs-to-cmake.pl96
-rw-r--r--Tools/qt/manifest.txt6
108 files changed, 945 insertions, 724 deletions
diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt
index d570b8dd0..1957446b4 100644
--- a/Source/JavaScriptCore/CMakeLists.txt
+++ b/Source/JavaScriptCore/CMakeLists.txt
@@ -987,6 +987,7 @@ target_link_libraries(LLIntOffsetsExtractor WTF)
# after every asm.rb run.
if (MSVC)
set(LLIntOutput LowLevelInterpreterWin.asm)
+ set(OFFLINE_ASM_ARGS --assembler=MASM)
else ()
set(LLIntOutput LLIntAssembly.h)
endif ()
@@ -995,7 +996,7 @@ add_custom_command(
OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${LLIntOutput}
MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb
DEPENDS LLIntOffsetsExtractor ${LLINT_ASM} ${OFFLINE_ASM} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InitBytecodes.asm
- COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb -I${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/ ${JAVASCRIPTCORE_DIR}/llint/LowLevelInterpreter.asm $<TARGET_FILE:LLIntOffsetsExtractor> ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${LLIntOutput}
+ COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb -I${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/ ${JAVASCRIPTCORE_DIR}/llint/LowLevelInterpreter.asm $<TARGET_FILE:LLIntOffsetsExtractor> ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${LLIntOutput} ${OFFLINE_ASM_ARGS}
COMMAND ${CMAKE_COMMAND} -E touch_nocreate ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${LLIntOutput}
WORKING_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
VERBATIM)
diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp b/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp
index 72bcddf57..4251338fd 100644
--- a/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp
+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp
@@ -483,7 +483,7 @@ JSValue CLoop::execute(OpcodeID entryOpcodeID, void* executableAddress, VM* vm,
} // namespace JSC
-#elif !OS(WINDOWS)
+#elif !COMPILER(MSVC)
//============================================================================
// Define the opcode dispatch mechanism when using an ASM loop:
diff --git a/Source/JavaScriptCore/offlineasm/asm.rb b/Source/JavaScriptCore/offlineasm/asm.rb
index e93d85536..36482660e 100644
--- a/Source/JavaScriptCore/offlineasm/asm.rb
+++ b/Source/JavaScriptCore/offlineasm/asm.rb
@@ -29,6 +29,7 @@ require "config"
require "backends"
require "digest/sha1"
require "offsets"
+require 'optparse'
require "parser"
require "self_hash"
require "settings"
@@ -301,6 +302,15 @@ asmFile = ARGV.shift
offsetsFile = ARGV.shift
outputFlnm = ARGV.shift
+$options = {}
+OptionParser.new do |opts|
+ opts.banner = "Usage: asm.rb asmFile offsetsFile outputFileName [--assembler=<ASM>]"
+ # This option is currently only used to specify the masm assembler
+ opts.on("--assembler=[ASM]", "Specify an assembler to use.") do |assembler|
+ $options[:assembler] = assembler
+ end
+end.parse!
+
begin
configurationList = offsetsAndConfigurationIndex(offsetsFile)
rescue MissingMagicValuesException
@@ -319,7 +329,8 @@ $commentPrefix = $emitWinAsm ? ";" : "//"
inputHash =
$commentPrefix + " offlineasm input hash: " + parseHash(asmFile) +
" " + Digest::SHA1.hexdigest(configurationList.map{|v| (v[0] + [v[1]]).join(' ')}.join(' ')) +
- " " + selfHash
+ " " + selfHash +
+ " " + Digest::SHA1.hexdigest($options.has_key?(:assembler) ? $options[:assembler] : "")
if FileTest.exist? outputFlnm
File.open(outputFlnm, "r") {
diff --git a/Source/JavaScriptCore/offlineasm/x86.rb b/Source/JavaScriptCore/offlineasm/x86.rb
index 2e0693726..0da7a0240 100644
--- a/Source/JavaScriptCore/offlineasm/x86.rb
+++ b/Source/JavaScriptCore/offlineasm/x86.rb
@@ -125,20 +125,12 @@ def useX87
end
end
-def isCompilingOnWindows
- ENV['OS'] == 'Windows_NT'
-end
-
-def isGCC
- !isCompilingOnWindows
-end
-
def isMSVC
- isCompilingOnWindows
+ $options.has_key?(:assembler) && $options[:assembler] == "MASM"
end
def isIntelSyntax
- isCompilingOnWindows
+ $options.has_key?(:assembler) && $options[:assembler] == "MASM"
end
def register(name)
@@ -520,7 +512,6 @@ class Sequence
end
class Instruction
- @@floatingPointCompareImplicitOperand = isIntelSyntax ? "st(0), " : ""
def x86Operands(*kinds)
raise unless kinds.size == operands.size
@@ -574,6 +565,10 @@ class Instruction
raise
end
end
+
+ def getImplicitOperandString
+ isIntelSyntax ? "st(0), " : ""
+ end
def handleX86OpWithNumOperands(opcode, kind, numOperands)
if numOperands == 3
@@ -808,20 +803,21 @@ class Instruction
end
def handleX87Compare(mode)
+ floatingPointCompareImplicitOperand = getImplicitOperandString
case mode
when :normal
if (operands[0].x87DefaultStackPosition == 0)
- $asm.puts "fucomi #{@@floatingPointCompareImplicitOperand}#{operands[1].x87Operand(0)}"
+ $asm.puts "fucomi #{floatingPointCompareImplicitOperand}#{operands[1].x87Operand(0)}"
else
$asm.puts "fld #{operands[0].x87Operand(0)}"
- $asm.puts "fucomip #{@@floatingPointCompareImplicitOperand}#{operands[1].x87Operand(1)}"
+ $asm.puts "fucomip #{floatingPointCompareImplicitOperand}#{operands[1].x87Operand(1)}"
end
when :reverse
if (operands[1].x87DefaultStackPosition == 0)
- $asm.puts "fucomi #{@@floatingPointCompareImplicitOperand}#{operands[0].x87Operand(0)}"
+ $asm.puts "fucomi #{floatingPointCompareImplicitOperand}#{operands[0].x87Operand(0)}"
else
$asm.puts "fld #{operands[1].x87Operand(0)}"
- $asm.puts "fucomip #{@@floatingPointCompareImplicitOperand}#{operands[0].x87Operand(1)}"
+ $asm.puts "fucomip #{floatingPointCompareImplicitOperand}#{operands[0].x87Operand(1)}"
end
else
raise mode.inspect
@@ -1108,6 +1104,7 @@ class Instruction
$asm.puts "cvttsd2si #{operands[0].x86Operand(:double)}, #{operands[1].x86Operand(:int)}"
when "bcd2i"
if useX87
+ floatingPointCompareImplicitOperand = getImplicitOperandString
sp = RegisterID.new(nil, "sp")
if (operands[0].x87DefaultStackPosition == 0)
$asm.puts "fistl -4(#{sp.x86Operand(:ptr)})"
@@ -1119,7 +1116,7 @@ class Instruction
$asm.puts "test#{x86Suffix(:int)} #{operands[1].x86Operand(:int)}, #{operands[1].x86Operand(:int)}"
$asm.puts "je #{operands[2].asmLabel}"
$asm.puts "fild#{x86Suffix(:int)} #{getSizeString(:int)}#{offsetRegister(-4, sp.x86Operand(:ptr))}"
- $asm.puts "fucomip #{@@floatingPointCompareImplicitOperand}#{operands[0].x87Operand(1)}"
+ $asm.puts "fucomip #{floatingPointCompareImplicitOperand}#{operands[0].x87Operand(1)}"
$asm.puts "jp #{operands[2].asmLabel}"
$asm.puts "jne #{operands[2].asmLabel}"
else
diff --git a/Source/JavaScriptCore/shell/CMakeLists.txt b/Source/JavaScriptCore/shell/CMakeLists.txt
index 633ce4233..27d81336f 100644
--- a/Source/JavaScriptCore/shell/CMakeLists.txt
+++ b/Source/JavaScriptCore/shell/CMakeLists.txt
@@ -37,7 +37,7 @@ if (SHOULD_INSTALL_JS_SHELL)
install(TARGETS jsc DESTINATION "${EXEC_INSTALL_DIR}")
endif ()
-if (WIN32)
+if (TARGET jscLib)
add_dependencies(jsc jscLib)
endif ()
diff --git a/Source/PlatformQt.cmake b/Source/PlatformQt.cmake
index 684595cce..fb3e0acb1 100644
--- a/Source/PlatformQt.cmake
+++ b/Source/PlatformQt.cmake
@@ -130,3 +130,15 @@ if (GENERATE_DOCUMENTATION)
install(DIRECTORY "${DOC_OUTPUT_DIR}/qtwebkit" DESTINATION ${DOC_INSTALL_DIR})
install(FILES "${DOC_OUTPUT_DIR}/qtwebkit.qch" DESTINATION ${DOC_INSTALL_DIR})
endif ()
+
+# Uninstall target
+
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY
+)
+
+add_custom_target(uninstall
+ COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
+)
diff --git a/Source/WTF/wtf/Assertions.h b/Source/WTF/wtf/Assertions.h
index 9b4b5c1fc..28060cc98 100644
--- a/Source/WTF/wtf/Assertions.h
+++ b/Source/WTF/wtf/Assertions.h
@@ -85,10 +85,13 @@
#define WTF_PRETTY_FUNCTION __FUNCTION__
#endif
+#if COMPILER(MINGW)
+/* By default MinGW emits warnings when C99 format attributes are used, even if __USE_MINGW_ANSI_STDIO is defined */
+#define WTF_ATTRIBUTE_PRINTF(formatStringArgument, extraArguments) __attribute__((__format__(gnu_printf, formatStringArgument, extraArguments)))
+#elif COMPILER(GCC_OR_CLANG) && !defined(__OBJC__)
/* WTF logging functions can process %@ in the format string to log a NSObject* but the printf format attribute
emits a warning when %@ is used in the format string. Until <rdar://problem/5195437> is resolved we can't include
the attribute when being used from Objective-C code in case it decides to use %@. */
-#if COMPILER(GCC_OR_CLANG) && !defined(__OBJC__)
#define WTF_ATTRIBUTE_PRINTF(formatStringArgument, extraArguments) __attribute__((__format__(printf, formatStringArgument, extraArguments)))
#else
#define WTF_ATTRIBUTE_PRINTF(formatStringArgument, extraArguments)
diff --git a/Source/WTF/wtf/InlineASM.h b/Source/WTF/wtf/InlineASM.h
index d440bda3d..965e28176 100644
--- a/Source/WTF/wtf/InlineASM.h
+++ b/Source/WTF/wtf/InlineASM.h
@@ -80,10 +80,11 @@
#if OS(DARWIN)
#define LOCAL_LABEL_STRING(name) "L" #name
#elif OS(LINUX) \
- || OS(FREEBSD) \
- || OS(OPENBSD) \
- || OS(HURD) \
- || OS(NETBSD)
+ || OS(FREEBSD) \
+ || OS(OPENBSD) \
+ || OS(HURD) \
+ || OS(NETBSD) \
+ || COMPILER(MINGW)
// GNU as-compatible syntax.
#define LOCAL_LABEL_STRING(name) ".L" #name
#endif
diff --git a/Source/WTF/wtf/PlatformQt.cmake b/Source/WTF/wtf/PlatformQt.cmake
index 42f4e86ff..a85dc6abe 100644
--- a/Source/WTF/wtf/PlatformQt.cmake
+++ b/Source/WTF/wtf/PlatformQt.cmake
@@ -15,12 +15,24 @@ list(APPEND WTF_LIBRARIES
${CMAKE_THREAD_LIBS_INIT}
)
+if (SHARED_CORE)
+ set(WTF_LIBRARY_TYPE SHARED)
+else ()
+ set(WTF_LIBRARY_TYPE STATIC)
+endif ()
+
if (QT_STATIC_BUILD)
list(APPEND WTF_LIBRARIES
${STATIC_LIB_DEPENDENCIES}
)
endif ()
+if (UNIX AND NOT APPLE)
+ list(APPEND WTF_SOURCES
+ UniStdExtras.cpp
+ )
+endif ()
+
if (USE_GLIB)
list(APPEND WTF_SOURCES
glib/GRefPtr.cpp
diff --git a/Source/WTF/wtf/win/GDIObject.h b/Source/WTF/wtf/win/GDIObject.h
index 791861daf..11b93c247 100644
--- a/Source/WTF/wtf/win/GDIObject.h
+++ b/Source/WTF/wtf/win/GDIObject.h
@@ -111,7 +111,7 @@ template<typename T> inline void swap(GDIObject<T>& a, GDIObject<T>& b)
}
// Nearly all GDI types use the same DeleteObject call.
-template<typename T> inline void deleteObject<T>(T object)
+template<typename T> inline void deleteObject(T object)
{
if (object)
::DeleteObject(object);
diff --git a/Source/WebCore/CMakeLists.txt b/Source/WebCore/CMakeLists.txt
index 58fc73285..404af56e6 100644
--- a/Source/WebCore/CMakeLists.txt
+++ b/Source/WebCore/CMakeLists.txt
@@ -3798,6 +3798,7 @@ if (ENABLE_GRAPHICS_CONTEXT_3D AND NOT WIN32)
)
list(APPEND WebCore_LIBRARIES ANGLESupport)
WEBKIT_SET_EXTRA_COMPILER_FLAGS(ANGLESupport IGNORECXX_WARNINGS)
+ QT_ADD_EXTRA_WEBKIT_TARGET_EXPORT(ANGLESupport)
endif ()
target_link_libraries(WebCore ${WebCore_LIBRARIES})
diff --git a/Source/WebCore/PlatformQt.cmake b/Source/WebCore/PlatformQt.cmake
index 84e9127eb..4e5909307 100644
--- a/Source/WebCore/PlatformQt.cmake
+++ b/Source/WebCore/PlatformQt.cmake
@@ -147,13 +147,6 @@ list(APPEND WebCore_SOURCES
platform/text/qt/TextBreakIteratorInternalICUQt.cpp
)
-if (SQLITE_SOURCE_FILE)
- list(APPEND WebCore_SOURCES
- "${SQLITE_SOURCE_FILE}"
- )
- add_definitions(-DSQLITE_CORE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_COMPLETE)
-endif ()
-
if (ENABLE_DEVICE_ORIENTATION)
list(APPEND WebCore_SOURCES
platform/qt/DeviceMotionClientQt.cpp
diff --git a/Source/WebCore/bridge/qt/qt_class.cpp b/Source/WebCore/bridge/qt/qt_class.cpp
index 706ca6afd..5efebc0fd 100644
--- a/Source/WebCore/bridge/qt/qt_class.cpp
+++ b/Source/WebCore/bridge/qt/qt_class.cpp
@@ -58,11 +58,6 @@ QtClass* QtClass::classForObject(QObject* o)
return aClass;
}
-const char* QtClass::name() const
-{
- return m_metaObject->className();
-}
-
// We use this to get at signals (so we can return a proper function object,
// and not get wrapped in RuntimeMethod). Also, use this for methods,
// so we can cache the object and return the same object for the same
diff --git a/Source/WebCore/bridge/qt/qt_class.h b/Source/WebCore/bridge/qt/qt_class.h
index 1256291fd..23eb6af9f 100644
--- a/Source/WebCore/bridge/qt/qt_class.h
+++ b/Source/WebCore/bridge/qt/qt_class.h
@@ -32,19 +32,18 @@ namespace JSC {
namespace Bindings {
-class QtClass : public Class {
+class QtClass final : public Class {
protected:
QtClass(const QMetaObject*);
public:
static QtClass* classForObject(QObject*);
- virtual ~QtClass();
+ ~QtClass();
- virtual const char* name() const;
- virtual Method* methodNamed(PropertyName, Instance*) const;
- virtual Field* fieldNamed(PropertyName, Instance*) const;
+ Method* methodNamed(PropertyName, Instance*) const final;
+ Field* fieldNamed(PropertyName, Instance*) const final;
- virtual JSValue fallbackObject(ExecState*, Instance*, PropertyName);
+ JSValue fallbackObject(ExecState*, Instance*, PropertyName) final;
private:
QtClass(const QtClass&); // prohibit copying
diff --git a/Source/WebCore/bridge/qt/qt_instance.cpp b/Source/WebCore/bridge/qt/qt_instance.cpp
index 124288e9b..665f79ee8 100644
--- a/Source/WebCore/bridge/qt/qt_instance.cpp
+++ b/Source/WebCore/bridge/qt/qt_instance.cpp
@@ -177,16 +177,6 @@ RuntimeObject* QtInstance::newRuntimeObject(ExecState* exec)
return QtRuntimeObject::create(exec->vm(), WebCore::deprecatedGetDOMStructure<QtRuntimeObject>(exec), this);
}
-void QtInstance::begin()
-{
- // Do nothing.
-}
-
-void QtInstance::end()
-{
- // Do nothing.
-}
-
void QtInstance::getPropertyNames(ExecState* exec, PropertyNameArray& array)
{
// This is the enumerable properties, so put:
diff --git a/Source/WebCore/bridge/qt/qt_instance.h b/Source/WebCore/bridge/qt/qt_instance.h
index 844a5c3ec..5d5c9c6f7 100644
--- a/Source/WebCore/bridge/qt/qt_instance.h
+++ b/Source/WebCore/bridge/qt/qt_instance.h
@@ -58,7 +58,7 @@ private:
RefPtr<WeakMapImpl> m_impl;
};
-class QtInstance : public Instance {
+class QtInstance final : public Instance {
public:
enum ValueOwnership {
QtOwnership,
@@ -68,19 +68,16 @@ public:
~QtInstance();
- virtual Class* getClass() const;
- virtual RuntimeObject* newRuntimeObject(ExecState*);
+ Class* getClass() const override;
+ RuntimeObject* newRuntimeObject(ExecState*) final;
- virtual void begin();
- virtual void end();
+ JSValue valueOf(ExecState*) const final;
+ JSValue defaultValue(ExecState*, PreferredPrimitiveType) const final;
- virtual JSValue valueOf(ExecState*) const;
- virtual JSValue defaultValue(ExecState*, PreferredPrimitiveType) const;
+ JSValue getMethod(ExecState*, PropertyName) final;
+ JSValue invokeMethod(ExecState*, RuntimeMethod*) final;
- virtual JSValue getMethod(ExecState*, PropertyName);
- virtual JSValue invokeMethod(ExecState*, RuntimeMethod*);
-
- virtual void getPropertyNames(ExecState*, PropertyNameArray&);
+ void getPropertyNames(ExecState*, PropertyNameArray&) final;
JSValue stringValue(ExecState*) const;
JSValue numberValue(ExecState*) const;
@@ -91,8 +88,8 @@ public:
static PassRefPtr<QtInstance> getQtInstance(QObject*, PassRefPtr<RootObject>, ValueOwnership);
- virtual bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
- virtual void put(JSObject*, ExecState*, PropertyName, JSValue, PutPropertySlot&);
+ bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&) final;
+ void put(JSObject*, ExecState*, PropertyName, JSValue, PutPropertySlot&) final;
static QtInstance* getInstance(JSObject*);
diff --git a/Source/WebCore/bridge/qt/qt_runtime.h b/Source/WebCore/bridge/qt/qt_runtime.h
index c1e42a333..34a97244a 100644
--- a/Source/WebCore/bridge/qt/qt_runtime.h
+++ b/Source/WebCore/bridge/qt/qt_runtime.h
@@ -41,7 +41,7 @@ class JSDOMGlobalObject;
namespace JSC {
namespace Bindings {
-class QtField : public Field {
+class QtField final : public Field {
public:
typedef enum {
@@ -66,8 +66,8 @@ public:
: m_type(ChildObject), m_childObject(child)
{}
- virtual JSValue valueFromInstance(ExecState*, const Instance*) const;
- virtual void setValueToInstance(ExecState*, const Instance*, JSValue) const;
+ JSValue valueFromInstance(ExecState*, const Instance*) const final;
+ void setValueToInstance(ExecState*, const Instance*, JSValue) const final;
QByteArray name() const;
QtFieldType fieldType() const {return m_type;}
private:
@@ -109,7 +109,7 @@ private:
// A QtConnectionObject represents a connection created inside JS. It will connect its own execute() slot
// with the appropriate signal of 'sender'. When execute() is called, it will call JS 'receiverFunction'.
-class QtConnectionObject : public QObject
+class QtConnectionObject final : public QObject
{
Q_OBJECT_FAKE
public:
diff --git a/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp b/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
index 9e992381c..a0b76cc88 100644
--- a/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
+++ b/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
@@ -56,18 +56,18 @@ typedef char GLchar;
#define GL_DEPTH24_STENCIL8 0x88F0
#endif
-class GraphicsContext3DPrivate
+class GraphicsContext3DPrivate final
: public TextureMapperPlatformLayer
{
public:
GraphicsContext3DPrivate(GraphicsContext3D*, HostWindow*, GraphicsContext3D::RenderStyle);
~GraphicsContext3DPrivate();
- void paintToTextureMapper(TextureMapper&, const FloatRect& target, const TransformationMatrix&, float opacity) override;
+ void paintToTextureMapper(TextureMapper&, const FloatRect& target, const TransformationMatrix&, float opacity) final;
#if USE(GRAPHICS_SURFACE)
- IntSize platformLayerSize() const override;
- uint32_t copyToGraphicsSurface() override;
- GraphicsSurfaceToken graphicsSurfaceToken() const override;
+ IntSize platformLayerSize() const final;
+ uint32_t copyToGraphicsSurface() final;
+ GraphicsSurfaceToken graphicsSurfaceToken() const final;
#endif
QRectF boundingRect() const;
@@ -365,6 +365,8 @@ void GraphicsContext3DPrivate::createGraphicsSurfaces(const IntSize& size)
m_graphicsSurface = nullptr;
else
m_graphicsSurface = GraphicsSurface::create(size, m_surfaceFlags, m_platformContext);
+#else
+ UNUSED_PARAM(size);
#endif
}
diff --git a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index c29c466fa..d1ab885d9 100644
--- a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -990,7 +990,7 @@ void drawFocusRingForPath(QPainter* p, const QPainterPath& path, const Color& co
p->setRenderHint(QPainter::Antialiasing, antiAlias);
}
-void GraphicsContext::drawFocusRing(const Path& path, float /* width */, float offset, const Color& color)
+void GraphicsContext::drawFocusRing(const Path& path, float /* width */, float /* offset */, const Color& color)
{
// FIXME: Use 'offset' for something? http://webkit.org/b/49909
diff --git a/Source/WebCore/platform/graphics/qt/ImageDecoderQt.h b/Source/WebCore/platform/graphics/qt/ImageDecoderQt.h
index 8169251c4..aa4385194 100644
--- a/Source/WebCore/platform/graphics/qt/ImageDecoderQt.h
+++ b/Source/WebCore/platform/graphics/qt/ImageDecoderQt.h
@@ -37,21 +37,21 @@
namespace WebCore {
-class ImageDecoderQt : public ImageDecoder
+class ImageDecoderQt final : public ImageDecoder
{
public:
ImageDecoderQt(ImageSource::AlphaOption, ImageSource::GammaAndColorProfileOption);
~ImageDecoderQt();
- virtual void setData(SharedBuffer* data, bool allDataReceived);
- virtual bool isSizeAvailable();
- virtual size_t frameCount();
- virtual int repetitionCount() const;
- virtual ImageFrame* frameBufferAtIndex(size_t index);
+ void setData(SharedBuffer* data, bool allDataReceived) final;
+ bool isSizeAvailable() final;
+ size_t frameCount() final;
+ int repetitionCount() const final;
+ ImageFrame* frameBufferAtIndex(size_t index) final;
- virtual String filenameExtension() const;
+ String filenameExtension() const final;
- virtual void clearFrameBufferCache(size_t clearBeforeFrame);
+ void clearFrameBufferCache(size_t clearBeforeFrame) final;
private:
ImageDecoderQt(const ImageDecoderQt&);
diff --git a/Source/WebCore/platform/network/qt/CookieJarQt.h b/Source/WebCore/platform/network/qt/CookieJarQt.h
index 469ffa7c8..edc2813d1 100644
--- a/Source/WebCore/platform/network/qt/CookieJarQt.h
+++ b/Source/WebCore/platform/network/qt/CookieJarQt.h
@@ -30,7 +30,7 @@
namespace WebCore {
-class SharedCookieJarQt : public QNetworkCookieJar {
+class SharedCookieJarQt final : public QNetworkCookieJar {
Q_OBJECT
public:
static SharedCookieJarQt* shared();
@@ -38,10 +38,10 @@ public:
void destroy();
void getHostnamesWithCookies(HashSet<String>&);
- bool deleteCookie(const QNetworkCookie&);
+ bool deleteCookie(const QNetworkCookie&) final;
void deleteCookiesForHostname(const String&);
void deleteAllCookies();
- bool setCookiesFromUrl(const QList<QNetworkCookie>&, const QUrl&);
+ bool setCookiesFromUrl(const QList<QNetworkCookie>&, const QUrl&) final;
void loadCookies();
private:
diff --git a/Source/WebCore/platform/network/qt/NetworkStateNotifierPrivate.h b/Source/WebCore/platform/network/qt/NetworkStateNotifierPrivate.h
index 3b74d7ba4..5791c19bc 100644
--- a/Source/WebCore/platform/network/qt/NetworkStateNotifierPrivate.h
+++ b/Source/WebCore/platform/network/qt/NetworkStateNotifierPrivate.h
@@ -30,7 +30,7 @@ namespace WebCore {
class NetworkStateNotifier;
-class NetworkStateNotifierPrivate : public QObject {
+class NetworkStateNotifierPrivate final : public QObject {
Q_OBJECT
public:
NetworkStateNotifierPrivate(NetworkStateNotifier*);
diff --git a/Source/WebCore/platform/network/qt/QNetworkReplyHandler.h b/Source/WebCore/platform/network/qt/QNetworkReplyHandler.h
index eb4aba4a8..4619e4857 100644
--- a/Source/WebCore/platform/network/qt/QNetworkReplyHandler.h
+++ b/Source/WebCore/platform/network/qt/QNetworkReplyHandler.h
@@ -43,7 +43,7 @@ class ResourceRequest;
class ResourceResponse;
class QNetworkReplyHandler;
-class QNetworkReplyHandlerCallQueue : public QObject {
+class QNetworkReplyHandlerCallQueue final : public QObject {
Q_OBJECT
public:
QNetworkReplyHandlerCallQueue(QNetworkReplyHandler*, bool deferSignals);
@@ -67,7 +67,7 @@ private:
Q_INVOKABLE void flush();
};
-class QNetworkReplyWrapper : public QObject {
+class QNetworkReplyWrapper final : public QObject {
Q_OBJECT
public:
QNetworkReplyWrapper(QNetworkReplyHandlerCallQueue*, QNetworkReply*, bool sniffMIMETypes, QObject* parent = 0);
@@ -115,7 +115,7 @@ private:
bool m_sniffMIMETypes;
};
-class QNetworkReplyHandler : public QObject
+class QNetworkReplyHandler final : public QObject
{
Q_OBJECT
public:
@@ -150,7 +150,7 @@ private:
QNetworkReply* sendNetworkRequest(QNetworkAccessManager*, const ResourceRequest&);
FormDataIODevice* getIODevice(const ResourceRequest&);
void clearContentHeaders();
- void timerEvent(QTimerEvent*) override;
+ void timerEvent(QTimerEvent*) final;
void timeout();
std::unique_ptr<QNetworkReplyWrapper> m_replyWrapper;
@@ -171,19 +171,19 @@ private:
// QIODevice is valid as long finished() of the QNetworkReply has not
// been emitted. With the presence of QNetworkReplyHandler::release I do
// not want to gurantee this.
-class FormDataIODevice : public QIODevice {
+class FormDataIODevice final : public QIODevice {
Q_OBJECT
public:
FormDataIODevice(FormData*);
~FormDataIODevice();
- bool isSequential() const;
+ bool isSequential() const final;
qint64 getFormDataSize() const { return m_fileSize + m_dataSize; }
- virtual bool reset();
+ bool reset() final;
protected:
- qint64 readData(char*, qint64);
- qint64 writeData(const char*, qint64);
+ qint64 readData(char*, qint64) final;
+ qint64 writeData(const char*, qint64) final;
private:
void prepareFormElements();
diff --git a/Source/WebCore/platform/network/qt/SocketStreamHandle.h b/Source/WebCore/platform/network/qt/SocketStreamHandle.h
index 37f58be32..ddff3763e 100644
--- a/Source/WebCore/platform/network/qt/SocketStreamHandle.h
+++ b/Source/WebCore/platform/network/qt/SocketStreamHandle.h
@@ -54,16 +54,16 @@ namespace WebCore {
class SocketStreamHandleClient;
class SocketStreamHandlePrivate;
- class SocketStreamHandle : public RefCounted<SocketStreamHandle>, public SocketStreamHandleBase {
+ class SocketStreamHandle final : public RefCounted<SocketStreamHandle>, public SocketStreamHandleBase {
public:
static PassRefPtr<SocketStreamHandle> create(const URL& url, SocketStreamHandleClient* client, NetworkingContext&) { return adoptRef(new SocketStreamHandle(url, client)); }
static PassRefPtr<SocketStreamHandle> create(QTcpSocket* socket, SocketStreamHandleClient* client) { return adoptRef(new SocketStreamHandle(socket, client)); }
- virtual ~SocketStreamHandle();
+ ~SocketStreamHandle();
protected:
- virtual int platformSend(const char* data, int length);
- virtual void platformClose();
+ int platformSend(const char* data, int length) final;
+ void platformClose() final;
private:
SocketStreamHandle(const URL&, SocketStreamHandleClient*);
diff --git a/Source/WebCore/platform/network/qt/SocketStreamHandlePrivate.h b/Source/WebCore/platform/network/qt/SocketStreamHandlePrivate.h
index 4f46603ba..29a4a8c84 100644
--- a/Source/WebCore/platform/network/qt/SocketStreamHandlePrivate.h
+++ b/Source/WebCore/platform/network/qt/SocketStreamHandlePrivate.h
@@ -43,7 +43,7 @@ class Credential;
class SocketStreamHandleClient;
class SocketStreamHandlePrivate;
-class SocketStreamHandlePrivate : public QObject {
+class SocketStreamHandlePrivate final : public QObject {
Q_OBJECT
public:
SocketStreamHandlePrivate(SocketStreamHandle*, const URL&);
diff --git a/Source/WebCore/platform/qt/DeviceMotionClientQt.h b/Source/WebCore/platform/qt/DeviceMotionClientQt.h
index 6a74123d9..9d1e35115 100644
--- a/Source/WebCore/platform/qt/DeviceMotionClientQt.h
+++ b/Source/WebCore/platform/qt/DeviceMotionClientQt.h
@@ -31,20 +31,20 @@ namespace WebCore {
class DeviceMotionController;
class DeviceMotionProviderQt;
-class DeviceMotionClientQt : public DeviceMotionClient {
+class DeviceMotionClientQt final : public DeviceMotionClient {
public:
DeviceMotionClientQt() { }
- virtual ~DeviceMotionClientQt();
+ ~DeviceMotionClientQt();
private:
- virtual void deviceMotionControllerDestroyed();
+ void deviceMotionControllerDestroyed() final;
- virtual void startUpdating();
- virtual void stopUpdating();
+ void startUpdating() final;
+ void stopUpdating() final;
- virtual DeviceMotionData* lastMotion() const;
+ DeviceMotionData* lastMotion() const final;
- virtual void setController(DeviceMotionController*);
+ void setController(DeviceMotionController*) final;
std::unique_ptr<DeviceMotionProviderQt> m_provider;
};
diff --git a/Source/WebCore/platform/qt/DeviceMotionProviderQt.h b/Source/WebCore/platform/qt/DeviceMotionProviderQt.h
index 6ae80b4af..f1c311dce 100644
--- a/Source/WebCore/platform/qt/DeviceMotionProviderQt.h
+++ b/Source/WebCore/platform/qt/DeviceMotionProviderQt.h
@@ -30,14 +30,14 @@ namespace WebCore {
class DeviceMotionController;
class DeviceOrientationProviderQt;
-class DeviceMotionProviderQt : public QAccelerometerFilter {
+class DeviceMotionProviderQt final : public QAccelerometerFilter {
public:
DeviceMotionProviderQt();
- virtual ~DeviceMotionProviderQt();
+ ~DeviceMotionProviderQt();
void setController(DeviceMotionController*);
- bool filter(QAccelerometerReading*) override;
+ bool filter(QAccelerometerReading*) final;
void start();
void stop();
diff --git a/Source/WebCore/platform/qt/DeviceOrientationClientQt.h b/Source/WebCore/platform/qt/DeviceOrientationClientQt.h
index 379a834b7..d7d8c6342 100644
--- a/Source/WebCore/platform/qt/DeviceOrientationClientQt.h
+++ b/Source/WebCore/platform/qt/DeviceOrientationClientQt.h
@@ -30,13 +30,13 @@ namespace WebCore {
class DeviceOrientationProviderQt;
-class DeviceOrientationClientQt : public DeviceOrientationClient {
+class DeviceOrientationClientQt final : public DeviceOrientationClient {
public:
- virtual void setController(DeviceOrientationController*);
- virtual void startUpdating();
- virtual void stopUpdating();
- virtual DeviceOrientationData* lastOrientation() const;
- virtual void deviceOrientationControllerDestroyed();
+ void setController(DeviceOrientationController*) final;
+ void startUpdating() final;
+ void stopUpdating() final;
+ DeviceOrientationData* lastOrientation() const final;
+ void deviceOrientationControllerDestroyed() final;
private:
std::unique_ptr<DeviceOrientationProviderQt> m_provider;
diff --git a/Source/WebCore/platform/qt/DeviceOrientationProviderQt.h b/Source/WebCore/platform/qt/DeviceOrientationProviderQt.h
index 350298449..033d750d2 100644
--- a/Source/WebCore/platform/qt/DeviceOrientationProviderQt.h
+++ b/Source/WebCore/platform/qt/DeviceOrientationProviderQt.h
@@ -27,14 +27,14 @@
namespace WebCore {
-class DeviceOrientationProviderQt : public QRotationFilter {
+class DeviceOrientationProviderQt final : public QRotationFilter {
public:
DeviceOrientationProviderQt();
- virtual ~DeviceOrientationProviderQt();
+ ~DeviceOrientationProviderQt();
void setController(DeviceOrientationController*);
- bool filter(QRotationReading*);
+ bool filter(QRotationReading*) final;
void start();
void stop();
diff --git a/Source/WebCore/platform/qt/GamepadsQt.cpp b/Source/WebCore/platform/qt/GamepadsQt.cpp
index 2d9b17e38..6fff52f9a 100644
--- a/Source/WebCore/platform/qt/GamepadsQt.cpp
+++ b/Source/WebCore/platform/qt/GamepadsQt.cpp
@@ -49,7 +49,7 @@ struct udev_list_entry;
namespace WebCore {
-class GamepadDeviceLinuxQt : public QObject, public GamepadDeviceLinux {
+class GamepadDeviceLinuxQt final : public QObject, public GamepadDeviceLinux {
Q_OBJECT
public:
static std::unique_ptr<GamepadDeviceLinuxQt> create(const String& deviceFile)
@@ -192,7 +192,7 @@ public:
};
-class GamepadsQt : public QObject, protected LibUdevWrapper {
+class GamepadsQt final : public QObject, protected LibUdevWrapper {
Q_OBJECT
public:
GamepadsQt(unsigned);
diff --git a/Source/WebCore/platform/qt/MainThreadSharedTimerQt.cpp b/Source/WebCore/platform/qt/MainThreadSharedTimerQt.cpp
index b742418f6..11c507d66 100644
--- a/Source/WebCore/platform/qt/MainThreadSharedTimerQt.cpp
+++ b/Source/WebCore/platform/qt/MainThreadSharedTimerQt.cpp
@@ -39,7 +39,7 @@
namespace WebCore {
-class SharedTimerQt : public QObject {
+class SharedTimerQt final : public QObject {
Q_OBJECT
public:
static SharedTimerQt* inst();
diff --git a/Source/WebCore/platform/qt/RenderThemeQStyle.cpp b/Source/WebCore/platform/qt/RenderThemeQStyle.cpp
index edc252d1d..b9c6953fa 100644
--- a/Source/WebCore/platform/qt/RenderThemeQStyle.cpp
+++ b/Source/WebCore/platform/qt/RenderThemeQStyle.cpp
@@ -191,25 +191,21 @@ template<typename T>
static void inflateCheckBoxRectImpl(T& originalRect, const QRect& rect)
{
if (!rect.isNull()) {
- if (rect.width() > originalRect.width()) {
- int dx = static_cast<int>((rect.width() - originalRect.width()) / 2);
- originalRect.setX(originalRect.x() - dx);
- originalRect.setWidth(rect.width());
- }
- if (rect.height() > originalRect.height()) {
- int dy = static_cast<int>((rect.height() - originalRect.height()) / 2);
- originalRect.setY(originalRect.y() - dy);
- originalRect.setHeight(rect.height());
- }
+ int dx = static_cast<int>((rect.width() - originalRect.width()) / 2);
+ originalRect.setX(originalRect.x() - dx);
+ originalRect.setWidth(rect.width());
+ int dy = static_cast<int>((rect.height() - originalRect.height()) / 2);
+ originalRect.setY(originalRect.y() - dy);
+ originalRect.setHeight(rect.height());
}
}
-void RenderThemeQStyle::inflateControlRect(QStyleFacade::ButtonType part, QRect& originalRect) const
+void RenderThemeQStyle::computeControlRect(QStyleFacade::ButtonType part, QRect& originalRect) const
{
inflateCheckBoxRectImpl(originalRect, indicatorRect(part, originalRect));
}
-void RenderThemeQStyle::inflateControlRect(QStyleFacade::ButtonType part, FloatRect& originalRect) const
+void RenderThemeQStyle::computeControlRect(QStyleFacade::ButtonType part, FloatRect& originalRect) const
{
inflateCheckBoxRectImpl(originalRect, indicatorRect(part, enclosingIntRect(originalRect)));
}
@@ -369,10 +365,10 @@ bool RenderThemeQStyle::paintButton(const RenderObject& o, const PaintInfo& i, c
p.styleOption.rect = inflateButtonRect(p.styleOption.rect);
p.paintButton(QStyleFacade::PushButton);
} else if (p.appearance == RadioPart) {
- inflateControlRect(QStyleFacade::RadioButton, p.styleOption.rect);
+ computeControlRect(QStyleFacade::RadioButton, p.styleOption.rect);
p.paintButton(QStyleFacade::RadioButton);
} else if (p.appearance == CheckboxPart) {
- inflateControlRect(QStyleFacade::CheckBox, p.styleOption.rect);
+ computeControlRect(QStyleFacade::CheckBox, p.styleOption.rect);
p.paintButton(QStyleFacade::CheckBox);
}
diff --git a/Source/WebCore/platform/qt/RenderThemeQStyle.h b/Source/WebCore/platform/qt/RenderThemeQStyle.h
index 444f8292e..665eee005 100644
--- a/Source/WebCore/platform/qt/RenderThemeQStyle.h
+++ b/Source/WebCore/platform/qt/RenderThemeQStyle.h
@@ -39,7 +39,7 @@ private:
friend class StylePainterQStyle;
RenderThemeQStyle(Page*);
- virtual ~RenderThemeQStyle();
+ ~RenderThemeQStyle();
public:
static PassRefPtr<RenderTheme> create(Page*);
@@ -47,59 +47,59 @@ public:
static void setStyleFactoryFunction(QtStyleFactoryFunction);
static QtStyleFactoryFunction styleFactory();
- void adjustSliderThumbSize(RenderStyle&, Element*) const override;
+ void adjustSliderThumbSize(RenderStyle&, Element*) const final;
QStyleFacade* qStyle() { return m_qStyle.get(); }
protected:
- void adjustButtonStyle(StyleResolver&, RenderStyle&, Element*) const override;
- bool paintButton(const RenderObject&, const PaintInfo&, const IntRect&) override;
+ void adjustButtonStyle(StyleResolver&, RenderStyle&, Element*) const final;
+ bool paintButton(const RenderObject&, const PaintInfo&, const IntRect&) final;
- bool paintTextField(const RenderObject&, const PaintInfo&, const FloatRect&) override;
+ bool paintTextField(const RenderObject&, const PaintInfo&, const FloatRect&) final;
- bool paintTextArea(const RenderObject&, const PaintInfo&, const FloatRect&) override;
- void adjustTextAreaStyle(StyleResolver&, RenderStyle&, Element*) const override;
+ bool paintTextArea(const RenderObject&, const PaintInfo&, const FloatRect&) final;
+ void adjustTextAreaStyle(StyleResolver&, RenderStyle&, Element*) const final;
- bool paintMenuList(const RenderObject&, const PaintInfo&, const FloatRect&) override;
+ bool paintMenuList(const RenderObject&, const PaintInfo&, const FloatRect&) final;
- bool paintMenuListButtonDecorations(const RenderBox&, const PaintInfo&, const FloatRect&) override;
- void adjustMenuListButtonStyle(StyleResolver&, RenderStyle&, Element*) const override;
+ bool paintMenuListButtonDecorations(const RenderBox&, const PaintInfo&, const FloatRect&) final;
+ void adjustMenuListButtonStyle(StyleResolver&, RenderStyle&, Element*) const final;
// Returns the duration of the animation for the progress bar.
- double animationDurationForProgressBar(RenderProgress&) const override;
- bool paintProgressBar(const RenderObject&, const PaintInfo&, const IntRect&) override;
+ double animationDurationForProgressBar(RenderProgress&) const final;
+ bool paintProgressBar(const RenderObject&, const PaintInfo&, const IntRect&) final;
- bool paintSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) override;
- void adjustSliderTrackStyle(StyleResolver&, RenderStyle&, Element*) const override;
+ bool paintSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) final;
+ void adjustSliderTrackStyle(StyleResolver&, RenderStyle&, Element*) const final;
- bool paintSliderThumb(const RenderObject&, const PaintInfo&, const IntRect&) override;
- void adjustSliderThumbStyle(StyleResolver&, RenderStyle&, Element*) const override;
+ bool paintSliderThumb(const RenderObject&, const PaintInfo&, const IntRect&) final;
+ void adjustSliderThumbStyle(StyleResolver&, RenderStyle&, Element*) const final;
- bool paintSearchField(const RenderObject&, const PaintInfo&, const IntRect&) override;
+ bool paintSearchField(const RenderObject&, const PaintInfo&, const IntRect&) final;
- void adjustSearchFieldDecorationPartStyle(StyleResolver&, RenderStyle&, Element*) const override;
- bool paintSearchFieldDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&) override;
+ void adjustSearchFieldDecorationPartStyle(StyleResolver&, RenderStyle&, Element*) const final;
+ bool paintSearchFieldDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&) final;
- void adjustSearchFieldResultsDecorationPartStyle(StyleResolver&, RenderStyle&, Element*) const override;
- bool paintSearchFieldResultsDecorationPart(const RenderBox&, const PaintInfo&, const IntRect&) override;
+ void adjustSearchFieldResultsDecorationPartStyle(StyleResolver&, RenderStyle&, Element*) const final;
+ bool paintSearchFieldResultsDecorationPart(const RenderBox&, const PaintInfo&, const IntRect&) final;
#ifndef QT_NO_SPINBOX
- bool paintInnerSpinButton(const RenderObject&, const PaintInfo&, const IntRect&) override;
+ bool paintInnerSpinButton(const RenderObject&, const PaintInfo&, const IntRect&) final;
#endif
protected:
- void computeSizeBasedOnStyle(RenderStyle&) const override;
+ void computeSizeBasedOnStyle(RenderStyle&) const final;
- QSharedPointer<StylePainter> getStylePainter(const PaintInfo&) override;
+ QSharedPointer<StylePainter> getStylePainter(const PaintInfo&) final;
- QRect inflateButtonRect(const QRect& originalRect) const override;
- QRectF inflateButtonRect(const QRectF& originalRect) const override;
- void inflateControlRect(QStyleFacade::ButtonType, QRect& originalRect) const override;
- void inflateControlRect(QStyleFacade::ButtonType, FloatRect& originalRect) const override;
+ QRect inflateButtonRect(const QRect& originalRect) const final;
+ QRectF inflateButtonRect(const QRectF& originalRect) const final;
+ void computeControlRect(QStyleFacade::ButtonType, QRect& originalRect) const final;
+ void computeControlRect(QStyleFacade::ButtonType, FloatRect& originalRect) const final;
- void setPopupPadding(RenderStyle&) const override;
+ void setPopupPadding(RenderStyle&) const final;
- QPalette colorPalette() const override;
+ QPalette colorPalette() const final;
private:
ControlPart initializeCommonQStyleOptions(QStyleFacadeOption&, const RenderObject&) const;
@@ -117,7 +117,7 @@ private:
std::unique_ptr<QStyleFacade> m_qStyle;
};
-class StylePainterQStyle : public StylePainter {
+class StylePainterQStyle final : public StylePainter {
public:
explicit StylePainterQStyle(RenderThemeQStyle*, const PaintInfo&);
explicit StylePainterQStyle(RenderThemeQStyle*, const PaintInfo&, const RenderObject&);
diff --git a/Source/WebCore/platform/qt/RenderThemeQt.cpp b/Source/WebCore/platform/qt/RenderThemeQt.cpp
index 442ae9454..2cd35700a 100644
--- a/Source/WebCore/platform/qt/RenderThemeQt.cpp
+++ b/Source/WebCore/platform/qt/RenderThemeQt.cpp
@@ -78,10 +78,6 @@ static const float defaultControlFontPixelSize = 13;
static const float defaultCancelButtonSize = 9;
static const float minCancelButtonSize = 5;
static const float maxCancelButtonSize = 21;
-static const float defaultSearchFieldResultsDecorationSize = 13;
-static const float minSearchFieldResultsDecorationSize = 9;
-static const float maxSearchFieldResultsDecorationSize = 30;
-static const float defaultSearchFieldResultsButtonWidth = 18;
static QtThemeFactoryFunction themeFactory;
static ScrollbarTheme* scrollbarTheme;
@@ -217,11 +213,11 @@ QRectF RenderThemeQt::inflateButtonRect(const QRectF& originalRect) const
return originalRect;
}
-void RenderThemeQt::inflateControlRect(QStyleFacade::ButtonType, QRect&) const
+void RenderThemeQt::computeControlRect(QStyleFacade::ButtonType, QRect&) const
{
}
-void RenderThemeQt::inflateControlRect(QStyleFacade::ButtonType, FloatRect&) const
+void RenderThemeQt::computeControlRect(QStyleFacade::ButtonType, FloatRect&) const
{
}
@@ -229,10 +225,10 @@ void RenderThemeQt::adjustRepaintRect(const RenderObject& o, FloatRect& rect)
{
switch (o.style().appearance()) {
case CheckboxPart:
- inflateControlRect(QStyleFacade::CheckBox, rect);
+ computeControlRect(QStyleFacade::CheckBox, rect);
break;
case RadioPart:
- inflateControlRect(QStyleFacade::RadioButton, rect);
+ computeControlRect(QStyleFacade::RadioButton, rect);
break;
case PushButtonPart:
case ButtonPart: {
diff --git a/Source/WebCore/platform/qt/RenderThemeQt.h b/Source/WebCore/platform/qt/RenderThemeQt.h
index d38d299af..ee572bace 100644
--- a/Source/WebCore/platform/qt/RenderThemeQt.h
+++ b/Source/WebCore/platform/qt/RenderThemeQt.h
@@ -167,8 +167,8 @@ protected:
virtual QRect inflateButtonRect(const QRect& originalRect) const;
virtual QRectF inflateButtonRect(const QRectF& originalRect) const;
- virtual void inflateControlRect(QStyleFacade::ButtonType, QRect& originalRect) const;
- virtual void inflateControlRect(QStyleFacade::ButtonType, FloatRect& originalRect) const;
+ virtual void computeControlRect(QStyleFacade::ButtonType, QRect& originalRect) const;
+ virtual void computeControlRect(QStyleFacade::ButtonType, FloatRect& originalRect) const;
virtual void setPopupPadding(RenderStyle&) const = 0;
diff --git a/Source/WebCore/platform/qt/RenderThemeQtMobile.cpp b/Source/WebCore/platform/qt/RenderThemeQtMobile.cpp
index 6ac59a5b8..e4a34de29 100644
--- a/Source/WebCore/platform/qt/RenderThemeQtMobile.cpp
+++ b/Source/WebCore/platform/qt/RenderThemeQtMobile.cpp
@@ -204,7 +204,7 @@ QPalette RenderThemeQtMobile::colorPalette() const
return lightGrayPalette;
}
-StylePainterMobile::StylePainterMobile(RenderThemeQtMobile* theme, const PaintInfo& paintInfo)
+StylePainterMobile::StylePainterMobile(RenderThemeQtMobile*, const PaintInfo& paintInfo)
: StylePainter(paintInfo.context())
{
m_previousSmoothPixmapTransform = painter->testRenderHint(QPainter::SmoothPixmapTransform);
@@ -658,7 +658,7 @@ bool RenderThemeQtMobile::isControlStyled(const RenderStyle& style, const Border
}
}
-LengthBox RenderThemeQtMobile::popupInternalPaddingBox(const RenderStyle& style) const
+LengthBox RenderThemeQtMobile::popupInternalPaddingBox(const RenderStyle&) const
{
return { 0, 0, 1, 0 };
}
diff --git a/Source/WebCore/platform/qt/RenderThemeQtMobile.h b/Source/WebCore/platform/qt/RenderThemeQtMobile.h
index a48695251..cd0bb0813 100644
--- a/Source/WebCore/platform/qt/RenderThemeQtMobile.h
+++ b/Source/WebCore/platform/qt/RenderThemeQtMobile.h
@@ -37,56 +37,56 @@ typedef QPixmapCache::Key CacheKey;
namespace WebCore {
-class RenderThemeQtMobile : public RenderThemeQt {
+class RenderThemeQtMobile final : public RenderThemeQt {
private:
RenderThemeQtMobile(Page*);
- virtual ~RenderThemeQtMobile();
+ ~RenderThemeQtMobile();
public:
static PassRefPtr<RenderTheme> create(Page*);
- void adjustSliderThumbSize(RenderStyle&, Element*) const override;
+ void adjustSliderThumbSize(RenderStyle&, Element*) const final;
- bool isControlStyled(const RenderStyle&, const BorderData&, const FillLayer&, const Color& backgroundColor) const override;
+ bool isControlStyled(const RenderStyle&, const BorderData&, const FillLayer&, const Color& backgroundColor) const final;
- LengthBox popupInternalPaddingBox(const RenderStyle& style) const override;
+ LengthBox popupInternalPaddingBox(const RenderStyle&) const final;
- bool delegatesMenuListRendering() const override { return true; }
+ bool delegatesMenuListRendering() const final { return true; }
// We don't want the focus ring to be drawn by the graphics context so we
// always claim to support it in the theme.
// FIXME: This could be a usability problem in the case of contenteditable divs.
- bool supportsFocusRing(const RenderStyle&) const override { return true; }
+ bool supportsFocusRing(const RenderStyle&) const final { return true; }
protected:
- void adjustButtonStyle(StyleResolver&, RenderStyle&, Element*) const override;
- bool paintButton(const RenderObject&, const PaintInfo&, const IntRect&) override;
+ void adjustButtonStyle(StyleResolver&, RenderStyle&, Element*) const final;
+ bool paintButton(const RenderObject&, const PaintInfo&, const IntRect&) final;
- bool paintTextField(const RenderObject&, const PaintInfo&, const FloatRect&) override;
- void adjustTextFieldStyle(StyleResolver&, RenderStyle&, Element*) const override;
+ bool paintTextField(const RenderObject&, const PaintInfo&, const FloatRect&) final;
+ void adjustTextFieldStyle(StyleResolver&, RenderStyle&, Element*) const final;
- bool paintMenuList(const RenderObject&, const PaintInfo&, const FloatRect&) override;
- void adjustMenuListStyle(StyleResolver&, RenderStyle&, Element*) const override;
+ bool paintMenuList(const RenderObject&, const PaintInfo&, const FloatRect&) final;
+ void adjustMenuListStyle(StyleResolver&, RenderStyle&, Element*) const final;
virtual bool paintMenuListButton(RenderObject&, const PaintInfo&, const IntRect&);
// Returns the duration of the animation for the progress bar.
- double animationDurationForProgressBar(RenderProgress&) const override;
- bool paintProgressBar(const RenderObject&, const PaintInfo&, const IntRect&) override;
+ double animationDurationForProgressBar(RenderProgress&) const final;
+ bool paintProgressBar(const RenderObject&, const PaintInfo&, const IntRect&) final;
- bool paintSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) override;
- bool paintSliderThumb(const RenderObject&, const PaintInfo&, const IntRect&) override;
+ bool paintSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) final;
+ bool paintSliderThumb(const RenderObject&, const PaintInfo&, const IntRect&) final;
- void computeSizeBasedOnStyle(RenderStyle&) const override;
- QSharedPointer<StylePainter> getStylePainter(const PaintInfo&) override;
+ void computeSizeBasedOnStyle(RenderStyle&) const final;
+ QSharedPointer<StylePainter> getStylePainter(const PaintInfo&) final;
- QPalette colorPalette() const override;
+ QPalette colorPalette() const final;
private:
bool checkMultiple(const RenderObject&) const;
void setButtonPadding(RenderStyle&) const;
- void setPopupPadding(RenderStyle&) const override;
+ void setPopupPadding(RenderStyle&) const final;
};
struct KeyIdentifier {
@@ -127,7 +127,7 @@ struct KeyIdentifier {
}
};
-class StylePainterMobile : public StylePainter {
+class StylePainterMobile final : public StylePainter {
public:
explicit StylePainterMobile(RenderThemeQtMobile*, const PaintInfo&);
diff --git a/Source/WebCore/platform/qt/ScrollbarThemeQStyle.h b/Source/WebCore/platform/qt/ScrollbarThemeQStyle.h
index 626969202..3f50ff58b 100644
--- a/Source/WebCore/platform/qt/ScrollbarThemeQStyle.h
+++ b/Source/WebCore/platform/qt/ScrollbarThemeQStyle.h
@@ -34,26 +34,26 @@ namespace WebCore {
class QStyleFacade;
-class ScrollbarThemeQStyle : public ScrollbarTheme {
+class ScrollbarThemeQStyle final : public ScrollbarTheme {
public:
ScrollbarThemeQStyle();
- virtual ~ScrollbarThemeQStyle();
+ ~ScrollbarThemeQStyle() final;
- virtual bool paint(Scrollbar&, GraphicsContext&, const IntRect& dirtyRect);
- virtual void paintScrollCorner(ScrollView*, GraphicsContext&, const IntRect& cornerRect);
+ bool paint(Scrollbar&, GraphicsContext&, const IntRect& dirtyRect) final;
+ void paintScrollCorner(ScrollView*, GraphicsContext&, const IntRect& cornerRect) final;
- virtual ScrollbarPart hitTest(Scrollbar&, const IntPoint&);
+ ScrollbarPart hitTest(Scrollbar&, const IntPoint&) final;
virtual bool shouldCenterOnThumb(Scrollbar&, const PlatformMouseEvent&);
- virtual void invalidatePart(Scrollbar&, ScrollbarPart);
+ void invalidatePart(Scrollbar&, ScrollbarPart) final;
- virtual int thumbPosition(Scrollbar&);
- virtual int thumbLength(Scrollbar&);
- virtual int trackPosition(Scrollbar&);
- virtual int trackLength(Scrollbar&);
+ int thumbPosition(Scrollbar&) final;
+ int thumbLength(Scrollbar&) final;
+ int trackPosition(Scrollbar&) final;
+ int trackLength(Scrollbar&) final;
- virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar);
+ int scrollbarThickness(ScrollbarControlSize = RegularScrollbar) final;
QStyleFacade* qStyle() { return m_qStyle.get(); }
diff --git a/Source/WebCore/platform/qt/WidgetQt.cpp b/Source/WebCore/platform/qt/WidgetQt.cpp
index 03a2f6619..f3f04b157 100644
--- a/Source/WebCore/platform/qt/WidgetQt.cpp
+++ b/Source/WebCore/platform/qt/WidgetQt.cpp
@@ -70,7 +70,7 @@ void Widget::setFrameRect(const IntRect& rect)
frameRectsChanged();
}
-void Widget::setFocus(bool focused)
+void Widget::setFocus(bool)
{
}
diff --git a/Source/WebKit/CMakeLists.txt b/Source/WebKit/CMakeLists.txt
index f316298e7..72f36b19b 100644
--- a/Source/WebKit/CMakeLists.txt
+++ b/Source/WebKit/CMakeLists.txt
@@ -71,7 +71,7 @@ install(TARGETS WebKit EXPORT WebKitTargets
)
add_dependencies(WebKit WebCore)
-if (WIN32)
+if (TARGET WebKitGUID)
add_dependencies(WebKit WebKitGUID)
endif ()
diff --git a/Source/WebKit/PlatformQt.cmake b/Source/WebKit/PlatformQt.cmake
index 4675a3abb..81f7e95f6 100644
--- a/Source/WebKit/PlatformQt.cmake
+++ b/Source/WebKit/PlatformQt.cmake
@@ -188,6 +188,7 @@ list(APPEND WebKit_SOURCES
qt/WebCoreSupport/PopupMenuQt.cpp
qt/WebCoreSupport/ProgressTrackerClientQt.cpp
qt/WebCoreSupport/QWebFrameAdapter.cpp
+ qt/WebCoreSupport/QWebFrameData.cpp
qt/WebCoreSupport/QWebPageAdapter.cpp
qt/WebCoreSupport/QtPlatformPlugin.cpp
qt/WebCoreSupport/QtPluginWidgetAdapter.cpp
@@ -253,8 +254,6 @@ if (ENABLE_TEST_SUPPORT)
)
if (SHARED_CORE)
list(APPEND WebKit_LIBRARIES PUBLIC WebCoreTestSupport)
- install(TARGETS WebCoreTestSupport EXPORT WebKitTargets
- DESTINATION "${LIB_INSTALL_DIR}")
else ()
list(APPEND WebKit_LIBRARIES PRIVATE WebCoreTestSupport)
endif ()
diff --git a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index 7dab52d67..5ce067db2 100644
--- a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -88,7 +88,7 @@
namespace WebCore {
#if ENABLE(REQUEST_ANIMATION_FRAME) && !USE(REQUEST_ANIMATION_FRAME_TIMER)
-class RefreshAnimation : public QAbstractAnimation {
+class RefreshAnimation final : public QAbstractAnimation {
public:
RefreshAnimation(ChromeClientQt* chromeClient)
: QAbstractAnimation()
@@ -96,7 +96,7 @@ public:
, m_animationScheduled(false)
{ }
- virtual int duration() const { return -1; }
+ int duration() const final { return -1; }
void scheduleAnimation()
{
@@ -106,7 +106,7 @@ public:
}
protected:
- virtual void updateCurrentTime(int currentTime)
+ void updateCurrentTime(int currentTime) final
{
UNUSED_PARAM(currentTime);
if (m_animationScheduled) {
@@ -397,11 +397,6 @@ void ChromeClientQt::setStatusbarText(const String& msg)
QMetaObject::invokeMethod(m_webPage->handle(), "statusBarMessage", Q_ARG(QString, x));
}
-bool ChromeClientQt::shouldInterruptJavaScript()
-{
- return m_webPage->shouldInterruptJavaScript();
-}
-
KeyboardUIMode ChromeClientQt::keyboardUIMode()
{
return m_webPage->settings->testAttribute(QWebSettings::LinksIncludedInFocusChain)
diff --git a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
index 31c806120..9aef6baef 100644
--- a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
@@ -63,137 +63,136 @@ class TextureMapperLayerClientQt;
class ChromeClientQt final : public ChromeClient {
public:
ChromeClientQt(QWebPageAdapter*);
- virtual ~ChromeClientQt();
- void chromeDestroyed() override;
+ ~ChromeClientQt();
+ void chromeDestroyed() final;
- void setWindowRect(const FloatRect&) override;
- FloatRect windowRect() override;
+ void setWindowRect(const FloatRect&) final;
+ FloatRect windowRect() final;
- FloatRect pageRect() override;
+ FloatRect pageRect() final;
- void focus() override;
- void unfocus() override;
+ void focus() final;
+ void unfocus() final;
- bool canTakeFocus(FocusDirection) override;
- void takeFocus(FocusDirection) override;
+ bool canTakeFocus(FocusDirection) final;
+ void takeFocus(FocusDirection) final;
- void focusedElementChanged(Element*) override;
- void focusedFrameChanged(Frame*) override;
+ void focusedElementChanged(Element*) final;
+ void focusedFrameChanged(Frame*) final;
- Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&) override;
- void show() override;
+ Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&, const NavigationAction&) final;
+ void show() final;
- bool canRunModal() override;
- void runModal() override;
+ bool canRunModal() final;
+ void runModal() final;
- void setToolbarsVisible(bool) override;
- bool toolbarsVisible() override;
+ void setToolbarsVisible(bool) final;
+ bool toolbarsVisible() final;
- void setStatusbarVisible(bool) override;
- bool statusbarVisible() override;
+ void setStatusbarVisible(bool) final;
+ bool statusbarVisible() final;
- void setScrollbarsVisible(bool) override;
- bool scrollbarsVisible() override;
+ void setScrollbarsVisible(bool) final;
+ bool scrollbarsVisible() final;
- void setMenubarVisible(bool) override;
- bool menubarVisible() override;
+ void setMenubarVisible(bool) final;
+ bool menubarVisible() final;
- void setResizable(bool) override;
+ void setResizable(bool) final;
- void addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, unsigned columnNumber, const String& sourceID) override;
+ void addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned lineNumber, unsigned columnNumber, const String& sourceID) final;
- bool canRunBeforeUnloadConfirmPanel() override;
- bool runBeforeUnloadConfirmPanel(const String& message, Frame*) override;
+ bool canRunBeforeUnloadConfirmPanel() final;
+ bool runBeforeUnloadConfirmPanel(const String& message, Frame*) final;
- void closeWindowSoon() override;
+ void closeWindowSoon() final;
- void runJavaScriptAlert(Frame*, const String&) override;
- bool runJavaScriptConfirm(Frame*, const String&) override;
- bool runJavaScriptPrompt(Frame*, const String& message, const String& defaultValue, String& result) override;
- virtual bool shouldInterruptJavaScript();
+ void runJavaScriptAlert(Frame*, const String&) final;
+ bool runJavaScriptConfirm(Frame*, const String&) final;
+ bool runJavaScriptPrompt(Frame*, const String& message, const String& defaultValue, String& result) final;
- void setStatusbarText(const String&) override;
+ void setStatusbarText(const String&) final;
- KeyboardUIMode keyboardUIMode() override;
+ KeyboardUIMode keyboardUIMode() final;
- void invalidateRootView(const IntRect&) override;
- void invalidateContentsAndRootView(const IntRect&) override;
- void invalidateContentsForSlowScroll(const IntRect&) override;
- void scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect) override;
+ void invalidateRootView(const IntRect&) final;
+ void invalidateContentsAndRootView(const IntRect&) final;
+ void invalidateContentsForSlowScroll(const IntRect&) final;
+ void scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect) final;
#if USE(TILED_BACKING_STORE)
- virtual void delegatedScrollRequested(const IntPoint& scrollPoint);
+ void delegatedScrollRequested(const IntPoint& scrollPoint) final;
#endif
- IntPoint screenToRootView(const IntPoint&) const override;
- IntRect rootViewToScreen(const IntRect&) const override;
- PlatformPageClient platformPageClient() const override;
- void contentsSizeChanged(Frame*, const IntSize&) const override;
+ IntPoint screenToRootView(const IntPoint&) const final;
+ IntRect rootViewToScreen(const IntRect&) const final;
+ PlatformPageClient platformPageClient() const final;
+ void contentsSizeChanged(Frame*, const IntSize&) const final;
- void scrollbarsModeDidChange() const override { }
- void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags) override;
+ void scrollbarsModeDidChange() const final { }
+ void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags) final;
- void setToolTip(const String&, TextDirection) override;
+ void setToolTip(const String&, TextDirection) final;
- void print(Frame*) override;
- void exceededDatabaseQuota(Frame*, const String&, DatabaseDetails) override;
- void reachedMaxAppCacheSize(int64_t spaceNeeded) override;
- void reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t totalSpaceNeeded) override;
+ void print(Frame*) final;
+ void exceededDatabaseQuota(Frame*, const String&, DatabaseDetails) final;
+ void reachedMaxAppCacheSize(int64_t spaceNeeded) final;
+ void reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t totalSpaceNeeded) final;
// This is a hook for WebCore to tell us what we need to do with the GraphicsLayers.
- void attachRootGraphicsLayer(Frame*, GraphicsLayer*) override;
- void setNeedsOneShotDrawingSynchronization() override;
- void scheduleCompositingLayerFlush() override;
- CompositingTriggerFlags allowedCompositingTriggers() const override;
- bool allowsAcceleratedCompositing() const override;
+ void attachRootGraphicsLayer(Frame*, GraphicsLayer*) final;
+ void setNeedsOneShotDrawingSynchronization() final;
+ void scheduleCompositingLayerFlush() final;
+ CompositingTriggerFlags allowedCompositingTriggers() const final;
+ bool allowsAcceleratedCompositing() const final;
#if USE(TILED_BACKING_STORE)
virtual IntRect visibleRectForTiledBackingStore() const;
#endif
#if ENABLE(TOUCH_EVENTS)
- void needTouchEvents(bool) override { }
+ void needTouchEvents(bool) final { }
#endif
- void isPlayingMediaDidChange(MediaProducer::MediaStateFlags, uint64_t) override;
+ void isPlayingMediaDidChange(MediaProducer::MediaStateFlags, uint64_t) final;
#if ENABLE(VIDEO) && ((USE(GSTREAMER) && USE(NATIVE_FULLSCREEN_VIDEO)) || USE(QT_MULTIMEDIA))
- bool supportsVideoFullscreen(MediaPlayerEnums::VideoFullscreenMode) override;
- void enterVideoFullscreenForVideoElement(HTMLVideoElement&, MediaPlayerEnums::VideoFullscreenMode) override;
- void exitVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&) override;
- bool requiresFullscreenForVideoPlayback() override;
+ bool supportsVideoFullscreen(MediaPlayerEnums::VideoFullscreenMode) final;
+ void enterVideoFullscreenForVideoElement(HTMLVideoElement&, MediaPlayerEnums::VideoFullscreenMode) final;
+ void exitVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&) final;
+ bool requiresFullscreenForVideoPlayback() final;
FullScreenVideoQt* fullScreenVideo();
#endif
#if ENABLE(INPUT_TYPE_COLOR)
- std::unique_ptr<ColorChooser> createColorChooser(ColorChooserClient*, const Color&) override;
+ std::unique_ptr<ColorChooser> createColorChooser(ColorChooserClient*, const Color&) final;
#endif
- void runOpenPanel(Frame*, PassRefPtr<FileChooser>) override;
- void loadIconForFiles(const Vector<String>&, FileIconLoader*) override;
+ void runOpenPanel(Frame*, PassRefPtr<FileChooser>) final;
+ void loadIconForFiles(const Vector<String>&, FileIconLoader*) final;
- void setCursor(const Cursor&) override;
- void setCursorHiddenUntilMouseMoves(bool) override { }
+ void setCursor(const Cursor&) final;
+ void setCursorHiddenUntilMouseMoves(bool) final { }
#if ENABLE(REQUEST_ANIMATION_FRAME) && !USE(REQUEST_ANIMATION_FRAME_TIMER)
- void scheduleAnimation() override;
+ void scheduleAnimation() final;
void serviceScriptedAnimations();
#endif
- void scrollRectIntoView(const IntRect&) const override { }
+ void scrollRectIntoView(const IntRect&) const final { }
- bool selectItemWritingDirectionIsNatural() override;
- bool selectItemAlignmentFollowsMenuWritingDirection() override;
- bool hasOpenedPopup() const override;
- RefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const override;
- RefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const override;
+ bool selectItemWritingDirectionIsNatural() final;
+ bool selectItemAlignmentFollowsMenuWritingDirection() final;
+ bool hasOpenedPopup() const final;
+ RefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const final;
+ RefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const final;
std::unique_ptr<QWebSelectMethod> createSelectPopup() const;
- void dispatchViewportPropertiesDidChange(const ViewportArguments&) const override;
+ void dispatchViewportPropertiesDidChange(const ViewportArguments&) const final;
- void wheelEventHandlersChanged(bool) override { }
+ void wheelEventHandlersChanged(bool) final { }
- void attachViewOverlayGraphicsLayer(Frame *, GraphicsLayer *) override;
+ void attachViewOverlayGraphicsLayer(Frame *, GraphicsLayer *) final;
QWebFullScreenVideoHandler* createFullScreenVideoHandler();
diff --git a/Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.cpp
index 5f0568c18..93c2fc20b 100644
--- a/Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.cpp
@@ -40,11 +40,6 @@ void ContextMenuClientQt::contextMenuDestroyed()
delete this;
}
-void ContextMenuClientQt::contextMenuItemSelected(ContextMenuItem*, const ContextMenu*)
-{
- notImplemented();
-}
-
void ContextMenuClientQt::downloadURL(const URL&)
{
notImplemented();
diff --git a/Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.h b/Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.h
index 67e708330..67a374861 100644
--- a/Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.h
@@ -33,18 +33,16 @@
namespace WebCore {
class ContextMenu;
-class ContextMenuClientQt : public ContextMenuClient {
+class ContextMenuClientQt final : public ContextMenuClient {
public:
- virtual void contextMenuDestroyed();
-
- virtual void contextMenuItemSelected(ContextMenuItem*, const ContextMenu*);
-
- virtual void downloadURL(const URL&);
- virtual void lookUpInDictionary(Frame*);
- virtual void speak(const String&);
- virtual bool isSpeaking();
- virtual void stopSpeaking();
- virtual void searchWithGoogle(const Frame*);
+ void contextMenuDestroyed() final;
+
+ void downloadURL(const URL&) final;
+ void lookUpInDictionary(Frame*) final;
+ void speak(const String&) final;
+ bool isSpeaking() final;
+ void stopSpeaking() final;
+ void searchWithGoogle(const Frame*) final;
};
}
diff --git a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index b238f4f4f..37658861f 100644
--- a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -62,6 +62,7 @@
#include "PolicyChecker.h"
#include "QNetworkReplyHandler.h"
#include "QWebFrameAdapter.h"
+#include "QWebFrameData.h"
#include "QWebPageAdapter.h"
#include "QWebPageClient.h"
#include "QtPluginWidgetAdapter.h"
diff --git a/Source/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.cpp b/Source/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.cpp
index da14d6673..e85185f67 100644
--- a/Source/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.cpp
@@ -20,6 +20,7 @@
#include "config.h"
#include "FrameNetworkingContextQt.h"
+#include "NotImplemented.h"
#include "QWebFrameAdapter.h"
#include "QWebPageAdapter.h"
#include "qwebsettings.h"
diff --git a/Source/WebKit/qt/WebCoreSupport/IconDatabaseClientQt.h b/Source/WebKit/qt/WebCoreSupport/IconDatabaseClientQt.h
index 6ac211980..bd28baf54 100644
--- a/Source/WebKit/qt/WebCoreSupport/IconDatabaseClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/IconDatabaseClientQt.h
@@ -33,23 +33,23 @@
namespace WebCore {
-class IconDatabaseClientQt : public QObject, public IconDatabaseClient {
+class IconDatabaseClientQt final : public QObject, public IconDatabaseClient {
Q_OBJECT
public:
static IconDatabaseClientQt* instance();
- virtual void didRemoveAllIcons();
- virtual void didImportIconURLForPageURL(const String&);
- virtual void didImportIconDataForPageURL(const String&);
- virtual void didChangeIconForPageURL(const String&);
- virtual void didFinishURLImport();
+ void didRemoveAllIcons() final;
+ void didImportIconURLForPageURL(const String&) final;
+ void didImportIconDataForPageURL(const String&) final;
+ void didChangeIconForPageURL(const String&) final;
+ void didFinishURLImport() final;
Q_SIGNALS:
void iconLoadedForPageURL(const QString&);
private:
IconDatabaseClientQt();
- virtual ~IconDatabaseClientQt();
+ ~IconDatabaseClientQt();
};
}
diff --git a/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
index c809797ba..597ba95dd 100644
--- a/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
@@ -145,6 +145,9 @@ InspectorClientQt::InspectorClientQt(QWebPageAdapter* page)
void InspectorClientQt::inspectedPageDestroyed()
{
+ if (m_frontendClient)
+ m_frontendClient->inspectorClientDestroyed();
+
InspectorServerQt* webInspectorServer = InspectorServerQt::server();
if (webInspectorServer)
webInspectorServer->unregisterClient(this);
diff --git a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h b/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h
index 1d0abf465..5c53e93f3 100644
--- a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h
@@ -49,7 +49,7 @@ class Document;
class Frame;
class ScriptExecutionContext;
-class NotificationWrapper : public QObject, public QWebNotificationData {
+class NotificationWrapper final : public QObject, public QWebNotificationData {
Q_OBJECT
public:
NotificationWrapper();
@@ -57,10 +57,10 @@ public:
void close();
void sendDisplayEvent();
- const QString title() const;
- const QString message() const;
- const QUrl iconUrl() const;
- const QUrl openerPageUrl() const;
+ const QString title() const final;
+ const QString message() const final;
+ const QUrl iconUrl() const final;
+ const QUrl openerPageUrl() const final;
public Q_SLOTS:
void notificationClosed();
diff --git a/Source/WebKit/qt/WebCoreSupport/PopupMenuQt.h b/Source/WebKit/qt/WebCoreSupport/PopupMenuQt.h
index a676fdd13..4d560894c 100644
--- a/Source/WebKit/qt/WebCoreSupport/PopupMenuQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/PopupMenuQt.h
@@ -32,16 +32,16 @@ class ChromeClientQt;
class FrameView;
class PopupMenuClient;
-class PopupMenuQt : public QObject, public PopupMenu {
+class PopupMenuQt final : public QObject, public PopupMenu {
Q_OBJECT
public:
PopupMenuQt(PopupMenuClient*, const ChromeClientQt*);
~PopupMenuQt();
- virtual void show(const IntRect&, FrameView*, int index);
- virtual void hide();
- virtual void updateFromElement();
- virtual void disconnectClient();
+ void show(const IntRect&, FrameView*, int index) final;
+ void hide() final;
+ void updateFromElement() final;
+ void disconnectClient() final;
private Q_SLOTS:
void didHide();
diff --git a/Source/WebKit/qt/WebCoreSupport/ProgressTrackerClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/ProgressTrackerClientQt.cpp
index 73e4366a3..7cf620bd4 100644
--- a/Source/WebKit/qt/WebCoreSupport/ProgressTrackerClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/ProgressTrackerClientQt.cpp
@@ -28,6 +28,7 @@
#include "EventHandler.h"
#include "Frame.h"
+#include "FrameLoaderClientQt.h"
#include "ProgressTracker.h"
#include "QWebFrameAdapter.h"
#include "QWebPageAdapter.h"
diff --git a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
index 245e56bc9..9fcddeb55 100644
--- a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
@@ -41,6 +41,7 @@
#include "NetworkingContext.h"
#include "NodeList.h"
#include "Page.h"
+#include "QWebFrameData.h"
#include "QWebPageAdapter.h"
#include "RenderObject.h"
#include "ScriptController.h"
@@ -85,29 +86,6 @@ static inline ResourceRequestCachePolicy cacheLoadControlToCachePolicy(uint cach
return WebCore::UseProtocolCachePolicy;
}
-QWebFrameData::QWebFrameData(WebCore::Page* parentPage, WebCore::Frame* parentFrame, WebCore::HTMLFrameOwnerElement* ownerFrameElement, const WTF::String& frameName)
- : name(frameName)
- , ownerElement(ownerFrameElement)
- , page(parentPage)
- , allowsScrolling(true)
- , marginWidth(0)
- , marginHeight(0)
-{
- // mainframe is already created in WebCore::Page, just use it.
- if (!parentFrame || !ownerElement) {
- frame = &parentPage->mainFrame();
- frameLoaderClient = static_cast<FrameLoaderClientQt*>(&frame->loader().client());
- } else {
- frameLoaderClient = new FrameLoaderClientQt();
- frame = Frame::create(page, ownerElement, frameLoaderClient);
- }
-
- // FIXME: All of the below should probably be moved over into WebCore
- frame->tree().setName(name);
- if (parentFrame)
- parentFrame->tree().appendChild(frame);
-}
-
QWebFrameAdapter::QWebFrameAdapter()
: pageAdapter(0)
, allowsScrolling(true)
diff --git a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.h b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.h
index 5e763a2e3..026b2fb26 100644
--- a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.h
+++ b/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.h
@@ -20,9 +20,6 @@
#ifndef QWebFrameAdapter_h
#define QWebFrameAdapter_h
-#include "FrameLoaderClientQt.h"
-#include "PlatformEvent.h"
-#include "PlatformExportMacros.h"
#if ENABLE(ORIENTATION_EVENTS) && HAVE(QTSENSORS)
#include "qorientationsensor.h"
#endif // ENABLE(ORIENTATION_EVENTS).
@@ -35,12 +32,10 @@
#include <QRect>
#include <QSize>
#include <QUrl>
-#include <wtf/ExportMacros.h>
-#include <wtf/RefPtr.h>
-#include <wtf/text/WTFString.h>
namespace WebCore {
class Frame;
+class FrameLoaderClientQt;
class HitTestResult;
class GraphicsContext;
class IntRect;
@@ -56,6 +51,7 @@ QT_END_NAMESPACE
class QGestureEventFacade;
#endif
class QWebFrame;
+class QWebFrameData;
class QWebPageAdapter;
class QWebSecurityOrigin;
@@ -100,22 +96,6 @@ private:
friend class QWebPageAdapter;
};
-class QWebFrameData {
-public:
- QWebFrameData(WebCore::Page*, WebCore::Frame* parentFrame = 0, WebCore::HTMLFrameOwnerElement* = 0, const WTF::String& frameName = WTF::String());
-
- WTF::String name;
- WebCore::HTMLFrameOwnerElement* ownerElement;
- WebCore::Page* page;
- RefPtr<WebCore::Frame> frame;
- WebCore::FrameLoaderClientQt* frameLoaderClient;
-
- WTF::String referrer;
- bool allowsScrolling;
- int marginWidth;
- int marginHeight;
-};
-
class QWEBKIT_EXPORT QWebFrameAdapter {
public:
enum ValueOwnership {
diff --git a/Source/WebKit/qt/WebCoreSupport/QWebFrameData.cpp b/Source/WebKit/qt/WebCoreSupport/QWebFrameData.cpp
new file mode 100644
index 000000000..d09ad3a35
--- /dev/null
+++ b/Source/WebKit/qt/WebCoreSupport/QWebFrameData.cpp
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2015 The Qt Company Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "config.h"
+#include "QWebFrameData.h"
+
+#include "FrameLoaderClientQt.h"
+#include "MainFrame.h"
+#include "Page.h"
+
+using namespace WebCore;
+
+QWebFrameData::QWebFrameData(WebCore::Page* parentPage, WebCore::Frame* parentFrame, WebCore::HTMLFrameOwnerElement* ownerFrameElement, const WTF::String& frameName)
+ : name(frameName)
+ , ownerElement(ownerFrameElement)
+ , page(parentPage)
+ , allowsScrolling(true)
+ , marginWidth(0)
+ , marginHeight(0)
+{
+ // mainframe is already created in WebCore::Page, just use it.
+ if (!parentFrame || !ownerElement) {
+ frame = &parentPage->mainFrame();
+ frameLoaderClient = static_cast<FrameLoaderClientQt*>(&frame->loader().client());
+ } else {
+ frameLoaderClient = new FrameLoaderClientQt();
+ frame = Frame::create(page, ownerElement, frameLoaderClient);
+ }
+
+ // FIXME: All of the below should probably be moved over into WebCore
+ frame->tree().setName(name);
+ if (parentFrame)
+ parentFrame->tree().appendChild(frame);
+}
diff --git a/Source/WebKit/qt/WebCoreSupport/QWebFrameData.h b/Source/WebKit/qt/WebCoreSupport/QWebFrameData.h
new file mode 100644
index 000000000..85216b56d
--- /dev/null
+++ b/Source/WebKit/qt/WebCoreSupport/QWebFrameData.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2015 The Qt Company Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#pragma once
+
+#include <wtf/RefPtr.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+class Frame;
+class FrameLoaderClientQt;
+class HTMLFrameOwnerElement;
+class Page;
+}
+
+class QWebFrameData {
+public:
+ QWebFrameData(WebCore::Page*, WebCore::Frame* parentFrame = 0, WebCore::HTMLFrameOwnerElement* = 0, const WTF::String& frameName = WTF::String());
+
+ WTF::String name;
+ WebCore::HTMLFrameOwnerElement* ownerElement;
+ WebCore::Page* page;
+ RefPtr<WebCore::Frame> frame;
+ WebCore::FrameLoaderClientQt* frameLoaderClient;
+
+ WTF::String referrer;
+ bool allowsScrolling;
+ int marginWidth;
+ int marginHeight;
+};
diff --git a/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp b/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp
index bbbe42992..49031d512 100644
--- a/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp
@@ -39,6 +39,7 @@
#include "EventHandler.h"
#include "FocusController.h"
#include "FrameLoadRequest.h"
+#include "FrameLoaderClientQt.h"
#include "FrameSelection.h"
#include "FrameView.h"
#include "GeolocationPermissionClientQt.h"
diff --git a/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.h b/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.h
index 040a2c16d..4017f6fc3 100644
--- a/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.h
+++ b/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.h
@@ -20,9 +20,7 @@
#ifndef QWebPageAdapter_h
#define QWebPageAdapter_h
-#include "PlatformExportMacros.h"
#include "QWebPageClient.h"
-#include "ViewportArguments.h"
#include "qwebhistory.h"
#include <qbasictimer.h>
@@ -33,7 +31,7 @@
#include <qsharedpointer.h>
#include <qstring.h>
#include <qurl.h>
-#include <wtf/ExportMacros.h>
+#include <wtf/Forward.h>
QT_BEGIN_NAMESPACE
class QBitArray;
@@ -52,6 +50,7 @@ class DeviceMotionClient;
class GeolocationClientQt;
class Page;
class UndoStep;
+struct ViewportArguments;
}
class QtPluginWidgetAdapter;
diff --git a/Source/WebKit/qt/WebCoreSupport/TextCheckerClientQt.h b/Source/WebKit/qt/WebCoreSupport/TextCheckerClientQt.h
index dc7d4c4b2..96c5dea74 100644
--- a/Source/WebKit/qt/WebCoreSupport/TextCheckerClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/TextCheckerClientQt.h
@@ -37,16 +37,16 @@
namespace WebCore {
-class TextCheckerClientQt : public TextCheckerClient {
+class TextCheckerClientQt final : public TextCheckerClient {
public:
- virtual bool shouldEraseMarkersAfterChangeSelection(TextCheckingType) const;
- virtual void ignoreWordInSpellDocument(const String&);
- virtual void learnWord(const String&);
- virtual void checkSpellingOfString(StringView, int* misspellingLocation, int* misspellingLength);
- virtual String getAutoCorrectSuggestionForMisspelledWord(const String& misspelledWord);
- virtual void checkGrammarOfString(StringView, Vector<GrammarDetail>&, int* badGrammarLocation, int* badGrammarLength);
- virtual void getGuessesForWord(const String& word, const String& context, Vector<String>& guesses);
- virtual void requestCheckingOfString(WTF::PassRefPtr<WebCore::TextCheckingRequest>) { }
+ bool shouldEraseMarkersAfterChangeSelection(TextCheckingType) const final;
+ void ignoreWordInSpellDocument(const String&) final;
+ void learnWord(const String&) final;
+ void checkSpellingOfString(StringView, int* misspellingLocation, int* misspellingLength) final;
+ String getAutoCorrectSuggestionForMisspelledWord(const String& misspelledWord) final;
+ void checkGrammarOfString(StringView, Vector<GrammarDetail>&, int* badGrammarLocation, int* badGrammarLength) final;
+ void getGuessesForWord(const String& word, const String& context, Vector<String>& guesses) final;
+ void requestCheckingOfString(WTF::PassRefPtr<WebCore::TextCheckingRequest>) final { }
virtual bool isContinousSpellCheckingEnabled();
virtual void toggleContinousSpellChecking();
diff --git a/Source/WebKit/qt/WebCoreSupport/TextureMapperLayerClientQt.h b/Source/WebKit/qt/WebCoreSupport/TextureMapperLayerClientQt.h
index f1b8c896e..f34a1b2ce 100644
--- a/Source/WebKit/qt/WebCoreSupport/TextureMapperLayerClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/TextureMapperLayerClientQt.h
@@ -32,7 +32,7 @@ namespace WebCore {
class TextureMapperLayer;
-class TextureMapperLayerClientQt : public GraphicsLayerClient {
+class TextureMapperLayerClientQt final : public GraphicsLayerClient {
public:
TextureMapperLayerClientQt(QWebFrameAdapter*);
~TextureMapperLayerClientQt();
diff --git a/Source/WebKit/qt/WidgetApi/qgraphicswebview.h b/Source/WebKit/qt/WidgetApi/qgraphicswebview.h
index 0d990086f..1aa5b66c8 100644
--- a/Source/WebKit/qt/WidgetApi/qgraphicswebview.h
+++ b/Source/WebKit/qt/WidgetApi/qgraphicswebview.h
@@ -92,15 +92,15 @@ public:
bool isTiledBackingStoreFrozen() const;
void setTiledBackingStoreFrozen(bool frozen);
- virtual void setGeometry(const QRectF& rect);
- virtual void updateGeometry();
- virtual void paint(QPainter*, const QStyleOptionGraphicsItem* options, QWidget* widget = Q_NULLPTR);
- virtual QVariant itemChange(GraphicsItemChange change, const QVariant& value);
- virtual bool event(QEvent*);
+ void setGeometry(const QRectF& rect) Q_DECL_OVERRIDE;
+ void updateGeometry() Q_DECL_OVERRIDE;
+ void paint(QPainter*, const QStyleOptionGraphicsItem* options, QWidget* widget = Q_NULLPTR) Q_DECL_OVERRIDE;
+ QVariant itemChange(GraphicsItemChange change, const QVariant& value) Q_DECL_OVERRIDE;
+ bool event(QEvent*) Q_DECL_OVERRIDE;
- virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF& constraint) const;
+ QSizeF sizeHint(Qt::SizeHint which, const QSizeF& constraint) const Q_DECL_OVERRIDE;
- virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
+ QVariant inputMethodQuery(Qt::InputMethodQuery query) const Q_DECL_OVERRIDE;
QPainter::RenderHints renderHints() const;
void setRenderHints(QPainter::RenderHints);
@@ -124,30 +124,30 @@ Q_SIGNALS:
void linkClicked(const QUrl&);
protected:
- virtual void mousePressEvent(QGraphicsSceneMouseEvent*);
- virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent*);
- virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent*);
- virtual void mouseMoveEvent(QGraphicsSceneMouseEvent*);
- virtual void hoverMoveEvent(QGraphicsSceneHoverEvent*);
- virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent*);
+ void mousePressEvent(QGraphicsSceneMouseEvent*) Q_DECL_OVERRIDE;
+ void mouseDoubleClickEvent(QGraphicsSceneMouseEvent*) Q_DECL_OVERRIDE;
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent*) Q_DECL_OVERRIDE;
+ void mouseMoveEvent(QGraphicsSceneMouseEvent*) Q_DECL_OVERRIDE;
+ void hoverMoveEvent(QGraphicsSceneHoverEvent*) Q_DECL_OVERRIDE;
+ void hoverLeaveEvent(QGraphicsSceneHoverEvent*) Q_DECL_OVERRIDE;
#ifndef QT_NO_WHEELEVENT
- virtual void wheelEvent(QGraphicsSceneWheelEvent*);
+ void wheelEvent(QGraphicsSceneWheelEvent*) Q_DECL_OVERRIDE;
#endif
- virtual void keyPressEvent(QKeyEvent*);
- virtual void keyReleaseEvent(QKeyEvent*);
+ void keyPressEvent(QKeyEvent*) Q_DECL_OVERRIDE;
+ void keyReleaseEvent(QKeyEvent*) Q_DECL_OVERRIDE;
#ifndef QT_NO_CONTEXTMENU
- virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent*);
+ void contextMenuEvent(QGraphicsSceneContextMenuEvent*) Q_DECL_OVERRIDE;
#endif
- virtual void dragEnterEvent(QGraphicsSceneDragDropEvent*);
- virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent*);
- virtual void dragMoveEvent(QGraphicsSceneDragDropEvent*);
- virtual void dropEvent(QGraphicsSceneDragDropEvent*);
- virtual void focusInEvent(QFocusEvent*);
- virtual void focusOutEvent(QFocusEvent*);
- virtual void inputMethodEvent(QInputMethodEvent*);
- virtual bool focusNextPrevChild(bool next);
-
- virtual bool sceneEvent(QEvent*);
+ void dragEnterEvent(QGraphicsSceneDragDropEvent*) Q_DECL_OVERRIDE;
+ void dragLeaveEvent(QGraphicsSceneDragDropEvent*) Q_DECL_OVERRIDE;
+ void dragMoveEvent(QGraphicsSceneDragDropEvent*) Q_DECL_OVERRIDE;
+ void dropEvent(QGraphicsSceneDragDropEvent*) Q_DECL_OVERRIDE;
+ void focusInEvent(QFocusEvent*) Q_DECL_OVERRIDE;
+ void focusOutEvent(QFocusEvent*) Q_DECL_OVERRIDE;
+ void inputMethodEvent(QInputMethodEvent*) Q_DECL_OVERRIDE;
+ bool focusNextPrevChild(bool next) Q_DECL_OVERRIDE;
+
+ bool sceneEvent(QEvent*) Q_DECL_OVERRIDE;
private:
Q_PRIVATE_SLOT(d, void _q_doLoadFinished(bool success))
diff --git a/Source/WebKit/qt/WidgetApi/qwebframe.cpp b/Source/WebKit/qt/WidgetApi/qwebframe.cpp
index dd08725eb..b62557eb1 100644
--- a/Source/WebKit/qt/WidgetApi/qwebframe.cpp
+++ b/Source/WebKit/qt/WidgetApi/qwebframe.cpp
@@ -26,10 +26,7 @@
#include "qwebframe_p.h"
#include "qwebpage.h"
#include "qwebpage_p.h"
-#include "qwebscriptworld.h"
-#include "qwebscriptworld_p.h"
#include "qwebsecurityorigin.h"
-#include "DOMWrapperWorld.h"
#include <QMultiMap>
#include <qdebug.h>
#include <qevent.h>
diff --git a/Source/WebKit/qt/WidgetApi/qwebframe.h b/Source/WebKit/qt/WidgetApi/qwebframe.h
index 619594336..1c3cb07c3 100644
--- a/Source/WebKit/qt/WidgetApi/qwebframe.h
+++ b/Source/WebKit/qt/WidgetApi/qwebframe.h
@@ -202,7 +202,7 @@ public:
QWebHitTestResult hitTestContent(const QPoint &pos) const;
- virtual bool event(QEvent *);
+ bool event(QEvent *) Q_DECL_OVERRIDE;
QWebSecurityOrigin securityOrigin() const;
QWebFrameAdapter* handle() const;
diff --git a/Source/WebKit/qt/WidgetApi/qwebinspector.h b/Source/WebKit/qt/WidgetApi/qwebinspector.h
index d6a4aad3c..c5f097e27 100644
--- a/Source/WebKit/qt/WidgetApi/qwebinspector.h
+++ b/Source/WebKit/qt/WidgetApi/qwebinspector.h
@@ -36,14 +36,14 @@ public:
void setPage(QWebPage* page);
QWebPage* page() const;
- QSize sizeHint() const;
- bool event(QEvent*);
+ QSize sizeHint() const Q_DECL_OVERRIDE;
+ bool event(QEvent*) Q_DECL_OVERRIDE;
protected:
- void resizeEvent(QResizeEvent* event);
- void showEvent(QShowEvent* event);
- void hideEvent(QHideEvent* event);
- void closeEvent(QCloseEvent* event);
+ void resizeEvent(QResizeEvent* event) Q_DECL_OVERRIDE;
+ void showEvent(QShowEvent* event) Q_DECL_OVERRIDE;
+ void hideEvent(QHideEvent* event) Q_DECL_OVERRIDE;
+ void closeEvent(QCloseEvent* event) Q_DECL_OVERRIDE;
private:
QWebInspectorPrivate* d;
diff --git a/Source/WebKit/qt/WidgetApi/qwebpage.cpp b/Source/WebKit/qt/WidgetApi/qwebpage.cpp
index 058d64019..82f59e916 100644
--- a/Source/WebKit/qt/WidgetApi/qwebpage.cpp
+++ b/Source/WebKit/qt/WidgetApi/qwebpage.cpp
@@ -23,9 +23,7 @@
#include "qwebpage.h"
#include "InitWebKitQt.h"
-#include "InspectorClientQt.h"
#include "InspectorClientWebPage.h"
-#include "InspectorServerQt.h"
#include "PageClientQt.h"
#include "QGraphicsWidgetPluginImpl.h"
#include "QWebUndoCommand.h"
diff --git a/Source/WebKit/qt/WidgetApi/qwebpage.h b/Source/WebKit/qt/WidgetApi/qwebpage.h
index e709ef767..6b465e557 100644
--- a/Source/WebKit/qt/WidgetApi/qwebpage.h
+++ b/Source/WebKit/qt/WidgetApi/qwebpage.h
@@ -337,7 +337,7 @@ public:
void setPreferredContentsSize(const QSize &size) const;
void setActualVisibleContentRect(const QRect& rect) const;
- virtual bool event(QEvent*);
+ bool event(QEvent*) Q_DECL_OVERRIDE;
bool focusNextPrevChild(bool next);
QVariant inputMethodQuery(Qt::InputMethodQuery property) const;
diff --git a/Source/WebKit/qt/WidgetApi/qwebview.h b/Source/WebKit/qt/WidgetApi/qwebview.h
index ac0946773..0ed324da1 100644
--- a/Source/WebKit/qt/WidgetApi/qwebview.h
+++ b/Source/WebKit/qt/WidgetApi/qwebview.h
@@ -55,7 +55,7 @@ class QWEBKITWIDGETS_EXPORT QWebView : public QWidget {
Q_FLAGS(QPainter::RenderHints)
public:
explicit QWebView(QWidget* parent = Q_NULLPTR);
- virtual ~QWebView();
+ ~QWebView();
QWebPage* page() const;
void setPage(QWebPage* page);
@@ -90,9 +90,9 @@ public:
void setTextInteractionFlag(Qt::TextInteractionFlag flag);
*/
- QVariant inputMethodQuery(Qt::InputMethodQuery property) const;
+ QVariant inputMethodQuery(Qt::InputMethodQuery property) const Q_DECL_OVERRIDE;
- QSize sizeHint() const;
+ QSize sizeHint() const Q_DECL_OVERRIDE;
qreal zoomFactor() const;
void setZoomFactor(qreal factor);
@@ -106,7 +106,7 @@ public:
bool findText(const QString& subString, QWebPage::FindFlags options = QWebPage::FindFlags());
- virtual bool event(QEvent*);
+ bool event(QEvent*) Q_DECL_OVERRIDE;
public Q_SLOTS:
void stop();
@@ -128,33 +128,33 @@ Q_SIGNALS:
void urlChanged(const QUrl&);
protected:
- void resizeEvent(QResizeEvent*);
- void paintEvent(QPaintEvent*);
+ void resizeEvent(QResizeEvent*) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent*) Q_DECL_OVERRIDE;
virtual QWebView *createWindow(QWebPage::WebWindowType type);
- virtual void changeEvent(QEvent*);
- virtual void mouseMoveEvent(QMouseEvent*);
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseDoubleClickEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
+ void changeEvent(QEvent*) Q_DECL_OVERRIDE;
+ void mouseMoveEvent(QMouseEvent*) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent*) Q_DECL_OVERRIDE;
+ void mouseDoubleClickEvent(QMouseEvent*) Q_DECL_OVERRIDE;
+ void mouseReleaseEvent(QMouseEvent*) Q_DECL_OVERRIDE;
#ifndef QT_NO_CONTEXTMENU
- virtual void contextMenuEvent(QContextMenuEvent*);
+ void contextMenuEvent(QContextMenuEvent*) Q_DECL_OVERRIDE;
#endif
#ifndef QT_NO_WHEELEVENT
- virtual void wheelEvent(QWheelEvent*);
+ void wheelEvent(QWheelEvent*) Q_DECL_OVERRIDE;
#endif
- virtual void keyPressEvent(QKeyEvent*);
- virtual void keyReleaseEvent(QKeyEvent*);
- virtual void dragEnterEvent(QDragEnterEvent*);
- virtual void dragLeaveEvent(QDragLeaveEvent*);
- virtual void dragMoveEvent(QDragMoveEvent*);
- virtual void dropEvent(QDropEvent*);
- virtual void focusInEvent(QFocusEvent*);
- virtual void focusOutEvent(QFocusEvent*);
- virtual void inputMethodEvent(QInputMethodEvent*);
-
- virtual bool focusNextPrevChild(bool next);
+ void keyPressEvent(QKeyEvent*) Q_DECL_OVERRIDE;
+ void keyReleaseEvent(QKeyEvent*) Q_DECL_OVERRIDE;
+ void dragEnterEvent(QDragEnterEvent*) Q_DECL_OVERRIDE;
+ void dragLeaveEvent(QDragLeaveEvent*) Q_DECL_OVERRIDE;
+ void dragMoveEvent(QDragMoveEvent*) Q_DECL_OVERRIDE;
+ void dropEvent(QDropEvent*) Q_DECL_OVERRIDE;
+ void focusInEvent(QFocusEvent*) Q_DECL_OVERRIDE;
+ void focusOutEvent(QFocusEvent*) Q_DECL_OVERRIDE;
+ void inputMethodEvent(QInputMethodEvent*) Q_DECL_OVERRIDE;
+
+ bool focusNextPrevChild(bool next) Q_DECL_OVERRIDE;
private:
friend class QWebPage;
diff --git a/Source/WebKit/qt/WidgetApi/qwebviewaccessible_p.h b/Source/WebKit/qt/WidgetApi/qwebviewaccessible_p.h
index 237852dda..0630f1d55 100644
--- a/Source/WebKit/qt/WidgetApi/qwebviewaccessible_p.h
+++ b/Source/WebKit/qt/WidgetApi/qwebviewaccessible_p.h
@@ -43,15 +43,15 @@ public:
QWebFrame* frame() const;
- QAccessibleInterface* parent() const;
- int childCount() const;
- QAccessibleInterface* child(int index) const;
- int indexOfChild(const QAccessibleInterface*) const;
+ QAccessibleInterface* parent() const Q_DECL_OVERRIDE;
+ int childCount() const Q_DECL_OVERRIDE;
+ QAccessibleInterface* child(int index) const Q_DECL_OVERRIDE;
+ int indexOfChild(const QAccessibleInterface*) const Q_DECL_OVERRIDE;
int navigate(QAccessible::RelationFlag, int, QAccessibleInterface** target) const;
- QString text(QAccessible::Text) const;
- QAccessible::Role role() const;
- QAccessible::State state() const;
+ QString text(QAccessible::Text) const Q_DECL_OVERRIDE;
+ QAccessible::Role role() const Q_DECL_OVERRIDE;
+ QAccessible::State state() const Q_DECL_OVERRIDE;
};
class QWebPageAccessible : public QAccessibleObject {
@@ -60,15 +60,15 @@ public:
QWebPage* page() const;
- QAccessibleInterface* parent() const;
- int childCount() const;
- QAccessibleInterface* child(int index) const;
- int indexOfChild(const QAccessibleInterface*) const;
+ QAccessibleInterface* parent() const Q_DECL_OVERRIDE;
+ int childCount() const Q_DECL_OVERRIDE;
+ QAccessibleInterface* child(int index) const Q_DECL_OVERRIDE;
+ int indexOfChild(const QAccessibleInterface*) const Q_DECL_OVERRIDE;
int navigate(QAccessible::RelationFlag, int, QAccessibleInterface** target) const;
- QString text(QAccessible::Text) const;
- QAccessible::Role role() const;
- QAccessible::State state() const;
+ QString text(QAccessible::Text) const Q_DECL_OVERRIDE;
+ QAccessible::Role role() const Q_DECL_OVERRIDE;
+ QAccessible::State state() const Q_DECL_OVERRIDE;
};
class QWebViewAccessible : public QAccessibleWidget {
@@ -77,8 +77,8 @@ public:
QWebView* view() const;
- int childCount() const;
- QAccessibleInterface* child(int index) const;
+ int childCount() const Q_DECL_OVERRIDE;
+ QAccessibleInterface* child(int index) const Q_DECL_OVERRIDE;
};
#endif // !QT_NO_ACCESSIBILITY
diff --git a/Source/WebKit/qt/WidgetSupport/InspectorClientWebPage.h b/Source/WebKit/qt/WidgetSupport/InspectorClientWebPage.h
index a6ab065e5..59cf74135 100644
--- a/Source/WebKit/qt/WidgetSupport/InspectorClientWebPage.h
+++ b/Source/WebKit/qt/WidgetSupport/InspectorClientWebPage.h
@@ -36,13 +36,13 @@
namespace WebKit {
-class InspectorClientWebPage : public QWebPage {
+class InspectorClientWebPage final : public QWebPage {
Q_OBJECT
friend class InspectorClientQt;
public:
InspectorClientWebPage();
- QWebPage* createWindow(QWebPage::WebWindowType);
+ QWebPage* createWindow(QWebPage::WebWindowType) final;
public Q_SLOTS:
void javaScriptWindowObjectCleared();
diff --git a/Source/WebKit/qt/WidgetSupport/PageClientQt.h b/Source/WebKit/qt/WidgetSupport/PageClientQt.h
index 94de09494..649882990 100644
--- a/Source/WebKit/qt/WidgetSupport/PageClientQt.h
+++ b/Source/WebKit/qt/WidgetSupport/PageClientQt.h
@@ -38,7 +38,7 @@
namespace WebCore {
-class PageClientQWidget : public QWebPageClient {
+class PageClientQWidget final : public QWebPageClient {
public:
PageClientQWidget(QWidget* newView, QWebPage* newPage)
: view(newView)
@@ -46,38 +46,38 @@ public:
{
Q_ASSERT(view);
}
- virtual ~PageClientQWidget();
+ ~PageClientQWidget() final;
- virtual bool isQWidgetClient() const { return true; }
+ bool isQWidgetClient() const final { return true; }
- virtual void scroll(int dx, int dy, const QRect&);
- virtual void update(const QRect& dirtyRect);
- virtual void repaintViewport();
- virtual void setInputMethodEnabled(bool);
- virtual bool inputMethodEnabled() const;
- virtual void setInputMethodHints(Qt::InputMethodHints);
+ void scroll(int dx, int dy, const QRect&) final;
+ void update(const QRect& dirtyRect) final;
+ void repaintViewport() final;
+ void setInputMethodEnabled(bool) final;
+ bool inputMethodEnabled() const final;
+ void setInputMethodHints(Qt::InputMethodHints) final;
#ifndef QT_NO_CURSOR
- virtual QCursor cursor() const;
- virtual void updateCursor(const QCursor&);
+ QCursor cursor() const final;
+ void updateCursor(const QCursor&) final;
#endif
- virtual QPalette palette() const;
- virtual int screenNumber() const;
- virtual QObject* ownerWidget() const;
- virtual QRect geometryRelativeToOwnerWidget() const;
- virtual QPoint mapToOwnerWindow(const QPoint&) const;
+ QPalette palette() const final;
+ int screenNumber() const final;
+ QObject* ownerWidget() const final;
+ QRect geometryRelativeToOwnerWidget() const final;
+ QPoint mapToOwnerWindow(const QPoint&) const final;
- virtual QObject* pluginParent() const;
+ QObject* pluginParent() const final;
- virtual QStyle* style() const;
+ QStyle* style() const final;
- virtual bool viewResizesToContentsEnabled() const { return false; }
+ bool viewResizesToContentsEnabled() const final { return false; }
- virtual QRectF windowRect() const;
+ QRectF windowRect() const final;
- virtual void setWidgetVisible(Widget*, bool visible);
- virtual bool isViewVisible();
+ void setWidgetVisible(Widget*, bool visible) final;
+ bool isViewVisible() final;
QWidget* view;
QWebPage* page;
@@ -86,7 +86,7 @@ public:
#if !defined(QT_NO_GRAPHICSVIEW)
// the overlay is here for one reason only: to have the scroll-bars and other
// extra UI elements appear on top of any QGraphicsItems created by CSS compositing layers
-class QGraphicsItemOverlay : public QGraphicsObject {
+class QGraphicsItemOverlay final : public QGraphicsObject {
public:
QGraphicsItemOverlay(QGraphicsWidget* view, QWebPage* p)
: QGraphicsObject(view)
@@ -98,12 +98,12 @@ class QGraphicsItemOverlay : public QGraphicsObject {
setCacheMode(QGraphicsItem::DeviceCoordinateCache);
}
- QRectF boundingRect() const
+ QRectF boundingRect() const final
{
return q->boundingRect();
}
- void paint(QPainter* painter, const QStyleOptionGraphicsItem* options, QWidget*)
+ void paint(QPainter* painter, const QStyleOptionGraphicsItem* options, QWidget*) final
{
page->mainFrame()->render(painter, static_cast<QWebFrame::RenderLayer>(QWebFrame::AllLayers&(~QWebFrame::ContentsLayer)), options->exposedRect.toRect());
}
@@ -118,7 +118,7 @@ class QGraphicsItemOverlay : public QGraphicsObject {
};
-class PageClientQGraphicsWidget : public QWebPageClient {
+class PageClientQGraphicsWidget final : public QWebPageClient {
public:
PageClientQGraphicsWidget(QGraphicsWebView* newView, QWebPage* newPage)
: view(newView)
@@ -132,44 +132,44 @@ public:
view->setFlag(QGraphicsItem::ItemUsesExtendedStyleOption);
}
- virtual ~PageClientQGraphicsWidget();
+ ~PageClientQGraphicsWidget() final;
- virtual bool isQWidgetClient() const { return false; }
+ bool isQWidgetClient() const final { return false; }
- virtual void scroll(int dx, int dy, const QRect&);
- virtual void update(const QRect& dirtyRect);
- virtual void repaintViewport();
- virtual void setInputMethodEnabled(bool);
- virtual bool inputMethodEnabled() const;
- virtual void setInputMethodHints(Qt::InputMethodHints);
+ void scroll(int dx, int dy, const QRect&) final;
+ void update(const QRect& dirtyRect) final;
+ void repaintViewport() final;
+ void setInputMethodEnabled(bool) final;
+ bool inputMethodEnabled() const final;
+ void setInputMethodHints(Qt::InputMethodHints) final;
#ifndef QT_NO_CURSOR
- virtual QCursor cursor() const;
- virtual void updateCursor(const QCursor&);
+ QCursor cursor() const final;
+ void updateCursor(const QCursor&) final;
#endif
- virtual QPalette palette() const;
- virtual int screenNumber() const;
- virtual QObject* ownerWidget() const;
- virtual QRect geometryRelativeToOwnerWidget() const;
- virtual QPoint mapToOwnerWindow(const QPoint&) const;
+ QPalette palette() const final;
+ int screenNumber() const final;
+ QObject* ownerWidget() const final;
+ QRect geometryRelativeToOwnerWidget() const final;
+ QPoint mapToOwnerWindow(const QPoint&) const final;
- virtual QObject* pluginParent() const;
+ QObject* pluginParent() const final;
- virtual QStyle* style() const;
+ QStyle* style() const final;
- virtual bool viewResizesToContentsEnabled() const { return viewResizesToContents; }
+ bool viewResizesToContentsEnabled() const final { return viewResizesToContents; }
- virtual void setWidgetVisible(Widget*, bool);
- virtual bool isViewVisible();
+ void setWidgetVisible(Widget*, bool) final;
+ bool isViewVisible() final;
#if USE(TILED_BACKING_STORE)
virtual QRectF graphicsItemVisibleRect() const;
#endif
- virtual bool makeOpenGLContextCurrentIfAvailable();
+ bool makeOpenGLContextCurrentIfAvailable() final;
- virtual QRectF windowRect() const;
+ QRectF windowRect() const final;
QGraphicsView* firstGraphicsView() const;
diff --git a/Source/WebKit/qt/WidgetSupport/QGraphicsWidgetPluginImpl.h b/Source/WebKit/qt/WidgetSupport/QGraphicsWidgetPluginImpl.h
index cddcbc5c9..b606ae701 100644
--- a/Source/WebKit/qt/WidgetSupport/QGraphicsWidgetPluginImpl.h
+++ b/Source/WebKit/qt/WidgetSupport/QGraphicsWidgetPluginImpl.h
@@ -28,17 +28,17 @@ QT_BEGIN_NAMESPACE
class QGraphicsWidget;
QT_END_NAMESPACE
-class QGraphicsWidgetPluginImpl : public QtPluginWidgetAdapter {
+class QGraphicsWidgetPluginImpl final : public QtPluginWidgetAdapter {
Q_OBJECT
public:
QGraphicsWidgetPluginImpl(QGraphicsWidget *w) : m_graphicsWidget(w) { }
- virtual ~QGraphicsWidgetPluginImpl();
- void update(const QRect &) override;
- void setGeometryAndClip(const QRect&, const QRect&, bool) override;
- void setVisible(bool) override;
- void setStyleSheet(const QString&) override { }
- void setWidgetParent(QObject*) override;
- QObject* handle() const override;
+ ~QGraphicsWidgetPluginImpl();
+ void update(const QRect &) final;
+ void setGeometryAndClip(const QRect&, const QRect&, bool) final;
+ void setVisible(bool) final;
+ void setStyleSheet(const QString&) final { }
+ void setWidgetParent(QObject*) final;
+ QObject* handle() const final;
private:
QGraphicsWidget *m_graphicsWidget;
};
diff --git a/Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.h b/Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.h
index 5ec4ec20a..9e9cf0af7 100644
--- a/Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.h
+++ b/Source/WebKit/qt/WidgetSupport/QStyleFacadeImp.h
@@ -42,45 +42,45 @@ namespace WebKit {
class QStyleFacadeImp : public WebCore::QStyleFacade {
public:
QStyleFacadeImp(QWebPageAdapter* = 0);
- virtual ~QStyleFacadeImp();
+ ~QStyleFacadeImp() override;
static WebCore::QStyleFacade* create(QWebPageAdapter* page)
{ return new QStyleFacadeImp(page); }
- virtual QRect buttonSubElementRect(ButtonSubElement, State, const QRect& originalRect) const;
+ QRect buttonSubElementRect(ButtonSubElement, State, const QRect& originalRect) const override;
- virtual int findFrameLineWidth() const;
- virtual int simplePixelMetric(PixelMetric, State = State_None) const;
- virtual int buttonMargin(State, const QRect& originalRect) const;
- virtual int sliderLength(Qt::Orientation) const;
- virtual int sliderThickness(Qt::Orientation) const;
- virtual int progressBarChunkWidth(const QSize&) const;
- virtual void getButtonMetrics(QString* buttonFontFamily, int* buttonFontPixelSize) const;
+ int findFrameLineWidth() const override;
+ int simplePixelMetric(PixelMetric, State = State_None) const override;
+ int buttonMargin(State, const QRect& originalRect) const override;
+ int sliderLength(Qt::Orientation) const override;
+ int sliderThickness(Qt::Orientation) const override;
+ int progressBarChunkWidth(const QSize&) const override;
+ void getButtonMetrics(QString* buttonFontFamily, int* buttonFontPixelSize) const override;
- virtual QSize comboBoxSizeFromContents(State, const QSize& contentsSize) const;
- virtual QSize pushButtonSizeFromContents(State, const QSize& contentsSize) const;
+ QSize comboBoxSizeFromContents(State, const QSize& contentsSize) const override;
+ QSize pushButtonSizeFromContents(State, const QSize& contentsSize) const override;
- virtual void paintButton(QPainter*, ButtonType, const WebCore::QStyleFacadeOption &proxyOption);
- virtual void paintTextField(QPainter*, const WebCore::QStyleFacadeOption&);
- virtual void paintComboBox(QPainter*, const WebCore::QStyleFacadeOption&);
- virtual void paintComboBoxArrow(QPainter*, const WebCore::QStyleFacadeOption&);
+ void paintButton(QPainter*, ButtonType, const WebCore::QStyleFacadeOption &proxyOption) override;
+ void paintTextField(QPainter*, const WebCore::QStyleFacadeOption&) override;
+ void paintComboBox(QPainter*, const WebCore::QStyleFacadeOption&) override;
+ void paintComboBoxArrow(QPainter*, const WebCore::QStyleFacadeOption&) override;
- virtual void paintSliderTrack(QPainter*, const WebCore::QStyleFacadeOption&);
- virtual void paintSliderThumb(QPainter*, const WebCore::QStyleFacadeOption&);
- virtual void paintInnerSpinButton(QPainter*, const WebCore::QStyleFacadeOption&, bool spinBoxUp);
- virtual void paintProgressBar(QPainter*, const WebCore::QStyleFacadeOption&, double progress, double animationProgress);
+ void paintSliderTrack(QPainter*, const WebCore::QStyleFacadeOption&) override;
+ void paintSliderThumb(QPainter*, const WebCore::QStyleFacadeOption&) override;
+ void paintInnerSpinButton(QPainter*, const WebCore::QStyleFacadeOption&, bool spinBoxUp) override;
+ void paintProgressBar(QPainter*, const WebCore::QStyleFacadeOption&, double progress, double animationProgress) override;
- virtual int scrollBarExtent(bool mini);
- virtual bool scrollBarMiddleClickAbsolutePositionStyleHint() const;
- virtual void paintScrollCorner(QPainter*, const QRect&);
+ int scrollBarExtent(bool mini) override;
+ bool scrollBarMiddleClickAbsolutePositionStyleHint() const override;
+ void paintScrollCorner(QPainter*, const QRect&) override;
- virtual SubControl hitTestScrollBar(const WebCore::QStyleFacadeOption&, const QPoint& pos);
- virtual QRect scrollBarSubControlRect(const WebCore::QStyleFacadeOption&, SubControl);
- virtual void paintScrollBar(QPainter*, const WebCore::QStyleFacadeOption&);
+ SubControl hitTestScrollBar(const WebCore::QStyleFacadeOption&, const QPoint& pos) override;
+ QRect scrollBarSubControlRect(const WebCore::QStyleFacadeOption&, SubControl) override;
+ void paintScrollBar(QPainter*, const WebCore::QStyleFacadeOption&) override;
- virtual QObject* widgetForPainter(QPainter*);
+ QObject* widgetForPainter(QPainter*) override;
- virtual bool isValid() const { return style(); }
+ bool isValid() const override { return style(); }
private:
QStyle* style() const;
diff --git a/Source/WebKit/qt/WidgetSupport/QWebUndoCommand.h b/Source/WebKit/qt/WidgetSupport/QWebUndoCommand.h
index b9e616925..c96e0c3d3 100644
--- a/Source/WebKit/qt/WidgetSupport/QWebUndoCommand.h
+++ b/Source/WebKit/qt/WidgetSupport/QWebUndoCommand.h
@@ -27,12 +27,12 @@ class UndoStepQt;
#ifndef QT_NO_UNDOCOMMAND
-class QWebUndoCommand : public QUndoCommand {
+class QWebUndoCommand final : public QUndoCommand {
public:
QWebUndoCommand(QSharedPointer<UndoStepQt>, QUndoCommand *parent = 0);
- void undo();
- void redo();
+ void undo() final;
+ void redo() final;
private:
QSharedPointer<UndoStepQt> m_step;
diff --git a/Source/WebKit/qt/WidgetSupport/QWidgetPluginImpl.h b/Source/WebKit/qt/WidgetSupport/QWidgetPluginImpl.h
index c0ecbcd04..71943f0f6 100644
--- a/Source/WebKit/qt/WidgetSupport/QWidgetPluginImpl.h
+++ b/Source/WebKit/qt/WidgetSupport/QWidgetPluginImpl.h
@@ -26,17 +26,17 @@ QT_BEGIN_NAMESPACE
class QWidget;
QT_END_NAMESPACE
-class QWidgetPluginImpl : public QtPluginWidgetAdapter {
+class QWidgetPluginImpl final : public QtPluginWidgetAdapter {
Q_OBJECT
public:
QWidgetPluginImpl(QWidget *w) : m_widget(w) { }
- virtual ~QWidgetPluginImpl();
- void update(const QRect &) override;
- void setGeometryAndClip(const QRect&, const QRect&, bool isVisible) override;
- void setVisible(bool) override;
- void setStyleSheet(const QString&) override;
- void setWidgetParent(QObject *) override;
- QObject* handle() const override;
+ ~QWidgetPluginImpl();
+ void update(const QRect &) final;
+ void setGeometryAndClip(const QRect&, const QRect&, bool isVisible) final;
+ void setVisible(bool) final;
+ void setStyleSheet(const QString&) final;
+ void setWidgetParent(QObject *) final;
+ QObject* handle() const final;
private:
QWidget *m_widget;
};
diff --git a/Source/WebKit/qt/WidgetSupport/QtFallbackWebPopup.h b/Source/WebKit/qt/WidgetSupport/QtFallbackWebPopup.h
index cc2c6adb9..8ecaa3f07 100644
--- a/Source/WebKit/qt/WidgetSupport/QtFallbackWebPopup.h
+++ b/Source/WebKit/qt/WidgetSupport/QtFallbackWebPopup.h
@@ -37,19 +37,19 @@ namespace WebCore {
class QtWebComboBox;
-class QtFallbackWebPopup : public QWebSelectMethod {
+class QtFallbackWebPopup final : public QWebSelectMethod {
Q_OBJECT
public:
QtFallbackWebPopup(const QWebPageAdapter*);
~QtFallbackWebPopup();
- virtual void show(const QWebSelectData&);
- virtual void hide();
+ void show(const QWebSelectData&) final;
+ void hide() final;
- void setGeometry(const QRect& rect) { m_geometry = rect; }
+ void setGeometry(const QRect& rect) final { m_geometry = rect; }
QRect geometry() const { return m_geometry; }
- void setFont(const QFont& font) { m_font = font; }
+ void setFont(const QFont& font) final { m_font = font; }
QFont font() const { return m_font; }
private Q_SLOTS:
diff --git a/Source/WebKit/qt/WidgetSupport/QtWebComboBox.h b/Source/WebKit/qt/WidgetSupport/QtWebComboBox.h
index 1bdb7151a..dfed5b70a 100644
--- a/Source/WebKit/qt/WidgetSupport/QtWebComboBox.h
+++ b/Source/WebKit/qt/WidgetSupport/QtWebComboBox.h
@@ -28,15 +28,15 @@
namespace WebCore {
-class QtWebComboBox : public QComboBox {
+class QtWebComboBox final : public QComboBox {
Q_OBJECT
public:
QtWebComboBox();
void showPopupAtCursorPosition();
- virtual bool eventFilter(QObject* watched, QEvent*);
+ bool eventFilter(QObject* watched, QEvent*) final;
- void hidePopup() override;
+ void hidePopup() final;
void deleteComboBox();
Q_SIGNALS:
diff --git a/Source/WebKit/qt/declarative/experimental/plugin.cpp b/Source/WebKit/qt/declarative/experimental/plugin.cpp
index e6ffeda6e..163c0cb47 100644
--- a/Source/WebKit/qt/declarative/experimental/plugin.cpp
+++ b/Source/WebKit/qt/declarative/experimental/plugin.cpp
@@ -47,7 +47,7 @@ class WebKitQmlExperimentalExtensionPlugin: public QQmlExtensionPlugin {
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface" FILE "plugin.json")
public:
- virtual void registerTypes(const char* uri)
+ void registerTypes(const char* uri) override
{
qWarning("\nWARNING: This project is using the experimental QML API extensions for QtWebKit and is therefore tied to a specific QtWebKit release.\n"
"WARNING: The experimental API will change from version to version, or even be removed. You have been warned!\n");
diff --git a/Source/WebKit/qt/declarative/plugin.cpp b/Source/WebKit/qt/declarative/plugin.cpp
index b1a176ccf..f5d52e4bd 100644
--- a/Source/WebKit/qt/declarative/plugin.cpp
+++ b/Source/WebKit/qt/declarative/plugin.cpp
@@ -42,14 +42,14 @@ class WebKitQmlPlugin : public QQmlExtensionPlugin {
Q_OBJECT
public:
#if defined(HAVE_WEBKIT2)
- virtual void initializeEngine(QQmlEngine* engine, const char* uri)
+ void initializeEngine(QQmlEngine* engine, const char* uri) override
{
Q_UNUSED(uri);
engine->addImageProvider(QLatin1String("webicon"), new QWebIconImageProvider);
}
#endif
- virtual void registerTypes(const char* uri)
+ void registerTypes(const char* uri) override
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtWebKit"));
diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebpage_p.h b/Source/WebKit2/UIProcess/API/qt/qquickwebpage_p.h
index e2aaa6c38..988135877 100644
--- a/Source/WebKit2/UIProcess/API/qt/qquickwebpage_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qquickwebpage_p.h
@@ -44,7 +44,7 @@ public:
QTransform transformToItem() const;
protected:
- virtual QSGNode* updatePaintNode(QSGNode*, UpdatePaintNodeData*);
+ QSGNode* updatePaintNode(QSGNode*, UpdatePaintNodeData*) Q_DECL_OVERRIDE;
private:
QQuickWebPagePrivate* d;
diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h b/Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h
index 1daf5db0a..c06f8f219 100644
--- a/Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h
@@ -136,7 +136,7 @@ public:
bool canGoForward() const;
bool loading() const;
- virtual QVariant inputMethodQuery(Qt::InputMethodQuery property) const;
+ QVariant inputMethodQuery(Qt::InputMethodQuery property) const Q_DECL_OVERRIDE;
QPointF mapToWebContent(const QPointF&) const;
QRectF mapRectToWebContent(const QRectF&) const;
@@ -177,28 +177,28 @@ Q_SIGNALS:
void navigationRequested(QWebNavigationRequest* request);
protected:
- virtual bool childMouseEventFilter(QQuickItem*, QEvent*);
- virtual void geometryChanged(const QRectF&, const QRectF&);
- virtual void componentComplete();
- virtual void keyPressEvent(QKeyEvent*);
- virtual void keyReleaseEvent(QKeyEvent*);
- virtual void inputMethodEvent(QInputMethodEvent*);
- virtual void focusInEvent(QFocusEvent*);
- virtual void itemChange(ItemChange change, const ItemChangeData &value);
- virtual void touchEvent(QTouchEvent*);
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseMoveEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent *);
- virtual void mouseDoubleClickEvent(QMouseEvent*);
- virtual void wheelEvent(QWheelEvent*);
- virtual void hoverEnterEvent(QHoverEvent*);
- virtual void hoverMoveEvent(QHoverEvent*);
- virtual void hoverLeaveEvent(QHoverEvent*);
- virtual void dragMoveEvent(QDragMoveEvent*);
- virtual void dragEnterEvent(QDragEnterEvent*);
- virtual void dragLeaveEvent(QDragLeaveEvent*);
- virtual void dropEvent(QDropEvent*);
- virtual bool event(QEvent*);
+ bool childMouseEventFilter(QQuickItem*, QEvent*) Q_DECL_OVERRIDE;
+ void geometryChanged(const QRectF&, const QRectF&) Q_DECL_OVERRIDE;
+ void componentComplete() Q_DECL_OVERRIDE;
+ void keyPressEvent(QKeyEvent*) Q_DECL_OVERRIDE;
+ void keyReleaseEvent(QKeyEvent*) Q_DECL_OVERRIDE;
+ void inputMethodEvent(QInputMethodEvent*) Q_DECL_OVERRIDE;
+ void focusInEvent(QFocusEvent*) Q_DECL_OVERRIDE;
+ void itemChange(ItemChange change, const ItemChangeData &value) Q_DECL_OVERRIDE;
+ void touchEvent(QTouchEvent*) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent*) Q_DECL_OVERRIDE;
+ void mouseMoveEvent(QMouseEvent*) Q_DECL_OVERRIDE;
+ void mouseReleaseEvent(QMouseEvent *) Q_DECL_OVERRIDE;
+ void mouseDoubleClickEvent(QMouseEvent*) Q_DECL_OVERRIDE;
+ void wheelEvent(QWheelEvent*) Q_DECL_OVERRIDE;
+ void hoverEnterEvent(QHoverEvent*) Q_DECL_OVERRIDE;
+ void hoverMoveEvent(QHoverEvent*) Q_DECL_OVERRIDE;
+ void hoverLeaveEvent(QHoverEvent*) Q_DECL_OVERRIDE;
+ void dragMoveEvent(QDragMoveEvent*) Q_DECL_OVERRIDE;
+ void dragEnterEvent(QDragEnterEvent*) Q_DECL_OVERRIDE;
+ void dragLeaveEvent(QDragLeaveEvent*) Q_DECL_OVERRIDE;
+ void dropEvent(QDropEvent*) Q_DECL_OVERRIDE;
+ bool event(QEvent*) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QQuickWebView)
diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h b/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h
index 5dcdb1a27..d041a8eb1 100644
--- a/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h
@@ -227,28 +227,28 @@ class QQuickWebViewLegacyPrivate : public QQuickWebViewPrivate {
Q_DECLARE_PUBLIC(QQuickWebView)
public:
QQuickWebViewLegacyPrivate(QQuickWebView* viewport);
- virtual void initialize(WKContextRef contextRef = 0, WKPageGroupRef pageGroupRef = 0);
+ void initialize(WKContextRef contextRef = 0, WKPageGroupRef pageGroupRef = 0) Q_DECL_OVERRIDE;
- virtual void updateViewportSize();
+ void updateViewportSize() Q_DECL_OVERRIDE;
- qreal zoomFactor() const;
- void setZoomFactor(qreal);
+ qreal zoomFactor() const Q_DECL_OVERRIDE;
+ void setZoomFactor(qreal) Q_DECL_OVERRIDE;
};
class QQuickWebViewFlickablePrivate : public QQuickWebViewPrivate {
Q_DECLARE_PUBLIC(QQuickWebView)
public:
QQuickWebViewFlickablePrivate(QQuickWebView* viewport);
- virtual void initialize(WKContextRef contextRef = 0, WKPageGroupRef pageGroupRef = 0);
+ void initialize(WKContextRef contextRef = 0, WKPageGroupRef pageGroupRef = 0) Q_DECL_OVERRIDE;
- virtual void onComponentComplete();
+ void onComponentComplete() Q_DECL_OVERRIDE;
- virtual void didChangeViewportProperties(const WebCore::ViewportAttributes&);
- virtual WebKit::PageViewportController* viewportController() const { return m_pageViewportController.data(); }
- virtual void updateViewportSize();
+ void didChangeViewportProperties(const WebCore::ViewportAttributes&) Q_DECL_OVERRIDE;
+ WebKit::PageViewportController* viewportController() const Q_DECL_OVERRIDE { return m_pageViewportController.data(); }
+ void updateViewportSize() Q_DECL_OVERRIDE;
- virtual void pageDidRequestScroll(const QPoint& pos);
- virtual void handleMouseEvent(QMouseEvent*);
+ void pageDidRequestScroll(const QPoint& pos) Q_DECL_OVERRIDE;
+ void handleMouseEvent(QMouseEvent*) Q_DECL_OVERRIDE;
private:
QScopedPointer<WebKit::PageViewportController> m_pageViewportController;
diff --git a/Source/WebKit2/UIProcess/API/qt/qwebchannelwebkittransport_p.h b/Source/WebKit2/UIProcess/API/qt/qwebchannelwebkittransport_p.h
index 2cbfdafee..9e17d6fa4 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebchannelwebkittransport_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qwebchannelwebkittransport_p.h
@@ -52,7 +52,7 @@ class QWebChannelWebKitTransport : public QWebChannelAbstractTransport {
public:
explicit QWebChannelWebKitTransport(QQuickWebViewExperimental* experimental);
- void sendMessage(const QJsonObject& message) Q_DECL_OVERRIDE;
+ void sendMessage(const QJsonObject& message) override;
void receiveMessage(const QByteArray& message);
diff --git a/Source/WebKit2/UIProcess/API/qt/qwebiconimageprovider_p.h b/Source/WebKit2/UIProcess/API/qt/qwebiconimageprovider_p.h
index 10b2f697e..2d903e9cd 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebiconimageprovider_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qwebiconimageprovider_p.h
@@ -36,7 +36,7 @@ public:
static QString identifier() { return QStringLiteral("webicon"); }
QUrl iconURLForPageURLInContext(const QString& pageURL, WebKit::QtWebContext* context);
- virtual QImage requestImage(const QString& id, QSize* size, const QSize& requestedSize);
+ QImage requestImage(const QString& id, QSize* size, const QSize& requestedSize) Q_DECL_OVERRIDE;
};
#endif
diff --git a/Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory_p.h b/Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory_p.h
index 84ef867be..06a804a17 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory_p.h
@@ -46,9 +46,9 @@ class QWEBKIT_EXPORT QWebNavigationListModel : public QAbstractListModel {
public:
virtual ~QWebNavigationListModel();
- int rowCount(const QModelIndex& parent = QModelIndex()) const;
- QVariant data(const QModelIndex& index, int role) const;
- QHash<int, QByteArray> roleNames() const;
+ int rowCount(const QModelIndex& parent = QModelIndex()) const Q_DECL_OVERRIDE;
+ QVariant data(const QModelIndex& index, int role) const Q_DECL_OVERRIDE;
+ QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE;
void reset();
private:
diff --git a/Source/WebKit2/UIProcess/InspectorServer/WebInspectorServer.h b/Source/WebKit2/UIProcess/InspectorServer/WebInspectorServer.h
index 4df55898f..c42f8dea1 100644
--- a/Source/WebKit2/UIProcess/InspectorServer/WebInspectorServer.h
+++ b/Source/WebKit2/UIProcess/InspectorServer/WebInspectorServer.h
@@ -38,7 +38,7 @@ namespace WebKit {
class WebInspectorProxy;
-class WebInspectorServer : public WebSocketServer, public WebSocketServerClient {
+class WebInspectorServer final : public WebSocketServer, public WebSocketServerClient {
public:
typedef HashMap<unsigned, WebInspectorProxy*> ClientMap;
static WebInspectorServer& singleton();
@@ -54,11 +54,11 @@ private:
~WebInspectorServer();
// WebSocketServerClient implementation. Events coming from remote connections.
- virtual void didReceiveUnrecognizedHTTPRequest(WebSocketServerConnection*, PassRefPtr<HTTPRequest>);
- virtual bool didReceiveWebSocketUpgradeHTTPRequest(WebSocketServerConnection*, PassRefPtr<HTTPRequest>);
- virtual void didEstablishWebSocketConnection(WebSocketServerConnection*, PassRefPtr<HTTPRequest>);
- virtual void didReceiveWebSocketMessage(WebSocketServerConnection*, const String& message);
- virtual void didCloseWebSocketConnection(WebSocketServerConnection*);
+ void didReceiveUnrecognizedHTTPRequest(WebSocketServerConnection*, PassRefPtr<HTTPRequest>) final;
+ bool didReceiveWebSocketUpgradeHTTPRequest(WebSocketServerConnection*, PassRefPtr<HTTPRequest>) final;
+ void didEstablishWebSocketConnection(WebSocketServerConnection*, PassRefPtr<HTTPRequest>) final;
+ void didReceiveWebSocketMessage(WebSocketServerConnection*, const String& message) final;
+ void didCloseWebSocketConnection(WebSocketServerConnection*) final;
bool platformResourceForPath(const String& path, Vector<char>& data, String& contentType);
#if PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
diff --git a/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp b/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp
index 653dfb52f..448f024c4 100644
--- a/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp
+++ b/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp
@@ -84,7 +84,7 @@ using namespace WebCore;
namespace WebKit {
-class QtWebProcess : public QProcess {
+class QtWebProcess final : public QProcess {
Q_OBJECT
public:
QtWebProcess(QObject* parent = 0)
@@ -93,7 +93,7 @@ public:
}
protected:
- virtual void setupChildProcess();
+ void setupChildProcess() final;
};
void QtWebProcess::setupChildProcess()
diff --git a/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.h b/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.h
index c0b75cee1..805fe7e40 100644
--- a/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.h
+++ b/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.h
@@ -40,19 +40,19 @@ class QWebKitTest;
namespace WebKit {
-class PageViewportControllerClientQt : public QObject, public PageViewportControllerClient {
+class PageViewportControllerClientQt final : public QObject, public PageViewportControllerClient {
Q_OBJECT
public:
PageViewportControllerClientQt(QQuickWebView*, QQuickWebPage*);
- ~PageViewportControllerClientQt();
+ ~PageViewportControllerClientQt() final;
- virtual void setViewportPosition(const WebCore::FloatPoint& contentsPoint);
- virtual void setPageScaleFactor(float);
+ void setViewportPosition(const WebCore::FloatPoint& contentsPoint) final;
+ void setPageScaleFactor(float) final;
- virtual void didChangeContentsSize(const WebCore::IntSize&);
- virtual void didChangeVisibleContents();
- virtual void didChangeViewportAttributes();
+ void didChangeContentsSize(const WebCore::IntSize&) final;
+ void didChangeVisibleContents() final;
+ void didChangeViewportAttributes() final;
virtual void setController(PageViewportController* controller) { m_controller = controller; }
@@ -89,7 +89,7 @@ private Q_SLOTS:
void flickMoveEnded(); // Called when panning (+ kinetic animation) ends.
private:
- class ScaleAnimation : public QVariantAnimation {
+ class ScaleAnimation final : public QVariantAnimation {
PageViewportControllerClientQt* m_controllerClient;
public:
ScaleAnimation(PageViewportControllerClientQt* parent)
@@ -97,7 +97,7 @@ private:
, m_controllerClient(parent)
{ }
- virtual void updateCurrentValue(const QVariant&);
+ void updateCurrentValue(const QVariant&) final;
};
class ViewportInteractionTracker {
diff --git a/Source/WebKit2/UIProcess/qt/QtDialogRunner.h b/Source/WebKit2/UIProcess/qt/QtDialogRunner.h
index fcb276080..7f4fec3c2 100644
--- a/Source/WebKit2/UIProcess/qt/QtDialogRunner.h
+++ b/Source/WebKit2/UIProcess/qt/QtDialogRunner.h
@@ -34,7 +34,7 @@ QT_END_NAMESPACE
namespace WebKit {
-class QtDialogRunner : public QEventLoop {
+class QtDialogRunner final : public QEventLoop {
Q_OBJECT
public:
diff --git a/Source/WebKit2/UIProcess/qt/QtPageClient.h b/Source/WebKit2/UIProcess/qt/QtPageClient.h
index 2f63db4b6..393629731 100644
--- a/Source/WebKit2/UIProcess/qt/QtPageClient.h
+++ b/Source/WebKit2/UIProcess/qt/QtPageClient.h
@@ -33,7 +33,7 @@ class QtWebPageEventHandler;
class DefaultUndoController;
class ShareableBitmap;
-class QtPageClient : public PageClient {
+class QtPageClient final : public PageClient {
public:
QtPageClient();
~QtPageClient();
diff --git a/Source/WebKit2/UIProcess/qt/QtTapGestureRecognizer.h b/Source/WebKit2/UIProcess/qt/QtTapGestureRecognizer.h
index affbc38c5..a474b7536 100644
--- a/Source/WebKit2/UIProcess/qt/QtTapGestureRecognizer.h
+++ b/Source/WebKit2/UIProcess/qt/QtTapGestureRecognizer.h
@@ -35,7 +35,7 @@ namespace WebKit {
class QtWebPageEventHandler;
-class QtTapGestureRecognizer : public QObject, private QtGestureRecognizer {
+class QtTapGestureRecognizer final : public QObject, private QtGestureRecognizer {
public:
QtTapGestureRecognizer(QtWebPageEventHandler*);
void update(const QTouchEvent::TouchPoint&);
@@ -43,7 +43,7 @@ public:
void cancel();
protected:
- void timerEvent(QTimerEvent*);
+ void timerEvent(QTimerEvent*) final;
void highlightTimeout();
void singleTapTimeout();
void tapAndHoldTimeout();
diff --git a/Source/WebKit2/UIProcess/qt/QtWebIconDatabaseClient.h b/Source/WebKit2/UIProcess/qt/QtWebIconDatabaseClient.h
index 69b7965ed..70fa5e12c 100644
--- a/Source/WebKit2/UIProcess/qt/QtWebIconDatabaseClient.h
+++ b/Source/WebKit2/UIProcess/qt/QtWebIconDatabaseClient.h
@@ -32,7 +32,7 @@ QT_END_NAMESPACE
namespace WebKit {
-class QtWebIconDatabaseClient : public QObject {
+class QtWebIconDatabaseClient final : public QObject {
Q_OBJECT
public:
diff --git a/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.h b/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.h
index cd44ddc85..2fe82e8e0 100644
--- a/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.h
+++ b/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.h
@@ -51,7 +51,7 @@ class ShareableBitmap;
class WebGestureEvent;
class WebPageProxy;
-class QtWebPageEventHandler : public QObject {
+class QtWebPageEventHandler final : public QObject {
Q_OBJECT
public:
@@ -109,7 +109,7 @@ private Q_SLOTS:
void inputPanelVisibleChanged();
private:
- void timerEvent(QTimerEvent*);
+ void timerEvent(QTimerEvent*) final;
QPointF m_lastClick;
QBasicTimer m_clickTimer;
diff --git a/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.cpp b/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.cpp
index 1382312db..67df10114 100644
--- a/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.cpp
+++ b/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.cpp
@@ -39,7 +39,7 @@ using namespace WebCore;
namespace WebKit {
-class ContentsSGNode : public QSGRenderNode {
+class ContentsSGNode final : public QSGRenderNode {
public:
ContentsSGNode(PassRefPtr<CoordinatedGraphicsScene> scene)
: m_scene(scene)
@@ -49,24 +49,24 @@ public:
#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
- StateFlags changedStates() const override
+ StateFlags changedStates() const final
{
return StateFlags(StencilState) | ColorState | BlendState;
}
- void render(const RenderState* state) override
+ void render(const RenderState* state) final
{
renderInternal(state->projectionMatrix());
}
#else
- StateFlags changedStates() Q_DECL_OVERRIDE
+ StateFlags changedStates() final
{
return StateFlags(StencilState) | ColorState | BlendState;
}
- void render(const RenderState& state) Q_DECL_OVERRIDE
+ void render(const RenderState& state) final
{
renderInternal(state.projectionMatrix);
}
@@ -93,7 +93,7 @@ public:
void releaseResources()
#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
- override
+ final
#endif
{
coordinatedGraphicsScene()->purgeGLResources();
diff --git a/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.h b/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.h
index 22d3767bf..830c6d64f 100644
--- a/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.h
+++ b/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.h
@@ -34,7 +34,7 @@ namespace WebKit {
class ContentsSGNode;
class CoordinatedGraphicsScene;
-class QtWebPageSGNode : public QSGTransformNode {
+class QtWebPageSGNode final : public QSGTransformNode {
public:
QtWebPageSGNode();
void setBackground(const QRectF&, const QColor&);
diff --git a/Source/WebKit2/UIProcess/qt/WebColorPickerQt.h b/Source/WebKit2/UIProcess/qt/WebColorPickerQt.h
index 08c4e7dcd..40181b6f0 100644
--- a/Source/WebKit2/UIProcess/qt/WebColorPickerQt.h
+++ b/Source/WebKit2/UIProcess/qt/WebColorPickerQt.h
@@ -39,7 +39,7 @@ class Color;
namespace WebKit {
-class WebColorPickerQt : public QObject, public WebColorPicker {
+class WebColorPickerQt final : public QObject, public WebColorPicker {
Q_OBJECT
public:
@@ -49,10 +49,10 @@ public:
}
~WebColorPickerQt();
- virtual void setSelectedColor(const WebCore::Color&);
+ void setSelectedColor(const WebCore::Color&) final;
public Q_SLOTS:
- virtual void endPicker();
+ void endPicker() final;
private Q_SLOTS:
void notifyColorSelected(const QColor&);
diff --git a/Source/WebKit2/UIProcess/qt/WebGeolocationProviderQt.h b/Source/WebKit2/UIProcess/qt/WebGeolocationProviderQt.h
index 177266b4e..9f1b13c87 100644
--- a/Source/WebKit2/UIProcess/qt/WebGeolocationProviderQt.h
+++ b/Source/WebKit2/UIProcess/qt/WebGeolocationProviderQt.h
@@ -33,7 +33,7 @@ QT_END_NAMESPACE
namespace WebKit {
-class WebGeolocationProviderQt : public QObject {
+class WebGeolocationProviderQt final : public QObject {
Q_OBJECT
public:
static WebGeolocationProviderQt* create(WKGeolocationManagerRef);
diff --git a/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp b/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp
index d82aa23ad..e1d556e08 100644
--- a/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp
+++ b/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp
@@ -41,7 +41,7 @@ namespace WebKit {
static QHash<int, QByteArray> createRoleNamesHash();
-class PopupMenuItemModel : public QAbstractListModel {
+class PopupMenuItemModel final : public QAbstractListModel {
Q_OBJECT
public:
@@ -53,9 +53,9 @@ public:
};
PopupMenuItemModel(const Vector<WebPopupItem>&, bool multiple);
- virtual int rowCount(const QModelIndex& parent = QModelIndex()) const { return m_items.size(); }
- virtual QVariant data(const QModelIndex&, int role = Qt::DisplayRole) const;
- virtual QHash<int, QByteArray> roleNames() const;
+ int rowCount(const QModelIndex& parent = QModelIndex()) const final { return m_items.size(); }
+ QVariant data(const QModelIndex&, int role = Qt::DisplayRole) const final;
+ QHash<int, QByteArray> roleNames() const final;
Q_INVOKABLE void select(int);
diff --git a/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.h b/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.h
index fa03dbf07..2475ba970 100644
--- a/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.h
+++ b/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.h
@@ -40,7 +40,7 @@ class QQuickWebView;
namespace WebKit {
-class WebPopupMenuProxyQt : public QObject, public WebPopupMenuProxy {
+class WebPopupMenuProxyQt final : public QObject, public WebPopupMenuProxy {
Q_OBJECT
public:
@@ -55,10 +55,10 @@ public:
}
~WebPopupMenuProxyQt();
- virtual void showPopupMenu(const WebCore::IntRect&, WebCore::TextDirection, double pageScaleFactor, const Vector<WebPopupItem>&, const PlatformPopupMenuData&, int32_t selectedIndex);
+ void showPopupMenu(const WebCore::IntRect&, WebCore::TextDirection, double pageScaleFactor, const Vector<WebPopupItem>&, const PlatformPopupMenuData&, int32_t selectedIndex) final;
public Q_SLOTS:
- virtual void hidePopupMenu();
+ void hidePopupMenu() final;
private Q_SLOTS:
void selectIndex(int);
diff --git a/Source/WebKit2/WebProcess/qt/QtNetworkReply.h b/Source/WebKit2/WebProcess/qt/QtNetworkReply.h
index d32c82103..52c36aa91 100644
--- a/Source/WebKit2/WebProcess/qt/QtNetworkReply.h
+++ b/Source/WebKit2/WebProcess/qt/QtNetworkReply.h
@@ -36,22 +36,22 @@ namespace WebKit {
class QtNetworkAccessManager;
-class QtNetworkReply : public QNetworkReply {
+class QtNetworkReply final : public QNetworkReply {
public:
QtNetworkReply(const QNetworkRequest&, QtNetworkAccessManager* parent);
- virtual qint64 readData(char *data, qint64 maxlen);
- virtual qint64 bytesAvailable() const;
+ qint64 readData(char *data, qint64 maxlen) final;
+ qint64 bytesAvailable() const final;
void setReplyData(const QtNetworkReplyData&);
void finalize();
protected:
void setData(const SharedMemory::Handle&, qint64 dataSize);
- virtual void abort();
- virtual void close();
- virtual void setReadBufferSize(qint64);
- virtual bool canReadLine() const;
+ void abort() final;
+ void close() final;
+ void setReadBufferSize(qint64) final;
+ bool canReadLine() const final;
private:
qint64 m_bytesAvailable;
diff --git a/Source/cmake/ECMGeneratePkgConfigFile.cmake b/Source/cmake/ECMGeneratePkgConfigFile.cmake
index eaef7b416..b4e686630 100644
--- a/Source/cmake/ECMGeneratePkgConfigFile.cmake
+++ b/Source/cmake/ECMGeneratePkgConfigFile.cmake
@@ -147,11 +147,11 @@ function(ECM_GENERATE_PKGCONFIG_FILE)
file(WRITE ${PKGCONFIG_FILENAME}
"
-Name: @PKGCONFIG_TARGET_LIBNAME@
-Version: @PROJECT_VERSION@
-Libs: -L@CMAKE_INSTALL_PREFIX@/@EGPF_LIB_INSTALL_DIR@ -l@PKGCONFIG_TARGET_LIBNAME@
-Cflags: @PKGCONFIG_TARGET_INCLUDES@ @PKGCONFIG_TARGET_DEFINES@
-Requires: @PKGCONFIG_TARGET_DEPS@
+Name: ${PKGCONFIG_TARGET_LIBNAME}
+Version: ${PROJECT_VERSION}
+Libs: -L${CMAKE_INSTALL_PREFIX}/${EGPF_LIB_INSTALL_DIR} -l${PKGCONFIG_TARGET_LIBNAME}
+Cflags: ${PKGCONFIG_TARGET_INCLUDES} ${PKGCONFIG_TARGET_DEFINES}
+Requires: ${PKGCONFIG_TARGET_DEPS}
"
)
diff --git a/Source/cmake/OptionsCommon.cmake b/Source/cmake/OptionsCommon.cmake
index 0ccfe3a67..ddaa23327 100644
--- a/Source/cmake/OptionsCommon.cmake
+++ b/Source/cmake/OptionsCommon.cmake
@@ -39,6 +39,11 @@ if (COMPILER_IS_CLANG AND CMAKE_GENERATOR STREQUAL "Ninja")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics")
endif ()
+if (WIN32 AND COMPILER_IS_GCC_OR_CLANG)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mno-ms-bitfields -Wno-unknown-pragmas")
+ add_definitions(-D__USE_MINGW_ANSI_STDIO=1)
+endif ()
+
# Detect Cortex-A53 core if CPU is ARM64 and OS is Linux.
# Query /proc/cpuinfo for each available core and check reported CPU part number: 0xd03 signals Cortex-A53.
# (see Main ID Register in ARM Cortex-A53 MPCore Processor Technical Reference Manual)
@@ -93,7 +98,7 @@ endif ()
# Use ld.gold if it is available and isn't disabled explicitly
include(CMakeDependentOption)
CMAKE_DEPENDENT_OPTION(USE_LD_GOLD "Use GNU gold linker" ON
- "NOT CXX_ACCEPTS_MFIX_CORTEX_A53_835769;NOT ARM_TRADITIONAL_DETECTED" OFF)
+ "NOT CXX_ACCEPTS_MFIX_CORTEX_A53_835769;NOT ARM_TRADITIONAL_DETECTED;NOT WIN32;NOT APPLE" OFF)
if (USE_LD_GOLD)
execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
if ("${LD_VERSION}" MATCHES "GNU gold")
diff --git a/Source/cmake/OptionsQt.cmake b/Source/cmake/OptionsQt.cmake
index 5b0212fa0..68d95e1e5 100644
--- a/Source/cmake/OptionsQt.cmake
+++ b/Source/cmake/OptionsQt.cmake
@@ -5,35 +5,27 @@ include(ECMQueryQmake)
set(ECM_MODULE_DIR ${CMAKE_MODULE_PATH})
include(KDEInstallDirs)
-macro(macro_process_qtbase_prl_file qt_target_component)
- if (TARGET ${qt_target_component})
- get_target_property(_lib_name ${qt_target_component} NAME)
- string(REGEX REPLACE "::" "" _lib_name ${_lib_name})
- get_target_property(_lib_location ${qt_target_component} LOCATION)
- get_target_property(_prl_file_location ${qt_target_component} LOCATION)
- string(REGEX REPLACE "^(.+/lib${_lib_name}).+$" "\\1.prl" _prl_file_location ${_prl_file_location})
- get_target_property(_link_libs ${qt_target_component} INTERFACE_LINK_LIBRARIES)
- if (_link_libs)
- set(_list_sep ";")
- else ()
- set(_list_sep "")
- endif ()
- if (EXISTS ${_prl_file_location})
- file(STRINGS ${_prl_file_location} prl_strings REGEX "QMAKE_PRL_LIBS")
- string(REGEX REPLACE "QMAKE_PRL_LIBS *= *([^\\n]*)" "\\1" static_depends ${prl_strings})
- string(STRIP ${static_depends} static_depends)
- set_target_properties(${qt_target_component} PROPERTIES
- "INTERFACE_LINK_LIBRARIES" "${_link_libs}${_list_sep}${static_depends}"
- "IMPORTED_LOCATION" "${_lib_location}"
- )
- string(REPLACE " " ";" static_depends ${static_depends})
- set(${_lib_name}_STATIC_LIB_DEPENDENCIES "${static_depends}")
- endif ()
+if (CONANBUILDINFO_PATH)
+ include(${CONANBUILDINFO_PATH})
+ conan_basic_setup()
+endif ()
+
+set(STATIC_DEPENDENCIES_CMAKE_FILE "${CMAKE_BINARY_DIR}/QtStaticDependencies.cmake")
+if (EXISTS ${STATIC_DEPENDENCIES_CMAKE_FILE})
+ file(REMOVE ${STATIC_DEPENDENCIES_CMAKE_FILE})
+endif ()
+
+macro(CONVERT_PRL_LIBS_TO_CMAKE _qt_component)
+ if (TARGET Qt5::${_qt_component})
+ get_target_property(_lib_location Qt5::${_qt_component} LOCATION)
+ execute_process(COMMAND ${PERL_EXECUTABLE} ${TOOLS_DIR}/qt/convert-prl-libs-to-cmake.pl
+ ${_lib_location} ${_qt_component} ${STATIC_DEPENDENCIES_CMAKE_FILE}
+ )
endif ()
endmacro()
macro(QT_ADD_EXTRA_WEBKIT_TARGET_EXPORT target)
- if (QT_STATIC_BUILD)
+ if (QT_STATIC_BUILD OR SHARED_CORE)
install(TARGETS ${target} EXPORT WebKitTargets
DESTINATION "${LIB_INSTALL_DIR}")
endif ()
@@ -51,6 +43,10 @@ add_definitions(-DBUILDING_QT__=1)
WEBKIT_OPTION_BEGIN()
+if (APPLE)
+ option(MACOS_FORCE_SYSTEM_XML_LIBRARIES "Use system installation of libxml2 and libxslt on macOS" ON)
+endif ()
+
if (WIN32 OR APPLE)
set(USE_LIBHYPHEN_DEFAULT OFF)
set(USE_GSTREAMER_DEFAULT OFF)
@@ -235,21 +231,40 @@ if (WIN32)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
endif ()
-find_package(LibXml2 2.8.0 REQUIRED)
-find_package(JPEG REQUIRED)
-find_package(PNG REQUIRED)
if (DEFINED ENV{SQLITE3SRCDIR})
- set(SQLITE_SOURCE_FILE $ENV{SQLITE3SRCDIR}/sqlite3.c)
+ get_filename_component(SQLITE_INCLUDE_DIR $ENV{SQLITE3SRCDIR} ABSOLUTE)
+ set(SQLITE_SOURCE_FILE ${SQLITE_INCLUDE_DIR}/sqlite3.c)
if (NOT EXISTS ${SQLITE_SOURCE_FILE})
message(FATAL_ERROR "${SQLITE_SOURCE_FILE} not found.")
endif ()
- set(SQLITE_INCLUDE_DIR $ENV{SQLITE3SRCDIR})
+ add_library(qtsqlite STATIC ${SQLITE_SOURCE_FILE})
+ target_compile_definitions(qtsqlite PUBLIC -DSQLITE_CORE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_COMPLETE)
+ set(SQLITE_LIBRARIES qtsqlite)
+ set(SQLITE_FOUND 1)
else ()
find_package(Sqlite REQUIRED)
endif ()
-find_package(ZLIB REQUIRED)
+
find_package(Threads REQUIRED)
+if (NOT QT_BUNDLED_JPEG)
+ find_package(JPEG REQUIRED)
+else ()
+ set(JPEG_FOUND 1)
+endif ()
+
+if (NOT QT_BUNDLED_PNG)
+ find_package(PNG REQUIRED)
+else ()
+ set(PNG_FOUND 1)
+endif ()
+
+if (NOT QT_BUNDLED_ZLIB)
+ find_package(ZLIB REQUIRED)
+else ()
+ set(ZLIB_FOUND 1)
+endif ()
+
if (NOT APPLE)
find_package(ICU REQUIRED)
else ()
@@ -269,8 +284,18 @@ else ()
endif ()
endif ()
-if (ENABLE_XSLT)
- find_package(LibXslt 1.1.7 REQUIRED)
+if (MACOS_FORCE_SYSTEM_XML_LIBRARIES)
+ set(LIBXML2_INCLUDE_DIR "/usr/include/libxml2")
+ set(LIBXML2_LIBRARIES xml2)
+ if (ENABLE_XSLT)
+ set(LIBXSLT_INCLUDE_DIR "/usr/include/libxslt")
+ set(LIBXSLT_LIBRARIES xslt)
+ endif ()
+else ()
+ find_package(LibXml2 2.8.0 REQUIRED)
+ if (ENABLE_XSLT)
+ find_package(LibXslt 1.1.7 REQUIRED)
+ endif ()
endif ()
find_package(Fontconfig)
@@ -318,10 +343,7 @@ endif ()
find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS ${QT_REQUIRED_COMPONENTS})
if (QT_STATIC_BUILD)
foreach (qt_module ${QT_REQUIRED_COMPONENTS})
- macro_process_qtbase_prl_file(Qt5::${qt_module})
- list(APPEND STATIC_LIB_DEPENDENCIES
- ${Qt5${qt_module}_STATIC_LIB_DEPENDENCIES}
- )
+ CONVERT_PRL_LIBS_TO_CMAKE(${qt_module})
endforeach ()
# HACK: We must explicitly add LIB path of the Qt installation
# to correctly find qtpcre
@@ -331,14 +353,15 @@ endif ()
foreach (qt_module ${QT_OPTIONAL_COMPONENTS})
find_package("Qt5${qt_module}" ${REQUIRED_QT_VERSION} PATHS ${_qt5_install_prefix} NO_DEFAULT_PATH)
if (QT_STATIC_BUILD)
- macro_process_qtbase_prl_file(Qt5::${qt_module})
- list(APPEND STATIC_LIB_DEPENDENCIES
- ${Qt5${qt_module}_STATIC_LIB_DEPENDENCIES}
- )
+ CONVERT_PRL_LIBS_TO_CMAKE(${qt_module})
endif ()
endforeach ()
if (QT_STATIC_BUILD)
+ if (NOT EXISTS ${STATIC_DEPENDENCIES_CMAKE_FILE})
+ message(FATAL_ERROR "Unable to find ${STATIC_DEPENDENCIES_CMAKE_FILE}")
+ endif ()
+ include(${STATIC_DEPENDENCIES_CMAKE_FILE})
list(REMOVE_DUPLICATES STATIC_LIB_DEPENDENCIES)
endif ()
@@ -363,10 +386,12 @@ set(CMAKE_AUTOMOC ON)
# From OptionsEfl.cmake
# Optimize binary size for release builds by removing dead sections on unix/gcc.
-if (COMPILER_IS_GCC_OR_CLANG AND UNIX AND NOT APPLE)
- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -ffunction-sections -fdata-sections")
- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffunction-sections -fdata-sections -fno-rtti")
- set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} -Wl,--gc-sections")
+if (COMPILER_IS_GCC_OR_CLANG AND UNIX)
+ if (NOT APPLE)
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -ffunction-sections -fdata-sections")
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffunction-sections -fdata-sections -fno-rtti")
+ set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} -Wl,--gc-sections")
+ endif ()
if (NOT SHARED_CORE)
set(CMAKE_C_FLAGS "-fvisibility=hidden ${CMAKE_C_FLAGS}")
diff --git a/Source/cmake/WebKitHelpers.cmake b/Source/cmake/WebKitHelpers.cmake
index 0bf335527..6e46383f3 100644
--- a/Source/cmake/WebKitHelpers.cmake
+++ b/Source/cmake/WebKitHelpers.cmake
@@ -10,9 +10,11 @@ macro(WEBKIT_SET_EXTRA_COMPILER_FLAGS _target)
set(OLD_COMPILE_FLAGS "")
endif ()
- get_target_property(TARGET_TYPE ${_target} TYPE)
- if (${TARGET_TYPE} STREQUAL "STATIC_LIBRARY") # -fPIC is automatically added to shared libraries
- set(OLD_COMPILE_FLAGS "-fPIC ${OLD_COMPILE_FLAGS}")
+ if (NOT WIN32)
+ get_target_property(TARGET_TYPE ${_target} TYPE)
+ if (${TARGET_TYPE} STREQUAL "STATIC_LIBRARY") # -fPIC is automatically added to shared libraries
+ set(OLD_COMPILE_FLAGS "-fPIC ${OLD_COMPILE_FLAGS}")
+ endif ()
endif ()
# Suppress -Wparentheses-equality warning of Clang
diff --git a/Source/cmake_uninstall.cmake.in b/Source/cmake_uninstall.cmake.in
new file mode 100644
index 000000000..70d83a063
--- /dev/null
+++ b/Source/cmake_uninstall.cmake.in
@@ -0,0 +1,21 @@
+if (NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
+ message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt")
+endif ()
+
+file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
+string(REGEX REPLACE "\n" ";" files "${files}")
+foreach (file ${files})
+ message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
+ if (IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
+ exec_program(
+ "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
+ OUTPUT_VARIABLE rm_out
+ RETURN_VALUE rm_retval
+ )
+ if (NOT "${rm_retval}" STREQUAL 0)
+ message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
+ endif ()
+ else ()
+ message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
+ endif ()
+endforeach ()
diff --git a/Source/sync.profile b/Source/sync.profile
new file mode 100644
index 000000000..1c5e0113d
--- /dev/null
+++ b/Source/sync.profile
@@ -0,0 +1,11 @@
+%modules = ( # path to module name map
+ "QtWebKit" => "$basedir",
+ "QtWebKitWidgets" => "$basedir"
+);
+%moduleheaders = ( # restrict the module headers to those found in relative path
+ "QtWebKit" => "WebKit/qt/Api;WebKit2/UIProcess/API/qt",
+ "QtWebKitWidgets" => "WebKit/qt/WidgetApi",
+);
+%classnames = (
+);
+@ignore_for_master_contents = ( "qwebscriptworld.h", "testwindow.h", "util.h", "bytearraytestdata.h" );
diff --git a/Tools/PlatformQt.cmake b/Tools/PlatformQt.cmake
new file mode 100644
index 000000000..4894e4b69
--- /dev/null
+++ b/Tools/PlatformQt.cmake
@@ -0,0 +1,6 @@
+add_subdirectory(DumpRenderTree)
+add_subdirectory(ImageDiff)
+if (ENABLE_TEST_SUPPORT)
+ add_subdirectory(TestWebKitAPI)
+ add_subdirectory(QtTestBrowser)
+endif ()
diff --git a/Tools/qt/convert-prl-libs-to-cmake.pl b/Tools/qt/convert-prl-libs-to-cmake.pl
new file mode 100755
index 000000000..b5b5289f8
--- /dev/null
+++ b/Tools/qt/convert-prl-libs-to-cmake.pl
@@ -0,0 +1,96 @@
+#!/usr/bin/env perl
+# Copyright (C) 2016 Konstantin Tokarev <annulen@yandex.ru>
+#
+# 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 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.
+
+use File::Basename;
+use File::Spec;
+use strict;
+use warnings;
+
+my ($qt_lib, $component_name, $out_name) = @ARGV;
+
+my ($qt_lib_base, $qt_lib_dir) = fileparse($qt_lib, qr{\..*});
+my $prl_name = File::Spec->join($qt_lib_dir, "$qt_lib_base.prl");
+
+my $qmake_prl_libs;
+
+open(my $prl, '<', $prl_name) or die "Cannot open $prl_name: $!";
+while(<$prl>) {
+ next unless /^QMAKE_PRL_LIBS/;
+ chomp;
+ if (/^QMAKE_PRL_LIBS\s+=\s+(.*)$/) {
+ $qmake_prl_libs = $1;
+ last;
+ }
+}
+close $prl;
+
+unless($qmake_prl_libs) {
+ print "QMAKE_PRL_LIBS variable is undefined or empty\n";
+ exit;
+}
+
+my $prl_libs = squash_prl_libs (split /\s+/, $qmake_prl_libs);
+
+my $template = <<'END_CMAKE';
+get_target_property(_link_libs Qt5::${_component} INTERFACE_LINK_LIBRARIES)
+if (_link_libs)
+ set(_list_sep ";")
+else ()
+ set(_list_sep "")
+endif ()
+set_target_properties(Qt5::${_component} PROPERTIES
+ "INTERFACE_LINK_LIBRARIES" "${_link_libs}${_list_sep}${_libs}")
+set(Qt5${_component}_STATIC_LIB_DEPENDENCIES "${_libs}")
+list(APPEND STATIC_LIB_DEPENDENCIES
+ ${Qt5${_component}_STATIC_LIB_DEPENDENCIES}
+)
+unset(_component)
+unset(_libs)
+unset(_list_sep)
+
+END_CMAKE
+
+open(my $out, '>>', $out_name) or die "Cannot open $out_name for writing: $!";
+print $out qq/set(_component "$component_name")\n/;
+print $out qq/set(_libs "$prl_libs")\n/;
+print $out $template;
+close $out;
+
+sub squash_prl_libs {
+ my @libs = @_;
+ my @result;
+ for (my $i = 0; $i < $#libs; ++$i) {
+ my $lib = $libs[$i];
+ if ($lib eq '-framework') {
+ $lib = "$libs[$i] $libs[$i + 1]";
+ ++$i;
+ }
+ $lib =~ s"\$\$\[QT_INSTALL_LIBS\]"$qt_lib_dir"g;
+ push @result, $lib;
+ }
+ return join ';', @result;
+}
diff --git a/Tools/qt/manifest.txt b/Tools/qt/manifest.txt
index bc4765030..5e7b65b76 100644
--- a/Tools/qt/manifest.txt
+++ b/Tools/qt/manifest.txt
@@ -62,6 +62,8 @@ exclude Source/cmake/eflsymbols.filter$
exclude Source/WebInspectorUI/Tools
exclude Source/WebInspectorUI/UserInterface/Images
+exclude Source/WebKit/qt/LICENSE.LGPLv21
+
exclude Source/WebKit2/Resources
file Source/WebCore/English.lproj/mediaControlsLocalizedStrings.js
@@ -83,6 +85,9 @@ file Source/WebKit/win/Plugins
# Version
file Source/WebKit/mac/Configurations/Version.xcconfig
+# Move LICENSE.LGPLv21 to the root
+file Source/WebKit/qt/LICENSE.LGPLv21 LICENSE.LGPLv21
+
directory Source/WebInspectorUI/UserInterface/Images
exclude Source/WebInspectorUI/UserInterface/Images/.*
file Source/WebInspectorUI/UserInterface/Images/gtk
@@ -120,6 +125,7 @@ exclude Tools/WebKitTestRunner/fonts/
file CMakeLists.txt
file Tools/CMakeLists.txt
+file Tools/PlatformQt.cmake
file Tools/Scripts/VCSUtils.pm
file Tools/Scripts/build-webkit
file Tools/Scripts/run-gtk-tests