[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
Mon Mar 10 21:40:12 PDT 2014


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


Ryosuke Niwa <rniwa at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #225874|review?                     |review-
               Flag|                            |




--- Comment #32 from Ryosuke Niwa <rniwa at webkit.org>  2014-03-10 21:37:08 PST ---
(From update of attachment 225874)
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.

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

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