Bug 111793 - (tests) make nodesFromRect.js print a list of nodes that were found
Summary: (tests) make nodesFromRect.js print a list of nodes that were found
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Christian Biesinger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-07 16:42 PST by Christian Biesinger
Modified: 2013-03-11 08:33 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.78 KB, patch)
2013-03-07 16:44 PST, Christian Biesinger
no flags Details | Formatted Diff | Diff
Patch (4.47 KB, patch)
2013-03-08 09:00 PST, Christian Biesinger
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.