Partial fix for bug 2368 (version 3)
by Dave Higton
This gives a more user-friendly error message (sadly I can't offer any translations).
Dave
____________________________________________________________
Can't remember your password? Do you need a strong and secure password?
Use Password manager! It stores your passwords & protects your account.
Check it out at http://mysecurelogon.com/password-manager
7 years, 7 months
PATCH: Stop GIF anims when not displayed
by Chris Young
Hi
I wrote this ages ago but failed to do anything further with it. I've
just cleaned it up and checked it still builds.
It stops GIF animations when they are no longer being used, rather
than waiting for them to be destroyed. This prevents NetSurf from
wasting time cycling through frames when there is nothing to see.
Chris
7 years, 7 months
Patch: Partial fix for bug 2368 (version 2)
by Dave Higton
This patch provides a partial fix for bug 2368.
The second image in the cited URL is CMY, and the libraries fail to
convert it. The resulting bitmap is null. It is rendered as a
pink rectangle. If the user tries to export it as a sprite,
riscos_bitmap_save() is called, which immediately attempts a null
dereference, causing a crash (when I tried it, it was a serious
crash that brought the whole machine down).
The simple fix is to test for a null bitmap and, if so, warn the
user and go no further.
This version has support for internationalisation of the error
message, and I've supplied messages in the three languages I can
muster.
Longer term of course we should enhance the libraries so that the
conversion does not fail.
Dave
____________________________________________________________
Can't remember your password? Do you need a strong and secure password?
Use Password manager! It stores your passwords & protects your account.
Check it out at http://mysecurelogon.com/password-manager
7 years, 7 months
Re: Netsurf Ported to iPhone and iPad - Distribution Available
by Rob Kendrick
On Thu, Oct 29, 2015 at 05:49:29PM +1100, Chris Kohlhepp wrote:
> To whom it may concern,
>
> I noticed you have a ports and availability section at
>
> http://www.netsurf-browser.org/about/
>
> and I wanted to advise that I have ported Netsurf to iOS for iPhone
> and iPad.
>
> It's available under the QMole desktop system for iOS and can be
> installed by users using Cydia.
>
> If you are curious, below is a screenshot
>
> Netsurf
>
> Netsurf can be installed onto an iPhone as shown below.
>
> Install
>
> If you are interested, there is a Facebook page at
>
> https://web.facebook.com/qmolelinux
Shiny. If you've had to make any modifications to the sources to do
this, we'd be interested in reviewing the patches for possible
inclusion. Also, please note that the S in NetSurf is capitalised :)
B.
7 years, 7 months
Patch: Partial fix for bug 2368
by Dave Higton
This patch provides a partial fix for bug 2368.
The second image in the cited URL is CMY, and the libraries fail to
convert it. The resulting bitmap is null. It is rendered as a
pink rectangle. If the user tries to export it as a sprite,
riscos_bitmap_save() is called, which immediately attempts a null
dereference, causing a crash (when I tried it, it was a serious
crash that brought the whole machine down).
The simple fix is to test for a null bitmap and, if so, warn the
user and go no further.
Longer term of course we should enhance the libraries so that the
coversion does not fail.
Dave
diff --git a/riscos/bitmap.c b/riscos/bitmap.c
index 384895d..38d69f4 100644
--- a/riscos/bitmap.c
+++ b/riscos/bitmap.c
@@ -272,6 +272,11 @@ bool riscos_bitmap_save(void *vbitmap, const char *path, unsigned flags)
struct bitmap *bitmap = (struct bitmap *) vbitmap;
os_error *error;
+ if (bitmap == NULL)
+ {
+ warn_user("SaveError", "Object is null");
+ return false;
+ }
if (!bitmap->sprite_area) {
riscos_bitmap_get_buffer(bitmap);
}
____________________________________________________________
Can't remember your password? Do you need a strong and secure password?
Use Password manager! It stores your passwords & protects your account.
Check it out at http://mysecurelogon.com/password-manager
7 years, 7 months
Patch to fix Delete menu entries
by Dave Higton
The RISC OS key that deletes entries from e.g. the hotlist and the
global history is Del(ete), not ^X as shown in the menus. ^X is
more associated with cut to clipboard, which the above mentioned
delete operations do not do, so it makes more sense to leave the
functionality as is, and modify the menu text to match the key.
NB It seems that NL keyboards are rare things; Netherlanders are
more likely to use an English keyboard (US or UK), so Del is the
correct choice for the majority in NL.
Dave
diff --git a/resources/FatMessages b/resources/FatMessages
index e7e130a..d5592f9 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -535,11 +535,11 @@ de.ro.Launch:Ãffnen RETURN
fr.ro.Launch:Lancer RETURN
it.ro.Launch:Avvia INVIO
nl.ro.Launch:Open RETURN
-en.ro.Delete:Delete ^X
-de.ro.Delete:Löschen ^X
-fr.ro.Delete:Supprimer ^X
-it.ro.Delete:Cancella ^X
-nl.ro.Delete:Verwijder ^X
+en.ro.Delete:Delete Del
+de.ro.Delete:Löschen Entf
+fr.ro.Delete:Supprimer Suppr
+it.ro.Delete:Cancella Canc
+nl.ro.Delete:Verwijder Del
en.all.ResetUsage:Reset statistics
de.all.ResetUsage:Statistik zurücksetzen
fr.all.ResetUsage:RAZ des statistiques
____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at http://www.inbox.com/earth
7 years, 7 months
Patch to fix null dereference in document.writeln()
by Dave Higton
The fix recently applied to document.write() also needs to be applied
to document.writeln() This prevents a null pointer dereference.
Dave
diff --git a/javascript/duktape/Document.bnd b/javascript/duktape/Document.bnd
index 8b39ae4..1e7c49d 100644
--- a/javascript/duktape/Document.bnd
+++ b/javascript/duktape/Document.bnd
@@ -65,7 +65,9 @@ method Document::writeln()
err = dom_node_get_user_data(priv->parent.node,
corestring_dom___ns_key_html_content_data,
&htmlc);
- if (err == DOM_NO_ERR && htmlc->parser != NULL) {
+ if ((err == DOM_NO_ERR) &&
+ (htmlc != NULL) &&
+ (htmlc->parser != NULL)) {
dom_hubbub_parser_insert_chunk(htmlc->parser, (uint8_t *)text, text_len);
dom_hubbub_parser_insert_chunk(htmlc->parser, (uint8_t *)nl, SLEN(nl));
}
____________________________________________________________
FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!
Check it out at http://www.inbox.com/marineaquarium
7 years, 7 months
Patch to make Javascript writeln() work (attempt 3)
by Dave Higton
This patch to Document/bnd makes the Javascript writeln() function
work as well as write(). This version inserts "\n", which seems
to be what the language requires. <br> was wrong.
It duplicates code from write(), but I'm really not keen on Daniel's
alternative suggestion. Sorry. (Re. the earlier thread: I think
it pays a third price, that of being less clear than duplicating
code.)
Hope this helps.
Dave
diff --git a/javascript/duktape/Document.bnd b/javascript/duktape/Document.bnd
index 6d11ea9..a97f30e 100644
--- a/javascript/duktape/Document.bnd
+++ b/javascript/duktape/Document.bnd
@@ -13,6 +13,7 @@ class Document {
#include "utils/corestrings.h"
#include "render/html_internal.h"
#include "utils/libdom.h"
+#include "utils/utils.h"
%};
}
@@ -37,6 +38,27 @@ method Document::write()
return 0;
%}
+method Document::writeln()
+%{
+ const char nl[] = "\n";
+ struct html_content *htmlc;
+ duk_size_t text_len;
+ for (int i = 0; i < duk_get_top(ctx); ++i)
+ duk_safe_to_string(ctx, i);
+ duk_concat(ctx, duk_get_top(ctx));
+ const char *text = duk_safe_to_lstring(ctx, 0, &text_len);
+ LOG("Writeln %*s", (int)text_len, text);
+ dom_exception err;
+ err = dom_node_get_user_data(priv->parent.node,
+ corestring_dom___ns_key_html_content_data,
+ &htmlc);
+ if (err == DOM_NO_ERR && htmlc->parser != NULL) {
+ dom_hubbub_parser_insert_chunk(htmlc->parser, (uint8_t *)text, text_len);
+ dom_hubbub_parser_insert_chunk(htmlc->parser, (uint8_t *)nl, SLEN(nl));
+ }
+ return 0;
+%}
+
method Document::createTextNode()
%{
dom_node *newnode;
____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at http://www.inbox.com/earth
7 years, 8 months