diff options
Diffstat (limited to 'src/3rdparty/webkit/WebKit/qt/Api')
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp | 83 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp | 230 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h | 2 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp | 23 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp | 21 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp | 73 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h | 6 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp | 26 |
8 files changed, 320 insertions, 144 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp index 38d8c47..ceb5ee1 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp @@ -41,9 +41,11 @@ public: , page(0) {} + virtual ~QGraphicsWebViewPrivate(); virtual void scroll(int dx, int dy, const QRect&); virtual void update(const QRect& dirtyRect); virtual void setInputMethodEnabled(bool enable); + virtual bool inputMethodEnabled() const; #if QT_VERSION >= 0x040600 virtual void setInputMethodHint(Qt::InputMethodHint hint, bool enable); #endif @@ -65,6 +67,10 @@ public: QWebPage* page; }; +QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate() +{ +} + void QGraphicsWebViewPrivate::_q_doLoadFinished(bool success) { // If the page had no title, still make sure it gets the signal @@ -92,6 +98,15 @@ void QGraphicsWebViewPrivate::setInputMethodEnabled(bool enable) #endif } +bool QGraphicsWebViewPrivate::inputMethodEnabled() const +{ +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) + return q->flags() & QGraphicsItem::ItemAcceptsInputMethod; +#else + return false; +#endif +} + #if QT_VERSION >= 0x040600 void QGraphicsWebViewPrivate::setInputMethodHint(Qt::InputMethodHint hint, bool enable) { @@ -149,9 +164,9 @@ QObject* QGraphicsWebViewPrivate::pluginParent() const An instance of this class renders Web content from a URL or supplied as data, using features of the QtWebKit module. - If the width and height of the item is not set, they will dynamically adjust to - a size appropriate for the content. This width may be large (e.g., 980 pixels or - more) for typical online Web pages. + If the width and height of the item are not set, they will default to 800 and 600, + respectively. If the Web page contents is larger than that, scrollbars will be shown + if not disabled explicitly. \section1 Browser Features @@ -188,12 +203,6 @@ QObject* QGraphicsWebViewPrivate::pluginParent() const */ /*! - \fn void QGraphicsWebView::statusChanged() - - This signal is emitted when the status bar text is changed by the page. -*/ - -/*! \fn void QGraphicsWebView::iconChanged() This signal is emitted whenever the icon of the page is loaded or changes. @@ -209,7 +218,7 @@ QObject* QGraphicsWebViewPrivate::pluginParent() const This signal is emitted when a new load of the page is started. - \sa progressChanged(), loadFinished() + \sa loadProgress(), loadFinished() */ /*! @@ -222,22 +231,6 @@ QObject* QGraphicsWebViewPrivate::pluginParent() const */ /*! - \fn void QGraphicsWebView::progressChanged(qreal progress) - - This signal is emitted every time an element in the web page - completes loading and the overall loading progress advances. - - This signal tracks the progress of all child frames. - - The current value is provided by \a progress and scales from 0.0 to 1.0, - which is the default range of QProgressBar. - - \sa loadStarted(), loadFinished() -*/ - - - -/*! Constructs an empty QGraphicsWebView with parent \a parent. \sa load() @@ -426,22 +419,22 @@ void QGraphicsWebView::setPage(QWebPage* page) QWebFrame* mainFrame = d->page->mainFrame(); - connect(mainFrame, SIGNAL(titleChanged(const QString&)), - this, SIGNAL(titleChanged(const QString&))); + connect(mainFrame, SIGNAL(titleChanged(QString)), + this, SIGNAL(titleChanged(QString))); connect(mainFrame, SIGNAL(iconChanged()), this, SIGNAL(iconChanged())); - connect(mainFrame, SIGNAL(urlChanged(const QUrl&)), - this, SIGNAL(urlChanged(const QUrl&))); + connect(mainFrame, SIGNAL(urlChanged(QUrl)), + this, SIGNAL(urlChanged(QUrl))); connect(d->page, SIGNAL(loadStarted()), this, SIGNAL(loadStarted())); connect(d->page, SIGNAL(loadProgress(int)), this, SIGNAL(loadProgress(int))); connect(d->page, SIGNAL(loadFinished(bool)), this, SLOT(_q_doLoadFinished(bool))); - connect(d->page, SIGNAL(statusBarMessage(const QString&)), - this, SIGNAL(statusBarMessage(const QString&))); - connect(d->page, SIGNAL(linkClicked(const QUrl &)), - this, SIGNAL(linkClicked(const QUrl &))); + connect(d->page, SIGNAL(statusBarMessage(QString)), + this, SIGNAL(statusBarMessage(QString))); + connect(d->page, SIGNAL(linkClicked(QUrl)), + this, SIGNAL(linkClicked(QUrl))); } /*! @@ -736,7 +729,7 @@ void QGraphicsWebView::triggerPageAction(QWebPage::WebAction action, bool checke Returns true if \a subString was found; otherwise returns false. - \sa selectedText(), selectionChanged() + \sa QWebPage::selectedText(), QWebPage::selectionChanged() */ bool QGraphicsWebView::findText(const QString &subString, QWebPage::FindFlags options) { @@ -986,6 +979,26 @@ void QGraphicsWebView::inputMethodEvent(QInputMethodEvent* ev) } /*! + \fn void QGraphicsWebView::statusBarMessage(const QString& text) + + This signal is emitted when the statusbar \a text is changed by the page. +*/ + +/*! + \fn void QGraphicsWebView::loadProgress(int progress) + + This signal is emitted every time an element in the web page + completes loading and the overall loading progress advances. + + This signal tracks the progress of all child frames. + + The current value is provided by \a progress and scales from 0 to 100, + which is the default range of QProgressBar. + + \sa loadStarted(), loadFinished() +*/ + +/*! \fn void QGraphicsWebView::linkClicked(const QUrl &url) This signal is emitted whenever the user clicks on a link and the page's linkDelegationPolicy diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp index 6305d10..8922150 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp @@ -453,6 +453,30 @@ bool QWebElement::hasAttributes() const } /*! + Return the list of attributes for the namespace given as \a namespaceUri. + + \sa attribute(), setAttribute() +*/ +QStringList QWebElement::attributeNames(const QString& namespaceUri) const +{ + if (!m_element) + return QStringList(); + + QStringList attributeNameList; + const NamedNodeMap* const attrs = m_element->attributes(/* read only = */ true); + if (attrs) { + const String namespaceUriString(namespaceUri); // convert QString -> String once + const unsigned attrsCount = attrs->length(); + for (unsigned i = 0; i < attrsCount; ++i) { + const Attribute* const attribute = attrs->attributeItem(i); + if (namespaceUriString == attribute->namespaceURI()) + attributeNameList.append(attribute->localName()); + } + } + return attributeNameList; +} + +/*! Returns true if the element has keyboard input focus; otherwise, returns false \sa setFocus() @@ -1661,22 +1685,6 @@ QList<QWebElement> QWebElementCollection::toList() const QWebElementCollection provides STL style const iterators for fast low-level access to the elements. QWebElementCollection::const_iterator allows you to iterate over a QWebElementCollection. - - The default QWebElementCollection::const_iterator constructors creates an uninitialized iterator. You must initialize - it using a QWebElementCollection function like QWebElementCollection::begin() or QWebElementCollection::end() before you - can start iterating. -*/ - -/*! - \fn QWebElementCollection::const_iterator::const_iterator() - - Constructs an uninitialized iterator. - - Functions like operator*() and operator++() should not be called on - an uninitialized iterator. Use operator=() to assign a value - to it before using it. - - \sa QWebElementCollection::begin() */ /*! @@ -1824,3 +1832,193 @@ QList<QWebElement> QWebElementCollection::toList() const Returns true if the element pointed to by this iterator is greater than or equal to the element pointed to by the \a other iterator. */ + +/*! + \fn QWebElementCollection::iterator QWebElementCollection::begin() + + Returns an STL-style iterator pointing to the first element in the collection. + + \sa end() +*/ + +/*! + \fn QWebElementCollection::iterator QWebElementCollection::end() + + Returns an STL-style iterator pointing to the imaginary element after the + last element in the list. + + \sa begin() +*/ + +/*! + \fn QWebElementCollection::const_iterator QWebElementCollection::constBegin() const + + Returns an STL-style iterator pointing to the first element in the collection. + + \sa end() +*/ + +/*! + \fn QWebElementCollection::const_iterator QWebElementCollection::constEnd() const + + Returns an STL-style iterator pointing to the imaginary element after the + last element in the list. + + \sa begin() +*/ + +/*! + \class QWebElementCollection::iterator + \since 4.6 + \brief The QWebElementCollection::iterator class provides an STL-style iterator for QWebElementCollection. + + QWebElementCollection provides STL style iterators for fast low-level access to the elements. + + QWebElementCollection::iterator allows you to iterate over a QWebElementCollection. +*/ + +/*! + \fn QWebElementCollection::iterator::iterator(const iterator &other) + + Constructs a copy of \a other. +*/ + +/*! + \fn QWebElementCollection::iterator::iterator(const QWebElementCollection *collection, int index) + \internal +*/ + +/*! + \fn const QWebElement QWebElementCollection::iterator::operator*() const + + Returns the current element. +*/ + +/*! + \fn bool QWebElementCollection::iterator::operator==(const iterator &other) const + + Returns true if \a other points to the same item as this iterator; + otherwise returns false. + + \sa operator!=() +*/ + +/*! + \fn bool QWebElementCollection::iterator::operator!=(const iterator &other) const + + Returns true if \a other points to a different element than this; + iterator; otherwise returns false. + + \sa operator==() +*/ + +/*! + \fn QWebElementCollection::iterator &QWebElementCollection::iterator::operator++() + + The prefix ++ operator (\c{++it}) advances the iterator to the next element in the collection + and returns an iterator to the new current element. + + Calling this function on QWebElementCollection::end() leads to undefined results. + + \sa operator--() +*/ + +/*! + \fn QWebElementCollection::iterator QWebElementCollection::iterator::operator++(int) + + \overload + + The postfix ++ operator (\c{it++}) advances the iterator to the next element in the collection + and returns an iterator to the previously current element. + + Calling this function on QWebElementCollection::end() leads to undefined results. +*/ + +/*! + \fn QWebElementCollection::iterator &QWebElementCollection::iterator::operator--() + + The prefix -- operator (\c{--it}) makes the preceding element current and returns an + iterator to the new current element. + + Calling this function on QWebElementCollection::begin() leads to undefined results. + + \sa operator++() +*/ + +/*! + \fn QWebElementCollection::iterator QWebElementCollection::iterator::operator--(int) + + \overload + + The postfix -- operator (\c{it--}) makes the preceding element current and returns + an iterator to the previously current element. +*/ + +/*! + \fn QWebElementCollection::iterator &QWebElementCollection::iterator::operator+=(int j) + + Advances the iterator by \a j elements. If \a j is negative, the iterator goes backward. + + \sa operator-=(), operator+() +*/ + +/*! + \fn QWebElementCollection::iterator &QWebElementCollection::iterator::operator-=(int j) + + Makes the iterator go back by \a j elements. If \a j is negative, the iterator goes forward. + + \sa operator+=(), operator-() +*/ + +/*! + \fn QWebElementCollection::iterator QWebElementCollection::iterator::operator+(int j) const + + Returns an iterator to the element at \a j positions forward from this iterator. If \a j + is negative, the iterator goes backward. + + \sa operator-(), operator+=() +*/ + +/*! + \fn QWebElementCollection::iterator QWebElementCollection::iterator::operator-(int j) const + + Returns an iterator to the element at \a j positiosn backward from this iterator. + If \a j is negative, the iterator goes forward. + + \sa operator+(), operator-=() +*/ + +/*! + \fn int QWebElementCollection::iterator::operator-(iterator other) const + + Returns the number of elements between the item point to by \a other + and the element pointed to by this iterator. +*/ + +/*! + \fn bool QWebElementCollection::iterator::operator<(const iterator &other) const + + Returns true if the element pointed to by this iterator is less than the element pointed to + by the \a other iterator. +*/ + +/*! + \fn bool QWebElementCollection::iterator::operator<=(const iterator &other) const + + Returns true if the element pointed to by this iterator is less than or equal to the + element pointed to by the \a other iterator. +*/ + +/*! + \fn bool QWebElementCollection::iterator::operator>(const iterator &other) const + + Returns true if the element pointed to by this iterator is greater than the element pointed to + by the \a other iterator. +*/ + +/*! + \fn bool QWebElementCollection::iterator::operator>=(const iterator &other) const + + Returns true if the element pointed to by this iterator is greater than or equal to the + element pointed to by the \a other iterator. +*/ diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h index 9cb1ea1..3833070 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h @@ -21,6 +21,7 @@ #define QWEBELEMENT_H #include <QString> +#include <QStringList> #include <QRect> #include <QVariant> #include <QExplicitlySharedDataPointer> @@ -72,6 +73,7 @@ public: void removeAttribute(const QString& name); void removeAttributeNS(const QString& namespaceUri, const QString& name); bool hasAttributes() const; + QStringList attributeNames(const QString& namespaceUri = QString()) const; QStringList classes() const; bool hasClass(const QString& name) const; diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp index 17a0118..e84b8df 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp @@ -324,7 +324,7 @@ void QWebFramePrivate::renderPrivate(QPainter *painter, QWebFrame::RenderLayer l the HTML content readily available, you can use setHtml() instead. The page() function returns a pointer to the web page object. See - \l{Elements of QWebView} for an explanation of how web + \l{QWebView}{Elements of QWebView} for an explanation of how web frames are related to a web page and web view. The QWebFrame class also offers methods to retrieve both the URL currently @@ -356,6 +356,19 @@ void QWebFramePrivate::renderPrivate(QPainter *painter, QWebFrame::RenderLayer l \sa QWebPage */ +/*! + \enum QWebFrame::RenderLayer + + This enum describes the layers available for rendering using \l{QWebFrame::}{render()}. + The layers can be OR-ed together from the following list: + + \value ContentsLayer The web content of the frame + \value ScrollBarLayer The scrollbars of the frame + \value PanIconLayer The icon used when panning the frame + + \value AllLayers Includes all the above layers +*/ + QWebFrame::QWebFrame(QWebPage *parent, QWebFrameData *frameData) : QObject(parent) , d(new QWebFramePrivate) @@ -471,7 +484,9 @@ QString QWebFrame::toPlainText() const d->frame->view()->layout(); Element *documentElement = d->frame->document()->documentElement(); - return documentElement->innerText(); + if (documentElement) + return documentElement->innerText(); + return QString(); } /*! @@ -766,6 +781,10 @@ void QWebFrame::load(const QNetworkRequest &req, The \a html is loaded immediately; external objects are loaded asynchronously. + If a script in the \a html runs longer than the default script timeout (currently 10 seconds), + for example due to being blocked by a modal JavaScript alert dialog, this method will return + as soon as possible after the timeout and any subsequent \a html will be loaded asynchronously. + When using this method WebKit assumes that external resources such as JavaScript programs or style sheets are encoded in UTF-8 unless otherwise specified. For example, the encoding of an external script can be specified through the charset attribute of the HTML script tag. It is also possible diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp index d4a491b..aedf95a 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp @@ -153,6 +153,7 @@ public: virtual void scroll(int dx, int dy, const QRect&); virtual void update(const QRect& dirtyRect); virtual void setInputMethodEnabled(bool enable); + virtual bool inputMethodEnabled() const; #if QT_VERSION >= 0x040600 virtual void setInputMethodHint(Qt::InputMethodHint hint, bool enable); #endif @@ -185,6 +186,12 @@ void QWebPageWidgetClient::setInputMethodEnabled(bool enable) { view->setAttribute(Qt::WA_InputMethodEnabled, enable); } + +bool QWebPageWidgetClient::inputMethodEnabled() const +{ + return view->testAttribute(Qt::WA_InputMethodEnabled); +} + #if QT_VERSION >= 0x040600 void QWebPageWidgetClient::setInputMethodHint(Qt::InputMethodHint hint, bool enable) { @@ -857,13 +864,13 @@ void QWebPagePrivate::mouseReleaseEvent(QGraphicsSceneMouseEvent* ev) void QWebPagePrivate::handleSoftwareInputPanel(Qt::MouseButton button) { #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) - if (q->view() && q->view()->testAttribute(Qt::WA_InputMethodEnabled) + if (client && client->inputMethodEnabled() && button == Qt::LeftButton && qApp->autoSipEnabled()) { QStyle::RequestSoftwareInputPanel behavior = QStyle::RequestSoftwareInputPanel( - q->view()->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel)); + client->ownerWidget()->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel)); if (!clickCausedFocus || behavior == QStyle::RSIP_OnMouseClick) { QEvent event(QEvent::RequestSoftwareInputPanel); - QApplication::sendEvent(q->view(), &event); + QApplication::sendEvent(client->ownerWidget(), &event); } } @@ -1055,11 +1062,9 @@ void QWebPagePrivate::keyReleaseEvent(QKeyEvent *ev) void QWebPagePrivate::focusInEvent(QFocusEvent*) { FocusController *focusController = page->focusController(); - Frame *frame = focusController->focusedFrame(); focusController->setActive(true); - if (frame) - focusController->setFocused(true); - else + focusController->setFocused(true); + if (!focusController->focusedFrame()) focusController->setFocusedFrame(QWebFramePrivate::core(mainFrame)); } @@ -1675,7 +1680,7 @@ InspectorController* QWebPagePrivate::inspectorController() */ /*! - Constructs an empty QWebView with parent \a parent. + Constructs an empty QWebPage with parent \a parent. */ QWebPage::QWebPage(QObject *parent) : QObject(parent) diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp index ff86e1f..b637d04 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp @@ -62,8 +62,6 @@ public: QString localStoragePath; QString offlineWebApplicationCachePath; qint64 offlineStorageDefaultQuota; - float printingMinimumShrinkFactor; - float printingMaximumShrinkFactor; void apply(); WebCore::Settings* settings; @@ -176,12 +174,6 @@ void QWebSettingsPrivate::apply() QString storagePath = !localStoragePath.isEmpty() ? localStoragePath : global->localStoragePath; settings->setLocalStorageDatabasePath(storagePath); - float minimumShrinkFactor = printingMinimumShrinkFactor > 0.0f ? printingMinimumShrinkFactor : global->printingMinimumShrinkFactor; - settings->setPrintingMinimumShrinkFactor(minimumShrinkFactor); - - float maximumShrinkFactor = printingMaximumShrinkFactor > 0.0f ? printingMaximumShrinkFactor : global->printingMaximumShrinkFactor; - settings->setPrintingMaximumShrinkFactor(maximumShrinkFactor); - value = attributes.value(QWebSettings::ZoomTextOnly, global->attributes.value(QWebSettings::ZoomTextOnly)); settings->setZoomsTextOnly(value); @@ -206,6 +198,7 @@ void QWebSettingsPrivate::apply() value = attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls, global->attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls)); settings->setAllowUniversalAccessFromFileURLs(value); + settings->setUsesPageCache(WebCore::pageCache()->capacity()); } else { QList<QWebSettingsPrivate*> settings = *::allSettings(); for (int i = 0; i < settings.count(); ++i) @@ -269,7 +262,7 @@ QWebSettings* QWebSettings::globalSettings() setOfflineStoragePath() with an appropriate file path, and can limit the quota for each application by calling setOfflineStorageDefaultQuota(). - \sa QWebPage::settings(), QWebView::settings(), {Browser} + \sa QWebPage::settings(), QWebView::settings(), {Web Browser} */ /*! @@ -346,6 +339,8 @@ QWebSettings* QWebSettings::globalSettings() web application cache feature is enabled or not. Disabled by default. \value LocalStorageEnabled Specifies whether support for the HTML 5 local storage feature is enabled or not. Disabled by default. + \value LocalStorageDatabaseEnabled \e{This enum value is deprecated.} Use + QWebSettings::LocalStorageEnabled instead. \value LocalContentCanAccessRemoteUrls Specifies whether locally loaded documents are allowed to access remote urls. */ @@ -379,8 +374,6 @@ QWebSettings::QWebSettings() d->attributes.insert(QWebSettings::LocalContentCanAccessRemoteUrls, false); d->offlineStorageDefaultQuota = 5 * 1024 * 1024; d->defaultTextEncoding = QLatin1String("iso-8859-1"); - d->printingMinimumShrinkFactor = 0.0f; - d->printingMaximumShrinkFactor = 0.0f; } /*! @@ -495,60 +488,6 @@ QString QWebSettings::defaultTextEncoding() const } /*! - \since 4.7 - Specifies minimum shrink fator allowed for printing. If set to 0 a - default value is used. - - When printing, content will be shrunk to reduce page usage, it - will reduced by a factor between printingMinimumShrinkFactor and - printingMaximumShrinkFactor. - - \sa printingMinimumShrinkFactor() - \sa setPrintingMaximumShrinkFactor() - \sa printingMaximumShrinkFactor() -*/ -void QWebSettings::setPrintingMinimumShrinkFactor(float printingMinimumShrinkFactor) -{ - d->printingMinimumShrinkFactor = printingMinimumShrinkFactor; - d->apply(); -} - -/*! - \since 4.7 - returns the minimum shrink factor used for printing. - - \sa setPrintingMinimumShrinkFactor() -*/ -float QWebSettings::printingMinimumShrinkFactor() const -{ - return d->printingMinimumShrinkFactor; -} - -/*! - \since 4.7 - Specifies maximum shrink fator allowed for printing. If set to 0 a - default value is used. - - \sa setPrintingMinimumShrinkFactor() -*/ -void QWebSettings::setPrintingMaximumShrinkFactor(float printingMaximumShrinkFactor) -{ - d->printingMaximumShrinkFactor = printingMaximumShrinkFactor; - d->apply(); -} - -/*! - \since 4.7 - returns the maximum shrink factor used for printing. - - \sa setPrintingMinimumShrinkFactor() -*/ -float QWebSettings::printingMaximumShrinkFactor() const -{ - return d->printingMaximumShrinkFactor; -} - -/*! Sets the path of the icon database to \a path. The icon database is used to store "favicons" associated with web sites. @@ -618,7 +557,7 @@ QIcon QWebSettings::iconForUrl(const QUrl& url) return* icon; } -/*! +/* Returns the plugin database object. QWebPluginDatabase *QWebSettings::pluginDatabase() @@ -704,7 +643,9 @@ void QWebSettings::clearMemoryCaches() */ void QWebSettings::setMaximumPagesInCache(int pages) { + QWebSettingsPrivate* global = QWebSettings::globalSettings()->d; WebCore::pageCache()->setCapacity(qMax(0, pages)); + global->apply(); } /*! diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h index 3b6d1a7..50cf424 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h @@ -102,12 +102,6 @@ public: void setDefaultTextEncoding(const QString &encoding); QString defaultTextEncoding() const; - void setPrintingMinimumShrinkFactor(float printingMinimumShrinkFactor); - float printingMinimumShrinkFactor() const; - - void setPrintingMaximumShrinkFactor(float printingMaximimShrinkFactor); - float printingMaximumShrinkFactor() const; - static void setIconDatabasePath(const QString &location); static QString iconDatabasePath(); static void clearIconDatabase(); diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp index 55ce1f7..1d4b46f 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp @@ -219,12 +219,12 @@ void QWebView::setPage(QWebPage* page) d->page->setPalette(palette()); // #### connect signals QWebFrame *mainFrame = d->page->mainFrame(); - connect(mainFrame, SIGNAL(titleChanged(const QString&)), - this, SIGNAL(titleChanged(const QString&))); + connect(mainFrame, SIGNAL(titleChanged(QString)), + this, SIGNAL(titleChanged(QString))); connect(mainFrame, SIGNAL(iconChanged()), this, SIGNAL(iconChanged())); - connect(mainFrame, SIGNAL(urlChanged(const QUrl &)), - this, SIGNAL(urlChanged(const QUrl &))); + connect(mainFrame, SIGNAL(urlChanged(QUrl)), + this, SIGNAL(urlChanged(QUrl))); connect(d->page, SIGNAL(loadStarted()), this, SIGNAL(loadStarted())); @@ -232,10 +232,10 @@ void QWebView::setPage(QWebPage* page) this, SIGNAL(loadProgress(int))); connect(d->page, SIGNAL(loadFinished(bool)), this, SIGNAL(loadFinished(bool))); - connect(d->page, SIGNAL(statusBarMessage(const QString &)), - this, SIGNAL(statusBarMessage(const QString &))); - connect(d->page, SIGNAL(linkClicked(const QUrl &)), - this, SIGNAL(linkClicked(const QUrl &))); + connect(d->page, SIGNAL(statusBarMessage(QString)), + this, SIGNAL(statusBarMessage(QString))); + connect(d->page, SIGNAL(linkClicked(QUrl)), + this, SIGNAL(linkClicked(QUrl))); connect(d->page, SIGNAL(microFocusChanged()), this, SLOT(updateMicroFocus())); @@ -251,7 +251,7 @@ void QWebView::setPage(QWebPage* page) \note The view remains the same until enough data has arrived to display the new \a url. - \sa setUrl(), url(), urlChanged(), guessUrlFromString() + \sa setUrl(), url(), urlChanged(), QUrl::fromUserInput() */ void QWebView::load(const QUrl &url) { @@ -759,8 +759,12 @@ void QWebView::paintEvent(QPaintEvent *ev) } /*! - This function is called whenever WebKit wants to create a new window of the given \a type, for example as a result of - a JavaScript request to open a document in a new window. + This function is called from the createWindow() method of the associated QWebPage, + each time the page wants to create a new window of the given \a type. This might + be the result, for example, of a JavaScript request to open a document in a new window. + + \note If the createWindow() method of the associated page is reimplemented, this + method is not called, unless explicitly done so in the reimplementation. \sa QWebPage::createWindow() */ |