Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/185d0343236afbd1d900339b45c02985bd2d4ecb
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/185d0343236afbd1d900339b45c02985bd2d4ecb
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/185d0343236afbd1d900339b45c02985bd2d4ecb

The branch, master has been updated
       via  185d0343236afbd1d900339b45c02985bd2d4ecb (commit)
      from  074407d251dfb93bdd663fe0d26079c902bc3b12 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=185d0343236afbd1d900339b45c02985bd2d4ecb
commit 185d0343236afbd1d900339b45c02985bd2d4ecb
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>

    make mouse track and mouse action content handlers return an error code

diff --git a/content/content_protected.h b/content/content_protected.h
index f0a95b6..ec62a21 100644
--- a/content/content_protected.h
+++ b/content/content_protected.h
@@ -52,9 +52,9 @@ struct content_handler {
        void (*reformat)(struct content *c, int width, int height);
        void (*destroy)(struct content *c);
        void (*stop)(struct content *c);
-       void (*mouse_track)(struct content *c, struct browser_window *bw,
+       nserror (*mouse_track)(struct content *c, struct browser_window *bw,
                        browser_mouse_state mouse, int x, int y);
-       void (*mouse_action)(struct content *c, struct browser_window *bw,
+       nserror (*mouse_action)(struct content *c, struct browser_window *bw,
                        browser_mouse_state mouse, int x, int y);
        bool (*keypress)(struct content *c, uint32_t key);
        bool (*redraw)(struct content *c, struct content_redraw_data *data,
diff --git a/content/handlers/html/interaction.c 
b/content/handlers/html/interaction.c
index 37951b6..930c795 100644
--- a/content/handlers/html/interaction.c
+++ b/content/handlers/html/interaction.c
@@ -585,7 +585,7 @@ html_mouse_action(struct content *c,
                                x - box_x, y - box_y);
 
                /* TODO: Set appropriate statusbar message */
-               return;
+               return NSERROR_OK;
        }
 
        if (html->drag_type == HTML_DRAG_CONTENT_SELECTION ||
@@ -596,7 +596,7 @@ html_mouse_action(struct content *c,
                box_coords(box, &box_x, &box_y);
                content_mouse_track(box->object, bw, mouse,
                                x - box_x, y - box_y);
-               return;
+               return NSERROR_OK;
        }
 
        /* Content related drags handled by now */
@@ -809,7 +809,7 @@ html_mouse_action(struct content *c,
                                /** \todo Find a way to not ignore errors */
                                coords = calloc(1, sizeof(*coords));
                                if (coords == NULL) {
-                                       return;
+                                       return NSERROR_OK;
                                }
                                coords->x = x - gadget_box_x;
                                coords->y = y - gadget_box_y;
@@ -818,7 +818,7 @@ html_mouse_action(struct content *c,
                                            
corestring_dom___ns_key_image_coords_node_data,
                                            coords, 
html__image_coords_dom_user_data_handler,
                                            &oldcoords) != DOM_NO_ERR)
-                                       return;
+                                       return NSERROR_OK;
                                free(oldcoords);
                        }
                        /* Fall through */
@@ -1165,6 +1165,7 @@ html_mouse_action(struct content *c,
                NSLOG(netsurf, ERROR, "%s", messages_get_errorcode(res));
        }
 
+       return res;
 }
 
 
diff --git a/content/handlers/text/textplain.c 
b/content/handlers/text/textplain.c
index e5cd451..86122ff 100644
--- a/content/handlers/text/textplain.c
+++ b/content/handlers/text/textplain.c
@@ -611,7 +611,7 @@ static content_type textplain_content_type(void)
  * \param x      coordinate of mouse
  * \param y      coordinate of mouse
  */
-static void
+static nserror
 textplain_mouse_action(struct content *c,
                       struct browser_window *bw,
                       browser_mouse_state mouse,
@@ -647,6 +647,8 @@ textplain_mouse_action(struct content *c,
 
        msg_data.pointer = pointer;
        content_broadcast(c, CONTENT_MSG_POINTER, &msg_data);
+
+       return NSERROR_OK;
 }
 
 
@@ -659,7 +661,7 @@ textplain_mouse_action(struct content *c,
  * \param  x     coordinate of mouse
  * \param  y     coordinate of mouse
  */
-static void
+static nserror
 textplain_mouse_track(struct content *c,
                      struct browser_window *bw,
                      browser_mouse_state mouse,
@@ -697,6 +699,8 @@ textplain_mouse_track(struct content *c,
                textplain_mouse_action(c, bw, mouse, x, y);
                break;
        }
+
+       return NSERROR_OK;
 }
 
 


-----------------------------------------------------------------------

Summary of changes:
 content/content_protected.h         |    4 ++--
 content/handlers/html/interaction.c |    9 +++++----
 content/handlers/text/textplain.c   |    8 ++++++--
 3 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/content/content_protected.h b/content/content_protected.h
index f0a95b6..ec62a21 100644
--- a/content/content_protected.h
+++ b/content/content_protected.h
@@ -52,9 +52,9 @@ struct content_handler {
        void (*reformat)(struct content *c, int width, int height);
        void (*destroy)(struct content *c);
        void (*stop)(struct content *c);
-       void (*mouse_track)(struct content *c, struct browser_window *bw,
+       nserror (*mouse_track)(struct content *c, struct browser_window *bw,
                        browser_mouse_state mouse, int x, int y);
-       void (*mouse_action)(struct content *c, struct browser_window *bw,
+       nserror (*mouse_action)(struct content *c, struct browser_window *bw,
                        browser_mouse_state mouse, int x, int y);
        bool (*keypress)(struct content *c, uint32_t key);
        bool (*redraw)(struct content *c, struct content_redraw_data *data,
diff --git a/content/handlers/html/interaction.c 
b/content/handlers/html/interaction.c
index 37951b6..930c795 100644
--- a/content/handlers/html/interaction.c
+++ b/content/handlers/html/interaction.c
@@ -585,7 +585,7 @@ html_mouse_action(struct content *c,
                                x - box_x, y - box_y);
 
                /* TODO: Set appropriate statusbar message */
-               return;
+               return NSERROR_OK;
        }
 
        if (html->drag_type == HTML_DRAG_CONTENT_SELECTION ||
@@ -596,7 +596,7 @@ html_mouse_action(struct content *c,
                box_coords(box, &box_x, &box_y);
                content_mouse_track(box->object, bw, mouse,
                                x - box_x, y - box_y);
-               return;
+               return NSERROR_OK;
        }
 
        /* Content related drags handled by now */
@@ -809,7 +809,7 @@ html_mouse_action(struct content *c,
                                /** \todo Find a way to not ignore errors */
                                coords = calloc(1, sizeof(*coords));
                                if (coords == NULL) {
-                                       return;
+                                       return NSERROR_OK;
                                }
                                coords->x = x - gadget_box_x;
                                coords->y = y - gadget_box_y;
@@ -818,7 +818,7 @@ html_mouse_action(struct content *c,
                                            
corestring_dom___ns_key_image_coords_node_data,
                                            coords, 
html__image_coords_dom_user_data_handler,
                                            &oldcoords) != DOM_NO_ERR)
-                                       return;
+                                       return NSERROR_OK;
                                free(oldcoords);
                        }
                        /* Fall through */
@@ -1165,6 +1165,7 @@ html_mouse_action(struct content *c,
                NSLOG(netsurf, ERROR, "%s", messages_get_errorcode(res));
        }
 
+       return res;
 }
 
 
diff --git a/content/handlers/text/textplain.c 
b/content/handlers/text/textplain.c
index e5cd451..86122ff 100644
--- a/content/handlers/text/textplain.c
+++ b/content/handlers/text/textplain.c
@@ -611,7 +611,7 @@ static content_type textplain_content_type(void)
  * \param x      coordinate of mouse
  * \param y      coordinate of mouse
  */
-static void
+static nserror
 textplain_mouse_action(struct content *c,
                       struct browser_window *bw,
                       browser_mouse_state mouse,
@@ -647,6 +647,8 @@ textplain_mouse_action(struct content *c,
 
        msg_data.pointer = pointer;
        content_broadcast(c, CONTENT_MSG_POINTER, &msg_data);
+
+       return NSERROR_OK;
 }
 
 
@@ -659,7 +661,7 @@ textplain_mouse_action(struct content *c,
  * \param  x     coordinate of mouse
  * \param  y     coordinate of mouse
  */
-static void
+static nserror
 textplain_mouse_track(struct content *c,
                      struct browser_window *bw,
                      browser_mouse_state mouse,
@@ -697,6 +699,8 @@ textplain_mouse_track(struct content *c,
                textplain_mouse_action(c, bw, mouse, x, y);
                break;
        }
+
+       return NSERROR_OK;
 }
 
 


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to