<?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>160011</bug_id>
          
          <creation_ts>2016-07-20 21:44:49 -0700</creation_ts>
          <short_desc>Crash accessing null renderer inside WebCore::DeleteSelectionCommand::doApply</short_desc>
          <delta_ts>2016-07-21 12:42:50 -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>New Bugs</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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="Ryosuke Niwa">rniwa</reporter>
          <assigned_to name="Ryosuke Niwa">rniwa</assigned_to>
          <cc>ap</cc>
    
    <cc>cdumez</cc>
    
    <cc>commit-queue</cc>
    
    <cc>darin</cc>
    
    <cc>enrica</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1213031</commentid>
    <comment_count>0</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2016-07-20 21:44:49 -0700</bug_when>
    <thetext>Crash accessing null renderer inside WebCore::DeleteSelectionCommand::doApply</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1213034</commentid>
    <comment_count>1</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2016-07-20 21:46:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/21400186&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1213035</commentid>
    <comment_count>2</comment_count>
      <attachid>284188</attachid>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2016-07-20 21:46:15 -0700</bug_when>
    <thetext>Created attachment 284188
Fixes the bug</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1213048</commentid>
    <comment_count>3</comment_count>
      <attachid>284188</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2016-07-20 22:48:37 -0700</bug_when>
    <thetext>Comment on attachment 284188
Fixes the bug

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

&gt; Source/WebCore/editing/DeleteSelectionCommand.cpp:867
&gt; +            if (textNode.length() &amp;&amp; textNode.renderer())

Is it valid for ending position to be a node without renderer? Should there be an assertion to hopefully catch the root cause in the future?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1213050</commentid>
    <comment_count>4</comment_count>
      <attachid>284188</attachid>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2016-07-20 22:52:43 -0700</bug_when>
    <thetext>Comment on attachment 284188
Fixes the bug

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

&gt;&gt; Source/WebCore/editing/DeleteSelectionCommand.cpp:867
&gt;&gt; +            if (textNode.length() &amp;&amp; textNode.renderer())
&gt; 
&gt; Is it valid for ending position to be a node without renderer? Should there be an assertion to hopefully catch the root cause in the future?

We try to avoid selecting a node without renderer but I wouldn&apos;t be surprised if we ended up getting it.
In general, I don&apos;t think m_endingPosition has any sort of guarantee like VisiblePosition&apos;s deepEquivalent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1213255</commentid>
    <comment_count>5</comment_count>
      <attachid>284188</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2016-07-21 12:42:45 -0700</bug_when>
    <thetext>Comment on attachment 284188
Fixes the bug

Clearing flags on attachment: 284188

Committed r203518: &lt;http://trac.webkit.org/changeset/203518&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1213256</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2016-07-21 12:42:50 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>284188</attachid>
            <date>2016-07-20 21:46:15 -0700</date>
            <delta_ts>2016-07-21 12:42:45 -0700</delta_ts>
            <desc>Fixes the bug</desc>
            <filename>bug-160011-20160720214517.patch</filename>
            <type>text/plain</type>
            <size>1464</size>
            <attacher name="Ryosuke Niwa">rniwa</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDIwMzQ4NykKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE3IEBACisyMDE2LTA3LTIwICBSeW9zdWtl
IE5pd2EgIDxybml3YUB3ZWJraXQub3JnPgorCisgICAgICAgIENyYXNoIGFjY2Vzc2luZyBudWxs
IHJlbmRlcmVyIGluc2lkZSBXZWJDb3JlOjpEZWxldGVTZWxlY3Rpb25Db21tYW5kOjpkb0FwcGx5
CisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xNjAwMTEK
KworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBBZGQgYSBu
dWxsIHBvaW50ZXIgY2hlY2sgZm9yIHJlbmRlcmVyKCkgY2FsbC4KKworICAgICAgICBVbmZvcnR1
bmF0ZWx5IG5v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yKCkpCiAgICAgICAgICAgICAgICAgc2hvdWxkUmViYWxh
Y2VXaGl0ZVNwYWNlID0gdGV4dE5vZGUucmVuZGVyZXIoKS0+c3R5bGUoKS50ZXh0U2VjdXJpdHko
KSA9PSBUU05PTkU7CiAgICAgICAgIH0gICAgICAgIAogICAgIH0K
</data>

          </attachment>
      

    </bug>

</bugzilla>