Re: HTML5 element support

2020-04-14 Thread Ewen Pring
Michael Drake  wrote on 14 Apr 2020:

> It looks like a problem with our Hubbub library. (The HTML5 spec
> has moved on a long way since it was written.)

Thanks for your help

>> If Netsurf is supposed to support HTML5 elements perhaps I should log this
>> as a bug on the tracker.

> Please do!

I have reported it. Wasn't sure what to put for 'severity', minor seems a 
bit too low but 'major' (which I plumped for) is probably too high, could 
have done with a 'moderate' option!


-- 
Ewen Pring, St. Albans, Herts
using RISC OS 5
https://timebus.co.uk/riscos/



Re: HTML5 element support

2020-04-14 Thread Michael Drake
On 14/04/2020 17:18, Ewen Pring wrote:

> At least some of my problem can be seen at these 2 simplified test pages:
> 
> https://timebus.co.uk/riscos/webtest/using-html4.htm
> https://timebus.co.uk/riscos/webtest/using-html5.htm

Those are great, thanks!

It looks like a problem with our Hubbub library. (The HTML5 spec
has moved on a long way since it was written.)

> If Netsurf is supposed to support HTML5 elements perhaps I should log this 
> as a bug on the tracker.

Please do!

Cheers,

-- 
Michael Drake https://www.codethink.co.uk/



Re: HTML5 element support

2020-04-14 Thread Ewen Pring
Hi,

Michael Drake  wrote on 14 Apr 2020:

> They work here.  What version of NetSurf are you running?

I was using the 3.9 release but following your prompt I downloaded the 
test build from yesterday, 3.10 build 5057, and the problem remains.

At least some of my problem can be seen at these 2 simplified test pages:

https://timebus.co.uk/riscos/webtest/using-html4.htm
https://timebus.co.uk/riscos/webtest/using-html5.htm

There are 3 images with captions, separated by 2 horizontal rules for 
clarity. The idea (of using inline-block CSS property) is the captions 
display to the right of the images if your browser window is wide enough, 
otherwise underneath.

The HTML4 one works as I expect, the HTML5 one makes a mess in NetSurf; 
the display nests the elements in a cascade. It's almost like NetSurf 
fails to recognise the closing figcaption tags.

The only structural difference is that the HTML4 one uses all DIVs, 
whereas the HTML5 one uses figure and figcaption elements.

The figure is bordered red, the figcaption is bordered blue.

The HTML4 page has no errors at https://validator.w3.org/
The HTML5 page has no errors at https://validator.w3.org/nu/

Both pages use the same CSS file, which is as follows:

.figure {
 margin-bottom: 20px;
 border-color: red;
 border-style: solid;
}

.figcaption {
 display: inline-block;
 border-color: blue;
 border-style: dotted;

}

.img {
 width: 100px;
 display: inline-block;
}

If Netsurf is supposed to support HTML5 elements perhaps I should log this 
as a bug on the tracker. The development progress page says HTML5 support 
is "just started".

Best regards
Ewen

-- 
Ewen Pring, St. Albans, Herts
using RISC OS 5
https://timebus.co.uk/riscos/



Re: HTML5 element support

2020-04-14 Thread Michael Drake
On 14/04/2020 13:39, Ewen Pring wrote:

> Specifically, my web site has over 60 pages that use the HTML5 figure and 
> figcaption elements to contain content (images and their captions 
> alongside). Netsurf doesn't recognise these and doesn't act upon styles 
> applied to them in CSS. The page renders as if they were not there.

They work here.  What version of NetSurf are you running?

-- 
Michael Drake https://www.codethink.co.uk/



HTML5 element support

2020-04-14 Thread Ewen Pring
I'd like to make a feature request. The Netsurf documentation says to post 
it on this list rather than using the bug reporting system.

The Netsurf progress page says an HTML5 parser is being in the process of 
development; that's good but HTML5 has been used for 6 years now and what 
seems to me (if I'm right) a minor change might allow the existing engine 
to display HTML5 as it was intended, even if it doesn't 'understand' the 
concept of some of the new elements/structures.

Specifically, my web site has over 60 pages that use the HTML5 figure and 
figcaption elements to contain content (images and their captions 
alongside). Netsurf doesn't recognise these and doesn't act upon styles 
applied to them in CSS. The page renders as if they were not there. But 
I've set properties such as making them inline-blocks with vertical 
centering next to each other, OK on Chrome/Firefox but none of this works 
in Netsurf whose display output is ruined in a cascade of incorrectly 
positioned elements.

It seems to me that if the figure and figcaption elements were simply 
considered as being div elements, the display would work as intended.

At present the only way I could get around the issue is to wrap the HTML5 
elements in a div, and apply the styles to the div and not the HTML5 
element.

OK ideally the new elements should have default styles (for example 
Firefox puts a 16 pixel top/bottom and 40 pixel left/right margin on the 
figure element, whereas a normal div has none) but that doesn't matter 
much as if Netsurf supported styles on HTML5 elements, I would be able to 
set all those things manually.

Whilst I've only tested this on figure and figcaption, other HTML5 
elements like aside, nav, footer are also I suppose in the same boat.

Best regards
Ewen Pring

-- 
Ewen Pring, St. Albans, Herts
using RISC OS 5
https://timebus.co.uk/riscos/