Bug 50138 - Web Inspector: $x: any node should work in optional context parameter.
Summary: Web Inspector: $x: any node should work in optional context parameter.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-28 22:40 PST by Yonathan Randolph
Modified: 2011-02-08 07:38 PST (History)
10 users (show)

See Also:


Attachments
patch for the $x function. (781 bytes, patch)
2010-11-28 22:40 PST, Yonathan Randolph
no flags Details | Formatted Diff | Diff
Patch to $x function including ChangeLog. (1.32 KB, patch)
2010-12-01 13:56 PST, Yonathan Randolph
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yonathan Randolph 2010-11-28 22:40:17 PST
Created attachment 74987 [details]
patch for the $x function.

The optional context parameter of the $x function currently has to be a document, but it should allow any node. Note: Firebug's $x doesn't have the context parameter at all.

Example invocation:
$x('body', document.documentElement)
Comment 1 Alexander Pavlov (apavlov) 2010-11-29 01:53:21 PST
Comment on attachment 74987 [details]
patch for the $x function.

This change lacks at least a ChangeLog entry. Please see http://webkit.org/coding/contributing.html for contributing guidelines. I'm not a reviewer to r- the change, though.
Comment 2 Pavel Feldman 2010-11-29 13:30:55 PST
This change looks good. Please include WebCore/ChangeLog entry pointing to this bug (see other entries for reference) and I'll be able to r+ it. Thanks for the patch!
Comment 3 Yonathan Randolph 2010-12-01 13:56:35 PST
Created attachment 75319 [details]
Patch to $x function including ChangeLog.
Comment 4 Yonathan Randolph 2010-12-01 13:59:29 PST
Sorry it took so long to get the patch with ChangeLog. I recompiled and tried to make a unit test but apparently $x isn't available in injection tests (at least with --use-drt).
Comment 5 Pavel Feldman 2011-02-08 05:30:52 PST
Comment on attachment 75319 [details]
Patch to $x function including ChangeLog.

I'll rebase and land.
Comment 6 Pavel Feldman 2011-02-08 07:35:53 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	Source/WebCore/ChangeLog
	M	Source/WebCore/inspector/InjectedScriptSource.js
Committed r77931
Comment 7 Pavel Feldman 2011-02-08 07:38:21 PST
I accidentally generated changelog entry with my name, will fix it in the next commit.