[Webkit-unassigned] [Bug 30772] New: [Qt] Review the API of QWebElementCollection

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 26 06:16:39 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=30772

           Summary: [Qt] Review the API of QWebElementCollection
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: Qt
          Severity: Normal
          Priority: P2
         Component: WebKit Qt
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: benjamin.poulain at nokia.com
                CC: benjamin.poulain at nokia.com
        Depends on: 30767
            Blocks: 29843


QWebElementCollection has been added back in
https://bugs.webkit.org/show_bug.cgi?id=30767. The current API is the original,
unreviewed, one.

Here is my suggestions:

1) Give a coherent API using iterator (related to (1)):  
-QWebElement QWebElementCollection::first() const
+iterator QWebElementCollection::begin()
-QWebElement QWebElementCollection::last() const
+iterator QWebElementCollection::end()
To be coherent with QList:
+const_iterator QWebElementCollection::constBegin() const
+const_iterator QWebElementCollection::constEnd() const

2) The API could be modified to enable lazy population in the future.
The following changes would be required:
-changes of (1)
-int QWebElementCollection::count() const;
-QWebElement QWebElementCollection::at(int i) const;
-QWebElement QWebElementCollection::operator[](int i) const


If the changes of (2) are made, it could make sense to remove
QWebElement::findFirst() because it would be equivalent to
QWebElement::findAll().begin().

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list