Commit Graph

625 Commits

Author SHA1 Message Date
François Revol
ad4cdc62b8 desktop: clamp dpi in browser_set_dpi() to sensible values
The cocoa frontend missed a cast resulting in a huge negative dpi and
some GB allocated for thumbnails...
2020-05-05 20:14:51 +01:00
Vincent Sanders
5742762070 split browser and browser_window operations 2019-08-01 19:51:19 +01:00
Vincent Sanders
cfdaf181a2 cleanup browser window message handling
separate out ready and done message processing to make the code
 more readable.

remove checking of content status as content_close() handles that
 itself.
2019-07-10 17:08:29 +01:00
Daniel Silverstone
03624bcf7a browser.c: Don't require > 0 chars in logging
Sometimes JavaScript chooses to log an empty string.  We should
honour that by requiring msg be a valid empty string.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-06-09 15:20:17 +01:00
Michael Drake
b38f7cc718 Browser window: Handle the content msg for getdims. 2019-05-06 15:38:33 +01:00
Daniel Silverstone
6fdc692aa5 Support DEBUG log level in console_log
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-06 10:16:48 +01:00
Daniel Silverstone
0312c45d6f Use console_log from browser_window_console_log
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-06 09:49:46 +01:00
Daniel Silverstone
8474c5d4c0 Logging: migrate and provide content interface
Migrate the console enums into netsurf/console.h and add
support so that contents can raise a message to log to
the console.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-05 22:17:10 +01:00
Daniel Silverstone
6952a23946 Provide new browser_window_console_log() API
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-05 22:17:10 +01:00
Daniel Silverstone
1146f8bf49 Add browser_window_exec
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-05 16:00:03 +01:00
Michael Drake
eeb7be1cbf Browser: Add function to get bw URL with any fragment.
This returns a ref to the URL.
2018-07-23 11:33:43 +01:00
Michael Drake
09b015bf11 Browser: Rename function to access bw URL. 2018-07-23 10:47:26 +01:00
Vincent Sanders
2a03ea3049 move html and text content handlers where they belong 2018-05-10 13:37:02 +01:00
Michael Drake
a72771f8eb Browser: Don't add history entry until after reformat.
Adding a history entry causes content_redraw() for the thumbnail.
But we can't content_redraw() until after content_reformat().

Otherwise we get HTML redraw before HTML layout has happened.
2018-04-14 17:00:18 +01:00
Michael Drake
fb4be0feb2 Browser history: Create new history entries early in the READY state.
This prevents us updating the previous history entry with this page's
scroll offsets.
2017-09-23 16:03:31 +01:00
Michael Drake
628fb0ceef Browser history: Update history scroll offsets on scroll to fragment. 2017-09-23 16:02:38 +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
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
Michael Drake
7385f74141 Browser favicon: Handle errorcode in the hlcache callback. 2017-08-28 11:04:42 +01:00
Vincent Sanders
703427a486 Update documentation removing junk and moving to markdown for most text files 2017-06-09 17:30:00 +01:00
Vincent Sanders
87066f9f8d simplify the browser window operations by removing scroll API
The browser window scrollingAPI was duplicated in window operation
table, this simplifies it to a single set_scroll API.
2017-04-26 20:48:54 +01:00
Vincent Sanders
bd932d958b remove reformat from browser window operation table
the reformat callback was completely unecessary and implementations
appeared potentialy buggy. This rationalises the API and reduces the
number of operations a frontend must provide.
2017-04-26 09:43:18 +01:00
Vincent Sanders
14bff8d023 replace redraw and update methods with invalidate in window table API 2017-04-19 16:23:08 +01:00
Vincent Sanders
0a8976156a split out browser window drag context into separate structure 2017-03-03 14:45:39 +00:00
Vincent Sanders
6083de4ee1 split out browser windoe favicon context to separate structure 2017-03-03 14:45:39 +00:00
Vincent Sanders
855721282c split out status bar text cache into separate struct 2017-03-03 14:45:39 +00:00
Vincent Sanders
44c5aef1c8 make scrollbar redraw signal errors correctly
allow scrollbar redraw to return error codes and update documentation
commenst appropriately.
2017-03-01 23:30:29 +00:00
Vincent Sanders
7d660561cc Update knockout plotter to use new API 2017-02-11 13:57:06 +00:00
Vincent Sanders
3722ff8d86 Update all core use of plotters to new API 2017-02-11 13:55:41 +00:00
Vincent Sanders
012b797713 remove unecessary textinput header use from global history header 2016-06-30 15:40:10 +01:00
Vincent Sanders
c313524998 reduce curl usage to fetcher, url unescaping and time parsing 2016-06-29 23:06:53 +01:00
Vincent Sanders
8861923455 Allow include directories to be added by sub makefiles 2016-06-06 14:47:27 +01: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
7fc0a4c481 move desktop window header into public API 2016-05-30 17:32:57 +01:00
Vincent Sanders
fe7eb85614 move misc header into public API 2016-05-30 11:23:32 +01:00
Vincent Sanders
1eb86d9df2 move window header into public API 2016-05-30 11:01:40 +01:00
Vincent Sanders
6722943b81 move the CSS content handler 2016-05-26 11:18:41 +01:00
Vincent Sanders
6a36d4ec2b remove all core usage of warn_user API 2016-04-26 12:50:16 +01:00
Vincent Sanders
7ec49463da fix error reporting from frameset creation 2016-04-26 10:26:00 +01:00
Vincent Sanders
16dde3c704 make framebuffer use nsutils library monotonic times 2016-04-21 13:50:16 +01:00
Vincent Sanders
77a1b4b5e0 replace wallclock API usage with nsutils monitonic time 2016-04-21 13:12:56 +01:00
Vincent Sanders
392307bb1f reduce content header interdependancy 2016-04-18 23:04:16 +01:00
Vincent Sanders
33c7df0c40 complete the rename of the gui browser table
When the operations tables were created the browser table was renamed
to miscellaneous except the actual rename patch was never applied,
this fixes that situation.
2016-04-16 23:50:21 +01:00
Vincent Sanders
9faef114ec Update font interface documentation to include parameter direction 2016-03-22 17:52:24 +00:00
Michael Drake
0a3519fdac Remove torrent of logging during browser window resize. 2016-02-06 12:41:51 +00:00
Michael Drake
519775a65c Don't leak frame scrollbars. 2015-10-31 16:14:40 +00:00
Vincent Sanders
eb17f4ab37 Implement basic browsing context name property 2015-10-18 10:53:49 +01:00
Michael Drake
16fd36eb9d Proper error handling for JS context creation. 2015-08-13 12:23:59 +01:00
Michael Drake
c7a3229494 Can't tell if failure to create a JS context is an error or not.
It won't create one when built jsoff.
2015-08-13 11:59:43 +01:00