r3638 jmb - in /trunk/netsurf: desktop/netsurf.c riscos/gui.c
by netsurf@semichrome.net
Author: jmb
Date: Wed Oct 31 15:39:55 2007
New Revision: 3638
URL: http://source.netsurf-browser.org?rev=3638&view=rev
Log:
Ignore SIGPIPE on all platforms, not just RISC OS.
Modified:
trunk/netsurf/desktop/netsurf.c
trunk/netsurf/riscos/gui.c
Modified: trunk/netsurf/desktop/netsurf.c
URL: http://source.netsurf-browser.org/trunk/netsurf/desktop/netsurf.c?rev=363...
==============================================================================
--- trunk/netsurf/desktop/netsurf.c (original)
+++ trunk/netsurf/desktop/netsurf.c Wed Oct 31 15:39:55 2007
@@ -19,6 +19,7 @@
*/
#include <locale.h>
+#include <signal.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
@@ -75,6 +76,14 @@
void netsurf_init(int argc, char** argv)
{
struct utsname utsname;
+
+ /* Ignore SIGPIPE - this is necessary as OpenSSL can generate these
+ * and the default action is to terminate the app. There's no easy
+ * way of determining the cause of the SIGPIPE (other than using
+ * sigaction() and some mechanism for getting the file descriptor
+ * out of libcurl). However, we expect nothing else to generate a
+ * SIGPIPE, anyway, so may as well just ignore them all. */
+ signal(SIGPIPE, SIG_IGN);
#if !(defined(__SVR4) && defined(__sun))
stdout = stderr;
Modified: trunk/netsurf/riscos/gui.c
URL: http://source.netsurf-browser.org/trunk/netsurf/riscos/gui.c?rev=3638&r1=...
==============================================================================
--- trunk/netsurf/riscos/gui.c (original)
+++ trunk/netsurf/riscos/gui.c Wed Oct 31 15:39:55 2007
@@ -383,13 +383,6 @@
prev_sigs.sigint = signal(SIGINT, ro_gui_signal);
prev_sigs.sigsegv = signal(SIGSEGV, ro_gui_signal);
prev_sigs.sigterm = signal(SIGTERM, ro_gui_signal);
- /* Ignore SIGPIPE - this is necessary as OpenSSL can generate these
- * and the default action is to terminate the app. There's no easy
- * way of determining the cause of the SIGPIPE (other than using
- * sigaction() and some mechanism for getting the file descriptor
- * out of libcurl). However, we expect nothing else to generate a
- * SIGPIPE, anyway, so may as well just ignore them all. */
- signal(SIGPIPE, SIG_IGN);
if (prev_sigs.sigabrt == SIG_ERR || prev_sigs.sigfpe == SIG_ERR ||
prev_sigs.sigill == SIG_ERR ||
15 years, 10 months
r3637 jmb - /trunk/netsurf/content/urldb.c
by netsurf@semichrome.net
Author: jmb
Date: Tue Oct 30 23:19:03 2007
New Revision: 3637
URL: http://source.netsurf-browser.org?rev=3637&view=rev
Log:
Work around sites sending domain cookies for .foo.com from hosts such as bar.bat.foo.com, then expecting domain matching to succeed. This causes me pain.
Modified:
trunk/netsurf/content/urldb.c
Modified: trunk/netsurf/content/urldb.c
URL: http://source.netsurf-browser.org/trunk/netsurf/content/urldb.c?rev=3637&...
==============================================================================
--- trunk/netsurf/content/urldb.c (original)
+++ trunk/netsurf/content/urldb.c Tue Oct 30 23:19:03 2007
@@ -2751,12 +2751,27 @@
goto error;
}
- /* 4.3.2:iv Ensure H contains no dots */
- for (int i = 0; i < (hlen - dlen); i++)
- if (host[i] == '.') {
- urldb_free_cookie(c);
- goto error;
+ /* If you believe the spec, H should contain no
+ * dots in _any_ cookie. Unfortunately, however,
+ * reality differs in that many sites send domain
+ * cookies of the form .foo.com from hosts such
+ * as bar.bat.foo.com and then expect domain
+ * matching to work. Thus we have to do what they
+ * expect, regardless of any potential security
+ * implications.
+ *
+ * Ensure that we're dealing with a domain cookie
+ * here for extra paranoia.
+ */
+ if (c->domain[0] != '.') {
+ /* 4.3.2:iv Ensure H contains no dots */
+ for (int i = 0; i < (hlen - dlen); i++) {
+ if (host[i] == '.') {
+ urldb_free_cookie(c);
+ goto error;
+ }
}
+ }
}
/* Now insert into database */
15 years, 10 months
r3636 bursa - in /trunk/netsurf/desktop: browser.c frames.c tree.c
by netsurf@semichrome.net
Author: bursa
Date: Sun Oct 28 17:05:39 2007
New Revision: 3636
URL: http://source.netsurf-browser.org?rev=3636&view=rev
Log:
Bug fixes by Franz Korntner.
Modified:
trunk/netsurf/desktop/browser.c
trunk/netsurf/desktop/frames.c
trunk/netsurf/desktop/tree.c
Modified: trunk/netsurf/desktop/browser.c
URL: http://source.netsurf-browser.org/trunk/netsurf/desktop/browser.c?rev=363...
==============================================================================
--- trunk/netsurf/desktop/browser.c (original)
+++ trunk/netsurf/desktop/browser.c Sun Oct 28 17:05:39 2007
@@ -1017,7 +1017,7 @@
int i;
struct content *c;
- if (bw->scale == scale)
+ if (fabs(bw->scale-scale) < 0.0001)
return;
bw->scale = scale;
c = bw->current_content;
Modified: trunk/netsurf/desktop/frames.c
URL: http://source.netsurf-browser.org/trunk/netsurf/desktop/frames.c?rev=3636...
==============================================================================
--- trunk/netsurf/desktop/frames.c (original)
+++ trunk/netsurf/desktop/frames.c Sun Oct 28 17:05:39 2007
@@ -40,12 +40,6 @@
/** maximum frame resize margin */
#define FRAME_RESIZE 6
-
-/** browser window which is being redrawn. Valid only during redraw. */
-struct browser_window *current_redraw_browser;
-
-/** fake content for <a> being saved as a link */
-struct content browser_window_href_content;
static bool browser_window_resolve_frame_dimension(struct browser_window *bw,
struct browser_window *sibling, int x, int y, bool width,
@@ -561,7 +555,7 @@
if (bw_d->unit == FRAME_DIMENSION_RELATIVE) {
if ((sibling_pixels == 0) && (bw_dimension == 0))
return false;
- if (sibling_d->value == 0)
+ if (fabs(sibling_d->value) < 0.0001)
bw_d->value = 1;
if (sibling_pixels == 0)
sibling_d->value = (sibling_d->value * bw_pixels) / bw_dimension;
@@ -574,7 +568,7 @@
} else if (sibling_d->unit == FRAME_DIMENSION_RELATIVE) {
if ((bw_pixels == 0) && (sibling_dimension == 0))
return false;
- if (bw_d->value == 0)
+ if (fabs(bw_d->value) < 0.0001)
bw_d->value = 1;
if (bw_pixels == 0)
bw_d->value = (bw_d->value * sibling_pixels) / sibling_dimension;
Modified: trunk/netsurf/desktop/tree.c
URL: http://source.netsurf-browser.org/trunk/netsurf/desktop/tree.c?rev=3636&r...
==============================================================================
--- trunk/netsurf/desktop/tree.c (original)
+++ trunk/netsurf/desktop/tree.c Sun Oct 28 17:05:39 2007
@@ -916,7 +916,7 @@
void tree_delete_node_internal(struct tree *tree, struct node *node, bool siblings) {
struct node *next, *child;
struct node_element *e, *f, *domain, *path;
- char *domain_t, *path_t, name_t;
+ char *domain_t, *path_t, *name_t;
char *space;
assert(node);
@@ -982,6 +982,7 @@
}
}
if (e->sprite) {
+ /* TODO the type of this field is platform dependent */
free(e->sprite); /* \todo platform specific bits */
e->sprite = NULL;
}
15 years, 11 months
r3635 bursa - in /trunk/netsurf/css: css.c ruleset.c
by netsurf@semichrome.net
Author: bursa
Date: Sun Oct 28 17:01:53 2007
New Revision: 3635
URL: http://source.netsurf-browser.org?rev=3635&view=rev
Log:
Bug fixes in parse_length, parse_clip, css_dump_style, css_dump_length by Franz Korntner.
Modified:
trunk/netsurf/css/css.c
trunk/netsurf/css/ruleset.c
Modified: trunk/netsurf/css/css.c
URL: http://source.netsurf-browser.org/trunk/netsurf/css/css.c?rev=3635&r1=363...
==============================================================================
--- trunk/netsurf/css/css.c (original)
+++ trunk/netsurf/css/css.c Sun Oct 28 17:01:53 2007
@@ -1655,8 +1655,7 @@
if (style->background_attachment ==
CSS_BACKGROUND_ATTACHMENT_UNKNOWN)
fprintf(stderr, " UNKNOWN");
- else if (style->background_repeat ==
- CSS_BACKGROUND_ATTACHMENT_NOT_SET)
+ else if (style->background_attachment == CSS_BACKGROUND_ATTACHMENT_NOT_SET)
;
else
fprintf(stderr, " %s",
@@ -1959,10 +1958,10 @@
css_list_style_type_name[
style->list_style_type]);
- if (style->list_style_type ==
+ if (style->list_style_position ==
CSS_LIST_STYLE_POSITION_UNKNOWN)
fprintf(stderr, " UNKNOWN");
- else if (style->list_style_type ==
+ else if (style->list_style_position ==
CSS_LIST_STYLE_POSITION_NOT_SET)
;
else
@@ -2435,7 +2434,7 @@
void css_dump_length(const struct css_length * const length)
{
- if (length->value == 0)
+ if (fabs(length->value) < 0.0001)
fprintf(stderr, "0");
else
fprintf(stderr, "%g%s", length->value,
Modified: trunk/netsurf/css/ruleset.c
URL: http://source.netsurf-browser.org/trunk/netsurf/css/ruleset.c?rev=3635&r1...
==============================================================================
--- trunk/netsurf/css/ruleset.c (original)
+++ trunk/netsurf/css/ruleset.c Sun Oct 28 17:01:53 2007
@@ -653,7 +653,7 @@
css_unit u;
float value;
int num_length;
- if (v->type == CSS_NODE_NUMBER && atof(v->data) == 0) {
+ if (v->type == CSS_NODE_NUMBER && fabs(atof(v->data)) < 0.0001) {
length->unit = CSS_UNIT_PX;
length->value = 0;
return 0;
@@ -1688,9 +1688,8 @@
for (i = 0; i != 4; i++) {
switch (t->type) {
case CSS_NODE_IDENT:
- if (t->data_length == 4 &&
- strncasecmp(t->data, "auto", 4) == 0) {
- rect[i].rect = CSS_CLIP_AUTO;
+ if (t->data_length == 4 && strncasecmp(t->data, "auto", 4) == 0) {
+ rect[i].rect = CSS_CLIP_RECT_AUTO;
}
else
return;
15 years, 11 months
r3633 adrianl - /trunk/netsurf/riscos/search.c
by netsurf@semichrome.net
Author: adrianl
Date: Mon Oct 15 23:48:24 2007
New Revision: 3633
URL: http://source.netsurf-browser.org?rev=3633&view=rev
Log:
Fix recursion when search string is pure wildcard
Modified:
trunk/netsurf/riscos/search.c
Modified: trunk/netsurf/riscos/search.c
URL: http://source.netsurf-browser.org/trunk/netsurf/riscos/search.c?rev=3633&...
==============================================================================
--- trunk/netsurf/riscos/search.c (original)
+++ trunk/netsurf/riscos/search.c Mon Oct 15 23:48:24 2007
@@ -328,6 +328,7 @@
{
int string_len;
char *string;
+ int i = 0;
string = ro_gui_get_icon_string(dialog_search, ICON_SEARCH_TEXT);
assert(string);
@@ -335,7 +336,9 @@
ro_gui_search_add_recent(string);
string_len = strlen(string);
- if (string_len <= 0) {
+ for(i = 0; i < string_len; i++)
+ if (string[i] != '#' && string[i] != '*') break;
+ if (i >= string_len) {
free_matches();
show_status(true);
ro_gui_set_icon_shaded_state(dialog_search,
@@ -643,7 +646,7 @@
}
/* end of pattern reached */
- *m_len = s - ss;
+ *m_len = max(s - ss, 1);
return ss;
}
15 years, 11 months
r3632 tlsa - in /trunk/netsurfweb/themes: index.de index.en
by netsurf@semichrome.net
Author: tlsa
Date: Fri Oct 12 16:23:21 2007
New Revision: 3632
URL: http://source.netsurf-browser.org?rev=3632&view=rev
Log:
New theme from Gavin Wraith.
Modified:
trunk/netsurfweb/themes/index.de
trunk/netsurfweb/themes/index.en
Modified: trunk/netsurfweb/themes/index.de
URL: http://source.netsurf-browser.org/trunk/netsurfweb/themes/index.de?rev=36...
==============================================================================
--- trunk/netsurfweb/themes/index.de (original)
+++ trunk/netsurfweb/themes/index.de Fri Oct 12 16:23:21 2007
@@ -28,6 +28,12 @@
<p class="themeauthor">Autor: <a href="http://hallas.net/">Richard G. Hallas</a></p>
<p class="themeinstall"><a href="Iyonix">Thema installieren...</a></p>
+<h2 class="themename">Kemp</h2>
+
+<p class="themeimage"><img src="Kempi.png" alt=""></p>
+<p class="themeauthor">Author: <a href="http://quadrone.org/">Arvid Axelsson</a> (Port: <a href="http://www.wra1th.plus.com/">Gavin Wraith</a>)</p>
+<p class="themeinstall"><a href="Kemp">Install theme...</a></p>
+
<h2 class="themename">Qute</h2>
<p class="themeimage"><img src="Qutei.png" alt=""></p>
Modified: trunk/netsurfweb/themes/index.en
URL: http://source.netsurf-browser.org/trunk/netsurfweb/themes/index.en?rev=36...
==============================================================================
--- trunk/netsurfweb/themes/index.en (original)
+++ trunk/netsurfweb/themes/index.en Fri Oct 12 16:23:21 2007
@@ -28,6 +28,12 @@
<p class="themeauthor">Author: <a href="http://hallas.net/">Richard G. Hallas</a></p>
<p class="themeinstall"><a href="Iyonix">Install theme...</a></p>
+<h2 class="themename">Kemp</h2>
+
+<p class="themeimage"><img src="Kempi.png" alt=""></p>
+<p class="themeauthor">Author: <a href="http://quadrone.org/">Arvid Axelsson</a> (Port: <a href="http://www.wra1th.plus.com/">Gavin Wraith</a>)</p>
+<p class="themeinstall"><a href="Kemp">Install theme...</a></p>
+
<h2 class="themename">Qute</h2>
<p class="themeimage"><img src="Qutei.png" alt=""></p>
15 years, 11 months
r3631 rjw - in /trunk/netsurf/riscos: help.c menus.c options.h
by netsurf@semichrome.net
Author: rjw
Date: Wed Oct 10 22:22:36 2007
New Revision: 3631
URL: http://source.netsurf-browser.org?rev=3631&view=rev
Log:
Allow interactive help to be turned off (implement 1793020)
Modified:
trunk/netsurf/riscos/help.c
trunk/netsurf/riscos/menus.c
trunk/netsurf/riscos/options.h
Modified: trunk/netsurf/riscos/help.c
URL: http://source.netsurf-browser.org/trunk/netsurf/riscos/help.c?rev=3631&r1...
==============================================================================
--- trunk/netsurf/riscos/help.c (original)
+++ trunk/netsurf/riscos/help.c Wed Oct 10 22:22:36 2007
@@ -31,6 +31,7 @@
#include "riscos/gui.h"
#include "riscos/help.h"
#include "riscos/menus.h"
+#include "riscos/options.h"
#include "riscos/theme.h"
#include "riscos/treeview.h"
#include "riscos/wimp.h"
@@ -99,6 +100,10 @@
os_error *error;
const char *auto_text;
int i;
+
+ /* check we aren't turned off */
+ if (!option_interactive_help)
+ return;
/* only accept help requests */
if ((!message) || (message->action != message_HELP_REQUEST))
@@ -315,6 +320,10 @@
char *help_start;
wimp_t task = 0;
os_error *error;
+
+ /* don't launch a second copy of anything */
+ if (ro_gui_interactive_help_available())
+ return;
/* launch <Help$Start> */
help_start = getenv("Help$Start");
Modified: trunk/netsurf/riscos/menus.c
URL: http://source.netsurf-browser.org/trunk/netsurf/riscos/menus.c?rev=3631&r...
==============================================================================
--- trunk/netsurf/riscos/menus.c (original)
+++ trunk/netsurf/riscos/menus.c Wed Oct 10 22:22:36 2007
@@ -1421,7 +1421,12 @@
0, 0, true);
return true;
case HELP_LAUNCH_INTERACTIVE:
- ro_gui_interactive_help_start();
+ if (!ro_gui_interactive_help_available()) {
+ ro_gui_interactive_help_start();
+ option_interactive_help = true;
+ } else {
+ option_interactive_help = !option_interactive_help;
+ }
return true;
/* history actions */
@@ -1784,11 +1789,11 @@
/* help actions */
case HELP_LAUNCH_INTERACTIVE:
- result = ro_gui_interactive_help_available();
- ro_gui_menu_set_entry_shaded(current_menu,
- action, result);
+ result = ro_gui_interactive_help_available()
+ && option_interactive_help;
ro_gui_menu_set_entry_ticked(current_menu,
action, result);
+ ro_gui_save_options();
break;
/* history actions */
Modified: trunk/netsurf/riscos/options.h
URL: http://source.netsurf-browser.org/trunk/netsurf/riscos/options.h?rev=3631...
==============================================================================
--- trunk/netsurf/riscos/options.h (original)
+++ trunk/netsurf/riscos/options.h Wed Oct 10 22:22:36 2007
@@ -62,6 +62,7 @@
extern char *option_theme_path;
extern char *option_theme_save;
extern bool option_thumbnail_iconise;
+extern bool option_interactive_help;
#define EXTRA_OPTION_DEFINE \
bool option_use_mouse_gestures = false;\
@@ -98,7 +99,8 @@
char *option_recent_save = 0; \
char *option_theme_path = 0; \
char *option_theme_save = 0; \
-bool option_thumbnail_iconise = true;
+bool option_thumbnail_iconise = true; \
+bool option_interactive_help = true;
#define EXTRA_OPTION_TABLE \
{ "use_mouse_gestures", OPTION_BOOL, &option_use_mouse_gestures },\
@@ -135,6 +137,7 @@
{ "recent_save", OPTION_STRING, &option_recent_save }, \
{ "theme_path", OPTION_STRING, &option_theme_path }, \
{ "theme_save", OPTION_STRING, &option_theme_save }, \
-{ "thumbnail_iconise", OPTION_BOOL, &option_thumbnail_iconise }
+{ "thumbnail_iconise", OPTION_BOOL, &option_thumbnail_iconise }, \
+{ "interactive_help", OPTION_BOOL, &option_interactive_help }
#endif
15 years, 11 months
r3630 rjw - /trunk/netsurf/render/box_normalise.c
by netsurf@semichrome.net
Author: rjw
Date: Wed Oct 10 21:34:02 2007
New Revision: 3630
URL: http://source.netsurf-browser.org?rev=3630&view=rev
Log:
Don't remove table rows with no children (fix 1753365)
Modified:
trunk/netsurf/render/box_normalise.c
Modified: trunk/netsurf/render/box_normalise.c
URL: http://source.netsurf-browser.org/trunk/netsurf/render/box_normalise.c?re...
==============================================================================
--- trunk/netsurf/render/box_normalise.c (original)
+++ trunk/netsurf/render/box_normalise.c Wed Oct 10 21:34:02 2007
@@ -565,18 +565,26 @@
col_info->current_column = 0;
col_info->extra = false;
- if (row->children == 0) {
- LOG(("row->children == 0, removing"));
- if (row->prev == 0)
- row->parent->children = row->next;
- else
- row->prev->next = row->next;
- if (row->next != 0)
- row->next->prev = row->prev;
- box_free(row);
- } else {
+ /* Removing empty rows causes ill effects for HTML such as:
+ *
+ * <tr><td colspan="2">1</td></tr><tr></tr><tr><td>2</td></tr>
+ *
+ * as it breaks the colspan value. Additionally, both MSIE and FF
+ * render in the same manner as NetSurf does with the empty row
+ * culling commented out.
+ */
+// if (row->children == 0) {
+// LOG(("row->children == 0, removing"));
+// if (row->prev == 0)
+// row->parent->children = row->next;
+// else
+// row->prev->next = row->next;
+// if (row->next != 0)
+// row->next->prev = row->prev;
+// box_free(row);
+// } else {
col_info->num_rows++;
- }
+// }
LOG(("row %p done", row));
15 years, 11 months
r3629 rjw - /trunk/netsurf/render/layout.c
by netsurf@semichrome.net
Author: rjw
Date: Wed Oct 10 21:33:15 2007
New Revision: 3629
URL: http://source.netsurf-browser.org?rev=3629&view=rev
Log:
Remove legacy code.
Modified:
trunk/netsurf/render/layout.c
Modified: trunk/netsurf/render/layout.c
URL: http://source.netsurf-browser.org/trunk/netsurf/render/layout.c?rev=3629&...
==============================================================================
--- trunk/netsurf/render/layout.c (original)
+++ trunk/netsurf/render/layout.c Wed Oct 10 21:33:15 2007
@@ -2074,14 +2074,7 @@
row_group = row_group->next) {
int row_group_height = 0;
for (row = row_group->children; row; row = row->next) {
- /* some sites use height="1" or similar
- * to attempt to make cells as small as
- * possible, so treat it as a minimum */
- int row_height = (int) css_len2px(&row->style->
- height.length, row->style);
- /* we can't use this value currently as it is always
- * the height of a line of text in the current style */
- row_height = 0;
+ int row_height = 0;
for (c = row->children; c; c = c->next) {
assert(c->style);
c->width = xs[c->start_column + c->columns] -
15 years, 11 months