Commit Graph

46 Commits

Author SHA1 Message Date
Vincent Sanders
5749ace60f split out internal local history macros from public interface header 2021-03-23 22:09:37 +00:00
Daniel Silverstone
b67bbe3280 browser_window: Ensure that back works like 'back to safety'
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-21 20:33:52 +01:00
Michael Drake
813a284e9e Local history: Consolidate thumbnail dimensions. 2019-08-02 21:23:06 +01:00
Vincent Sanders
5742762070 split browser and browser_window operations 2019-08-01 19:51:19 +01:00
Vincent Sanders
83c9d2017f Fix clamping in commit fa64763b0d 2019-08-01 14:38:20 +01:00
Daniel Silverstone
fa64763b0d browser_history.c: Clamp contents to be 1x1 at min.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-01 09:29:22 +01:00
John-Mark Bell
7a75ec1576 History: don't update if there's no content.
Fixes #2566.
2018-01-20 18:47:26 +00:00
Michael Drake
9ca33854bf Browser history: Don't segfault when visiting pages with frames.
Core can't make queries of front end about browser windows with no
gui window.
2017-09-23 16:10:45 +01:00
Daniel Silverstone
a43d0cec7a Add concept of browser scroll offset saving in local history 2017-09-23 14:55:52 +01:00
Vincent Sanders
8fb2fc6fc3 rationalise history icon bitmap handling to ensure correct lifetime 2017-09-10 16:06:38 +01:00
Vincent Sanders
ec94d5f812 move history bitmap thumbnail into the page information structure 2017-09-10 10:31:06 +01:00
Vincent Sanders
75018632a9 Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done

@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 18:45:27 +01:00
Vincent Sanders
c4c2c22e87 remove depricated local history display API
Move local history display into separate module using corewindow
API. Note this is purely the rendering and teh browser history module
still constructs the history data.
2017-06-11 14:54:33 +01:00
Vincent Sanders
653ccb78a9 Split local history data from viewer in headers
This separates the local history data object API from the viewing
API. It also changes the api to return nsurl references instead of
strings.
2017-06-10 18:37:21 +01:00
Michael Drake
1d31402dcb Core local history: Remove debug background fill. 2017-06-10 12:05:23 +01:00
Michael Drake
56daba5878 Core local history: Make rendering behave like treeview.
This fixes behaviour now that both treeviews and local history can
be rendered through core window.
2017-06-10 11:50:53 +01:00
Michael Drake
368b03bffb Local history: Pass clip rectangle around as struct. 2017-06-10 11:15:20 +01:00
Michael Drake
283d921f34 Core local history: We always clip, so don't need to handle condition. 2017-06-10 10:44:33 +01:00
Michael Drake
5225ca2b90 Core local history: Remove unused redraw API. 2017-06-10 10:40:43 +01:00
Michael Drake
3b18d36b02 Local history: Render window background fill. 2017-06-09 21:58:16 +01:00
Vincent Sanders
2f5e5620e2 Change interface to system colours to allow reporting of errors
Allow system colour interface to report errors instead of silently
failing and propogate the errors. This also fixes teh system colour
documentation.
2017-03-01 12:50:30 +00:00
Vincent Sanders
3722ff8d86 Update all core use of plotters to new API 2017-02-11 13:55:41 +00:00
Vincent Sanders
74e73a3b8b make local history use system colours 2017-01-12 08:00:02 +00:00
Vincent Sanders
76a68d7dd0 Update content to split public and internal API 2016-06-06 09:01:38 +01:00
Vincent Sanders
667605869f move plotters header into public API 2016-05-30 21:05:57 +01:00
Vincent Sanders
9ce71876ce move layout header into public API 2016-05-30 11:31:35 +01:00
Vincent Sanders
2dab078f21 move bitmap API header to core include directory 2016-05-26 23:01:03 +01:00
Vincent Sanders
6722943b81 move the CSS content handler 2016-05-26 11:18:41 +01:00
Vincent Sanders
3224d7121a move image content handlers to accomodate core build changes 2016-05-23 23:32:16 +01:00
Vincent Sanders
974a4a21e1 split out the layout glyph sizing and splitting API
This refactors the core "font" sizing API to be handled through gui
 function tables similar to every other core/frontend calling API.
2016-04-23 23:32:21 +01:00
Vincent Sanders
c105738fa3 Change LOG() macro to be varadic
This changes the LOG macro to be varadic removing the need for all
callsites to have double bracketing and allows for future improvement
on how we use the logging macros.

The callsites were changed with coccinelle and the changes checked by
hand. Compile tested for several frontends but not all.

A formatting annotation has also been added which allows the compiler
to check the parameters and types passed to the logging.
2015-05-28 16:08:46 +01:00
Vincent Sanders
ee78742363 change browser history to use bitmap render interface for thumbnails 2015-04-23 22:50:16 +01:00
Vincent Sanders
f37e52c394 Move bitmap operations into an operation table.
The generic bitmap handlers provided by each frontend are called back
from the core and therefore should be in an operation table. This was
one of the very few remaining interfaces stopping the core code from
being split into a library.
2015-04-13 23:19:04 +01:00
Vincent Sanders
6f4f860ce3 Add some debug round thumbnail creation
More debugging of thumbnail creation as it appears to be involved in a
number of recently reported crashes on RISC OS.
2015-03-27 14:39:00 +00:00
Vincent Sanders
8a99b045bc Remove url from content thumbnailers API
The content thumbnailers for each frontend were being provided the
contents url. This was only ever used to call the urldb thumbnail
setting API.

This changes it so the single callsite that passed a valid url adds
the bitmap to that url itself in desktop_history.c instead of forcing
every frontend to require the urldb API.

Additionally the old API could pass the url as NULL which was causing
asserts where this was not an expected parameter value. Because of
this this fixes bug #2286 which was also present in the monkey
frontend as both called nsurl_access() on the url without the NULL
check and caused an assertion.
2015-03-15 00:00:45 +00:00
Vincent Sanders
87a53c3e82 Doxygen cleanups and increase DOT_GRAPH_MAX_NODES for some headers 2014-11-09 15:48:38 +00:00
Michael Drake
4ca959f46b Remove April 1st layout shuffling. 2014-11-05 17:30:00 +00:00
Vincent Sanders
612100bd1a make local history navigation return errors
The local history interface now reports errors to its callers isntead
of inconsistantly waning the user occasionally on error.

The documentation comemhts were also updated to match reality
2014-10-30 22:21:36 +00:00
Vincent Sanders
8947af72ce make history update return error code.
This now returns errors instead of failing and inconsistantly calling
user warnings for some error paths.
2014-10-29 23:15:51 +00:00
Vincent Sanders
b1ee46cfb3 make adding a history entry return an error code.
This returns the error code to the caller instead of (sometimes)
warning the user directly.
2014-10-29 22:47:25 +00:00
Vincent Sanders
a221fa7213 Ensure browser window creation returns errors from common initialisation.
The browser window common initialisation code returns error codes which
were being ignored. The errors were additionally being reported via
warn_user in inappropriate places within browser history construction.
2014-10-29 22:29:06 +00:00
Michael Drake
376c96831d Don't try to draw NULL history. 2014-10-18 10:31:47 +01:00
Vincent Sanders
17be8cf216 Put the font operations table alongside all the other core API
The netsurf core is driven from numerous operation tables most of
which are now set through a common netsurf_register() interface. The
font and plotting interfaces are currently separate and unlike all the
other operation tables are modified for differing contexts.

This change moves the font operations alongside all the other
operations table and remove unnecessary interaction with the renderers
font internals. Further this also removes the need for css internals
to be visible in frontends.
2014-10-13 11:56:31 +01:00
Michael Drake
32a522241f Rename function arguments to avoid using 'new'. 2014-02-19 14:08:52 +00:00
Michael Drake
b99357616c Fix unchecked return. Coverity #1175740. 2014-02-17 12:31:02 +00:00
Michael Drake
a38a63a37e Make history internal to browser_window module. 2014-02-15 18:44:50 +00:00