[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

loislo at chromium.org loislo at chromium.org
Wed Dec 22 12:17:12 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 98068b3e7c4f021a5e6e6be9ba5aff8949b689ac
Author: loislo at chromium.org <loislo at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Aug 18 10:00:06 2010 +0000

    2010-08-16  Ilya Tikhonovsky  <loislo at chromium.org>
    
            Reviewed by Yury Semikhatsky.
    
            Web Inspector: replace hand written InspectorBackendStub.js by generated one.
            New command-line flag was added to combine-javascript-resources.
            It specifies the location of generated scripts.
            https://bugs.webkit.org/show_bug.cgi?id=43791
    
            * GNUmakefile.am:
            * WebCore.gyp/WebCore.gyp:
            * WebCore.gypi:
            * WebCore.pri:
            * WebCore.pro:
            * WebCore.vcproj/WebCore.vcproj:
            * WebCore.xcodeproj/project.pbxproj:
            * combine-javascript-resources:
            * inspector/CodeGeneratorInspector.pm:
            * inspector/front-end/InspectorBackendStub.js: Removed.
            * inspector/front-end/WebKit.qrc:
    
    2010-08-16  Ilya Tikhonovsky  <loislo at chromium.org>
    
            Reviewed by Yury Semikhatsky.
    
            Web Inspector: replace hand written InspectorBackendStub.js by generated one.
            https://bugs.webkit.org/show_bug.cgi?id=43791
    
            * GNUmakefile.am:
    
    2010-08-17  Ilya Tikhonovsky  <loislo at chromium.org>
    
            Reviewed by Yury Semikhatsky.
    
            WebInspector: inspector tests for GTK were added to Skip list.
            They should be enabled later.
            Bug for GTK https://bugs.webkit.org/show_bug.cgi?id=43977
            https://bugs.webkit.org/show_bug.cgi?id=43791
    
            * platform/gtk/Skipped:
    
    2010-08-17  Ilya Tikhonovsky  <loislo at chromium.org>
    
            Reviewed by Yury Semikhatsky.
    
            Web Inspector: replace hand written InspectorBackendStub.js by generated one.
            https://bugs.webkit.org/show_bug.cgi?id=43791
    
            * WebKit.gyp:
    
    2010-08-17  Ilya Tikhonovsky  <loislo at chromium.org>
    
            Reviewed by Yury Semikhatsky.
    
            Web Inspector: replace hand written InspectorBackendStub.js by generated one.
            https://bugs.webkit.org/show_bug.cgi?id=43791
    
            * WebCoreSupport/InspectorClientGtk.cpp:
            (WebKit::InspectorClient::openInspectorFrontend):
    
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65595 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/ChangeLog b/ChangeLog
index fef7ad5..978d1e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-08-17  Ilya Tikhonovsky  <loislo at chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: replace hand written InspectorBackendStub.js by generated one.
+        https://bugs.webkit.org/show_bug.cgi?id=43791
+
+        * GNUmakefile.am:
+
 2010-08-17  Jesus Sanchez-Palencia  <jesus.palencia at openbossa.org>
 
         Reviewed by Darin Adler.
diff --git a/GNUmakefile.am b/GNUmakefile.am
index b9f6cae..42d6673 100644
--- a/GNUmakefile.am
+++ b/GNUmakefile.am
@@ -39,6 +39,7 @@ GENSOURCES_JAVASCRIPTCORE := $(top_builddir)/DerivedSources/JavaScriptCore
 GENSOURCES_WEBCORE := $(top_builddir)/DerivedSources/WebCore
 GENSOURCES_WEBKIT := $(top_builddir)/DerivedSources/webkit
 GENPROGRAMS := $(top_builddir)/Programs
+GENSOURCES_INSPECTOR := $(GENPROGRAMS)/resources/inspector
 WebCore := $(srcdir)/WebCore
 
 # Programs to run the WebKitGtk unit tests
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 3808ae3..5bfc370 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-08-17  Ilya Tikhonovsky  <loislo at chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        WebInspector: inspector tests for GTK were added to Skip list.
+        They should be enabled later.
+        Bug for GTK https://bugs.webkit.org/show_bug.cgi?id=43977
+        https://bugs.webkit.org/show_bug.cgi?id=43791
+
+        * platform/gtk/Skipped:
+
 2010-08-18  Renata Hodovan  <reni at inf.u-szeged.hu>
 
         Reviewed by Dirk Schulze.
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index 26c9c04..70913b5 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -5910,3 +5910,9 @@ fast/js/sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.3/S15.9.3.1_A5_T6.h
 fast/js/sputnik/Unicode/Unicode_510/S7.6_A3.2.html
 fast/js/sputnik/Unicode/Unicode_510/S7.6_A5.3_T1.html
 fast/js/sputnik/Unicode/Unicode_510/S7.6_A5.3_T2.html
+
+# Inspector's tests were disabled.
+# https://bugs.webkit.org/show_bug.cgi?id=43977
+inspector/
+http/tests/inspector/
+http/tests/inspector-enabled/
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 5d26f18..5de2f93 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2010-08-17  Ilya Tikhonovsky  <loislo at chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: replace hand written InspectorBackendStub.js by generated one.
+        New command-line flag was added to combine-javascript-resources.
+        It specifies the location of generated scripts.
+        https://bugs.webkit.org/show_bug.cgi?id=43791
+
+        * GNUmakefile.am:
+        * WebCore.gyp/WebCore.gyp:
+        * WebCore.gypi:
+        * WebCore.pri:
+        * WebCore.pro:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * combine-javascript-resources:
+        * inspector/CodeGeneratorInspector.pm:
+        * inspector/front-end/InspectorBackendStub.js: Removed.
+        * inspector/front-end/WebKit.qrc:
+
 2010-08-18  Shinichiro Hamaji  <hamaji at chromium.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index f79c130..74d4e7a 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -4618,6 +4618,7 @@ EXTRA_DIST += \
 webinspectordir = ${datadir}/webkitgtk- at WEBKITGTK_API_VERSION@/webinspector
 dist_webinspector_DATA = \
 	$(WebCore)/English.lproj/localizedStrings.js \
+	DerivedSources/WebCore/InspectorBackendStub.js \
 	$(shell ls $(WebCore)/inspector/front-end/*.js) \
 	$(shell ls $(WebCore)/inspector/front-end/*.html) \
 	$(shell ls $(WebCore)/inspector/front-end/*.css)
@@ -4627,6 +4628,13 @@ dist_webinspectorimages_DATA = \
 	$(shell ls $(WebCore)/inspector/front-end/Images/*.gif) \
 	$(shell ls $(WebCore)/inspector/front-end/Images/*.png)
 
+noinst_webinspectordir = ${GENSOURCES_INSPECTOR}
+noinst_webinspector_SCRIPTS = ${GENSOURCES_INSPECTOR}/inspector.html
+${GENSOURCES_INSPECTOR}/inspector.html :
+	mkdir -p ${GENSOURCES_INSPECTOR}/images
+	cp ${dist_webinspector_DATA} ${GENSOURCES_INSPECTOR}
+	cp ${dist_webinspectorimages_DATA} ${GENSOURCES_INSPECTOR}/images
+
 webresourcesdir = ${datadir}/webkitgtk- at WEBKITGTK_API_VERSION@/images
 dist_webresources_DATA = \
 	$(WebCore)/Resources/textAreaResizeCorner.png \
diff --git a/WebCore/WebCore.gyp/WebCore.gyp b/WebCore/WebCore.gyp/WebCore.gyp
index ff1ec27..fed9c0d 100644
--- a/WebCore/WebCore.gyp/WebCore.gyp
+++ b/WebCore/WebCore.gyp/WebCore.gyp
@@ -267,6 +267,51 @@
   },
   'targets': [
     {
+      'target_name': 'inspector_protocol_sources',
+      'type': 'none',
+      'actions': [
+        {
+          'action_name': 'generateInspectorProtocolSources',
+          # The second input item will be used as item name in vcproj.
+          # It is not possible to put Inspector.idl there because
+          # all idl files are marking as excluded by gyp generator.
+          'inputs': [
+            '../bindings/scripts/generate-bindings.pl',
+            '../inspector/CodeGeneratorInspector.pm',
+            '../bindings/scripts/CodeGenerator.pm',
+            '../bindings/scripts/IDLParser.pm',
+            '../bindings/scripts/IDLStructure.pm',
+            '../inspector/Inspector.idl',
+          ],
+          'outputs': [
+            '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendDispatcher.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendStub.js',
+            '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorBackendDispatcher.h',
+            '<(SHARED_INTERMEDIATE_DIR)/webcore/RemoteInspectorFrontend.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/webkit/RemoteInspectorFrontend.h',
+          ],
+          'variables': {
+            'generator_include_dirs': [
+            ],
+          },
+          'action': [
+            'python',
+            'scripts/rule_binding.py',
+            '../inspector/Inspector.idl',
+            '<(SHARED_INTERMEDIATE_DIR)/webcore',
+            '<(SHARED_INTERMEDIATE_DIR)/webkit',
+            '--',
+            '<@(_inputs)',
+            '--',
+            '--defines', '<(feature_defines) LANGUAGE_JAVASCRIPT',
+            '--generator', 'Inspector',
+            '<@(generator_include_dirs)'
+          ],
+          'message': 'Generating Inspector protocol sources from Inspector.idl',
+        },
+      ]
+    },
+    {
       'target_name': 'webcore_bindings_sources',
       'type': 'none',
       'hard_dependency': 1,
@@ -482,44 +527,6 @@
           ],
         },
         {
-          'action_name': 'RemoteInspectorFrontend',
-          # The second input item will be used as item name in vcproj.
-          # It is not possible to put Inspector.idl there because
-          # all idl files are marking as excluded by gyp generator.
-          'inputs': [
-            '../bindings/scripts/generate-bindings.pl',
-            '../inspector/CodeGeneratorInspector.pm',
-            '../bindings/scripts/CodeGenerator.pm',
-            '../bindings/scripts/IDLParser.pm',
-            '../bindings/scripts/IDLStructure.pm',
-            '../inspector/Inspector.idl',
-          ],
-          'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/InspectorBackendDispatcher.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/InspectorBackendDispatcher.h',
-            '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/RemoteInspectorFrontend.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/RemoteInspectorFrontend.h',
-          ],
-          'variables': {
-            'generator_include_dirs': [
-            ],
-          },
-          'action': [
-            'python',
-            'scripts/rule_binding.py',
-            '../inspector/Inspector.idl',
-            '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
-            '--',
-            '<@(_inputs)',
-            '--',
-            '--defines', '<(feature_defines) LANGUAGE_JAVASCRIPT',
-            '--generator', 'Inspector',
-            '<@(generator_include_dirs)'
-          ],
-          'message': 'Generating Inspector interface classes from Inspector.idl',
-        },
-        {
           'action_name': 'XMLNames',
           'inputs': [
             '../dom/make_names.pl',
@@ -697,6 +704,7 @@
       'hard_dependency': 1,
       'dependencies': [
         'webcore_bindings_sources',
+        'inspector_protocol_sources',
         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:pcre',
         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
@@ -749,8 +757,8 @@
         '<(SHARED_INTERMEDIATE_DIR)/webkit/XPathGrammar.cpp',
 
         # Additional .cpp files from the webcore_inspector_sources list.
-        '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/RemoteInspectorFrontend.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/InspectorBackendDispatcher.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/webcore/RemoteInspectorFrontend.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendDispatcher.cpp',
       ],
       'conditions': [
         ['javascript_engine=="v8"', {
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index c223bd4..6a66348 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -4162,7 +4162,6 @@
             'inspector/front-end/HAREntry.js',
             'inspector/front-end/HelpScreen.js',
             'inspector/front-end/ImageView.js',
-            'inspector/front-end/InspectorBackendStub.js',
             'inspector/front-end/InspectorFrontendHostStub.js',
             'inspector/front-end/InjectedFakeWorker.js',
             'inspector/front-end/InjectedScript.js',
diff --git a/WebCore/WebCore.pri b/WebCore/WebCore.pri
index 7daa76a..e651533 100644
--- a/WebCore/WebCore.pri
+++ b/WebCore/WebCore.pri
@@ -490,6 +490,7 @@ IDL_BINDINGS += \
 
 
 INSPECTOR_INTERFACES = inspector/Inspector.idl
+INSPECTOR_BACKEND_STUB_QRC = inspector/front-end/InspectorBackendStub.qrc
 
 mathmlnames.output = $${WC_GENERATED_SOURCES_DIR}/MathMLNames.cpp
 mathmlnames.input = MATHML_NAMES
@@ -564,6 +565,12 @@ inspectorIDL.depends = $$PWD/bindings/scripts/CodeGenerator.pm \
               $$PWD/bindings/scripts/InFilesParser.pm
 addExtraCompiler(inspectorIDL)
 
+inspectorBackendStub.wkAddOutputToSources = false
+inspectorBackendStub.output = generated/InspectorBackendStub.qrc
+inspectorBackendStub.input = INSPECTOR_BACKEND_STUB_QRC
+inspectorBackendStub.commands = $$QMAKE_COPY $$PWD/$$INSPECTOR_BACKEND_STUB_QRC $${WC_GENERATED_SOURCES_DIR}/InspectorBackendStub.qrc
+addExtraCompiler(inspectorBackendStub)
+
 # GENERATOR 3: tokenizer (flex)
 tokenizer.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.cpp
 tokenizer.input = TOKENIZER
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 3e2efea..b0a236d 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -136,7 +136,7 @@ symbian {
 RESOURCES += \
     $$PWD/../WebCore/WebCore.qrc
 
-include_webinspector: RESOURCES += $$PWD/../WebCore/inspector/front-end/WebKit.qrc
+include_webinspector: RESOURCES += $$PWD/../WebCore/inspector/front-end/WebKit.qrc $$WC_GENERATED_SOURCES_DIR/InspectorBackendStub.qrc
 
 enable_fast_mobile_scrolling: DEFINES += ENABLE_FAST_MOBILE_SCROLLING=1
 
diff --git a/WebCore/WebCore.vcproj/copyInspectorFiles.cmd b/WebCore/WebCore.vcproj/copyInspectorFiles.cmd
index 7b5f452..316fddc 100755
--- a/WebCore/WebCore.vcproj/copyInspectorFiles.cmd
+++ b/WebCore/WebCore.vcproj/copyInspectorFiles.cmd
@@ -1,4 +1,5 @@
 mkdir 2>NUL "%WebKitOutputDir%\bin\WebKit.resources\inspector"
 xcopy /y /d /s /exclude:xcopy.excludes "%ProjectDir%..\inspector\front-end\*" "%WebKitOutputDir%\bin\WebKit.resources\inspector"
+xcopy /y /d /s /exclude:xcopy.excludes "%WebKitOutputDir%\obj\WebCore\DerivedSources\InspectorBackendStub.js" "%WebKitOutputDir%\bin\WebKit.resources\inspector"
 mkdir 2>NUL "%WebKitOutputDir%\bin\WebKit.resources\en.lproj"
 xcopy /y /d /s /exclude:xcopy.excludes "%ProjectDir%..\English.lproj\localizedStrings.js" "%WebKitOutputDir%\bin\WebKit.resources\en.lproj"
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 58a26f2..1329e6d 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -20457,7 +20457,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "# Don't do anything for Debug builds, so the Inspector is easier to debug.\nif [[ ${CONFIGURATION:=Debug} == \"Debug\" ]]; then\n    exit\nfi\n\n# Combine all script resources in the inspector.html file.\n\"$SRCROOT/combine-javascript-resources\" --input-html \"${SRCROOT}/inspector/front-end/inspector.html\" --output-dir \"${DERIVED_FILE_DIR}/WebCore\" --output-script-name inspector.js\n\nif [ -d \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector\" ]; then\n    # Remove any JavaScript files, since they will be replaced with the combined file.\n    cd \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector\"\n    rm *.js\n\n    # Copy the modified HTML file and the combined script.\n    cp \"${DERIVED_FILE_DIR}/WebCore/inspector.html\" inspector.html\n    cp \"${DERIVED_FILE_DIR}/WebCore/inspector.js\" inspector.js\nfi\n";
+			shellScript = "# Don't do anything for Debug builds, so the Inspector is easier to debug.\nif [[ ${CONFIGURATION:=Debug} == \"Debug\" ]]; then\n    exit\nfi\n\n# Combine all script resources in the inspector.html file.\n\"$SRCROOT/combine-javascript-resources\" --input-html \"${SRCROOT}/inspector/front-end/inspector.html\" --generated-scripts-dir ${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore --output-dir \"${DERIVED_FILE_DIR}/WebCore\" --output-script-name inspector.js\n\nif [ -d \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector\" ]; then\n    # Remove any JavaScript files, since they will be replaced with the combined file.\n    cd \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector\"\n    rm *.js\n\n    # Copy the modified HTML file and the combined script.\n    cp \"${DERIVED_FILE_DIR}/WebCore/inspector.html\" inspector.html\n    cp \"${DERIVED_FILE_DIR}/WebCore/inspector.js\" inspector.js\nfi\n";
 		};
 		1C81BA330E97357C00266E07 /* Copy Inspector Resources */ = {
 			isa = PBXShellScriptBuildPhase;
@@ -20473,7 +20473,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "# Copy all the Inspector front-end resources.\nditto \"${SRCROOT}/inspector/front-end\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector\"\n\n# Remove the WebKit.qrc file since it is not used on the Mac (this file is for Qt)\nrm -f \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector/WebKit.qrc\"\n\n# Remove *.re2js files, they are only used to generate some .js files.\nrm -f \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector/\"*.re2js\n";
+			shellScript = "# Copy all the Inspector front-end resources.\nditto \"${SRCROOT}/inspector/front-end\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector\"\nditto \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore/InspectorBackendStub.js\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector\"\n\n# Remove the WebKit.qrc file since it is not used on the Mac (this file is for Qt)\nrm -f \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector/WebKit.qrc\"\n\n# Remove *.re2js files, they are only used to generate some .js files.\nrm -f \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector/\"*.re2js\n";
 		};
 		5D0D540D0E9862F60029E223 /* Check For Weak VTables and Externals */ = {
 			isa = PBXShellScriptBuildPhase;
diff --git a/WebCore/combine-javascript-resources b/WebCore/combine-javascript-resources
index 96dfc88..428b6b7 100755
--- a/WebCore/combine-javascript-resources
+++ b/WebCore/combine-javascript-resources
@@ -31,12 +31,14 @@ use Getopt::Long;
 use File::Basename;
 use File::Path;
 
+my $generatedScriptsDirectory;
 my $outputDirectory;
 my $scriptName;
 my $htmlFile;
 
 GetOptions('output-dir=s' => \$outputDirectory,
            'output-script-name=s' => \$scriptName,
+           'generated-scripts-dir=s' => \$generatedScriptsDirectory,
            'input-html=s' => \$htmlFile);
 
 unless (defined $htmlFile and defined $scriptName and defined $outputDirectory) {
@@ -62,7 +64,7 @@ open SCRIPT_OUT, ">", "$outputDirectory/$scriptName" or die "Can't open $outputD
 
 while ($headContents =~ m/<script.*src="([^"]*)"[^>]*>/gi) {
     local $/;
-    open SCRIPT_IN, "$htmlDirectory/$1" or die "Can't open $htmlDirectory/$1: $!";
+    open SCRIPT_IN, "$generatedScriptsDirectory/$1" or open SCRIPT_IN, "$htmlDirectory/$1" or die "Can't open $htmlDirectory/$1: $!";
     print SCRIPT_OUT "/* $1 */\n\n";
     print SCRIPT_OUT <SCRIPT_IN>;
     close SCRIPT_IN;
diff --git a/WebCore/inspector/CodeGeneratorInspector.pm b/WebCore/inspector/CodeGeneratorInspector.pm
index 10e0882..cd9052a 100644
--- a/WebCore/inspector/CodeGeneratorInspector.pm
+++ b/WebCore/inspector/CodeGeneratorInspector.pm
@@ -138,6 +138,7 @@ my $verbose;
 my $namespace;
 
 my $backendClassName;
+my $backendJSStubName;
 my %backendTypes;
 my %backendMethods;
 my @backendMethodsImpl;
@@ -145,6 +146,7 @@ my $backendConstructor;
 my @backendConstantDeclarations;
 my @backendConstantDefinitions;
 my $backendFooter;
+my @backendStubJS;
 
 my $frontendClassName;
 my %frontendTypes;
@@ -204,6 +206,7 @@ sub GenerateInterface
     $frontendTypes{"PassRefPtr"} = 1;
 
     $backendClassName = $className . "BackendDispatcher";
+    $backendJSStubName = $className . "BackendStub";
     my @backendHead;
     push(@backendHead, "    ${backendClassName}(InspectorController* inspectorController) : m_inspectorController(inspectorController) { }");
     push(@backendHead, "    void reportProtocolError(const long callId, const String& method, const String& errorText) const;");
@@ -238,6 +241,8 @@ sub generateFunctions
     }
     push(@backendMethodsImpl, generateBackendDispatcher());
     push(@backendMethodsImpl, generateBackendReportProtocolError());
+
+    @backendStubJS = generateBackendStubJS($interface);
 }
 
 sub generateFrontendFunction
@@ -462,6 +467,40 @@ EOF
     return split("\n", $messageParserBody);
 }
 
+sub generateBackendStubJS
+{
+    my $interface = shift;
+    my @backendFunctions = grep(!$_->signature->extendedAttributes->{"notify"}, @{$interface->functions});
+    my @JSStubs = map("    this._registerDelegate(\"" . $_->signature->name . "\");", @backendFunctions);
+
+    my $JSStubs = join("\n", @JSStubs);
+    my $inspectorBackendStubJS = << "EOF";
+$licenseTemplate
+
+WebInspector.InspectorBackendStub = function()
+{
+$JSStubs
+}
+
+WebInspector.InspectorBackendStub.prototype = {
+    _registerDelegate: function(methodName)
+    {
+        this[methodName] = this.sendMessageToBackend.bind(this, methodName);
+    },
+
+    sendMessageToBackend: function()
+    {
+        var message = JSON.stringify(Array.prototype.slice.call(arguments));
+        InspectorFrontendHost.sendMessageToBackend(message);
+    }
+}
+
+InspectorBackend = new WebInspector.InspectorBackendStub();
+
+EOF
+    return split("\n", $inspectorBackendStubJS);
+}
+
 sub generateHeader
 {
     my $className = shift;
@@ -563,6 +602,11 @@ sub finish
     print $HEADER join("\n", generateHeader($backendClassName, \%backendTypes, $backendConstructor, \@backendConstantDeclarations, \%backendMethods, $backendFooter));
     close($HEADER);
     undef($HEADER);
+
+    open(my $JS_STUB, ">$outputDir/$backendJSStubName.js") || die "Couldn't open file $outputDir/$backendJSStubName.js";
+    print $JS_STUB join("\n", @backendStubJS);
+    close($JS_STUB);
+    undef($JS_STUB);
 }
 
 1;
diff --git a/WebCore/inspector/front-end/InspectorBackendStub.js b/WebCore/inspector/front-end/InspectorBackendStub.js
deleted file mode 100644
index 8216326..0000000
--- a/WebCore/inspector/front-end/InspectorBackendStub.js
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (C) 2009, 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-WebInspector.InspectorBackendStub = function()
-{
-    this._registerDelegate("addInspectedNode");
-    this._registerDelegate("addScriptToEvaluateOnLoad");
-    this._registerDelegate("changeTagName");
-    this._registerDelegate("clearConsoleMessages");
-    this._registerDelegate("copyNode");
-    this._registerDelegate("deleteCookie");
-    this._registerDelegate("didEvaluateForTestInFrontend");
-    this._registerDelegate("disableMonitoringXHR");
-    this._registerDelegate("disableResourceTracking");
-    this._registerDelegate("disableSearchingForNode");
-    this._registerDelegate("disableTimeline");
-    this._registerDelegate("dispatchOnInjectedScript");
-    this._registerDelegate("enableMonitoringXHR");
-    this._registerDelegate("enableResourceTracking");
-    this._registerDelegate("enableSearchingForNode");
-    this._registerDelegate("enableTimeline");
-    this._registerDelegate("getApplicationCaches");
-    this._registerDelegate("getChildNodes");
-    this._registerDelegate("getCookies");
-    this._registerDelegate("getDatabaseTableNames");
-    this._registerDelegate("executeSQL");
-    this._registerDelegate("getDOMStorageEntries");
-    this._registerDelegate("getEventListenersForNode");
-    this._registerDelegate("getOuterHTML");
-    this._registerDelegate("getProfile");
-    this._registerDelegate("getProfileHeaders");
-    this._registerDelegate("removeProfile");
-    this._registerDelegate("clearProfiles");
-    this._registerDelegate("getResourceContent");
-    this._registerDelegate("highlightDOMNode");
-    this._registerDelegate("hideDOMNodeHighlight");
-    this._registerDelegate("performSearch");
-    this._registerDelegate("pushNodeByPathToFrontend");
-    this._registerDelegate("releaseWrapperObjectGroup");
-    this._registerDelegate("removeAllScriptsToEvaluateOnLoad");
-    this._registerDelegate("reloadPage");
-    this._registerDelegate("removeAttribute");
-    this._registerDelegate("removeDOMStorageItem");
-    this._registerDelegate("removeNode");
-    this._registerDelegate("saveApplicationSettings");
-    this._registerDelegate("saveSessionSettings");
-    this._registerDelegate("searchCanceled");
-    this._registerDelegate("setAttribute");
-    this._registerDelegate("setDOMStorageItem");
-    this._registerDelegate("setInjectedScriptSource");
-    this._registerDelegate("setOuterHTML");
-    this._registerDelegate("setTextNodeValue");
-    this._registerDelegate("startProfiling");
-    this._registerDelegate("startTimelineProfiler");
-    this._registerDelegate("stopProfiling");
-    this._registerDelegate("stopTimelineProfiler");
-    this._registerDelegate("storeLastActivePanel");
-    this._registerDelegate("takeHeapSnapshot");
-    this._registerDelegate("getProfilerLogLines");
-    this._registerDelegate("openInInspectedWindow");
-
-    this._registerDelegate("getAllStyles");
-    this._registerDelegate("getStyles");
-    this._registerDelegate("getComputedStyle");
-    this._registerDelegate("getInlineStyle");
-    this._registerDelegate("getStyleSheet");
-    this._registerDelegate("getRuleRanges");
-    this._registerDelegate("applyStyleText");
-    this._registerDelegate("setStyleText");
-    this._registerDelegate("setStyleProperty");
-    this._registerDelegate("toggleStyleEnabled");
-    this._registerDelegate("setRuleSelector");
-    this._registerDelegate("addRule");
-
-    this._registerDelegate("disableDebugger");
-    this._registerDelegate("editScriptSource");
-    this._registerDelegate("getScriptSource");
-    this._registerDelegate("enableDebugger");
-    this._registerDelegate("setBreakpoint");
-    this._registerDelegate("removeBreakpoint");
-    this._registerDelegate("activateBreakpoints");
-    this._registerDelegate("deactivateBreakpoints");
-    this._registerDelegate("pause");
-    this._registerDelegate("resume");
-    this._registerDelegate("stepIntoStatement");
-    this._registerDelegate("stepOutOfFunction");
-    this._registerDelegate("stepOverStatement");
-    this._registerDelegate("setPauseOnExceptionsState");
-}
-
-WebInspector.InspectorBackendStub.prototype = {
-    _registerDelegate: function(methodName)
-    {
-        this[methodName] = this.sendMessageToBackend.bind(this, methodName);
-    },
-
-    sendMessageToBackend: function()
-    {
-        var message = JSON.stringify(Array.prototype.slice.call(arguments));
-        InspectorFrontendHost.sendMessageToBackend(message);
-    }
-}
-
-InspectorBackend = new WebInspector.InspectorBackendStub();
diff --git a/WebCore/inspector/front-end/InspectorBackendStub.qrc b/WebCore/inspector/front-end/InspectorBackendStub.qrc
new file mode 100644
index 0000000..30f6d75
--- /dev/null
+++ b/WebCore/inspector/front-end/InspectorBackendStub.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/webkit/inspector">
+    <file>InspectorBackendStub.js</file>
+</qresource>
+</RCC>
+
diff --git a/WebCore/inspector/front-end/WebKit.qrc b/WebCore/inspector/front-end/WebKit.qrc
index febcad6..4901857 100644
--- a/WebCore/inspector/front-end/WebKit.qrc
+++ b/WebCore/inspector/front-end/WebKit.qrc
@@ -46,7 +46,6 @@
     <file>InjectedScript.js</file>
     <file>InjectedScriptAccess.js</file>
     <file>inspector.js</file>
-    <file>InspectorBackendStub.js</file>
     <file>InspectorFrontendHostStub.js</file>
     <file>KeyboardShortcut.js</file>
     <file>MetricsSidebarPane.js</file>
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index b718ae0..3e7a260 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,12 @@
+2010-08-17  Ilya Tikhonovsky  <loislo at chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: replace hand written InspectorBackendStub.js by generated one.
+        https://bugs.webkit.org/show_bug.cgi?id=43791
+
+        * WebKit.gyp:
+
 2010-08-17  Pavel Feldman  <pfeldman at chromium.org>
 
         Reviewed by Yury Semikhatsky.
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index 9d28a80..d12bee7 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -615,7 +615,10 @@
         {
             'target_name': 'inspector_resources',
             'type': 'none',
-            'dependencies': ['devtools_html'],
+            'dependencies': [
+                'devtools_html',
+                '../../WebCore/WebCore.gyp/WebCore.gyp:inspector_protocol_sources',
+            ],
             'conditions': [
                 ['debug_devtools==0', {
                     'dependencies': ['concatenated_devtools_js'],
@@ -627,6 +630,7 @@
                     'files': [
                         '<@(devtools_files)',
                         '<@(webinspector_files)',
+                        '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendStub.js',
                     ],
                     'conditions': [
                         ['debug_devtools==0', {
@@ -673,10 +677,12 @@
                     '<@(_input_page)',
                     '<@(webinspector_files)',
                     '<@(devtools_files)',
+                    '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendStub.js',
                 ],
                 'search_path': [
                     '../../WebCore/inspector/front-end',
                     'src/js',
+                    '<(SHARED_INTERMEDIATE_DIR)/webcore',
                     '<(chromium_src_dir)/v8/tools',
                 ],
                 'outputs': ['<(PRODUCT_DIR)/resources/inspector/DevTools.js'],
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index dabddaa..fb275c7 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,13 @@
+2010-08-17  Ilya Tikhonovsky  <loislo at chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: replace hand written InspectorBackendStub.js by generated one.
+        https://bugs.webkit.org/show_bug.cgi?id=43791
+
+        * WebCoreSupport/InspectorClientGtk.cpp:
+        (WebKit::InspectorClient::openInspectorFrontend):
+
 2010-08-17  Xan Lopez  <xlopez at igalia.com>
 
         Reviewed by Gustavo Noronha.
diff --git a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
index 67dc158..b0dd40e 100644
--- a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
@@ -82,9 +82,10 @@ void InspectorClient::openInspectorFrontend(InspectorController* controller)
     GOwnPtr<gchar> inspectorURI;
 
     // Make the Web Inspector work when running tests
-    if (g_file_test("WebCore/inspector/front-end/inspector.html", G_FILE_TEST_EXISTS)) {
+    // FixMe: it is not working. It should be not the subdirectory of the current directory, but a subdirectory of $(WEBKITOUTPUTDIR).
+    if (g_file_test("resources/inspector/inspector.html", G_FILE_TEST_EXISTS)) {
         GOwnPtr<gchar> currentDirectory(g_get_current_dir());
-        GOwnPtr<gchar> fullPath(g_strdup_printf("%s/WebCore/inspector/front-end/inspector.html", currentDirectory.get()));
+        GOwnPtr<gchar> fullPath(g_strdup_printf("%s/resources/inspector/inspector.html", currentDirectory.get()));
         inspectorURI.set(g_filename_to_uri(fullPath.get(), NULL, NULL));
     } else {
         inspectorURI.set(g_filename_to_uri(DATA_DIR"/webkitgtk-"WEBKITGTK_API_VERSION_STRING"/webinspector/inspector.html", NULL, NULL));

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list