[Webkit-unassigned] [Bug 62621] Span ID duplicated when pressing enter at beginning of span

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 14 15:43:37 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=62621


Ryosuke Niwa <rniwa at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1




--- Comment #2 from Ryosuke Niwa <rniwa at webkit.org>  2011-06-14 15:43:37 PST ---
(In reply to comment #1)
> 1. The InsertParagraphSeparator version actually operates as two functions paired together: getAncestorsInsideBlock() collects the ancestors and then cloneHierarchyUnderNewBlock() clones them. There doesn't appear to be much reason for this, so it should be okay to change.

Just having one function that collects and clones ancestors should work.

> 2. For listing the ancestors, getAncestorsInsideBlock takes an insertion Node and an outer block Element. It excludes both these nodes from the list of ancestors, only appending the elements between them. By contrast, cloneParagraphUnderNewElement() takes a start Position and an outer Node, and includes the position.deprecatedNode() and the outer node in the list of ancestors. Swapping between using positions and using nodes, counting ancestors differently, and keeping lists of Nodes instead of 
Elements is a bigger change in behavior. We also end up with another dependency on deprecatedNode.

The merged function should take a starting Position and the outer block node.  We may need to get rid of deprecatedNode dependency in a separate bug.

> 3. cloneParagraphUnderNewElement() has no return value. cloneHierarchyUnderNewBlock() returns the deepest Element in the ancestor list that was cloned. We'd need to add this functionality into cloneParagraphUnderNewElement(), but it seems like an arbitrary return value to add.

I agree. I'm curious why we'd need that.

> Do you still think that merging these functions is the right thing to do? I am working on a patch to do this, but because of the differences in functionality I'm having a lot of trouble getting the arguments to cloneParagraphUnderNewElement correct. Each time I fix a layout test, a different layout test breaks with a slightly different problem.

I think we should eventually merge these two functions, but that isn't really a requirement for you to fix other bugs.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list