Commit Graph

51 Commits

Author SHA1 Message Date
Vincent Sanders 66d0f14b32 move the public form API 2016-06-14 12:39:54 +01:00
Chris Young 63227a214b Rename context_menu.c and strip out all the context menu code, so this file and popupmenu.class is only used (optionally) for HTML form selection. 2015-09-05 15:09:00 +01:00
Vincent Sanders a50d2035a7 Fix cocoa usage of render internals 2014-11-13 22:15:32 +00:00
Vincent Sanders 79e501075a make the form select menu API smaller.
By hiding all but the form selection menu option structure from code
outside of render this reduces the API to the absolute minimum to
support this feature.
2014-11-13 21:52:08 +00:00
Vincent Sanders d8007f4512 change form API to return error instead of warning user.
Update the form API so instead of directly warning the user it returns
an error code to the caller allowing the appropriate action to be
taken outside the core. Additionally clean up documentation of this
API.
2014-11-11 22:58:34 +00:00
Vincent Sanders d9ce975822 Make most of the form API internal to the html renderer.
Very little of the form API needed exposing outside of the
renderer. This makes the form API that may be used by frontends
obvious and limited.
2014-11-11 17:11:59 +00:00
Vincent Sanders 845a0ca072 remove declaration in parameter list warning in form.h 2014-11-09 12:22:11 +00:00
Vincent Sanders ad343eccb1 remove unecessary utils/types.h
This cleans up this header and moves the functionality into more
useful places while reducing the include complexity but only pulling
in whats required.
2014-11-02 20:10:32 +00:00
Vincent Sanders 1097cc40b4 remove unecessary browser.h include from core headers 2014-10-17 12:21:52 +01:00
Vincent Sanders 3a9fa29ee5 try and improve usage of browser window internals 2014-07-06 18:34:34 +01:00
Michael Drake 71cb70065e Gadgets can exisit outside forms, so now they store their own ref to the containing html content. 2014-02-17 14:38:53 +00:00
Michael Drake 8deb9ec25c Native select menu interface shouldn't force front end to dig inside bw struct. 2014-02-08 17:11:55 +00:00
Vincent Sanders 3455d66921 reduce desktop/browser.h unecessary includes 2014-02-03 17:56:24 +00:00
Daniel Silverstone 6bf609a1a4 Support image inputs 2014-01-05 16:14:17 +00:00
Daniel Silverstone b1e6c63a2f Rewrite form_successful_controls() to use the DOM.
This stops image inputs from working temporarily, but makes
inputs inside display:none work correctly.  As such, this is
a net-win.
2014-01-05 15:51:30 +00:00
Daniel Silverstone 9b8988dd23 Reflect changes to select boxes into the DOM 2014-01-04 18:02:50 +00:00
Daniel Silverstone 533cfa27da Ensure textual input boxes re-update the DOM with new values 2014-01-04 18:02:50 +00:00
John-Mark Bell 9303fc56dc Remove redundant code. 2013-02-22 20:51:56 +00:00
Michael Drake 762e1aad73 First pass at getting html forms to use textarea widget.
(Input element types text & password, and textarea element.)
Can edit and submit forms, but there are loads of issues.
2013-02-06 22:39:45 +00:00
Michael Drake 0c8b03474e Make form_url_encode static. 2012-10-11 20:05:36 +01:00
Michael Drake 6f7c6de0c9 Use nsurl_replace_query instead of url_get_components and url_reform_components. 2012-10-11 20:02:52 +01:00
Michael Drake afdf72d7b5 Confine box_at_point to the document it's given. Callers are now responsible for calling whatever functionality for object boxes. Remove last bw dereference from render directory. Remove a couple of unused functions. 2012-08-21 15:27:52 +01:00
Michael Drake 6d39b569c7 Pass content containing form's nsurl to form_submit, instead of its hlcache_handle. Avoid dereferencing bw in html content handlers. 2012-08-17 20:26:00 +01:00
Michael Drake eddae6af06 Remove plotter table global. Pass a redraw context around redraw functions. Knockout could be handled better. Note: untested on most front ends.
svn path=/trunk/netsurf/; revision=12543
2011-06-30 15:48:07 +00:00
Michael Drake 5c9155e606 Core form select widget now associated with HTML contents. Don't use current_redraw_browser for select widget redraw. Fixes core select widget in iframes.
svn path=/trunk/netsurf/; revision=12522
2011-06-28 11:15:39 +00:00
Michael Drake 94e7b44ebc Pass clip rect to clip plotters as struct. Simplify clip rect handling in debug window code. Pass clip rect to select menu as struct.
svn path=/trunk/netsurf/; revision=11683
2011-02-14 22:05:39 +00:00
Michael Drake b010a25771 + Refactor input handling from browser window code into content
handlers.
+ Disentangle all box tree manipulation from browser window
  code and put it where it belongs.
+ Move other content specific and other irrelevant code from
  browser window handling to appropriate places.
+ Put mouse state enum in new mouse header, since it's not just
  used by browser window code, and it is used by treeview
  windows on the treeview branch.

svn path=/trunk/netsurf/; revision=10561
2010-06-04 09:35:08 +00:00
Daniel Silverstone 270ef59a98 Merge jmb/new-cache; r=dsilvers,rs=vince
svn path=/trunk/netsurf/; revision=10180
2010-03-28 12:56:39 +00:00
Michael Drake 13afa0ff4c Merge Paul Blokus' selectscroll branch. Adds core select menu widget for forms and core scrollbar widget.
svn path=/trunk/netsurf/; revision=9289
2009-08-14 10:37:33 +00:00
John Mark Bell cc1094f0ac Utilise hubbub's form association callback.
Please can we dispense with the libxml binding? It's causing much #ifdef mess.
Fix encoding of <input type=image> names -- previously were output as raw utf-8, rather than in the submission charset.
Actually bother to destroy forms in a document, and the controls associated with them. We still leak non form-associated controls, but that's too much effort to fix right now.

svn path=/trunk/netsurf/; revision=6573
2009-02-20 11:39:25 +00:00
Vincent Sanders 2f864eeecc Update all source code file headers to reflect GPL version 2 only and contain appropriate licence text
svn path=/trunk/netsurf/; revision=3486
2007-08-08 16:16:03 +00:00
Daniel Silverstone 6807b4208a Remove the netsurf/ from the include paths and rationalise use of <> vs "" in includes
NetSurf includes are now done with ""s and other system includes with <>s as C intended.
The scandeps tool has been updated to only look for ""ed includes, and to verify that the
files exist in the tree before adding them to the dependency lines. The depend rule has
therefore been augmented to make sure the autogenerated files are built before it is run.

This is untested under self-hosted RISC OS builds. All else tested and works.


svn path=/trunk/netsurf/; revision=3307
2007-05-30 22:39:54 +00:00
Richard Wilson 1353585036 Implement form targets (fix 1619094)
svn path=/trunk/netsurf/; revision=3125
2006-12-30 00:34:26 +00:00
Michael Drake ba23e4b693 Update project URL.
svn path=/trunk/netsurf/; revision=3073
2006-11-27 15:35:18 +00:00
John Mark Bell 5e2567370d Fix submission of forms in embedded objects; resolve submission URL at
form creation time rather than at submit.

svn path=/trunk/netsurf/; revision=2707
2006-07-03 21:41:25 +00:00
John Mark Bell 3286c99dd5 [project @ 2005-06-26 01:55:20 by jmb]
Move acceptable character set determination to form submission time, rather thanat box tree creation time.
Use UTF-8 encoding, if specified, else use first specified encoding.
Improve use of utf8_to_enc - falling back to document encoding then 8859-1 where appropriate.

svn path=/import/netsurf/; revision=1765
2005-06-26 01:55:20 +00:00
John Mark Bell c17dc661ea [project @ 2005-04-16 05:09:32 by jmb]
Split out UTF-8 handling functions.
Submit URL-encoded forms in sensible encoding:
  * First entry in accept-charset list, if present
  * Document encoding, otherwise
  We may want to explicitly look for UTF-8, to save converting.
Convert cnv_str_local_enc/cnv_local_enc_str to use iconv (they're now veneers for utf8_[to/from]_enc).
Provide mechanism for looking up local system charset (derived from system alphabet, under RISC OS)

svn path=/import/netsurf/; revision=1647
2005-04-16 05:09:33 +00:00
James Bursa 2920bca14a [project @ 2005-04-09 09:47:36 by bursa]
Move HTML contents almost fully over to talloc(), simplifying code. Improvements to title attributes, broken forms, cellpadding. Reorder functions in box_construct.c.

svn path=/import/netsurf/; revision=1608
2005-04-09 09:47:37 +00:00
James Bursa 9995dbad57 [project @ 2004-12-12 21:49:23 by bursa]
Add form_new() and form_add_option().

svn path=/import/netsurf/; revision=1400
2004-12-12 21:51:01 +00:00
James Bursa da5d07f0be [project @ 2004-10-22 20:58:11 by bursa]
Fix form textarea scrolling. The scrollbar now works properly.

svn path=/import/netsurf/; revision=1334
2004-10-22 20:58:11 +00:00
James Bursa 8337acfc78 [project @ 2004-08-08 19:13:40 by bursa]
Fix form submitting with an empty file upload. Update form_textarea_value(). Purge xcalloc() etc from form.c and handle memory exhaustion.

svn path=/import/netsurf/; revision=1195
2004-08-08 19:13:40 +00:00
John Tytgat c93b54b07c [project @ 2004-07-19 20:40:11 by joty]
form.h (struct form_control): renamed caret_char_offset to caret_box_offset; Added caret_form_offset & length.
form.c: initialise new entries in struct form_control; form_successful_controls() : code reshuffling to improve readibility.
box.h: TABing.
box.c (box_input): init struct form_control::length.
browser.c (browser_window_input_callback): UTF-8 support. Text area code needs similar changes.

svn path=/import/netsurf/; revision=1117
2004-07-19 20:40:11 +00:00
James Bursa 9bd3eadbe6 [project @ 2004-07-19 14:31:31 by bursa]
Update and simplify textarea code. Now uses BOX_BR instead of more than one inline container. Prepare for use of UTF-8 in textareas and inputs.

svn path=/import/netsurf/; revision=1104
2004-07-19 14:31:31 +00:00
John Tytgat e773536c97 [project @ 2004-06-17 21:41:11 by joty]
Added comment on struct form_option::text.

svn path=/import/netsurf/; revision=977
2004-06-17 21:41:11 +00:00
James Bursa 4a500f5614 [project @ 2004-05-21 23:42:26 by bursa]
Fix and clean code for radio and checkbox inputs.

svn path=/import/netsurf/; revision=884
2004-05-21 23:42:26 +00:00
James Bursa 9412dfeaed [project @ 2004-05-21 10:25:42 by bursa]
Add form_new_control() and form_free_control().

svn path=/import/netsurf/; revision=878
2004-05-21 10:25:42 +00:00
John Mark Bell 9de746e0a0 [project @ 2004-04-08 23:46:41 by jmb]
Improve keypress handling in form text boxes.
Note: Not yet implemented for textareas as these need more work anyway.

svn path=/import/netsurf/; revision=740
2004-04-08 23:46:41 +00:00
John Mark Bell 3aeafecd7b [project @ 2004-03-21 20:07:14 by jmb]
<input type="file" support>
Broken in places.

svn path=/import/netsurf/; revision=645
2004-03-21 20:07:14 +00:00
John Mark Bell 0dab93fe76 [project @ 2004-01-20 19:08:34 by jmb]
Allow toggling of POST support.
Add new toolbar icon numbers to riscos/gui.h

svn path=/import/netsurf/; revision=490
2004-01-20 19:08:34 +00:00
James Bursa 28f974f00f [project @ 2003-10-25 14:13:49 by bursa]
URL encoded POST support.

svn path=/import/netsurf/; revision=375
2003-10-25 14:13:49 +00:00