diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2009-11-16 21:31:07 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-11-16 21:31:07 (GMT) |
commit | 8586237d9400c5669e62e97bfb00b4a2579c7646 (patch) | |
tree | 8705883bc7f1423a75f31f1dbacc98e5de2bbc90 /src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp | |
parent | 45ed11461d479172d6a92e77b6e1a09916ca4556 (diff) | |
download | Qt-8586237d9400c5669e62e97bfb00b4a2579c7646.zip Qt-8586237d9400c5669e62e97bfb00b4a2579c7646.tar.gz Qt-8586237d9400c5669e62e97bfb00b4a2579c7646.tar.bz2 |
Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( ca38203fba92cf48d59328403f64036907fd3433 )
Changes in WebKit/qt since the last update:
++ b/WebKit/qt/ChangeLog
2009-11-16 Simon Hausmann <simon.hausmann@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
API documentation fixes.
* Api/qgraphicswebview.cpp: Removed duplicate docs.
* Api/qwebelement.cpp: Added missing docs.
* Api/qwebsettings.cpp: Ditto.
2009-11-14 Antonio Gomes <tonikitoo@webkit.org>
Reviewed by Antti Koivisto.
[Qt] Broken back/forward after using ErrorPageExtension to set error page
https://bugs.webkit.org/show_bug.cgi?id=30573
Implemented autotests for covering the back/forward
reset problem involving error pages.
* tests/qwebpage/tst_qwebpage.cpp:
(tst_QWebPage::errorPageExtension):
2009-11-16 Holger Hans Peter Freyther <zecke@selfish.org>
Reviewed by NOBODY (OOPS!).
[Qt] Do not show the QWidget when the WebCore::Widget is hidden
https://bugs.webkit.org/show_bug.cgi?id=31203
The clipping code was making a QWidget visible even if the
WebCore::Widget was hidden. Fix the bug by calling setVisible
only if the WebCore::Widget is shown.
* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::QtPluginWidget::show): Override WebCore::Widget
(WebCore::QtPluginWidget::hide): Override WebCore::Widget
(WebCore::QtPluginWidget::handleVisibility): New method to call setVisible when we are visible
(FrameLoaderClientQt::createPlugin): Hide the QWidget by default
2009-11-09 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
https://bugs.webkit.org/show_bug.cgi?id=30628
Add an API to get all the attributes from a QWebElement.
* Api/qwebelement.cpp:
(QWebElement::attributesName):
* Api/qwebelement.h:
* tests/qwebelement/tst_qwebelement.cpp:
(tst_QWebElement::listAttributes):
2009-11-13 Andras Becsi <becsi.andras@stud.u-szeged.hu>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Enable Page Cache if setMaximumPagesInCache needs it.
This fixes https://bugs.webkit.org/show_bug.cgi?id=31266.
* Api/qwebsettings.cpp:
(QWebSettingsPrivate::apply):
(QWebSettings::setMaximumPagesInCache):
2009-11-13 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed by Simon Hausmann.
Update documentation for the Qt API
* Api/qgraphicswebview.cpp:
* Api/qwebelement.cpp:
* Api/qwebframe.cpp:
* Api/qwebsettings.cpp:
* Api/qwebview.cpp:
2009-11-13 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed by Simon Hausmann.
Use correct install-path when running qdoc3
* docs/docs.pri:
2009-11-12 Antonio Gomes <tonikitoo@webkit.org>
Reviewed by Jan Alonzo.
[Qt] Various doc fixes
https://bugs.webkit.org/show_bug.cgi?id=31358
QWebPage's constructor docs are mentioning "QWebView":
"Constructs an empty QWebView with parent".
* Api/qwebpage.cpp:
2009-11-11 Antonio Gomes <tonikitoo@webkit.org>
Reviewed by Kenneth Christiansen.
[Qt] Various doc fixes
https://bugs.webkit.org/show_bug.cgi?id=31358
Fixed wrong documentation: item's dimensions do fit to Web page
content by default.
Kenneth agreed to land this as a followup patch to the
just landed documentation patch.
* Api/qgraphicswebview.cpp:
2009-11-11 David Boddie <dboddie@trolltech.com>
Reviewed by Kenneth Christiansen.
[Qt] Various doc fixes
https://bugs.webkit.org/show_bug.cgi?id=31323
Fixed and synchronized QWebView related documentation.
* Api/qgraphicswebview.cpp:
* Api/qwebview.cpp:
2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Few classes have virtual functions but non-virtual destructor
https://bugs.webkit.org/show_bug.cgi?id=31269
* Api/qgraphicswebview.cpp:
(QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate): Add virtual
destructor.
2009-10-30 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed by NOBODY (OOPS!).
[Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml()
This ensures that long-running JavaScript (for example due to a modal alert() dialog),
will not trigger a deferred load after only 500ms (the default tokenizer delay) while
still giving a reasonable timeout (10 seconds) to prevent deadlock.
https://bugs.webkit.org/show_bug.cgi?id=29381
* Api/qwebframe.cpp: Document the behaviour
* WebCoreSupport/FrameLoaderClientQt.cpp: set the custom tokenizer delay for substitute loads
* tests/qwebframe/tst_qwebframe.cpp: Add test
2009-11-13 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Fix initial QWebView focus behavior.
focusController->setFocused(true) was not always called.
https://bugs.webkit.org/show_bug.cgi?id=31466
* Api/qwebpage.cpp:
(QWebPagePrivate::focusInEvent):
2009-11-12 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Custom printing shrink factors
https://bugs.webkit.org/show_bug.cgi?id=29042
This reverts commit r49769. The public API for this needs to be reviewed
before its inclusion in Qt.
* Api/qwebsettings.cpp:
(QWebSettingsPrivate::apply):
(QWebSettings::QWebSettings):
* Api/qwebsettings.h:
Update documentation for the Qt API
* Api/qgraphicswebview.cpp:
* Api/qwebelement.cpp:
* Api/qwebframe.cpp:
* Api/qwebsettings.cpp:
* Api/qwebview.cpp:
2009-11-13 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed by Simon Hausmann.
Diffstat (limited to 'src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp | 230 |
1 files changed, 214 insertions, 16 deletions
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. +*/ |