[evolution/wip/webkit-composer: 332/372] Replace C cast with macros



commit 27134e13ceb804b6f5ffc3609e0f7b47fea0fdc5
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Jan 17 12:21:31 2014 +0100

    Replace C cast with macros

 e-util/e-editor-actions.c                |   16 +++++-----
 e-util/e-editor-cell-dialog.c            |   48 +++++++++++++++---------------
 e-util/e-editor-image-dialog.c           |   32 ++++++++++----------
 e-util/e-editor-page-dialog.c            |   16 +++++-----
 e-util/e-editor-table-dialog.c           |   10 +++---
 e-util/e-editor-widget.c                 |    2 +-
 mail/e-mail-reader.c                     |    2 +-
 modules/itip-formatter/itip-view.c       |    4 +-
 modules/mail/e-mail-shell-view-private.c |    3 +-
 9 files changed, 66 insertions(+), 67 deletions(-)
---
diff --git a/e-util/e-editor-actions.c b/e-util/e-editor-actions.c
index 3ff1023..19a86fb 100644
--- a/e-util/e-editor-actions.c
+++ b/e-util/e-editor-actions.c
@@ -255,9 +255,9 @@ action_context_insert_column_after_cb (GtkAction *action,
        g_return_if_fail (row != NULL);
 
        /* Get the first row in the table */
-       row = (WebKitDOMElement *)
+       row = WEBKIT_DOM_ELEMENT (
                webkit_dom_node_get_first_child (
-                       webkit_dom_node_get_parent_node (WEBKIT_DOM_NODE (row)));
+                       webkit_dom_node_get_parent_node (WEBKIT_DOM_NODE (row))));
 
        index = webkit_dom_html_table_cell_element_get_cell_index (
                        WEBKIT_DOM_HTML_TABLE_CELL_ELEMENT (cell));
@@ -266,8 +266,8 @@ action_context_insert_column_after_cb (GtkAction *action,
                webkit_dom_html_table_row_element_insert_cell (
                        WEBKIT_DOM_HTML_TABLE_ROW_ELEMENT (row), index + 1, NULL);
 
-               row = (WebKitDOMElement *)
-                       webkit_dom_node_get_next_sibling (WEBKIT_DOM_NODE (row));
+               row = WEBKIT_DOM_ELEMENT (
+                       webkit_dom_node_get_next_sibling (WEBKIT_DOM_NODE (row)));
        }
 }
 
@@ -291,9 +291,9 @@ action_context_insert_column_before_cb (GtkAction *action,
        g_return_if_fail (row != NULL);
 
        /* Get the first row in the table */
-       row = (WebKitDOMElement *)
+       row = WEBKIT_DOM_ELEMENT (
                webkit_dom_node_get_first_child (
-                       webkit_dom_node_get_parent_node (WEBKIT_DOM_NODE (row)));
+                       webkit_dom_node_get_parent_node (WEBKIT_DOM_NODE (row))));
 
        index = webkit_dom_html_table_cell_element_get_cell_index (
                        WEBKIT_DOM_HTML_TABLE_CELL_ELEMENT (cell));
@@ -302,8 +302,8 @@ action_context_insert_column_before_cb (GtkAction *action,
                webkit_dom_html_table_row_element_insert_cell (
                        WEBKIT_DOM_HTML_TABLE_ROW_ELEMENT (row), index - 1, NULL);
 
-               row = (WebKitDOMElement *)
-                       webkit_dom_node_get_next_sibling (WEBKIT_DOM_NODE (row));
+               row = WEBKIT_DOM_ELEMENT (
+                       webkit_dom_node_get_next_sibling (WEBKIT_DOM_NODE (row)));
        }
 }
 
diff --git a/e-util/e-editor-cell-dialog.c b/e-util/e-editor-cell-dialog.c
index 7314a9a..c709fe9 100644
--- a/e-util/e-editor-cell-dialog.c
+++ b/e-util/e-editor-cell-dialog.c
@@ -107,7 +107,7 @@ for_each_cell_do (WebKitDOMElement *row,
        WebKitDOMHTMLCollection *cells;
        gulong ii, length;
        cells = webkit_dom_html_table_row_element_get_cells (
-                       (WebKitDOMHTMLTableRowElement *) row);
+                       WEBKIT_DOM_HTML_TABLE_ROW_ELEMENT (row));
        length = webkit_dom_html_collection_get_length (cells);
        for (ii = 0; ii < length; ii++) {
                WebKitDOMNode *cell;
@@ -117,7 +117,7 @@ for_each_cell_do (WebKitDOMElement *row,
                }
 
                call_cell_dom_func (
-                       (WebKitDOMHTMLTableCellElement *) cell, func, value, user_data);
+                       WEBKIT_DOM_HTML_TABLE_CELL_ELEMENT (cell), func, value, user_data);
        }
 }
 
@@ -130,7 +130,7 @@ editor_cell_dialog_set_attribute (EEditorCellDialog *dialog,
        if (dialog->priv->scope == SCOPE_CELL) {
 
                call_cell_dom_func (
-                       (WebKitDOMHTMLTableCellElement *) dialog->priv->cell,
+                       WEBKIT_DOM_HTML_TABLE_CELL_ELEMENT (dialog->priv->cell),
                        func, value, user_data);
 
        } else if (dialog->priv->scope == SCOPE_COLUMN) {
@@ -139,15 +139,15 @@ editor_cell_dialog_set_attribute (EEditorCellDialog *dialog,
                WebKitDOMHTMLCollection *rows;
 
                index = webkit_dom_html_table_cell_element_get_cell_index (
-                               (WebKitDOMHTMLTableCellElement *) dialog->priv->cell);
+                               WEBKIT_DOM_HTML_TABLE_CELL_ELEMENT (dialog->priv->cell));
                table = e_editor_dom_node_find_parent_element (
-                               (WebKitDOMNode *) dialog->priv->cell, "TABLE");
+                               WEBKIT_DOM_NODE (dialog->priv->cell), "TABLE");
                if (!table) {
                        return;
                }
 
                rows = webkit_dom_html_table_element_get_rows (
-                               (WebKitDOMHTMLTableElement *) table);
+                               WEBKIT_DOM_HTML_TABLE_ELEMENT (table));
                length = webkit_dom_html_collection_get_length (rows);
                for (ii = 0; ii < length; ii++) {
                        WebKitDOMNode *row, *cell;
@@ -155,14 +155,14 @@ editor_cell_dialog_set_attribute (EEditorCellDialog *dialog,
 
                        row = webkit_dom_html_collection_item (rows, ii);
                        cells = webkit_dom_html_table_row_element_get_cells (
-                                       (WebKitDOMHTMLTableRowElement *) row);
+                                       WEBKIT_DOM_HTML_TABLE_ROW_ELEMENT (row));
                        cell = webkit_dom_html_collection_item (cells, index);
                        if (!cell) {
                                continue;
                        }
 
                        call_cell_dom_func (
-                               (WebKitDOMHTMLTableCellElement *) cell,
+                               WEBKIT_DOM_HTML_TABLE_CELL_ELEMENT (cell),
                                func, value, user_data);
                }
 
@@ -170,7 +170,7 @@ editor_cell_dialog_set_attribute (EEditorCellDialog *dialog,
                WebKitDOMElement *row;
 
                row = e_editor_dom_node_find_parent_element (
-                               (WebKitDOMNode *) dialog->priv->cell, "TR");
+                               WEBKIT_DOM_NODE (dialog->priv->cell), "TR");
                if (!row) {
                        return;
                }
@@ -183,13 +183,13 @@ editor_cell_dialog_set_attribute (EEditorCellDialog *dialog,
                WebKitDOMHTMLCollection *rows;
 
                table = e_editor_dom_node_find_parent_element (
-                               (WebKitDOMNode *) dialog->priv->cell, "TABLE");
+                               WEBKIT_DOM_NODE (dialog->priv->cell), "TABLE");
                if (!table) {
                        return;
                }
 
                rows = webkit_dom_html_table_element_get_rows (
-                               (WebKitDOMHTMLTableElement *) table);
+                               WEBKIT_DOM_HTML_TABLE_ELEMENT (table));
                length = webkit_dom_html_collection_get_length (rows);
                for (ii = 0; ii < length; ii++) {
                        WebKitDOMNode *row;
@@ -200,7 +200,7 @@ editor_cell_dialog_set_attribute (EEditorCellDialog *dialog,
                        }
 
                        for_each_cell_do (
-                               (WebKitDOMElement *) row, func, value, user_data);
+                               WEBKIT_DOM_ELEMENT (row), func, value, user_data);
                }
        }
 }
@@ -436,10 +436,10 @@ cell_set_background_image (WebKitDOMHTMLTableCellElement *cell,
 {
        if (!uri || !*uri) {
                webkit_dom_element_remove_attribute (
-                       (WebKitDOMElement *) cell, "background");
+                       WEBKIT_DOM_ELEMENT (cell), "background");
        } else {
                webkit_dom_element_set_attribute (
-                       (WebKitDOMElement *) cell, "background", uri, NULL);
+                       WEBKIT_DOM_ELEMENT (cell), "background", uri, NULL);
        }
 }
 
@@ -472,14 +472,14 @@ editor_cell_dialog_show (GtkWidget *widget)
                GTK_TOGGLE_BUTTON (dialog->priv->scope_cell_button), TRUE);
 
        tmp = webkit_dom_html_table_cell_element_get_align (
-                       (WebKitDOMHTMLTableCellElement *) dialog->priv->cell);
+                       WEBKIT_DOM_HTML_TABLE_CELL_ELEMENT (dialog->priv->cell));
        gtk_combo_box_set_active_id (
                GTK_COMBO_BOX (dialog->priv->halign_combo),
                (tmp && *tmp) ? tmp : "left");
        g_free (tmp);
 
        tmp = webkit_dom_html_table_cell_element_get_v_align (
-                       (WebKitDOMHTMLTableCellElement *) dialog->priv->cell);
+                       WEBKIT_DOM_HTML_TABLE_CELL_ELEMENT (dialog->priv->cell));
        gtk_combo_box_set_active_id (
                GTK_COMBO_BOX (dialog->priv->valign_combo),
                (tmp && *tmp) ? tmp : "middle");
@@ -488,17 +488,17 @@ editor_cell_dialog_show (GtkWidget *widget)
        gtk_toggle_button_set_active (
                GTK_TOGGLE_BUTTON (dialog->priv->wrap_text_check),
                !webkit_dom_html_table_cell_element_get_no_wrap (
-                       (WebKitDOMHTMLTableCellElement *) dialog->priv->cell));
+                       WEBKIT_DOM_HTML_TABLE_CELL_ELEMENT (dialog->priv->cell)));
 
        tmp = webkit_dom_element_get_tag_name (
-               (WebKitDOMElement *) dialog->priv->cell);
+               WEBKIT_DOM_ELEMENT (dialog->priv->cell));
        gtk_toggle_button_set_active (
                GTK_TOGGLE_BUTTON (dialog->priv->header_style_check),
                (g_ascii_strncasecmp (tmp, "TH", 2) == 0));
        g_free (tmp);
 
        tmp = webkit_dom_html_table_cell_element_get_width (
-               (WebKitDOMHTMLTableCellElement *) dialog->priv->cell);
+               WEBKIT_DOM_HTML_TABLE_CELL_ELEMENT (dialog->priv->cell));
        if (tmp && *tmp) {
                gint val = atoi (tmp);
                gtk_spin_button_set_value (
@@ -518,16 +518,16 @@ editor_cell_dialog_show (GtkWidget *widget)
        gtk_spin_button_set_value (
                GTK_SPIN_BUTTON (dialog->priv->row_span_edit),
                webkit_dom_html_table_cell_element_get_row_span (
-                       (WebKitDOMHTMLTableCellElement *) dialog->priv->cell));
+                       WEBKIT_DOM_HTML_TABLE_CELL_ELEMENT (dialog->priv->cell)));
        gtk_spin_button_set_value (
                GTK_SPIN_BUTTON (dialog->priv->col_span_edit),
                webkit_dom_html_table_cell_element_get_col_span (
-                       (WebKitDOMHTMLTableCellElement *) dialog->priv->cell));
+                       WEBKIT_DOM_HTML_TABLE_CELL_ELEMENT (dialog->priv->cell)));
 
        if (webkit_dom_element_has_attribute (
-               (WebKitDOMElement *) dialog->priv->cell, "background")) {
+               WEBKIT_DOM_ELEMENT (dialog->priv->cell), "background")) {
                tmp = webkit_dom_element_get_attribute (
-                       (WebKitDOMElement *) dialog->priv->cell, "background");
+                       WEBKIT_DOM_ELEMENT (dialog->priv->cell), "background");
 
                gtk_file_chooser_set_uri (
                        GTK_FILE_CHOOSER (dialog->priv->background_image_chooser),
@@ -540,7 +540,7 @@ editor_cell_dialog_show (GtkWidget *widget)
        }
 
        tmp = webkit_dom_html_table_cell_element_get_bg_color (
-               (WebKitDOMHTMLTableCellElement *) dialog->priv->cell);
+               WEBKIT_DOM_HTML_TABLE_CELL_ELEMENT (dialog->priv->cell));
        if (!tmp || *tmp) {
                color = white;
        }
diff --git a/e-util/e-editor-image-dialog.c b/e-util/e-editor-image-dialog.c
index fc277df..60c9a25 100644
--- a/e-util/e-editor-image-dialog.c
+++ b/e-util/e-editor-image-dialog.c
@@ -277,44 +277,44 @@ editor_image_dialog_set_url (EEditorImageDialog *dialog)
 
        url = gtk_entry_get_text (GTK_ENTRY (dialog->priv->url_edit));
        link = e_editor_dom_node_find_parent_element (
-               (WebKitDOMNode *) dialog->priv->image, "A");
+               WEBKIT_DOM_NODE (dialog->priv->image), "A");
 
        if (link) {
                if (!url || !*url) {
                        webkit_dom_node_insert_before (
                                webkit_dom_node_get_parent_node (
-                                       (WebKitDOMNode *) link),
-                               (WebKitDOMNode *) dialog->priv->image,
-                               (WebKitDOMNode *) link, NULL);
+                                       WEBKIT_DOM_NODE (link)),
+                               WEBKIT_DOM_NODE (dialog->priv->image),
+                               WEBKIT_DOM_NODE (link), NULL);
                        webkit_dom_node_remove_child (
                                webkit_dom_node_get_parent_node (
-                                       (WebKitDOMNode *) link),
-                               (WebKitDOMNode *) link, NULL);
+                                       WEBKIT_DOM_NODE (link)),
+                               WEBKIT_DOM_NODE (link), NULL);
                } else {
                        webkit_dom_html_anchor_element_set_href (
-                               (WebKitDOMHTMLAnchorElement *) link, url);
+                               WEBKIT_DOM_HTML_ANCHOR_ELEMENT (link), url);
                }
        } else {
                if (url && *url) {
                        WebKitDOMDocument *document;
 
                        document = webkit_dom_node_get_owner_document (
-                                       (WebKitDOMNode *) dialog->priv->image);
+                                       WEBKIT_DOM_NODE (dialog->priv->image));
                        link = webkit_dom_document_create_element (
                                        document, "A", NULL);
 
                        webkit_dom_html_anchor_element_set_href (
-                               (WebKitDOMHTMLAnchorElement *) link, url);
+                               WEBKIT_DOM_HTML_ANCHOR_ELEMENT (link), url);
 
                        webkit_dom_node_insert_before (
                                webkit_dom_node_get_parent_node (
-                                       (WebKitDOMNode *) dialog->priv->image),
-                               (WebKitDOMNode *) link,
-                               (WebKitDOMNode *) dialog->priv->image, NULL);
+                                       WEBKIT_DOM_NODE (dialog->priv->image)),
+                               WEBKIT_DOM_NODE (link),
+                               WEBKIT_DOM_NODE (dialog->priv->image), NULL);
 
                        webkit_dom_node_append_child (
-                               (WebKitDOMNode *) link,
-                               (WebKitDOMNode *) dialog->priv->image, NULL);
+                               WEBKIT_DOM_NODE (link),
+                               WEBKIT_DOM_NODE (dialog->priv->image), NULL);
                }
        }
 }
@@ -382,7 +382,7 @@ editor_image_dialog_show (GtkWidget *widget)
                        WEBKIT_DOM_NODE (dialog->priv->image), "A");
        if (link) {
                tmp = webkit_dom_html_anchor_element_get_href (
-                               (WebKitDOMHTMLAnchorElement *) link);
+                               WEBKIT_DOM_HTML_ANCHOR_ELEMENT (link));
                gtk_entry_set_text (GTK_ENTRY (dialog->priv->url_edit), tmp);
                g_free (tmp);
        }
@@ -656,7 +656,7 @@ e_editor_image_dialog_show (EEditorImageDialog *dialog,
        g_return_if_fail (E_IS_EDITOR_IMAGE_DIALOG (dialog));
 
        if (image) {
-               dialog->priv->image = (WebKitDOMHTMLImageElement *) image;
+               dialog->priv->image = WEBKIT_DOM_HTML_IMAGE_ELEMENT (image);
        } else {
                dialog->priv->image = NULL;
        }
diff --git a/e-util/e-editor-page-dialog.c b/e-util/e-editor-page-dialog.c
index 1932872..d07d8fc 100644
--- a/e-util/e-editor-page-dialog.c
+++ b/e-util/e-editor-page-dialog.c
@@ -160,7 +160,7 @@ editor_page_dialog_set_text_color (EEditorPageDialog *dialog)
 
        color = g_strdup_printf ("#%06x", e_rgba_to_value (&rgba));
        webkit_dom_html_body_element_set_text (
-               (WebKitDOMHTMLBodyElement *) body, color);
+               WEBKIT_DOM_HTML_BODY_ELEMENT (body), color);
 
        g_free (color);
 }
@@ -185,7 +185,7 @@ editor_page_dialog_set_link_color (EEditorPageDialog *dialog)
 
        color = g_strdup_printf ("#%06x", e_rgba_to_value (&rgba));
        webkit_dom_html_body_element_set_link (
-               (WebKitDOMHTMLBodyElement *) body, color);
+               WEBKIT_DOM_HTML_BODY_ELEMENT (body), color);
 
        g_free (color);
 }
@@ -211,7 +211,7 @@ editor_page_dialog_set_background_color (EEditorPageDialog *dialog)
        color = g_strdup_printf ("#%06x", e_rgba_to_value (&rgba));
 
        webkit_dom_html_body_element_set_bg_color (
-               (WebKitDOMHTMLBodyElement *) body, color);
+               WEBKIT_DOM_HTML_BODY_ELEMENT (body), color);
 
        g_free (color);
 }
@@ -271,7 +271,7 @@ editor_page_dialog_set_background_image (EEditorPageDialog *dialog)
                                dialog->priv->background_image_filechooser));
 
        webkit_dom_html_body_element_set_background (
-               (WebKitDOMHTMLBodyElement *) body, uri ? uri : "");
+               WEBKIT_DOM_HTML_BODY_ELEMENT (body), uri ? uri : "");
 
        g_free (uri);
 }
@@ -295,7 +295,7 @@ editor_page_dialog_show (GtkWidget *widget)
        body = webkit_dom_document_get_body (document);
 
        tmp = webkit_dom_html_body_element_get_background (
-                       (WebKitDOMHTMLBodyElement *) body);
+                       WEBKIT_DOM_HTML_BODY_ELEMENT (body));
        if (tmp && *tmp) {
                gint ii;
                gchar *fname = g_filename_from_uri (tmp, NULL, NULL);
@@ -317,7 +317,7 @@ editor_page_dialog_show (GtkWidget *widget)
        g_free (tmp);
 
        tmp = webkit_dom_html_body_element_get_text (
-                       (WebKitDOMHTMLBodyElement *) body);
+                       WEBKIT_DOM_HTML_BODY_ELEMENT (body));
        if (!tmp || !*tmp) {
                GdkColor *color;
                GtkStyle *style = gtk_widget_get_style (GTK_WIDGET (editor_widget));
@@ -335,7 +335,7 @@ editor_page_dialog_show (GtkWidget *widget)
                E_COLOR_COMBO (dialog->priv->text_color_picker), &rgba);
 
        tmp = webkit_dom_html_body_element_get_link (
-                       (WebKitDOMHTMLBodyElement *) body);
+                       WEBKIT_DOM_HTML_BODY_ELEMENT (body));
        if (!tmp || !*tmp) {
                GdkColor color;
                gtk_widget_style_get (
@@ -353,7 +353,7 @@ editor_page_dialog_show (GtkWidget *widget)
                E_COLOR_COMBO (dialog->priv->link_color_picker), &rgba);
 
        tmp = webkit_dom_html_body_element_get_bg_color (
-                       (WebKitDOMHTMLBodyElement *) body);
+                       WEBKIT_DOM_HTML_BODY_ELEMENT (body));
        if (!tmp || !*tmp) {
                GdkColor *color;
                GtkStyle *style = gtk_widget_get_style (GTK_WIDGET (editor_widget));
diff --git a/e-util/e-editor-table-dialog.c b/e-util/e-editor-table-dialog.c
index 22bbe7c..679b778 100644
--- a/e-util/e-editor-table-dialog.c
+++ b/e-util/e-editor-table-dialog.c
@@ -159,7 +159,7 @@ editor_table_dialog_set_column_count (EEditorTableDialog *dialog)
                WebKitDOMHTMLCollection *cells;
                gulong jj, current_columns;
 
-               row = (WebKitDOMHTMLTableRowElement *) (
+               row = WEBKIT_DOM_HTML_TABLE_ROW_ELEMENT (
                        webkit_dom_html_collection_item (rows, ii));
 
                cells = webkit_dom_html_table_row_element_get_cells (row);
@@ -191,7 +191,7 @@ editor_table_dialog_get_column_count (EEditorTableDialog *dialog)
        row = webkit_dom_html_collection_item (rows, 0);
 
        columns = webkit_dom_html_table_row_element_get_cells (
-                               (WebKitDOMHTMLTableRowElement *) row);
+                               WEBKIT_DOM_HTML_TABLE_ROW_ELEMENT (row));
 
        gtk_spin_button_set_value (
                GTK_SPIN_BUTTON (dialog->priv->columns_edit),
@@ -571,12 +571,12 @@ editor_table_dialog_show (GtkWidget *widget)
                        webkit_dom_range_get_start_container (range, NULL), "TABLE");
 
                if (!table) {
-                       dialog->priv->table_element = (WebKitDOMHTMLTableElement *)
-                               editor_table_dialog_create_table (dialog);
+                       dialog->priv->table_element = WEBKIT_DOM_HTML_TABLE_ELEMENT (
+                               editor_table_dialog_create_table (dialog));
                        editor_table_dialog_reset_values (dialog);
                } else {
                        dialog->priv->table_element =
-                               (WebKitDOMHTMLTableElement *) table;
+                               WEBKIT_DOM_HTML_TABLE_ELEMENT (table);
                        editor_table_dialog_get_values (dialog);
                }
        }
diff --git a/e-util/e-editor-widget.c b/e-util/e-editor-widget.c
index 030e5f3..66893fb 100644
--- a/e-util/e-editor-widget.c
+++ b/e-util/e-editor-widget.c
@@ -645,7 +645,7 @@ editor_widget_check_magic_smileys (EEditorWidget *widget,
        if (!WEBKIT_DOM_IS_TEXT (node))
                return;
 
-       node_text = webkit_dom_text_get_whole_text ((WebKitDOMText *) node);
+       node_text = webkit_dom_text_get_whole_text (WEBKIT_DOM_TEXT (node));
        if (node_text == NULL)
                return;
 
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index 3b6aaa3..6663feb 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -2461,7 +2461,7 @@ mail_reader_key_press_event_cb (EMailReader *reader,
                if (frame != NULL) {
                        dom = webkit_web_frame_get_dom_document (frame);
                        /* intentionally used "static_cast" */
-                       element = webkit_dom_html_document_get_active_element ((WebKitDOMHTMLDocument *) dom);
+                       element = webkit_dom_html_document_get_active_element (WEBKIT_DOM_HTML_DOCUMENT 
(dom));
 
                        if (element != NULL)
                                name = webkit_dom_node_get_node_name (WEBKIT_DOM_NODE (element));
diff --git a/modules/itip-formatter/itip-view.c b/modules/itip-formatter/itip-view.c
index fab3019..d5286de 100644
--- a/modules/itip-formatter/itip-view.c
+++ b/modules/itip-formatter/itip-view.c
@@ -922,7 +922,7 @@ append_info_item_row (ItipView *view,
        }
 
        cell = webkit_dom_html_table_row_element_insert_cell (
-               (WebKitDOMHTMLTableRowElement *) row, -1, NULL);
+               WEBKIT_DOM_HTML_TABLE_ROW_ELEMENT (row), -1, NULL);
 
        if (icon_name) {
                WebKitDOMElement *image;
@@ -943,7 +943,7 @@ append_info_item_row (ItipView *view,
        }
 
        cell = webkit_dom_html_table_row_element_insert_cell (
-               (WebKitDOMHTMLTableRowElement *) row, -1, NULL);
+               WEBKIT_DOM_HTML_TABLE_ROW_ELEMENT (row), -1, NULL);
 
        webkit_dom_html_element_set_inner_html (cell, item->message, NULL);
 
diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c
index 7b0460d..ac77734 100644
--- a/modules/mail/e-mail-shell-view-private.c
+++ b/modules/mail/e-mail-shell-view-private.c
@@ -265,8 +265,7 @@ mail_shell_view_mail_display_needs_key (EMailDisplay *mail_display,
                if (!frame)
                        return FALSE;
                dom = webkit_web_frame_get_dom_document (frame);
-               /* intentionally used "static_cast" */
-               element = webkit_dom_html_document_get_active_element ((WebKitDOMHTMLDocument *) dom);
+               element = webkit_dom_html_document_get_active_element (WEBKIT_DOM_HTML_DOCUMENT (dom));
 
                if (element)
                        name = webkit_dom_node_get_node_name (WEBKIT_DOM_NODE (element));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]