libcss: go through a list of styles
by Rüdiger Rill
Hi!
I'm new to libcss and would like to ask for your help.
I'm creating an app (cocoa) that will render an html page in a view. The
html-file has a corresponding css-file which looks like this:
body
{
padding: 3%;
text-align: justify;
font-family: "MinionPro";
}
@font-face {
font-family: "MinionPro";
font-weight: normal;
font-style: normal;
src: url('../font/MinionPro-Regular.otf');
}
.noindent
{
margin-left: 13.5%;
margin-right: 5%;
text-indent: 0%;
margin-top: 0%;
margin-bottom: 0%;
font-size: 100%;
text-align: justify;
}
.line
{
margin-left: 5%;
margin-right: 5%;
text-indent: 0%;
margin-top: 0%;
border: solid 4px;
color: #B3B3B3;
margin-bottom: 10%;
font-size: 100%;
text-align: justify;
}
What I would like to do, is go through a list of styles and store the
information in my own data structure (NSDictionary) for easy lookup (since
I'm using cocoa anyway).
I searched the headers and the net but found no way to go through a list
(linked list, whatever) to get the properties off all styles, one after
one, without knowing their names.
Is there such a way? Or do I have to parse the html, get the names and then
look everything up via css_select?
In advance, thank you for your help.
Ruediger Rill
10 years, 10 months
NetSurf developer weekend
by Vincent Sanders
The next NetSurf Developer weekend will be taking place between 2nd
and 4th November in Cambridge, UK.
The rough plan is to arrive in Cambridge on Friday afternoon/evening
meet at the venue possibly have a social meetup. Return to the meeting
rooms on Saturday and Sunday and work on NetSurf with food and snack
breaks as required.
Collabora are going to sponsor the event by providing access to their
conference rooms.
The address of the location is:
Kett House
Station Rd
Cambridge CB1 2JH
United Kingdom
Google maps ref http://goo.gl/maps/F1CG and the location is very close
to the railway station.
For building security purposes all physical attendees *must* register
(send me an email at least a week before the event) with Name, email
and contact details.
Already Registered are:
John-Mark Bell
Daniel Silverstone
Rob Kendrick
Vincent Sanders
Assistance with accommodation is available and I have a vehicle for
collecting and dropping people off from wherever they are
staying. There are a limited number of parking spaces available at
Kett house if necessary.
If you would like to join us for what is usually a very productive and
enjoyable weekend please let me know as soon as you can.
--
Regards Vincent
10 years, 11 months
libhubbub parse error on google homepage
by Dean Mao
I'm trying out the hubbub parser and I gave it a test run on the google
homepage's html, but it thinks a piece of javascript as the beginning
script tag. I used the tokeniser.c in the test directory to test it out.
Here's the relevant output:
CHARACTERS: '&'
CHARACTERS: 'd!=this;d=d.parentNode){var E=d,u,e=E;u=a;var
v=e.__jsaction;if(!v){var v=e.__jsaction={},l=f;"getAttribute"in e'
CHARACTERS: '&'
CHARACTERS: '&'
CHARACTERS: '(l=e.getAttribute("jsaction"));if(e=l)for(var
e=e.split(p),l=0,n=e?e.length:0;l'
START TAG: 'n;l++){var' attributes:
'j' = 'e[l];if(j){var'
'g' =
'j.indexOf(":"),m=-1!=g,w=m?j.substr(0,g).replace(/^\s+/,"").replace(/\s+$/,""):"click",j=m?j.substr(g+1).replace(/^\s+/,"").replace(/\s+$/,""):j;v[w]=j}}}if(u=v[u]){a={eventType:a,event:b,targetElement:t,action:u,actionElement:E};break'
'a}}a' =
'f}a&&(b.stopPropagation?b.stopPropagation():b.cancelBubble=!0,"A"==a.actionElement.tagName&&"click"==h&&(b.preventDefault?b.preventDefault():b.returnValue=!1),c.d?c.d(a):(t=a,b=(d=i.document)&&!d.createEvent&&d.createEventObject?d.createEventObject(b):b,t.event=b,c.c.push(a)))};var'
'g;g' = 'function(b){var'
'a' =
'h,c=n,d=!1;if(b.addEventListener){if("focus"==a||"blur"==a)d=!0;b.addEventListener(a,c,d)}else'
'if(b.attachevent){"focus"' =
'=a?a="focusin":"blur"==a&&(a="focusout");var'
Essentially there's some javascript in there that looks like this:
for(var e=e.split(p),l=0,n=e?e.length:0;l<n;l++){var j=e[l];if(j){var
g=j.indexOf(":"),m=-1!=g,w=m?j.substr(0,g).replace(/^\s+/,"").replace(/\s+$/,""):"click",j=m?j.substr(g+1).replace(/^\s+/,"").replace(/\s+$/,""):j;v[w]=j}}}if(u=v[u]){a={eventType:a,event:b,targetElement:t,action:u,actionElement:E};break
And it thinks that this is the beginning of an html tag: <n;l++) -- it's
a comparison statement inside the for-loop.
Any clues where I might start looking to see why this might be?
10 years, 11 months
Re: Request for feedback
by Chris Young
Moving this to the dev list since it's only us discussing this :)
On Sat, 13 Oct 2012 14:33:21 +0100, Michael Drake wrote:
> > > > > The above site freezes NetSurf as it fetches/displays. I can't
> > > > > reproduce on the same Windows auto-build and have no way of
> > > > > testing on any of the other builds currently.
>
> > It does appear to be CI- related, as my own build from git is perfectly
> > happy on that page.
>
> How about build #446? GCC and various libs updated.
No, same :(
The other difference between the builds is that I always link against
Cairo, but the cross-compilation rules aren't set up for that.
I'll try adding them and see what happens. I have a feeling it will
build OK but won't run, as our version of Cairo needs libpng 1.2 and
CI is likely to (statically) link a different version.
It would actually be quite useful for CI to build both versions, as
the existing one works on OS 4.0 and the Cairo build doesn't.
Chris
10 years, 11 months
Problem in new libnsfb NSFB_FMT_XBGR8888 code and files to show how it is possible to work
by Bernd Roesch
Hi
thanks that there is now support for Big endian BGRA graphic (which amigaos 3 use)
http://source.netsurf-browser.org/?p=libnsfb.git;a=commit;h=480b2353d8155...
but it do not work. there need more places change and 16 bit is not support.
I attach 2 files ( 16 and 32 bit) of long time working Big Endian and BGRA graphic Card (PC Mode) on
amigaos . You can find all places that need change when you search for
#ifdef __BIG_ENDIAN_BGRA__
So you see there need more code in the plotters change.
Maybe somebody with more knowledge can add this to offical libnsfb, we can test and when there are
only a few fixes to do, i can do it too. But currently it need change much, to support the many
functions with diffrent code correct.
Bye
10 years, 11 months
dependency issue
by magicbane
Hi All,
I noticed that we have merged the source into one git repo, which is great
in a sense that it's a lot cleaner.
However, I cannot build netsurf now due to lacking the libnsbmp package. I
cannot find it within the fedora repo.
Does anyone know if the dependency lies within some other fedora package?
Or is there any workaround?
10 years, 11 months
Text box redraws
by Peter Slegg
Hi all,
I am using 2.9 on a 68060 Atari clone (Milan) and it is starting to
become my default browser.
I have noticed that when typing into a text box, Netsurf redraws all
of the text with each key press. On fast machines you probably
don't notice but it does slow things down quite a bit on the Milan.
Would it be possible to just render the latest character or the
current line ? Obviously once input reaches the right margin and the
box has to be scrolled horizontally it must redraw all the text
but that could also be made more slick by moving the text across by
more than one char, reducing redraws.
Also, after the first 5-7 characters there is a pause before any more
input is accepted. I have seen this a few times but will keep an eye
on it to see if it is a regular occurrence.
Cheers,
Peter
10 years, 11 months
m68k mint toolchain and coldfire
by Ole
Hello all,
recently there were some IRC discussion about addiing coldfire build to
the autobuilder.
I asked for it... but quickly it became obvious that it's not so easy
to add, AFAIK because
the coldfire build uses the same compiler as the m68k build does.
I talked to vincent and here is his response to my email:
-------- Original Message --------
Subject: Re: m68k mint toolchain and coldfire...
Date: Wed, 10 Oct 2012 23:48:29 +0200
From: Vincent Rivière <vincent.riviere(a)freesbee.fr>
To: ole(a)monochrom.net
Hello, Ole.
I have finally carefully read all your emails about the Netsurf build
system.
If I understood correctly, the build system now automatically builds
the -m68020-60 NetSurf binary, right? That's very fine.
So the last remaining question is how to build the ColdFire binary?
> They say that either gcc or maybe especially the m68k toolchain do
> ugly hacking
> to implement something which should be really coldfire-mint-atari.
> It's
> about the fact that gcc implements a completly different ISA with the
> tuning
> flags... and it's about multilibs in /lib/m5475 /lib/m68020-60 etc...
As I seen on the ACP forum, the NetSurf people just dislikes the
multilib mechanism? They can, but unfortunately for them this is the
official GCC mechanism to support different CPU variants. It is the case
for m68k (many 680x0 and ColdFire variants), but also for Intel
processors in order to support 32/64bit compilation.
So they should just add an option in their build system to pass an
additional flag to GCC such as -mcpu=5475. That should not be
complicated...
> They say, they can not build the netsurf SDK for different Arch, with
> a
> cross-compiler toolchain which already
> has a name which is taken by another toolchain. They need a different
> host
> triplet in that case...
If their build system is so limited, you can just use the following
bash script. Name it m5475-atari-mint-gcc and add the x flag.
#!/bin/bash
exec m68k-atari-mint-gcc -mcpu=5475 "$@"
Tada, m5475-atari-mint-gcc is a ColdFire compiler.
Easy, isn't it ?
Beware, to use the right ColdFire libs, gcc must have been compiled
with multilib support, as I usually do. With the all the ColdFire libs
in the right places.
> Would you like to talk to the netsurf developers about this? You
> could talk
> to them via IRC or via the Mailing list...
Sure. But I just hate Internet chat.
I can register to the mailing list if you like, if this can improve the
situation. No trouble.
Vincent
--
---
10 years, 11 months