qtwebkit-2.3-beta2

This commit is contained in:
Rex Dieter 2013-02-23 09:03:48 -06:00
parent 673d07ffa5
commit 8e4a591dae
15 changed files with 147 additions and 964 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/qtwebkit-developers-qtwebkit-qtwebkit-2.1.1.tar.xz
/qtwebkit-2.2.2-source.tar.xz
/qtwebkit-2.3-beta2.tar.xz

View File

@ -1,40 +0,0 @@
From a096458b01a9387719308c99e5917a7b42196078 Mon Sep 17 00:00:00 2001
From: Nicolas Arnaud-Cormos <nicolas.arnaud-cormos.qnx@kdab.com>
Date: Mon, 23 Apr 2012 19:54:36 -0700
Subject: [PATCH 02/11] JSString::resolveRope() should report extra memory cost
to the heap.
At the time a JSString is constructed with fibers, it doesn't report
extra memory cost, which is reasonable because it hasn't allocate
new memory. However when the rope is resolved, it should report memory
cost for the new buffer.
Backport patch by Yong Li
Reviewed by Michael Saboff.
http://trac.webkit.org/changeset/109105
Signed-off-by: Simon Hausmann <simon.hausmann@nokia.com>
---
Source/JavaScriptCore/runtime/JSString.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Source/JavaScriptCore/runtime/JSString.cpp b/Source/JavaScriptCore/runtime/JSString.cpp
index da15997..a0ba3e2 100644
--- a/Source/JavaScriptCore/runtime/JSString.cpp
+++ b/Source/JavaScriptCore/runtime/JSString.cpp
@@ -41,9 +41,10 @@ void JSString::resolveRope(ExecState* exec) const
ASSERT(isRope());
UChar* buffer;
- if (PassRefPtr<StringImpl> newImpl = StringImpl::tryCreateUninitialized(m_length, buffer))
+ if (PassRefPtr<StringImpl> newImpl = StringImpl::tryCreateUninitialized(m_length, buffer)) {
+ Heap::heap(this)->reportExtraMemoryCost(newImpl->cost());
m_value = newImpl;
- else {
+ } else {
outOfMemory(exec);
return;
}
--
1.8.0.2

View File

@ -1,429 +0,0 @@
From 9b4b107fe7501ffbefb5f4fd78ab0a2321f93fc1 Mon Sep 17 00:00:00 2001
From: Gustavo Noronha Silva <kov@webkit.org>
Date: Wed, 12 Oct 2011 16:55:24 +0000
Subject: [PATCH 03/11] Fix build with GLib 2.31
https://bugs.webkit.org/show_bug.cgi?id=69840
Patch by Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> on 2011-10-12
Reviewed by Martin Robinson.
.:
* configure.ac: add check for pthread rwlock support.
Source/JavaScriptCore:
* GNUmakefile.list.am: removed ThreadingGtk.cpp.
* wtf/ThreadingPrimitives.h: remove GTK+-specific definitions.
* wtf/gobject/GOwnPtr.cpp: remove GCond and GMutex specializations.
* wtf/gobject/GOwnPtr.h: ditto.
* wtf/gobject/GTypedefs.h: remove GCond and GMutex forward declarations.
* wtf/gtk/ThreadingGtk.cpp: Removed.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97269 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Conflicts:
ChangeLog
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/wtf/gtk/ThreadingGtk.cpp
---
ChangeLog | 9 +
Source/JavaScriptCore/ChangeLog | 14 ++
Source/JavaScriptCore/GNUmakefile.list.am | 1 -
Source/JavaScriptCore/wtf/ThreadingPrimitives.h | 6 -
Source/JavaScriptCore/wtf/gobject/GOwnPtr.cpp | 12 --
Source/JavaScriptCore/wtf/gobject/GOwnPtr.h | 2 -
Source/JavaScriptCore/wtf/gobject/GTypedefs.h | 2 -
Source/JavaScriptCore/wtf/gtk/ThreadingGtk.cpp | 248 ------------------------
configure.ac | 3 +
9 files changed, 26 insertions(+), 271 deletions(-)
delete mode 100644 Source/JavaScriptCore/wtf/gtk/ThreadingGtk.cpp
diff --git a/ChangeLog b/ChangeLog
index 82dc1fb..b19fcfe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-10-12 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Fix build with GLib 2.31
+ https://bugs.webkit.org/show_bug.cgi?id=69840
+
+ Reviewed by Martin Robinson.
+
+ * configure.ac: add check for pthread rwlock support.
+
2011-12-08 Zeno Albisser <zeno@webkit.org>
Disable -Werror for standalone packages.
diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog
index 438d1f5..d7cb100 100644
--- a/Source/JavaScriptCore/ChangeLog
+++ b/Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,17 @@
+2011-10-12 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Fix build with GLib 2.31
+ https://bugs.webkit.org/show_bug.cgi?id=69840
+
+ Reviewed by Martin Robinson.
+
+ * GNUmakefile.list.am: removed ThreadingGtk.cpp.
+ * wtf/ThreadingPrimitives.h: remove GTK+-specific definitions.
+ * wtf/gobject/GOwnPtr.cpp: remove GCond and GMutex specializations.
+ * wtf/gobject/GOwnPtr.h: ditto.
+ * wtf/gobject/GTypedefs.h: remove GCond and GMutex forward declarations.
+ * wtf/gtk/ThreadingGtk.cpp: Removed.
+
2012-02-23 Aron Rosenberg <arosenberg@logitech.com>
Fix the PRI macros used in WTF::String formatters to be compatible with Qt and Visual Studio 2005 and newer.
diff --git a/Source/JavaScriptCore/GNUmakefile.list.am b/Source/JavaScriptCore/GNUmakefile.list.am
index 16bbf56..655986c 100644
--- a/Source/JavaScriptCore/GNUmakefile.list.am
+++ b/Source/JavaScriptCore/GNUmakefile.list.am
@@ -438,7 +438,6 @@ javascriptcore_sources += \
Source/JavaScriptCore/wtf/gobject/GRefPtr.h \
Source/JavaScriptCore/wtf/gobject/GTypedefs.h \
Source/JavaScriptCore/wtf/gtk/MainThreadGtk.cpp \
- Source/JavaScriptCore/wtf/gtk/ThreadingGtk.cpp \
Source/JavaScriptCore/wtf/HashCountedSet.h \
Source/JavaScriptCore/wtf/HashFunctions.h \
Source/JavaScriptCore/wtf/HashIterators.h \
diff --git a/Source/JavaScriptCore/wtf/ThreadingPrimitives.h b/Source/JavaScriptCore/wtf/ThreadingPrimitives.h
index 831a99e..9f263ae 100644
--- a/Source/JavaScriptCore/wtf/ThreadingPrimitives.h
+++ b/Source/JavaScriptCore/wtf/ThreadingPrimitives.h
@@ -44,8 +44,6 @@
#if USE(PTHREADS)
#include <pthread.h>
-#elif PLATFORM(GTK)
-#include "GOwnPtr.h"
#endif
#if PLATFORM(QT)
@@ -66,10 +64,6 @@ typedef pthread_rwlock_t PlatformReadWriteLock;
typedef void* PlatformReadWriteLock;
#endif
typedef pthread_cond_t PlatformCondition;
-#elif PLATFORM(GTK)
-typedef GOwnPtr<GMutex> PlatformMutex;
-typedef void* PlatformReadWriteLock; // FIXME: Implement.
-typedef GOwnPtr<GCond> PlatformCondition;
#elif PLATFORM(QT)
typedef QT_PREPEND_NAMESPACE(QMutex)* PlatformMutex;
typedef void* PlatformReadWriteLock; // FIXME: Implement.
diff --git a/Source/JavaScriptCore/wtf/gobject/GOwnPtr.cpp b/Source/JavaScriptCore/wtf/gobject/GOwnPtr.cpp
index 7c51ee1..50c7b9f 100644
--- a/Source/JavaScriptCore/wtf/gobject/GOwnPtr.cpp
+++ b/Source/JavaScriptCore/wtf/gobject/GOwnPtr.cpp
@@ -37,18 +37,6 @@ template <> void freeOwnedGPtr<GList>(GList* ptr)
g_list_free(ptr);
}
-template <> void freeOwnedGPtr<GCond>(GCond* ptr)
-{
- if (ptr)
- g_cond_free(ptr);
-}
-
-template <> void freeOwnedGPtr<GMutex>(GMutex* ptr)
-{
- if (ptr)
- g_mutex_free(ptr);
-}
-
template <> void freeOwnedGPtr<GPatternSpec>(GPatternSpec* ptr)
{
if (ptr)
diff --git a/Source/JavaScriptCore/wtf/gobject/GOwnPtr.h b/Source/JavaScriptCore/wtf/gobject/GOwnPtr.h
index 8c7e837..9ff85c5 100644
--- a/Source/JavaScriptCore/wtf/gobject/GOwnPtr.h
+++ b/Source/JavaScriptCore/wtf/gobject/GOwnPtr.h
@@ -35,8 +35,6 @@ namespace WTF {
template <typename T> inline void freeOwnedGPtr(T* ptr);
template<> void freeOwnedGPtr<GError>(GError*);
template<> void freeOwnedGPtr<GList>(GList*);
-template<> void freeOwnedGPtr<GCond>(GCond*);
-template<> void freeOwnedGPtr<GMutex>(GMutex*);
template<> void freeOwnedGPtr<GPatternSpec>(GPatternSpec*);
template<> void freeOwnedGPtr<GDir>(GDir*);
diff --git a/Source/JavaScriptCore/wtf/gobject/GTypedefs.h b/Source/JavaScriptCore/wtf/gobject/GTypedefs.h
index c7f7ac4..136bde5 100644
--- a/Source/JavaScriptCore/wtf/gobject/GTypedefs.h
+++ b/Source/JavaScriptCore/wtf/gobject/GTypedefs.h
@@ -39,7 +39,6 @@ typedef void* gpointer;
typedef struct _GAsyncResult GAsyncResult;
typedef struct _GCancellable GCancellable;
typedef struct _GCharsetConverter GCharsetConverter;
-typedef struct _GCond GCond;
typedef struct _GDir GDir;
typedef struct _GdkAtom* GdkAtom;
typedef struct _GdkCursor GdkCursor;
@@ -52,7 +51,6 @@ typedef struct _GFile GFile;
typedef struct _GHashTable GHashTable;
typedef struct _GInputStream GInputStream;
typedef struct _GList GList;
-typedef struct _GMutex GMutex;
typedef struct _GPatternSpec GPatternSpec;
typedef struct _GPollableOutputStream GPollableOutputStream;
typedef struct _GSocketClient GSocketClient;
diff --git a/Source/JavaScriptCore/wtf/gtk/ThreadingGtk.cpp b/Source/JavaScriptCore/wtf/gtk/ThreadingGtk.cpp
deleted file mode 100644
index 863ee81..0000000
--- a/Source/JavaScriptCore/wtf/gtk/ThreadingGtk.cpp
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
- * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com)
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple 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.
- */
-
-#include "config.h"
-#include "Threading.h"
-
-#if !USE(PTHREADS)
-
-#include "CurrentTime.h"
-#include "HashMap.h"
-#include "MainThread.h"
-#include "RandomNumberSeed.h"
-#include <wtf/StdLibExtras.h>
-
-#include <glib.h>
-#include <limits.h>
-
-namespace WTF {
-
-typedef HashMap<ThreadIdentifier, GThread*> ThreadMap;
-
-static Mutex* atomicallyInitializedStaticMutex;
-
-static Mutex& threadMapMutex()
-{
- DEFINE_STATIC_LOCAL(Mutex, mutex, ());
- return mutex;
-}
-
-void initializeThreading()
-{
- if (!g_thread_supported())
- g_thread_init(NULL);
- ASSERT(g_thread_supported());
-
- if (!atomicallyInitializedStaticMutex) {
- atomicallyInitializedStaticMutex = new Mutex;
- threadMapMutex();
- initializeRandomNumberGenerator();
- }
-}
-
-void lockAtomicallyInitializedStaticMutex()
-{
- ASSERT(atomicallyInitializedStaticMutex);
- atomicallyInitializedStaticMutex->lock();
-}
-
-void unlockAtomicallyInitializedStaticMutex()
-{
- atomicallyInitializedStaticMutex->unlock();
-}
-
-static ThreadMap& threadMap()
-{
- DEFINE_STATIC_LOCAL(ThreadMap, map, ());
- return map;
-}
-
-static ThreadIdentifier identifierByGthreadHandle(GThread*& thread)
-{
- MutexLocker locker(threadMapMutex());
-
- ThreadMap::iterator i = threadMap().begin();
- for (; i != threadMap().end(); ++i) {
- if (i->second == thread)
- return i->first;
- }
-
- return 0;
-}
-
-static ThreadIdentifier establishIdentifierForThread(GThread*& thread)
-{
- ASSERT(!identifierByGthreadHandle(thread));
-
- MutexLocker locker(threadMapMutex());
-
- static ThreadIdentifier identifierCount = 1;
-
- threadMap().add(identifierCount, thread);
-
- return identifierCount++;
-}
-
-static GThread* threadForIdentifier(ThreadIdentifier id)
-{
- MutexLocker locker(threadMapMutex());
-
- return threadMap().get(id);
-}
-
-static void clearThreadForIdentifier(ThreadIdentifier id)
-{
- MutexLocker locker(threadMapMutex());
-
- ASSERT(threadMap().contains(id));
-
- threadMap().remove(id);
-}
-
-ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, const char*)
-{
- GThread* thread;
- if (!(thread = g_thread_create(entryPoint, data, TRUE, 0))) {
- LOG_ERROR("Failed to create thread at entry point %p with data %p", entryPoint, data);
- return 0;
- }
-
- ThreadIdentifier threadID = establishIdentifierForThread(thread);
- return threadID;
-}
-
-void initializeCurrentThreadInternal(const char*)
-{
-}
-
-int waitForThreadCompletion(ThreadIdentifier threadID, void** result)
-{
- ASSERT(threadID);
-
- GThread* thread = threadForIdentifier(threadID);
-
- void* joinResult = g_thread_join(thread);
- if (result)
- *result = joinResult;
-
- clearThreadForIdentifier(threadID);
- return 0;
-}
-
-void detachThread(ThreadIdentifier)
-{
-}
-
-ThreadIdentifier currentThread()
-{
- GThread* currentThread = g_thread_self();
- if (ThreadIdentifier id = identifierByGthreadHandle(currentThread))
- return id;
- return establishIdentifierForThread(currentThread);
-}
-
-void yield()
-{
- g_thread_yield();
-}
-
-Mutex::Mutex()
- : m_mutex(g_mutex_new())
-{
-}
-
-Mutex::~Mutex()
-{
-}
-
-void Mutex::lock()
-{
- g_mutex_lock(m_mutex.get());
-}
-
-bool Mutex::tryLock()
-{
- return g_mutex_trylock(m_mutex.get());
-}
-
-void Mutex::unlock()
-{
- g_mutex_unlock(m_mutex.get());
-}
-
-ThreadCondition::ThreadCondition()
- : m_condition(g_cond_new())
-{
-}
-
-ThreadCondition::~ThreadCondition()
-{
-}
-
-void ThreadCondition::wait(Mutex& mutex)
-{
- g_cond_wait(m_condition.get(), mutex.impl().get());
-}
-
-bool ThreadCondition::timedWait(Mutex& mutex, double absoluteTime)
-{
- // Time is in the past - return right away.
- if (absoluteTime < currentTime())
- return false;
-
- // Time is too far in the future for g_cond_timed_wait - wait forever.
- if (absoluteTime > INT_MAX) {
- wait(mutex);
- return true;
- }
-
- int timeSeconds = static_cast<int>(absoluteTime);
- int timeMicroseconds = static_cast<int>((absoluteTime - timeSeconds) * 1000000.0);
-
- GTimeVal targetTime;
- targetTime.tv_sec = timeSeconds;
- targetTime.tv_usec = timeMicroseconds;
-
- return g_cond_timed_wait(m_condition.get(), mutex.impl().get(), &targetTime);
-}
-
-void ThreadCondition::signal()
-{
- g_cond_signal(m_condition.get());
-}
-
-void ThreadCondition::broadcast()
-{
- g_cond_broadcast(m_condition.get());
-}
-
-
-}
-
-#endif // !USE(PTHREADS)
1.8.0.2

View File

@ -1,33 +0,0 @@
From 0b63152ae5d572c4a817a53210d8907f3dd11bd7 Mon Sep 17 00:00:00 2001
From: Simon Hausmann <simon.hausmann@nokia.com>
Date: Mon, 25 Jun 2012 09:47:34 +0200
Subject: [PATCH 05/11] Fix build on linux-i386 where gcc would produce
warnings
It is the intention to _not_ use -Werror for production builds. Unfortunately
the qmake expression had an error that made the -Werror suppression only work
on x86-64 but not on i386. A surrounding if() as suggested by Ossi fixes this.
In trunk this is already fixed differently by the use of an extra scope.
Task: QTBUG-23987
---
Source/WebKit.pri | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Source/WebKit.pri b/Source/WebKit.pri
index 5080119..ae7b99c 100644
--- a/Source/WebKit.pri
+++ b/Source/WebKit.pri
@@ -102,7 +102,7 @@ CONFIG -= warn_on
# Treat warnings as errors on x86/Linux/GCC
linux-g++* {
- !CONFIG(standalone_package):isEqual(QT_ARCH,x86_64)|isEqual(QT_ARCH,i386): QMAKE_CXXFLAGS += -Werror
+ !CONFIG(standalone_package):if(isEqual(QT_ARCH,x86_64)|isEqual(QT_ARCH,i386)): QMAKE_CXXFLAGS += -Werror
greaterThan(QT_GCC_MAJOR_VERSION, 3):greaterThan(QT_GCC_MINOR_VERSION, 5) {
if (!contains(QMAKE_CXXFLAGS, -std=c++0x) && !contains(QMAKE_CXXFLAGS, -std=gnu++0x)) {
--
1.8.0.2

View File

@ -0,0 +1,80 @@
diff -up webkit-qtwebkit-23/Source/JavaScriptCore/JavaScriptCore.pri.debuginfo webkit-qtwebkit-23/Source/JavaScriptCore/JavaScriptCore.pri
--- webkit-qtwebkit-23/Source/JavaScriptCore/JavaScriptCore.pri.debuginfo 2013-02-15 09:46:12.000000000 -0600
+++ webkit-qtwebkit-23/Source/JavaScriptCore/JavaScriptCore.pri 2013-02-21 22:28:57.786764106 -0600
@@ -7,6 +7,12 @@
SOURCE_DIR = $${ROOT_WEBKIT_DIR}/Source/JavaScriptCore
+#equals(QT_ARCH, s390)|equals(QT_ARCH, arm)|equals(QT_ARCH, mips)|equals(QT_ARCH, i386)|equals(QT_ARCH, i686)|equals(QT_ARCH, x86_64) {
+# message("JavaScriptCore workaround for QtWebkit: do not build with -g, but with -g1")
+# QMAKE_CXXFLAGS_RELEASE -= -g
+# QMAKE_CXXFLAGS_RELEASE += -g1
+#}
+
JAVASCRIPTCORE_GENERATED_SOURCES_DIR = $${ROOT_BUILD_DIR}/Source/JavaScriptCore/$${GENERATED_SOURCES_DESTDIR}
INCLUDEPATH += \
diff -up webkit-qtwebkit-23/Source/WebCore/WebCore.pri.debuginfo webkit-qtwebkit-23/Source/WebCore/WebCore.pri
--- webkit-qtwebkit-23/Source/WebCore/WebCore.pri.debuginfo 2013-02-21 22:28:57.791764043 -0600
+++ webkit-qtwebkit-23/Source/WebCore/WebCore.pri 2013-02-21 22:31:02.994198797 -0600
@@ -7,6 +7,12 @@
SOURCE_DIR = $${ROOT_WEBKIT_DIR}/Source/WebCore
+equals(QT_ARCH, s390)|equals(QT_ARCH, arm)|equals(QT_ARCH, mips)|equals(QT_ARCH, i386)|equals(QT_ARCH, i686)|equals(QT_ARCH, x86_64) {
+ message("WebCore workaround for QtWebkit: do not build with -g, but with -g1")
+ QMAKE_CXXFLAGS_RELEASE -= -g
+ QMAKE_CXXFLAGS_RELEASE += -g1
+}
+
QT *= network
haveQt(5): QT *= core-private gui-private
diff -up webkit-qtwebkit-23/Source/WebKit2/WebKit2.pri.debuginfo webkit-qtwebkit-23/Source/WebKit2/WebKit2.pri
--- webkit-qtwebkit-23/Source/WebKit2/WebKit2.pri.debuginfo 2013-02-15 09:46:12.000000000 -0600
+++ webkit-qtwebkit-23/Source/WebKit2/WebKit2.pri 2013-02-21 22:28:57.786764106 -0600
@@ -9,6 +9,12 @@ SOURCE_DIR = $${ROOT_WEBKIT_DIR}/Source/
WEBKIT2_GENERATED_SOURCES_DIR = $${ROOT_BUILD_DIR}/Source/WebKit2/$${GENERATED_SOURCES_DESTDIR}
+#equals(QT_ARCH, s390)|equals(QT_ARCH, arm)|equals(QT_ARCH, mips)|equals(QT_ARCH, i386)|equals(QT_ARCH, i686)|equals(QT_ARCH, x86_64) {
+# message("WebKit2 workaround for QtWebkit: do not build with -g, but with -g1")
+# QMAKE_CXXFLAGS_RELEASE -= -g
+# QMAKE_CXXFLAGS_RELEASE += -g1
+#}
+
INCLUDEPATH += \
$$SOURCE_DIR \
$$SOURCE_DIR/Platform \
diff -up webkit-qtwebkit-23/Source/WebKit/WebKit1.pri.debuginfo webkit-qtwebkit-23/Source/WebKit/WebKit1.pri
--- webkit-qtwebkit-23/Source/WebKit/WebKit1.pri.debuginfo 2013-02-15 09:46:12.000000000 -0600
+++ webkit-qtwebkit-23/Source/WebKit/WebKit1.pri 2013-02-21 22:28:57.787764093 -0600
@@ -7,6 +7,12 @@
SOURCE_DIR = $${ROOT_WEBKIT_DIR}/Source/WebKit
+#equals(QT_ARCH, s390)|equals(QT_ARCH, arm)|equals(QT_ARCH, mips)|equals(QT_ARCH, i386)|equals(QT_ARCH, i686)|equals(QT_ARCH, x86_64) {
+# message("WebKit workaround for QtWebkit: do not build with -g, but with -g1")
+# QMAKE_CXXFLAGS_RELEASE -= -g
+# QMAKE_CXXFLAGS_RELEASE += -g1
+#}
+
INCLUDEPATH += \
$$SOURCE_DIR/qt/Api \
$$SOURCE_DIR/qt/WebCoreSupport \
diff -up webkit-qtwebkit-23/Source/WTF/WTF.pri.debuginfo webkit-qtwebkit-23/Source/WTF/WTF.pri
--- webkit-qtwebkit-23/Source/WTF/WTF.pri.debuginfo 2013-02-15 09:46:12.000000000 -0600
+++ webkit-qtwebkit-23/Source/WTF/WTF.pri 2013-02-21 22:28:57.787764093 -0600
@@ -8,6 +8,12 @@
# All external modules should include WTF headers by prefixing with "wtf" (#include <wtf/some/thing.h>).
INCLUDEPATH += $$PWD
+#equals(QT_ARCH, s390)|equals(QT_ARCH, arm)|equals(QT_ARCH, mips)|equals(QT_ARCH, i386)|equals(QT_ARCH, i686)|equals(QT_ARCH, x86_64) {
+# message("WTF workaround for QtWebkit: do not build with -g, but with -g1")
+# QMAKE_CXXFLAGS_RELEASE -= -g
+# QMAKE_CXXFLAGS_RELEASE += -g1
+#}
+
haveQt(5) {
mac {
# Mac OS does ship libicu but not the associated header files.

View File

@ -0,0 +1,9 @@
diff -up webkit-qtwebkit-23/Source/WebCore/WebCore.pri.fontconfig webkit-qtwebkit-23/Source/WebCore/WebCore.pri
--- webkit-qtwebkit-23/Source/WebCore/WebCore.pri.fontconfig 2013-02-21 22:28:57.789764068 -0600
+++ webkit-qtwebkit-23/Source/WebCore/WebCore.pri 2013-02-21 22:31:02.994198797 -0600
@@ -356,4 +362,4 @@ contains(DEFINES, ENABLE_OPENCL=1) {
enable_fast_mobile_scrolling: DEFINES += ENABLE_FAST_MOBILE_SCROLLING=1
-!production_build:contains(DEFINES, HAVE_FONTCONFIG=1): PKGCONFIG += fontconfig
+contains(DEFINES, HAVE_FONTCONFIG=1): PKGCONFIG += fontconfig

View File

@ -0,0 +1,12 @@
diff -up webkit-qtwebkit-23/Source/WebCore/WebCore.pri.save_memory webkit-qtwebkit-23/Source/WebCore/WebCore.pri
--- webkit-qtwebkit-23/Source/WebCore/WebCore.pri.save_memory 2013-02-15 09:46:12.000000000 -0600
+++ webkit-qtwebkit-23/Source/WebCore/WebCore.pri 2013-02-21 16:42:30.996634743 -0600
@@ -336,6 +336,8 @@ mac {
}
unix:!mac:*-g++*:QMAKE_CXXFLAGS += -fdata-sections
unix:!mac:*-g++*:QMAKE_LFLAGS += -Wl,--gc-sections
+unix:!mac:*-g++*:!equals(QT_ARCH, powerpc):!equals(QT_ARCH, s390):!equals(QT_ARCH, mips):!equals(QT_ARCH, arm):QMAKE_LFLAGS += -Wl,--no-keep-memory
+unix:!mac:*-g++*:!equals(QT_ARCH, powerpc):!equals(QT_ARCH, s390):!equals(QT_ARCH, mips):!equals(QT_ARCH, arm):QMAKE_LFLAGS += -Wl,--reduce-memory-overheads
linux*-g++*:QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
unix|win32-g++* {

View File

@ -1,15 +0,0 @@
diff -up qtwebkit-2.2.2-source/Source/JavaScriptCore/wtf/OSAllocatorPosix.cpp.me qtwebkit-2.2.2-source/Source/JavaScriptCore/wtf/OSAllocatorPosix.cpp
diff -up qtwebkit-2.2.2-source/Source/JavaScriptCore/wtf/PageAllocationAligned.cpp.me qtwebkit-2.2.2-source/Source/JavaScriptCore/wtf/PageAllocationAligned.cpp
--- qtwebkit-2.2.2-source/Source/JavaScriptCore/wtf/PageAllocationAligned.cpp.me 2013-01-11 22:33:35.233535266 +0100
+++ qtwebkit-2.2.2-source/Source/JavaScriptCore/wtf/PageAllocationAligned.cpp 2013-01-11 22:53:23.706822547 +0100
@@ -50,7 +50,9 @@ PageAllocationAligned PageAllocationAlig
vm_map(current_task(), &address, size, alignmentMask, flags, MEMORY_OBJECT_NULL, 0, FALSE, protection, PROT_READ | PROT_WRITE | PROT_EXEC, VM_INHERIT_DEFAULT);
return PageAllocationAligned(reinterpret_cast<void*>(address), size);
#else
- size_t alignmentDelta = alignment - pageSize();
+ size_t pagesize = pageSize();
+ if (alignment < pagesize) alignment = pagesize;
+ size_t alignmentDelta = alignment - pagesize;
// Resererve with suffcient additional VM to correctly align.
size_t reservationSize = size + alignmentDelta;

View File

@ -1,13 +0,0 @@
diff -up qtwebkit-2.2.2-source/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp.svn_infinite_loop qtwebkit-2.2.2-source/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
--- qtwebkit-2.2.2-source/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp.svn_infinite_loop 2012-05-22 09:30:37.000000000 -0500
+++ qtwebkit-2.2.2-source/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp 2012-11-13 07:21:15.462272336 -0600
@@ -1057,6 +1057,9 @@ void GraphicsContext::setLineDash(const
count *= 2;
float penWidth = narrowPrecisionToFloat(double(pen.widthF()));
+ if (penWidth <= 0.f)
+ penWidth = 1.f;
+
for (unsigned i = 0; i < count; i++)
pattern.append(dashes[i % dashLength] / penWidth);

View File

@ -1,43 +0,0 @@
Index: trunk/LayoutTests/fast/inline/inline-destroy-dirty-lines-crash-expected.txt
===================================================================
--- trunk/LayoutTests/fast/inline/inline-destroy-dirty-lines-crash-expected.txt (revision 86060)
+++ trunk/LayoutTests/fast/inline/inline-destroy-dirty-lines-crash-expected.txt (revision 86060)
@@ -0,0 +1,2 @@
+Test passes it it does not crash.
+
Index: trunk/LayoutTests/fast/inline/inline-destroy-dirty-lines-crash.html
===================================================================
--- trunk/LayoutTests/fast/inline/inline-destroy-dirty-lines-crash.html (revision 86060)
+++ trunk/LayoutTests/fast/inline/inline-destroy-dirty-lines-crash.html (revision 86060)
@@ -0,0 +1,19 @@
+<html>
+<body onload="runTest()">
+Test passes it it does not crash.
+<script>
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ function runTest()
+ {
+ document.body.offsetTop;
+ child = document.getElementById('test');
+ child.parentNode.removeChild(child);
+ }
+</script>
+<br>
+<span id="test"></span>
+</body>
+</html>
+
Index: trunk/Source/WebCore/rendering/RenderInline.cpp
===================================================================
--- trunk/Source/WebCore/rendering/RenderInline.cpp (revision 86059)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp (revision 86060)
@@ -100,5 +100,6 @@
box->remove();
}
- }
+ } else if (parent())
+ parent()->dirtyLinesFromChangedChild(this);
}

View File

@ -1,11 +1,12 @@
Name: qtwebkit
Version: 2.2.2
Release: 9%{?dist}
Version: 2.3
Release: 0.1.beta2%{?dist}
Summary: Qt WebKit bindings
Group: System Environment/Libraries
License: LGPLv2 with exceptions or GPLv3 with exceptions
URL: http://trac.webkit.org/wiki/QtWebKit
## This was how qtwebkit-2.2 did it (no longer works for 2.3)
# get make-package.py:
# $ git clone git://qt.gitorious.org/qtwebkit/tools.git
# get Qt WebKit source code:
@ -18,44 +19,37 @@ URL: http://trac.webkit.org/wiki/QtWebKit
# $ tar xzf qtwebkit-2.2.2-source.tar.gz
# $ mv qtwebkit-2.2.2-source/include qtwebkit-2.2.2-source/Source/
# $ tar cJf qtwebkit-2.2.2-source.tar.xz qtwebkit-2.2.2-source/
Source0: qtwebkit-%{version}-source.tar.xz
##
# download from https://gitorious.org/webkit/qtwebkit-23/archive-tarball/qtwebkit-2.3-beta2b
# repack as .xz
Source0: qtwebkit-2.3-beta2.tar.xz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
# search /usr/lib{,64}/mozilla/plugins-wrapped for browser plugins too
Patch1: webkit-qtwebkit-2.2-tp1-pluginpath.patch
# include -debuginfo except on s390(x) during linking of libQtWebKit
Patch3: webkit-qtwebkit-2.2-debuginfo.patch
# smaller debuginfo s/-g/-g1/ (debian uses -gstabs) to avoid 4gb size limit
Patch3: qtwebkit-2.3-debuginfo.patch
# fix for qt-4.6.x
Patch5: webkit-qtwebkit-2.2tp1-qt46.patch
# tweak linker flags to minimize memory usage on "small" platforms
Patch4: qtwebkit-2.3-save_memory.patch
# gcc doesn't support flag -fuse-ld=gold
Patch7: webkit-qtwebkit-ld.gold.patch
# svg infinite loop
# https://projects.kde.org/news/177
# https://bugs.webkit.org/show_bug.cgi?id=97258
Patch8: qtwebkit-svg_infinite_loop.patch
# fix 64k pagesize issue
Patch9: qtwebkit-64k-pagesize.patch
# don't disable fontconfig on production_build (linking fails)
Patch5: qtwebkit-2.3-fontconfig.patch
# use SYSTEM_MALLOC on ppc/ppc64
Patch10: qtwebkit-ppc.patch
## upstream patches
# https://bugzilla.redhat.com/891464
# https://bugs.webkit.org/show_bug.cgi?id=72285
Patch100: qtwebkit-webkit72285.patch
Patch102: 0002-JSString-resolveRope-should-report-extra-memory-cost.patch
Patch103: 0003-Fix-build-with-GLib-2.31.patch
Patch105: 0005-Fix-build-on-linux-i386-where-gcc-would-produce-warn.patch
BuildRequires: bison
BuildRequires: chrpath
BuildRequires: flex
BuildRequires: gperf
BuildRequires: libicu-devel
BuildRequires: libjpeg-devel
BuildRequires: pkgconfig(gio-2.0) pkgconfig(glib-2.0)
BuildRequires: pkgconfig(fontconfig)
# gstreamer media support
BuildRequires: pkgconfig(gstreamer-0.10) pkgconfig(gstreamer-app-0.10)
BuildRequires: pkgconfig(libpcre)
@ -64,6 +58,9 @@ BuildRequires: pkgconfig(QtCore) pkgconfig(QtNetwork)
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xrender)
BuildRequires: perl(version)
BuildRequires: perl(Digest::MD5)
BuildRequires: ruby
%if 0%{?fedora}
# for QtLocation, QtSensors
BuildRequires: qt-mobility-devel >= 1.2
@ -94,45 +91,48 @@ Provides: qt4-webkit-devel%{?_isa} = 2:%{version}-%{release}
%prep
%setup -q -n qtwebkit-%{version}-source
%setup -q -n webkit-qtwebkit-23
%patch1 -p1 -b .pluginpath
%patch3 -p1 -b .debuginfo
## don't unconditionally apply this anymore
## it has side-effects ( like http://bugzilla.redhat.com/761337 )
#patch5 -p1 -b .qt46
%patch7 -p1 -b .ld.gold
%patch8 -p1 -b .svn_infinite_loop
%patch9 -p1 -b .64kpagesize
%patch4 -p1 -b .save_memory
%patch5 -p1 -b .fontconfig
%ifarch ppc ppc64
%patch10 -p1 -b .system-malloc
%endif
%patch100 -p1 -b .webkit72285
%patch102 -p1 -b .0002
%patch103 -p1 -b .0003
%patch105 -p1 -b .0005
%build
PATH=%{_qt4_bindir}:$PATH; export PATH
QMAKEPATH=`pwd`/Tools/qmake; export QMAKEPATH
QTDIR=%{_qt4_prefix}; export QTDIR
pushd Source
%{_qt4_qmake}
popd
# production_build is *supposed* to be default, but apparently not?
# production_build drops -Werror compile flag
make %{?_smp_mflags} -C Source
./Tools/Scripts/build-webkit \
--qt \
--qmakearg="CONFIG+=production_build" \
--makeargs=-j1
%install
rm -rf %{buildroot}
make install INSTALL_ROOT=%{buildroot} -C Source
make install INSTALL_ROOT=%{buildroot} -C WebKitBuild/Release
## HACK, there has to be a better way
chrpath --list %{buildroot}%{_qt4_libdir}/libQtWebKit.so.4.9.?
chrpath --delete %{buildroot}%{_qt4_libdir}/libQtWebKit.so.4.9.? ||:
chrpath --list %{buildroot}%{_qt4_libdir}/libQtWebKit.so.4.10.?
chrpath --delete %{buildroot}%{_qt4_libdir}/libQtWebKit.so.4.10.? ||:
## pkgconfig love
# drop Libs.private, it contains buildroot references, and
# we don't support static linking libQtWebKit anyway
pushd %{buildroot}%{_libdir}/pkgconfig
grep -v "^Libs.private:" QtWebKit.pc > QtWebKit.pc.new && \
mv QtWebKit.pc.new QtWebKit.pc
popd
%clean
@ -151,7 +151,6 @@ rm -rf %{buildroot}
%files devel
%defattr(-,root,root,-)
%{_qt4_datadir}/mkspecs/modules/qt_webkit_version.pri
%{_qt4_headerdir}/QtWebKit/
%{_qt4_libdir}/libQtWebKit.prl
%{_qt4_libdir}/libQtWebKit.so
@ -159,6 +158,9 @@ rm -rf %{buildroot}
%changelog
* Thu Feb 21 2013 Rex Dieter <rdieter@fedoraproject.org> 2.3-0.1.beta2
- qtwebkit-2.3-beta2
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

View File

@ -1 +1 @@
750055355d11dd37984bfbe4d02b2225 qtwebkit-2.2.2-source.tar.xz
e0a8e6dddc3f0f771432e54a5f3f2124 qtwebkit-2.3-beta2.tar.xz

View File

@ -1,43 +0,0 @@
diff -up webkit-qtwebkit/Source/JavaScriptCore/JavaScriptCore.pro.javascriptcore_debuginfo webkit-qtwebkit/Source/JavaScriptCore/JavaScriptCore.pro
--- webkit-qtwebkit/Source/JavaScriptCore/JavaScriptCore.pro.javascriptcore_debuginfo 2011-06-21 12:13:07.000000000 -0500
+++ webkit-qtwebkit/Source/JavaScriptCore/JavaScriptCore.pro 2011-06-22 07:42:40.365535990 -0500
@@ -22,12 +22,20 @@ contains(QT_CONFIG, embedded):CONFIG +=
contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions
-CONFIG(QTDIR_build) {
+!CONFIG(webkit-debug):CONFIG(QTDIR_build) {
# Remove the following 2 lines if you want debug information in JavaScriptCore
CONFIG -= separate_debug_info
CONFIG += no_debug_info
}
+# optimize for low mem arch s390 (disable debugging, etc...)
+equals(QT_ARCH, s390): {
+ CONFIG -= separate_debug_info
+ CONFIG += no_debug_info
+ QMAKE_CXXFLAGS_RELEASE -= -g
+ QMAKE_CFLAGS_RELEASE -= -g
+}
+
*-g++*:QMAKE_CXXFLAGS_RELEASE -= -O2
*-g++*:QMAKE_CXXFLAGS_RELEASE += -O3
diff -up webkit-qtwebkit/Source/WebCore/WebCore.pri.javascriptcore_debuginfo webkit-qtwebkit/Source/WebCore/WebCore.pri
--- webkit-qtwebkit/Source/WebCore/WebCore.pri.javascriptcore_debuginfo 2011-06-21 12:13:07.000000000 -0500
+++ webkit-qtwebkit/Source/WebCore/WebCore.pri 2011-06-22 08:36:58.159265977 -0500
@@ -289,6 +289,14 @@ contains(DEFINES, ENABLE_WEBGL=1)|contai
CONFIG += no_debug_info
}
+# optimize for low mem arch s390 (disable debugging, etc...)
+equals(QT_ARCH, s390): {
+ CONFIG -= separate_debug_info
+ CONFIG += no_debug_info
+ QMAKE_CXXFLAGS_RELEASE -= -g
+ QMAKE_CFLAGS_RELEASE -= -g
+}
+
contains (CONFIG, text_breaking_with_icu) {
LIBS += -licuuc
}

View File

@ -1,282 +0,0 @@
diff -up webkit-qtwebkit/Source/WebCore/page/ContextMenuController.cpp.type-cast webkit-qtwebkit/Source/WebCore/page/ContextMenuController.cpp
--- webkit-qtwebkit/Source/WebCore/page/ContextMenuController.cpp.type-cast 2011-05-12 16:42:28.000000000 +0200
+++ webkit-qtwebkit/Source/WebCore/page/ContextMenuController.cpp 2011-05-19 15:07:35.000000000 +0200
@@ -1050,6 +1050,11 @@ void ContextMenuController::checkOrEnabl
shouldEnable = true;
break;
#endif
+#if PLATFORM(QT)
+ case ContextMenuItemTagSelectAll:
+ shouldEnable = true;
+ break;
+#endif
case ContextMenuItemTagUnderline: {
shouldCheck = frame->editor()->selectionHasStyle(CSSPropertyWebkitTextDecorationsInEffect, "underline") != FalseTriState;
shouldEnable = frame->editor()->canEditRichly();
diff -up webkit-qtwebkit/Source/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp.type-cast webkit-qtwebkit/Source/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp
--- webkit-qtwebkit/Source/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp.type-cast 2011-05-12 16:42:28.000000000 +0200
+++ webkit-qtwebkit/Source/WebCore/platform/graphics/qt/FontPlatformDataQt.cpp 2011-05-19 15:07:35.000000000 +0200
@@ -73,8 +73,9 @@ FontPlatformData::FontPlatformData(const
font.setLetterSpacing(QFont::AbsoluteSpacing, letterSpacing);
const bool smallCaps = description.smallCaps();
font.setCapitalization(smallCaps ? QFont::SmallCaps : QFont::MixedCase);
+#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
font.setStyleStrategy(QFont::ForceIntegerMetrics);
-
+#endif
m_data->bold = font.bold();
// WebKit allows font size zero but QFont does not. We will return
// m_data->size if a font size of zero is requested and pixelSize()
diff -up webkit-qtwebkit/Source/WebCore/platform/graphics/qt/FontQt.cpp.type-cast webkit-qtwebkit/Source/WebCore/platform/graphics/qt/FontQt.cpp
--- webkit-qtwebkit/Source/WebCore/platform/graphics/qt/FontQt.cpp.type-cast 2011-05-12 16:42:28.000000000 +0200
+++ webkit-qtwebkit/Source/WebCore/platform/graphics/qt/FontQt.cpp 2011-05-19 15:07:35.000000000 +0200
@@ -186,17 +186,20 @@ static void drawTextCommon(GraphicsConte
p->restore();
return;
}
+#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
int skipWidth = QFontMetrics(font).width(string, from, Qt::TextBypassShaping);
pt.setX(pt.x() + skipWidth);
string = fromRawDataWithoutRef(sanitized, from, to - from);
+#endif
}
p->setFont(font);
int flags = run.rtl() ? Qt::TextForceRightToLeft : Qt::TextForceLeftToRight;
+#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
if (!isComplexText && !(ctx->textDrawingMode() & TextModeStroke))
flags |= Qt::TextBypassShaping;
-
+#endif
QPainterPath textStrokePath;
if (ctx->textDrawingMode() & TextModeStroke)
textStrokePath.addText(pt, font, string);
@@ -212,7 +215,11 @@ static void drawTextCommon(GraphicsConte
p->restore();
} else {
QFontMetrics fm(font);
+#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
QRectF boundingRect(pt.x(), point.y() - fm.ascent(), fm.width(string, -1, flags), fm.height());
+#else
+ QRectF boundingRect(pt.x(), point.y() - fm.ascent(), fm.width(string, -1), fm.height());
+#endif
QPainter* shadowPainter = ctxShadow->beginShadowLayer(ctx, boundingRect);
if (shadowPainter) {
// Since it will be blurred anyway, we don't care about render hints.
@@ -229,7 +236,11 @@ static void drawTextCommon(GraphicsConte
p->translate(-ctxShadow->offset());
} else {
QFontMetrics fm(font);
+#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
QRectF boundingRect(pt.x(), point.y() - fm.ascent(), fm.width(string, -1, flags), fm.height());
+#else
+ QRectF boundingRect(pt.x(), point.y() - fm.ascent(), fm.width(string, -1), fm.height());
+#endif
QPainter* shadowPainter = ctxShadow->beginShadowLayer(ctx, boundingRect);
if (shadowPainter) {
// Since it will be blurred anyway, we don't care about render hints.
@@ -254,7 +265,11 @@ static void drawTextCommon(GraphicsConte
void Font::drawComplexText(GraphicsContext* ctx, const TextRun& run, const FloatPoint& point, int from, int to) const
{
- drawTextCommon(ctx, run, point, from, to, font(), /* isComplexText = */true);
+#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
+ drawTextCommon(ctx, run, point, from, to, font(), /* isComplexText = */false);
+#else
+ Q_ASSERT(false);
+#endif
}
float Font::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFontData*>*, GlyphOverflow*) const
@@ -402,6 +417,7 @@ int Font::offsetForPositionForSimpleText
float Font::floatWidthForSimpleText(const TextRun& run, GlyphBuffer* glyphBuffer, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow) const
{
+#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
if (!primaryFont()->platformData().size())
return 0;
@@ -418,11 +434,16 @@ float Font::floatWidthForSimpleText(cons
w -= m_wordSpacing;
return w + run.expansion();
+#else
+ Q_ASSERT(false);
+ return 0.0f;
+#endif
}
FloatRect Font::selectionRectForSimpleText(const TextRun& run, const FloatPoint& pt, int h, int from, int to) const
{
+#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
String sanitized = Font::normalizeSpaces(run.characters(), run.length());
QString wholeText = fromRawDataWithoutRef(sanitized);
QString selectedText = fromRawDataWithoutRef(sanitized, from, qMin(to - from, wholeText.length() - from));
@@ -431,6 +452,10 @@ FloatRect Font::selectionRectForSimpleTe
int width = QFontMetrics(font()).width(selectedText, -1, Qt::TextBypassShaping);
return FloatRect(pt.x() + startX, pt.y(), width, h);
+#else
+ Q_ASSERT(false);
+ return FloatRect();
+#endif
}
bool Font::canExpandAroundIdeographsInComplexText()
diff -up webkit-qtwebkit/Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp.type-cast webkit-qtwebkit/Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp
--- webkit-qtwebkit/Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp.type-cast 2011-05-12 16:42:28.000000000 +0200
+++ webkit-qtwebkit/Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp 2011-05-19 15:07:35.000000000 +0200
@@ -233,8 +233,11 @@ PassRefPtr<ByteArray> getImageData(const
ASSERT(!image.isNull());
const int bytesPerLine = image.bytesPerLine();
+#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
const uchar* bits = image.constBits();
-
+#else
+ const uchar* bits = image.bits();
+#endif
quint32* destRows = reinterpret_cast_ptr<quint32*>(&data[desty * rect.width() * 4 + destx * 4]);
if (multiplied == Unmultiplied) {
diff -up webkit-qtwebkit/Source/WebCore/platform/graphics/qt/ImageDecoderQt.cpp.type-cast webkit-qtwebkit/Source/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
--- webkit-qtwebkit/Source/WebCore/platform/graphics/qt/ImageDecoderQt.cpp.type-cast 2011-05-12 16:42:28.000000000 +0200
+++ webkit-qtwebkit/Source/WebCore/platform/graphics/qt/ImageDecoderQt.cpp 2011-05-19 15:07:35.000000000 +0200
@@ -194,8 +194,15 @@ void ImageDecoderQt::internalReadImage(s
bool ImageDecoderQt::internalHandleCurrentImage(size_t frameIndex)
{
- QPixmap pixmap = QPixmap::fromImageReader(m_reader.get());
+ QPixmap pixmap;
+#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
+ pixmap = QPixmap::fromImageReader(m_reader.get());
+#else
+ QImage img;
+ if (m_reader->read(&img))
+ pixmap = QPixmap::fromImage(img);
+#endif
if (pixmap.isNull()) {
frameCount();
repetitionCount();
diff -up webkit-qtwebkit/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp.type-cast webkit-qtwebkit/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
--- webkit-qtwebkit/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp.type-cast 2011-05-12 16:42:28.000000000 +0200
+++ webkit-qtwebkit/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp 2011-05-19 15:07:35.000000000 +0200
@@ -362,8 +362,10 @@ String QNetworkReplyHandler::httpMethod(
return "PUT";
case QNetworkAccessManager::DeleteOperation:
return "DELETE";
+#if QT_VERSION >= 0x040700
case QNetworkAccessManager::CustomOperation:
return m_resourceHandle->firstRequest().httpMethod();
+#endif
default:
ASSERT_NOT_REACHED();
return "GET";
@@ -390,7 +392,11 @@ QNetworkReplyHandler::QNetworkReplyHandl
else if (r.httpMethod() == "DELETE")
m_method = QNetworkAccessManager::DeleteOperation;
else
+#if QT_VERSION >= 0x040700
m_method = QNetworkAccessManager::CustomOperation;
+#else
+ m_method = QNetworkAccessManager::UnknownOperation;
+#endif
QObject* originatingObject = 0;
if (m_resourceHandle->getInternal()->m_context)
@@ -511,10 +517,16 @@ void QNetworkReplyHandler::sendResponseI
response.setHTTPStatusText(m_replyWrapper->reply()->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toByteArray().constData());
// Add remaining headers.
- foreach (const QNetworkReply::RawHeaderPair& pair, m_replyWrapper->reply()->rawHeaderPairs())
+#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
+ foreach (const QNetworkReply::RawHeaderPair& pair, m_replyWrapper->reply()->rawHeaderPairs()) {
response.setHTTPHeaderField(QString::fromLatin1(pair.first), QString::fromLatin1(pair.second));
+ }
+#else
+ foreach (const QByteArray& headerName, m_replyWrapper->reply()->rawHeaderList()) {
+ response.setHTTPHeaderField(QString::fromAscii(headerName), QString::fromAscii(m_replyWrapper->reply()->rawHeader(headerName)));
+ }
+#endif
}
-
QUrl redirection = m_replyWrapper->reply()->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl();
if (redirection.isValid()) {
redirect(response, redirection);
@@ -641,8 +653,10 @@ QNetworkReply* QNetworkReplyHandler::sen
case QNetworkAccessManager::DeleteOperation: {
return manager->deleteResource(m_request);
}
+#if QT_VERSION >= 0x040700
case QNetworkAccessManager::CustomOperation:
return manager->sendCustomRequest(m_request, m_resourceHandle->firstRequest().httpMethod().latin1().data());
+#endif
case QNetworkAccessManager::UnknownOperation:
ASSERT_NOT_REACHED();
return 0;
diff -up webkit-qtwebkit/Source/WebCore/platform/network/qt/ResourceRequestQt.cpp.type-cast webkit-qtwebkit/Source/WebCore/platform/network/qt/ResourceRequestQt.cpp
--- webkit-qtwebkit/Source/WebCore/platform/network/qt/ResourceRequestQt.cpp.type-cast 2011-05-12 16:42:28.000000000 +0200
+++ webkit-qtwebkit/Source/WebCore/platform/network/qt/ResourceRequestQt.cpp 2011-05-19 15:07:35.000000000 +0200
@@ -82,13 +82,13 @@ QNetworkRequest ResourceRequest::toNetwo
default:
break;
}
-
+#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
if (!allowCookies()) {
request.setAttribute(QNetworkRequest::CookieLoadControlAttribute, QNetworkRequest::Manual);
request.setAttribute(QNetworkRequest::CookieSaveControlAttribute, QNetworkRequest::Manual);
request.setAttribute(QNetworkRequest::AuthenticationReuseAttribute, QNetworkRequest::Manual);
}
-
+#endif
return request;
}
diff -up webkit-qtwebkit/Source/WebKit/qt/Api/qwebframe.cpp.type-casting webkit-qtwebkit/Source/WebKit/qt/Api/qwebframe.cpp
--- webkit-qtwebkit/Source/WebKit/qt/Api/qwebframe.cpp.type-casting 2011-05-24 09:55:43.000000000 +0200
+++ webkit-qtwebkit/Source/WebKit/qt/Api/qwebframe.cpp 2011-05-24 09:59:16.000000000 +0200
@@ -907,9 +907,11 @@ void QWebFrame::load(const QNetworkReque
case QNetworkAccessManager::DeleteOperation:
request.setHTTPMethod("DELETE");
break;
+#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
case QNetworkAccessManager::CustomOperation:
request.setHTTPMethod(req.attribute(QNetworkRequest::CustomVerbAttribute).toByteArray().constData());
break;
+#endif
case QNetworkAccessManager::UnknownOperation:
// eh?
break;
diff -up webkit-qtwebkit/Source/WebKit/qt/Api/qwebsettings.cpp.type-casting webkit-qtwebkit/Source/WebKit/qt/Api/qwebsettings.cpp
--- webkit-qtwebkit/Source/WebKit/qt/Api/qwebsettings.cpp.type-casting 2011-05-24 09:46:59.000000000 +0200
+++ webkit-qtwebkit/Source/WebKit/qt/Api/qwebsettings.cpp 2011-05-24 09:53:45.000000000 +0200
@@ -480,16 +480,25 @@ QWebSettings::QWebSettings()
d->fontFamilies.insert(QWebSettings::StandardFont, defaultFont.defaultFamily());
d->fontFamilies.insert(QWebSettings::SerifFont, defaultFont.defaultFamily());
+#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
defaultFont.setStyleHint(QFont::Fantasy);
d->fontFamilies.insert(QWebSettings::FantasyFont, defaultFont.defaultFamily());
defaultFont.setStyleHint(QFont::Cursive);
d->fontFamilies.insert(QWebSettings::CursiveFont, defaultFont.defaultFamily());
+#else
+ d->fontFamilies.insert(QWebSettings::FantasyFont, defaultFont.defaultFamily());
+ d->fontFamilies.insert(QWebSettings::CursiveFont, defaultFont.defaultFamily());
+#endif
defaultFont.setStyleHint(QFont::SansSerif);
d->fontFamilies.insert(QWebSettings::SansSerifFont, defaultFont.defaultFamily());
+#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
defaultFont.setStyleHint(QFont::Monospace);
+#else
+ defaultFont.setStyleHint(QFont::TypeWriter);
+#endif
d->fontFamilies.insert(QWebSettings::FixedFont, defaultFont.defaultFamily());
d->attributes.insert(QWebSettings::AutoLoadImages, true);

View File

@ -1,23 +0,0 @@
diff -up webkit-qtwebkit/Source/common.pri.me webkit-qtwebkit/Source/common.pri
--- webkit-qtwebkit/Source/common.pri.me 2012-01-24 14:51:49.000000000 +0100
+++ webkit-qtwebkit/Source/common.pri 2012-01-24 14:52:01.000000000 +0100
@@ -3,12 +3,12 @@
contains(JAVASCRIPTCORE_JIT,yes): DEFINES+=ENABLE_JIT=1
contains(JAVASCRIPTCORE_JIT,no): DEFINES+=ENABLE_JIT=0
-linux-g++ {
-isEmpty($$(SBOX_DPKG_INST_ARCH)):exists(/usr/bin/ld.gold) {
- message(Using gold linker)
- QMAKE_LFLAGS+=-fuse-ld=gold
-}
-}
+#linux-g++ {
+#isEmpty($$(SBOX_DPKG_INST_ARCH)):exists(/usr/bin/ld.gold) {
+# message(Using gold linker)
+# QMAKE_LFLAGS+=-fuse-ld=gold
+#}
+#}
# We use this flag on production branches
# See https://bugs.webkit.org/show_bug.cgi?id=60824
diff -up webkit-qtwebkit/Source/JavaScriptCore/runtime/JSGlobalObject.h.me webkit-qtwebkit/Source/JavaScriptCore/runtime/JSGlobalObject.h