Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Unified Diff: third_party/WebKit/Source/devtools/scripts/extract_module/extract_module.js

Issue 2626143004: DevTools: move from Common module - Geometry and CSSShadowModel (Closed)
Patch Set: minimize test diff Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 1928a225e83a4a1d9606c2b0fc8d216f03af9827..76934f8358998a949b9aebf6e9f0db5ebad4803f 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
@@ -24,17 +24,18 @@ const APPLICATION_DESCRIPTORS = [
const MODULES_TO_REMOVE = [];
const JS_FILES_MAPPING = [
- {file: 'profiler/HeapSnapshotModel.js', new: 'heap_snapshot_model'},
+ {file: 'common/CSSShadowModel.js', existing: 'inline_editor'},
+ {file: 'common/Geometry.js', existing: 'ui'},
// {file: 'module/file.js', existing: 'module'}
];
const MODULE_MAPPING = {
- heap_snapshot_model: {
- dependencies: [],
- dependents: ['heap_snapshot_worker', 'profiler'],
- applications: ['inspector.json'], // need to manually add to heap snapshot worker b/c it's autostart
- autostart: false,
- },
+ // heap_snapshot_model: {
+ // dependencies: [],
+ // dependents: ['heap_snapshot_worker', 'profiler'],
+ // applications: ['inspector.json'], // need to manually add to heap snapshot worker b/c it's autostart
+ // autostart: false,
+ // },
};
const NEW_DEPENDENCIES_BY_EXISTING_MODULES = {
@@ -166,10 +167,16 @@ function calculateIdentifiers() {
let name = match[1];
var currentModule = fileObj.file.split('/')[0];
- if (name.split('.')[0] !== mapModuleToNamespace(currentModule))
+ if (name.split('.')[0] !== mapModuleToNamespace(currentModule)) {
console.log(`POSSIBLE ISSUE: identifier: ${name} found in ${currentModule}`);
- else
+ // one-off
+ if (name.includes('UI.')) {
+ console.log(`including ${name} anyways`);
+ identifiers.push(name)
+ }
+ } else {
identifiers.push(name);
+ }
}
return identifiers;
}
@@ -263,6 +270,8 @@ function updateBuildGNFile(cssFilesMapping, newModuleSet) {
}
function addContentToLinesInSortedOrder({content, startLine, endLine, linesToInsert}) {
+ if (linesToInsert.length === 0)
+ return content;
let lines = content.split('\n');
let seenStartLine = false;
let contentStack = linesToInsert.sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase())).reverse();
@@ -302,14 +311,6 @@ function mapIdentifiers(identifiersByFile, cssFilesMapping) {
let components = identifier.split('.');
components[0] = mapModuleToNamespace(targetModule);
let newIdentifier = components.join('.');
- // one-off
- if (targetModule === 'heap_snapshot_model' && components[1] === 'HeapSnapshotCommon') {
- newIdentifier = [components[0]].concat(components.slice(2)).join('.');
- if (newIdentifier === 'HeapSnapshotModel') {
- identifier = 'Profiler.HeapSnapshotCommon = {};\n\n';
- newIdentifier = '';
- }
- }
map.set(identifier, newIdentifier);
}
}
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/module.json ('k') | third_party/WebKit/Source/devtools/scripts/namespaces.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698