Paste list structure from MS-Word conditional comment lost

ASSIGNED
Assigned to

Status

()

ASSIGNED
8 years ago
7 years ago

People

(Reporter: yaojun85, Assigned: Ehsan)

Tracking

({regression})

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [post-2.0], URL)

Attachments

(2 attachments)

(Reporter)

Description

8 years ago
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
(Reporter)

Comment 1

8 years ago
Created attachment 492260 [details]
MS Word document containing a list structure
(Assignee)

Updated

8 years ago
Assignee: nobody → ehsan
Whiteboard: [post-2.0]
(Assignee)

Comment 2

8 years ago
Created attachment 520240 [details]
Clipboard raw HTML data put on the clipboard by Word

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.
(Assignee)

Comment 3

8 years ago
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.
(Assignee)

Comment 4

8 years ago
Garry, is there any actual reason why these comments are important to you?
(Assignee)

Updated

8 years ago
Blocks: 520189
(Assignee)

Updated

8 years ago
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.
(Assignee)

Comment 6

8 years ago
Makes sense to me.
Depends on: 482909
You need to log in before you can comment on or make changes to this bug.