[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.18-1-697-g2f78b87
Gustavo Noronha Silva
kov at debian.org
Wed Jan 20 22:30:17 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit c207b1c57d184864cb8fc8cfb97548484dffc044
Merge: a08880cda5cca56bc35970c8c9b335450618dc53 637c90798f4e813fad848b9b4d0220867bb45af3
Author: Gustavo Noronha Silva <kov at debian.org>
Date: Wed Jan 20 20:09:33 2010 -0200
Merge branch 'webkit-1.1' into debian/unstable
Conflicts:
GNUmakefile.in
WebCore/GNUmakefile.am
WebCore/platform/gtk/DataObjectGtk.cpp
WebCore/platform/gtk/DataObjectGtk.h
WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp
diff --combined JavaScriptCore/wtf/FastMalloc.cpp
index 74d0b81,c834212..db6cd62
--- a/JavaScriptCore/wtf/FastMalloc.cpp
+++ b/JavaScriptCore/wtf/FastMalloc.cpp
@@@ -114,11 -114,13 +114,13 @@@ static void initializeIsForbiddenKey(
pthread_key_create(&isForbiddenKey, 0);
}
+ #if !ASSERT_DISABLED
static bool isForbidden()
{
pthread_once(&isForbiddenKeyOnce, initializeIsForbiddenKey);
return !!pthread_getspecific(isForbiddenKey);
}
+ #endif
void fastMallocForbid()
{
@@@ -191,13 -193,6 +193,6 @@@ TryMallocReturnValue tryFastZeroedMallo
#if FORCE_SYSTEM_MALLOC
- #include <stdlib.h>
- #if !OS(WINDOWS)
- #include <pthread.h>
- #else
- #include "windows.h"
- #endif
-
namespace WTF {
TryMallocReturnValue tryFastMalloc(size_t n)
@@@ -2259,13 -2254,13 +2254,13 @@@ static TCMalloc_Central_FreeListPadded
// Page-level allocator
static SpinLock pageheap_lock = SPINLOCK_INITIALIZER;
-static void* pageheap_memory[(sizeof(TCMalloc_PageHeap) + sizeof(void*) - 1) / sizeof(void*)];
+static uint64_t pageheap_memory[(sizeof(TCMalloc_PageHeap) + sizeof(uint64_t) - 1) / sizeof(uint64_t)];
static bool phinited = false;
// Avoid extra level of indirection by making "pageheap" be just an alias
// of pageheap_memory.
typedef union {
- void* m_memory;
+ uint64_t* m_memory;
TCMalloc_PageHeap* m_pageHeap;
} PageHeapUnion;
@@@ -3795,7 -3790,7 +3790,7 @@@ void* realloc(void* old_ptr, size_t new
return new_ptr;
} else {
#if ENABLE(FAST_MALLOC_MATCH_VALIDATION)
- old_ptr = pByte + sizeof(AllocAlignmentInteger); // Set old_ptr back to the user pointer.
+ old_ptr = static_cast<AllocAlignmentInteger*>(old_ptr) + 1; // Set old_ptr back to the user pointer.
#endif
return old_ptr;
}
diff --combined WebCore/platform/text/AtomicString.cpp
index f02fe28,64c03cb..be38ee5
--- a/WebCore/platform/text/AtomicString.cpp
+++ b/WebCore/platform/text/AtomicString.cpp
@@@ -103,9 -103,9 +103,9 @@@ static inline bool equal(StringImpl* st
if (string->length() != length)
return false;
+#if CPU(ARM) || CPU(SPARC) || CPU(SH4)
// FIXME: perhaps we should have a more abstract macro that indicates when
// going 4 bytes at a time is unsafe
-#if CPU(ARM) || CPU(SH4)
const UChar* stringCharacters = string->characters();
for (unsigned i = 0; i != length; ++i) {
if (*stringCharacters++ != *characters++)
@@@ -252,7 -252,7 +252,7 @@@ PassRefPtr<StringImpl> AtomicString::ad
if (!length)
return StringImpl::empty();
- HashAndCharacters buffer = { string->computedHash(), string->data(), length };
+ HashAndCharacters buffer = { string->existingHash(), string->data(), length };
pair<HashSet<StringImpl*>::iterator, bool> addResult = stringTable().add<HashAndCharacters, HashAndCharactersTranslator>(buffer);
if (!addResult.second)
return *addResult.first;
@@@ -286,7 -286,7 +286,7 @@@ AtomicStringImpl* AtomicString::find(co
if (!length)
return static_cast<AtomicStringImpl*>(StringImpl::empty());
- HashAndCharacters buffer = { string->computedHash(), string->data(), length };
+ HashAndCharacters buffer = { string->existingHash(), string->data(), length };
HashSet<StringImpl*>::iterator iterator = stringTable().find<HashAndCharacters, HashAndCharactersTranslator>(buffer);
if (iterator == stringTable().end())
return 0;
@@@ -304,6 -304,8 +304,8 @@@ DEFINE_GLOBAL(AtomicString, emptyAtom,
DEFINE_GLOBAL(AtomicString, textAtom, "#text")
DEFINE_GLOBAL(AtomicString, commentAtom, "#comment")
DEFINE_GLOBAL(AtomicString, starAtom, "*")
+ DEFINE_GLOBAL(AtomicString, xmlAtom, "xml")
+ DEFINE_GLOBAL(AtomicString, xmlnsAtom, "xmlns")
void AtomicString::init()
{
@@@ -318,6 -320,8 +320,8 @@@
new ((void*)&textAtom) AtomicString("#text");
new ((void*)&commentAtom) AtomicString("#comment");
new ((void*)&starAtom) AtomicString("*");
+ new ((void*)&xmlAtom) AtomicString("xml");
+ new ((void*)&xmlnsAtom) AtomicString("xmlns");
initialized = true;
}
diff --combined WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
index e2daf3f,02d1a53..246c957
--- a/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
@@@ -202,17 -202,14 +202,17 @@@ void EditorClient::respondToChangedSele
#if PLATFORM(X11)
GtkClipboard* clipboard = gtk_widget_get_clipboard(GTK_WIDGET(m_webView), GDK_SELECTION_PRIMARY);
DataObjectGtk* dataObject = DataObjectGtk::forClipboard(clipboard);
- dataObject->clear();
if (targetFrame->selection()->isRange()) {
- RefPtr<Range> range = targetFrame->selection()->toNormalizedRange();
- dataObject->setText(targetFrame->selectedText());
- dataObject->setMarkup(createMarkup(range.get(), 0, AnnotateForInterchange));
+ dataObject->clear();
+ dataObject->setRange(targetFrame->selection()->toNormalizedRange());
+ pasteboardHelperInstance()->writeClipboardContents(clipboard, m_webView);
}
+ #endif
+ pasteboardHelperInstance()->writeClipboardContents(clipboard, corePage);
+#endif
+
if (!targetFrame->editor()->hasComposition())
return;
@@@ -532,7 -529,6 +532,6 @@@ void EditorClient::handleInputMethodKey
EditorClient::EditorClient(WebKitWebView* webView)
: m_isInRedo(false)
, m_webView(webView)
- , m_range(0)
{
WebKitWebViewPrivate* priv = m_webView->priv;
g_signal_connect(priv->imContext, "commit", G_CALLBACK(imContextCommitted), this);
diff --combined WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp
index 4dc2b50,8406ada..281e20e
--- a/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.cpp
@@@ -122,16 -122,27 +122,27 @@@ static void clearClipboardContentsCallb
DataObjectGtk* dataObject = DataObjectGtk::forClipboard(clipboard);
ASSERT(dataObject);
-
dataObject->clear();
- if (data) {
- WebCore::Page* corePage = reinterpret_cast<WebCore::Page*>(data);
- Frame* frame = corePage->focusController()->focusedOrMainFrame();
- // Collapse the selection without clearing it
- ASSERT(frame);
- frame->selection()->setBase(frame->selection()->extent(), frame->selection()->affinity());
+ // This will be true for clipboards other than X11 primary.
+ if (!data)
+ return;
+
+ WebKitWebView* webView = reinterpret_cast<WebKitWebView*>(data);
+ WebCore::Page* corePage = core(webView);
+
+ if (!corePage || !corePage->focusController()) {
+ g_object_unref(webView);
+ return;
}
+
+ Frame* frame = corePage->focusController()->focusedOrMainFrame();
+
+ // Collapse the selection without clearing it
+ ASSERT(frame);
+ frame->selection()->setBase(frame->selection()->extent(), frame->selection()->affinity());
+
+ g_object_unref(webView);
}
void PasteboardHelperGtk::writeClipboardContents(GtkClipboard* clipboard, gpointer data)
@@@ -144,9 -155,19 +155,18 @@@
if (numberOfTargets > 0 && table) {
settingClipboard = true;
- gtk_clipboard_set_with_data(clipboard, table, numberOfTargets,
- getClipboardContentsCallback,
- clearClipboardContentsCallback, data);
-
+ // Protect the web view from being destroyed before one of the clipboard callbacks
+ // is called. Balanced in both getClipboardContentsCallback and
+ // clearClipboardContentsCallback.
+ WebKitWebView* webView = static_cast<WebKitWebView*>(data);
+ g_object_ref(webView);
+
+ gboolean succeeded = gtk_clipboard_set_with_data(clipboard, table, numberOfTargets,
+ getClipboardContentsCallback,
+ clearClipboardContentsCallback, data);
+ if (!succeeded)
+ g_object_unref(webView);
+
settingClipboard = false;
} else
gtk_clipboard_clear(clipboard);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list