[Webkit-unassigned] [Bug 33950] contentEditable with "position:relative" paragraphs is buggy

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 7 08:45:30 PDT 2013


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





--- Comment #16 from Santosh Mahto <santosh.ma at samsung.com>  2013-10-07 08:44:21 PST ---
(In reply to comment #15)
> (From update of attachment 213574 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=213574&action=review
> 
> > Source/WebCore/ChangeLog:13
> > +        When paragraph is positioned(relative/absolute/fixed) then deleting
> > +        that paragraph cause wrong merging of other(below) paragraph. This is
> > +        happening because positioned element is treated as special element and
> > +        on deletion complete paragraph element is removed. The ranges become
> > +        invalid after dom mutation and causing the wrong merging of below
> > +        paragraph.
> 
> it could be worth it to mention when this check was added, what it fixed and why it is not needed anymore.

Hmm.. 
The line of code was added long back( 9 years) in
http://trac.webkit.org/changeset/8935

After checking changeLog I could not find why it was added, it seemed to be that function isSpecialElement() was boosted  to include table and list element as special element which is valid. 

Basically when you delete the content of special element, the special element is also deleted which is valid for link, table, and list(lately not) but does not suit to  positioned(relative/absolute) element. probably the behavior was planned for positioned element as same as table/link but not considered later.

Actually I cant think why the deletion behavior of case 1 and case2 should differ although both are same on display:

case 1:  deleting A leaves empty paragraph
<p>A</p>

case 2:  deleting A deletes paragraph node because p becomes special node
<p style= "position:relative">A</p>


To me it looks changes lines are unnecessary now and only create bugs...
Please correct me if I am missing any points.

Probably darin/rniwa could help more on this.

-- 
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