removed obsolete blurred shadow support check

pull/95/head
jmoenig 2020-02-20 18:14:29 +01:00
rodzic ec20db9ec9
commit 9a3d216002
1 zmienionych plików z 1 dodań i 24 usunięć

Wyświetl plik

@ -1180,7 +1180,7 @@
var morphicVersion = '2020-February-20';
var modules = {}; // keep track of additional loaded modules
var useBlurredShadows = getBlurredShadowSupport(); // check for Chrome-bug
var useBlurredShadows = true;
const ZERO = new Point();
Object.freeze(ZERO);
@ -1407,29 +1407,6 @@ function getMinimumFontHeight() {
return 0;
}
function getBlurredShadowSupport() { // +++ review, take out
// check for Chrome issue 90001
// http://code.google.com/p/chromium/issues/detail?id=90001
var source, target, ctx;
source = document.createElement('canvas');
source.width = 10;
source.height = 10;
ctx = source.getContext('2d');
ctx.fillStyle = 'rgb(255, 0, 0)';
ctx.beginPath();
ctx.arc(5, 5, 5, 0, Math.PI * 2, true);
ctx.closePath();
ctx.fill();
target = document.createElement('canvas');
target.width = 10;
target.height = 10;
ctx = target.getContext('2d');
ctx.shadowBlur = 10;
ctx.shadowColor = 'rgba(0, 0, 255, 1)';
ctx.drawImage(source, 0, 0);
return ctx.getImageData(0, 0, 1, 1).data[3] ? true : false;
}
function getDocumentPositionOf(aDOMelement) {
// answer the absolute coordinates of a DOM element in the document
var pos, offsetParent;