llelectronics / webcat

WebCat is a Webkit based webbrowser for sailfish os
19 stars 13 forks source link

GitHub Rendering Issues #25

Closed Dax89 closed 8 years ago

Dax89 commented 8 years ago

I have noticed some differences in Webcat when GitHub is rendered.

GitHub now renders images as Vectorial ones which aren't supported by the QtWebKit out of the box and something is changed in menu management too, in fact Javascript complains about missing "WeakMap" type.

I have fixed those issue by adding two polyfills as userscripts: 1) CanVG (which renders SVG images inside a Canvas object): https://github.com/gabelerner/canvg/blob/master/canvg.min.js 2) ES6 Harmony Collections (which includes WeakMap among others JS types): https://github.com/WebReflection/es6-collections/blob/master/es6-collections.js

Info: https://github.com/Dax89/harbour-webpirate/blob/master/harbour-webpirate/qml/components/browsertab/webview/BrowserWebView.qml#L128

It fixes some rendering issues in other websites which uses vectorial images and ECMAScript 6 extensions.