<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>50138</bug_id>
          
          <creation_ts>2010-11-28 22:40:17 -0800</creation_ts>
          <short_desc>Web Inspector: $x: any node should work in optional context parameter.</short_desc>
          <delta_ts>2011-02-08 07:38:21 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector (Deprecated)</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Yonathan Randolph">yonathan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>apavlov</cc>
    
    <cc>bweinstein</cc>
    
    <cc>joepeck</cc>
    
    <cc>keishi</cc>
    
    <cc>loislo</cc>
    
    <cc>pfeldman</cc>
    
    <cc>pmuellr</cc>
    
    <cc>rik</cc>
    
    <cc>timothy</cc>
    
    <cc>yurys</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>314260</commentid>
    <comment_count>0</comment_count>
      <attachid>74987</attachid>
    <who name="Yonathan Randolph">yonathan</who>
    <bug_when>2010-11-28 22:40:17 -0800</bug_when>
    <thetext>Created attachment 74987
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&apos;s $x doesn&apos;t have the context parameter at all.

Example invocation:
$x(&apos;body&apos;, document.documentElement)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>314312</commentid>
    <comment_count>1</comment_count>
      <attachid>74987</attachid>
    <who name="Alexander Pavlov (apavlov)">apavlov</who>
    <bug_when>2010-11-29 01:53:21 -0800</bug_when>
    <thetext>Comment on attachment 74987
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&apos;m not a reviewer to r- the change, though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>314597</commentid>
    <comment_count>2</comment_count>
    <who name="Pavel Feldman">pfeldman</who>
    <bug_when>2010-11-29 13:30:55 -0800</bug_when>
    <thetext>This change looks good. Please include WebCore/ChangeLog entry pointing to this bug (see other entries for reference) and I&apos;ll be able to r+ it. Thanks for the patch!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>315868</commentid>
    <comment_count>3</comment_count>
      <attachid>75319</attachid>
    <who name="Yonathan Randolph">yonathan</who>
    <bug_when>2010-12-01 13:56:35 -0800</bug_when>
    <thetext>Created attachment 75319
Patch to $x function including ChangeLog.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>315870</commentid>
    <comment_count>4</comment_count>
    <who name="Yonathan Randolph">yonathan</who>
    <bug_when>2010-12-01 13:59:29 -0800</bug_when>
    <thetext>Sorry it took so long to get the patch with ChangeLog. I recompiled and tried to make a unit test but apparently $x isn&apos;t available in injection tests (at least with --use-drt).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>347291</commentid>
    <comment_count>5</comment_count>
      <attachid>75319</attachid>
    <who name="Pavel Feldman">pfeldman</who>
    <bug_when>2011-02-08 05:30:52 -0800</bug_when>
    <thetext>Comment on attachment 75319
Patch to $x function including ChangeLog.

I&apos;ll rebase and land.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>347357</commentid>
    <comment_count>6</comment_count>
    <who name="Pavel Feldman">pfeldman</who>
    <bug_when>2011-02-08 07:35:53 -0800</bug_when>
    <thetext>Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	Source/WebCore/ChangeLog
	M	Source/WebCore/inspector/InjectedScriptSource.js
Committed r77931</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>347358</commentid>
    <comment_count>7</comment_count>
    <who name="Pavel Feldman">pfeldman</who>
    <bug_when>2011-02-08 07:38:21 -0800</bug_when>
    <thetext>I accidentally generated changelog entry with my name, will fix it in the next commit.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>74987</attachid>
            <date>2010-11-28 22:40:17 -0800</date>
            <delta_ts>2010-12-01 13:56:35 -0800</delta_ts>
            <desc>patch for the $x function.</desc>
            <filename>x.patch</filename>
            <type>text/plain</type>
            <size>781</size>
            <attacher name="Yonathan Randolph">yonathan</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvaW5zcGVjdG9yL2Zyb250LWVuZC9JbmplY3RlZFNjcmlwdC5qcwo9PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09Ci0tLSBXZWJDb3JlL2luc3BlY3Rvci9mcm9udC1lbmQvSW5qZWN0ZWRTY3JpcHQuanMJ
KHJldmlzaW9uIDY4NjUxKQorKysgV2ViQ29yZS9pbnNwZWN0b3IvZnJvbnQtZW5kL0luamVjdGVk
U2NyaXB0LmpzCSh3b3JraW5nIGNvcHkpCkBAIC02MjQsOCArNjI0LDkgQEAgQ29tbWFuZExpbmVB
UEkucHJvdG90eXBlID0gewogICAgIHsKICAgICAgICAgdmFyIG5vZGVzID0gW107CiAgICAgICAg
IHRyeSB7Ci0gICAgICAgICAgICB2YXIgZG9jID0gY29udGV4dCB8fCBkb2N1bWVudDsKLSAgICAg
ICAgICAgIHZhciByZXN1bHRzID0gZG9jLmV2YWx1YXRlKHhwYXRoLCBkb2MsIG51bGwsIFhQYXRo
UmVzdWx0LkFOWV9UWVBFLCBudWxsKTsKKyAgICAgICAgICAgIGNvbnRleHQgPSBjb250ZXh0IHx8
IGRvY3VtZW50OworICAgICAgICAgICAgdmFyIGRvYyA9IGNvbnRleHQub3duZXJEb2N1bWVudCB8
fCBjb250ZXh0OworICAgICAgICAgICAgdmFyIHJlc3VsdHMgPSBkb2MuZXZhbHVhdGUoeHBhdGgs
IGNvbnRleHQsIG51bGwsIFhQYXRoUmVzdWx0LkFOWV9UWVBFLCBudWxsKTsKICAgICAgICAgICAg
IHZhciBub2RlOwogICAgICAgICAgICAgd2hpbGUgKG5vZGUgPSByZXN1bHRzLml0ZXJhdGVOZXh0
KCkpCiAgICAgICAgICAgICAgICAgbm9kZXMucHVzaChub2RlKTsKCg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>75319</attachid>
            <date>2010-12-01 13:56:35 -0800</date>
            <delta_ts>2011-02-08 05:30:52 -0800</delta_ts>
            <desc>Patch to $x function including ChangeLog.</desc>
            <filename>x.patch</filename>
            <type>text/plain</type>
            <size>1356</size>
            <attacher name="Yonathan Randolph">yonathan</attacher>
            
              <data encoding="base64">SW5kZXg6IENoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBDaGFuZ2VMb2cJKHJldmlzaW9uIDczMDYz
KQorKysgQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTUgQEAKKzIwMTAtMTIt
MDEgIFlvbmF0aGFuIFJhbmRvbHBoICA8eW9uYXRoYW5AZ21haWwuY29tPgorCisgICAgICAgIFJl
dmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIFdlYiBJbnNwZWN0b3I6ICR4OiBh
bnkgbm9kZSBzaG91bGQgd29yayBpbiBvcHRpb25hbCBjb250ZXh0IHBhcmFtZXRlci4KKyAgICAg
ICAgaHR0cHM6Ly9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ldmFsdWF0ZSh4
cGF0aCwgY29udGV4dCwgbnVsbCwgWFBhdGhSZXN1bHQuQU5ZX1RZUEUsIG51bGwpOwogICAgICAg
ICAgICAgdmFyIG5vZGU7CiAgICAgICAgICAgICB3aGlsZSAobm9kZSA9IHJlc3VsdHMuaXRlcmF0
ZU5leHQoKSkKICAgICAgICAgICAgICAgICBub2Rlcy5wdXNoKG5vZGUpOwoK
</data>
<flag name="review"
          id="73232"
          type_id="1"
          status="+"
          setter="pfeldman"
    />
          </attachment>
      

    </bug>

</bugzilla>