Commit Graph

54 Commits

Author SHA1 Message Date
Michael Drake
c2a718075a A load of refactoring of how content selection and input work.
Keypresses now go via content interface.
Contents don't shove the selection object into browser windows any more.
Contents report selection existence by sending message.
HTML content keeps track of where selections in it exist.
Contents report whether they have input focus via caret setting msg.
Caret can be hidden (can still input/paste) or removed.
Consolidate textarea selection handling.
Make textarea report its selection status changes to client.
Various textarea fixes.
Changed how we decide when to clear selections, and give focus.
2013-02-22 12:19:35 +00:00
Vincent Sanders
529ca251fc rename flags for browser_window routines to be shorter 2013-02-18 11:51:42 +00:00
Vincent Sanders
3bfb5b96a7 browser_window_navigate refactor 2013-02-18 11:23:27 +00:00
Michael Drake
153c444454 Move browser_window struct to private header. Places that shouldn't include it do, such as front end code.
Frontends that have been updated to build:
  framebuffer
  gtk
  monkey
  riscos

TODO:
  amiga
  atari
  beos
  cocoa
  windows
2012-08-22 12:22:58 +01:00
Michael Drake
35fd2ad7f2 Don't use GUI_POINTERs in content handlers. 2012-08-16 22:21:08 +01:00
Michael Drake
6daf6c178d Frame drag start function can take child bw. Don't need to get root bw in html handler. Avoids bw dereferences. 2012-08-16 16:14:15 +01:00
Michael Drake
195a77a4cd Make new function for starting a frames resize and use it. 2012-08-16 15:55:20 +01:00
Michael Drake
c1be4c9e77 Formatting changes. 2012-08-16 15:47:14 +01:00
Michael Drake
7277ce5dfc Remove redundant "action" param. 2012-08-16 15:43:14 +01:00
Michael Drake
83c8e940f8 Don't pass status to frames handler. 2012-08-16 15:38:06 +01:00
Michael Drake
4872bc30b8 Remove redundant scrollbar widget message. 2012-08-16 13:13:25 +01:00
Daniel Silverstone
a195282bfb Include render/box.h
svn path=/trunk/netsurf/; revision=13639
2012-03-24 22:29:31 +00:00
Daniel Silverstone
d1194be49f Migrate frame types so that desktop/browser.h does not include render/html.h
svn path=/trunk/netsurf/; revision=13605
2012-03-24 17:09:21 +00:00
Michael Drake
c08ee82076 Allow drag handlers to inform browser window layer of any pointer range constraints.
svn path=/trunk/netsurf/; revision=13394
2012-01-10 22:02:19 +00:00
Michael Drake
767f40dc72 Simplify frameset distribution calcs.
svn path=/trunk/netsurf/; revision=13376
2012-01-06 14:44:01 +00:00
Michael Drake
41ef599293 Fix frame dimension calculations when required sizes don't fit the available space.
svn path=/trunk/netsurf/; revision=13271
2011-12-14 18:31:57 +00:00
John Mark Bell
f2993e6ed0 content_get_url -> hlcache_handle_get_url, content__get_url -> content_get_url
svn path=/trunk/netsurf/; revision=13236
2011-12-04 14:55:23 +00:00
Michael Drake
e2a7600e9a Big wodge of internal browser window scroll fixes, or "rationalisation of browser window scrollbar handling".
svn path=/trunk/netsurf/; revision=13221
2011-12-02 16:10:13 +00:00
Michael Drake
898b01e721 More conversion to nsurl. (box->href, object params, imagemaps, (i)frames)
svn path=/trunk/netsurf/; revision=12933
2011-10-03 20:28:29 +00:00
Michael Drake
36eff6da2b Port more internals to nsurl. Front ends may need updating.
svn path=/trunk/netsurf/; revision=12926
2011-10-03 15:56:47 +00:00
Michael Drake
7bf7d2d745 Improve resizing frames.
svn path=/trunk/netsurf/; revision=12771
2011-09-07 12:27:37 +00:00
Michael Drake
33ebea90d5 Finish moving frame resizing over to new frame dimensions.
svn path=/trunk/netsurf/; revision=12749
2011-09-06 10:44:00 +00:00
Michael Drake
0401d52f51 Remove gui_window_frame_resize_start() functions.
svn path=/trunk/netsurf/; revision=12738
2011-09-05 15:35:34 +00:00
Michael Drake
19317c76ba Implement frames in the core.
svn path=/trunk/netsurf/; revision=12709
2011-09-04 17:24:45 +00:00
Michael Drake
9c91893028 Fix selection for non-gui browser windows (iframes).
Selection no longer uses current_redraw_browser.
Fix long-standing selection bugs on platforms that use action on release behaviour.

svn path=/trunk/netsurf/; revision=12598
2011-07-13 13:20:26 +00:00
Michael Drake
9f2ea3be4c Iframe scrollbars.
svn path=/trunk/netsurf/; revision=12571
2011-07-05 20:13:28 +00:00
Michael Drake
c587cfe9de Iframes inherit parent browser window's scale.
svn path=/trunk/netsurf/; revision=12505
2011-06-24 13:05:57 +00:00
Michael Drake
5a4c8916ef If iframes are reformatted due to containing document reflow, don't need to redraw them since they will be redrawn when the containing document is redrawn. Make iframe handling more robust.
svn path=/trunk/netsurf/; revision=12497
2011-06-24 09:30:33 +00:00
Michael Drake
53f4da3420 First pass at core iframes. Currently lacking scrollbars.
svn path=/trunk/netsurf/; revision=12474
2011-06-14 20:00:18 +00:00
Michael Drake
a79ef8cffb Remove redundant code.
svn path=/trunk/netsurf/; revision=12458
2011-06-04 14:38:50 +00:00
Vincent Sanders
c7e943c7d2 check for dereference of teh right value
svn path=/trunk/netsurf/; revision=12424
2011-05-17 07:28:15 +00:00
John Mark Bell
21f01af35a Avoid dereferencing NULL
svn path=/trunk/netsurf/; revision=12421
2011-05-16 22:09:26 +00:00
Chris Young
5e9bdb16c6 Temporary hack to stop crashing in Amiga frontend. Roll on frames re-implementation!
svn path=/trunk/netsurf/; revision=12079
2011-03-16 20:11:10 +00:00
Vincent Sanders
1dbbbaf64a ensure iframe stuff does not de-reference null pointers
svn path=/trunk/netsurf/; revision=10884
2010-10-14 00:59:39 +00:00
Michael Drake
f6faa20a37 In switch statements add default branch for unknown enum values, with assert.
svn path=/trunk/netsurf/; revision=10603
2010-07-06 21:09:20 +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
John Mark Bell
5feb7018c5 Replace parent_url with a pointer to the parent content.
svn path=/trunk/netsurf/; revision=8428
2009-07-10 00:26:37 +00:00
John Mark Bell
d81a949cdd Remove unused code
svn path=/trunk/netsurf/; revision=7603
2009-05-28 15:51:03 +00:00
Rob Kendrick
afdf592637 Merge Mike's tabs changes. Still needs some cleaning.
svn path=/trunk/netsurf/; revision=5189
2008-08-24 10:31:38 +00:00
Rob Kendrick
052f99d379 Include headers we need, rather than depending on (optional) features doing so.
svn path=/trunk/netsurf/; revision=4774
2008-07-28 20:32:51 +00:00
John Mark Bell
23fb72ea6b The core code has always assumed a locale of "C".
Do not change the locale globally, else things will break in weird and 
wonderful ways.

Introduce utils/locale.[ch], which provide locale-specific wrappers for various 
functions (currently just the <ctype.h> ones).

Fix up the few places I can see that actually require that the underlying 
locale is paid attention to.

Some notes:

  1) The GTK frontend code has not been touched. It is possible that reading of 
     numeric values (e.g. from the preferences dialogue) may break with this 
     change, particularly in locales that use something other than '.' as their
     decimal separator.
  2) The search code is left unchanged (i.e. assuming a locale of "C"). 
     This may break case insensitive matching of non-ASCII characters. 
     I doubt that ever actually worked, anyway. In future, it should use
     Unicode case conversion to achieve the same effect.
  3) The text input handling in the core makes use of isspace() to detect
     word boundaries. This is fine for western languages (even in the C locale,
     which it's currently assuming). It will, however, break for CJK et. al. 
     (this has always been the case, rather than being a new issue)
  4) text-transform uses locale-specific variants of to{lower,upper}. In future
     this should probably be performing Unicode case conversion. This is the
     only part of the core code that makes use of locale information.

In future, if you require locale-specific behaviour, do the following:

  setlocale(LC_<whatever>, "");
  <your operation(s) here>
  setlocale(LC_<whatever>, "C");

  The first setlocale will change the current locale to the native environment.
  The second setlocale will reset the current locale to "C".
  Any value other than "" or "C" is probably a bug, unless there's a really
  good reason for it.

In the long term, it is expected that all locale-dependent code will reside in 
platform frontends -- the core being wholly locale agnostic (though assuming 
"C" for things like decimal separators).


svn path=/trunk/netsurf/; revision=4153
2008-05-13 14:37:44 +00:00
James Bursa
d8b810b46b Bug fixes by Franz Korntner.
svn path=/trunk/netsurf/; revision=3636
2007-10-28 17:05:39 +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
John Mark Bell
cc684469df Fix division by 0 caused by uninitialised scale value.
Break out initialisation of common parts of struct browser_window into their own function.

svn path=/trunk/netsurf/; revision=3481
2007-08-07 07:58:04 +00:00
James Bursa
07c54283e3 Move window scaling from platform-specific code to desktop/browser.c. Modify gtk gui to handle scaling in the same way as RO.
svn path=/trunk/netsurf/; revision=3478
2007-08-07 03:55:18 +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
John Mark Bell
a27a1e425a Fix return value check
svn path=/trunk/netsurf/; revision=3249
2007-04-07 23:27:28 +00:00
Richard Wilson
00af899230 Open window targets with a new name in a new window. Fix handling of Adjust-click on a form submit when new window opening is disabled.
svn path=/trunk/netsurf/; revision=3248
2007-04-07 23:08:31 +00:00
Michael Drake
3dea2a3987 Stop iframe contents from appearing in global history. Fix by JMB.
svn path=/trunk/netsurf/; revision=3198
2007-03-06 20:25:27 +00:00
John Mark Bell
df4dbaf4cf Handle cookies in unverifiable transactions
svn path=/trunk/netsurf/; revision=3151
2007-01-27 20:58:20 +00:00