Bug 30767

Summary: [Qt] Reintroduce QWebElementCollection
Product: WebKit Reporter: Benjamin Poulain <benjamin@webkit.org>
Component: WebKit QtAssignee: Nobody <webkit-unassigned@lists.webkit.org>
Severity: Normal CC: benjamin@webkit.org, commit-queue@webkit.org, kenneth@webkit.org, tonikitoo@webkit.org, vestbo@webkit.org
Priority: P2 Keywords: Qt
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 29799, 30772    
Description Flags
Path to replace QList<QWebElement> by QWebElementCollection none

Description From 2009-10-26 03:35:42 PST
The function findAll() of QWebElement returns a QList of QWebElement. This return type does not give any flexibility to upgrade the API later, (like adding filtering on the list, or lazy population).

To add some flexibility, a d-pointer is needed in the return type. The type QWebElementCollection should be reintroduced.
------- Comment #1 From 2009-10-26 03:53:51 PST -------
Created an attachment (id=41858) [details]
Path to replace QList<QWebElement> by QWebElementCollection

This patch basically revert the commit 42994  (e4ed760783109673896551892c029dc043c70b71 on git).

The changes from the original patch are:
-QWebElement operator[] do not return a const QWebElement anymore to be coherent with the previous use of QList
-The new tests had to be adapted.

If the idea is accepted and we reintroduce QWebElementCollection, a new bug should be created in the tree 29843 to review the API of QWebElementCollection.
------- Comment #2 From 2009-10-26 05:57:21 PST -------
LGTM, feel free to create an API-spinoff
------- Comment #3 From 2009-10-26 06:06:12 PST -------
(From update of attachment 41858 [details])
Clearing flags on attachment: 41858

Committed r50058: <http://trac.webkit.org/changeset/50058>
------- Comment #4 From 2009-10-26 06:06:16 PST -------
All reviewed patches have been landed.  Closing bug.
------- Comment #5 From 2009-10-26 10:35:25 PST -------
I guess we need to add a follow up bug report reviewing all the API of this new class.