Bug 48716

Summary: [Qt] Support nodesFromRect in DRT
Product: WebKit Reporter: Robert Hogan <robert>
Component: WebKit QtAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, commit-queue, eric, kling, ossy, tonikitoo, webkit.review.bot
Priority: P2 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch
none
Patch none

Description Robert Hogan 2010-10-30 06:31:08 PDT
To do this we need to support passing the document's document-element object across the bridge.
Comment 1 Robert Hogan 2010-10-30 06:49:21 PDT
Created attachment 72434 [details]
Patch
Comment 2 Antonio Gomes 2010-10-30 07:03:20 PDT
Comment on attachment 72434 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=72434&action=review

> WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp:797
> +    RefPtr<NodeList> nodes = doc->nodesFromRect(x, y, top, right, bottom, left, ignoreClipping);
> +    for (int i = 0; i < nodes->length(); i++) {
> +        QVariant v;
> +        v.setValue(QWebElement(nodes->item(i)));

what happens if nodes->item(i) is a text node? i.e. not a WebCore::Element*
Comment 3 Antonio Gomes 2010-10-30 07:39:46 PDT
Comment on attachment 72434 [details]
Patch

Please add a comment about the known problem on comment #2.
Comment 4 Robert Hogan 2010-10-30 08:57:38 PDT
Andreas, what do you think? Change to qt_runtime ok?
Comment 5 Robert Hogan 2010-10-30 09:26:24 PDT
Created attachment 72439 [details]
Patch
Comment 6 WebKit Commit Bot 2010-10-31 19:31:01 PDT
Comment on attachment 72439 [details]
Patch

Clearing flags on attachment: 72439

Committed r71004: <http://trac.webkit.org/changeset/71004>
Comment 7 WebKit Commit Bot 2010-10-31 19:31:07 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 WebKit Review Bot 2010-10-31 19:56:53 PDT
http://trac.webkit.org/changeset/71004 might have broken Qt Linux Release
The following tests are not passing:
fast/dom/nodesFromRect-basic.html
Comment 9 Antonio Gomes 2010-10-31 20:44:06 PDT
(In reply to comment #8)
> http://trac.webkit.org/changeset/71004 might have broken Qt Linux Release
> The following tests are not passing:
> fast/dom/nodesFromRect-basic.html

worked locally for me:

$ WEBKITOUTPUTDIR=`pwd`/WebKitBuild/Qt/ run-webkit-tests --qt LayoutTests/fast/dom/nodesFromRect-basic.html 
Running build-dumprendertree
Running tests from /home/agomes/Devel/webkit/webkit/LayoutTests
Testing 1 test cases.
fast/dom .
1.80s total testing time

all 1 test cases succeeded
Comment 10 Csaba Osztrogonác 2010-11-01 08:20:32 PDT
New bug filed on this fail: https://bugs.webkit.org/show_bug.cgi?id=48758