Hello community, here is the log from the commit of package kwebkitpart for openSUSE:Factory checked in at Fri Oct 14 09:48:14 CEST 2011.
-------- --- openSUSE:Factory/kwebkitpart/kwebkitpart.changes 2011-09-23 02:07:31.000000000 +0200 +++ /mounts/work_src_done/STABLE/kwebkitpart/kwebkitpart.changes 2011-10-14 00:02:44.000000000 +0200 @@ -1,0 +2,32 @@ +Thu Oct 13 21:47:09 UTC 2011 - [email protected] + +- Update to 1.2.0 + * Features and changes + * Added a context menu for blocking/allowing iframe ads. + * Simplified and improved the ad blocking code based on the + changes in khtml. + * Added support for KIO put-ioslave-onhold functionality. + Requires KDE v4.7 and higher. + * Enabled WebGL support by default. Depends on the feature + being enabled in QtWebKit. + * Made the code that shows the status bar text when hovering + over a link more efficient. + * Made sure the URL shown on mouse over links is safe from + malicious URL spoofing attacks. + * Removed the "U" from the user-agent string sent to websites. + * Bugfixes + * Automatically close empty new windows created through a JS + call whenever the request is handled by external application. + (bko#171029) + * Make sure urls copied from links and HTML 5 media elements + are properly precent encoded. bko#255070. + * Workaround the percent encoding of URLs bug during drag and + drop in QtWebkit. bko#263788. + * Fixed memory leak when handling unsupportedContent signal + from QtWebKit. + * Fixed a crash that occurs when closing Konqueror while the + WebKit web inspector is shown. + * Fixed window.open events done through javascript. + * Fixed page reload requests. + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- kwebkitpart-1.1.0.60.git20110722.tar.bz2 New: ---- kwebkitpart-1.2.0git20111013.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kwebkitpart.spec ++++++ --- /var/tmp/diff_new_pack.Jv1mMh/_old 2011-10-14 09:48:10.000000000 +0200 +++ /var/tmp/diff_new_pack.Jv1mMh/_new 2011-10-14 09:48:10.000000000 +0200 @@ -25,16 +25,18 @@ License: LGPLv2.0+ ; LGPLv2.1+ Group: System/GUI/KDE Summary: KDE Webkit web browser component -Version: 1.1.0.60.git20110722 -Release: 3 +Url: https://projects.kde.org/projects/extragear/base/kwebkitpart +Version: 1.2.0git20111013 +Release: 1 Source: %name-%version.tar.bz2 Source1: %name-lang.tar.bz2 -Url: https://projects.kde.org/projects/extragear/base/kwebkitpart BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: libkdenetwork1 = 4.3.0.svn1001692-36.1 Obsoletes: libkdenetwork1 < 4.3.0.svn1001692-36.1 Provides: kde4-webkitpart = 4.3.90.svn1072556 Obsoletes: kde4-webkitpart < 4.3.90.svn1072556 +Obsoletes: kwebkitpart-devel < 1.2.0git20111013 +Provides: kwebkitpart-devel = 1.1.0 Recommends: kwebkitpart-lang %kde4_runtime_requires @@ -47,21 +49,6 @@ -------- The KDE Team <[email protected]> -%package devel -License: LGPLv2.0+ ; LGPLv2.1+ -Group: Development/Libraries/KDE -Summary: Development files for %{name} -Requires: kwebkitpart = %version -Provides: libkdenetwork-devel = 4.3.0.svn1001692-36.1 -Obsoletes: libkdenetwork-devel < 4.3.0.svn1001692-36.1 -Provides: kde4-webkitpart-devel = 4.3.90.svn1072556 -Obsoletes: kde4-webkitpart-devel < 4.3.90.svn1072556 - -%description devel -Development files and headers needed to build packages that -use %{name} - - %lang_package %prep %setup -q -n %name-%version @@ -96,10 +83,6 @@ %dir %{_kde4_iconsdir}/hicolor/* %dir %{_kde4_iconsdir}/hicolor/*/apps -%files devel -%defattr(-,root,root) -%{_kde4_appsdir}/cmake/modules/FindKWebKitPart.cmake - %files lang -f %name.lang %changelog ++++++ kwebkitpart-1.1.0.60.git20110722.tar.bz2 -> kwebkitpart-1.2.0git20111013.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwebkitpart-1.1.0.60.git20110722/CMakeLists.txt new/kwebkitpart-1.2.0git20111013/CMakeLists.txt --- old/kwebkitpart-1.1.0.60.git20110722/CMakeLists.txt 2011-07-22 11:57:56.000000000 +0200 +++ new/kwebkitpart-1.2.0git20111013/CMakeLists.txt 2011-10-13 23:22:58.000000000 +0200 @@ -1,13 +1,10 @@ project(kwebkitpart) # search packages used by KDE -find_package(KDE4 4.6.95 REQUIRED) +find_package(KDE4 4.5.69 REQUIRED) include(KDE4Defaults) include(MacroLibrary) -add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) - -add_subdirectory(cmake) add_subdirectory(icons) add_subdirectory(src) add_subdirectory(kdelauncher) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwebkitpart-1.1.0.60.git20110722/cmake/CMakeLists.txt new/kwebkitpart-1.2.0git20111013/cmake/CMakeLists.txt --- old/kwebkitpart-1.1.0.60.git20110722/cmake/CMakeLists.txt 2011-07-22 11:57:56.000000000 +0200 +++ new/kwebkitpart-1.2.0git20111013/cmake/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -add_subdirectory(modules) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwebkitpart-1.1.0.60.git20110722/cmake/modules/CMakeLists.txt new/kwebkitpart-1.2.0git20111013/cmake/modules/CMakeLists.txt --- old/kwebkitpart-1.1.0.60.git20110722/cmake/modules/CMakeLists.txt 2011-07-22 11:57:56.000000000 +0200 +++ new/kwebkitpart-1.2.0git20111013/cmake/modules/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +0,0 @@ -file(GLOB cmakeFiles "${CMAKE_CURRENT_SOURCE_DIR}/*.cmake") - -set(module_install_dir ${DATA_INSTALL_DIR}/cmake/modules) - -install(FILES ${cmakeFiles} DESTINATION ${module_install_dir}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwebkitpart-1.1.0.60.git20110722/cmake/modules/FindKWebKitPart.cmake new/kwebkitpart-1.2.0git20111013/cmake/modules/FindKWebKitPart.cmake --- old/kwebkitpart-1.1.0.60.git20110722/cmake/modules/FindKWebKitPart.cmake 2011-07-22 11:57:56.000000000 +0200 +++ new/kwebkitpart-1.2.0git20111013/cmake/modules/FindKWebKitPart.cmake 1970-01-01 01:00:00.000000000 +0100 @@ -1,37 +0,0 @@ -# - Try to find KWebKitPart -# Once done this will define -# -# KWEBKITPART_FOUND - system has KWebKitPart -# KWEBKITPART_INCLUDE_DIR - the KWebKitPart include directory -# KWEBKITPART_LIBRARIES - Link these to use KWebKitPart -# KWEBKITPART_DEFINITIONS - Compiler switches required for using KWebKitPart -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -include(MacroOptionalDependPackage) -if ( KWEBKITPART_INCLUDE_DIR AND KWEBKITPART_LIBRARIES ) - # in cache already - SET(KWebKitPart_FIND_QUIETLY TRUE) -endif ( KWEBKITPART_INCLUDE_DIR AND KWEBKITPART_LIBRARIES ) - -# Little trick I found in FindKDE4Interal... If we're building KWebKitPart, set the variables to point to the build directory. -if(kwebkitpart_SOURCE_DIR) - set(KWEBKITPART_LIBRARIES kwebkit) - set(KWEBKITPART_INCLUDE_DIR ${CMAKE_SOURCE_DIR}) -endif(kwebkitpart_SOURCE_DIR) - -FIND_PATH(KWEBKITPART_INCLUDE_DIR NAMES kwebkitpart.h - PATHS - ${KDE4_INCLUDE_INSTALL_DIR} -) - -FIND_LIBRARY(KWEBKITPART_LIBRARIES NAMES kwebkit - PATHS - ${KDE4_LIB_INSTALL_DIR} -) - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(KWebKitPart DEFAULT_MSG KWEBKITPART_INCLUDE_DIR KWEBKITPART_LIBRARIES ) - -# show the KWEBKITPART_INCLUDE_DIR and KWEBKITPART_LIBRARIES variables only in the advanced view -MARK_AS_ADVANCED(KWEBKITPART_INCLUDE_DIR KWEBKITPART_LIBRARIES) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwebkitpart-1.1.0.60.git20110722/kdelauncher/main.cpp new/kwebkitpart-1.2.0git20111013/kdelauncher/main.cpp --- old/kwebkitpart-1.1.0.60.git20110722/kdelauncher/main.cpp 2011-07-22 11:57:56.000000000 +0200 +++ new/kwebkitpart-1.2.0git20111013/kdelauncher/main.cpp 2011-10-13 23:22:58.000000000 +0200 @@ -78,10 +78,10 @@ connect(view, SIGNAL(loadFinished(bool)), this, SLOT(loadFinished())); - connect(view, SIGNAL(titleChanged(const QString&)), - this, SLOT(setWindowTitle(const QString&))); - connect(view->page(), SIGNAL(linkHovered(const QString&, const QString&, const QString &)), - this, SLOT(showLinkHover(const QString&, const QString&))); + connect(view, SIGNAL(titleChanged(QString)), + this, SLOT(setWindowTitle(QString))); + connect(view->page(), SIGNAL(linkHovered(QString, QString, QString)), + this, SLOT(showLinkHover(QString, QString))); connect(view->page(), SIGNAL(windowCloseRequested()), this, SLOT(deleteLater())); setupUI(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwebkitpart-1.1.0.60.git20110722/src/CMakeLists.txt new/kwebkitpart-1.2.0git20111013/src/CMakeLists.txt --- old/kwebkitpart-1.1.0.60.git20110722/src/CMakeLists.txt 2011-07-22 11:57:56.000000000 +0200 +++ new/kwebkitpart-1.2.0git20111013/src/CMakeLists.txt 2011-10-13 23:22:58.000000000 +0200 @@ -18,6 +18,7 @@ kde4_add_ui_files(kwebkit_LIB_SRCS ui/searchbar.ui + ui/passwordbar.ui ) ########################### kwebkitpart ############################# diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwebkitpart-1.1.0.60.git20110722/src/kwebkitpart.cpp new/kwebkitpart-1.2.0git20111013/src/kwebkitpart.cpp --- old/kwebkitpart-1.1.0.60.git20110722/src/kwebkitpart.cpp 2011-07-22 11:57:56.000000000 +0200 +++ new/kwebkitpart-1.2.0git20111013/src/kwebkitpart.cpp 2011-10-13 23:22:58.000000000 +0200 @@ -53,7 +53,6 @@ #include <KDE/KAcceleratorManager> #include <KDE/KStatusBar> #include <KDE/KFileItem> -#include <KDE/KMessageWidget> #include <KParts/StatusBarExtension> #include <QtCore/QUrl> @@ -90,8 +89,7 @@ m_emitOpenUrlNotify(true), m_pageRestored(false), m_hasCachedFormData(false), - m_statusBarWalletLabel(0), - m_passwordBar(0) + m_statusBarWalletLabel(0) { KAboutData about = KAboutData("kwebkitpart", 0, ki18nc("Program Name", "KWebKitPart"), @@ -142,22 +140,25 @@ new KWebKitTextExtension(this); new KWebKitHtmlExtension(this); + // Create and setup the password bar... + m_passwordBar = new KDEPrivate::PasswordBar(mainWidget); + // Create the search bar... m_searchBar = new KDEPrivate::SearchBar(mainWidget); - connect(m_searchBar, SIGNAL(searchTextChanged(const QString &, bool)), - this, SLOT(slotSearchForText(const QString &, bool))); + connect(m_searchBar, SIGNAL(searchTextChanged(QString, bool)), + this, SLOT(slotSearchForText(QString, bool))); // Connect the signals/slots from the webview... - connect(m_webView, SIGNAL(titleChanged(const QString &)), - this, SIGNAL(setWindowCaption(const QString &))); + connect(m_webView, SIGNAL(titleChanged(QString)), + this, SIGNAL(setWindowCaption(QString))); connect(m_webView, SIGNAL(loadFinished(bool)), this, SLOT(slotLoadFinished(bool))); - connect(m_webView, SIGNAL(urlChanged(const QUrl &)), - this, SLOT(slotUrlChanged(const QUrl &))); - connect(m_webView, SIGNAL(linkMiddleOrCtrlClicked(const KUrl &)), - this, SLOT(slotLinkMiddleOrCtrlClicked(const KUrl &))); - connect(m_webView, SIGNAL(selectionClipboardUrlPasted(const KUrl &, const QString &)), - this, SLOT(slotSelectionClipboardUrlPasted(const KUrl &, const QString &))); + connect(m_webView, SIGNAL(urlChanged(QUrl)), + this, SLOT(slotUrlChanged(QUrl))); + connect(m_webView, SIGNAL(linkMiddleOrCtrlClicked(KUrl)), + this, SLOT(slotLinkMiddleOrCtrlClicked(KUrl))); + connect(m_webView, SIGNAL(selectionClipboardUrlPasted(KUrl, QString)), + this, SLOT(slotSelectionClipboardUrlPasted(KUrl, QString))); // Connect the signals from the page... connectWebPageSignals(page()); @@ -166,6 +167,7 @@ QVBoxLayout* lay = new QVBoxLayout(mainWidget); lay->setMargin(0); lay->setSpacing(0); + lay->addWidget(m_passwordBar); lay->addWidget(m_webView); lay->addWidget(m_searchBar); @@ -183,7 +185,6 @@ KWebKitPart::~KWebKitPart() { - m_browserExtension->saveHistoryState(); } @@ -265,16 +266,16 @@ connect(page, SIGNAL(loadStarted()), this, SLOT(slotLoadStarted())); - connect(page, SIGNAL(loadAborted(const KUrl &)), - this, SLOT(slotLoadAborted(const KUrl &))); - connect(page, SIGNAL(linkHovered(const QString &, const QString &, const QString &)), - this, SLOT(slotLinkHovered(const QString &, const QString &, const QString &))); + connect(page, SIGNAL(loadAborted(KUrl)), + this, SLOT(slotLoadAborted(KUrl))); + connect(page, SIGNAL(linkHovered(QString, QString, QString)), + this, SLOT(slotLinkHovered(QString, QString, QString))); connect(page, SIGNAL(saveFrameStateRequested(QWebFrame *, QWebHistoryItem *)), this, SLOT(slotSaveFrameState(QWebFrame *, QWebHistoryItem *))); connect(page, SIGNAL(restoreFrameStateRequested(QWebFrame *)), this, SLOT(slotRestoreFrameState(QWebFrame *))); - connect(page, SIGNAL(statusBarMessage(const QString&)), - this, SLOT(slotSetStatusBarText(const QString &))); + connect(page, SIGNAL(statusBarMessage(QString)), + this, SLOT(slotSetStatusBarText(QString))); connect(page, SIGNAL(windowCloseRequested()), this, SLOT(slotWindowCloseRequested())); connect(page, SIGNAL(printRequested(QWebFrame*)), @@ -283,20 +284,24 @@ connect(page, SIGNAL(loadStarted()), m_searchBar, SLOT(clear())); connect(page, SIGNAL(loadStarted()), m_searchBar, SLOT(hide())); - connect(m_webView, SIGNAL(linkShiftClicked(const KUrl &)), - page, SLOT(downloadUrl(const KUrl &))); + connect(m_webView, SIGNAL(linkShiftClicked(KUrl)), + page, SLOT(downloadUrl(KUrl))); connect(page, SIGNAL(loadProgress(int)), m_browserExtension, SIGNAL(loadingProgress(int))); connect(page, SIGNAL(selectionChanged()), m_browserExtension, SLOT(updateEditActions())); - connect(m_browserExtension, SIGNAL(saveUrl(const KUrl&)), - page, SLOT(downloadUrl(const KUrl &))); + connect(m_browserExtension, SIGNAL(saveUrl(KUrl)), + page, SLOT(downloadUrl(KUrl))); KWebWallet *wallet = page->wallet(); if (wallet) { - connect(wallet, SIGNAL(saveFormDataRequested(QString,QUrl)), - this, SLOT(slotSaveFormDataRequested(QString,QUrl))); + connect(wallet, SIGNAL(saveFormDataRequested(QString, QUrl)), + m_passwordBar, SLOT(onSaveFormData(QString, QUrl))); + connect(m_passwordBar, SIGNAL(saveFormDataAccepted(QString)), + wallet, SLOT(acceptSaveFormDataRequest(QString))); + connect(m_passwordBar, SIGNAL(saveFormDataRejected(QString)), + wallet, SLOT(rejectSaveFormDataRequest(QString))); connect(wallet, SIGNAL(walletClosed()), this, SLOT(slotWalletClosed())); } } @@ -852,52 +857,3 @@ frame, SLOT(print(QPrinter *))); dlg.exec(); } - -void KWebKitPart::slotSaveFormDataRequested (const QString& key, const QUrl& url) -{ - if (WebKitSettings::self()->isNonPasswordStorableSite(url.host())) - return; - - if (m_passwordBar && m_passwordBar->isVisible()) - return; - - if (!m_passwordBar) { - m_passwordBar = new KDEPrivate::PasswordBar(widget()); - KWebWallet* wallet = page()->wallet(); - if (!wallet) { - kWarning() << "No wallet instance found! This should never happen!"; - return; - } - connect(m_passwordBar, SIGNAL(saveFormDataAccepted(QString)), - wallet, SLOT(acceptSaveFormDataRequest(QString))); - connect(m_passwordBar, SIGNAL(saveFormDataRejected(QString)), - wallet, SLOT(rejectSaveFormDataRequest(QString))); - connect(m_passwordBar, SIGNAL(done()), - wallet, SLOT(slotSaveFormDataDone())); - } - - Q_ASSERT(m_passwordBar); - - m_passwordBar->setUrl(url); - m_passwordBar->setRequestKey(key); - m_passwordBar->setText(i18n("<html>Do you want %1 to remember the login " - "information for <b>%2</b>?</html>", - QCoreApplication::applicationName(), - url.host())); - - QVBoxLayout* lay = qobject_cast<QVBoxLayout*>(widget()->layout()); - if (lay) - lay->insertWidget(0, m_passwordBar); - - m_passwordBar->animatedShow(); -} - -void KWebKitPart::slotSaveFormDataDone() -{ - if (!m_passwordBar) - return; - - QVBoxLayout* lay = qobject_cast<QVBoxLayout*>(widget()->layout()); - if (lay) - lay->removeWidget(m_passwordBar); -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwebkitpart-1.1.0.60.git20110722/src/kwebkitpart.desktop new/kwebkitpart-1.2.0git20111013/src/kwebkitpart.desktop --- old/kwebkitpart-1.1.0.60.git20110722/src/kwebkitpart.desktop 2011-07-22 11:57:56.000000000 +0200 +++ new/kwebkitpart-1.2.0git20111013/src/kwebkitpart.desktop 2011-10-13 23:27:38.000000000 +0200 @@ -3,13 +3,11 @@ Comment=Embeddable HTML component Comment[ast]=Componente HTML empotrable Comment[bg]=Компонент HTML за вграждане -Comment[bs]=Ugradiva HTML komponenta Comment[ca]=Component HTML encastable Comment[ca@valencia]=Component HTML encastable Comment[cs]=Zapouzdřitelná HTML komponenta Comment[da]=HTML-komponent som kan indlejres Comment[de]=Einbettungsfähige HTML-Komponente -Comment[el]=Συστατικό HTML με δυνατότητα ενσωμάτωσης Comment[en_GB]=Embeddable HTML component Comment[es]=Componente HTML empotrable Comment[et]=Põimitav HTML-komponent @@ -19,7 +17,7 @@ Comment[ga]=Comhpháirt Inleabaithe HTML Comment[hu]=Beágyazható HTML-komponens Comment[it]=Componente HTML integrabile -Comment[km]=សមាសធាតុ HTML ដែលបានបង្កប់ +Comment[km]=សមាសធាតុ HTML ដែលអាចបង្កប់បាន Comment[lt]=Įdedamas HTML komponentas Comment[mai]=एम्बेडेड एचटीएमएल अवयव Comment[ml]=തുന്നിച്ചേര്ക്കാവുന്ന എച്ച്ടിഎംഎല് ഘടകം @@ -34,7 +32,6 @@ Comment[ro]=Componentă HTML încorporabilă Comment[ru]=Встраиваемый компонент HTML Comment[sk]=Vložiteľný HTML komponent -Comment[sl]=Vgradljiv sestavni del HTML Comment[sr]=Угнездива ХТМЛ компонента Comment[sr@ijekavian]=Угњездива ХТМЛ компонента Comment[sr@ijekavianlatin]=Ugnjezdiva HTML komponenta @@ -57,7 +54,6 @@ Name[cs]=WebKit Name[da]=WebKit Name[de]=WebKit -Name[el]=WebKit Name[en_GB]=WebKit Name[es]=WebKit Name[et]=WebKit @@ -81,7 +77,6 @@ Name[ro]=WebKit Name[ru]=WebKit Name[sk]=WebKit -Name[sl]=WebKit Name[sr]=Вебкит Name[sr@ijekavian]=Вебкит Name[sr@ijekavianlatin]=WebKit @@ -97,4 +92,4 @@ X-KDE-Default-UserAgent=Mozilla/5.0 (%PLATFORM%; %SECURITY%; %OSNAME% %OSVERSION% %SYSTYPE%; %LANGUAGE%) AppleWebKit/533.3 (KHTML, like Gecko) %APPVERSION% Safari/533.3 X-KDE-ServiceTypes=KParts/ReadOnlyPart,Browser/View X-KDE-Library=kwebkitpart -InitialPreference=9 +InitialPreference=11 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwebkitpart-1.1.0.60.git20110722/src/kwebkitpart.h new/kwebkitpart-1.2.0git20111013/src/kwebkitpart.h --- old/kwebkitpart-1.1.0.60.git20110722/src/kwebkitpart.h 2011-07-22 11:57:56.000000000 +0200 +++ new/kwebkitpart-1.2.0git20111013/src/kwebkitpart.h 2011-10-13 23:22:58.000000000 +0200 @@ -136,8 +136,6 @@ void slotSetStatusBarText(const QString& text); void slotWindowCloseRequested(); void slotPrintRequested(QWebFrame*); - void slotSaveFormDataRequested(const QString &, const QUrl &); - void slotSaveFormDataDone(); private: WebPage* page(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwebkitpart-1.1.0.60.git20110722/src/kwebkitpart_ext.cpp new/kwebkitpart-1.2.0git20111013/src/kwebkitpart_ext.cpp --- old/kwebkitpart-1.1.0.60.git20110722/src/kwebkitpart_ext.cpp 2011-07-22 11:57:56.000000000 +0200 +++ new/kwebkitpart-1.2.0git20111013/src/kwebkitpart_ext.cpp 2011-10-13 23:22:58.000000000 +0200 @@ -60,7 +60,7 @@ WebKitBrowserExtension::WebKitBrowserExtension(KWebKitPart *parent, const QString &historyFileName) :KParts::BrowserExtension(parent), m_part(QWeakPointer<KWebKitPart>(parent)), - m_historyFileName(historyFileName) + m_historyContentSaver(new KSaveFile (historyFileName)) { enableAction("cut", false); enableAction("copy", false); @@ -70,6 +70,10 @@ WebKitBrowserExtension::~WebKitBrowserExtension() { + if (!m_historyContentSaver->finalize()) { + kWarning() << "Failed to save session history to" << m_historyContentSaver->fileName(); + } + delete m_historyContentSaver; } WebView* WebKitBrowserExtension::view() @@ -83,26 +87,6 @@ return m_view.data(); } -void WebKitBrowserExtension::saveHistoryState() -{ - if (!view()) - return; - - if (!view()->page()->history()->count()) - return; - - KSaveFile saveFile (m_historyFileName, m_part.data()->componentData()); - if (!saveFile.open()) - return; - - //kDebug() << "Saving history data to" << saveFile.fileName(); - QDataStream stream (&saveFile); - stream << *(view()->page()->history()); - if (!saveFile.finalize()) - kWarning() << "Failed to save session history to" << saveFile.fileName(); - -} - int WebKitBrowserExtension::xOffset() { if (view()) @@ -125,7 +109,12 @@ << static_cast<qint32>(xOffset()) << static_cast<qint32>(yOffset()) << static_cast<qint32>(view()->page()->history()->currentItemIndex()) - << m_historyFileName; + << m_historyContentSaver->fileName(); + + if (m_historyContentSaver->isOpen() || m_historyContentSaver->open()) { + QDataStream stream (m_historyContentSaver); + stream << *(view()->page()->history()); + } } void WebKitBrowserExtension::restoreState(QDataStream &stream) @@ -134,10 +123,7 @@ KParts::OpenUrlArguments args; qint32 xOfs, yOfs, historyItemIndex; - QWebHistory* history = view() ? view()->page()->history() : 0; - //kDebug() << "# of items in history:" << (history ? history->count() : 0); - - if (history && history->count() > 0) { + if (view() && view()->page()->history()->count() > 0) { stream >> u >> xOfs >> yOfs >> historyItemIndex; } else { QString historyFileName; @@ -146,7 +132,7 @@ QFile file (historyFileName); if (file.open(QIODevice::ReadOnly)) { QDataStream stream (&file); - stream >> *history; + stream >> *(view()->page()->history()); } if (file.exists()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwebkitpart-1.1.0.60.git20110722/src/kwebkitpart_ext.h new/kwebkitpart-1.2.0git20111013/src/kwebkitpart_ext.h --- old/kwebkitpart-1.1.0.60.git20110722/src/kwebkitpart_ext.h 2011-07-22 11:57:56.000000000 +0200 +++ new/kwebkitpart-1.2.0git20111013/src/kwebkitpart_ext.h 2011-10-13 23:22:58.000000000 +0200 @@ -30,6 +30,7 @@ class KUrl; class KWebKitPart; class WebView; +class KSaveFile; class WebKitBrowserExtension : public KParts::BrowserExtension { @@ -40,7 +41,6 @@ const QString& historyFileName); ~WebKitBrowserExtension(); - void saveHistoryState(); virtual int xOffset(); virtual int yOffset(); virtual void saveState(QDataStream &); @@ -99,7 +99,7 @@ WebView* view(); QWeakPointer<KWebKitPart> m_part; QWeakPointer<WebView> m_view; - QString m_historyFileName; + KSaveFile* m_historyContentSaver; }; /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwebkitpart-1.1.0.60.git20110722/src/kwebkitpartfactory.cpp new/kwebkitpart-1.2.0git20111013/src/kwebkitpartfactory.cpp --- old/kwebkitpart-1.1.0.60.git20110722/src/kwebkitpartfactory.cpp 2011-07-22 11:57:56.000000000 +0200 +++ new/kwebkitpart-1.2.0git20111013/src/kwebkitpartfactory.cpp 2011-10-13 23:22:58.000000000 +0200 @@ -26,7 +26,7 @@ #include <KDE/KApplication> #include <KDE/KStandardDirs> #include <KDE/KTemporaryFile> -#include <KDE/KDebug> +#include <KDE/KParts/GenericFactory> #include <QtGui/QWidget> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwebkitpart-1.1.0.60.git20110722/src/settings/webkitsettings.cpp new/kwebkitpart-1.2.0git20111013/src/settings/webkitsettings.cpp --- old/kwebkitpart-1.1.0.60.git20110722/src/settings/webkitsettings.cpp 2011-07-22 11:57:56.000000000 +0200 +++ new/kwebkitpart-1.2.0git20111013/src/settings/webkitsettings.cpp 2011-10-13 23:22:58.000000000 +0200 @@ -373,8 +373,10 @@ if (cssCg.exists() && cssCg.readEntry("Use", QString()) == QLatin1String("user")) QWebSettings::globalSettings()->setUserStyleSheetUrl(QUrl(cssCg.readEntry("SheetName", QString()))); - delete d->nonPasswordStorableSites; - d->nonPasswordStorableSites = 0; + if (d->nonPasswordStorableSites) { + delete d->nonPasswordStorableSites; + d->nonPasswordStorableSites = 0; + } } void WebKitSettings::init( KConfig * config, bool reset ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwebkitpart-1.1.0.60.git20110722/src/ui/passwordbar.cpp new/kwebkitpart-1.2.0git20111013/src/ui/passwordbar.cpp --- old/kwebkitpart-1.1.0.60.git20110722/src/ui/passwordbar.cpp 2011-07-22 11:57:56.000000000 +0200 +++ new/kwebkitpart-1.2.0git20111013/src/ui/passwordbar.cpp 2011-10-13 23:22:58.000000000 +0200 @@ -20,6 +20,7 @@ */ #include "passwordbar.h" +#include "ui_passwordbar.h" #include "settings/webkitsettings.h" @@ -28,81 +29,86 @@ #include <KDE/KColorScheme> #include <KDE/KLocalizedString> +#include <QtCore/QUrl> #include <QtCore/QCoreApplication> -#include <QtGui/QAction> #include <QtGui/QPalette> namespace KDEPrivate { -PasswordBar::PasswordBar(QWidget *parent) - :KMessageWidget(parent) +class PasswordBar::PasswordBarPrivate { - setCloseButtonVisible(false); - setMessageType(KMessageWidget::Information); +public: + PasswordBarPrivate() {} - QAction* action = new QAction(i18nc("@action:remember password", "&Remember"), this); - connect(action, SIGNAL(triggered()), this, SLOT(onRememberButtonClicked())); - addAction(action); - - action = new QAction(i18nc("@action:never for this site", "Ne&ver for this site"), this); - connect(action, SIGNAL(triggered()), this, SLOT(onNeverButtonClicked())); - addAction(action); - - action = new QAction(i18nc("@action:not now", "N&ot now"), this); - connect(action, SIGNAL(triggered()), this, SLOT(onNotNowButtonClicked())); - addAction(action); -} + void init (PasswordBar* passwordBar) + { + ui.setupUi(passwordBar); + ui.notNowButton->setIcon(KIcon("dialog-close")); + + QPalette pal = passwordBar->palette(); + KColorScheme::adjustBackground(pal, KColorScheme::ActiveBackground); + passwordBar->setPalette(pal); + passwordBar->setBackgroundRole(QPalette::Base); + passwordBar->setAutoFillBackground(true); + + connect(ui.notNowButton, SIGNAL(clicked()), + passwordBar, SLOT(onNotNowButtonClicked())); + connect(ui.neverButton, SIGNAL(clicked()), + passwordBar, SLOT(onNeverButtonClicked())); + connect(ui.rememberButton, SIGNAL(clicked()), + passwordBar, SLOT(onRememberButtonClicked())); + } + + Ui::PasswordBar ui; + QString requestKey; + QUrl url; +}; -PasswordBar::~PasswordBar() +PasswordBar::PasswordBar(QWidget *parent) + :QWidget(parent), d(new PasswordBarPrivate) { -} + d->init(this); -QUrl PasswordBar::url() const -{ - return m_url; + // Hide the widget by default + setVisible(false); } -QString PasswordBar::requestKey() const -{ - return m_requestKey; -} - -void PasswordBar::setUrl (const QUrl& url) +PasswordBar::~PasswordBar() { - m_url = url; + delete d; } -void PasswordBar::setRequestKey (const QString& key) +void PasswordBar::onSaveFormData(const QString &key, const QUrl &url) { - m_requestKey = key; + d->url = url; + d->requestKey = key; + d->ui.infoLabel->setText(i18n("<html>Do you want %1 to remember the login " + "information for <b>%2</b>?</html>", + QCoreApplication::applicationName(), + url.host())); + + if (WebKitSettings::self()->isNonPasswordStorableSite(url.host())) + onNotNowButtonClicked(); + else + show(); } void PasswordBar::onNotNowButtonClicked() { - animatedHide(); - emit saveFormDataRejected (m_requestKey); - emit done(); - clear(); + hide(); + emit saveFormDataRejected (d->requestKey); } void PasswordBar::onNeverButtonClicked() { - WebKitSettings::self()->addNonPasswordStorableSite(m_url.host()); + WebKitSettings::self()->addNonPasswordStorableSite(d->url.host()); onNotNowButtonClicked(); } void PasswordBar::onRememberButtonClicked() { - animatedHide(); - emit saveFormDataAccepted(m_requestKey); - emit done(); - clear(); -} - -void PasswordBar::clear() -{ - m_requestKey.clear(); - m_url.clear(); + hide(); + emit saveFormDataAccepted(d->requestKey); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwebkitpart-1.1.0.60.git20110722/src/ui/passwordbar.h new/kwebkitpart-1.2.0git20111013/src/ui/passwordbar.h --- old/kwebkitpart-1.1.0.60.git20110722/src/ui/passwordbar.h 2011-07-22 11:57:56.000000000 +0200 +++ new/kwebkitpart-1.2.0git20111013/src/ui/passwordbar.h 2011-10-13 23:22:58.000000000 +0200 @@ -22,29 +22,26 @@ #ifndef PASSWORDBAR_H #define PASSWORDBAR_H -#include <KDE/KMessageWidget> +#include <QtGui/QWidget> -#include <QtCore/QUrl> +class QUrl; namespace KDEPrivate { -class PasswordBar : public KMessageWidget +class PasswordBar : public QWidget { Q_OBJECT + public: - explicit PasswordBar(QWidget *parent = 0); + PasswordBar(QWidget *parent = 0); ~PasswordBar(); - QUrl url() const; - QString requestKey() const; - - void setUrl(const QUrl&); - void setRequestKey(const QString&); - Q_SIGNALS: void saveFormDataRejected(const QString &key); void saveFormDataAccepted(const QString &key); - void done(); + +public Q_SLOTS: + void onSaveFormData(const QString &key, const QUrl &url); private Q_SLOTS: void onNotNowButtonClicked(); @@ -52,10 +49,8 @@ void onRememberButtonClicked(); private: - void clear(); - - QUrl m_url; - QString m_requestKey; + class PasswordBarPrivate; + PasswordBarPrivate * const d; }; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwebkitpart-1.1.0.60.git20110722/src/ui/passwordbar.ui new/kwebkitpart-1.2.0git20111013/src/ui/passwordbar.ui --- old/kwebkitpart-1.1.0.60.git20110722/src/ui/passwordbar.ui 1970-01-01 01:00:00.000000000 +0100 +++ new/kwebkitpart-1.2.0git20111013/src/ui/passwordbar.ui 2011-10-13 23:22:58.000000000 +0200 @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>PasswordBar</class> + <widget class="QWidget" name="PasswordBar"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>630</width> + <height>35</height> + </rect> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QLabel" name="infoLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Do you want to store this password?</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>51</width> + <height>27</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QToolButton" name="rememberButton"> + <property name="text"> + <string>&Remember</string> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="neverButton"> + <property name="text"> + <string>Ne&ver for this site</string> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="notNowButton"> + <property name="text"> + <string>&Not Now</string> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwebkitpart-1.1.0.60.git20110722/src/ui/searchbar.cpp new/kwebkitpart-1.2.0git20111013/src/ui/searchbar.cpp --- old/kwebkitpart-1.1.0.60.git20110722/src/ui/searchbar.cpp 2011-07-22 11:57:56.000000000 +0200 +++ new/kwebkitpart-1.2.0git20111013/src/ui/searchbar.cpp 2011-10-13 23:22:57.000000000 +0200 @@ -72,8 +72,8 @@ searchBar, SLOT(findPrevious())); connect(ui.searchLineEdit, SIGNAL(returnPressed()), searchBar, SLOT(findNext())); - connect(ui.searchLineEdit, SIGNAL(textChanged(const QString&)), - searchBar, SLOT(textChanged(const QString&))); + connect(ui.searchLineEdit, SIGNAL(textChanged(QString)), + searchBar, SLOT(textChanged(QString))); // Update the state of the searchAsYouType option searchBar->searchAsYouTypeChanged (ui.actionSearchAutomatically->isChecked()); @@ -180,11 +180,11 @@ void SearchBar::searchAsYouTypeChanged(bool checked) { if (checked) { - connect(d->ui.searchLineEdit, SIGNAL(textEdited(const QString&)), - this, SIGNAL(searchTextChanged(const QString&))); + connect(d->ui.searchLineEdit, SIGNAL(textEdited(QString)), + this, SIGNAL(searchTextChanged(QString))); } else { - disconnect(d->ui.searchLineEdit, SIGNAL(textEdited(const QString&)), - this, SIGNAL(searchTextChanged(const QString&))); + disconnect(d->ui.searchLineEdit, SIGNAL(textEdited(QString)), + this, SIGNAL(searchTextChanged(QString))); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwebkitpart-1.1.0.60.git20110722/src/webpage.cpp new/kwebkitpart-1.2.0git20111013/src/webpage.cpp --- old/kwebkitpart-1.1.0.60.git20110722/src/webpage.cpp 2011-07-22 11:57:56.000000000 +0200 +++ new/kwebkitpart-1.2.0git20111013/src/webpage.cpp 2011-10-13 23:22:58.000000000 +0200 @@ -116,13 +116,13 @@ // TODO: Determine how a per page style sheets settings interacts with a // global one. Is it an intersection of the two or a complete override ? if (!QWebSettings::globalSettings()->userStyleSheetUrl().isValid()) - settings()->setUserStyleSheetUrl(QString(QL1S("data:text/css;charset=utf-8;base64,") + + settings()->setUserStyleSheetUrl((QL1S("data:text/css;charset=utf-8;base64,") + WebKitSettings::self()->settingsToCSS().toUtf8().toBase64())); - connect(this, SIGNAL(geometryChangeRequested(const QRect &)), - this, SLOT(slotGeometryChangeRequested(const QRect &))); - connect(this, SIGNAL(downloadRequested(const QNetworkRequest &)), - this, SLOT(downloadRequest(const QNetworkRequest &))); + connect(this, SIGNAL(geometryChangeRequested(QRect)), + this, SLOT(slotGeometryChangeRequested(QRect))); + connect(this, SIGNAL(downloadRequested(QNetworkRequest)), + this, SLOT(downloadRequest(QNetworkRequest))); connect(this, SIGNAL(unsupportedContent(QNetworkReply *)), this, SLOT(slotUnsupportedContent(QNetworkReply*))); connect(networkAccessManager(), SIGNAL(finished(QNetworkReply *)), @@ -555,6 +555,10 @@ KIO::AccessManager::putReplyOnHold(reply); if (KWebPage::handleReply(reply, &mimeType, &metaData)) { reply->deleteLater(); + if (qobject_cast<NewWindowPage*>(this) && m_part.data()->url().url() == QL1S("about:blank")) { + m_part.data()->closeUrl(); + delete m_part.data(); + } return; } #else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwebkitpart-1.1.0.60.git20110722/src/webview.cpp new/kwebkitpart-1.2.0git20111013/src/webview.cpp --- old/kwebkitpart-1.1.0.60.git20110722/src/webview.cpp 2011-07-22 11:57:56.000000000 +0200 +++ new/kwebkitpart-1.2.0git20111013/src/webview.cpp 2011-10-13 23:22:58.000000000 +0200 @@ -29,6 +29,7 @@ #include "settings/webkitsettings.h" #include <kio/global.h> +#include <KDE/KParts/GenericFactory> #include <KDE/KAboutData> #include <KDE/KAction> #include <KDE/KActionCollection> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwebkitpart-1.1.0.60.git20110722/tests/embed_tag_test.html new/kwebkitpart-1.2.0git20111013/tests/embed_tag_test.html --- old/kwebkitpart-1.1.0.60.git20110722/tests/embed_tag_test.html 2011-07-22 11:57:56.000000000 +0200 +++ new/kwebkitpart-1.2.0git20111013/tests/embed_tag_test.html 2011-10-13 23:22:57.000000000 +0200 @@ -3,14 +3,14 @@ <title> <EMBED> tests</title> </head> <body> - <h1>2009</h1> + <h1>KDE e.V. Report 2011 Q2</h1> <center> - <embed src="http://ev.kde.org/reports/ev-quarterly-2009Q1.pdf" width="75%" height="400"/> + <embed type="application/pdf" src="http://ev.kde.org/reports/ev-quarterly-2011_Q2.pdf" width="75%" height="400"/> </center> <p/> - <h1>2008</h1> + <h1>KDE e.V. Report 2011 Q1</h1> <center> - <embed src="http://ev.kde.org/reports/ev-quarterly-2008Q3-Q4.pdf" width="75%" height="400"/> + <embed type="application/pdf" src="http://ev.kde.org/reports/ev-quarterly-2011_Q1.pdf" width="75%" height="400"/> </center> <p/> <center> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwebkitpart-1.1.0.60.git20110722/tests/link_tests.html new/kwebkitpart-1.2.0git20111013/tests/link_tests.html --- old/kwebkitpart-1.1.0.60.git20110722/tests/link_tests.html 2011-07-22 11:57:56.000000000 +0200 +++ new/kwebkitpart-1.2.0git20111013/tests/link_tests.html 2011-10-13 23:22:58.000000000 +0200 @@ -26,8 +26,12 @@ <br/> <a href="http://ev.kde.org/reports/ev-quarterly-2009Q1.pdf">PDF link</a> <br/> + <a href="http://ev.kde.org/reports/ev-quarterly-2009Q1.pdf" target="_blank">PDF link (new window)</a> + <br/> <a href="http://blip.tv/file/get/Sebasje-WindowManagingFeaturesInKDEPlasma44222.ogg">Movie link</a> <br/> + <a href="http://blip.tv/file/get/Sebasje-WindowManagingFeaturesInKDEPlasma44222.ogg" targe="_blank">Movie link (new window)</a> + <br/> <a href="http://www.ietf.org/rfc/rfc2344.txt">Text Document Link</a> <br/> <a href="http://www.microsoft.com%26item%3dq209354rexsddiuyjkiuylkuryt2583453453fsesfsdfsfasfdf...@www.kde.org/">Bogus link</a> continue with "q"... Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
