roll back temporary rectangle filling workaround

for a bug in Chrome v57
upd4.2
Jens Mönig 2018-02-06 22:06:27 +01:00
rodzic 81bfa78a6f
commit 3763fc3423
2 zmienionych plików z 20 dodań i 30 usunięć

Wyświetl plik

@ -3810,8 +3810,6 @@ Fixes:
=== v4.1.0.5 maintenance release ===
*** in development ***
171201
------
* GUI: started development on v 4.1.1
@ -3891,7 +3889,6 @@ Fixes:
* Russian translation update, thanks, temap!
* release
=== v4.1.1 minor release ===
v4.1.1 New Features:
@ -3922,7 +3919,6 @@ Notable Fixes:
* when deleting a temporary clone, detach all its parts and delete the temporary ones
* new release protocol to avoid browser caching related version conflicts
Translation Updates:
* German
* Greek
@ -3930,3 +3926,21 @@ Translation Updates:
* Chinese
* Spanish
* Russian
*** in development ***
180206
------
* GUI: start developing v4.1.2
* Morphic: roll back temporary rectangle filling workaround for a bug in Chrome v57
=== v4.1.2 features ===
v4.1.2 New Features:
Notable Changes:
Notable Fixes:
Translation Updates:

Wyświetl plik

@ -1163,7 +1163,7 @@
/*global window, HTMLCanvasElement, FileReader, Audio, FileList*/
var morphicVersion = '2018-January-25';
var morphicVersion = '2018-February-06';
var modules = {}; // keep track of additional loaded modules
var useBlurredShadows = getBlurredShadowSupport(); // check for Chrome-bug
@ -3251,31 +3251,7 @@ Morph.prototype.drawNew = function () {
this.image = newCanvas(this.extent());
var context = this.image.getContext('2d');
context.fillStyle = this.color.toString();
/*
Chrome issue:
when filling a rectangular area, versions of Chrome beginning with
57.0.2987.133 start introducing vertical transparent stripes
to the right of the rectangle.
The following code replaces the original fillRect() call with
an explicit almost-rectangular path that miraculously makes
sure the whole rectangle gets filled correctly.
Important: This needs to be monitored in the future so we can
revert to sane code once this Chrome issue has been resolved again.
*/
// context.fillRect(0, 0, this.width(), this.height()); // taken out
context.beginPath();
context.moveTo(0, 0);
context.lineTo(this.image.width, 0);
context.lineTo(this.image.width, this.image.height);
context.lineTo(0, this.image.height + 0.0001); // yeah, I luv Chrome!
context.closePath();
context.fill();
context.fillRect(0, 0, this.width(), this.height());
if (this.cachedTexture) {
this.drawCachedTexture();
} else if (this.texture) {