Bug 12874
Summary: | execCommand FontSize -webkit-xxx-large instead of passed px value | ||
---|---|---|---|
Product: | WebKit | Reporter: | Peer Bremer <peer> |
Component: | HTML Editing | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | CC: | emerick, kai |
Priority: | P2 | ||
Version: | 523.x (Safari 3) | ||
Hardware: | Mac | ||
OS: | OS X 10.4 |
Peer Bremer
document.execCommand("FontSize", false, str);
Before passing "10px" to this function produced:
<SPAN class="Apple-style-span" style="font-size: 10px;">Text</SPAN>
Now this gives me no matter what I pass:
<span class="Apple-style-span" style="font-size: -webkit-xxx-large;">Text</span>
compactible format, with much less control unless there is another web kit command to pass a font size with a point or pixel value.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Justin Garcia
We changed this operation to match the spec:
http://msdn.microsoft.com/workshop/author/dhtml/reference/constants/fontsize.asp
Kai Bansner
I just did a little testing with the lastest nightly. You can set the font-size using .execCommand('FontSize' and values 1-7, but .queryCommandValue('FontSize') returns the font-size in pixels...
Not consistent units! Is there a way to convert the result of .queryCommandValue('FontSize') to the corresponding 1-7 value in order to increment font size?
Emerick Rogul
I think this bug should be reopened. Comment #1 indicates that the behavior was changed to match Microsoft's spec. The provided link is dead, but I believe the following link replaces it:
http://msdn.microsoft.com/en-us/library/ms530759(VS.85).aspx
Based on the information in that spec, I should be able to specify 14pt or 14px (among a number of other types). However, WebKit just converts these to -webkit-xxx-large.