r13859 mmu_man - /trunk/netsurf/Makefile
by netsurf@semichrome.net
Author: mmu_man
Date: Thu Apr 12 13:38:10 2012
New Revision: 13859
URL: http://source.netsurf-browser.org?rev=13859&view=rev
Log:
Fix errors when installing multiple times due to cp failing on .svn directories.
Modified:
trunk/netsurf/Makefile
Modified: trunk/netsurf/Makefile
URL: http://source.netsurf-browser.org/trunk/netsurf/Makefile?rev=13859&r1=138...
==============================================================================
--- trunk/netsurf/Makefile (original)
+++ trunk/netsurf/Makefile Thu Apr 12 13:38:10 2012
@@ -616,6 +616,7 @@
install-gtk: nsgtk
@# TODO: filter out .svn directories from install location
mkdir -p $(DESTDIR)$(NETSURF_GTK_RESOURCES)throbber
+ mkdir -p $(DESTDIR)$(NETSURF_GTK_RESOURCES)icons
mkdir -p $(DESTDIR)$(NETSURF_GTK_BIN)
@cp nsgtk $(DESTDIR)$(NETSURF_GTK_BIN)netsurf
@cp -RL gtk/res/adblock.css $(DESTDIR)$(NETSURF_GTK_RESOURCES)
@@ -626,7 +627,7 @@
@cp -RL gtk/res/default.ico $(DESTDIR)$(NETSURF_GTK_RESOURCES)
@cp -RL gtk/res/favicon.png $(DESTDIR)$(NETSURF_GTK_RESOURCES)
@cp -RL gtk/res/gtkdefault.css $(DESTDIR)$(NETSURF_GTK_RESOURCES)
- @cp -RL gtk/res/icons $(DESTDIR)$(NETSURF_GTK_RESOURCES)
+ @cp -RL gtk/res/icons/*.png $(DESTDIR)$(NETSURF_GTK_RESOURCES)
@cp -RL gtk/res/internal.css $(DESTDIR)$(NETSURF_GTK_RESOURCES)
@cp -RL gtk/res/languages $(DESTDIR)$(NETSURF_GTK_RESOURCES)
@cp -RL gtk/res/license $(DESTDIR)$(NETSURF_GTK_RESOURCES)
@@ -638,14 +639,9 @@
@cp -RL gtk/res/throbber/*.png $(DESTDIR)$(NETSURF_GTK_RESOURCES)throbber
@cp -RL gtk/res/toolbarIndices $(DESTDIR)$(NETSURF_GTK_RESOURCES)
@cp -RL gtk/res/SearchEngines $(DESTDIR)$(NETSURF_GTK_RESOURCES)
- @cp -RL gtk/res/themes $(DESTDIR)$(NETSURF_GTK_RESOURCES)
+ @tar cf - --exclude .svn -C gtk/res themes | tar xf - -C $(DESTDIR)$(NETSURF_GTK_RESOURCES)
@# Install translations
- @cp -RL gtk/res/C $(DESTDIR)$(NETSURF_GTK_RESOURCES)
- @cp -RL gtk/res/de $(DESTDIR)$(NETSURF_GTK_RESOURCES)
- @cp -RL gtk/res/en $(DESTDIR)$(NETSURF_GTK_RESOURCES)
- @cp -RL gtk/res/fr $(DESTDIR)$(NETSURF_GTK_RESOURCES)
- @cp -RL gtk/res/it $(DESTDIR)$(NETSURF_GTK_RESOURCES)
- @cp -RL gtk/res/nl $(DESTDIR)$(NETSURF_GTK_RESOURCES)
+ @tar cf - --exclude .svn -C gtk/res C de en fr it nl | tar xf - -C $(DESTDIR)$(NETSURF_GTK_RESOURCES)
@# Install glade templates
@gzip -9v < gtk/res/cookies.glade > $(DESTDIR)$(NETSURF_GTK_RESOURCES)cookies.glade
@gzip -9v < gtk/res/downloads.glade > $(DESTDIR)$(NETSURF_GTK_RESOURCES)downloads.glade
11 years, 5 months
r13858 mmu_man - /trunk/netsurf/utils/svn-testament.pl
by netsurf@semichrome.net
Author: mmu_man
Date: Thu Apr 12 13:17:56 2012
New Revision: 13858
URL: http://source.netsurf-browser.org?rev=13858&view=rev
Log:
Redo r13857 differently, to avoid issues with non-unixish shells.
Modified:
trunk/netsurf/utils/svn-testament.pl
Modified: trunk/netsurf/utils/svn-testament.pl
URL: http://source.netsurf-browser.org/trunk/netsurf/utils/svn-testament.pl?re...
==============================================================================
--- trunk/netsurf/utils/svn-testament.pl (original)
+++ trunk/netsurf/utils/svn-testament.pl Thu Apr 12 13:17:56 2012
@@ -11,6 +11,8 @@
If there is no SVN in place, the data is invented arbitrarily.
=cut
+
+$ENV{LC_ALL} = 'C';
my $root = shift @ARGV;
my $targetfile = shift @ARGV;
@@ -61,7 +63,7 @@
}
if ( $svn_present ) {
- foreach my $line (split(/\n/, gather_output("LC_ALL=C svn info $root"))) {
+ foreach my $line (split(/\n/, gather_output("svn info $root"))) {
my ($key, $value) = split(/: /, $line, 2);
$key = lc($key);
$key =~ s/\s+//g;
@@ -76,7 +78,7 @@
my %svnstatus; # The SVN status output
if ( $svn_present ) {
- foreach my $line (split(/\n/, gather_output("LC_ALL=C svn status $root"))) {
+ foreach my $line (split(/\n/, gather_output("svn status $root"))) {
chomp $line;
my $op = substr($line, 0, 1);
if ($op eq ' ' && substr($line, 1, 1) ne ' ') { $op = "p"; }
11 years, 5 months
r13857 mmu_man - /trunk/netsurf/utils/svn-testament.pl
by netsurf@semichrome.net
Author: mmu_man
Date: Thu Apr 12 11:42:02 2012
New Revision: 13857
URL: http://source.netsurf-browser.org?rev=13857&view=rev
Log:
Make sure we use the default locale before parsing output of a localized program.
This fixes generating the testament here.
Modified:
trunk/netsurf/utils/svn-testament.pl
Modified: trunk/netsurf/utils/svn-testament.pl
URL: http://source.netsurf-browser.org/trunk/netsurf/utils/svn-testament.pl?re...
==============================================================================
--- trunk/netsurf/utils/svn-testament.pl (original)
+++ trunk/netsurf/utils/svn-testament.pl Thu Apr 12 11:42:02 2012
@@ -61,7 +61,7 @@
}
if ( $svn_present ) {
- foreach my $line (split(/\n/, gather_output("svn info $root"))) {
+ foreach my $line (split(/\n/, gather_output("LC_ALL=C svn info $root"))) {
my ($key, $value) = split(/: /, $line, 2);
$key = lc($key);
$key =~ s/\s+//g;
@@ -76,7 +76,7 @@
my %svnstatus; # The SVN status output
if ( $svn_present ) {
- foreach my $line (split(/\n/, gather_output("svn status $root"))) {
+ foreach my $line (split(/\n/, gather_output("LC_ALL=C svn status $root"))) {
chomp $line;
my $op = substr($line, 0, 1);
if ($op eq ' ' && substr($line, 1, 1) ne ' ') { $op = "p"; }
11 years, 5 months
r13856 tlsa - /trunk/libcss/examples/example1.c
by netsurf@semichrome.net
Author: tlsa
Date: Thu Apr 12 09:56:25 2012
New Revision: 13856
URL: http://source.netsurf-browser.org?rev=13856&view=rev
Log:
Bring example back up to date. Note: untested.
Modified:
trunk/libcss/examples/example1.c
Modified: trunk/libcss/examples/example1.c
URL: http://source.netsurf-browser.org/trunk/libcss/examples/example1.c?rev=13...
==============================================================================
--- trunk/libcss/examples/example1.c (original)
+++ trunk/libcss/examples/example1.c Thu Apr 12 09:56:25 2012
@@ -23,25 +23,29 @@
static css_error resolve_url(void *pw,
const char *base, lwc_string *rel, lwc_string **abs);
static void die(const char *text, css_error code);
+
static css_error node_name(void *pw, void *node,
- lwc_string **name);
+ css_qname *qname);
static css_error node_classes(void *pw, void *node,
lwc_string ***classes, uint32_t *n_classes);
static css_error node_id(void *pw, void *node,
lwc_string **id);
static css_error named_ancestor_node(void *pw, void *node,
- lwc_string *name,
+ const css_qname *qname,
void **ancestor);
static css_error named_parent_node(void *pw, void *node,
- lwc_string *name,
+ const css_qname *qname,
void **parent);
static css_error named_sibling_node(void *pw, void *node,
- lwc_string *name,
+ const css_qname *qname,
+ void **sibling);
+static css_error named_generic_sibling_node(void *pw, void *node,
+ const css_qname *qname,
void **sibling);
static css_error parent_node(void *pw, void *node, void **parent);
static css_error sibling_node(void *pw, void *node, void **sibling);
static css_error node_has_name(void *pw, void *node,
- lwc_string *name,
+ const css_qname *qname,
bool *match);
static css_error node_has_class(void *pw, void *node,
lwc_string *name,
@@ -50,26 +54,45 @@
lwc_string *name,
bool *match);
static css_error node_has_attribute(void *pw, void *node,
- lwc_string *name,
+ const css_qname *qname,
bool *match);
static css_error node_has_attribute_equal(void *pw, void *node,
- lwc_string *name,
+ const css_qname *qname,
lwc_string *value,
bool *match);
static css_error node_has_attribute_dashmatch(void *pw, void *node,
- lwc_string *name,
+ const css_qname *qname,
lwc_string *value,
bool *match);
static css_error node_has_attribute_includes(void *pw, void *node,
- lwc_string *name,
- lwc_string *value,
- bool *match);
-static css_error node_is_first_child(void *pw, void *node, bool *match);
+ const css_qname *qname,
+ lwc_string *value,
+ bool *match);
+static css_error node_has_attribute_prefix(void *pw, void *node,
+ const css_qname *qname,
+ lwc_string *value,
+ bool *match);
+static css_error node_has_attribute_suffix(void *pw, void *node,
+ const css_qname *qname,
+ lwc_string *value,
+ bool *match);
+static css_error node_has_attribute_substring(void *pw, void *node,
+ const css_qname *qname,
+ lwc_string *value,
+ bool *match);
+static css_error node_is_root(void *pw, void *node, bool *match);
+static css_error node_count_siblings(void *pw, void *node,
+ bool same_name, bool after, int32_t *count);
+static css_error node_is_empty(void *pw, void *node, bool *match);
static css_error node_is_link(void *pw, void *node, bool *match);
static css_error node_is_visited(void *pw, void *node, bool *match);
static css_error node_is_hover(void *pw, void *node, bool *match);
static css_error node_is_active(void *pw, void *node, bool *match);
static css_error node_is_focus(void *pw, void *node, bool *match);
+static css_error node_is_enabled(void *pw, void *node, bool *match);
+static css_error node_is_disabled(void *pw, void *node, bool *match);
+static css_error node_is_checked(void *pw, void *node, bool *match);
+static css_error node_is_target(void *pw, void *node, bool *match);
static css_error node_is_lang(void *pw, void *node,
lwc_string *lang, bool *match);
static css_error node_presentational_hint(void *pw, void *node,
@@ -81,12 +104,15 @@
/* Table of function pointers for the LibCSS Select API. */
static css_select_handler select_handler = {
+ CSS_SELECT_HANDLER_VERSION_1,
+
node_name,
node_classes,
node_id,
named_ancestor_node,
named_parent_node,
named_sibling_node,
+ named_generic_sibling_node,
parent_node,
sibling_node,
node_has_name,
@@ -96,12 +122,21 @@
node_has_attribute_equal,
node_has_attribute_dashmatch,
node_has_attribute_includes,
- node_is_first_child,
+ node_has_attribute_prefix,
+ node_has_attribute_suffix,
+ node_has_attribute_substring,
+ node_is_root,
+ node_count_siblings,
+ node_is_empty,
node_is_link,
node_is_visited,
node_is_hover,
node_is_active,
node_is_focus,
+ node_is_enabled,
+ node_is_disabled,
+ node_is_checked,
+ node_is_target,
node_is_lang,
node_presentational_hint,
ua_default_for_property,
@@ -120,14 +155,29 @@
css_select_ctx *select_ctx;
uint32_t count;
unsigned int hh;
+ css_stylesheet_params params;
UNUSED(argc);
UNUSED(argv);
+ params.params_version = CSS_STYLESHEET_PARAMS_VERSION_1;
+ params.level = CSS_LEVEL_21;
+ params.charset = "UTF-8";
+ params.url = "foo";
+ params.title = "foo";
+ params.allow_quirks = false;
+ params.inline_style = false;
+ params.resolve = resolve_url;
+ params.resolve_pw = NULL;
+ params.import = NULL;
+ params.import_pw = NULL;
+ params.color = NULL;
+ params.color_pw = NULL;
+ params.font = NULL;
+ params.font_pw = NULL;
+
/* create a stylesheet */
- code = css_stylesheet_create(CSS_LEVEL_DEFAULT, "UTF-8", "", NULL,
- false, false, myrealloc, 0, resolve_url, 0, NULL, NULL,
- &sheet);
+ code = css_stylesheet_create(¶ms, myrealloc, NULL, &sheet);
if (code != CSS_OK)
die("css_stylesheet_create", code);
code = css_stylesheet_size(sheet, &size);
@@ -248,11 +298,14 @@
* a libwapcaplet string containing the element name. Therefore all the
* functions below except those getting or testing the element name return empty
* data or false attributes. */
-css_error node_name(void *pw, void *n, lwc_string **name)
+css_error node_name(void *pw, void *n, css_qname *qname)
{
lwc_string *node = n;
- UNUSED(pw);
- *name = lwc_string_ref(node);
+
+ UNUSED(pw);
+
+ qname->name = lwc_string_ref(node);
+
return CSS_OK;
}
@@ -275,34 +328,45 @@
}
css_error named_ancestor_node(void *pw, void *n,
- lwc_string *name,
+ const css_qname *qname,
void **ancestor)
{
UNUSED(pw);
UNUSED(n);
- UNUSED(name);
+ UNUSED(qname);
*ancestor = NULL;
return CSS_OK;
}
css_error named_parent_node(void *pw, void *n,
- lwc_string *name,
+ const css_qname *qname,
void **parent)
{
UNUSED(pw);
UNUSED(n);
- UNUSED(name);
+ UNUSED(qname);
*parent = NULL;
return CSS_OK;
}
+css_error named_generic_sibling_node(void *pw, void *n,
+ const css_qname *qname,
+ void **sibling)
+{
+ UNUSED(pw);
+ UNUSED(n);
+ UNUSED(qname);
+ *sibling = NULL;
+ return CSS_OK;
+}
+
css_error named_sibling_node(void *pw, void *n,
- lwc_string *name,
+ const css_qname *qname,
void **sibling)
{
UNUSED(pw);
UNUSED(n);
- UNUSED(name);
+ UNUSED(qname);
*sibling = NULL;
return CSS_OK;
}
@@ -324,12 +388,13 @@
}
css_error node_has_name(void *pw, void *n,
- lwc_string *name,
+ const css_qname *qname,
bool *match)
{
lwc_string *node = n;
UNUSED(pw);
- assert(lwc_string_caseless_isequal(node, name, match) == lwc_error_ok);
+ assert(lwc_string_caseless_isequal(node, qname->name, match) ==
+ lwc_error_ok);
return CSS_OK;
}
@@ -356,55 +421,94 @@
}
css_error node_has_attribute(void *pw, void *n,
- lwc_string *name,
- bool *match)
-{
- UNUSED(pw);
- UNUSED(n);
- UNUSED(name);
+ const css_qname *qname,
+ bool *match)
+{
+ UNUSED(pw);
+ UNUSED(n);
+ UNUSED(qname);
*match = false;
return CSS_OK;
}
css_error node_has_attribute_equal(void *pw, void *n,
- lwc_string *name,
- lwc_string *value,
- bool *match)
-{
- UNUSED(pw);
- UNUSED(n);
- UNUSED(name);
+ const css_qname *qname,
+ lwc_string *value,
+ bool *match)
+{
+ UNUSED(pw);
+ UNUSED(n);
+ UNUSED(qname);
UNUSED(value);
*match = false;
return CSS_OK;
}
css_error node_has_attribute_dashmatch(void *pw, void *n,
- lwc_string *name,
- lwc_string *value,
- bool *match)
-{
- UNUSED(pw);
- UNUSED(n);
- UNUSED(name);
+ const css_qname *qname,
+ lwc_string *value,
+ bool *match)
+{
+ UNUSED(pw);
+ UNUSED(n);
+ UNUSED(qname);
UNUSED(value);
*match = false;
return CSS_OK;
}
css_error node_has_attribute_includes(void *pw, void *n,
- lwc_string *name,
- lwc_string *value,
- bool *match)
-{
- UNUSED(pw);
- UNUSED(n);
- UNUSED(name);
+ const css_qname *qname,
+ lwc_string *value,
+ bool *match)
+{
+ UNUSED(pw);
+ UNUSED(n);
+ UNUSED(qname);
UNUSED(value);
*match = false;
return CSS_OK;
}
+css_error node_has_attribute_prefix(void *pw, void *n,
+ const css_qname *qname,
+ lwc_string *value,
+ bool *match)
+{
+ UNUSED(pw);
+ UNUSED(n);
+ UNUSED(qname);
+ UNUSED(value);
+ *match = false;
+ return CSS_OK;
+}
+
+css_error node_has_attribute_suffix(void *pw, void *n,
+ const css_qname *qname,
+ lwc_string *value,
+ bool *match)
+{
+ UNUSED(pw);
+ UNUSED(n);
+ UNUSED(qname);
+ UNUSED(value);
+ *match = false;
+ return CSS_OK;
+}
+
+css_error node_has_attribute_substring(void *pw, void *n,
+ const css_qname *qname,
+ lwc_string *value,
+ bool *match)
+{
+ UNUSED(pw);
+ UNUSED(n);
+ UNUSED(qname);
+ UNUSED(value);
+ *match = false;
+ return CSS_OK;
+}
+
css_error node_is_first_child(void *pw, void *n, bool *match)
{
UNUSED(pw);
@@ -413,6 +517,33 @@
return CSS_OK;
}
+css_error node_is_root(void *pw, void *n, bool *match)
+{
+ UNUSED(pw);
+ UNUSED(n);
+ *match = false;
+ return CSS_OK;
+}
+
+css_error node_count_siblings(void *pw, void *n,
+ bool same_name, bool after, int32_t *count)
+{
+ UNUSED(pw);
+ UNUSED(n);
+ UNUSED(same_name);
+ UNUSED(after);
+ *count = 1;
+ return CSS_OK;
+}
+
+css_error node_is_empty(void *pw, void *n, bool *match)
+{
+ UNUSED(pw);
+ UNUSED(n);
+ *match = false;
+ return CSS_OK;
+}
+
css_error node_is_link(void *pw, void *n, bool *match)
{
UNUSED(pw);
@@ -452,6 +583,39 @@
*match = false;
return CSS_OK;
}
+
+css_error node_is_enabled(void *pw, void *n, bool *match)
+{
+ UNUSED(pw);
+ UNUSED(n);
+ *match = false;
+ return CSS_OK;
+}
+
+css_error node_is_disabled(void *pw, void *n, bool *match)
+{
+ UNUSED(pw);
+ UNUSED(n);
+ *match = false;
+ return CSS_OK;
+}
+
+css_error node_is_checked(void *pw, void *n, bool *match)
+{
+ UNUSED(pw);
+ UNUSED(n);
+ *match = false;
+ return CSS_OK;
+}
+
+css_error node_is_target(void *pw, void *n, bool *match)
+{
+ UNUSED(pw);
+ UNUSED(n);
+ *match = false;
+ return CSS_OK;
+}
+
css_error node_is_lang(void *pw, void *n,
lwc_string *lang,
11 years, 5 months
r13855 tlsa - in /trunk/netsurf: !NetSurf/Resources/internal.css, f79 content/fetchers/about.c image/image_cache.c
by netsurf@semichrome.net
Author: tlsa
Date: Thu Apr 12 08:43:57 2012
New Revision: 13855
URL: http://source.netsurf-browser.org?rev=13855&view=rev
Log:
More work on about:imagecache entry listing table.
Modified:
trunk/netsurf/!NetSurf/Resources/internal.css,f79
trunk/netsurf/content/fetchers/about.c
trunk/netsurf/image/image_cache.c
Modified: trunk/netsurf/!NetSurf/Resources/internal.css,f79
URL: http://source.netsurf-browser.org/trunk/netsurf/%21NetSurf/Resources/inte...
==============================================================================
--- trunk/netsurf/!NetSurf/Resources/internal.css,f79 (original)
+++ trunk/netsurf/!NetSurf/Resources/internal.css,f79 Thu Apr 12 08:43:57 2012
@@ -181,24 +181,28 @@
* about:imagecache
*/
-table.imagecachelist {
+p.imagecachelist {
border-spacing: 0px;
margin-top: 1.2em;
margin-bottom: 1.2em;
-}
-
-table.imagecachelist tr:nth-child(2n+3) {
+ display: table;
+}
+
+p.imagecachelist a:nth-child(2n+3) {
background: #e8edff;
}
-table.imagecachelist th {
+p.imagecachelist strong, p.imagecachelist a {
+ display: table-row;
+}
+
+p.imagecachelist strong span {
background: #c8d5ff;
- padding: 2px;
- text-align: left;
-}
-
-table.imagecachelist td {
+}
+
+p.imagecachelist span {
border-top: 1px solid #bcf;
- padding: 2px;
-}
-
+ padding: 2px 0.5em;
+ display: table-cell;
+}
+
Modified: trunk/netsurf/content/fetchers/about.c
URL: http://source.netsurf-browser.org/trunk/netsurf/content/fetchers/about.c?...
==============================================================================
--- trunk/netsurf/content/fetchers/about.c (original)
+++ trunk/netsurf/content/fetchers/about.c Thu Apr 12 08:43:57 2012
@@ -242,29 +242,30 @@
/* image cache entry table */
slen = snprintf(buffer, sizeof buffer,
- "<table class=\"imagecachelist\">\n"
- "<tr>"
- "<th>Entry</th>"
- "<th>Content Key</th>"
- "<th>Redraw<br>Count</th>"
- "<th>Conversion<br>Count</th>"
- "<th>Last Redraw</th>"
- "<th>Bitmap Age</th>"
- "<th>Bitmap Size</th>"
- "<th>Source URL</th>"
- "</tr>\n");
+ "<p class=\"imagecachelist\">\n"
+ "<strong>"
+ "<span>Entry</span>"
+ "<span>Content Key</span>"
+ "<span>Redraw Count</span>"
+ "<span>Conversion Count</span>"
+ "<span>Last Redraw</span>"
+ "<span>Bitmap Age</span>"
+ "<span>Bitmap Size</span>"
+ "<span>Source</span>"
+ "</strong>\n");
do {
res = image_cache_snentryf(buffer + slen, sizeof buffer - slen,
cent_loop,
- "<tr><td>%e</td>"
- "<td>%k</td>"
- "<td>%r</td>"
- "<td>%c</td>"
- "<td>%a</td>"
- "<td>%g</td>"
- "<td>%s</td>"
- "<td><a href=\"%U\">%U</a></td>"
- "</tr>\n");
+ "<a href=\"%U\">"
+ "<span>%e</span>"
+ "<span>%k</span>"
+ "<span>%r</span>"
+ "<span>%c</span>"
+ "<span>%a</span>"
+ "<span>%g</span>"
+ "<span>%s</span>"
+ "<span>%o</span>"
+ "</a>\n");
if (res <= 0)
break; /* last option */
@@ -282,7 +283,7 @@
} while (res > 0);
slen += snprintf(buffer + slen, sizeof buffer - slen,
- "</table>\n</body>\n</html>\n");
+ "</p>\n</body>\n</html>\n");
msg.data.header_or_data.len = slen;
if (fetch_about_send_callback(&msg, ctx))
Modified: trunk/netsurf/image/image_cache.c
URL: http://source.netsurf-browser.org/trunk/netsurf/image/image_cache.c?rev=1...
==============================================================================
--- trunk/netsurf/image/image_cache.c (original)
+++ trunk/netsurf/image/image_cache.c Thu Apr 12 08:43:57 2012
@@ -637,6 +637,7 @@
struct image_cache_entry_s *centry;
size_t slen = 0; /* current output string length */
int fmtc = 0; /* current index into format string */
+ lwc_string *origin; /* current entry's origin */
centry = image_cache__findn(entryn);
if (centry == NULL)
@@ -680,6 +681,29 @@
case 'U':
slen += snprintf(string + slen, size - slen,
"%s", nsurl_access(llcache_handle_get_url(centry->content->llcache)));
+ break;
+
+ case 'o':
+ if (nsurl_has_component(llcache_handle_get_url(
+ centry->content->llcache),
+ NSURL_HOST)) {
+ origin = nsurl_get_component(
+ llcache_handle_get_url(
+ centry->content->
+ llcache),
+ NSURL_HOST);
+
+ slen += snprintf(string + slen,
+ size - slen, "%s",
+ lwc_string_data(
+ origin));
+
+ lwc_string_unref(origin);
+ } else {
+ slen += snprintf(string + slen,
+ size - slen, "%s",
+ "localhost");
+ }
break;
case 's':
11 years, 5 months
r13854 tlsa - /trunk/netsurf/content/fetchers/about.c
by netsurf@semichrome.net
Author: tlsa
Date: Thu Apr 12 08:06:21 2012
New Revision: 13854
URL: http://source.netsurf-browser.org?rev=13854&view=rev
Log:
Close paragraph tags and other minor imagecache page cleanups.
Modified:
trunk/netsurf/content/fetchers/about.c
Modified: trunk/netsurf/content/fetchers/about.c
URL: http://source.netsurf-browser.org/trunk/netsurf/content/fetchers/about.c?...
==============================================================================
--- trunk/netsurf/content/fetchers/about.c (original)
+++ trunk/netsurf/content/fetchers/about.c Thu Apr 12 08:06:21 2012
@@ -216,20 +216,22 @@
/* image cache summary */
slen = image_cache_snsummaryf(buffer, sizeof(buffer),
- "<p>Configured limit of %a hysteresis of %b"
- "<p>Total bitmap size in use %c (in %d)"
- "<p>Age %es"
- "<p>Peak size %f (in %g)"
- "<p>Peak image count %h (size %i)"
+ "<p>Configured limit of %a hysteresis of %b</p>\n"
+ "<p>Total bitmap size in use %c (in %d)</p>\n"
+ "<p>Age %es</p>\n"
+ "<p>Peak size %f (in %g)</p>\n"
+ "<p>Peak image count %h (size %i)</p>\n"
"<p>Cache total/hit/miss/fail (counts) %j/%k/%l/%m "
- "(%pj%%/%pk%%/%pl%%/%pm%%)"
+ "(%pj%%/%pk%%/%pl%%/%pm%%)</p>\n"
"<p>Cache total/hit/miss/fail (size) %n/%o/%q/%r "
- "(%pn%%/%po%%/%pq%%/%pr%%)"
+ "(%pn%%/%po%%/%pq%%/%pr%%)</p>\n"
"<p>Total images never rendered: %s "
- "(includes %t that were converted)"
+ "(includes %t that were converted)</p>\n"
"<p>Total number of excessive conversions: %u "
"(from %v images converted more than once)"
- "<p>Bitmap of size %w had most (%x) conversions");
+ "</p>\n"
+ "<p>Bitmap of size %w had most (%x) conversions</p>\n"
+ "<h2>Current image cache contents</h2>\n");
if (slen >= (int) (sizeof(buffer)))
goto fetch_about_imagecache_handler_aborted; /* overflow */
@@ -244,8 +246,8 @@
"<tr>"
"<th>Entry</th>"
"<th>Content Key</th>"
- "<th>Redraw Count</th>"
- "<th>Conversion Count</th>"
+ "<th>Redraw<br>Count</th>"
+ "<th>Conversion<br>Count</th>"
"<th>Last Redraw</th>"
"<th>Bitmap Age</th>"
"<th>Bitmap Size</th>"
11 years, 5 months
r13853 tlsa - /trunk/netsurf/!NetSurf/Resources/internal.css,f79
by netsurf@semichrome.net
Author: tlsa
Date: Thu Apr 12 07:36:06 2012
New Revision: 13853
URL: http://source.netsurf-browser.org?rev=13853&view=rev
Log:
Style for about:imagecache page.
Modified:
trunk/netsurf/!NetSurf/Resources/internal.css,f79
Modified: trunk/netsurf/!NetSurf/Resources/internal.css,f79
URL: http://source.netsurf-browser.org/trunk/netsurf/%21NetSurf/Resources/inte...
==============================================================================
--- trunk/netsurf/!NetSurf/Resources/internal.css,f79 (original)
+++ trunk/netsurf/!NetSurf/Resources/internal.css,f79 Thu Apr 12 07:36:06 2012
@@ -159,6 +159,7 @@
text-align: left;
padding-right: 0; }
+
/*
* configuration listing style
*/
@@ -175,19 +176,29 @@
body#configlist .null-content {
font-style: italic; }
-/* about:imagecache */
+
+/*
+ * about:imagecache
+ */
table.imagecachelist {
- border: 1px solid #000;
border-spacing: 0px;
- border-collapse: collapse;
+ margin-top: 1.2em;
+ margin-bottom: 1.2em;
+}
+
+table.imagecachelist tr:nth-child(2n+3) {
+ background: #e8edff;
}
table.imagecachelist th {
- border: 1px solid #000;
+ background: #c8d5ff;
+ padding: 2px;
+ text-align: left;
}
table.imagecachelist td {
- border: 1px solid #000;
-}
-
+ border-top: 1px solid #bcf;
+ padding: 2px;
+}
+
11 years, 5 months
r13852 tlsa - /trunk/netsurf/content/fetchers/about.c
by netsurf@semichrome.net
Author: tlsa
Date: Thu Apr 12 07:34:33 2012
New Revision: 13852
URL: http://source.netsurf-browser.org?rev=13852&view=rev
Log:
Make more readable and fix use double quotes for href attribute value.
Modified:
trunk/netsurf/content/fetchers/about.c
Modified: trunk/netsurf/content/fetchers/about.c
URL: http://source.netsurf-browser.org/trunk/netsurf/content/fetchers/about.c?...
==============================================================================
--- trunk/netsurf/content/fetchers/about.c (original)
+++ trunk/netsurf/content/fetchers/about.c Thu Apr 12 07:34:33 2012
@@ -241,18 +241,28 @@
/* image cache entry table */
slen = snprintf(buffer, sizeof buffer,
"<table class=\"imagecachelist\">\n"
- "<tr><th>Entry</th>"
+ "<tr>"
+ "<th>Entry</th>"
"<th>Content Key</th>"
"<th>Redraw Count</th>"
"<th>Conversion Count</th>"
"<th>Last Redraw</th>"
"<th>Bitmap Age</th>"
"<th>Bitmap Size</th>"
- "<th>Source URL</th></tr>\n");
+ "<th>Source URL</th>"
+ "</tr>\n");
do {
res = image_cache_snentryf(buffer + slen, sizeof buffer - slen,
cent_loop,
- "<tr><td>%e</td><td>%k</td><td>%r</td><td>%c</td><td>%a</td><td>%g</td><td>%s</td><td><a href='%U'>%U</a></td></tr>\n");
+ "<tr><td>%e</td>"
+ "<td>%k</td>"
+ "<td>%r</td>"
+ "<td>%c</td>"
+ "<td>%a</td>"
+ "<td>%g</td>"
+ "<td>%s</td>"
+ "<td><a href=\"%U\">%U</a></td>"
+ "</tr>\n");
if (res <= 0)
break; /* last option */
11 years, 5 months
r13851 tlsa - /trunk/netsurf/desktop/textarea.c
by netsurf@semichrome.net
Author: tlsa
Date: Thu Apr 12 05:30:20 2012
New Revision: 13851
URL: http://source.netsurf-browser.org?rev=13851&view=rev
Log:
Pass correct width/height values to textarea redraw callback when setting caret position. Reduces flicker.
Modified:
trunk/netsurf/desktop/textarea.c
Modified: trunk/netsurf/desktop/textarea.c
URL: http://source.netsurf-browser.org/trunk/netsurf/desktop/textarea.c?rev=13...
==============================================================================
--- trunk/netsurf/desktop/textarea.c (original)
+++ trunk/netsurf/desktop/textarea.c Thu Apr 12 05:30:20 2012
@@ -407,6 +407,7 @@
int x, y;
int x0, y0, x1, y1;
int text_y_offset;
+ int width, height;
if (ta->flags & TEXTAREA_READONLY)
return true;
@@ -454,8 +455,12 @@
/* set the caret coordinate beyond the redraw rectangle */
ta->caret_x = x - 2;
- ta->redraw_request(ta->data, x - 1, y + text_y_offset, x + 1,
- y + ta->line_height + text_y_offset);
+ x0 = x - 1;
+ y0 = y + text_y_offset;
+ width = 2;
+ height = ta->line_height;
+
+ ta->redraw_request(ta->data, x0, y0, width, height);
}
/* check if the caret has to be drawn at all */
@@ -501,16 +506,24 @@
y = ta->line_height * ta->caret_pos.line - ta->scroll_y;
ta->caret_y = y;
- if (textarea_scroll_visible(ta))
+ if (textarea_scroll_visible(ta)) {
ta->redraw_request(ta->data, 0, 0,
ta->vis_width,
ta->vis_height);
- else {
+ } else {
x0 = max(x - 1, MARGIN_LEFT);
y0 = max(y + text_y_offset, 0);
x1 = min(x + 1, ta->vis_width - MARGIN_RIGHT);
- y1 = min(y + ta->line_height + text_y_offset, ta->vis_height);
- ta->redraw_request(ta->data, x0, y0, x1, y1);
+ y1 = min(y + ta->line_height + text_y_offset,
+ ta->vis_height);
+
+ width = x1 - x0;
+ height = y1 - y0;
+
+ if (width > 0 && height > 0) {
+ ta->redraw_request(ta->data, x0, y0,
+ width, height);
+ }
}
}
11 years, 5 months