summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-03-10 12:14:26 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-10 20:10:51 +0100
commit9e5c889f1e7531048114b540bb65dee81437ce6f (patch)
tree06dcdcfec3ae2a31d20a168b8fa7f93fa48eb95d
parent59b38d902d9eadc71509f1184d3753c525abea22 (diff)
downloadqtwebkit-9e5c889f1e7531048114b540bb65dee81437ce6f.tar.gz
Fix documentation of the selector API
We support all CSS selectors WebKit supports since the methods map internally to the DOM Selectors API. We should therefore update the documentation to claim more than CSS2 selector support. Task-number: QTBUG-37208 Change-Id: I4eae7c897f13bbb17221995ef764020d9341d1f8 Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
-rw-r--r--Source/WebKit/qt/Api/qwebelement.cpp8
-rw-r--r--Source/WebKit/qt/WidgetApi/qwebframe.cpp9
-rw-r--r--Source/WebKit/qt/docs/qtwebkit.qdoc10
3 files changed, 22 insertions, 5 deletions
diff --git a/Source/WebKit/qt/Api/qwebelement.cpp b/Source/WebKit/qt/Api/qwebelement.cpp
index ec53effcb..17811cdc1 100644
--- a/Source/WebKit/qt/Api/qwebelement.cpp
+++ b/Source/WebKit/qt/Api/qwebelement.cpp
@@ -225,7 +225,9 @@ bool QWebElement::isNull() const
\a selectorQuery. If there are no matching elements, an empty list is
returned.
- \l{Standard CSS2 selector} syntax is used for the query.
+ \l{Standard CSS selector} syntax is used for the query.
+
+ This method is equivalent to Element::querySelectorAll in the \l{DOM Selectors API}.
\note This search is performed recursively.
@@ -240,7 +242,9 @@ QWebElementCollection QWebElement::findAll(const QString &selectorQuery) const
Returns the first child element that matches the given CSS selector
\a selectorQuery.
- \l{Standard CSS2 selector} syntax is used for the query.
+ \l{Standard CSS selector} syntax is used for the query.
+
+ This method is equivalent to Element::querySelector in the \l{DOM Selectors API}.
\note This search is performed recursively.
diff --git a/Source/WebKit/qt/WidgetApi/qwebframe.cpp b/Source/WebKit/qt/WidgetApi/qwebframe.cpp
index 27cc73989..eb7821d53 100644
--- a/Source/WebKit/qt/WidgetApi/qwebframe.cpp
+++ b/Source/WebKit/qt/WidgetApi/qwebframe.cpp
@@ -768,9 +768,11 @@ QWebElement QWebFrame::documentElement() const
Returns a new list of elements matching the given CSS selector \a selectorQuery.
If there are no matching elements, an empty list is returned.
- \l{http://www.w3.org/TR/REC-CSS2/selector.html#q1}{Standard CSS2 selector} syntax is
+ \l{Standard CSS selector} syntax is
used for the query.
+ This method is equivalent to Document::querySelectorAll in the \l{DOM Selectors API}.
+
\sa QWebElement::findAll()
*/
QWebElementCollection QWebFrame::findAllElements(const QString &selectorQuery) const
@@ -784,8 +786,9 @@ QWebElementCollection QWebFrame::findAllElements(const QString &selectorQuery) c
given CSS selector \a selectorQuery. If there is no matching element, a
null element is returned.
- \l{http://www.w3.org/TR/REC-CSS2/selector.html#q1}{Standard CSS2 selector} syntax is
- used for the query.
+ \l{Standard CSS selector} syntax is used for the query.
+
+ This method is equivalent to Document::querySelector in the \l{DOM Selectors API}.
\sa QWebElement::findFirst()
*/
diff --git a/Source/WebKit/qt/docs/qtwebkit.qdoc b/Source/WebKit/qt/docs/qtwebkit.qdoc
index 5276f0170..f7dcfcb12 100644
--- a/Source/WebKit/qt/docs/qtwebkit.qdoc
+++ b/Source/WebKit/qt/docs/qtwebkit.qdoc
@@ -223,3 +223,13 @@
Boston, MA 02110-1301, USA.
\endlegalese
*/
+
+/*!
+ \externalpage http://www.w3.org/TR/selectors/
+ \title Standard CSS selector
+*/
+
+/*!
+ \externalpage http://www.w3.org/TR/selectors-api/
+ \title DOM Selectors API
+*/