Summary: | [gtk] [patch] Implement can_go_backward and can_go_forward in webkitgtkpage.cpp | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Diego Escalante Urrelo <diegoe> | ||||||
Component: | WebKit API | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | diegoe | ||||||
Priority: | P2 | Keywords: | Gtk | ||||||
Version: | 523.x (Safari 3) | ||||||||
Hardware: | PC | ||||||||
OS: | Linux | ||||||||
Attachments: |
|
Description
Diego Escalante Urrelo
2007-07-29 14:10:11 PDT
Created attachment 15726 [details]
Implements the wrappers for can_go_forward|backward
Pretty simple.
Comment on attachment 15726 [details] Implements the wrappers for can_go_forward|backward The implementation looks good. Just a few comments to bring this patch in line with <http://webkit.org/coding/coding-style.html> } +gboolean webkit_gtk_page_can_go_backward (WebKitGtkPage* page) +{ There should be an empty line before/after all functions. Please remove the space before the open parenthesis. + WebKitGtkPagePrivate* page_data = WEBKIT_GTK_PAGE_GET_PRIVATE(page); + WebKitGtkFramePrivate* frame_data = WEBKIT_GTK_FRAME_GET_PRIVATE(page_data->main_frame); After talking with Holger, I think we're going to move towards maintaining the WebKit camelCase style for variable names within the WebKit/gtk implementation files. So these variables should be called pageData and frameData. I know it's inconsistent with the rest of the file, but that will be cleaned up later. You also need a ChangeLog entry to go along with your patch. See <http://webkit.org/coding/contributing.html> for instructions on how to generate one. Once these are addressed, I think we can get this landed! Created attachment 15735 [details]
Updated patch, corrects style
This should be enough!
Comment on attachment 15735 [details]
Updated patch, corrects style
r=me
Thanks for the cleanup!
Comment on attachment 15735 [details] Updated patch, corrects style >Index: gtk/Api/webkitgtkpage.cpp >=================================================================== >--- gtk/Api/webkitgtkpage.cpp (revision 24766) >+++ gtk/Api/webkitgtkpage.cpp (working copy) >@@ -328,6 +328,20 @@ void webkit_gtk_page_go_forward(WebKitGt > frame_data->frame->loader()->goBackOrForward(1); > } > >+gboolean webkit_gtk_page_can_go_backward(WebKitGtkPage* page) >+{ >+ WebKitGtkPagePrivate* pageData = WEBKIT_GTK_PAGE_GET_PRIVATE(page); >+ WebKitGtkFramePrivate* frameData = WEBKIT_GTK_FRAME_GET_PRIVATE(page_data->main_frame); Oops, should be pageData. >+ return frame_data->frame->loader()->canGoBackOrForward(-1); Oops, should be frameData Same in the other function. |