Open Bug 613912 Opened 14 years ago Updated 2 years ago

Paste list structure from MS-Word conditional comment lost

Categories

(Core :: DOM: Editor, defect)

x86
Windows 7
defect

Tracking

()

People

(Reporter: yaojun85, Unassigned)

References

()

Details

(Keywords: regression, Whiteboard: [post-2.0])

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.12 (KHTML, like Gecko) Chrome/9.0.576.0 Safari/534.12 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 When pasting a list structure from MS Word document on Windows, the conditional comment "<!--[if !supportLists]-->" that was originally presented in older versions has no more appearance. Reproducible: Always Steps to Reproduce: 1.Copy the list structure in attached document 2.Paste it into "contentediable" frame 3.Check the HTML codes in 'Source' mode. Actual Results: <p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;"><span style="" lang="EN-US"><span style="">1.<span style="font: 7pt &quot;Times New Roman&quot;;">&nbsp;&nbsp;&nbsp; </span></span></span><span dir="LTR"></span><span lang="EN-US">List item1</span></p> Expected Results: <p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="" lang="EN-US"><span style="">1.<span style="font: 7pt &quot;Times New Roman&quot;;">&nbsp;&nbsp;&nbsp; </span></span></span><!--[endif]--><span dir="LTR"></span><span lang="EN-US">List item1</span></p> The expected result is what we had in FF3.0
Assignee: nobody → ehsan
Whiteboard: [post-2.0]
This is what Word puts on the clipboard in the HTML format when you copy the list in the attached file to the clipboard. Note that the conditional comment there is <![if !supportLists]>, which is not a valid HTML comment.
Henri, do you know how the fragment parser handles something like <![if !supportLists]>? Will it call AddDocTypeDecl on the content sink when it encounters such a thing? That might explain why we're skipping it, since we just return NS_OK from AddDocTypeDecl without actually doing anything.
Garry, is there any actual reason why these comments are important to you?
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Keywords: regression
(In reply to comment #3) > Henri, do you know how the fragment parser handles something like <![if > !supportLists]>? Will it call AddDocTypeDecl on the content sink when it > encounters such a thing? I don't know what the old parser does. The new parser generates a comment node. Since this is marked post-2.0, I suggest not fixing this in the old parser and getting bug 482909 landed instead.
Makes sense to me.
Depends on: 482909
Assignee: ehsan → nobody
Status: ASSIGNED → NEW
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: