@@ -550,13 +550,22 @@ export interface IIndentationGuesser {
550550 ( tabSize :number ) : editorCommon . IGuessedIndentation ;
551551}
552552
553+ export interface IElementSizeObserver {
554+ startObserving ( ) : void ;
555+ observe ( dimension ?:editorCommon . IDimension ) : void ;
556+ dispose ( ) : void ;
557+ getWidth ( ) : number ;
558+ getHeight ( ) : number ;
559+ }
560+
553561export abstract class CommonEditorConfiguration extends Disposable implements editorCommon . IConfiguration {
554562
555563 public handlerDispatcher :editorCommon . IHandlerDispatcher ;
556564 public editor :editorCommon . IInternalEditorOptions ;
557565 public editorClone :editorCommon . IInternalEditorOptions ;
558566
559567 protected _configWithDefaults :ConfigurationWithDefaults ;
568+ protected _elementSizeObserver : IElementSizeObserver ;
560569 private _indentationGuesser :IIndentationGuesser ;
561570 private _cachedGuessedIndentationTabSize : number ;
562571 private _cachedGuessedIndentation :editorCommon . IGuessedIndentation ;
@@ -566,9 +575,10 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed
566575 private _onDidChange = this . _register ( new Emitter < editorCommon . IConfigurationChangedEvent > ( ) ) ;
567576 public onDidChange : Event < editorCommon . IConfigurationChangedEvent > = this . _onDidChange . event ;
568577
569- constructor ( options :any , indentationGuesser :IIndentationGuesser = null ) {
578+ constructor ( options :any , elementSizeObserver : IElementSizeObserver = null , indentationGuesser :IIndentationGuesser = null ) {
570579 super ( ) ;
571580 this . _configWithDefaults = new ConfigurationWithDefaults ( options ) ;
581+ this . _elementSizeObserver = elementSizeObserver ;
572582 this . _indentationGuesser = indentationGuesser ;
573583 this . _cachedGuessedIndentationTabSize = - 1 ;
574584 this . _cachedGuessedIndentation = null ;
0 commit comments