Bug 111793

Summary: (tests) make nodesFromRect.js print a list of nodes that were found
Product: WebKit Reporter: Christian Biesinger <cbiesinger>
Component: New BugsAssignee: Christian Biesinger <cbiesinger>
Status: RESOLVED FIXED    
Severity: Normal CC: allan.jensen, tonikitoo, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Christian Biesinger 2013-03-07 16:42:50 PST
(tests) make nodesFromRect.js print a list of nodes that were found
Comment 1 Christian Biesinger 2013-03-07 16:44:31 PST
Created attachment 192104 [details]
Patch
Comment 2 Antonio Gomes 2013-03-07 22:05:03 PST
Comment on attachment 192104 [details]
Patch

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

> LayoutTests/fast/dom/nodesFromRect/resources/nodesFromRect.js:21
> +    for (var i = 0; i < nodes.length; i++) {

I would have omitted the {}
Comment 3 Allan Sandfeld Jensen 2013-03-08 02:25:21 PST
Comment on attachment 192104 [details]
Patch

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

> LayoutTests/fast/dom/nodesFromRect/resources/nodesFromRect.js:23
>    if (nodes.length != list.length) {
> +    var foundNodes = [];
> +    for (var i = 0; i < nodes.length; i++) {
> +      foundNodes.push(nodes[i].localName);
> +    }

Couldn't you move the logic that makes a string out of a list of nodes from nodesFromRectAsString to a separate method, and reuse that? It would give you more than the localname.
Comment 4 Christian Biesinger 2013-03-08 08:46:08 PST
Comment on attachment 192104 [details]
Patch

Nice! I didn't notice that prettyprinting code there. I'll reuse it.
Comment 5 Christian Biesinger 2013-03-08 09:00:19 PST
Created attachment 192235 [details]
Patch
Comment 6 Allan Sandfeld Jensen 2013-03-11 08:24:07 PDT
Comment on attachment 192235 [details]
Patch

LGTM
Comment 7 WebKit Review Bot 2013-03-11 08:33:46 PDT
Comment on attachment 192235 [details]
Patch

Clearing flags on attachment: 192235

Committed r145364: <http://trac.webkit.org/changeset/145364>
Comment 8 WebKit Review Bot 2013-03-11 08:33:50 PDT
All reviewed patches have been landed.  Closing bug.