[webkit-reviews] review granted: [Bug 15969] Eliminate Editor::deleteRange() : [Attachment 17226] proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 16 20:16:11 PST 2007


Darin Adler <darin at apple.com> has granted Alexey Proskuryakov <ap at webkit.org>'s
request for review:
Bug 15969: Eliminate Editor::deleteRange()
http://bugs.webkit.org/show_bug.cgi?id=15969

Attachment 17226: proposed patch
http://bugs.webkit.org/attachment.cgi?id=17226&action=edit

------- Additional Comments from Darin Adler <darin at apple.com>
+    void yank();
+    void yankAndSelect();
+    void setMark();
+    void deleteToMark();
+    void selectToMark();
+    void swapWithMark();

I was hoping that at some point these would be added to platforms other that
Macintosh. The mark ones, for example, don't rely on anything
Macintosh-specific -- they just happen to be unused on other platforms at the
moment. But people might later want to add key bindings for them, since they
mimic emacs.

The yank ones simply rely on the existence of a kill ring, something that we
could create a small platform-independent abstraction for, so the kill ring
itself would be platform-specific, but the operations could be platform
independent.

+    if (Frame* coreFrame = core([self _frame]))
+	 coreFrame->editor()->swapWithMark();

A better way to handle these would be to add "SwapWithMark" to the named
commands that Editor handles by adding it to the CommandMap. Then swapWithMark:
could be added to the list of commands using the WEBCORE_COMMAND macro instead
of having hand-written code to forward to a particular named command.

r=me, as-is, but I think this could be made even better


More information about the webkit-reviews mailing list