Reland "Migrate timeline/ to ESM"

This reverts commit 96705c6461dcdc4a3379ef56ab38b47595da9bb4.

Reason for revert: Build failure fixed

Original change's description:
> Revert "Migrate timeline/ to ESM"
>
> This reverts commit 907156a7b0fa03fa6ddf52a5fb9bc3a05e0adf34.
>
> It has been causing Windows build errors which has been preventing
> the autoroller in Chromium. Sample build output:
>
> F:\chromium\src\out\release_x64>autoninja chrome && chrome
> "f:\chromium\depot_tools\ninja.exe" chrome -j 320
> [1/1] Regenerating ninja files
> ninja: fatal: CreateProcess: The parameter is incorrect.rate_devtools_grd(//build/toolchain/win:win_clang_x64)
> Change-Id: I3d8c567be6d09160acfadb85dc1bf5e8a53b800c
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1990451
> Reviewed-by: Mike Jackson <[email protected]>
> Commit-Queue: Robert Paveza <[email protected]>

Change-Id: Id588405f5ca1635e417641985df89c56f8564563
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1981621
Commit-Queue: Tim van der Lippe <[email protected]>
Reviewed-by: Robert Paveza <[email protected]>
Reviewed-by: Tim van der Lippe <[email protected]>
diff --git a/front_end/timeline/TimelinePaintProfilerView.js b/front_end/timeline/TimelinePaintProfilerView.js
index da5e06b..f52acef 100644
--- a/front_end/timeline/TimelinePaintProfilerView.js
+++ b/front_end/timeline/TimelinePaintProfilerView.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-Timeline.TimelinePaintProfilerView = class extends UI.SplitWidget {
+export default class TimelinePaintProfilerView extends UI.SplitWidget {
   /**
    * @param {!TimelineModel.TimelineFrameModel} frameModel
    */
@@ -16,7 +16,7 @@
     this._logAndImageSplitWidget = new UI.SplitWidget(true, false);
     this._logAndImageSplitWidget.element.classList.add('timeline-paint-profiler-log-split');
     this.setMainWidget(this._logAndImageSplitWidget);
-    this._imageView = new Timeline.TimelinePaintImageView();
+    this._imageView = new TimelinePaintImageView();
     this._logAndImageSplitWidget.setMainWidget(this._imageView);
 
     this._paintProfilerView = new LayerViewer.PaintProfilerView(this._imageView.showImage.bind(this._imageView));
@@ -121,7 +121,7 @@
      * @param {!SDK.PaintProfilerSnapshot} snapshot
      * @param {?Protocol.DOM.Rect} clipRect
      * @param {!Array.<!SDK.PaintProfilerLogItem>=} log
-     * @this {Timeline.TimelinePaintProfilerView}
+     * @this {TimelinePaintProfilerView}
      */
     function onCommandLogDone(snapshot, clipRect, log) {
       this._logTreeView.setCommandLog(log || []);
@@ -140,12 +140,12 @@
   _onWindowChanged() {
     this._logTreeView.updateWindow(this._paintProfilerView.selectionWindow());
   }
-};
+}
 
 /**
  * @unrestricted
  */
-Timeline.TimelinePaintImageView = class extends UI.Widget {
+export class TimelinePaintImageView extends UI.Widget {
   constructor() {
     super(true);
     this.registerRequiredCSS('timeline/timelinePaintProfiler.css');
@@ -224,4 +224,16 @@
     this._maskRectangle = maskRectangle;
     this._maskElement.classList.toggle('hidden', !maskRectangle);
   }
-};
+}
+
+/* Legacy exported object */
+self.Timeline = self.Timeline || {};
+
+/* Legacy exported object */
+Timeline = Timeline || {};
+
+/** @constructor */
+Timeline.TimelinePaintProfilerView = TimelinePaintProfilerView;
+
+/** @constructor */
+Timeline.TimelinePaintImageView = TimelinePaintImageView;