<?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>61484</bug_id>
          
          <creation_ts>2011-05-25 16:56:12 -0700</creation_ts>
          <short_desc>When copying a wrapped block of text, all whitespace before a word may be eaten</short_desc>
          <delta_ts>2011-05-26 05:46:25 -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>HTML Editing</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>UNCONFIRMED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Bartosz Brachaczek">b.brachaczek</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>rniwa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>410033</commentid>
    <comment_count>0</comment_count>
    <who name="Bartosz Brachaczek">b.brachaczek</who>
    <bug_when>2011-05-25 16:56:12 -0700</bug_when>
    <thetext>To be precise: When copying a wrapped block of text, all whitespace before a word is eaten in resulting rich text if that word is the first word in line and is in different HTML tag than the last word in previous line. Plain text is correct.

Example HTML code:

&lt;span&gt;text text text text text text text text&lt;/span&gt;
&lt;span&gt;text text text text text text text text&lt;/span&gt;
      text text text text text text text text
&lt;span&gt;text text text text text text text text&lt;/span&gt;

If you set WebKit&apos;s widget width so that it can hold exactly eight &quot;text&quot; words in each line, then select all and copy it, you&apos;ll get incorrect rich text in clipboard. When pasting to OpenOffice.org Writer, you&apos;ll get no space between each 8*n&apos;th and 8*n+1&apos;st word. On a side note, if that text block is wrapped in a different way, whitespace isn&apos;t eaten but in those places I get non-breaking spaces in OO.o Writer and &apos;&lt;span class=&quot;Apple-converted-space&quot;&gt; &lt;/span&gt;&apos; in HTML clipboard data retrieved using Qt and Qt-WebKit.

Reproduced on Chromium 12.0.742.53 and on Qt-WebKit shipped with Qt 4.7.3 on Linux.

Might be related to or even a dupe of Bug 31073.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>410229</commentid>
    <comment_count>1</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-05-25 23:36:05 -0700</bug_when>
    <thetext>This is probably a duplicate of the bug 54598.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>410368</commentid>
    <comment_count>2</comment_count>
    <who name="Bartosz Brachaczek">b.brachaczek</who>
    <bug_when>2011-05-26 05:46:25 -0700</bug_when>
    <thetext>Hmm, you figured out that bug 54598 reproduces iff word-wrap is set to break-word. But I figured out that this bug reproduces iff white-space is set to normal or pre-line (doesn&apos;t reproduce with pre-wrap and obviously with pre and nowrap as well as they disable wrapping at all) and word-wrap doesn&apos;t affect it.

It reproduces with:

&lt;div style=&quot;word-wrap: normal; white-space: normal;&quot;&gt;&lt;span&gt;text text text text text text text text&lt;/span&gt; &lt;span&gt;text text text text text text text text&lt;/span&gt;&lt;/div&gt;

as well as with:

&lt;div style=&quot;word-wrap: break-word; white-space: normal;&quot;&gt;&lt;span&gt;text text text text text text text text&lt;/span&gt; &lt;span&gt;text text text text text text text text&lt;/span&gt;&lt;/div&gt;

But doesn&apos;t reproduce with:

&lt;div style=&quot;word-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;span&gt;text text text text text text text text&lt;/span&gt; &lt;span&gt;text text text text text text text text&lt;/span&gt;&lt;/div&gt;

Though, I haven&apos;t tried your patch from bug 54598.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>