Error at launch
by François Revol
hi,
last changes seem to have broken NS.
On launch it pops up an "unknown" error.
I traced it to render/html.c:2067 and a mismatched return type, but
there seem to be more to it. The patch below fixes those I found.
François.
diff --git a/render/html.c b/render/html.c
index b5896e1..ededb4c 100644
--- a/render/html.c
+++ b/render/html.c
@@ -1096,7 +1096,7 @@ static bool html_meta_refresh(html_content *c,
dom_node *head)
} else if (dom_string_caseless_lwc_isequal(name,
corestring_lwc_meta)) {
if (html_meta_refresh_process_element(c,
- n) == false) {
+ n) != NSERROR_OK) {
/* Some error occurred */
dom_string_unref(name);
dom_node_unref(n);
@@ -2063,9 +2063,8 @@ html_begin_conversion(html_content *htmlc)
}
/* handle meta refresh */
- ns_error = html_meta_refresh(htmlc, head);
- if (ns_error != NSERROR_OK) {
- content_broadcast_errorcode(&htmlc->base, ns_error);
+ if (html_meta_refresh(htmlc, head) != false) {
+ content_broadcast_errorcode(&htmlc->base, NSERROR_UNKNOWN);
dom_node_unref(html);
dom_node_unref(head);
10 years, 10 months
Re: netsurf: branch chris/frame-scroll updated. 9a1a1209be4461eb3b7ff40eed23aa35ab0c54e2
by John Tytgat
In message <E1TZm2Z-0007FO-3T(a)flounder.pepperfish.net> you wrote:
> Gitweb links:
>
> ...log http://git.netsurf-browser.org/netsurf.git/shortlog/9a1a1209be4461eb3b7ff...
> ...commit http://git.netsurf-browser.org/netsurf.git/commit/9a1a1209be4461eb3b7ff40...
> ...tree http://git.netsurf-browser.org/netsurf.git/tree/9a1a1209be4461eb3b7ff40ee...
>
> The branch, chris/frame-scroll has been updated
> via 9a1a1209be4461eb3b7ff40eed23aa35ab0c54e2 (commit)
> via 61241b731c4d92ed2dc77beb262645cea1593fdb (commit)
> via bb260da36e2408421c548f93cbfd28fc0052f50f (commit)
> via 64226af7488440725041e2ab1034cc735f16bb21 (commit)
> via e310dac092797fa34008fea203a07291f5838ba1 (commit)
> via 6589c7cc196863d0d0694d6bd14c39386b27ae81 (commit)
> via 82cae102843de3f9d638648556592cf9d09c9638 (commit)
> via e36b8f657997ffca3d1cc1fe1a7130854d247262 (commit)
> via c5fb16d56df03580d99fae44d9fea44868f33cc5 (commit)
> via d1a5c738e62a9f0cb85658b435eefa8749006edc (commit)
> from 78e460e4bdfdfb1daed9a9549381f3e742ba4786 (commit)
>
> Those revisions listed above that are new to this repository have
> not appeared on any other notification email; so we list those
> revisions in full, below.
>
> - Log -----------------------------------------------------------------
> commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/9a1a1209be4461eb3b7...
> commit 9a1a1209be4461eb3b7ff40eed23aa35ab0c54e2
> Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
> Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
>
> debug
>
> [...]
> -/* Menu event handlers: */
> -static void __CDECL menu_about(WINDOW *win, int item, int title, void *data)
> +static void __CDECL menu_about(short item, short title, void *data)
> {
> LOG(("%s", __FUNCTION__));
> char buf[PATH_MAX];
> strcpy((char*)&buf, "file://");
Why not simply: strcpy(buf, "file://") ?
> - strncat((char*)&buf, (char*)"./doc/README.TXT", PATH_MAX - (strlen("file://")+1) );
> + strncat((char*)&buf, (char*)"./doc/README.TXT",
Why you need a char * cast of a const string ? We have
"char *strncat(char *, const char *, size_t)" so there is no need for
the 2nd char * cast.
> + PATH_MAX - (strlen("file://")+1) );
> browser_window_create((char*)&buf, 0, 0, true, false);
But more importantly, why not a simple
browser_window_create("file://./doc/README.TXT", 0, 0, true, false); ?
John.
--
John Tytgat
joty(a)netsurf-browser.org
10 years, 10 months
Getting svn branches back from oblivion
by François Revol
Hi there,
I was wondering which was the best way to get back an old branch from
svn into a usable git branch... (namely the gopher one)
I was thinking either:
- make patches manually from svn and apply this to a git checkout from
the base rev, then rebase and push to the public repos,
- or create a repos using git-svn, add it as a remote, cherry pick the
commits into a branch from the base commit from master, rebase it, and
push it public.
Anyone already tried one of those approaches, or another one ?
François.
10 years, 10 months
Re: libsvgtiny
by Rob Kendrick
On Tue, Nov 13, 2012 at 09:10:18AM +0100, Jens Staal wrote:
> Hi
>
> I have two questions about libsvgtiny. I am packaging stuff for an
> expermental Linux distribution based on Busybox and musl libc (sabotage).
Hi there. These questions are best asked on the development mailing
list. I have CCed it.
> 1) are there any snapshot archives available? The upstream github
> repository for Sabotage got a general guideline that every package should
> be a fixed version or snapshot and downloadable over http.
No. Snapshots are almost always broken and we don't support them. If
your distributions rules prohibit you from using a git checkout pinned
to a specific revision, but allow a tarball of that revision, I'd
suggest your distribution's processes are broken :)
You are of course at liberty to checkout a specific revision, and then
tar that up yourself.
> 2) can libsvgtiny be used as a drop-in replacement for librsvg? I found
> librsvg to have a crazy number of dependencies and the only thing I would
> need it for is to enable svg support in the EFL/E17 libraries which are
> supposed to be light-weight.
No. libsvgtiny parses a subset of SVG and creates a list of
instructions for what to draw. It does no rendering itself. It depends
on some of the other libraries in the NetSurf suite, but none are that
large.
B.
10 years, 10 months
Embedded SVGs
by Chris Young
Is there any reason why embedded/inline SVGs don't display? Here on
the below link, all I can see is the "iframe" SVG briefly flash on
screen. Showing the SVGs outside of the page is fine.
http://www.schepers.cc/svg/blendups/embedding.html
I would expect the "img" version to work at a minimum. Is this
working on other platforms? (I don't have anything else set up to test
at the mo) If I render direct to screen I can see NetSurf draw them
and then appear overwrite them with blank space.
Chris
10 years, 10 months
Re: netsurf: branch master updated. 617d655c7bbcccd5168514c9d29e5b329eec63d4
by Chris Young
> + document = domutils_parse_file(filename, "iso-8859-1");
> + if (document == NULL) {
> + warn_user("TreeLoadError", messages_get("ParsingFail"));
> return false;
> }
It has been reported to me that the above error is getting triggered
on first run (ie. when Hotlist file does not exist).
The attached patch fixes this.
Chris
10 years, 10 months
Plain text copy bug
by Chris Young
NetSurf does not seem to be respecting the end point of a selection,
if you copy to the clipboard from a _plain text_ document.
eg.
* Visit about:Choices
* Highlight a few characters near the top
* Copy to the clipboard
* Paste into a text editor
The result is everything from the start of the selection down to the
end of the page (and possibly beyond the end of the page, I'm
certainly getting some garbage past the last text on the page in my
paste here), rather than just the highlighted section.
Within HTML documents it works as expected.
Chris
10 years, 10 months
Re: Spidermonkey 1.7 support
by Chris Young
On Fri, 09 Nov 2012 01:15:43 +0100, Ole wrote:
> the master now works ok with spidermonkey 1.7 on the first impression.
>
> However, the wikipedia example/test doesn't work - no output is shown
> on the page, and also
> no exception or assert is shown.
It seems to work here. I get the following output:
| LCMCalculator: a = 28, b = 56, gcd = 28, lcm = 56LCMCalculator: a =
| 21, b = 56, gcd = 7, lcm = 168LCMCalculator: a = 25, b = 55, gcd =
| 5, lcm = 275LCMCalculator: a = 22, b = 58, gcd = 2, lcm = 638
It didn't work the first time I opened it though - I forced the
MimeType to text/javascript and it has been ok since. Probably it's
being picked up as text/plain by NetSurf and thus not getting
executed.
I'd like to extend some thanks to Vince for his hard work on this.
Chris
10 years, 10 months
Spidermonkey 1.7 support
by Ole
Hello,
the master now works ok with spidermonkey 1.7 on the first impression.
However, the wikipedia example/test doesn't work - no output is shown
on the page, and also
no exception or assert is shown.
I tested document.appendChild(document.createTextNode()) which works
well.
document.appendChild(document.createElement('br')), fails with an
javascript assert in an simple html page.
so far and thanks for the work on javascript embedding.
Greets,
Ole
10 years, 10 months