Pale Moon - Not Rendering SVG Patterns Correctly

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
own3mall
Apollo supporter
Apollo supporter
Posts: 41
Joined: 2014-10-22, 00:32
Location: USA

Pale Moon - Not Rendering SVG Patterns Correctly

Unread post by own3mall » 2017-08-03, 21:49

Hi All,

I've noticed that Pale Moon (latest version 27.4.0) does NOT correctly render or support SVG patterns.

In the latest version of Pale Moon, the below graph doesn't render properly:

http://dojo.telerik.com/UyiwO/10

In Firefox and Chrome, it does render correctly.

GMforker

Re: Pale Moon - Not Rendering SVG Patterns Correctly

Unread post by GMforker » 2017-08-04, 04:33

Throws an error in Browser Console:

Code: Select all

Security Error: Content at http://runner.telerik.io/result may not load data from http://demos.telerik.com/kendo-ui/line-charts/multiple-axes.
See:
bug #1302779
(an example (also): https://bugzilla.mozilla.org/attachment.cgi?id=8791278)
bug #652991

AFAIK: The implementation is not easy.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35602
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Pale Moon - Not Rendering SVG Patterns Correctly

Unread post by Moonchild » 2017-08-04, 12:05

The problem isn't in SVG pattern rendering, but rather in where the pattern is sourced from.
SVG images are basically XML, so they have to be treated with due care (similar to HTML documents) because we don't want to violate SameOrigin or other security policies. Mixing in-line with external SVG code is always problematic as a result. Rule of thumb for SVG is therefore to keep everything local/in-line or at least from the same host.

Looking at the referenced bugs, working around this (and "this" being someone taking exact Chrome behavior and just making it, word-for-word, part of the spec, catering it to "reference" Chrome, instead of actually writing something sane) is complex. It will likely not make it into our current rendition of Goanna, unless someone who has the expertise really wants to make a solid, acceptable solution for it.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

own3mall
Apollo supporter
Apollo supporter
Posts: 41
Joined: 2014-10-22, 00:32
Location: USA

Re: Pale Moon - Not Rendering SVG Patterns Correctly

Unread post by own3mall » 2017-08-04, 13:58

This sample is using inline SVG patterns though from the same origin (AFAIK), so I'm confused by the responses. Will read the bug reports posted in more detail shortly, but from my initial glance, they didn't even seem related.

GMforker

Re: Pale Moon - Not Rendering SVG Patterns Correctly

Unread post by GMforker » 2017-08-04, 14:22

It already works.
Because it was modified (http://dojo.telerik.com/UyiwO/13 and http://dojo.telerik.com/UyiwO/14):

Code: Select all

<base href="http://demos.telerik.com/kendo-ui/line-charts/multiple-axes">
[/s]

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35602
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Pale Moon - Not Rendering SVG Patterns Correctly

Unread post by Moonchild » 2017-08-04, 14:23

No, it isn't using the same host. See the quotes error from the console.
Because of the way this particular fiddler works Because a <base> was specified in the edited version, the code is on runner.telerik.io and the linked code is on demos.telerik.com -- and that gets blocked.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

own3mall
Apollo supporter
Apollo supporter
Posts: 41
Joined: 2014-10-22, 00:32
Location: USA

Re: Pale Moon - Not Rendering SVG Patterns Correctly

Unread post by own3mall » 2017-08-04, 15:39

Oh, I didn't realize that their dojo automatically threw in that stupid <base> element anyways.

Looks like it works fine in PM then.

Locked