[Webkit-unassigned] [Bug 114960] Wrong text position when you click backspace on the line below the image

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 11 02:45:50 PDT 2014


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


Sudarshan C P <sudarshan.cp at samsung.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sudarshan.cp at samsung.com




--- Comment #33 from Sudarshan C P <sudarshan.cp at samsung.com>  2014-03-11 02:42:46 PST ---
(In reply to comment #32)
> (From update of attachment 225874 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=225874&action=review
> 
> > Source/WebCore/ChangeLog:11
> > +        While finding new position for inserting element after deleting/pasting,
> > +        included image element also for find the proper position to merge the split node.
> 
> This description should be appear before "Test:" line but after "Reviewed by" line.
> But this doesn't really describe what was causing the bug and how we're fixing it.
> 
i will modify the above comments.

> > Source/WebCore/editing/ReplaceSelectionCommand.cpp:119
> >      // If we're already on a break, it's probably a placeholder and we shouldn't change our position.
> > -    if (editingIgnoresContent(pos.deprecatedNode()))
> > +    if (editingIgnoresContent(pos.deprecatedNode()) && !pos.deprecatedNode()->hasTagName(imgTag))
> 
> The problem here is that editingIgnoresContent returns true on more than just a placeholder.
> We should be checking whether the deprecatedNode is br or not instead.
> What's weird is that lineBreakExistsAtPosition below should already be checking this condition.
> 
> r- because special-casing img can't be the right fix. e.g. it'll fail for other elements such as object and hr that are ignored by editing.

root cause for this issue is nodeToSplitToAvoidPastingIntolineNodeWithStyle() is trying to find the highestEnclosingNodeType(), so elementIsStyleOrHTMLEquivalent() matchedAttributes<=element->attributeount() condition satisfies and wrong position gives in case of image element to split and merge with new node, hence added the image condition to over come this error.

Thanks for your comments i will try to find the new set of patch as per comments and update.

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