<?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>135281</bug_id>
          
          <creation_ts>2014-07-24 19:58:28 -0700</creation_ts>
          <short_desc>Crashes under scanSelectionForTelephoneNumbers in Range::text() on some sites</short_desc>
          <delta_ts>2014-07-24 20:13:00 -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>WebCore Misc.</component>
          <version>528+ (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="Tim Horton">thorton</reporter>
          <assigned_to name="Tim Horton">thorton</assigned_to>
          <cc>beidson</cc>
    
    <cc>enrica</cc>
    
    <cc>rniwa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1024754</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2014-07-24 19:58:28 -0700</bug_when>
    <thetext>Steps to Reproduce:

1. Load http://dict.leo.org/#/search=apple&amp;searchLoc=0&amp;resultOrder=basic&amp;multiwordShowSingle=on

&lt;rdar://problem/17803347&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1024758</commentid>
    <comment_count>1</comment_count>
      <attachid>235493</attachid>
    <who name="Tim Horton">thorton</who>
    <bug_when>2014-07-24 20:01:48 -0700</bug_when>
    <thetext>Created attachment 235493
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1024760</commentid>
    <comment_count>2</comment_count>
      <attachid>235493</attachid>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2014-07-24 20:03:59 -0700</bug_when>
    <thetext>Comment on attachment 235493
patch

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

&gt; Source/WebCore/editing/Editor.cpp:3396
&gt;      RefPtr&lt;Range&gt; extendedRange = extendedSelection.toNormalizedRange();
&gt;  
&gt; +    if (!extendedRange) {

Looks like we can move extendedRange into the if expression and then wrap the following ~8 lines of code inside the if statement instead.
That way, we make exactly one call to selectedTelephoneNumberRangesChanged.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1024767</commentid>
    <comment_count>3</comment_count>
      <attachid>235493</attachid>
    <who name="Tim Horton">thorton</who>
    <bug_when>2014-07-24 20:11:43 -0700</bug_when>
    <thetext>Comment on attachment 235493
patch

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

&gt;&gt; Source/WebCore/editing/Editor.cpp:3396
&gt;&gt; +    if (!extendedRange) {
&gt; 
&gt; Looks like we can move extendedRange into the if expression and then wrap the following ~8 lines of code inside the if statement instead.
&gt; That way, we make exactly one call to selectedTelephoneNumberRangesChanged.

I&apos;m teetering back and forth between the two options, because I prefer the early return but at the same time having two calls to selectedTelephoneNumberRangesChanged is kind of annoying. That said, there&apos;s another early return that calls selectedTelephoneNumberRangesChanged above, and I would never make this change to that one, so I think I&apos;m going to keep it consistent. Thanks for your help and review!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1024768</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2014-07-24 20:13:00 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/171577</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>235493</attachid>
            <date>2014-07-24 20:01:48 -0700</date>
            <delta_ts>2014-07-24 20:11:43 -0700</delta_ts>
            <desc>patch</desc>
            <filename>range.diff</filename>
            <type>text/plain</type>
            <size>1512</size>
            <attacher name="Tim Horton">thorton</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0No
YW5nZUxvZwppbmRleCBmNmM4NzJiLi40NDFlMjhmIDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViQ29y
ZS9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTYg
QEAKKzIwMTQtMDctMjQgIFRpbSBIb3J0b24gIDx0aW1vdGh5X2hvcnRvbkBhcHBsZS5jb20+CisK
KyAgICAgICAgQ3Jhc2hlcyB1bmRlciBzY2FuU2VsZWN0aW9uRm9yVGVsZXBob25lTnVtYmVycyBp
biBSYW5nZTo6dGV4dCgpIG9uIHNvbWUgc2l0ZXMKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtp
dC5vcmcvc2hvd19idWcuY2dpP2lkPTEzNTI4MQorICAgICAgICA8cmRhcjovL3Byb2JsZW0vMTc4
MDMzNDc+CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAg
KiBlZGl0aW5nL0VkaXRvci5jcHA6CisgICAgICAgIChXZWJDb3JlOjpFZGl0b3I6OnNjYW5TZWxl
Y3Rpb25Gb3JUZWxlcGhvbmVOdW1iZXJzKToKKyAgICAgICAgdG9Ob3JtYWxpemVkUmFuZ2UgaXMg
bm90IGd1YXJhbnRlZWQgdG8gcmV0dXJuIGEgbm9uLW51bGwgcmFuZ2UuCisgICAgICAgIElmIGl0
IHJldHVybnMgbnVsbCwgcGFzcyB0aGUgZW1wdHkgbWFya2VkUmFuZ2VzIGRvd24gdG8gdGhlIGNs
aWVudCBhcyBvdXIg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aGUgYWN0dWFsIHNlbGVjdGlvbiByYW5nZS4K
</data>
<flag name="review"
          id="260066"
          type_id="1"
          status="+"
          setter="rniwa"
    />
          </attachment>
      

    </bug>

</bugzilla>