<?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>147302</bug_id>
          
          <creation_ts>2015-07-25 21:34:31 -0700</creation_ts>
          <short_desc>Web Inspector: Start using Node.prototype.before</short_desc>
          <delta_ts>2015-07-25 21:45:17 -0700</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</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=147301</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Nikita Vasilyev">nvasilyev</reporter>
          <assigned_to name="Nikita Vasilyev">nvasilyev</assigned_to>
          <cc>graouts</cc>
    
    <cc>joepeck</cc>
    
    <cc>jonowells</cc>
    
    <cc>mattbaker</cc>
    
    <cc>nvasilyev</cc>
    
    <cc>timothy</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1112271</commentid>
    <comment_count>0</comment_count>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2015-07-25 21:34:31 -0700</bug_when>
    <thetext>https://bugs.webkit.org/show_bug.cgi?id=74648 introduced Node.prototype.append, among a few other DOM methods.

Convert the following code:

    refElem.parendNode.insertBefore(newElem, refElem)

to

    refElem.before(newElem)


However, we can&apos;t safely convert all occurrences of &quot;insertBefore&quot; to &quot;before&quot;.

    baseElem.insertBefore(newElem, refElem)

refElem could be a null here. refElem.before(newElem) would cause an error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1112272</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2015-07-25 21:34:51 -0700</bug_when>
    <thetext>&lt;rdar://problem/22000400&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1112273</commentid>
    <comment_count>2</comment_count>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2015-07-25 21:43:13 -0700</bug_when>
    <thetext>I have found only one instance that satisfier the following requirement:

elemA.parentElement.insertBefore(highlightNode, elemA);
\                                               /
 \------------------ same elements ------------/


https://github.com/WebKit/webkit/blob/981bae9952b1f312b89d362fd39768c075408669/Source/WebInspectorUI/UserInterface/Base/Main.js#L1990

Probably doesn&apos;t worth a patch.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>