summaryrefslogtreecommitdiffstats
path: root/WebKitTools/Scripts/do-webcore-rename
diff options
context:
space:
mode:
Diffstat (limited to 'WebKitTools/Scripts/do-webcore-rename')
-rwxr-xr-xWebKitTools/Scripts/do-webcore-rename244
1 files changed, 239 insertions, 5 deletions
diff --git a/WebKitTools/Scripts/do-webcore-rename b/WebKitTools/Scripts/do-webcore-rename
index 2d6ca46..a65fa4f 100755
--- a/WebKitTools/Scripts/do-webcore-rename
+++ b/WebKitTools/Scripts/do-webcore-rename
@@ -33,6 +33,7 @@ use FindBin;
use lib $FindBin::Bin;
use webkitdirs;
use File::Find;
+use VCSUtils;
setConfiguration();
chdirWebKit();
@@ -66,9 +67,229 @@ sub wanted
push @paths, $File::Find::name;
}
-
+my $isDOMTypeRename = 1;
my %renames = (
- "parseURL" => "deprecatedParseURL"
+ "CanvasActiveInfo" => "WebGLActiveInfo",
+ "canvasActiveInfo" => "webGLActiveInfo",
+ "CanvasActiveInfoConstructor" => "WebGLActiveInfoConstructor",
+ "CanvasActiveInfoPrototype" => "WebGLActiveInfoPrototype",
+ "toCanvasActiveInfo" => "toWebGLActiveInfo",
+ "JSCanvasActiveInfo" => "JSWebGLActiveInfo",
+ "JSCanvasActiveInfoPrototype" => "JSWebGLActiveInfoPrototype",
+ "JSCanvasActiveInfoConstructor" => "JSWebGLActiveInfoConstructor",
+ "JSCanvasActiveInfoCustom" => "JSWebGLActiveInfoCustom",
+ "V8CanvasActiveInfo" => "V8WebGLActiveInfo",
+ "V8CanvasActiveInfoPrototype" => "V8WebGLActiveInfoPrototype",
+ "V8CanvasActiveInfoConstructor" => "V8WebGLActiveInfoConstructor",
+ "V8CanvasActiveInfoCustom" => "V8WebGLActiveInfoCustom",
+ "CanvasArray" => "WebGLArray",
+ "canvasArray" => "webGLArray",
+ "CanvasArrayConstructor" => "WebGLArrayConstructor",
+ "CanvasArrayPrototype" => "WebGLArrayPrototype",
+ "toCanvasArray" => "toWebGLArray",
+ "JSCanvasArray" => "JSWebGLArray",
+ "JSCanvasArrayPrototype" => "JSWebGLArrayPrototype",
+ "JSCanvasArrayConstructor" => "JSWebGLArrayConstructor",
+ "JSCanvasArrayCustom" => "JSWebGLArrayCustom",
+ "V8CanvasArray" => "V8WebGLArray",
+ "V8CanvasArrayPrototype" => "V8WebGLArrayPrototype",
+ "V8CanvasArrayConstructor" => "V8WebGLArrayConstructor",
+ "V8CanvasArrayCustom" => "V8WebGLArrayCustom",
+ "CanvasArrayBuffer" => "WebGLArrayBuffer",
+ "canvasArrayBuffer" => "webGLArrayBuffer",
+ "CanvasArrayBufferConstructor" => "WebGLArrayBufferConstructor",
+ "CanvasArrayBufferPrototype" => "WebGLArrayBufferPrototype",
+ "toCanvasArrayBuffer" => "toWebGLArrayBuffer",
+ "JSCanvasArrayBuffer" => "JSWebGLArrayBuffer",
+ "JSCanvasArrayBufferPrototype" => "JSWebGLArrayBufferPrototype",
+ "JSCanvasArrayBufferConstructor" => "JSWebGLArrayBufferConstructor",
+ "JSCanvasArrayBufferCustom" => "JSWebGLArrayBufferCustom",
+ "V8CanvasArrayBuffer" => "V8WebGLArrayBuffer",
+ "V8CanvasArrayBufferPrototype" => "V8WebGLArrayBufferPrototype",
+ "V8CanvasArrayBufferConstructor" => "V8WebGLArrayBufferConstructor",
+ "V8CanvasArrayBufferCustom" => "V8WebGLArrayBufferCustom",
+ "CanvasBuffer" => "WebGLBuffer",
+ "canvasBuffer" => "webGLBuffer",
+ "CanvasBufferConstructor" => "WebGLBufferConstructor",
+ "CanvasBufferPrototype" => "WebGLBufferPrototype",
+ "toCanvasBuffer" => "toWebGLBuffer",
+ "JSCanvasBuffer" => "JSWebGLBuffer",
+ "JSCanvasBufferPrototype" => "JSWebGLBufferPrototype",
+ "JSCanvasBufferConstructor" => "JSWebGLBufferConstructor",
+ "JSCanvasBufferCustom" => "JSWebGLBufferCustom",
+ "V8CanvasBuffer" => "V8WebGLBuffer",
+ "V8CanvasBufferPrototype" => "V8WebGLBufferPrototype",
+ "V8CanvasBufferConstructor" => "V8WebGLBufferConstructor",
+ "V8CanvasBufferCustom" => "V8WebGLBufferCustom",
+ "CanvasByteArray" => "WebGLByteArray",
+ "canvasByteArray" => "webGLByteArray",
+ "CanvasByteArrayConstructor" => "WebGLByteArrayConstructor",
+ "CanvasByteArrayPrototype" => "WebGLByteArrayPrototype",
+ "toCanvasByteArray" => "toWebGLByteArray",
+ "JSCanvasByteArray" => "JSWebGLByteArray",
+ "JSCanvasByteArrayPrototype" => "JSWebGLByteArrayPrototype",
+ "JSCanvasByteArrayConstructor" => "JSWebGLByteArrayConstructor",
+ "JSCanvasByteArrayCustom" => "JSWebGLByteArrayCustom",
+ "V8CanvasByteArray" => "V8WebGLByteArray",
+ "V8CanvasByteArrayPrototype" => "V8WebGLByteArrayPrototype",
+ "V8CanvasByteArrayConstructor" => "V8WebGLByteArrayConstructor",
+ "V8CanvasByteArrayCustom" => "V8WebGLByteArrayCustom",
+ "CanvasFloatArray" => "WebGLFloatArray",
+ "canvasFloatArray" => "webGLFloatArray",
+ "CanvasFloatArrayConstructor" => "WebGLFloatArrayConstructor",
+ "CanvasFloatArrayPrototype" => "WebGLFloatArrayPrototype",
+ "toCanvasFloatArray" => "toWebGLFloatArray",
+ "JSCanvasFloatArray" => "JSWebGLFloatArray",
+ "JSCanvasFloatArrayPrototype" => "JSWebGLFloatArrayPrototype",
+ "JSCanvasFloatArrayConstructor" => "JSWebGLFloatArrayConstructor",
+ "JSCanvasFloatArrayCustom" => "JSWebGLFloatArrayCustom",
+ "V8CanvasFloatArray" => "V8WebGLFloatArray",
+ "V8CanvasFloatArrayPrototype" => "V8WebGLFloatArrayPrototype",
+ "V8CanvasFloatArrayConstructor" => "V8WebGLFloatArrayConstructor",
+ "V8CanvasFloatArrayCustom" => "V8WebGLFloatArrayCustom",
+ "CanvasFramebuffer" => "WebGLFramebuffer",
+ "canvasFramebuffer" => "webGLFramebuffer",
+ "CanvasFramebufferConstructor" => "WebGLFramebufferConstructor",
+ "CanvasFramebufferPrototype" => "WebGLFramebufferPrototype",
+ "toCanvasFramebuffer" => "toWebGLFramebuffer",
+ "JSCanvasFramebuffer" => "JSWebGLFramebuffer",
+ "JSCanvasFramebufferPrototype" => "JSWebGLFramebufferPrototype",
+ "JSCanvasFramebufferConstructor" => "JSWebGLFramebufferConstructor",
+ "JSCanvasFramebufferCustom" => "JSWebGLFramebufferCustom",
+ "V8CanvasFramebuffer" => "V8WebGLFramebuffer",
+ "V8CanvasFramebufferPrototype" => "V8WebGLFramebufferPrototype",
+ "V8CanvasFramebufferConstructor" => "V8WebGLFramebufferConstructor",
+ "V8CanvasFramebufferCustom" => "V8WebGLFramebufferCustom",
+ "CanvasIntArray" => "WebGLIntArray",
+ "canvasIntArray" => "webGLIntArray",
+ "CanvasIntArrayConstructor" => "WebGLIntArrayConstructor",
+ "CanvasIntArrayPrototype" => "WebGLIntArrayPrototype",
+ "toCanvasIntArray" => "toWebGLIntArray",
+ "JSCanvasIntArray" => "JSWebGLIntArray",
+ "JSCanvasIntArrayPrototype" => "JSWebGLIntArrayPrototype",
+ "JSCanvasIntArrayConstructor" => "JSWebGLIntArrayConstructor",
+ "JSCanvasIntArrayCustom" => "JSWebGLIntArrayCustom",
+ "V8CanvasIntArray" => "V8WebGLIntArray",
+ "V8CanvasIntArrayPrototype" => "V8WebGLIntArrayPrototype",
+ "V8CanvasIntArrayConstructor" => "V8WebGLIntArrayConstructor",
+ "V8CanvasIntArrayCustom" => "V8WebGLIntArrayCustom",
+ "CanvasProgram" => "WebGLProgram",
+ "canvasProgram" => "webGLProgram",
+ "CanvasProgramConstructor" => "WebGLProgramConstructor",
+ "CanvasProgramPrototype" => "WebGLProgramPrototype",
+ "toCanvasProgram" => "toWebGLProgram",
+ "JSCanvasProgram" => "JSWebGLProgram",
+ "JSCanvasProgramPrototype" => "JSWebGLProgramPrototype",
+ "JSCanvasProgramConstructor" => "JSWebGLProgramConstructor",
+ "JSCanvasProgramCustom" => "JSWebGLProgramCustom",
+ "V8CanvasProgram" => "V8WebGLProgram",
+ "V8CanvasProgramPrototype" => "V8WebGLProgramPrototype",
+ "V8CanvasProgramConstructor" => "V8WebGLProgramConstructor",
+ "V8CanvasProgramCustom" => "V8WebGLProgramCustom",
+ "CanvasRenderbuffer" => "WebGLRenderbuffer",
+ "canvasRenderbuffer" => "webGLRenderbuffer",
+ "CanvasRenderbufferConstructor" => "WebGLRenderbufferConstructor",
+ "CanvasRenderbufferPrototype" => "WebGLRenderbufferPrototype",
+ "toCanvasRenderbuffer" => "toWebGLRenderbuffer",
+ "JSCanvasRenderbuffer" => "JSWebGLRenderbuffer",
+ "JSCanvasRenderbufferPrototype" => "JSWebGLRenderbufferPrototype",
+ "JSCanvasRenderbufferConstructor" => "JSWebGLRenderbufferConstructor",
+ "JSCanvasRenderbufferCustom" => "JSWebGLRenderbufferCustom",
+ "V8CanvasRenderbuffer" => "V8WebGLRenderbuffer",
+ "V8CanvasRenderbufferPrototype" => "V8WebGLRenderbufferPrototype",
+ "V8CanvasRenderbufferConstructor" => "V8WebGLRenderbufferConstructor",
+ "V8CanvasRenderbufferCustom" => "V8WebGLRenderbufferCustom",
+ "CanvasRenderingContext3D" => "WebGLRenderingContext",
+ "canvasRenderingContext3D" => "webGLRenderingContext",
+ "CanvasRenderingContext3DConstructor" => "WebGLRenderingContextConstructor",
+ "CanvasRenderingContext3DPrototype" => "WebGLRenderingContextPrototype",
+ "toCanvasRenderingContext3D" => "toWebGLRenderingContext",
+ "JSCanvasRenderingContext3D" => "JSWebGLRenderingContext",
+ "JSCanvasRenderingContext3DPrototype" => "JSWebGLRenderingContextPrototype",
+ "JSCanvasRenderingContext3DConstructor" => "JSWebGLRenderingContextConstructor",
+ "JSCanvasRenderingContext3DCustom" => "JSWebGLRenderingContextCustom",
+ "V8CanvasRenderingContext3D" => "V8WebGLRenderingContext",
+ "V8CanvasRenderingContext3DPrototype" => "V8WebGLRenderingContextPrototype",
+ "V8CanvasRenderingContext3DConstructor" => "V8WebGLRenderingContextConstructor",
+ "V8CanvasRenderingContext3DCustom" => "V8WebGLRenderingContextCustom",
+ "CanvasShader" => "WebGLShader",
+ "canvasShader" => "webGLShader",
+ "CanvasShaderConstructor" => "WebGLShaderConstructor",
+ "CanvasShaderPrototype" => "WebGLShaderPrototype",
+ "toCanvasShader" => "toWebGLShader",
+ "JSCanvasShader" => "JSWebGLShader",
+ "JSCanvasShaderPrototype" => "JSWebGLShaderPrototype",
+ "JSCanvasShaderConstructor" => "JSWebGLShaderConstructor",
+ "JSCanvasShaderCustom" => "JSWebGLShaderCustom",
+ "V8CanvasShader" => "V8WebGLShader",
+ "V8CanvasShaderPrototype" => "V8WebGLShaderPrototype",
+ "V8CanvasShaderConstructor" => "V8WebGLShaderConstructor",
+ "V8CanvasShaderCustom" => "V8WebGLShaderCustom",
+ "CanvasShortArray" => "WebGLShortArray",
+ "canvasShortArray" => "webGLShortArray",
+ "CanvasShortArrayConstructor" => "WebGLShortArrayConstructor",
+ "CanvasShortArrayPrototype" => "WebGLShortArrayPrototype",
+ "toCanvasShortArray" => "toWebGLShortArray",
+ "JSCanvasShortArray" => "JSWebGLShortArray",
+ "JSCanvasShortArrayPrototype" => "JSWebGLShortArrayPrototype",
+ "JSCanvasShortArrayConstructor" => "JSWebGLShortArrayConstructor",
+ "JSCanvasShortArrayCustom" => "JSWebGLShortArrayCustom",
+ "V8CanvasShortArray" => "V8WebGLShortArray",
+ "V8CanvasShortArrayPrototype" => "V8WebGLShortArrayPrototype",
+ "V8CanvasShortArrayConstructor" => "V8WebGLShortArrayConstructor",
+ "V8CanvasShortArrayCustom" => "V8WebGLShortArrayCustom",
+ "CanvasTexture" => "WebGLTexture",
+ "canvasTexture" => "webGLTexture",
+ "CanvasTextureConstructor" => "WebGLTextureConstructor",
+ "CanvasTexturePrototype" => "WebGLTexturePrototype",
+ "toCanvasTexture" => "toWebGLTexture",
+ "JSCanvasTexture" => "JSWebGLTexture",
+ "JSCanvasTexturePrototype" => "JSWebGLTexturePrototype",
+ "JSCanvasTextureConstructor" => "JSWebGLTextureConstructor",
+ "JSCanvasTextureCustom" => "JSWebGLTextureCustom",
+ "V8CanvasTexture" => "V8WebGLTexture",
+ "V8CanvasTexturePrototype" => "V8WebGLTexturePrototype",
+ "V8CanvasTextureConstructor" => "V8WebGLTextureConstructor",
+ "V8CanvasTextureCustom" => "V8WebGLTextureCustom",
+ "CanvasUnsignedByteArray" => "WebGLUnsignedByteArray",
+ "canvasUnsignedByteArray" => "webGLUnsignedByteArray",
+ "CanvasUnsignedByteArrayConstructor" => "WebGLUnsignedByteArrayConstructor",
+ "CanvasUnsignedByteArrayPrototype" => "WebGLUnsignedByteArrayPrototype",
+ "toCanvasUnsignedByteArray" => "toWebGLUnsignedByteArray",
+ "JSCanvasUnsignedByteArray" => "JSWebGLUnsignedByteArray",
+ "JSCanvasUnsignedByteArrayPrototype" => "JSWebGLUnsignedByteArrayPrototype",
+ "JSCanvasUnsignedByteArrayConstructor" => "JSWebGLUnsignedByteArrayConstructor",
+ "JSCanvasUnsignedByteArrayCustom" => "JSWebGLUnsignedByteArrayCustom",
+ "V8CanvasUnsignedByteArray" => "V8WebGLUnsignedByteArray",
+ "V8CanvasUnsignedByteArrayPrototype" => "V8WebGLUnsignedByteArrayPrototype",
+ "V8CanvasUnsignedByteArrayConstructor" => "V8WebGLUnsignedByteArrayConstructor",
+ "V8CanvasUnsignedByteArrayCustom" => "V8WebGLUnsignedByteArrayCustom",
+ "CanvasUnsignedIntArray" => "WebGLUnsignedIntArray",
+ "canvasUnsignedIntArray" => "webGLUnsignedIntArray",
+ "CanvasUnsignedIntArrayConstructor" => "WebGLUnsignedIntArrayConstructor",
+ "CanvasUnsignedIntArrayPrototype" => "WebGLUnsignedIntArrayPrototype",
+ "toCanvasUnsignedIntArray" => "toWebGLUnsignedIntArray",
+ "JSCanvasUnsignedIntArray" => "JSWebGLUnsignedIntArray",
+ "JSCanvasUnsignedIntArrayPrototype" => "JSWebGLUnsignedIntArrayPrototype",
+ "JSCanvasUnsignedIntArrayConstructor" => "JSWebGLUnsignedIntArrayConstructor",
+ "JSCanvasUnsignedIntArrayCustom" => "JSWebGLUnsignedIntArrayCustom",
+ "V8CanvasUnsignedIntArray" => "V8WebGLUnsignedIntArray",
+ "V8CanvasUnsignedIntArrayPrototype" => "V8WebGLUnsignedIntArrayPrototype",
+ "V8CanvasUnsignedIntArrayConstructor" => "V8WebGLUnsignedIntArrayConstructor",
+ "V8CanvasUnsignedIntArrayCustom" => "V8WebGLUnsignedIntArrayCustom",
+ "CanvasUnsignedShortArray" => "WebGLUnsignedShortArray",
+ "canvasUnsignedShortArray" => "webGLUnsignedShortArray",
+ "CanvasUnsignedShortArrayConstructor" => "WebGLUnsignedShortArrayConstructor",
+ "CanvasUnsignedShortArrayPrototype" => "WebGLUnsignedShortArrayPrototype",
+ "toCanvasUnsignedShortArray" => "toWebGLUnsignedShortArray",
+ "JSCanvasUnsignedShortArray" => "JSWebGLUnsignedShortArray",
+ "JSCanvasUnsignedShortArrayPrototype" => "JSWebGLUnsignedShortArrayPrototype",
+ "JSCanvasUnsignedShortArrayConstructor" => "JSWebGLUnsignedShortArrayConstructor",
+ "JSCanvasUnsignedShortArrayCustom" => "JSWebGLUnsignedShortArrayCustom",
+ "V8CanvasUnsignedShortArray" => "V8WebGLUnsignedShortArray",
+ "V8CanvasUnsignedShortArrayPrototype" => "V8WebGLUnsignedShortArrayPrototype",
+ "V8CanvasUnsignedShortArrayConstructor" => "V8WebGLUnsignedShortArrayConstructor",
+ "V8CanvasUnsignedShortArrayCustom" => "V8WebGLUnsignedShortArrayCustom"
);
my %renamesContemplatedForTheFuture = (
@@ -150,11 +371,18 @@ for my $file (sort @paths) {
}
}
+
+my $isGit = isGit();
+
for my $file (sort @paths) {
if ($newFile{$file}) {
my $newFile = $newFile{$file};
print "Renaming $file to $newFile\n";
- system "svn move $file $newFile";
+ if ($isGit) {
+ system "git mv $file $newFile";
+ } else {
+ system "svn move $file $newFile";
+ }
}
}
@@ -171,8 +399,14 @@ for my $file (sort @paths) {
}
my $newContents = $contents;
- for my $from (keys %renames) {
- $newContents =~ s/\b$from(?!["\w])/$renames{$from}/g; # this " unconfuses Xcode syntax highlighting
+ if ($isDOMTypeRename) {
+ for my $from (keys %renames) {
+ $newContents =~ s/\b$from/$renames{$from}/g;
+ }
+ } else {
+ for my $from (keys %renames) {
+ $newContents =~ s/\b$from(?!["\w])/$renames{$from}/g; # this " unconfuses Xcode syntax highlighting
+ }
}
if ($newContents ne $contents) {