[Webkit-unassigned] [Bug 130393] Applying ordered list followed by unordered to a selected all content selection disappears.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 21 09:57:20 PDT 2014


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


Darin Adler <darin at apple.com> changed:

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




--- Comment #7 from Darin Adler <darin at apple.com>  2014-03-21 09:57:40 PST ---
(From update of attachment 227155)
View in context: https://bugs.webkit.org/attachment.cgi?id=227155&action=review

> Source/WebCore/editing/InsertListCommand.cpp:246
> -            setEndingSelection(VisiblePosition(firstPositionInNode(newList.get())));
> +            setEndingSelection(VisibleSelection(firstPositionInNode(newList.get()), lastPositionInNode(newList.get()), endingSelection().isDirectional()));

Why select the whole list when the list type is changed? That seems almost as bad as the old rule (put the selection at the start of the first list element). What is the desired selection change in a case like this? Before we implement it we need to clearly state what we want? Do we want to preserve the existing selection? Or something else?

I think that when making a new list we want to put the insertion point in the list, ready to type into that list.

> LayoutTests/editing/execCommand/selectall-ol-ul-expected.txt:12
> +After Applying Orderedlist:
> +| <ol>
> +|   <li>
> +|     "<#selection-anchor>orderlist text to display<#selection-focus>"
> +|     <br>
> +
> +After Applying UnOrderedList:
> +| <ul>
> +|   <li>
> +|     "<#selection-anchor>orderlist text to display<#selection-focus>"

This test makes it look like the command preserves the selection. But what it actually does is select the entire contents of the list. I don’t think that’s right.

The test needs to show what happens when the contents of the list isn’t all selected. For example, what if just the word "text" was selected? What if the insertion point was after the word "display"?

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