r4236 mikeL - in /branches/mikeL/netsurf: desktop/options.c gtk/dialogs/gtk_options.c
by netsurf@semichrome.net
Author: mikeL
Date: Sat May 31 17:25:32 2008
New Revision: 4236
URL: http://source.netsurf-browser.org?rev=4236&view=rev
Log:
Fixed proxy options for both riscos and gtk versions thanks to a tip from Leon Stringer
Modified:
branches/mikeL/netsurf/desktop/options.c
branches/mikeL/netsurf/gtk/dialogs/gtk_options.c
Modified: branches/mikeL/netsurf/desktop/options.c
URL: http://source.netsurf-browser.org/branches/mikeL/netsurf/desktop/options....
==============================================================================
--- branches/mikeL/netsurf/desktop/options.c (original)
+++ branches/mikeL/netsurf/desktop/options.c Sat May 31 17:25:32 2008
@@ -166,7 +166,7 @@
{ "http_proxy", OPTION_BOOL, &option_http_proxy },
{ "http_proxy_host", OPTION_STRING, &option_http_proxy_host },
{ "http_proxy_port", OPTION_INTEGER, &option_http_proxy_port },
- { "http_proxy_auth", OPTION_BOOL, &option_http_proxy_auth },
+ { "http_proxy_auth", OPTION_INTEGER, &option_http_proxy_auth },
{ "http_proxy_auth_user", OPTION_STRING, &option_http_proxy_auth_user },
{ "http_proxy_auth_pass", OPTION_STRING, &option_http_proxy_auth_pass },
{ "font_size", OPTION_INTEGER, &option_font_size },
Modified: branches/mikeL/netsurf/gtk/dialogs/gtk_options.c
URL: http://source.netsurf-browser.org/branches/mikeL/netsurf/gtk/dialogs/gtk_...
==============================================================================
--- branches/mikeL/netsurf/gtk/dialogs/gtk_options.c (original)
+++ branches/mikeL/netsurf/gtk/dialogs/gtk_options.c Sat May 31 17:25:32 2008
@@ -180,21 +180,11 @@
SET_CHECK(checkHideAdverts, option_block_ads);
SET_CHECK(checkDisplayRecentURLs, option_url_suggestion);
SET_CHECK(checkSendReferer, option_send_referer);
-
- switch (option_http_proxy_auth) {
- case OPTION_HTTP_PROXY_AUTH_NONE:
- proxytype = 1;
- break;
- case OPTION_HTTP_PROXY_AUTH_BASIC:
- proxytype = 2;
- break;
- case OPTION_HTTP_PROXY_AUTH_NTLM:
- proxytype = 3;
- break;
- }
-
+
if (option_http_proxy == false)
proxytype = 0;
+ else
+ proxytype = option_http_proxy_auth + 1;
SET_COMBO(comboProxyType, proxytype);
SET_ENTRY(entryProxyHost,
@@ -312,10 +302,6 @@
option_http_proxy = true;
option_http_proxy_auth = OPTION_HTTP_PROXY_AUTH_NTLM;
break;
- default:
- option_http_proxy = false;
- option_http_proxy_auth = OPTION_HTTP_PROXY_AUTH_NONE;
- break;
}
gboolean sensitive = (!proxy_type == 0);
gtk_widget_set_sensitive (entryProxyHost, sensitive);
15 years, 3 months
r4235 adamblokus - in /branches/adamblokus/netsurf: ./ desktop/ gtk/ image/ pdf/ riscos/ testres/
by netsurf@semichrome.net
Author: adamblokus
Date: Sat May 31 15:54:56 2008
New Revision: 4235
URL: http://source.netsurf-browser.org?rev=4235&view=rev
Log:
Plotting changed as jmb suggested (is the least invasive one from the possible)
Added dummy bitmap plotting - way of plotting an image is determined by its type.
Added:
branches/adamblokus/netsurf/testres/
branches/adamblokus/netsurf/testres/jpeg.jpeg (with props)
branches/adamblokus/netsurf/testres/png.png (with props)
Modified:
branches/adamblokus/netsurf/Makefile
branches/adamblokus/netsurf/desktop/history_core.c
branches/adamblokus/netsurf/desktop/knockout.c
branches/adamblokus/netsurf/desktop/plotters.h
branches/adamblokus/netsurf/gtk/gtk_plotters.c
branches/adamblokus/netsurf/gtk/gtk_plotters.h
branches/adamblokus/netsurf/image/bmp.c
branches/adamblokus/netsurf/image/gif.c
branches/adamblokus/netsurf/image/ico.c
branches/adamblokus/netsurf/image/jpeg.c
branches/adamblokus/netsurf/image/mng.c
branches/adamblokus/netsurf/image/nssprite.c
branches/adamblokus/netsurf/image/rsvg.c
branches/adamblokus/netsurf/pdf/pdf_plotters.c
branches/adamblokus/netsurf/pdf/pdf_plotters.h
branches/adamblokus/netsurf/riscos/plotters.c
branches/adamblokus/netsurf/riscos/save_draw.c
Modified: branches/adamblokus/netsurf/Makefile
URL: http://source.netsurf-browser.org/branches/adamblokus/netsurf/Makefile?re...
==============================================================================
--- branches/adamblokus/netsurf/Makefile (original)
+++ branches/adamblokus/netsurf/Makefile Sat May 31 15:54:56 2008
@@ -131,8 +131,9 @@
#GTKLDFLAGS := $(shell $(PKG_CONFIG) --cflags --libs libglade-2.0 gtk+-2.0 gthread-2.0 gmodule-2.0 librosprite)
GTKLDFLAGS := $(shell $(PKG_CONFIG) --cflags --libs libglade-2.0 gtk+-2.0 gthread-2.0 gmodule-2.0 librsvg-2.0 librosprite)
+#CFLAGS += $(GTKCFLAGS) -g
+#LDFLAGS += $(GTKLDFLAGS) $(shell $(PKG_CONFIG) --libs lcms) -lhpdf -lsvgtiny
CFLAGS += $(GTKCFLAGS)
-#LDFLAGS += $(GTKLDFLAGS) $(shell $(PKG_CONFIG) --libs lcms) -lhpdf -lsvgtiny
LDFLAGS += $(GTKLDFLAGS) $(shell $(PKG_CONFIG) --libs lcms) -lhpdf
ifeq ($(HOST),Windows_NT)
Modified: branches/adamblokus/netsurf/desktop/history_core.c
URL: http://source.netsurf-browser.org/branches/adamblokus/netsurf/desktop/his...
==============================================================================
--- branches/adamblokus/netsurf/desktop/history_core.c (original)
+++ branches/adamblokus/netsurf/desktop/history_core.c Sat May 31 15:54:56 2008
@@ -597,7 +597,7 @@
int tailsize = 5;
if (!plot.bitmap(entry->x, entry->y, WIDTH, HEIGHT,
- entry->bitmap, 0xffffff))
+ entry->bitmap, 0xffffff,NULL))
return false;
if (!plot.rectangle(entry->x - 1, entry->y - 1, WIDTH + 1, HEIGHT + 1,
entry == history->current ? 2 : 1, c, false, false))
Modified: branches/adamblokus/netsurf/desktop/knockout.c
URL: http://source.netsurf-browser.org/branches/adamblokus/netsurf/desktop/kno...
==============================================================================
--- branches/adamblokus/netsurf/desktop/knockout.c (original)
+++ branches/adamblokus/netsurf/desktop/knockout.c Sat May 31 15:54:56 2008
@@ -61,10 +61,10 @@
static bool knockout_plot_arc(int x, int y, int radius, int angle1, int angle2,
colour c);
static bool knockout_plot_bitmap(int x, int y, int width, int height,
- struct bitmap *bitmap, colour bg);
+ struct bitmap *bitmap, colour bg, struct content *content);
static bool knockout_plot_bitmap_tile(int x, int y, int width, int height,
struct bitmap *bitmap, colour bg,
- bool repeat_x, bool repeat_y);
+ bool repeat_x, bool repeat_y, struct content *content);
static bool knockout_plot_group_start(const char *name);
static bool knockout_plot_group_end(void);
@@ -194,6 +194,7 @@
int height;
struct bitmap *bitmap;
colour bg;
+ struct content *content;
} bitmap;
struct {
int x;
@@ -204,6 +205,7 @@
colour bg;
bool repeat_x;
bool repeat_y;
+ struct content *content;
} bitmap_tile;
struct {
const char *name;
@@ -379,7 +381,8 @@
knockout_entries[i].data.bitmap.width,
knockout_entries[i].data.bitmap.height,
knockout_entries[i].data.bitmap.bitmap,
- knockout_entries[i].data.bitmap.bg);
+ knockout_entries[i].data.bitmap.bg,
+ knockout_entries[i].data.bitmap.content);
break;
case KNOCKOUT_PLOT_BITMAP_TILE:
box = knockout_entries[i].box->child;
@@ -403,7 +406,9 @@
knockout_entries[i].data.
bitmap_tile.repeat_x,
knockout_entries[i].data.
- bitmap_tile.repeat_y);
+ bitmap_tile.repeat_y,
+ knockout_entries[i].data.
+ bitmap_tile.content);
}
break;
case KNOCKOUT_PLOT_GROUP_START:
@@ -608,7 +613,8 @@
entry->data.bitmap_tile.bitmap,
entry->data.bitmap_tile.bg,
entry->data.bitmap_tile.repeat_x,
- entry->data.bitmap_tile.repeat_y);
+ entry->data.bitmap_tile.repeat_y,
+ entry->data.bitmap_tile.content);
}
}
return success;
@@ -802,7 +808,7 @@
}
bool knockout_plot_bitmap(int x, int y, int width, int height,
- struct bitmap *bitmap, colour bg)
+ struct bitmap *bitmap, colour bg, struct content *content)
{
int kx0, ky0, kx1, ky1;
@@ -824,6 +830,7 @@
knockout_entries[knockout_entry_cur].data.bitmap.height = height;
knockout_entries[knockout_entry_cur].data.bitmap.bitmap = bitmap;
knockout_entries[knockout_entry_cur].data.bitmap.bg = bg;
+ knockout_entries[knockout_entry_cur].data.bitmap.content = content;
knockout_entries[knockout_entry_cur].type = KNOCKOUT_PLOT_BITMAP;
if (++knockout_entry_cur >= KNOCKOUT_ENTRIES)
knockout_plot_flush();
@@ -833,7 +840,7 @@
bool knockout_plot_bitmap_tile(int x, int y, int width, int height,
struct bitmap *bitmap, colour bg,
- bool repeat_x, bool repeat_y)
+ bool repeat_x, bool repeat_y, struct content *content)
{
int kx0, ky0, kx1, ky1;
@@ -879,6 +886,7 @@
knockout_entries[knockout_entry_cur].data.bitmap_tile.bg = bg;
knockout_entries[knockout_entry_cur].data.bitmap_tile.repeat_x = repeat_x;
knockout_entries[knockout_entry_cur].data.bitmap_tile.repeat_y = repeat_y;
+ knockout_entries[knockout_entry_cur].data.bitmap_tile.content = content;
knockout_entries[knockout_entry_cur].type = KNOCKOUT_PLOT_BITMAP_TILE;
if ((++knockout_entry_cur >= KNOCKOUT_ENTRIES) ||
(++knockout_box_cur >= KNOCKOUT_BOXES))
Modified: branches/adamblokus/netsurf/desktop/plotters.h
URL: http://source.netsurf-browser.org/branches/adamblokus/netsurf/desktop/plo...
==============================================================================
--- branches/adamblokus/netsurf/desktop/plotters.h (original)
+++ branches/adamblokus/netsurf/desktop/plotters.h Sat May 31 15:54:56 2008
@@ -25,6 +25,7 @@
#include <stdbool.h>
#include "css/css.h"
+#include "content/content.h"
struct bitmap;
@@ -46,10 +47,10 @@
bool (*arc)(int x, int y, int radius, int angle1, int angle2,
colour c);
bool (*bitmap)(int x, int y, int width, int height,
- struct bitmap *bitmap, colour bg);
+ struct bitmap *bitmap, colour bg, struct content *content);
bool (*bitmap_tile)(int x, int y, int width, int height,
struct bitmap *bitmap, colour bg,
- bool repeat_x, bool repeat_y);
+ bool repeat_x, bool repeat_y, struct content *content);
bool (*group_start)(const char *name); /** optional */
bool (*group_end)(void); /** optional */
bool (*flush)(void);
Modified: branches/adamblokus/netsurf/gtk/gtk_plotters.c
URL: http://source.netsurf-browser.org/branches/adamblokus/netsurf/gtk/gtk_plo...
==============================================================================
--- branches/adamblokus/netsurf/gtk/gtk_plotters.c (original)
+++ branches/adamblokus/netsurf/gtk/gtk_plotters.c Sat May 31 15:54:56 2008
@@ -63,10 +63,10 @@
static bool nsgtk_plot_arc(int x, int y, int radius, int angle1, int angle2,
colour c);
static bool nsgtk_plot_bitmap(int x, int y, int width, int height,
- struct bitmap *bitmap, colour bg);
+ struct bitmap *bitmap, colour bg, struct content *content);
static bool nsgtk_plot_bitmap_tile(int x, int y, int width, int height,
struct bitmap *bitmap, colour bg,
- bool repeat_x, bool repeat_y);
+ bool repeat_x, bool repeat_y, struct content *content);
static void nsgtk_set_solid(void); /**< Set for drawing solid lines */
static void nsgtk_set_dotted(void); /**< Set for drawing dotted lines */
static void nsgtk_set_dashed(void); /**< Set for drawing dashed lines */
@@ -321,7 +321,7 @@
}
bool nsgtk_plot_bitmap(int x, int y, int width, int height,
- struct bitmap *bitmap, colour bg)
+ struct bitmap *bitmap, colour bg, struct content *content)
{
GdkPixbuf *pixbuf = gtk_bitmap_get_primary(bitmap);
return nsgtk_plot_pixbuf(x, y, width, height, pixbuf, bg);
@@ -329,7 +329,7 @@
bool nsgtk_plot_bitmap_tile(int x, int y, int width, int height,
struct bitmap *bitmap, colour bg,
- bool repeat_x, bool repeat_y)
+ bool repeat_x, bool repeat_y, struct content *content)
{
int doneheight = 0, donewidth = 0;
GdkPixbuf *primary;
@@ -337,7 +337,7 @@
if (!(repeat_x || repeat_y)) {
/* Not repeating at all, so just pass it on */
- return nsgtk_plot_bitmap(x,y,width,height,bitmap,bg);
+ return nsgtk_plot_bitmap(x,y,width,height,bitmap,bg,content);
}
if (repeat_x && !repeat_y)
Modified: branches/adamblokus/netsurf/gtk/gtk_plotters.h
URL: http://source.netsurf-browser.org/branches/adamblokus/netsurf/gtk/gtk_plo...
==============================================================================
--- branches/adamblokus/netsurf/gtk/gtk_plotters.h (original)
+++ branches/adamblokus/netsurf/gtk/gtk_plotters.h Sat May 31 15:54:56 2008
@@ -42,3 +42,4 @@
void nsgtk_plot_caret(int x, int y, int h);
#endif /* NETSURF_GTK_PLOTTERS_H */
+
Modified: branches/adamblokus/netsurf/image/bmp.c
URL: http://source.netsurf-browser.org/branches/adamblokus/netsurf/image/bmp.c...
==============================================================================
--- branches/adamblokus/netsurf/image/bmp.c (original)
+++ branches/adamblokus/netsurf/image/bmp.c Sat May 31 15:54:56 2008
@@ -98,7 +98,7 @@
if (!c->data.bmp.bmp->decoded)
bmp_decode(c->data.bmp.bmp);
c->bitmap = c->data.bmp.bmp->bitmap;
- return plot.bitmap(x, y, width, height, c->bitmap, background_colour);
+ return plot.bitmap(x, y, width, height, c->bitmap, background_colour, c);
}
@@ -112,7 +112,7 @@
bmp_decode(c->data.bmp.bmp);
c->bitmap = c->data.bmp.bmp->bitmap;
return plot.bitmap_tile(x, y, width, height, c->bitmap,
- background_colour, repeat_x, repeat_y);
+ background_colour, repeat_x, repeat_y, c);
}
Modified: branches/adamblokus/netsurf/image/gif.c
URL: http://source.netsurf-browser.org/branches/adamblokus/netsurf/image/gif.c...
==============================================================================
--- branches/adamblokus/netsurf/image/gif.c (original)
+++ branches/adamblokus/netsurf/image/gif.c Sat May 31 15:54:56 2008
@@ -141,7 +141,7 @@
if (c->data.gif.current_frame != c->data.gif.gif->decoded_frame)
nsgif_get_frame(c);
c->bitmap = c->data.gif.gif->frame_image;
- return plot.bitmap(x, y, width, height, c->bitmap, background_colour);
+ return plot.bitmap(x, y, width, height, c->bitmap, background_colour, c);
}
@@ -155,7 +155,7 @@
nsgif_get_frame(c);
c->bitmap = c->data.gif.gif->frame_image;
return plot.bitmap_tile(x, y, width, height, c->bitmap, background_colour,
- repeat_x, repeat_y);
+ repeat_x, repeat_y, c);
}
Modified: branches/adamblokus/netsurf/image/ico.c
URL: http://source.netsurf-browser.org/branches/adamblokus/netsurf/image/ico.c...
==============================================================================
--- branches/adamblokus/netsurf/image/ico.c (original)
+++ branches/adamblokus/netsurf/image/ico.c Sat May 31 15:54:56 2008
@@ -101,7 +101,7 @@
bmp_decode(bmp);
c->bitmap = bmp->bitmap;
return plot.bitmap(x, y, width, height, c->bitmap,
- background_colour);
+ background_colour, c);
}
@@ -115,7 +115,7 @@
bmp_decode(bmp);
c->bitmap = bmp->bitmap;
return plot.bitmap_tile(x, y, width, height, c->bitmap,
- background_colour, repeat_x, repeat_y);
+ background_colour, repeat_x, repeat_y, c);
}
Modified: branches/adamblokus/netsurf/image/jpeg.c
URL: http://source.netsurf-browser.org/branches/adamblokus/netsurf/image/jpeg....
==============================================================================
--- branches/adamblokus/netsurf/image/jpeg.c (original)
+++ branches/adamblokus/netsurf/image/jpeg.c Sat May 31 15:54:56 2008
@@ -235,7 +235,7 @@
float scale, unsigned long background_colour)
{
return plot.bitmap(x, y, width, height,
- c->bitmap, background_colour);
+ c->bitmap, background_colour, c);
}
@@ -251,7 +251,7 @@
{
return plot.bitmap_tile(x, y, width, height,
c->bitmap, background_colour,
- repeat_x, repeat_y);
+ repeat_x, repeat_y, c);
}
Modified: branches/adamblokus/netsurf/image/mng.c
URL: http://source.netsurf-browser.org/branches/adamblokus/netsurf/image/mng.c...
==============================================================================
--- branches/adamblokus/netsurf/image/mng.c (original)
+++ branches/adamblokus/netsurf/image/mng.c Sat May 31 15:54:56 2008
@@ -480,7 +480,7 @@
}
ret = plot.bitmap(x, y, width, height,
- c->bitmap, background_colour);
+ c->bitmap, background_colour, c);
/* Check if we need to restart the animation
*/
@@ -509,7 +509,7 @@
ret = plot.bitmap_tile(x, y, width, height,
c->bitmap, background_colour,
- repeat_x, repeat_y);
+ repeat_x, repeat_y, c);
/* Check if we need to restart the animation
*/
Modified: branches/adamblokus/netsurf/image/nssprite.c
URL: http://source.netsurf-browser.org/branches/adamblokus/netsurf/image/nsspr...
==============================================================================
--- branches/adamblokus/netsurf/image/nssprite.c (original)
+++ branches/adamblokus/netsurf/image/nssprite.c Sat May 31 15:54:56 2008
@@ -121,7 +121,7 @@
float scale, colour background_colour)
{
return plot.bitmap(x, y, width, height,
- c->bitmap, background_colour);
+ c->bitmap, background_colour, c);
}
#endif
Modified: branches/adamblokus/netsurf/image/rsvg.c
URL: http://source.netsurf-browser.org/branches/adamblokus/netsurf/image/rsvg....
==============================================================================
--- branches/adamblokus/netsurf/image/rsvg.c (original)
+++ branches/adamblokus/netsurf/image/rsvg.c Sat May 31 15:54:56 2008
@@ -182,7 +182,7 @@
int clip_x0, int clip_y0, int clip_x1, int clip_y1,
float scale, unsigned long background_colour)
{
- plot.bitmap(x, y, width, height, c->bitmap, background_colour);
+ plot.bitmap(x, y, width, height, c->bitmap, background_colour, c);
return true;
}
Modified: branches/adamblokus/netsurf/pdf/pdf_plotters.c
URL: http://source.netsurf-browser.org/branches/adamblokus/netsurf/pdf/pdf_plo...
==============================================================================
--- branches/adamblokus/netsurf/pdf/pdf_plotters.c (original)
+++ branches/adamblokus/netsurf/pdf/pdf_plotters.c Sat May 31 15:54:56 2008
@@ -46,10 +46,10 @@
static bool pdf_plot_arc(int x, int y, int radius, int angle1, int angle2,
colour c);
static bool pdf_plot_bitmap(int x, int y, int width, int height,
- struct bitmap *bitmap, colour bg);
+ struct bitmap *bitmap, colour bg, struct content *content);
static bool pdf_plot_bitmap_tile(int x, int y, int width, int height,
struct bitmap *bitmap, colour bg,
- bool repeat_x, bool repeat_y);
+ bool repeat_x, bool repeat_y, struct content *content);
static bool pdf_plot_flush();
static bool pdf_plot_path(float *p, unsigned int n, colour fill, float width,
colour c, float *transform);
@@ -294,13 +294,45 @@
}
bool pdf_plot_bitmap(int x, int y, int width, int height,
- struct bitmap *bitmap, colour bg){
+ struct bitmap *bitmap, colour bg, struct content *content){
+
+ HPDF_Image image;
+
+#ifdef PDF_DEBUG
+ LOG(("%d %d %d %d %X %X %X", x, y, width, height,
+ bitmap, bg, content));
+#endif
+
+ if(content){
+ switch(content->type){
+ /*Handle "embeddable" types of images*/
+ case CONTENT_JPEG:
+ image = HPDF_LoadJpegImageFromFile(pdf_doc,"testres/jpeg.jpeg");
+ HPDF_Page_DrawImage(pdf_page,image,
+ x, page_height-y-height,
+ width, height);
+ return true;
+ case CONTENT_PNG:
+ image = HPDF_LoadPngImageFromFile(pdf_doc,"testres/png.png");
+ HPDF_Page_DrawImage(pdf_page,image,
+ x, page_height-y-height,
+ width, height);
+ return true;
+ }
+ }
+
+ /*Handle pixmaps*/
+ HPDF_Page_SetRGBFill(pdf_page,1,0,0);
+ HPDF_Page_Rectangle(pdf_page,x,page_height-y-height,width,height);
+ HPDF_Page_Fill(pdf_page);
+
return true;
}
bool pdf_plot_bitmap_tile(int x, int y, int width, int height,
struct bitmap *bitmap, colour bg,
- bool repeat_x, bool repeat_y){
+ bool repeat_x, bool repeat_y, struct content *content){
+
return true;
}
@@ -314,7 +346,7 @@
}
static inline float transform_y(float *transform,float x,float y){
- return (transform[1] * (x) + transform[3] * -(y) - transform[5]) * 2;
+ return page_height-(transform[1] * (x) + transform[3] * -(y) - transform[5]) * 2;
}
bool pdf_plot_path(float *p, unsigned int n, colour fill, float width,
Modified: branches/adamblokus/netsurf/pdf/pdf_plotters.h
URL: http://source.netsurf-browser.org/branches/adamblokus/netsurf/pdf/pdf_plo...
==============================================================================
--- branches/adamblokus/netsurf/pdf/pdf_plotters.h (original)
+++ branches/adamblokus/netsurf/pdf/pdf_plotters.h Sat May 31 15:54:56 2008
@@ -36,4 +36,4 @@
/**Close pdf document and save changes to file*/
void pdf_end(const char *);
-#endif /*NETSURF_PDF_PLOTTERS_H*/
+#endif /*NETSURF_PDF_PLOTTERS_H*/
Modified: branches/adamblokus/netsurf/riscos/plotters.c
URL: http://source.netsurf-browser.org/branches/adamblokus/netsurf/riscos/plot...
==============================================================================
--- branches/adamblokus/netsurf/riscos/plotters.c (original)
+++ branches/adamblokus/netsurf/riscos/plotters.c Sat May 31 15:54:56 2008
@@ -496,7 +496,7 @@
}
bool ro_plot_bitmap(int x, int y, int width, int height,
- struct bitmap *bitmap, colour bg)
+ struct bitmap *bitmap, colour bg, struct content *content)
{
bitmap_get_buffer(bitmap);
return image_redraw(bitmap->sprite_area,
@@ -514,7 +514,7 @@
bool ro_plot_bitmap_tile(int x, int y, int width, int height,
struct bitmap *bitmap, colour bg,
- bool repeat_x, bool repeat_y)
+ bool repeat_x, bool repeat_y, struct content *content)
{
bitmap_get_buffer(bitmap);
return image_redraw(bitmap->sprite_area,
Modified: branches/adamblokus/netsurf/riscos/save_draw.c
URL: http://source.netsurf-browser.org/branches/adamblokus/netsurf/riscos/save...
==============================================================================
--- branches/adamblokus/netsurf/riscos/save_draw.c (original)
+++ branches/adamblokus/netsurf/riscos/save_draw.c Sat May 31 15:54:56 2008
@@ -54,10 +54,10 @@
static bool ro_save_draw_arc(int x, int y, int radius, int angle1, int angle2,
colour c);
static bool ro_save_draw_bitmap(int x, int y, int width, int height,
- struct bitmap *bitmap, colour bg);
+ struct bitmap *bitmap, colour bg, struct content *content);
static bool ro_save_draw_bitmap_tile(int x, int y, int width, int height,
struct bitmap *bitmap, colour bg,
- bool repeat_x, bool repeat_y);
+ bool repeat_x, bool repeat_y, struct content *content);
static bool ro_save_draw_group_start(const char *name);
static bool ro_save_draw_group_end(void);
static bool ro_save_draw_error(pencil_code code);
@@ -377,7 +377,7 @@
}
bool ro_save_draw_bitmap(int x, int y, int width, int height,
- struct bitmap *bitmap, colour bg)
+ struct bitmap *bitmap, colour bg, struct content *content)
{
pencil_code code;
@@ -396,7 +396,7 @@
bool ro_save_draw_bitmap_tile(int x, int y, int width, int height,
struct bitmap *bitmap, colour bg,
- bool repeat_x, bool repeat_y)
+ bool repeat_x, bool repeat_y, struct content *content)
{
return true;
}
Added: branches/adamblokus/netsurf/testres/jpeg.jpeg
URL: http://source.netsurf-browser.org/branches/adamblokus/netsurf/testres/jpe...
==============================================================================
Binary file - no diff available.
Propchange: branches/adamblokus/netsurf/testres/jpeg.jpeg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: branches/adamblokus/netsurf/testres/png.png
URL: http://source.netsurf-browser.org/branches/adamblokus/netsurf/testres/png...
==============================================================================
Binary file - no diff available.
Propchange: branches/adamblokus/netsurf/testres/png.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
15 years, 3 months
r4233 tlsa - in /trunk/netsurfweb/projects: hubbub/index.en libdom/index.en libsvgtiny/index.en projects.css
by netsurf@semichrome.net
Author: tlsa
Date: Sat May 31 14:09:21 2008
New Revision: 4233
URL: http://source.netsurf-browser.org?rev=4233&view=rev
Log:
Add a few details to project pages. (SVN co command and links to readme files.)
Modified:
trunk/netsurfweb/projects/hubbub/index.en
trunk/netsurfweb/projects/libdom/index.en
trunk/netsurfweb/projects/libsvgtiny/index.en
trunk/netsurfweb/projects/projects.css
Modified: trunk/netsurfweb/projects/hubbub/index.en
URL: http://source.netsurf-browser.org/trunk/netsurfweb/projects/hubbub/index....
==============================================================================
--- trunk/netsurfweb/projects/hubbub/index.en (original)
+++ trunk/netsurfweb/projects/hubbub/index.en Sat May 31 14:09:21 2008
@@ -24,11 +24,15 @@
<h2>What is Hubbub?</h2>
-<p>Hubbub is an HTML5 compliant parsing library, written in C. It is currently in development for use with <a href="/">NetSurf</a> and is intended to be suitable for use in other projects too.</p>
+<p>Hubbub is an HTML5 compliant parsing library, written in C. It is currently in development for use with <a href="/">NetSurf</a> and is intended to be suitable for use in other projects too. For further details, see the <a href="http://source.netsurf-browser.org/trunk/hubbub/README">readme</a>.</p>
<h2>Source code</h2>
-<p>You can <a href="http://source.netsurf-browser.org/trunk/hubbub/">browse the source code</a> via the online interface.</p>
+<p>You can <a href="http://source.netsurf-browser.org/trunk/hubbub/">browse the source code</a> via the online interface. Alternativly, you can check it out of SVN:</p>
+
+<p class="svncommand">$ svn co svn://svn.netsurf-browser.org/trunk/hubbub</p>
+
+<p>Libsvgtiny is licensed under the <a href="http://opensource.org/licenses/mit-license.php">MIT License</a>.</p>
<h2>Contact</h2>
Modified: trunk/netsurfweb/projects/libdom/index.en
URL: http://source.netsurf-browser.org/trunk/netsurfweb/projects/libdom/index....
==============================================================================
--- trunk/netsurfweb/projects/libdom/index.en (original)
+++ trunk/netsurfweb/projects/libdom/index.en Sat May 31 14:09:21 2008
@@ -24,11 +24,15 @@
<h2>What is Libdom?</h2>
-<p>Libdom is an implementation of the <a href="http://www.w3.org/DOM/">W3C DOM</a>, written in C. It is currently in development for use with <a href="/">NetSurf</a> and is intended to be suitable for use in other projects too.</p>
+<p>Libdom is an implementation of the <a href="http://www.w3.org/DOM/">W3C DOM</a>, written in C. It is currently in development for use with <a href="/">NetSurf</a> and is intended to be suitable for use in other projects too. For further details, see the <a href="http://source.netsurf-browser.org/trunk/dom/README">readme</a>.</p>
<h2>Source code</h2>
-<p>You can <a href="http://source.netsurf-browser.org/trunk/dom/">browse the source code</a> via the online interface.</p>
+<p>You can <a href="http://source.netsurf-browser.org/trunk/dom/">browse the source code</a> via the online interface. Alternativly, you can check it out of SVN:</p>
+
+<p class="svncommand">$ svn co svn://svn.netsurf-browser.org/trunk/dom</p>
+
+<p>Libsvgtiny is licensed under the <a href="http://opensource.org/licenses/mit-license.php">MIT License</a>.</p>
<h2>Contact</h2>
Modified: trunk/netsurfweb/projects/libsvgtiny/index.en
URL: http://source.netsurf-browser.org/trunk/netsurfweb/projects/libsvgtiny/in...
==============================================================================
--- trunk/netsurfweb/projects/libsvgtiny/index.en (original)
+++ trunk/netsurfweb/projects/libsvgtiny/index.en Sat May 31 14:09:21 2008
@@ -26,11 +26,17 @@
<p>Libsvgtiny is an implementation of <a href="http://www.w3.org/TR/SVGMobile/">SVG Tiny</a>, written in C. It is currently in development for use with <a href="/">NetSurf</a> and is intended to be suitable for use in other projects too.</p>
+<p>The overall idea of the library is to take some SVG as input, and return a list of paths and texts which can be rendered easily. The library does not do the actual rendering. For further details, see the <a href="http://source.netsurf-browser.org/trunk/libsvgtiny/README">readme</a>.</p>
+
<p class="screenshot"><img src="images/svgtiger.png" alt="" title="Screenshot of NetSurf displaying an SVG with Libsvgtiny"></p>
<h2>Source code</h2>
-<p>You can <a href="http://source.netsurf-browser.org/trunk/libsvgtiny/">browse the source code</a> via the online interface.</p>
+<p>You can <a href="http://source.netsurf-browser.org/trunk/libsvgtiny/">browse the source code</a> via the online interface. Alternativly, you can check it out of SVN:</p>
+
+<p class="svncommand">$ svn co svn://svn.netsurf-browser.org/trunk/libsvgtiny</p>
+
+<p>Libsvgtiny is licensed under the <a href="http://opensource.org/licenses/mit-license.php">MIT License</a>.</p>
<h2>Contact</h2>
Modified: trunk/netsurfweb/projects/projects.css
URL: http://source.netsurf-browser.org/trunk/netsurfweb/projects/projects.css?...
==============================================================================
--- trunk/netsurfweb/projects/projects.css (original)
+++ trunk/netsurfweb/projects/projects.css Sat May 31 14:09:21 2008
@@ -4,7 +4,8 @@
body {
background-color: #ffd;
- color: #500; }
+ color: #500;
+ padding-bottom: 2em; }
h1 {
font-size:200%;
@@ -107,3 +108,8 @@
p.screenshot img {
border: 3px solid #500; }
+
+p.svncommand {
+ background-color: #fdb;
+ padding: 0.3em 5em;
+ font-family: monospace; }
15 years, 3 months
r4232 bursa - /trunk/netsurf/content/fetch.c
by netsurf@semichrome.net
Author: bursa
Date: Sat May 31 11:57:53 2008
New Revision: 4232
URL: http://source.netsurf-browser.org?rev=4232&view=rev
Log:
Remove unused members of struct fetch (were moved to fetch_curl but not removed from here).
Modified:
trunk/netsurf/content/fetch.c
Modified: trunk/netsurf/content/fetch.c
URL: http://source.netsurf-browser.org/trunk/netsurf/content/fetch.c?rev=4232&...
==============================================================================
--- trunk/netsurf/content/fetch.c (original)
+++ trunk/netsurf/content/fetch.c Sat May 31 11:57:53 2008
@@ -77,8 +77,6 @@
/** Information for a single fetch. */
struct fetch {
fetch_callback callback;/**< Callback function. */
- bool abort; /**< Abort requested. */
- bool stopped; /**< Download stopped on purpose. */
char *url; /**< URL. */
char *referer; /**< Referer URL. */
bool send_referer; /**< Valid to send the referer */
@@ -269,8 +267,6 @@
/* construct a new fetch structure */
fetch->callback = callback;
- fetch->abort = false;
- fetch->stopped = false;
fetch->url = strdup(url);
fetch->verifiable = verifiable;
fetch->parent_fetch_url = parent_url ? strdup(parent_url) : 0;
15 years, 3 months
r4228 tlsa - /trunk/netsurf/Makefile
by netsurf@semichrome.net
Author: tlsa
Date: Sat May 31 09:39:50 2008
New Revision: 4228
URL: http://source.netsurf-browser.org?rev=4228&view=rev
Log:
Fix native RISC OS build. Thanks joty.
Modified:
trunk/netsurf/Makefile
Modified: trunk/netsurf/Makefile
URL: http://source.netsurf-browser.org/trunk/netsurf/Makefile?rev=4228&r1=4227...
==============================================================================
--- trunk/netsurf/Makefile (original)
+++ trunk/netsurf/Makefile Sat May 31 09:39:50 2008
@@ -104,7 +104,8 @@
OBJROOT := build-$(HOST)-$(TARGET)$(SUBTARGET)
ifeq ($(HOST),riscos)
-LDFLAGS := -Xlinker -symbols=$(OBJROOT)/sym -lxml2 -lz -lm -lcurl -lssl -lcrypto -lmng -ljpeg
+LDFLAGS := -Xlinker -symbols=$(OBJROOT)/sym -lxml2 -lz -lm -lcurl -lssl -lcrypto -lmng -ljpeg \
+ -lcares
else
LDFLAGS := $(shell $(PKG_CONFIG) --libs libxml-2.0 libcurl openssl)
LDFLAGS += -lz -lm -lmng -ljpeg
15 years, 3 months
r4227 jmb - in /trunk/netsurf/content: fetchcache.c fetchers/fetch_curl.c
by netsurf@semichrome.net
Author: jmb
Date: Fri May 30 06:09:50 2008
New Revision: 4227
URL: http://source.netsurf-browser.org?rev=4227&view=rev
Log:
Fix handling of cache control data
Modified:
trunk/netsurf/content/fetchcache.c
trunk/netsurf/content/fetchers/fetch_curl.c
Modified: trunk/netsurf/content/fetchcache.c
URL: http://source.netsurf-browser.org/trunk/netsurf/content/fetchcache.c?rev=...
==============================================================================
--- trunk/netsurf/content/fetchcache.c (original)
+++ trunk/netsurf/content/fetchcache.c Fri May 30 06:09:50 2008
@@ -282,8 +282,17 @@
int i = 0;
char *etag = content->cache_data->etag;
time_t date = content->cache_data->date;
+
+ content->cache_data->req_time = time(NULL);
+ content->cache_data->res_time = 0;
+ content->cache_data->date = 0;
+ content->cache_data->expires = 0;
+ content->cache_data->age = INVALID_AGE;
+ content->cache_data->max_age = INVALID_AGE;
+ content->cache_data->no_cache = false;
content->cache_data->etag = 0;
- content->cache_data->date = 0;
+ content->cache_data->last_modified = 0;
+
headers = malloc(3 * sizeof(char *));
if (!headers) {
content->status = CONTENT_STATUS_ERROR;
@@ -626,7 +635,7 @@
/* Set fetch response time if not already set */
if (c->cache_data->res_time == 0)
- c->cache_data->res_time = time(0);
+ c->cache_data->res_time = time(NULL);
if (5 < size && strncasecmp(data, "Date:", 5) == 0) {
/* extract Date header */
Modified: trunk/netsurf/content/fetchers/fetch_curl.c
URL: http://source.netsurf-browser.org/trunk/netsurf/content/fetchers/fetch_cu...
==============================================================================
--- trunk/netsurf/content/fetchers/fetch_curl.c (original)
+++ trunk/netsurf/content/fetchers/fetch_curl.c Fri May 30 06:09:50 2008
@@ -1132,11 +1132,12 @@
if (url_path && stat(url_path, &s) == 0) {
/* file: URL and file exists */
/* create etag */
- /*free(f->cachedata.etag);
- f->cachedata.etag = malloc(13);
- if (f->cachedata.etag)
- sprintf(f->cachedata.etag,
- "\"%10d\"", (int)s.st_mtime);*/
+ char etag_buf[20];
+ snprintf(etag_buf, sizeof etag_buf,
+ "ETag: \"%10d\"", (int) s.st_mtime);
+ /* And send it to the header handler */
+ fetch_send_callback(FETCH_HEADER, f->fetch_handle, etag_buf,
+ strlen(etag_buf));
/* don't set last modified time so as to ensure that local
* files are revalidated at all times. */
15 years, 3 months