[Webkit-unassigned] [Bug 24167] Second paragraph is converted from em to px when applying bullets

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 19 12:46:33 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=24167


Aryeh Gregor <ayg at aryeh.name> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ayg at aryeh.name




--- Comment #2 from Aryeh Gregor <ayg at aryeh.name>  2011-08-19 12:46:33 PST ---
IE9 and Opera 11.50 produce

  <ul><li><div style="font-size: 1.3em">1</div></li><li><div style="font-size: 1.1em">2</div></li></ul>

Firefox 7.0a2 produces

  <ul><li>1</li><li>2</li></ul>

so it strips the style.  My spec produces

  <ul><li style="font-size: 1.3em">1</li><li style="font-size: 1.1em">2</li></ul>

which IMO is the best.  :)  Basically I have an explicit step in the insert(un)orderedlist algorithm where if we'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,<!doctype html>
<div contenteditable>
<div style="font-size: 1.3em">1</div>
<div style="font-size: 1.1em">2</div>
</div>
<script>
getSelection().selectAllChildren(document.querySelector("div"));
document.execCommand("insertunorderedlist", false, "");
document.body.textContent =
document.querySelector("div").innerHTML;
</script>

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list