<?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>24167</bug_id>
          
          <creation_ts>2009-02-25 11:51:22 -0800</creation_ts>
          <short_desc>Second paragraph is converted from em to px when applying bullets</short_desc>
          <delta_ts>2022-12-01 15:18:16 -0800</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>All</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc>https://jsfiddle.net/mv6ej3r7/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Robby Walker">robbyw</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ayg</cc>
    
    <cc>eric</cc>
    
    <cc>jparent</cc>
    
    <cc>justin.garcia</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>110996</commentid>
    <comment_count>0</comment_count>
    <who name="Robby Walker">robbyw</who>
    <bug_when>2009-02-25 11:51:22 -0800</bug_when>
    <thetext>Start with the following HTML:

&lt;div style=&quot;font-size: 1.3em&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;font-size: 1.1em&quot;&gt;2&lt;/div&gt;

Select all and add bullets.  Observe the HTML is now:

&lt;div style=&quot;font-size: 1.3em&quot;&gt;&lt;ul&gt;&lt;li&gt;1&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 18px; &quot;&gt;2&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 1.1em&quot;&gt;2&lt;/div&gt;

It is especially strange that the first LI stays in em but the second converts to px.

(This is the root cause of a bug in Google Presentations.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111001</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-02-25 12:27:28 -0800</bug_when>
    <thetext>Would be ideal to turn this into a self-contained test case attached to this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>453999</commentid>
    <comment_count>2</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-08-19 12:46:33 -0700</bug_when>
    <thetext>IE9 and Opera 11.50 produce

  &lt;ul&gt;&lt;li&gt;&lt;div style=&quot;font-size: 1.3em&quot;&gt;1&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style=&quot;font-size: 1.1em&quot;&gt;2&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;

Firefox 7.0a2 produces

  &lt;ul&gt;&lt;li&gt;1&lt;/li&gt;&lt;li&gt;2&lt;/li&gt;&lt;/ul&gt;

so it strips the style.  My spec produces

  &lt;ul&gt;&lt;li style=&quot;font-size: 1.3em&quot;&gt;1&lt;/li&gt;&lt;li style=&quot;font-size: 1.1em&quot;&gt;2&lt;/li&gt;&lt;/ul&gt;

which IMO is the best.  :)  Basically I have an explicit step in the insert(un)orderedlist algorithm where if we&apos;re indenting a div or p, we convert it to an li, preserving all its attributes:

http://aryeh.name/spec/editing/editing.html#toggling-lists


Self-contained test case (who needs attachments?):

data:text/html,&lt;!doctype html&gt;
&lt;div contenteditable&gt;
&lt;div style=&quot;font-size: 1.3em&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;font-size: 1.1em&quot;&gt;2&lt;/div&gt;
&lt;/div&gt;
&lt;script&gt;
getSelection().selectAllChildren(document.querySelector(&quot;div&quot;));
document.execCommand(&quot;insertunorderedlist&quot;, false, &quot;&quot;);
document.body.textContent =
document.querySelector(&quot;div&quot;).innerHTML;
&lt;/script&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1916080</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-12-01 15:18:16 -0800</bug_when>
    <thetext>Changed the test case from Comment 02 into JSFiddle and added to URL:

*** Safari 16.1 ***

&lt;div style=&quot;font-size: 1.3em&quot;&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-size: 1.3em;&quot;&gt;1&lt;/span&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: 1.1em;&quot;&gt;2&lt;/span&gt;&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;

*** Chrome Canary 110 ***

&lt;div style=&quot;font-size: 1.3em&quot;&gt;&lt;ul&gt;&lt;li&gt;1&lt;/li&gt;&lt;li&gt;2&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;

*** Firefox Nightly 109 ***

 &lt;ul&gt;&lt;li&gt;1 &lt;/li&gt;&lt;li&gt;2&lt;/li&gt;&lt;/ul&gt; 

_______

Just wanted to share updated test result. Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>