src/vs/workbench/browser/parts/editor/tabsTitleControl.ts/TabsTitleControl/layout
class TabsTitleControl:	layout(dimensions: ITitleControlDimensions, options?: ITabsTitleControlLayoutOtions): Dimension {

		// Remember dimensions that we get
		Object.assign(this.dimensions, dimensions);

		// The layout of tabs can be an expensive operation because we access DOM properties
		// that can result in the browser doing a full page layout to validate them. To buffer
		// this a little bit we try at least to schedule this work on the next animation frame.
		if (!this.layoutScheduler.value) {
			const scheduledLayout = scheduleAtNextAnimationFrame(() => {
				this.doLayout(this.dimensions, this.layoutScheduler.value?.options /* ensure to pick up latest options */);

				this.layoutScheduler.clear();
			});

			this.layoutScheduler.value = { options, dispose: () => scheduledLayout.dispose() };
		}

		// Make sure to keep options updated
		if (options?.forceRevealActiveTab) {
			this.layoutScheduler.value.options = {
				...this.layoutScheduler.value.options,
				forceRevealActiveTab: true
			};
		}

		// First time layout: compute the dimensions and store it
		if (!this.dimensions.used) {
			this.dimensions.used = new Dimension(dimensions.container.width, this.computeHeight().total);
		}

		return this.dimensions.used;
	}