[Webkit-unassigned] [Bug 62092] setting innerText to an empty string on editable div loses focus

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 7 14:41:09 PDT 2011


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


Una Sabovic <una.sabovic at palm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #96026|0                           |1
        is obsolete|                            |
  Attachment #96026|commit-queue?               |
               Flag|                            |
  Attachment #96299|                            |review?
               Flag|                            |




--- Comment #4 from Una Sabovic <una.sabovic at palm.com>  2011-06-07 14:41:09 PST ---
Created an attachment (id=96299)
 --> (https://bugs.webkit.org/attachment.cgi?id=96299&action=review)
proposed patch

I wish my first attempted change was simpler but I guess Murphy's law is true after all.

This change fails a bunch of tests under editing/ because it changes the way selection is handled when its endpoint nodes are deleted.
Before selection was set to null, and now its endpoints are updated to equivalent parent-anchored positions.
All the tests I looked at in detail are still valid and have the expected layout/endresult but the "intermediate" output has changed. Where selection was (null) now it's a valid selection. Such as:

+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 9 of #text > FONT > DIV > DIV > BODY > HTML > #document to 9 of #text > FONT > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 9 of #text > FONT > DIV > DIV > BODY > HTML > #document to 9 of #text > FONT > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE

Some tests need to be updated to not consider selection != null a failure after deleting a node.
This patch is not final, but I was hoping to get some feedback about the code before fixing all the tests.

Also, I ran tests for qt only but I'm guessing that other platforms editing tests also need fixing.
Thanks!

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