diff -r 000000000000 -r 6474c204b198 browser/metro/base/content/bindings/circularprogress.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/browser/metro/base/content/bindings/circularprogress.xml Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + document.getAnonymousElementByAttribute(this, "anonid", "progressRing"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "progressNotification"); + + null + null + + + + + + + { + this.updateProgress(this.getAttribute("progress")) + } + this._img.src = PROGRESS_RING_IMG; + } + else if (this._img.complete) { + let ctx = this._progressCircleCtx; + ctx.clearRect(0, 0, + this._progressCanvas.width, this._progressCanvas.height); + + // Save the state, so we can undo the clipping + ctx.save(); + + ctx.beginPath(); + let center = this._progressCanvas.width / 2; + ctx.arc(center, center, center, startAngle, endAngle, false); + ctx.lineTo(center, center); + ctx.closePath(); + ctx.clip(); + + // Draw circle image. + ctx.translate(center, center); + ctx.rotate(endAngle); + ctx.drawImage(this._img, -center, -center); + + ctx.restore(); + } else { + // Image is still loading + } + return [startAngle, endAngle]; + ]]> + + + + + {}; + } + this._progressCircleCtx.clearRect(0, 0, + this._progressCanvas.width, this._progressCanvas.height); + this.removeAttribute("progress"); + ]]> + + + + + + + + + + + + + + +