Opened 13 years ago

Last modified 13 years ago

#8344 review New Feature

Remove nested duplicate inline elements on parsing

Reported by: Frederico Caldeira Knabben Owned by: Frederico Caldeira Knabben
Priority: Normal Milestone:
Component: Core : Parser Version:
Keywords: IBM Cc:

Description

When parsing something like this:

<b>One <b>Two</b> Three</b>

... the editor parser should simplify the output, having this:

<b>One Two Three</b>

Other than cleanup up the HTML, it would help on the overall editor performance, because it'll reduce the DOM tree size on those cases.

This is a followup of #8322.

Attachments (1)

8344.patch (2.8 KB) - added by Frederico Caldeira Knabben 13 years ago.

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by Frederico Caldeira Knabben

Attachment: 8344.patch added

comment:1 Changed 13 years ago by Frederico Caldeira Knabben

Owner: set to Frederico Caldeira Knabben
Status: newreview

The idea on this patch is to simply ignore nested inline elements that are totally identical.

Tests have been added to cover this tickets and support the changes on t/8344:
http://ckeditor.t/dt/core/htmlparser/htmlparser.html
http://ckeditor.t/dt/core/htmlparser/element.html

The attachment provided at #8322 can be useful for testing.

As expected, I've noticed some impact on the parser performance due to this change. While the above attachment will perform better, good quality HTML may suffer a bit with it. Of course, we're talking about a few milliseconds difference.

comment:2 Changed 13 years ago by Satya Minnekanti

Steps we used to reproduce the defect

Copy the content from attached file, paste into source view and go back to Rich Text

we have tried the patch and these are the issues that we have found

FF some content lost when we pasted the content and switched to Rich text ( Paragraphs of text between test line 1 & Test line 7 are missing.)

IE9 browser crashes when we paste the text go to rich text back to source and then back to Rich text

IE(6,7,8), FF ,Opera 2 new empty paragraphs(&nbsp;) added at beginning of doc every time we navigate between souce and rich text or we destroy and create Editor instances

comment:3 Changed 13 years ago by Satya Minnekanti

Keywords: IBM added
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy