<?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>62041</bug_id>
          
          <creation_ts>2011-06-03 12:43:44 -0700</creation_ts>
          <short_desc>The output of editing/pasteboard/paste-4039777-fix.html is wrong</short_desc>
          <delta_ts>2017-07-18 08:29:42 -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>NEW</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>
          <dependson>34564</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ryosuke Niwa">rniwa</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>enrica</cc>
    
    <cc>jparent</cc>
    
    <cc>sullivan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>415102</commentid>
    <comment_count>0</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-06-03 12:43:44 -0700</bug_when>
    <thetext>The output of editing/pasteboard/paste-4039777-fix.html contains expected result but this does not match the actual result on ToT. Namely the div pasted is a child of ul in the actual result as supposed to be a sibling.

Here&apos;s paste-4039777-fix-expected.txt (I stripped out whitespace):
Expected result:
| &lt;ul&gt;
|   style=&quot;text-align:right;&quot;
|   &lt;li&gt;
|     &quot;A&quot;
| &lt;div&gt;
|   &lt;ul&gt;
|     &lt;li&gt;
|       &lt;a&gt;
|         href=&quot;&quot;
|         &quot;B&quot;
|       &lt;br&gt;
|       &quot;
            C 
        &quot;

Actual result:
| &lt;ul&gt;
|   style=&quot;text-align:right;&quot;
|   &lt;li&gt;
|     &quot;A&quot;
|   &lt;div&gt;
|     &lt;ul&gt;
|       &lt;li&gt;
|         &lt;a&gt;
|           href=&quot;&quot;
|           &quot;B&quot;
|         &quot; &quot;
|         &lt;br&gt;
|         &quot;C&lt;#selection-caret&gt;&quot;
| &lt;div&gt;
|   &lt;ul&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>415106</commentid>
    <comment_count>1</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-06-03 12:47:35 -0700</bug_when>
    <thetext>So here&apos;s my question.  While the actual result doesn&apos;t match the expected result, is expected result really what a user expects?

In http://simple-rte.rniwa.com/?editor=%3Cul%3E%3Cli%3Ehello%3C/li%3E%3Cli%3Eworld%3C/li%3E%3C/ul%3E%3Cdiv%3EWebKit%3C/div%3E&amp;script=editor%28%29.focus%28%29%3B

If you copy &amp; paste &quot;world
WebKit&quot; and paste it after &quot;hello&quot;, then I&apos;d get
&lt;ul&gt;&lt;li&gt;hello&lt;/li&gt;&lt;li&gt;world&lt;/li&gt;&lt;div&gt;WebKit&lt;/div&gt;&lt;li&gt;world&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;WebKit&lt;/div&gt;
on TOT.  i.e. both &quot;world&quot; and &quot;WebKit&quot; will be in the list and in a separate list item.

However, if we fix this bug, we&apos;ll get:
&lt;ul&gt;&lt;li&gt;hello&lt;/li&gt;&lt;li&gt;world&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;WebKit&lt;/div&gt;&lt;ul&gt;&lt;li&gt;world&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;WebKit&lt;/div&gt;

As far as I tested, new behavior matches FF3.6.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>415128</commentid>
    <comment_count>2</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2011-06-03 13:24:49 -0700</bug_when>
    <thetext>Just looking at the simple-rte.rniwa.com link, the Firefox behavior looks correct to me. I don&apos;t see how that link accurately reflects what this test is doing though. Maybe I&apos;m misreading the test.

Just at a quick glance, the expected result in this test looks right to me. What do you think it should be?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>415188</commentid>
    <comment_count>3</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2011-06-03 14:10:30 -0700</bug_when>
    <thetext>*** Bug 62047 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>415225</commentid>
    <comment_count>4</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-06-03 14:54:20 -0700</bug_when>
    <thetext>It turns out that the bug 34564 blocks this bug because span wraps ul and div being pasted :(</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>