Ticket #3051 (closed Bug: fixed)

Opened 5 years ago

Last modified 5 years ago

Domiterator incorrect with enforceRealBlock

Reported by: garry.yao Owned by: garry.yao
Priority: Normal Milestone: CKEditor 3.1
Component: General Version: 3.0 Beta 2
Keywords: Confirmed Cc:

Description (last modified by garry.yao) (diff)

When domiterator establish new block for one of the pseudo blocks, others should be left untouched, which is currently not respected.

Procedures

  1. Open the replace by code example page;
  2. Make the following content with selection:
    <div>
    	first
    	<p>paragraph</p>se^cond</div>
    
  3. Click on Increase Indent command.
  • Actual Result : A new paragraph is establish for text node 'first' and is indented also.
    <div>
    	<p style="margin-left: 40px;">
    		first</p>
    	<p>
    		paragraph</p>
    	<p style="margin-left: 40px;">
    		second</p>
    </div>
    
  • Expected Result : The pseudo block contains text 'first' should be left untouched while the 'second' chunk should be indented.
    <div>
    	first
    	<p>
    		paragraph</p>
    	<p style="margin-left: 40px;">
    		second</p>
    </div>
    

Attachments

test-domiterator.patch (4.7 KB) - added by garry.yao 5 years ago.
Unit Test Case
3051.patch (15.5 KB) - added by garry.yao 5 years ago.
3051_2.patch (5.1 KB) - added by garry.yao 5 years ago.

Change History

comment:1 Changed 5 years ago by garry.yao

  • Description modified (diff)
  • Summary changed from RangeIterator not correct with enforcing real blocks to Domiterator incorrect with enforceRealBlock

Changed 5 years ago by garry.yao

Unit Test Case

comment:2 Changed 5 years ago by garry.yao

  • Keywords Confirmed added
  • Description modified (diff)

comment:3 Changed 5 years ago by fredck

  • Priority changed from Normal to High

comment:4 Changed 5 years ago by garry.yao

  • Status changed from new to assigned
  • Owner set to garry.yao

Changed 5 years ago by garry.yao

comment:5 Changed 5 years ago by garry.yao

  • Keywords Review? added

The patch is mainly about fixing on anonymous block iteration problem, while also introduce a fix to collapsed range boundaries. TCs established for those issues are also in the patch.

comment:6 Changed 5 years ago by fredck

  • Keywords Review- added; Review? removed

This patch is breaking the getNextSourceNode and getPreviousSourceNode function. If startFromSibling is set to true, it must not in any way take one of the node children as the first node. That's why we have that parameter after all. So it's wrong to default it to the first child. If we have nothing after it, it's correct to have the function returning null.

comment:7 Changed 5 years ago by fredck

  • Priority changed from High to Normal

comment:8 Changed 5 years ago by garry.yao

This one is waiting for #3283.

comment:9 Changed 5 years ago by garry.yao

As discussed no #3203, the getNextSourceNode/getPreviousNode function should not suffer changes, so other implementation should be found to work around this issue.

Changed 5 years ago by garry.yao

comment:10 Changed 5 years ago by garry.yao

  • Keywords Review? added; Review- removed

The patch is containing the latest patch from #3313 for easy reviewing.

comment:11 Changed 5 years ago by garry.yao

The patch updated CKEDITOR.dom.range.enlarge method to reflect the newly introduced walker and fixing the bug on collapsed range; As discovered on #3292, we should not rely on CKEDITOR.dom.range.getBoundaryNodes for collapsed range, the patch instead use temporary bookmark to establish the boundary nodes to simplify codes.

comment:12 Changed 5 years ago by fredck

  • Milestone changed from CKEditor 3.0 to CKEditor 3.1

comment:13 Changed 5 years ago by garry.yao

  • Keywords Review? removed

This one will be waiting for #3304.

comment:14 Changed 5 years ago by alfonsoml

  • Version changed from SVN (FCKeditor) to CKEditor 3.0 Beta 2

comment:15 Changed 5 years ago by garry.yao

  • Status changed from assigned to closed
  • Resolution set to fixed

Unable to reproduce anymore on trunk.

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy