[Webkit-unassigned] [Bug 84597] InsertUnorderedList and InsertOrderedList (execCommand) do not remove bullets

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 5 07:33:17 PDT 2012


Arpita Bahuguna <arpitabahuguna at gmail.com> changed:

           What    |Removed                     |Added
                 CC|                            |rniwa at webkit.org

--- Comment #4 from Arpita Bahuguna <arpitabahuguna at gmail.com>  2012-06-05 07:33:17 PST ---
The InsertListCommand::selectionHasListOfType() comparison of the start and the end VisiblePositions is erroneous to the extent that the selection's end visiblePosition consists of the offset (if any) as well.
On the other hand the visiblePosition being compared against (start) always points to the start of the paragraph i.e. with offset 0.
Thus the != comparison fails and hence returns false in case of multiple lines selected for reverting the ordered/unordered list.

This is a proposed patch only to verify whether the direction am considering is proper or not.

Or, we could probably have another function wherein the comparison is done between start and end Positions as a.deprecatedEditingOffset() <= b.deprecatedEditingOffset() as opposed to just an equality comparison.

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