Commit 0f6343a4 authored by ariya@webkit.org's avatar ariya@webkit.org

2009-04-15 Antonio Gomes <antonio.gomes@openbossa.org>

        Reviewed by Ariya Hidayat.

        Rename extend() method in QWebElementSelection to append().

        * Api/qwebelement.cpp:
        (QWebElementSelection::append):
        * Api/qwebelement.h:
        * tests/qwebelement/tst_qwebelement.cpp:
        (tst_QWebElement::appendSelection):

git-svn-id: svn://svn.chromium.org/blink/trunk@42540 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 1608629e
......@@ -1311,7 +1311,7 @@ QWebElementSelection::~QWebElementSelection()
Appends the items of the \a other list to this list and returns a
reference to this list.
\sa operator+(), extend()
\sa operator+(), append()
*/
/*!
......@@ -1332,7 +1332,7 @@ QWebElementSelection QWebElementSelection::operator+(const QWebElementSelection
\sa operator+=()
*/
void QWebElementSelection::extend(const QWebElementSelection &other)
void QWebElementSelection::append(const QWebElementSelection &other)
{
if (!d) {
*this = other;
......
......@@ -151,10 +151,10 @@ public:
QWebElementSelection operator+(const QWebElementSelection &other) const;
inline QWebElementSelection &operator+=(const QWebElementSelection &other)
{
extend(other); return *this;
append(other); return *this;
}
void extend(const QWebElementSelection &selection);
void append(const QWebElementSelection &selection);
int count() const;
QWebElement at(int i) const;
......
2009-04-15 Antonio Gomes <antonio.gomes@openbossa.org>
Reviewed by Ariya Hidayat.
Rename extend() method in QWebElementSelection to append().
* Api/qwebelement.cpp:
(QWebElementSelection::append):
* Api/qwebelement.h:
* tests/qwebelement/tst_qwebelement.cpp:
(tst_QWebElement::appendSelection):
2009-04-15 Antonio Gomes <antonio.gomes@openbossa.org>
Reviewed by Simon Hausmann.
......
......@@ -79,7 +79,7 @@ private slots:
void frame();
void emptySelection();
void style();
void extendSelection();
void appendSelection();
void properties();
void appendAndPrepend();
void insertBeforeAndAfter();
......@@ -432,7 +432,7 @@ void tst_QWebElement::style()
QCOMPARE(p.styleProperty("cursor"), QLatin1String("auto"));
}
void tst_QWebElement::extendSelection()
void tst_QWebElement::appendSelection()
{
QString html = "<body><span class='a'>aaa</span><p>first para</p><div>foo</div>"
"<span class='b'>bbb</span><p>second para</p><div>bar</div></body>";
......@@ -442,7 +442,7 @@ void tst_QWebElement::extendSelection()
QWebElementSelection selection = body.findAll("p");
QCOMPARE(selection.count(), 2);
selection.extend(body.findAll("div"));
selection.append(body.findAll("div"));
QCOMPARE(selection.count(), 4);
selection += body.findAll("span.a");
......@@ -457,9 +457,9 @@ void tst_QWebElement::extendSelection()
QCOMPARE(selection.count(), 5);
QWebElementSelection test;
test.extend(selection);
test.append(selection);
QCOMPARE(test.count(), 5);
test.extend(QWebElementSelection());
test.append(QWebElementSelection());
QCOMPARE(test.count(), 5);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment