| Index: third_party/WebKit/Source/devtools/scripts/extract_module/extract_module.js
|
| diff --git a/third_party/WebKit/Source/devtools/scripts/extract_module/extract_module.js b/third_party/WebKit/Source/devtools/scripts/extract_module/extract_module.js
|
| index 888edbcb1c8f13f882cff0e3c9e158b11df8b6e0..0bef616fa57c4da07182d3025c9237caf623debf 100644
|
| --- a/third_party/WebKit/Source/devtools/scripts/extract_module/extract_module.js
|
| +++ b/third_party/WebKit/Source/devtools/scripts/extract_module/extract_module.js
|
| @@ -17,100 +17,67 @@ const APPLICATION_DESCRIPTORS = [
|
| ];
|
|
|
| // Replace based on specified transformation
|
| -
|
| -const MODULES_TO_REMOVE = []; // ['components_lazy', 'ui_lazy'];
|
| -
|
| -// NOTE: Extensions-only change
|
| -const FILES_AFFECTING_EXTENSIONS = [
|
| - 'components_lazy/LineLevelProfile.js',
|
| - 'components_lazy/GCActionDelegate.js',
|
| - 'components/RequestAppBannerActionDelegate.js',
|
| - 'ui_lazy/CommandMenu.js',
|
| -];
|
| +const MODULES_TO_REMOVE = ['components_lazy', 'ui_lazy'];
|
|
|
| const JS_FILES_MAPPING = [
|
| - // {file: 'components_lazy/CookiesTable.js', new: 'cookie_table'},
|
| - // {file: 'ui/BezierEditor.js', new: 'inline_editor'},
|
| - // {file: 'ui/BezierUI.js', new: 'inline_editor'},
|
| - // {file: 'ui/ColorSwatch.js', new: 'inline_editor'},
|
| - // {file: 'ui/CSSShadowEditor.js', new: 'inline_editor'},
|
| - // {file: 'ui/SwatchPopoverHelper.js', new: 'inline_editor'},
|
| - // {file: 'components/Spectrum.js', new: 'color_picker'},
|
| - //
|
| - // // Cannot extract dom_ui because of cyclic dependency with components
|
| - // // {file: 'components/DOMPresentationUtils.js', new: 'dom_ui'},
|
| - // {file: 'components/ExecutionContextSelector.js', existing: 'main'},
|
| - // {file: 'components_lazy/FilmStripModel.js', existing: 'sdk'},
|
| - //
|
| - // {file: 'components_lazy/FilmStripView.js', new: 'perf_ui'},
|
| - {file: 'components_lazy/GCActionDelegate.js', existing: 'main'},
|
| - {file: 'components_lazy/LineLevelProfile.js', new: 'perf_ui'},
|
| - {file: 'components/RequestAppBannerActionDelegate.js', existing: 'main'},
|
| - // {file: 'components/ShortcutsScreen.js', existing: 'ui'},
|
| - {file: 'ui_lazy/FilteredListWidget.js', new: 'quick_open'},
|
| - {file: 'ui_lazy/CommandMenu.js', new: 'quick_open'},
|
| - // {file: 'ui_lazy/DataGrid.js', new: 'data_grid'},
|
| - // {file: 'ui_lazy/ViewportDataGrid.js', new: 'data_grid'},
|
| - // {file: 'ui_lazy/SortableDataGrid.js', new: 'data_grid'},
|
| - // {file: 'ui_lazy/ShowMoreDataGridNode.js', new: 'data_grid'},
|
| - // {file: 'ui_lazy/ChartViewport.js', new: 'perf_ui'},
|
| - // {file: 'ui_lazy/FlameChart.js', new: 'perf_ui'},
|
| - // {file: 'ui_lazy/OverviewGrid.js', new: 'perf_ui'},
|
| - // {file: 'ui_lazy/PieChart.js', new: 'perf_ui'},
|
| - // {file: 'ui_lazy/TimelineGrid.js', new: 'perf_ui'},
|
| - // {file: 'ui_lazy/TimelineOverviewPane.js', new: 'perf_ui'},
|
| - {file: 'sources/UISourceCodeFrame.js', existing: 'source_frame'},
|
| - {file: 'sources/SourceCodeDiff.js', existing: 'source_frame'},
|
| + {file: 'components_lazy/CookiesTable.js', new: 'cookie_table'},
|
| + {file: 'ui/BezierEditor.js', new: 'inline_editor'},
|
| + {file: 'ui/BezierUI.js', new: 'inline_editor'},
|
| + {file: 'ui/ColorSwatch.js', new: 'inline_editor'},
|
| + {file: 'ui/CSSShadowEditor.js', new: 'inline_editor'},
|
| + {file: 'ui/SwatchPopoverHelper.js', new: 'inline_editor'},
|
| + {file: 'components/Spectrum.js', new: 'color_picker'},
|
| +
|
| + // Cannot extract dom_ui because of cyclic dependency with components
|
| + // {file: 'components/DOMPresentationUtils.js', new: 'dom_ui'},
|
| + {file: 'components/ExecutionContextSelector.js', existing: 'main'},
|
| + {file: 'components_lazy/FilmStripModel.js', existing: 'sdk'},
|
| + {file: 'components_lazy/FilmStripView.js', existing: 'perf_ui'},
|
| + {file: 'components/ShortcutsScreen.js', existing: 'ui'},
|
| + {file: 'ui_lazy/DataGrid.js', new: 'data_grid'},
|
| + {file: 'ui_lazy/ViewportDataGrid.js', new: 'data_grid'},
|
| + {file: 'ui_lazy/SortableDataGrid.js', new: 'data_grid'},
|
| + {file: 'ui_lazy/ShowMoreDataGridNode.js', new: 'data_grid'},
|
| + {file: 'ui_lazy/ChartViewport.js', existing: 'perf_ui'},
|
| + {file: 'ui_lazy/FlameChart.js', existing: 'perf_ui'},
|
| + {file: 'ui_lazy/OverviewGrid.js', existing: 'perf_ui'},
|
| + {file: 'ui_lazy/PieChart.js', existing: 'perf_ui'},
|
| + {file: 'ui_lazy/TimelineGrid.js', existing: 'perf_ui'},
|
| + {file: 'ui_lazy/TimelineOverviewPane.js', existing: 'perf_ui'},
|
| ];
|
|
|
| const MODULE_MAPPING = {
|
| - // cookie_table: {
|
| - // dependencies: ['ui', 'sdk', 'data_grid'],
|
| - // dependents: ['resources', 'network'],
|
| - // applications: ['inspector.json'],
|
| - // autostart: false,
|
| - // },
|
| - // inline_editor: {
|
| - // dependencies: ['ui'],
|
| - // dependents: ['sources', 'elements', 'resources'],
|
| - // applications: ['inspector.json', 'unit_test_runner.json'],
|
| - // autostart: false,
|
| - // },
|
| - // color_picker: {
|
| - // dependencies: ['ui', 'sdk'],
|
| - // dependents: ['sources', 'elements'],
|
| - // applications: ['inspector.json'],
|
| - // autostart: false,
|
| - // },
|
| - perf_ui: {
|
| - dependencies: ['ui', 'sdk', 'bindings', 'source_frame', 'text_editor'],
|
| - dependents: ['network', 'timeline', 'profiler', 'layer_viewer'],
|
| + cookie_table: {
|
| + dependencies: ['ui', 'sdk', 'data_grid'],
|
| + dependents: ['resources', 'network'],
|
| + applications: ['inspector.json'],
|
| + autostart: false,
|
| + },
|
| + inline_editor: {
|
| + dependencies: ['ui'],
|
| + dependents: ['sources', 'elements', 'resources'],
|
| + applications: ['inspector.json', 'unit_test_runner.json'],
|
| + autostart: false,
|
| + },
|
| + color_picker: {
|
| + dependencies: ['ui', 'sdk'],
|
| + dependents: ['sources', 'elements'],
|
| applications: ['inspector.json'],
|
| autostart: false,
|
| },
|
| - quick_open: {
|
| - dependencies: ['ui', 'diff'],
|
| - dependents: ['sources'],
|
| + data_grid: {
|
| + dependencies: ['ui'],
|
| + dependents: ['network', 'profiler', 'resources', 'console', 'timeline'],
|
| applications: ['inspector.json', 'unit_test_runner.json'],
|
| autostart: false,
|
| },
|
| - // data_grid: {
|
| - // dependencies: ['ui'],
|
| - // dependents: ['network', 'profiler', 'resources', 'console', 'timeline'],
|
| - // applications: ['inspector.json', 'unit_test_runner.json'],
|
| - // autostart: false,
|
| - // },
|
| };
|
|
|
| const NEW_DEPENDENCIES_BY_EXISTING_MODULES = {
|
| - // resources: ['components'],
|
| - source_frame: ['persistence', 'diff'],
|
| - timeline: ['extensions'],
|
| - css_tracker: ['source_frame'],
|
| + resources: ['components'],
|
| };
|
|
|
| const REMOVE_DEPENDENCIES_BY_EXISTING_MODULES = {
|
| - css_tracker: ['sources'],
|
| };
|
|
|
| const DEPENDENCIES_BY_MODULE = Object.keys(MODULE_MAPPING).reduce((acc, module) => {
|
| @@ -431,12 +398,12 @@ function renameIdentifiers(identifierMap) {
|
| // one-off
|
| if (filePath.includes('LayoutTests/http/tests/inspector-unit/filtered-item-selection-dialog-filtering.js'))
|
| newContent = newContent.replaceAll('ui_lazy', 'quick_open');
|
| - // if (filePath.includes('LayoutTests/inspector/components/cookies-table.html'))
|
| - // newContent = newContent.replaceAll('components_lazy', 'cookie_table');
|
| - // if (filePath.includes('LayoutTests/inspector/components/datagrid-autosize.html'))
|
| - // newContent = newContent.replaceAll('ui_lazy', 'data_grid');
|
| - // if (filePath.includes('LayoutTests/inspector/components/datagrid-test.js'))
|
| - // newContent = newContent.replaceAll('ui_lazy', 'data_grid');
|
| + if (filePath.includes('LayoutTests/inspector/components/cookies-table.html'))
|
| + newContent = newContent.replaceAll('components_lazy', 'cookie_table');
|
| + if (filePath.includes('LayoutTests/inspector/components/datagrid-autosize.html'))
|
| + newContent = newContent.replaceAll('ui_lazy', 'data_grid');
|
| + if (filePath.includes('LayoutTests/inspector/components/datagrid-test.js'))
|
| + newContent = newContent.replaceAll('ui_lazy', 'data_grid');
|
|
|
| if (content !== newContent)
|
| fs.writeFileSync(filePath, newContent);
|
|
|