r3535 jmb - /trunk/netsurf/riscos/url_complete.c
by netsurf@semichrome.net
Author: jmb
Date: Wed Aug 29 01:27:52 2007
New Revision: 3535
URL: http://source.netsurf-browser.org?rev=3535&view=rev
Log:
Probably fix crash on clicking in url completion dialogue.
URL completion really needs revisiting, as it's full of side effects and has weird and wonderful interactions with other parts of the system.
Modified:
trunk/netsurf/riscos/url_complete.c
Modified: trunk/netsurf/riscos/url_complete.c
URL: http://source.netsurf-browser.org/trunk/netsurf/riscos/url_complete.c?rev...
==============================================================================
--- trunk/netsurf/riscos/url_complete.c (original)
+++ trunk/netsurf/riscos/url_complete.c Wed Aug 29 01:27:52 2007
@@ -720,12 +720,22 @@
ICON_TOOLBAR_URL,
url_complete_matches[
url_complete_matches_selection]);
- browser_window_go(g->bw,
+ global_history_add_recent(url_complete_matches[
+ url_complete_matches_selection]);
+
+ /** \todo The interaction of components here is hideous */
+ /* Do NOT make any attempt to use any of the global url
+ * completion variables after this call to browser_window_go.
+ * They will be invalidated by (at least):
+ * + gui_window_set_url
+ * + destruction of (i)frames within the current page
+ * Any attempt to use them will probably result in a crash.
+ */
+
+ browser_window_go(g->bw,
url_complete_matches[
url_complete_matches_selection],
0, true);
- global_history_add_recent(url_complete_matches[
- url_complete_matches_selection]);
ro_gui_url_complete_close(NULL, 0);
/* Adjust just sets the text */
16 years, 1 month
r3534 bursa - /trunk/netsurf/render/layout.c
by netsurf@semichrome.net
Author: bursa
Date: Tue Aug 28 01:53:22 2007
New Revision: 3534
URL: http://source.netsurf-browser.org?rev=3534&view=rev
Log:
Fix disappearing borders for elements with overflow: hidden.
Modified:
trunk/netsurf/render/layout.c
Modified: trunk/netsurf/render/layout.c
URL: http://source.netsurf-browser.org/trunk/netsurf/render/layout.c?rev=3534&...
==============================================================================
--- trunk/netsurf/render/layout.c (original)
+++ trunk/netsurf/render/layout.c Tue Aug 28 01:53:22 2007
@@ -3065,8 +3065,7 @@
layout_calculate_descendant_bboxes(child);
- if (child->style &&
- child->style->overflow != CSS_OVERFLOW_VISIBLE)
+ if (box->style && box->style->overflow == CSS_OVERFLOW_HIDDEN)
continue;
if (child->x + child->descendant_x0 < box->descendant_x0)
16 years, 1 month
r3533 tlsa - /trunk/netsurf/desktop/browser.c
by netsurf@semichrome.net
Author: tlsa
Date: Sun Aug 26 17:58:06 2007
New Revision: 3533
URL: http://source.netsurf-browser.org?rev=3533&view=rev
Log:
Fix for Shift+Adjust clicks on links by Christopher Martin.
Modified:
trunk/netsurf/desktop/browser.c
Modified: trunk/netsurf/desktop/browser.c
URL: http://source.netsurf-browser.org/trunk/netsurf/desktop/browser.c?rev=353...
==============================================================================
--- trunk/netsurf/desktop/browser.c (original)
+++ trunk/netsurf/desktop/browser.c Sun Aug 26 17:58:06 2007
@@ -1519,10 +1519,6 @@
browser_window_go_post(bw, url, 0, 0, false,
c->url, true, true, 0);
- } else if (mouse & (BROWSER_MOUSE_CLICK_1 | BROWSER_MOUSE_CLICK_2)) {
- browser_window_go(browser_window_find_target(bw, target,
- (mouse & BROWSER_MOUSE_CLICK_2)),
- url, c->url, true);
} else if (mouse & BROWSER_MOUSE_CLICK_2 &&
mouse & BROWSER_MOUSE_MOD_1) {
free(browser_window_href_content.url);
@@ -1532,6 +1528,11 @@
else
gui_window_save_as_link(bw->window,
&browser_window_href_content);
+
+ } else if (mouse & (BROWSER_MOUSE_CLICK_1 | BROWSER_MOUSE_CLICK_2)) {
+ browser_window_go(browser_window_find_target(bw, target,
+ (mouse & BROWSER_MOUSE_CLICK_2)),
+ url, c->url, true);
}
} else {
16 years, 1 month
r3532 tlsa - /trunk/netsurf/Docs/BUILDING-GTK
by netsurf@semichrome.net
Author: tlsa
Date: Thu Aug 23 19:15:08 2007
New Revision: 3532
URL: http://source.netsurf-browser.org?rev=3532&view=rev
Log:
Bring nsgtk execution instruction forward to first sentence in paragraph.
Modified:
trunk/netsurf/Docs/BUILDING-GTK
Modified: trunk/netsurf/Docs/BUILDING-GTK
URL: http://source.netsurf-browser.org/trunk/netsurf/Docs/BUILDING-GTK?rev=353...
==============================================================================
--- trunk/netsurf/Docs/BUILDING-GTK (original)
+++ trunk/netsurf/Docs/BUILDING-GTK Thu Aug 23 19:15:08 2007
@@ -1,6 +1,6 @@
To build the GTK version of NetSurf on a UNIX-like platform (although it has
only been tested on Debian, Ubuntu and FreeBSD), simply run "make gtk" once
-you have got the relevent build dependancies installed. Under a Debian-like
+you have got the relevent build dependencies installed. Under a Debian-like
OS, this should suffice:
apt-get install libglade2-dev libcurl3-dev libxml2-dev libmng-dev
@@ -16,12 +16,10 @@
data file, and is trivial to build yourself.
Type "make gtk". Currently, this produces a huge number of warnings, mostly
-due to confused signedness. These havn't been fixed yet but are mostly
+due to confused signedness. These haven't been fixed yet but are mostly
harmless.
-Once you've built NetSurf, you should have an executable called nsgtk. You
-can't run this directly without setting up some environment variables so that
-NetSurf can find its resources (such as the window definitions, text resources,
-etc). A small shell script called "netsurf" is provided to make it easy to run
-NetSurf from the build tree.
-
+Once built, NetSurf can be run by executing the shell script called "netsurf".
+This script sets up some environment variables, which enables the NetSurf
+binary to find its resources, making it easy to run the nsgtk binary from the
+build tree.
16 years, 1 month
r3531 dsilvers - /trunk/netsurf/gtk/gtk_window.c
by netsurf@semichrome.net
Author: dsilvers
Date: Wed Aug 22 20:46:33 2007
New Revision: 3531
URL: http://source.netsurf-browser.org?rev=3531&view=rev
Log:
Reflow the if statements as per nsgtk style
Modified:
trunk/netsurf/gtk/gtk_window.c
Modified: trunk/netsurf/gtk/gtk_window.c
URL: http://source.netsurf-browser.org/trunk/netsurf/gtk/gtk_window.c?rev=3531...
==============================================================================
--- trunk/netsurf/gtk/gtk_window.c (original)
+++ trunk/netsurf/gtk/gtk_window.c Wed Aug 22 20:46:33 2007
@@ -637,10 +637,14 @@
g_object_get(vadj, "page-size", &vpage, "lower", &vlower, "upper", &vupper, NULL);
g_object_get(hadj, "page-size", &hpage, "lower", &hlower, "upper", &hupper, NULL);
- if (x < hlower) x = hlower;
- if (x > (hupper - hpage)) x = hupper - hpage;
- if (y < vlower) y = vlower;
- if (y > (vupper - vpage)) y = vupper - vpage;
+ if (x < hlower)
+ x = hlower;
+ if (x > (hupper - hpage))
+ x = hupper - hpage;
+ if (y < vlower)
+ y = vlower;
+ if (y > (vupper - vpage))
+ y = vupper - vpage;
gtk_adjustment_set_value(vadj, y);
gtk_adjustment_set_value(hadj, x);
16 years, 1 month
r3530 dsilvers - /trunk/netsurf/gtk/gtk_window.c
by netsurf@semichrome.net
Author: dsilvers
Date: Wed Aug 22 20:43:50 2007
New Revision: 3530
URL: http://source.netsurf-browser.org?rev=3530&view=rev
Log:
Ensure that when directly setting scroll extents, we clamp them to the GtkAdjustment range properly
Modified:
trunk/netsurf/gtk/gtk_window.c
Modified: trunk/netsurf/gtk/gtk_window.c
URL: http://source.netsurf-browser.org/trunk/netsurf/gtk/gtk_window.c?rev=3530...
==============================================================================
--- trunk/netsurf/gtk/gtk_window.c (original)
+++ trunk/netsurf/gtk/gtk_window.c Wed Aug 22 20:43:50 2007
@@ -629,12 +629,21 @@
{
GtkAdjustment *vadj = gtk_viewport_get_vadjustment(g->viewport);
GtkAdjustment *hadj = gtk_viewport_get_hadjustment(g->viewport);
-
+ gdouble vlower, vpage, vupper, hlower, hpage, hupper, x = (double)sx, y = (double)sy;
+
assert(vadj);
assert(hadj);
-
- gtk_adjustment_set_value(vadj, (double)sy);
- gtk_adjustment_set_value(hadj, (double)sx);
+
+ g_object_get(vadj, "page-size", &vpage, "lower", &vlower, "upper", &vupper, NULL);
+ g_object_get(hadj, "page-size", &hpage, "lower", &hlower, "upper", &hupper, NULL);
+
+ if (x < hlower) x = hlower;
+ if (x > (hupper - hpage)) x = hupper - hpage;
+ if (y < vlower) y = vlower;
+ if (y > (vupper - vpage)) y = vupper - vpage;
+
+ gtk_adjustment_set_value(vadj, y);
+ gtk_adjustment_set_value(hadj, x);
}
16 years, 1 month
r3529 bursa - in /trunk/netsurf: debug/netsurfd.c render/box.c render/box.h render/box_construct.c render/layout.c riscos/gui.c riscos/gui.h riscos/window.c
by netsurf@semichrome.net
Author: bursa
Date: Mon Aug 20 03:39:49 2007
New Revision: 3529
URL: http://source.netsurf-browser.org?rev=3529&view=rev
Log:
Make F9 dump box tree to an editor for easier debugging.
Modified:
trunk/netsurf/debug/netsurfd.c
trunk/netsurf/render/box.c
trunk/netsurf/render/box.h
trunk/netsurf/render/box_construct.c
trunk/netsurf/render/layout.c
trunk/netsurf/riscos/gui.c
trunk/netsurf/riscos/gui.h
trunk/netsurf/riscos/window.c
Modified: trunk/netsurf/debug/netsurfd.c
URL: http://source.netsurf-browser.org/trunk/netsurf/debug/netsurfd.c?rev=3529...
==============================================================================
--- trunk/netsurf/debug/netsurfd.c (original)
+++ trunk/netsurf/debug/netsurfd.c Mon Aug 20 03:39:49 2007
@@ -97,8 +97,10 @@
fetchcache_go(c, 0, callback, 0, 0, 1000, 1000,
0, 0, true, 0);
done = c->status == CONTENT_STATUS_DONE;
- while (!done)
+ while (!done) {
fetch_poll();
+ sleep(1);
+ }
puts("=== SUCCESS, dumping cache");
} else {
destroyed = 1;
@@ -110,7 +112,7 @@
/* content_reformat(c, 1, 1000); */
/* save_complete(c, "save_complete");*/
if (c->type == CONTENT_HTML)
- box_dump(c->data.html.layout, 0);
+ box_dump(stderr, c->data.html.layout, 0);
else if (c->type == CONTENT_CSS)
css_dump_stylesheet(c->data.css.css);
else if (c->type == CONTENT_GIF)
Modified: trunk/netsurf/render/box.c
URL: http://source.netsurf-browser.org/trunk/netsurf/render/box.c?rev=3529&r1=...
==============================================================================
--- trunk/netsurf/render/box.c (original)
+++ trunk/netsurf/render/box.c Mon Aug 20 03:39:49 2007
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 James Bursa <bursa(a)users.sourceforge.net>
+ * Copyright 2005-2007 James Bursa <bursa(a)users.sourceforge.net>
* Copyright 2003 Phil Mellor <monkeyson(a)users.sourceforge.net>
* Copyright 2005 John M Bell <jmb202(a)ecs.soton.ac.uk>
*
@@ -24,6 +24,7 @@
#include <assert.h>
#include <stdbool.h>
+#include <stdio.h>
#include <string.h>
#include "content/content.h"
#include "css/css.h"
@@ -498,110 +499,110 @@
/**
- * Print a box tree to stderr.
- */
-
-void box_dump(struct box *box, unsigned int depth)
+ * Print a box tree to a file.
+ */
+
+void box_dump(FILE *stream, struct box *box, unsigned int depth)
{
unsigned int i;
struct box *c, *prev;
for (i = 0; i != depth; i++)
- fprintf(stderr, " ");
-
- fprintf(stderr, "%p ", box);
- fprintf(stderr, "x%i y%i w%i h%i ", box->x, box->y,
+ fprintf(stream, " ");
+
+ fprintf(stream, "%p ", box);
+ fprintf(stream, "x%i y%i w%i h%i ", box->x, box->y,
box->width, box->height);
if (box->max_width != UNKNOWN_MAX_WIDTH)
- fprintf(stderr, "min%i max%i ", box->min_width, box->max_width);
- fprintf(stderr, "(%i %i %i %i) ",
+ fprintf(stream, "min%i max%i ", box->min_width, box->max_width);
+ fprintf(stream, "(%i %i %i %i) ",
box->descendant_x0, box->descendant_y0,
box->descendant_x1, box->descendant_y1);
switch (box->type) {
- case BOX_BLOCK: fprintf(stderr, "BLOCK "); break;
- case BOX_INLINE_CONTAINER: fprintf(stderr, "INLINE_CONTAINER "); break;
- case BOX_INLINE: fprintf(stderr, "INLINE "); break;
- case BOX_INLINE_END: fprintf(stderr, "INLINE_END "); break;
- case BOX_INLINE_BLOCK: fprintf(stderr, "INLINE_BLOCK "); break;
- case BOX_TABLE: fprintf(stderr, "TABLE [columns %i] ",
+ case BOX_BLOCK: fprintf(stream, "BLOCK "); break;
+ case BOX_INLINE_CONTAINER: fprintf(stream, "INLINE_CONTAINER "); break;
+ case BOX_INLINE: fprintf(stream, "INLINE "); break;
+ case BOX_INLINE_END: fprintf(stream, "INLINE_END "); break;
+ case BOX_INLINE_BLOCK: fprintf(stream, "INLINE_BLOCK "); break;
+ case BOX_TABLE: fprintf(stream, "TABLE [columns %i] ",
box->columns); break;
- case BOX_TABLE_ROW: fprintf(stderr, "TABLE_ROW "); break;
- case BOX_TABLE_CELL: fprintf(stderr, "TABLE_CELL [columns %i, "
+ case BOX_TABLE_ROW: fprintf(stream, "TABLE_ROW "); break;
+ case BOX_TABLE_CELL: fprintf(stream, "TABLE_CELL [columns %i, "
"start %i, rows %i] ", box->columns,
box->start_column, box->rows); break;
- case BOX_TABLE_ROW_GROUP: fprintf(stderr, "TABLE_ROW_GROUP "); break;
- case BOX_FLOAT_LEFT: fprintf(stderr, "FLOAT_LEFT "); break;
- case BOX_FLOAT_RIGHT: fprintf(stderr, "FLOAT_RIGHT "); break;
- case BOX_BR: fprintf(stderr, "BR "); break;
- case BOX_TEXT: fprintf(stderr, "TEXT "); break;
- default: fprintf(stderr, "Unknown box type ");
+ case BOX_TABLE_ROW_GROUP: fprintf(stream, "TABLE_ROW_GROUP "); break;
+ case BOX_FLOAT_LEFT: fprintf(stream, "FLOAT_LEFT "); break;
+ case BOX_FLOAT_RIGHT: fprintf(stream, "FLOAT_RIGHT "); break;
+ case BOX_BR: fprintf(stream, "BR "); break;
+ case BOX_TEXT: fprintf(stream, "TEXT "); break;
+ default: fprintf(stream, "Unknown box type ");
}
if (box->text)
- fprintf(stderr, "%li '%.*s' ", (unsigned long) box->byte_offset,
+ fprintf(stream, "%li '%.*s' ", (unsigned long) box->byte_offset,
(int) box->length, box->text);
if (box->space)
- fprintf(stderr, "space ");
+ fprintf(stream, "space ");
if (box->object)
- fprintf(stderr, "(object '%s') ", box->object->url);
+ fprintf(stream, "(object '%s') ", box->object->url);
if (box->style)
css_dump_style(box->style);
if (box->href)
- fprintf(stderr, " -> '%s'", box->href);
+ fprintf(stream, " -> '%s'", box->href);
if (box->target)
- fprintf(stderr, " |%s|", box->target);
+ fprintf(stream, " |%s|", box->target);
if (box->title)
- fprintf(stderr, " [%s]", box->title);
+ fprintf(stream, " [%s]", box->title);
if (box->id)
- fprintf(stderr, " <%s>", box->id);
+ fprintf(stream, " <%s>", box->id);
if (box->type == BOX_INLINE || box->type == BOX_INLINE_END)
- fprintf(stderr, " inline_end %p", box->inline_end);
+ fprintf(stream, " inline_end %p", box->inline_end);
if (box->float_children)
- fprintf(stderr, " float_children %p", box->float_children);
+ fprintf(stream, " float_children %p", box->float_children);
if (box->next_float)
- fprintf(stderr, " next_float %p", box->next_float);
+ fprintf(stream, " next_float %p", box->next_float);
if (box->col) {
- fprintf(stderr, " (columns");
+ fprintf(stream, " (columns");
for (i = 0; i != box->columns; i++)
- fprintf(stderr, " (%s %i %i %i)",
+ fprintf(stream, " (%s %i %i %i)",
((const char *[]) {"UNKNOWN", "FIXED",
"AUTO", "PERCENT", "RELATIVE"})
[box->col[i].type],
box->col[i].width,
box->col[i].min, box->col[i].max);
- fprintf(stderr, ")");
- }
- fprintf(stderr, "\n");
+ fprintf(stream, ")");
+ }
+ fprintf(stream, "\n");
if (box->list_marker) {
for (i = 0; i != depth; i++)
- fprintf(stderr, " ");
- fprintf(stderr, "list_marker:\n");
- box_dump(box->list_marker, depth + 1);
+ fprintf(stream, " ");
+ fprintf(stream, "list_marker:\n");
+ box_dump(stream, box->list_marker, depth + 1);
}
for (c = box->children; c && c->next; c = c->next)
;
if (box->last != c)
- fprintf(stderr, "warning: box->last %p (should be %p) "
+ fprintf(stream, "warning: box->last %p (should be %p) "
"(box %p)\n", box->last, c, box);
for (prev = 0, c = box->children; c; prev = c, c = c->next) {
if (c->parent != box)
- fprintf(stderr, "warning: box->parent %p (should be "
+ fprintf(stream, "warning: box->parent %p (should be "
"%p) (box on next line)\n",
c->parent, box);
if (c->prev != prev)
- fprintf(stderr, "warning: box->prev %p (should be "
+ fprintf(stream, "warning: box->prev %p (should be "
"%p) (box on next line)\n",
c->prev, prev);
- box_dump(c, depth + 1);
+ box_dump(stream, c, depth + 1);
}
if (box->fallback) {
for (i = 0; i != depth; i++)
- fprintf(stderr, " ");
- fprintf(stderr, "fallback:\n");
+ fprintf(stream, " ");
+ fprintf(stream, "fallback:\n");
for (c = box->fallback; c; c = c->next)
- box_dump(c, depth + 1);
- }
-}
+ box_dump(stream, c, depth + 1);
+ }
+}
Modified: trunk/netsurf/render/box.h
URL: http://source.netsurf-browser.org/trunk/netsurf/render/box.h?rev=3529&r1=...
==============================================================================
--- trunk/netsurf/render/box.h (original)
+++ trunk/netsurf/render/box.h Mon Aug 20 03:39:49 2007
@@ -88,6 +88,7 @@
#include <limits.h>
#include <stdbool.h>
+#include <stdio.h>
#include <libxml/HTMLparser.h>
@@ -288,7 +289,7 @@
struct box *box_object_at_point(struct content *c, int x, int y);
struct box *box_find_by_id(struct box *box, const char *id);
bool box_visible(struct box *box);
-void box_dump(struct box *box, unsigned int depth);
+void box_dump(FILE *stream, struct box *box, unsigned int depth);
bool box_extract_link(const char *rel, const char *base, char **result);
bool box_vscrollbar_present(const struct box *box);
Modified: trunk/netsurf/render/box_construct.c
URL: http://source.netsurf-browser.org/trunk/netsurf/render/box_construct.c?re...
==============================================================================
--- trunk/netsurf/render/box_construct.c (original)
+++ trunk/netsurf/render/box_construct.c Mon Aug 20 03:39:49 2007
@@ -628,7 +628,7 @@
while (parent->parent &&
parent->parent->parent)
parent = parent->parent;
- box_dump(parent, 0);
+ box_dump(stderr, parent, 0);
}
assert((*inline_container)->last != 0);
(*inline_container)->last->space = 1;
Modified: trunk/netsurf/render/layout.c
URL: http://source.netsurf-browser.org/trunk/netsurf/render/layout.c?rev=3529&...
==============================================================================
--- trunk/netsurf/render/layout.c (original)
+++ trunk/netsurf/render/layout.c Mon Aug 20 03:39:49 2007
@@ -477,7 +477,7 @@
}
if (max < min) {
- box_dump(block, 0);
+ box_dump(stderr, block, 0);
assert(0);
}
@@ -1338,7 +1338,7 @@
}
if (cont->float_children == b) {
LOG(("float %p already placed", b));
- box_dump(cont, 0);
+ box_dump(stderr, cont, 0);
assert(0);
}
b->next_float = cont->float_children;
@@ -2349,7 +2349,7 @@
for (i = 0; i != table->columns; i++) {
if (col[i].max < col[i].min) {
- box_dump(table, 0);
+ box_dump(stderr, table, 0);
assert(0);
}
table_min += col[i].min;
Modified: trunk/netsurf/riscos/gui.c
URL: http://source.netsurf-browser.org/trunk/netsurf/riscos/gui.c?rev=3529&r1=...
==============================================================================
--- trunk/netsurf/riscos/gui.c (original)
+++ trunk/netsurf/riscos/gui.c Mon Aug 20 03:39:49 2007
@@ -847,7 +847,7 @@
for (c = content_list; c; c = c->next)
if (c->type == CONTENT_HTML && c->data.html.layout) {
LOG(("Dumping: '%s'", c->url));
- box_dump(c->data.html.layout, 0);
+ box_dump(stderr, c->data.html.layout, 0);
}
options_dump();
/*rufl_dump_state();*/
@@ -2107,6 +2107,7 @@
page, option_language)) >= 0 && length < (int)sizeof(url))
browser_window_create(url, NULL, 0, true);
}
+
/**
* Send the source of a content to a text editor.
@@ -2187,7 +2188,8 @@
}
-void ro_gui_view_source_bounce(wimp_message *message) {
+void ro_gui_view_source_bounce(wimp_message *message)
+{
char *filename;
os_error *error;
char command[256];
@@ -2196,6 +2198,47 @@
filename = ((wimp_full_message_data_xfer *)message)->file_name;
sprintf(command, "@RunType_FFF %s", filename);
error = xwimp_start_task(command, 0);
+ if (error) {
+ LOG(("xwimp_start_task failed: 0x%x: %s",
+ error->errnum, error->errmess));
+ warn_user("WimpError", error->errmess);
+ }
+}
+
+
+/**
+ * Send the debug dump of a content to a text editor.
+ */
+
+void ro_gui_dump_content(struct content *content)
+{
+ os_error *error;
+
+ /* open file for dump */
+ FILE *stream = fopen("<Wimp$ScrapDir>.WWW.NetSurf.dump", "w");
+ if (!stream) {
+ LOG(("fopen: errno %i", errno));
+ warn_user("SaveError", strerror(errno));
+ return;
+ }
+
+ /* output debug information to file */
+ switch (content->type) {
+ case CONTENT_HTML:
+ box_dump(stream, content->data.html.layout, 0);
+ break;
+ case CONTENT_CSS:
+ css_dump_stylesheet(content->data.css.css);
+ break;
+ default:
+ break;
+ }
+
+ fclose(stream);
+
+ /* launch file in editor */
+ error = xwimp_start_task("Filer_Run <Wimp$ScrapDir>.WWW.NetSurf.dump",
+ 0);
if (error) {
LOG(("xwimp_start_task failed: 0x%x: %s",
error->errnum, error->errmess));
Modified: trunk/netsurf/riscos/gui.h
URL: http://source.netsurf-browser.org/trunk/netsurf/riscos/gui.h?rev=3529&r1=...
==============================================================================
--- trunk/netsurf/riscos/gui.h (original)
+++ trunk/netsurf/riscos/gui.h Mon Aug 20 03:39:49 2007
@@ -122,6 +122,7 @@
void ro_gui_open_help_page(const char *page);
void ro_gui_screen_size(int *width, int *height);
void ro_gui_view_source(struct content *content);
+void ro_gui_dump_content(struct content *content);
void ro_gui_drag_box_start(wimp_pointer *pointer);
bool ro_gui_prequit(void);
const char *ro_gui_default_language(void);
Modified: trunk/netsurf/riscos/window.c
URL: http://source.netsurf-browser.org/trunk/netsurf/riscos/window.c?rev=3529&...
==============================================================================
--- trunk/netsurf/riscos/window.c (original)
+++ trunk/netsurf/riscos/window.c Mon Aug 20 03:39:49 2007
@@ -2439,16 +2439,7 @@
case IS_WIMP_KEY + wimp_KEY_F9:
/* Dump content for debugging. */
- switch (content->type) {
- case CONTENT_HTML:
- box_dump(content->data.html.layout, 0);
- break;
- case CONTENT_CSS:
- css_dump_stylesheet(content->data.css.css);
- break;
- default:
- break;
- }
+ ro_gui_dump_content(content);
return true;
case IS_WIMP_KEY + wimp_KEY_CONTROL + wimp_KEY_F9:
16 years, 1 month
r3528 dsilvers - in /trunk/netsurf: css/css.c css/css.h render/layout.c
by netsurf@semichrome.net
Author: dsilvers
Date: Sun Aug 19 11:08:49 2007
New Revision: 3528
URL: http://source.netsurf-browser.org?rev=3528&view=rev
Log:
Provide the facility to set the DPI of the display by removing the assumptions of 90.0 dpi from the CSS and layout engines.
Modified:
trunk/netsurf/css/css.c
trunk/netsurf/css/css.h
trunk/netsurf/render/layout.c
Modified: trunk/netsurf/css/css.c
URL: http://source.netsurf-browser.org/trunk/netsurf/css/css.c?rev=3528&r1=352...
==============================================================================
--- trunk/netsurf/css/css.c (original)
+++ trunk/netsurf/css/css.c Sun Aug 19 11:08:49 2007
@@ -388,6 +388,16 @@
{ CSS_Z_INDEX_AUTO, 0 }
};
+/** Dots per inch for the display device.
+ *
+ * This is the number of pixels per inch of the display device.
+ * This variable should be treated as constant during the runtime of
+ * the program unless the core can be persuaded to re-layout fully
+ * on change.
+ *
+ * We default to 90.0 because RISC OS defaults to 90.0 dpi.
+ */
+float css_screen_dpi = 90.0;
/**
* Convert a CONTENT_CSS for use.
@@ -3012,8 +3022,6 @@
/**
* Convert a struct css_length to pixels.
- *
- * Note: This assumes 90dpi (if converting from points)
*/
float css_len2px(const struct css_length *length,
@@ -3024,10 +3032,10 @@
case CSS_UNIT_EM: return length->value * css_len2px(&style->font_size.value.length, 0);
case CSS_UNIT_EX: return length->value * css_len2px(&style->font_size.value.length, 0) * 0.6;
case CSS_UNIT_PX: return length->value;
- /* RISC OS assumes 90dpi */
- case CSS_UNIT_IN: return length->value * 90.0;
- case CSS_UNIT_CM: return length->value * 35.43307087;
- case CSS_UNIT_MM: return length->value * 3.543307087;
+ /* We assume the screen and any other output has the same dpi */
+ case CSS_UNIT_IN: return length->value * css_screen_dpi;
+ case CSS_UNIT_CM: return length->value * css_screen_dpi / 2.54;
+ case CSS_UNIT_MM: return length->value * css_screen_dpi / 25.4;
/* 1pt = 1in/72 */
case CSS_UNIT_PT: return length->value * 1.25;
/* 1pc = 1pt * 12 */
@@ -3039,8 +3047,6 @@
/**
* Convert a struct css_length to points.
- *
- * Note: This assumes 90dpi (if converting a pixel size)
*/
float css_len2pt(const struct css_length *length,
@@ -3050,8 +3056,8 @@
switch (length->unit) {
case CSS_UNIT_EM: return length->value * css_len2pt(&style->font_size.value.length, 0);
case CSS_UNIT_EX: return length->value * css_len2pt(&style->font_size.value.length, 0) * 0.6;
- /* RISC OS assumes 90dpi */
- case CSS_UNIT_PX: return length->value / 1.25;
+ /* We assume the screen and any other output has the same dpi */
+ case CSS_UNIT_PX: return length->value * css_screen_dpi / 72;
/* 1pt = 1in/72 */
case CSS_UNIT_IN: return length->value * 72;
case CSS_UNIT_CM: return length->value * 28.452756;
Modified: trunk/netsurf/css/css.h
URL: http://source.netsurf-browser.org/trunk/netsurf/css/css.h?rev=3528&r1=352...
==============================================================================
--- trunk/netsurf/css/css.h (original)
+++ trunk/netsurf/css/css.h Sun Aug 19 11:08:49 2007
@@ -502,6 +502,7 @@
extern const struct css_style css_base_style;
extern const struct css_style css_empty_style;
extern const struct css_style css_blank_style;
+extern float css_screen_dpi;
#ifdef CSS_INTERNALS
Modified: trunk/netsurf/render/layout.c
URL: http://source.netsurf-browser.org/trunk/netsurf/render/layout.c?rev=3528&...
==============================================================================
--- trunk/netsurf/render/layout.c (original)
+++ trunk/netsurf/render/layout.c Sun Aug 19 11:08:49 2007
@@ -967,8 +967,8 @@
/* take account of minimum font size option */
if ((font_len = css_len2px(&style->font_size.value.length, 0)) <
- option_font_min_size * 9.0 / 72.0)
- font_len = option_font_min_size * 9.0 / 72.0;
+ option_font_min_size * css_screen_dpi / 720.0)
+ font_len = option_font_min_size * css_screen_dpi / 720.0;
switch (style->line_height.size) {
case CSS_LINE_HEIGHT_LENGTH:
16 years, 1 month
r3527 tlsa - in /trunk/netsurfweb: index.de index.en index.fr index.nl
by netsurf@semichrome.net
Author: tlsa
Date: Fri Aug 17 17:28:33 2007
New Revision: 3527
URL: http://source.netsurf-browser.org?rev=3527&view=rev
Log:
Change version number in links section.
Modified:
trunk/netsurfweb/index.de
trunk/netsurfweb/index.en
trunk/netsurfweb/index.fr
trunk/netsurfweb/index.nl
Modified: trunk/netsurfweb/index.de
URL: http://source.netsurf-browser.org/trunk/netsurfweb/index.de?rev=3527&r1=3...
==============================================================================
--- trunk/netsurfweb/index.de (original)
+++ trunk/netsurfweb/index.de Fri Aug 17 17:28:33 2007
@@ -50,7 +50,7 @@
<dl>
<dt><a href="download/">Download</a></dt>
-<dd>NetSurf 1.0 herunterladen</dd>
+<dd>NetSurf 1.1 herunterladen</dd>
<dt><a href="docs">Dokumentation</a></dt>
<dd>Allgemeine Informationen und Handbuch</dd>
Modified: trunk/netsurfweb/index.en
URL: http://source.netsurf-browser.org/trunk/netsurfweb/index.en?rev=3527&r1=3...
==============================================================================
--- trunk/netsurfweb/index.en (original)
+++ trunk/netsurfweb/index.en Fri Aug 17 17:28:33 2007
@@ -111,7 +111,7 @@
<dl>
<dt><a href="download/">Download</a></dt>
-<dd>Get NetSurf 1.0</dd>
+<dd>Get NetSurf 1.1</dd>
<dt><a href="docs">Documentation</a></dt>
<dd>User Guide and information</dd>
Modified: trunk/netsurfweb/index.fr
URL: http://source.netsurf-browser.org/trunk/netsurfweb/index.fr?rev=3527&r1=3...
==============================================================================
--- trunk/netsurfweb/index.fr (original)
+++ trunk/netsurfweb/index.fr Fri Aug 17 17:28:33 2007
@@ -34,7 +34,7 @@
<dl>
<dt><a href="download/">Download</a></dt>
-<dd>Get NetSurf 1.0</dd>
+<dd>Get NetSurf 1.1</dd>
<dt><a href="docs">Documentation</a></dt>
<dd>Manuel utilisateur et information</dd>
Modified: trunk/netsurfweb/index.nl
URL: http://source.netsurf-browser.org/trunk/netsurfweb/index.nl?rev=3527&r1=3...
==============================================================================
--- trunk/netsurfweb/index.nl (original)
+++ trunk/netsurfweb/index.nl Fri Aug 17 17:28:33 2007
@@ -50,7 +50,7 @@
<dl>
<dt><a href="download/">Download</a></dt>
-<dd>Get NetSurf 1.0</dd>
+<dd>Get NetSurf 1.1</dd>
<dt><a href="docs">Documentatie</a></dt>
<dd>Gebruikershandleiding en informatie</dd>
16 years, 1 month
r3526 jshaw - /trunk/dom/docs/TestSuite
by netsurf@semichrome.net
Author: jshaw
Date: Thu Aug 16 23:15:29 2007
New Revision: 3526
URL: http://source.netsurf-browser.org?rev=3526&view=rev
Log:
Notes on W3C test suite elements
Added:
trunk/dom/docs/TestSuite
Added: trunk/dom/docs/TestSuite
URL: http://source.netsurf-browser.org/trunk/dom/docs/TestSuite?rev=3526&view=...
==============================================================================
--- trunk/dom/docs/TestSuite (added)
+++ trunk/dom/docs/TestSuite Thu Aug 16 23:15:29 2007
@@ -1,0 +1,179 @@
+Assertions
+-------------------------------------------------------------------------------
+fail
+assertTrue
+assertFalse
+assertNull
+assertNotNull
+assertEquals
+assertNotEquals
+
+assertSame
+ Tests two objects for identity.
+ If not identical, test if either are null, or either are not Nodes. If so, delegate to assertEquals()
+
+assertInstanceOf
+ Used in [hc_]namednodemapreturnattrnode.xml
+ Can use Node.getNodeType() to get runtime type
+
+assertSize
+assertEventCount
+assertURIEquals
+assertImplementationException
+
+assertDOMException
+
+
+Conditions
+-------------------------------------------------------------------------------
+same
+ (not used)
+
+equals
+notEquals
+less
+lessOrEquals
+greater
+greaterOrEquals
+isNull
+notNull
+and
+or
+xor
+not
+
+instanceOf
+ (not used)
+
+isTrue
+isFalse
+hasSize
+contentType
+contains
+hasFeature
+implementationAttribute
+
+
+Statements
+-------------------------------------------------------------------------------
+var
+ Can contain nested <member> elements when the var has type Collection
+
+assign
+ <assign var="..." value="..."/>
+
+increment
+decrement
+ <increment var="..." value="..."/>
+
+append
+ <append collection="..." item="..."/>
+ Append an object to the end of a Collection.
+ In Java, this is implemented with an ArrayList.
+
+plus
+subtract
+mult
+divide
+load
+implementation
+hasFeature
+
+implementationAttribute
+ Set DocumentBuilder attributes (such as validating)
+
+if
+while
+
+try
+ <try>
+ ...
+ <catch>
+ <DOMException code="..."/>
+ </catch>
+ </try>
+
+for-each
+ <for-each collection="..." member="...">
+
+comment
+ Only used in DOM Level 3 XPath.
+
+return
+ Only used in DOM Level 2/3. Returns immediately from method call with optional @value
+
+userObj
+
+atEvents
+capturedEvents
+bubbledEvents
+allEvents
+ DOM Level 2 Evemts only
+
+createXPathEvaluator
+ DOM Level 3 XPath only
+
+getResourceURI
+ DOM Level 3 LS only
+
+substring
+ <substringData var="..." obj="..." offset="..." count="..."/>
+ Calls @obj.substringData() where obj is an instance of CharacterData
+
+createTempURI
+ DOMImplementationRegistry.newInstance
+
+allErrors
+ Only used in DOM Level 3
+ Calls org.w3c.domts.DOMErrorMonitor.getAllErrors(), which is an instance of DOMErrorHandler
+
+assertLowerSeverity
+allNotifications
+operation
+key
+dst
+
+Datatypes
+-------------------------------------------------------------------------------
+int
+short
+double
+boolean
+ Primitives
+
+DOMString
+
+List
+ In Java, an ArrayList instance typed as a List
+
+Collection
+ In Java, an ArrayList instance typed as a Collection
+
+EventMonitor
+ DOM Level 2 Events only
+
+DOMErrorMonitor
+ DOM Level 3 only
+
+UserDataMonitor
+UserDataNotification
+ DOM Level 3 Core only
+
+Attr
+CDATASection
+CharacterData
+Comment
+Document
+DocumentFragment
+DocumentType
+DOMImplementation
+Element
+Entity
+EntityReference
+NamedNodeMap
+Node
+NodeList
+Notation
+ProcessingInstruction
+Text
+ DOM types
16 years, 1 month