src/vs/editor/browser/viewParts/blockDecorations/blockDecorations.ts/BlockDecorations/render
class BlockDecorations:	public render(ctx: RestrictedRenderingContext): void {
		let count = 0;
		const decorations = ctx.getDecorationsInViewport();
		for (const decoration of decorations) {
			if (!decoration.options.blockClassName) {
				continue;
			}

			let block = this.blocks[count];
			if (!block) {
				block = this.blocks[count] = createFastDomNode(document.createElement('div'));
				this.domNode.appendChild(block);
			}

			let top: number;
			let bottom: number;

			if (decoration.options.blockIsAfterEnd) {
				// range must be empty
				top = ctx.getVerticalOffsetAfterLineNumber(decoration.range.endLineNumber, false);
				bottom = ctx.getVerticalOffsetAfterLineNumber(decoration.range.endLineNumber, true);
			} else {
				top = ctx.getVerticalOffsetForLineNumber(decoration.range.startLineNumber, true);
				bottom = decoration.range.isEmpty()
					? ctx.getVerticalOffsetForLineNumber(decoration.range.startLineNumber, false)
					: ctx.getVerticalOffsetAfterLineNumber(decoration.range.endLineNumber, true);
			}

			block.setClassName('blockDecorations-block ' + decoration.options.blockClassName);
			block.setLeft(ctx.scrollLeft);
			block.setWidth(this.contentWidth);
			block.setTop(top);
			block.setHeight(bottom - top);

			count++;
		}

		for (let i = count; i < this.blocks.length; i++) {
			this.blocks[i].domNode.remove();
		}
		this.blocks.length = count;
	}