NetSurf
|
implementation of user interaction with a CONTENT_HTML. More...
#include <assert.h>
#include <stdbool.h>
#include <string.h>
#include <dom/dom.h>
#include "utils/corestrings.h"
#include "utils/messages.h"
#include "utils/utils.h"
#include "utils/log.h"
#include "utils/nsoption.h"
#include "netsurf/content.h"
#include "netsurf/browser_window.h"
#include "netsurf/mouse.h"
#include "netsurf/misc.h"
#include "netsurf/layout.h"
#include "netsurf/keypress.h"
#include "content/hlcache.h"
#include "content/textsearch.h"
#include "desktop/frames.h"
#include "desktop/scrollbar.h"
#include "desktop/selection.h"
#include "desktop/textarea.h"
#include "javascript/js.h"
#include "desktop/gui_internal.h"
#include "html/box.h"
#include "html/box_textarea.h"
#include "html/box_inspect.h"
#include "html/font.h"
#include "html/form_internal.h"
#include "html/private.h"
#include "html/imagemap.h"
#include "html/interaction.h"
Go to the source code of this file.
Data Structures | |
struct | mouse_action_state |
local structure containing all the mouse action state information More... | |
Functions | |
static browser_pointer_shape | get_pointer_shape (struct box *box, bool imagemap) |
Get pointer shape for given box. More... | |
static void | html_box_drag_start (struct box *box, int x, int y) |
Start drag scrolling the contents of a box. More... | |
static size_t | html_selection_drag_end (struct html_content *html, browser_mouse_state mouse, int x, int y, int dir) |
End overflow scroll scrollbar drags. More... | |
static void | html__image_coords_dom_user_data_handler (dom_node_operation operation, dom_string *key, void *_data, struct dom_node *src, struct dom_node *dst) |
Helper for file gadgets to store their filename. More... | |
static void | html_overflow_scroll_drag_end (struct scrollbar *scrollbar, browser_mouse_state mouse, int x, int y) |
End overflow scroll scrollbar drags. More... | |
static nserror | mouse_action_select_menu (html_content *html, struct browser_window *bw, browser_mouse_state mouse, int x, int y) |
handle html mouse action when select menu is open More... | |
static nserror | mouse_action_drag_selection (html_content *html, struct browser_window *bw, browser_mouse_state mouse, int x, int y) |
handle html mouse action when a selection drag is being performed More... | |
static nserror | mouse_action_drag_scrollbar (html_content *html, struct browser_window *bw, browser_mouse_state mouse, int x, int y) |
handle html mouse action when a scrollbar drag is being performed More... | |
static nserror | mouse_action_drag_textarea (html_content *html, struct browser_window *bw, browser_mouse_state mouse, int x, int y) |
handle mouse actions while dragging in a text area More... | |
static nserror | mouse_action_drag_content (html_content *html, struct browser_window *bw, browser_mouse_state mouse, int x, int y) |
handle mouse actions while dragging in a content More... | |
static nserror | get_mouse_action_node (html_content *html, int x, int y, struct mouse_action_state *man) |
iterate the box tree for deepest node at coordinates More... | |
static nserror | gadget_mouse_action (html_content *html, browser_mouse_state mouse, int x, int y, struct mouse_action_state *mas) |
process mouse activity on a form gadget More... | |
static nserror | iframe_mouse_action (struct browser_window *bw, browser_mouse_state mouse, int x, int y, struct mouse_action_state *mas) |
process mouse activity on an iframe More... | |
static nserror | html_object_mouse_action (html_content *html, struct browser_window *bw, browser_mouse_state mouse, int x, int y, struct mouse_action_state *mas) |
process mouse activity on an html object More... | |
static bool | is_javascript_navigate_url (nsurl *url) |
determine if a url has a javascript scheme More... | |
static nserror | link_mouse_action (html_content *html, struct browser_window *bw, browser_mouse_state mouse, int x, int y, struct mouse_action_state *mas) |
process mouse activity on a link More... | |
static nserror | default_mouse_action (html_content *html, struct browser_window *bw, browser_mouse_state mouse, int x, int y, struct mouse_action_state *mas) |
process mouse activity if it is not anything else More... | |
static nserror | mouse_action_drag_none (html_content *html, struct browser_window *bw, browser_mouse_state mouse, int x, int y) |
handle non dragging mouse actions More... | |
nserror | html_mouse_track (struct content *c, struct browser_window *bw, browser_mouse_state mouse, int x, int y) |
Handle mouse tracking (including drags) in an HTML content window. More... | |
nserror | html_mouse_action (struct content *c, struct browser_window *bw, browser_mouse_state mouse, int x, int y) |
Handle mouse clicks and movements in an HTML content window. More... | |
bool | html_keypress (struct content *c, uint32_t key) |
Handle keypresses. More... | |
void | html_overflow_scroll_callback (void *client_data, struct scrollbar_msg_data *scrollbar_data) |
Callback for in-page scrollbars. More... | |
void | html_set_drag_type (html_content *html, html_drag_type drag_type, union html_drag_owner drag_owner, const struct rect *rect) |
Set our drag status, and inform whatever owns the content. More... | |
void | html_set_focus (html_content *html, html_focus_type focus_type, union html_focus_owner focus_owner, bool hide_caret, int x, int y, int height, const struct rect *clip) |
Set our input focus, and inform whatever owns the content. More... | |
void | html_set_selection (html_content *html, html_selection_type selection_type, union html_selection_owner selection_owner, bool read_only) |
Set our selection status, and inform whatever owns the content. More... | |
implementation of user interaction with a CONTENT_HTML.
Definition in file interaction.c.
|
static |
process mouse activity if it is not anything else
Definition at line 1169 of file interaction.c.
References mouse_action_state::box, mouse_action_state::box_x, BROWSER_MOUSE_CLICK_1, BROWSER_MOUSE_CLICK_2, BROWSER_MOUSE_DRAG_1, BROWSER_MOUSE_DRAG_2, BROWSER_MOUSE_MOD_1, BROWSER_MOUSE_MOD_2, BROWSER_MOUSE_PRESS_1, BROWSER_MOUSE_PRESS_2, BROWSER_POINTER_MOVE, browser_window_frame_resize_start(), browser_window_page_drag_start(), html_content::bw, box::byte_offset, content_msg_data::content, content_broadcast(), CONTENT_MSG_DRAGSAVE, content_msg_data::CONTENT_SAVE_COMPLETE, content_msg_data::CONTENT_SAVE_SOURCE, mouse_action_state::drag_candidate, content_msg_data::dragsave, html_content::focus_type, font_plot_style_from_css(), guit, html_box_drag_start(), HTML_DRAG_SELECTION, HTML_FOCUS_SELF, HTML_SELECTION_NONE, HTML_SELECTION_SELF, html_set_drag_type(), html_set_focus(), html_set_selection(), netsurf_table::layout, box::length, messages_get(), html_drag_owner::no_owner, html_selection_owner::none, NSERROR_OK, mouse_action_state::pointer, gui_layout_table::position, mouse_action_state::result, html_content::sel, selection_active(), selection_clear(), selection_click(), selection_dragging(), html_content::selection_type, html_focus_owner::self, mouse_action_state::status, box::style, box::text, mouse_action_state::text, mouse_action_state::title, content_msg_data::type, html_content::unit_len_ctx, content_msg_data::x, and content_msg_data::y.
Referenced by mouse_action_drag_none().
|
static |
process mouse activity on a form gadget
Definition at line 824 of file interaction.c.
References form::action, mouse_action_state::action, mouse_action_state::box, mouse_action_state::box_x, mouse_action_state::box_y, BROWSER_MOUSE_CLICK_1, BROWSER_MOUSE_CLICK_2, BROWSER_MOUSE_DRAG_1, BROWSER_MOUSE_DRAG_2, BROWSER_MOUSE_PRESS_1, BROWSER_MOUSE_PRESS_2, BROWSER_POINTER_DEFAULT, BROWSER_POINTER_MENU, content_broadcast(), CONTENT_MSG_GADGETCLICK, CONTENT_MSG_SELECTMENU, mouse_action_state::control, form_control::data, fallthrough, form_control::form, form_open_select_menu(), form_radio_set(), form_select_menu_callback(), content_msg_data::gadget, mouse_action_state::gadget, GADGET_BUTTON, GADGET_CHECKBOX, content_msg_data::gadget_click, GADGET_FILE, GADGET_HIDDEN, GADGET_IMAGE, GADGET_PASSWORD, GADGET_RADIO, GADGET_RESET, GADGET_SELECT, GADGET_SUBMIT, GADGET_TEXTAREA, GADGET_TEXTBOX, get_pointer_shape(), html__image_coords_dom_user_data_handler(), html__redraw_a_box(), HTML_SELECTION_NONE, HTML_SELECTION_TEXTAREA, html_set_selection(), messages_get(), messages_get_errorcode(), form_control::node, html_selection_owner::none, NSERROR_OK, NSLOG, nsoption_bool, mouse_action_state::pointer, mouse_action_state::result, scrollbar_mouse_status_to_message(), content_msg_data::select_menu, form_control::selected, html_content::selection_owner, html_content::selection_type, mouse_action_state::status, html_selection_owner::textarea, textarea_mouse_action(), TEXTAREA_MOUSE_EDITOR, form_control::type, html_content::visible_select_menu, image_input_coords::x, and image_input_coords::y.
Referenced by mouse_action_drag_none().
|
static |
iterate the box tree for deepest node at coordinates
extracts mouse action node information by descending through visible boxes setting more specific values for:
box - deepest box at point html_object_box - html object html_object_pos_x - html object html_object_pos_y - html object object - non html object iframe - iframe url - href or imagemap target - href or imagemap or gadget url_box - href or imagemap imagemap - imagemap gadget - gadget gadget_box - gadget gadget_box_x - gadget gadget_box_y - gadget title - title pointer
drag_candidate - first box with scroll padding_left - box with scroll padding_right padding_top padding_bottom scrollbar - inside padding box stops decent scroll_mouse_x - inside padding box stops decent scroll_mouse_y - inside padding box stops decent
text_box - text box text_box_x - text_box
Definition at line 671 of file interaction.c.
References mouse_action_state::bar, BOTTOM, mouse_action_state::box, box_at_point(), mouse_action_state::box_x, mouse_action_state::box_y, BROWSER_POINTER_DEFAULT, content_get_type(), CONTENT_HTML, mouse_action_state::control, mouse_action_state::drag_candidate, form_control::form, box::gadget, mouse_action_state::gadget, get_pointer_shape(), box::height, box::href, mouse_action_state::html_object, box::iframe, mouse_action_state::iframe, imagemap_get(), mouse_action_state::is_imagemap, html_content::layout, LEFT, mouse_action_state::link, box::margin, mouse_action_state::mouse_x, mouse_action_state::mouse_y, box::node, mouse_action_state::node, NSERROR_OK, box::object, mouse_action_state::object, box::padding, mouse_action_state::pointer, mouse_action_state::pos_x, mouse_action_state::pos_y, mouse_action_state::result, RIGHT, mouse_action_state::scroll, box::scroll_x, box::scroll_y, scrollbar_get_offset(), SCROLLBAR_WIDTH, box::style, box::target, form::target, mouse_action_state::target, box::text, mouse_action_state::text, box::title, mouse_action_state::title, TOP, html_content::unit_len_ctx, mouse_action_state::url, box::usemap, box::width, box::x, and box::y.
Referenced by mouse_action_drag_none().
|
static |
Get pointer shape for given box.
box | box in question |
imagemap | whether an imagemap applies to the box |
Definition at line 69 of file interaction.c.
References BOX_FLOAT_LEFT, BOX_FLOAT_RIGHT, BROWSER_POINTER_AUTO, BROWSER_POINTER_CARET, BROWSER_POINTER_CROSS, BROWSER_POINTER_DEFAULT, BROWSER_POINTER_DOWN, BROWSER_POINTER_HELP, BROWSER_POINTER_LD, BROWSER_POINTER_LEFT, BROWSER_POINTER_LU, BROWSER_POINTER_MOVE, BROWSER_POINTER_POINT, BROWSER_POINTER_PROGRESS, BROWSER_POINTER_RD, BROWSER_POINTER_RIGHT, BROWSER_POINTER_RU, BROWSER_POINTER_UP, BROWSER_POINTER_WAIT, box::children, box::gadget, GADGET_IMAGE, GADGET_PASSWORD, GADGET_SUBMIT, GADGET_TEXTAREA, GADGET_TEXTBOX, box::href, box::style, box::type, and form_control::type.
Referenced by gadget_mouse_action(), get_mouse_action_node(), and link_mouse_action().
|
static |
Helper for file gadgets to store their filename.
Stores the filename unencoded on the dom node associated with the gadget.
operation | DOM operation |
key | DOM node key being considerd |
_data | The data assocated with the key |
src | The source DOM node. |
dst | The destination DOM node. |
Definition at line 241 of file interaction.c.
References html__image_coords_dom_user_data_handler(), and NSLOG.
Referenced by gadget_mouse_action(), and html__image_coords_dom_user_data_handler().
|
static |
Start drag scrolling the contents of a box.
box | the box to be scrolled |
x | x ordinate of initial mouse position |
y | y ordinate |
Definition at line 167 of file interaction.c.
References BOTTOM, box_coords(), box::height, LEFT, box::padding, RIGHT, box::scroll_x, box::scroll_y, scrollbar_start_content_drag(), SCROLLBAR_WIDTH, TOP, and box::width.
Referenced by default_mouse_action().
bool html_keypress | ( | struct content * | c, |
uint32_t | key | ||
) |
Handle keypresses.
c | content of type HTML |
key | The UCS4 character codepoint |
We need to:
html->layout->node
.This will mean that if the JavaScript event listener does event.preventDefault()
then we won't handle the event when we're not supposed to.
Definition at line 1519 of file interaction.c.
References box_textarea_keypress(), html_focus_owner::content, content_keypress(), fire_dom_keyboard_event(), html_content::focus_owner, html_content::focus_type, HTML_FOCUS_CONTENT, HTML_FOCUS_TEXTAREA, html_content::layout, box::node, NS_KEY_CLEAR_SELECTION, NS_KEY_COPY_SELECTION, NS_KEY_ESCAPE, NS_KEY_SELECT_ALL, NSERROR_OK, box::object, html_content::sel, selection_clear(), selection_copy_to_clipboard(), selection_select_all(), and html_focus_owner::textarea.
nserror html_mouse_action | ( | struct content * | c, |
struct browser_window * | bw, | ||
browser_mouse_state | mouse, | ||
int | x, | ||
int | y | ||
) |
Handle mouse clicks and movements in an HTML content window.
This function handles both hovering and clicking. It is important that the code path is identical (except that hovering doesn't carry out the action), so that the status bar reflects exactly what will happen. Having separate code paths opens the possibility that an attacker will make the status bar show some harmless action where clicking will be harmful.
c | content of type html |
bw | browser window |
mouse | state of mouse buttons and modifier keys |
x | x coordinate of mouse |
y | y coordinate of mouse |
Definition at line 1462 of file interaction.c.
References html_content::drag_type, HTML_DRAG_CONTENT_SCROLL, HTML_DRAG_CONTENT_SELECTION, HTML_DRAG_NONE, HTML_DRAG_SCROLLBAR, HTML_DRAG_SELECTION, HTML_DRAG_TEXTAREA_SCROLLBAR, HTML_DRAG_TEXTAREA_SELECTION, messages_get_errorcode(), mouse_action_drag_content(), mouse_action_drag_none(), mouse_action_drag_scrollbar(), mouse_action_drag_selection(), mouse_action_drag_textarea(), mouse_action_select_menu(), NSERROR_OK, NSLOG, and html_content::visible_select_menu.
Referenced by html_mouse_track().
nserror html_mouse_track | ( | struct content * | c, |
struct browser_window * | bw, | ||
browser_mouse_state | mouse, | ||
int | x, | ||
int | y | ||
) |
Handle mouse tracking (including drags) in an HTML content window.
c | content of type html |
bw | browser window |
mouse | state of mouse buttons and modifier keys |
x | coordinate of mouse |
y | coordinate of mouse |
Definition at line 1451 of file interaction.c.
References html_mouse_action().
|
static |
process mouse activity on an html object
Definition at line 1023 of file interaction.c.
References mouse_action_state::action, mouse_action_state::box, BROWSER_MOUSE_CLICK_1, BROWSER_MOUSE_CLICK_2, BROWSER_MOUSE_DRAG_1, BROWSER_MOUSE_DRAG_2, BROWSER_MOUSE_PRESS_1, BROWSER_MOUSE_PRESS_2, html_selection_owner::content, content_mouse_action(), content_mouse_track(), mouse_action_state::html_object, HTML_SELECTION_CONTENT, HTML_SELECTION_NONE, html_set_selection(), html_selection_owner::none, NSERROR_OK, box::object, mouse_action_state::pos_x, mouse_action_state::pos_y, mouse_action_state::result, html_content::selection_owner, and html_content::selection_type.
Referenced by mouse_action_drag_none().
void html_overflow_scroll_callback | ( | void * | client_data, |
struct scrollbar_msg_data * | scrollbar_data | ||
) |
Callback for in-page scrollbars.
Definition at line 1601 of file interaction.c.
References html_scrollbar_data::box, BROWSER_POINTER_AUTO, html_scrollbar_data::c, content_broadcast(), CONTENT_MSG_POINTER, html__redraw_a_box(), HTML_DRAG_NONE, HTML_DRAG_SCROLLBAR, html_set_drag_type(), scrollbar_msg_data::msg, html_content::reflowing, scrollbar_msg_data::scrollbar, SCROLLBAR_MSG_MOVED, SCROLLBAR_MSG_SCROLL_FINISHED, SCROLLBAR_MSG_SCROLL_START, scrollbar_msg_data::x0, rect::x0, scrollbar_msg_data::x1, scrollbar_msg_data::y0, and scrollbar_msg_data::y1.
Referenced by box_handle_scrollbars().
|
static |
End overflow scroll scrollbar drags.
scrollbar | scrollbar widget |
mouse | state of mouse buttons and modifier keys |
x | coordinate of mouse |
y | coordinate of mouse |
Definition at line 294 of file interaction.c.
References BOTTOM, html_scrollbar_data::box, box_coords(), box::height, LEFT, box::padding, RIGHT, scrollbar_get_data(), scrollbar_is_horizontal(), scrollbar_mouse_drag_end(), SCROLLBAR_WIDTH, TOP, box::width, box::x, and box::y.
Referenced by mouse_action_drag_scrollbar().
|
static |
End overflow scroll scrollbar drags.
html | html content |
mouse | state of mouse buttons and modifier keys |
x | coordinate of mouse |
y | coordinate of mouse |
dir | Direction of drag |
Definition at line 202 of file interaction.c.
References box_pick_text_box(), box::byte_offset, font_plot_style_from_css(), guit, netsurf_table::layout, box::length, gui_layout_table::position, box::style, box::text, html_content::unit_len_ctx, box::x, and box::y.
Referenced by mouse_action_drag_selection().
void html_set_drag_type | ( | html_content * | html, |
html_drag_type | drag_type, | ||
union html_drag_owner | drag_owner, | ||
const struct rect * | rect | ||
) |
Set our drag status, and inform whatever owns the content.
html | HTML content |
drag_type | Type of drag |
drag_owner | What owns the drag |
rect | Pointer movement bounds |
Definition at line 1648 of file interaction.c.
References content_broadcast(), content_msg_data::CONTENT_DRAG_NONE, content_msg_data::CONTENT_DRAG_SCROLL, content_msg_data::CONTENT_DRAG_SELECTION, CONTENT_MSG_DRAG, content_msg_data::drag, html_content::drag_owner, html_content::drag_type, fallthrough, HTML_DRAG_CONTENT_SCROLL, HTML_DRAG_CONTENT_SELECTION, HTML_DRAG_NONE, HTML_DRAG_SCROLLBAR, HTML_DRAG_SELECTION, HTML_DRAG_TEXTAREA_SCROLLBAR, HTML_DRAG_TEXTAREA_SELECTION, html_drag_owner::no_owner, content_msg_data::rect, and content_msg_data::type.
Referenced by box_textarea_callback(), default_mouse_action(), html_object_callback(), html_overflow_scroll_callback(), and mouse_action_drag_selection().
void html_set_focus | ( | html_content * | html, |
html_focus_type | focus_type, | ||
union html_focus_owner | focus_owner, | ||
bool | hide_caret, | ||
int | x, | ||
int | y, | ||
int | height, | ||
const struct rect * | clip | ||
) |
Set our input focus, and inform whatever owns the content.
html | HTML content |
focus_type | Type of input focus |
focus_owner | What owns the focus |
hide_caret | True iff caret to be hidden |
x | Carret x-coord rel to owner |
y | Carret y-coord rel to owner |
height | Carret height |
clip | Carret clip rect |
Definition at line 1685 of file interaction.c.
References box_coords(), content_msg_data::caret, content_msg_data::clip, clip(), html_focus_owner::content, content_broadcast(), CONTENT_MSG_CARET, html_content::focus_owner, html_content::focus_type, content_msg_data::height, height, HTML_FOCUS_CONTENT, HTML_FOCUS_SELF, HTML_FOCUS_TEXTAREA, content_msg_data::pos, html_focus_owner::self, html_focus_owner::textarea, content_msg_data::type, content_msg_data::x, rect::x0, rect::x1, content_msg_data::y, rect::y0, and rect::y1.
Referenced by box_textarea_callback(), default_mouse_action(), and html_object_callback().
void html_set_selection | ( | html_content * | html, |
html_selection_type | selection_type, | ||
union html_selection_owner | selection_owner, | ||
bool | read_only | ||
) |
Set our selection status, and inform whatever owns the content.
html | HTML content |
selection_type | Type of selection |
selection_owner | What owns the selection |
read_only | True iff selection is read only |
Definition at line 1743 of file interaction.c.
References html_selection_owner::content, content_broadcast(), content_clear_selection(), CONTENT_MSG_SELECTION, form_control::data, fallthrough, box::gadget, HTML_SELECTION_CONTENT, HTML_SELECTION_NONE, HTML_SELECTION_SELF, HTML_SELECTION_TEXTAREA, html_selection_owner::none, box::object, html_content::sel, content_msg_data::selection, selection_clear(), html_content::selection_owner, html_content::selection_type, html_selection_owner::textarea, and textarea_clear_selection().
Referenced by box_textarea_callback(), default_mouse_action(), gadget_mouse_action(), html_object_callback(), and html_object_mouse_action().
|
static |
process mouse activity on an iframe
Definition at line 989 of file interaction.c.
References mouse_action_state::action, BROWSER_MOUSE_CLICK_1, BROWSER_MOUSE_CLICK_2, browser_window_get_position(), browser_window_get_scale(), browser_window_mouse_click(), browser_window_mouse_track(), mouse_action_state::iframe, NSERROR_OK, and mouse_action_state::result.
Referenced by mouse_action_drag_none().
|
static |
determine if a url has a javascript scheme
urm | The url to check. |
Definition at line 1068 of file interaction.c.
References nsurl_get_component(), and NSURL_SCHEME.
Referenced by link_mouse_action().
|
static |
process mouse activity on a link
Definition at line 1088 of file interaction.c.
References mouse_action_state::action, mouse_action_state::box, BROWSER_MOUSE_CLICK_1, BROWSER_MOUSE_CLICK_2, BROWSER_MOUSE_MOD_1, browser_window_navigate(), BW_NAVIGATE_DOWNLOAD, content_broadcast(), content_get_url(), CONTENT_MSG_SAVELINK, get_pointer_shape(), mouse_action_state::is_imagemap, is_javascript_navigate_url(), mouse_action_state::link, NSERROR_OK, nsoption_bool, nsurl_access(), nsurl_get_utf8(), mouse_action_state::pointer, mouse_action_state::result, content_msg_data::savelink, mouse_action_state::status, content_msg_data::title, mouse_action_state::title, content_msg_data::url, and mouse_action_state::url.
Referenced by mouse_action_drag_none().
|
static |
handle mouse actions while dragging in a content
Definition at line 544 of file interaction.c.
References box_coords(), html_drag_owner::content, content_mouse_track(), html_content::drag_owner, NSERROR_OK, box::object, box::x, and box::y.
Referenced by html_mouse_action().
|
static |
handle non dragging mouse actions
computed state
not on heap to avoid allocation or stack because it is large
Definition at line 1325 of file interaction.c.
References mouse_action_state::action, mouse_action_state::ACTION_GO, mouse_action_state::ACTION_JS, mouse_action_state::ACTION_NONE, mouse_action_state::ACTION_NOSEND, mouse_action_state::ACTION_SUBMIT, mouse_action_state::bar, mouse_action_state::box, BROWSER_MOUSE_CLICK_1, BROWSER_MOUSE_DRAG_1, BROWSER_MOUSE_DRAG_2, BROWSER_MOUSE_MOD_2, BROWSER_POINTER_DEFAULT, browser_window_find_target(), browser_window_navigate(), BW_NAVIGATE_HISTORY, content_msg_data::content, content_broadcast(), content_get_url(), CONTENT_MSG_DRAGSAVE, CONTENT_MSG_POINTER, CONTENT_MSG_STATUS, mouse_action_state::control, default_mouse_action(), content_msg_data::dragsave, content_msg_data::explicit_status_text, fire_generic_dom_event(), form_control::form, form_submit(), mouse_action_state::gadget, gadget_mouse_action(), get_mouse_action_node(), html_exec(), mouse_action_state::html_object, html_object_mouse_action(), mouse_action_state::iframe, iframe_mouse_action(), mouse_action_state::link, link_mouse_action(), mouse_action_state::mouse_x, mouse_action_state::mouse_y, mouse_action_state::node, NSERROR_OK, nsurl_get_component(), NSURL_PATH, mouse_action_state::object, path(), content_msg_data::pointer, mouse_action_state::pointer, mouse_action_state::result, mouse_action_state::scroll, scrollbar_mouse_action(), scrollbar_mouse_status_to_message(), mouse_action_state::status, mouse_action_state::target, content_msg_data::type, and mouse_action_state::url.
Referenced by html_mouse_action().
|
static |
handle html mouse action when a scrollbar drag is being performed
Definition at line 447 of file interaction.c.
References BOTTOM, html_scrollbar_data::box, box_coords(), content_broadcast(), CONTENT_MSG_STATUS, html_content::drag_owner, content_msg_data::explicit_status_text, box::height, html_overflow_scroll_drag_end(), LEFT, NSERROR_OK, box::padding, RIGHT, html_drag_owner::scrollbar, scrollbar_get_data(), scrollbar_is_horizontal(), scrollbar_mouse_action(), scrollbar_mouse_status_to_message(), SCROLLBAR_WIDTH, TOP, box::width, box::x, and box::y.
Referenced by html_mouse_action().
|
static |
handle html mouse action when a selection drag is being performed
Definition at line 390 of file interaction.c.
References box_pick_text_box(), box::byte_offset, font_plot_style_from_css(), guit, HTML_DRAG_NONE, html_selection_drag_end(), html_set_drag_type(), netsurf_table::layout, box::length, html_drag_owner::no_owner, NSERROR_OK, gui_layout_table::position, html_content::sel, selection_dragging_start(), selection_track(), box::style, box::text, and html_content::unit_len_ctx.
Referenced by html_mouse_action().
|
static |
handle mouse actions while dragging in a text area
Definition at line 513 of file interaction.c.
References box_coords(), form_control::data, html_content::drag_owner, box::gadget, GADGET_PASSWORD, GADGET_TEXTAREA, GADGET_TEXTBOX, NSERROR_OK, html_drag_owner::textarea, textarea_mouse_action(), form_control::type, box::x, and box::y.
Referenced by html_mouse_action().
|
static |
handle html mouse action when select menu is open
Definition at line 328 of file interaction.c.
References box::border, BOTTOM, form_control::box, box_coords(), browser_window_get_content(), browser_window_get_drag_type(), content_broadcast(), CONTENT_MSG_STATUS, content_request_redraw(), DRAGGING_NONE, content_msg_data::explicit_status_text, form_select_get_dimensions(), form_select_mouse_action(), form_select_mouse_drag_end(), box::height, height, LEFT, NSERROR_OK, box::padding, TOP, html_content::visible_select_menu, box_border::width, and width.
Referenced by html_mouse_action().