Bug 30767

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

Description Benjamin Poulain 2009-10-26 03:35:42 PDT
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 Benjamin Poulain 2009-10-26 03:53:51 PDT
Created attachment 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 Tor Arne Vestbø 2009-10-26 05:57:21 PDT
LGTM, feel free to create an API-spinoff
Comment 3 WebKit Commit Bot 2009-10-26 06:06:12 PDT
Comment on attachment 41858 [details]
Path to replace QList<QWebElement> by QWebElementCollection

Clearing flags on attachment: 41858

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