Changeset 65608 in webkit
- Timestamp:
- Aug 18, 2010 7:36:58 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 deleted
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r65598 r65608 1 2010-08-17 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 Web Inspector: replace hand written InspectorBackendStub.js with generated one. 6 https://bugs.webkit.org/show_bug.cgi?id=43791 7 8 * GNUmakefile.am: 9 1 10 2010-08-18 Sheriff Bot <webkit.review.bot@gmail.com> 2 11 -
trunk/GNUmakefile.am
r65598 r65608 40 40 GENSOURCES_WEBKIT := $(top_builddir)/DerivedSources/webkit 41 41 GENPROGRAMS := $(top_builddir)/Programs 42 GENSOURCES_INSPECTOR := $(GENPROGRAMS)/resources/inspector 42 43 WebCore := $(srcdir)/WebCore 43 44 -
trunk/LayoutTests/ChangeLog
r65606 r65608 1 2010-08-17 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 WebInspector: inspector tests for GTK were added to Skip list. 6 They should be enabled later. 7 Bug for GTK https://bugs.webkit.org/show_bug.cgi?id=43977 8 https://bugs.webkit.org/show_bug.cgi?id=43791 9 10 * platform/gtk/Skipped: 11 1 12 2010-08-18 Pavel Podivilov <podivilov@chromium.org> 2 13 -
trunk/LayoutTests/platform/gtk/Skipped
r65598 r65608 5911 5911 fast/js/sputnik/Unicode/Unicode_510/S7.6_A5.3_T1.html 5912 5912 fast/js/sputnik/Unicode/Unicode_510/S7.6_A5.3_T2.html 5913 5914 # Inspector's tests were disabled. 5915 # https://bugs.webkit.org/show_bug.cgi?id=43977 5916 inspector/ 5917 http/tests/inspector/ 5918 http/tests/inspector-enabled/ -
trunk/WebCore/ChangeLog
r65607 r65608 1 2010-08-17 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 Web Inspector: replace hand written InspectorBackendStub.js with generated one. 6 New command-line flag was added to combine-javascript-resources. 7 It specifies the location of generated scripts. 8 https://bugs.webkit.org/show_bug.cgi?id=43791 9 10 * GNUmakefile.am: 11 * WebCore.gyp/WebCore.gyp: 12 * WebCore.gypi: 13 * WebCore.pri: 14 * WebCore.pro: 15 * WebCore.vcproj/WebCore.vcproj: 16 * WebCore.xcodeproj/project.pbxproj: 17 * combine-javascript-resources: 18 * inspector/CodeGeneratorInspector.pm: 19 * inspector/front-end/InspectorBackendStub.js: Removed. 20 * inspector/front-end/WebKit.qrc: 21 1 22 2010-08-18 Andrey Kosyakov <caseq@chromium.org> 2 23 -
trunk/WebCore/GNUmakefile.am
r65605 r65608 4621 4621 dist_webinspector_DATA = \ 4622 4622 $(WebCore)/English.lproj/localizedStrings.js \ 4623 DerivedSources/WebCore/InspectorBackendStub.js \ 4623 4624 $(shell ls $(WebCore)/inspector/front-end/*.js) \ 4624 4625 $(shell ls $(WebCore)/inspector/front-end/*.html) \ … … 4629 4630 $(shell ls $(WebCore)/inspector/front-end/Images/*.gif) \ 4630 4631 $(shell ls $(WebCore)/inspector/front-end/Images/*.png) 4632 4633 noinst_webinspectordir = ${GENSOURCES_INSPECTOR} 4634 noinst_webinspector_SCRIPTS = ${GENSOURCES_INSPECTOR}/inspector.html 4635 ${GENSOURCES_INSPECTOR}/inspector.html : 4636 mkdir -p ${GENSOURCES_INSPECTOR}/images 4637 cp ${dist_webinspector_DATA} ${GENSOURCES_INSPECTOR} 4638 cp ${dist_webinspectorimages_DATA} ${GENSOURCES_INSPECTOR}/images 4631 4639 4632 4640 webresourcesdir = ${datadir}/webkitgtk-@WEBKITGTK_API_VERSION@/images -
trunk/WebCore/WebCore.gyp/WebCore.gyp
r65598 r65608 268 268 'targets': [ 269 269 { 270 'target_name': 'inspector_protocol_sources', 271 'type': 'none', 272 'actions': [ 273 { 274 'action_name': 'generateInspectorProtocolSources', 275 # The second input item will be used as item name in vcproj. 276 # It is not possible to put Inspector.idl there because 277 # all idl files are marking as excluded by gyp generator. 278 'inputs': [ 279 '../bindings/scripts/generate-bindings.pl', 280 '../inspector/CodeGeneratorInspector.pm', 281 '../bindings/scripts/CodeGenerator.pm', 282 '../bindings/scripts/IDLParser.pm', 283 '../bindings/scripts/IDLStructure.pm', 284 '../inspector/Inspector.idl', 285 ], 286 'outputs': [ 287 '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendDispatcher.cpp', 288 '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendStub.js', 289 '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorBackendDispatcher.h', 290 '<(SHARED_INTERMEDIATE_DIR)/webcore/RemoteInspectorFrontend.cpp', 291 '<(SHARED_INTERMEDIATE_DIR)/webkit/RemoteInspectorFrontend.h', 292 ], 293 'variables': { 294 'generator_include_dirs': [ 295 ], 296 }, 297 'action': [ 298 'python', 299 'scripts/rule_binding.py', 300 '../inspector/Inspector.idl', 301 '<(SHARED_INTERMEDIATE_DIR)/webcore', 302 '<(SHARED_INTERMEDIATE_DIR)/webkit', 303 '--', 304 '<@(_inputs)', 305 '--', 306 '--defines', '<(feature_defines) LANGUAGE_JAVASCRIPT', 307 '--generator', 'Inspector', 308 '<@(generator_include_dirs)' 309 ], 310 'message': 'Generating Inspector protocol sources from Inspector.idl', 311 }, 312 ] 313 }, 314 { 270 315 'target_name': 'webcore_bindings_sources', 271 316 'type': 'none', … … 481 526 '--extraDefines', '<(feature_defines)' 482 527 ], 483 },484 {485 'action_name': 'RemoteInspectorFrontend',486 # The second input item will be used as item name in vcproj.487 # It is not possible to put Inspector.idl there because488 # all idl files are marking as excluded by gyp generator.489 'inputs': [490 '../bindings/scripts/generate-bindings.pl',491 '../inspector/CodeGeneratorInspector.pm',492 '../bindings/scripts/CodeGenerator.pm',493 '../bindings/scripts/IDLParser.pm',494 '../bindings/scripts/IDLStructure.pm',495 '../inspector/Inspector.idl',496 ],497 'outputs': [498 '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/InspectorBackendDispatcher.cpp',499 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/InspectorBackendDispatcher.h',500 '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/RemoteInspectorFrontend.cpp',501 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/RemoteInspectorFrontend.h',502 ],503 'variables': {504 'generator_include_dirs': [505 ],506 },507 'action': [508 'python',509 'scripts/rule_binding.py',510 '../inspector/Inspector.idl',511 '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings',512 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',513 '--',514 '<@(_inputs)',515 '--',516 '--defines', '<(feature_defines) LANGUAGE_JAVASCRIPT',517 '--generator', 'Inspector',518 '<@(generator_include_dirs)'519 ],520 'message': 'Generating Inspector interface classes from Inspector.idl',521 528 }, 522 529 { … … 698 705 'dependencies': [ 699 706 'webcore_bindings_sources', 707 'inspector_protocol_sources', 700 708 '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:pcre', 701 709 '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf', … … 750 758 751 759 # Additional .cpp files from the webcore_inspector_sources list. 752 '<(SHARED_INTERMEDIATE_DIR)/webcore/ bindings/RemoteInspectorFrontend.cpp',753 '<(SHARED_INTERMEDIATE_DIR)/webcore/ bindings/InspectorBackendDispatcher.cpp',760 '<(SHARED_INTERMEDIATE_DIR)/webcore/RemoteInspectorFrontend.cpp', 761 '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendDispatcher.cpp', 754 762 ], 755 763 'conditions': [ -
trunk/WebCore/WebCore.gypi
r65605 r65608 4165 4165 'inspector/front-end/HelpScreen.js', 4166 4166 'inspector/front-end/ImageView.js', 4167 'inspector/front-end/InspectorBackendStub.js',4168 4167 'inspector/front-end/InspectorFrontendHostStub.js', 4169 4168 'inspector/front-end/InjectedFakeWorker.js', -
trunk/WebCore/WebCore.pri
r65598 r65608 491 491 492 492 INSPECTOR_INTERFACES = inspector/Inspector.idl 493 INSPECTOR_BACKEND_STUB_QRC = inspector/front-end/InspectorBackendStub.qrc 493 494 494 495 mathmlnames.output = $${WC_GENERATED_SOURCES_DIR}/MathMLNames.cpp … … 565 566 addExtraCompiler(inspectorIDL) 566 567 568 inspectorBackendStub.wkAddOutputToSources = false 569 inspectorBackendStub.output = generated/InspectorBackendStub.qrc 570 inspectorBackendStub.input = INSPECTOR_BACKEND_STUB_QRC 571 # standard QMAKE_COPY and COPY_FILE are failing because copy/xcopy doesn't work with back slashes and windows doesn't have cp. 572 inspectorBackendStub.commands = perl -e\"use File::Copy; copy(\$$ARGV[0], \$$ARGV[1]) or die;\" $$PWD/$$INSPECTOR_BACKEND_STUB_QRC $${WC_GENERATED_SOURCES_DIR}/InspectorBackendStub.qrc 573 addExtraCompiler(inspectorBackendStub) 574 567 575 # GENERATOR 3: tokenizer (flex) 568 576 tokenizer.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.cpp -
trunk/WebCore/WebCore.pro
r65605 r65608 137 137 $$PWD/../WebCore/WebCore.qrc 138 138 139 include_webinspector: RESOURCES += $$PWD/../WebCore/inspector/front-end/WebKit.qrc 139 include_webinspector: RESOURCES += $$PWD/../WebCore/inspector/front-end/WebKit.qrc $$WC_GENERATED_SOURCES_DIR/InspectorBackendStub.qrc 140 140 141 141 enable_fast_mobile_scrolling: DEFINES += ENABLE_FAST_MOBILE_SCROLLING=1 -
trunk/WebCore/WebCore.vcproj/copyInspectorFiles.cmd
r65598 r65608 1 1 mkdir 2>NUL "%WebKitOutputDir%\bin\WebKit.resources\inspector" 2 2 xcopy /y /d /s /exclude:xcopy.excludes "%ProjectDir%..\inspector\front-end\*" "%WebKitOutputDir%\bin\WebKit.resources\inspector" 3 xcopy /y /d /s /exclude:xcopy.excludes "%WebKitOutputDir%\obj\WebCore\DerivedSources\InspectorBackendStub.js" "%WebKitOutputDir%\bin\WebKit.resources\inspector" 3 4 mkdir 2>NUL "%WebKitOutputDir%\bin\WebKit.resources\en.lproj" 4 5 xcopy /y /d /s /exclude:xcopy.excludes "%ProjectDir%..\English.lproj\localizedStrings.js" "%WebKitOutputDir%\bin\WebKit.resources\en.lproj" -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r65605 r65608 20465 20465 runOnlyForDeploymentPostprocessing = 0; 20466 20466 shellPath = /bin/sh; 20467 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";20467 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"; 20468 20468 }; 20469 20469 1C81BA330E97357C00266E07 /* Copy Inspector Resources */ = { … … 20481 20481 runOnlyForDeploymentPostprocessing = 0; 20482 20482 shellPath = /bin/sh; 20483 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";20483 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"; 20484 20484 }; 20485 20485 5D0D540D0E9862F60029E223 /* Check For Weak VTables and Externals */ = { -
trunk/WebCore/combine-javascript-resources
r65598 r65608 32 32 use File::Path; 33 33 34 my $generatedScriptsDirectory; 34 35 my $outputDirectory; 35 36 my $scriptName; … … 38 39 GetOptions('output-dir=s' => \$outputDirectory, 39 40 'output-script-name=s' => \$scriptName, 41 'generated-scripts-dir=s' => \$generatedScriptsDirectory, 40 42 'input-html=s' => \$htmlFile); 41 43 … … 63 65 while ($headContents =~ m/<script.*src="([^"]*)"[^>]*>/gi) { 64 66 local $/; 65 open SCRIPT_IN, "$ htmlDirectory/$1" or die "Can't open $htmlDirectory/$1: $!";67 open SCRIPT_IN, "$generatedScriptsDirectory/$1" or open SCRIPT_IN, "$htmlDirectory/$1" or die "Can't open $htmlDirectory/$1: $!"; 66 68 print SCRIPT_OUT "/* $1 */\n\n"; 67 69 print SCRIPT_OUT <SCRIPT_IN>; -
trunk/WebCore/inspector/CodeGeneratorInspector.pm
r65598 r65608 139 139 140 140 my $backendClassName; 141 my $backendJSStubName; 141 142 my %backendTypes; 142 143 my %backendMethods; … … 146 147 my @backendConstantDefinitions; 147 148 my $backendFooter; 149 my @backendStubJS; 148 150 149 151 my $frontendClassName; … … 205 207 206 208 $backendClassName = $className . "BackendDispatcher"; 209 $backendJSStubName = $className . "BackendStub"; 207 210 my @backendHead; 208 211 push(@backendHead, " ${backendClassName}(InspectorController* inspectorController) : m_inspectorController(inspectorController) { }"); … … 239 242 push(@backendMethodsImpl, generateBackendDispatcher()); 240 243 push(@backendMethodsImpl, generateBackendReportProtocolError()); 244 245 @backendStubJS = generateBackendStubJS($interface); 241 246 } 242 247 … … 463 468 } 464 469 470 sub generateBackendStubJS 471 { 472 my $interface = shift; 473 my @backendFunctions = grep(!$_->signature->extendedAttributes->{"notify"}, @{$interface->functions}); 474 my @JSStubs = map(" this._registerDelegate(\"" . $_->signature->name . "\");", @backendFunctions); 475 476 my $JSStubs = join("\n", @JSStubs); 477 my $inspectorBackendStubJS = << "EOF"; 478 $licenseTemplate 479 480 WebInspector.InspectorBackendStub = function() 481 { 482 $JSStubs 483 } 484 485 WebInspector.InspectorBackendStub.prototype = { 486 _registerDelegate: function(methodName) 487 { 488 this[methodName] = this.sendMessageToBackend.bind(this, methodName); 489 }, 490 491 sendMessageToBackend: function() 492 { 493 var message = JSON.stringify(Array.prototype.slice.call(arguments)); 494 InspectorFrontendHost.sendMessageToBackend(message); 495 } 496 } 497 498 InspectorBackend = new WebInspector.InspectorBackendStub(); 499 500 EOF 501 return split("\n", $inspectorBackendStubJS); 502 } 503 465 504 sub generateHeader 466 505 { … … 564 603 close($HEADER); 565 604 undef($HEADER); 605 606 open(my $JS_STUB, ">$outputDir/$backendJSStubName.js") || die "Couldn't open file $outputDir/$backendJSStubName.js"; 607 print $JS_STUB join("\n", @backendStubJS); 608 close($JS_STUB); 609 undef($JS_STUB); 566 610 } 567 611 -
trunk/WebCore/inspector/front-end/WebKit.qrc
r65598 r65608 47 47 <file>InjectedScriptAccess.js</file> 48 48 <file>inspector.js</file> 49 <file>InspectorBackendStub.js</file>50 49 <file>InspectorFrontendHostStub.js</file> 51 50 <file>KeyboardShortcut.js</file> -
trunk/WebKit/chromium/ChangeLog
r65604 r65608 1 2010-08-17 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 Web Inspector: replace hand written InspectorBackendStub.js with generated one. 6 https://bugs.webkit.org/show_bug.cgi?id=43791 7 8 * WebKit.gyp: 9 1 10 2010-08-18 Sheriff Bot <webkit.review.bot@gmail.com> 2 11 -
trunk/WebKit/chromium/WebKit.gyp
r65598 r65608 616 616 'target_name': 'inspector_resources', 617 617 'type': 'none', 618 'dependencies': ['devtools_html'], 618 'dependencies': [ 619 'devtools_html', 620 '../../WebCore/WebCore.gyp/WebCore.gyp:inspector_protocol_sources', 621 ], 619 622 'conditions': [ 620 623 ['debug_devtools==0', { … … 628 631 '<@(devtools_files)', 629 632 '<@(webinspector_files)', 633 '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendStub.js', 630 634 ], 631 635 'conditions': [ … … 674 678 '<@(webinspector_files)', 675 679 '<@(devtools_files)', 680 '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendStub.js', 676 681 ], 677 682 'search_path': [ 678 683 '../../WebCore/inspector/front-end', 679 684 'src/js', 685 '<(SHARED_INTERMEDIATE_DIR)/webcore', 680 686 '<(chromium_src_dir)/v8/tools', 681 687 ], -
trunk/WebKit/gtk/ChangeLog
r65598 r65608 1 2010-08-17 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 Web Inspector: replace hand written InspectorBackendStub.js with generated one. 6 https://bugs.webkit.org/show_bug.cgi?id=43791 7 8 * WebCoreSupport/InspectorClientGtk.cpp: 9 (WebKit::InspectorClient::openInspectorFrontend): 10 1 11 2010-08-18 Sheriff Bot <webkit.review.bot@gmail.com> 2 12 -
trunk/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
r65598 r65608 83 83 84 84 // Make the Web Inspector work when running tests 85 if (g_file_test("WebCore/inspector/front-end/inspector.html", G_FILE_TEST_EXISTS)) { 85 // FixMe: it is not working. It should be not the subdirectory of the current directory, but a subdirectory of $(WEBKITOUTPUTDIR). 86 if (g_file_test("resources/inspector/inspector.html", G_FILE_TEST_EXISTS)) { 86 87 GOwnPtr<gchar> currentDirectory(g_get_current_dir()); 87 GOwnPtr<gchar> fullPath(g_strdup_printf("%s/ WebCore/inspector/front-end/inspector.html", currentDirectory.get()));88 GOwnPtr<gchar> fullPath(g_strdup_printf("%s/resources/inspector/inspector.html", currentDirectory.get())); 88 89 inspectorURI.set(g_filename_to_uri(fullPath.get(), NULL, NULL)); 89 90 } else {
Note: See TracChangeset
for help on using the changeset viewer.