<?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>101771</bug_id>
          
          <creation_ts>2012-11-09 09:15:24 -0800</creation_ts>
          <short_desc>Selection goes crazy with floats that have margins</short_desc>
          <delta_ts>2017-09-06 16:08:46 -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>Text</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.chromium.org/p/chromium/issues/detail?id=758526</see_also>
    
    <see_also>https://bugzilla.mozilla.org/show_bug.cgi?id=1397514</see_also>
          <bug_file_loc>http://neutrino.io/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>176096</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ojan Vafai">ojan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>hyatt</cc>
    
    <cc>jfernandez</cc>
    
    <cc>mitz</cc>
    
    <cc>rniwa</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>763072</commentid>
    <comment_count>0</comment_count>
      <attachid>173321</attachid>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2012-11-09 09:15:24 -0800</bug_when>
    <thetext>Created attachment 173321
reduced testcase

See test case. In general we don&apos;t handle margins very well with selections (e.g. any page that puts all it&apos;s contents in a margin: auto container). Here&apos;s another case encountered in the real world.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1342002</commentid>
    <comment_count>1</comment_count>
    <who name="Javier Fernandez">jfernandez</who>
    <bug_when>2017-08-24 03:45:18 -0700</bug_when>
    <thetext>I don&apos;t think margins have a direct effect on the issue. I think that the root cause is extending the selection until reaching the float&apos;s container. 

I&apos;ll attach another case which I think reveals the same issue without margins.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1342003</commentid>
    <comment_count>2</comment_count>
      <attachid>318979</attachid>
    <who name="Javier Fernandez">jfernandez</who>
    <bug_when>2017-08-24 03:45:56 -0700</bug_when>
    <thetext>Created attachment 318979
another test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1342005</commentid>
    <comment_count>3</comment_count>
    <who name="Javier Fernandez">jfernandez</who>
    <bug_when>2017-08-24 03:56:56 -0700</bug_when>
    <thetext>FTR, the issue is clearly reproducible in current trunk.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1342006</commentid>
    <comment_count>4</comment_count>
    <who name="Javier Fernandez">jfernandez</who>
    <bug_when>2017-08-24 04:00:50 -0700</bug_when>
    <thetext>I can reproduce the issue described in both test cases in FF as well.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>173321</attachid>
            <date>2012-11-09 09:15:24 -0800</date>
            <delta_ts>2012-11-09 09:15:24 -0800</delta_ts>
            <desc>reduced testcase</desc>
            <filename>scratch3.html</filename>
            <type>text/html</type>
            <size>953</size>
            <attacher name="Ojan Vafai">ojan</attacher>
            
              <data encoding="base64">PHN0eWxlPgouY29sdW1ucyB7CiAgICBmbG9hdDogbGVmdDsKICAgIG1hcmdpbjogMjBweDsKICAg
IGJvcmRlcjogMnB4IHNvbGlkOwp9Cjwvc3R5bGU+Cgo8ZGl2PlRoZSBjYXNlcyBiZWxvdyBzaG93
IGRpZmZlcmVudCBzaWRlIGVmZmVjdHMgb2YgdGhlIHNhbWUgYnVnLiBUa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mF6eSBzZWxlY3Rpb24uPC9kaXY+CjwvZGl2Pgo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>318979</attachid>
            <date>2017-08-24 03:45:56 -0700</date>
            <delta_ts>2017-08-24 03:45:56 -0700</delta_ts>
            <desc>another test case</desc>
            <filename>dragSelectionExtent1.html</filename>
            <type>text/html</type>
            <size>273</size>
            <attacher name="Javier Fernandez">jfernandez</attacher>
            
              <data encoding="base64">PGh0bWw+Cjxib2R5IHN0eWxlPSdmbG9hdDogbGVmdDsnPgpTdGFydCBzZWxlY3RpbmcgdGhpcyB0
ZXh0PGJyPgpmcm9tIGFueSBsaW5lLCBhbmQgZHJhZyB0aGU8YnI+CnNlbGVjdGlvbiBvdXRzaWRl
IHRoZSB0ZXh0IGFyZWEuPGJyPgpOb3RpY2UgaG93LCBpbiBDaHJvbWUsIHRoZTxicj4Kc2VsZWN0
aW9uIGV4dGVudCAianVtcHMiIHRvPGJyPgp0aGUgdG9wIHdoZW4gdGhlIG1vdXNlIG1vdmVzPGJy
PgpvdXRzaWRlIHRoZSB0ZXh0IGFyZWEuPGJyPgo8L2JvZHk+CjwvaHRtbD4K
</data>

          </attachment>
      

    </bug>

</bugzilla>