summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
Diffstat (limited to 'render')
-rw-r--r--render/box_textarea.c2
-rw-r--r--render/html_interaction.c7
2 files changed, 4 insertions, 5 deletions
diff --git a/render/box_textarea.c b/render/box_textarea.c
index b529fe65c..d58f5ef1b 100644
--- a/render/box_textarea.c
+++ b/render/box_textarea.c
@@ -219,9 +219,9 @@ bool box_textarea_create_textarea(html_content *html,
gadget->type == GADGET_PASSWORD);
if (gadget->type == GADGET_TEXTAREA) {
- ta_flags = TEXTAREA_MULTILINE;
dom_html_text_area_element *textarea =
(dom_html_text_area_element *) node;
+ ta_flags = TEXTAREA_MULTILINE;
err = dom_html_text_area_element_get_read_only(
textarea, &read_only);
diff --git a/render/html_interaction.c b/render/html_interaction.c
index 805932e31..aa6fc1126 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -315,6 +315,9 @@ void html_mouse_action(struct content *c, struct browser_window *bw,
if (html->drag_type == HTML_DRAG_SELECTION) {
/* Selection drag */
+ struct box *box;
+ int dir = -1;
+ int dx, dy;
if (!mouse) {
/* End of selection drag */
@@ -335,10 +338,6 @@ void html_mouse_action(struct content *c, struct browser_window *bw,
return;
}
- struct box *box;
- int dir = -1;
- int dx, dy;
-
if (selection_dragging_start(&html->sel))
dir = 1;