10 ms·
I love the comment from the OP, saying he's "figured out how it happens", and it turns out the R and B color components are swapped for some rotational angles.
by unwind 10y ago
I love the comment from the OP, saying he's "figured out how it happens", and it turns out the R and B color components are swapped for some rotational angles.
That's clearly explained, then. :)
I don't suppose Safari has a public bug tracker? This sounds like such an awesome "WTF" it'd be fun to read the developers' take. :)
- Manishearth 10y agoProbably just https://bugs.webkit.org/ https://bugs.webkit.org/ ? This sounds like something that WebKit handles.
- unwind 10y agoRight, thanks. I did a quick search but that didn't turn up anything. I'll add the link to the SO question.
- caiob 10y agoSafari has indeed a public bug tracker. https://bugs.webkit.org https://bugs.webkit.org
- rangibaby 10y agoIt reminds me of a bug in Firefox nightly a few years ago where RGB colors were read as BGR for the OSX traffic lights. They were pretty but it was quite disconcerting lol
- einaregilsson 10y agoOP here. "How it happens" is not "why it happens". The svg renderer is switching the values of R and B, that's why it turns blue instead of some other color. Why the renderer does that, I have no idea :)
- nathan-wall 10y agoSo #ff0000 becomes #0000ff. What about #f00000? Does it become #00000f or #0000f0? Does #00f000 stay the same or become a darker green? Sorry, I would check myself, but am on Linux and don't have access to Safari 10.
- glippiglop 10y agoHere's a best guess based on my knowledge of actually having written a SVG rendering pipeline: The R and B colour switch in conjunction with the fact that this problem only occurs at non-right angles would indicate that there's a bug in the rendering pipeline that is triggered under specific conditions. Specifically if the transform is at a right angle, then an optimal transform algorithm will be used that processes colours in RGBA format. For all other angles a slower (but prettier) transform pipeline will be used that results in the colour being incorrectly processed in BGRA format. An easy way to test this theory is to set the problem colour to bright green, in which case the bug shouldn't be apparent. SVG rendering pipelines are really complicated. The quest for optimisation leads to rendering code that has many paths for all the different scenarios. The consequence is that odd bugs for certain conditions are more likely to creep into the code base if you're not careful.