Bug 97553

Summary: [GTK] Add Undo / Redo method to WebKit2 GTK+ API
Product: WebKit Reporter: Simon Pena <spenap>
Component: WebKit2Assignee: Simon Pena <spenap>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, gustavo, gyuyoung.kim, mrobinson, rakuco, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Simon Pena 2012-09-25 04:23:40 PDT
[GTK] Add Undo / Redo method to WebKit2 GTK+ API
Comment 1 Simon Pena 2012-09-25 04:25:12 PDT
Created attachment 165579 [details]
Patch
Comment 2 WebKit Review Bot 2012-09-25 04:27:08 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Martin Robinson 2012-09-25 06:36:15 PDT
Comment on attachment 165579 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=165579&action=review

> Source/WebKit2/UIProcess/API/gtk/WebKitEditingCommands.h:82
> + * webkit_web_view_can_execute_editing_command(). It's only possible
> + * to undo a command when it has been previously issued.

Is this strictly true? Doesn't undo also undo command issued by the user via interaction with a page or is that what you mean here?
Comment 4 Simon Pena 2012-09-25 06:44:20 PDT
(In reply to comment #3)
> (From update of attachment 165579 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=165579&action=review
> 
> > Source/WebKit2/UIProcess/API/gtk/WebKitEditingCommands.h:82
> > + * webkit_web_view_can_execute_editing_command(). It's only possible
> > + * to undo a command when it has been previously issued.
> 
> Is this strictly true? Doesn't undo also undo command issued by the user via interaction with a page or is that what you mean here?

I guess this is a language mistake from my side. I meant that you need to generate a command if you want to later undo it, and to generate a command you'll need some interaction.
Comment 5 Martin Robinson 2012-09-25 07:24:45 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > (From update of attachment 165579 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=165579&action=review
> > 
> > > Source/WebKit2/UIProcess/API/gtk/WebKitEditingCommands.h:82
> > > + * webkit_web_view_can_execute_editing_command(). It's only possible
> > > + * to undo a command when it has been previously issued.

Maybe just say "It's only possible to undo a command after a previously executed editing operation."

I think that covers the case of the operation coming from either the WebKit API or the user.
Comment 6 Simon Pena 2012-09-25 07:49:40 PDT
Created attachment 165613 [details]
Patch
Comment 7 WebKit Review Bot 2012-09-25 08:18:29 PDT
Comment on attachment 165613 [details]
Patch

Clearing flags on attachment: 165613

Committed r129510: <http://trac.webkit.org/changeset/129510>
Comment 8 WebKit Review Bot 2012-09-25 08:18:33 PDT
All reviewed patches have been landed.  Closing bug.