summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-05-06 11:45:16 +0100
committerSteve Block <steveblock@google.com>2011-05-12 13:44:10 +0100
commitcad810f21b803229eb11403f9209855525a25d57 (patch)
tree29a6fd0279be608e0fe9ffe9841f722f0f4e4269 /Tools
parent121b0cf4517156d0ac5111caf9830c51b69bae8f (diff)
downloadexternal_webkit-cad810f21b803229eb11403f9209855525a25d57.zip
external_webkit-cad810f21b803229eb11403f9209855525a25d57.tar.gz
external_webkit-cad810f21b803229eb11403f9209855525a25d57.tar.bz2
Merge WebKit at r75315: Initial merge by git.
Change-Id: I570314b346ce101c935ed22a626b48c2af266b84
Diffstat (limited to 'Tools')
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/config.json9
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg16
-rw-r--r--Tools/BuildSlaveSupport/built-product-archive26
-rw-r--r--Tools/CMakeListsWinCE.txt2
-rw-r--r--Tools/ChangeLog1519
-rw-r--r--Tools/DumpRenderTree/AccessibilityTextMarker.cpp4
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.gypi6
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginCommon.vsprops2
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginPostBuild.cmd2
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginPreBuild.cmd4
-rw-r--r--Tools/DumpRenderTree/cf/WebArchiveDumpSupport.h4
-rw-r--r--Tools/DumpRenderTree/chromium/DumpRenderTree.cpp70
-rw-r--r--Tools/DumpRenderTree/chromium/LayoutTestController.cpp19
-rw-r--r--Tools/DumpRenderTree/chromium/TestShell.cpp18
-rw-r--r--Tools/DumpRenderTree/chromium/TestShell.h24
-rw-r--r--Tools/DumpRenderTree/chromium/TestShellMac.mm4
-rw-r--r--Tools/DumpRenderTree/chromium/TextInputController.cpp27
-rw-r--r--Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.h58
-rw-r--r--Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.mm186
-rw-r--r--Tools/DumpRenderTree/chromium/WebViewHost.cpp10
-rw-r--r--Tools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp10
-rw-r--r--Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp6
-rw-r--r--Tools/DumpRenderTree/mac/AccessibilityControllerMac.mm6
-rw-r--r--Tools/DumpRenderTree/mac/AccessibilityTextMarkerMac.mm4
-rw-r--r--Tools/DumpRenderTree/mac/ObjCController.m4
-rw-r--r--Tools/DumpRenderTree/qt/DumpRenderTree.pro10
-rw-r--r--Tools/DumpRenderTree/qt/ImageDiff.pro2
-rw-r--r--Tools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro10
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeCommon.vsprops2
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreePostBuild.cmd68
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreePreBuild.cmd16
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffCommon.vsprops2
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffPostBuild.cmd2
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffPreBuild.cmd4
-rw-r--r--Tools/DumpRenderTree/wscript6
-rw-r--r--Tools/EWebLauncher/main.c23
-rw-r--r--Tools/FindSafari/FindSafari.vcproj61
-rw-r--r--Tools/GNUmakefile.am14
-rw-r--r--Tools/GtkLauncher/main.c22
-rw-r--r--Tools/MiniBrowser/Configurations/MiniBrowserCommon.vsprops2
-rw-r--r--Tools/MiniBrowser/MiniBrowserPostBuild.cmd60
-rw-r--r--Tools/MiniBrowser/MiniBrowserPreBuild.cmd4
-rw-r--r--Tools/MiniBrowser/mac/AppDelegate.m2
-rw-r--r--Tools/MiniBrowser/mac/BrowserWindowController.m6
-rw-r--r--Tools/MiniBrowser/qt/BrowserWindow.cpp42
-rw-r--r--Tools/MiniBrowser/qt/BrowserWindow.h7
-rw-r--r--Tools/MiniBrowser/qt/main.cpp3
-rw-r--r--Tools/QtTestBrowser/main.cpp21
-rw-r--r--Tools/QtTestBrowser/mainwindow.cpp1
-rw-r--r--Tools/QtTestBrowser/webview.h2
-rw-r--r--Tools/QueueStatusServer/handlers/queuestatus.py20
-rw-r--r--Tools/QueueStatusServer/index.yaml7
-rw-r--r--Tools/QueueStatusServer/main.py1
-rw-r--r--Tools/QueueStatusServer/templates/includes/singlequeuestatus.html2
-rw-r--r--Tools/QueueStatusServer/templates/queuestatus.html4
-rw-r--r--Tools/Scripts/VCSUtils.pm139
-rwxr-xr-xTools/Scripts/build-jsc8
-rwxr-xr-xTools/Scripts/build-webkit72
-rwxr-xr-xTools/Scripts/do-file-rename6
-rwxr-xr-xTools/Scripts/do-webcore-rename7
-rwxr-xr-xTools/Scripts/generate-qt-inspector-resource8
-rwxr-xr-xTools/Scripts/prepare-ChangeLog28
-rwxr-xr-xTools/Scripts/run-api-tests60
-rwxr-xr-xTools/Scripts/run-bindings-tests8
-rwxr-xr-xTools/Scripts/run-iexploder-tests2
-rwxr-xr-xTools/Scripts/run-javascriptcore-tests2
-rwxr-xr-xTools/Scripts/run-pageloadtest2
-rw-r--r--Tools/Scripts/run-qtwebkit-tests38
-rwxr-xr-xTools/Scripts/run-sunspider11
-rwxr-xr-xTools/Scripts/sunspider-compare-results6
-rwxr-xr-xTools/Scripts/svn-apply18
-rwxr-xr-xTools/Scripts/update-iexploder-cssproperties6
-rwxr-xr-xTools/Scripts/update-javascriptcore-test-results2
-rwxr-xr-xTools/Scripts/update-sources-list.py4
-rwxr-xr-xTools/Scripts/update-webkit-localizable-strings2
-rw-r--r--Tools/Scripts/webkitdirs.pm103
-rw-r--r--Tools/Scripts/webkitperl/VCSUtils_unittest/fixChangeLogPatch.pl36
-rw-r--r--Tools/Scripts/webkitperl/VCSUtils_unittest/fixChangeLogPatchThenSetChangeLogDateAndReviewer.pl92
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/__init__.py2
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/api.py12
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/diff_parser.py13
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/scm.py7
-rw-r--r--Tools/Scripts/webkitpy/common/config/build.py8
-rw-r--r--Tools/Scripts/webkitpy/common/config/build_unittest.py22
-rw-r--r--Tools/Scripts/webkitpy/common/config/committers.py5
-rw-r--r--Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py1
-rw-r--r--Tools/Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py10
-rw-r--r--Tools/Scripts/webkitpy/common/net/layouttestresults.py101
-rw-r--r--Tools/Scripts/webkitpy/common/net/layouttestresults_unittest.py31
-rw-r--r--Tools/Scripts/webkitpy/common/net/networktransaction.py3
-rw-r--r--Tools/Scripts/webkitpy/common/net/networktransaction_unittest.py4
-rw-r--r--Tools/Scripts/webkitpy/common/net/statusserver.py9
-rw-r--r--Tools/Scripts/webkitpy/common/system/directoryfileset.py77
-rw-r--r--Tools/Scripts/webkitpy/common/system/directoryfileset_unittest.py70
-rw-r--r--Tools/Scripts/webkitpy/common/system/fileset.py64
-rw-r--r--Tools/Scripts/webkitpy/common/system/filesystem.py8
-rw-r--r--Tools/Scripts/webkitpy/common/system/filesystem_mock.py11
-rw-r--r--Tools/Scripts/webkitpy/common/system/zipfileset.py65
-rw-r--r--Tools/Scripts/webkitpy/common/system/zipfileset_unittest.py95
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/deduplicate_tests_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py8
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py1
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py4
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/layout_package/test_failures.py9
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/layout_package/test_failures_unittest.py10
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/layout_package/test_results.py19
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/layout_package/test_results_unittest.py10
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py5
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium.py7
-rwxr-xr-xTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py8
-rw-r--r--Tools/Scripts/webkitpy/style/checker.py18
-rwxr-xr-xTools/Scripts/webkitpy/style/checker_unittest.py21
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/cpp.py266
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py296
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py31
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py18
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/flakytestreporter.py16
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py18
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/irc_command.py36
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/sheriff.py10
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/sheriffircbot_unittest.py27
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/download.py2
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/download_unittest.py4
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/queries.py4
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/queues.py6
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/queues_unittest.py15
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/rebaseline.py3
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py14
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/upload.py3
-rw-r--r--Tools/Scripts/webkitpy/tool/mocktool.py8
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/__init__.py1
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/abstractstep.py1
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectory.py4
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/commit.py6
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/update.py3
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/updatechangelogswithreviewer.py5
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/validatechangelogs.py58
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/validatechangelogs_unittest.py55
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/validatereviewer.py9
-rwxr-xr-xTools/Scripts/wkstyle89
-rwxr-xr-xTools/TestResultServer/model/jsonresults.py21
-rwxr-xr-xTools/TestResultServer/model/jsonresults_unittest.py30
-rw-r--r--Tools/TestWebKitAPI/Configurations/TestWebKitAPICommon.vsprops2
-rw-r--r--Tools/TestWebKitAPI/win/TestWebKitAPIGenerated.vcproj12
-rw-r--r--Tools/TestWebKitAPI/win/TestWebKitAPIGeneratedCommon.vsprops7
-rw-r--r--Tools/TestWebKitAPI/win/TestWebKitAPIPostBuild.cmd2
-rw-r--r--Tools/TestWebKitAPI/win/TestWebKitAPIPreBuild.cmd4
-rwxr-xr-xTools/TestWebKitAPI/win/copy-resources.cmd2
-rw-r--r--Tools/WebKitAPITest/WebKitAPITestCommon.vsprops2
-rw-r--r--Tools/WebKitAPITest/WebKitAPITestPostBuild.cmd2
-rw-r--r--Tools/WebKitAPITest/WebKitAPITestPreBuild.cmd4
-rw-r--r--Tools/WebKitTestRunner/Configurations/InjectedBundleCommon.vsprops2
-rw-r--r--Tools/WebKitTestRunner/Configurations/WebKitTestRunnerCommon.vsprops2
-rw-r--r--Tools/WebKitTestRunner/DerivedSources.pro14
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp3
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp13
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h2
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp3
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro12
-rw-r--r--Tools/WebKitTestRunner/TestController.cpp4
-rw-r--r--Tools/WebKitTestRunner/qt/WebKitTestRunner.pro8
-rw-r--r--Tools/WebKitTestRunner/win/InjectedBundle.vcproj12
-rw-r--r--Tools/WebKitTestRunner/win/InjectedBundleGeneratedCommon.vsprops10
-rw-r--r--Tools/WebKitTestRunner/win/InjectedBundlePostBuild.cmd2
-rw-r--r--Tools/WebKitTestRunner/win/InjectedBundlePreBuild.cmd4
-rw-r--r--Tools/WebKitTestRunner/win/WebKitTestRunnerPostBuild.cmd64
-rw-r--r--Tools/WebKitTestRunner/win/WebKitTestRunnerPreBuild.cmd4
-rw-r--r--Tools/WinCELauncher/main.cpp1
-rw-r--r--Tools/WinLauncher/WinLauncherCommon.vsprops2
-rw-r--r--Tools/WinLauncher/WinLauncherPostBuild.cmd2
-rw-r--r--Tools/WinLauncher/WinLauncherPreBuild.cmd4
-rw-r--r--Tools/gdb/webkit.py39
-rw-r--r--Tools/iExploder/htdocs/config.rb6
-rw-r--r--Tools/iExploder/htdocs/cssproperties.in426
-rw-r--r--Tools/iExploder/htdocs/cssvalues.in339
-rw-r--r--Tools/iExploder/htdocs/htmlattrs.in373
-rw-r--r--Tools/iExploder/htdocs/htmltags.in155
-rw-r--r--Tools/iExploder/htdocs/htmlvalues.in35
-rwxr-xr-xTools/iExploder/htdocs/iexploder.cgi45
-rw-r--r--Tools/iExploder/htdocs/iexploder.rb337
-rw-r--r--Tools/iExploder/htdocs/index.html34
-rwxr-xr-xTools/iExploder/htdocs/webserver.rb75
-rwxr-xr-xTools/iExploder/iexploder-1.7.2/tools/update_html_tags_from_sources.sh22
-rwxr-xr-xTools/iExploder/tools/lasthit.rb53
-rwxr-xr-xTools/iExploder/tools/osx_last_crash.rb48
-rwxr-xr-xTools/iExploder/tools/showtest.rb43
-rw-r--r--Tools/wx/browser/wscript2
-rw-r--r--Tools/wx/build/settings.py192
188 files changed, 4427 insertions, 2927 deletions
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/config.json b/Tools/BuildSlaveSupport/build.webkit.org-config/config.json
index 19d7535..6e03f7a 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/config.json
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/config.json
@@ -57,6 +57,8 @@
{ "name": "google-new-tests", "platform": "mac-leopard" },
{ "name": "wincairo-1", "platform": "wincairo" },
+
+ { "name": "wince-1", "platform": "wince" },
{ "name": "efl-linux-slave-1", "platform": "efl" }
],
@@ -214,6 +216,11 @@
"slavenames": ["wincairo-1"]
},
{
+ "name": "WinCE Release (Build)", "type": "Build", "builddir": "wince-release",
+ "platform": "wince", "configuration": "release", "architectures": ["i386"],
+ "slavenames": ["wince-1"]
+ },
+ {
"name": "EFL Linux Release (Build)", "type": "Build", "builddir": "efl-linux-release",
"platform": "efl", "configuration": "release", "architectures": ["i386"],
"slavenames": ["efl-linux-slave-1"]
@@ -228,7 +235,7 @@
"Qt Windows 32-bit Release", "Qt Windows 32-bit Debug",
"Chromium Win Release", "Chromium Mac Release", "Chromium Linux Release",
"Chromium Win Release (Tests)", "Chromium Mac Release (Tests)", "Chromium Linux Release (Tests)",
- "WinCairo Debug (Build)", "EFL Linux Release (Build)"]
+ "WinCairo Debug (Build)", "WinCE Release (Build)", "EFL Linux Release (Build)"]
},
{ "type": "PlatformSpecificScheduler", "platform": "win", "branch": "trunk", "treeStableTimer": 45.0,
"builderNames": ["Windows Release (Build)", "Windows Debug (Build)"]
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg b/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg
index df9dcb0..5d0d6c0 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg
@@ -15,6 +15,7 @@ from buildbot.status.builder import SUCCESS, FAILURE, WARNINGS, SKIPPED
from twisted.internet import defer
+import os
import re
import simplejson
@@ -80,7 +81,7 @@ class CleanupChromiumLinuxCrashLogs(shell.ShellCommand):
def appendCustomBuildFlags(step, platform):
- if platform in ('gtk', 'wx', 'qt', 'chromium', 'wincairo', 'efl'):
+ if platform in ('chromium', 'efl', 'gtk', 'qt', 'wincairo', 'wince', 'wx'):
step.setCommand(step.command + ['--' + platform])
@@ -144,7 +145,7 @@ class RunJavaScriptCoreTests(shell.Test):
description = ["jscore-tests running"]
descriptionDone = ["jscore-tests"]
command = ["perl", "./Tools/Scripts/run-javascriptcore-tests", WithProperties("--%(configuration)s")]
- logfiles = {'results': 'JavaScriptCore/tests/mozilla/actual.html'}
+ logfiles = {'results': 'Source/JavaScriptCore/tests/mozilla/actual.html'}
def __init__(self, skipBuild=False, *args, **kwargs):
self.skipBuild = skipBuild
@@ -200,9 +201,14 @@ class RunWebKitTests(shell.Test):
self.addFactoryArguments(skipBuild=skipBuild)
def start(self):
- appendCustomBuildFlags(self, self.getProperty('platform'))
+ platform = self.getProperty('platform')
+ appendCustomBuildFlags(self, platform)
+ if platform == "win":
+ rootArgument = ['--root=' + os.path.join("WebKitBuild", self.getProperty('configuration'), "bin")]
+ else:
+ rootArgument = ['--root=WebKitBuild/bin']
if self.skipBuild:
- self.setCommand(self.command + ['--root=WebKitBuild/bin'])
+ self.setCommand(self.command + rootArgument)
return shell.Test.start(self)
def commandComplete(self, cmd):
@@ -312,7 +318,7 @@ class RunQtAPITests(shell.Test):
description = ["API tests running"]
descriptionDone = ["API tests"]
command = ["python", "./Tools/Scripts/run-qtwebkit-tests",
- "--output-file=qt-unit-tests.html", "--do-not-open-results",
+ "--output-file=qt-unit-tests.html", "--do-not-open-results", "--timeout=30",
WithProperties("WebKitBuild/%(configuration_pretty)s/WebKit/qt/tests/")]
def start(self):
diff --git a/Tools/BuildSlaveSupport/built-product-archive b/Tools/BuildSlaveSupport/built-product-archive
index b27cf77..611d006 100644
--- a/Tools/BuildSlaveSupport/built-product-archive
+++ b/Tools/BuildSlaveSupport/built-product-archive
@@ -58,12 +58,13 @@ def archiveBuiltProduct(configuration, platform):
if e.errno != 2:
raise
+ configurationBuildDirectory = os.path.join(buildDirectory, configuration.title())
+
if platform == 'mac':
- configurationBuildDirectory = os.path.join(buildDirectory, configuration.title())
return subprocess.call(["ditto", "-c", "-k", "--keepParent", "--sequesterRsrc", configurationBuildDirectory, archiveFile])
elif platform == 'win':
- binDirectory = os.path.join(buildDirectory, "bin")
- thinDirectory = os.path.join(buildDirectory, "thin")
+ binDirectory = os.path.join(configurationBuildDirectory, "bin")
+ thinDirectory = os.path.join(configurationBuildDirectory, "thin")
thinBinDirectory = os.path.join(thinDirectory, "bin")
if os.path.isdir(thinDirectory):
@@ -82,17 +83,17 @@ def archiveBuiltProduct(configuration, platform):
shutil.rmtree(thinDirectory)
elif platform == 'qt':
- configurationBuildDirectory = os.path.join(buildDirectory, configuration.title())
thinDirectory = os.path.join(configurationBuildDirectory, "thin")
if os.path.isdir(thinDirectory):
shutil.rmtree(thinDirectory)
os.mkdir(thinDirectory)
- for dirname in ["bin", "lib", "JavaScriptCore"]:
- fromDir = os.path.join(configurationBuildDirectory, dirname)
+ for dirname in ["bin", "lib", "Source/JavaScriptCore"]:
+ fromDir = os.path.join(configurationBuildDirectory, dirname, "*")
toDir = os.path.join(thinDirectory, dirname)
- if subprocess.call(["cp", "-R", fromDir, toDir]):
+ os.makedirs(toDir)
+ if subprocess.call('cp -R %s %s' % (fromDir, toDir), shell=True):
return 1
for root, dirs, files in os.walk(thinDirectory, topdown=False):
@@ -107,10 +108,9 @@ def extractBuiltProduct(configuration, platform):
assert platform in ('mac', 'win','qt')
archiveFile = os.path.join(buildDirectory, configuration + ".zip")
+ configurationBuildDirectory = os.path.join(buildDirectory, configuration.title())
if platform == 'mac':
- configurationBuildDirectory = os.path.join(buildDirectory, configuration.title())
-
if os.path.isdir(configurationBuildDirectory):
shutil.rmtree(configurationBuildDirectory)
@@ -119,11 +119,11 @@ def extractBuiltProduct(configuration, platform):
os.unlink(archiveFile)
elif platform == 'win':
- binDirectory = os.path.join(buildDirectory, "bin")
+ binDirectory = os.path.join(configurationBuildDirectory, "bin")
if os.path.isdir(binDirectory):
shutil.rmtree(binDirectory)
- os.mkdir(binDirectory)
+ os.makedirs(binDirectory)
safariPath = subprocess.Popen('cygpath -w "$PROGRAMFILES"/Safari',
shell=True, stdout=subprocess.PIPE).communicate()[0].strip()
@@ -131,12 +131,10 @@ def extractBuiltProduct(configuration, platform):
if subprocess.call('cp -R "%s"/*.dll "%s"/*.resources %s' % (safariPath, safariPath, binDirectory), shell=True):
return 1
- if subprocess.call(["unzip", "-o", archiveFile], cwd=buildDirectory):
+ if subprocess.call(["unzip", "-o", archiveFile], cwd=configurationBuildDirectory):
return 1
elif platform == 'qt':
- configurationBuildDirectory = os.path.join(buildDirectory, configuration.title())
-
if os.path.isdir(configurationBuildDirectory):
shutil.rmtree(configurationBuildDirectory)
diff --git a/Tools/CMakeListsWinCE.txt b/Tools/CMakeListsWinCE.txt
index 6050499..89f6b97 100644
--- a/Tools/CMakeListsWinCE.txt
+++ b/Tools/CMakeListsWinCE.txt
@@ -12,7 +12,7 @@ SET(WinCELauncher_INCLUDE_DIRECTORIES
)
SET(WinCELauncher_SOURCES
- ${WEBKITTOOLS_DIR}/WinCELauncher/main.cpp
+ ${TOOLS_DIR}/WinCELauncher/main.cpp
)
SET(WinCELauncher_LIBRARIES
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index 65aaa70..364e941 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,1522 @@
+2011-01-08 Adam Barth <abarth@webkit.org>
+
+ Teach svn-apply how to re-write WebCore to Source/WebCore.
+
+ * Scripts/VCSUtils.pm:
+
+2011-01-07 Adam Barth <abarth@webkit.org>
+
+ Rubber-stamped by Eric Seidel.
+
+ Move WebCore to Source
+ https://bugs.webkit.org/show_bug.cgi?id=52050
+
+ Update the tools to understand WebCore's new location.
+
+ * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
+ * DumpRenderTree/wscript:
+ * GNUmakefile.am:
+ * Scripts/build-webkit:
+ * Scripts/do-file-rename:
+ * Scripts/do-webcore-rename:
+ * Scripts/generate-qt-inspector-resource:
+ * Scripts/prepare-ChangeLog:
+ * Scripts/run-bindings-tests:
+ * Scripts/update-iexploder-cssproperties:
+ * Scripts/update-sources-list.py:
+ * Scripts/update-webkit-localizable-strings:
+ * Scripts/webkitdirs.pm:
+ * Scripts/webkitpy/common/config/build.py:
+ * Scripts/webkitpy/common/config/build_unittest.py:
+ * Scripts/webkitpy/layout_tests/deduplicate_tests_unittest.py:
+ * Scripts/webkitpy/style/checker.py:
+ * Scripts/webkitpy/style/checker_unittest.py:
+ * WebKitTestRunner/DerivedSources.pro:
+ * WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro:
+ * iExploder/iexploder-1.7.2/tools/update_html_tags_from_sources.sh:
+ * wx/browser/wscript:
+ * wx/build/settings.py:
+
+2011-01-07 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Make WebKitTestRunner rest between loads more robust to avoid test crashes
+ https://bugs.webkit.org/show_bug.cgi?id=52086
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::didReceiveMessage):
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+ (WTR::LayoutTestController::notifyDone):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::resetStateToConsistentValues):
+ (WTR::TestController::run):
+
+2011-01-07 James Robinson <jamesr@chromium.org>
+
+ Revert "Implement mozilla's animationTime property"
+ https://bugs.webkit.org/show_bug.cgi?id=51952
+
+ This approach isn't quite right.
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::paintInvalidatedRegion):
+
+2011-01-07 Adam Roben <aroben@apple.com>
+
+ Build master fix
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (RunWebKitTests.start): Don't try to concatenate a list and a string.
+
+2011-01-07 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
+
+ Reviewed by Csaba Osztrogonác.
+
+ run-qtwebkit-tests should be able to kill a testsuite.
+
+ Add new option in the script that can setup a timeout for a test.
+ If the test execution takes more then specified time then the test
+ would be terminated.
+
+ [Qt] run-qtwebkit-tests needs timeout
+ https://bugs.webkit.org/show_bug.cgi?id=51894
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ * Scripts/run-qtwebkit-tests:
+
+2011-01-07 Csaba Osztrogonác <ossy@webkit.org>
+
+ Unreviewed fix after r75233.
+
+ Based on idea from Eric Seidel.
+
+ Add remote zip file handling to webkitpy.
+ https://bugs.webkit.org/show_bug.cgi?id=50901
+
+ * Scripts/webkitpy/common/system/fileset.py: Make python 2.5 happy.
+
+2011-01-07 Shane Stephens <shanestephens@google.com>
+
+ Reviewed by Eric Seidel.
+
+ svn-apply: should support git binary delta diffs
+ https://bugs.webkit.org/show_bug.cgi?id=38864
+
+ * Scripts/VCSUtils.pm:
+ * Scripts/svn-apply:
+
+2011-01-06 Julie Parent <jparent@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Test Result Server not removing old results.
+ https://bugs.webkit.org/show_bug.cgi?id=52012
+
+ * TestResultServer/model/jsonresults.py:
+ Fix off-by-one: Truncate if >= num_runs, not just >.
+ * TestResultServer/model/jsonresults_unittest.py:
+ Add unit test to test that merging in a new result with the same value
+ as the last result causes previous result to fall off.
+
+2011-01-06 James Kozianski <koz@chromium.org>
+
+ Reviewed by Mihai Parparita.
+
+ Add classes to provide a consistent interface to a set of files.
+ https://bugs.webkit.org/show_bug.cgi?id=50901
+
+ These classes allow us to write code that is agnostic to whether a
+ particular set of files resides in a local directory or in a zip file
+ on a remote machine.
+
+ * Scripts/webkitpy/common/system/directoryfileset.py: Added.
+ * Scripts/webkitpy/common/system/directoryfileset_unittest.py: Added.
+ * Scripts/webkitpy/common/system/fileset.py: Added.
+ * Scripts/webkitpy/common/system/filesystem.py:
+ * Scripts/webkitpy/common/system/filesystem_mock.py:
+ * Scripts/webkitpy/common/system/zipfileset.py: Added.
+ * Scripts/webkitpy/common/system/zipfileset_unittest.py: Added.
+
+2011-01-06 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ NetworkTransaction should log the url it is retrying
+ https://bugs.webkit.org/show_bug.cgi?id=52043
+
+ * Scripts/webkitpy/common/net/networktransaction.py:
+ * Scripts/webkitpy/common/net/networktransaction_unittest.py:
+
+2011-01-06 Steve Falkenburg <sfalken@apple.com>
+
+ Windows build fix.
+ Import os before using it.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+
+2011-01-06 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ StyleQueue fails to report errors when patches have many files
+ https://bugs.webkit.org/show_bug.cgi?id=52042
+
+ This is one of at least two errors preventing style error reporting at the moment.
+ When we moved to passing the list of files to check explicitly,
+ we started to exceed the 500 character TEXT field limit for our AppEngine model object.
+ We could change the type of the QueueStatus.message type, or we could
+ just teach statusserver.py how to clamp values (and warn when it does).
+ I chose the latter path.
+
+ * Scripts/webkitpy/common/net/statusserver.py:
+
+2011-01-06 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Stephanie Lewis.
+
+ Fix syntax error in script.
+
+ Windows bots need to archive/unarchive builds to/from configuration-specific directories
+ https://bugs.webkit.org/show_bug.cgi?id=51996
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+
+2011-01-06 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Unreviewed, fixing WinCE build after r75196.
+
+ WinCE port does not (yet) support NPAPI.
+
+ * Scripts/build-webkit:
+
+2011-01-06 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Darin Adler.
+
+ File::Spec->rel2abs in sunspider-compare-results mangles parameters
+ https://bugs.webkit.org/show_bug.cgi?id=52015
+
+ * Scripts/sunspider-compare-results: call rel2abs on our arguments
+ after the platform has been detected, otherwise the script will
+ mangle things like '--gtk' into '/a/path/--gtk', breaking the
+ detection.
+
+2011-01-06 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ Add ENABLE_NETSCAPE_PLUGIN_API, ENABLE_ORIENTATION_EVENTS and ENABLE_TOUCH_EVENTS flags to build-webkit
+ https://bugs.webkit.org/show_bug.cgi?id=51346
+
+ * Scripts/build-webkit:
+
+2011-01-06 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Windows bots need to archive/unarchive builds to/from configuration-specific directories
+ https://bugs.webkit.org/show_bug.cgi?id=51996
+
+ After the configuration directory change, we were archiving the incorrect directory for
+ build product, so we were running tests on the wrong binaries.
+
+ This change archives the correct directory, and also unarchives it into a configuration-
+ specific directory.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg: Use a configuration-specific directory on Windows.
+ * BuildSlaveSupport/built-product-archive: Unarchive/archive to/from proper directory.
+
+2011-01-06 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Mihai Parparita.
+
+ commit-queue mentions "Text diff mismatch" 4 times instead of once per failure
+ https://bugs.webkit.org/show_bug.cgi?id=52002
+
+ See an example of this here:
+ https://bugs.webkit.org/show_bug.cgi?id=51314#c2
+
+ It's due to the fact that we pass around TestFailure() instance
+ objects and yet expect them to all compare to be the same.
+
+ This is bad. We should either have shared instances of these values
+ or we should just pass around the class names. There are already hacks
+ in place to make TestFailure objects pass equality tests, I just added
+ a __hash__ implementation so they can be used in sets as expected.
+
+ * Scripts/webkitpy/common/net/layouttestresults_unittest.py:
+ * Scripts/webkitpy/layout_tests/layout_package/test_failures.py:
+
+2011-01-06 Evan Martin <evan@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ [gdb] handle inaccessible memory and UChar*
+ https://bugs.webkit.org/show_bug.cgi?id=52003
+
+ To pretty-print a UChar*, we just grope around in the memory
+ looking for a terminating NUL. We need to handle the exception
+ that can occur when we poke into an invalid location.
+
+ Additionally, the logic for choosing which pretty-printer would
+ early return before hitting the point where we'd use the UChar*
+ printer. (Did this ever work? How did it regress?)
+
+ * gdb/webkit.py:
+
+2011-01-05 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Ada Chan.
+
+ WebKit2: Should be able to call into injected bundle to ask if we should allow resource loads
+ https://bugs.webkit.org/show_bug.cgi?id=51969
+
+ Add shouldLoadResourceForFrame to WTR::InjectedBundlePage.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::InjectedBundlePage):
+ (WTR::InjectedBundlePage::shouldLoadResourceForFrame): Stub implementation.
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
+
+2011-01-06 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Simon Fraser.
+
+ Implement mozilla's animationTime property
+ https://bugs.webkit.org/show_bug.cgi?id=51952
+
+ Chromium DRT support for webkitAnimationTime.
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::paintInvalidatedRegion):
+
+2011-01-06 Julie Parent <jparent@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ Test Result Server always truncates number of results to JSON_RESULTS_MAX_BUILDS
+ https://bugs.webkit.org/show_bug.cgi?id=51217
+
+ * TestResultServer/model/jsonresults.py:
+ Pass num_runs through to _remove_items_over_max_number_of_builds, and use the value.
+ Adds missing documentation.
+ * TestResultServer/model/jsonresults_unittest.py:
+ Add unit test to test that truncation happens at smaller value than JSON_RESULTS_MAX_BUILDS.
+ Update test_merge to take a number of builds to truncate at.
+
+2011-01-06 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ The EWS should log outside of the working directory
+ https://bugs.webkit.org/show_bug.cgi?id=51986
+
+ This patch prepare us for using git clean -x -d -f in the EWS wrapper
+ script, which will actually clean the working copy back to a pristine
+ state instead of leaving untracked directories and ignored files.
+
+ * Scripts/webkitpy/tool/commands/queues.py:
+ * Scripts/webkitpy/tool/commands/queues_unittest.py:
+
+2011-01-05 Steve Falkenburg <sfalken@apple.com>
+
+ Windows build fix.
+ Back out attempted change to built-product-archive.
+
+ * BuildSlaveSupport/built-product-archive:
+
+2011-01-05 Steve Falkenburg <sfalken@apple.com>
+
+ Windows build fix.
+ Include configuration name when unpacking a build archive.
+
+ Needed, since we split Windows build results into configuration-specific directories
+ under WebKitOutputDir.
+
+ * BuildSlaveSupport/built-product-archive:
+
+2011-01-05 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Debug and Release builds on Windows clobber each other
+ https://bugs.webkit.org/show_bug.cgi?id=49185
+
+ Changes the structure of WebKitBuild build products directory so we
+ completely separate each build configuration into independent directories.
+
+ Although we previously had per-configuration directories for obj, this change adds
+ per-configuration directories for bin, lib, obj, and include. Each configuration's
+ build products are stored within a directory inside of WebKitBuild.
+
+ Most use of $(WebKitOutputDir) in the build files has been replaced by $(ConfigurationBuildDir),
+ defined in common.vsprops to be $(WebKitOutputDir)\$(ConfigurationName).
+
+ * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginCommon.vsprops:
+ * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginPostBuild.cmd:
+ * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginPreBuild.cmd:
+ * DumpRenderTree/win/DumpRenderTreeCommon.vsprops:
+ * DumpRenderTree/win/DumpRenderTreePostBuild.cmd:
+ * DumpRenderTree/win/DumpRenderTreePreBuild.cmd:
+ * DumpRenderTree/win/ImageDiffCommon.vsprops:
+ * DumpRenderTree/win/ImageDiffPostBuild.cmd:
+ * DumpRenderTree/win/ImageDiffPreBuild.cmd:
+ * FindSafari/FindSafari.vcproj:
+ * MiniBrowser/Configurations/MiniBrowserCommon.vsprops:
+ * MiniBrowser/MiniBrowserPostBuild.cmd:
+ * MiniBrowser/MiniBrowserPreBuild.cmd:
+ * Scripts/webkitdirs.pm:
+ * TestWebKitAPI/Configurations/TestWebKitAPICommon.vsprops:
+ * TestWebKitAPI/win/TestWebKitAPIGeneratedCommon.vsprops:
+ * TestWebKitAPI/win/TestWebKitAPIPostBuild.cmd:
+ * TestWebKitAPI/win/TestWebKitAPIPreBuild.cmd:
+ * TestWebKitAPI/win/copy-resources.cmd:
+ * WebKitAPITest/WebKitAPITestCommon.vsprops:
+ * WebKitAPITest/WebKitAPITestPostBuild.cmd:
+ * WebKitAPITest/WebKitAPITestPreBuild.cmd:
+ * WebKitTestRunner/Configurations/InjectedBundleCommon.vsprops:
+ * WebKitTestRunner/Configurations/WebKitTestRunnerCommon.vsprops:
+ * WebKitTestRunner/win/InjectedBundle.vcproj:
+ * WebKitTestRunner/win/InjectedBundleGeneratedCommon.vsprops:
+ * WebKitTestRunner/win/InjectedBundlePostBuild.cmd:
+ * WebKitTestRunner/win/InjectedBundlePreBuild.cmd:
+ * WebKitTestRunner/win/WebKitTestRunnerPostBuild.cmd:
+ * WebKitTestRunner/win/WebKitTestRunnerPreBuild.cmd:
+ * WinLauncher/WinLauncherCommon.vsprops:
+ * WinLauncher/WinLauncherPostBuild.cmd:
+ * WinLauncher/WinLauncherPreBuild.cmd:
+
+2011-01-05 Jan Erik Hanssen <jhanssen@sencha.com>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] TestNetscapePlugin doesn't link on OS X
+ https://bugs.webkit.org/show_bug.cgi?id=51948
+
+ Only add a dependency on libX11 on X11 systems
+
+ * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
+
+2011-01-05 Jeff Miller <jeffm@apple.com>
+
+ Reviewed by Adam Roben.
+
+ check-webkit-style should allow unnecessary parameter names in WebKit2 APIs because we're matching CF's header style
+ https://bugs.webkit.org/show_bug.cgi?id=51970
+
+ * Scripts/webkitpy/style/checker.py:
+ Add -readability/naming for WebKit2 C API directories.
+
+2011-01-05 Eric Seidel <eric@webkit.org>
+
+ Unreviewed, just fixing one more log error from my previous python patch.
+
+ Move LayoutTestResults over to new-run-webkit-tests TestResult architecture
+ https://bugs.webkit.org/show_bug.cgi?id=51802
+
+ webkit-patch failure-reason was logging about parsing errors
+ due to my misunderstanding of how BeautifulSoup.findAll worked.
+
+ Fixed, and added a unit test.
+
+ * Scripts/webkitpy/common/net/layouttestresults.py:
+ * Scripts/webkitpy/common/net/layouttestresults_unittest.py:
+
+2011-01-05 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] [WK2] Add the possibility to open window from the WebProcess in Minibrowser
+ https://bugs.webkit.org/show_bug.cgi?id=51951
+
+ Set a function to QWKPage::setCreateNewPageFunction() in Minibrowser so there is a way
+ to create new window from WebKit.
+
+ * MiniBrowser/qt/BrowserWindow.cpp:
+ (newPageFunction):
+ (BrowserWindow::BrowserWindow):
+ (BrowserWindow::page): Added to avoid the indirect access to QWKPage spread in the class
+ (BrowserWindow::newWindow):
+ (BrowserWindow::updateUserAgentList):
+ (BrowserWindow::showUserAgentDialog):
+ * MiniBrowser/qt/BrowserWindow.h: Add the global variable backingStoreTypeForNewWindow to
+ define the type of the backing store used for new windows.
+ * MiniBrowser/qt/main.cpp:
+ (main):
+
+2011-01-05 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Ojan Vafai.
+
+ commit-queue should report failure type when reporting flaky tests
+ https://bugs.webkit.org/show_bug.cgi?id=51900
+
+ This patch was a ridiculous amount of plumbing. In the end I like
+ the NRWT-style TestResult class even less. But now we're passing
+ a list of TestResult objects from the queue to the FlakyTestReporter.
+ Thus the FlakyTestReporter can more easily report what type of failure
+ occurred.
+
+ In the process, I found that I was not alone in finding TestResult
+ cumbersome to use. A bunch of code was trying to create a TestResult
+ object with default values. However since the constructor didn't make
+ this easy, some places were getting it wrong (including the TestResult unit test)!
+ I've fixed the TestResult constructor to have default values for non-essential
+ arguments.
+
+ * Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py:
+ * Scripts/webkitpy/common/net/layouttestresults.py:
+ * Scripts/webkitpy/common/net/layouttestresults_unittest.py:
+ * Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py:
+ * Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
+ * Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py:
+ * Scripts/webkitpy/layout_tests/layout_package/test_results.py:
+ * Scripts/webkitpy/layout_tests/layout_package/test_results_unittest.py:
+ * Scripts/webkitpy/layout_tests/layout_package/test_runner.py:
+ * Scripts/webkitpy/tool/bot/commitqueuetask.py:
+ * Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
+ * Scripts/webkitpy/tool/bot/flakytestreporter.py:
+ * Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py:
+ * Scripts/webkitpy/tool/commands/queues.py:
+ * Scripts/webkitpy/tool/commands/queues_unittest.py:
+
+2011-01-05 Eric Seidel <eric@webkit.org>
+
+ Unreviewed.
+
+ Move LayoutTestResults over to new-run-webkit-tests TestResult architecture
+ https://bugs.webkit.org/show_bug.cgi?id=51802
+
+ Add another unit test to cover a previously missing import.
+
+ * Scripts/webkitpy/common/net/layouttestresults.py:
+ * Scripts/webkitpy/common/net/layouttestresults_unittest.py:
+
+2011-01-05 Mihai Parparita <mihaip@chromium.org>
+
+ Reviewed by David Levin.
+
+ Add mihaip@chromium.org as a reviewer
+ https://bugs.webkit.org/show_bug.cgi?id=51966
+
+ Add myself as a reviewer.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2011-01-05 James Simonsen <simonjam@chromium.org>
+
+ Unreviewed. Adding myself to the list of committers.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2011-01-05 Eric Seidel <eric@webkit.org>
+
+ Unreviewed.
+
+ Move LayoutTestResults over to new-run-webkit-tests TestResult architecture
+ https://bugs.webkit.org/show_bug.cgi?id=51802
+
+ Fix two exceptions seen on the bots after my original commit.
+
+ * Scripts/webkitpy/common/net/layouttestresults.py:
+ * Scripts/webkitpy/common/net/layouttestresults_unittest.py:
+
+2011-01-05 Kundu Suchismita <suchi.kundu@nokia.com>
+
+ Reviewed by Andreas Kling.
+
+ [Qt]Add local storage settings to QtTestBrowser command line arguments
+ https://bugs.webkit.org/show_bug.cgi?id=51750
+
+ * QtTestBrowser/main.cpp:
+ (LauncherApplication::handleUserOptions):
+ Local storage settings can be enable form command line arguments for
+ QtTestBrowser.
+
+2011-01-05 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Martin Robinson.
+
+ GTK: AX: DRT needs to use correct root object method.
+ https://bugs.webkit.org/show_bug.cgi?id=51911
+
+ * DumpRenderTree/gtk/AccessibilityControllerGtk.cpp:
+ (AccessibilityController::rootElement):
+
+2011-01-05 Gabor Rapcsanyi <rgabor@inf.u-szeged.hu>
+
+ Rubber-stamped by Csaba Osztrogonác.
+
+ Based on idea from Péter Gál.
+
+ * Scripts/webkitpy/tool/bot/sheriff.py: Remove unnecessary apostrophes around revision numbers.
+
+2011-01-05 Gabor Rapcsanyi <rgabor@inf.u-szeged.hu>
+
+ Reviewed by Adam Barth.
+
+ sheriff-bot should be able to do multi-revision rollouts
+ https://bugs.webkit.org/show_bug.cgi?id=51176
+
+ * Scripts/webkitpy/tool/bot/irc_command.py:
+ * Scripts/webkitpy/tool/bot/sheriff.py:
+ * Scripts/webkitpy/tool/bot/sheriffircbot_unittest.py:
+
+2011-01-05 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ queues.webkit.org should have per-bot status pages
+ https://bugs.webkit.org/show_bug.cgi?id=51906
+
+ Just adds a /queue-status/QUEUE_NAME/bots/BOT_ID page to show
+ statuses from a single queue. Now that we have many bots servicing
+ some queues (commit-queue, win-ews, etc.) its easy to have the messages
+ you care about scroll off the end of the 15-message limit on the main page.
+
+ Eventually we should probably rename /queue-status to /queue or /queues,
+ but that's fodder for another patch.
+
+ * QueueStatusServer/handlers/queuestatus.py:
+ * QueueStatusServer/index.yaml:
+ * QueueStatusServer/main.py:
+ * QueueStatusServer/templates/includes/singlequeuestatus.html:
+ - This probably should use a custom filter instead of hard-coding
+ the URL scheme here, but I couldn't figure out how to easily
+ create such a filter. Most filters work with "strings" so we can't
+ pass the status object. We could add a method to the status
+ object and call that, but that seemed a bit strange too.
+ * QueueStatusServer/templates/queuestatus.html:
+
+2011-01-05 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ Unreviewed. Adding myself to the list of committers.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2011-01-04 Koan-Sin Tan <koansin.tan@gmail.com>
+
+ Reviewed by David Levin.
+
+ check-webkit-style treated some macros with parentheses after #elif as function calls
+ https://bugs.webkit.org/show_bug.cgi?id=51695
+
+ Ingore function call space checking in any preprocessor directives
+ (things starting with #). Change search() to match() because
+ preprocessor directives are supposed to be in the beginning of lines.
+
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py: make sure there is no false positives for #elif cases
+
+2011-01-04 Søren Gjesse <sgjesse@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ Change the --multi-load test option to --stress-opt
+ https://bugs.webkit.org/show_bug.cgi?id=50751
+
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ (runTest):
+ (main):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell::stressOpt):
+ (TestShell::setStressOpt):
+ (TestShell::stressDeopt):
+ (TestShell::setStressDeopt):
+ (TestShell::javaScriptFlags):
+ (TestShell::setJavaScriptFlags):
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+
+2011-01-04 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WK2: Support Accessibility
+ https://bugs.webkit.org/show_bug.cgi?id=51859
+
+ Use rootObject() method to get top of accessibility tree.
+
+ * DumpRenderTree/mac/AccessibilityControllerMac.mm:
+ (AccessibilityController::focusedElement):
+ (AccessibilityController::rootElement):
+
+2011-01-03 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Darin Adler.
+
+ Remove the last non-GObject usage of PlatformRefPtr and move the code to GRefPtr
+ https://bugs.webkit.org/show_bug.cgi?id=51846
+
+ * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp: Change usage of PlatformRefPtr
+ back to GRefPtr.
+
+2011-01-04 Zhe Su <suzhe@chromium.org>
+
+ Reviewed by Kenneth Russell.
+
+ Fix insertText, setMarkedText and unmarkText methods of
+ TextInputController to call corresponding methods of WebKit::WebView
+ rather than WebKit::WebFrame. This change matches the behavior of
+ chromium browser.
+ insertText corresponds to WebView::confirmComposition(text)
+ setMarkedText corresponds to WebView::setComposition(...)
+ unmarkText corresponds to WebView::confirmComposition()
+ https://bugs.webkit.org/show_bug.cgi?id=51693
+
+ * DumpRenderTree/chromium/TextInputController.cpp:
+ (TextInputController::insertText):
+ (TextInputController::setMarkedText):
+ (TextInputController::unmarkText):
+
+2011-01-04 Dihan Wickremasuriya <dihan.wickremasuriya@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] [Symbian] Do not remove 0 byte sized files from productDir
+
+ On Symbian productDir points to the source directory. Removing all the
+ empty files from the productDir directory corrupts the svn repository.
+
+ * Scripts/build-webkit:
+
+2011-01-03 Yi Shen <yi.4.shen@nokia.com>
+
+ Reviewed by Adam Barth.
+
+ [Qt] Add SelectAll option to the context menu for the editor
+ https://bugs.webkit.org/show_bug.cgi?id=50049
+
+ Set shortcut for the SelectAll action.
+
+ * QtTestBrowser/mainwindow.cpp:
+ (MainWindow::buildUI):
+
+2011-01-03 David Levin <levin@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ check-webkit-style shouldn't consider "value" automatically to be a meaningless name.
+ https://bugs.webkit.org/show_bug.cgi?id=51842
+
+ * Scripts/webkitpy/style/checkers/cpp.py: Remove the check for value.
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py: Remove the test for value.
+
+2011-01-03 Patrick Gansterer <paroga@webkit.org>
+
+ Reviewed by David Kilzer.
+
+ [WINCE] Adds a build slave.
+ https://bugs.webkit.org/show_bug.cgi?id=50523
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json: Add an
+ entry for a release build of the WinCE port.
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg: Add platform
+ flag to build the WinCE port.
+
+2011-01-03 Patrick Gansterer <paroga@webkit.org>
+
+ Reviewed by David Kilzer.
+
+ Add WinCE support to build-webkit
+ https://bugs.webkit.org/show_bug.cgi?id=51642
+
+ * Scripts/build-webkit:
+ * Scripts/webkitdirs.pm:
+
+2011-01-03 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Move LayoutTestResults over to new-run-webkit-tests TestResult architecture
+ https://bugs.webkit.org/show_bug.cgi?id=51802
+
+ I'm not the biggest fan of the test_failures or test_results classes,
+ but it's better to have one shared set of classes, than separate ones
+ for new vs. old run-webkit-test result handling.
+
+ This moves the ORWT results class "LayoutTestResults" over to using
+ TestResult and TestFailure classes, making it easy for us to
+ make all our sheriff-bot and other webkitpy code NRWT ready.
+
+ This also makes it a trivial patch to generate results.json information
+ from ORWT results.html files (for flaky test analysis, etc.) as well
+ as making it a one-liner to report test failure types when the
+ commit-queue sees flaky tests.
+
+ This patch tried not to add new functionality, but only to replace
+ the guts of LayoutTestResults, while adding unit tests and hoping
+ not to break anything.
+
+ I also moved callers which assumed User.prompt* were static/class methods
+ to using them as instance methods (since we'll eventually want to make them such).
+
+ In the process of re-writing things, I broke the rebaseline command, so I wrote
+ a unit test to catch my breakage were I do do so again in the future.
+
+ * Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py:
+ * Scripts/webkitpy/common/net/layouttestresults.py:
+ * Scripts/webkitpy/common/net/layouttestresults_unittest.py:
+ * Scripts/webkitpy/layout_tests/layout_package/test_failures.py:
+ * Scripts/webkitpy/layout_tests/layout_package/test_results.py:
+ * Scripts/webkitpy/tool/commands/queries.py:
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ * Scripts/webkitpy/tool/mocktool.py:
+
+2011-01-03 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Simon Fraser.
+
+ webkit-patch shouldn't waste time cleaning a working directory that's already clean
+ https://bugs.webkit.org/show_bug.cgi?id=51840
+
+ * Scripts/webkitpy/common/checkout/scm.py:
+
+2011-01-03 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Simon Fraser.
+
+ webkit-patch should only hide update output if --quiet
+ https://bugs.webkit.org/show_bug.cgi?id=51838
+
+ As requested by smfr.
+
+ * Scripts/webkitpy/tool/steps/update.py:
+
+2011-01-03 Adam Barth <abarth@webkit.org>
+
+ Reviewed by David Levin.
+
+ commit-queue shouldn't reject patches twice if two bots process the same patch
+ https://bugs.webkit.org/show_bug.cgi?id=51805
+
+ Before raising an error, we first check whether the patch is still in
+ the commit-queue. This check is still racy, of course, but the time
+ window is much smaller.
+
+ * Scripts/webkitpy/tool/bot/commitqueuetask.py:
+
+2011-01-03 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Make run-api-tests less chatty.
+ https://bugs.webkit.org/show_bug.cgi?id=51831
+
+ - Make script quiet by default and add --verbose option (replacing --quiet).
+ - When not verbose, pipe stdout and stderr to devnull.
+
+ * Scripts/run-api-tests:
+
+2011-01-03 Pratik Solanki <psolanki@apple.com>
+
+ Unreviewed. Adding myself to committers.py.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2011-01-03 Koan-Sin Tan <koansin.tan@gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ "Tool/Scripts/run-launcher --gtk" stopped working after 74855
+ https://bugs.webkit.org/show_bug.cgi?id=51806
+
+ Originally, the $libraryName is 'JavaScriptCore'. When building release
+ one, the $libraryDir was 'WebKitBuild/Release/JavaScriptCore/../.libs/'
+ which doesn't exist anymore ('WebKitBuild/Release/JavaScriptCore'
+ is 'WebKitBuild/Release/Source/JavaScriptCore' now), and
+ 'WebKitBuild/Release/Source/JavaScriptCore/../../.libs' looks weird,
+ so make it 'WebKitBuild/Release/.libs'
+
+ * Scripts/webkitdirs.pm:
+
+2011-01-02 Patrick Gansterer <paroga@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Make EFL a core builder
+ https://bugs.webkit.org/show_bug.cgi?id=51804
+
+ * Scripts/webkitpy/common/net/buildbot/buildbot.py:
+ * Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py:
+
+2011-01-02 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Unreviewed fix after r74855 and r74875.
+
+ * BuildSlaveSupport/built-product-archive:
+ - Create directories explicitly.
+ - Pass shell=True to subprocess.call().
+
+2011-01-02 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Unreviewed fix after r74855.
+
+ Move JavaScriptCore to Source
+ https://bugs.webkit.org/show_bug.cgi?id=51604
+
+ * BuildSlaveSupport/built-product-archive: JavaScriptCore -> Source/JavaScriptCore
+
+2011-01-02 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Unreviewed run-javasriptcore-tests fix after r74855.
+
+ Move JavaScriptCore to Source
+ https://bugs.webkit.org/show_bug.cgi?id=51604
+
+ * Scripts/webkitdirs.pm:
+
+2011-01-02 Robert Hogan <robert@webkit.org>
+
+ Unreviewed, build fix.
+
+ [Qt] Fix DRT build after 74855
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+
+2011-01-01 Adam Barth <abarth@webkit.org>
+
+ Remove the assumption from the Qt and Gtk builds that every project is
+ in the root directory.
+
+ * Scripts/build-webkit:
+
+2011-01-01 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Teach svn-apply how to apply patches even though JavaScriptCore has moved
+ https://bugs.webkit.org/show_bug.cgi?id=51796
+
+ After this change, svn-apply will magically apply patches to
+ JavaScriptCore/foo to Source/JavaScriptCore/foo.
+
+ * Scripts/VCSUtils.pm:
+
+2011-01-01 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move JavaScriptCore to Source
+ https://bugs.webkit.org/show_bug.cgi?id=51604
+
+ Update references to JavaScriptCore to point to the new location.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+ * DumpRenderTree/qt/ImageDiff.pro:
+ * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
+ * DumpRenderTree/wscript:
+ * Scripts/build-jsc:
+ * Scripts/build-webkit:
+ * Scripts/do-file-rename:
+ * Scripts/do-webcore-rename:
+ * Scripts/run-javascriptcore-tests:
+ * Scripts/update-javascriptcore-test-results:
+ * Scripts/webkitdirs.pm:
+ * Scripts/webkitpy/common/config/build_unittest.py:
+ * Scripts/webkitpy/style/checker.py:
+ * Scripts/webkitpy/style/checker_unittest.py:
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+ * WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro:
+ * WebKitTestRunner/qt/WebKitTestRunner.pro:
+ * wx/build/settings.py:
+
+2011-01-01 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move Sources to Source
+ https://bugs.webkit.org/show_bug.cgi?id=51794
+
+ Update scripts to point to the new location.
+
+ * Scripts/build-webkit:
+ * Scripts/do-file-rename:
+ * Scripts/do-webcore-rename:
+ * Scripts/webkitpy/common/config/build.py:
+ * Scripts/webkitpy/common/config/build_unittest.py:
+
+2010-12-31 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [DRT/Chromium] Enable mock spell checker on non-OSX
+ https://bugs.webkit.org/show_bug.cgi?id=51401
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::spellCheck):
+
+2010-12-31 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Ariya Hidayat.
+
+ Remove Tools/Scripts/wkstyle
+ https://bugs.webkit.org/show_bug.cgi?id=51774
+
+ This script appears to not have been touched in a while and seems to
+ have been replaced by check-webkit-style.
+
+ * Scripts/wkstyle: Removed.
+
+2010-12-31 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Unreviewed. Coding style fix.
+
+ * DumpRenderTree/chromium/TestShell.h:
+
+2010-12-31 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: [Chromium] Inspector's tests are very slow on Win(Dbg).
+
+ It was a problem with Chromium DRT. DevToolsAgent object instance was
+ attached not only to the inspected page but to the DevTools window too.
+ As result all the inspector files were interpreted as a content of inspected page
+ and were transfered to the DevTools scripts panel for debugging etc.
+
+ https://bugs.webkit.org/show_bug.cgi?id=51735
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+ (TestShell::bindJSObjectsToWindow):
+ (TestShell::createNewWindow):
+ * DumpRenderTree/chromium/TestShell.h:
+
+2010-12-31 Adam Barth <abarth@webkit.org>
+
+ Rubber-stamped by Eric Seidel.
+
+ Move PageLoadTests to PerformanceTests/PageLoad
+ https://bugs.webkit.org/show_bug.cgi?id=51771
+
+ Update references to PageLoadTests to point to the new location.
+
+ * Scripts/run-pageloadtest:
+ * Scripts/webkitpy/common/config/build.py:
+
+2010-12-31 Adam Barth <abarth@webkit.org>
+
+ Rubber-stamped by Eric Seidel.
+
+ Move SunSpider into PerformanceTests
+ https://bugs.webkit.org/show_bug.cgi?id=51769
+
+ Update these scripts to point to the new location.
+
+ * Scripts/run-sunspider:
+ * Scripts/sunspider-compare-results:
+
+2010-12-30 Mihai Parparita <mihaip@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ [Chromium] Add WebThemeEngineDRTMac so that Chromium DRT scrollbar rendering can match the Mac port's
+ https://bugs.webkit.org/show_bug.cgi?id=51728
+
+ Add implementation of the Mac WebThemeEngine that uses an NSScroller
+ to render top-level scrollbars. This makes them match the Mac port's
+ use of an NSScrollView, which means that we'll be able to share more
+ pixel baselines.
+
+ The new rendering code will not be activated until the
+ USE_WEB_THEME_ENGINE_TO_PAINT_THUMB #define is fliped in
+ ScrollbarThemeChromiumMac.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestShellMac.mm:
+ (platformInit):
+ * DumpRenderTree/chromium/WebThemeEngineDRTMac.h: Added.
+ * DumpRenderTree/chromium/WebThemeEngineDRTMac.mm: Added.
+ (+[FakeActiveWindow alwaysActiveWindow]):
+ (+[FakeActiveWindow alwaysInactiveWindow]):
+ (-[FakeActiveWindow initWithActiveControls:]):
+ (-[FakeActiveWindow _hasActiveControls]):
+ (WebThemeEngineDRTMac::paintScrollbarThumb):
+ (stateToHIEnableState):
+ (WebThemeEngineDRTMac::paintHIThemeScrollbarThumb):
+ (WebThemeEngineDRTMac::paintNSScrollerScrollbarThumb):
+
+2010-12-30 Konstantin Tokarev <annulen@yandex.ru>
+
+ Reviewed by David Kilzer.
+
+ [Qt] Don't build wtf/TCSystemAlloc.cpp if --system-malloc option is
+ used
+ https://bugs.webkit.org/show_bug.cgi?id=51672
+
+ * DumpRenderTree/qt/DumpRenderTree.pro: Replaced USE_SYSTEM_MALLOC
+ with USE_SYSTEM_MALLOC=1
+ * WebKitTestRunner/qt/WebKitTestRunner.pro: Replaced USE_SYSTEM_MALLOC
+ with USE_SYSTEM_MALLOC=1
+
+2010-12-30 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by David Kilzer.
+
+ [Qt] [Symbian] Fix build-webkit script for Symbian
+ https://bugs.webkit.org/show_bug.cgi?id=51509
+
+ Set the OUTPUT_DIR for Symbian to be the same as the source
+ directory.
+
+ * Scripts/webkitdirs.pm:
+
+2010-12-30 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Darin Adler.
+
+ check-webkit-style should ignore NULL usage in calls to gtk_widget_style_get
+ https://bugs.webkit.org/show_bug.cgi?id=51758
+
+ Add a check-webkit-style exception for gtk_widget_style_get and NULL usage.
+
+ * Scripts/webkitpy/style/checkers/cpp.py: Add the exception.
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py: Add some tests for this.
+
+2010-12-29 Patrick Gansterer <paroga@webkit.org>
+
+ Unreviewed WinCE buildfix.
+
+ * WinCELauncher/main.cpp: Add missing include.
+
+2010-12-29 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Darin Adler.
+
+ svn-apply updates date of wrong change log entry for a change log diff that
+ contains two consecutive entries with the same author and date
+ https://bugs.webkit.org/show_bug.cgi?id=46061
+
+ Fixes an issue where the date of the wrong change log entry may be modified.
+ Moreover, changes fixChangeLogPatch() to move entries inserted earlier
+ in a ChangeLog file to the top of the file.
+
+ Currently, fixChangeLogPatch() explicitly bails out and returns an unchanged
+ diff when it detects that the diff inserts a change log entry earlier in a
+ ChangeLog. It is unusual to land a patch that has such a deliberate ChangeLog
+ change. With the advent of the commit-queue this functionality of bailing out
+ and hence landing the patch as-is is harmful to the accuracy of the ChangeLog.
+ Instead, we should always move the change log entry to the top of the ChangeLog file.
+
+ A side-effect of this change is that setChangeLogDateAndReviewer() now updates
+ the date line of the correct change log entry in a ChangeLog diff.
+
+ * Scripts/VCSUtils.pm: Modified fixChangeLogPatch() to move entries inserted earlier to the top.
+
+ * Scripts/webkitperl/VCSUtils_unittest/fixChangeLogPatch.pl:
+ Updated the following unit tests now that we move entries inserted earlier to the top:
+ - "fixChangeLogPatch: New entry inserted in middle."
+ (formerly named "fixChangeLogPatch: [no change] New entry inserted in middle.")
+
+ - "fixChangeLogPatch: New entry inserted earlier in the file, but after an entry with the same author and date."
+ (formerly named "fixChangeLogPatch: [no change] New entry inserted earlier in the file, but after an entry with the same author and date.")
+
+ * Scripts/webkitperl/VCSUtils_unittest/fixChangeLogPatchThenSetChangeLogDateAndReviewer.pl: Added.
+
+2010-12-29 Konstantin Tokarev <annulen@yandex.ru>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] Fixed compatibility with gold linker on X11 platforms
+ https://bugs.webkit.org/show_bug.cgi?id=51700
+
+ * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
+ Linked TestNetscapePlugin with libX11 on Unix platforms
+
+2010-12-29 Ademar de Souza Reis Jr <ademar.reis@openbossa.org>
+
+ Reviewed by Darin Adler.
+
+ Circular dependency in webkitpy.common.checkout.changelog module
+ https://bugs.webkit.org/show_bug.cgi?id=50475
+
+ Remove automatic import of api.Checkout module when any checkout/
+ submodule is imported (e.g.: when checkout.scm.Git is imported).
+
+ * Scripts/webkitpy/common/checkout/__init__.py:
+
+2010-12-29 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Ojan Vafai.
+
+ prepare-ChangeLog should support the -g option for specifying the git-commit
+ https://bugs.webkit.org/show_bug.cgi?id=51708
+
+ Add a -g shortcut for the --git-commit prepare-ChangeLog option. This matches
+ webkit-patch, though the exact meaning of the two options remain different.
+
+ * Scripts/prepare-ChangeLog: Add -g.
+
+2010-12-29 Kent Hansen <kent.hansen@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix compilation with Qt in namespace
+ https://bugs.webkit.org/show_bug.cgi?id=51701
+
+ * QtTestBrowser/webview.h:
+
+2010-12-28 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Sam Weinig.
+
+ Substitute // MARK: for compiler-specific #pragma mark
+ https://bugs.webkit.org/show_bug.cgi?id=51657
+
+ Fix future compilation warnings about "#pragma mark" on GTK+ bots by
+ substituting "// MARK:" for "#pragma mark", which provides
+ analogous code-bookmarking functionality under Xcode.
+
+ Also, for consistency, we should substitute "// MARK:" for compiler-
+ specific "#pragma mark" in the source files for the Mac port.
+
+ * DumpRenderTree/AccessibilityTextMarker.cpp:
+ * DumpRenderTree/cf/WebArchiveDumpSupport.h:
+ * DumpRenderTree/mac/AccessibilityTextMarkerMac.mm:
+ * DumpRenderTree/mac/ObjCController.m:
+ * MiniBrowser/mac/AppDelegate.m:
+ * MiniBrowser/mac/BrowserWindowController.m:
+
+2010-12-28 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Eric Seidel.
+
+ Add --no-build option to run-sunspider
+ https://bugs.webkit.org/show_bug.cgi?id=51658
+
+ * Scripts/run-sunspider: add --no-build flag to skip building
+ phase.
+
+2010-12-27 Daniel Bates <dbates@rim.com>
+
+ Rubber-stamped by Martin Robinson.
+
+ Append the directory Tools/DumpRenderTree to the list of directories that
+ do-webcore-rename should search so that it can rename DRT files and
+ source code.
+
+ * Scripts/do-webcore-rename:
+
+2010-12-27 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ build-webkit should detect missing Java SDK and explain how to install it
+ https://bugs.webkit.org/show_bug.cgi?id=51651
+
+ * Scripts/build-webkit:
+
+2010-12-26 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Daniel Bates.
+
+ [GTK] Add support for build-jsc
+ https://bugs.webkit.org/show_bug.cgi?id=51625
+
+ Add GTK+ support to build-jsc now that building the jsc executable as
+ a standalone target is easy.
+
+ * Scripts/build-jsc: Call buildGtkProject for the GTK+ case now.
+ * Scripts/build-webkit: Pass in the proper target name to buildGtkProject.
+ * Scripts/webkitdirs.pm: Actually process the project parameter in buildGtkProject
+ and pass it along to buildAutotoolsProject.
+
+2010-12-27 David Levin <levin@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ check-webkit-style check for meaningless variable names in function declarations.
+ https://bugs.webkit.org/show_bug.cgi?id=51523
+
+ * Scripts/webkitpy/style/checker.py: Exempted JavaScriptCore/jit/JITStubs.cpp
+ from the new check and whitespace/parens because the syntax is unusual and
+ produced a fair number of positives for these checks.
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ (_convert_to_lower_with_underscores): Used as a canonical form for type names
+ and parameter names when determining if the parameter name is useless.
+ (_create_acronym): Used to check for redundant variable names in cases like "ExceptionCode ec"
+ (Parameter.lower_with_underscores_name): Gives back the parameter name in a lower_with_underscore
+ format.
+ (_check_parameter_name_against_text): Checks to see if the parameter name is in the
+ text or an acronym of it.
+ (check_function_definition): Checks function definitions for meaningless variable names.
+ (process_line): Added call to check_function_definition.
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+ (CppFunctionsTest.test_convert_to_lower_with_underscores): Test for _convert_to_lower_with_underscores.
+ (CppFunctionsTest.test_create_acronym): Test for _create_acronym.
+ (CppFunctionsTest.test_check_parameter_against_text): Test for _check_parameter_against_text.
+ (CppStyleTestBase.perform_single_line_lint): Removed the parameter name check
+ because when only checking a snippet, there are a lot of bogus functions.
+ (CppStyleTestBase.perform_multi_line_lint): Ditto and removed a bogus filter
+ that I put there previously and just noticed.
+ (WebKitStyleTest.test_parameter_names): Tests for the functionality -- both
+ check_function_definition and process_line.
+
+2010-12-27 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] Disable flash plugin in GtkLauncher when using gtk3
+ https://bugs.webkit.org/show_bug.cgi?id=51591
+
+ Flash plugin uses gtk2 that is incompatible with gtk3 making
+ webkit crash when it's built with gtk3.
+
+ * GtkLauncher/main.c:
+ (main):
+
+2010-12-25 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move ANGLE to Sources/ThirdParty
+ https://bugs.webkit.org/show_bug.cgi?id=51605
+
+ * Scripts/build-webkit:
+ - Point to the new ANGLE location.
+
+2010-12-26 David Levin <levin@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ check-webkit-style should be able to parse function declaration parameters.
+ https://bugs.webkit.org/show_bug.cgi?id=51451
+
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ (Position.__init__): Holds simple position information (row, column).
+ (Parameter.__init__): Holds information about a parameter.
+ (SingleLineView.__init): Converts multiple lines into a single line for simpler searches.
+ (SingleLineView.convert_column_to_row): Returns the original row given a column.
+ (create_skeleton_parameters): Simplifies a parameter list for easier searching.
+ (find_parameter_name_index): Finds where the parameter name is.
+ (parameter_list): Generates the list of parameters for a function.
+ (_FunctionState.begin): Added information to allow determining the parameters
+ on demand.
+ (_FunctionState.get_parameter_list): Returns a tuple of function parameters.
+ (detect_functions): Improve function detection for operator functions and
+ determine where the parameters end and pass that to _FunctionState.begin.
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+ (CppFunctionsTest.test_parameter): Verifies Parameter functionality.
+ (CppFunctionsTest.test_single_line_view): Verifies SingleLineView functionality.
+ (CppFunctionsTest.test_create_skeleton_parameters): Verifies create_skeleton_parameters.
+ (CppFunctionsTest.test_find_parameter_name_index): Verifies find_parameter_name_index.
+ (CppFunctionsTest.test_parameter_list): Does some minimal verification for parameter list.
+ Much more thorough verification is done as part of FunctionDetectionTest.test_parameter_list.
+ (FunctionDetectionTest.perform_function_detection): Added support for verifying
+ the parameters found.
+ (FunctionDetectionTest.test_function_declaration_detection): Added more function
+ detection test to verify that we catch the operator functions.
+ (FunctionDetectionTest.test_ignore_macros): Verify that function detection ignores macros.
+ (FunctionDetectionTest.test_parameter_list): Added tests to verify the parameter parsing.
+ (CheckForFunctionLengthsTest.test_function_length_check_definition_severity1_for_bad_test_doesnt_break): Removed
+ because the error. The test is about the bad function name. Fixing the name makes the test exactly like
+ test_function_length_check_definition_severity1_for_test.
+
+2010-12-25 Patrick Gansterer <paroga@webkit.org>
+
+ Unreviewed WinCE buildfix after r74334.
+
+ * CMakeListsWinCE.txt:
+
+2010-12-24 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r74632.
+ http://trac.webkit.org/changeset/74632
+ https://bugs.webkit.org/show_bug.cgi?id=51600
+
+ makes test-webkitpy hang forever on GTK (Requested by philn-tp
+ on #webkit).
+
+ * Scripts/webkitpy/layout_tests/layout_package/message_broker.py:
+ * Scripts/webkitpy/layout_tests/layout_package/message_broker_unittest.py:
+
+2010-12-24 Ryuan Choi <ryuan.choi@samsung.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [EFL] Screen doesn't be rendered when changing size of EWebLauncher
+ https://bugs.webkit.org/show_bug.cgi?id=43528
+
+ Remove on_resize because ewk_view_fixed_layout_size_set should not be
+ called on callback of EVAS_CALLBACK_RESIZE. As it change size of
+ FrameView, rendering was ignored when _ewk_view_smart_calculate was
+ called.
+
+ * EWebLauncher/main.c:
+ (browserCreate):
+
+2010-12-24 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ webkit-patch (or a pre-commit hook) needs to prevent bad ChangeLog changes
+ https://bugs.webkit.org/show_bug.cgi?id=28291
+
+ This is a start. At least now webkit-patch will prompt when your ChangeLog looks questionable.
+ We could do more advanced things, like parsing the ChangeLog (with changelog.py) and comparing that
+ to strings with find in the diff.
+ Since non-interactive always returns the default, this should cause patches with bad changelogs to fail on the commit-queue.
+
+ * Scripts/webkitpy/common/checkout/api.py:
+ * Scripts/webkitpy/common/checkout/diff_parser.py:
+ * Scripts/webkitpy/tool/steps/abstractstep.py:
+ * Scripts/webkitpy/tool/steps/cleanworkingdirectory.py:
+ * Scripts/webkitpy/tool/steps/validatechangelogs.py: Copied from Tools/Scripts/webkitpy/tool/steps/validatereviewer.py.
+ * Scripts/webkitpy/tool/steps/validatechangelogs_unittest.py: Copied from Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectory.py.
+ * Scripts/webkitpy/tool/steps/validatereviewer.py:
+
+2010-12-24 Dirk Pranke <dpranke@chromium.org>
+
+ Reviewed by Kenneth Russell.
+
+ Modify new-run-webkit-tests to shut up and exit when all the threads
+ are wedged so that test runs complete faster and we don't end up
+ w/ enormous log files.
+
+ https://bugs.webkit.org/show_bug.cgi?id=51572
+
+ * Scripts/webkitpy/layout_tests/layout_package/message_broker.py:
+ * Scripts/webkitpy/layout_tests/layout_package/message_broker_unittest.py:
+
+2010-12-24 Eric Seidel <eric@webkit.org>
+
+ Reviewed by David Levin.
+
+ commit-queue should better explain how it will re-open bugs and follow duplicate chains
+ https://bugs.webkit.org/show_bug.cgi?id=51549
+
+ I've had multiple people ask me about the commit-queue's behavior
+ regarding reporting flaky tests. I figured it would be best to just
+ have the queue explain itself in the bugs it files.
+
+ * Scripts/webkitpy/tool/bot/flakytestreporter.py:
+ * Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py:
+
+2010-12-24 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ check-webkit-style: should ignore "wrong" namings in JavaScriptCore/qt
+ https://bugs.webkit.org/show_bug.cgi?id=51467
+
+ * Scripts/webkitpy/style/checker.py:
+ * Scripts/webkitpy/style/checker_unittest.py:
+
+2010-12-23 Adam Barth <abarth@webkit.org>
+
+ Rubber-stamped by Eric Seidel.
+
+ Move JavaScriptGlue into Sources
+ https://bugs.webkit.org/show_bug.cgi?id=51583
+
+ These tools refer to JavaScriptGlue and need to be updated to its new
+ location.
+
+ * Scripts/build-webkit:
+ * Scripts/do-file-rename:
+ * Scripts/do-webcore-rename:
+ * Scripts/webkitpy/common/config/build.py:
+ * Scripts/webkitpy/common/config/build_unittest.py:
+
+2010-12-23 Lucas Forschler <lforschler@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ Bug 51539 - update iexploder scripts to point to new location
+
+ * Scripts/run-iexploder-tests:
+ * Scripts/update-iexploder-cssproperties:
+
+2010-12-23 Evan Martin <evan@chromium.org>
+
+ Reviewed by Ryosuke Niwa.
+
+ [chromium] LayoutTestController warning in float->int conversion
+ https://bugs.webkit.org/show_bug.cgi?id=51553
+
+ Rather than reading an int, converting to a float, then getting a compiler
+ warning on passing the float to something that expects an int, instead
+ just pass around ints.
+
+ No tests, fixes a compiler warning.
+
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (parsePageSizeParameters):
+ (LayoutTestController::pageNumberForElementById):
+ (LayoutTestController::numberOfPages):
+
+2010-12-23 Lucas Forschler <lforschler@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 51537 - iexploder needs cleanup
+
+ * iExploder/htdocs: Removed.
+ * iExploder/htdocs/config.rb: Removed.
+ * iExploder/htdocs/cssproperties.in: Removed.
+ * iExploder/htdocs/cssvalues.in: Removed.
+ * iExploder/htdocs/htmlattrs.in: Removed.
+ * iExploder/htdocs/htmltags.in: Removed.
+ * iExploder/htdocs/htmlvalues.in: Removed.
+ * iExploder/htdocs/iexploder.cgi: Removed.
+ * iExploder/htdocs/iexploder.rb: Removed.
+ * iExploder/htdocs/index.html: Removed.
+ * iExploder/htdocs/webserver.rb: Removed.
+ * iExploder/iexploder-1.7.2/output: Removed.
+ * iExploder/tools: Removed.
+ * iExploder/tools/lasthit.rb: Removed.
+ * iExploder/tools/osx_last_crash.rb: Removed.
+ * iExploder/tools/showtest.rb: Removed.
+
+2010-12-23 Lucas De Marchi <lucas.demarchi@profusion.mobi>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [EFL] Make 'single' the default backing store in EWebLauncher
+ https://bugs.webkit.org/show_bug.cgi?id=51534
+
+ 'single' is the simplest backing store and the one intended to be the
+ default in the test browser. By mistake the tiled backing store was
+ left as default in r72617.
+
+ * EWebLauncher/main.c:
+ (browserCreate): ditto.
+
+2010-12-23 Lucas De Marchi <lucas.demarchi@profusion.mobi>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [EFL] Subject: [webkit 4/4] [EFL] Remove non-sense workaround
+ https://bugs.webkit.org/show_bug.cgi?id=51533
+
+ There's no point in concatenating env("HOME") with "blah", so remove
+ option from EWebLauncher.
+
+ * EWebLauncher/main.c:
+ (main): ditto.
+
+2010-12-23 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Web Inspector: chromium: inspector's tests are quite slow especially at windows(Debug).
+
+ Almost all inspector's tests become flaky on chromium Win(dbg) after switching to DRT.
+ I just discovered that we have two additional GC runs per each WebViewHost.
+ Test_shell had no such calls.
+ These gc runs eat 15% of cpu time.
+
+ https://bugs.webkit.org/show_bug.cgi?id=51479
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::~WebViewHost):
+
2010-12-22 Dirk Pranke <dpranke@chromium.org>
Reviewed by Ojan Vafai.
diff --git a/Tools/DumpRenderTree/AccessibilityTextMarker.cpp b/Tools/DumpRenderTree/AccessibilityTextMarker.cpp
index d84ee80..1250497 100644
--- a/Tools/DumpRenderTree/AccessibilityTextMarker.cpp
+++ b/Tools/DumpRenderTree/AccessibilityTextMarker.cpp
@@ -29,7 +29,7 @@
#include "AccessibilityUIElement.h"
#include <JavaScriptCore/JSRetainPtr.h>
-#pragma mark AccessibilityTextMarker
+// MARK: AccessibilityTextMarker
// Callback methods
@@ -81,7 +81,7 @@ JSClassRef AccessibilityTextMarker::getJSClass()
return accessibilityTextMarkerClass;
}
-#pragma mark AccessibilityTextMarkerRange
+// MARK: AccessibilityTextMarkerRange
// Callback methods
diff --git a/Tools/DumpRenderTree/DumpRenderTree.gypi b/Tools/DumpRenderTree/DumpRenderTree.gypi
index 04caee7..b7de580 100644
--- a/Tools/DumpRenderTree/DumpRenderTree.gypi
+++ b/Tools/DumpRenderTree/DumpRenderTree.gypi
@@ -67,6 +67,12 @@
'chromium/WebThemeEngineDRTWin.h',
],
}],
+ ['OS=="mac"', {
+ 'drt_files': [
+ 'chromium/WebThemeEngineDRTMac.mm',
+ 'chromium/WebThemeEngineDRTMac.h',
+ ],
+ }],
],
}
}
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginCommon.vsprops b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginCommon.vsprops
index 922ae52..4608b32 100644
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginCommon.vsprops
+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginCommon.vsprops
@@ -6,7 +6,7 @@
>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)..&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)..&quot;;&quot;$(ConfigurationBuildDir)\Include&quot;;&quot;$(ConfigurationBuildDir)\Include\JavaScriptCore&quot;;&quot;$(ConfigurationBuildDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;"
PreprocessorDefinitions="_USRDLL;TESTNETSCAPEPLUGIN_EXPORTS;snprintf=_snprintf"
DisableSpecificWarnings="4819"
/>
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginPostBuild.cmd b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginPostBuild.cmd
index f011495..26707ca 100644
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginPostBuild.cmd
+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginPostBuild.cmd
@@ -1 +1 @@
-if exist "%WEBKITOUTPUTDIR%\buildfailed" del "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginPreBuild.cmd b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginPreBuild.cmd
index 3a84c26..a770776 100644
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginPreBuild.cmd
+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginPreBuild.cmd
@@ -1,6 +1,6 @@
%SystemDrive%\cygwin\bin\which.exe bash
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%WEBKITOUTPUTDIR%\buildfailed" grep XX%PROJECTNAME%XX "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
-echo XX%PROJECTNAME%XX > "%WEBKITOUTPUTDIR%\buildfailed"
+echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/Tools/DumpRenderTree/cf/WebArchiveDumpSupport.h b/Tools/DumpRenderTree/cf/WebArchiveDumpSupport.h
index 08d9c45..00c5818 100644
--- a/Tools/DumpRenderTree/cf/WebArchiveDumpSupport.h
+++ b/Tools/DumpRenderTree/cf/WebArchiveDumpSupport.h
@@ -32,8 +32,8 @@ typedef struct _CFURLResponse* CFURLResponseRef;
CFStringRef createXMLStringFromWebArchiveData(CFDataRef webArchiveData);
-#pragma mark -
-#pragma mark Platform-specific methods
+// MARK: -
+// MARK: Platform-specific methods
CFURLResponseRef createCFURLResponseFromResponseData(CFDataRef responseData);
CFArrayRef supportedNonImageMIMETypes();
diff --git a/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp b/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
index 3bbba98..6522450 100644
--- a/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
+++ b/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
@@ -32,6 +32,7 @@
#include "TestShell.h"
#include "webkit/support/webkit_support.h"
+#include <v8/include/v8-testing.h>
#include <v8/include/v8.h>
#include <wtf/Vector.h>
@@ -52,7 +53,8 @@ static const char optionCheckLayoutTestSystemDeps[] = "--check-layout-test-sys-d
static const char optionEnableAcceleratedCompositing[] = "--enable-accelerated-compositing";
static const char optionEnableAccelerated2DCanvas[] = "--enable-accelerated-2d-canvas";
-static const char optionMultipleLoads[] = "--multiple-loads=";
+static const char optionStressOpt[] = "--stress-opt";
+static const char optionStressDeopt[] = "--stress-deopt";
static const char optionJavaScriptFlags[] = "--js-flags=";
static void runTest(TestShell& shell, TestParams& params, const string& testName, bool testShellMode)
@@ -82,13 +84,22 @@ static void runTest(TestShell& shell, TestParams& params, const string& testName
}
params.testUrl = webkit_support::CreateURLForPathOrURL(pathOrURL);
webkit_support::SetCurrentDirectoryForFileURL(params.testUrl);
- for (int i = 0; i < shell.loadCount(); i++) {
- string javaScriptFlags = shell.javaScriptFlagsForLoad(i);
- v8::V8::SetFlagsFromString(javaScriptFlags.data(), static_cast<int>(javaScriptFlags.size()));
- bool isLastLoad = (i == (shell.loadCount() - 1));
- shell.setDumpWhenFinished(isLastLoad);
- shell.resetTestController();
- shell.runFileTest(params);
+ v8::V8::SetFlagsFromString(shell.javaScriptFlags().c_str(), shell.javaScriptFlags().length());
+ if (shell.stressOpt() || shell.stressDeopt()) {
+ if (shell.stressOpt())
+ v8::Testing::SetStressRunType(v8::Testing::kStressTypeOpt);
+ else
+ v8::Testing::SetStressRunType(v8::Testing::kStressTypeDeopt);
+ for (int i = 0; i < v8::Testing::GetStressRuns(); i++) {
+ v8::Testing::PrepareStressRun(i);
+ bool isLastLoad = (i == (v8::Testing::GetStressRuns() - 1));
+ shell.setDumpWhenFinished(isLastLoad);
+ shell.resetTestController();
+ shell.runFileTest(params);
+ }
+ } else {
+ shell.resetTestController();
+ shell.runFileTest(params);
}
shell.setLayoutTestTimeout(oldTimeoutMsec);
}
@@ -106,7 +117,8 @@ int main(int argc, char* argv[])
bool startupDialog = false;
bool acceleratedCompositingEnabled = false;
bool accelerated2DCanvasEnabled = false;
- int loadCount = 1;
+ bool stressOpt = false;
+ bool stressDeopt = false;
string javaScriptFlags;
for (int i = 1; i < argc; ++i) {
string argument(argv[i]);
@@ -132,12 +144,13 @@ int main(int argc, char* argv[])
acceleratedCompositingEnabled = true;
else if (argument == optionEnableAccelerated2DCanvas)
accelerated2DCanvasEnabled = true;
- else if (!argument.find(optionMultipleLoads)) {
- string multipleLoadsStr = argument.substr(strlen(optionMultipleLoads));
- loadCount = atoi(multipleLoadsStr.c_str());
- } else if (!argument.find(optionJavaScriptFlags)) {
+ else if (argument == optionStressOpt)
+ stressOpt = true;
+ else if (argument == optionStressDeopt)
+ stressDeopt = true;
+ else if (!argument.find(optionJavaScriptFlags))
javaScriptFlags = argument.substr(strlen(optionJavaScriptFlags));
- } else if (argument.size() && argument[0] == '-')
+ else if (argument.size() && argument[0] == '-')
fprintf(stderr, "Unknown option: %s\n", argv[i]);
else
tests.append(argument);
@@ -146,31 +159,11 @@ int main(int argc, char* argv[])
fprintf(stderr, "--pixel-tests with --test-shell requires a file name.\n");
return EXIT_FAILURE;
}
- if (loadCount < 1) {
- fprintf(stderr, "--multiple-loads requires a positive numeric argument.\n");
+ if (stressOpt && stressDeopt) {
+ fprintf(stderr, "--stress-opt and --stress-deopt are mutually exclusive.\n");
return EXIT_FAILURE;
}
- // The test runner might send a quoted string which needs to be unquoted before further processing.
- if (javaScriptFlags.length() > 1 && javaScriptFlags[0] == '"' && javaScriptFlags[javaScriptFlags.length() - 1] == '"')
- javaScriptFlags = javaScriptFlags.substr(1, javaScriptFlags.length() - 2);
- // Split the JavaScript flags into a list.
- Vector<string> flagsList;
- size_t start = 0;
- while (true) {
- size_t commaPos = javaScriptFlags.find_first_of(',', start);
- string flags;
- if (commaPos == string::npos)
- flags = javaScriptFlags.substr(start, javaScriptFlags.length() - start);
- else {
- flags = javaScriptFlags.substr(start, commaPos - start);
- start = commaPos + 1;
- }
- flagsList.append(flags);
- if (commaPos == string::npos)
- break;
- }
-
if (startupDialog)
openStartupDialog();
@@ -179,8 +172,9 @@ int main(int argc, char* argv[])
shell.setAllowExternalPages(allowExternalPages);
shell.setAcceleratedCompositingEnabled(acceleratedCompositingEnabled);
shell.setAccelerated2dCanvasEnabled(accelerated2DCanvasEnabled);
- shell.setLoadCount(loadCount);
- shell.setJavaScriptFlags(flagsList);
+ shell.setJavaScriptFlags(javaScriptFlags);
+ shell.setStressOpt(stressOpt);
+ shell.setStressDeopt(stressDeopt);
if (serverMode && !tests.size()) {
params.printSeparators = true;
char testString[2048]; // 2048 is the same as the sizes of other platforms.
diff --git a/Tools/DumpRenderTree/chromium/LayoutTestController.cpp b/Tools/DumpRenderTree/chromium/LayoutTestController.cpp
index e3af738..83e2389 100644
--- a/Tools/DumpRenderTree/chromium/LayoutTestController.cpp
+++ b/Tools/DumpRenderTree/chromium/LayoutTestController.cpp
@@ -1379,8 +1379,8 @@ void LayoutTestController::counterValueForElementById(const CppArgumentList& arg
static bool parsePageSizeParameters(const CppArgumentList& arguments,
int argOffset,
- float* pageWidthInPixels,
- float* pageHeightInPixels)
+ int* pageWidthInPixels,
+ int* pageHeightInPixels)
{
// WebKit is using the window width/height of DumpRenderTree as the
// default value of the page size.
@@ -1391,8 +1391,8 @@ static bool parsePageSizeParameters(const CppArgumentList& arguments,
case 2:
if (!arguments[argOffset].isNumber() || !arguments[1 + argOffset].isNumber())
return false;
- *pageWidthInPixels = static_cast<float>(arguments[argOffset].toInt32());
- *pageHeightInPixels = static_cast<float>(arguments[1 + argOffset].toInt32());
+ *pageWidthInPixels = arguments[argOffset].toInt32();
+ *pageHeightInPixels = arguments[1 + argOffset].toInt32();
// fall through.
case 0:
break;
@@ -1405,8 +1405,8 @@ static bool parsePageSizeParameters(const CppArgumentList& arguments,
void LayoutTestController::pageNumberForElementById(const CppArgumentList& arguments, CppVariant* result)
{
result->setNull();
- float pageWidthInPixels = 0;
- float pageHeightInPixels = 0;
+ int pageWidthInPixels = 0;
+ int pageHeightInPixels = 0;
if (!parsePageSizeParameters(arguments, 1,
&pageWidthInPixels, &pageHeightInPixels))
return;
@@ -1416,14 +1416,15 @@ void LayoutTestController::pageNumberForElementById(const CppArgumentList& argum
if (!frame)
return;
result->set(frame->pageNumberForElementById(cppVariantToWebString(arguments[0]),
- pageWidthInPixels, pageHeightInPixels));
+ static_cast<float>(pageWidthInPixels),
+ static_cast<float>(pageHeightInPixels)));
}
void LayoutTestController::numberOfPages(const CppArgumentList& arguments, CppVariant* result)
{
result->setNull();
- float pageWidthInPixels = 0;
- float pageHeightInPixels = 0;
+ int pageWidthInPixels = 0;
+ int pageHeightInPixels = 0;
if (!parsePageSizeParameters(arguments, 0, &pageWidthInPixels, &pageHeightInPixels))
return;
diff --git a/Tools/DumpRenderTree/chromium/TestShell.cpp b/Tools/DumpRenderTree/chromium/TestShell.cpp
index 21f4208..14fcdc7 100644
--- a/Tools/DumpRenderTree/chromium/TestShell.cpp
+++ b/Tools/DumpRenderTree/chromium/TestShell.cpp
@@ -86,7 +86,8 @@ TestShell::TestShell(bool testShellMode)
, m_allowExternalPages(false)
, m_acceleratedCompositingEnabled(false)
, m_accelerated2dCanvasEnabled(false)
- , m_loadCount(1)
+ , m_stressOpt(false)
+ , m_stressDeopt(false)
, m_dumpWhenFinished(true)
{
WebRuntimeFeatures::enableGeolocation(true);
@@ -106,8 +107,13 @@ TestShell::TestShell(bool testShellMode)
// timed-out DRT process was crashed.
m_timeout = 30 * 1000;
+ createMainWindow();
+}
+
+void TestShell::createMainWindow()
+{
m_drtDevToolsAgent.set(new DRTDevToolsAgent);
- m_webViewHost = createWebView();
+ m_webViewHost = createNewWindow(WebURL(), m_drtDevToolsAgent.get());
m_webView = m_webViewHost->webView();
m_drtDevToolsAgent->setWebView(m_webView);
}
@@ -557,15 +563,15 @@ void TestShell::bindJSObjectsToWindow(WebFrame* frame)
m_textInputController->bindToJavascript(frame, WebString::fromUTF8("textInputController"));
}
-WebViewHost* TestShell::createWebView()
+WebViewHost* TestShell::createNewWindow(const WebKit::WebURL& url)
{
- return createNewWindow(WebURL());
+ return createNewWindow(url, 0);
}
-WebViewHost* TestShell::createNewWindow(const WebURL& url)
+WebViewHost* TestShell::createNewWindow(const WebKit::WebURL& url, DRTDevToolsAgent* devToolsAgent)
{
WebViewHost* host = new WebViewHost(this);
- WebView* view = WebView::create(host, m_drtDevToolsAgent.get());
+ WebView* view = WebView::create(host, devToolsAgent);
host->setWebWidget(view);
m_prefs.applyTo(view);
view->initializeMainFrame(host);
diff --git a/Tools/DumpRenderTree/chromium/TestShell.h b/Tools/DumpRenderTree/chromium/TestShell.h
index 1da4e17..486f9ea 100644
--- a/Tools/DumpRenderTree/chromium/TestShell.h
+++ b/Tools/DumpRenderTree/chromium/TestShell.h
@@ -137,21 +137,20 @@ public:
int layoutTestTimeoutForWatchDog() { return layoutTestTimeout() + 1000; }
void setLayoutTestTimeout(int timeout) { m_timeout = timeout; }
- // Number of times to load each URL.
- int loadCount() { return m_loadCount; }
- void setLoadCount(int loadCount) { m_loadCount = loadCount; }
+ // V8 JavaScript stress test options.
+ int stressOpt() { return m_stressOpt; }
+ void setStressOpt(bool stressOpt) { m_stressOpt = stressOpt; }
+ int stressDeopt() { return m_stressDeopt; }
+ void setStressDeopt(int stressDeopt) { m_stressDeopt = stressDeopt; }
- // The JavaScript flags are specified as a vector of strings. Each element of the vector is full flags string
- // which can contain multiple flags (e.g. "--xxx --yyy"). With multiple load testing it is possible to specify
- // separate sets of flags to each load.
- std::string javaScriptFlagsForLoad(size_t load) { return (load < m_javaScriptFlags.size()) ? m_javaScriptFlags[load] : ""; }
- void setJavaScriptFlags(Vector<std::string> javaScriptFlags) { m_javaScriptFlags = javaScriptFlags; }
+ // The JavaScript flags specified as a strings.
+ std::string javaScriptFlags() { return m_javaScriptFlags; }
+ void setJavaScriptFlags(std::string javaScriptFlags) { m_javaScriptFlags = javaScriptFlags; }
// Set whether to dump when the loaded page has finished processing. This is used with multiple load
// testing where we only want to have the output from the last load.
void setDumpWhenFinished(bool dumpWhenFinished) { m_dumpWhenFinished = dumpWhenFinished; }
- WebViewHost* createWebView();
WebViewHost* createNewWindow(const WebKit::WebURL&);
void closeWindow(WebViewHost*);
void closeRemainingWindows();
@@ -168,6 +167,8 @@ public:
static const int virtualWindowBorder = 3;
private:
+ WebViewHost* createNewWindow(const WebKit::WebURL&, DRTDevToolsAgent*);
+ void createMainWindow();
void createDRTDevToolsClient(DRTDevToolsAgent*);
void resetWebSettings(WebKit::WebView&);
@@ -198,8 +199,9 @@ private:
bool m_acceleratedCompositingEnabled;
bool m_accelerated2dCanvasEnabled;
WebPreferences m_prefs;
- int m_loadCount;
- Vector<std::string> m_javaScriptFlags;
+ bool m_stressOpt;
+ bool m_stressDeopt;
+ std::string m_javaScriptFlags;
bool m_dumpWhenFinished;
diff --git a/Tools/DumpRenderTree/chromium/TestShellMac.mm b/Tools/DumpRenderTree/chromium/TestShellMac.mm
index 53ede56..d79a8c8 100644
--- a/Tools/DumpRenderTree/chromium/TestShellMac.mm
+++ b/Tools/DumpRenderTree/chromium/TestShellMac.mm
@@ -31,9 +31,12 @@
#include "config.h"
#include "TestShell.h"
+#include "WebThemeEngineDRTMac.h"
#include "webkit/support/webkit_support.h"
#import <AppKit/AppKit.h>
+static WebThemeEngineDRTMac themeEngine;
+
// A class to be the target/selector of the "watchdog" thread that ensures
// pages timeout if they take too long and tells the test harness via stdout.
@interface WatchDogTarget : NSObject {
@@ -126,6 +129,7 @@ void TestShell::waitTestFinished()
void platformInit(int*, char***)
{
+ webkit_support::SetThemeEngine(&themeEngine);
}
void openStartupDialog()
diff --git a/Tools/DumpRenderTree/chromium/TextInputController.cpp b/Tools/DumpRenderTree/chromium/TextInputController.cpp
index 3603840..c5dbe29 100644
--- a/Tools/DumpRenderTree/chromium/TextInputController.cpp
+++ b/Tools/DumpRenderTree/chromium/TextInputController.cpp
@@ -79,17 +79,10 @@ void TextInputController::insertText(const CppArgumentList& arguments, CppVarian
{
result->setNull();
- WebFrame* mainFrame = getMainFrame();
- if (!mainFrame)
- return;
if (arguments.size() < 1 || !arguments[0].isString())
return;
- if (mainFrame->hasMarkedText()) {
- mainFrame->unmarkText();
- mainFrame->replaceSelection(WebString());
- }
- mainFrame->insertText(WebString::fromUTF8(arguments[0].toString()));
+ testShell->webView()->confirmComposition(WebString::fromUTF8(arguments[0].toString()));
}
void TextInputController::doCommand(const CppArgumentList& arguments, CppVariant* result)
@@ -108,15 +101,13 @@ void TextInputController::setMarkedText(const CppArgumentList& arguments, CppVar
{
result->setNull();
- WebFrame* mainFrame = getMainFrame();
- if (!mainFrame)
- return;
-
if (arguments.size() >= 3 && arguments[0].isString()
&& arguments[1].isNumber() && arguments[2].isNumber()) {
- mainFrame->setMarkedText(WebString::fromUTF8(arguments[0].toString()),
- arguments[1].toInt32(),
- arguments[2].toInt32());
+ WebVector<WebCompositionUnderline> underlines;
+ testShell->webView()->setComposition(WebString::fromUTF8(arguments[0].toString()),
+ underlines,
+ arguments[1].toInt32(),
+ arguments[1].toInt32() + arguments[2].toInt32());
}
}
@@ -124,11 +115,7 @@ void TextInputController::unmarkText(const CppArgumentList&, CppVariant* result)
{
result->setNull();
- WebFrame* mainFrame = getMainFrame();
- if (!mainFrame)
- return;
-
- mainFrame->unmarkText();
+ testShell->webView()->confirmComposition();
}
void TextInputController::hasMarkedText(const CppArgumentList&, CppVariant* result)
diff --git a/Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.h b/Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.h
new file mode 100644
index 0000000..a59e207
--- /dev/null
+++ b/Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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.
+ */
+
+// This implements the WebThemeEngine API in such a way that we match the Mac
+// port rendering more than usual Chromium path, thus allowing us to share
+// more pixel baselines.
+
+#ifndef WebThemeEngineDRTMac_h
+#define WebThemeEngineDRTMac_h
+
+#include "third_party/WebKit/WebKit/chromium/public/mac/WebThemeEngine.h"
+
+class WebThemeEngineDRTMac : public WebKit::WebThemeEngine {
+public:
+ virtual void paintScrollbarThumb(
+ WebKit::WebCanvas*,
+ WebKit::WebThemeEngine::State,
+ WebKit::WebThemeEngine::Size,
+ const WebKit::WebRect&,
+ const WebKit::WebThemeEngine::ScrollbarInfo&);
+private:
+ virtual void paintHIThemeScrollbarThumb(
+ WebKit::WebCanvas*,
+ WebKit::WebThemeEngine::State,
+ WebKit::WebThemeEngine::Size,
+ const WebKit::WebRect&,
+ const WebKit::WebThemeEngine::ScrollbarInfo&);
+ virtual void paintNSScrollerScrollbarThumb(
+ WebKit::WebCanvas*,
+ WebKit::WebThemeEngine::State,
+ WebKit::WebThemeEngine::Size,
+ const WebKit::WebRect&,
+ const WebKit::WebThemeEngine::ScrollbarInfo&);
+};
+
+#endif // WebThemeEngineDRTMac_h
diff --git a/Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.mm b/Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.mm
new file mode 100644
index 0000000..6333a37
--- /dev/null
+++ b/Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.mm
@@ -0,0 +1,186 @@
+/*
+ * Copyright (C) 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.
+ */
+
+#include "WebThemeEngineDRTMac.h"
+
+#include "third_party/WebKit/WebKit/chromium/public/WebCanvas.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
+#import <AppKit/NSAffineTransform.h>
+#import <AppKit/NSGraphicsContext.h>
+#import <AppKit/NSScroller.h>
+#import <AppKit/NSWindow.h>
+#include <Carbon/Carbon.h>
+
+using WebKit::WebCanvas;
+using WebKit::WebRect;
+using WebKit::WebThemeEngine;
+
+// We can't directly tell the NSScroller to draw itself as active or inactive,
+// instead we have to make it a child of an (in)active window. This class lets
+// us fake that parent window.
+@interface FakeActiveWindow : NSWindow {
+@private
+ BOOL hasActiveControls;
+}
++ (NSWindow*)alwaysActiveWindow;
++ (NSWindow*)alwaysInactiveWindow;
+- (id)initWithActiveControls:(BOOL)_hasActiveControls;
+- (BOOL)_hasActiveControls;
+@end
+
+@implementation FakeActiveWindow
+
+static NSWindow* alwaysActiveWindow = nil;
+static NSWindow* alwaysInactiveWindow = nil;
+
++ (NSWindow*)alwaysActiveWindow
+{
+ if (alwaysActiveWindow == nil)
+ alwaysActiveWindow = [[self alloc] initWithActiveControls:YES];
+ return alwaysActiveWindow;
+}
+
++ (NSWindow*)alwaysInactiveWindow
+{
+ if (alwaysInactiveWindow == nil)
+ alwaysInactiveWindow = [[self alloc] initWithActiveControls:NO];
+ return alwaysInactiveWindow;
+}
+
+- (id)initWithActiveControls:(BOOL)_hasActiveControls
+{
+ self = [super init];
+ hasActiveControls = _hasActiveControls;
+ return self;
+}
+
+- (BOOL)_hasActiveControls
+{
+ return hasActiveControls;
+}
+
+@end
+
+void WebThemeEngineDRTMac::paintScrollbarThumb(
+ WebCanvas* canvas,
+ WebThemeEngine::State state,
+ WebThemeEngine::Size size,
+ const WebRect& rect,
+ const WebThemeEngine::ScrollbarInfo& scrollbarInfo)
+{
+ // To match the Mac port, we still use HITheme for inner scrollbars.
+ if (scrollbarInfo.parent == WebThemeEngine::ScrollbarParentRenderLayer)
+ paintHIThemeScrollbarThumb(canvas, state, size, rect, scrollbarInfo);
+ else
+ paintNSScrollerScrollbarThumb(canvas, state, size, rect, scrollbarInfo);
+}
+
+static ThemeTrackEnableState stateToHIEnableState(WebThemeEngine::State state)
+{
+ switch (state) {
+ case WebThemeEngine::StateDisabled:
+ return kThemeTrackDisabled;
+ case WebThemeEngine::StateInactive:
+ return kThemeTrackInactive;
+ default:
+ return kThemeTrackActive;
+ }
+}
+
+// Duplicated from webkit/glue/webthemeengine_impl_mac.cc in the downstream
+// Chromium WebThemeEngine implementation.
+void WebThemeEngineDRTMac::paintHIThemeScrollbarThumb(
+ WebCanvas* canvas,
+ WebThemeEngine::State state,
+ WebThemeEngine::Size size,
+ const WebRect& rect,
+ const WebThemeEngine::ScrollbarInfo& scrollbarInfo)
+{
+ HIThemeTrackDrawInfo trackInfo;
+ trackInfo.version = 0;
+ trackInfo.kind = size == WebThemeEngine::SizeRegular ? kThemeMediumScrollBar : kThemeSmallScrollBar;
+ trackInfo.bounds = CGRectMake(rect.x, rect.y, rect.width, rect.height);
+ trackInfo.min = 0;
+ trackInfo.max = scrollbarInfo.maxValue;
+ trackInfo.value = scrollbarInfo.currentValue;
+ trackInfo.trackInfo.scrollbar.viewsize = scrollbarInfo.visibleSize;
+ trackInfo.attributes = 0;
+ if (scrollbarInfo.orientation == WebThemeEngine::ScrollbarOrientationHorizontal)
+ trackInfo.attributes |= kThemeTrackHorizontal;
+
+ trackInfo.enableState = stateToHIEnableState(state);
+
+ trackInfo.trackInfo.scrollbar.pressState =
+ state == WebThemeEngine::StatePressed ? kThemeThumbPressed : 0;
+ trackInfo.attributes |= (kThemeTrackShowThumb | kThemeTrackHideTrack);
+ HIThemeDrawTrack(&trackInfo, 0, canvas, kHIThemeOrientationNormal);
+}
+
+void WebThemeEngineDRTMac::paintNSScrollerScrollbarThumb(
+ WebCanvas* canvas,
+ WebThemeEngine::State state,
+ WebThemeEngine::Size size,
+ const WebRect& rect,
+ const WebThemeEngine::ScrollbarInfo& scrollbarInfo)
+{
+ NSScroller* scroller = [[NSScroller alloc] initWithFrame:NSMakeRect(rect.x, rect.y, rect.width, rect.height)];
+ [scroller setEnabled:state != WebThemeEngine::StateDisabled];
+ if (state == WebThemeEngine::StateInactive)
+ [[[FakeActiveWindow alwaysInactiveWindow] contentView] addSubview:scroller];
+ else
+ [[[FakeActiveWindow alwaysActiveWindow] contentView] addSubview:scroller];
+
+ [scroller setControlSize:size == WebThemeEngine::SizeRegular ? NSRegularControlSize : NSSmallControlSize];
+
+ double value = double(scrollbarInfo.currentValue) / double(scrollbarInfo.maxValue);
+ [scroller setDoubleValue: value];
+
+ float knobProportion = float(scrollbarInfo.visibleSize) / float(scrollbarInfo.totalSize);
+ [scroller setKnobProportion: knobProportion];
+
+ NSGraphicsContext* previousGraphicsContext = [NSGraphicsContext currentContext];
+ NSGraphicsContext* nsGraphicsContext = [NSGraphicsContext graphicsContextWithGraphicsPort:canvas flipped:YES];
+ [NSGraphicsContext setCurrentContext:nsGraphicsContext];
+
+ // Despite passing in frameRect() to the scroller, it always draws at (0, 0).
+ // Force it to draw in the right location by translating the whole graphics
+ // context.
+ [nsGraphicsContext saveGraphicsState];
+ NSAffineTransform *transform = [NSAffineTransform transform];
+ [transform translateXBy:rect.x yBy:rect.y];
+ [transform concat];
+
+ [scroller drawKnob];
+
+ [scroller release];
+
+ [nsGraphicsContext restoreGraphicsState];
+ [NSGraphicsContext setCurrentContext:previousGraphicsContext];
+}
diff --git a/Tools/DumpRenderTree/chromium/WebViewHost.cpp b/Tools/DumpRenderTree/chromium/WebViewHost.cpp
index e3c8c28..849312c 100644
--- a/Tools/DumpRenderTree/chromium/WebViewHost.cpp
+++ b/Tools/DumpRenderTree/chromium/WebViewHost.cpp
@@ -235,7 +235,7 @@ WebView* WebViewHost::createView(WebFrame*, const WebWindowFeatures&, const WebS
{
if (!layoutTestController()->canOpenWindows())
return 0;
- return m_shell->createWebView()->webView();
+ return m_shell->createNewWindow(WebURL())->webView();
}
WebWidget* WebViewHost::createPopupMenu(WebPopupType)
@@ -410,11 +410,7 @@ bool WebViewHost::handleCurrentKeyboardEvent()
void WebViewHost::spellCheck(const WebString& text, int& misspelledOffset, int& misspelledLength)
{
// Check the spelling of the given text.
-#if OS(MAC_OS_X)
- // FIXME: rebaseline layout-test results of Windows and Linux so we
- // can enable this mock spellchecker on them.
m_spellcheck.spellCheckWord(text, &misspelledOffset, &misspelledLength);
-#endif
}
WebString WebViewHost::autoCorrectWord(const WebString&)
@@ -1133,10 +1129,6 @@ WebViewHost::~WebViewHost()
loadURLForFrame(GURL("about:blank"), WebString());
}
- // Call GC twice to clean up garbage.
- m_shell->callJSGC();
- m_shell->callJSGC();
-
webWidget()->close();
if (m_inModalLoop)
diff --git a/Tools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp b/Tools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp
index 589e53c..c572633 100644
--- a/Tools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp
+++ b/Tools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp
@@ -60,13 +60,11 @@ AccessibilityUIElement AccessibilityController::focusedElement()
AccessibilityUIElement AccessibilityController::rootElement()
{
- WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
+ AtkObject* accessible = DumpRenderTreeSupportGtk::getRootAccessibleElement(mainFrame);
+ if (!accessible)
+ return 0;
- // The presumed, desired rootElement is the parent of the web view.
- GtkWidget* webViewParent = gtk_widget_get_parent(GTK_WIDGET(view));
- AtkObject* axObject = gtk_widget_get_accessible(webViewParent);
-
- return AccessibilityUIElement(axObject);
+ return AccessibilityUIElement(accessible);
}
void AccessibilityController::setLogFocusEvents(bool)
diff --git a/Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp b/Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
index 7e1a9c2..ff76e4b 100644
--- a/Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
+++ b/Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
@@ -376,7 +376,7 @@ static bool checkElementState(PlatformUIElement element, AtkStateType stateType)
if (!ATK_IS_OBJECT(element))
return false;
- PlatformRefPtr<AtkStateSet> stateSet = adoptPlatformRef(atk_object_ref_state_set(ATK_OBJECT(element)));
+ GRefPtr<AtkStateSet> stateSet = adoptGRef(atk_object_ref_state_set(ATK_OBJECT(element)));
return atk_state_set_contains_state(stateSet.get(), stateType);
}
@@ -408,7 +408,7 @@ bool AccessibilityUIElement::isFocused() const
if (!ATK_IS_OBJECT(m_element))
return false;
- PlatformRefPtr<AtkStateSet> stateSet = adoptPlatformRef(atk_object_ref_state_set(ATK_OBJECT(m_element)));
+ GRefPtr<AtkStateSet> stateSet = adoptGRef(atk_object_ref_state_set(ATK_OBJECT(m_element)));
gboolean isFocused = atk_state_set_contains_state(stateSet.get(), ATK_STATE_FOCUSED);
return isFocused;
@@ -670,7 +670,7 @@ bool AccessibilityUIElement::isFocusable() const
if (!ATK_IS_OBJECT(m_element))
return false;
- PlatformRefPtr<AtkStateSet> stateSet = adoptPlatformRef(atk_object_ref_state_set(ATK_OBJECT(m_element)));
+ GRefPtr<AtkStateSet> stateSet = adoptGRef(atk_object_ref_state_set(ATK_OBJECT(m_element)));
gboolean isFocusable = atk_state_set_contains_state(stateSet.get(), ATK_STATE_FOCUSABLE);
return isFocusable;
diff --git a/Tools/DumpRenderTree/mac/AccessibilityControllerMac.mm b/Tools/DumpRenderTree/mac/AccessibilityControllerMac.mm
index 9d7edef..1a9f9c9 100644
--- a/Tools/DumpRenderTree/mac/AccessibilityControllerMac.mm
+++ b/Tools/DumpRenderTree/mac/AccessibilityControllerMac.mm
@@ -28,8 +28,10 @@
#import "AccessibilityController.h"
#import "AccessibilityUIElement.h"
+#import <AppKit/NSColor.h>
#import <Foundation/Foundation.h>
#import <WebKit/WebFrame.h>
+#import <WebKit/WebFramePrivate.h>
#import <WebKit/WebHTMLView.h>
AccessibilityController::AccessibilityController()
@@ -49,14 +51,14 @@ AccessibilityUIElement AccessibilityController::elementAtPoint(int x, int y)
AccessibilityUIElement AccessibilityController::focusedElement()
{
// FIXME: we could do some caching here.
- id accessibilityObject = [[[mainFrame frameView] documentView] accessibilityFocusedUIElement];
+ id accessibilityObject = [[mainFrame accessibilityRoot] accessibilityFocusedUIElement];
return AccessibilityUIElement(accessibilityObject);
}
AccessibilityUIElement AccessibilityController::rootElement()
{
// FIXME: we could do some caching here.
- id accessibilityObject = [[mainFrame frameView] documentView];
+ id accessibilityObject = [mainFrame accessibilityRoot];
return AccessibilityUIElement(accessibilityObject);
}
diff --git a/Tools/DumpRenderTree/mac/AccessibilityTextMarkerMac.mm b/Tools/DumpRenderTree/mac/AccessibilityTextMarkerMac.mm
index 9170ab6..18ddb85 100644
--- a/Tools/DumpRenderTree/mac/AccessibilityTextMarkerMac.mm
+++ b/Tools/DumpRenderTree/mac/AccessibilityTextMarkerMac.mm
@@ -28,7 +28,7 @@
#import "AccessibilityTextMarker.h"
#import "DumpRenderTree.h"
-#pragma mark AccessibilityTextMarker
+// MARK: AccessibilityTextMarker
AccessibilityTextMarker::AccessibilityTextMarker(PlatformTextMarker marker)
: m_textMarker(marker)
@@ -54,7 +54,7 @@ PlatformTextMarker AccessibilityTextMarker::platformTextMarker() const
return m_textMarker.get();
}
-#pragma mark AccessibilityTextMarkerRange
+// MARK: AccessibilityTextMarkerRange
AccessibilityTextMarkerRange::AccessibilityTextMarkerRange(PlatformTextMarkerRange markerRange)
: m_textMarkerRange(markerRange)
diff --git a/Tools/DumpRenderTree/mac/ObjCController.m b/Tools/DumpRenderTree/mac/ObjCController.m
index f1d1c10..ba866f8 100644
--- a/Tools/DumpRenderTree/mac/ObjCController.m
+++ b/Tools/DumpRenderTree/mac/ObjCController.m
@@ -270,8 +270,8 @@ static void* runJavaScriptThread(void* arg)
return nil;
}
-#pragma mark -
-#pragma mark Testing Objective-C DOM HTML Bindings
+// MARK: -
+// MARK: Testing Objective-C DOM HTML Bindings
- (void)setSelectElement:(WebScriptObject *)element selectedIndex:(int)index allowingMultiple:(BOOL)allowingMultiple
{
diff --git a/Tools/DumpRenderTree/qt/DumpRenderTree.pro b/Tools/DumpRenderTree/qt/DumpRenderTree.pro
index e8831a3..a7c6c26 100644
--- a/Tools/DumpRenderTree/qt/DumpRenderTree.pro
+++ b/Tools/DumpRenderTree/qt/DumpRenderTree.pro
@@ -6,9 +6,9 @@ BASEDIR = $$PWD/../
isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../..
include(../../../WebKit.pri)
-INCLUDEPATH += ../../..
-INCLUDEPATH += ../../../JavaScriptCore
-INCLUDEPATH += ../../../JavaScriptCore/ForwardingHeaders
+INCLUDEPATH += ../../../Source
+INCLUDEPATH += ../../../Source/JavaScriptCore
+INCLUDEPATH += ../../../Source/JavaScriptCore/ForwardingHeaders
INCLUDEPATH += $$BASEDIR
DESTDIR = ../../../bin
@@ -29,7 +29,7 @@ HEADERS = $$BASEDIR/WorkQueue.h \
GCControllerQt.h \
PlainTextControllerQt.h \
testplugin.h
-SOURCES = ../../../JavaScriptCore/wtf/Assertions.cpp \
+SOURCES = ../../../Source/JavaScriptCore/wtf/Assertions.cpp \
$$BASEDIR/WorkQueue.cpp \
DumpRenderTreeQt.cpp \
EventSenderQt.cpp \
@@ -50,4 +50,4 @@ wince*: {
LIBS += $$WCECOMPAT/lib/wcecompat.lib
}
-DEFINES+=USE_SYSTEM_MALLOC
+DEFINES += USE_SYSTEM_MALLOC=1
diff --git a/Tools/DumpRenderTree/qt/ImageDiff.pro b/Tools/DumpRenderTree/qt/ImageDiff.pro
index 74fabf8..a218449 100644
--- a/Tools/DumpRenderTree/qt/ImageDiff.pro
+++ b/Tools/DumpRenderTree/qt/ImageDiff.pro
@@ -3,7 +3,7 @@ CONFIG -= app_bundle
isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../..
include(../../../WebKit.pri)
-INCLUDEPATH += ../../../JavaScriptCore
+INCLUDEPATH += ../../../Source/JavaScriptCore
DESTDIR = $$OUTPUT_DIR/bin
QT = core gui
diff --git a/Tools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro b/Tools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro
index de3cf6a..6f96d0a 100644
--- a/Tools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro
+++ b/Tools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro
@@ -18,11 +18,11 @@ mac {
debug_and_release:TARGET = $$qtLibraryTarget($$TARGET)
}
-INCLUDEPATH += ../../../../JavaScriptCore \
+INCLUDEPATH += ../../../../Source/JavaScriptCore \
../../unix/TestNetscapePlugin/ForwardingHeaders \
../../unix/TestNetscapePlugin/ForwardingHeaders/WebKit \
- ../../../../WebCore \
- ../../../../WebCore/bridge \
+ ../../../../Source/WebCore \
+ ../../../../Source/WebCore/bridge \
../../TestNetscapePlugIn
SOURCES = PluginObject.cpp \
@@ -44,3 +44,7 @@ mac {
} else {
SOURCES += ../../unix/TestNetscapePlugin/TestNetscapePlugin.cpp
}
+
+!win32:!embedded:!mac:!symbian {
+ LIBS += -lX11
+}
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreeCommon.vsprops b/Tools/DumpRenderTree/win/DumpRenderTreeCommon.vsprops
index 71d261b..d511f68 100644
--- a/Tools/DumpRenderTree/win/DumpRenderTreeCommon.vsprops
+++ b/Tools/DumpRenderTree/win/DumpRenderTreeCommon.vsprops
@@ -6,7 +6,7 @@
>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ConfigurationBuildDir)\Include&quot;;&quot;$(ConfigurationBuildDir)\Include\private&quot;;&quot;$(ConfigurationBuildDir)\Include\DumpRenderTree\ForwardingHeaders&quot;;&quot;$(ConfigurationBuildDir)\Include\JavaScriptCore&quot;;&quot;$(ConfigurationBuildDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(ConfigurationBuildDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;"
PreprocessorDefinitions="_CONSOLE"
DisableSpecificWarnings="4146"
ForcedIncludeFiles="DumpRenderTreePrefix.h"
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreePostBuild.cmd b/Tools/DumpRenderTree/win/DumpRenderTreePostBuild.cmd
index fc8c778..7016e0e 100644
--- a/Tools/DumpRenderTree/win/DumpRenderTreePostBuild.cmd
+++ b/Tools/DumpRenderTree/win/DumpRenderTreePostBuild.cmd
@@ -1,40 +1,40 @@
-if exist "%WEBKITOUTPUTDIR%\buildfailed" del "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed"
if not defined ARCHIVE_BUILD (if defined PRODUCTION exit /b)
-mkdir 2>NUL "%WEBKITOUTPUTDIR%\bin"
+mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\bin"
if not exist "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.dll" exit /b
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreVideo%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreVideo%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CFNetwork%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CFNetwork%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CFNetwork.resources" "%WEBKITOUTPUTDIR%\bin\CFNetwork.resources"
-xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CoreFoundation.resources" "%WEBKITOUTPUTDIR%\bin\CoreFoundation.resources"
-xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CharacterSets" "%WEBKITOUTPUTDIR%\bin\CharacterSets"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreGraphics%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreGraphics%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\dnssd.dll" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icudt40.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt40.dll" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icudt40%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt40%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.pdb"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.pdb"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icudt42.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt42.dll" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icudt42%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt42%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.pdb"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.pdb"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libxml2%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libxslt%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\SQLite3%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\SQLite3%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\zlib1%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\zlib1%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreVideo%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreVideo%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CFNetwork%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CFNetwork%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CFNetwork.resources" "%CONFIGURATIONBUILDDIR%\bin\CFNetwork.resources"
+xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CoreFoundation.resources" "%CONFIGURATIONBUILDDIR%\bin\CoreFoundation.resources"
+xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CharacterSets" "%CONFIGURATIONBUILDDIR%\bin\CharacterSets"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreGraphics%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreGraphics%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\dnssd.dll" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icudt40.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt40.dll" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icudt40%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt40%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.pdb"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.pdb"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icudt42.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt42.dll" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icudt42%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt42%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.pdb"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.pdb"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libxml2%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libxslt%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\SQLite3%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\SQLite3%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\zlib1%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\zlib1%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreePreBuild.cmd b/Tools/DumpRenderTree/win/DumpRenderTreePreBuild.cmd
index 1d3fa8b..a843d70 100644
--- a/Tools/DumpRenderTree/win/DumpRenderTreePreBuild.cmd
+++ b/Tools/DumpRenderTree/win/DumpRenderTreePreBuild.cmd
@@ -1,18 +1,18 @@
%SystemDrive%\cygwin\bin\which.exe bash
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%WEBKITOUTPUTDIR%\buildfailed" grep XX%PROJECTNAME%XX "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
-echo XX%PROJECTNAME%XX > "%WEBKITOUTPUTDIR%\buildfailed"
+echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
-mkdir 2>NUL "%WEBKITOUTPUTDIR%\include\DumpRenderTree"
-mkdir 2>NUL "%WEBKITOUTPUTDIR%\include\DumpRenderTree\ForwardingHeaders"
-mkdir 2>NUL "%WEBKITOUTPUTDIR%\include\DumpRenderTree\ForwardingHeaders\wtf"
+mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\include\DumpRenderTree"
+mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\include\DumpRenderTree\ForwardingHeaders"
+mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\include\DumpRenderTree\ForwardingHeaders\wtf"
-xcopy /y /d "%PROJECTDIR%\..\ForwardingHeaders\wtf\*.h" "%WEBKITOUTPUTDIR%\include\DumpRenderTree\ForwardingHeaders\wtf"
+xcopy /y /d "%PROJECTDIR%\..\ForwardingHeaders\wtf\*.h" "%CONFIGURATIONBUILDDIR%\include\DumpRenderTree\ForwardingHeaders\wtf"
-if "%CONFIGURATIONNAME%"=="Debug_Cairo_CFLite" xcopy /y /d "%WEBKITOUTPUTDIR%\include\WebCore\ForwardingHeaders\wtf\MD5.h" "%WEBKITOUTPUTDIR%\include\DumpRenderTree\ForwardingHeaders\wtf"
-if "%CONFIGURATIONNAME%"=="Release_Cairo_CFLite" xcopy /y /d "%WEBKITOUTPUTDIR%\include\WebCore\ForwardingHeaders\wtf\MD5.h" "%WEBKITOUTPUTDIR%\include\DumpRenderTree\ForwardingHeaders\wtf"
+if "%CONFIGURATIONNAME%"=="Debug_Cairo_CFLite" xcopy /y /d "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\wtf\MD5.h" "%CONFIGURATIONBUILDDIR%\include\DumpRenderTree\ForwardingHeaders\wtf"
+if "%CONFIGURATIONNAME%"=="Release_Cairo_CFLite" xcopy /y /d "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\wtf\MD5.h" "%CONFIGURATIONBUILDDIR%\include\DumpRenderTree\ForwardingHeaders\wtf"
if "%CONFIGURATIONNAME%"=="Debug_Cairo" xcopy /y /d "%TARGETDIR%\..\include\WebCore\ForwardingHeaders\wtf\MD5.h"
if "%CONFIGURATIONNAME%"=="Release_Cairo" xcopy /y /d "%TARGETDIR%\..\include\WebCore\ForwardingHeaders\wtf\MD5.h"
diff --git a/Tools/DumpRenderTree/win/ImageDiffCommon.vsprops b/Tools/DumpRenderTree/win/ImageDiffCommon.vsprops
index e93d262..1156a72 100644
--- a/Tools/DumpRenderTree/win/ImageDiffCommon.vsprops
+++ b/Tools/DumpRenderTree/win/ImageDiffCommon.vsprops
@@ -6,7 +6,7 @@
>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;"
+ AdditionalIncludeDirectories="&quot;$(ConfigurationBuildDir)\include&quot;;&quot;$(ConfigurationBuildDir)\include\private&quot;;&quot;$(ConfigurationBuildDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;"
/>
<Tool
Name="VCLinkerTool"
diff --git a/Tools/DumpRenderTree/win/ImageDiffPostBuild.cmd b/Tools/DumpRenderTree/win/ImageDiffPostBuild.cmd
index f011495..26707ca 100644
--- a/Tools/DumpRenderTree/win/ImageDiffPostBuild.cmd
+++ b/Tools/DumpRenderTree/win/ImageDiffPostBuild.cmd
@@ -1 +1 @@
-if exist "%WEBKITOUTPUTDIR%\buildfailed" del "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/Tools/DumpRenderTree/win/ImageDiffPreBuild.cmd b/Tools/DumpRenderTree/win/ImageDiffPreBuild.cmd
index 3a84c26..a770776 100644
--- a/Tools/DumpRenderTree/win/ImageDiffPreBuild.cmd
+++ b/Tools/DumpRenderTree/win/ImageDiffPreBuild.cmd
@@ -1,6 +1,6 @@
%SystemDrive%\cygwin\bin\which.exe bash
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%WEBKITOUTPUTDIR%\buildfailed" grep XX%PROJECTNAME%XX "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
-echo XX%PROJECTNAME%XX > "%WEBKITOUTPUTDIR%\buildfailed"
+echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/Tools/DumpRenderTree/wscript b/Tools/DumpRenderTree/wscript
index 4aaedb4..d583f1a 100644
--- a/Tools/DumpRenderTree/wscript
+++ b/Tools/DumpRenderTree/wscript
@@ -31,9 +31,9 @@ from settings import *
include_paths = [
os.path.join(output_dir),
- os.path.join(wk_root, 'JavaScriptCore'),
- os.path.join(wk_root, 'WebCore'),
- os.path.join(wk_root, 'WebCore', 'bindings', 'wx'),
+ os.path.join(wk_root, 'Source', 'JavaScriptCore'),
+ os.path.join(wk_root, 'Source', 'WebCore'),
+ os.path.join(wk_root, 'Source', 'WebCore', 'bindings', 'wx'),
os.path.join(wk_root, 'WebKit', 'wx'),
'.',
'wx'
diff --git a/Tools/EWebLauncher/main.c b/Tools/EWebLauncher/main.c
index 5f417d0..79bc043 100644
--- a/Tools/EWebLauncher/main.c
+++ b/Tools/EWebLauncher/main.c
@@ -483,14 +483,6 @@ on_focus_in(void *data, Evas *e, Evas_Object *obj, void *event_info)
}
static void
-on_resized(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
- Evas_Coord w, h;
- evas_object_geometry_get(obj, NULL, NULL, &w, &h);
- ewk_view_fixed_layout_size_set(obj, w, h);
-}
-
-static void
on_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Evas_Event_Key_Down *ev = (Evas_Event_Key_Down*) event_info;
@@ -698,13 +690,14 @@ browserCreate(const char *url, const char *theme, const char *userAgent, Eina_Re
evas_object_layer_set(app->bg, EVAS_LAYER_MIN);
evas_object_show(app->bg);
- if (backingStore && !strcasecmp(backingStore, "single")) {
- app->browser = ewk_view_single_add(app->evas);
- info("backing store: single\n");
- } else {
+ if (backingStore && !strcasecmp(backingStore, "tiled")) {
app->browser = ewk_view_tiled_add(app->evas);
info("backing store: tiled\n");
+ } else {
+ app->browser = ewk_view_single_add(app->evas);
+ info("backing store: single\n");
}
+
ewk_view_theme_set(app->browser, theme);
if (userAgent)
ewk_view_setting_user_agent_set(app->browser, userAgent);
@@ -730,7 +723,6 @@ browserCreate(const char *url, const char *theme, const char *userAgent, Eina_Re
/* ewk_callback_resize_requested_add(app->browser, on_resize_requested, app->ee); */
- evas_object_event_callback_add(app->browser, EVAS_CALLBACK_RESIZE, on_resized, app);
evas_object_event_callback_add(app->browser, EVAS_CALLBACK_KEY_DOWN, on_key_down, app);
evas_object_event_callback_add(app->browser, EVAS_CALLBACK_MOUSE_DOWN, on_mouse_down, app);
evas_object_event_callback_add(app->browser, EVAS_CALLBACK_FOCUS_IN, on_focus_in, app);
@@ -830,7 +822,6 @@ main(int argc, char *argv[])
unsigned char quitOption = 0;
unsigned char isFullscreen = 0;
- unsigned char sudoWorkaround = 0;
int args;
Ecore_Getopt_Value values[] = {
@@ -841,7 +832,6 @@ main(int argc, char *argv[])
ECORE_GETOPT_VALUE_PTR_CAST(geometry),
ECORE_GETOPT_VALUE_STR(theme),
ECORE_GETOPT_VALUE_STR(userAgent),
- ECORE_GETOPT_VALUE_BOOL(sudoWorkaround),
ECORE_GETOPT_VALUE_INT(verbose),
ECORE_GETOPT_VALUE_BOOL(quitOption),
ECORE_GETOPT_VALUE_BOOL(quitOption),
@@ -872,9 +862,6 @@ main(int argc, char *argv[])
else
url = (char*) default_url;
- if (sudoWorkaround)
- strcat(getenv("HOME"), "blah");
-
themePath = findThemePath(theme);
if (!themePath)
return quit(EINA_FALSE, "ERROR: could not find theme.\n");
diff --git a/Tools/FindSafari/FindSafari.vcproj b/Tools/FindSafari/FindSafari.vcproj
index c91bb1c..e2beb9f 100644
--- a/Tools/FindSafari/FindSafari.vcproj
+++ b/Tools/FindSafari/FindSafari.vcproj
@@ -380,6 +380,67 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
+ <Configuration
+ Name="Release_PGO|Win32"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\FindSafariCommon.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
</Configurations>
<References>
</References>
diff --git a/Tools/GNUmakefile.am b/Tools/GNUmakefile.am
index bf21418..4813346 100644
--- a/Tools/GNUmakefile.am
+++ b/Tools/GNUmakefile.am
@@ -6,7 +6,7 @@ noinst_PROGRAMS += \
# GtkLauncher
Programs_GtkLauncher_CPPFLAGS = \
-I$(srcdir)/WebKit/gtk \
- -I$(srcdir)/WebCore/platform/network/soup/cache/ \
+ -I$(srcdir)/Source/WebCore/platform/network/soup/cache/ \
-I$(top_builddir)/WebKit/gtk \
-I$(top_builddir)/DerivedSources \
$(global_cppflags) \
@@ -38,8 +38,8 @@ dumprendertree_cppflags := \
-I$(srcdir)/Tools/DumpRenderTree/cairo \
-I$(srcdir)/Tools/DumpRenderTree/gtk \
-I$(srcdir)/WebKit/gtk \
- -I$(srcdir)/WebCore/platform/gtk \
- -I$(srcdir)/WebCore/platform/network/soup/cache/ \
+ -I$(srcdir)/Source/WebCore/platform/gtk \
+ -I$(srcdir)/Source/WebCore/platform/network/soup/cache/ \
-I$(top_builddir)/WebKit/gtk \
-I$(top_builddir)/DerivedSources \
$(global_cppflags) \
@@ -81,7 +81,7 @@ Programs_DumpRenderTree_SOURCES = \
Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp \
Tools/DumpRenderTree/gtk/PixelDumpSupportGtk.cpp \
Tools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp \
- WebCore/platform/gtk/GtkVersioning.c
+ Source/WebCore/platform/gtk/GtkVersioning.c
Programs_DumpRenderTree_CXXFLAGS = \
$(global_cxxflags) \
@@ -155,9 +155,9 @@ dumprendertree_cppflags += \
TestNetscapePlugin_libtestnetscapeplugin_la_CPPFLAGS = \
-I$(srcdir)/Tools/DumpRenderTree \
-I$(srcdir)/Tools/DumpRenderTree/unix/TestNetscapePlugin/ForwardingHeaders \
- -I$(srcdir)/WebCore \
- -I$(srcdir)/WebCore/bridge \
- -I$(srcdir)/WebCore/plugins \
+ -I$(srcdir)/Source/WebCore \
+ -I$(srcdir)/Source/WebCore/bridge \
+ -I$(srcdir)/Source/WebCore/plugins \
-I$(srcdir)/Tools/DumpRenderTree/TestNetscapePlugIn \
$(global_cppflags) \
$(javascriptcore_cppflags)
diff --git a/Tools/GtkLauncher/main.c b/Tools/GtkLauncher/main.c
index a1baf05..ad666e2 100644
--- a/Tools/GtkLauncher/main.c
+++ b/Tools/GtkLauncher/main.c
@@ -230,6 +230,24 @@ static gchar* filenameToURL(const char* filename)
return fileURL;
}
+#ifndef GTK_API_VERSION_2
+static void disablePlugin(const char* pluginName)
+{
+ WebKitWebPluginDatabase *database = webkit_get_web_plugin_database();
+ GSList *plugins = webkit_web_plugin_database_get_plugins(database);
+ GSList *p;
+
+ for (p = plugins; p; p = g_slist_next(p)) {
+ WebKitWebPlugin *plugin = WEBKIT_WEB_PLUGIN(p->data);
+
+ if (!g_strcmp0(webkit_web_plugin_get_name(plugin), pluginName))
+ webkit_web_plugin_set_enabled(plugin, FALSE);
+ }
+
+ webkit_web_plugin_database_plugins_list_free(plugins);
+}
+#endif
+
int main(int argc, char* argv[])
{
WebKitWebView *webView;
@@ -239,6 +257,10 @@ int main(int argc, char* argv[])
if (!g_thread_supported())
g_thread_init(NULL);
+#ifndef GTK_API_VERSION_2
+ disablePlugin("Shockwave Flash");
+#endif
+
main_window = createWindow(&webView);
gchar *uri =(gchar*)(argc > 1 ? argv[1] : "http://www.google.com/");
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserCommon.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserCommon.vsprops
index f971837..1a42a72 100644
--- a/Tools/MiniBrowser/Configurations/MiniBrowserCommon.vsprops
+++ b/Tools/MiniBrowser/Configurations/MiniBrowserCommon.vsprops
@@ -6,7 +6,7 @@
>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;"
+ AdditionalIncludeDirectories="&quot;$(ConfigurationBuildDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;"
UsePrecompiledHeader="2"
/>
</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/MiniBrowserPostBuild.cmd b/Tools/MiniBrowser/MiniBrowserPostBuild.cmd
index 5445453..5016c59 100644
--- a/Tools/MiniBrowser/MiniBrowserPostBuild.cmd
+++ b/Tools/MiniBrowser/MiniBrowserPostBuild.cmd
@@ -1,33 +1,33 @@
-mkdir 2>NUL "%WEBKITOUTPUTDIR%\bin"
+mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CFNetwork%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CFNetwork%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CFNetwork.resources" "%WEBKITOUTPUTDIR%\bin\CFNetwork.resources"
-xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CoreFoundation.resources" "%WEBKITOUTPUTDIR%\bin\CoreFoundation.resources"
-xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CharacterSets" "%WEBKITOUTPUTDIR%\bin\CharacterSets"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreGraphics%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreGraphics%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\dnssd.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt40.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt40%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libxml2%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libxslt%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\SQLite3%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\SQLite3%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\zlib1%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\zlib1%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\objc%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\objc%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CFNetwork%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CFNetwork%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CFNetwork.resources" "%CONFIGURATIONBUILDDIR%\bin\CFNetwork.resources"
+xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CoreFoundation.resources" "%CONFIGURATIONBUILDDIR%\bin\CoreFoundation.resources"
+xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CharacterSets" "%CONFIGURATIONBUILDDIR%\bin\CharacterSets"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreGraphics%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreGraphics%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\dnssd.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt40.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt40%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libxml2%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libxslt%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\SQLite3%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\SQLite3%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\zlib1%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\zlib1%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\objc%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\objc%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\QuartzCore%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\QuartzCore%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\QuartzCore%LIBRARYCONFIGSUFFIX%.pdb" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\QuartzCore%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\QuartzCore%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\QuartzCore%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\QuartzCore%LIBRARYCONFIGSUFFIX%.pdb" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\QuartzCore%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITOUTPUTDIR%\buildfailed" del "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/Tools/MiniBrowser/MiniBrowserPreBuild.cmd b/Tools/MiniBrowser/MiniBrowserPreBuild.cmd
index ff212e4..833ae5b 100644
--- a/Tools/MiniBrowser/MiniBrowserPreBuild.cmd
+++ b/Tools/MiniBrowser/MiniBrowserPreBuild.cmd
@@ -1,5 +1,5 @@
set PATH=%SystemDrive%\cygwin\bin;%PATH%
-if exist "%WEBKITOUTPUTDIR%\buildfailed" grep XX%PROJECTNAME%XX "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
-echo XX%PROJECTNAME%XX > "%WEBKITOUTPUTDIR%\buildfailed"
+echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/Tools/MiniBrowser/mac/AppDelegate.m b/Tools/MiniBrowser/mac/AppDelegate.m
index a02193b..05631d5 100644
--- a/Tools/MiniBrowser/mac/AppDelegate.m
+++ b/Tools/MiniBrowser/mac/AppDelegate.m
@@ -60,7 +60,7 @@ void didRecieveMessageFromInjectedBundle(WKContextRef context, WKStringRef messa
WKRelease(newMessageBody);
}
-#pragma mark History Client Callbacks
+// MARK: History Client Callbacks
static void didNavigateWithNavigationData(WKContextRef context, WKPageRef page, WKNavigationDataRef navigationData, WKFrameRef frame, const void *clientInfo)
{
diff --git a/Tools/MiniBrowser/mac/BrowserWindowController.m b/Tools/MiniBrowser/mac/BrowserWindowController.m
index 0fa4755..ad3fcab 100644
--- a/Tools/MiniBrowser/mac/BrowserWindowController.m
+++ b/Tools/MiniBrowser/mac/BrowserWindowController.m
@@ -247,7 +247,7 @@
});
}
-#pragma mark Loader Client Callbacks
+// MARK: Loader Client Callbacks
static void didStartProvisionalLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo)
{
@@ -356,7 +356,7 @@ static void didChangeBackForwardList(WKPageRef page, const void *clientInfo)
[(BrowserWindowController *)clientInfo validateToolbar];
}
-#pragma mark Policy Client Callbacks
+// MARK: Policy Client Callbacks
static void decidePolicyForNavigationAction(WKPageRef page, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKURLRef url, WKFrameRef frame, WKFramePolicyListenerRef listener, const void *clientInfo)
{
@@ -375,7 +375,7 @@ static void decidePolicyForMIMEType(WKPageRef page, WKStringRef MIMEType, WKURLR
WKFramePolicyListenerUse(listener);
}
-#pragma mark UI Client Callbacks
+// MARK: UI Client Callbacks
static WKPageRef createNewPage(WKPageRef page, WKDictionaryRef features, WKEventModifiers modifiers, WKEventMouseButton button, const void* clientInfo)
{
diff --git a/Tools/MiniBrowser/qt/BrowserWindow.cpp b/Tools/MiniBrowser/qt/BrowserWindow.cpp
index 743c91a..be08cae 100644
--- a/Tools/MiniBrowser/qt/BrowserWindow.cpp
+++ b/Tools/MiniBrowser/qt/BrowserWindow.cpp
@@ -28,13 +28,20 @@
#include "BrowserWindow.h"
-BrowserWindow::BrowserWindow(QGraphicsWKView::BackingStoreType type)
- : m_backingStoreType(type)
+static QWKPage* newPageFunction(QWKPage*)
+{
+ BrowserWindow* window = new BrowserWindow();
+ return window->page();
+}
+
+QGraphicsWKView::BackingStoreType BrowserWindow::backingStoreTypeForNewWindow = QGraphicsWKView::Simple;
+
+BrowserWindow::BrowserWindow()
{
setAttribute(Qt::WA_DeleteOnClose);
m_menu = new QMenuBar();
- m_browser = new BrowserView(m_backingStoreType);
+ m_browser = new BrowserView(backingStoreTypeForNewWindow);
m_addressBar = new QLineEdit();
m_menu->addAction("New Window", this, SLOT(newWindow()));
@@ -51,10 +58,10 @@ BrowserWindow::BrowserWindow(QGraphicsWKView::BackingStoreType type)
connect(m_browser->view(), SIGNAL(urlChanged(const QUrl&)), SLOT(urlChanged(const QUrl&)));
QToolBar* bar = addToolBar("Navigation");
- bar->addAction(m_browser->view()->page()->action(QWKPage::Back));
- bar->addAction(m_browser->view()->page()->action(QWKPage::Forward));
- bar->addAction(m_browser->view()->page()->action(QWKPage::Reload));
- bar->addAction(m_browser->view()->page()->action(QWKPage::Stop));
+ bar->addAction(page()->action(QWKPage::Back));
+ bar->addAction(page()->action(QWKPage::Forward));
+ bar->addAction(page()->action(QWKPage::Reload));
+ bar->addAction(page()->action(QWKPage::Stop));
bar->addWidget(m_addressBar);
this->setMenuBar(m_menu);
@@ -65,6 +72,8 @@ BrowserWindow::BrowserWindow(QGraphicsWKView::BackingStoreType type)
QShortcut* selectAddressBar = new QShortcut(Qt::CTRL | Qt::Key_L, this);
connect(selectAddressBar, SIGNAL(activated()), this, SLOT(openLocation()));
+ page()->setCreateNewPageFunction(newPageFunction);
+
resize(960, 640);
show();
}
@@ -75,9 +84,14 @@ void BrowserWindow::load(const QString& url)
m_browser->load(url);
}
+QWKPage* BrowserWindow::page()
+{
+ return m_browser->view()->page();
+}
+
BrowserWindow* BrowserWindow::newWindow(const QString& url)
{
- BrowserWindow* window = new BrowserWindow(m_backingStoreType);
+ BrowserWindow* window = new BrowserWindow;
window->load(url);
return window;
}
@@ -125,8 +139,6 @@ void BrowserWindow::urlChanged(const QUrl& url)
void BrowserWindow::updateUserAgentList()
{
- QWKPage* page = m_browser->view()->page();
-
QFile file(":/useragentlist.txt");
if (file.open(QIODevice::ReadOnly)) {
@@ -139,9 +151,9 @@ void BrowserWindow::updateUserAgentList()
}
Q_ASSERT(!m_userAgentList.isEmpty());
-
- if (!(page->customUserAgent().isEmpty() || m_userAgentList.contains(page->customUserAgent())))
- m_userAgentList << page->customUserAgent();
+ QWKPage* wkPage = page();
+ if (!(wkPage->customUserAgent().isEmpty() || m_userAgentList.contains(wkPage->customUserAgent())))
+ m_userAgentList << wkPage->customUserAgent();
}
void BrowserWindow::showUserAgentDialog()
@@ -160,7 +172,7 @@ void BrowserWindow::showUserAgentDialog()
combo->insertItems(0, m_userAgentList);
layout->addWidget(combo);
- int index = combo->findText(m_browser->view()->page()->customUserAgent());
+ int index = combo->findText(page()->customUserAgent());
combo->setCurrentIndex(index);
QDialogButtonBox* buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel
@@ -170,7 +182,7 @@ void BrowserWindow::showUserAgentDialog()
layout->addWidget(buttonBox);
if (dialog.exec() && !combo->currentText().isEmpty())
- m_browser->view()->page()->setCustomUserAgent(combo->currentText());
+ page()->setCustomUserAgent(combo->currentText());
}
BrowserWindow::~BrowserWindow()
diff --git a/Tools/MiniBrowser/qt/BrowserWindow.h b/Tools/MiniBrowser/qt/BrowserWindow.h
index fe94d6b..0010fbe 100644
--- a/Tools/MiniBrowser/qt/BrowserWindow.h
+++ b/Tools/MiniBrowser/qt/BrowserWindow.h
@@ -38,10 +38,14 @@ class BrowserWindow : public QMainWindow {
Q_OBJECT
public:
- BrowserWindow(QGraphicsWKView::BackingStoreType);
+ BrowserWindow();
~BrowserWindow();
void load(const QString& url);
+ QWKPage* page();
+
+ static QGraphicsWKView::BackingStoreType backingStoreTypeForNewWindow;
+
public slots:
BrowserWindow* newWindow(const QString& url = "about:blank");
void openLocation();
@@ -60,7 +64,6 @@ private:
QMenuBar* m_menu;
QLineEdit* m_addressBar;
QStringList m_userAgentList;
- QGraphicsWKView::BackingStoreType m_backingStoreType;
};
#endif
diff --git a/Tools/MiniBrowser/qt/main.cpp b/Tools/MiniBrowser/qt/main.cpp
index 20f4ff5..8c987c5 100644
--- a/Tools/MiniBrowser/qt/main.cpp
+++ b/Tools/MiniBrowser/qt/main.cpp
@@ -53,7 +53,8 @@ int main(int argc, char** argv) {
args.append("http://www.google.com");
}
- BrowserWindow* window = new BrowserWindow(backingStoreTypeToUse);
+ BrowserWindow::backingStoreTypeForNewWindow = backingStoreTypeToUse;
+ BrowserWindow* window = new BrowserWindow;
window->load(args[0]);
for (int i = 1; i < args.size(); ++i)
diff --git a/Tools/QtTestBrowser/main.cpp b/Tools/QtTestBrowser/main.cpp
index 41471fa..ec5f1d9 100644
--- a/Tools/QtTestBrowser/main.cpp
+++ b/Tools/QtTestBrowser/main.cpp
@@ -126,6 +126,10 @@ void LauncherApplication::handleUserOptions()
<< "[-inspector-url location]"
<< "[-tiled-backing-store]"
<< "[-resizes-to-contents]"
+ << "[-local-storage-enabled]"
+ << "[-offline-storage-database-enabled]"
+ << "[-offline-web-application-cache-enabled]"
+ << "[-set-offline-storage-default-quota maxSize]"
<< "URLs";
appQuit(0);
}
@@ -158,7 +162,22 @@ void LauncherApplication::handleUserOptions()
requiresGraphicsView("-resizes-to-contents");
windowOptions.resizesToContents = true;
}
-
+
+ if (args.contains("-local-storage-enabled"))
+ QWebSettings::globalSettings()->setAttribute(QWebSettings::LocalStorageEnabled, true);
+
+ if (args.contains("-offline-storage-database-enabled"))
+ QWebSettings::globalSettings()->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true);
+
+ if (args.contains("-offline-web-application-cache-enabled"))
+ QWebSettings::globalSettings()->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, true);
+
+ int setOfflineStorageDefaultQuotaIndex = args.indexOf("-set-offline-storage-default-quota");
+ if (setOfflineStorageDefaultQuotaIndex != -1) {
+ int maxSize = takeOptionValue(&args, setOfflineStorageDefaultQuotaIndex).toInt();
+ QWebSettings::globalSettings()->setOfflineStorageDefaultQuota(maxSize);
+ }
+
if (defaultForAnimations)
windowOptions.viewportUpdateMode = QGraphicsView::BoundingRectViewportUpdate;
diff --git a/Tools/QtTestBrowser/mainwindow.cpp b/Tools/QtTestBrowser/mainwindow.cpp
index f361fa8..756c3c2 100644
--- a/Tools/QtTestBrowser/mainwindow.cpp
+++ b/Tools/QtTestBrowser/mainwindow.cpp
@@ -95,6 +95,7 @@ void MainWindow::buildUI()
page()->action(QWebPage::Cut)->setShortcut(QKeySequence::Cut);
page()->action(QWebPage::Copy)->setShortcut(QKeySequence::Copy);
page()->action(QWebPage::Paste)->setShortcut(QKeySequence::Paste);
+ page()->action(QWebPage::SelectAll)->setShortcut(QKeySequence::SelectAll);
page()->action(QWebPage::ToggleBold)->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_B));
page()->action(QWebPage::ToggleItalic)->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_I));
diff --git a/Tools/QtTestBrowser/webview.h b/Tools/QtTestBrowser/webview.h
index 240ea89..b50b764 100644
--- a/Tools/QtTestBrowser/webview.h
+++ b/Tools/QtTestBrowser/webview.h
@@ -41,7 +41,9 @@
#include <QGraphicsWidget>
#include <QTime>
+QT_BEGIN_NAMESPACE
class QStateMachine;
+QT_END_NAMESPACE
class WebViewTraditional : public QWebView {
Q_OBJECT
diff --git a/Tools/QueueStatusServer/handlers/queuestatus.py b/Tools/QueueStatusServer/handlers/queuestatus.py
index 54c0fdd..e5dc95f 100644
--- a/Tools/QueueStatusServer/handlers/queuestatus.py
+++ b/Tools/QueueStatusServer/handlers/queuestatus.py
@@ -56,17 +56,31 @@ class QueueStatus(webapp.RequestHandler):
def _build_status_groups(self, statuses):
return [list(group) for key, group in itertools.groupby(statuses, self._grouping_key_for_status)]
- def get(self, queue_name):
+ def _fetch_statuses(self, queue, bot_id):
+ statuses = queuestatus.QueueStatus.all()
+ statuses = statuses.filter("queue_name =", queue.name())
+ if bot_id:
+ statuses.filter("bot_id =", bot_id)
+ return statuses.order("-date").fetch(15)
+
+ def _page_title(self, queue, bot_id):
+ title = "%s Messages" % queue.display_name()
+ if bot_id:
+ title += " from \"%s\"" % (bot_id)
+ return title
+
+ def get(self, queue_name, bot_id=None):
queue_name = queue_name.lower()
queue = Queue.queue_with_name(queue_name)
if not queue:
self.error(404)
return
- statuses = queuestatus.QueueStatus.all().filter("queue_name =", queue.name()).order("-date").fetch(15)
+ statuses = self._fetch_statuses(queue, bot_id)
template_values = {
- "display_queue_name": queue.display_name(),
+ "page_title": self._page_title(queue, bot_id),
"work_item_rows": self._rows_for_work_items(queue),
"status_groups": self._build_status_groups(statuses),
+ "bot_id": bot_id,
}
self.response.out.write(template.render("templates/queuestatus.html", template_values))
diff --git a/Tools/QueueStatusServer/index.yaml b/Tools/QueueStatusServer/index.yaml
index 6c9a3b2..9724760 100644
--- a/Tools/QueueStatusServer/index.yaml
+++ b/Tools/QueueStatusServer/index.yaml
@@ -25,6 +25,13 @@ indexes:
- kind: QueueStatus
properties:
+ - name: bot_id
+ - name: queue_name
+ - name: date
+ direction: desc
+
+- kind: QueueStatus
+ properties:
- name: queue_name
- name: date
diff --git a/Tools/QueueStatusServer/main.py b/Tools/QueueStatusServer/main.py
index 3fbee5c..446f36b 100644
--- a/Tools/QueueStatusServer/main.py
+++ b/Tools/QueueStatusServer/main.py
@@ -62,6 +62,7 @@ routes = [
(r'/results/(.*)', ShowResults),
(r'/status-bubble/(.*)', StatusBubble),
(r'/svn-revision/(.*)', SVNRevision),
+ (r'/queue-status/(.*)/bots/(.*)', QueueStatus),
(r'/queue-status/(.*)', QueueStatus),
(r'/next-patch/(.*)', NextPatch),
(r'/release-patch', ReleasePatch),
diff --git a/Tools/QueueStatusServer/templates/includes/singlequeuestatus.html b/Tools/QueueStatusServer/templates/includes/singlequeuestatus.html
index 0adbfbd..94393c0 100644
--- a/Tools/QueueStatusServer/templates/includes/singlequeuestatus.html
+++ b/Tools/QueueStatusServer/templates/includes/singlequeuestatus.html
@@ -1,6 +1,6 @@
<span class="status-date">{{ status.date|timesince }} ago
{% if status.bot_id %}
-({{ status.bot_id }})
+(<a href="/queue-status/{{status.queue_name}}/bots/{{status.bot_id}}">{{ status.bot_id }}</a>)
{% endif %}
</span>
<span class="status-message">{{ status.message|force_escape|urlize|webkit_linkify|safe }}</span>
diff --git a/Tools/QueueStatusServer/templates/queuestatus.html b/Tools/QueueStatusServer/templates/queuestatus.html
index 1b98952..c68abf1 100644
--- a/Tools/QueueStatusServer/templates/queuestatus.html
+++ b/Tools/QueueStatusServer/templates/queuestatus.html
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<html>
<head>
-<title>{{ display_queue_name }} Status</title>
+<title>{{ page_title }}</title>
<link type="text/css" rel="stylesheet" href="/stylesheets/dashboard.css" />
</head>
<body>
-<h1>{{ display_queue_name }} Status</h1>
+<h1>{{ page_title }}</h1>
<h3>Recent Status</h3>
diff --git a/Tools/Scripts/VCSUtils.pm b/Tools/Scripts/VCSUtils.pm
index faed7ed..e61774c 100644
--- a/Tools/Scripts/VCSUtils.pm
+++ b/Tools/Scripts/VCSUtils.pm
@@ -44,11 +44,13 @@ BEGIN {
$VERSION = 1.00;
@ISA = qw(Exporter);
@EXPORT = qw(
+ &applyGitBinaryPatchDelta
&callSilently
&canonicalizePath
&changeLogEmailAddress
&changeLogName
&chdirReturningRelativePath
+ &decodeGitBinaryChunk
&decodeGitBinaryPatch
&determineSVNRoot
&determineVCSRoot
@@ -392,6 +394,16 @@ sub normalizePath($)
return $path;
}
+sub adjustPathForRecentRenamings($)
+{
+ my ($fullPath) = @_;
+
+ if ($fullPath =~ m|^WebCore/| || $fullPath =~ m|^JavaScriptCore/|) {
+ return "Source/$fullPath";
+ }
+ return $fullPath;
+}
+
sub canonicalizePath($)
{
my ($file) = @_;
@@ -511,7 +523,7 @@ sub parseGitDiffHeader($$)
# The first and second paths can differ in the case of copies
# and renames. We use the second file path because it is the
# destination path.
- $indexPath = $4;
+ $indexPath = adjustPathForRecentRenamings($4);
# Use $POSTMATCH to preserve the end-of-line character.
$_ = "Index: $indexPath$POSTMATCH"; # Convert to SVN format.
} else {
@@ -627,7 +639,7 @@ sub parseSvnDiffHeader($$)
my $indexPath;
if (/$svnDiffStartRegEx/) {
- $indexPath = $1;
+ $indexPath = adjustPathForRecentRenamings($1);
} else {
die("First line of SVN diff does not begin with \"Index \": \"$_\"");
}
@@ -1304,12 +1316,7 @@ sub setChangeLogDateAndReviewer($$$)
# Returns $changeLogHashRef:
# $changeLogHashRef: a hash reference representing a change log patch.
# patch: a ChangeLog patch equivalent to the given one, but with the
-# newest ChangeLog entry inserted at the top of the file, if possible.
-# hasOverlappingLines: the value 1 if the change log entry overlaps
-# some lines of another change log entry. This can
-# happen when deliberately inserting a new ChangeLog
-# entry earlier in the file above an entry with
-# the same date and author.
+# newest ChangeLog entry inserted at the top of the file, if possible.
sub fixChangeLogPatch($)
{
my $patch = shift; # $patch will only contain patch fragments for ChangeLog.
@@ -1403,8 +1410,19 @@ sub fixChangeLogPatch($)
$lines[$i] = "+$text";
}
- # Finish moving whatever overlapping lines remain, and update
- # the initial chunk range.
+ # If @overlappingLines > 0, this is where we make use of the
+ # assumption that the beginning of the source file was not modified.
+ splice(@lines, $chunkStartIndex, 0, @overlappingLines);
+
+ # Update the date start index as it may have changed after shifting
+ # the overlapping lines towards the front.
+ for ($i = $chunkStartIndex; $i < $dateStartIndex; ++$i) {
+ $dateStartIndex = $i if $lines[$i] =~ /$dateStartRegEx/;
+ }
+ splice(@lines, $chunkStartIndex, $dateStartIndex - $chunkStartIndex); # Remove context of later entry.
+ $deletedLineCount += $dateStartIndex - $chunkStartIndex;
+
+ # Update the initial chunk range.
my $chunkRangeRegEx = '^\@\@ -(\d+),(\d+) \+\d+,(\d+) \@\@$'; # e.g. @@ -2,6 +2,18 @@
if ($lines[$chunkStartIndex - 1] !~ /$chunkRangeRegEx/) {
# FIXME: Handle errors differently from ChangeLog files that
@@ -1413,21 +1431,9 @@ sub fixChangeLogPatch($)
$changeLogHashRef{patch} = $patch; # Error: unexpected patch string format.
return \%changeLogHashRef;
}
- my $skippedFirstLineCount = $1 - 1;
my $oldSourceLineCount = $2;
my $oldTargetLineCount = $3;
- if (@overlappingLines != $skippedFirstLineCount) {
- # This can happen, for example, when deliberately inserting
- # a new ChangeLog entry earlier in the file.
- $changeLogHashRef{hasOverlappingLines} = 1;
- $changeLogHashRef{patch} = $patch;
- return \%changeLogHashRef;
- }
- # If @overlappingLines > 0, this is where we make use of the
- # assumption that the beginning of the source file was not modified.
- splice(@lines, $chunkStartIndex, 0, @overlappingLines);
-
my $sourceLineCount = $oldSourceLineCount + @overlappingLines - $deletedLineCount;
my $targetLineCount = $oldTargetLineCount + @overlappingLines - $deletedLineCount;
$lines[$chunkStartIndex - 1] = "@@ -1,$sourceLineCount +1,$targetLineCount @@";
@@ -1738,7 +1744,6 @@ sub decodeGitBinaryPatch($$)
#
# Each chunk a line which starts from either "literal" or "delta",
# followed by a number which specifies decoded size of the chunk.
- # The "delta" type chunks aren't supported by this function yet.
#
# Then, content of the chunk comes. To decode the content, we
# need decode it with base85 first, and then zlib.
@@ -1759,10 +1764,94 @@ sub decodeGitBinaryPatch($$)
my $reverseBinaryChunk = decodeGitBinaryChunk($encodedReverseChunk, $fullPath);
my $reverseBinaryChunkActualSize = length($reverseBinaryChunk);
- die "$fullPath: unexpected size of the first chunk (expected $binaryChunkExpectedSize but was $binaryChunkActualSize" if ($binaryChunkExpectedSize != $binaryChunkActualSize);
- die "$fullPath: unexpected size of the second chunk (expected $reverseBinaryChunkExpectedSize but was $reverseBinaryChunkActualSize" if ($reverseBinaryChunkExpectedSize != $reverseBinaryChunkActualSize);
+ die "$fullPath: unexpected size of the first chunk (expected $binaryChunkExpectedSize but was $binaryChunkActualSize" if ($binaryChunkType eq "literal" and $binaryChunkExpectedSize != $binaryChunkActualSize);
+ die "$fullPath: unexpected size of the second chunk (expected $reverseBinaryChunkExpectedSize but was $reverseBinaryChunkActualSize" if ($reverseBinaryChunkType eq "literal" and $reverseBinaryChunkExpectedSize != $reverseBinaryChunkActualSize);
return ($binaryChunkType, $binaryChunk, $reverseBinaryChunkType, $reverseBinaryChunk);
}
+sub readByte($$)
+{
+ my ($data, $location) = @_;
+
+ # Return the byte at $location in $data as a numeric value.
+ return ord(substr($data, $location, 1));
+}
+
+# The git binary delta format is undocumented, except in code:
+# - https://github.com/git/git/blob/master/delta.h:get_delta_hdr_size is the source
+# of the algorithm in decodeGitBinaryPatchDeltaSize.
+# - https://github.com/git/git/blob/master/patch-delta.c:patch_delta is the source
+# of the algorithm in applyGitBinaryPatchDelta.
+sub decodeGitBinaryPatchDeltaSize($)
+{
+ my ($binaryChunk) = @_;
+
+ # Source and destination buffer sizes are stored in 7-bit chunks at the
+ # start of the binary delta patch data. The highest bit in each byte
+ # except the last is set; the remaining 7 bits provide the next
+ # chunk of the size. The chunks are stored in ascending significance
+ # order.
+ my $cmd;
+ my $size = 0;
+ my $shift = 0;
+ for (my $i = 0; $i < length($binaryChunk);) {
+ $cmd = readByte($binaryChunk, $i++);
+ $size |= ($cmd & 0x7f) << $shift;
+ $shift += 7;
+ if (!($cmd & 0x80)) {
+ return ($size, $i);
+ }
+ }
+}
+
+sub applyGitBinaryPatchDelta($$)
+{
+ my ($binaryChunk, $originalContents) = @_;
+
+ # Git delta format consists of two headers indicating source buffer size
+ # and result size, then a series of commands. Each command is either
+ # a copy-from-old-version (the 0x80 bit is set) or a copy-from-delta
+ # command. Commands are applied sequentially to generate the result.
+ #
+ # A copy-from-old-version command encodes an offset and size to copy
+ # from in subsequent bits, while a copy-from-delta command consists only
+ # of the number of bytes to copy from the delta.
+
+ # We don't use these values, but we need to know how big they are so that
+ # we can skip to the diff data.
+ my ($size, $bytesUsed) = decodeGitBinaryPatchDeltaSize($binaryChunk);
+ $binaryChunk = substr($binaryChunk, $bytesUsed);
+ ($size, $bytesUsed) = decodeGitBinaryPatchDeltaSize($binaryChunk);
+ $binaryChunk = substr($binaryChunk, $bytesUsed);
+
+ my $out = "";
+ for (my $i = 0; $i < length($binaryChunk); ) {
+ my $cmd = ord(substr($binaryChunk, $i++, 1));
+ if ($cmd & 0x80) {
+ # Extract an offset and size from the delta data, then copy
+ # $size bytes from $offset in the original data into the output.
+ my $offset = 0;
+ my $size = 0;
+ if ($cmd & 0x01) { $offset = readByte($binaryChunk, $i++); }
+ if ($cmd & 0x02) { $offset |= readByte($binaryChunk, $i++) << 8; }
+ if ($cmd & 0x04) { $offset |= readByte($binaryChunk, $i++) << 16; }
+ if ($cmd & 0x08) { $offset |= readByte($binaryChunk, $i++) << 24; }
+ if ($cmd & 0x10) { $size = readByte($binaryChunk, $i++); }
+ if ($cmd & 0x20) { $size |= readByte($binaryChunk, $i++) << 8; }
+ if ($cmd & 0x40) { $size |= readByte($binaryChunk, $i++) << 16; }
+ if ($size == 0) { $size = 0x10000; }
+ $out .= substr($originalContents, $offset, $size);
+ } elsif ($cmd) {
+ # Copy $cmd bytes from the delta data into the output.
+ $out .= substr($binaryChunk, $i, $cmd);
+ $i += $cmd;
+ } else {
+ die "unexpected delta opcode 0";
+ }
+ }
+
+ return $out;
+}
+
1;
diff --git a/Tools/Scripts/build-jsc b/Tools/Scripts/build-jsc
index 0316349..c9d4134 100755
--- a/Tools/Scripts/build-jsc
+++ b/Tools/Scripts/build-jsc
@@ -61,14 +61,16 @@ chdirWebKit();
my @options = XcodeOptions();
my @coverageSupportOptions = ($coverageSupport) ? XcodeCoverageSupportOptions() : ();
-chdir "JavaScriptCore" or die "Can't find JavaScriptCore directory to build from";
+chdir "Source/JavaScriptCore" or die "Can't find JavaScriptCore directory to build from";
my $result;
if (isAppleMacWebKit()) {
$result = system "sh", "-c", 'xcodebuild -project JavaScriptCore.xcodeproj "$@" | grep -v setenv && exit ${PIPESTATUS[0]}', "xcodebuild", @options, @ARGV, @coverageSupportOptions;
} elsif (isAppleWinWebKit()) {
$result = buildVisualStudioProject("JavaScriptCore.vcproj/JavaScriptCore.sln");
-} elsif (isQt() or isGtk() or isWx()) {
- # Qt and Gtk build everything in one-shot. No need to build anything here.
+} elsif (isGtk()) {
+ $result = buildGtkProject("JavaScriptCore");
+} elsif (isQt() or isWx()) {
+ # Qt builds everything in one-shot. No need to build anything here.
$result = 0;
} else {
die "Building not defined for this platform!\n";
diff --git a/Tools/Scripts/build-webkit b/Tools/Scripts/build-webkit
index 94b2ea2..c300da1 100755
--- a/Tools/Scripts/build-webkit
+++ b/Tools/Scripts/build-webkit
@@ -43,6 +43,7 @@ use POSIX;
sub formatBuildTime($);
sub writeCongrats();
+sub checkForJavaSDK();
my $originalWorkingDirectory = getcwd();
chdirWebKit();
@@ -85,8 +86,10 @@ my (
$linkPrefetchSupport,
$mathmlSupport,
$meterTagSupport,
+ $netscapePluginSupport,
$notificationsSupport,
$offlineWebApplicationSupport,
+ $orientationEventsSupport,
$progressTagSupport,
$sharedWorkersSupport,
$svgSupport,
@@ -98,6 +101,7 @@ my (
$svgUseSupport,
$systemMallocSupport,
$tiledBackingStoreSupport,
+ $touchEventsSupport,
$videoSupport,
$wcssSupport,
$webAudioSupport,
@@ -193,12 +197,18 @@ my @features = (
{ option => "meter-tag", desc => "Meter Tag support",
define => "ENABLE_METER_TAG", default => !isGtk() && !isAppleWinWebKit(), value => \$meterTagSupport },
+ { option => "netscape-plugin", desc => "Netscape Plugin support",
+ define => "ENABLE_NETSCAPE_PLUGIN_API", default => !isWinCE(), value => \$netscapePluginSupport },
+
{ option => "notifications", desc => "Toggle Desktop Notifications Support",
define => "ENABLE_NOTIFICATIONS", default => 0, value => \$notificationsSupport },
{ option => "offline-web-applications", desc => "Toggle Offline Web Application Support",
define => "ENABLE_OFFLINE_WEB_APPLICATIONS", default => 1, value => \$offlineWebApplicationSupport },
+ { option => "orientation-events", desc => "Toggle Orientation Events support",
+ define => "ENABLE_ORIENTATION_EVENTS", default => 0, value => \$orientationEventsSupport },
+
{ option => "progress-tag", desc => "Progress Tag support",
define => "ENABLE_PROGRESS_TAG", default => 1, value => \$progressTagSupport },
@@ -232,6 +242,9 @@ my @features = (
{ option => "tiled-backing-store", desc => "Toggle Tiled Backing Store support",
define => "ENABLE_TILED_BACKING_STORE", default => isQt(), value => \$tiledBackingStoreSupport },
+ { option => "touch-events", desc => "Toggle Touch Events support",
+ define => "ENABLE_TOUCH_EVENTS", default => isQt(), value => \$touchEventsSupport },
+
{ option => "video", desc => "Toggle Video support",
define => "ENABLE_VIDEO", default => (isAppleWebKit() || isGtk()), value => \$videoSupport },
@@ -299,11 +312,14 @@ Usage: $programName [options] [options to pass to build system]
--help Show this help message
--clean Cleanup the build directory
--debug Compile in debug mode
- --wincairo Build using Cairo (rather than CoreGraphics) on Windows
+
--chromium Build the Chromium port on Mac/Win/Linux
+ --efl Build the EFL port
--gtk Build the GTK+ port
--qt Build the Qt port
- --efl Build the EFL port
+ --wincairo Build using Cairo (rather than CoreGraphics) on Windows
+ --wince Build the WinCE port
+
--inspector-frontend Copy changes to the inspector front-end files to the build directory
--install-headers=<path> Set installation path for the headers (Qt only)
@@ -349,7 +365,7 @@ setConfiguration();
my $productDir = productDir();
# Remove 0 byte sized files from productDir after slave lost for Qt buildbots.
-File::Find::find(\&unlinkZeroFiles, $productDir) if (isQt() && -e $productDir);
+File::Find::find(\&unlinkZeroFiles, $productDir) if (isQt() && !isSymbian() && -e $productDir);
sub unlinkZeroFiles ()
{
@@ -361,7 +377,7 @@ sub unlinkZeroFiles ()
}
# Check that all the project directories are there.
-my @projects = ("JavaScriptCore", "WebCore", "WebKit");
+my @projects = ("Source/JavaScriptCore", "Source/WebCore", "WebKit");
my @otherDirs = ("WebKitLibraries");
for my $dir (@projects, @otherDirs) {
@@ -382,6 +398,7 @@ if (isGtk()) {
push @options, "--prefix=" . $prefixPath if defined($prefixPath);
push @options, "--makeargs=" . $makeArgs if defined($makeArgs);
} elsif (isAppleMacWebKit()) {
+ checkForJavaSDK();
push @options, XcodeOptions();
sub option($$$)
@@ -399,10 +416,10 @@ if (isGtk()) {
}
# Apple builds JavaScriptGlue, and only on the Mac.
- splice @projects, 1, 0, "JavaScriptGlue";
+ splice @projects, 1, 0, "Source/JavaScriptGlue";
# ANGLE must come before WebCore
- splice @projects, 0, 0, "ANGLE";
+ splice @projects, 0, 0, "Source/ThirdParty/ANGLE";
# WebKit2 is only supported in SnowLeopard and later at present.
push @projects, ("WebKit2", "Tools/MiniBrowser") if osXVersion()->{"minor"} >= 6 and !$noWebKit2;
@@ -504,6 +521,21 @@ if (isEfl()) {
exit exitStatus($result) if exitStatus($result);
}
+if (isWinCE()) {
+ @options = ();
+ @projects = ();
+ foreach (@features) {
+ my $featureName = $_->{define};
+ if ($featureName) {
+ my $featureEnabled = ${$_->{value}} ? "ON" : "OFF";
+ push @options, "-D$featureName=$featureEnabled";
+ }
+ }
+ push @options, "--makeargs=" . $makeArgs if defined($makeArgs);
+ my $result = buildCMakeWinCEProject("STANDARDSDK_500 (ARMV4I)", $clean, @options);
+ exit exitStatus($result) if exitStatus($result);
+}
+
# Build, and abort if the build fails.
for my $dir (@projects) {
chdir $dir or die;
@@ -511,21 +543,22 @@ for my $dir (@projects) {
# For Gtk and Qt the WebKit project builds all others
if ((isGtk() || isQt()) && $dir ne "WebKit") {
- chdir ".." or die;
+ chdirWebKit();
next;
}
+ my $project = basename($dir);
if (isGtk()) {
- $result = buildGtkProject($dir, $clean, @options);
+ $result = buildGtkProject($project, $clean, @options);
} elsif (isQt()) {
+ #FIXME: $dir should probably be $project.
$result = buildQMakeQtProject($dir, $clean, @options);
} elsif (isAppleMacWebKit()) {
- $dir = "MiniBrowser" if $dir eq "Tools/MiniBrowser";
my @local_options = @options;
- push @local_options, XcodeCoverageSupportOptions() if $coverageSupport && $dir ne "ANGLE";
- $result = buildXCodeProject($dir, $clean, @local_options, @ARGV);
+ push @local_options, XcodeCoverageSupportOptions() if $coverageSupport && $project ne "ANGLE";
+ $result = buildXCodeProject($project, $clean, @local_options, @ARGV);
} elsif (isAppleWinWebKit()) {
- if ($dir eq "WebKit") {
+ if ($project eq "WebKit") {
$result = buildVisualStudioProject("win/WebKit.vcproj/WebKit.sln", $clean);
}
}
@@ -557,6 +590,21 @@ writeCongrats();
exit 0;
+sub checkForJavaSDK()
+{
+ my $jniHeader = "/System/Library/Frameworks/JavaVM.framework/Headers/jni.h";
+ if (-e $jniHeader) {
+ return;
+ }
+ print "\nCan't find required $jniHeader, build will fail.\n\n";
+ print "After installing \"Java for Mac OS X 10.6 Update 3\", the Java Developer Package is required to build WebKit.\n";
+ print "Please install the package from http://connect.apple.com (found under Dowloads > Java).\n\n";
+ print "For more information, see:\n";
+ print "https://lists.webkit.org/pipermail/webkit-dev/2010-October/014867.html\n";
+ print "https://webkit.org/building/tools.html\n\n";
+ exit 1;
+}
+
sub formatBuildTime($)
{
my ($buildTime) = @_;
diff --git a/Tools/Scripts/do-file-rename b/Tools/Scripts/do-file-rename
index 9c4c898..6ad9331 100755
--- a/Tools/Scripts/do-file-rename
+++ b/Tools/Scripts/do-file-rename
@@ -43,9 +43,9 @@ my %words;
# find all files we want to process
my @paths;
-find(\&wanted, "JavaScriptCore");
-find(\&wanted, "JavaScriptGlue");
-find(\&wanted, "WebCore");
+find(\&wanted, "Source/JavaScriptCore");
+find(\&wanted, "Source/JavaScriptGlue");
+find(\&wanted, "Source/WebCore");
find(\&wanted, "WebKit");
find(\&wanted, "WebKit2");
diff --git a/Tools/Scripts/do-webcore-rename b/Tools/Scripts/do-webcore-rename
index 6dcb719..0f84ad7 100755
--- a/Tools/Scripts/do-webcore-rename
+++ b/Tools/Scripts/do-webcore-rename
@@ -69,11 +69,12 @@ my %directoriesToIgnore = map { $_ => 1 } @directoriesToIgnoreList;
# find all files we want to process
my @paths;
-find(\&wanted, "JavaScriptCore");
-find(\&wanted, "JavaScriptGlue");
-find(\&wanted, "WebCore");
+find(\&wanted, "Source/JavaScriptCore");
+find(\&wanted, "Source/JavaScriptGlue");
+find(\&wanted, "Source/WebCore");
find(\&wanted, "WebKit");
find(\&wanted, "WebKit2");
+find(\&wanted, "Tools/DumpRenderTree");
sub wanted
{
diff --git a/Tools/Scripts/generate-qt-inspector-resource b/Tools/Scripts/generate-qt-inspector-resource
index a65da13..0a8301b 100755
--- a/Tools/Scripts/generate-qt-inspector-resource
+++ b/Tools/Scripts/generate-qt-inspector-resource
@@ -33,20 +33,20 @@ sub addFiles(@)
my @files = @_;
foreach $file (@files) {
- $file =~ s,WebCore/inspector/front-end/,,;
+ $file =~ s,Source/WebCore/inspector/front-end/,,;
print WEBKIT_QRC " <file>".$file . "</file>\n";
}
}
# Setup
-open(WEBKIT_QRC, ">WebCore/inspector/front-end/WebKit.qrc") or die;
+open(WEBKIT_QRC, ">Source/WebCore/inspector/front-end/WebKit.qrc") or die;
print WEBKIT_QRC '<!DOCTYPE RCC><RCC version="1.0">'."\n";
print WEBKIT_QRC '<qresource prefix="/webkit/inspector">'."\n";
# Directory with html and js files and the images
-addFiles(<WebCore/inspector/front-end/*.{*html,js,css,svg}>);
-addFiles(<WebCore/inspector/front-end/Images/*>);
+addFiles(<Source/WebCore/inspector/front-end/*.{*html,js,css,svg}>);
+addFiles(<Source/WebCore/inspector/front-end/Images/*>);
print WEBKIT_QRC "</qresource>\n";
print WEBKIT_QRC "</RCC>\n";
diff --git a/Tools/Scripts/prepare-ChangeLog b/Tools/Scripts/prepare-ChangeLog
index 2fc03d2..b5e2efe 100755
--- a/Tools/Scripts/prepare-ChangeLog
+++ b/Tools/Scripts/prepare-ChangeLog
@@ -117,7 +117,7 @@ my $parseOptionsResult =
"name:s" => \$name,
"email:s" => \$emailAddress,
"merge-base:s" => \$mergeBase,
- "git-commit:s" => \$gitCommit,
+ "git-commit|g:s" => \$gitCommit,
"git-index" => \$gitIndex,
"git-reviewer:s" => \$gitReviewer,
"help|h!" => \$showHelp,
@@ -125,18 +125,18 @@ my $parseOptionsResult =
"write!" => \$writeChangeLogs,
"update!" => \$updateChangeLogs);
if (!$parseOptionsResult || $showHelp) {
- print STDERR basename($0) . " [-b|--bug=<bugid>] [-d|--diff] [-h|--help] [-o|--open] [--git-commit=<committish>] [--git-reviewer=<name>] [svndir1 [svndir2 ...]]\n";
- print STDERR " -b|--bug Fill in the ChangeLog bug information from the given bug.\n";
- print STDERR " -d|--diff Spew diff to stdout when running\n";
- print STDERR " --merge-base Populate the ChangeLogs with the diff to this branch\n";
- print STDERR " --git-commit Populate the ChangeLogs from the specified git commit\n";
- print STDERR " --git-index Populate the ChangeLogs from the git index only\n";
- print STDERR " --git-reviewer When populating the ChangeLogs from a git commit claim that the spcified name reviewed the change.\n";
- print STDERR " This option is useful when the git commit lacks a Signed-Off-By: line\n";
- print STDERR " -h|--help Show this help message\n";
- print STDERR " -o|--open Open ChangeLogs in an editor when done\n";
- print STDERR " --[no-]update Update ChangeLogs from svn before adding entry (default: update)\n";
- print STDERR " --[no-]write Write ChangeLogs to disk (otherwise send new entries to stdout) (default: write)\n";
+ print STDERR basename($0) . " [-b|--bug=<bugid>] [-d|--diff] [-h|--help] [-o|--open] [-g|--git-commit=<committish>] [--git-reviewer=<name>] [svndir1 [svndir2 ...]]\n";
+ print STDERR " -b|--bug Fill in the ChangeLog bug information from the given bug.\n";
+ print STDERR " -d|--diff Spew diff to stdout when running\n";
+ print STDERR " --merge-base Populate the ChangeLogs with the diff to this branch\n";
+ print STDERR " -g|--git-commit Populate the ChangeLogs from the specified git commit\n";
+ print STDERR " --git-index Populate the ChangeLogs from the git index only\n";
+ print STDERR " --git-reviewer When populating the ChangeLogs from a git commit claim that the spcified name reviewed the change.\n";
+ print STDERR " This option is useful when the git commit lacks a Signed-Off-By: line\n";
+ print STDERR " -h|--help Show this help message\n";
+ print STDERR " -o|--open Open ChangeLogs in an editor when done\n";
+ print STDERR " --[no-]update Update ChangeLogs from svn before adding entry (default: update)\n";
+ print STDERR " --[no-]write Write ChangeLogs to disk (otherwise send new entries to stdout) (default: write)\n";
exit 1;
}
@@ -319,7 +319,7 @@ foreach my $prefix (keys %files) {
$sortKey = "-, just after top level";
} elsif ($prefixDir eq "WebBrowser") {
$sortKey = lc "WebKit, WebBrowser after";
- } elsif ($prefixDir eq "WebCore") {
+ } elsif ($prefixDir eq "Source/WebCore") {
$sortKey = lc "WebFoundation, WebCore after";
} elsif ($prefixDir eq "LayoutTests") {
$sortKey = lc "~, LayoutTests last";
diff --git a/Tools/Scripts/run-api-tests b/Tools/Scripts/run-api-tests
index 29430a8..b8d388d 100755
--- a/Tools/Scripts/run-api-tests
+++ b/Tools/Scripts/run-api-tests
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
-# Copyright (C) 2010 Apple Inc. All rights reserved.
+# Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -46,20 +46,20 @@ sub populateTests();
sub buildTestTool();
my $showHelp = 0;
-my $quiet = 0;
+my $verbose = 0;
my $dump = 0;
my $programName = basename($0);
my $usage = <<EOF;
Usage: $programName [options]
--help Show this help message
- -q|--quite Less verbose output
+ -v|--verbose Verbose output
-d|--dump-tests Dump the names of testcases without running them
EOF
GetOptions(
'help' => \$showHelp,
- 'quiet|q' => \$quiet,
+ 'verbose|v' => \$verbose,
'dump|d' => \$dump,
);
@@ -132,11 +132,32 @@ sub runTest($$)
$ENV{DYLD_FRAMEWORK_PATH} = $productDir;
$ENV{WEBKIT_UNSET_DYLD_FRAMEWORK_PATH} = "YES";
my $apiTesterPath = "$productDir/TestWebKitAPI";
+
+ local *DEVNULL;
+ my ($childIn, $childOut, $childErr);
+ unless ($verbose) {
+ open(DEVNULL, ">", File::Spec->devnull()) or die "Failed to open /dev/null";
+ $childOut = ">&DEVNULL";
+ $childErr = ">&DEVNULL";
+ } else {
+ $childOut = ">&STDOUT";
+ $childErr = ">&STDERR";
+ }
+
+ my $pid;
if (architecture()) {
- $result = system "arch", "-" . architecture(), $apiTesterPath, $test, @ARGV;
+ $pid = open3($childIn, $childOut, $childErr, "arch", "-" . architecture(), $apiTesterPath, $test, @ARGV) or die "Failed to run test: $test.";
} else {
- $result = system $apiTesterPath, $test, @ARGV;
+ $pid = open3($childIn, $childOut, $childErr, $apiTesterPath, $test, @ARGV) or die "Failed to run test: $test.";
}
+
+ close($childIn);
+ close($childOut);
+ close($childErr);
+ close(DEVNULL) unless ($verbose);
+
+ waitpid($pid, 0);
+ my $result = $?;
} elsif (isAppleWinWebKit()) {
my $apiTesterNameSuffix;
if (configurationForVisualStudio() ne "Debug_All") {
@@ -168,15 +189,27 @@ sub populateTests()
$ENV{WEBKIT_UNSET_DYLD_FRAMEWORK_PATH} = "YES";
my $apiTesterPath = "$productDir/TestWebKitAPI";
- my ($pid, $childIn, $childOut);
+ local *DEVNULL;
+ my ($childIn, $childOut, $childErr);
+ unless ($verbose) {
+ open(DEVNULL, ">", File::Spec->devnull()) or die "Failed to open /dev/null";
+ $childErr = ">&DEVNULL";
+ } else {
+ $childErr = ">&STDERR";
+ }
+
+ my $pid;
if (architecture()) {
- $pid = open3($childIn, $childOut, ">&STDERR", "arch", "-" . architecture(), $apiTesterPath, "--dump-tests") or die "Failed to build list of tests!";
+ $pid = open3($childIn, $childOut, $childErr, "arch", "-" . architecture(), $apiTesterPath, "--dump-tests") or die "Failed to build list of tests!";
} else {
- $pid = open3($childIn, $childOut, ">&STDERR", $apiTesterPath, "--dump-tests") or die "Failed to build list of tests!";
+ $pid = open3($childIn, $childOut, $childErr, $apiTesterPath, "--dump-tests") or die "Failed to build list of tests!";
}
+
close($childIn);
@tests = <$childOut>;
close($childOut);
+ close($childErr);
+ close(DEVNULL) unless ($verbose);
waitpid($pid, 0);
my $result = $?;
@@ -219,7 +252,7 @@ sub buildTestTool()
local *DEVNULL;
my ($childIn, $childOut, $childErr);
- if ($quiet) {
+ unless ($verbose) {
open(DEVNULL, ">", File::Spec->devnull()) or die "Failed to open /dev/null";
$childOut = ">&DEVNULL";
$childErr = ">&DEVNULL";
@@ -231,13 +264,14 @@ sub buildTestTool()
my @args = argumentsForConfiguration();
my $buildProcess = open3($childIn, $childOut, $childErr, "Tools/Scripts/$buildTestTool", @args) or die "Failed to run " . $buildTestTool;
+
close($childIn);
- waitpid $buildProcess, 0;
- my $buildResult = $?;
close($childOut);
close($childErr);
+ close(DEVNULL) unless ($verbose);
- close DEVNULL if ($quiet);
+ waitpid($buildProcess, 0);
+ my $buildResult = $?;
if ($buildResult) {
print STDERR "Compiling TestWebKitAPI failed!\n";
diff --git a/Tools/Scripts/run-bindings-tests b/Tools/Scripts/run-bindings-tests
index 4a093d1..18ffda6 100755
--- a/Tools/Scripts/run-bindings-tests
+++ b/Tools/Scripts/run-bindings-tests
@@ -39,8 +39,8 @@ from webkitpy.common.checkout import scm
def generate_from_idl(generator, idl_file, output_directory):
cmd = ['perl', '-w',
- '-IWebCore/bindings/scripts',
- 'WebCore/bindings/scripts/generate-bindings.pl',
+ '-ISource/WebCore/bindings/scripts',
+ 'Source/WebCore/bindings/scripts/generate-bindings.pl',
# idl include directories (path relative to generate-bindings.pl)
'--include', '.',
'--defines', 'TESTING_%s' % generator,
@@ -120,8 +120,8 @@ def main(argv):
]
for generator in generators:
- input_directory = os.path.join('WebCore', 'bindings', 'scripts', 'test')
- reference_directory = os.path.join('WebCore', 'bindings', 'scripts', 'test', generator)
+ input_directory = os.path.join('Source', 'WebCore', 'bindings', 'scripts', 'test')
+ reference_directory = os.path.join('Source', 'WebCore', 'bindings', 'scripts', 'test', generator)
if not run_tests(generator, input_directory, reference_directory, reset_results):
all_tests_passed = False
diff --git a/Tools/Scripts/run-iexploder-tests b/Tools/Scripts/run-iexploder-tests
index 5d7ae55..97e3630 100755
--- a/Tools/Scripts/run-iexploder-tests
+++ b/Tools/Scripts/run-iexploder-tests
@@ -117,7 +117,7 @@ sub configureAndOpenHTTPDIfNeeded()
my $httpdPath = getHTTPDPath();
my $webkitDirectory = getcwd();
my $testDirectory = $webkitDirectory . "/LayoutTests";
- my $iExploderDirectory = $webkitDirectory . "/Tools/iExploder";
+ my $iExploderDirectory = $webkitDirectory . "/Tools/iExploder/iExploder-1.3.2";
my $httpdConfig = getHTTPDConfigPathForTestDirectory($testDirectory);
diff --git a/Tools/Scripts/run-javascriptcore-tests b/Tools/Scripts/run-javascriptcore-tests
index 9fcbb2e..e7f8287 100755
--- a/Tools/Scripts/run-javascriptcore-tests
+++ b/Tools/Scripts/run-javascriptcore-tests
@@ -125,7 +125,7 @@ if (isAppleMacWebKit() || isAppleWinWebKit()) {
# Find JavaScriptCore directory
chdirWebKit();
-chdir("JavaScriptCore");
+chdir("Source/JavaScriptCore");
chdir "tests/mozilla" or die;
printf "Running: jsDriver.pl -e squirrelfish -s %s -f actual.html %s\n", jscPath($productDir), join(" ", @jsArgs);
my $result = system "perl", "jsDriver.pl", "-e", "squirrelfish", "-s", jscPath($productDir), "-f", "actual.html", @jsArgs;
diff --git a/Tools/Scripts/run-pageloadtest b/Tools/Scripts/run-pageloadtest
index ad6daa1..3542aa9 100755
--- a/Tools/Scripts/run-pageloadtest
+++ b/Tools/Scripts/run-pageloadtest
@@ -67,7 +67,7 @@ checkFrameworks();
chdirWebKit();
if ($testName eq 'svg') {
- my $suiteFile = "PageLoadTests/$testName/$testName.pltsuite";
+ my $suiteFile = "PerformanceTests/PageLoad/$testName/$testName.pltsuite";
my $webkitPath = sourceDir();
`cat "$suiteFile" | perl -pe 's|WEBKIT_PATH|$webkitPath|' > $safariResourcePath/$testName.pltsuite`
}
diff --git a/Tools/Scripts/run-qtwebkit-tests b/Tools/Scripts/run-qtwebkit-tests
index 373de0a..77bdd04 100644
--- a/Tools/Scripts/run-qtwebkit-tests
+++ b/Tools/Scripts/run-qtwebkit-tests
@@ -67,6 +67,9 @@ class Options(Log):
opt.add_option("-d", "--developer-mode", action="store_true",
dest="developer", default=False,
help="Special mode for debugging. In general it simulates human behavior, running all autotests. In the mode everything is executed synchronously, no html output will be generated, no changes or transformation will be applied to stderr or stdout. In this mode options; parallel-level, output-file, browser and do-not-open-results will be ignored.")
+ opt.add_option("-t", "--timeout", action="store", type="int",
+ dest="timeout", default=0,
+ help="Timeout in seconds for each testsuite. Zero value means that there is not timeout. Default: %default.")
self._o, self._a = opt.parse_args(args)
verbose = self._o.verbose
@@ -111,15 +114,42 @@ def run_test(args):
str with options that should be passed to the autotest executable
bool if true then the stdout will be buffered and separated from the stderr, if it is false
then the stdout and the stderr will be merged together and left unbuffered (the TestSuiteResult output will be None).
+ int time after which the autotest executable would be killed
"""
log = logging.getLogger("Exec")
- test_suite, options, buffered = args
+ test_suite, options, buffered, timeout = args
+ timer = None
try:
log.info("Running... %s", test_suite.test_file_name())
if buffered:
- tst = Popen(test_suite.test_file_name() + options, stdout=PIPE, stderr=None, shell=True)
+ tst = Popen([test_suite.test_file_name()] + options.split(), stdout=PIPE, stderr=None)
else:
- tst = Popen(test_suite.test_file_name() + options, stdout=None, stderr=STDOUT, shell=True)
+ tst = Popen([test_suite.test_file_name()] + options.split(), stdout=None, stderr=STDOUT)
+ if timeout:
+ from threading import Timer
+ log.debug("Setting timeout timer %i sec on %s (process %s)", timeout, test_suite.test_file_name(), tst.pid)
+ def process_killer():
+ try:
+ try:
+ tst.terminate()
+ except AttributeError:
+ # Workaround for python version < 2.6 it can be removed as soon as we drop support for python2.5
+ try:
+ import ctypes
+ PROCESS_TERMINATE = 1
+ handle = ctypes.windll.kernel32.OpenProcess(PROCESS_TERMINATE, False, tst.pid)
+ ctypes.windll.kernel32.TerminateProcess(handle, -1)
+ ctypes.windll.kernel32.CloseHandle(handle)
+ except AttributeError:
+ # windll is not accessible so we are on *nix like system
+ import signal
+ os.kill(tst.pid, signal.SIGTERM)
+ log.error("Timeout, process '%s' (%i) was terminated", test_suite.test_file_name(), tst.pid)
+ except OSError, e:
+ # the process was finished before got killed
+ pass
+ timer = Timer(timeout, process_killer)
+ timer.start()
except OSError, e:
log.exception("Can't open an autotest file: '%s'. Skipping the test...", e.filename)
else:
@@ -207,7 +237,7 @@ class Main(Log):
workers = self._Pool(processes=self._options.parallel_level)
# to each file add options.
self.debug("Using %s the workers pool, number of workers %i", repr(workers), self._options.parallel_level)
- package = map(lambda w: [w, self._options.tests_options, not self._options.developer], files)
+ package = map(lambda w: [w, self._options.tests_options, not self._options.developer, self._options.timeout], files)
self.debug("Generated packages for workers: %s", repr(package))
results = workers.map(run_test, package) # Collects results.
return results
diff --git a/Tools/Scripts/run-sunspider b/Tools/Scripts/run-sunspider
index 15894b0..3b7ee17 100755
--- a/Tools/Scripts/run-sunspider
+++ b/Tools/Scripts/run-sunspider
@@ -48,6 +48,7 @@ my $parseonly = 0;
my $setBaseline = 0;
my $showHelp = 0;
my $testsPattern;
+my $noBuild = 0;
my $programName = basename($0);
my $usage = <<EOF;
@@ -64,6 +65,7 @@ Usage: $programName [options] [options to pass to build system]
--ubench Use microbenchmark suite instead of regular tests. Same as --suite=ubench
--v8-suite Use the V8 benchmark suite. Same as --suite=v8-v4
--parse-only Use the parse-only benchmark suite. Same as --suite=parse-only
+ --no-build Do not try to build JSC before running the tests.
EOF
GetOptions('root=s' => sub { my ($x, $value) = @_; $root = $value; setConfigurationProductDir(Cwd::abs_path($root)); },
@@ -77,7 +79,8 @@ GetOptions('root=s' => sub { my ($x, $value) = @_; $root = $value; setConfigurat
'v8' => \$v8,
'parse-only' => \$parseonly,
'tests=s' => \$testsPattern,
- 'help' => \$showHelp);
+ 'help' => \$showHelp,
+ 'no-build' => \$noBuild);
if ($showHelp) {
print STDERR $usage;
@@ -106,10 +109,12 @@ sub setupEnvironmentForExecution($)
# FIXME: Other platforms may wish to augment this method to use LD_LIBRARY_PATH, etc.
}
-buildJSC();
+unless ($noBuild) {
+ buildJSC();
+}
chdirWebKit();
-chdir("SunSpider");
+chdir("PerformanceTests/SunSpider");
my $productDir = jscProductDir();
diff --git a/Tools/Scripts/sunspider-compare-results b/Tools/Scripts/sunspider-compare-results
index acb2c04..ce95944 100755
--- a/Tools/Scripts/sunspider-compare-results
+++ b/Tools/Scripts/sunspider-compare-results
@@ -67,8 +67,6 @@ if ($showHelp) {
exit 1;
}
-@ARGV = map { File::Spec->rel2abs($_) } @ARGV;
-
sub buildJSC
{
if (!defined($root)){
@@ -121,7 +119,7 @@ sub pathToJSC()
my $jscPath = pathToJSC();
chdirWebKit();
-chdir("SunSpider");
+chdir("PerformanceTests/SunSpider");
my @args = ("--shell", $jscPath);
# This code could be removed if we chose to pass extra args to sunspider instead of Xcode
@@ -130,4 +128,6 @@ push @args, "--ubench" if $ubench;
push @args, "--v8" if $v8;
push @args, "--parse-only" if $parseonly;
+@ARGV = map { File::Spec->rel2abs($_) } @ARGV;
+
exec currentPerlPath(), "./sunspider-compare-results", @args, @ARGV;
diff --git a/Tools/Scripts/svn-apply b/Tools/Scripts/svn-apply
index cab7fb4..0c2e5e5 100755
--- a/Tools/Scripts/svn-apply
+++ b/Tools/Scripts/svn-apply
@@ -244,8 +244,6 @@ sub handleGitBinaryChange($$)
my $contents = $diffHashRef->{svnConvertedText};
my ($binaryChunkType, $binaryChunk, $reverseBinaryChunkType, $reverseBinaryChunk) = decodeGitBinaryPatch($contents, $fullPath);
- # FIXME: support "delta" type.
- die "only literal type is supported now" if ($binaryChunkType ne "literal" || $reverseBinaryChunkType ne "literal");
my $isFileAddition = $diffHashRef->{isNew};
my $isFileDeletion = $diffHashRef->{isDeletion};
@@ -257,14 +255,26 @@ sub handleGitBinaryChange($$)
$originalContents = join("", <FILE>);
close FILE;
}
- die "Original content of $fullPath mismatches" if $originalContents ne $reverseBinaryChunk;
+
+ if ($reverseBinaryChunkType eq "literal") {
+ die "Original content of $fullPath mismatches" if $originalContents ne $reverseBinaryChunk;
+ }
if ($isFileDeletion) {
scmRemove($fullPath);
} else {
# Addition or Modification
+ my $out = "";
+ if ($binaryChunkType eq "delta") {
+ $out = applyGitBinaryPatchDelta($binaryChunk, $originalContents);
+ } else {
+ $out = $binaryChunk;
+ }
+ if ($reverseBinaryChunkType eq "delta") {
+ die "Original content of $fullPath mismatches" if $originalContents ne applyGitBinaryPatchDelta($reverseBinaryChunk, $out);
+ }
open FILE, ">", $fullPath or die "Failed to open $fullPath.";
- print FILE $binaryChunk;
+ print FILE $out;
close FILE;
if ($isFileAddition) {
scmAdd($fullPath);
diff --git a/Tools/Scripts/update-iexploder-cssproperties b/Tools/Scripts/update-iexploder-cssproperties
index 1a9c0d6..65e559f 100755
--- a/Tools/Scripts/update-iexploder-cssproperties
+++ b/Tools/Scripts/update-iexploder-cssproperties
@@ -27,7 +27,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# This script updates Tools/iExploder/htdocs/*.in based on
+# This script updates Tools/iExploder/iExploder-1.3.2/htdocs/*.in based on
# WebCore/css/CSSPropertyNames.in, WebCore/html/HTMLTagNames.in
# and WebCore/html/HTMLAttributeNames.in
@@ -109,8 +109,8 @@ sub update($$)
{
my ($iexploderPath, $webcorePath) = @_;
- $iexploderPath = File::Spec->catfile(sourceDir(), "Tools", "iExploder", "htdocs", split("/", $iexploderPath));
- $webcorePath = File::Spec->catfile(sourceDir(), "WebCore", split("/", $webcorePath));
+ $iexploderPath = File::Spec->catfile(sourceDir(), "Tools", "iExploder", "iExploder-1.3.2", "htdocs", split("/", $iexploderPath));
+ $webcorePath = File::Spec->catfile(sourceDir(), "Source", "WebCore", split("/", $webcorePath));
my @sections = readiExploderFile($iexploderPath);
$sections[0] = generateEntityListFromFile($webcorePath);
diff --git a/Tools/Scripts/update-javascriptcore-test-results b/Tools/Scripts/update-javascriptcore-test-results
index dd8b9b6..cc8cd2c 100755
--- a/Tools/Scripts/update-javascriptcore-test-results
+++ b/Tools/Scripts/update-javascriptcore-test-results
@@ -33,7 +33,7 @@ use lib $FindBin::Bin;
use webkitdirs;
chdirWebKit();
-chdir "JavaScriptCore/tests/mozilla" or die;
+chdir "Source/JavaScriptCore/tests/mozilla" or die;
my $force = 0;
GetOptions('force' => \$force);
diff --git a/Tools/Scripts/update-sources-list.py b/Tools/Scripts/update-sources-list.py
index 433d04a..2a4a5ef 100755
--- a/Tools/Scripts/update-sources-list.py
+++ b/Tools/Scripts/update-sources-list.py
@@ -40,7 +40,7 @@ def getWebCoreFilesDict():
"""
sources = {}
sources_prefix = "WEBCORE_"
- filepath = os.path.join(wkroot, "WebCore/WebCoreSources.bkl")
+ filepath = os.path.join(wkroot, "Source", "WebCore", "WebCoreSources.bkl")
assert(os.path.exists(filepath))
doc = minidom.parse(filepath)
@@ -82,7 +82,7 @@ def generateWebCoreSourcesGTKAndQT(sources):
for key in sources.keys():
makefileString += " \\\n\t\t" + key
- outfile = os.path.join(wkroot, "WebCore/sources.inc")
+ outfile = os.path.join(wkroot, "Source", "WebCore", "sources.inc")
sourcefile = open(outfile, "w")
sourcefile.write(makefileString)
sourcefile.close()
diff --git a/Tools/Scripts/update-webkit-localizable-strings b/Tools/Scripts/update-webkit-localizable-strings
index 7030337..20e39e9 100755
--- a/Tools/Scripts/update-webkit-localizable-strings
+++ b/Tools/Scripts/update-webkit-localizable-strings
@@ -34,7 +34,7 @@ use FindBin;
use lib $FindBin::Bin;
use webkitdirs;
-my @directoriesToScan = ("WebKit/mac", "WebKit/win", "-WebCore/icu", "-WebKit/mac/icu");
+my @directoriesToScan = ("WebKit/mac", "WebKit/win", "-Source/WebCore/icu", "-WebKit/mac/icu");
my $fileToUpdate = "WebKit/English.lproj/Localizable.strings";
my $exceptionsFile = "WebKit/StringsNotToBeLocalized.txt";
diff --git a/Tools/Scripts/webkitdirs.pm b/Tools/Scripts/webkitdirs.pm
index ac40ec6..2525dd7 100644
--- a/Tools/Scripts/webkitdirs.pm
+++ b/Tools/Scripts/webkitdirs.pm
@@ -63,6 +63,7 @@ my $isQt;
my $isSymbian;
my %qtFeatureDefaults;
my $isGtk;
+my $isWinCE;
my $isWx;
my $isEfl;
my @wxArgs;
@@ -85,8 +86,8 @@ sub determineSourceDir
$sourceDir =~ s|/+$||; # Remove trailing '/' as we would die later
# walks up path checking each directory to see if it is the main WebKit project dir,
- # defined by containing JavaScriptCore, WebCore, and WebKit
- until ((-d "$sourceDir/JavaScriptCore" && -d "$sourceDir/WebCore" && -d "$sourceDir/WebKit") || (-d "$sourceDir/Internal" && -d "$sourceDir/OpenSource"))
+ # defined by containing Sources, WebCore, and WebKit
+ until ((-d "$sourceDir/Source" && -d "$sourceDir/Source/WebCore" && -d "$sourceDir/WebKit") || (-d "$sourceDir/Internal" && -d "$sourceDir/OpenSource"))
{
if ($sourceDir !~ s|/[^/]+$||) {
die "Could not find top level webkit directory above source directory using FindBin.\n";
@@ -272,6 +273,7 @@ sub argumentsForConfiguration()
push(@args, '--symbian') if isSymbian();
push(@args, '--gtk') if isGtk();
push(@args, '--efl') if isEfl();
+ push(@args, '--wince') if isWinCE();
push(@args, '--wx') if isWx();
push(@args, '--chromium') if isChromium();
push(@args, '--inspector-frontend') if isInspectorFrontend();
@@ -286,19 +288,26 @@ sub determineConfigurationForVisualStudio
$configurationForVisualStudio = $configuration;
}
+sub usesPerConfigurationBuildDirectory
+{
+ # [Gtk][Efl] We don't have Release/Debug configurations in straight
+ # autotool builds (non build-webkit). In this case and if
+ # WEBKITOUTPUTDIR exist, use that as our configuration dir. This will
+ # allows us to run run-webkit-tests without using build-webkit.
+ #
+ # Symbian builds do not have Release/Debug configurations either.
+ return ($ENV{"WEBKITOUTPUTDIR"} && (isGtk() || isEfl())) || isSymbian() || isAppleWinWebKit();
+}
+
sub determineConfigurationProductDir
{
return if defined $configurationProductDir;
determineBaseProductDir();
determineConfiguration();
if (isAppleWinWebKit() && !isWx()) {
- $configurationProductDir = File::Spec->catdir($baseProductDir, "bin");
+ $configurationProductDir = File::Spec->catdir($baseProductDir, configurationForVisualStudio(), "bin");
} else {
- # [Gtk][Efl] We don't have Release/Debug configurations in straight
- # autotool builds (non build-webkit). In this case and if
- # WEBKITOUTPUTDIR exist, use that as our configuration dir. This will
- # allows us to run run-webkit-tests without using build-webkit.
- if ($ENV{"WEBKITOUTPUTDIR"} && (isGtk() || isEfl())) {
+ if (usesPerConfigurationBuildDirectory()) {
$configurationProductDir = "$baseProductDir";
} else {
$configurationProductDir = "$baseProductDir/$configuration";
@@ -347,7 +356,7 @@ sub productDir
sub jscProductDir
{
my $productDir = productDir();
- $productDir .= "/JavaScriptCore" if isQt();
+ $productDir .= "/Source/JavaScriptCore" if isQt();
$productDir .= "/$configuration" if (isQt() && isWindows());
$productDir .= "/Programs" if (isGtk() || isEfl());
@@ -593,7 +602,7 @@ sub builtDylibPathForName
return "$configurationProductDir/libwxwebkit.dylib";
}
if (isGtk()) {
- my $libraryDir = "$configurationProductDir/$libraryName/../.libs/";
+ my $libraryDir = "$configurationProductDir/.libs/";
if (-e $libraryDir . "libwebkitgtk-3.0.so") {
return $libraryDir . "libwebkitgtk-3.0.so";
}
@@ -602,6 +611,9 @@ sub builtDylibPathForName
if (isEfl()) {
return "$configurationProductDir/$libraryName/../.libs/libewebkit.so";
}
+ if (isWinCE()) {
+ return "$configurationProductDir/$libraryName";
+ }
if (isAppleMacWebKit()) {
return "$configurationProductDir/$libraryName.framework/Versions/A/$libraryName";
}
@@ -670,7 +682,7 @@ sub determineQtFeatureDefaults()
return if %qtFeatureDefaults;
die "ERROR: qmake missing but required to build WebKit.\n" if not commandExists("qmake");
my $originalCwd = getcwd();
- chdir File::Spec->catfile(sourceDir(), "WebCore");
+ chdir File::Spec->catfile(sourceDir(), "Source", "WebCore");
my $defaults = `qmake CONFIG+=compute_defaults 2>&1`;
chdir $originalCwd;
@@ -755,6 +767,18 @@ sub determineIsGtk()
$isGtk = checkForArgumentAndRemoveFromARGV("--gtk");
}
+sub isWinCE()
+{
+ determineIsWinCE();
+ return $isWinCE;
+}
+
+sub determineIsWinCE()
+{
+ return if defined($isWinCE);
+ $isWinCE = checkForArgumentAndRemoveFromARGV("--wince");
+}
+
sub isWx()
{
determineIsWx();
@@ -869,7 +893,7 @@ sub isLinux()
sub isAppleWebKit()
{
- return !(isQt() or isGtk() or isWx() or isChromium() or isEfl());
+ return !(isQt() or isGtk() or isWx() or isChromium() or isEfl() or isWinCE());
}
sub isAppleMacWebKit()
@@ -956,7 +980,7 @@ sub relativeScriptsDir()
sub launcherPath()
{
my $relativeScriptsPath = relativeScriptsDir();
- if (isGtk() || isQt() || isWx() || isEfl()) {
+ if (isGtk() || isQt() || isWx() || isEfl() || isWinCE()) {
return "$relativeScriptsPath/run-launcher";
} elsif (isAppleWebKit()) {
return "$relativeScriptsPath/run-safari";
@@ -975,6 +999,8 @@ sub launcherName()
return "Safari";
} elsif (isEfl()) {
return "EWebLauncher";
+ } elsif (isWinCE()) {
+ return "WinCELauncher";
}
}
@@ -1151,7 +1177,7 @@ sub dieIfWindowsPlatformSDKNotInstalled
sub copyInspectorFrontendFiles
{
my $productDir = productDir();
- my $sourceInspectorPath = sourceDir() . "/WebCore/inspector/front-end/";
+ my $sourceInspectorPath = sourceDir() . "/Source/WebCore/inspector/front-end/";
my $inspectorResourcesDirPath = $ENV{"WEBKITINSPECTORRESOURCESDIR"};
if (!defined($inspectorResourcesDirPath)) {
@@ -1337,7 +1363,7 @@ sub autogenArgumentsHaveChanged($@)
sub buildAutotoolsProject($@)
{
- my ($clean, @buildParams) = @_;
+ my ($project, $clean, @buildParams) = @_;
my $make = 'make';
my $dir = productDir();
@@ -1363,6 +1389,11 @@ sub buildAutotoolsProject($@)
$makeArgs = "-j" . numberOfCPUs();
}
+ # WebKit is the default target, so we don't need to specify anything.
+ if ($project eq "JavaScriptCore") {
+ $makeArgs .= " jsc";
+ }
+
$prefix = $ENV{"WebKitInstallationPrefix"} if !defined($prefix);
push @buildArgs, "--prefix=" . $prefix if defined($prefix);
@@ -1427,10 +1458,19 @@ sub buildCMakeProject($@)
my $dir = File::Spec->canonpath(baseProductDir());
my $config = configuration();
my $result;
+ my $cmakeBuildArgs = "";
my $makeArgs = "";
my @buildArgs;
-
- $makeArgs .= " -j" . numberOfCPUs() if ($makeArgs !~ m/-j\s*\d+/);
+
+ if ($port =~ m/wince/i) {
+ if ($config =~ m/debug/i) {
+ $cmakeBuildArgs .= " --config Debug";
+ } elsif ($config =~ m/release/i) {
+ $cmakeBuildArgs .= " --config Release";
+ }
+ } else {
+ $makeArgs .= " -j" . numberOfCPUs() if ($makeArgs !~ m/-j\s*\d+/);
+ }
if ($clean) {
print "Cleaning the build directory '$dir'\n";
@@ -1439,7 +1479,7 @@ sub buildCMakeProject($@)
$result = 0;
} else {
my $cmakebin = "cmake";
- my $make = "make";
+ my $cmakeBuildCommand = $cmakebin . " --build .";
push @buildArgs, "-DPORT=$port";
@@ -1472,8 +1512,10 @@ sub buildCMakeProject($@)
die "Failed while running $cmakebin to generate makefiles!\n";
}
- print "Calling '$make $makeArgs' in " . $dir . "\n\n";
- $result = system "$make $makeArgs";
+ $cmakeBuildArgs .= " -- " . $makeArgs;
+
+ print "Calling '$cmakeBuildCommand $cmakeBuildArgs' in " . $dir . "\n\n";
+ $result = system "$cmakeBuildCommand $cmakeBuildArgs";
if ($result ne 0) {
die "Failed to build $port port\n";
}
@@ -1490,6 +1532,12 @@ sub buildCMakeEflProject($@)
return buildCMakeProject("Efl", $clean, @buildArgs);
}
+sub buildCMakeWinCEProject($@)
+{
+ my ($sdk, $clean, @buildArgs) = @_;
+ return buildCMakeProject("WinCE -DCMAKE_WINCE_SDK=\"" . $sdk . "\"", $clean, @buildArgs);
+}
+
sub buildQMakeProject($@)
{
my ($clean, @buildParams) = @_;
@@ -1521,14 +1569,13 @@ sub buildQMakeProject($@)
my $config = configuration();
push @buildArgs, "INSTALL_HEADERS=" . $installHeaders if defined($installHeaders);
push @buildArgs, "INSTALL_LIBS=" . $installLibs if defined($installLibs);
- my $dir = File::Spec->canonpath(baseProductDir());
- $dir = File::Spec->catfile($dir, $config) unless isSymbian();
+ my $dir = File::Spec->canonpath(productDir());
File::Path::mkpath($dir);
chdir $dir or die "Failed to cd into " . $dir . "\n";
print "Generating derived sources\n\n";
- push @buildArgs, "OUTPUT_DIR=" . baseProductDir() . "/$config";
+ push @buildArgs, "OUTPUT_DIR=" . $dir;
my @dsQmakeArgs = @buildArgs;
push @dsQmakeArgs, "-r";
@@ -1543,7 +1590,7 @@ sub buildQMakeProject($@)
my $dsMakefile = "Makefile.DerivedSources";
# Iterate over different source directories manually to workaround a problem with qmake+extraTargets+s60
- my @subdirs = ("JavaScriptCore", "WebCore", "WebKit/qt/Api");
+ my @subdirs = ("Source/JavaScriptCore", "Source/WebCore", "WebKit/qt/Api");
if (grep { $_ eq "CONFIG+=webkit2"} @buildArgs) {
push @subdirs, "WebKit2";
push @subdirs, "Tools/WebKitTestRunner";
@@ -1622,15 +1669,15 @@ sub buildQMakeQtProject($$@)
return buildQMakeProject($clean, @buildArgs);
}
-sub buildGtkProject($$@)
+sub buildGtkProject
{
my ($project, $clean, @buildArgs) = @_;
- if ($project ne "WebKit") {
- die "The Gtk port builds JavaScriptCore, WebCore and WebKit in one shot! Only call it for 'WebKit'.\n";
+ if ($project ne "WebKit" and $project ne "JavaScriptCore") {
+ die "Unsupported project: $project. Supported projects: WebKit, JavaScriptCore\n";
}
- return buildAutotoolsProject($clean, @buildArgs);
+ return buildAutotoolsProject($project, $clean, @buildArgs);
}
sub buildChromiumMakefile($$)
diff --git a/Tools/Scripts/webkitperl/VCSUtils_unittest/fixChangeLogPatch.pl b/Tools/Scripts/webkitperl/VCSUtils_unittest/fixChangeLogPatch.pl
index a7282c7..261592d 100644
--- a/Tools/Scripts/webkitperl/VCSUtils_unittest/fixChangeLogPatch.pl
+++ b/Tools/Scripts/webkitperl/VCSUtils_unittest/fixChangeLogPatch.pl
@@ -271,7 +271,7 @@ END
}
},
{ # New test
- diffName => "fixChangeLogPatch: [no change] New entry inserted in middle.",
+ diffName => "fixChangeLogPatch: New entry inserted in middle.",
inputText => <<'END',
--- ChangeLog
+++ ChangeLog
@@ -292,30 +292,26 @@ END
* File:
END
expectedReturn => {
- hasOverlappingLines => 1,
patch => <<'END',
--- ChangeLog
+++ ChangeLog
-@@ -11,6 +11,14 @@
-
- Reviewed by Ray.
-
-+ Changed some more code on 2009-12-21.
-+
-+ * File:
-+
+@@ -1,3 +1,11 @@
+2009-12-21 Alice <alice@email.address>
+
+ Reviewed by Ray.
+
- Changed some code on 2009-12-21.
++ Changed some more code on 2009-12-21.
++
++ * File:
++
+ 2009-12-21 Alice <alice@email.address>
- * File:
+ Reviewed by Ray.
END
}
},
{ # New test
- diffName => "fixChangeLogPatch: [no change] New entry inserted earlier in the file, but after an entry with the same author and date.",
+ diffName => "fixChangeLogPatch: New entry inserted earlier in the file, but after an entry with the same author and date.",
inputText => <<'END',
--- ChangeLog
+++ ChangeLog
@@ -336,25 +332,21 @@ END
Changed some code on 2009-12-22.
END
expectedReturn => {
- hasOverlappingLines => 1,
patch => <<'END',
--- ChangeLog
+++ ChangeLog
-@@ -70,6 +70,14 @@
-
- 2009-12-22 Alice <alice@email.address>
-
+@@ -1,3 +1,11 @@
++2009-12-22 Alice <alice@email.address>
++
+ Reviewed by Sue.
+
+ Changed some more code on 2009-12-22.
+
+ * File:
+
-+2009-12-22 Alice <alice@email.address>
-+
- Reviewed by Ray.
+ 2009-12-22 Alice <alice@email.address>
- Changed some code on 2009-12-22.
+ Reviewed by Ray.
END
}
},
diff --git a/Tools/Scripts/webkitperl/VCSUtils_unittest/fixChangeLogPatchThenSetChangeLogDateAndReviewer.pl b/Tools/Scripts/webkitperl/VCSUtils_unittest/fixChangeLogPatchThenSetChangeLogDateAndReviewer.pl
new file mode 100644
index 0000000..bbf7df3
--- /dev/null
+++ b/Tools/Scripts/webkitperl/VCSUtils_unittest/fixChangeLogPatchThenSetChangeLogDateAndReviewer.pl
@@ -0,0 +1,92 @@
+#!/usr/bin/perl -w
+#
+# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
+# Copyright (C) 2010 Research In Motion Limited. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. 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.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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.
+
+# Unit tests for setChangeLogDateAndReviewer(fixChangeLogPatch()).
+
+use strict;
+use warnings;
+
+use Test::More;
+use VCSUtils;
+
+my @testCaseHashRefs = (
+{
+ testName => "New entry inserted earlier in the file, but after an entry with the same author and date, patch applied a day later.",
+ reviewer => "Sue",
+ epochTime => 1273414321,
+ patch => <<'END',
+--- ChangeLog
++++ ChangeLog
+@@ -70,6 +70,14 @@
+
+ 2010-05-08 Alice <alice@email.address>
+
++ Reviewed by NOBODY (OOPS!).
++
++ Changed some more code on 2010-05-08.
++
++ * File:
++
++2010-05-08 Alice <alice@email.address>
++
+ Reviewed by Ray.
+
+ Changed some code on 2010-05-08.
+END
+ expectedReturn => <<'END',
+--- ChangeLog
++++ ChangeLog
+@@ -1,3 +1,11 @@
++2010-05-09 Alice <alice@email.address>
++
++ Reviewed by Sue.
++
++ Changed some more code on 2010-05-08.
++
++ * File:
++
+ 2010-05-08 Alice <alice@email.address>
+
+ Reviewed by Ray.
+END
+},
+);
+
+my $testCasesCount = @testCaseHashRefs;
+plan(tests => 1 * $testCasesCount); # Total number of assertions.
+
+foreach my $testCase (@testCaseHashRefs) {
+ my $testNameStart = "setChangeLogDateAndReviewer(fixChangeLogPatch()): $testCase->{testName}: comparing";
+
+ my $patch = $testCase->{patch};
+ my $reviewer = $testCase->{reviewer};
+ my $epochTime = $testCase->{epochTime};
+
+ my $fixedChangeLog = VCSUtils::fixChangeLogPatch($patch);
+ my $got = VCSUtils::setChangeLogDateAndReviewer($fixedChangeLog->{patch}, $reviewer, $epochTime);
+ my $expectedReturn = $testCase->{expectedReturn};
+
+ is($got, $expectedReturn, "$testNameStart return value.");
+}
diff --git a/Tools/Scripts/webkitpy/common/checkout/__init__.py b/Tools/Scripts/webkitpy/common/checkout/__init__.py
index 597dcbd..ef65bee 100644
--- a/Tools/Scripts/webkitpy/common/checkout/__init__.py
+++ b/Tools/Scripts/webkitpy/common/checkout/__init__.py
@@ -1,3 +1 @@
# Required for Python to search this directory for module files
-
-from api import Checkout
diff --git a/Tools/Scripts/webkitpy/common/checkout/api.py b/Tools/Scripts/webkitpy/common/checkout/api.py
index 6357982..29e43d3 100644
--- a/Tools/Scripts/webkitpy/common/checkout/api.py
+++ b/Tools/Scripts/webkitpy/common/checkout/api.py
@@ -39,14 +39,14 @@ from webkitpy.common.system.executive import Executive, run_command, ScriptError
from webkitpy.common.system.deprecated_logging import log
-# This class represents the WebKit-specific parts of the checkout (like
-# ChangeLogs).
+# This class represents the WebKit-specific parts of the checkout (like ChangeLogs).
# FIXME: Move a bunch of ChangeLog-specific processing from SCM to this object.
+# NOTE: All paths returned from this class should be absolute.
class Checkout(object):
def __init__(self, scm):
self._scm = scm
- def _is_path_to_changelog(self, path):
+ def is_path_to_changelog(self, path):
return os.path.basename(path) == "ChangeLog"
def _latest_entry_for_changelog_at_revision(self, changelog_path, revision):
@@ -59,7 +59,7 @@ class Checkout(object):
def changelog_entries_for_revision(self, revision):
changed_files = self._scm.changed_files_for_revision(revision)
- return [self._latest_entry_for_changelog_at_revision(path, revision) for path in changed_files if self._is_path_to_changelog(path)]
+ return [self._latest_entry_for_changelog_at_revision(path, revision) for path in changed_files if self.is_path_to_changelog(path)]
@memoized
def commit_info_for_revision(self, revision):
@@ -96,10 +96,10 @@ class Checkout(object):
return [path for path in absolute_paths if predicate(path)]
def modified_changelogs(self, git_commit, changed_files=None):
- return self._modified_files_matching_predicate(git_commit, self._is_path_to_changelog, changed_files=changed_files)
+ return self._modified_files_matching_predicate(git_commit, self.is_path_to_changelog, changed_files=changed_files)
def modified_non_changelogs(self, git_commit, changed_files=None):
- return self._modified_files_matching_predicate(git_commit, lambda path: not self._is_path_to_changelog(path), changed_files=changed_files)
+ return self._modified_files_matching_predicate(git_commit, lambda path: not self.is_path_to_changelog(path), changed_files=changed_files)
def commit_message_for_this_commit(self, git_commit, changed_files=None):
changelog_paths = self.modified_changelogs(git_commit, changed_files)
diff --git a/Tools/Scripts/webkitpy/common/checkout/diff_parser.py b/Tools/Scripts/webkitpy/common/checkout/diff_parser.py
index a6ea756..5a5546c 100644
--- a/Tools/Scripts/webkitpy/common/checkout/diff_parser.py
+++ b/Tools/Scripts/webkitpy/common/checkout/diff_parser.py
@@ -118,6 +118,8 @@ class DiffFile(object):
self.lines.append((deleted_line_number, new_line_number, line))
+# If this is going to be called DiffParser, it should be a re-useable parser.
+# Otherwise we should rename it to ParsedDiff or just Diff.
class DiffParser(object):
"""A parser for a patch file.
@@ -125,16 +127,18 @@ class DiffParser(object):
a DiffFile object.
"""
- # FIXME: This function is way too long and needs to be broken up.
def __init__(self, diff_input):
"""Parses a diff.
Args:
diff_input: An iterable object.
"""
- state = _INITIAL_STATE
+ self.files = self._parse_into_diff_files(diff_input)
- self.files = {}
+ # FIXME: This function is way too long and needs to be broken up.
+ def _parse_into_diff_files(self, diff_input):
+ files = {}
+ state = _INITIAL_STATE
current_file = None
old_diff_line = None
new_diff_line = None
@@ -148,7 +152,7 @@ class DiffParser(object):
if file_declaration:
filename = file_declaration.group('FilePath')
current_file = DiffFile(filename)
- self.files[filename] = current_file
+ files[filename] = current_file
state = _DECLARED_FILE_PATH
continue
@@ -179,3 +183,4 @@ class DiffParser(object):
else:
_log.error('Unexpected diff format when parsing a '
'chunk: %r' % line)
+ return files
diff --git a/Tools/Scripts/webkitpy/common/checkout/scm.py b/Tools/Scripts/webkitpy/common/checkout/scm.py
index c54fb42..3f77043 100644
--- a/Tools/Scripts/webkitpy/common/checkout/scm.py
+++ b/Tools/Scripts/webkitpy/common/checkout/scm.py
@@ -172,14 +172,15 @@ class SCM:
return os.path.join(self.scripts_directory(), script_name)
def ensure_clean_working_directory(self, force_clean):
- if not force_clean and not self.working_directory_is_clean():
+ if self.working_directory_is_clean():
+ return
+ if not force_clean:
# FIXME: Shouldn't this use cwd=self.checkout_root?
print self.run(self.status_command(), error_handler=Executive.ignore_error)
raise ScriptError(message="Working directory has modifications, pass --force-clean or --no-clean to continue.")
-
log("Cleaning working directory")
self.clean_working_directory()
-
+
def ensure_no_local_commits(self, force):
if not self.supports_local_commits():
return
diff --git a/Tools/Scripts/webkitpy/common/config/build.py b/Tools/Scripts/webkitpy/common/config/build.py
index 2a432ce..2b27c85 100644
--- a/Tools/Scripts/webkitpy/common/config/build.py
+++ b/Tools/Scripts/webkitpy/common/config/build.py
@@ -41,8 +41,8 @@ def _should_file_trigger_build(target_platform, file):
directories = [
# Directories that shouldn't trigger builds on any bots.
- ("PageLoadTests", []),
- ("WebCore/manual-tests", []),
+ ("PerformanceTests", []),
+ ("Source/WebCore/manual-tests", []),
("Examples", []),
("Websites", []),
("android", []),
@@ -57,10 +57,10 @@ def _should_file_trigger_build(target_platform, file):
("wince", []),
# Directories that should trigger builds on only some bots.
- ("JavaScriptGlue", ["mac"]),
+ ("Source/JavaScriptGlue", ["mac"]),
("LayoutTests/platform/mac", ["mac", "win"]),
("LayoutTests/platform/mac-snowleopard", ["mac-snowleopard", "win"]),
- ("WebCore/image-decoders", ["chromium"]),
+ ("Source/WebCore/image-decoders", ["chromium"]),
("cairo", ["gtk", "wincairo"]),
("cf", ["chromium-mac", "mac", "qt", "win"]),
("chromium", ["chromium"]),
diff --git a/Tools/Scripts/webkitpy/common/config/build_unittest.py b/Tools/Scripts/webkitpy/common/config/build_unittest.py
index d833464..e07d42f 100644
--- a/Tools/Scripts/webkitpy/common/config/build_unittest.py
+++ b/Tools/Scripts/webkitpy/common/config/build_unittest.py
@@ -27,11 +27,11 @@ from webkitpy.common.config import build
class ShouldBuildTest(unittest.TestCase):
_should_build_tests = [
- (["Websites/bugs.webkit.org/foo", "WebCore/bar"], ["*"]),
+ (["Websites/bugs.webkit.org/foo", "Source/WebCore/bar"], ["*"]),
(["Websites/bugs.webkit.org/foo"], []),
- (["JavaScriptCore/JavaScriptCore.xcodeproj/foo"], ["mac-leopard", "mac-snowleopard"]),
- (["JavaScriptGlue/foo", "WebCore/bar"], ["*"]),
- (["JavaScriptGlue/foo"], ["mac-leopard", "mac-snowleopard"]),
+ (["Source/JavaScriptCore/JavaScriptCore.xcodeproj/foo"], ["mac-leopard", "mac-snowleopard"]),
+ (["Source/JavaScriptGlue/foo", "Source/WebCore/bar"], ["*"]),
+ (["Source/JavaScriptGlue/foo"], ["mac-leopard", "mac-snowleopard"]),
(["LayoutTests/foo"], ["*"]),
(["LayoutTests/platform/chromium-linux/foo"], ["chromium-linux"]),
(["LayoutTests/platform/chromium-win/fast/compact/001-expected.txt"], ["chromium-win"]),
@@ -42,13 +42,13 @@ class ShouldBuildTest(unittest.TestCase):
(["LayoutTests/platform/win-xp/foo"], ["win"]),
(["LayoutTests/platform/win-wk2/foo"], ["win"]),
(["LayoutTests/platform/win/foo"], ["win"]),
- (["WebCore/mac/foo"], ["chromium-mac", "mac-leopard", "mac-snowleopard"]),
- (["WebCore/win/foo"], ["chromium-win", "win"]),
- (["WebCore/platform/graphics/gpu/foo"], ["mac-leopard", "mac-snowleopard"]),
- (["WebCore/platform/wx/wxcode/win/foo"], []),
- (["WebCore/rendering/RenderThemeMac.mm", "WebCore/rendering/RenderThemeMac.h"], ["mac-leopard", "mac-snowleopard"]),
- (["WebCore/rendering/RenderThemeChromiumLinux.h"], ["chromium-linux"]),
- (["WebCore/rendering/RenderThemeWinCE.h"], []),
+ (["Source/WebCore/mac/foo"], ["chromium-mac", "mac-leopard", "mac-snowleopard"]),
+ (["Source/WebCore/win/foo"], ["chromium-win", "win"]),
+ (["Source/WebCore/platform/graphics/gpu/foo"], ["mac-leopard", "mac-snowleopard"]),
+ (["Source/WebCore/platform/wx/wxcode/win/foo"], []),
+ (["Source/WebCore/rendering/RenderThemeMac.mm", "Source/WebCore/rendering/RenderThemeMac.h"], ["mac-leopard", "mac-snowleopard"]),
+ (["Source/WebCore/rendering/RenderThemeChromiumLinux.h"], ["chromium-linux"]),
+ (["Source/WebCore/rendering/RenderThemeWinCE.h"], []),
]
def test_should_build(self):
diff --git a/Tools/Scripts/webkitpy/common/config/committers.py b/Tools/Scripts/webkitpy/common/config/committers.py
index 7c5bf8b..c7c741b 100644
--- a/Tools/Scripts/webkitpy/common/config/committers.py
+++ b/Tools/Scripts/webkitpy/common/config/committers.py
@@ -89,6 +89,7 @@ committers_unable_to_review = [
Committer("Brett Wilson", "brettw@chromium.org", "brettx"),
Committer("Brian Weinstein", "bweinstein@apple.com", "bweinstein"),
Committer("Cameron McCormack", "cam@webkit.org", "heycam"),
+ Committer("Carlos Garcia Campos", ["cgarcia@igalia.com", "carlosgc@gnome.org", "carlosgc@webkit.org"], "KaL"),
Committer("Carol Szabo", "carol.szabo@nokia.com"),
Committer("Chang Shu", "Chang.Shu@nokia.com"),
Committer("Chris Evans", "cevans@google.com"),
@@ -122,6 +123,7 @@ committers_unable_to_review = [
Committer("Jakob Petsovits", ["jpetsovits@rim.com", "jpetso@gmx.at"], "jpetso"),
Committer("Jakub Wieczorek", "jwieczorek@webkit.org", "fawek"),
Committer("James Hawkins", ["jhawkins@chromium.org", "jhawkins@google.com"], "jhawkins"),
+ Committer("James Simonsen", "simonjam@chromium.org", "simonjam"),
Committer("Jay Civelli", "jcivelli@chromium.org", "jcivelli"),
Committer("Jens Alfke", ["snej@chromium.org", "jens@apple.com"]),
Committer("Jer Noble", "jer.noble@apple.com", "jernoble"),
@@ -160,7 +162,6 @@ committers_unable_to_review = [
Committer("Michael Nordman", "michaeln@google.com", "michaeln"),
Committer("Michael Saboff", "msaboff@apple.com"),
Committer("Michelangelo De Simone", "michelangelo@webkit.org", "michelangelo"),
- Committer("Mihai Parparita", "mihaip@chromium.org", "mihaip"),
Committer("Mike Belshe", ["mbelshe@chromium.org", "mike@belshe.com"]),
Committer("Mike Fenton", ["mifenton@rim.com", "mike.fenton@torchmobile.com"], "mfenton"),
Committer("Mike Thole", ["mthole@mikethole.com", "mthole@apple.com"]),
@@ -175,6 +176,7 @@ committers_unable_to_review = [
Committer("Philippe Normand", ["pnormand@igalia.com", "philn@webkit.org"], "philn-tp"),
Committer("Pierre d'Herbemont", ["pdherbemont@free.fr", "pdherbemont@apple.com"], "pdherbemont"),
Committer("Pierre-Olivier Latour", "pol@apple.com", "pol"),
+ Committer("Pratik Solanki", "psolanki@apple.com", "psolanki"),
Committer("Renata Hodovan", "reni@webkit.org", "reni"),
Committer("Robert Hogan", ["robert@webkit.org", "robert@roberthogan.net", "lists@roberthogan.net"], "mwenge"),
Committer("Roland Steiner", "rolandsteiner@chromium.org"),
@@ -269,6 +271,7 @@ reviewers_list = [
Reviewer("Maciej Stachowiak", "mjs@apple.com", "othermaciej"),
Reviewer("Mark Rowe", "mrowe@apple.com", "bdash"),
Reviewer("Martin Robinson", ["mrobinson@webkit.org", "mrobinson@igalia.com", "martin.james.robinson@gmail.com"], "mrobinson"),
+ Reviewer("Mihai Parparita", "mihaip@chromium.org", "mihaip"),
Reviewer("Nate Chapin", "japhet@chromium.org", "japhet"),
Reviewer("Nikolas Zimmermann", ["zimmermann@kde.org", "zimmermann@physik.rwth-aachen.de", "zimmermann@webkit.org"], "wildfox"),
Reviewer("Ojan Vafai", "ojan@chromium.org", "ojan"),
diff --git a/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py b/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py
index 3cb6da5..98e2fae 100644
--- a/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py
+++ b/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py
@@ -270,6 +270,7 @@ class BuildBot(object):
"Leopard",
"Tiger",
"Windows.*Build",
+ "EFL",
"GTK.*32",
"GTK.*64.*Debug", # Disallow the 64-bit Release bot which is broken.
"Qt",
diff --git a/Tools/Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py b/Tools/Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py
index a10e432..ba898ec 100644
--- a/Tools/Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py
+++ b/Tools/Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py
@@ -30,10 +30,15 @@ import unittest
from webkitpy.common.net.layouttestresults import LayoutTestResults
from webkitpy.common.net.buildbot import BuildBot, Builder, Build
+from webkitpy.layout_tests.layout_package import test_results
+from webkitpy.layout_tests.layout_package import test_failures
from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup
class BuilderTest(unittest.TestCase):
+ def _mock_test_result(self, testname):
+ return test_results.TestResult(testname, [test_failures.FailureTextMismatch()])
+
def _install_fetch_build(self, failure):
def _mock_fetch_build(build_number):
build = Build(
@@ -42,8 +47,8 @@ class BuilderTest(unittest.TestCase):
revision=build_number + 1000,
is_green=build_number < 4
)
- parsed_results = {LayoutTestResults.fail_key: failure(build_number)}
- build._layout_test_results = LayoutTestResults(parsed_results)
+ results = [self._mock_test_result(testname) for testname in failure(build_number)]
+ build._layout_test_results = LayoutTestResults(results)
return build
self.builder._fetch_build = _mock_fetch_build
@@ -254,6 +259,7 @@ class BuildBotTest(unittest.TestCase):
"Leopard",
"Tiger",
"Windows.*Build",
+ "EFL",
"GTK.*32",
"GTK.*64.*Debug", # Disallow the 64-bit Release bot which is broken.
"Qt",
diff --git a/Tools/Scripts/webkitpy/common/net/layouttestresults.py b/Tools/Scripts/webkitpy/common/net/layouttestresults.py
index 15e95ce..28caad4 100644
--- a/Tools/Scripts/webkitpy/common/net/layouttestresults.py
+++ b/Tools/Scripts/webkitpy/common/net/layouttestresults.py
@@ -27,8 +27,12 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# A module for parsing results.html files generated by old-run-webkit-tests
+# This class is one big hack and only needs to exist until we transition to new-run-webkit-tests.
+from webkitpy.common.system.deprecated_logging import log
from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup, SoupStrainer
+from webkitpy.layout_tests.layout_package import test_results
+from webkitpy.layout_tests.layout_package import test_failures
# FIXME: This should be unified with all the layout test results code in the layout_tests package
@@ -57,36 +61,89 @@ class LayoutTestResults(object):
]
@classmethod
+ def _failures_from_fail_row(self, row):
+ # Look at all anchors in this row, and guess what type
+ # of new-run-webkit-test failures they equate to.
+ failures = set()
+ test_name = None
+ for anchor in row.findAll("a"):
+ anchor_text = unicode(anchor.string)
+ if not test_name:
+ test_name = anchor_text
+ continue
+ if anchor_text in ["expected image", "image diffs"] or '%' in anchor_text:
+ failures.add(test_failures.FailureImageHashMismatch())
+ elif anchor_text in ["expected", "actual", "diff", "pretty diff"]:
+ failures.add(test_failures.FailureTextMismatch())
+ else:
+ log("Unhandled link text in results.html parsing: %s. Please file a bug against webkitpy." % anchor_text)
+ # FIXME: Its possible the row contained no links due to ORWT brokeness.
+ # We should probably assume some type of failure anyway.
+ return failures
+
+ @classmethod
+ def _failures_from_row(cls, row, table_title):
+ if table_title == cls.fail_key:
+ return cls._failures_from_fail_row(row)
+ if table_title == cls.crash_key:
+ return [test_failures.FailureCrash()]
+ if table_title == cls.timeout_key:
+ return [test_failures.FailureTimeout()]
+ if table_title == cls.missing_key:
+ return [test_failures.FailureMissingResult(), test_failures.FailureMissingImageHash(), test_failures.FailureMissingImage()]
+ return None
+
+ @classmethod
+ def _test_result_from_row(cls, row, table_title):
+ test_name = unicode(row.find("a").string)
+ failures = cls._failures_from_row(row, table_title)
+ # TestResult is a class designed to work with new-run-webkit-tests.
+ # old-run-webkit-tests does not save quite enough information in results.html for us to parse.
+ # FIXME: It's unclear if test_name should include LayoutTests or not.
+ return test_results.TestResult(test_name, failures)
+
+ @classmethod
+ def _parse_results_table(cls, table):
+ table_title = unicode(table.findPreviousSibling("p").string)
+ if table_title not in cls.expected_keys:
+ # This Exception should only ever be hit if run-webkit-tests changes its results.html format.
+ raise Exception("Unhandled title: %s" % table_title)
+ # Ignore stderr failures. Everyone ignores them anyway.
+ if table_title == cls.stderr_key:
+ return []
+ # FIXME: We might end with two TestResults object for the same test if it appears in more than one row.
+ return [cls._test_result_from_row(row, table_title) for row in table.findAll("tr")]
+
+ @classmethod
def _parse_results_html(cls, page):
- if not page:
- return None
- parsed_results = {}
tables = BeautifulSoup(page).findAll("table")
- for table in tables:
- table_title = unicode(table.findPreviousSibling("p").string)
- if table_title not in cls.expected_keys:
- # This Exception should only ever be hit if run-webkit-tests changes its results.html format.
- raise Exception("Unhandled title: %s" % table_title)
- # We might want to translate table titles into identifiers before storing.
- parsed_results[table_title] = [unicode(row.find("a").string) for row in table.findAll("tr")]
-
- return parsed_results
+ return sum([cls._parse_results_table(table) for table in tables], [])
@classmethod
def results_from_string(cls, string):
- parsed_results = cls._parse_results_html(string)
- if not parsed_results:
+ if not string:
return None
- return cls(parsed_results)
+ test_results = cls._parse_results_html(string)
+ if not test_results:
+ return None
+ return cls(test_results)
+
+ def __init__(self, test_results):
+ self._test_results = test_results
+
+ def test_results(self):
+ return self._test_results
- def __init__(self, parsed_results):
- self._parsed_results = parsed_results
+ def results_matching_failure_types(self, failure_types):
+ return [result for result in self._test_results if result.has_failure_matching_types(failure_types)]
- def parsed_results(self):
- return self._parsed_results
+ def tests_matching_failure_types(self, failure_types):
+ return [result.filename for result in self.results_matching_failure_types(failure_types)]
- def results_matching_keys(self, result_keys):
- return sorted(sum([tests for key, tests in self._parsed_results.items() if key in result_keys], []))
+ def failing_test_results(self):
+ # These should match the "fail", "crash", and "timeout" keys.
+ failure_types = [test_failures.FailureTextMismatch, test_failures.FailureImageHashMismatch, test_failures.FailureCrash, test_failures.FailureTimeout]
+ return self.results_matching_failure_types(failure_types)
def failing_tests(self):
- return self.results_matching_keys([self.fail_key, self.crash_key, self.timeout_key])
+ return [result.filename for result in self.failing_test_results()]
diff --git a/Tools/Scripts/webkitpy/common/net/layouttestresults_unittest.py b/Tools/Scripts/webkitpy/common/net/layouttestresults_unittest.py
index 8490eae..01b91b8 100644
--- a/Tools/Scripts/webkitpy/common/net/layouttestresults_unittest.py
+++ b/Tools/Scripts/webkitpy/common/net/layouttestresults_unittest.py
@@ -29,6 +29,10 @@
import unittest
from webkitpy.common.net.layouttestresults import LayoutTestResults
+from webkitpy.common.system.outputcapture import OutputCapture
+from webkitpy.layout_tests.layout_package import test_results
+from webkitpy.layout_tests.layout_package import test_failures
+from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup
class LayoutTestResultsTest(unittest.TestCase):
@@ -57,21 +61,28 @@ class LayoutTestResultsTest(unittest.TestCase):
</html>
"""
- _expected_layout_test_results = {
- 'Tests that had stderr output:': [
- 'accessibility/aria-activedescendant-crash.html',
- ],
- 'Tests that had no expected results (probably new):': [
- 'fast/repaint/no-caret-repaint-in-non-content-editable-element.html',
- ],
- }
-
def test_parse_layout_test_results(self):
+ failures = [test_failures.FailureMissingResult(), test_failures.FailureMissingImageHash(), test_failures.FailureMissingImage()]
+ testname = 'fast/repaint/no-caret-repaint-in-non-content-editable-element.html'
+ expected_results = [test_results.TestResult(testname, failures)]
+
results = LayoutTestResults._parse_results_html(self._example_results_html)
- self.assertEqual(self._expected_layout_test_results, results)
+ self.assertEqual(expected_results, results)
def test_results_from_string(self):
self.assertEqual(LayoutTestResults.results_from_string(None), None)
self.assertEqual(LayoutTestResults.results_from_string(""), None)
results = LayoutTestResults.results_from_string(self._example_results_html)
self.assertEqual(len(results.failing_tests()), 0)
+
+ def test_failures_from_fail_row(self):
+ row = BeautifulSoup("<tr><td><a>test.hml</a></td><td><a>expected image</a></td><td><a>25%</a></td></tr>")
+ test_name = unicode(row.find("a").string)
+ # Even if the caller has already found the test name, findAll inside _failures_from_fail_row will see it again.
+ failures = OutputCapture().assert_outputs(self, LayoutTestResults._failures_from_fail_row, [row])
+ self.assertEqual(len(failures), 1)
+ self.assertEqual(type(sorted(failures)[0]), test_failures.FailureImageHashMismatch)
+
+ row = BeautifulSoup("<tr><td><a>test.hml</a><a>foo</a></td></tr>")
+ expected_stderr = "Unhandled link text in results.html parsing: foo. Please file a bug against webkitpy.\n"
+ OutputCapture().assert_outputs(self, LayoutTestResults._failures_from_fail_row, [row], expected_stderr=expected_stderr)
diff --git a/Tools/Scripts/webkitpy/common/net/networktransaction.py b/Tools/Scripts/webkitpy/common/net/networktransaction.py
index de19e94..21cc71f 100644
--- a/Tools/Scripts/webkitpy/common/net/networktransaction.py
+++ b/Tools/Scripts/webkitpy/common/net/networktransaction.py
@@ -58,8 +58,7 @@ class NetworkTransaction(object):
if self._convert_404_to_None and e.code == 404:
return None
self._check_for_timeout()
- _log.warn("Received HTTP status %s from server. Retrying in "
- "%s seconds..." % (e.code, self._backoff_seconds))
+ _log.warn("Received HTTP status %s loading \"%s\". Retrying in %s seconds..." % (e.code, e.filename, self._backoff_seconds))
self._sleep()
def _check_for_timeout(self):
diff --git a/Tools/Scripts/webkitpy/common/net/networktransaction_unittest.py b/Tools/Scripts/webkitpy/common/net/networktransaction_unittest.py
index 49aaeed..c4cd4e0 100644
--- a/Tools/Scripts/webkitpy/common/net/networktransaction_unittest.py
+++ b/Tools/Scripts/webkitpy/common/net/networktransaction_unittest.py
@@ -70,9 +70,9 @@ class NetworkTransactionTest(LoggingTestCase):
transaction = NetworkTransaction(initial_backoff_seconds=0)
self.assertEqual(transaction.run(lambda: self._raise_500_error()), 42)
self.assertEqual(self._run_count, 3)
- self.assertLog(['WARNING: Received HTTP status 500 from server. '
+ self.assertLog(['WARNING: Received HTTP status 500 loading "http://example.com/". '
'Retrying in 0 seconds...\n',
- 'WARNING: Received HTTP status 500 from server. '
+ 'WARNING: Received HTTP status 500 loading "http://example.com/". '
'Retrying in 0.0 seconds...\n'])
def test_convert_404_to_None(self):
diff --git a/Tools/Scripts/webkitpy/common/net/statusserver.py b/Tools/Scripts/webkitpy/common/net/statusserver.py
index 64dd77b..abd298a 100644
--- a/Tools/Scripts/webkitpy/common/net/statusserver.py
+++ b/Tools/Scripts/webkitpy/common/net/statusserver.py
@@ -69,6 +69,13 @@ class StatusServer:
return
self._browser.add_file(results_file, "text/plain", "results.txt", 'results_file')
+ # 500 is the AppEngine limit for TEXT fields (which most of our fields are).
+ # Exceeding the limit will result in a 500 error from the server.
+ def _set_field(self, field_name, value, limit=500):
+ if len(value) > limit:
+ _log.warn("Attempted to set %s to value exceeding %s characters, truncating." % (field_name, limit))
+ self._browser[field_name] = value[:limit]
+
def _post_status_to_server(self, queue_name, status, patch, results_file):
if results_file:
# We might need to re-wind the file if we've already tried to post it.
@@ -81,7 +88,7 @@ class StatusServer:
if self.bot_id:
self._browser["bot_id"] = self.bot_id
self._add_patch(patch)
- self._browser["status"] = status
+ self._set_field("status", status, limit=500)
self._add_results_file(results_file)
return self._browser.submit().read() # This is the id of the newly created status object.
diff --git a/Tools/Scripts/webkitpy/common/system/directoryfileset.py b/Tools/Scripts/webkitpy/common/system/directoryfileset.py
new file mode 100644
index 0000000..11acaf4
--- /dev/null
+++ b/Tools/Scripts/webkitpy/common/system/directoryfileset.py
@@ -0,0 +1,77 @@
+# Copyright (C) 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:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. 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.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
+
+from __future__ import with_statement
+
+import os
+import shutil
+
+from webkitpy.common.system.fileset import FileSetFileHandle
+from webkitpy.common.system.filesystem import FileSystem
+import webkitpy.common.system.ospath as ospath
+
+
+class DirectoryFileSet(object):
+ """The set of files under a local directory."""
+ def __init__(self, path, filesystem=None):
+ self._path = path
+ self._filesystem = filesystem or FileSystem()
+ if not self._path.endswith(os.path.sep):
+ self._path += os.path.sep
+
+ def _full_path(self, filename):
+ assert self._is_under(self._path, filename)
+ return self._filesystem.join(self._path, filename)
+
+ def _drop_directory_prefix(self, path):
+ return path[len(self._path):]
+
+ def _files_in_directory(self):
+ """Returns a list of all the files in the directory, including the path
+ to the directory"""
+ return self._filesystem.files_under(self._path)
+
+ def _is_under(self, dir, filename):
+ return bool(ospath.relpath(self._filesystem.join(dir, filename), dir))
+
+ def open(self, filename):
+ return FileSetFileHandle(self, filename, self._filesystem)
+
+ def namelist(self):
+ return map(self._drop_directory_prefix, self._files_in_directory())
+
+ def read(self, filename):
+ return self._filesystem.read_text_file(self._full_path(filename))
+
+ def extract(self, filename, path):
+ """Extracts a file from this file set to the specified directory."""
+ src = self._full_path(filename)
+ dest = self._filesystem.join(path, filename)
+ # As filename may have slashes in it, we must ensure that the same
+ # directory hierarchy exists at the output path.
+ self._filesystem.maybe_make_directory(os.path.split(dest)[0])
+ self._filesystem.copyfile(src, dest)
+
+ def delete(self, filename):
+ filename = self._full_path(filename)
+ self._filesystem.remove(filename)
diff --git a/Tools/Scripts/webkitpy/common/system/directoryfileset_unittest.py b/Tools/Scripts/webkitpy/common/system/directoryfileset_unittest.py
new file mode 100644
index 0000000..a3850ee
--- /dev/null
+++ b/Tools/Scripts/webkitpy/common/system/directoryfileset_unittest.py
@@ -0,0 +1,70 @@
+# Copyright (C) 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:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. 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.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
+
+from __future__ import with_statement
+
+import unittest
+
+from webkitpy.common.system.directoryfileset import DirectoryFileSet
+from webkitpy.common.system.filesystem_mock import MockFileSystem
+
+
+class DirectoryFileSetTest(unittest.TestCase):
+ def setUp(self):
+ files = {}
+ files['/test/some-file'] = 'contents'
+ files['/test/some-other-file'] = 'other contents'
+ files['/test/b/c'] = 'c'
+ self._filesystem = MockFileSystem(files)
+ self._fileset = DirectoryFileSet('/test', self._filesystem)
+
+ def test_files_in_namelist(self):
+ self.assertTrue('some-file' in self._fileset.namelist())
+ self.assertTrue('some-other-file' in self._fileset.namelist())
+ self.assertTrue('b/c' in self._fileset.namelist())
+
+ def test_read(self):
+ self.assertEquals('contents', self._fileset.read('some-file'))
+
+ def test_open(self):
+ file = self._fileset.open('some-file')
+ self.assertEquals('some-file', file.name())
+ self.assertEquals('contents', file.contents())
+
+ def test_extract(self):
+ self._fileset.extract('some-file', '/test-directory')
+ contents = self._filesystem.read_text_file('/test-directory/some-file')
+ self.assertEquals('contents', contents)
+
+ def test_extract_deep_file(self):
+ self._fileset.extract('b/c', '/test-directory')
+ self.assertTrue(self._filesystem.exists('/test-directory/b/c'))
+
+ def test_delete(self):
+ self.assertTrue(self._filesystem.exists('/test/some-file'))
+ self._fileset.delete('some-file')
+ self.assertFalse(self._filesystem.exists('/test/some-file'))
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/Tools/Scripts/webkitpy/common/system/fileset.py b/Tools/Scripts/webkitpy/common/system/fileset.py
new file mode 100644
index 0000000..22f7c4d
--- /dev/null
+++ b/Tools/Scripts/webkitpy/common/system/fileset.py
@@ -0,0 +1,64 @@
+# Copyright (C) 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:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. 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.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
+
+from __future__ import with_statement
+import os
+
+from webkitpy.common.system.filesystem import FileSystem
+
+
+class FileSetFileHandle(object):
+ """Points to a file that resides in a file set"""
+ def __init__(self, fileset, filename, filesystem=None):
+ self._filename = filename
+ self._fileset = fileset
+ self._contents = None
+ self._filesystem = filesystem or FileSystem()
+
+ def __str__(self):
+ return "%s:%s" % (self._fileset, self._filename)
+
+ def contents(self):
+ if self._contents is None:
+ self._contents = self._fileset.read(self._filename)
+ return self._contents
+
+ def save_to(self, path, filename=None):
+ if filename is None:
+ self._fileset.extract(self._filename, path)
+ return
+ with self._filesystem.mkdtemp() as temp_dir:
+ self._fileset.extract(self._filename, temp_dir)
+
+ src = self._filesystem.join(temp_dir, self._filename)
+ dest = self._filesystem.join(path, filename)
+ self._filesystem.copyfile(src, dest)
+
+ def delete(self):
+ self._fileset.delete(self._filename)
+
+ def name(self):
+ return self._filename
+
+ def splitext(self):
+ return os.path.splitext(self.name())
diff --git a/Tools/Scripts/webkitpy/common/system/filesystem.py b/Tools/Scripts/webkitpy/common/system/filesystem.py
index f0b5e44..8830ea8 100644
--- a/Tools/Scripts/webkitpy/common/system/filesystem.py
+++ b/Tools/Scripts/webkitpy/common/system/filesystem.py
@@ -93,7 +93,7 @@ class FileSystem(object):
def maybe_make_directory(self, *path):
"""Create the specified directory if it doesn't already exist."""
try:
- os.makedirs(os.path.join(*path))
+ os.makedirs(self.join(*path))
except OSError, e:
if e.errno != errno.EEXIST:
raise
@@ -152,3 +152,9 @@ class FileSystem(object):
"""Copies the contents of the file at the given path to the destination
path."""
shutil.copyfile(source, destination)
+
+ def files_under(self, path):
+ """Return the list of all files under the given path."""
+ return [self.join(path_to_file, filename)
+ for (path_to_file, _, filenames) in os.walk(path)
+ for filename in filenames]
diff --git a/Tools/Scripts/webkitpy/common/system/filesystem_mock.py b/Tools/Scripts/webkitpy/common/system/filesystem_mock.py
index ea0f3f9..c605cb2 100644
--- a/Tools/Scripts/webkitpy/common/system/filesystem_mock.py
+++ b/Tools/Scripts/webkitpy/common/system/filesystem_mock.py
@@ -29,6 +29,7 @@
import errno
import os
import path
+import re
class MockFileSystem(object):
@@ -57,7 +58,7 @@ class MockFileSystem(object):
return any(f.startswith(path) for f in self.files)
def join(self, *comps):
- return '/'.join(comps)
+ return re.sub(re.escape(os.path.sep), '/', os.path.join(*comps))
def listdir(self, path):
if not self.isdir(path):
@@ -107,3 +108,11 @@ class MockFileSystem(object):
raise IOError(errno.EISDIR, destination, os.strerror(errno.ISDIR))
self.files[destination] = self.files[source]
+
+ def files_under(self, path):
+ if not path.endswith('/'):
+ path += '/'
+ return [file for file in self.files if file.startswith(path)]
+
+ def remove(self, path):
+ del self.files[path]
diff --git a/Tools/Scripts/webkitpy/common/system/zipfileset.py b/Tools/Scripts/webkitpy/common/system/zipfileset.py
new file mode 100644
index 0000000..fa2b762
--- /dev/null
+++ b/Tools/Scripts/webkitpy/common/system/zipfileset.py
@@ -0,0 +1,65 @@
+# Copyright (C) 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:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. 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.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
+
+import urllib
+import zipfile
+
+from webkitpy.common.net.networktransaction import NetworkTransaction
+from webkitpy.common.system.fileset import FileSetFileHandle
+from webkitpy.common.system.filesystem import FileSystem
+
+
+class ZipFileSet(object):
+ """The set of files in a zip file that resides at a URL (local or remote)"""
+ def __init__(self, zip_url, filesystem=None, zip_factory=None):
+ self._zip_url = zip_url
+ self._zip_file = None
+ self._filesystem = filesystem or FileSystem()
+ self._zip_factory = zip_factory or self._retrieve_zip_file
+
+ def _retrieve_zip_file(self, zip_url):
+ temp_file = NetworkTransaction().run(lambda: urllib.urlretrieve(zip_url)[0])
+ return zipfile.ZipFile(temp_file)
+
+ def _load(self):
+ if self._zip_file is None:
+ self._zip_file = self._zip_factory(self._zip_url)
+
+ def open(self, filename):
+ self._load()
+ return FileSetFileHandle(self, filename, self._filesystem)
+
+ def namelist(self):
+ self._load()
+ return self._zip_file.namelist()
+
+ def read(self, filename):
+ self._load()
+ return self._zip_file.read(filename)
+
+ def extract(self, filename, path):
+ self._load()
+ self._zip_file.extract(filename, path)
+
+ def delete(self, filename):
+ raise Exception("Can't delete from a ZipFileSet.")
diff --git a/Tools/Scripts/webkitpy/common/system/zipfileset_unittest.py b/Tools/Scripts/webkitpy/common/system/zipfileset_unittest.py
new file mode 100644
index 0000000..a9ba5ad
--- /dev/null
+++ b/Tools/Scripts/webkitpy/common/system/zipfileset_unittest.py
@@ -0,0 +1,95 @@
+# Copyright (C) 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:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. 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.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
+
+import os
+import shutil
+import tempfile
+import unittest
+import zipfile
+
+from webkitpy.common.system.filesystem_mock import MockFileSystem
+from webkitpy.common.system.zipfileset import ZipFileSet
+
+
+class FakeZip(object):
+ def __init__(self, filesystem):
+ self._filesystem = filesystem
+ self._files = {}
+
+ def add_file(self, filename, contents):
+ self._files[filename] = contents
+
+ def open(self, filename):
+ return FileSetFileHandle(self, filename, self._filesystem)
+
+ def namelist(self):
+ return self._files.keys()
+
+ def read(self, filename):
+ return self._files[filename]
+
+ def extract(self, filename, path):
+ self._filesystem.write_text_file(self._filesystem.join(path, filename), self.read(filename))
+
+ def delete(self, filename):
+ raise Exception("Can't delete from a ZipFileSet.")
+
+
+class ZipFileSetTest(unittest.TestCase):
+ def setUp(self):
+ self._filesystem = MockFileSystem()
+ self._zip = ZipFileSet('blah', self._filesystem, self.make_fake_zip)
+
+ def make_fake_zip(self, zip_url):
+ result = FakeZip(self._filesystem)
+ result.add_file('some-file', 'contents')
+ result.add_file('a/b/some-other-file', 'other contents')
+ return result
+
+ def test_open(self):
+ file = self._zip.open('a/b/some-other-file')
+ self.assertEquals('a/b/some-other-file', file.name())
+ self.assertEquals('other contents', file.contents())
+
+ def test_read(self):
+ self.assertEquals('contents', self._zip.read('some-file'))
+
+ def test_extract(self):
+ self._filesystem.maybe_make_directory('/some-dir')
+ self._zip.extract('some-file', '/some-dir')
+ self.assertTrue(self._filesystem.isfile('/some-dir/some-file'))
+
+ def test_deep_extract(self):
+ self._filesystem.maybe_make_directory('/some-dir')
+ self._zip.extract('a/b/some-other-file', '/some-dir')
+ self.assertTrue(self._filesystem.isfile('/some-dir/a/b/some-other-file'))
+
+ def test_cant_delete(self):
+ self.assertRaises(Exception, self._zip.delete, 'some-file')
+
+ def test_namelist(self):
+ self.assertTrue('some-file' in self._zip.namelist())
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/Tools/Scripts/webkitpy/layout_tests/deduplicate_tests_unittest.py b/Tools/Scripts/webkitpy/layout_tests/deduplicate_tests_unittest.py
index 309bf8d..47dc8a2 100644
--- a/Tools/Scripts/webkitpy/layout_tests/deduplicate_tests_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/deduplicate_tests_unittest.py
@@ -196,7 +196,7 @@ class ListDuplicatesTest(unittest.TestCase):
('LayoutTests/platform/mac/test.html',
('platform/mac/test.html', checkout_root)),
(None,
- ('platform/mac/test.html', os.path.join(checkout_root, 'WebCore'))),
+ ('platform/mac/test.html', os.path.join(checkout_root, 'Source', 'WebCore'))),
('test.html',
('platform/mac/test.html', os.path.join(layout_test_dir, 'platform/mac'))),
(None,
diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py b/Tools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py
index fdb8da6..2bb2d02 100644
--- a/Tools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py
+++ b/Tools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py
@@ -500,11 +500,9 @@ class TestShellThread(WatchableThread):
result = worker.get_test_result()
except AttributeError, e:
# This gets raised if the worker thread has already exited.
- failures = []
- _log.error('Cannot get results of test: %s' %
- test_input.filename)
- result = test_results.TestResult(test_input.filename, failures=[],
- test_run_time=0, total_time_for_all_diffs=0, time_for_diffs={})
+ _log.error('Cannot get results of test: %s' % test_input.filename)
+ # FIXME: Seems we want a unique failure type here.
+ result = test_results.TestResult(test_input.filename)
return result
diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py b/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py
index 54d129b..12e65b2 100644
--- a/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py
+++ b/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py
@@ -46,6 +46,7 @@ import webkitpy.thirdparty.simplejson as simplejson
_log = logging.getLogger("webkitpy.layout_tests.layout_package.json_results_generator")
+# FIXME: We already have a TestResult class in test_results.py
class TestResult(object):
"""A simple class that represents a single test result."""
diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py b/Tools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py
index 0e478c8..9280b02 100644
--- a/Tools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py
@@ -139,9 +139,7 @@ class Testprinter(unittest.TestCase):
elif result_type == test_expectations.CRASH:
failures = [test_failures.FailureCrash()]
path = os.path.join(self._port.layout_tests_dir(), test)
- return test_results.TestResult(path, failures, run_time,
- total_time_for_all_diffs=0,
- time_for_diffs=0)
+ return test_results.TestResult(path, failures=failures, test_run_time=run_time)
def get_result_summary(self, tests, expectations_str):
test_paths = [os.path.join(self._port.layout_tests_dir(), test) for
diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_failures.py b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_failures.py
index 6d55761..5dd0114 100644
--- a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_failures.py
+++ b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_failures.py
@@ -35,6 +35,9 @@ import test_expectations
import cPickle
+# FIXME: This is backwards. Each TestFailure subclass should know what
+# test_expectation type it corresponds too. Then this method just
+# collects them all from the failure list and returns the worst one.
def determine_result_type(failure_list):
"""Takes a set of test_failures and returns which result type best fits
the list of failures. "Best fits" means we use the worst type of failure.
@@ -88,6 +91,9 @@ class TestFailure(object):
def __ne__(self, other):
return self.__class__.__name__ != other.__class__.__name__
+ def __hash__(self):
+ return hash(self.__class__.__name__)
+
def dumps(self):
"""Returns the string/JSON representation of a TestFailure."""
return cPickle.dumps(self)
@@ -125,9 +131,6 @@ class FailureWithType(TestFailure):
use the standard OutputLinks.
"""
- def __init__(self):
- TestFailure.__init__(self)
-
# Filename suffixes used by ResultHtmlOutput.
OUT_FILENAMES = ()
diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_failures_unittest.py b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_failures_unittest.py
index 3e3528d..b2698d1 100644
--- a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_failures_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_failures_unittest.py
@@ -80,5 +80,15 @@ class Test(unittest.TestCase):
for c in ALL_FAILURE_CLASSES:
self.assert_loads(c)
+ def test_equals(self):
+ self.assertEqual(FailureCrash(), FailureCrash())
+ self.assertNotEqual(FailureCrash(), FailureTimeout())
+ crash_set = set([FailureCrash(), FailureCrash()])
+ self.assertEqual(len(crash_set), 1)
+ # The hash happens to be the name of the class, but sets still work:
+ crash_set = set([FailureCrash(), "FailureCrash"])
+ self.assertEqual(len(crash_set), 2)
+
+
if __name__ == '__main__':
unittest.main()
diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_results.py b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_results.py
index 2417fb7..055f65b 100644
--- a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_results.py
+++ b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_results.py
@@ -38,13 +38,14 @@ class TestResult(object):
def loads(str):
return cPickle.loads(str)
- def __init__(self, filename, failures, test_run_time,
- total_time_for_all_diffs, time_for_diffs):
- self.failures = failures
+ def __init__(self, filename, failures=None, test_run_time=None, total_time_for_all_diffs=None, time_for_diffs=None):
self.filename = filename
- self.test_run_time = test_run_time
- self.time_for_diffs = time_for_diffs
- self.total_time_for_all_diffs = total_time_for_all_diffs
+ self.failures = failures or []
+ self.test_run_time = test_run_time or 0
+ self.total_time_for_all_diffs = total_time_for_all_diffs or 0
+ self.time_for_diffs = time_for_diffs or {} # FIXME: Why is this a dictionary?
+
+ # FIXME: Setting this in the constructor makes this class hard to mutate.
self.type = test_failures.determine_result_type(failures)
def __eq__(self, other):
@@ -57,5 +58,11 @@ class TestResult(object):
def __ne__(self, other):
return not (self == other)
+ def has_failure_matching_types(self, types):
+ for failure in self.failures:
+ if type(failure) in types:
+ return True
+ return False
+
def dumps(self):
return cPickle.dumps(self)
diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_results_unittest.py b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_results_unittest.py
index 5921666..c8fcf64 100644
--- a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_results_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_results_unittest.py
@@ -32,12 +32,20 @@ from test_results import TestResult
class Test(unittest.TestCase):
+ def test_defaults(self):
+ result = TestResult("foo")
+ self.assertEqual(result.filename, 'foo')
+ self.assertEqual(result.failures, [])
+ self.assertEqual(result.test_run_time, 0)
+ self.assertEqual(result.total_time_for_all_diffs, 0)
+ self.assertEqual(result.time_for_diffs, {})
+
def test_loads(self):
result = TestResult(filename='foo',
failures=[],
test_run_time=1.1,
total_time_for_all_diffs=0.5,
- time_for_diffs=0.5)
+ time_for_diffs={})
s = result.dumps()
new_result = TestResult.loads(s)
self.assertTrue(isinstance(new_result, TestResult))
diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py
index 24d04ca..5b02a00 100644
--- a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py
+++ b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py
@@ -251,6 +251,7 @@ class TestRunner:
overrides=overrides_str)
return self._expectations
+ # FIXME: This method is way too long and needs to be broken into pieces.
def prepare_lists_and_print_output(self):
"""Create appropriate subsets of test lists and returns a
ResultSummary object. Also prints expected test counts.
@@ -384,9 +385,7 @@ class TestRunner:
# subtracted out of self._test_files, above), but we stub out the
# results here so the statistics can remain accurate.
for test in skip_chunk:
- result = test_results.TestResult(test,
- failures=[], test_run_time=0, total_time_for_all_diffs=0,
- time_for_diffs=0)
+ result = test_results.TestResult(test)
result.type = test_expectations.SKIP
result_summary.add(result, expected=True)
self._printer.print_expected('')
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium.py
index 012e9cc..b90421a 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium.py
@@ -380,8 +380,11 @@ class ChromiumDriver(base.Driver):
if self._port.get_option('js_flags') is not None:
cmd.append('--js-flags="' + self._port.get_option('js_flags') + '"')
- if self._port.get_option('multiple_loads') > 0:
- cmd.append('--multiple-loads=' + str(self._port.get_option('multiple_loads')))
+ if self._port.get_option('stress_opt'):
+ cmd.append('--stress-opt')
+
+ if self._port.get_option('stress_deopt'):
+ cmd.append('--stress-deopt')
# test_shell does not support accelerated compositing.
if not self._port.get_option("use_test_shell"):
diff --git a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
index f7e5330..c431765 100755
--- a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
+++ b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
@@ -215,10 +215,14 @@ def parse_args(args=None):
default=False, help="create a dialog on DumpRenderTree startup"),
optparse.make_option("--gp-fault-error-box", action="store_true",
default=False, help="enable Windows GP fault error box"),
- optparse.make_option("--multiple-loads",
- type="int", help="turn on multiple loads of each test"),
optparse.make_option("--js-flags",
type="string", help="JavaScript flags to pass to tests"),
+ optparse.make_option("--stress-opt", action="store_true",
+ default=False,
+ help="Enable additional stress test to JavaScript optimization"),
+ optparse.make_option("--stress-deopt", action="store_true",
+ default=False,
+ help="Enable additional stress test to JavaScript optimization"),
optparse.make_option("--nocheck-sys-deps", action="store_true",
default=False,
help="Don't check the system dependencies (themes)"),
diff --git a/Tools/Scripts/webkitpy/style/checker.py b/Tools/Scripts/webkitpy/style/checker.py
index 6f1beb0..3cfa1c9 100644
--- a/Tools/Scripts/webkitpy/style/checker.py
+++ b/Tools/Scripts/webkitpy/style/checker.py
@@ -131,10 +131,10 @@ _PATH_RULES_SPECIFIER = [
# values.
"WebKit/efl/ewk/",
# There is no clean way to avoid "yy_*" names used by flex.
- "WebCore/css/CSSParser.cpp",
+ "Source/WebCore/css/CSSParser.cpp",
# Qt code uses '_' in some places (such as private slots
# and on test xxx_data methos on tests)
- "JavaScriptCore/qt/api/",
+ "Source/JavaScriptCore/qt/",
"WebKit/qt/Api/",
"WebKit/qt/tests/",
"WebKit/qt/declarative/",
@@ -143,7 +143,7 @@ _PATH_RULES_SPECIFIER = [
([# The GTK+ APIs use GTK+ naming style, which includes
# lower-cased, underscore-separated values.
# Also, GTK+ allows the use of NULL.
- "WebCore/bindings/scripts/test/GObject",
+ "Source/WebCore/bindings/scripts/test/GObject",
"WebKit/gtk/webkit/",
"Tools/DumpRenderTree/gtk/"],
["-readability/naming",
@@ -154,8 +154,12 @@ _PATH_RULES_SPECIFIER = [
["-build/header_guard"]),
([# assembler has lots of opcodes that use underscores, so
# we don't check for underscores in that directory.
- "/JavaScriptCore/assembler/"],
+ "/Source/JavaScriptCore/assembler/"],
["-readability/naming"]),
+ ([# JITStubs has an usual syntax which causes false alarms for a few checks.
+ "JavaScriptCore/jit/JITStubs.cpp"],
+ ["-readability/parameter_name",
+ "-whitespace/parens"]),
# WebKit2 rules:
# WebKit2 doesn't use config.h, and certain directories have other
@@ -165,11 +169,13 @@ _PATH_RULES_SPECIFIER = [
["-build/include_order",
"-readability/naming"]),
([# The WebKit2 C API has names with underscores and whitespace-aligned
- # struct members.
+ # struct members. Also, we allow unnecessary parameter names in
+ # WebKit2 APIs because we're matching CF's header style.
"WebKit2/UIProcess/API/C/",
"WebKit2/WebProcess/InjectedBundle/API/c/"],
["-build/include_order",
"-readability/naming",
+ "-readability/parameter_name",
"-whitespace/declaration"]),
([# Nothing in WebKit2 uses config.h.
"WebKit2/"],
@@ -241,7 +247,7 @@ _SKIPPED_FILES_WITH_WARNING = [
# Soup API that is still being cooked, will be removed from WebKit
# in a few months when it is merged into soup proper. The style
# follows the libsoup style completely.
- "WebCore/platform/network/soup/cache/",
+ "Source/WebCore/platform/network/soup/cache/",
]
diff --git a/Tools/Scripts/webkitpy/style/checker_unittest.py b/Tools/Scripts/webkitpy/style/checker_unittest.py
index d9057a8..a4649d2 100755
--- a/Tools/Scripts/webkitpy/style/checker_unittest.py
+++ b/Tools/Scripts/webkitpy/style/checker_unittest.py
@@ -222,11 +222,11 @@ class GlobalVariablesTest(unittest.TestCase):
"readability/null")
assertNoCheck("WebKit/efl/ewk/ewk_view.h",
"readability/naming")
- assertNoCheck("WebCore/css/CSSParser.cpp",
+ assertNoCheck("Source/WebCore/css/CSSParser.cpp",
"readability/naming")
# Test if Qt exceptions are indeed working
- assertCheck("JavaScriptCore/qt/api/qscriptengine.cpp",
+ assertCheck("Source/JavaScriptCore/qt/api/qscriptengine.cpp",
"readability/braces")
assertCheck("WebKit/qt/Api/qwebpage.cpp",
"readability/braces")
@@ -236,7 +236,10 @@ class GlobalVariablesTest(unittest.TestCase):
"readability/braces")
assertCheck("WebKit/qt/examples/platformplugin/WebPlugin.cpp",
"readability/braces")
- assertNoCheck("JavaScriptCore/qt/api/qscriptengine.cpp",
+ assertNoCheck("Source/JavaScriptCore/qt/api/qscriptengine.cpp",
+ "readability/naming")
+ assertNoCheck("Source/JavaScriptCore/qt/benchmarks"
+ "/qscriptengine/tst_qscriptengine.cpp",
"readability/naming")
assertNoCheck("WebKit/qt/Api/qwebpage.cpp",
"readability/naming")
@@ -247,7 +250,7 @@ class GlobalVariablesTest(unittest.TestCase):
assertNoCheck("WebKit/qt/examples/platformplugin/WebPlugin.cpp",
"readability/naming")
- assertNoCheck("WebCore/ForwardingHeaders/debugger/Debugger.h",
+ assertNoCheck("Source/WebCore/ForwardingHeaders/debugger/Debugger.h",
"build/header_guard")
# Third-party Python code: webkitpy/thirdparty
@@ -296,8 +299,8 @@ class CheckerDispatcherSkipTest(unittest.TestCase):
paths_to_skip = [
"gtk2drawing.c",
"gtkdrawing.h",
- "WebCore/platform/gtk/gtk2drawing.c",
- "WebCore/platform/gtk/gtkdrawing.h",
+ "Source/WebCore/platform/gtk/gtk2drawing.c",
+ "Source/WebCore/platform/gtk/gtkdrawing.h",
"WebKit/gtk/tests/testatk.c",
]
@@ -485,8 +488,8 @@ class CheckerDispatcherDispatchTest(unittest.TestCase):
"foo.wm",
"foo.xhtml",
"foo.y",
- os.path.join("WebCore", "ChangeLog"),
- os.path.join("WebCore", "inspector", "front-end", "inspector.js"),
+ os.path.join("Source", "WebCore", "ChangeLog"),
+ os.path.join("Source", "WebCore", "inspector", "front-end", "inspector.js"),
os.path.join("Tools", "Scripts", "check-webkit-style"),
]
@@ -505,7 +508,7 @@ class CheckerDispatcherDispatchTest(unittest.TestCase):
def test_xml_paths(self):
"""Test paths that should be checked as XML."""
paths = [
- "WebCore/WebCore.vcproj/WebCore.vcproj",
+ "Source/WebCore/WebCore.vcproj/WebCore.vcproj",
"WebKitLibraries/win/tools/vsprops/common.vsprops",
]
diff --git a/Tools/Scripts/webkitpy/style/checkers/cpp.py b/Tools/Scripts/webkitpy/style/checkers/cpp.py
index 94e5bdd..4ea7d69 100644
--- a/Tools/Scripts/webkitpy/style/checkers/cpp.py
+++ b/Tools/Scripts/webkitpy/style/checkers/cpp.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2009 Google Inc. All rights reserved.
+# Copyright (C) 2009, 2010 Google Inc. All rights reserved.
# Copyright (C) 2009 Torch Mobile Inc.
# Copyright (C) 2009 Apple Inc. All rights reserved.
# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
@@ -47,6 +47,8 @@ import string
import sys
import unicodedata
+from webkitpy.common.memoized import memoized
+
# The key to use to provide a class to fake loading a header file.
INCLUDE_IO_INJECTION_KEY = 'include_header_io'
@@ -192,6 +194,34 @@ def iteratively_replace_matches_with_char(pattern, char_replacement, s):
s = s[:start_match_index] + char_replacement * match_length + s[end_match_index:]
+def _convert_to_lower_with_underscores(text):
+ """Converts all text strings in camelCase or PascalCase to lowers with underscores."""
+
+ # First add underscores before any capital letter followed by a lower case letter
+ # as long as it is in a word.
+ # (This put an underscore before Password but not P and A in WPAPassword).
+ text = sub(r'(?<=[A-Za-z0-9])([A-Z])(?=[a-z])', r'_\1', text)
+
+ # Next add underscores before capitals at the end of words if it was
+ # preceeded by lower case letter or number.
+ # (This puts an underscore before A in isA but not A in CBA).
+ text = sub(r'(?<=[a-z0-9])([A-Z])(?=\b)', r'_\1', text)
+
+ # Next add underscores when you have a captial letter which is followed by a capital letter
+ # but is not proceeded by one. (This puts an underscore before A in 'WordADay').
+ text = sub(r'(?<=[a-z0-9])([A-Z][A-Z_])', r'_\1', text)
+
+ return text.lower()
+
+
+
+def _create_acronym(text):
+ """Creates an acronym for the given text."""
+ # Removes all lower case letters except those starting words.
+ text = sub(r'(?<!\b)[a-z]', '', text)
+ return text.upper()
+
+
def up_to_unmatched_closing_paren(s):
"""Splits a string into two parts up to first unmatched ')'.
@@ -308,6 +338,138 @@ class _IncludeState(dict):
return error_message
+class Position(object):
+ """Holds the position of something."""
+ def __init__(self, row, column):
+ self.row = row
+ self.column = column
+
+
+class Parameter(object):
+ """Information about one function parameter."""
+ def __init__(self, parameter, parameter_name_index, row):
+ self.type = parameter[:parameter_name_index].strip()
+ # Remove any initializers from the parameter name (e.g. int i = 5).
+ self.name = sub(r'=.*', '', parameter[parameter_name_index:]).strip()
+ self.row = row
+
+ @memoized
+ def lower_with_underscores_name(self):
+ """Returns the parameter name in the lower with underscores format."""
+ return _convert_to_lower_with_underscores(self.name)
+
+
+class SingleLineView(object):
+ """Converts multiple lines into a single line (with line breaks replaced by a
+ space) to allow for easier searching."""
+ def __init__(self, lines, start_position, end_position):
+ """Create a SingleLineView instance.
+
+ Args:
+ lines: a list of multiple lines to combine into a single line.
+ start_position: offset within lines of where to start the single line.
+ end_position: just after where to end (like a slice operation).
+ """
+ # Get the rows of interest.
+ trimmed_lines = lines[start_position.row:end_position.row + 1]
+
+ # Remove the columns on the last line that aren't included.
+ trimmed_lines[-1] = trimmed_lines[-1][:end_position.column]
+
+ # Remove the columns on the first line that aren't included.
+ trimmed_lines[0] = trimmed_lines[0][start_position.column:]
+
+ # Create a single line with all of the parameters.
+ self.single_line = ' '.join(trimmed_lines)
+
+ # Keep the row lengths, so we can calculate the original row number
+ # given a column in the single line (adding 1 due to the space added
+ # during the join).
+ self._row_lengths = [len(line) + 1 for line in trimmed_lines]
+ self._starting_row = start_position.row
+
+ def convert_column_to_row(self, single_line_column_number):
+ """Convert the column number from the single line into the original
+ line number.
+
+ Special cases:
+ * Columns in the added spaces are considered part of the previous line.
+ * Columns beyond the end of the line are consider part the last line
+ in the view."""
+ total_columns = 0
+ row_offset = 0
+ while row_offset < len(self._row_lengths) - 1 and single_line_column_number >= total_columns + self._row_lengths[row_offset]:
+ total_columns += self._row_lengths[row_offset]
+ row_offset += 1
+ return self._starting_row + row_offset
+
+
+def create_skeleton_parameters(all_parameters):
+ """Converts a parameter list to a skeleton version.
+
+ The skeleton only has one word for the parameter name, one word for the type,
+ and commas after each parameter and only there. Everything in the skeleton
+ remains in the same columns as the original."""
+ all_simplifications = (
+ # Remove template parameters, function declaration parameters, etc.
+ r'(<[^<>]*?>)|(\([^\(\)]*?\))|(\{[^\{\}]*?\})',
+ # Remove all initializers.
+ r'=[^,]*',
+ # Remove :: and everything before it.
+ r'[^,]*::',
+ # Remove modifiers like &, *.
+ r'[&*]',
+ # Remove const modifiers.
+ r'\bconst\s+(?=[A-Za-z])',
+ # Remove numerical modifiers like long.
+ r'\b(unsigned|long|short)\s+(?=unsigned|long|short|int|char|double|float)')
+
+ skeleton_parameters = all_parameters
+ for simplification in all_simplifications:
+ skeleton_parameters = iteratively_replace_matches_with_char(simplification, ' ', skeleton_parameters)
+ # If there are any parameters, then add a , after the last one to
+ # make a regular pattern of a , following every parameter.
+ if skeleton_parameters.strip():
+ skeleton_parameters += ','
+ return skeleton_parameters
+
+
+def find_parameter_name_index(skeleton_parameter):
+ """Determines where the parametere name starts given the skeleton parameter."""
+ # The first space from the right in the simplified parameter is where the parameter
+ # name starts unless the first space is before any content in the simplified parameter.
+ before_name_index = skeleton_parameter.rstrip().rfind(' ')
+ if before_name_index != -1 and skeleton_parameter[:before_name_index].strip():
+ return before_name_index + 1
+ return len(skeleton_parameter)
+
+
+def parameter_list(elided_lines, start_position, end_position):
+ """Generator for a function's parameters."""
+ # Create new positions that omit the outer parenthesis of the parameters.
+ start_position = Position(row=start_position.row, column=start_position.column + 1)
+ end_position = Position(row=end_position.row, column=end_position.column - 1)
+ single_line_view = SingleLineView(elided_lines, start_position, end_position)
+ skeleton_parameters = create_skeleton_parameters(single_line_view.single_line)
+ end_index = -1
+
+ while True:
+ # Find the end of the next parameter.
+ start_index = end_index + 1
+ end_index = skeleton_parameters.find(',', start_index)
+
+ # No comma means that all parameters have been parsed.
+ if end_index == -1:
+ return
+ row = single_line_view.convert_column_to_row(end_index)
+
+ # Parse the parameter into a type and parameter name.
+ skeleton_parameter = skeleton_parameters[start_index:end_index]
+ name_offset = find_parameter_name_index(skeleton_parameter)
+ parameter = single_line_view.single_line[start_index:end_index]
+ yield Parameter(parameter, name_offset, row)
+
+
class _FunctionState(object):
"""Tracks current function name and the number of lines in its body.
@@ -329,7 +491,8 @@ class _FunctionState(object):
self.body_start_line_number = -1000
self.ending_line_number = -1000
- def begin(self, function_name, body_start_line_number, ending_line_number, is_declaration):
+ def begin(self, function_name, body_start_line_number, ending_line_number, is_declaration,
+ parameter_start_position, parameter_end_position, clean_lines):
"""Start analyzing function body.
Args:
@@ -337,6 +500,9 @@ class _FunctionState(object):
body_start_line_number: The line number of the { or the ; for a protoype.
ending_line_number: The line number where the function ends.
is_declaration: True if this is a prototype.
+ parameter_start_position: position in elided of the '(' for the parameters.
+ parameter_end_position: position in elided of the ')' for the parameters.
+ clean_lines: A CleansedLines instance containing the file.
"""
self.in_a_function = True
self.lines_in_function = -1 # Don't count the open brace line.
@@ -344,6 +510,17 @@ class _FunctionState(object):
self.body_start_line_number = body_start_line_number
self.ending_line_number = ending_line_number
self.is_declaration = is_declaration
+ self.parameter_start_position = parameter_start_position
+ self.parameter_end_position = parameter_end_position
+ self._clean_lines = clean_lines
+ self._parameter_list = None
+
+ def parameter_list(self):
+ if not self._parameter_list:
+ # Store the final result as a tuple since that is immutable.
+ self._parameter_list = tuple(parameter_list(self._clean_lines.elided, self.parameter_start_position, self.parameter_end_position))
+
+ return self._parameter_list
def count(self, line_number):
"""Count line in current function body."""
@@ -1161,7 +1338,7 @@ def check_spacing_for_function_call(line, line_number, error):
error(line_number, 'whitespace/parens', 2,
'Extra space after (')
if (search(r'\w\s+\(', function_call)
- and not search(r'#\s*define|typedef', function_call)):
+ and not match(r'\s*(#|typedef)', function_call)):
error(line_number, 'whitespace/parens', 4,
'Extra space before ( in function call')
# If the ) is followed only by a newline or a { + newline, assume it's
@@ -1213,7 +1390,11 @@ def detect_functions(clean_lines, line_number, function_state, error):
raw = clean_lines.raw_lines
raw_line = raw[line_number]
- regexp = r'\s*(\w(\w|::|\*|\&|\s|<|>|,|~)*)\(' # decls * & space::name( ...
+ # Lines ending with a \ indicate a macro. Don't try to check them.
+ if raw_line.endswith('\\'):
+ return
+
+ regexp = r'\s*(\w(\w|::|\*|\&|\s|<|>|,|~|(operator\s*(/|-|=|!|\+)+))*)\(' # decls * & space::name( ...
match_result = match(regexp, line)
if not match_result:
return
@@ -1232,7 +1413,7 @@ def detect_functions(clean_lines, line_number, function_state, error):
# Replace template constructs with _ so that no spaces remain in the function name,
# while keeping the column numbers of other characters the same as "line".
line_with_no_templates = iteratively_replace_matches_with_char(r'<[^<>]*>', '_', line)
- match_function = search(r'((\w|:|<|>|,|~)*)\(', line_with_no_templates)
+ match_function = search(r'((\w|:|<|>|,|~|(operator\s*(/|-|=|!|\+)+))*)\(', line_with_no_templates)
if not match_function:
return # The '(' must have been inside of a template.
@@ -1246,13 +1427,22 @@ def detect_functions(clean_lines, line_number, function_state, error):
function += parameter_regexp.group(1)
else:
function += '()'
+
+ parameter_start_position = Position(line_number, match_function.end(1))
+ close_result = close_expression(clean_lines, line_number, parameter_start_position.column)
+ if close_result[1] == len(clean_lines.elided):
+ # No end was found.
+ return
+ parameter_end_position = Position(close_result[1], close_result[2])
+
is_declaration = bool(search(r'^[^{]*;', start_line))
if is_declaration:
ending_line_number = start_line_number
else:
open_brace_index = start_line.find('{')
ending_line_number = close_expression(clean_lines, start_line_number, open_brace_index)[1]
- function_state.begin(function, start_line_number, ending_line_number, is_declaration)
+ function_state.begin(function, start_line_number, ending_line_number, is_declaration,
+ parameter_start_position, parameter_end_position, clean_lines)
return
# No body for the function (or evidence of a non-function) was found.
@@ -1288,6 +1478,64 @@ def check_for_function_lengths(clean_lines, line_number, function_state, error):
function_state.count(line_number) # Count non-blank/non-comment lines.
+def _check_parameter_name_against_text(parameter, text, error):
+ """Checks to see if the parameter name is contained within the text.
+
+ Return false if the check failed (i.e. an error was produced).
+ """
+
+ # Treat 'lower with underscores' as a canonical form because it is
+ # case insensitive while still retaining word breaks. (This ensures that
+ # 'elate' doesn't look like it is duplicating of 'NateLate'.)
+ canonical_parameter_name = parameter.lower_with_underscores_name()
+
+ # Appends "object" to all text to catch variables that did the same (but only
+ # do this when the parameter name is more than a single character to avoid
+ # flagging 'b' which may be an ok variable when used in an rgba function).
+ if len(canonical_parameter_name) > 1:
+ text = sub(r'(\w)\b', r'\1Object', text)
+ canonical_text = _convert_to_lower_with_underscores(text)
+
+ # Used to detect cases like ec for ExceptionCode.
+ acronym = _create_acronym(text).lower()
+ if canonical_text.find(canonical_parameter_name) != -1 or acronym.find(canonical_parameter_name) != -1:
+ error(parameter.row, 'readability/parameter_name', 5,
+ 'The parameter name "%s" adds no information, so it should be removed.' % parameter.name)
+ return False
+ return True
+
+
+def check_function_definition(clean_lines, line_number, function_state, error):
+ """Check that function definitions for style issues.
+
+ Specifically, check that parameter names in declarations add information.
+
+ Args:
+ clean_lines: A CleansedLines instance containing the file.
+ line_number: The number of the line to check.
+ function_state: Current function name and lines in body so far.
+ error: The function to call with any errors found.
+ """
+ # Only do checks when we have a function declaration.
+ if line_number != function_state.body_start_line_number or not function_state.is_declaration:
+ return
+
+ parameter_list = function_state.parameter_list()
+ for parameter in parameter_list:
+ if not parameter.name:
+ continue
+
+ # Check the parameter name against the function name for single parameter set functions.
+ if len(parameter_list) == 1 and match('set[A-Z]', function_state.current_function):
+ trimmed_function_name = function_state.current_function[len('set'):]
+ if not _check_parameter_name_against_text(parameter, trimmed_function_name, error):
+ continue # Since an error was noted for this name, move to the next parameter.
+
+ # Check the parameter name against the type.
+ if not _check_parameter_name_against_text(parameter, parameter.type, error):
+ continue # Since an error was noted for this name, move to the next parameter.
+
+
def check_pass_ptr_usage(clean_lines, line_number, function_state, error):
"""Check for proper usage of Pass*Ptr.
@@ -2028,6 +2276,10 @@ def check_for_null(clean_lines, line_number, file_state, error):
if search(r'\bgdk_pixbuf_save_to\w+\b', line):
return
+ # Don't warn about NULL usage in gtk_widget_style_get(). See Bug 51758.
+ if search(r'\bgtk_widget_style_get\(\w+\b', line):
+ return
+
if search(r'\bNULL\b', line):
error(line_number, 'readability/null', 5, 'Use 0 instead of NULL.')
return
@@ -3001,6 +3253,7 @@ def process_line(filename, file_extension,
check_for_function_lengths(clean_lines, line, function_state, error)
if search(r'\bNOLINT\b', raw_lines[line]): # ignore nolint lines
return
+ check_function_definition(clean_lines, line, function_state, error)
check_pass_ptr_usage(clean_lines, line, function_state, error)
check_for_multiline_comments_and_strings(clean_lines, line, error)
check_style(clean_lines, line, file_extension, class_state, file_state, error)
@@ -3084,6 +3337,7 @@ class CppChecker(object):
'readability/function',
'readability/multiline_comment',
'readability/multiline_string',
+ 'readability/parameter_name',
'readability/naming',
'readability/null',
'readability/pass_ptr',
diff --git a/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py b/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
index 70df1ea..d39d2ba 100644
--- a/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
+++ b/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8; -*-
#
-# Copyright (C) 2009 Google Inc. All rights reserved.
+# Copyright (C) 2009, 2010 Google Inc. All rights reserved.
# Copyright (C) 2009 Torch Mobile Inc.
# Copyright (C) 2009 Apple Inc. All rights reserved.
# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
@@ -109,6 +109,19 @@ class CppFunctionsTest(unittest.TestCase):
"""Supports testing functions that do not need CppStyleTestBase."""
+ def test_convert_to_lower_with_underscores(self):
+ self.assertEquals(cpp_style._convert_to_lower_with_underscores('ABC'), 'abc')
+ self.assertEquals(cpp_style._convert_to_lower_with_underscores('aB'), 'a_b')
+ self.assertEquals(cpp_style._convert_to_lower_with_underscores('isAName'), 'is_a_name')
+ self.assertEquals(cpp_style._convert_to_lower_with_underscores('AnotherTest'), 'another_test')
+ self.assertEquals(cpp_style._convert_to_lower_with_underscores('PassRefPtr<MyClass>'), 'pass_ref_ptr<my_class>')
+ self.assertEquals(cpp_style._convert_to_lower_with_underscores('_ABC'), '_abc')
+
+ def test_create_acronym(self):
+ self.assertEquals(cpp_style._create_acronym('ABC'), 'ABC')
+ self.assertEquals(cpp_style._create_acronym('IsAName'), 'IAN')
+ self.assertEquals(cpp_style._create_acronym('PassRefPtr<MyClass>'), 'PRP<MC>')
+
def test_is_c_or_objective_c(self):
clean_lines = cpp_style.CleansedLines([''])
clean_objc_lines = cpp_style.CleansedLines(['#import "header.h"'])
@@ -119,6 +132,99 @@ class CppFunctionsTest(unittest.TestCase):
self.assertFalse(cpp_style._FileState(clean_lines, 'h').is_c_or_objective_c())
self.assertTrue(cpp_style._FileState(clean_objc_lines, 'h').is_c_or_objective_c())
+ def test_parameter(self):
+ # Test type.
+ parameter = cpp_style.Parameter('ExceptionCode', 13, 1)
+ self.assertEquals(parameter.type, 'ExceptionCode')
+ self.assertEquals(parameter.name, '')
+ self.assertEquals(parameter.row, 1)
+
+ # Test type and name.
+ parameter = cpp_style.Parameter('PassRefPtr<MyClass> parent', 19, 1)
+ self.assertEquals(parameter.type, 'PassRefPtr<MyClass>')
+ self.assertEquals(parameter.name, 'parent')
+ self.assertEquals(parameter.row, 1)
+
+ # Test type, no name, with default value.
+ parameter = cpp_style.Parameter('MyClass = 0', 7, 0)
+ self.assertEquals(parameter.type, 'MyClass')
+ self.assertEquals(parameter.name, '')
+ self.assertEquals(parameter.row, 0)
+
+ # Test type, name, and default value.
+ parameter = cpp_style.Parameter('MyClass a = 0', 7, 0)
+ self.assertEquals(parameter.type, 'MyClass')
+ self.assertEquals(parameter.name, 'a')
+ self.assertEquals(parameter.row, 0)
+
+ def test_single_line_view(self):
+ start_position = cpp_style.Position(row=1, column=1)
+ end_position = cpp_style.Position(row=3, column=1)
+ single_line_view = cpp_style.SingleLineView(['0', 'abcde', 'fgh', 'i'], start_position, end_position)
+ self.assertEquals(single_line_view.single_line, 'bcde fgh i')
+ self.assertEquals(single_line_view.convert_column_to_row(0), 1)
+ self.assertEquals(single_line_view.convert_column_to_row(4), 1)
+ self.assertEquals(single_line_view.convert_column_to_row(5), 2)
+ self.assertEquals(single_line_view.convert_column_to_row(8), 2)
+ self.assertEquals(single_line_view.convert_column_to_row(9), 3)
+ self.assertEquals(single_line_view.convert_column_to_row(100), 3)
+
+ start_position = cpp_style.Position(row=0, column=3)
+ end_position = cpp_style.Position(row=0, column=4)
+ single_line_view = cpp_style.SingleLineView(['abcdef'], start_position, end_position)
+ self.assertEquals(single_line_view.single_line, 'd')
+
+ def test_create_skeleton_parameters(self):
+ self.assertEquals(cpp_style.create_skeleton_parameters(''), '')
+ self.assertEquals(cpp_style.create_skeleton_parameters(' '), ' ')
+ self.assertEquals(cpp_style.create_skeleton_parameters('long'), 'long,')
+ self.assertEquals(cpp_style.create_skeleton_parameters('const unsigned long int'), ' int,')
+ self.assertEquals(cpp_style.create_skeleton_parameters('long int*'), ' int ,')
+ self.assertEquals(cpp_style.create_skeleton_parameters('PassRefPtr<Foo> a'), 'PassRefPtr a,')
+ self.assertEquals(cpp_style.create_skeleton_parameters(
+ 'ComplexTemplate<NestedTemplate1<MyClass1, MyClass2>, NestedTemplate1<MyClass1, MyClass2> > param, int second'),
+ 'ComplexTemplate param, int second,')
+ self.assertEquals(cpp_style.create_skeleton_parameters('int = 0, Namespace::Type& a'), 'int , Type a,')
+ # Create skeleton parameters is a bit too aggressive with function variables, but
+ # it allows for parsing other parameters and declarations like this are rare.
+ self.assertEquals(cpp_style.create_skeleton_parameters('void (*fn)(int a, int b), Namespace::Type& a'),
+ 'void , Type a,')
+
+ # This doesn't look like functions declarations but the simplifications help to eliminate false positives.
+ self.assertEquals(cpp_style.create_skeleton_parameters('b{d}'), 'b ,')
+
+ def test_find_parameter_name_index(self):
+ self.assertEquals(cpp_style.find_parameter_name_index(' int a '), 5)
+ self.assertEquals(cpp_style.find_parameter_name_index(' PassRefPtr '), 16)
+ self.assertEquals(cpp_style.find_parameter_name_index('double'), 6)
+
+ def test_parameter_list(self):
+ elided_lines = ['int blah(PassRefPtr<MyClass> paramName,',
+ 'const Other1Class& foo,',
+ 'const ComplexTemplate<Class1, NestedTemplate<P1, P2> >* const * param = new ComplexTemplate<Class1, NestedTemplate<P1, P2> >(34, 42),',
+ 'int* myCount = 0);']
+ start_position = cpp_style.Position(row=0, column=8)
+ end_position = cpp_style.Position(row=3, column=16)
+
+ expected_parameters = ({'type': 'PassRefPtr<MyClass>', 'name': 'paramName', 'row': 0},
+ {'type': 'const Other1Class&', 'name': 'foo', 'row': 1},
+ {'type': 'const ComplexTemplate<Class1, NestedTemplate<P1, P2> >* const *', 'name': 'param', 'row': 2},
+ {'type': 'int*', 'name': 'myCount', 'row': 3})
+ index = 0
+ for parameter in cpp_style.parameter_list(elided_lines, start_position, end_position):
+ expected_parameter = expected_parameters[index]
+ self.assertEquals(parameter.type, expected_parameter['type'])
+ self.assertEquals(parameter.name, expected_parameter['name'])
+ self.assertEquals(parameter.row, expected_parameter['row'])
+ index += 1
+ self.assertEquals(index, len(expected_parameters))
+
+ def test_check_parameter_against_text(self):
+ error_collector = ErrorCollector(self.assert_)
+ parameter = cpp_style.Parameter('FooF ooF', 4, 1)
+ self.assertFalse(cpp_style._check_parameter_name_against_text(parameter, 'FooF', error_collector))
+ self.assertEquals(error_collector.results(),
+ 'The parameter name "ooF" adds no information, so it should be removed. [readability/parameter_name] [5]')
class CppStyleTestBase(unittest.TestCase):
"""Provides some useful helper functions for cpp_style tests.
@@ -152,6 +258,7 @@ class CppStyleTestBase(unittest.TestCase):
basic_error_rules = ('-build/header_guard',
'-legal/copyright',
'-readability/fn_size',
+ '-readability/parameter_name',
'-whitespace/ending_newline')
return self.perform_lint(code, filename, basic_error_rules)
@@ -159,7 +266,7 @@ class CppStyleTestBase(unittest.TestCase):
def perform_multi_line_lint(self, code, file_extension):
basic_error_rules = ('-build/header_guard',
'-legal/copyright',
- '-multi_line_filter',
+ '-readability/parameter_name',
'-whitespace/ending_newline')
return self.perform_lint(code, 'test.' + file_extension, basic_error_rules)
@@ -250,6 +357,16 @@ class FunctionDetectionTest(CppStyleTestBase):
self.assertEquals(function_state.body_start_line_number, function_information['body_start_line_number'])
self.assertEquals(function_state.ending_line_number, function_information['ending_line_number'])
self.assertEquals(function_state.is_declaration, function_information['is_declaration'])
+ expected_parameters = function_information.get('parameter_list')
+ if expected_parameters:
+ actual_parameters = function_state.parameter_list()
+ self.assertEquals(len(actual_parameters), len(expected_parameters))
+ for index in range(len(expected_parameters)):
+ actual_parameter = actual_parameters[index]
+ expected_parameter = expected_parameters[index]
+ self.assertEquals(actual_parameter.type, expected_parameter['type'])
+ self.assertEquals(actual_parameter.name, expected_parameter['name'])
+ self.assertEquals(actual_parameter.row, expected_parameter['row'])
def test_basic_function_detection(self):
self.perform_function_detection(
@@ -268,6 +385,37 @@ class FunctionDetectionTest(CppStyleTestBase):
'ending_line_number': 0,
'is_declaration': True})
+ self.perform_function_detection(
+ ['CheckedInt<T> operator /(const CheckedInt<T> &lhs, const CheckedInt<T> &rhs);'],
+ {'name': 'operator /',
+ 'body_start_line_number': 0,
+ 'ending_line_number': 0,
+ 'is_declaration': True})
+
+ self.perform_function_detection(
+ ['CheckedInt<T> operator -(const CheckedInt<T> &lhs, const CheckedInt<T> &rhs);'],
+ {'name': 'operator -',
+ 'body_start_line_number': 0,
+ 'ending_line_number': 0,
+ 'is_declaration': True})
+
+ self.perform_function_detection(
+ ['CheckedInt<T> operator !=(const CheckedInt<T> &lhs, const CheckedInt<T> &rhs);'],
+ {'name': 'operator !=',
+ 'body_start_line_number': 0,
+ 'ending_line_number': 0,
+ 'is_declaration': True})
+
+ self.perform_function_detection(
+ ['CheckedInt<T> operator +(const CheckedInt<T> &lhs, const CheckedInt<T> &rhs);'],
+ {'name': 'operator +',
+ 'body_start_line_number': 0,
+ 'ending_line_number': 0,
+ 'is_declaration': True})
+
+ def test_ignore_macros(self):
+ self.perform_function_detection(['void aFunctionName(int); \\'], None)
+
def test_non_functions(self):
# This case exposed an error because the open brace was in quotes.
self.perform_function_detection(
@@ -284,6 +432,70 @@ class FunctionDetectionTest(CppStyleTestBase):
# Simple test case with something that is not a function.
self.perform_function_detection(['class Stuff;'], None)
+ def test_parameter_list(self):
+ # A function with no arguments.
+ function_state = self.perform_function_detection(
+ ['void functionName();'],
+ {'name': 'functionName',
+ 'body_start_line_number': 0,
+ 'ending_line_number': 0,
+ 'is_declaration': True,
+ 'parameter_list': ()})
+
+ # A function with one argument.
+ function_state = self.perform_function_detection(
+ ['void functionName(int);'],
+ {'name': 'functionName',
+ 'body_start_line_number': 0,
+ 'ending_line_number': 0,
+ 'is_declaration': True,
+ 'parameter_list':
+ ({'type': 'int', 'name': '', 'row': 0},)})
+
+ # A function with unsigned and short arguments
+ function_state = self.perform_function_detection(
+ ['void functionName(unsigned a, short b, long c, long long short unsigned int);'],
+ {'name': 'functionName',
+ 'body_start_line_number': 0,
+ 'ending_line_number': 0,
+ 'is_declaration': True,
+ 'parameter_list':
+ ({'type': 'unsigned', 'name': 'a', 'row': 0},
+ {'type': 'short', 'name': 'b', 'row': 0},
+ {'type': 'long', 'name': 'c', 'row': 0},
+ {'type': 'long long short unsigned int', 'name': '', 'row': 0})})
+
+ # Some parameter type with modifiers and no parameter names.
+ function_state = self.perform_function_detection(
+ ['virtual void determineARIADropEffects(Vector<String>*&, const unsigned long int*&, const MediaPlayer::Preload, Other<Other2, Other3<P1, P2> >, int);'],
+ {'name': 'determineARIADropEffects',
+ 'body_start_line_number': 0,
+ 'ending_line_number': 0,
+ 'is_declaration': True,
+ 'parameter_list':
+ ({'type': 'Vector<String>*&', 'name': '', 'row': 0},
+ {'type': 'const unsigned long int*&', 'name': '', 'row': 0},
+ {'type': 'const MediaPlayer::Preload', 'name': '', 'row': 0},
+ {'type': 'Other<Other2, Other3<P1, P2> >', 'name': '', 'row': 0},
+ {'type': 'int', 'name': '', 'row': 0})})
+
+ # Try parsing a function with a very complex definition.
+ function_state = self.perform_function_detection(
+ ['AnotherTemplate<Class1, Class2> aFunctionName(PassRefPtr<MyClass> paramName,',
+ 'const Other1Class& foo,',
+ 'const ComplexTemplate<Class1, NestedTemplate<P1, P2> >* const * param = new ComplexTemplate<Class1, NestedTemplate<P1, P2> >(34, 42),',
+ 'int* myCount = 0);'],
+ {'name': 'aFunctionName',
+ 'body_start_line_number': 3,
+ 'ending_line_number': 3,
+ 'is_declaration': True,
+ 'parameter_list':
+ ({'type': 'PassRefPtr<MyClass>', 'name': 'paramName', 'row': 0},
+ {'type': 'const Other1Class&', 'name': 'foo', 'row': 1},
+ {'type': 'const ComplexTemplate<Class1, NestedTemplate<P1, P2> >* const *', 'name': 'param', 'row': 2},
+ {'type': 'int*', 'name': 'myCount', 'row': 3})})
+
+
class CppStyleTest(CppStyleTestBase):
# Test get line width.
@@ -1223,6 +1435,8 @@ class CppStyleTest(CppStyleTestBase):
self.assert_lint('((a+b))', '')
self.assert_lint('foo (foo)', 'Extra space before ( in function call'
' [whitespace/parens] [4]')
+ self.assert_lint('#elif (foo(bar))', '')
+ self.assert_lint('#elif (foo(bar) && foo(baz))', '')
self.assert_lint('typedef foo (*foo)(foo)', '')
self.assert_lint('typedef foo (*foo12bar_)(foo)', '')
self.assert_lint('typedef foo (Foo::*bar)(foo)', '')
@@ -1797,7 +2011,7 @@ class CppStyleTest(CppStyleTestBase):
# Allow the WTF_ prefix for files in that directory.
header_guard_filter = FilterConfiguration(('-', '+build/header_guard'))
error_collector = ErrorCollector(self.assert_, header_guard_filter)
- self.process_file_data('JavaScriptCore/wtf/TestName.h', 'h',
+ self.process_file_data('Source/JavaScriptCore/wtf/TestName.h', 'h',
['#ifndef WTF_TestName_h', '#define WTF_TestName_h'],
error_collector)
self.assertEquals(0, len(error_collector.result_list()),
@@ -1805,7 +2019,7 @@ class CppStyleTest(CppStyleTestBase):
# Also allow the non WTF_ prefix for files in that directory.
error_collector = ErrorCollector(self.assert_, header_guard_filter)
- self.process_file_data('JavaScriptCore/wtf/TestName.h', 'h',
+ self.process_file_data('Source/JavaScriptCore/wtf/TestName.h', 'h',
['#ifndef TestName_h', '#define TestName_h'],
error_collector)
self.assertEquals(0, len(error_collector.result_list()),
@@ -1813,7 +2027,7 @@ class CppStyleTest(CppStyleTestBase):
# Verify that we suggest the WTF prefix version.
error_collector = ErrorCollector(self.assert_, header_guard_filter)
- self.process_file_data('JavaScriptCore/wtf/TestName.h', 'h',
+ self.process_file_data('Source/JavaScriptCore/wtf/TestName.h', 'h',
['#ifndef BAD_TestName_h', '#define BAD_TestName_h'],
error_collector)
self.assertEquals(
@@ -2549,14 +2763,12 @@ class CheckForFunctionLengthsTest(CppStyleTestBase):
error_level = 1
error_lines = self.trigger_test_lines(error_level) + 1
trigger_level = self.trigger_test_lines(self.min_confidence)
+ # Since the function name isn't valid, the function detection algorithm
+ # will skip it, so no error is produced.
self.assert_function_lengths_check(
('TEST_F('
+ self.function_body(error_lines)),
- ('Small and focused functions are preferred: '
- 'TEST_F has %d non-comment lines '
- '(error triggered by exceeding %d lines).'
- ' [readability/fn_size] [%d]')
- % (error_lines, trigger_level, error_level))
+ '')
def test_function_length_check_definition_severity1_with_embedded_no_lints(self):
error_level = 1
@@ -3648,6 +3860,17 @@ class WebKitStyleTest(CppStyleTestBase):
self.assert_lint(
'gchar* result = gdk_pixbuf_save_to_stream(pixbuf, function, data, type, error, NULL);',
'')
+ self.assert_lint(
+ 'gtk_widget_style_get(style, "propertyName", &value, "otherName", &otherValue, NULL);',
+ '')
+ self.assert_lint(
+ 'gtk_widget_style_get_property(style, NULL, NULL);',
+ 'Use 0 instead of NULL. [readability/null] [5]',
+ 'foo.cpp')
+ self.assert_lint(
+ 'gtk_widget_style_get_valist(style, NULL, NULL);',
+ 'Use 0 instead of NULL. [readability/null] [5]',
+ 'foo.cpp')
# 2. C++ and C bool values should be written as true and
# false. Objective-C BOOL values should be written as YES and NO.
@@ -3867,8 +4090,8 @@ class WebKitStyleTest(CppStyleTestBase):
'variable_2' + name_underscore_error_message])
# There is an exception for op code functions but only in the JavaScriptCore directory.
- self.assert_lint('void this_op_code(int var1, int var2)', '', 'JavaScriptCore/foo.cpp')
- self.assert_lint('void op_code(int var1, int var2)', '', 'JavaScriptCore/foo.cpp')
+ self.assert_lint('void this_op_code(int var1, int var2)', '', 'Source/JavaScriptCore/foo.cpp')
+ self.assert_lint('void op_code(int var1, int var2)', '', 'Source/JavaScriptCore/foo.cpp')
self.assert_lint('void this_op_code(int var1, int var2)', 'this_op_code' + name_underscore_error_message)
# GObject requires certain magical names in class declarations.
@@ -3908,6 +4131,55 @@ class WebKitStyleTest(CppStyleTestBase):
self.assert_lint('OwnPtr<uint32_t> under_score(new uint32_t);',
'under_score' + name_underscore_error_message)
+ def test_parameter_names(self):
+ # Leave meaningless variable names out of function declarations.
+ meaningless_variable_name_error_message = 'The parameter name "%s" adds no information, so it should be removed. [readability/parameter_name] [5]'
+
+ parameter_error_rules = ('-',
+ '+readability/parameter_name')
+ # No variable name, so no error.
+ self.assertEquals('',
+ self.perform_lint('void func(int);', 'test.cpp', parameter_error_rules))
+
+ # Verify that copying the name of the set function causes the error (with some odd casing).
+ self.assertEquals(meaningless_variable_name_error_message % 'itemCount',
+ self.perform_lint('void setItemCount(size_t itemCount);', 'test.cpp', parameter_error_rules))
+ self.assertEquals(meaningless_variable_name_error_message % 'abcCount',
+ self.perform_lint('void setABCCount(size_t abcCount);', 'test.cpp', parameter_error_rules))
+
+ # Verify that copying a type name will trigger the warning (even if the type is a template parameter).
+ self.assertEquals(meaningless_variable_name_error_message % 'context',
+ self.perform_lint('void funct(PassRefPtr<ScriptExecutionContext> context);', 'test.cpp', parameter_error_rules))
+
+ # Verify that acronyms as variable names trigger the error (for both set functions and type names).
+ self.assertEquals(meaningless_variable_name_error_message % 'ec',
+ self.perform_lint('void setExceptionCode(int ec);', 'test.cpp', parameter_error_rules))
+ self.assertEquals(meaningless_variable_name_error_message % 'ec',
+ self.perform_lint('void funct(ExceptionCode ec);', 'test.cpp', parameter_error_rules))
+
+ # 'object' alone, appended, or as part of an acronym is meaningless.
+ self.assertEquals(meaningless_variable_name_error_message % 'object',
+ self.perform_lint('void funct(RenderView object);', 'test.cpp', parameter_error_rules))
+ self.assertEquals(meaningless_variable_name_error_message % 'viewObject',
+ self.perform_lint('void funct(RenderView viewObject);', 'test.cpp', parameter_error_rules))
+ self.assertEquals(meaningless_variable_name_error_message % 'rvo',
+ self.perform_lint('void funct(RenderView rvo);', 'test.cpp', parameter_error_rules))
+
+ # Check that r, g, b, and a are allowed.
+ self.assertEquals('',
+ self.perform_lint('void setRGBAValues(int r, int g, int b, int a);', 'test.cpp', parameter_error_rules))
+
+ # Verify that a simple substring match isn't done which would cause false positives.
+ self.assertEquals('',
+ self.perform_lint('void setNateLateCount(size_t elate);', 'test.cpp', parameter_error_rules))
+ self.assertEquals('',
+ self.perform_lint('void funct(NateLate elate);', 'test.cpp', parameter_error_rules))
+
+ # Don't have generate warnings for functions (only declarations).
+ self.assertEquals('',
+ self.perform_lint('void funct(PassRefPtr<ScriptExecutionContext> context)\n'
+ '{\n'
+ '}\n', 'test.cpp', parameter_error_rules))
def test_comments(self):
# A comment at the beginning of a line is ok.
diff --git a/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py b/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py
index 1d82ea8..4bdc79b 100644
--- a/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py
+++ b/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py
@@ -149,11 +149,11 @@ class CommitQueueTask(object):
"Able to pass tests without patch",
"Unable to pass tests without patch (tree is red?)")
- def _failing_tests_from_last_run(self):
+ def _failing_results_from_last_run(self):
results = self._delegate.layout_test_results()
if not results:
- return None
- return results.failing_tests()
+ return [] # Makes callers slighty cleaner to not have to deal with None
+ return results.failing_test_results()
def _land(self):
# Unclear if this should pass --quiet or not. If --parent-command always does the reporting, then it should.
@@ -168,8 +168,8 @@ class CommitQueueTask(object):
"Landed patch",
"Unable to land patch")
- def _report_flaky_tests(self, flaky_tests):
- self._delegate.report_flaky_tests(self._patch, flaky_tests)
+ def _report_flaky_tests(self, flaky_test_results):
+ self._delegate.report_flaky_tests(self._patch, flaky_test_results)
def _test_patch(self):
if self._patch.is_rollout():
@@ -177,12 +177,14 @@ class CommitQueueTask(object):
if self._test():
return True
- first_failing_tests = self._failing_tests_from_last_run()
+ first_failing_results = self._failing_results_from_last_run()
+ first_failing_tests = [result.filename for result in first_failing_results]
if self._test():
- self._report_flaky_tests(first_failing_tests)
+ self._report_flaky_tests(first_failing_results)
return True
- second_failing_tests = self._failing_tests_from_last_run()
+ second_failing_results = self._failing_results_from_last_run()
+ second_failing_tests = [result.filename for result in second_failing_results]
if first_failing_tests != second_failing_tests:
# We could report flaky tests here, but since run-webkit-tests
# is run with --exit-after-N-failures=1, we would need to
@@ -192,9 +194,14 @@ class CommitQueueTask(object):
return False
if self._build_and_test_without_patch():
- raise self._script_error # The error from the previous ._test() run is real, report it.
+ return self.report_failure() # The error from the previous ._test() run is real, report it.
return False # Tree must be red, just retry later.
+ def report_failure(self):
+ if not self._validate():
+ return False
+ raise self._script_error
+
def run(self):
if not self._validate():
return False
@@ -203,11 +210,11 @@ class CommitQueueTask(object):
if not self._update():
return False
if not self._apply():
- raise self._script_error
+ return self.report_failure()
if not self._build():
if not self._build_without_patch():
return False
- raise self._script_error
+ return self.report_failure()
if not self._test_patch():
return False
# Make sure the patch is still valid before landing (e.g., make sure
@@ -216,5 +223,5 @@ class CommitQueueTask(object):
return False
# FIXME: We should understand why the land failure occured and retry if possible.
if not self._land():
- raise self._script_error
+ return self.report_failure()
return True
diff --git a/Tools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py b/Tools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py
index 376f407..f279cac 100644
--- a/Tools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py
@@ -31,6 +31,8 @@ import unittest
from webkitpy.common.system.deprecated_logging import error, log
from webkitpy.common.system.outputcapture import OutputCapture
+from webkitpy.layout_tests.layout_package import test_results
+from webkitpy.layout_tests.layout_package import test_failures
from webkitpy.thirdparty.mock import Mock
from webkitpy.tool.bot.commitqueuetask import *
from webkitpy.tool.mocktool import MockTool
@@ -62,11 +64,15 @@ class MockCommitQueue(CommitQueueTaskDelegate):
def layout_test_results(self):
return None
- def report_flaky_tests(self, patch, flaky_tests):
+ def report_flaky_tests(self, patch, flaky_results):
+ flaky_tests = [result.filename for result in flaky_results]
log("report_flaky_tests: patch='%s' flaky_tests='%s'" % (patch.id(), flaky_tests))
class CommitQueueTaskTest(unittest.TestCase):
+ def _mock_test_result(self, testname):
+ return test_results.TestResult(testname, [test_failures.FailureTextMismatch()])
+
def _run_through_task(self, commit_queue, expected_stderr, expected_exception=None, expect_retry=False):
tool = MockTool(log_executive=True)
patch = tool.bugs.fetch_attachment(197)
@@ -189,7 +195,7 @@ run_webkit_patch: ['build-and-test', '--no-clean', '--no-update', '--test', '--n
command_failed: failure_message='Patch does not pass tests' script_error='MOCK tests failure' patch='197'
run_webkit_patch: ['build-and-test', '--no-clean', '--no-update', '--test', '--non-interactive']
command_passed: success_message='Passed tests' patch='197'
-report_flaky_tests: patch='197' flaky_tests='None'
+report_flaky_tests: patch='197' flaky_tests='[]'
run_webkit_patch: ['land-attachment', '--force-clean', '--ignore-builders', '--non-interactive', '--parent-command=commit-queue', 197]
command_passed: success_message='Landed patch' patch='197'
"""
@@ -227,13 +233,13 @@ command_failed: failure_message='Patch does not pass tests' script_error='MOCK t
task = CommitQueueTask(commit_queue, patch)
self._double_flaky_test_counter = 0
- def mock_failing_tests_from_last_run():
+ def mock_failing_results_from_last_run():
CommitQueueTaskTest._double_flaky_test_counter += 1
if CommitQueueTaskTest._double_flaky_test_counter % 2:
- return ['foo.html']
- return ['bar.html']
+ return [self._mock_test_result('foo.html')]
+ return [self._mock_test_result('bar.html')]
- task._failing_tests_from_last_run = mock_failing_tests_from_last_run
+ task._failing_results_from_last_run = mock_failing_results_from_last_run
success = OutputCapture().assert_outputs(self, task.run, expected_stderr=expected_stderr)
self.assertEqual(success, False)
diff --git a/Tools/Scripts/webkitpy/tool/bot/flakytestreporter.py b/Tools/Scripts/webkitpy/tool/bot/flakytestreporter.py
index 01cbf39..91fcb85 100644
--- a/Tools/Scripts/webkitpy/tool/bot/flakytestreporter.py
+++ b/Tools/Scripts/webkitpy/tool/bot/flakytestreporter.py
@@ -102,7 +102,9 @@ class FlakyTestReporter(object):
The bots will update this with information from each new failure.
-If you would like to track this test fix with another bug, please close this bug as a duplicate.
+If you believe this bug to be fixed or invalid, feel free to close. The bots will re-open if the flake re-occurs.
+
+If you would like to track this test fix with another bug, please close this bug as a duplicate. The bots will follow the duplicate chain when making future comments.
""" % format_values
master_flake_bug = 50856 # MASTER: Flaky tests found by the commit-queue
@@ -124,8 +126,9 @@ If you would like to track this test fix with another bug, please close this bug
bot_id_string = "Bot: %s " % (bot_id) if bot_id else ""
return "%sPort: %s Platform: %s" % (bot_id_string, self._tool.port().name(), self._tool.platform.display_name())
- def _latest_flake_message(self, flaky_test, patch):
- flake_message = "The %s just saw %s flake while processing attachment %s on bug %s." % (self._bot_name, flaky_test, patch.id(), patch.bug_id())
+ def _latest_flake_message(self, flaky_result, patch):
+ failure_messages = [failure.message() for failure in flaky_result.failures]
+ flake_message = "The %s just saw %s flake (%s) while processing attachment %s on bug %s." % (self._bot_name, flaky_result.filename, ", ".join(failure_messages), patch.id(), patch.bug_id())
return "%s\n%s" % (flake_message, self._bot_information())
def _results_diff_path_for_test(self, flaky_test):
@@ -150,11 +153,12 @@ If you would like to track this test fix with another bug, please close this bug
else:
self._tool.bugs.post_comment_to_bug(bug.id(), latest_flake_message)
- def report_flaky_tests(self, flaky_tests, patch):
+ def report_flaky_tests(self, flaky_test_results, patch):
message = "The %s encountered the following flaky tests while processing attachment %s:\n\n" % (self._bot_name, patch.id())
- for flaky_test in flaky_tests:
+ for flaky_result in flaky_test_results:
+ flaky_test = flaky_result.filename
bug = self._lookup_bug_for_flaky_test(flaky_test)
- latest_flake_message = self._latest_flake_message(flaky_test, patch)
+ latest_flake_message = self._latest_flake_message(flaky_result, patch)
author_emails = self._author_emails_for_test(flaky_test)
if not bug:
_log.info("Bug does not already exist for %s, creating." % flaky_test)
diff --git a/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py b/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py
index f72fb28..631f8d1 100644
--- a/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py
@@ -31,6 +31,8 @@ import unittest
from webkitpy.common.config.committers import Committer
from webkitpy.common.system.filesystem_mock import MockFileSystem
from webkitpy.common.system.outputcapture import OutputCapture
+from webkitpy.layout_tests.layout_package import test_results
+from webkitpy.layout_tests.layout_package import test_failures
from webkitpy.tool.bot.flakytestreporter import FlakyTestReporter
from webkitpy.tool.mocktool import MockTool, MockStatusServer
@@ -49,6 +51,9 @@ class MockCommitInfo(object):
class FlakyTestReporterTest(unittest.TestCase):
+ def _mock_test_result(self, testname):
+ return test_results.TestResult(testname, [test_failures.FailureTextMismatch()])
+
def _assert_emails_for_test(self, emails):
tool = MockTool()
reporter = FlakyTestReporter(tool, 'dummy-queue')
@@ -75,7 +80,9 @@ FLAKE_MESSAGE
The bots will update this with information from each new failure.
-If you would like to track this test fix with another bug, please close this bug as a duplicate.
+If you believe this bug to be fixed or invalid, feel free to close. The bots will re-open if the flake re-occurs.
+
+If you would like to track this test fix with another bug, please close this bug as a duplicate. The bots will follow the duplicate chain when making future comments.
component: Tools / Tests
cc: test@test.com
@@ -110,12 +117,14 @@ foo/bar.html has been flaky on the dummy-queue.
foo/bar.html was authored by abarth@webkit.org.
http://trac.webkit.org/browser/trunk/LayoutTests/foo/bar.html
-The dummy-queue just saw foo/bar.html flake while processing attachment 197 on bug 42.
+The dummy-queue just saw foo/bar.html flake (Text diff mismatch) while processing attachment 197 on bug 42.
Bot: mock-bot-id Port: MockPort Platform: MockPlatform 1.0
The bots will update this with information from each new failure.
-If you would like to track this test fix with another bug, please close this bug as a duplicate.
+If you believe this bug to be fixed or invalid, feel free to close. The bots will re-open if the flake re-occurs.
+
+If you would like to track this test fix with another bug, please close this bug as a duplicate. The bots will follow the duplicate chain when making future comments.
component: Tools / Tests
cc: abarth@webkit.org
@@ -130,7 +139,8 @@ The dummy-queue is continuing to process your patch.
--- End comment ---
"""
- OutputCapture().assert_outputs(self, reporter.report_flaky_tests, [['foo/bar.html'], patch], expected_stderr=expected_stderr)
+ test_results = [self._mock_test_result('foo/bar.html')]
+ OutputCapture().assert_outputs(self, reporter.report_flaky_tests, [test_results, patch], expected_stderr=expected_stderr)
def test_optional_author_string(self):
reporter = FlakyTestReporter(MockTool(), 'dummy-queue')
diff --git a/Tools/Scripts/webkitpy/tool/bot/irc_command.py b/Tools/Scripts/webkitpy/tool/bot/irc_command.py
index 0c17c9f..265974e 100644
--- a/Tools/Scripts/webkitpy/tool/bot/irc_command.py
+++ b/Tools/Scripts/webkitpy/tool/bot/irc_command.py
@@ -30,9 +30,10 @@ import random
import webkitpy.common.config.irc as config_irc
from webkitpy.common.config import urls
-from webkitpy.tool.bot.queueengine import TerminateQueue
from webkitpy.common.net.bugzilla import parse_bug_id
from webkitpy.common.system.executive import ScriptError
+from webkitpy.tool.bot.queueengine import TerminateQueue
+from webkitpy.tool.grammar import join_with_separators
# FIXME: Merge with Command?
class IRCCommand(object):
@@ -53,17 +54,38 @@ class Restart(IRCCommand):
class Rollout(IRCCommand):
+ def _parse_args(self, args):
+ read_revision = True
+ rollout_reason = []
+ # the first argument must be a revision number
+ svn_revision_list = [args[0].lstrip("r")]
+ if not svn_revision_list[0].isdigit():
+ read_revision = False
+
+ for arg in args[1:]:
+ if arg.lstrip("r").isdigit() and read_revision:
+ svn_revision_list.append(arg.lstrip("r"))
+ else:
+ read_revision = False
+ rollout_reason.append(arg)
+
+ return svn_revision_list, rollout_reason
+
def execute(self, nick, args, tool, sheriff):
- if len(args) < 2:
- tool.irc().post("%s: Usage: SVN_REVISION REASON" % nick)
+ svn_revision_list, rollout_reason = self._parse_args(args)
+
+ if (len(svn_revision_list) == 0) or (len(rollout_reason) == 0):
+ tool.irc().post("%s: Usage: SVN_REVISION [SVN_REVISIONS] REASON" % nick)
return
- svn_revision = args[0].lstrip("r")
- rollout_reason = " ".join(args[1:])
- tool.irc().post("Preparing rollout for r%s..." % svn_revision)
+
+ rollout_reason = " ".join(rollout_reason)
+
+ tool.irc().post("Preparing rollout for %s..." %
+ join_with_separators(["r" + str(revision) for revision in svn_revision_list]))
try:
complete_reason = "%s (Requested by %s on %s)." % (
rollout_reason, nick, config_irc.channel)
- bug_id = sheriff.post_rollout_patch(svn_revision, complete_reason)
+ bug_id = sheriff.post_rollout_patch(svn_revision_list, complete_reason)
bug_url = tool.bugs.bug_url_for_bug_id(bug_id)
tool.irc().post("%s: Created rollout: %s" % (nick, bug_url))
except ScriptError, e:
diff --git a/Tools/Scripts/webkitpy/tool/bot/sheriff.py b/Tools/Scripts/webkitpy/tool/bot/sheriff.py
index 43f3221..a5edceb 100644
--- a/Tools/Scripts/webkitpy/tool/bot/sheriff.py
+++ b/Tools/Scripts/webkitpy/tool/bot/sheriff.py
@@ -51,14 +51,14 @@ class Sheriff(object):
self._tool.irc().post(irc_message)
- def post_rollout_patch(self, svn_revision, rollout_reason):
- # Ensure that svn_revision is a number (and not an option to
+ def post_rollout_patch(self, svn_revision_list, rollout_reason):
+ # Ensure that svn revisions are numbers (and not options to
# create-rollout).
try:
- svn_revision = int(svn_revision)
+ svn_revisions = " ".join([str(int(revision)) for revision in svn_revision_list])
except:
raise ScriptError(message="Invalid svn revision number \"%s\"."
- % svn_revision)
+ % " ".join(svn_revision_list))
if rollout_reason.startswith("-"):
raise ScriptError(message="The rollout reason may not begin "
@@ -72,7 +72,7 @@ class Sheriff(object):
# pass it prophylactically because we reject unrecognized command
# line switches.
"--parent-command=sheriff-bot",
- svn_revision,
+ svn_revisions,
rollout_reason,
])
return parse_bug_id(output)
diff --git a/Tools/Scripts/webkitpy/tool/bot/sheriffircbot_unittest.py b/Tools/Scripts/webkitpy/tool/bot/sheriffircbot_unittest.py
index 08023bd..ccb8ac2 100644
--- a/Tools/Scripts/webkitpy/tool/bot/sheriffircbot_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/bot/sheriffircbot_unittest.py
@@ -62,12 +62,20 @@ class SheriffIRCBotTest(unittest.TestCase):
expected_stderr = "MOCK: irc.post: Preparing rollout for r21654...\nMOCK: irc.post: mock_nick: Created rollout: http://example.com/36936\n"
OutputCapture().assert_outputs(self, run, args=["rollout 21654 This patch broke the world"], expected_stderr=expected_stderr)
+ def test_multi_rollout(self):
+ expected_stderr = "MOCK: irc.post: Preparing rollout for r21654, r21655, and r21656...\nMOCK: irc.post: mock_nick: Created rollout: http://example.com/36936\n"
+ OutputCapture().assert_outputs(self, run, args=["rollout 21654 21655 21656 This 21654 patch broke the world"], expected_stderr=expected_stderr)
+
def test_rollout_with_r_in_svn_revision(self):
expected_stderr = "MOCK: irc.post: Preparing rollout for r21654...\nMOCK: irc.post: mock_nick: Created rollout: http://example.com/36936\n"
OutputCapture().assert_outputs(self, run, args=["rollout r21654 This patch broke the world"], expected_stderr=expected_stderr)
+ def test_multi_rollout_with_r_in_svn_revision(self):
+ expected_stderr = "MOCK: irc.post: Preparing rollout for r21654, r21655, and r21656...\nMOCK: irc.post: mock_nick: Created rollout: http://example.com/36936\n"
+ OutputCapture().assert_outputs(self, run, args=["rollout r21654 21655 r21656 This r21654 patch broke the world"], expected_stderr=expected_stderr)
+
def test_rollout_bananas(self):
- expected_stderr = "MOCK: irc.post: mock_nick: Usage: SVN_REVISION REASON\n"
+ expected_stderr = "MOCK: irc.post: mock_nick: Usage: SVN_REVISION [SVN_REVISIONS] REASON\n"
OutputCapture().assert_outputs(self, run, args=["rollout bananas"], expected_stderr=expected_stderr)
def test_rollout_invalidate_revision(self):
@@ -90,6 +98,21 @@ class SheriffIRCBotTest(unittest.TestCase):
"21654 -bad"],
expected_stderr=expected_stderr)
+ def test_multi_rollout_invalidate_reason(self):
+ expected_stderr = ("MOCK: irc.post: Preparing rollout for "
+ "r21654, r21655, and r21656...\nMOCK: irc.post: mock_nick: Failed to "
+ "create rollout patch:\nMOCK: irc.post: The rollout"
+ " reason may not begin with - (\"-bad (Requested "
+ "by mock_nick on #webkit).\").\n")
+ OutputCapture().assert_outputs(self, run,
+ args=["rollout "
+ "21654 21655 r21656 -bad"],
+ expected_stderr=expected_stderr)
+
def test_rollout_no_reason(self):
- expected_stderr = "MOCK: irc.post: mock_nick: Usage: SVN_REVISION REASON\n"
+ expected_stderr = "MOCK: irc.post: mock_nick: Usage: SVN_REVISION [SVN_REVISIONS] REASON\n"
OutputCapture().assert_outputs(self, run, args=["rollout 21654"], expected_stderr=expected_stderr)
+
+ def test_multi_rollout_no_reason(self):
+ expected_stderr = "MOCK: irc.post: mock_nick: Usage: SVN_REVISION [SVN_REVISIONS] REASON\n"
+ OutputCapture().assert_outputs(self, run, args=["rollout 21654 21655 r21656"], expected_stderr=expected_stderr)
diff --git a/Tools/Scripts/webkitpy/tool/commands/download.py b/Tools/Scripts/webkitpy/tool/commands/download.py
index 020f339..1b478bf 100644
--- a/Tools/Scripts/webkitpy/tool/commands/download.py
+++ b/Tools/Scripts/webkitpy/tool/commands/download.py
@@ -95,6 +95,7 @@ class Land(AbstractSequencedCommand):
steps.EnsureBuildersAreGreen,
steps.UpdateChangeLogsWithReviewer,
steps.ValidateReviewer,
+ steps.ValidateChangeLogs, # We do this after UpdateChangeLogsWithReviewer to avoid not having to cache the diff twice.
steps.Build,
steps.RunTests,
steps.Commit,
@@ -257,6 +258,7 @@ class AbstractPatchLandingCommand(AbstractPatchSequencingCommand):
steps.CleanWorkingDirectory,
steps.Update,
steps.ApplyPatch,
+ steps.ValidateChangeLogs,
steps.ValidateReviewer,
steps.Build,
steps.RunTests,
diff --git a/Tools/Scripts/webkitpy/tool/commands/download_unittest.py b/Tools/Scripts/webkitpy/tool/commands/download_unittest.py
index 3748a8f..ba23ab9 100644
--- a/Tools/Scripts/webkitpy/tool/commands/download_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/download_unittest.py
@@ -109,11 +109,11 @@ class DownloadCommandsTest(CommandsTest):
def test_land_diff(self):
expected_stderr = "Building WebKit\nRunning Python unit tests\nRunning Perl unit tests\nRunning JavaScriptCore tests\nRunning run-webkit-tests\nCommitted r49824: <http://trac.webkit.org/changeset/49824>\nUpdating bug 42\n"
mock_tool = MockTool()
- mock_tool.scm().create_patch = Mock()
+ mock_tool.scm().create_patch = Mock(return_value="Patch1\nMockPatch\n")
mock_tool.checkout().modified_changelogs = Mock(return_value=[])
self.assert_execute_outputs(Land(), [42], options=self._default_options(), expected_stderr=expected_stderr, tool=mock_tool)
# Make sure we're not calling expensive calls too often.
- self.assertEqual(mock_tool.scm().create_patch.call_count, 0)
+ self.assertEqual(mock_tool.scm().create_patch.call_count, 1)
self.assertEqual(mock_tool.checkout().modified_changelogs.call_count, 1)
def test_land_red_builders(self):
diff --git a/Tools/Scripts/webkitpy/tool/commands/queries.py b/Tools/Scripts/webkitpy/tool/commands/queries.py
index f04f384..733751e 100644
--- a/Tools/Scripts/webkitpy/tool/commands/queries.py
+++ b/Tools/Scripts/webkitpy/tool/commands/queries.py
@@ -272,7 +272,7 @@ class FailureReason(AbstractDeclarativeCommand):
print "%s failing" % (pluralize("builder", len(red_statuses)))
builder_choices = [status["name"] for status in red_statuses]
# We could offer an "All" choice here.
- chosen_name = User.prompt_with_list("Which builder to diagnose:", builder_choices)
+ chosen_name = self._tool.user.prompt_with_list("Which builder to diagnose:", builder_choices)
# FIXME: prompt_with_list should really take a set of objects and a set of names and then return the object.
for status in red_statuses:
if status["name"] == chosen_name:
@@ -345,7 +345,7 @@ class FindFlakyTests(AbstractDeclarativeCommand):
def _builder_to_analyze(self):
statuses = self._tool.buildbot.builder_statuses()
choices = [status["name"] for status in statuses]
- chosen_name = User.prompt_with_list("Which builder to analyze:", choices)
+ chosen_name = self._tool.user.prompt_with_list("Which builder to analyze:", choices)
for status in statuses:
if status["name"] == chosen_name:
return (self._tool.buildbot.builder_with_name(chosen_name), status["built_revision"])
diff --git a/Tools/Scripts/webkitpy/tool/commands/queues.py b/Tools/Scripts/webkitpy/tool/commands/queues.py
index e15555f..5628543 100644
--- a/Tools/Scripts/webkitpy/tool/commands/queues.py
+++ b/Tools/Scripts/webkitpy/tool/commands/queues.py
@@ -96,7 +96,7 @@ class AbstractQueue(Command, QueueEngineDelegate):
return self._tool.executive.run_and_throw_if_fail(webkit_patch_args)
def _log_directory(self):
- return "%s-logs" % self.name
+ return os.path.join("..", "%s-logs" % self.name)
# QueueEngineDelegate methods
@@ -312,9 +312,9 @@ class CommitQueue(AbstractPatchQueue, StepSequenceErrorHandler, CommitQueueTaskD
def refetch_patch(self, patch):
return self._tool.bugs.fetch_attachment(patch.id())
- def report_flaky_tests(self, patch, flaky_tests):
+ def report_flaky_tests(self, patch, flaky_test_results):
reporter = FlakyTestReporter(self._tool, self.name)
- reporter.report_flaky_tests(flaky_tests, patch)
+ reporter.report_flaky_tests(flaky_test_results, patch)
# StepSequenceErrorHandler methods
diff --git a/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py b/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py
index d793213..34a6a64 100644
--- a/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py
@@ -31,6 +31,8 @@ import os
from webkitpy.common.checkout.scm import CheckoutNeedsUpdate
from webkitpy.common.net.bugzilla import Attachment
from webkitpy.common.system.outputcapture import OutputCapture
+from webkitpy.layout_tests.layout_package import test_results
+from webkitpy.layout_tests.layout_package import test_failures
from webkitpy.thirdparty.mock import Mock
from webkitpy.tool.commands.commandtest import CommandsTest
from webkitpy.tool.commands.queues import *
@@ -53,7 +55,7 @@ class TestFeederQueue(FeederQueue):
class AbstractQueueTest(CommandsTest):
def test_log_directory(self):
- self.assertEquals(TestQueue()._log_directory(), "test-queue-logs")
+ self.assertEquals(TestQueue()._log_directory(), os.path.join("..", "test-queue-logs"))
def _assert_run_webkit_patch(self, run_args, port=None):
queue = TestQueue()
@@ -198,6 +200,9 @@ class SecondThoughtsCommitQueue(CommitQueue):
class CommitQueueTest(QueuesTest):
+ def _mock_test_result(self, testname):
+ return test_results.TestResult(testname, [test_failures.FailureTextMismatch()])
+
def test_commit_queue(self):
expected_stderr = {
"begin_work_queue": self._default_begin_work_queue_stderr("commit-queue", MockSCM.fake_checkout_root),
@@ -333,13 +338,13 @@ MOCK: release_work_item: commit-queue 197
queue.bind_to_tool(MockTool())
expected_stderr = """MOCK bug comment: bug_id=76, cc=None
--- Begin comment ---
-The commit-queue just saw foo/bar.html flake while processing attachment 197 on bug 42.
+The commit-queue just saw foo/bar.html flake (Text diff mismatch) while processing attachment 197 on bug 42.
Port: MockPort Platform: MockPlatform 1.0
--- End comment ---
MOCK bug comment: bug_id=76, cc=None
--- Begin comment ---
-The commit-queue just saw bar/baz.html flake while processing attachment 197 on bug 42.
+The commit-queue just saw bar/baz.html flake (Text diff mismatch) while processing attachment 197 on bug 42.
Port: MockPort Platform: MockPlatform 1.0
--- End comment ---
@@ -353,7 +358,9 @@ The commit-queue is continuing to process your patch.
--- End comment ---
"""
- OutputCapture().assert_outputs(self, queue.report_flaky_tests, [QueuesTest.mock_work_item, ["foo/bar.html", "bar/baz.html"]], expected_stderr=expected_stderr)
+ test_names = ["foo/bar.html", "bar/baz.html"]
+ test_results = [self._mock_test_result(name) for name in test_names]
+ OutputCapture().assert_outputs(self, queue.report_flaky_tests, [QueuesTest.mock_work_item, test_results], expected_stderr=expected_stderr)
def test_layout_test_results(self):
queue = CommitQueue()
diff --git a/Tools/Scripts/webkitpy/tool/commands/rebaseline.py b/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
index 8c4b997..34a398a 100644
--- a/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
+++ b/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
@@ -34,6 +34,7 @@ import urllib
from webkitpy.common.net.buildbot import BuildBot
from webkitpy.common.net.layouttestresults import LayoutTestResults
from webkitpy.common.system.user import User
+from webkitpy.layout_tests.layout_package import test_failures
from webkitpy.layout_tests.port import factory
from webkitpy.tool.grammar import pluralize
from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
@@ -88,7 +89,7 @@ class Rebaseline(AbstractDeclarativeCommand):
shutil.move(downloaded_file, local_file)
def _tests_to_update(self, build):
- failing_tests = build.layout_test_results().results_matching_keys([LayoutTestResults.fail_key])
+ failing_tests = build.layout_test_results().tests_matching_failure_types([test_failures.FailureTextMismatch])
return self._tool.user.prompt_with_list("Which test(s) to rebaseline:", failing_tests, can_choose_multiple=True)
def _results_url_for_test(self, build, test):
diff --git a/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py b/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
index d6582a7..79e4cf4 100644
--- a/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
@@ -28,7 +28,19 @@
import unittest
-from webkitpy.tool.commands.rebaseline import BuilderToPort
+from webkitpy.common.system.outputcapture import OutputCapture
+from webkitpy.thirdparty.mock import Mock
+from webkitpy.tool.commands.rebaseline import BuilderToPort, Rebaseline
+from webkitpy.tool.mocktool import MockTool
+
+
+class RebaselineTest(unittest.TestCase):
+ # This just makes sure the code runs without exceptions.
+ def test_tests_to_update(self):
+ command = Rebaseline()
+ command.bind_to_tool(MockTool())
+ build = Mock()
+ OutputCapture().assert_outputs(self, command._tests_to_update, [build])
class BuilderToPortTest(unittest.TestCase):
diff --git a/Tools/Scripts/webkitpy/tool/commands/upload.py b/Tools/Scripts/webkitpy/tool/commands/upload.py
index e12c8e2..6617b4f 100644
--- a/Tools/Scripts/webkitpy/tool/commands/upload.py
+++ b/Tools/Scripts/webkitpy/tool/commands/upload.py
@@ -196,6 +196,7 @@ class Post(AbstractPatchUploadingCommand):
help_text = "Attach the current working directory diff to a bug as a patch file"
argument_names = "[BUGID]"
steps = [
+ steps.ValidateChangeLogs,
steps.CheckStyle,
steps.ConfirmDiff,
steps.ObsoletePatches,
@@ -215,6 +216,7 @@ class LandSafely(AbstractPatchUploadingCommand):
show_in_main_help = True
steps = [
steps.UpdateChangeLogsWithReviewer,
+ steps.ValidateChangeLogs,
steps.ObsoletePatches,
steps.PostDiffForCommit,
]
@@ -241,6 +243,7 @@ class Upload(AbstractPatchUploadingCommand):
argument_names = "[BUGID]"
show_in_main_help = True
steps = [
+ steps.ValidateChangeLogs,
steps.CheckStyle,
steps.PromptForBugOrTitle,
steps.CreateBug,
diff --git a/Tools/Scripts/webkitpy/tool/mocktool.py b/Tools/Scripts/webkitpy/tool/mocktool.py
index 30a4bc3..eb7c248 100644
--- a/Tools/Scripts/webkitpy/tool/mocktool.py
+++ b/Tools/Scripts/webkitpy/tool/mocktool.py
@@ -540,10 +540,14 @@ class MockCheckout(object):
class MockUser(object):
- @staticmethod
- def prompt(message, repeat=1, raw_input=raw_input):
+ @classmethod
+ def prompt(cls, message, repeat=1, raw_input=raw_input):
return "Mock user response"
+ @classmethod
+ def prompt_with_list(cls, list_title, list_items, can_choose_multiple=False, raw_input=raw_input):
+ pass
+
def edit(self, files):
pass
diff --git a/Tools/Scripts/webkitpy/tool/steps/__init__.py b/Tools/Scripts/webkitpy/tool/steps/__init__.py
index 64d9d05..f426f17 100644
--- a/Tools/Scripts/webkitpy/tool/steps/__init__.py
+++ b/Tools/Scripts/webkitpy/tool/steps/__init__.py
@@ -56,4 +56,5 @@ from webkitpy.tool.steps.runtests import RunTests
from webkitpy.tool.steps.suggestreviewers import SuggestReviewers
from webkitpy.tool.steps.updatechangelogswithreviewer import UpdateChangeLogsWithReviewer
from webkitpy.tool.steps.update import Update
+from webkitpy.tool.steps.validatechangelogs import ValidateChangeLogs
from webkitpy.tool.steps.validatereviewer import ValidateReviewer
diff --git a/Tools/Scripts/webkitpy/tool/steps/abstractstep.py b/Tools/Scripts/webkitpy/tool/steps/abstractstep.py
index 5525ea0..1c93d5b 100644
--- a/Tools/Scripts/webkitpy/tool/steps/abstractstep.py
+++ b/Tools/Scripts/webkitpy/tool/steps/abstractstep.py
@@ -52,6 +52,7 @@ class AbstractStep(object):
"bug_title": lambda self, state: self._tool.bugs.fetch_bug(state["bug_id"]).title(),
"changed_files": lambda self, state: self._tool.scm().changed_files(self._options.git_commit),
"diff": lambda self, state: self._tool.scm().create_patch(self._options.git_commit, changed_files=self._changed_files(state)),
+ # Absolute path to ChangeLog files.
"changelogs": lambda self, state: self._tool.checkout().modified_changelogs(self._options.git_commit, changed_files=self._changed_files(state)),
}
diff --git a/Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectory.py b/Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectory.py
index 9c16242..a165dd2 100644
--- a/Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectory.py
+++ b/Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectory.py
@@ -47,7 +47,9 @@ class CleanWorkingDirectory(AbstractStep):
def run(self, state):
if not self._options.clean:
return
- # FIXME: This chdir should not be necessary.
+ # FIXME: This chdir should not be necessary and can be removed as
+ # soon as ensure_no_local_commits and ensure_clean_working_directory
+ # are known to set the CWD to checkout_root when calling run_command.
os.chdir(self._tool.scm().checkout_root)
if not self._allow_local_commits:
self._tool.scm().ensure_no_local_commits(self._options.force_clean)
diff --git a/Tools/Scripts/webkitpy/tool/steps/commit.py b/Tools/Scripts/webkitpy/tool/steps/commit.py
index 5aa6b51..859acbf 100644
--- a/Tools/Scripts/webkitpy/tool/steps/commit.py
+++ b/Tools/Scripts/webkitpy/tool/steps/commit.py
@@ -36,12 +36,6 @@ from webkitpy.tool.steps.options import Options
class Commit(AbstractStep):
- @classmethod
- def options(cls):
- return AbstractStep.options() + [
- Options.git_commit,
- ]
-
def _commit_warning(self, error):
working_directory_message = "" if error.working_directory_is_clean else " and working copy changes"
return ('There are %s local commits%s. Everything will be committed as a single commit. '
diff --git a/Tools/Scripts/webkitpy/tool/steps/update.py b/Tools/Scripts/webkitpy/tool/steps/update.py
index cd1d4d8..036c46d 100644
--- a/Tools/Scripts/webkitpy/tool/steps/update.py
+++ b/Tools/Scripts/webkitpy/tool/steps/update.py
@@ -36,10 +36,11 @@ class Update(AbstractStep):
def options(cls):
return AbstractStep.options() + [
Options.update,
+ Options.quiet,
]
def run(self, state):
if not self._options.update:
return
log("Updating working directory")
- self._tool.executive.run_and_throw_if_fail(self._tool.port().update_webkit_command(), quiet=True)
+ self._tool.executive.run_and_throw_if_fail(self._tool.port().update_webkit_command(), quiet=self._options.quiet)
diff --git a/Tools/Scripts/webkitpy/tool/steps/updatechangelogswithreviewer.py b/Tools/Scripts/webkitpy/tool/steps/updatechangelogswithreviewer.py
index e46b790..2bf41b3 100644
--- a/Tools/Scripts/webkitpy/tool/steps/updatechangelogswithreviewer.py
+++ b/Tools/Scripts/webkitpy/tool/steps/updatechangelogswithreviewer.py
@@ -67,6 +67,9 @@ class UpdateChangeLogsWithReviewer(AbstractStep):
log("Failed to guess reviewer from bug %s and --reviewer= not provided. Not updating ChangeLogs with reviewer." % bug_id)
return
- os.chdir(self._tool.scm().checkout_root)
+ # cached_lookup("changelogs") is always absolute paths.
for changelog_path in self.cached_lookup(state, "changelogs"):
ChangeLog(changelog_path).set_reviewer(reviewer)
+
+ # Tell the world that we just changed something on disk so that the cached diff is invalidated.
+ self.did_modify_checkout(state)
diff --git a/Tools/Scripts/webkitpy/tool/steps/validatechangelogs.py b/Tools/Scripts/webkitpy/tool/steps/validatechangelogs.py
new file mode 100644
index 0000000..e812f94
--- /dev/null
+++ b/Tools/Scripts/webkitpy/tool/steps/validatechangelogs.py
@@ -0,0 +1,58 @@
+# Copyright (C) 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.
+
+from webkitpy.tool.steps.abstractstep import AbstractStep
+from webkitpy.tool.steps.options import Options
+from webkitpy.common.checkout.diff_parser import DiffParser
+from webkitpy.common.system.deprecated_logging import error, log
+
+
+# This is closely related to the ValidateReviewer step and the CommitterValidator class.
+# We may want to unify more of this code in one place.
+class ValidateChangeLogs(AbstractStep):
+ def _check_changelog_diff(self, diff_file):
+ if not self._tool.checkout().is_path_to_changelog(diff_file.filename):
+ return True
+ # Each line is a tuple, the first value is the deleted line number
+ # Date, reviewer, bug title, bug url, and empty lines could all be
+ # identical in the most recent entries. If the diff starts any
+ # later than that, assume that the entry is wrong.
+ if diff_file.lines[0][0] < 8:
+ return True
+ log("The diff to %s looks wrong. Are you sure your ChangeLog entry is at the top of the file?" % (diff_file.filename))
+ # FIXME: Do we need to make the file path absolute?
+ self._tool.scm().diff_for_file(diff_file.filename)
+ if self._tool.user.confirm("OK to continue?", default='n'):
+ return True
+ return False
+
+ def run(self, state):
+ parsed_diff = DiffParser(self.cached_lookup(state, "diff").splitlines())
+ for filename, diff_file in parsed_diff.files.items():
+ if not self._check_changelog_diff(diff_file):
+ error("ChangeLog entry in %s is not at the top of the file." % diff_file.filename)
diff --git a/Tools/Scripts/webkitpy/tool/steps/validatechangelogs_unittest.py b/Tools/Scripts/webkitpy/tool/steps/validatechangelogs_unittest.py
new file mode 100644
index 0000000..66db793
--- /dev/null
+++ b/Tools/Scripts/webkitpy/tool/steps/validatechangelogs_unittest.py
@@ -0,0 +1,55 @@
+# Copyright (C) 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.
+
+import unittest
+
+from webkitpy.common.system.outputcapture import OutputCapture
+from webkitpy.thirdparty.mock import Mock
+from webkitpy.tool.mocktool import MockOptions, MockTool
+from webkitpy.tool.steps.validatechangelogs import ValidateChangeLogs
+
+
+class ValidateChangeLogsTest(unittest.TestCase):
+
+ def _assert_start_line_produces_output(self, start_line, should_prompt_user=False):
+ tool = MockTool()
+ tool._checkout.is_path_to_changelog = lambda path: True
+ step = ValidateChangeLogs(tool, MockOptions(git_commit=None))
+ diff_file = Mock()
+ diff_file.filename = "mock/ChangeLog"
+ diff_file.lines = [(start_line, start_line, "foo")]
+ expected_stdout = expected_stderr = ""
+ if should_prompt_user:
+ expected_stdout = "OK to continue?\n"
+ expected_stderr = "The diff to mock/ChangeLog looks wrong. Are you sure your ChangeLog entry is at the top of the file?\n"
+ OutputCapture().assert_outputs(self, step._check_changelog_diff, [diff_file], expected_stdout=expected_stdout, expected_stderr=expected_stderr)
+
+ def test_check_changelog_diff(self):
+ self._assert_start_line_produces_output(1, should_prompt_user=False)
+ self._assert_start_line_produces_output(7, should_prompt_user=False)
+ self._assert_start_line_produces_output(8, should_prompt_user=True)
diff --git a/Tools/Scripts/webkitpy/tool/steps/validatereviewer.py b/Tools/Scripts/webkitpy/tool/steps/validatereviewer.py
index bdf729e..c2a27b9 100644
--- a/Tools/Scripts/webkitpy/tool/steps/validatereviewer.py
+++ b/Tools/Scripts/webkitpy/tool/steps/validatereviewer.py
@@ -37,12 +37,6 @@ from webkitpy.common.system.deprecated_logging import error, log
# FIXME: Some of this logic should probably be unified with CommitterValidator?
class ValidateReviewer(AbstractStep):
- @classmethod
- def options(cls):
- return AbstractStep.options() + [
- Options.git_commit,
- ]
-
# FIXME: This should probably move onto ChangeLogEntry
def _has_valid_reviewer(self, changelog_entry):
if changelog_entry.reviewer():
@@ -58,9 +52,6 @@ class ValidateReviewer(AbstractStep):
# this check is too draconian (and too poorly tested) to foist upon users.
if not self._options.non_interactive:
return
- # FIXME: We should figure out how to handle the current working
- # directory issue more globally.
- os.chdir(self._tool.scm().checkout_root)
for changelog_path in self.cached_lookup(state, "changelogs"):
changelog_entry = ChangeLog(changelog_path).latest_entry()
if self._has_valid_reviewer(changelog_entry):
diff --git a/Tools/Scripts/wkstyle b/Tools/Scripts/wkstyle
deleted file mode 100755
index 4b3447f..0000000
--- a/Tools/Scripts/wkstyle
+++ /dev/null
@@ -1,89 +0,0 @@
-
-# Copyright (C) 2006 Michael Emmel<mike.emmel@gmail.com> All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. 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.
-# 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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.
-
-cmdcpp="astyle \
---unpad=paren \
---style=linux \
---brackets=linux \
---indent=spaces=4 \
---indent-switches \
---convert-tabs"
-
-cmdh="astyle \
---unpad=paren \
---style=linux \
---brackets=break \
---indent=spaces=4 \
---convert-tabs"
-
-#astyle does not support unpadding so we use sed
-for i in $@
-do
-echo $i
-
-ext=`echo $i|awk -F . '{print $NF}'`
-
-cmd=$cmdcpp
-
-if [ $ext == "h" ] ; then
- cmd=$cmdh
-fi
-
-$cmd $i
-
-#first print the changes we are making
-sed -n -e '
-/( .*/p
-s/( /(/gp
-/*. )/p
-s/ )/)/gp
-#supress printing this
-#/^namespace WebCore/{
-#N
-#s/\n{/ {/p
-#}
-' $i
-
-#do it for real
-sed -e '
-#unpad leading spaces
-s/( /(/g
-#unpad traling spaces
-s/ )/)/g
-#fixup the namspec decl
-/^namespace WebCore/{
-N
-s/\n{/ {/
-}
-#fixup extra tab in constructor initalizer
-/^ \+,/{s/^ //}
-/^ \+:/{s/^ //}
-' $i > $i.sed
-mv $i.sed $i
-done
-
-
diff --git a/Tools/TestResultServer/model/jsonresults.py b/Tools/TestResultServer/model/jsonresults.py
index f5a0fde..d61a860 100755
--- a/Tools/TestResultServer/model/jsonresults.py
+++ b/Tools/TestResultServer/model/jsonresults.py
@@ -114,6 +114,7 @@ class JsonResults(object):
Args:
aggregated_json: aggregated json object.
incremental_json: incremental json object.
+ num_runs: number of total runs to include.
Returns:
True if merge succeeds or
@@ -140,6 +141,7 @@ class JsonResults(object):
Args:
aggregated_json: aggregated json object.
incremental_json: incremental json object.
+ num_runs: number of total runs to include.
Returns:
True if merge succeeds or
@@ -188,6 +190,7 @@ class JsonResults(object):
aggregated_json: aggregated json object.
incremental_json: incremental json object.
incremental_index: index of the incremental json results to merge.
+ num_runs: number of total runs to include.
"""
for key in incremental_json.keys():
@@ -211,6 +214,7 @@ class JsonResults(object):
Args:
aggregated_json: aggregated json object.
incremental_json: incremental json object.
+ num_runs: number of total runs to include.
"""
all_tests = (set(aggregated_json.iterkeys()) |
@@ -230,7 +234,7 @@ class JsonResults(object):
results, aggregated_test[JSON_RESULTS_RESULTS], num_runs)
cls._insert_item_run_length_encoded(
times, aggregated_test[JSON_RESULTS_TIMES], num_runs)
- cls._normalize_results_json(test_name, aggregated_json)
+ cls._normalize_results_json(test_name, aggregated_json, num_runs)
else:
aggregated_json[test_name] = incremental_json[test_name]
@@ -242,6 +246,7 @@ class JsonResults(object):
Args:
incremental_item: incremental run-length encoded results.
aggregated_item: aggregated run-length encoded results.
+ num_runs: number of total runs to include.
"""
for item in incremental_item:
@@ -252,23 +257,24 @@ class JsonResults(object):
aggregated_item.insert(0, item)
@classmethod
- def _normalize_results_json(cls, test_name, aggregated_json):
+ def _normalize_results_json(cls, test_name, aggregated_json, num_runs):
""" Prune tests where all runs pass or tests that no longer exist and
- truncate all results to JSON_RESULTS_MAX_BUILDS.
+ truncate all results to num_runs.
Args:
test_name: Name of the test.
aggregated_json: The JSON object with all the test results for
this builder.
+ num_runs: number of total runs to include.
"""
aggregated_test = aggregated_json[test_name]
aggregated_test[JSON_RESULTS_RESULTS] = \
cls._remove_items_over_max_number_of_builds(
- aggregated_test[JSON_RESULTS_RESULTS])
+ aggregated_test[JSON_RESULTS_RESULTS], num_runs)
aggregated_test[JSON_RESULTS_TIMES] = \
cls._remove_items_over_max_number_of_builds(
- aggregated_test[JSON_RESULTS_TIMES])
+ aggregated_test[JSON_RESULTS_TIMES], num_runs)
is_all_pass = cls._is_results_all_of_type(
aggregated_test[JSON_RESULTS_RESULTS], JSON_RESULTS_PASS)
@@ -285,20 +291,21 @@ class JsonResults(object):
del aggregated_json[test_name]
@classmethod
- def _remove_items_over_max_number_of_builds(cls, encoded_list):
+ def _remove_items_over_max_number_of_builds(cls, encoded_list, num_runs):
"""Removes items from the run-length encoded list after the final
item that exceeds the max number of builds to track.
Args:
encoded_results: run-length encoded results. An array of arrays, e.g.
[[3,'A'],[1,'Q']] encodes AAAQ.
+ num_runs: number of total runs to include.
"""
num_builds = 0
index = 0
for result in encoded_list:
num_builds = num_builds + result[0]
index = index + 1
- if num_builds > JSON_RESULTS_MAX_BUILDS:
+ if num_builds >= num_runs:
return encoded_list[:index]
return encoded_list
diff --git a/Tools/TestResultServer/model/jsonresults_unittest.py b/Tools/TestResultServer/model/jsonresults_unittest.py
index c70b90c..eb8c864 100755
--- a/Tools/TestResultServer/model/jsonresults_unittest.py
+++ b/Tools/TestResultServer/model/jsonresults_unittest.py
@@ -118,11 +118,11 @@ class JsonResultsTest(unittest.TestCase):
return JSON_RESULTS_PREFIX + json + JSON_RESULTS_SUFFIX
- def _test_merge(self, aggregated_data, incremental_data, expected_data):
+ def _test_merge(self, aggregated_data, incremental_data, expected_data, max_builds=jsonresults.JSON_RESULTS_MAX_BUILDS):
aggregated_results = self._make_test_json(aggregated_data)
incremental_results = self._make_test_json(incremental_data)
merged_results = JsonResults.merge(self._builder,
- aggregated_results, incremental_results, jsonresults.JSON_RESULTS_MAX_BUILDS,
+ aggregated_results, incremental_results, max_builds,
sort_keys=True)
if expected_data:
@@ -299,7 +299,7 @@ class JsonResultsTest(unittest.TestCase):
# Expected results
(["3", "2", "1"], [["001.html", "[201,\"P\"]", "[1,1],[200,0]"], ["002.html", "[1,\"P\"],[10,\"F\"]", "[11,0]"]]))
- # Remove items from test results and times that exceeds the max number
+ # Remove items from test results and times that exceed the max number
# of builds to track.
max_builds = str(jsonresults.JSON_RESULTS_MAX_BUILDS)
self._test_merge(
@@ -310,6 +310,30 @@ class JsonResultsTest(unittest.TestCase):
# Expected results
(["3", "2", "1"], [["001.html", "[1,\"T\"],[" + max_builds + ",\"F\"]", "[1,1],[" + max_builds + ",0]"]]))
+ # Remove items from test results and times that exceed the max number
+ # of builds to track, using smaller threshold.
+ max_builds = str(jsonresults.JSON_RESULTS_MAX_BUILDS_SMALL)
+ self._test_merge(
+ # Aggregated results
+ (["2", "1"], [["001.html", "[" + max_builds + ",\"F\"],[1,\"I\"]", "[" + max_builds + ",0],[1,1]"]]),
+ # Incremental results
+ (["3"], [["001.html", "[1,\"T\"]", "[1,1]"]]),
+ # Expected results
+ (["3", "2", "1"], [["001.html", "[1,\"T\"],[" + max_builds + ",\"F\"]", "[1,1],[" + max_builds + ",0]"]]),
+ int(max_builds))
+
+ # Test that merging in a new result of the same type as the last result
+ # causes old results to fall off.
+ max_builds = str(jsonresults.JSON_RESULTS_MAX_BUILDS_SMALL)
+ self._test_merge(
+ # Aggregated results
+ (["2", "1"], [["001.html", "[" + max_builds + ",\"F\"],[1,\"N\"]", "[" + max_builds + ",0],[1,1]"]]),
+ # Incremental results
+ (["3"], [["001.html", "[1,\"F\"]", "[1,0]"]]),
+ # Expected results
+ (["3", "2", "1"], [["001.html", "[" + max_builds + ",\"F\"]", "[" + max_builds + ",0]"]]),
+ int(max_builds))
+
# Get test name list only. Don't include non-test-list data and
# of test result details.
self._test_get_test_list(
diff --git a/Tools/TestWebKitAPI/Configurations/TestWebKitAPICommon.vsprops b/Tools/TestWebKitAPI/Configurations/TestWebKitAPICommon.vsprops
index 43927f2..6742ff1 100644
--- a/Tools/TestWebKitAPI/Configurations/TestWebKitAPICommon.vsprops
+++ b/Tools/TestWebKitAPI/Configurations/TestWebKitAPICommon.vsprops
@@ -6,7 +6,7 @@
>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ConfigurationBuildDir)\include&quot;;&quot;$(ConfigurationBuildDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(ConfigurationBuildDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include&quot;"
ForcedIncludeFiles="TestWebKitAPIPrefix.h"
/>
<Tool
diff --git a/Tools/TestWebKitAPI/win/TestWebKitAPIGenerated.vcproj b/Tools/TestWebKitAPI/win/TestWebKitAPIGenerated.vcproj
index 3f30a05..d52560a 100644
--- a/Tools/TestWebKitAPI/win/TestWebKitAPIGenerated.vcproj
+++ b/Tools/TestWebKitAPI/win/TestWebKitAPIGenerated.vcproj
@@ -17,7 +17,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="0"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;.\TestWebKitAPIGeneratedCommon.vsprops"
+ InheritedPropertySheets=".\TestWebKitAPIGeneratedCommon.vsprops"
>
<Tool
Name="VCNMakeTool"
@@ -26,7 +26,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="0"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;.\TestWebKitAPIGeneratedCommon.vsprops"
+ InheritedPropertySheets=".\TestWebKitAPIGeneratedCommon.vsprops"
>
<Tool
Name="VCNMakeTool"
@@ -35,7 +35,7 @@
<Configuration
Name="Debug_All|Win32"
ConfigurationType="0"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;.\TestWebKitAPIGeneratedCommon.vsprops"
+ InheritedPropertySheets=".\TestWebKitAPIGeneratedCommon.vsprops"
>
<Tool
Name="VCNMakeTool"
@@ -44,7 +44,7 @@
<Configuration
Name="Release_LTCG|Win32"
ConfigurationType="0"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;.\TestWebKitAPIGeneratedCommon.vsprops"
+ InheritedPropertySheets=".\TestWebKitAPIGeneratedCommon.vsprops"
>
<Tool
Name="VCNMakeTool"
@@ -53,7 +53,7 @@
<Configuration
Name="Release_Cairo_CFLite|Win32"
ConfigurationType="0"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;.\TestWebKitAPIGeneratedCommon.vsprops"
+ InheritedPropertySheets=".\TestWebKitAPIGeneratedCommon.vsprops"
>
<Tool
Name="VCNMakeTool"
@@ -62,7 +62,7 @@
<Configuration
Name="Debug_Cairo_CFLite|Win32"
ConfigurationType="0"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;.\TestWebKitAPIGeneratedCommon.vsprops"
+ InheritedPropertySheets=".\TestWebKitAPIGeneratedCommon.vsprops"
>
<Tool
Name="VCNMakeTool"
diff --git a/Tools/TestWebKitAPI/win/TestWebKitAPIGeneratedCommon.vsprops b/Tools/TestWebKitAPI/win/TestWebKitAPIGeneratedCommon.vsprops
index 7e1587b..00348cb 100644
--- a/Tools/TestWebKitAPI/win/TestWebKitAPIGeneratedCommon.vsprops
+++ b/Tools/TestWebKitAPI/win/TestWebKitAPIGeneratedCommon.vsprops
@@ -3,11 +3,12 @@
ProjectType="Visual C++"
Version="8.00"
Name="TestWebKitAPIGeneratedCommon"
+ InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops"
>
<Tool
Name="VCNMakeTool"
- BuildCommandLine="copy-resources.cmd"
- ReBuildCommandLine="copy-resources.cmd rebuild"
- CleanCommandLine="copy-resources.cmd clean"
+ BuildCommandLine="set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir)&#x0D;&#x0A;copy-resources.cmd"
+ ReBuildCommandLine="set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir)&#x0D;&#x0A;copy-resources.cmd rebuild"
+ CleanCommandLine="set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir)&#x0D;&#x0A;copy-resources.cmd clean"
/>
</VisualStudioPropertySheet>
diff --git a/Tools/TestWebKitAPI/win/TestWebKitAPIPostBuild.cmd b/Tools/TestWebKitAPI/win/TestWebKitAPIPostBuild.cmd
index f011495..26707ca 100644
--- a/Tools/TestWebKitAPI/win/TestWebKitAPIPostBuild.cmd
+++ b/Tools/TestWebKitAPI/win/TestWebKitAPIPostBuild.cmd
@@ -1 +1 @@
-if exist "%WEBKITOUTPUTDIR%\buildfailed" del "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/Tools/TestWebKitAPI/win/TestWebKitAPIPreBuild.cmd b/Tools/TestWebKitAPI/win/TestWebKitAPIPreBuild.cmd
index 3a84c26..a770776 100644
--- a/Tools/TestWebKitAPI/win/TestWebKitAPIPreBuild.cmd
+++ b/Tools/TestWebKitAPI/win/TestWebKitAPIPreBuild.cmd
@@ -1,6 +1,6 @@
%SystemDrive%\cygwin\bin\which.exe bash
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%WEBKITOUTPUTDIR%\buildfailed" grep XX%PROJECTNAME%XX "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
-echo XX%PROJECTNAME%XX > "%WEBKITOUTPUTDIR%\buildfailed"
+echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/Tools/TestWebKitAPI/win/copy-resources.cmd b/Tools/TestWebKitAPI/win/copy-resources.cmd
index 4b209d4..dc56479 100755
--- a/Tools/TestWebKitAPI/win/copy-resources.cmd
+++ b/Tools/TestWebKitAPI/win/copy-resources.cmd
@@ -1,6 +1,6 @@
@echo off
-set ResourcesDirectory=%WebKitOutputDir%\bin\TestWebKitAPI.resources
+set ResourcesDirectory=%CONFIGURATIONBUILDDIR%\bin\TestWebKitAPI.resources
if "%1" EQU "clean" goto :clean
if "%1" EQU "rebuild" call :clean
diff --git a/Tools/WebKitAPITest/WebKitAPITestCommon.vsprops b/Tools/WebKitAPITest/WebKitAPITestCommon.vsprops
index f57f53c..99327fb 100644
--- a/Tools/WebKitAPITest/WebKitAPITestCommon.vsprops
+++ b/Tools/WebKitAPITest/WebKitAPITestCommon.vsprops
@@ -6,7 +6,7 @@
>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include\WebCore\ForwardingHeaders&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)&quot;;&quot;$(ConfigurationBuildDir)\include&quot;;&quot;$(ConfigurationBuildDir)\include\private&quot;;&quot;$(ConfigurationBuildDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include\WebCore\ForwardingHeaders&quot;"
PreprocessorDefinitions="_CONSOLE;NOMINMAX"
/>
<Tool
diff --git a/Tools/WebKitAPITest/WebKitAPITestPostBuild.cmd b/Tools/WebKitAPITest/WebKitAPITestPostBuild.cmd
index f011495..26707ca 100644
--- a/Tools/WebKitAPITest/WebKitAPITestPostBuild.cmd
+++ b/Tools/WebKitAPITest/WebKitAPITestPostBuild.cmd
@@ -1 +1 @@
-if exist "%WEBKITOUTPUTDIR%\buildfailed" del "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/Tools/WebKitAPITest/WebKitAPITestPreBuild.cmd b/Tools/WebKitAPITest/WebKitAPITestPreBuild.cmd
index 3a84c26..a770776 100644
--- a/Tools/WebKitAPITest/WebKitAPITestPreBuild.cmd
+++ b/Tools/WebKitAPITest/WebKitAPITestPreBuild.cmd
@@ -1,6 +1,6 @@
%SystemDrive%\cygwin\bin\which.exe bash
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%WEBKITOUTPUTDIR%\buildfailed" grep XX%PROJECTNAME%XX "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
-echo XX%PROJECTNAME%XX > "%WEBKITOUTPUTDIR%\buildfailed"
+echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/Tools/WebKitTestRunner/Configurations/InjectedBundleCommon.vsprops b/Tools/WebKitTestRunner/Configurations/InjectedBundleCommon.vsprops
index 540fc7a..6f02b95 100644
--- a/Tools/WebKitTestRunner/Configurations/InjectedBundleCommon.vsprops
+++ b/Tools/WebKitTestRunner/Configurations/InjectedBundleCommon.vsprops
@@ -6,7 +6,7 @@
>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\InjectedBundle\&quot;;&quot;$(ProjectDir)\..\InjectedBundle\Bindings&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitOutputDir)\obj\InjectedBundle\DerivedSources\&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\InjectedBundle\&quot;;&quot;$(ProjectDir)\..\InjectedBundle\Bindings&quot;;&quot;$(ConfigurationBuildDir)\Include&quot;;&quot;$(ConfigurationBuildDir)\Include\private&quot;;&quot;$(ConfigurationBuildDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(ConfigurationBuildDir)\obj\InjectedBundle\DerivedSources\&quot;"
ForcedIncludeFiles="WebKitTestRunnerPrefix.h"
/>
</VisualStudioPropertySheet>
diff --git a/Tools/WebKitTestRunner/Configurations/WebKitTestRunnerCommon.vsprops b/Tools/WebKitTestRunner/Configurations/WebKitTestRunnerCommon.vsprops
index 4233b55..4fb14f5 100644
--- a/Tools/WebKitTestRunner/Configurations/WebKitTestRunnerCommon.vsprops
+++ b/Tools/WebKitTestRunner/Configurations/WebKitTestRunnerCommon.vsprops
@@ -6,7 +6,7 @@
>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)\..&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\..&quot;;&quot;$(ConfigurationBuildDir)\Include&quot;;&quot;$(ConfigurationBuildDir)\Include\private&quot;;&quot;$(ConfigurationBuildDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;"
PreprocessorDefinitions="__WIN32__;_CONSOLE"
DisableSpecificWarnings="4146"
ForcedIncludeFiles="WebKitTestRunnerPrefix.h"
diff --git a/Tools/WebKitTestRunner/DerivedSources.pro b/Tools/WebKitTestRunner/DerivedSources.pro
index 96f2a90..561a09e 100644
--- a/Tools/WebKitTestRunner/DerivedSources.pro
+++ b/Tools/WebKitTestRunner/DerivedSources.pro
@@ -45,13 +45,13 @@ QMAKE_EXTRA_TARGETS += fwheader_generator
# GENERATOR 1: IDL compiler
idl.output = $${GENERATED_SOURCES_DIR}/JS${QMAKE_FILE_BASE}.cpp
idl.input = IDL_BINDINGS
-idl.wkScript = $$PWD/../../WebCore/bindings/scripts/generate-bindings.pl
-idl.commands = perl -I$$PWD/../../WebCore/bindings/scripts -I$$PWD/InjectedBundle/Bindings $$idl.wkScript --defines \"\" --generator TestRunner --include $$PWD/InjectedBundle/Bindings --outputDir $$GENERATED_SOURCES_DIR --preprocessor \"$${QMAKE_MOC} -E\" ${QMAKE_FILE_NAME}
-idl.depends = $$PWD/../../WebCore/bindings/scripts/CodeGenerator.pm \
+idl.wkScript = $$PWD/../../Source/WebCore/bindings/scripts/generate-bindings.pl
+idl.commands = perl -I$$PWD/../../Source/WebCore/bindings/scripts -I$$PWD/InjectedBundle/Bindings $$idl.wkScript --defines \"\" --generator TestRunner --include $$PWD/InjectedBundle/Bindings --outputDir $$GENERATED_SOURCES_DIR --preprocessor \"$${QMAKE_MOC} -E\" ${QMAKE_FILE_NAME}
+idl.depends = $$PWD/../../Source/WebCore/bindings/scripts/CodeGenerator.pm \
$$PWD/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm \
- $$PWD/../../WebCore/bindings/scripts/IDLParser.pm \
- $$PWD/../../WebCore/bindings/scripts/IDLStructure.pm \
- $$PWD/../../WebCore/bindings/scripts/InFilesParser.pm \
- $$PWD/../../WebCore/bindings/scripts/generate-bindings.pl
+ $$PWD/../../Source/WebCore/bindings/scripts/IDLParser.pm \
+ $$PWD/../../Source/WebCore/bindings/scripts/IDLStructure.pm \
+ $$PWD/../../Source/WebCore/bindings/scripts/InFilesParser.pm \
+ $$PWD/../../Source/WebCore/bindings/scripts/generate-bindings.pl
addExtraCompiler(idl)
diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
index 49d9db6..f68d3c4 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
@@ -128,6 +128,9 @@ void InjectedBundle::didReceiveMessage(WKStringRef messageName, WKTypeRef messag
beginTesting();
return;
+ } else if (WKStringIsEqualToUTF8CString(messageName, "Reset")) {
+ m_state = Idle;
+ return;
}
WKRetainPtr<WKStringRef> errorMessageName(AdoptWK, WKStringCreateWithUTF8CString("Error"));
diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
index da79b19..765ff37 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
@@ -190,7 +190,8 @@ InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
didClearWindowForFrame,
didCancelClientRedirectForFrame,
willPerformClientRedirectForFrame,
- didHandleOnloadEventsForFrame
+ didHandleOnloadEventsForFrame,
+ shouldLoadResourceForFrame
};
WKBundlePageSetLoaderClient(m_page, &loaderClient);
@@ -322,6 +323,11 @@ void InjectedBundlePage::didRunInsecureContentForFrame(WKBundlePageRef page, WKB
static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didRunInsecureContentForFrame(frame);
}
+bool InjectedBundlePage::shouldLoadResourceForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKURLRef, const void* clientInfo)
+{
+ return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->shouldLoadResourceForFrame(frame);
+}
+
void InjectedBundlePage::didStartProvisionalLoadForFrame(WKBundleFrameRef frame)
{
@@ -561,6 +567,11 @@ void InjectedBundlePage::didRunInsecureContentForFrame(WKBundleFrameRef frame)
{
}
+bool InjectedBundlePage::shouldLoadResourceForFrame(WKBundleFrameRef frame)
+{
+ return true;
+}
+
// UI Client Callbacks
void InjectedBundlePage::willAddMessageToConsole(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void *clientInfo)
diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
index cb1c27b..ac9fbc3 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
+++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
@@ -64,6 +64,7 @@ private:
static void didHandleOnloadEventsForFrame(WKBundlePageRef, WKBundleFrameRef, const void*);
static void didDisplayInsecureContentForFrame(WKBundlePageRef, WKBundleFrameRef, WKTypeRef*, const void*);
static void didRunInsecureContentForFrame(WKBundlePageRef, WKBundleFrameRef, WKTypeRef*, const void*);
+ static bool shouldLoadResourceForFrame(WKBundlePageRef, WKBundleFrameRef, WKURLRef, const void*);
void didStartProvisionalLoadForFrame(WKBundleFrameRef);
void didReceiveServerRedirectForProvisionalLoadForFrame(WKBundleFrameRef);
void didFailProvisionalLoadWithErrorForFrame(WKBundleFrameRef, WKErrorRef);
@@ -79,6 +80,7 @@ private:
void didHandleOnloadEventsForFrame(WKBundleFrameRef);
void didDisplayInsecureContentForFrame(WKBundleFrameRef);
void didRunInsecureContentForFrame(WKBundleFrameRef);
+ bool shouldLoadResourceForFrame(WKBundleFrameRef);
// UI Client
static void willAddMessageToConsole(WKBundlePageRef, WKStringRef message, uint32_t lineNumber, const void* clientInfo);
diff --git a/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp b/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
index 60e3130..aa3dbf4 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
@@ -129,6 +129,9 @@ void LayoutTestController::waitToDumpWatchdogTimerFired()
void LayoutTestController::notifyDone()
{
+ if (!InjectedBundle::shared().isTestRunning())
+ return;
+
if (m_waitToDump && !InjectedBundle::shared().page()->isLoading())
InjectedBundle::shared().page()->dump();
m_waitToDump = false;
diff --git a/Tools/WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro b/Tools/WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro
index f7d0989..c15d1f2 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro
+++ b/Tools/WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro
@@ -3,9 +3,9 @@ TEMPLATE = lib
isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../..
CONFIG(standalone_package) {
- isEmpty(WC_GENERATED_SOURCES_DIR):WC_GENERATED_SOURCES_DIR = $$PWD/../../../../WebCore/generated
+ isEmpty(WC_GENERATED_SOURCES_DIR):WC_GENERATED_SOURCES_DIR = $$PWD/../../../../Source/WebCore/generated
} else {
- isEmpty(WC_GENERATED_SOURCES_DIR):WC_GENERATED_SOURCES_DIR = ../../../../WebCore/generated
+ isEmpty(WC_GENERATED_SOURCES_DIR):WC_GENERATED_SOURCES_DIR = ../../../../Source/WebCore/generated
}
GENERATED_SOURCES_DIR = ../../generated
@@ -44,8 +44,8 @@ HEADERS += \
}
include(../../../../WebKit.pri)
-include(../../../../JavaScriptCore/JavaScriptCore.pri)
-addJavaScriptCoreLib(../../../../JavaScriptCore)
+include(../../../../Source/JavaScriptCore/JavaScriptCore.pri)
+addJavaScriptCoreLib(../../../../Source/JavaScriptCore)
include(../../../../WebKit2/WebKit2.pri)
addWebKit2Lib(../../../../WebKit2)
@@ -54,8 +54,8 @@ INCLUDEPATH += \
$$PWD/.. \
$$PWD/../.. \
$$PWD/../Bindings \
- $$PWD/../../../../JavaScriptCore \
- $$PWD/../../../../JavaScriptCore/wtf \
+ $$PWD/../../../../Source/JavaScriptCore \
+ $$PWD/../../../../Source/JavaScriptCore/wtf \
$$PWD/../../../../WebKit2 \
$$PWD/../../../../WebKit2/Shared \
$$GENERATED_SOURCES_DIR
diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp
index 77213a2..3ea46ee 100644
--- a/Tools/WebKitTestRunner/TestController.cpp
+++ b/Tools/WebKitTestRunner/TestController.cpp
@@ -280,6 +280,9 @@ bool TestController::resetStateToConsistentValues()
{
m_state = Resetting;
+ WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("Reset"));
+ WKContextPostMessageToInjectedBundle(TestController::shared().context(), messageName.get(), 0);
+
// FIXME: This function should also ensure that there is only one page open.
// Reset preferences
@@ -353,6 +356,7 @@ void TestController::run()
break;
}
}
+
}
void TestController::runUntil(bool& done, TimeoutDuration timeoutDuration)
diff --git a/Tools/WebKitTestRunner/qt/WebKitTestRunner.pro b/Tools/WebKitTestRunner/qt/WebKitTestRunner.pro
index cf5d5b8..bcfc159 100644
--- a/Tools/WebKitTestRunner/qt/WebKitTestRunner.pro
+++ b/Tools/WebKitTestRunner/qt/WebKitTestRunner.pro
@@ -14,11 +14,11 @@ include(../../../WebKit.pri)
OBJECTS_DIR = obj/release
}
-DEFINES += USE_SYSTEM_MALLOC
+DEFINES += USE_SYSTEM_MALLOC=1
INCLUDEPATH += \
$$BASEDIR \
- $$BASEDIR/../../JavaScriptCore \
+ $$BASEDIR/../../Source/JavaScriptCore \
$$BASEDIR/../../WebKit2 \
$$BASEDIR/../../WebKit2/Shared \
$$BASEDIR/../../WebKit2/UIProcess/API/qt \
@@ -67,5 +67,5 @@ linux-* {
QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
}
-include(../../../JavaScriptCore/JavaScriptCore.pri)
-addJavaScriptCoreLib(../../../JavaScriptCore)
+include(../../../Source/JavaScriptCore/JavaScriptCore.pri)
+addJavaScriptCoreLib(../../../Source/JavaScriptCore)
diff --git a/Tools/WebKitTestRunner/win/InjectedBundle.vcproj b/Tools/WebKitTestRunner/win/InjectedBundle.vcproj
index cdf1af3..f615d50 100644
--- a/Tools/WebKitTestRunner/win/InjectedBundle.vcproj
+++ b/Tools/WebKitTestRunner/win/InjectedBundle.vcproj
@@ -410,27 +410,27 @@
Name="Derived Sources"
>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSEventSendingController.cpp"
+ RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSEventSendingController.cpp"
>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSEventSendingController.h"
+ RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSEventSendingController.h"
>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSGCController.cpp"
+ RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSGCController.cpp"
>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSGCController.h"
+ RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSGCController.h"
>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSLayoutTestController.cpp"
+ RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSLayoutTestController.cpp"
>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSLayoutTestController.h"
+ RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSLayoutTestController.h"
>
</File>
</Filter>
diff --git a/Tools/WebKitTestRunner/win/InjectedBundleGeneratedCommon.vsprops b/Tools/WebKitTestRunner/win/InjectedBundleGeneratedCommon.vsprops
index 5675aed..303a15f 100644
--- a/Tools/WebKitTestRunner/win/InjectedBundleGeneratedCommon.vsprops
+++ b/Tools/WebKitTestRunner/win/InjectedBundleGeneratedCommon.vsprops
@@ -3,13 +3,13 @@
ProjectType="Visual C++"
Version="8.00"
Name="InjectedBundleGeneratedCommon"
- OutputDirectory="$(WebKitOutputDir)\lib"
- IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\$(ConfigurationName)"
+ OutputDirectory="$(ConfigurationBuildDir)\lib"
+ InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops"
>
<Tool
Name="VCNMakeTool"
- BuildCommandLine="if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;bash build-generated-files.sh &quot;$(WebKitOutputDir)&quot; &quot;$(WebKitLibrariesDir)&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
- ReBuildCommandLine="echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;del /s /q &quot;$(WebKitOutputDir)\obj\InjectedBundle\DerivedSources&quot;&#x0D;&#x0A;set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;bash build-generated-files.sh &quot;$(WebKitOutputDir)&quot; &quot;$(WebKitLibrariesDir)&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
- CleanCommandLine="del /s /q &quot;$(WebKitOutputDir)\obj\InjectedBundle\DerivedSources&quot;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ BuildCommandLine="if exist &quot;$(ConfigurationBuildDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(ConfigurationBuildDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(ConfigurationBuildDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;bash build-generated-files.sh &quot;$(ConfigurationBuildDir)&quot; &quot;$(WebKitLibrariesDir)&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(ConfigurationBuildDir)\buildfailed&quot; del &quot;$(ConfigurationBuildDir)\buildfailed&quot;&#x0D;&#x0A;"
+ ReBuildCommandLine="echo XX$(ProjectName)XX &gt; &quot;$(ConfigurationBuildDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;del /s /q &quot;$(ConfigurationBuildDir)\obj\InjectedBundle\DerivedSources&quot;&#x0D;&#x0A;set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;bash build-generated-files.sh &quot;$(ConfigurationBuildDir)&quot; &quot;$(WebKitLibrariesDir)&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(ConfigurationBuildDir)\buildfailed&quot; del &quot;$(ConfigurationBuildDir)\buildfailed&quot;&#x0D;&#x0A;"
+ CleanCommandLine="del /s /q &quot;$(ConfigurationBuildDir)\obj\InjectedBundle\DerivedSources&quot;&#x0D;&#x0A;if exist &quot;$(ConfigurationBuildDir)\buildfailed&quot; del &quot;$(ConfigurationBuildDir)\buildfailed&quot;&#x0D;&#x0A;"
/>
</VisualStudioPropertySheet>
diff --git a/Tools/WebKitTestRunner/win/InjectedBundlePostBuild.cmd b/Tools/WebKitTestRunner/win/InjectedBundlePostBuild.cmd
index f011495..26707ca 100644
--- a/Tools/WebKitTestRunner/win/InjectedBundlePostBuild.cmd
+++ b/Tools/WebKitTestRunner/win/InjectedBundlePostBuild.cmd
@@ -1 +1 @@
-if exist "%WEBKITOUTPUTDIR%\buildfailed" del "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/Tools/WebKitTestRunner/win/InjectedBundlePreBuild.cmd b/Tools/WebKitTestRunner/win/InjectedBundlePreBuild.cmd
index 3a84c26..a770776 100644
--- a/Tools/WebKitTestRunner/win/InjectedBundlePreBuild.cmd
+++ b/Tools/WebKitTestRunner/win/InjectedBundlePreBuild.cmd
@@ -1,6 +1,6 @@
%SystemDrive%\cygwin\bin\which.exe bash
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%WEBKITOUTPUTDIR%\buildfailed" grep XX%PROJECTNAME%XX "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
-echo XX%PROJECTNAME%XX > "%WEBKITOUTPUTDIR%\buildfailed"
+echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/Tools/WebKitTestRunner/win/WebKitTestRunnerPostBuild.cmd b/Tools/WebKitTestRunner/win/WebKitTestRunnerPostBuild.cmd
index 5d8b6a3..96ed9c7 100644
--- a/Tools/WebKitTestRunner/win/WebKitTestRunnerPostBuild.cmd
+++ b/Tools/WebKitTestRunner/win/WebKitTestRunnerPostBuild.cmd
@@ -1,38 +1,38 @@
-if exist "%WEBKITOUTPUTDIR%\buildfailed" del "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed"
if not defined ARCHIVE_BUILD (if defined PRODUCTION exit /b)
-mkdir 2>NUL "%WEBKITOUTPUTDIR%\bin"
+mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\bin"
if not exist "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.dll" exit /b
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CFNetwork%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CFNetwork%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CFNetwork.resources" "%WEBKITOUTPUTDIR%\bin\CFNetwork.resources"
-xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CoreFoundation.resources" "%WEBKITOUTPUTDIR%\bin\CoreFoundation.resources"
-xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CharacterSets" "%WEBKITOUTPUTDIR%\bin\CharacterSets"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreGraphics%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreGraphics%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\dnssd.dll" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icudt40.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt40.dll" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icudt40%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt40%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.pdb"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.pdb"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icudt42.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt42.dll" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icudt42%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt42%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.pdb"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.pdb"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libxml2%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libxslt%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\SQLite3%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\SQLite3%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\zlib1%LIBRARYCONFIGSUFFIX%.dll" "%WEBKITOUTPUTDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\zlib1%LIBRARYCONFIGSUFFIX%.pdb" "%WEBKITOUTPUTDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CFNetwork%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CFNetwork%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CFNetwork.resources" "%CONFIGURATIONBUILDDIR%\bin\CFNetwork.resources"
+xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CoreFoundation.resources" "%CONFIGURATIONBUILDDIR%\bin\CoreFoundation.resources"
+xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CharacterSets" "%CONFIGURATIONBUILDDIR%\bin\CharacterSets"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreGraphics%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreGraphics%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\dnssd.dll" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icudt40.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt40.dll" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icudt40%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt40%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.pdb"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.pdb"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icudt42.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt42.dll" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icudt42%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt42%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.pdb"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+if exist "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.pdb"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libxml2%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libxslt%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\SQLite3%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\SQLite3%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\zlib1%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
+xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\zlib1%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
diff --git a/Tools/WebKitTestRunner/win/WebKitTestRunnerPreBuild.cmd b/Tools/WebKitTestRunner/win/WebKitTestRunnerPreBuild.cmd
index 3a84c26..a770776 100644
--- a/Tools/WebKitTestRunner/win/WebKitTestRunnerPreBuild.cmd
+++ b/Tools/WebKitTestRunner/win/WebKitTestRunnerPreBuild.cmd
@@ -1,6 +1,6 @@
%SystemDrive%\cygwin\bin\which.exe bash
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%WEBKITOUTPUTDIR%\buildfailed" grep XX%PROJECTNAME%XX "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
-echo XX%PROJECTNAME%XX > "%WEBKITOUTPUTDIR%\buildfailed"
+echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/Tools/WinCELauncher/main.cpp b/Tools/WinCELauncher/main.cpp
index 36c6606..e0f2a51 100644
--- a/Tools/WinCELauncher/main.cpp
+++ b/Tools/WinCELauncher/main.cpp
@@ -25,6 +25,7 @@
#include "config.h"
#include "WebView.h"
#include <windows.h>
+#include <wtf/PassOwnPtr.h>
static const LPCWSTR kMainWindowTitle = L"WebKit for WinCE";
static const LPCWSTR kMainWindowClassName = L"MainWindowClass";
diff --git a/Tools/WinLauncher/WinLauncherCommon.vsprops b/Tools/WinLauncher/WinLauncherCommon.vsprops
index 70c1c6d..9ca0797 100644
--- a/Tools/WinLauncher/WinLauncherCommon.vsprops
+++ b/Tools/WinLauncher/WinLauncherCommon.vsprops
@@ -6,7 +6,7 @@
>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include\WebKit&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)&quot;;&quot;$(IntDir)\Include&quot;;&quot;$(WebKitOutputDir)\obj\WebKit\DerivedSources&quot;"
+ AdditionalIncludeDirectories="&quot;$(ConfigurationBuildDir)\include\WebKit&quot;;&quot;$(ConfigurationBuildDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(ConfigurationBuildDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(ConfigurationBuildDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(ConfigurationBuildDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)&quot;;&quot;$(IntDir)\Include&quot;;&quot;$(ConfigurationBuildDir)\obj\WebKit\DerivedSources&quot;"
UsePrecompiledHeader="2"
/>
<Tool
diff --git a/Tools/WinLauncher/WinLauncherPostBuild.cmd b/Tools/WinLauncher/WinLauncherPostBuild.cmd
index f011495..26707ca 100644
--- a/Tools/WinLauncher/WinLauncherPostBuild.cmd
+++ b/Tools/WinLauncher/WinLauncherPostBuild.cmd
@@ -1 +1 @@
-if exist "%WEBKITOUTPUTDIR%\buildfailed" del "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/Tools/WinLauncher/WinLauncherPreBuild.cmd b/Tools/WinLauncher/WinLauncherPreBuild.cmd
index 3a84c26..a770776 100644
--- a/Tools/WinLauncher/WinLauncherPreBuild.cmd
+++ b/Tools/WinLauncher/WinLauncherPreBuild.cmd
@@ -1,6 +1,6 @@
%SystemDrive%\cygwin\bin\which.exe bash
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%WEBKITOUTPUTDIR%\buildfailed" grep XX%PROJECTNAME%XX "%WEBKITOUTPUTDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
-echo XX%PROJECTNAME%XX > "%WEBKITOUTPUTDIR%\buildfailed"
+echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/Tools/gdb/webkit.py b/Tools/gdb/webkit.py
index 95c3d9c..3f25cc4 100644
--- a/Tools/gdb/webkit.py
+++ b/Tools/gdb/webkit.py
@@ -49,12 +49,18 @@ def ustring_to_string(ptr, length=None):
if length is None:
# Try to guess at the length.
for i in xrange(0, 2048):
- if int((ptr + i).dereference()) == 0:
+ try:
+ if int((ptr + i).dereference()) == 0:
+ length = i
+ break
+ except RuntimeError:
+ # We indexed into inaccessible memory; give up.
length = i
+ extra = u' (gdb hit inaccessible memory)'
break
if length is None:
length = 256
- extra = u' (no trailing NUL found)'
+ extra = u' (gdb found no trailing NUL)'
else:
length = int(length)
@@ -229,15 +235,15 @@ class WTFVectorPrinter:
return 'array'
def add_pretty_printers():
- pretty_printers_dict = {
- re.compile("^WTF::Vector<.*>$"): WTFVectorPrinter,
- re.compile("^WTF::AtomicString$"): WTFAtomicStringPrinter,
- re.compile("^WTF::String$"): WTFStringPrinter,
- re.compile("^WebCore::QualifiedName$"): WebCoreQualifiedNamePrinter,
- re.compile("^JSC::UString$"): JSCUStringPrinter,
- re.compile("^JSC::Identifier$"): JSCIdentifierPrinter,
- re.compile("^JSC::JSString$"): JSCJSStringPrinter,
- }
+ pretty_printers = (
+ (re.compile("^WTF::Vector<.*>$"), WTFVectorPrinter),
+ (re.compile("^WTF::AtomicString$"), WTFAtomicStringPrinter),
+ (re.compile("^WTF::String$"), WTFStringPrinter),
+ (re.compile("^WebCore::QualifiedName$"), WebCoreQualifiedNamePrinter),
+ (re.compile("^JSC::UString$"), JSCUStringPrinter),
+ (re.compile("^JSC::Identifier$"), JSCIdentifierPrinter),
+ (re.compile("^JSC::JSString$"), JSCJSStringPrinter),
+ )
def lookup_function(val):
"""Function used to load pretty printers; will be passed to GDB."""
@@ -245,12 +251,11 @@ def add_pretty_printers():
if type.code == gdb.TYPE_CODE_REF:
type = type.target()
type = type.unqualified().strip_typedefs()
- typename = type.tag
- if not typename:
- return None
- for function, pretty_printer in pretty_printers_dict.items():
- if function.search(typename):
- return pretty_printer(val)
+ tag = type.tag
+ if tag:
+ for function, pretty_printer in pretty_printers:
+ if function.search(tag):
+ return pretty_printer(val)
if type.code == gdb.TYPE_CODE_PTR:
name = str(type.target().unqualified())
diff --git a/Tools/iExploder/htdocs/config.rb b/Tools/iExploder/htdocs/config.rb
deleted file mode 100644
index d9e7e1b..0000000
--- a/Tools/iExploder/htdocs/config.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-# Configuration for iExploder.. not generally tuned.
-
-$HTML_MAX_TAGS = 96;
-$HTML_MAX_ATTRS = 4;
-$CSS_MAX_PROPS = 5;
-
diff --git a/Tools/iExploder/htdocs/cssproperties.in b/Tools/iExploder/htdocs/cssproperties.in
deleted file mode 100644
index d49eb8e..0000000
--- a/Tools/iExploder/htdocs/cssproperties.in
+++ /dev/null
@@ -1,426 +0,0 @@
-# From WebKit svn r66165 (WebCore/css/CSSPropertyNames.in)
--webkit-animation
--webkit-animation-delay
--webkit-animation-direction
--webkit-animation-duration
--webkit-animation-fill-mode
--webkit-animation-iteration-count
--webkit-animation-name
--webkit-animation-play-state
--webkit-animation-timing-function
--webkit-appearance
--webkit-backface-visibility
--webkit-background-clip
--webkit-background-composite
--webkit-background-origin
--webkit-background-size
--webkit-border-end
--webkit-border-end-color
--webkit-border-end-style
--webkit-border-end-width
--webkit-border-fit
--webkit-border-horizontal-spacing
--webkit-border-image
--webkit-border-radius
--webkit-border-start
--webkit-border-start-color
--webkit-border-start-style
--webkit-border-start-width
--webkit-border-vertical-spacing
--webkit-box-align
--webkit-box-direction
--webkit-box-flex
--webkit-box-flex-group
--webkit-box-lines
--webkit-box-ordinal-group
--webkit-box-orient
--webkit-box-pack
--webkit-box-reflect
--webkit-box-shadow
--webkit-color-correction
--webkit-column-break-after
--webkit-column-break-before
--webkit-column-break-inside
--webkit-column-count
--webkit-column-gap
--webkit-column-rule
--webkit-column-rule-color
--webkit-column-rule-style
--webkit-column-rule-width
--webkit-column-span
--webkit-column-width
--webkit-columns
--webkit-font-size-delta
--webkit-font-smoothing
--webkit-highlight
--webkit-hyphenate-character
--webkit-hyphenate-locale
--webkit-hyphens
--webkit-line-break
--webkit-line-clamp
--webkit-margin-bottom-collapse
--webkit-margin-collapse
--webkit-margin-end
--webkit-margin-start
--webkit-margin-top-collapse
--webkit-marquee
--webkit-marquee-direction
--webkit-marquee-increment
--webkit-marquee-repetition
--webkit-marquee-speed
--webkit-marquee-style
--webkit-mask
--webkit-mask-attachment
--webkit-mask-box-image
--webkit-mask-clip
--webkit-mask-composite
--webkit-mask-image
--webkit-mask-origin
--webkit-mask-position
--webkit-mask-position-x
--webkit-mask-position-y
--webkit-mask-repeat
--webkit-mask-repeat-x
--webkit-mask-repeat-y
--webkit-mask-size
--webkit-match-nearest-mail-blockquote-color
--webkit-nbsp-mode
--webkit-padding-end
--webkit-padding-start
--webkit-perspective
--webkit-perspective-origin
--webkit-perspective-origin-x
--webkit-perspective-origin-y
--webkit-rtl-ordering
--webkit-text-decorations-in-effect
--webkit-text-fill-color
--webkit-text-security
--webkit-text-size-adjust
--webkit-text-stroke
--webkit-text-stroke-color
--webkit-text-stroke-width
--webkit-transform
--webkit-transform-origin
--webkit-transform-origin-x
--webkit-transform-origin-y
--webkit-transform-origin-z
--webkit-transform-style
--webkit-transition
--webkit-transition-delay
--webkit-transition-duration
--webkit-transition-property
--webkit-transition-timing-function
--webkit-user-drag
--webkit-user-modify
--webkit-user-select
--webkit-variable-declaration-block
-background
-background-attachment
-background-clip
-background-color
-background-image
-background-origin
-background-position
-background-position-x
-background-position-y
-background-repeat
-background-repeat-x
-background-repeat-y
-background-size
-border
-border-bottom
-border-bottom-color
-border-bottom-left-radius
-border-bottom-right-radius
-border-bottom-style
-border-bottom-width
-border-collapse
-border-color
-border-left
-border-left-color
-border-left-style
-border-left-width
-border-radius
-border-right
-border-right-color
-border-right-style
-border-right-width
-border-spacing
-border-style
-border-top
-border-top-color
-border-top-left-radius
-border-top-right-radius
-border-top-style
-border-top-width
-border-width
-bottom
-box-sizing
-caption-side
-clear
-clip
-color
-content
-counter-increment
-counter-reset
-cursor
-direction
-display
-empty-cells
-float
-font
-font-family
-font-size
-font-stretch
-font-style
-font-variant
-font-weight
-height
-left
-letter-spacing
-line-height
-list-style
-list-style-image
-list-style-position
-list-style-type
-margin
-margin-bottom
-margin-left
-margin-right
-margin-top
-max-height
-max-width
-min-height
-min-width
-opacity
-orphans
-outline
-outline-color
-outline-offset
-outline-style
-outline-width
-overflow
-overflow-x
-overflow-y
-padding
-padding-bottom
-padding-left
-padding-right
-padding-top
-page
-page-break-after
-page-break-before
-page-break-inside
-pointer-events
-position
-quotes
-resize
-right
-size
-src
-table-layout
-text-align
-text-decoration
-text-indent
-text-line-through
-text-line-through-color
-text-line-through-mode
-text-line-through-style
-text-line-through-width
-text-overflow
-text-overline
-text-overline-color
-text-overline-mode
-text-overline-style
-text-overline-width
-text-rendering
-text-shadow
-text-transform
-text-underline
-text-underline-color
-text-underline-mode
-text-underline-style
-text-underline-width
-top
-unicode-bidi
-unicode-range
-vertical-align
-visibility
-white-space
-widows
-width
-word-break
-word-spacing
-word-wrap
-z-index
-zoom
-
-# CSS3 properties - http://www.css3.info/preview/
-background-clip
-background-origin
-border-image
-border-radius
-box-shadow
-box-sizing
-column-count
-column-gap
-column-min-width
-column-rule
-column-rule-color
-column-rule-style
-column-rule-width
-column-space-distribution
-column-span
-column-width
-column-width-policy
-
-# Removed from WebKit between r53119 and r66165
--webkit-binding
-
-# Removed from WebKit between r44660 and r53119
--webkit-border-bottom-left-radius
--webkit-border-bottom-right-radius
--webkit-border-top-left-radius
--webkit-border-top-right-radius
-
-# Removed from WebKit between r24523 and r44660
--webkit-dashboard-region
-scrollbar-3dlight-color
-scrollbar-arrow-color
-scrollbar-darkshadow-color
-scrollbar-face-color
-scrollbar-highlight-color
-scrollbar-shadow-color
-scrollbar-track-color
-
-# All of the following are from khtml's cssproperties.in as of 19oct2004, but are no longer in WebKit
--khtml-border-horizontal-spacing
--khtml-border-vertical-spacing
--khtml-flow-mode
--khtml-marquee
--khtml-marquee-direction
--khtml-marquee-increment
--khtml-marquee-repetition
--khtml-marquee-speed
--khtml-marquee-style
--khtml-text-decoration-color
--khtml-user-input
-scrollbar-base-color
-
-# Internet Explorer 6.0 - http://msdn.microsoft.com/workshop/author/css/reference/attributes.asp
-filter:progid:
-filter:
-ime-mode
-layout-flow
-layout-grid
-layout-grid-char
-layout-grid-line
-layout-grid-mode
-layout-grid-type
-line-break
-overflow-x
-overflow-y
-pagebreakafter
-pagebreakbefore
-ruby-align
-ruby-overhang
-ruby-position
-text-autospace
-text-justify
-text-kashida-space
-text-underline-position
-word-break
-writing-mode
-zoom
-
-# from http://msdn.microsoft.com/library/default.asp?url=/workshop/author/filter/reference/reference.asp
-filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(
-filter:progid:DXImageTransform.Microsoft.Blur(
-filter:progid:DXImageTransform.Microsoft.MotionBlur(
-filter:progid:DXImageTransform.Microsoft.Gradient(
-filter:progid:DXImageTransform.Microsoft.Pixelate(
-
-# From Mozilla Firefox CVS on 2006-04-15 (layout/style/nsCSSPropList.h)
-# grep "^CSS_PROP" nsCSSPropList.h | grep -v "_SVG" |cut -d, -f1 | cut -d\( -f2 | sort
-++ /tmp/moz Tue Apr 18 13:45:30 2006
--moz-appearance
--moz-background-clip
--moz-background-inline-policy
--moz-background-origin
--moz-binding
--moz-border-bottom-colors
--moz-border-left-colors
--moz-border-radius
--moz-border-radius-bottomleft
--moz-border-radius-bottomright
--moz-border-radius-topleft
--moz-border-radius-topright
--moz-border-right-colors
--moz-border-top-colors
--moz-box-align
--moz-box-direction
--moz-box-flex
--moz-box-ordinal-group
--moz-box-orient
--moz-box-pack
--moz-box-sizing
--moz-column-count
--moz-column-gap
--moz-column-width
--moz-float-edge
--moz-force-broken-image-icon
--moz-image-region
--moz-margin-end
--moz-margin-start
--moz-outline-radius
--moz-outline-radius-bottomleft
--moz-outline-radius-bottomright
--moz-outline-radius-topleft
--moz-outline-radius-topright
--moz-padding-end
--moz-padding-start
--moz-user-focus
--moz-user-input
--moz-user-modify
--moz-user-select
--x-background-x-position
--x-background-y-position
-azimuth
-cue
-cue-after
-cue-before
-elevation
-font-size-adjust
-margin-end-value
-margin-left-ltr-source
-margin-left-rtl-source
-margin-left-value
-margin-right-ltr-source
-margin-right-rtl-source
-margin-right-value
-margin-start-value
-marker
-marker-offset
-marks
-padding-end-value
-padding-left-ltr-source
-padding-left-rtl-source
-padding-left-value
-padding-right-ltr-source
-padding-right-rtl-source
-padding-right-value
-padding-start-value
-pause
-pause-after
-pause-before
-pitch
-pitch-range
-richness
-speak
-speak-header
-speak-numeral
-speak-punctuation
-speech-rate
-stress
-voice-family
-volume
diff --git a/Tools/iExploder/htdocs/cssvalues.in b/Tools/iExploder/htdocs/cssvalues.in
deleted file mode 100644
index c19f78f..0000000
--- a/Tools/iExploder/htdocs/cssvalues.in
+++ /dev/null
@@ -1,339 +0,0 @@
-"Trebuchet MS",Verdana, Arial, Helvetica, sans-serif
-#339933 !important !important !important
-#9999999999999999999999999999999999999999999
--5, -5, -5
--9999%
--999999999999999999999999999%
--999999999999999999999999999em
--999999999999999999999999999px
--9999em
--9999px
--webkit-activelink
--webkit-auto
--webkit-baseline-middle
--webkit-body
--webkit-box
--webkit-center
--webkit-focus-ring-color
--webkit-inline-box
--webkit-left
--webkit-link
--webkit-marquee
--webkit-nowrap
--webkit-overlay
--webkit-right
--webkit-text
--webkit-xxx-large
-0
-0 auto
-0 fixed
-2%
-90000000000000000000000000000000000000000000%
-9999999999999999999999
-99999999999999999999999999999999999999 auto
-99999999999999999999999999999999999999999999px
-999999px solid #fff
-above
-absolute
-activeborder
-activecaption
-after-white-space
-ahead
-alternate
-always
-appworkspace
-aqua
-armenian
-attr("ATTRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
-auto
-avoid
-background
-backwards
-baseline
-below
-bidi-override
-black
-blink
-block
-block clear
-block width
-block-axis
-blue
-bold
-bolder
-border
-border-box
-both
-bottom
-break-word
-button
-button-bevel
-buttonface
-buttonhighlight
-buttonshadow
-buttontext
-capitalize
-caption
-captiontext
-caret
-center
-checkbox
-circle
-cjk-ideographic
-clip
-clip:rect(-0px -2000000px -200000px -0px)
-clip:rect(0px 2000000px 200000px 0px)
-close-quote
-collapse
-compact
-condensed
-content
-content-box
-continuous
-crop
-cross
-crosshair
-cursive
-dashed
-decimal
-decimal-leading-zero
-default
-disc
-discard
-dot-dash
-dot-dot-dash
-dotted
-double
-down
-e-resize
-element
-ellipsis
-embed
-end
-expanded
-extra-condensed
-extra-expanded
-fantasy
-fast
-fixed
-forwards
-fuchsia
-georgian
-gray
-graytext
-green
-grey
-groove
-hand
-hebrew
-help
-helvetica, arial, Courier New, Courier, Mono, Blah, Blah, Blah
-hidden
-hide
-higher
-highlight
-highlighttext
-hiragana
-hiragana-iroha
-horizontal
-icon
-ignore
-inactiveborder
-inactivecaption
-inactivecaptiontext
-infinite
-infobackground
-infotext
-inherit
-initial
-inline
-inline-axis
-inline-block
-inline-table
-inset
-inside
-intrinsic
-invert
-italic
-justify
-katakana
-katakana-iroha
-landscape
-large
-larger
-left
-level
-lighter
-lime
-line-through
-list-item
-listbox
-listitem
-logical
-loud
-lower
-lower-alpha
-lower-greek
-lower-latin
-lower-roman
-lowercase
-ltr
-marker
-maroon
-match
-medium
-menu
-menulist
-menulist-button
-menulist-text
-menulist-textfield
-menutext
-message-box
-middle
-min-intrinsic
-mix
-monospace
-move
-multiple
-n-resize
-narrower
-navy
-ne-resize
-no-close
-no-close-quote
-no-open-quote
-no-repeat
-none
-normal
-normal !important
-nowrap
-nw-resize
-oblique
-olive
-once
-open-quote
-orange
-outset
-outside
-overline
-padding
-pointer
-portrait
-pre
-pre-line
-pre-wrap
-purple
-push-button
-radio
-read-only
-read-write
-read-write-plaintext-only
-red
-relative
-repeat
-repeat-x
-repeat-y
-reverse
-rgb(9999999999, 999999999, 9999999999999)
-ridge
-right
-round
-rtl
-run-in
-s-resize
-sans-serif
-scroll
-scrollbar
-scrollbarbutton-down
-scrollbarbutton-left
-scrollbarbutton-right
-scrollbarbutton-up
-scrollbargripper-horizontal
-scrollbargripper-vertical
-scrollbarthumb-horizontal
-scrollbarthumb-vertical
-scrollbartrack-horizontal
-scrollbartrack-vertical
-se-resize
-searchfield
-searchfield-close
-searchfield-results
-semi-condensed
-semi-expanded
-separate
-serif
-show
-silver
-single
-skip-white-space
-slide
-slider-horizontal
-slider-vertical
-sliderthumb-horizontal
-sliderthumb-vertical
-slow
-small
-small-caps
-small-caption
-smaller
-solid
-space
-square
-square-button
-start
-static
-status-bar
-stretch
-sub
-super
-sw-resize
-table
-table-caption
-table-cell
-table-column
-table-column-group
-table-footer-group
-table-header-group
-table-row
-table-row-group
-teal
-text
-text-bottom
-text-top
-textfield
-thick
-thick dashed yellow
-thick dotted blue
-thin
-threeddarkshadow
-threedface
-threedhighlight
-threedlightshadow
-threedshadow
-top
-transparent
-ultra-condensed
-ultra-expanded
-underline
-unfurl
-up
-upper-alpha
-upper-latin
-upper-roman
-uppercase
-vertical
-visible
-visual
-w-resize
-wait
-wave
-white
-wider
-window
-windowframe
-windowtext
-x-large
-x-small
-xx-large
-xx-small
-yellow
diff --git a/Tools/iExploder/htdocs/htmlattrs.in b/Tools/iExploder/htdocs/htmlattrs.in
deleted file mode 100644
index 0dc8116..0000000
--- a/Tools/iExploder/htdocs/htmlattrs.in
+++ /dev/null
@@ -1,373 +0,0 @@
-# From WebKit svn r66165 (WebCore/html/HTMLAttributeNames.in)
-abbr
-accept
-accept_charset
-accesskey
-action
-align
-alink
-alt
-archive
-aria-activedescendant
-aria-atomic
-aria-busy
-aria-checked
-aria-controls
-aria-describedby
-aria-disabled
-aria-dropeffect
-aria-expanded
-aria-flowto
-aria-grabbed
-aria-haspopup
-aria-help
-aria-hidden
-aria-label
-aria-labeledby
-aria-labelledby
-aria-level
-aria-live
-aria-multiselectable
-aria-orientation
-aria-owns
-aria-pressed
-aria-readonly
-aria-relevant
-aria-required
-aria-selected
-aria-valuemax
-aria-valuemin
-aria-valuenow
-aria-valuetext
-async
-autocomplete
-autofocus
-autoplay
-autosave
-axis
-background
-behavior
-bgcolor
-bgproperties
-border
-bordercolor
-cellborder
-cellpadding
-cellspacing
-challenge
-char
-charoff
-charset
-checked
-cite
-class
-classid
-clear
-code
-codebase
-codetype
-color
-cols
-colspan
-compact
-composite
-content
-contenteditable
-controls
-coords
-data
-datetime
-declare
-defer
-dir
-direction
-disabled
-draggable
-enctype
-end
-event
-expanded
-face
-focused
-for
-formnovalidate
-frame
-frameborder
-headers
-height
-hidden
-high
-href
-hreflang
-hspace
-http_equiv
-id
-incremental
-indeterminate
-ismap
-keytype
-label
-lang
-language
-leftmargin
-link
-list
-longdesc
-loop
-loopend
-loopstart
-low
-lowsrc
-manifest
-marginheight
-marginwidth
-max
-maxlength
-mayscript
-media
-method
-min
-multiple
-name
-nohref
-noresize
-noshade
-novalidate
-nowrap
-object
-onabort
-onbeforecopy
-onbeforecut
-onbeforeload
-onbeforepaste
-onbeforeprocess
-onbeforeunload
-onblur
-oncanplay
-oncanplaythrough
-onchange
-onclick
-oncontextmenu
-oncopy
-oncut
-ondblclick
-ondrag
-ondragend
-ondragenter
-ondragleave
-ondragover
-ondragstart
-ondrop
-ondurationchange
-onemptied
-onended
-onerror
-onfocus
-onfocusin
-onfocusout
-onhashchange
-oninput
-oninvalid
-onkeydown
-onkeypress
-onkeyup
-onload
-onloadeddata
-onloadedmetadata
-onloadstart
-onmousedown
-onmousemove
-onmouseout
-onmouseover
-onmouseup
-onmousewheel
-onoffline
-ononline
-onorientationchange
-onpagehide
-onpageshow
-onpaste
-onpause
-onplay
-onplaying
-onpopstate
-onprogress
-onratechange
-onreset
-onresize
-onscroll
-onsearch
-onseeked
-onseeking
-onselect
-onselectstart
-onstalled
-onstorage
-onsubmit
-onsuspend
-ontimeupdate
-ontouchcancel
-ontouchend
-ontouchmove
-ontouchstart
-onunload
-onvolumechange
-onwaiting
-onwebkitanimationend
-onwebkitanimationiteration
-onwebkitanimationstart
-onwebkitbeginfullscreen
-onwebkitendfullscreen
-onwebkittransitionend
-optimum
-pattern
-placeholder
-playcount
-pluginurl
-poster
-precision
-preload
-primary
-profile
-progress
-prompt
-readonly
-rel
-required
-results
-rev
-role
-rows
-rowspan
-rules
-sandbox
-scheme
-scope
-scrollamount
-scrolldelay
-scrolling
-selected
-shape
-size
-sortable
-sortdirection
-span
-speech
-spellcheck
-src
-standby
-start
-step
-style
-summary
-tabindex
-tableborder
-target
-text
-title
-top
-topmargin
-truespeed
-type
-usemap
-valign
-value
-valuetype
-version
-viewsource
-vlink
-vspace
-webkitdirectory
-width
-wrap
-
-# Removed from WebKit between r53119 and r56558
-autobuffer
-
-# Removed from WebKit between r14011 and r53119
-left
-pagex
-pagey
-plain
-pluginpage
-pluginspage
-
-# was in khtml in 2004, but is no longer in WebCore
-accept-charset
-html
-http-equiv
-nosave
-oversrc
-unknown
-visibility
-z-index
-
-# From Mozilla CVS 2006-04-15 (mozilla/layout/style/xbl-marquee)
-bounce
-finish
-onbounce
-onfinish
-onstart
-
-
-# IE specific, from msdn.microsoft.com/workshop/author/dhtml/reference/properties
-acceptcharset
-allowtransparency
-balance
-choff
-datafld
-dataformatas
-datapagesize
-datasrc
-dynsrc
-framespacing
-galleryimg
-hidefocus
-methods
-scroll
-units
-urn
-volume
-
-# From Mozilla CVS 2006-04-15 (mozilla/content/base/src/nsGkAtomList.h)
-# To get these, I used:
-# ggrep -r "Get.*Attr" * | perl -ne 'if (/nsHTMLAtoms::(\w+)/) { \
-# system("grep \\($1, content/base/src/nsGkAtomList.h"); }' \
-# | cut -d\" -f2 | sort -u
-autocheck
-base
-bottommargin
-event
-font-weight
-handler
-layout
-observer
-ping
-point-size
-rightmargin
-variable
-
-# events from Mozilla CVS 2006-04-15 (mozilla/content/base/src/nsGkAtomList.h)
-# cat nsGkAtomList.h | grep GK_ATOM | cut -d\" -f2 | egrep "^on[a-z]+"
-onzoom
-onunderflow
-ontext
-onset
-onpopupshown
-onpopupshowing
-onpopuphiding
-onpopuphidden
-onpaint
-onpageshow
-onpagehide
-onoverflowchanged
-onoverflow
-onget
-ondraggesture
-ondragexit
-ondragdrop
-oncompositionstart
-oncompositionend
-oncommandupdate
-oncommand
-onclose
diff --git a/Tools/iExploder/htdocs/htmltags.in b/Tools/iExploder/htdocs/htmltags.in
deleted file mode 100644
index 319d528..0000000
--- a/Tools/iExploder/htdocs/htmltags.in
+++ /dev/null
@@ -1,155 +0,0 @@
-# From WebKit svn r66165 (WebCore/html/HTMLTagNames.in)
-a
-abbr
-acronym
-address
-applet
-area
-article
-aside
-audio
-b
-base
-basefont
-bdo
-bgsound
-big
-blockquote
-body
-br
-button
-canvas
-caption
-center
-cite
-code
-col
-colgroup
-command
-datagrid
-datalist
-dcell
-dcol
-dd
-del
-details
-dfn
-dir
-div
-dl
-drow
-dt
-em
-embed
-fieldset
-figcaption
-figure
-font
-footer
-form
-frame
-frameset
-h1
-h2
-h3
-h4
-h5
-h6
-head
-header
-hgroup
-hr
-html
-i
-iframe
-image
-img
-input
-ins
-isindex
-kbd
-keygen
-label
-layer
-legend
-li
-link
-listing
-map
-mark
-marquee
-menu
-meta
-meter
-nav
-nobr
-noembed
-noframes
-nolayer
-noscript
-noscript
-object
-ol
-optgroup
-option
-p
-param
-plaintext
-pre
-progress
-q
-rp
-rt
-ruby
-s
-samp
-script
-section
-select
-small
-source
-span
-strike
-strong
-style
-sub
-summary
-sup
-table
-tbody
-td
-textarea
-tfoot
-th
-thead
-title
-tr
-track
-tt
-u
-ul
-var
-video
-wbr
-xmp
-
-# This was in khtml in 10-2004
-ilayer
-
-# Additions from Mozilla CVS, 2006-04-18.
-# mozilla/parser/htmlparser/public/nsHTMLTagList.h
-bgsound
-blink
-multicol
-spacer
-
-# The following tags used to be in Mozilla in 10-2004, now removed
-counter
-endnote
-parsererror
-server
-sound
-sourcetext
-
-# From Internet Explorer - http://msdn.microsoft.com/workshop/author/html/reference/elements.asp
-xml
diff --git a/Tools/iExploder/htdocs/htmlvalues.in b/Tools/iExploder/htdocs/htmlvalues.in
deleted file mode 100644
index d54984f..0000000
--- a/Tools/iExploder/htdocs/htmlvalues.in
+++ /dev/null
@@ -1,35 +0,0 @@
-# Many of the following are from mangleme.cgi.c's make_up_value() function
-#
-*
-_blank
-_parent
-_self
-_top
-about:
-about:plugins
-file:
-http:
-jar:
-javascript:
-left
-top
-%n%n%n%n%n
-ftp:
-right
-wysiwyg:
-bottom
-none
-ldap:
-%i %i
-999999999,9999999,999999999,9999999,999999999,9999999,999999999,9999999,9
-999999999,9999999,9
-999999999,9999999
-true
-false
-_SEARCH
-javascript
-off
-on
-vbscript
-password
-image
diff --git a/Tools/iExploder/htdocs/iexploder.cgi b/Tools/iExploder/htdocs/iexploder.cgi
deleted file mode 100755
index 89e099c..0000000
--- a/Tools/iExploder/htdocs/iexploder.cgi
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/ruby
-# iExploder - Generates bad HTML files to perform QA for web browsers.
-# Developed for the Mozilla Foundation.
-#####################
-#
-# Copyright (c) 2006 Thomas Stromberg <thomas%stromberg.org>
-#
-# This software is provided 'as-is', without any express or implied warranty.
-# In no event will the authors be held liable for any damages arising from the
-# use of this software.
-#
-# Permission is granted to anyone to use this software for any purpose,
-# including commercial applications, and to alter it and redistribute it
-# freely, subject to the following restrictions:
-#
-# 1. The origin of this software must not be misrepresented; you must not
-# claim that you wrote the original software. If you use this software in a
-# product, an acknowledgment in the product documentation would be appreciated
-# but is not required.
-#
-# 2. Altered source versions must be plainly marked as such, and must not be
-# misrepresented as being the original software.
-#
-# 3. This notice may not be removed or altered from any source distribution.
-
-require 'cgi';
-require 'iexploder';
-require 'config';
-
-### THE INTERACTION ##################################
-ie = IExploder.new($HTML_MAX_TAGS, $HTML_MAX_ATTRS, $CSS_MAX_PROPS)
-ie.readTagFiles()
-
-cgi = CGI.new("html4");
-ie.url=ENV['SCRIPT_NAME'] || '?'
-ie.test_num = cgi.params['test'][0].to_i
-ie.subtest_num = cgi.params['subtest'][0].to_i || 0
-ie.random_mode = cgi.params['random'][0]
-ie.lookup_mode = cgi.params['lookup'][0]
-ie.stop_num = cgi.params['stop'][0].to_i || 0
-ie.setRandomSeed
-
-cgi.out('type' => 'text/html') do
- ie.buildPage()
-end
diff --git a/Tools/iExploder/htdocs/iexploder.rb b/Tools/iExploder/htdocs/iexploder.rb
deleted file mode 100644
index eee3e38..0000000
--- a/Tools/iExploder/htdocs/iexploder.rb
+++ /dev/null
@@ -1,337 +0,0 @@
-# iExploder - Generates bad HTML files to perform QA for web browsers.
-# Developed for the Mozilla Foundation.
-#####################
-#
-# Copyright (c) 2006 Thomas Stromberg <thomas%stromberg.org>
-#
-# This software is provided 'as-is', without any express or implied warranty.
-# In no event will the authors be held liable for any damages arising from the
-# use of this software.
-#
-# Permission is granted to anyone to use this software for any purpose,
-# including commercial applications, and to alter it and redistribute it
-# freely, subject to the following restrictions:
-#
-# 1. The origin of this software must not be misrepresented; you must not
-# claim that you wrote the original software. If you use this software in a
-# product, an acknowledgment in the product documentation would be appreciated
-# but is not required.
-#
-# 2. Altered source versions must be plainly marked as such, and must not be
-# misrepresented as being the original software.
-#
-# 3. This notice may not be removed or altered from any source distribution.
-
-$VERSION="1.3.2"
-
-class IExploder
- attr_accessor :test_num, :subtest_num, :lookup_mode, :random_mode, :url
- attr_accessor :offset, :lines, :stop_num
-
- def initialize(max_tags, max_attrs, max_props)
- @htmlMaxTags = max_tags
- @htmlMaxAttrs = max_attrs
- @cssMaxProps = max_props
- @mangledTagTotal = 0
- @stop_num = 0
- end
-
- def setRandomSeed
- if @test_num > 0
- srand(@test_num)
- else
- srand
- end
- end
-
-
- def readTagFiles
- # These if statements are so that mod_ruby doesn't have to reload the files
- # each time
-
- if (! @cssTags)
- @cssTags = readTagFile('cssproperties.in');
- end
-
- if (! @htmlTags)
- @htmlTags = readTagFile('htmltags.in');
- end
- if (! @htmlAttr)
- @htmlAttr = readTagFile('htmlattrs.in');
- end
-
- if (! @htmlValues)
- @htmlValues = readTagFile('htmlvalues.in');
- end
-
- if (! @cssValues)
- @cssValues = readTagFile('cssvalues.in');
- end
-
- end
-
-
- def readTagFile(filename)
- list = Array.new
- File.new(filename).readlines.each { |line|
- line.chop!
-
- # Don't include comments.
- if (line !~ /^# /) && (line.length > 0)
- list << line
- end
- }
- return list
- end
-
- # based on make_up_value, essentially.
- def inventValue
- value = rand(19);
- case value
- when 1..3 then return (@htmlValues[rand(@htmlValues.length)])
- when 4..5 then return (@htmlValues[rand(@htmlValues.length)] + inventValue())
- when 6 then return (@htmlValues[rand(@htmlValues.length)] + "//" + inventValue())
- when 7 then return ''
- # this may return negative argument?
- when 8..10 then return rand(255).chr * (rand(256)+8)
- when 11 then return rand(255).chr * (rand(2048)+8)
- when 12 then return "#" + rand(999999).to_s
- when 13 then return rand(999999).to_s + "%"
- when 14..15 then return "&" + rand(999999).to_s + ";"
- # filters
- when 16 then
- return inventValue() + "=" + inventValue()
-
- # this my return undefined method + for nil:NilClass
- when 17 then return inventValue() + "," + inventValue()
- else
- if rand(5) > 3
- return "-" + rand(999999).to_s
- else
- return rand(999999).to_s
- end
- end
- end
-
- # based on make_up_value, essentially.
- def inventCssValue(tag)
- value = rand(23);
- case value
- when 1..10 then return @cssValues[rand(@cssValues.length)]
- when 11 then return ''
- when 12 then return rand(255).chr * (rand(8192)+8)
- when 13
- length = rand(1024) + 8
- return (rand(255).chr * length) + " " + (rand(255).chr * length) + " " + (rand(255).chr * length)
- when 14 then return (rand(255).chr * (rand(1024)+3)) + "px"
- when 15 then return (rand(255).chr * (rand(1024)+3)) + "em"
- when 16 then return "url(" + inventValue() + ")"
- when 17..18 then return "#" + rand(999999999).to_s
- when 19 then return "-" + rand(99999999).to_s
- else return rand(99999999).to_s;
- end
- end
-
-
- def mangleTag(tag)
- @mangledTagTotal += 1
- out = ''
-
- # 20% chance of closing a tag instead of opening it. This
- # still counts against @mangledTagTotal, however.
- if rand(10) > 8
- out = "</" + tag + ">"
- return out
- end
-
- # we're opening it.
- out = "<" + tag
-
- # forgot the space between the tag and the attributes
- if rand(15) > 1
- out << ' '
- end
-
- attrNum = rand(@htmlMaxAttrs) + 1
-
- 1.upto(attrNum) {
- attr = @htmlAttr[rand(@htmlAttr.length)]
-
- out << attr
-
- # 7.5% of the time we skip the = sign. Don't prefix it
- # if the attribute ends with a ( however.
-
-
- if rand(15) > 1
- out << '='
- end
-
- # sometimes quote it, sometimes not. I doubt the importance
- # of this test, but mangleme-1.2 added it, and adding more
- # random-ness never hurt anything but time. I'll do it less often.
- quote = rand(2)
- if (quote > 1)
- out << "\""
- end
-
- out << inventValue()
-
- # end the quote when you are done
- if (quote > 1)
- out << "\" "
- end
-
- # 5% chance we skip the space at the end of the name
- if rand(20) > 1
- out << ' '
- end
-
- }
-
- # CSS styles!
- if rand(4) > 1
- out << " style=\""
- 1.upto(rand(@cssMaxProps)+1) {
- out << @cssTags[rand(@cssTags.length)]
-
- # very small chance we let the tag run on.
- if rand(50) > 1
- out << ": "
- end
-
- out << inventCssValue(tag)
- # we almost always put the ; there.
- if rand(50) > 1
- out << '; '
- end
- }
- out << "\""
- end
-
- out << ">\n"
-
- # support our local troops!
- if (@subtest_num > 0) && filterSubTest()
- if tag =~ /html|body|head/
- return '<' + tag + '>'
- else
- return "<x-#@mangledTagTotal>\n"
- end
- else
- return out
- end
- end
- #end
-
- def filterSubTest()
- result = 1
- if (@mangledTagTotal >= @offset) && (@mangledTagTotal < (@offset + @lines))
- result = nil
- end
- return result
- end
-
- def nextTestNum()
- if random_mode
- n = rand(99999999)
- else
- if @test_num
- n = @test_num + 1
- else
- n = 1
- end
- end
- return n
- end
-
- # If we are at line 30 with 8 extra lines, there is no point to try line 31
- # with 8 lines as well.. skip back to 1 and bump up the line count.
- def nextSubTestNum()
- if (@offset + @lines) > @htmlMaxTags
- nextNum = ((@lines * 2 -1)) * @htmlMaxTags
- else
- nextNum = @subtest_num + 1
- end
- return nextNum
- end
-
-
- def buildPage
- if (! @test_num) || (@test_num < 1)
- @test_num = 1
- end
- next_num=nextTestNum()
- @lines = @subtest_num.div(@htmlMaxTags) + 1
- @offset = @subtest_num.modulo(@htmlMaxTags)
-
- # building the HTML
- bodyText = mangleTag('html')
- bodyText << "\n<head>\n"
-
- # Only do redirects if lookup=1 has not been specified.
- if (! @lookup_mode) && (@lines <= @htmlMaxTags) && (@stop_num != @test_num)
- newpage = @url + "?"
- if @subtest_num > 0
- newpage << "test=" << @test_num.to_s << "&subtest=" << nextSubTestNum().to_s
- else
- newpage << "test=" << next_num.to_s
- end
-
- if @random_mode
- newpage << "&random=1"
- end
-
- if @stop_num > 0
- newpage << "&stop=" << @stop_num.to_s
- end
-
- bodyText << "\t<META HTTP-EQUIV=\"Refresh\" content=\"0;URL=#{newpage}\">\n"
- # use both techniques, because you never know how you might be corrupting yourself.
- bodyText << "\t<script language=\"javascript\">setTimeout('window.location=\"#{newpage}\"', 1000);</script>\n"
- end
-
- bodyText << "\t" << mangleTag('meta')
- bodyText << "\t" << mangleTag('meta')
- bodyText << "\t" << mangleTag('link')
-
- bodyText << "\t<title>[#@test_num] iExploder #{$VERSION} - #{inventValue()}</title>\n"
- bodyText << "</head>\n\n"
-
- # What tags will we be messing with ######################
- tagList = [ 'body']
-
- # we already have 5 tags?
- 1.upto(@htmlMaxTags - 5 ) { tagList << @htmlTags[rand(@htmlTags.length)] }
-
- tagList.each { |tag|
- bodyText << mangleTag(tag)
- bodyText << inventValue() + "\n"
- }
- bodyText << "</body>\n</html>"
- end
-end
-
-
-
-if $0 == __FILE__
- max=ARGV[0].to_i
- puts "testing #{max} tags"
- test = IExploder.new(max, 5, 5)
- test.readTagFiles()
- test.test_num=1
- test.subtest_num=1
- counter=0
- test.lines=0
-
- while test.lines < max
- test.lines = test.subtest_num.div(max) + 1
- test.offset = test.subtest_num.modulo(max)
- test.subtest_num=test.nextSubTestNum
- counter = counter + 1
- puts "[#{counter}] subtest #{test.subtest_num} is #{test.lines} lines with #{test.offset} offset"
- end
-
- puts "for #{max} tests, you will have #{counter} iterations until #{test.subtest_num}"
-end
-
diff --git a/Tools/iExploder/htdocs/index.html b/Tools/iExploder/htdocs/index.html
deleted file mode 100644
index 849bc6b..0000000
--- a/Tools/iExploder/htdocs/index.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
- <title>iExploder 1.3.2</title>
-</head>
-<body>
-<h2>iExploder: Web Browser Quality Assurance Tester</h2>
-<small>Written by <a href="http://toadstool.se/">Thomas Str&ouml;mberg</a> for the
-<a href="http://www.mozilla.org/firefox/">Mozilla FireFox</a> project</small>
-
-
-<ul>
- <li><a href="iexploder.cgi">Start test sequence from the beginning!</a></li>
- <li><a href="iexploder.cgi?random=1">Start test sequence in random</a></li>
- <li>Start testing from a test number:
- <form method="get" action="iexploder.cgi" name="test">
- Test: <input size="9" name="test" value="1"> Subtest: <input size="2" name="subtest" value="">
- <input value="Start" type="submit">
- </form>
- </li>
-
- <li>Lookup a single test number:
- <form method="get" action="iexploder.cgi" name="test">
- <input type="hidden" name="lookup" value="1">
- Test: <input size="9" name="test" value="1"> Subtest: <input size="2" name="subtest" value="">
- <input value="Lookup" type="submit"></form>
- </li>
-</ul>
-
-If your browser crashes, please contact thomas%stromberg.org!
-
-</body>
-</html>
-
diff --git a/Tools/iExploder/htdocs/webserver.rb b/Tools/iExploder/htdocs/webserver.rb
deleted file mode 100755
index 5176172..0000000
--- a/Tools/iExploder/htdocs/webserver.rb
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/usr/bin/ruby
-# iExploder - Generates bad HTML files to perform QA for web browsers.
-# Developed for the Mozilla Foundation.
-#####################
-#
-# Copyright (c) 2006 Thomas Stromberg <thomas%stromberg.org>
-#
-# This software is provided 'as-is', without any express or implied warranty.
-# In no event will the authors be held liable for any damages arising from the
-# use of this software.
-#
-# Permission is granted to anyone to use this software for any purpose,
-# including commercial applications, and to alter it and redistribute it
-# freely, subject to the following restrictions:
-#
-# 1. The origin of this software must not be misrepresented; you must not
-# claim that you wrote the original software. If you use this software in a
-# product, an acknowledgment in the product documentation would be appreciated
-# but is not required.
-#
-# 2. Altered source versions must be plainly marked as such, and must not be
-# misrepresented as being the original software.
-#
-# 3. This notice may not be removed or altered from any source distribution.
-
-require 'webrick'
-require 'iexploder';
-require 'config';
-
-include WEBrick
-### THE INTERACTION ##################################
-$ie_preload = IExploder.new($HTML_MAX_TAGS, $HTML_MAX_ATTRS, $CSS_MAX_PROPS)
-$ie_preload.readTagFiles()
-$ie_preload.url='/iexploder.cgi'
-
-if ARGV[0]
- port = ARGV[0].to_i
-else
- port = 2000
-end
-
-puts "* iExploder #{$VERSION} will be available at http://localhost:#{port}"
-puts "* Max Tags: #$HTML_MAX_TAGS Max Attrs: #$HTML_MAX_ATTRS Max Props: #$CSS_MAX_PROPS"
-puts
-
-s = HTTPServer.new( :Port => port )
-class IEServlet < HTTPServlet::AbstractServlet
- def do_GET(req, res)
- ie = $ie_preload.dup
- ie.test_num = req.query['test'].to_i
- ie.subtest_num = req.query['subtest'].to_i || 0
- ie.random_mode = req.query['random']
- ie.lookup_mode = req.query['lookup']
- ie.stop_num = req.query['stop'].to_i
- ie.setRandomSeed
-
- res['Content-Type'] = 'text/html'
- res.body = ie.buildPage()
- end
-end
-
-class IEForm < HTTPServlet::AbstractServlet
- def do_GET(req, res)
- res['Content-Type'] = 'text/html'
- res.body = File.open("index.html").readlines.join("\n")
- end
-end
-
-
-
-s.mount("/iexploder.cgi", IEServlet)
-s.mount("/", IEForm)
-trap("INT") { s.shutdown }
-
-s.start
diff --git a/Tools/iExploder/iexploder-1.7.2/tools/update_html_tags_from_sources.sh b/Tools/iExploder/iexploder-1.7.2/tools/update_html_tags_from_sources.sh
index f681743..39707f7 100755
--- a/Tools/iExploder/iexploder-1.7.2/tools/update_html_tags_from_sources.sh
+++ b/Tools/iExploder/iexploder-1.7.2/tools/update_html_tags_from_sources.sh
@@ -25,22 +25,22 @@ fi
if [ -d "$src_dir/WebKit" ]; then
# Tested as of WebKit-r55454
source_name="webkit"
- grep -v "^#" $src_dir/WebCore/css/CSSPropertyNames.in > ${tmp_prefix}.css-properties
- grep -v "^#" $src_dir/WebCore/css/CSSValueKeywords.in > ${tmp_prefix}.css-values
- grep -v "^#" $src_dir/WebCore/html/HTMLAttributeNames.in | cut -d" " -f1 | \
+ grep -v "^#" $src_dir/Source/WebCore/css/CSSPropertyNames.in > ${tmp_prefix}.css-properties
+ grep -v "^#" $src_dir/Source/WebCore/css/CSSValueKeywords.in > ${tmp_prefix}.css-values
+ grep -v "^#" $src_dir/Source/WebCore/html/HTMLAttributeNames.in | cut -d" " -f1 | \
egrep -v "^namespace\w*=" > ${tmp_prefix}.html-attrs
- grep -v "^#" $src_dir/WebCore/html/HTMLTagNames.in | cut -d" " -f1 | \
+ grep -v "^#" $src_dir/Source/WebCore/html/HTMLTagNames.in | cut -d" " -f1 | \
egrep -v "^namespace\w*=" > ${tmp_prefix}.html-tags
- egrep "equalIgnoringCase" $src_dir/WebCore/html/HTML*.cpp | \
+ egrep "equalIgnoringCase" $src_dir/Source/WebCore/html/HTML*.cpp | \
ruby -e '$stdin.readlines.join("").scan(/\"([\w-]+)"/) { |tag| puts tag }' > ${tmp_prefix}.html-values
- grep -r "protocolIs" $src_dir/WebCore/* | ruby -e '$stdin.readlines.join("").scan(/\"([\w-]+)"/) { |tag| puts "#{tag}:" }' > ${tmp_prefix}.protocols
- grep "map->add" $src_dir/WebCore/html/HTMLInputElement.cpp | cut -d\" -f2 >> ${tmp_prefix}.html-values
- grep "AtomicString,.*Header, (" $src_dir/WebCore/platform/network/ResourceResponseBase.cpp | cut -d\" -f2 > ${tmp_prefix}.headers
+ grep -r "protocolIs" $src_dir/Source/WebCore/* | ruby -e '$stdin.readlines.join("").scan(/\"([\w-]+)"/) { |tag| puts "#{tag}:" }' > ${tmp_prefix}.protocols
+ grep "map->add" $src_dir/Source/WebCore/html/HTMLInputElement.cpp | cut -d\" -f2 >> ${tmp_prefix}.html-values
+ grep "AtomicString,.*Header, (" $src_dir/Source/WebCore/platform/network/ResourceResponseBase.cpp | cut -d\" -f2 > ${tmp_prefix}.headers
grep -o -r 'httpHeaderField(".*"' $src_dir | cut -d\" -f2 >> ${tmp_prefix}.headers
- egrep -r '"[-\+a-z]+/[-\+a-z]+"' $src_dir/WebCore | ruby -e '$stdin.readlines.join("").scan(/\"([afimtvwx][\w\+-]+\/[\w\+-]+)"/) { puts $1 }' > ${tmp_prefix}.mime-types
- grep DEFINE_STATIC $src_dir/WebCore/css/CSSSelector.cpp | cut -d\" -f2 \
+ egrep -r '"[-\+a-z]+/[-\+a-z]+"' $src_dir/Source/WebCore | ruby -e '$stdin.readlines.join("").scan(/\"([afimtvwx][\w\+-]+\/[\w\+-]+)"/) { puts $1 }' > ${tmp_prefix}.mime-types
+ grep DEFINE_STATIC $src_dir/Source/WebCore/css/CSSSelector.cpp | cut -d\" -f2 \
> ${tmp_prefix}.css-pseudo
- egrep -o '"@.*?\"' $src_dir/WebCore/css/CSSParser.cpp | cut -d\" -f2 | cut -d"{" -f1 | \
+ egrep -o '"@.*?\"' $src_dir/Source/WebCore/css/CSSParser.cpp | cut -d\" -f2 | cut -d"{" -f1 | \
sed s/" "// > ${tmp_prefix}.css-atrules
elif [ -d "$src_dir/xpcom" ]; then
# Tested as of Sep 1 2010
diff --git a/Tools/iExploder/tools/lasthit.rb b/Tools/iExploder/tools/lasthit.rb
deleted file mode 100755
index b569deb..0000000
--- a/Tools/iExploder/tools/lasthit.rb
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/ruby
-# lasthit, part of iExploder
-#
-# Shows statistics about recent agents that have tested with iExploder.
-# It takes all or part of an apache logfile via stdin, and outputs a list
-# of all the agents who tested within that section, what their last test
-# was, and how many tests they have done.
-
-# The usefulness is finding out where a browser crashed.
-
-
-hostHash = Hash.new
-
-if (ARGV[0])
- file = File.open(ARGV[0])
-else
- file = $stdin
-end
-
-file.readlines.each { |line|
- if (line =~ /^(.*?) .*iexploder.*?test=(\d+).* HTTP.* \"(.*?)\"$/)
- host = $1
- testnum = $2
- agent = $3
- if (! hostHash[host])
- hostHash[host] = Hash.new
- end
- if (! hostHash[host][agent])
- hostHash[host][agent] = Hash.new
- hostHash[host][agent]['total'] = 0
- end
-
- hostHash[host][agent]['last'] = testnum
- if line =~ /subtest=(\d+)/
- hostHash[host][agent]['subtest'] = $1
- else
- hostHash[host][agent]['subtest'] = ''
- end
- hostHash[host][agent]['total'] = hostHash[host][agent]['total'] + 1
- end
-}
-
-printf("%14.14s | %8.8s | %3.3s | %8.8s | %s\n",
- "IP", "Test", "SubTest", "Total", "Agent")
-puts "---------------------------------------------------------------------------"
-hostHash.each_key { |host|
-
- hostHash[host].each_key { |agent|
- printf("%14.14s | %8.8s | %3.3s | %8.8s | %s\n",
- host, hostHash[host][agent]['last'], hostHash[host][agent]['subtest'], hostHash[host][agent]['total'], agent);
- }
-}
-
diff --git a/Tools/iExploder/tools/osx_last_crash.rb b/Tools/iExploder/tools/osx_last_crash.rb
deleted file mode 100755
index 5b62c6d..0000000
--- a/Tools/iExploder/tools/osx_last_crash.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/ruby
-# Gives you information about the most recent crash for each application
-# that has crashed within the last 2 days
-
-$LogDir=ENV['HOME'] + '/Library/Logs/CrashReporter'
-$Days=1
-$StackCount=5
-
-files=`find #$LogDir -mtime -#$Days -type f | grep -v synergy`
-files.each { |filename|
- filename.chop!
- record = 0
- date=''
- stackTrace = []
-
- File.open(filename).readlines.each { |line|
- #puts line
-
- if line =~ /^Date.*(200.*)/
- date = $1
- end
-
- if line =~ /^Thread \d+ Crashed/
- record = 1
- # reset the stack trace
- stackTrace = []
- end
-
- if record
- stackTrace << line
- record = record + 1
-
- # stop recording after $StackCount lines
- if record > ($StackCount + 2)
- record = nil
- end
- end
- }
-
- puts File.basename(filename) + " - " + date
- puts "==================================================="
- stackTrace.each { |line|
- puts line
- }
- puts ""
-}
-
-
diff --git a/Tools/iExploder/tools/showtest.rb b/Tools/iExploder/tools/showtest.rb
deleted file mode 100755
index af6b101..0000000
--- a/Tools/iExploder/tools/showtest.rb
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/ruby
-# showtest.rb - simple CLI interface to grab a testcase
-#####################
-#
-# Copyright (c) 2006 Thomas Stromberg <thomas%stromberg.org>
-#
-# This software is provided 'as-is', without any express or implied warranty.
-# In no event will the authors be held liable for any damages arising from the
-# use of this software.
-#
-# Permission is granted to anyone to use this software for any purpose,
-# including commercial applications, and to alter it and redistribute it
-# freely, subject to the following restrictions:
-#
-# 1. The origin of this software must not be misrepresented; you must not
-# claim that you wrote the original software. If you use this software in a
-# product, an acknowledgment in the product documentation would be appreciated
-# but is not required.
-#
-# 2. Altered source versions must be plainly marked as such, and must not be
-# misrepresented as being the original software.
-#
-# 3. This notice may not be removed or altered from any source distribution.
-
-Dir.chdir('../htdocs')
-require 'iexploder';
-require 'config';
-
-### THE INTERACTION ##################################
-ie = IExploder.new($HTML_MAX_TAGS, $HTML_MAX_ATTRS, $CSS_MAX_PROPS)
-ie.readTagFiles()
-
-if ! ARGV[0]
- puts "syntax: showtest.rb [test#] [subtest#]"
- exit
-end
-
-ie.test_num = ARGV[0].to_i
-ie.subtest_num = ARGV[1].to_i || 0
-ie.lookup_mode = 1
-ie.setRandomSeed
-
-puts ie.buildPage()
diff --git a/Tools/wx/browser/wscript b/Tools/wx/browser/wscript
index 8c22cf6..4fb00b4 100644
--- a/Tools/wx/browser/wscript
+++ b/Tools/wx/browser/wscript
@@ -29,7 +29,7 @@ import sys
from settings import *
-include_paths = [os.path.join(wk_root, 'WebCore', 'bindings', 'wx'),
+include_paths = [os.path.join(wk_root, 'Source', 'WebCore', 'bindings', 'wx'),
os.path.join(wk_root, 'WebKit', 'wx')]
def set_options(opt):
diff --git a/Tools/wx/build/settings.py b/Tools/wx/build/settings.py
index 03c0880..64c2693 100644
--- a/Tools/wx/build/settings.py
+++ b/Tools/wx/build/settings.py
@@ -19,7 +19,7 @@
# 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.
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Common elements of the waf build system shared by all projects.
@@ -48,8 +48,8 @@ if sys.platform.startswith('win'):
else:
wx_root = commands.getoutput('wx-config --prefix')
-jscore_dir = os.path.join(wk_root, 'JavaScriptCore')
-webcore_dir = os.path.join(wk_root, 'WebCore')
+jscore_dir = os.path.join(wk_root, 'Source', 'JavaScriptCore')
+webcore_dir = os.path.join(wk_root, 'Source', 'WebCore')
wklibs_dir = os.path.join(wk_root, 'WebKitLibraries')
common_defines = []
@@ -62,13 +62,13 @@ common_frameworks = []
ports = [
'Brew',
'Chromium',
- 'Gtk',
+ 'Gtk',
'Haiku',
- 'Mac',
+ 'Mac',
'None',
'Qt',
'Safari',
- 'Win',
+ 'Win',
'Wince',
'wx',
]
@@ -97,63 +97,63 @@ jscore_dirs = [
]
webcore_dirs = [
- 'WebCore/accessibility',
- 'WebCore/bindings',
- 'WebCore/bindings/cpp',
- 'WebCore/bindings/generic',
- 'WebCore/bindings/js',
- 'WebCore/bindings/js/specialization',
- 'WebCore/bridge',
- 'WebCore/bridge/c',
- 'WebCore/bridge/jsc',
- 'WebCore/css',
- 'WebCore/DerivedSources',
- 'WebCore/dom',
- 'WebCore/dom/default',
- 'WebCore/editing',
- 'WebCore/fileapi',
- 'WebCore/history',
- 'WebCore/html',
- 'WebCore/html/canvas',
- 'WebCore/html/parser',
- 'WebCore/inspector',
- 'WebCore/loader',
- 'WebCore/loader/appcache',
- 'WebCore/loader/archive',
- 'WebCore/loader/cache',
- 'WebCore/loader/icon',
- 'WebCore/notifications',
- 'WebCore/page',
- 'WebCore/page/animation',
- 'WebCore/platform',
- 'WebCore/platform/animation',
- 'WebCore/platform/graphics',
- 'WebCore/platform/graphics/filters',
- 'WebCore/platform/graphics/transforms',
- 'WebCore/platform/image-decoders',
- 'WebCore/platform/image-decoders/bmp',
- 'WebCore/platform/image-decoders/gif',
- 'WebCore/platform/image-decoders/ico',
- 'WebCore/platform/image-decoders/jpeg',
- 'WebCore/platform/image-decoders/png',
- 'WebCore/platform/image-decoders/webp',
- 'WebCore/platform/mock',
- 'WebCore/platform/network',
- 'WebCore/platform/sql',
- 'WebCore/platform/text',
- 'WebCore/platform/text/transcoder',
- 'WebCore/plugins',
- 'WebCore/rendering',
- 'WebCore/rendering/style',
- 'WebCore/rendering/svg',
- 'WebCore/storage',
- 'WebCore/svg',
- 'WebCore/svg/animation',
- 'WebCore/svg/graphics',
- 'WebCore/svg/graphics/filters',
- 'WebCore/svg/properties',
- 'WebCore/websockets',
- 'WebCore/xml'
+ 'Source/WebCore/accessibility',
+ 'Source/WebCore/bindings',
+ 'Source/WebCore/bindings/cpp',
+ 'Source/WebCore/bindings/generic',
+ 'Source/WebCore/bindings/js',
+ 'Source/WebCore/bindings/js/specialization',
+ 'Source/WebCore/bridge',
+ 'Source/WebCore/bridge/c',
+ 'Source/WebCore/bridge/jsc',
+ 'Source/WebCore/css',
+ 'Source/WebCore/DerivedSources',
+ 'Source/WebCore/dom',
+ 'Source/WebCore/dom/default',
+ 'Source/WebCore/editing',
+ 'Source/WebCore/fileapi',
+ 'Source/WebCore/history',
+ 'Source/WebCore/html',
+ 'Source/WebCore/html/canvas',
+ 'Source/WebCore/html/parser',
+ 'Source/WebCore/inspector',
+ 'Source/WebCore/loader',
+ 'Source/WebCore/loader/appcache',
+ 'Source/WebCore/loader/archive',
+ 'Source/WebCore/loader/cache',
+ 'Source/WebCore/loader/icon',
+ 'Source/WebCore/notifications',
+ 'Source/WebCore/page',
+ 'Source/WebCore/page/animation',
+ 'Source/WebCore/platform',
+ 'Source/WebCore/platform/animation',
+ 'Source/WebCore/platform/graphics',
+ 'Source/WebCore/platform/graphics/filters',
+ 'Source/WebCore/platform/graphics/transforms',
+ 'Source/WebCore/platform/image-decoders',
+ 'Source/WebCore/platform/image-decoders/bmp',
+ 'Source/WebCore/platform/image-decoders/gif',
+ 'Source/WebCore/platform/image-decoders/ico',
+ 'Source/WebCore/platform/image-decoders/jpeg',
+ 'Source/WebCore/platform/image-decoders/png',
+ 'Source/WebCore/platform/image-decoders/webp',
+ 'Source/WebCore/platform/mock',
+ 'Source/WebCore/platform/network',
+ 'Source/WebCore/platform/sql',
+ 'Source/WebCore/platform/text',
+ 'Source/WebCore/platform/text/transcoder',
+ 'Source/WebCore/plugins',
+ 'Source/WebCore/rendering',
+ 'Source/WebCore/rendering/style',
+ 'Source/WebCore/rendering/svg',
+ 'Source/WebCore/storage',
+ 'Source/WebCore/svg',
+ 'Source/WebCore/svg/animation',
+ 'Source/WebCore/svg/graphics',
+ 'Source/WebCore/svg/graphics/filters',
+ 'Source/WebCore/svg/properties',
+ 'Source/WebCore/websockets',
+ 'Source/WebCore/xml',
]
config = get_config(wk_root)
@@ -171,7 +171,7 @@ def get_config():
if build_port == 'wx':
if Options.options.wxpython:
isReleaseCRT = True
-
+
if isReleaseCRT:
waf_configname = waf_configname + ' CRT_MULTITHREADED_DLL'
else:
@@ -179,7 +179,7 @@ def get_config():
return waf_configname
-create_hash_table = wk_root + "/JavaScriptCore/create_hash_table"
+create_hash_table = wk_root + "/Source/JavaScriptCore/create_hash_table"
if building_on_win32:
create_hash_table = get_output('cygpath --unix "%s"' % create_hash_table)
os.environ['CREATE_HASH_TABLE'] = create_hash_table
@@ -206,7 +206,7 @@ def common_set_options(opt):
opt.tool_options('compiler_cxx')
opt.tool_options('compiler_cc')
opt.tool_options('python')
-
+
opt.add_option('--wxpython', action='store_true', default=False, help='Create the wxPython bindings.')
opt.add_option('--wx-compiler-prefix', action='store', default='vc',
help='Specify a different compiler prefix (do this if you used COMPILER_PREFIX when building wx itself)')
@@ -217,20 +217,20 @@ def common_configure(conf):
"""
Configuration used by all targets, called from the target's configure() step.
"""
-
+
conf.env['MSVC_TARGETS'] = ['x86']
-
+
if Options.options.msvc_version and Options.options.msvc_version != '':
print "msvc version = %s" % Options.options.msvc_version
conf.env['MSVC_VERSIONS'] = ['msvc %s.0' % Options.options.msvc_version]
else:
print "msvc not set!"
conf.env['MSVC_VERSIONS'] = ['msvc 9.0', 'msvc 8.0']
-
+
if sys.platform.startswith('cygwin'):
print "ERROR: You must use the Win32 Python from python.org, not Cygwin Python, when building on Windows."
sys.exit(1)
-
+
if sys.platform.startswith('darwin') and build_port == 'wx':
import platform
if platform.release().startswith('10'): # Snow Leopard
@@ -245,13 +245,13 @@ def common_configure(conf):
if Options.options.wxpython:
conf.check_tool('python')
conf.check_python_headers()
-
+
if sys.platform.startswith('darwin'):
conf.check_tool('osx')
-
+
global msvc_version
global msvclibs_dir
-
+
libprefix = ''
if building_on_win32:
@@ -261,12 +261,12 @@ def common_configure(conf):
found_versions = []
for version in found:
found_versions.append(version[0])
-
+
if 'msvc 9.0' in conf.env['MSVC_VERSIONS'] and 'msvc 9.0' in found_versions:
msvc_version = 'msvc2008'
elif 'msvc 8.0' in conf.env['MSVC_VERSIONS'] and 'msvc 8.0' in found_versions:
msvc_version = 'msvc2005'
-
+
msvclibs_dir = os.path.join(wklibs_dir, msvc_version, 'win')
# Disable several warnings which occur many times during the build.
@@ -293,7 +293,7 @@ def common_configure(conf):
if build_port == "wx":
update_wx_deps(conf, wk_root, msvc_version)
-
+
conf.env.append_value('CXXDEFINES', ['BUILDING_WX__=1', 'JS_NO_EXPORT'])
if building_on_win32:
@@ -309,23 +309,23 @@ def common_configure(conf):
if sys.platform.startswith('darwin'):
conf.env['LIB_ICU'] = ['icucore']
-
+
conf.env.append_value('CPPPATH', wklibs_dir)
conf.env.append_value('LIBPATH', wklibs_dir)
-
+
min_version = None
-
+
mac_target = 'MACOSX_DEPLOYMENT_TARGET'
if Options.options.macosx_version != '':
min_version = Options.options.macosx_version
-
+
# WebKit only supports 10.4+, but ppc systems often set this to earlier systems
if not min_version:
min_version = commands.getoutput('sw_vers -productVersion')[:4]
if min_version in ['10.1','10.2','10.3']:
min_version = '10.4'
- os.environ[mac_target] = conf.env[mac_target] = min_version
+ os.environ[mac_target] = conf.env[mac_target] = min_version
sdk_version = min_version
if min_version == "10.4":
@@ -336,20 +336,20 @@ def common_configure(conf):
# on 10.6, we get a strange missing symbol error, and this library seems to
# work fine for wx's purposes.
conf.env.append_value('LIB_WKINTERFACE', ['WebKitSystemInterfaceLeopard'])
-
+
sdkroot = '/Developer/SDKs/MacOSX%s.sdk' % sdk_version
sdkflags = ['-arch', 'i386', '-isysroot', sdkroot]
-
+
conf.env.append_value('CPPFLAGS', sdkflags)
conf.env.append_value('LINKFLAGS', sdkflags)
-
+
conf.env.append_value('CPPPATH_SQLITE3', [os.path.join(wklibs_dir, 'WebCoreSQLite3')])
conf.env.append_value('LIB_SQLITE3', ['WebCoreSQLite3'])
-
+
conf.env.append_value('CXXDEFINES', feature_defines)
if config == 'Release':
conf.env.append_value('CPPDEFINES', 'NDEBUG')
-
+
if building_on_win32:
conf.env.append_value('CPPPATH', [
os.path.join(jscore_dir, 'os-win32'),
@@ -357,45 +357,45 @@ def common_configure(conf):
os.path.join(msvclibs_dir, 'include', 'pthreads'),
os.path.join(msvclibs_dir, 'lib'),
])
-
+
conf.env.append_value('LIB', ['libpng', 'libjpeg', 'pthreadVC2'])
# common win libs
conf.env.append_value('LIB', [
'kernel32', 'user32','gdi32','comdlg32','winspool','winmm',
- 'shell32', 'shlwapi', 'comctl32', 'ole32', 'oleaut32', 'uuid', 'advapi32',
+ 'shell32', 'shlwapi', 'comctl32', 'ole32', 'oleaut32', 'uuid', 'advapi32',
'wsock32', 'gdiplus', 'usp10','version'])
conf.env['LIB_ICU'] = ['icudt', 'icule', 'iculx', 'icuuc', 'icuin', 'icuio', 'icutu']
-
+
#curl
conf.env['LIB_CURL'] = ['libcurl']
-
+
#sqlite3
conf.env['CPPPATH_SQLITE3'] = [os.path.join(msvclibs_dir, 'include', 'SQLite')]
conf.env['LIB_SQLITE3'] = ['sqlite3']
-
+
#libxml2
conf.env['LIB_XML'] = ['libxml2']
-
+
#libxslt
conf.env['LIB_XSLT'] = ['libxslt']
- else:
+ else:
if build_port == 'wx':
port_uses['wx'].append('PTHREADS')
conf.env.append_value('LIB', ['jpeg', 'png', 'pthread'])
conf.env.append_value('LIBPATH', os.path.join(wklibs_dir, 'unix', 'lib'))
conf.env.append_value('CPPPATH', os.path.join(wklibs_dir, 'unix', 'include'))
conf.env.append_value('CXXFLAGS', ['-fPIC', '-DPIC'])
-
+
conf.check_cfg(path=get_path_to_wxconfig(), args='--cxxflags --libs', package='', uselib_store='WX', mandatory=True)
-
+
conf.check_cfg(msg='Checking for libxslt', path='xslt-config', args='--cflags --libs', package='', uselib_store='XSLT', mandatory=True)
conf.check_cfg(path='xml2-config', args='--cflags --libs', package='', uselib_store='XML', mandatory=True)
if sys.platform.startswith('darwin') and min_version and min_version == '10.4':
conf.check_cfg(path=os.path.join(wklibs_dir, 'unix', 'bin', 'curl-config'), args='--cflags --libs', package='', uselib_store='CURL', mandatory=True)
else:
conf.check_cfg(path='curl-config', args='--cflags --libs', package='', uselib_store='CURL', mandatory=True)
-
+
if not sys.platform.startswith('darwin'):
conf.check_cfg(package='cairo', args='--cflags --libs', uselib_store='WX', mandatory=True)
conf.check_cfg(package='pango', args='--cflags --libs', uselib_store='WX', mandatory=True)