RESOLVED FIXED 41085
"Paste and Match Style" should fire paste events
https://bugs.webkit.org/show_bug.cgi?id=41085
Summary "Paste and Match Style" should fire paste events
Adele Peterson
Reported 2010-06-23 11:26:13 PDT
"Paste and Match Style" should fire paste events
Attachments
patch (3.86 KB, patch)
2010-06-23 11:29 PDT, Adele Peterson
no flags
patch (5.30 KB, patch)
2010-06-23 21:41 PDT, Adele Peterson
eric.carlson: review+
updated fix (5.91 KB, patch)
2010-06-24 14:06 PDT, Adele Peterson
sam: review+
Adele Peterson
Comment 1 2010-06-23 11:29:34 PDT
Adele Peterson
Comment 2 2010-06-23 13:56:35 PDT
Comment on attachment 59541 [details] patch clearing the flag. I need to fix up DumpRenderTree. The pasteboard doesn't get totally blown away when setting data on the ClipboardData object in later tests.
Adele Peterson
Comment 3 2010-06-23 21:41:06 PDT
Created attachment 59610 [details] patch I'm not totally sure this is the best way to clear the pasteboard in between tests, but it seems to work.
Adele Peterson
Comment 4 2010-06-24 10:38:26 PDT
Committed revision 61771.
Darin Adler
Comment 5 2010-06-24 12:15:14 PDT
Comment on attachment 59610 [details] patch I don’t understand why the RetainPtr and RefPtr are needed. Two other thoughts: 1) Use a named editor command PasteAsPlainText for this and eliminate the method entirely. We'd add this to the WEBCORE_COMMAND macro section of the file. This could help us in the future when reimplementing for WebKit2. 2) We should consider removing _pasteAsPlainTextWithPasteboard and readSelectionFromPasteboard. I'm not sure why these methods exist.
Adele Peterson
Comment 6 2010-06-24 12:42:37 PDT
(In reply to comment #5) > (From update of attachment 59610 [details]) > I don’t understand why the RetainPtr and RefPtr are needed. This is what's done in the paste selector. When the paste event fires, maybe the WebView could go away. I'm not sure. > > Two other thoughts: > > 1) Use a named editor command PasteAsPlainText for this and eliminate the method entirely. We'd add this to the WEBCORE_COMMAND macro section of the file. This could help us in the future when reimplementing for WebKit2. Good idea! > > 2) We should consider removing _pasteAsPlainTextWithPasteboard and readSelectionFromPasteboard. I'm not sure why these methods exist. I'll investigate this.
Adele Peterson
Comment 7 2010-06-24 14:06:27 PDT
Created attachment 59700 [details] updated fix Here's a patch that removes those unused methods and uses the WebCore command system for pasteAsPlainText.
Adele Peterson
Comment 8 2010-06-24 15:49:59 PDT
Updated fix in revision 61794.
Note You need to log in before you can comment on or make changes to this bug.