Hello community, here is the log from the commit of package kde4-webkitpart for openSUSE:Factory checked in at Fri May 15 23:52:33 CEST 2009. -------- --- KDE/kde4-webkitpart/kde4-webkitpart.changes 2009-04-23 21:57:12.000000000 +0200 +++ kde4-webkitpart/kde4-webkitpart.changes 2009-05-13 09:04:29.000000000 +0200 @@ -1,0 +2,8 @@ +Wed May 13 08:57:29 CEST 2009 - beineri@opensuse.org + +- update to SVN 967285 + * prevent crash when part is null + * improve zoom actions behavior + * performace optimization: create page when it is needed only + +------------------------------------------------------------------- calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kde4-webkitpart.spec ++++++ --- /var/tmp/diff_new_pack.p21051/_old 2009-05-15 23:51:03.000000000 +0200 +++ /var/tmp/diff_new_pack.p21051/_new 2009-05-15 23:51:03.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package kde4-webkitpart (Version 4.2.2.svn958332) +# spec file for package kde4-webkitpart (Version 4.2.3.svn967285) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -23,7 +23,7 @@ License: LGPL v2.0 or later; LGPL v2.1 or later Group: System/GUI/KDE Summary: WebKit render engine for Konqueror -Version: 4.2.2.svn958332 +Version: 4.2.3.svn967285 Release: 1 Source0: libs.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -98,6 +98,11 @@ %_kde_share_dir/apps/cmake/modules/FindWebKitPart.cmake %changelog +* Wed May 13 2009 beineri@opensuse.org +- update to SVN 967285 + * prevent crash when part is null + * improve zoom actions behavior + * performace optimization: create page when it is needed only * Thu Apr 23 2009 beineri@opensuse.org - update to SVN 958332 * better behavior on mouse middle click ++++++ libs.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/kwebpage.cpp new/libs/webkitkde/kdewebkit/kwebpage.cpp --- old/libs/webkitkde/kdewebkit/kwebpage.cpp 2009-04-22 23:04:10.000000000 +0200 +++ new/libs/webkitkde/kdewebkit/kwebpage.cpp 2009-05-11 23:26:22.000000000 +0200 @@ -121,7 +121,7 @@ } KWebPage::KWebPage(QObject *parent) - : QWebPage(parent), d(new KWebPage::KWebPagePrivate()) + : QWebPage(parent), d(new KWebPage::KWebPagePrivate()) { #if KDE_IS_VERSION(4, 2, 70) d->accessManager = new KIO::AccessManager(this); @@ -306,7 +306,7 @@ QString errMsgEx = i18n("Try to reinstall it. \n\nThe integration with Konqueror will be disabled."); KMessageBox::detailedSorry(view(), errMsg, errMsgEx); cfg.writePathEntry("DownloadManager", QString()); - cfg.sync (); + cfg.sync(); } else { downloadViaKIO = false; cmd += ' ' + KShell::quoteArg(url.url()); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/kwebpluginfactory.cpp new/libs/webkitkde/kdewebkit/kwebpluginfactory.cpp --- old/libs/webkitkde/kdewebkit/kwebpluginfactory.cpp 2009-01-19 02:10:18.000000000 +0100 +++ new/libs/webkitkde/kdewebkit/kwebpluginfactory.cpp 2009-05-11 23:26:22.000000000 +0200 @@ -43,14 +43,14 @@ }; KWebPluginFactory::KWebPluginFactory(QObject *parent) - : QWebPluginFactory(parent) - , d(new KWebPluginFactory::KWebPluginFactoryPrivate(0)) + : QWebPluginFactory(parent) + , d(new KWebPluginFactory::KWebPluginFactoryPrivate(0)) { } KWebPluginFactory::KWebPluginFactory(QWebPluginFactory *delegate, QObject *parent) - : QWebPluginFactory(parent) - , d(new KWebPluginFactory::KWebPluginFactoryPrivate(delegate)) + : QWebPluginFactory(parent) + , d(new KWebPluginFactory::KWebPluginFactoryPrivate(delegate)) { } @@ -91,7 +91,7 @@ openUrlArgs.metaData() = metaData; openUrlArgs.setMimeType(mimeType); part->setArguments(openUrlArgs); - kDebug()<< part->arguments().metaData(); + kDebug() << part->arguments().metaData(); part->openUrl(url); } kDebug() << "Asked for" << mimeType << "plugin, got" << part; @@ -123,7 +123,7 @@ mime.name = servicetypes.at(z); KMimeType::Ptr kmime = KMimeType::mimeType(mime.name); if (kmime) { - mime.fileExtensions = kmime->patterns().replaceInStrings("*.",""); + mime.fileExtensions = kmime->patterns().replaceInStrings("*.", ""); } mimes.append(mime); } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/kwebview.cpp new/libs/webkitkde/kdewebkit/kwebview.cpp --- old/libs/webkitkde/kdewebkit/kwebview.cpp 2009-04-23 00:59:03.000000000 +0200 +++ new/libs/webkitkde/kdewebkit/kwebview.cpp 2009-05-11 23:26:22.000000000 +0200 @@ -46,19 +46,20 @@ , keyboardModifiers(Qt::NoModifier) , pressedButtons(Qt::NoButton) , searchBar(0) + , page(0) {} + bool customContextMenu; Qt::KeyboardModifiers keyboardModifiers; Qt::MouseButtons pressedButtons; KDEPrivate::SearchBar *searchBar; + KWebPage *page; }; KWebView::KWebView(QWidget *parent) : QWebView(parent), d(new KWebView::KWebViewPrivate()) -{ - setPage(new KWebPage(this)); -} +{} KWebView::~KWebView() { @@ -79,13 +80,24 @@ d->customContextMenu = show; } -KWebPage *KWebView::page() +KWebPage *KWebView::page() const { - KWebPage *webPage = qobject_cast<KWebPage*>(QWebView::page()); - if (!webPage) { - return 0; + if (!d->page) { + KWebView *that = const_cast<KWebView *>(this); + that->setNewPage(); } - return webPage; + return d->page; +} + +void KWebView::setNewPage() +{ + setPage(new KWebPage(this)); +} + +void KWebView::setPage(KWebPage *page) +{ + d->page = page; + QWebView::setPage(page); } void KWebView::wheelEvent(QWheelEvent *event) @@ -116,8 +128,9 @@ { const QWebHitTestResult result = page()->mainFrame()->hitTestContent(event->pos()); const QUrl url = result.linkUrl(); - if (!url.isEmpty() && ((d->pressedButtons & Qt::MidButton) || - ((d->pressedButtons & Qt::LeftButton) && (d->keyboardModifiers & Qt::ControlModifier)))) { + if (!url.isEmpty() + && ((d->pressedButtons & Qt::MidButton) + || ((d->pressedButtons & Qt::LeftButton) && (d->keyboardModifiers & Qt::ControlModifier)))) { kDebug() << "middle clicked or ctrl-clicked url" << url; emit openUrlInNewTab(url); return; @@ -179,7 +192,8 @@ d->searchBar->setFoundMatch(status); } -void KWebView::load(const KUrl &url, const KParts::OpenUrlArguments &args, const KParts::BrowserArguments &bargs) { +void KWebView::load(const KUrl &url, const KParts::OpenUrlArguments &args, const KParts::BrowserArguments &bargs) +{ QNetworkRequest req; req.setUrl(url); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/kwebview.h new/libs/webkitkde/kdewebkit/kwebview.h --- old/libs/webkitkde/kdewebkit/kwebview.h 2009-04-23 00:59:03.000000000 +0200 +++ new/libs/webkitkde/kdewebkit/kwebview.h 2009-05-11 23:22:45.000000000 +0200 @@ -44,9 +44,19 @@ { Q_OBJECT public: - KWebView(QWidget *parent = 0); + explicit KWebView(QWidget *parent = 0); ~KWebView(); - KWebPage *page(); + /** + * This method returns the current KWebPage, if there is none, one will be created. + * It calles virtual method setNewPage() to create new (K)WebPage, so + * of you reimplements KWebPage ypu should reimplement this setNewPage() + * @see setPage() + * @see setNewPage() + * @short Getter for KWebPage + * @return current KWebPage + */ + KWebPage *page() const; + void setPage(KWebPage *page); QWidget *searchBar(); public Q_SLOTS: @@ -63,6 +73,18 @@ void openUrlInNewTab(const KUrl &url); protected: + /** + * Creates new (K)WebPage. This virtual method is called by page() to create new (K)WebPage if necessary. + * Reimplement this method if you reimplement KWebPage, e.g: + * @code + * void MyWebView::setNewPage() + * { + * setPage(new MyWebPage(this)); + * } + * @endcode + * @see page() + */ + virtual void setNewPage(); void contextMenuEvent(QContextMenuEvent *event); void wheelEvent(QWheelEvent *event); void mousePressEvent(QMouseEvent *event); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/searchbar_p.cpp new/libs/webkitkde/kdewebkit/searchbar_p.cpp --- old/libs/webkitkde/kdewebkit/searchbar_p.cpp 2009-04-10 17:58:28.000000000 +0200 +++ new/libs/webkitkde/kdewebkit/searchbar_p.cpp 2009-05-11 23:26:22.000000000 +0200 @@ -32,10 +32,11 @@ namespace KDEPrivate { -class SearchBar::SearchBarPrivate { +class SearchBar::SearchBarPrivate +{ public: - SearchBarPrivate(SearchBar* searchBar, QWidget* widget, QTimeLine* timeLine) - : widget(widget), timeLine(timeLine), m_searchBar(searchBar) {} + SearchBarPrivate(SearchBar* searchBar, QWidget* widget, QTimeLine* timeLine) + : widget(widget), timeLine(timeLine), m_searchBar(searchBar) {} void initializeSearchWidget() { widget = new QWidget(m_searchBar); widget->setContentsMargins(0, 0, 0, 0); @@ -47,8 +48,8 @@ ui.nextButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); ui.searchInfo->setText(QString()); if (ui.searchAsYouType->checkState() == Qt::Checked) { - connect(ui.searchLineEdit, SIGNAL(textChanged(const QString&)), - m_searchBar, SIGNAL(searchChanged(const QString&))); + connect(ui.searchLineEdit, SIGNAL(textChanged(const QString&)), + m_searchBar, SIGNAL(searchChanged(const QString&))); } connect(ui.searchAsYouType, SIGNAL(stateChanged(int)), m_searchBar, SLOT(searchAsYouTypeChanged(int))); connect(ui.nextButton, SIGNAL(clicked()), @@ -71,7 +72,7 @@ }; SearchBar::SearchBar(QWidget *parent) - : QWidget(parent) + : QWidget(parent) { d = new SearchBarPrivate(this, 0, new QTimeLine(150, this)); d->initializeSearchWidget(); @@ -79,7 +80,7 @@ // we start off hidden setMaximumHeight(0); d->widget->setGeometry(0, -1 * d->widget->height(), - d->widget->width(), d->widget->height()); + d->widget->width(), d->widget->height()); QWidget::hide(); connect(d->timeLine, SIGNAL(frameChanged(int)), @@ -179,7 +180,7 @@ this, SIGNAL(searchChanged(const QString&))); } else { connect(d->ui.searchLineEdit, SIGNAL(textChanged(const QString&)), - this, SIGNAL(searchChanged(const QString&))); + this, SIGNAL(searchChanged(const QString&))); } } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/settings/webkitsettings.cpp new/libs/webkitkde/kdewebkit/settings/webkitsettings.cpp --- old/libs/webkitkde/kdewebkit/settings/webkitsettings.cpp 2009-04-10 11:34:02.000000000 +0200 +++ new/libs/webkitkde/kdewebkit/settings/webkitsettings.cpp 2009-05-11 23:18:58.000000000 +0200 @@ -90,6 +90,7 @@ bool m_hideAdsEnabled : 1; bool m_jsPopupBlockerPassivePopup : 1; bool m_accessKeysEnabled : 1; + bool m_zoomTextOnly : 1; // the virtual global "domain" KPerDomainSettings global; @@ -156,11 +157,11 @@ const char* WebKitSettings::adviceToStr(KJavaScriptAdvice _advice) { switch( _advice ) { - case KJavaScriptAccept: return I18N_NOOP("Accept"); - case KJavaScriptReject: return I18N_NOOP("Reject"); - default: return 0; + case KJavaScriptAccept: return I18N_NOOP("Accept"); + case KJavaScriptReject: return I18N_NOOP("Reject"); + default: return 0; } - return 0; + return 0; } @@ -194,7 +195,8 @@ } void WebKitSettings::readDomainSettings(const KConfigGroup &config, bool reset, - bool global, KPerDomainSettings &pd_settings) { + bool global, KPerDomainSettings &pd_settings) +{ QString jsPrefix = global ? QString() : QString::fromLatin1("javascript."); QString javaPrefix = global ? QString() @@ -428,6 +430,10 @@ d->m_smoothScrolling = KSmoothScrollingEnabled; } + if ( reset || cgHtml.hasKey( "ZoomTextOnly" ) ) { + d->m_zoomTextOnly = cgHtml.readEntry( "ZoomTextOnly", false ); + } + if ( cgHtml.readEntry( "UserStyleSheetEnabled", false ) == true ) { if ( reset || cgHtml.hasKey( "UserStyleSheet" ) ) d->m_userSheet = cgHtml.readEntry( "UserStyleSheet", "" ); @@ -505,19 +511,19 @@ // merge all domains into one list QMap<QString,int> domainList; // why can't Qt have a QSet? for (unsigned i = 0; i < sizeof domain_keys/sizeof domain_keys[0]; ++i) { - if ( reset || cgJava.hasKey(domain_keys[i]) ) { - if (i == 0) check_old_ecma_settings = false; - else if (i == 1) check_old_java_settings = false; - const QStringList dl = cgJava.readEntry( domain_keys[i], QStringList() ); - const QMap<QString,int>::Iterator notfound = domainList.end(); - QStringList::ConstIterator it = dl.begin(); - const QStringList::ConstIterator itEnd = dl.end(); - for (; it != itEnd; ++it) { - const QString domain = (*it).toLower(); - QMap<QString,int>::Iterator pos = domainList.find(domain); - if (pos == notfound) domainList.insert(domain,0); - }/*next it*/ - } + if (reset || cgJava.hasKey(domain_keys[i])) { + if (i == 0) check_old_ecma_settings = false; + else if (i == 1) check_old_java_settings = false; + const QStringList dl = cgJava.readEntry( domain_keys[i], QStringList() ); + const QMap<QString,int>::Iterator notfound = domainList.end(); + QStringList::ConstIterator it = dl.begin(); + const QStringList::ConstIterator itEnd = dl.end(); + for (; it != itEnd; ++it) { + const QString domain = (*it).toLower(); + QMap<QString,int>::Iterator pos = domainList.find(domain); + if (pos == notfound) domainList.insert(domain,0); + }/*next it*/ + } }/*next i*/ if (reset) @@ -646,7 +652,9 @@ QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled, isPluginsEnabled()); QWebSettings::globalSettings()->setAttribute(QWebSettings::JavascriptCanOpenWindows, windowOpenPolicy() != WebKitSettings::KJSWindowOpenDeny); - +#if QT_VERSION >= 0x040500 + QWebSettings::globalSettings()->setAttribute(QWebSettings::ZoomTextOnly, zoomTextOnly()); +#endif QWebSettings::globalSettings()->setFontFamily(QWebSettings::StandardFont, stdFontName()); QWebSettings::globalSettings()->setFontFamily(QWebSettings::FixedFont, fixedFontName()); QWebSettings::globalSettings()->setFontFamily(QWebSettings::SerifFont, serifFontName()); @@ -1035,6 +1043,11 @@ return d->m_smoothScrolling; } +bool WebKitSettings::zoomTextOnly() const +{ + return d->m_zoomTextOnly; +} + bool WebKitSettings::isAutoDelayedActionsEnabled() const { return d->m_autoDelayedActionsEnabled; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/settings/webkitsettings.h new/libs/webkitkde/kdewebkit/settings/webkitsettings.h --- old/libs/webkitkde/kdewebkit/settings/webkitsettings.h 2008-08-26 01:26:00.000000000 +0200 +++ new/libs/webkitkde/kdewebkit/settings/webkitsettings.h 2009-05-11 23:12:18.000000000 +0200 @@ -126,6 +126,7 @@ bool autoSpellCheck() const; KAnimationAdvice showAnimations() const; KSmoothScrollingMode smoothScrolling() const; + bool zoomTextOnly() const; // Font settings QString stdFontName() const; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/part/webkitpart.cpp new/libs/webkitkde/part/webkitpart.cpp --- old/libs/webkitkde/part/webkitpart.cpp 2009-04-23 00:59:03.000000000 +0200 +++ new/libs/webkitkde/part/webkitpart.cpp 2009-05-11 23:26:22.000000000 +0200 @@ -51,13 +51,13 @@ #include <QPrintPreviewDialog> WebKitPart::WebKitPart(QWidget *parentWidget, QObject *parent, const QStringList &/*args*/) - : KParts::ReadOnlyPart(parent) + : KParts::ReadOnlyPart(parent) { KAboutData about = KAboutData("webkitpart", "webkitkde", ki18n("WebKit HTML Component"), - /*version*/ "0.1", /*ki18n("shortDescription")*/ KLocalizedString(), - KAboutData::License_LGPL, - ki18n("(c) 2008 - 2009, Urs Wolfer\n" - "(c) 2007 Trolltech ASA")); + /*version*/ "0.1", /*ki18n("shortDescription")*/ KLocalizedString(), + KAboutData::License_LGPL, + ki18n("(c) 2008 - 2009, Urs Wolfer\n" + "(c) 2007 Trolltech ASA")); about.addAuthor(ki18n("Laurent Montel"), KLocalizedString(), "montel@kde.org"); about.addAuthor(ki18n("Michael Howell"), KLocalizedString(), "mhowell123@gmail.com"); @@ -113,16 +113,29 @@ actionCollection()->addAction("printFrame", action); connect(action, SIGNAL(triggered(bool)), m_browserExtension, SLOT(printFrame())); - action = new KAction(KIcon("format-font-size-more"), i18n("Enlarge Font"), this); - actionCollection()->addAction("incFontSizes", action); + action = new KAction(KIcon("zoom-in"), i18n("Zoom In"), this); + actionCollection()->addAction("zoomIn", action); action->setShortcut(KShortcut("CTRL++; CTRL+=")); connect(action, SIGNAL(triggered(bool)), m_browserExtension, SLOT(zoomIn())); - action = new KAction(KIcon("format-font-size-less"), i18n("Shrink Font"), this); - actionCollection()->addAction("decFontSizes", action); - action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Minus)); + action = new KAction(KIcon("zoom-out"), i18n("Zoom Out"), this); + actionCollection()->addAction("zoomOut", action); + action->setShortcut(KShortcut("CTRL+-; CTRL+_")); connect(action, SIGNAL(triggered(bool)), m_browserExtension, SLOT(zoomOut())); + action = new KAction(KIcon("zoom-original"), i18n("Actual Size"), this); + actionCollection()->addAction("zoomNormal", action); + action->setShortcut(KShortcut("CTRL+0")); + connect(action, SIGNAL(triggered(bool)), m_browserExtension, SLOT(zoomNormal())); +#if QT_VERSION >= 0x040500 + action = new KAction(i18n("Zoom Text Only"), this); + action->setCheckable(true); + KConfigGroup cgHtml(KGlobal::config(), "HTML Settings"); + bool zoomTextOnly = cgHtml.readEntry("ZoomTextOnly", false); + action->setChecked(zoomTextOnly); + actionCollection()->addAction("zoomTextOnly", action); + connect(action, SIGNAL(triggered(bool)), m_browserExtension, SLOT(toogleZoomTextOnly())); +#endif action = actionCollection()->addAction(KStandardAction::SelectAll, "selectAll", m_browserExtension, SLOT(slotSelectAll())); action->setShortcutContext(Qt::WidgetShortcut); @@ -209,7 +222,7 @@ WebKitBrowserExtension::WebKitBrowserExtension(WebKitPart *parent) - : KParts::BrowserExtension(parent), part(parent) + : KParts::BrowserExtension(parent), part(parent) { connect(part->view()->page(), SIGNAL(selectionChanged()), this, SLOT(updateEditActions())); @@ -297,19 +310,40 @@ void WebKitBrowserExtension::zoomIn() { -#if QT_VERSION < 0x040500 - part->view()->setTextSizeMultiplier(part->view()->textSizeMultiplier() * 2); +#if QT_VERSION >= 0x040500 + part->view()->setZoomFactor(part->view()->zoomFactor() + 0.1); #else - part->view()->setZoomFactor(part->view()->zoomFactor() * 1.25); + part->view()->setTextSizeMultiplier(part->view()->textSizeMultiplier() + 0.1); #endif } void WebKitBrowserExtension::zoomOut() { -#if QT_VERSION < 0x040500 - part->view()->setTextSizeMultiplier(part->view()->textSizeMultiplier() * 2); +#if QT_VERSION >= 0x040500 + part->view()->setZoomFactor(part->view()->zoomFactor() - 0.1); +#else + part->view()->setTextSizeMultiplier(part->view()->textSizeMultiplier() - 0.1); +#endif +} + +void WebKitBrowserExtension::zoomNormal() +{ +#if QT_VERSION >= 0x040500 + part->view()->setZoomFactor(1); #else - part->view()->setZoomFactor(part->view()->zoomFactor() * 0.8); + part->view()->setTextSizeMultiplier(1); +#endif +} + +void WebKitBrowserExtension::toogleZoomTextOnly() +{ +#if QT_VERSION >= 0x040500 + KConfigGroup cgHtml(KGlobal::config(), "HTML Settings"); + bool zoomTextOnly = cgHtml.readEntry( "ZoomTextOnly", false ); + cgHtml.writeEntry("ZoomTextOnly", !zoomTextOnly); + KGlobal::config()->reparseConfiguration(); + + part->view()->settings()->setAttribute(QWebSettings::ZoomTextOnly, !zoomTextOnly); #endif } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/part/webkitpart.h new/libs/webkitkde/part/webkitpart.h --- old/libs/webkitkde/part/webkitpart.h 2009-03-15 13:22:37.000000000 +0100 +++ new/libs/webkitkde/part/webkitpart.h 2009-05-11 23:12:18.000000000 +0200 @@ -82,6 +82,8 @@ void zoomIn(); void zoomOut(); + void zoomNormal(); + void toogleZoomTextOnly(); void slotSelectAll(); void slotFrameInWindow(); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/part/webkitpart.rc new/libs/webkitkde/part/webkitpart.rc --- old/libs/webkitkde/part/webkitpart.rc 2009-03-15 13:04:22.000000000 +0100 +++ new/libs/webkitkde/part/webkitpart.rc 2009-05-11 23:12:18.000000000 +0200 @@ -1,5 +1,5 @@ <!DOCTYPE kpartgui SYSTEM "kpartgui.dtd"> -<kpartgui name="webkitpart" version="5"> +<kpartgui name="webkitpart" version="6"> <MenuBar> <Menu name="file"> <Action name="saveDocument" /> @@ -13,14 +13,18 @@ <Action name="find" /> </Menu> <Menu name="view"> - <Action name="incFontSizes" /> - <Action name="decFontSizes" /> + <Action name="zoomIn" /> + <Action name="zoomOut" /> + <Action name="zoomNormal" /> + <Action name="zoomTextOnly" /> + <Separator /> <Action name="viewDocumentSource" /> <ActionList name="debugScriptList" /> </Menu> </MenuBar> <ToolBar name="htmlToolBar" iconText="icononly" iconSize="22" hidden="true"><text>HTML Toolbar</text> - <Action name="incFontSizes" /> - <Action name="decFontSizes" /> + <Action name="zoomIn" /> + <Action name="zoomOut" /> + <Action name="zoomNormal" /> </ToolBar> </kpartgui> diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/part/webpage.cpp new/libs/webkitkde/part/webpage.cpp --- old/libs/webkitkde/part/webpage.cpp 2009-04-23 00:59:03.000000000 +0200 +++ new/libs/webkitkde/part/webpage.cpp 2009-05-11 23:26:22.000000000 +0200 @@ -47,8 +47,8 @@ #include <QtNetwork/QNetworkReply> WebPage::WebPage(WebKitPart *wpart, QWidget *parent) - : KWebPage(parent) - , m_part(wpart) + : KWebPage(parent) + , m_part(wpart) { connect(this, SIGNAL(geometryChangeRequested(const QRect &)), this, SLOT(slotGeometryChangeRequested(const QRect &))); @@ -80,7 +80,11 @@ KParts::WindowArgs(), &part); WebKitPart *webKitPart = qobject_cast<WebKitPart*>(part); if (!webKitPart) { - kDebug() << "got NOT a WebKitPart but a" << part->metaObject()->className(); + if (part) + kDebug() << "got NOT a WebKitPart but a" << part->metaObject()->className(); + else + kDebug() << "part is null"; + return 0; } return webKitPart->view()->page(); @@ -126,8 +130,8 @@ moveByX = - right + sg.right(); // always <0 if (bottom > sg.bottom()) moveByY = - bottom + sg.bottom(); // always <0 - if ((moveByX || moveByY) && - WebKitSettings::self()->windowMovePolicy(host) == WebKitSettings::KJSWindowMoveAllow) { + if ((moveByX || moveByY) + && WebKitSettings::self()->windowMovePolicy(host) == WebKitSettings::KJSWindowMoveAllow) { emit m_part->browserExtension()->moveTopLevelWidget(view()->x() + moveByX, view()->y() + moveByY); } } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/part/webview.cpp new/libs/webkitkde/part/webview.cpp --- old/libs/webkitkde/part/webview.cpp 2009-03-31 21:15:28.000000000 +0200 +++ new/libs/webkitkde/part/webview.cpp 2009-05-11 23:26:22.000000000 +0200 @@ -45,8 +45,7 @@ { public: WebViewPrivate(WebView *webView) - : webView(webView) - {} + : webView(webView) {} void addSearchActions(QList<QAction *>& selectActions); QString selectedTextAsOneLine() const; @@ -68,10 +67,9 @@ WebView::WebView(WebKitPart *wpart, QWidget *parent) - : KWebView(parent), d(new WebViewPrivate(this)) + : KWebView(parent), d(new WebViewPrivate(this)) { d->part = wpart; - setPage(new WebPage(wpart, this)); d->actionCollection = new KActionCollection(this); setAcceptDrops(true); } @@ -86,6 +84,11 @@ return d->result; } +void WebView::setNewPage() +{ + setPage(new WebPage(d->part, this)); +} + void WebView::contextMenuEvent(QContextMenuEvent *e) { d->result = page()->mainFrame()->hitTestContent(e->pos()); @@ -311,7 +314,7 @@ while (!text.isEmpty() && text[0].isSpace()) text = text.mid(1); while (!text.isEmpty() && text[text.length()-1].isSpace()) - text.truncate(text.length()-1); + text.truncate(text.length() - 1); return text; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/part/webview.h new/libs/webkitkde/part/webview.h --- old/libs/webkitkde/part/webview.h 2008-09-06 20:07:27.000000000 +0200 +++ new/libs/webkitkde/part/webview.h 2009-05-11 23:22:45.000000000 +0200 @@ -43,6 +43,7 @@ QWebHitTestResult contextMenuResult() const; protected: + void setNewPage(); void contextMenuEvent(QContextMenuEvent *e); void selectActionPopupMenu(KParts::BrowserExtension::ActionGroupMap &selectGroupMap); void linkActionPopupMenu(KParts::BrowserExtension::ActionGroupMap &linkGroupMap); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/scripts/codingstyle.sh new/libs/webkitkde/scripts/codingstyle.sh --- old/libs/webkitkde/scripts/codingstyle.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/libs/webkitkde/scripts/codingstyle.sh 2009-05-11 23:15:48.000000000 +0200 @@ -0,0 +1,19 @@ +#!/bin/sh +# +# Kdelibs coding style is defined in http://techbase.kde.org/Policies/Kdelibs_Coding_Style +# + +PWD=$(pwd) +cd $PWD + +echo "Applying astyle rules..." +astyle -v --indent=spaces=4 \ + --brackets=linux \ + --indent-labels \ + --pad=oper --unpad=paren \ + --one-line=keep-statements \ + --convert-tabs --indent-preprocessor \ + `find -type f -name '*.cpp' -or -name '*.h' -or -name '*.cc' | grep -Ev "\./.+/settings/"` + +echo "Done!" + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org