From 6300a96eca9f152b379f1bcf3d9efdc5572d989a Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 6 Jan 2012 16:29:20 +0100 Subject: Imported WebKit commit e5cf15db144eb534fdd94be50a07fc2026e967c3 (http://svn.webkit.org/repository/webkit/trunk@104291) --- ChangeLog | 9 +++ GNUmakefile.am | 5 ++ Source/JavaScriptCore/ChangeLog | 16 +++++ Source/JavaScriptCore/GNUmakefile.am | 8 ++- Source/JavaScriptCore/JavaScriptCore.pri | 2 - Source/JavaScriptCore/wtf/wtf.pri | 2 - Source/WTF/ChangeLog | 8 +++ Source/WTF/GNUmakefile.am | 38 ++++++++++++ Source/WTF/GNUmakefile.list.am | 3 + Source/WebCore/ChangeLog | 14 +++++ Source/WebCore/dom/Document.cpp | 2 + Source/WebKit/ChangeLog | 12 ++++ .../WebCoreSupport/CacheClientBlackBerry.cpp | 70 ++++++++++++++++++++++ .../WebCoreSupport/CacheClientBlackBerry.h | 38 ++++++++++++ Source/WebKit2/ChangeLog | 13 ++++ Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp | 3 + .../API/qt/tests/qmltests/WebView/tst_loadUrl.qml | 55 +++++++++++++++++ .../UIProcess/API/qt/tests/qmltests/qmltests.pro | 1 + Source/sync.profile | 2 +- 19 files changed, 294 insertions(+), 7 deletions(-) create mode 100644 Source/WTF/GNUmakefile.am create mode 100644 Source/WTF/GNUmakefile.list.am create mode 100644 Source/WebKit/blackberry/WebCoreSupport/CacheClientBlackBerry.cpp create mode 100644 Source/WebKit/blackberry/WebCoreSupport/CacheClientBlackBerry.h create mode 100644 Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml diff --git a/ChangeLog b/ChangeLog index 7033c19be..a2a8f3ac2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2012-01-06 Simon Hausmann + + [Qt] Fix compilation of app code against QtWebKit master header file + + Unreviewed trivial build fix. + + * Source/sync.profile: Exclude util.h and testwindow.h from the master header + file, because it cannot be used outside of the WebKit source tree. + 2012-01-06 Tor Arne Vestbø [Qt] Move listing of include paths and libs to pri files in sources diff --git a/GNUmakefile.am b/GNUmakefile.am index e5d7b4564..ea101761e 100644 --- a/GNUmakefile.am +++ b/GNUmakefile.am @@ -56,6 +56,9 @@ TEST_PROGS := POFILES := MOFILES := dom_binding_idls := +wtf_cppflags:= +wtf_cflags := +wtf_sources := javascriptcore_h_api := javascriptcore_cppflags:= javascriptcore_cflags := @@ -219,6 +222,8 @@ EXTRA_DIST += \ $(srcdir)/Source/WebKit/LICENSE # Include module makefiles +include Source/WTF/GNUmakefile.am + if USE_JSC include Source/JavaScriptCore/GNUmakefile.am endif diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog index 8408f380c..441521586 100644 --- a/Source/JavaScriptCore/ChangeLog +++ b/Source/JavaScriptCore/ChangeLog @@ -1,3 +1,19 @@ +2012-01-06 Eric Seidel and Gustavo Noronha Silva + + Make the new WTF module build on Gtk + https://bugs.webkit.org/show_bug.cgi?id=75669 + + * GNUmakefile.am: + +2012-01-06 Tor Arne Vestbø + + [Qt] Remove un-needed VPATHs from project includes + + Reviewed by Simon Hausmann. + + * JavaScriptCore.pri: + * wtf/wtf.pri: + 2012-01-06 Tor Arne Vestbø [Qt] Move listing of include paths and libs to pri files in sources diff --git a/Source/JavaScriptCore/GNUmakefile.am b/Source/JavaScriptCore/GNUmakefile.am index fc3ad8091..8498702dc 100644 --- a/Source/JavaScriptCore/GNUmakefile.am +++ b/Source/JavaScriptCore/GNUmakefile.am @@ -23,10 +23,11 @@ libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@ $(javascriptcore_sources) libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD = \ + -lpthread \ + libWTF.la \ $(UNICODE_LIBS) \ $(GLIB_LIBS) \ - $(WINMM_LIBS) \ - -lpthread + $(WINMM_LIBS) libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CXXFLAGS = \ $(global_cxxflags) \ @@ -68,6 +69,9 @@ javascriptcore_cppflags += \ -I$(srcdir)/Source/JavaScriptCore/yarr \ -I$(top_builddir)/DerivedSources/JavaScriptCore +javascriptcore_cppflags += \ + -I$(srcdir)/Source/WTF + javascriptcore_cflags += \ $(global_cflags) \ $(GLIB_CFLAGS) \ diff --git a/Source/JavaScriptCore/JavaScriptCore.pri b/Source/JavaScriptCore/JavaScriptCore.pri index 237de6137..65e0eb31a 100644 --- a/Source/JavaScriptCore/JavaScriptCore.pri +++ b/Source/JavaScriptCore/JavaScriptCore.pri @@ -28,8 +28,6 @@ INCLUDEPATH += \ $$SOURCE_DIR/ForwardingHeaders \ $$JAVASCRIPTCORE_GENERATED_SOURCES_DIR -VPATH += $$SOURCE_DIR - win32-* { DEFINES += _HAS_TR1=0 LIBS += -lwinmm diff --git a/Source/JavaScriptCore/wtf/wtf.pri b/Source/JavaScriptCore/wtf/wtf.pri index 2a3c609d5..176949f75 100644 --- a/Source/JavaScriptCore/wtf/wtf.pri +++ b/Source/JavaScriptCore/wtf/wtf.pri @@ -16,8 +16,6 @@ INCLUDEPATH += \ $$SOURCE_DIR/qt \ $$SOURCE_DIR/unicode -VPATH += $$SOURCE_DIR - contains(CONFIG, use_system_icu) { DEFINES += WTF_USE_ICU_UNICODE=1 DEFINES -= WTF_USE_QT4_UNICODE diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog index f5ace1610..a360c8a0a 100644 --- a/Source/WTF/ChangeLog +++ b/Source/WTF/ChangeLog @@ -1,3 +1,11 @@ +2012-01-06 Eric Seidel and Gustavo Noronha Silva + + Make the new WTF module build on Gtk + https://bugs.webkit.org/show_bug.cgi?id=75669 + + * GNUmakefile.am: Added. + * GNUmakefile.list.am: Added. + 2011-11-19 Adam Barth Integrate Source/WTF with the Chromium build system diff --git a/Source/WTF/GNUmakefile.am b/Source/WTF/GNUmakefile.am new file mode 100644 index 000000000..070fb9014 --- /dev/null +++ b/Source/WTF/GNUmakefile.am @@ -0,0 +1,38 @@ +include $(srcdir)/Source/WTF/GNUmakefile.list.am + +noinst_LTLIBRARIES += \ + libWTF.la + +libWTF_la_LDFLAGS = \ + $(no_undefined) + +libWTF_la_SOURCES = \ + $(wtf_sources) + +libWTF_la_LIBADD = \ + $(UNICODE_LIBS) \ + $(GLIB_LIBS) \ + $(WINMM_LIBS) \ + -lpthread + +libWTF_la_CXXFLAGS = \ + $(global_cxxflags) \ + $(libWTF_la_CFLAGS) + +wtf_cflags += \ + $(global_cflags) \ + $(GLIB_CFLAGS) \ + $(UNICODE_CFLAGS) + +libWTF_la_CFLAGS = \ + -fstrict-aliasing \ + -O3 \ + $(wtf_cflags) + +wtf_cppflags += \ + -I$(srcdir)/Source \ + -I$(srcdir)/Source/WTF + +libWTF_la_CPPFLAGS = \ + $(global_cppflags) \ + $(wtf_cppflags) diff --git a/Source/WTF/GNUmakefile.list.am b/Source/WTF/GNUmakefile.list.am new file mode 100644 index 000000000..a526f4a37 --- /dev/null +++ b/Source/WTF/GNUmakefile.list.am @@ -0,0 +1,3 @@ +wtf_sources += \ + Source/WTF/Stub.cpp \ + Source/WTF/Stub.h diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 0ffc27370..5b5e4bc47 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,17 @@ +2012-01-05 Antti Koivisto + + REGRESSION (r104060): fast/forms/textarea-metrics.html is failing + https://bugs.webkit.org/show_bug.cgi?id=75644 + + Reviewed by Alexey Proskuryakov. + + We need to clear the style selector on doc type change as the doc type + may affect interpretation of the stylesheets. r104060 extended the life + of the style selector in some cases, exposing this problem. + + * dom/Document.cpp: + (WebCore::Document::setDocType): + 2012-01-06 Tor Arne Vestbø [Qt] Move listing of include paths and libs to pri files in sources diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp index d202a1bf8..66fb4738e 100644 --- a/Source/WebCore/dom/Document.cpp +++ b/Source/WebCore/dom/Document.cpp @@ -713,6 +713,8 @@ void Document::setDocType(PassRefPtr docType) m_docType = docType; if (m_docType) m_docType->setTreeScopeRecursively(this); + // Doctype affects the interpretation of the stylesheets. + m_styleSelector.clear(); } DOMImplementation* Document::implementation() diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog index eefe7f931..3284277df 100644 --- a/Source/WebKit/ChangeLog +++ b/Source/WebKit/ChangeLog @@ -1,3 +1,15 @@ +2012-01-06 Jacky Jiang + + [BlackBerry] Upstream BlackBerry WebCoreSupport cache client + https://bugs.webkit.org/show_bug.cgi?id=75649 + + Reviewed by Antonio Gomes. + + Initial upstream, no new tests. + + * blackberry/WebCoreSupport/CacheClientBlackBerry.cpp: Added. + * blackberry/WebCoreSupport/CacheClientBlackBerry.h: Added. + 2012-01-03 Jon Lee Leak of WebNotificationClient when page is destroyed diff --git a/Source/WebKit/blackberry/WebCoreSupport/CacheClientBlackBerry.cpp b/Source/WebKit/blackberry/WebCoreSupport/CacheClientBlackBerry.cpp new file mode 100644 index 000000000..c203a1822 --- /dev/null +++ b/Source/WebKit/blackberry/WebCoreSupport/CacheClientBlackBerry.cpp @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "config.h" +#include "CacheClientBlackBerry.h" + +#include "MemoryCache.h" +#include +#include + +namespace WebCore { + +CacheClientBlackBerry* CacheClientBlackBerry::get() +{ + static CacheClientBlackBerry s_cacheClient; + return &s_cacheClient; +} + +CacheClientBlackBerry::CacheClientBlackBerry() + : m_lastCapacity(0) +{ +} + +void CacheClientBlackBerry::initialize() +{ +#if ENABLE(BLACKBERRY_DEBUG_MEMORY) + bool isDisabled = true; +#else + bool isDisabled = false; +#endif + memoryCache()->setDisabled(isDisabled); + if (!isDisabled) { + // We have to set a non-zero interval to schedule cache pruning after a CachedImage becoming dead. + memoryCache()->setDeadDecodedDataDeletionInterval(0.01); + updateCacheCapacity(); + } +} + +void CacheClientBlackBerry::updateCacheCapacity() +{ +#if ENABLE(BLACKBERRY_DEBUG_MEMORY) + // We're debugging memory usage. So keep it disabled. +#else + unsigned cacheCapacity = BlackBerry::Platform::Settings::get()->getSuggestedCacheCapacity(memoryCache()->totalSize()); + if (m_lastCapacity == cacheCapacity) { + // Suggested capacity hasn't been changed. + return; + } + + m_lastCapacity = cacheCapacity; + memoryCache()->setCapacities(0, m_lastCapacity, m_lastCapacity); +#endif +} + +} // WebCore diff --git a/Source/WebKit/blackberry/WebCoreSupport/CacheClientBlackBerry.h b/Source/WebKit/blackberry/WebCoreSupport/CacheClientBlackBerry.h new file mode 100644 index 000000000..e022311ee --- /dev/null +++ b/Source/WebKit/blackberry/WebCoreSupport/CacheClientBlackBerry.h @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef CacheClientBlackBerry_h +#define CacheClientBlackBerry_h + +namespace WebCore { + +class CacheClientBlackBerry { +public: + static CacheClientBlackBerry* get(); + + void initialize(); + void updateCacheCapacity(); + +private: + CacheClientBlackBerry(); + unsigned m_lastCapacity; +}; + +} // WebCore + +#endif // CacheClientBlackBerry_h diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index 49cdb713d..bc6f54d50 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,16 @@ +2012-01-06 Rafael Brandao + + [Qt][WK2] QQuickWebView breaks when an empty url is loaded + https://bugs.webkit.org/show_bug.cgi?id=75445 + + Reviewed by Tor Arne Vestbø. + + * UIProcess/API/qt/qquickwebview.cpp: + (QQuickWebView::load): + * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml: Check if a request to load + an empty url is ignored. 'about:blank' should be used instead to load an empty page. + * UIProcess/API/qt/tests/qmltests/qmltests.pro: + 2012-01-06 Tor Arne Vestbø [Qt] Move listing of include paths and libs to pri files in sources diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp index 7bbef9182..264cbb044 100644 --- a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp +++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp @@ -814,6 +814,9 @@ QQuickWebPage* QQuickWebView::page() void QQuickWebView::load(const QUrl& url) { + if (url.isEmpty()) + return; + Q_D(QQuickWebView); d->webPageProxy->loadURL(url.toString()); } diff --git a/Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml b/Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml new file mode 100644 index 000000000..d70976c4a --- /dev/null +++ b/Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml @@ -0,0 +1,55 @@ +import QtQuick 2.0 +import QtTest 1.0 +import QtWebKit 3.0 + +WebView { + id: webView + property variant lastUrl + property bool watchProgress: false + + onLoadProgressChanged: { + if (watchProgress && webView.loadProgress != 100) { + watchProgress = false + load('') + } + } + + SignalSpy { + id: spy + target: webView + signalName: "loadSucceeded" + } + + TestCase { + id: test + name: "WebViewLoadUrl" + function test_loadIgnoreEmptyUrl() { + compare(spy.count, 0) + var url = Qt.resolvedUrl("../common/test1.html") + + webView.load(url) + spy.wait() + compare(spy.count, 1) + compare(webView.url, url) + + lastUrl = webView.url + webView.load('') + wait(1000) + compare(spy.count, 1) + compare(webView.url, lastUrl) + + webView.load('about:blank') + spy.wait() + compare(spy.count, 2) + compare(webView.url, 'about:blank') + + // It shouldn't interrupt any ongoing load when an empty url is used. + watchProgress = true + webView.load(url) + spy.wait() + compare(spy.count, 3) + verify(!watchProgress) + compare(webView.url, url) + } + } +} diff --git a/Source/WebKit2/UIProcess/API/qt/tests/qmltests/qmltests.pro b/Source/WebKit2/UIProcess/API/qt/tests/qmltests/qmltests.pro index 7e449a224..c8ce87a7f 100644 --- a/Source/WebKit2/UIProcess/API/qt/tests/qmltests/qmltests.pro +++ b/Source/WebKit2/UIProcess/API/qt/tests/qmltests/qmltests.pro @@ -22,6 +22,7 @@ OTHER_FILES += \ WebView/tst_itemSelector.qml \ WebView/tst_javaScriptDialogs.qml \ WebView/tst_loadFail.qml \ + WebView/tst_loadIgnore.qml \ WebView/tst_loadHtml.qml \ WebView/tst_loadProgress.qml \ WebView/tst_loadProgressSignal.qml \ diff --git a/Source/sync.profile b/Source/sync.profile index 4a28fa610..6cbcef33b 100644 --- a/Source/sync.profile +++ b/Source/sync.profile @@ -15,4 +15,4 @@ %modulepris = ( "QtWebKit" => "$basedir/../Tools/qmake/mkspecs/modules/qt_webkit.pri", ); -@ignore_for_master_contents = ( "qwebscriptworld.h" ); +@ignore_for_master_contents = ( "qwebscriptworld.h", "testwindow.h", "util.h" ); -- cgit v1.2.1