diff options
author | Ben Murdoch <benm@google.com> | 2010-07-22 15:37:06 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-07-27 10:20:25 +0100 |
commit | 967717af5423377c967781471ee106e2bb4e11c8 (patch) | |
tree | 1e701dc0a12f7f07cce1df4a7681717de77a211b /WebKitTools | |
parent | dcc30a9fca45f634b1d3a12b276d3a0ccce99fc3 (diff) | |
download | external_webkit-967717af5423377c967781471ee106e2bb4e11c8.zip external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.gz external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.bz2 |
Merge WebKit at r63859 : Initial merge by git.
Change-Id: Ie8096c63ec7c991c9a9cba8bdd9c3b74a3b8ed62
Diffstat (limited to 'WebKitTools')
114 files changed, 4559 insertions, 689 deletions
diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json index bda3921..93f1c11 100644 --- a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json +++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json @@ -1,8 +1,6 @@ { "slaves": [ { "name": "test-slave", "platform": "*" }, - { "name": "bdash-slave-2", "platform": "mac-tiger" }, - { "name": "apple-xserve-1", "platform": "mac-leopard" }, { "name": "apple-xserve-2", "platform": "mac-leopard" }, { "name": "apple-xserve-3", "platform": "mac-leopard" }, @@ -46,12 +44,7 @@ { "name": "google-new-tests", "platform": "mac-leopard" } ], - "builders": [ { "name": "Tiger Intel Release", "type": "BuildAndTest", "builddir": "tiger-intel-release", - "platform": "mac-tiger", "configuration": "release", "architectures": ["i386"], - "slavenames": ["bdash-slave-2", "test-slave"] - }, - - { "name": "Leopard Intel Release (Build)", "type": "Build", "builddir": "leopard-intel-release", + "builders": [ { "name": "Leopard Intel Release (Build)", "type": "Build", "builddir": "leopard-intel-release", "platform": "mac-leopard", "configuration": "release", "architectures": ["i386"], "triggers": ["leopard-intel-release-tests"], "slavenames": ["apple-xserve-1", "apple-xserve-2", "test-slave"] @@ -193,7 +186,7 @@ ], "schedulers": [ { "type": "AnyBranchScheduler", "name": "trunk", "branches": ["trunk"], "treeStableTimer": 45.0, - "builderNames": ["Tiger Intel Release", "Leopard Intel Release (Build)", "Leopard Intel Debug (Build)", + "builderNames": ["Leopard Intel Release (Build)", "Leopard Intel Debug (Build)", "SnowLeopard Intel Release (Build)", "SnowLeopard Intel Leaks", "Windows Release (Build)", "Windows Debug (Build)", "GTK Linux 32-bit Release", "GTK Linux 32-bit Debug", "GTK Linux 64-bit Debug", "GTK Linux 64-bit Release", diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg index c36c5c7..e1eaa71 100644 --- a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg +++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg @@ -65,7 +65,7 @@ class InstallChromiumDependencies(shell.ShellCommand): name = "gclient" description = ["updating chromium dependencies"] descriptionDone = ["updated chromium dependencies"] - command = ["perl", "./WebKitTools/Scripts/update-webkit-chromium"] + command = ["perl", "./WebKitTools/Scripts/update-webkit-chromium", "--force"] haltOnFailure = True @@ -238,7 +238,7 @@ class RunWebKitTests(shell.Test): class NewRunWebKitTests(RunWebKitTests): - command = ["perl", "./WebKitTools/Scripts/new-run-webkit-tests", "--noshow-results", + command = ["python", "./WebKitTools/Scripts/new-run-webkit-tests", "--noshow-results", "--verbose", "--results-directory", "layout-test-results", WithProperties("--%(configuration)s"), "--use-drt"] diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/index.html b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/index.html index d819cc7..c6d2343 100644 --- a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/index.html +++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/index.html @@ -18,6 +18,7 @@ <li><a href="buildslaves">Buildslave</a> information</li> <li><a href="http://webkit-commit-queue.appspot.com/">Commit Queue Status</a> information.</li> <li><a href="changes">ChangeSource</a> information.</li> + <li><a href="results">Test Results</a></li> </ul> </body> </html> diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog index b6233c4..1423d88 100644 --- a/WebKitTools/ChangeLog +++ b/WebKitTools/ChangeLog @@ -1,3 +1,1180 @@ +2010-07-21 Kevin Ollivier <kevino@theolliviers.com> + + [wx] Build fix, adding the WebCore/bindings/generic dir to the list of build dirs. + + * wx/build/settings.py: + +2010-07-21 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Patch for https://bugs.webkit.org/show_bug.cgi?id=42539 + WebKitTestRunner needs to support printing ALERT, PROMPT and CONFIRM messages + + * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: + (WTR::InjectedBundlePage::InjectedBundlePage): + (WTR::InjectedBundlePage::_willAddMessageToConsole): + (WTR::InjectedBundlePage::_willSetStatusbarText): + (WTR::InjectedBundlePage::_willRunJavaScriptAlert): + (WTR::InjectedBundlePage::_willRunJavaScriptConfirm): + (WTR::InjectedBundlePage::_willRunJavaScriptPrompt): + (WTR::InjectedBundlePage::willAddMessageToConsole): + (WTR::InjectedBundlePage::willSetStatusbarText): + (WTR::InjectedBundlePage::willRunJavaScriptAlert): + (WTR::InjectedBundlePage::willRunJavaScriptConfirm): + (WTR::InjectedBundlePage::willRunJavaScriptPrompt): + * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: + +2010-07-21 Adam Roben <aroben@apple.com> + + Give InjectedBundle our standard set of configurations (minus the + *_Cairo variants) + + InjectedBundle's Debug_All configuration was the same as is Debug + configuration, and it was missing a Debug_Internal configuration. + + Fixes <http://webkit.org/b/42749> InjectedBundle's build + configurations are screwy + + Reviewed by Darin Adler. + + * WebKitTestRunner/InjectedBundle/win/InjectedBundle.vcproj: Added + debug_internal.vsprops and debug_all.vsprops to the Debug_All + configuration. Added a Debug_Internal configuration. + + * WebKitTestRunner/WebKitTestRunner.sln: Build the Debug_Internal + variant of InjectedBundle when we're using the Debug_Internal solution + configuration. + +2010-07-21 Adam Roben <aroben@apple.com> + + Move InjectedBundle's settings to a vsprops file + + This will make it easier to change settings for all configurations, + and to add new configurations. + + Fixes <http://webkit.org/b/42748> InjectedBundle should use vsprops + files + + Reviewed by Darin Adler. + + * WebKitTestRunner/Configurations/InjectedBundleCommon.vsprops: Added. + Moved settings here... + * WebKitTestRunner/InjectedBundle/win/InjectedBundle.vcproj: ...from + here. + +2010-07-21 Adam Roben <aroben@apple.com> + + Give MiniBrowser our standard set of configurations (minus the *_Cairo + variants) + + MiniBrowser already had a configuration called "Release", but it was + using mostly the same settings as Debug. And its Debug configuration + was using the settings that Debug_Internal should be using. + + Fixes <http://webkit.org/b/42746> MiniBrowser's build configurations + are screwy + + Reviewed by Darin Adler. + + * MiniBrowser/MiniBrowser.vcproj: Removed debug_internal.vsprops from + the Debug configuration. Remove debug.vsprops and + debug_internal.vsprops from the Release configuration and replace them + with release.vsprops. Added Debug_Internal and Debug_All + configurations. + +2010-07-21 Adam Roben <aroben@apple.com> + + Move MiniBrowser's settings to a vsprops file + + This will make it easier to change settings for all configurations, + and to add new configurations. + + MiniBrowser should use vsprops files + https://bugs.webkit.org/show_bug.cgi?id=42745 + + Reviewed by Darin Adler. + + * MiniBrowser/Configurations/MiniBrowserCommon.vsprops: Added. Moved + settings here... + * MiniBrowser/MiniBrowser.vcproj: ...from here. + +2010-07-21 Adam Roben <aroben@apple.com> + + Fix compiler warnings when building MiniBrowser + + Also cleaned up the .vcproj a bit. + + Fixes <http://webkit.org/b/42743>. + + Reviewed by Darin Adler. + + * MiniBrowser/MiniBrowser.vcproj: Removed all settings that are + already defined in .vsprops files. This also fixes a warning about + /EDITANDCONTINUE being incompatible with /SAFESEH. + + * MiniBrowser/win/MiniBrowser.rc: Replaced afxres.h with winresrc.h so + that we stop getting warnings about ID_FILE_OPEN and ID_FILE_CLOSE + being redefined. (I think this will also get us closer to building + with VC++ Express.) + +2010-07-20 Sam Weinig <sam@webkit.org> + + Reviewed by Jon Honeycutt. + + Fix obvious typo. + + * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: + (WTR::InjectedBundlePage::setStatusbarText): Need to call ->data() to actually get the string value. + +2010-07-20 Tony Chang <tony@chromium.org> + + Reviewed by Kent Tamura. + + [chromium] by default, dumpAsText should disable pixel results + https://bugs.webkit.org/show_bug.cgi?id=42715 + + * DumpRenderTree/chromium/LayoutTestController.cpp: + (LayoutTestController::dumpAsText): disable pixel results, but allow JS to override + +2010-07-20 Adam Roben <aroben@apple.com> + + Windows build fix + + * MiniBrowser/MiniBrowser.vcproj: Link against the new, shiny + WebKit.lib instead of the old, dusty WebKit2.lib. + +2010-07-20 Adam Roben <aroben@apple.com> + + Stop linking WebKitTestRunner against getopt + + Use of getopt was removed in r63700. + + Fixes <http://webkit.org/b/42714> WebKitTestRunner links against + getopt, but doesn't need to + + Reviewed by Sam Weinig. + + * WebKitTestRunner/win/WebKitTestRunner.vcproj: Removed getopt.lib + from all configurations. + +2010-07-20 Adam Roben <aroben@apple.com> + + Make run-webkit-tests --webkit-test-runner "work" on Windows + + WebKitTestRunner crashes on launch, but at least the scripts build and + launch it! + + Fixes <http://webkit.org/b/42709> run-webkit-tests + --webkit-test-runner bails with an error on Windows + + Reviewed by Anders Carlsson. + + * Scripts/build-webkittestrunner: Build WebKitTestRunner.sln on + Windows. + * WebKitTestRunner/WebKitTestRunner.sln: Added. Contains the following + projects (from first-built to last-built): FindSafari, ImageDiff, + InjectedBundleGenerated, InjectedBundle, WebKitTestRunner. + +2010-07-20 Adam Roben <aroben@apple.com> + + Change build-webkit back to building WebKit.sln on Windows + + WebKit.sln builds all the same projects as WebKit2.sln, and the latter + is being removed. + + Rubber-stamped in advance by Steve Falkenburg. + + * Scripts/build-webkit: + +2010-07-20 Adam Roben <aroben@apple.com> + + Windows build fix + + * MiniBrowser/win/BrowserWindow.cpp: Added missing #include. + +2010-07-20 Joseph Pecoraro <joepeck@webkit.org> + + Reviewed by Geoffrey Garen. + + WebScriptObject Should Allow Safely Checking For Key Existence + https://bugs.webkit.org/show_bug.cgi?id=42613 + + Normal ObjCController workflow for a WebScriptObject test. + + * DumpRenderTree/mac/ObjCController.m: + (+[ObjCController isSelectorExcludedFromWebScript:]): + (+[ObjCController webScriptNameForSelector:]): + (-[ObjCController testHasWebScriptKey:]): + +2010-07-20 Chris Marrin <cmarrin@apple.com> + + Reviewed by Simon Fraser. + + https://bugs.webkit.org/show_bug.cgi?id=42118 + Disable compositing/webgl tests if WebGL is not enabled + + * Scripts/old-run-webkit-tests: + +2010-07-20 Anton Muhin <antonm@chromium.org> + + Reviewed by Darin Adler. + + Print additional information about exception if failed to connect to apache (in verbose mode). + https://bugs.webkit.org/show_bug.cgi?id=42627 + + * Scripts/webkitpy/layout_tests/port/http_server_base.py: + +2010-07-20 Tony Chang <tony@chromium.org> + + Reviewed by David Levin. + + [chromium] only pass --force to gclient sync if explicitly stated + https://bugs.webkit.org/show_bug.cgi?id=42581 + + * BuildSlaveSupport/build.webkit.org-config/master.cfg: bots should + always pass --force since it's hard to do manual cleanups + * Scripts/update-webkit-chromium: only pass --force if --force is + passed in + +2010-07-19 Anders Carlsson <andersca@apple.com> + + Fix build. + + * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: + Paths of generated files should be relative to the build product. + +2010-07-19 Daniel Bates <dbates@rim.com> + + Reviewed by Adam Roben. + + [Win] Implement LayoutTestController::markerTextForListItem() + https://bugs.webkit.org/show_bug.cgi?id=37930 + + Implements DRT support for markerTextForListItem in the Windows port. + + * DumpRenderTree/win/LayoutTestControllerWin.cpp: + (LayoutTestController::markerTextForListItem): Implemented. + +2010-07-19 Jessie Berlin <jberlin@apple.com> + + Windows build fix. Unreviewed. + + * WebKitTestRunner/win/TestControllerWin.cpp: + (WTR::TestController::initializeTestPluginPath): + +2010-07-19 Sam Weinig <sam@webkit.org> + + Reviewed by Jon Honeycutt. + + Remove dependency on getopt from WebKitTestRunner. + + - Simplify options parsing and eliminate unused options. + + * WebKitTestRunner/TestController.cpp: + (WTR::TestController::TestController): + (WTR::TestController::initialize): + * WebKitTestRunner/TestController.h: + (WTR::TestController::testPluginPath): + * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: + * WebKitTestRunner/mac/TestControllerMac.mm: + (WTR::TestController::platformInitialize): + (WTR::TestController::initializeTestPluginPath): + * WebKitTestRunner/win/TestControllerWin.cpp: + (WTR::TestController::platformInitialize): + (WTR::TestController::initializeTestPluginPath): + +2010-07-19 Diego Gonzalez <diegohcg@webkit.org> + + Reviewed by Antonio Gomes. + + [Qt] MiniBrowser: Progress indication at address bar + https://bugs.webkit.org/show_bug.cgi?id=42565 + + Make possible to see load progress at address bar based on + QtTestBrowser solution + + * MiniBrowser/qt/BrowserWindow.cpp: + (BrowserWindow::BrowserWindow): + (BrowserWindow::loadProgress): + * MiniBrowser/qt/BrowserWindow.h: + +2010-07-19 Diego Gonzalez <diegohcg@webkit.org> + + Reviewed by Antonio Gomes. + + [Qt] Add MiniBrowser features: urlChanged, titleChanged and from user input load + https://bugs.webkit.org/show_bug.cgi?id=42564 + + * MiniBrowser/qt/BrowserWindow.cpp: + (BrowserView::load): + (BrowserWindow::BrowserWindow): + (BrowserWindow::titleChanged): + (BrowserWindow::urlChanged): + * MiniBrowser/qt/BrowserWindow.h: + +2010-07-19 Sam Weinig <weinig@apple.com> + + Reviewed by Adam Roben. + + Patch for https://bugs.webkit.org/show_bug.cgi?id=42532 + Auto-generate the JS bindings for WebKitTestRunner's script objects. + + * WebKitTestRunner/Configurations/Base.xcconfig: + * WebKitTestRunner/Configurations/DebugRelease.xcconfig: + * WebKitTestRunner/DerivedSources.make: Added. + * WebKitTestRunner/ForwardingHeaders/wtf/GetPtr.h: Added. + * WebKitTestRunner/InjectedBundle/Bindings: Added. + * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: Added. + * WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h: Added. + (WTR::JSWrappable::~JSWrappable): + * WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp: Added. + (WTR::JSWrapper::wrap): + (WTR::JSWrapper::unwrap): + (WTR::unwrapObject): + (WTR::JSWrapper::initialize): + (WTR::JSWrapper::finalize): + * WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h: Added. + (WTR::toJS): + * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl: Added. + * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: + (WTR::InjectedBundlePage::dump): + (WTR::InjectedBundlePage::setStatusbarText): + * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: + (WTR::LayoutTestController::wrapperClass): + (WTR::LayoutTestController::waitUntilDone): + (WTR::LayoutTestController::makeWindowObject): + * WebKitTestRunner/InjectedBundle/LayoutTestController.h: + (WTR::LayoutTestController::shouldDumpAsText): + (WTR::LayoutTestController::dumpAsText): + (WTR::LayoutTestController::shouldDumpStatusCallbacks): + (WTR::LayoutTestController::dumpStatusCallbacks): + (WTR::LayoutTestController::waitToDump): + (WTR::LayoutTestController::testRepaint): + (WTR::LayoutTestController::repaintSweepHorizontally): + * WebKitTestRunner/InjectedBundle/win/InjectedBundle.vcproj: + * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: + * WebKitTestRunner/win/InjectedBundleGenerated.vcproj: Added. + * WebKitTestRunner/win/build-generated-files.sh: Added. + +2010-07-19 Mark Rowe <mrowe@apple.com> + + Clean up the buildbot configuration a little. + + * BuildSlaveSupport/build.webkit.org-config/config.json: + +2010-07-19 Chris Marrin <cmarrin@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=42118 + Disable WebGL on Leopard for now. + + LayoutTests fail on some graphics hardware on Leopard because one of the features we use, + GL_ARB_framebuffer_object, is not universally available in Leopard like it is in + SnowLeopard. This will allow LayoutTests to pass on Leopard until we add logic to use a + software OpenGL driver on machines without this support. + + * Scripts/build-webkit: + +2010-07-19 Simon Fraser <simon.fraser@apple.com> + + Reviewed by Brady Eidson. + + Fix MiniBrowser to update URL as you browse + https://bugs.webkit.org/show_bug.cgi?id=42591 + + Hook up various loading notifications to update the URL bar in MiniBrowser. + + * MiniBrowser/mac/BrowserWindowController.m: + (_didStartProvisionalLoadForFrame): + (_didReceiveServerRedirectForProvisionalLoadForFrame): + (_didFailProvisionalLoadWithErrorForFrame): + (_didCommitLoadForFrame): + (_didFailLoadWithErrorForFrame): + (-[BrowserWindowController updateProvisionalURLForFrame:]): + (-[BrowserWindowController didStartProvisionalLoadForFrame:]): + (-[BrowserWindowController didReceiveServerRedirectForProvisionalLoadForFrame:]): + (-[BrowserWindowController didFailProvisionalLoadWithErrorForFrame:]): + (-[BrowserWindowController didFailLoadWithErrorForFrame:]): + (-[BrowserWindowController didCommitLoadForFrame:]): + +2010-07-19 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=42586 + Log all canceled authentication attempts in DumpRenderTree + + * DumpRenderTree/mac/ResourceLoadDelegate.mm: + (-[ResourceLoadDelegate webView:resource:didReceiveAuthenticationChallenge:fromDataSource:]): + * DumpRenderTree/win/ResourceLoadDelegate.cpp: + (ResourceLoadDelegate::didReceiveAuthenticationChallenge): + It's important to know whether an auth sheet appeared. Added logging to "no preset credentials" + case. + +2010-07-19 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r63671. + http://trac.webkit.org/changeset/63671 + https://bugs.webkit.org/show_bug.cgi?id=42575 + + broke windows (Requested by weinig on #webkit). + + * WebKitTestRunner/Configurations/Base.xcconfig: + * WebKitTestRunner/Configurations/DebugRelease.xcconfig: + * WebKitTestRunner/DerivedSources.make: Removed. + * WebKitTestRunner/ForwardingHeaders/wtf/GetPtr.h: Removed. + * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: Removed. + * WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h: Removed. + * WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp: Removed. + * WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h: Removed. + * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl: Removed. + * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: + (WTR::InjectedBundlePage::dump): + (WTR::InjectedBundlePage::setStatusbarText): + * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: + (WTR::LayoutTestController::setWaitToDump): + (WTR::displayCallback): + (WTR::dumpAsTextCallback): + (WTR::dumpStatusCallbacksCallback): + (WTR::waitUntilDoneCallback): + (WTR::notifyDoneCallback): + (WTR::numberOfActiveAnimationsCallback): + (WTR::pauseAnimationAtTimeOnElementWithIdCallback): + (WTR::repaintSweepHorizontallyCallback): + (WTR::testRepaintCallback): + (WTR::layoutTestControllerObjectFinalize): + (WTR::LayoutTestController::makeWindowObject): + (WTR::LayoutTestController::getJSClass): + (WTR::LayoutTestController::staticFunctions): + * WebKitTestRunner/InjectedBundle/LayoutTestController.h: + (WTR::LayoutTestController::dumpAsText): + (WTR::LayoutTestController::setDumpAsText): + (WTR::LayoutTestController::dumpStatusCallbacks): + (WTR::LayoutTestController::setDumpStatusCallbacks): + (WTR::LayoutTestController::setTestRepaint): + (WTR::LayoutTestController::setTestRepaintSweepHorizontally): + * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: + +2010-07-19 Sam Weinig <sam@webkit.org> + + Reviewed by Adam Roben. + + Patch for https://bugs.webkit.org/show_bug.cgi?id=42532 + Auto-generate the JS bindings for WebKitTestRunner's script objects. + + * WebKitTestRunner/Configurations/Base.xcconfig: + * WebKitTestRunner/Configurations/DebugRelease.xcconfig: + * WebKitTestRunner/DerivedSources.make: Added. + * WebKitTestRunner/ForwardingHeaders/wtf/GetPtr.h: Added. + * WebKitTestRunner/InjectedBundle/Bindings: Added. + * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: Added. + * WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h: Added. + (WTR::JSWrappable::~JSWrappable): + * WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp: Added. + (WTR::JSWrapper::wrap): + (WTR::JSWrapper::unwrap): + (WTR::unwrapObject): + (WTR::JSWrapper::initialize): + (WTR::JSWrapper::finalize): + * WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h: Added. + (WTR::toJS): + * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl: Added. + * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: + (WTR::InjectedBundlePage::dump): + (WTR::InjectedBundlePage::setStatusbarText): + * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: + (WTR::LayoutTestController::wrapperClass): + (WTR::LayoutTestController::waitUntilDone): + (WTR::LayoutTestController::makeWindowObject): + * WebKitTestRunner/InjectedBundle/LayoutTestController.h: + (WTR::LayoutTestController::shouldDumpAsText): + (WTR::LayoutTestController::dumpAsText): + (WTR::LayoutTestController::shouldDumpStatusCallbacks): + (WTR::LayoutTestController::dumpStatusCallbacks): + (WTR::LayoutTestController::waitToDump): + (WTR::LayoutTestController::testRepaint): + (WTR::LayoutTestController::repaintSweepHorizontally): + * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: + +2010-07-19 Tony Chang <tony@chromium.org> + + Reviewed by David Levin. + + fix chromium linux compile on ubuntu maverick + https://bugs.webkit.org/show_bug.cgi?id=42528 + + * Scripts/webkitdirs.pm: add a chomp to eat a newline that breaks the make command line + +2010-07-19 Adam Roben <aroben@apple.com> + + When dumping a response's MIME type, print its URL's last path + component rather than its suitable-for-test-result form + + This matches the Mac behavior. + + Fixes <http://webkit.org/b/42276> + http/tests/loading/preload-slow-loading.php and + http/tests/mime/uppercase-mime-type.html fail on Windows + + Reviewed by Anders Carlsson. + + * DumpRenderTree/win/DumpRenderTree.cpp: + (urlSuitableForTestResult): Moved code to actually extract the last + path component from here... + (lastPathComponent): ...to here. + + * DumpRenderTree/win/DumpRenderTreeWin.h: Added lastPathComponent. + + * DumpRenderTree/win/ResourceLoadDelegate.cpp: + (ResourceLoadDelegate::didReceiveResponse): Use the URL's last path + component, rather than its suitable-for-test-result form, to match + Mac. + +2010-07-19 Anders carlsson <andersca@apple.com> + + Reviewed by Adam Roben. + + WebKit2 does not have application cache + https://bugs.webkit.org/show_bug.cgi?id=42552 + + * WebKitTestRunner/TestInvocation.cpp: + (WTR::TestInvocation::resetPreferencesToConsistentValues): + Set up default preferences. Right now just enables the web application cache. + + (WTR::TestInvocation::invoke): + Call resetPreferencesToConsistentValues. + + * WebKitTestRunner/TestInvocation.h: + +2010-07-19 Kent Tamura <tkent@chromium.org> + + Reviewed by Adam Roben. + + Fix NewRunWebKitTests to work on Windows. + https://bugs.webkit.org/show_bug.cgi?id=41180 + + * BuildSlaveSupport/build.webkit.org-config/master.cfg: + Specifying python explicitly. + +2010-07-18 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Add dumping of statusbar text to WebKitTestRunner + https://bugs.webkit.org/show_bug.cgi?id=42516 + + * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: + (WTR::InjectedBundlePage::InjectedBundlePage): + (WTR::InjectedBundlePage::_setStatusbarText): + (WTR::InjectedBundlePage::setStatusbarText): + Dump the statusbar text. + + * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: + * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: + (WTR::LayoutTestController::LayoutTestController): + Initialize m_dumpStatusCallbacks to false. + + (WTR::dumpStatusCallbacksCallback): + Implement JSC callback. + + (WTR::LayoutTestController::staticFunctions): + Add dumpStatusCallbacks. + + * WebKitTestRunner/InjectedBundle/LayoutTestController.h: + (WTR::LayoutTestController::dumpStatusCallbacks): + (WTR::LayoutTestController::setDumpStatusCallbacks): + Add setter and getter for m_dumpStatusCallbacks. + +2010-07-17 Anders Carlsson <andersca@apple.com> + + Reviewed by Maciej Stachowiak. + + * WebKitTestRunner/TestController.cpp: + (WTR::TestController::initialize): + Get the test plug-in path and set it on the context. + + * WebKitTestRunner/TestController.h: + * WebKitTestRunner/mac/TestControllerMac.mm: + (WTR::TestController::initializeInjectedBundlePath): + Simplify this code by using NSBundle. + + (WTR::TestController::testPluginPath): + Return the test plug-in path. + + * WebKitTestRunner/win/TestControllerWin.cpp: + (WTR::TestController::testPluginPath): + Ditto. + +2010-07-16 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Teach webkitpy about queues.webkit.org + https://bugs.webkit.org/show_bug.cgi?id=42492 + + * Scripts/webkitpy/common/net/statusserver.py: + +2010-07-16 Ada Chan <adachan@apple.com> + + Reviewed by Alice Liu. + + Fix Windows build. + + * WebKitTestRunner/InjectedBundle/win/InjectedBundle.vcproj: + +2010-07-16 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Fix for https://bugs.webkit.org/show_bug.cgi?id=42482 + <rdar://problem/8197701> + Add notification of when the BackForwardList changes + to aid invalidation of Back/Forward related UI elements. + + * MiniBrowser/mac/BrowserWindowController.m: + (_didStartProvisionalLoadForFrame): + (_didCommitLoadForFrame): + (_didFailLoadWithErrorForFrame): + (_didChangeBackForwardList): + (-[BrowserWindowController awakeFromNib]): + * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: + +2010-07-16 Kent Tamura <tkent@chromium.org> + + Reviewed by Darin Fisher. + + [Chromium] <input type=number> UI implementation for Windows + https://bugs.webkit.org/show_bug.cgi?id=42259 + + * DumpRenderTree/chromium/WebThemeEngineDRT.cpp: + (WebThemeEngineDRT::paintSpinButton): + Added. Check state consistency and use existing arrow painting code. + * DumpRenderTree/chromium/WebThemeEngineDRT.h: + +2010-07-16 Alice Liu <alice.liu@apple.com> + + Reviewed by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=42430 + Make WebKitTestRunner on Windows actually load and run a test + + * WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp: Export WKBundleInitialize. + (WKBundleInitialize): + * WebKitTestRunner/InjectedBundle/win/InjectedBundle.vcproj: Added. Output is a dll. + * WebKitTestRunner/TestInvocation.cpp: Create a Windows-style path on Windows + (WTR::createWKURL): + * WebKitTestRunner/WebKitTestRunnerPrefix.h: Change check for Windows platform to match + other existing checks, and avoid including Platform.h + * WebKitTestRunner/win/PlatformWebViewWin.cpp: + (WTR::registerWindowClass): Added. + (WTR::PlatformWebView::PlatformWebView): Implemented. + (WTR::PlatformWebView::~PlatformWebView): Implemented. + (WTR::PlatformWebView::page): Implemented. + * WebKitTestRunner/win/TestControllerWin.cpp: + (WTR::TestController::initializeInjectedBundlePath): Implemented. Provide build + configuration specific path to InjectedBundle.dll. + * WebKitTestRunner/win/TestInvocationWin.cpp: + (WTR::TestInvocation::runUntil): Implemented. + * WebKitTestRunner/win/WebKitTestRunner.sln: Added InjectedBundle project. + * WebKitTestRunner/win/WebKitTestRunner.vcproj: Cleaned up unnecessary dependencies. + +2010-07-16 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig. + + Make revalidation of back/forward work a little better with page loads + https://bugs.webkit.org/show_bug.cgi?id=42470 + + * MiniBrowser/mac/BrowserWindow.xib: + * MiniBrowser/mac/BrowserWindowController.h: + * MiniBrowser/mac/BrowserWindowController.m: + (-[BrowserWindowController validateToolbar]): + (_didStartProvisionalLoadForFrame): + (_didCommitLoadForFrame): + (_didFailLoadWithErrorForFrame): + +2010-07-16 Nikolas Zimmermann <nzimmermann@rim.com> + + Reviewed by Dirk Schulze. + + Add possibility to dumpAsText and generate a pixel test result + https://bugs.webkit.org/show_bug.cgi?id=42374 + + Add optional parameter to setDumpAsText() to allow generating a pixel test result even if dumpAsText mode. + setDumpAsText(true) will also generate a pixel test result now, when running run-webkit-tests --pixel-tests. + + This is needed for the svg/dynamic-updates tests, which don't want render tree dumps but text dumps + a pixel test result. + At some point DRT changed to not generate pixel test results when using dumpAsText - which makes sense, but breaks the svg/dynamic-updates test. + + Implemented for all DRT platforms, except Qt, as it's not clear how arguments to functions like "setDumpAsText" are handled. + (Qt always dumps pixel tests when using --pixel-tests mode, so it does not break anything) + + * DumpRenderTree/LayoutTestController.cpp: + (LayoutTestController::LayoutTestController): + (dumpAsTextAndPixelsCallback): + (LayoutTestController::staticFunctions): + * DumpRenderTree/LayoutTestController.h: + (LayoutTestController::dumpAsTextAndPixels): + (LayoutTestController::setDumpAsTextAndPixels): + * DumpRenderTree/chromium/LayoutTestController.cpp: + (LayoutTestController::LayoutTestController): + (LayoutTestController::dumpAsTextAndPixels): + (LayoutTestController::reset): + * DumpRenderTree/chromium/LayoutTestController.h: + (LayoutTestController::shouldDumpAsTextAndPixels): + * DumpRenderTree/chromium/TestShell.cpp: + (TestShell::dump): + * DumpRenderTree/gtk/DumpRenderTree.cpp: + (dump): + * DumpRenderTree/mac/DumpRenderTree.mm: + (dump): + * DumpRenderTree/qt/DumpRenderTreeQt.cpp: + (WebCore::DumpRenderTree::dump): + * DumpRenderTree/win/DumpRenderTree.cpp: + (dump): + * DumpRenderTree/wx/DumpRenderTreeWx.cpp: + (dump): + +2010-07-16 Kent Hansen <kent.hansen@nokia.com> + + Unreviewed. Adding myself as committer. + + * Scripts/webkitpy/common/config/committers.py: + +2010-07-16 Shinichiro Hamaji <hamaji@chromium.org> + + Another uneviewed attempt to fix build. + + Printing test results differ between machines, we should use ImageDiff instead + https://bugs.webkit.org/show_bug.cgi?id=20011 + + * DumpRenderTree/mac/PixelDumpSupportMac.mm: + (createPagedBitmapContext): + +2010-07-16 Shinichiro Hamaji <hamaji@chromium.org> + + Unreviewed tiger build fix. + + Printing test results differ between machines, we should use ImageDiff instead + https://bugs.webkit.org/show_bug.cgi?id=20011 + + * DumpRenderTree/mac/PixelDumpSupportMac.mm: + (createBitmapContext): + (createBitmapContextFromWebView): + +2010-07-15 Shinichiro Hamaji <hamaji@chromium.org> + + Unreviewed build fix. + + Printing test results differ between machines, we should use ImageDiff instead + https://bugs.webkit.org/show_bug.cgi?id=20011 + + * DumpRenderTree/PixelDumpSupport.cpp: + (dumpWebViewAsPixelsAndCompareWithExpected): + +2010-07-15 Shinichiro Hamaji <hamaji@chromium.org> + + Reviewed by Darin Adler. + + Printing test results differ between machines, we should use ImageDiff instead + https://bugs.webkit.org/show_bug.cgi?id=20011 + + * DumpRenderTree/PixelDumpSupport.cpp: + (dumpWebViewAsPixelsAndCompareWithExpected): + * DumpRenderTree/PixelDumpSupport.h: + * DumpRenderTree/mac/PixelDumpSupportMac.mm: + (createBitmapContext): This function was added to share bitmap context creation code. + (createBitmapContextFromWebView): + (createPagedBitmapContext): + +2010-07-15 Yuta Kitamura <yutak@chromium.org> + + Reviewed by Kent Tamura. + + Pull in pywebsocket-0.5.1 + https://bugs.webkit.org/show_bug.cgi?id=42353 + + pywebsocket-0.5.1 contains a small bug fix (*) that should fix a worker test + in Chromium. There is no other functional change. + + (*) http://code.google.com/p/pywebsocket/source/detail?r=265 + + * Scripts/webkitpy/thirdparty/__init__.py: Bump pywebsocket version to 0.5.1. + +2010-07-15 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig. + + Add toolbar and toolbar item validation for MiniBrowser + https://bugs.webkit.org/show_bug.cgi?id=42422 + + * MiniBrowser/MBToolbarItem.h: Added. + * MiniBrowser/MBToolbarItem.m: Added. + (-[MBToolbarItem validate]): + + * MiniBrowser/mac/BrowserWindowController.m: + (-[BrowserWindowController validateUserInterfaceItem:]): + + * MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj: + * MiniBrowser/mac/BrowserWindow.xib: + +2010-07-15 Victor Wang <victorw@chromium.org> + + Unreviewed, add victorw irc nickname to committer list. + + * Scripts/webkitpy/common/config/committers.py: + +2010-07-15 Adam Roben <aroben@apple.com> + + Make killing Apache more reliable (on both Mac and Windows) + + We previously had two ways of determining whether we had succeeded in + killing Apache: + 1) checking the return value of kill(0, $apachePID) + 2) checking whether Apache's PID file still exists + + On Cygwin, Apache doesn't always delete its PID file when it exits, + making (2) unreliable. We unfortunately misdiagnosed this as an + impotency of Perl's kill function, which led to r63177 and r63355. + + Now that we know that the real problem is that Apache doesn't always + delete its PID file on Windows, we can make a much better fix: always + use method (1) to determine whether we've killed Apache. + + Fixes <http://webkit.org/b/42415> Killing Apache is unreliable, + leading to regression test failures (and general annoyance). + + Reviewed by Anders Carlsson. + + * Scripts/webkitperl/httpd.pm: + (openHTTPD): Moved killing code from here to killHTTPD. Added a call + to delete the PID file in case Apache doesn't do this itself when + killed. Our later logic relies on the PID file being deleted after + this point. + (closeHTTPD): Removed killing logic and changed to just call killHTTPD + instead. killHTTPD's logic is a bit different from the logic we had + here, for the reasons stated above. + (killHTTPD): Added. Code came from openHTTPD. + (handleInterrupt): Bonus fix for Mac: don't hang when pressing Ctrl-C! + On Mac, don't try to kill Apache when we receive a signal, as Apache + will already have been killed by this point (though for some reason + this isn't detected by our killing logic in killHTTPD). On Cygwin, we + still need to kill Apache manually. + +2010-07-15 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Patch for https://bugs.webkit.org/show_bug.cgi?id=42399 + Update MiniBrowser for WKFrameNavigationType + + * MiniBrowser/mac/BrowserWindowController.m: + (_decidePolicyForNavigationAction): + (_decidePolicyForNewWindowAction): + +2010-07-15 Stephanie Lewis <slewis@apple.com> + + Reviewed by Geoff Garen. + + http://bugs.webkit.org/show_bug.cgi?id=42406 + Make SunSpider work better with roots. + + * Scripts/sunspider-compare-results: fix argument bug + * Scripts/webkitdirs.pm: look inside JavaScriptCore if jsc isn't top-level. + +2010-07-15 Brady Eidson <beidson@apple.com> + + Reviewed by Sam Weinig. + + Hook up back/forward in MiniBrowser + https://bugs.webkit.org/show_bug.cgi?id=42397 + + * MiniBrowser/mac/BrowserWindow.xib: + * MiniBrowser/mac/BrowserWindowController.h: + * MiniBrowser/mac/BrowserWindowController.m: + (-[BrowserWindowController goBack:]): + (-[BrowserWindowController goForward:]): + +2010-07-15 Daniel Bates <dbates@rim.com> + + Reviewed by Darin Adler. + + [Mac] Implement LayoutTestController::markerTextForListItem() + https://bugs.webkit.org/show_bug.cgi?id=37929 + + Implements DRT support for markerTextForListItem in the Mac port. + + * DumpRenderTree/mac/LayoutTestControllerMac.mm: + (LayoutTestController::markerTextForListItem): Implemented. + +2010-07-15 Adam Barth <abarth@webkit.org> + + Unreviewed. + + Update the port names to be more specific. Before this patch, + port-specific results for Mac would end up in the wrong place. + + * Scripts/webkitpy/tool/commands/rebaseline.py: + * Scripts/webkitpy/tool/commands/rebaseline_unittest.py: + +2010-07-14 Eric Seidel <eric@webkit.org> + + Reviewed by Adam Barth. + + WebKit needs a rebaselining tool (finally) + https://bugs.webkit.org/show_bug.cgi?id=42339 + + This is a very basic rebaselining tool. It's not + quite as fancy as chromium's as it will only handle + updating failing results. It cannot yet handle adding new + results, or updating results where the results should not + replace existing results. + + * Scripts/webkitpy/layout_tests/port/base.py: + * Scripts/webkitpy/tool/commands/__init__.py: + * Scripts/webkitpy/tool/commands/queries.py: + * Scripts/webkitpy/tool/commands/rebaseline.py: Added. + * Scripts/webkitpy/tool/commands/rebaseline_unittest.py: Added. + +2010-07-14 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r63352. + http://trac.webkit.org/changeset/63352 + https://bugs.webkit.org/show_bug.cgi?id=42341 + + Broke plugin-initiate-popup-window.html and plugin-javascript- + access.html on snow leopard (Requested by abarth on #webkit). + + * DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp: + (pluginAllocate): + * DumpRenderTree/TestNetscapePlugIn/PluginObject.h: + * DumpRenderTree/TestNetscapePlugIn/main.cpp: + (NPP_New): + (handleEventCarbon): + (handleEventCocoa): + +2010-07-14 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Mark Rowe. + + Lower WebKitTestRunner notifyDone timeout to 6.0 for now, to make it easier to grind through the failures. + + * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: + +2010-07-14 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r63346. + http://trac.webkit.org/changeset/63346 + https://bugs.webkit.org/show_bug.cgi?id=42295 + + Broke lots of tests, some of which probably just need new + results (Requested by aroben on #webkit). + + * DumpRenderTree/win/DumpRenderTree.cpp: + (urlSuitableForTestResult): + +2010-07-14 Adam Roben <aroben@apple.com> + + Speed up killing of Apache on Windows + + Fixes <http://webkit.org/b/42289> Killing Apache (and thus quitting + run-webkit-tests) takes a long time on Windows + + Reviewed by Darin Adler and Jon Honeycutt. + + * Scripts/webkitperl/httpd.pm: + (closeHTTPD): Use taskkill to kill Apache and its child processes. + Perl's kill seems ineffectual. We were already using taskkill, but + only after trying kill 20 times. Since kill never works, let's just + skip it entirely. + +2010-07-14 Johnny Ding <jnd@chromium.org> + + Reviewed by Adam Barth. + + https://bugs.webkit.org/show_bug.cgi?id=41292 + Add a new parameter to the test plugin to allow to specify a script and a + mouse/keyboard event. The specified script will be evaluated in the browser + when the specified event is received by the plugin. + + * DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp: + (pluginAllocate): + * DumpRenderTree/TestNetscapePlugIn/PluginObject.h: + * DumpRenderTree/TestNetscapePlugIn/main.cpp: + (NPP_New): + (handleEventCarbon): + (handleEventCocoa): + +2010-07-14 Adam Roben <aroben@apple.com> + + Make urlSuitableForTestResult work for http: URLs, too + + Fixes <http://webkit.org/b/42276> + http/tests/loading/preload-slow-loading.php and + http/tests/mime/uppercase-mime-type.html fail on Windows. + + Reviewed by Darin Adler. + + * DumpRenderTree/win/DumpRenderTree.cpp: + (urlSuitableForTestResult): Don't bail if the URL starts with http://. + We want this function to work for those URLs, too! + +2010-07-13 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Oliver Hunt. + + Add placebo versions of some repaint test functions to WebKitTestRunner - good enough for non-pixel tests + https://bugs.webkit.org/show_bug.cgi?id=42227 + + * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: + (WTR::LayoutTestController::LayoutTestController): Initialize new bool + members. + (WTR::LayoutTestController::display): Dummy method. + (WTR::displayCallback): Call the dummy. + (WTR::repaintSweepHorizontallyCallback): ditto + (WTR::testRepaintCallback): ditto + (WTR::LayoutTestController::staticFunctions): Expose new methods. + * WebKitTestRunner/InjectedBundle/LayoutTestController.h: + (WTR::LayoutTestController::setTestRepaint): Set the flag (which currently does + nothing). + (WTR::LayoutTestController::setTestRepaintSweepHorizontally): ditto + +2010-07-13 Andreas Kling <andreas.kling@nokia.com> + + Unreviewed. Adding myself as committer. + + * Scripts/webkitpy/common/config/committers.py: + +2010-07-07 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Darin Adler. + + Prevent assertion/duplicate loads for non-deferred subtitute-data loads + + https://bugs.webkit.org/show_bug.cgi?id=30879 + + MainResourceLoader uses the member m_initialRequest to store requests for future + deferred loads. When doing the actual load in handleDataLoadNow(), we therefore + have to clear this request so that subsequent entries into the loader will not + start yet another load. + + This can happen as a result of a PageGroupLoadDeferrer going out of scope when + returning from Chrome::runJavaScriptAlert(), which calls setDeferredLoading(false), + but only in the case of using both substitute-data and non-deferred main resource + load together. That's why two new DRT functions were added: + + * queueLoadHTMLString() + * setDeferMainResourceLoad() + + The change adds DRT hooks for Mac, Win and Qt for these two functions. For Mac + and Win the hook uses new SPI in WebDataSource. For Qt a new static member was + added to the FrameLoaderClientQt and accessed though DumpRenderTreeSupportQt. + + * DumpRenderTree/LayoutTestController.cpp: + (LayoutTestController::LayoutTestController): + (queueLoadHTMLStringCallback): + (setDeferMainResourceDataLoadCallback): + (LayoutTestController::staticFunctions): + (LayoutTestController::queueLoadHTMLString): + * DumpRenderTree/LayoutTestController.h: + (LayoutTestController::deferMainResourceDataLoad): + (LayoutTestController::setDeferMainResourceDataLoad): + * DumpRenderTree/WorkQueueItem.h: + (LoadHTMLStringItem::LoadHTMLStringItem): + * DumpRenderTree/gtk/WorkQueueItemGtk.cpp: + (LoadHTMLStringItem::invoke): + * DumpRenderTree/mac/ResourceLoadDelegate.mm: + (-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]): + * DumpRenderTree/mac/WorkQueueItemMac.mm: + (LoadHTMLStringItem::invoke): + * DumpRenderTree/qt/LayoutTestControllerQt.cpp: + (LayoutTestController::reset): + (LayoutTestController::setDeferMainResourceDataLoad): + (LayoutTestController::queueLoadHTMLString): + * DumpRenderTree/qt/LayoutTestControllerQt.h: + * DumpRenderTree/qt/WorkQueueItemQt.cpp: + (LoadHTMLStringItem::invoke): + * DumpRenderTree/qt/WorkQueueItemQt.h: + (LoadHTMLStringItem::LoadHTMLStringItem): + * DumpRenderTree/win/ResourceLoadDelegate.cpp: + (ResourceLoadDelegate::willSendRequest): + * DumpRenderTree/win/WorkQueueItemWin.cpp: + (LoadHTMLStringItem::invoke): + * DumpRenderTree/wx/WorkQueueItemWx.cpp: + (LoadHTMLStringItem::invoke): + +2010-07-13 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Nikolas Zimmermann. + + Activate test fonts for layout tests in WebKitTestRunner (on Mac) + https://bugs.webkit.org/show_bug.cgi?id=42153 + + * WebKitTestRunner/InjectedBundle/ActivateFonts.h: Added. + * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: + (WTR::InjectedBundle::initialize): Activate fonts on startup. + * WebKitTestRunner/InjectedBundle/mac: Added. + * WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm: Added. + (WTR::activateFonts): Activate our fonts. + * WebKitTestRunner/InjectedBundle/win: Added. + * WebKitTestRunner/InjectedBundle/win/ActivateFonts.cpp: Added. + (WTR::activateFonts): Dummy version. + * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Copy fonts to bundle; + add more files. + * WebKitTestRunner/fonts: Added. + * WebKitTestRunner/fonts/AHEM____.TTF: Added. + * WebKitTestRunner/fonts/ColorBits-A.png: Added. + * WebKitTestRunner/fonts/ColorBits.ttf: Added. + * WebKitTestRunner/fonts/WebKit Layout Tests 2.ttf: Added. + * WebKitTestRunner/fonts/WebKit Layout Tests.ttf: Added. + * WebKitTestRunner/fonts/WebKitWeightWatcher100.ttf: Added. + * WebKitTestRunner/fonts/WebKitWeightWatcher200.ttf: Added. + * WebKitTestRunner/fonts/WebKitWeightWatcher300.ttf: Added. + * WebKitTestRunner/fonts/WebKitWeightWatcher400.ttf: Added. + * WebKitTestRunner/fonts/WebKitWeightWatcher500.ttf: Added. + * WebKitTestRunner/fonts/WebKitWeightWatcher600.ttf: Added. + * WebKitTestRunner/fonts/WebKitWeightWatcher700.ttf: Added. + * WebKitTestRunner/fonts/WebKitWeightWatcher800.ttf: Added. + * WebKitTestRunner/fonts/WebKitWeightWatcher900.ttf: Added. + +2010-07-13 Dumitru Daniliuc <dumi@chromium.org> + + Reviewed by Eric Seidel. + + Remove check-header-includes, as it didn't turn out to be very useful. + https://bugs.webkit.org/show_bug.cgi?id=41970 + + * Scripts/check-header-includes: Removed. + +2010-07-12 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Maciej Stachowiak. + + Make WebKit2 be built by build-webkit (so it will be built by build.webkit.org bots) + https://bugs.webkit.org/show_bug.cgi?id=40922 + + Always build WebKit2 on Windows. Necessary since our WebKit build on + Windows is packaged into a DLL with WebKit2. + + * Scripts/build-webkit: Always build WebKit2 on Windows. + +2010-07-12 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Steve Falkenburg. + + One http test timing out on Windows can cause all future tests to time out + https://bugs.webkit.org/show_bug.cgi?id=42146 + + There have been multiple times on the Windows bots where one http test timing out causes all future + http tests to time out. This is because the httpd process becomes unresponsive. When an http test + times out, we should restart httpd on Cygwin to prevent this. + + * Scripts/old-run-webkit-tests: If an http test timed out on Cygwin, close httpd and restart it. + * Scripts/webkitperl/httpd.pm: Add additional logic to closeHTTPD to teach it about taskkill if + using kill fails. + 2010-07-12 Maciej Stachowiak <mjs@apple.com> Reviewed by Dan Bernstein. diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/LayoutTestController.cpp index cd294bc..6a957c1 100644 --- a/WebKitTools/DumpRenderTree/LayoutTestController.cpp +++ b/WebKitTools/DumpRenderTree/LayoutTestController.cpp @@ -60,6 +60,7 @@ LayoutTestController::LayoutTestController(const std::string& testPathOrURL, con , m_dumpIconChanges(false) , m_dumpVisitedLinksCallback(false) , m_dumpWillCacheResponse(false) + , m_generatePixelResults(true) , m_callCloseOnWebViews(true) , m_canOpenWindows(false) , m_closeRemainingWindowsWhenComplete(true) @@ -78,6 +79,7 @@ LayoutTestController::LayoutTestController(const std::string& testPathOrURL, con , m_geolocationPermission(false) , m_handlesAuthenticationChallenges(false) , m_isPrinting(false) + , m_deferMainResourceDataLoad(true) , m_testPathOrURL(testPathOrURL) , m_expectedPixelHash(expectedPixelHash) { @@ -101,6 +103,10 @@ static JSValueRef dumpAsTextCallback(JSContextRef context, JSObjectRef function, { LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); controller->setDumpAsText(true); + + // Optional paramater, describing whether it's allowed to dump pixel results in dumpAsText mode. + controller->setGeneratePixelResults(argumentCount > 0 ? JSValueToBoolean(context, arguments[0]) : false); + return JSValueMakeUndefined(context); } @@ -734,6 +740,28 @@ static JSValueRef queueLoadCallback(JSContextRef context, JSObjectRef function, return JSValueMakeUndefined(context); } +static JSValueRef queueLoadHTMLStringCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + // Has Mac & Windows implementation + if (argumentCount < 1) + return JSValueMakeUndefined(context); + + JSRetainPtr<JSStringRef> content(Adopt, JSValueToStringCopy(context, arguments[0], exception)); + ASSERT(!*exception); + + JSRetainPtr<JSStringRef> baseURL; + if (argumentCount >= 2) { + baseURL.adopt(JSValueToStringCopy(context, arguments[1], exception)); + ASSERT(!*exception); + } else + baseURL.adopt(JSStringCreateWithUTF8CString("")); + + LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); + controller->queueLoadHTMLString(content.get(), baseURL.get()); + + return JSValueMakeUndefined(context); +} + static JSValueRef queueReloadCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { // Has mac & windows implementation @@ -915,6 +943,18 @@ static JSValueRef setDatabaseQuotaCallback(JSContextRef context, JSObjectRef fun return JSValueMakeUndefined(context); } +static JSValueRef setDeferMainResourceDataLoadCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + // Has Mac and Windows implementation + if (argumentCount < 1) + return JSValueMakeUndefined(context); + + LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); + controller->setDeferMainResourceDataLoad(JSValueToBoolean(context, arguments[0])); + + return JSValueMakeUndefined(context); +} + static JSValueRef setDomainRelaxationForbiddenForURLSchemeCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { // Has Mac and Windows implementation @@ -1754,6 +1794,7 @@ JSStaticFunction* LayoutTestController::staticFunctions() { "queueBackNavigation", queueBackNavigationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "queueForwardNavigation", queueForwardNavigationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "queueLoad", queueLoadCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, + { "queueLoadHTMLString", queueLoadHTMLStringCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "queueLoadingScript", queueLoadingScriptCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "queueNonLoadingScript", queueNonLoadingScriptCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "queueReload", queueReloadCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, @@ -1774,6 +1815,7 @@ JSStaticFunction* LayoutTestController::staticFunctions() { "setCloseRemainingWindowsWhenComplete", setCloseRemainingWindowsWhenCompleteCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "setCustomPolicyDelegate", setCustomPolicyDelegateCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "setDatabaseQuota", setDatabaseQuotaCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, + { "setDeferMainResourceDataLoad", setDeferMainResourceDataLoadCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "setDomainRelaxationForbiddenForURLScheme", setDomainRelaxationForbiddenForURLSchemeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "setEditingBehavior", setEditingBehaviorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, { "setFrameFlatteningEnabled", setFrameFlatteningEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, @@ -1822,6 +1864,11 @@ JSStaticFunction* LayoutTestController::staticFunctions() return staticFunctions; } +void LayoutTestController::queueLoadHTMLString(JSStringRef content, JSStringRef baseURL) +{ + WorkQueue::shared()->queue(new LoadHTMLStringItem(content, baseURL)); +} + void LayoutTestController::queueBackNavigation(int howFarBack) { WorkQueue::shared()->queue(new BackItem(howFarBack)); diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.h b/WebKitTools/DumpRenderTree/LayoutTestController.h index 16eda2c..30eb9bd 100644 --- a/WebKitTools/DumpRenderTree/LayoutTestController.h +++ b/WebKitTools/DumpRenderTree/LayoutTestController.h @@ -70,6 +70,7 @@ public: void queueBackNavigation(int howFarBackward); void queueForwardNavigation(int howFarForward); void queueLoad(JSStringRef url, JSStringRef target); + void queueLoadHTMLString(JSStringRef content, JSStringRef baseURL); void queueLoadingScript(JSStringRef script); void queueNonLoadingScript(JSStringRef script); void queueReload(); @@ -120,7 +121,10 @@ public: bool dumpAsText() const { return m_dumpAsText; } void setDumpAsText(bool dumpAsText) { m_dumpAsText = dumpAsText; } - + + bool generatePixelResults() const { return m_generatePixelResults; } + void setGeneratePixelResults(bool generatePixelResults) { m_generatePixelResults = generatePixelResults; } + bool dumpBackForwardList() const { return m_dumpBackForwardList; } void setDumpBackForwardList(bool dumpBackForwardList) { m_dumpBackForwardList = dumpBackForwardList; } @@ -230,6 +234,9 @@ public: bool globalFlag() const { return m_globalFlag; } void setGlobalFlag(bool globalFlag) { m_globalFlag = globalFlag; } + bool deferMainResourceDataLoad() const { return m_deferMainResourceDataLoad; } + void setDeferMainResourceDataLoad(bool flag) { m_deferMainResourceDataLoad = flag; } + const std::string& testPathOrURL() const { return m_testPathOrURL; } const std::string& expectedPixelHash() const { return m_expectedPixelHash; } @@ -298,6 +305,7 @@ private: bool m_dumpIconChanges; bool m_dumpVisitedLinksCallback; bool m_dumpWillCacheResponse; + bool m_generatePixelResults; bool m_callCloseOnWebViews; bool m_canOpenWindows; bool m_closeRemainingWindowsWhenComplete; @@ -316,6 +324,7 @@ private: bool m_geolocationPermission; bool m_handlesAuthenticationChallenges; bool m_isPrinting; + bool m_deferMainResourceDataLoad; std::string m_authenticationUsername; std::string m_authenticationPassword; diff --git a/WebKitTools/DumpRenderTree/PixelDumpSupport.cpp b/WebKitTools/DumpRenderTree/PixelDumpSupport.cpp index e372827..b5a5146 100644 --- a/WebKitTools/DumpRenderTree/PixelDumpSupport.cpp +++ b/WebKitTools/DumpRenderTree/PixelDumpSupport.cpp @@ -42,7 +42,13 @@ void dumpWebViewAsPixelsAndCompareWithExpected(const std::string& expectedHash) { - RefPtr<BitmapContext> context = createBitmapContextFromWebView(gLayoutTestController->testOnscreen(), gLayoutTestController->testRepaint(), gLayoutTestController->testRepaintSweepHorizontally(), gLayoutTestController->dumpSelectionRect()); + RefPtr<BitmapContext> context; +#if PLATFORM(MAC) + if (gLayoutTestController->isPrinting()) + context = createPagedBitmapContext(); + else +#endif + context = createBitmapContextFromWebView(gLayoutTestController->testOnscreen(), gLayoutTestController->testRepaint(), gLayoutTestController->testRepaintSweepHorizontally(), gLayoutTestController->dumpSelectionRect()); ASSERT(context); // Compute the hash of the bitmap context pixels diff --git a/WebKitTools/DumpRenderTree/PixelDumpSupport.h b/WebKitTools/DumpRenderTree/PixelDumpSupport.h index 94c5312..e172a83 100644 --- a/WebKitTools/DumpRenderTree/PixelDumpSupport.h +++ b/WebKitTools/DumpRenderTree/PixelDumpSupport.h @@ -36,6 +36,7 @@ class BitmapContext; void computeMD5HashStringForBitmapContext(BitmapContext*, char hashString[33]); +PassRefPtr<BitmapContext> createPagedBitmapContext(); PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool onscreen, bool incrementalRepaint, bool sweepHorizontally, bool drawSelectionRect); void dumpBitmap(BitmapContext*); void dumpWebViewAsPixelsAndCompareWithExpected(const std::string& expectedHash); diff --git a/WebKitTools/DumpRenderTree/WorkQueueItem.h b/WebKitTools/DumpRenderTree/WorkQueueItem.h index 56be377..34276c8 100644 --- a/WebKitTools/DumpRenderTree/WorkQueueItem.h +++ b/WebKitTools/DumpRenderTree/WorkQueueItem.h @@ -53,6 +53,21 @@ private: JSRetainPtr<JSStringRef> m_target; }; +class LoadHTMLStringItem : public WorkQueueItem { +public: + LoadHTMLStringItem(const JSStringRef content, const JSStringRef baseURL) + : m_content(content) + , m_baseURL(baseURL) + { + } + +private: + virtual bool invoke() const; + + JSRetainPtr<JSStringRef> m_content; + JSRetainPtr<JSStringRef> m_baseURL; +}; + class ReloadItem : public WorkQueueItem { private: virtual bool invoke() const; diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp index 0f37d7e..ea1fd01 100644 --- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp +++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp @@ -230,9 +230,15 @@ void LayoutTestController::WorkQueue::addWork(WorkItem* work) m_queue.append(work); } -void LayoutTestController::dumpAsText(const CppArgumentList&, CppVariant* result) +void LayoutTestController::dumpAsText(const CppArgumentList& arguments, CppVariant* result) { m_dumpAsText = true; + m_generatePixelResults = false; + + // Optional paramater, describing whether it's allowed to dump pixel results in dumpAsText mode. + if (arguments.size() > 0 && arguments[0].isBool()) + m_generatePixelResults = arguments[0].value.boolValue; + result->setNull(); } @@ -475,6 +481,7 @@ void LayoutTestController::reset() m_dumpWindowStatusChanges = false; m_dumpSelectionRect = false; m_dumpTitleChanges = false; + m_generatePixelResults = true; m_acceptsEditing = true; m_waitUntilDone = false; m_canOpenWindows = false; diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h index 5d65726..46a14de 100644 --- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h +++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h @@ -57,7 +57,7 @@ public: // This function sets a flag that tells the test_shell to dump pages as // plain text, rather than as a text representation of the renderer's state. - // It takes no arguments, and ignores any that may be present. + // It takes an optional argument, whether to dump pixels results or not. void dumpAsText(const CppArgumentList&, CppVariant*); // This function should set a flag that tells the test_shell to print a line @@ -305,6 +305,7 @@ public: bool shouldDumpTitleChanges() { return m_dumpTitleChanges; } bool shouldDumpChildFrameScrollPositions() { return m_dumpChildFrameScrollPositions; } bool shouldDumpChildFramesAsText() { return m_dumpChildFramesAsText; } + bool shouldGeneratePixelResults() { return m_generatePixelResults; } bool acceptsEditing() { return m_acceptsEditing; } bool canOpenWindows() { return m_canOpenWindows; } bool shouldAddFileToPasteboard() { return m_shouldAddFileToPasteboard; } @@ -420,6 +421,9 @@ private: // If true, output a message when the page title is changed. bool m_dumpTitleChanges; + // If true, the test_shell will generate pixel results in dumpAsText mode + bool m_generatePixelResults; + // If true, the element will be treated as editable. This value is returned // from various editing callbacks that are called just before edit operations // are allowed. diff --git a/WebKitTools/DumpRenderTree/chromium/TestShell.cpp b/WebKitTools/DumpRenderTree/chromium/TestShell.cpp index a4b161a..507f084 100644 --- a/WebKitTools/DumpRenderTree/chromium/TestShell.cpp +++ b/WebKitTools/DumpRenderTree/chromium/TestShell.cpp @@ -511,7 +511,7 @@ void TestShell::dump() if (dumpedAnything && m_params.printSeparators) m_printer->handleTextFooter(); - if (m_params.dumpPixels && !shouldDumpAsText) { + if (m_params.dumpPixels && m_layoutTestController->shouldGeneratePixelResults()) { // Image output: we write the image data to the file given on the // command line (for the dump pixels argument), and the MD5 sum to // stdout. diff --git a/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.cpp b/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.cpp index c28da1f..ef6c26a 100755 --- a/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.cpp +++ b/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.cpp @@ -583,6 +583,64 @@ void WebThemeEngineDRT::paintScrollbarTrack(WebCanvas* canvas, drawControl(canvas, rect, ctype, cstate); } +void WebThemeEngineDRT::paintSpinButton(WebCanvas* canvas, + int part, + int state, + int classicState, + const WebRect& rect) +{ + WebThemeControlDRT::Type ctype = WebThemeControlDRT::UnknownType; + WebThemeControlDRT::State cstate = WebThemeControlDRT::UnknownState; + + if (part == SPNP_UP) { + ctype = WebThemeControlDRT::UpArrowType; + switch (state) { + case UPS_NORMAL: + ASSERT(classicState == DFCS_SCROLLUP); + cstate = WebThemeControlDRT::NormalState; + break; + case UPS_DISABLED: + ASSERT(classicState == (DFCS_SCROLLUP | DFCS_INACTIVE)); + cstate = WebThemeControlDRT::DisabledState; + break; + case UPS_PRESSED: + ASSERT(classicState == (DFCS_SCROLLUP | DFCS_PUSHED)); + cstate = WebThemeControlDRT::PressedState; + break; + case UPS_HOT: + ASSERT(classicState == (DFCS_SCROLLUP | DFCS_HOT)); + cstate = WebThemeControlDRT::HoverState; + break; + default: + ASSERT_NOT_REACHED(); + } + } else if (part == SPNP_DOWN) { + ctype = WebThemeControlDRT::DownArrowType; + switch (state) { + case DNS_NORMAL: + ASSERT(classicState == DFCS_SCROLLDOWN); + cstate = WebThemeControlDRT::NormalState; + break; + case DNS_DISABLED: + ASSERT(classicState == (DFCS_SCROLLDOWN | DFCS_INACTIVE)); + cstate = WebThemeControlDRT::DisabledState; + break; + case DNS_PRESSED: + ASSERT(classicState == (DFCS_SCROLLDOWN | DFCS_PUSHED)); + cstate = WebThemeControlDRT::PressedState; + break; + case DNS_HOT: + ASSERT(classicState == (DFCS_SCROLLDOWN | DFCS_HOT)); + cstate = WebThemeControlDRT::HoverState; + break; + default: + ASSERT_NOT_REACHED(); + } + } else + ASSERT_NOT_REACHED(); + drawControl(canvas, rect, ctype, cstate); +} + void WebThemeEngineDRT::paintTextField(WebCanvas* canvas, int part, int state, diff --git a/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.h b/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.h index 89805b1..c731540 100644 --- a/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.h +++ b/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.h @@ -75,6 +75,10 @@ public: WebKit::WebCanvas*, int part, int state, int classicState, const WebKit::WebRect&, const WebKit::WebRect& alignRect); + virtual void paintSpinButton( + WebKit::WebCanvas*, int part, int state, int classicState, + const WebKit::WebRect&); + virtual void paintTextField( WebKit::WebCanvas*, int part, int state, int classicState, const WebKit::WebRect&, WebKit::WebColor, bool fillContentArea, diff --git a/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp index da05804..2812224 100644 --- a/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp +++ b/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp @@ -419,11 +419,11 @@ void dump() } } - if (dumpPixels) { - if (!gLayoutTestController->dumpAsText() && !gLayoutTestController->dumpDOMAsWebArchive() && !gLayoutTestController->dumpSourceAsWebArchive()) { - dumpWebViewAsPixelsAndCompareWithExpected(gLayoutTestController->expectedPixelHash()); - } - } + if (dumpPixels + && gLayoutTestController->generatePixelResults() + && !gLayoutTestController->dumpDOMAsWebArchive() + && !gLayoutTestController->dumpSourceAsWebArchive()) + dumpWebViewAsPixelsAndCompareWithExpected(gLayoutTestController->expectedPixelHash()); // FIXME: call displayWebView here when we support --paint diff --git a/WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp b/WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp index e0e0ffb..afe81be 100644 --- a/WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp +++ b/WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp @@ -56,6 +56,11 @@ bool LoadItem::invoke() const return true; } +bool LoadHTMLStringItem::invoke() const +{ + return false; +} + bool ReloadItem::invoke() const { webkit_web_frame_reload(mainFrame); diff --git a/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm b/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm index ce02081..89a25cf 100644 --- a/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm +++ b/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm @@ -1129,7 +1129,7 @@ void dump() } } - if (dumpPixels && !dumpAsText) + if (dumpPixels && gLayoutTestController->generatePixelResults()) // FIXME: when isPrinting is set, dump the image with page separators. dumpWebViewAsPixelsAndCompareWithExpected(gLayoutTestController->expectedPixelHash()); diff --git a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm index aec4c19..6b921f0 100644 --- a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm +++ b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm @@ -46,6 +46,7 @@ #import <WebKit/WebCoreStatistics.h> #import <WebKit/WebDataSource.h> #import <WebKit/WebDatabaseManagerPrivate.h> +#import <WebKit/WebDOMOperationsPrivate.h> #import <WebKit/WebFrame.h> #import <WebKit/WebFrameViewPrivate.h> #import <WebKit/WebGeolocationPosition.h> @@ -196,8 +197,12 @@ JSRetainPtr<JSStringRef> LayoutTestController::layerTreeAsText() const JSRetainPtr<JSStringRef> LayoutTestController::markerTextForListItem(JSContextRef context, JSValueRef nodeObject) const { - // FIXME: Implement me. - return JSRetainPtr<JSStringRef>(); + DOMElement *element = [DOMElement _DOMElementFromJSContext:context value:nodeObject]; + if (!element) + return JSRetainPtr<JSStringRef>(); + + JSRetainPtr<JSStringRef> markerText(Adopt, JSStringCreateWithCFString((CFStringRef)[element _markerTextForListItem])); + return markerText; } int LayoutTestController::pageNumberForElementById(JSStringRef id, float pageWidthInPixels, float pageHeightInPixels) diff --git a/WebKitTools/DumpRenderTree/mac/ObjCController.m b/WebKitTools/DumpRenderTree/mac/ObjCController.m index aa9ee49..641d2cc 100644 --- a/WebKitTools/DumpRenderTree/mac/ObjCController.m +++ b/WebKitTools/DumpRenderTree/mac/ObjCController.m @@ -36,6 +36,11 @@ #import <pthread.h> #import <wtf/Assertions.h> +// Remove this once hasWebScriptKey has been made public. +@interface WebScriptObject (StagedForPublic) +- (BOOL)hasWebScriptKey:(NSString *)name; +@end + static void* runJavaScriptThread(void* arg) { JSGlobalContextRef ctx = JSGlobalContextCreate(0); @@ -66,6 +71,7 @@ static void* runJavaScriptThread(void* arg) || aSelector == @selector(accessStoredWebScriptObject) || aSelector == @selector(storeWebScriptObject:) || aSelector == @selector(testValueForKey) + || aSelector == @selector(testHasWebScriptKey:) || aSelector == @selector(testArray) ) return NO; @@ -92,6 +98,8 @@ static void* runJavaScriptThread(void* arg) return @"storeWebScriptObject"; if (aSelector == @selector(testValueForKey)) return @"testValueForKey"; + if (aSelector == @selector(testHasWebScriptKey:)) + return @"testHasWebScriptKey"; if (aSelector == @selector(testArray)) return @"testArray"; @@ -166,6 +174,12 @@ static void* runJavaScriptThread(void* arg) pthread_join(pthread, 0); } +- (BOOL)testHasWebScriptKey:(NSString *)key +{ + ASSERT(storedWebScriptObject); + return [storedWebScriptObject hasWebScriptKey:key]; +} + - (BOOL)testWrapperRoundTripping:(WebScriptObject *)webScriptObject { JSObjectRef jsObject = [webScriptObject JSObject]; diff --git a/WebKitTools/DumpRenderTree/mac/PixelDumpSupportMac.mm b/WebKitTools/DumpRenderTree/mac/PixelDumpSupportMac.mm index 0059b69..3967186 100644 --- a/WebKitTools/DumpRenderTree/mac/PixelDumpSupportMac.mm +++ b/WebKitTools/DumpRenderTree/mac/PixelDumpSupportMac.mm @@ -38,6 +38,7 @@ #include <wtf/Assertions.h> #include <wtf/RefPtr.h> +#import <WebKit/WebCoreStatistics.h> #import <WebKit/WebDocumentPrivate.h> #import <WebKit/WebHTMLViewPrivate.h> #import <WebKit/WebKit.h> @@ -104,21 +105,11 @@ void setupMainDisplayColorProfile() signal(SIGTERM, restoreMainDisplayColorProfile); } -PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool onscreen, bool incrementalRepaint, bool sweepHorizontally, bool drawSelectionRect) +static PassRefPtr<BitmapContext> createBitmapContext(size_t pixelsWide, size_t pixelsHigh, size_t& rowBytes, void*& buffer) { - WebView* view = [mainFrame webView]; + rowBytes = (4 * pixelsWide + 63) & ~63; // Use a multiple of 64 bytes to improve CG performance - // If the WebHTMLView uses accelerated compositing, we need for force the on-screen capture path - // and also force Core Animation to start its animations with -display since the DRT window has autodisplay disabled. - if ([view _isUsingAcceleratedCompositing]) - onscreen = YES; - - NSSize webViewSize = [view frame].size; - size_t pixelsWide = static_cast<size_t>(webViewSize.width); - size_t pixelsHigh = static_cast<size_t>(webViewSize.height); - size_t rowBytes = (4 * pixelsWide + 63) & ~63; // Use a multiple of 64 bytes to improve CG performance - - void *buffer = calloc(pixelsHigh, rowBytes); + buffer = calloc(pixelsHigh, rowBytes); if (!buffer) return 0; @@ -140,9 +131,28 @@ PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool onscreen, bool inc return 0; } - // The BitmapContext keeps the CGContextRef and the pixel buffer alive - RefPtr<BitmapContext> bitmapContext = BitmapContext::createByAdoptingBitmapAndContext(buffer, context); - + return BitmapContext::createByAdoptingBitmapAndContext(buffer, context); +} + +PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool onscreen, bool incrementalRepaint, bool sweepHorizontally, bool drawSelectionRect) +{ + WebView* view = [mainFrame webView]; + + // If the WebHTMLView uses accelerated compositing, we need for force the on-screen capture path + // and also force Core Animation to start its animations with -display since the DRT window has autodisplay disabled. + if ([view _isUsingAcceleratedCompositing]) + onscreen = YES; + + NSSize webViewSize = [view frame].size; + size_t pixelsWide = static_cast<size_t>(webViewSize.width); + size_t pixelsHigh = static_cast<size_t>(webViewSize.height); + size_t rowBytes = 0; + void* buffer = 0; + RefPtr<BitmapContext> bitmapContext = createBitmapContext(pixelsWide, pixelsHigh, rowBytes, buffer); + if (!bitmapContext) + return 0; + CGContextRef context = bitmapContext->cgContext(); + NSGraphicsContext *nsContext = [NSGraphicsContext graphicsContextWithGraphicsPort:context flipped:NO]; ASSERT(nsContext); @@ -254,3 +264,16 @@ PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool onscreen, bool inc return bitmapContext.release(); } + +PassRefPtr<BitmapContext> createPagedBitmapContext() +{ + int pageWidthInPixels = LayoutTestController::maxViewWidth; + int pageHeightInPixels = LayoutTestController::maxViewHeight; + int numberOfPages = [mainFrame numberOfPages:pageWidthInPixels:pageHeightInPixels]; + size_t rowBytes = 0; + void* buffer = 0; + + RefPtr<BitmapContext> bitmapContext = createBitmapContext(pageWidthInPixels, numberOfPages * (pageHeightInPixels + 1) - 1, rowBytes, buffer); + [mainFrame printToCGContext:bitmapContext->cgContext():pageWidthInPixels:pageHeightInPixels]; + return bitmapContext.release(); +} diff --git a/WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.mm b/WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.mm index fca65f9..0855b83 100644 --- a/WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.mm +++ b/WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.mm @@ -33,6 +33,7 @@ #import "LayoutTestController.h" #import <WebKit/WebKit.h> #import <WebKit/WebTypesInternal.h> +#import <WebKit/WebDataSourcePrivate.h> #import <wtf/Assertions.h> using namespace std; @@ -131,6 +132,10 @@ using namespace std; printf("%s\n", [string UTF8String]); } + if (!done && !gLayoutTestController->deferMainResourceDataLoad()) { + [dataSource _setDeferMainResourceDataLoad:false]; + } + if (!done && gLayoutTestController->willSendRequestReturnsNull()) return nil; @@ -167,6 +172,9 @@ using namespace std; - (void)webView:(WebView *)wv resource:(id)identifier didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge fromDataSource:(WebDataSource *)dataSource { if (!gLayoutTestController->handlesAuthenticationChallenges()) { + NSString *string = [NSString stringWithFormat:@"%@ - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet", identifier]; + printf("%s\n", [string UTF8String]); + [[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge]; return; } diff --git a/WebKitTools/DumpRenderTree/mac/WorkQueueItemMac.mm b/WebKitTools/DumpRenderTree/mac/WorkQueueItemMac.mm index 4e39a5a..797afb7 100644 --- a/WebKitTools/DumpRenderTree/mac/WorkQueueItemMac.mm +++ b/WebKitTools/DumpRenderTree/mac/WorkQueueItemMac.mm @@ -54,6 +54,15 @@ bool LoadItem::invoke() const return true; } +bool LoadHTMLStringItem::invoke() const +{ + RetainPtr<CFStringRef> contentCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, m_content.get())); + RetainPtr<CFStringRef> baseURLCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, m_baseURL.get())); + + [mainFrame loadHTMLString:(NSString *)contentCF.get() baseURL:[NSURL URLWithString:(NSString *)baseURLCF.get()]]; + return true; +} + bool ReloadItem::invoke() const { [[mainFrame webView] reload:nil]; diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp index 3eb1714..022a867 100644 --- a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp +++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp @@ -847,6 +847,7 @@ void DumpRenderTree::dump() fputs("#EOF\n", stdout); fputs("#EOF\n", stderr); + // FIXME: All other ports don't dump pixels, if generatePixelResults is false. if (m_dumpPixels) { QImage image(m_page->viewportSize(), QImage::Format_ARGB32); image.fill(Qt::white); diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp index dd11428..3a6229f 100644 --- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp +++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp @@ -72,6 +72,7 @@ void LayoutTestController::reset() DumpRenderTreeSupportQt::dumpFrameLoader(false); DumpRenderTreeSupportQt::dumpResourceLoadCallbacks(false); DumpRenderTreeSupportQt::dumpResourceResponseMIMETypes(false); + DumpRenderTreeSupportQt::setDeferMainResourceDataLoad(true); DumpRenderTreeSupportQt::setWillSendRequestReturnsNullOnRedirect(false); DumpRenderTreeSupportQt::setWillSendRequestReturnsNull(false); DumpRenderTreeSupportQt::setWillSendRequestClearHeaders(QStringList()); @@ -249,6 +250,11 @@ void LayoutTestController::setWillSendRequestClearHeader(const QStringList& head DumpRenderTreeSupportQt::setWillSendRequestClearHeaders(headers); } +void LayoutTestController::setDeferMainResourceDataLoad(bool defer) +{ + DumpRenderTreeSupportQt::setDeferMainResourceDataLoad(defer); +} + void LayoutTestController::queueBackNavigation(int howFarBackward) { //qDebug() << ">>>queueBackNavigation" << howFarBackward; @@ -269,6 +275,11 @@ void LayoutTestController::queueLoad(const QString& url, const QString& target) WorkQueue::shared()->queue(new LoadItem(absoluteUrl, target, m_drt->webPage())); } +void LayoutTestController::queueLoadHTMLString(const QString& content, const QString& baseURL) +{ + WorkQueue::shared()->queue(new LoadHTMLStringItem(content, baseURL, m_drt->webPage())); +} + void LayoutTestController::queueReload() { //qDebug() << ">>>queueReload"; diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h index 76bc802..4e95381 100644 --- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h +++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h @@ -112,6 +112,7 @@ public slots: void queueBackNavigation(int howFarBackward); void queueForwardNavigation(int howFarForward); void queueLoad(const QString& url, const QString& target = QString()); + void queueLoadHTMLString(const QString& content, const QString& baseURL = QString()); void queueReload(); void queueLoadingScript(const QString& script); void queueNonLoadingScript(const QString& script); @@ -148,6 +149,7 @@ public slots: void resetLoadFinished() { m_loadFinished = false; } void setWindowIsKey(bool isKey); void setMainFrameIsFirstResponder(bool isFirst); + void setDeferMainResourceDataLoad(bool); void setJavaScriptCanAccessClipboard(bool enable); void setXSSAuditorEnabled(bool enable); void setCaretBrowsingEnabled(bool enable); diff --git a/WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.cpp b/WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.cpp index 067e6aa..d1baf08 100644 --- a/WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.cpp +++ b/WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.cpp @@ -60,6 +60,18 @@ bool LoadItem::invoke() const return true; } +bool LoadHTMLStringItem::invoke() const +{ + Q_ASSERT(m_webPage); + + QWebFrame* frame = m_webPage->mainFrame(); + if (!frame) + return false; + + frame->setHtml(m_content, QUrl(m_baseURL)); + return true; +} + bool ReloadItem::invoke() const { //qDebug() << ">>>ReloadItem::invoke"; diff --git a/WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.h b/WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.h index 94da5e1..97c9b04 100644 --- a/WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.h +++ b/WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.h @@ -64,6 +64,22 @@ private: QString m_target; }; +class LoadHTMLStringItem : public WorkQueueItem { +public: + LoadHTMLStringItem(const QString& content, const QString &baseURL, QWebPage *page) + : WorkQueueItem(page) + , m_content(content) + , m_baseURL(baseURL) + { + } + +private: + virtual bool invoke() const; + + QString m_content; + QString m_baseURL; +}; + class ReloadItem : public WorkQueueItem { public: ReloadItem(QWebPage *page) diff --git a/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp index 451ff86..a1b72e1 100644 --- a/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp +++ b/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp @@ -134,7 +134,15 @@ bool setAlwaysAcceptCookies(bool alwaysAcceptCookies) wstring urlSuitableForTestResult(const wstring& url) { - if (!url.c_str() || url.find(L"file://") == wstring::npos) + if (url.find(L"file://") == wstring::npos) + return url; + + return lastPathComponent(url); +} + +wstring lastPathComponent(const wstring& url) +{ + if (url.empty()) return url; return PathFindFileNameW(url.c_str()); @@ -723,10 +731,11 @@ void dump() fflush(stderr); } - if (dumpPixels) { - if (!gLayoutTestController->dumpAsText() && !gLayoutTestController->dumpDOMAsWebArchive() && !gLayoutTestController->dumpSourceAsWebArchive()) - dumpWebViewAsPixelsAndCompareWithExpected(gLayoutTestController->expectedPixelHash()); - } + if (dumpPixels + && gLayoutTestController->generatePixelResults() + && !gLayoutTestController->dumpDOMAsWebArchive() + && !gLayoutTestController->dumpSourceAsWebArchive()) + dumpWebViewAsPixelsAndCompareWithExpected(gLayoutTestController->expectedPixelHash()); printf("#EOF\n"); // terminate the (possibly empty) pixels block fflush(stdout); diff --git a/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h b/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h index cc4337b..e3497c9 100644 --- a/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h +++ b/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h @@ -49,6 +49,7 @@ extern HWND webViewWindow; #include <wtf/Vector.h> std::wstring urlSuitableForTestResult(const std::wstring& url); +std::wstring lastPathComponent(const std::wstring&); std::string toUTF8(BSTR); std::string toUTF8(const std::wstring&); IWebView* createWebViewAndOffscreenWindow(HWND* webViewWindow = 0); diff --git a/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp b/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp index b79bb2a..a29623e 100644 --- a/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp +++ b/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp @@ -196,8 +196,29 @@ JSRetainPtr<JSStringRef> LayoutTestController::layerTreeAsText() const JSRetainPtr<JSStringRef> LayoutTestController::markerTextForListItem(JSContextRef context, JSValueRef nodeObject) const { - // FIXME: Implement me. - return JSRetainPtr<JSStringRef>(); + COMPtr<IWebView> webView; + if (FAILED(frame->webView(&webView))) + return 0; + + COMPtr<IWebViewPrivate> webViewPrivate(Query, webView); + if (!webViewPrivate) + return 0; + + COMPtr<IDOMElement> element; + if (FAILED(webViewPrivate->elementFromJS(context, nodeObject, &element))) + return 0; + + COMPtr<IDOMElementPrivate> elementPrivate(Query, element); + if (!elementPrivate) + return 0; + + BSTR textBSTR = 0; + if (FAILED(elementPrivate->markerTextForListItem(&textBSTR))) + return 0; + + JSRetainPtr<JSStringRef> markerText(Adopt, JSStringCreateWithBSTR(textBSTR)); + SysFreeString(textBSTR); + return markerText; } void LayoutTestController::waitForPolicyDelegate() diff --git a/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp b/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp index ce01933..825366a 100644 --- a/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp +++ b/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp @@ -250,6 +250,13 @@ HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::willSendRequest( descriptionSuitableForTestResult(redirectResponse).c_str()); } + if (!done && !gLayoutTestController->deferMainResourceDataLoad()) { + COMPtr<IWebDataSourcePrivate> dataSourcePrivate(Query, dataSource); + if (!dataSourcePrivate) + return E_FAIL; + dataSourcePrivate->setDeferMainResourceDataLoad(FALSE); + } + if (!done && gLayoutTestController->willSendRequestReturnsNull()) { *newRequest = 0; return S_OK; @@ -285,6 +292,7 @@ HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::didReceiveAuthenticationChalleng return E_FAIL; if (!gLayoutTestController->handlesAuthenticationChallenges()) { + printf("%S - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet\n", descriptionSuitableForTestResult(identifier).c_str()); sender->continueWithoutCredentialForAuthenticationChallenge(challenge); return S_OK; } @@ -326,10 +334,10 @@ HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::didReceiveResponse( if (FAILED(response->URL(&urlBSTR))) E_FAIL; - wstring url = urlSuitableForTestResult(wstringFromBSTR(urlBSTR)); + wstring url = wstringFromBSTR(urlBSTR); ::SysFreeString(urlBSTR); - printf("%S has MIME type %S\n", url.c_str(), mimeType.c_str()); + printf("%S has MIME type %S\n", lastPathComponent(url).c_str(), mimeType.c_str()); } return S_OK; diff --git a/WebKitTools/DumpRenderTree/win/WorkQueueItemWin.cpp b/WebKitTools/DumpRenderTree/win/WorkQueueItemWin.cpp index 7c60d3d..a24ca37 100644 --- a/WebKitTools/DumpRenderTree/win/WorkQueueItemWin.cpp +++ b/WebKitTools/DumpRenderTree/win/WorkQueueItemWin.cpp @@ -81,6 +81,22 @@ bool LoadItem::invoke() const return true; } +bool LoadHTMLStringItem::invoke() const +{ + wstring content = jsStringRefToWString(m_content.get()); + wstring baseURL = jsStringRefToWString(m_baseURL.get()); + + BSTR contentBSTR = SysAllocString(content.c_str()); + BSTR baseURLBSTR = SysAllocString(baseURL.c_str()); + + frame->loadHTMLString(contentBSTR, baseURLBSTR); + + SysFreeString(contentBSTR); + SysFreeString(baseURLBSTR); + + return true; +} + bool ReloadItem::invoke() const { COMPtr<IWebView> webView; diff --git a/WebKitTools/DumpRenderTree/wx/DumpRenderTreeWx.cpp b/WebKitTools/DumpRenderTree/wx/DumpRenderTreeWx.cpp index c56f129..7142af2 100644 --- a/WebKitTools/DumpRenderTree/wx/DumpRenderTreeWx.cpp +++ b/WebKitTools/DumpRenderTree/wx/DumpRenderTreeWx.cpp @@ -201,13 +201,11 @@ void dump() } } - if (dumpPixels) { - if (!gLayoutTestController->dumpAsText() && - !gLayoutTestController->dumpDOMAsWebArchive() && - !gLayoutTestController->dumpSourceAsWebArchive()) { - // FIXME: Add support for dumping pixels - } - + if (dumpPixels + && gLayoutTestController->generatePixelResults() + && !gLayoutTestController->dumpDOMAsWebArchive() + && !gLayoutTestController->dumpSourceAsWebArchive()) { + // FIXME: Add support for dumping pixels fflush(stdout); } diff --git a/WebKitTools/DumpRenderTree/wx/WorkQueueItemWx.cpp b/WebKitTools/DumpRenderTree/wx/WorkQueueItemWx.cpp index 3e8da19..e6ecb75 100644 --- a/WebKitTools/DumpRenderTree/wx/WorkQueueItemWx.cpp +++ b/WebKitTools/DumpRenderTree/wx/WorkQueueItemWx.cpp @@ -36,6 +36,11 @@ bool LoadItem::invoke() const return false; } +bool LoadHTMLStringItem::invoke() const +{ + return false; +} + bool ReloadItem::invoke() const { return false; diff --git a/WebKitTools/MiniBrowser/Configurations/MiniBrowserCommon.vsprops b/WebKitTools/MiniBrowser/Configurations/MiniBrowserCommon.vsprops new file mode 100644 index 0000000..7f843ce --- /dev/null +++ b/WebKitTools/MiniBrowser/Configurations/MiniBrowserCommon.vsprops @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="MiniBrowserCommon"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""$(WebKitLibrariesDir)\Include";"$(WebKitOutputDir)\Include""
+ UsePrecompiledHeader="2"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="shlwapi.lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\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"

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 "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
+ />
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%

if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"
"
+ />
+</VisualStudioPropertySheet>
diff --git a/WebKitTools/MiniBrowser/MBToolbarItem.h b/WebKitTools/MiniBrowser/MBToolbarItem.h new file mode 100644 index 0000000..cc5a4b4 --- /dev/null +++ b/WebKitTools/MiniBrowser/MBToolbarItem.h @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2010 Apple 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. 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. + */ + +@interface MBToolbarItem : NSToolbarItem +{ } +@end diff --git a/WebKitTools/MiniBrowser/MBToolbarItem.m b/WebKitTools/MiniBrowser/MBToolbarItem.m new file mode 100644 index 0000000..56f7778 --- /dev/null +++ b/WebKitTools/MiniBrowser/MBToolbarItem.m @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2010 Apple 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. 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. + */ + +#import "MBToolbarItem.h" + +@implementation MBToolbarItem + +- (void)validate +{ + [self setEnabled:[[self target] validateUserInterfaceItem:self]]; +} + +@end diff --git a/WebKitTools/MiniBrowser/MiniBrowser.vcproj b/WebKitTools/MiniBrowser/MiniBrowser.vcproj index 8b956e7..43fc34f 100644 --- a/WebKitTools/MiniBrowser/MiniBrowser.vcproj +++ b/WebKitTools/MiniBrowser/MiniBrowser.vcproj @@ -17,16 +17,14 @@ <Configurations>
<Configuration
Name="Debug|Win32"
- OutputDirectory="$(WebKitOutputDir)\bin"
- IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;.\Configurations\MiniBrowserCommon.vsprops"
UseOfATL="1"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
- CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%

if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"
"
+ CommandLine=""
/>
<Tool
Name="VCCustomBuildTool"
@@ -42,35 +40,20 @@ />
<Tool
Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""$(WebKitLibrariesDir)\Include";"$(WebKitOutputDir)\Include""
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="2"
- WarningLevel="3"
- WarnAsError="true"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
+ AdditionalIncludeDirectories=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories=""$(IntDir)\include";..\..\Internal\Safari\win\WTL80\include"
+ AdditionalIncludeDirectories=""
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="shlwapi.lib WebKit2$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="2"
- TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
@@ -97,22 +80,20 @@ />
<Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\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"

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 "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"

"
+ CommandLine=""
/>
</Configuration>
<Configuration
Name="Release|Win32"
- OutputDirectory="$(WebKitOutputDir)\bin"
- IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;.\Configurations\MiniBrowserCommon.vsprops"
UseOfATL="1"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
- CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%

if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"
"
+ CommandLine=""
/>
<Tool
Name="VCCustomBuildTool"
@@ -128,34 +109,20 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(WebKitLibrariesDir)\Include";"$(WebKitOutputDir)\Include""
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
- RuntimeLibrary="2"
- UsePrecompiledHeader="2"
- WarningLevel="3"
- WarnAsError="true"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
+ AdditionalIncludeDirectories=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories=""$(IntDir)\include";..\Safari\win\WTL80\include"
+ AdditionalIncludeDirectories=""
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="shlwapi.lib WebKit2$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
@@ -180,7 +147,143 @@ />
<Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\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"

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 "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"

"
+ CommandLine=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug_Internal|Win32"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;.\Configurations\MiniBrowserCommon.vsprops"
+ UseOfATL="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories=""
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ TypeLibraryFile=""
+ ComponentFileName=""
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug_All|Win32"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops;.\Configurations\MiniBrowserCommon.vsprops"
+ UseOfATL="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories=""
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ TypeLibraryFile=""
+ ComponentFileName=""
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
/>
</Configuration>
</Configurations>
@@ -227,6 +330,22 @@ UsePrecompiledHeader="1"
/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Internal|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
</File>
</Filter>
<Filter
diff --git a/WebKitTools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj b/WebKitTools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj index 9aa8cf4..f05c351 100644 --- a/WebKitTools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj +++ b/WebKitTools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj @@ -8,6 +8,7 @@ /* Begin PBXBuildFile section */ 256AC3DA0F4B6AC300CF3369 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 256AC3D90F4B6AC300CF3369 /* AppDelegate.m */; }; + 51E244FA11EFCE07008228D1 /* MBToolbarItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 51E244F911EFCE07008228D1 /* MBToolbarItem.m */; }; 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; BC20545E11C96C92008F3375 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; BC329487116A92E2008635D0 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BC329486116A92E2008635D0 /* main.m */; }; @@ -55,6 +56,8 @@ 256AC3F00F4B6AF500CF3369 /* MiniBrowser_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MiniBrowser_Prefix.pch; path = mac/MiniBrowser_Prefix.pch; sourceTree = "<group>"; }; 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; }; 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; }; + 51E244F811EFCE07008228D1 /* MBToolbarItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MBToolbarItem.h; sourceTree = "<group>"; }; + 51E244F911EFCE07008228D1 /* MBToolbarItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MBToolbarItem.m; sourceTree = "<group>"; }; 8D1107320486CEB800E47090 /* MiniBrowser.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MiniBrowser.app; sourceTree = BUILT_PRODUCTS_DIR; }; BC1770121188DF19007D9E9A /* make-launchable.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = "make-launchable.sh"; path = "mac/make-launchable.sh"; sourceTree = "<group>"; }; BC329486116A92E2008635D0 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = mac/main.m; sourceTree = "<group>"; }; @@ -108,6 +111,8 @@ BC329497116A941B008635D0 /* BrowserWindowController.m */, BCE625EF117FC82700572433 /* BrowserStatisticsWindowController.h */, BCE625F0117FC82700572433 /* BrowserStatisticsWindowController.m */, + 51E244F811EFCE07008228D1 /* MBToolbarItem.h */, + 51E244F911EFCE07008228D1 /* MBToolbarItem.m */, ); name = MiniBrowser; sourceTree = "<group>"; @@ -308,6 +313,7 @@ BC329487116A92E2008635D0 /* main.m in Sources */, BC329498116A941B008635D0 /* BrowserWindowController.m in Sources */, BCE625F1117FC82700572433 /* BrowserStatisticsWindowController.m in Sources */, + 51E244FA11EFCE07008228D1 /* MBToolbarItem.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/WebKitTools/MiniBrowser/mac/BrowserWindow.xib b/WebKitTools/MiniBrowser/mac/BrowserWindow.xib index 64c4999..52558a7 100644 --- a/WebKitTools/MiniBrowser/mac/BrowserWindow.xib +++ b/WebKitTools/MiniBrowser/mac/BrowserWindow.xib @@ -3,15 +3,16 @@ <data> <int key="IBDocument.SystemTarget">1060</int> <string key="IBDocument.SystemVersion">10F569</string> - <string key="IBDocument.InterfaceBuilderVersion">800</string> + <string key="IBDocument.InterfaceBuilderVersion">762</string> <string key="IBDocument.AppKitVersion">1038.29</string> <string key="IBDocument.HIToolboxVersion">461.00</string> <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="NS.object.0">800</string> + <string key="NS.object.0">762</string> </object> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> + <integer value="2"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -40,12 +41,260 @@ <object class="NSWindowTemplate" id="1005"> <int key="NSWindowStyleMask">4111</int> <int key="NSWindowBacking">2</int> - <string key="NSWindowRect">{{517, 280}, {776, 658}}</string> + <string key="NSWindowRect">{{517, 330}, {776, 608}}</string> <int key="NSWTFlags">544735232</int> <string key="NSWindowTitle">Window</string> <string key="NSWindowClass">NSWindow</string> - <nil key="NSViewClass"/> - <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> + <object class="NSToolbar" key="NSViewClass" id="726585754"> + <object class="NSMutableString" key="NSToolbarIdentifier"> + <characters key="NS.bytes">994A0CB1-7575-4F39-A65B-7165AB1E8015</characters> + </object> + <nil key="NSToolbarDelegate"/> + <bool key="NSToolbarPrefersToBeShown">YES</bool> + <bool key="NSToolbarShowsBaselineSeparator">YES</bool> + <bool key="NSToolbarAllowsUserCustomization">YES</bool> + <bool key="NSToolbarAutosavesConfiguration">NO</bool> + <int key="NSToolbarDisplayMode">2</int> + <int key="NSToolbarSizeMode">1</int> + <object class="NSMutableDictionary" key="NSToolbarIBIdentifiedItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>255D29F2-C9AA-4B4B-BB43-B38FCD6A0BBB</string> + <string>6BDC61B7-F1A8-425A-A212-9CAC59C56385</string> + <string>73DE9F4B-73E2-4036-A134-2D9E029DA980</string> + <string>88C16109-D40F-4682-BCE4-CBEE2EDE32D2</string> + <string>E1A9D32A-59E3-467B-9ABA-A95780416E69</string> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSToolbarItem" id="16289946"> + <object class="NSMutableString" key="NSToolbarItemIdentifier"> + <characters key="NS.bytes">255D29F2-C9AA-4B4B-BB43-B38FCD6A0BBB</characters> + </object> + <string key="NSToolbarItemLabel">Location</string> + <string key="NSToolbarItemPaletteLabel">Location</string> + <nil key="NSToolbarItemToolTip"/> + <object class="NSTextField" key="NSToolbarItemView" id="690456651"> + <nil key="NSNextResponder"/> + <int key="NSvFlags">266</int> + <string key="NSFrame">{{0, 14}, {565, 22}}</string> + <int key="NSViewLayerContentsRedrawPolicy">2</int> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="1023147716"> + <int key="NSCellFlags">-1804468671</int> + <int key="NSCellFlags2">268436480</int> + <string key="NSContents"/> + <object class="NSFont" key="NSSupport" id="1064395332"> + <string key="NSName">LucidaGrande</string> + <double key="NSSize">13</double> + <int key="NSfFlags">1044</int> + </object> + <reference key="NSControlView" ref="690456651"/> + <bool key="NSDrawsBackground">YES</bool> + <object class="NSColor" key="NSBackgroundColor"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">textBackgroundColor</string> + <object class="NSColor" key="NSColor"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MQA</bytes> + </object> + </object> + <object class="NSColor" key="NSTextColor"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">textColor</string> + <object class="NSColor" key="NSColor" id="365730878"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MAA</bytes> + </object> + </object> + </object> + </object> + <nil key="NSToolbarItemImage"/> + <nil key="NSToolbarItemTarget"/> + <nil key="NSToolbarItemAction"/> + <string key="NSToolbarItemMinSize">{200, 22}</string> + <string key="NSToolbarItemMaxSize">{800, 22}</string> + <bool key="NSToolbarItemEnabled">YES</bool> + <bool key="NSToolbarItemAutovalidates">YES</bool> + <int key="NSToolbarItemTag">0</int> + <bool key="NSToolbarIsUserRemovable">YES</bool> + <int key="NSToolbarItemVisibilityPriority">0</int> + </object> + <object class="NSToolbarItem" id="457655522"> + <object class="NSMutableString" key="NSToolbarItemIdentifier"> + <characters key="NS.bytes">6BDC61B7-F1A8-425A-A212-9CAC59C56385</characters> + </object> + <string key="NSToolbarItemLabel">Progress</string> + <string key="NSToolbarItemPaletteLabel">Progress</string> + <nil key="NSToolbarItemToolTip"/> + <object class="NSProgressIndicator" key="NSToolbarItemView" id="128750774"> + <nil key="NSNextResponder"/> + <int key="NSvFlags">1289</int> + <object class="NSPSMatrix" key="NSDrawMatrix"/> + <string key="NSFrame">{{19, 14}, {16, 16}}</string> + <int key="NSpiFlags">28936</int> + <double key="NSMaxValue">1</double> + </object> + <nil key="NSToolbarItemImage"/> + <nil key="NSToolbarItemTarget"/> + <nil key="NSToolbarItemAction"/> + <string key="NSToolbarItemMinSize">{16, 16}</string> + <string key="NSToolbarItemMaxSize">{16, 16}</string> + <bool key="NSToolbarItemEnabled">YES</bool> + <bool key="NSToolbarItemAutovalidates">YES</bool> + <int key="NSToolbarItemTag">-1</int> + <bool key="NSToolbarIsUserRemovable">YES</bool> + <int key="NSToolbarItemVisibilityPriority">0</int> + </object> + <object class="NSToolbarItem" id="332491395"> + <object class="NSMutableString" key="NSToolbarItemIdentifier"> + <characters key="NS.bytes">73DE9F4B-73E2-4036-A134-2D9E029DA980</characters> + </object> + <string key="NSToolbarItemLabel">Go Back</string> + <string key="NSToolbarItemPaletteLabel">Go Back</string> + <nil key="NSToolbarItemToolTip"/> + <object class="NSButton" key="NSToolbarItemView" id="777930419"> + <nil key="NSNextResponder"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{9, 14}, {32, 25}}</string> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="663899880"> + <int key="NSCellFlags">-2080244224</int> + <int key="NSCellFlags2">134217728</int> + <string key="NSContents"/> + <reference key="NSSupport" ref="1064395332"/> + <reference key="NSControlView" ref="777930419"/> + <int key="NSButtonFlags">-2033434369</int> + <int key="NSButtonFlags2">163</int> + <object class="NSCustomResource" key="NSNormalImage" id="206098440"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSGoLeftTemplate</string> + </object> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> + </object> + </object> + <reference key="NSToolbarItemImage" ref="206098440"/> + <nil key="NSToolbarItemTarget"/> + <nil key="NSToolbarItemAction"/> + <string key="NSToolbarItemMinSize">{32, 25}</string> + <string key="NSToolbarItemMaxSize">{32, 25}</string> + <bool key="NSToolbarItemEnabled">YES</bool> + <bool key="NSToolbarItemAutovalidates">YES</bool> + <int key="NSToolbarItemTag">0</int> + <bool key="NSToolbarIsUserRemovable">YES</bool> + <int key="NSToolbarItemVisibilityPriority">0</int> + </object> + <object class="NSToolbarItem" id="818723416"> + <object class="NSMutableString" key="NSToolbarItemIdentifier"> + <characters key="NS.bytes">88C16109-D40F-4682-BCE4-CBEE2EDE32D2</characters> + </object> + <string key="NSToolbarItemLabel">Refresh</string> + <string key="NSToolbarItemPaletteLabel">Refresh</string> + <nil key="NSToolbarItemToolTip"/> + <object class="NSButton" key="NSToolbarItemView" id="35464578"> + <nil key="NSNextResponder"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{10, 14}, {29, 25}}</string> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="366486485"> + <int key="NSCellFlags">-2080244224</int> + <int key="NSCellFlags2">134217728</int> + <string key="NSContents"/> + <reference key="NSSupport" ref="1064395332"/> + <reference key="NSControlView" ref="35464578"/> + <int key="NSButtonFlags">-2033434369</int> + <int key="NSButtonFlags2">163</int> + <object class="NSCustomResource" key="NSNormalImage" id="443763357"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSRefreshTemplate</string> + </object> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> + </object> + </object> + <reference key="NSToolbarItemImage" ref="443763357"/> + <nil key="NSToolbarItemTarget"/> + <nil key="NSToolbarItemAction"/> + <string key="NSToolbarItemMinSize">{29, 25}</string> + <string key="NSToolbarItemMaxSize">{29, 25}</string> + <bool key="NSToolbarItemEnabled">YES</bool> + <bool key="NSToolbarItemAutovalidates">YES</bool> + <int key="NSToolbarItemTag">0</int> + <bool key="NSToolbarIsUserRemovable">YES</bool> + <int key="NSToolbarItemVisibilityPriority">0</int> + </object> + <object class="NSToolbarItem" id="928383107"> + <object class="NSMutableString" key="NSToolbarItemIdentifier"> + <characters key="NS.bytes">E1A9D32A-59E3-467B-9ABA-A95780416E69</characters> + </object> + <string key="NSToolbarItemLabel">Go Forward</string> + <string key="NSToolbarItemPaletteLabel">Go Forward</string> + <nil key="NSToolbarItemToolTip"/> + <object class="NSButton" key="NSToolbarItemView" id="95415629"> + <nil key="NSNextResponder"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{19, 14}, {32, 25}}</string> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="767612038"> + <int key="NSCellFlags">-2080244224</int> + <int key="NSCellFlags2">134217728</int> + <string key="NSContents"/> + <reference key="NSSupport" ref="1064395332"/> + <reference key="NSControlView" ref="95415629"/> + <int key="NSButtonFlags">-2033434369</int> + <int key="NSButtonFlags2">163</int> + <object class="NSCustomResource" key="NSNormalImage" id="163672266"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSGoRightTemplate</string> + </object> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> + </object> + </object> + <reference key="NSToolbarItemImage" ref="163672266"/> + <nil key="NSToolbarItemTarget"/> + <nil key="NSToolbarItemAction"/> + <string key="NSToolbarItemMinSize">{32, 25}</string> + <string key="NSToolbarItemMaxSize">{32, 25}</string> + <bool key="NSToolbarItemEnabled">YES</bool> + <bool key="NSToolbarItemAutovalidates">YES</bool> + <int key="NSToolbarItemTag">0</int> + <bool key="NSToolbarIsUserRemovable">YES</bool> + <int key="NSToolbarItemVisibilityPriority">0</int> + </object> + </object> + </object> + <object class="NSArray" key="NSToolbarIBAllowedItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="332491395"/> + <reference ref="928383107"/> + <reference ref="818723416"/> + <reference ref="457655522"/> + <reference ref="16289946"/> + </object> + <object class="NSMutableArray" key="NSToolbarIBDefaultItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="332491395"/> + <reference ref="928383107"/> + <reference ref="818723416"/> + <reference ref="16289946"/> + <reference ref="457655522"/> + </object> + <object class="NSMutableArray" key="NSToolbarIBSelectableItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> + </object> + <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string> <object class="NSView" key="NSWindowView" id="1006"> <reference key="NSNextResponder"/> <int key="NSvFlags">256</int> @@ -56,92 +305,16 @@ <int key="NSvFlags">274</int> <string key="NSFrameSize">{776, 608}</string> <reference key="NSSuperview" ref="1006"/> - <reference key="NSWindow"/> <int key="NSViewLayerContentsRedrawPolicy">2</int> <string key="NSClassName">NSView</string> </object> - <object class="NSTextField" id="690456651"> - <reference key="NSNextResponder" ref="1006"/> - <int key="NSvFlags">266</int> - <string key="NSFrame">{{45, 618}, {699, 22}}</string> - <reference key="NSSuperview" ref="1006"/> - <reference key="NSWindow"/> - <int key="NSViewLayerContentsRedrawPolicy">2</int> - <bool key="NSEnabled">YES</bool> - <object class="NSTextFieldCell" key="NSCell" id="1023147716"> - <int key="NSCellFlags">-1804468671</int> - <int key="NSCellFlags2">268436480</int> - <string key="NSContents"/> - <object class="NSFont" key="NSSupport" id="1064395332"> - <string key="NSName">LucidaGrande</string> - <double key="NSSize">13</double> - <int key="NSfFlags">1044</int> - </object> - <reference key="NSControlView" ref="690456651"/> - <bool key="NSDrawsBackground">YES</bool> - <object class="NSColor" key="NSBackgroundColor"> - <int key="NSColorSpace">6</int> - <string key="NSCatalogName">System</string> - <string key="NSColorName">textBackgroundColor</string> - <object class="NSColor" key="NSColor"> - <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MQA</bytes> - </object> - </object> - <object class="NSColor" key="NSTextColor"> - <int key="NSColorSpace">6</int> - <string key="NSCatalogName">System</string> - <string key="NSColorName">textColor</string> - <object class="NSColor" key="NSColor" id="365730878"> - <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MAA</bytes> - </object> - </object> - </object> - </object> - <object class="NSProgressIndicator" id="128750774"> - <reference key="NSNextResponder" ref="1006"/> - <int key="NSvFlags">1289</int> - <object class="NSPSMatrix" key="NSDrawMatrix"/> - <string key="NSFrame">{{752, 621}, {16, 16}}</string> - <reference key="NSSuperview" ref="1006"/> - <reference key="NSWindow"/> - <int key="NSpiFlags">28936</int> - <double key="NSMaxValue">1</double> - </object> - <object class="NSButton" id="35464578"> - <reference key="NSNextResponder" ref="1006"/> - <int key="NSvFlags">268</int> - <string key="NSFrame">{{8, 616}, {29, 25}}</string> - <reference key="NSSuperview" ref="1006"/> - <reference key="NSWindow"/> - <bool key="NSEnabled">YES</bool> - <object class="NSButtonCell" key="NSCell" id="366486485"> - <int key="NSCellFlags">-2080244224</int> - <int key="NSCellFlags2">134217728</int> - <string key="NSContents"/> - <reference key="NSSupport" ref="1064395332"/> - <reference key="NSControlView" ref="35464578"/> - <int key="NSButtonFlags">-2033434369</int> - <int key="NSButtonFlags2">163</int> - <object class="NSCustomResource" key="NSNormalImage"> - <string key="NSClassName">NSImage</string> - <string key="NSResourceName">NSRefreshTemplate</string> - </object> - <string key="NSAlternateContents"/> - <string key="NSKeyEquivalent"/> - <int key="NSPeriodicDelay">400</int> - <int key="NSPeriodicInterval">75</int> - </object> - </object> </object> - <string key="NSFrameSize">{776, 658}</string> + <string key="NSFrameSize">{776, 608}</string> <reference key="NSSuperview"/> - <reference key="NSWindow"/> <int key="NSViewLayerContentsRedrawPolicy">2</int> </object> <string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string> - <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> + <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string> <string key="NSFrameAutosaveName">Main Window</string> </object> </object> @@ -212,6 +385,46 @@ </object> <int key="connectionID">37</int> </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">backButton</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="777930419"/> + </object> + <int key="connectionID">46</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">forwardButton</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="95415629"/> + </object> + <int key="connectionID">47</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">goBack:</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="332491395"/> + </object> + <int key="connectionID">61</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">goForward:</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="928383107"/> + </object> + <int key="connectionID">62</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">toolbar</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="726585754"/> + </object> + <int key="connectionID">67</int> + </object> </object> <object class="IBMutableOrderedSet" key="objectRecords"> <object class="NSArray" key="orderedObjects"> @@ -246,6 +459,7 @@ <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> <reference ref="1006"/> + <reference ref="726585754"/> </object> <reference key="parent" ref="0"/> </object> @@ -254,31 +468,82 @@ <reference key="object" ref="1006"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="690456651"/> - <reference ref="128750774"/> - <reference ref="35464578"/> <reference ref="877383975"/> </object> <reference key="parent" ref="1005"/> </object> <object class="IBObjectRecord"> - <int key="objectID">10</int> - <reference key="object" ref="690456651"/> + <int key="objectID">9</int> + <reference key="object" ref="877383975"/> + <reference key="parent" ref="1006"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">48</int> + <reference key="object" ref="726585754"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="1023147716"/> + <reference ref="332491395"/> + <reference ref="928383107"/> + <reference ref="818723416"/> + <reference ref="16289946"/> + <reference ref="457655522"/> </object> - <reference key="parent" ref="1006"/> + <reference key="parent" ref="1005"/> </object> <object class="IBObjectRecord"> - <int key="objectID">11</int> - <reference key="object" ref="1023147716"/> - <reference key="parent" ref="690456651"/> + <int key="objectID">56</int> + <reference key="object" ref="332491395"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="777930419"/> + </object> + <reference key="parent" ref="726585754"/> </object> <object class="IBObjectRecord"> - <int key="objectID">21</int> - <reference key="object" ref="128750774"/> - <reference key="parent" ref="1006"/> + <int key="objectID">40</int> + <reference key="object" ref="777930419"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="663899880"/> + </object> + <reference key="parent" ref="332491395"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">41</int> + <reference key="object" ref="663899880"/> + <reference key="parent" ref="777930419"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">57</int> + <reference key="object" ref="928383107"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="95415629"/> + </object> + <reference key="parent" ref="726585754"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">42</int> + <reference key="object" ref="95415629"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="767612038"/> + </object> + <reference key="parent" ref="928383107"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">43</int> + <reference key="object" ref="767612038"/> + <reference key="parent" ref="95415629"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">58</int> + <reference key="object" ref="818723416"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="35464578"/> + </object> + <reference key="parent" ref="726585754"/> </object> <object class="IBObjectRecord"> <int key="objectID">23</int> @@ -287,7 +552,7 @@ <bool key="EncodedWithXMLCoder">YES</bool> <reference ref="366486485"/> </object> - <reference key="parent" ref="1006"/> + <reference key="parent" ref="818723416"/> </object> <object class="IBObjectRecord"> <int key="objectID">24</int> @@ -295,9 +560,41 @@ <reference key="parent" ref="35464578"/> </object> <object class="IBObjectRecord"> - <int key="objectID">9</int> - <reference key="object" ref="877383975"/> - <reference key="parent" ref="1006"/> + <int key="objectID">59</int> + <reference key="object" ref="16289946"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="690456651"/> + </object> + <reference key="parent" ref="726585754"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">10</int> + <reference key="object" ref="690456651"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="1023147716"/> + </object> + <reference key="parent" ref="16289946"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">11</int> + <reference key="object" ref="1023147716"/> + <reference key="parent" ref="690456651"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">60</int> + <reference key="object" ref="457655522"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="128750774"/> + </object> + <reference key="parent" ref="726585754"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">21</int> + <reference key="object" ref="128750774"/> + <reference key="parent" ref="457655522"/> </object> </object> </object> @@ -321,13 +618,22 @@ <string>21.IBViewIntegration.shadowOffsetWidth</string> <string>23.IBPluginDependency</string> <string>24.IBPluginDependency</string> + <string>40.IBPluginDependency</string> + <string>41.IBPluginDependency</string> + <string>42.IBPluginDependency</string> + <string>43.IBPluginDependency</string> + <string>48.IBEditorWindowLastContentRect</string> + <string>48.IBPluginDependency</string> + <string>56.CustomClassName</string> + <string>57.CustomClassName</string> + <string>58.CustomClassName</string> <string>9.IBPluginDependency</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> - <string>{{308, 154}, {776, 658}}</string> + <string>{{276, 45}, {776, 608}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{308, 154}, {776, 658}}</string> + <string>{{276, 45}, {776, 608}}</string> <integer value="1"/> <string>{196, 240}</string> <string>{{202, 428}, {480, 270}}</string> @@ -342,6 +648,15 @@ <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>{{422, 781}, {616, 0}}</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>MBToolbarItem</string> + <string>MBToolbarItem</string> + <string>MBToolbarItem</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> </object> </object> <object class="NSMutableDictionary" key="unlocalizedProperties"> @@ -360,7 +675,7 @@ </object> </object> <nil key="sourceID"/> - <int key="maxID">37</int> + <int key="maxID">67</int> </object> <object class="IBClassDescriber" key="IBDocument.Classes"> <object class="NSMutableArray" key="referencedPartialClassDescriptions"> @@ -374,6 +689,8 @@ <bool key="EncodedWithXMLCoder">YES</bool> <string>fetch:</string> <string>forceRepaint:</string> + <string>goBack:</string> + <string>goForward:</string> <string>reload:</string> <string>removeReinsertWebView:</string> <string>showHideWebView:</string> @@ -385,88 +702,33 @@ <string>id</string> <string>id</string> <string>id</string> - </object> - </object> - <object class="NSMutableDictionary" key="actionInfosByName"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>fetch:</string> - <string>forceRepaint:</string> - <string>reload:</string> - <string>removeReinsertWebView:</string> - <string>showHideWebView:</string> - </object> - <object class="NSMutableArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="IBActionInfo"> - <string key="name">fetch:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">forceRepaint:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">reload:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">removeReinsertWebView:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo"> - <string key="name">showHideWebView:</string> - <string key="candidateClassName">id</string> - </object> + <string>id</string> + <string>id</string> </object> </object> <object class="NSMutableDictionary" key="outlets"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> + <string>backButton</string> <string>containerView</string> + <string>forwardButton</string> <string>progressIndicator</string> <string>reloadButton</string> + <string>toolbar</string> <string>urlText</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> + <string>NSButton</string> <string>NSView</string> + <string>NSButton</string> <string>NSProgressIndicator</string> <string>NSButton</string> + <string>NSToolbar</string> <string>NSTextField</string> </object> </object> - <object class="NSMutableDictionary" key="toOneOutletInfosByName"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>containerView</string> - <string>progressIndicator</string> - <string>reloadButton</string> - <string>urlText</string> - </object> - <object class="NSMutableArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="IBToOneOutletInfo"> - <string key="name">containerView</string> - <string key="candidateClassName">NSView</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">progressIndicator</string> - <string key="candidateClassName">NSProgressIndicator</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">reloadButton</string> - <string key="candidateClassName">NSButton</string> - </object> - <object class="IBToOneOutletInfo"> - <string key="name">urlText</string> - <string key="candidateClassName">NSTextField</string> - </object> - </object> - </object> <object class="IBClassDescriptionSource" key="sourceIdentifier"> <string key="majorKey">IBProjectSource</string> <string key="minorKey">mac/BrowserWindowController.h</string> @@ -480,6 +742,14 @@ <string key="minorKey"/> </object> </object> + <object class="IBPartialClassDescription"> + <string key="className">MBToolbarItem</string> + <string key="superclassName">NSToolbarItem</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">MBToolbarItem.h</string> + </object> + </object> </object> <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -681,7 +951,7 @@ </object> <object class="IBPartialClassDescription"> <string key="className">NSObject</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <object class="IBClassDescriptionSource" key="sourceIdentifier" id="335804019"> <string key="majorKey">IBFrameworkSource</string> <string key="minorKey">AppKit.framework/Headers/NSToolbarItem.h</string> </object> @@ -866,6 +1136,19 @@ </object> </object> <object class="IBPartialClassDescription"> + <string key="className">NSToolbar</string> + <string key="superclassName">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">AppKit.framework/Headers/NSToolbar.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSToolbarItem</string> + <string key="superclassName">NSObject</string> + <reference key="sourceIdentifier" ref="335804019"/> + </object> + <object class="IBPartialClassDescription"> <string key="className">NSView</string> <object class="IBClassDescriptionSource" key="sourceIdentifier"> <string key="majorKey">IBFrameworkSource</string> @@ -920,13 +1203,6 @@ <string key="NS.key.0">showWindow:</string> <string key="NS.object.0">id</string> </object> - <object class="NSMutableDictionary" key="actionInfosByName"> - <string key="NS.key.0">showWindow:</string> - <object class="IBActionInfo" key="NS.object.0"> - <string key="name">showWindow:</string> - <string key="candidateClassName">id</string> - </object> - </object> <object class="IBClassDescriptionSource" key="sourceIdentifier"> <string key="majorKey">IBFrameworkSource</string> <string key="minorKey">AppKit.framework/Headers/NSWindowController.h</string> @@ -936,20 +1212,27 @@ </object> <int key="IBDocument.localizationMode">0</int> <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string> - <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults"> - <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string> - <integer value="1060" key="NS.object.0"/> - </object> <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies"> <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string> <integer value="3000" key="NS.object.0"/> </object> <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> - <string key="IBDocument.LastKnownRelativeProjectPath">../../MiniBrowser.xcodeproj</string> + <string key="IBDocument.LastKnownRelativeProjectPath">../MiniBrowser.xcodeproj</string> <int key="IBDocument.defaultPropertyAccessControl">3</int> <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes"> - <string key="NS.key.0">NSRefreshTemplate</string> - <string key="NS.object.0">{10, 12}</string> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>NSGoLeftTemplate</string> + <string>NSGoRightTemplate</string> + <string>NSRefreshTemplate</string> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>{9, 9}</string> + <string>{9, 9}</string> + <string>{10, 12}</string> + </object> </object> </data> </archive> diff --git a/WebKitTools/MiniBrowser/mac/BrowserWindowController.h b/WebKitTools/MiniBrowser/mac/BrowserWindowController.h index c638beb..aad8240 100644 --- a/WebKitTools/MiniBrowser/mac/BrowserWindowController.h +++ b/WebKitTools/MiniBrowser/mac/BrowserWindowController.h @@ -26,6 +26,9 @@ @interface BrowserWindowController : NSWindowController { IBOutlet NSProgressIndicator *progressIndicator; IBOutlet NSButton *reloadButton; + IBOutlet NSButton *backButton; + IBOutlet NSButton *forwardButton; + IBOutlet NSToolbar *toolbar; IBOutlet NSTextField *urlText; IBOutlet NSView *containerView; @@ -35,6 +38,8 @@ - (IBAction)fetch:(id)sender; - (IBAction)reload:(id)sender; - (IBAction)forceRepaint:(id)sender; +- (IBAction)goBack:(id)sender; +- (IBAction)goForward:(id)sender; - (IBAction)showHideWebView:(id)sender; - (IBAction)removeReinsertWebView:(id)sender; diff --git a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m index 9d2f8a6..234c04c 100644 --- a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m +++ b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m @@ -33,6 +33,11 @@ - (void)didStartProgress; - (void)didChangeProgress:(double)value; - (void)didFinishProgress; +- (void)didStartProvisionalLoadForFrame:(WKFrameRef)frame; +- (void)didCommitLoadForFrame:(WKFrameRef)frame; +- (void)didReceiveServerRedirectForProvisionalLoadForFrame:(WKFrameRef)frame; +- (void)didFailProvisionalLoadWithErrorForFrame:(WKFrameRef)frame; +- (void)didFailLoadWithErrorForFrame:(WKFrameRef)frame; @end @implementation BrowserWindowController @@ -98,6 +103,34 @@ [_webView setNeedsDisplay:YES]; } +- (IBAction)goBack:(id)sender +{ + WKPageGoBack(_webView.pageRef); +} + +- (IBAction)goForward:(id)sender +{ + WKPageGoForward(_webView.pageRef); +} + +- (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)item +{ + SEL action = [item action]; + + if (action == @selector(goBack:)) + return _webView && WKPageCanGoBack(_webView.pageRef); + + if (action == @selector(goForward:)) + return _webView && WKPageCanGoForward(_webView.pageRef); + + return YES; +} + +- (void)validateToolbar +{ + [toolbar validateVisibleItems]; +} + - (BOOL)windowShouldClose:(id)sender { LOG(@"windowShouldClose"); @@ -121,22 +154,22 @@ static void _didStartProvisionalLoadForFrame(WKPageRef page, WKFrameRef frame, const void *clientInfo) { - LOG(@"didStartProvisionalLoadForFrame"); + [(BrowserWindowController *)clientInfo didStartProvisionalLoadForFrame:frame]; } static void _didReceiveServerRedirectForProvisionalLoadForFrame(WKPageRef page, WKFrameRef frame, const void *clientInfo) { - LOG(@"didReceiveServerRedirectForProvisionalLoadForFrame"); + [(BrowserWindowController *)clientInfo didReceiveServerRedirectForProvisionalLoadForFrame:frame]; } static void _didFailProvisionalLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, const void *clientInfo) { - LOG(@"didFailProvisionalLoadWithErrorForFrame"); + [(BrowserWindowController *)clientInfo didFailProvisionalLoadWithErrorForFrame:frame]; } static void _didCommitLoadForFrame(WKPageRef page, WKFrameRef frame, const void *clientInfo) { - LOG(@"didCommitLoadForFrame"); + [(BrowserWindowController *)clientInfo didCommitLoadForFrame:frame]; } static void _didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, const void *clientInfo) @@ -146,7 +179,7 @@ static void _didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, const void static void _didFailLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, const void *clientInfo) { - LOG(@"didFailLoadWithErrorForFrame"); + [(BrowserWindowController *)clientInfo didFailLoadWithErrorForFrame:frame]; } static void _didReceiveTitleForFrame(WKPageRef page, WKStringRef title, WKFrameRef frame, const void *clientInfo) @@ -191,15 +224,20 @@ static void _didBecomeResponsive(WKPageRef page, const void *clientInfo) LOG(@"didBecomeResponsive"); } +static void _didChangeBackForwardList(WKPageRef page, const void *clientInfo) +{ + [(BrowserWindowController *)clientInfo validateToolbar]; +} + #pragma mark Policy Client Callbacks -static void _decidePolicyForNavigationAction(WKPageRef page, uint32_t navigationType, WKURLRef url, WKFrameRef frame, WKFramePolicyListenerRef listener, const void *clientInfo) +static void _decidePolicyForNavigationAction(WKPageRef page, WKFrameNavigationType navigationType, WKURLRef url, WKFrameRef frame, WKFramePolicyListenerRef listener, const void *clientInfo) { LOG(@"decidePolicyForNavigationAction"); WKFramePolicyListenerUse(listener); } -static void _decidePolicyForNewWindowAction(WKPageRef page, uint32_t navigationType, WKURLRef url, WKFrameRef frame, WKFramePolicyListenerRef listener, const void *clientInfo) +static void _decidePolicyForNewWindowAction(WKPageRef page, WKFrameNavigationType navigationType, WKURLRef url, WKFrameRef frame, WKFramePolicyListenerRef listener, const void *clientInfo) { LOG(@"decidePolicyForNewWindowAction"); WKFramePolicyListenerUse(listener); @@ -317,7 +355,8 @@ static void _didUpdateHistoryTitle(WKPageRef page, WKStringRef title, WKURLRef U _didChangeProgress, _didFinishProgress, _didBecomeUnresponsive, - _didBecomeResponsive + _didBecomeResponsive, + _didChangeBackForwardList }; WKPageSetPageLoaderClient(_webView.pageRef, &loadClient); @@ -369,6 +408,53 @@ static void _didUpdateHistoryTitle(WKPageRef page, WKStringRef title, WKURLRef U [progressIndicator setDoubleValue:1.0]; } +- (void)updateProvisionalURLForFrame:(WKFrameRef)frame +{ + WKURLRef url = WKFrameGetProvisionalURL(frame); + if (!url) + return; + + CFURLRef cfSourceURL = WKURLCopyCFURL(0, url); + [urlText setStringValue:(NSString*)CFURLGetString(cfSourceURL)]; + CFRelease(cfSourceURL); +} + +- (void)didStartProvisionalLoadForFrame:(WKFrameRef)frame +{ + if (!WKFrameIsMainFrame(frame)) + return; + + [self updateProvisionalURLForFrame:frame]; +} + +- (void)didReceiveServerRedirectForProvisionalLoadForFrame:(WKFrameRef)frame +{ + if (!WKFrameIsMainFrame(frame)) + return; + + [self updateProvisionalURLForFrame:frame]; +} + +- (void)didFailProvisionalLoadWithErrorForFrame:(WKFrameRef)frame +{ + if (!WKFrameIsMainFrame(frame)) + return; + + [self updateProvisionalURLForFrame:frame]; +} + +- (void)didFailLoadWithErrorForFrame:(WKFrameRef)frame +{ + if (!WKFrameIsMainFrame(frame)) + return; + + [self updateProvisionalURLForFrame:frame]; +} + +- (void)didCommitLoadForFrame:(WKFrameRef)frame +{ +} + - (void)loadURLString:(NSString *)urlString { // FIXME: We shouldn't have to set the url text here. diff --git a/WebKitTools/MiniBrowser/qt/BrowserWindow.cpp b/WebKitTools/MiniBrowser/qt/BrowserWindow.cpp index 1196cc4..09ac737 100644 --- a/WebKitTools/MiniBrowser/qt/BrowserWindow.cpp +++ b/WebKitTools/MiniBrowser/qt/BrowserWindow.cpp @@ -65,7 +65,11 @@ void BrowserView::resizeEvent(QResizeEvent* event) void BrowserView::load(const QUrl& url) { - m_item->load(url); +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) + return m_item->load(QUrl::fromUserInput(url.toString())); +#else + return m_item->load(url); +#endif } QGraphicsWKView* BrowserView::view() const @@ -84,6 +88,9 @@ BrowserWindow::BrowserWindow() m_browser->setFocus(Qt::OtherFocusReason); connect(m_addressBar, SIGNAL(returnPressed()), SLOT(changeLocation())); + connect(m_browser->view(), SIGNAL(loadProgress(int)), SLOT(loadProgress(int))); + connect(m_browser->view(), SIGNAL(titleChanged(const QString&)), SLOT(titleChanged(const QString&))); + 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)); @@ -110,6 +117,35 @@ void BrowserWindow::changeLocation() m_browser->load(string); } +void BrowserWindow::loadProgress(int progress) +{ + QColor backgroundColor = QApplication::palette().color(QPalette::Base); + QColor progressColor = QColor(120, 180, 240); + QPalette pallete = m_addressBar->palette(); + + if (progress <= 0 || progress >= 100) + pallete.setBrush(QPalette::Base, backgroundColor); + else { + QLinearGradient gradient(0, 0, width(), 0); + gradient.setColorAt(0, progressColor); + gradient.setColorAt(((double) progress) / 100, progressColor); + if (progress != 100) + gradient.setColorAt((double) progress / 100 + 0.001, backgroundColor); + pallete.setBrush(QPalette::Base, gradient); + } + m_addressBar->setPalette(pallete); +} + +void BrowserWindow::titleChanged(const QString& title) +{ + setWindowTitle(title); +} + +void BrowserWindow::urlChanged(const QUrl& url) +{ + m_addressBar->setText(url.toString()); +} + BrowserWindow::~BrowserWindow() { delete m_addressBar; diff --git a/WebKitTools/MiniBrowser/qt/BrowserWindow.h b/WebKitTools/MiniBrowser/qt/BrowserWindow.h index 30c5122..fa11390 100644 --- a/WebKitTools/MiniBrowser/qt/BrowserWindow.h +++ b/WebKitTools/MiniBrowser/qt/BrowserWindow.h @@ -64,6 +64,9 @@ public: protected slots: void changeLocation(); + void loadProgress(int progress); + void titleChanged(const QString&); + void urlChanged(const QUrl&); private: BrowserView* m_browser; diff --git a/WebKitTools/MiniBrowser/win/BrowserWindow.cpp b/WebKitTools/MiniBrowser/win/BrowserWindow.cpp index 861d641..e519b00 100644 --- a/WebKitTools/MiniBrowser/win/BrowserWindow.cpp +++ b/WebKitTools/MiniBrowser/win/BrowserWindow.cpp @@ -28,6 +28,7 @@ #include "MiniBrowser.h" #include "Resource.h" +#include <assert.h> #include <commctrl.h> #include <shlwapi.h> #include <vector> diff --git a/WebKitTools/MiniBrowser/win/MiniBrowser.rc b/WebKitTools/MiniBrowser/win/MiniBrowser.rc index 6ad0bdc..0ff88b0 100644 --- a/WebKitTools/MiniBrowser/win/MiniBrowser.rc +++ b/WebKitTools/MiniBrowser/win/MiniBrowser.rc @@ -1,16 +1,7 @@ // Microsoft Visual C++ generated resource script.
//
#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
+#include "winresrc.h" /////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
diff --git a/WebKitTools/Scripts/build-webkit b/WebKitTools/Scripts/build-webkit index 18a557b..57aab45 100755 --- a/WebKitTools/Scripts/build-webkit +++ b/WebKitTools/Scripts/build-webkit @@ -68,7 +68,7 @@ my @features = ( define => "ENABLE_LINK_PREFETCH", default => 0, value => \$linkPrefetchSupport }, { option => "3d-canvas", desc => "Toggle 3D canvas support", - define => "ENABLE_3D_CANVAS", default => (isAppleMacWebKit() && !isTiger()), value => \$threeDCanvasSupport }, + define => "ENABLE_3D_CANVAS", default => (isAppleMacWebKit() && !isTiger() && !isLeopard()), value => \$threeDCanvasSupport }, { option => "3d-rendering", desc => "Toggle 3D rendering support", define => "ENABLE_3D_RENDERING", default => (isAppleMacWebKit() && !isTiger()), value => \$threeDRenderingSupport }, diff --git a/WebKitTools/Scripts/build-webkittestrunner b/WebKitTools/Scripts/build-webkittestrunner index bb059e1..dbc36d1 100755 --- a/WebKitTools/Scripts/build-webkittestrunner +++ b/WebKitTools/Scripts/build-webkittestrunner @@ -61,6 +61,8 @@ chdir "WebKitTools/WebKitTestRunner" or die; my $result; if (isAppleMacWebKit()) { $result = buildXCodeProject("WebKitTestRunner", $clean, XcodeOptions(), @ARGV); +} elsif (isAppleWinWebKit()) { + $result = buildVisualStudioProject("WebKitTestRunner.sln", $clean); } else { die "WebKitTestRunner is not supported on this platform.\n"; } diff --git a/WebKitTools/Scripts/check-header-includes b/WebKitTools/Scripts/check-header-includes deleted file mode 100755 index 568859e..0000000 --- a/WebKitTools/Scripts/check-header-includes +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/python -# 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. -# -# This script looks for unnecessary #includes in the given header file, -# or in all header files that can be recursively found in the given directory. - -import os -import re -import sys - -headerFile = re.compile(r'\.h$') -includeLine = re.compile(r'^#include ("|<wtf/)([A-Z]\w+).h[>"]') -smartPointerString = "(ListRefPtr|OwnArrayPtr|OwnPtr|PassOwnPtr|PassRefPtr|RefPtr)<className>" -allowedIncludes = set(["Forward", "PlatformString", "StringHash", "Threading"]) - -# Check if 'line' needs any class in 'unnecessaryIncludes' to be included in the header file. -def checkLine(line, unnecessaryIncludes): - unnecessaryIncludesCopy = unnecessaryIncludes.copy() - for includedClass in unnecessaryIncludesCopy: - if re.search(includedClass, line): - if re.search(includedClass + "\*", line): - continue - - smartPointerClassString = smartPointerString.replace("className", includedClass) - if re.search(smartPointerClassString, line): - continue - - unnecessaryIncludes.remove(includedClass) - - -# Look for unnecessary includes in the given file -def checkFile(fileName): - if headerFile.search(fileName): - f = open(fileName, "r") - unnecessaryIncludes = set() - for line in f: - match = includeLine.match(line) - if match: - className = match.group(2) - if className == "PlatformString": - unnecessaryIncludes.add("String") - elif className not in allowedIncludes: - unnecessaryIncludes.add(className) - else: - checkLine(line, unnecessaryIncludes) - - if len(unnecessaryIncludes) > 0: - print fileName - for includedClass in unnecessaryIncludes: - print includedClass - print - - -# If 'path' is a file, check if it has unnecessary includes. -# If 'path' is a directory, traverse it recursively and look -# for unnecessary includes in all header files. -def checkPath(path): - if os.path.isfile(path): - checkFile(path) - elif os.path.isdir(path): - dirList = os.listdir(path) - for dirName in dirList: - checkPath(path + "/" + dirName) - else: - print path, "is not a file or directory." - - -def main(): - if len(sys.argv) <= 1: - print "Usage:", sys.argv[0], "<path>" - return -1 - - checkPath(sys.argv[1]) - - -if __name__ == "__main__": - main() diff --git a/WebKitTools/Scripts/old-run-webkit-tests b/WebKitTools/Scripts/old-run-webkit-tests index 30c585f..88c0a05 100755 --- a/WebKitTools/Scripts/old-run-webkit-tests +++ b/WebKitTools/Scripts/old-run-webkit-tests @@ -532,6 +532,7 @@ if (!$has3DRendering) { if (!checkWebCoreFeatureSupport("3D Canvas", 0)) { $ignoredDirectories{'fast/canvas/webgl'} = 1; + $ignoredDirectories{'compositing/webgl'} = 1; } if (checkWebCoreFeatureSupport("WML", 0)) { @@ -1635,6 +1636,12 @@ sub testCrashedOrTimedOut($$$$$) kill 9, $dumpToolPID unless $didCrash; closeDumpTool(); + + return unless isCygwin() && !$didCrash && $base =~ /^http/; + # On Cygwin, http tests timing out can be a symptom of a non-responsive httpd. + # If we timed out running an http test, try restarting httpd. + $isHttpdOpen = !closeHTTPD(); + configureAndOpenHTTPDIfNeeded(); } sub printFailureMessageForTest($$) diff --git a/WebKitTools/Scripts/sunspider-compare-results b/WebKitTools/Scripts/sunspider-compare-results index 3446cd8..8c3f7f5 100755 --- a/WebKitTools/Scripts/sunspider-compare-results +++ b/WebKitTools/Scripts/sunspider-compare-results @@ -55,7 +55,7 @@ Usage: $programName [options] FILE FILE --parse-only Use the parse-only benchmark suite. Same as --suite=parse-only EOF -GetOptions('root=s' => sub { my ($argName, $value); setConfigurationProductDir(Cwd::abs_path($value)); }, +GetOptions('root=s' => sub { my ($argName, $value) = @_; setConfigurationProductDir(Cwd::abs_path($value)); }, 'suite=s' => \$suite, 'ubench' => \$ubench, 'v8' => \$v8, diff --git a/WebKitTools/Scripts/update-webkit-chromium b/WebKitTools/Scripts/update-webkit-chromium index 836e30e..8458f83 100755 --- a/WebKitTools/Scripts/update-webkit-chromium +++ b/WebKitTools/Scripts/update-webkit-chromium @@ -29,6 +29,7 @@ # Update script for the WebKit Chromium Port. use File::Path; +use Getopt::Long; chdir("WebKit/chromium") or die $!; @@ -47,11 +48,18 @@ if (`gclient --version`) { if (! -e ".gclient") { # If .gclient configuration file doesn't exist, create it. print "Configuring gclient...\n"; - system($gclientPath, + system($gclientPath, "config", "--spec=solutions=[{'name':'./','url':None}]") == 0 or die $!; } +my $force = 0; +GetOptions( + 'force' => \$force, +); + # Execute gclient sync. print "Updating chromium port dependencies using gclient...\n"; -system($gclientPath, "sync", "--force") == 0 or die $!; +my @gclientArgs = ($gclientPath, "sync"); +push @gclientArgs, "--force" if $force; +system(@gclientArgs) == 0 or die $!; diff --git a/WebKitTools/Scripts/webkitdirs.pm b/WebKitTools/Scripts/webkitdirs.pm index 674dc8c..d95f2a1 100644 --- a/WebKitTools/Scripts/webkitdirs.pm +++ b/WebKitTools/Scripts/webkitdirs.pm @@ -237,7 +237,7 @@ sub determineNumberOfCPUs if (isLinux()) { # First try the nproc utility, if it exists. If we get no # results fall back to just interpretting /proc directly. - $numberOfCPUs = `nproc 2> /dev/null`; + chomp($numberOfCPUs = `nproc 2> /dev/null`); if ($numberOfCPUs eq "") { $numberOfCPUs = (grep /processor/, `cat /proc/cpuinfo`); } @@ -258,7 +258,8 @@ sub jscPath($) my ($productDir) = @_; my $jscName = "jsc"; $jscName .= "_debug" if (isCygwin() && ($configuration eq "Debug")); - return "$productDir/$jscName"; + return "$productDir/$jscName" if -e "$productDir/$jscName"; + return "$productDir/JavaScriptCore.framework/Resources/$jscName"; } sub argumentsForConfiguration() diff --git a/WebKitTools/Scripts/webkitperl/httpd.pm b/WebKitTools/Scripts/webkitperl/httpd.pm index 240f368..b415db6 100644 --- a/WebKitTools/Scripts/webkitperl/httpd.pm +++ b/WebKitTools/Scripts/webkitperl/httpd.pm @@ -154,19 +154,12 @@ sub openHTTPD(@) close PIDFILE; if (0 != kill 0, $oldPid) { print "\nhttpd is already running: pid $oldPid, killing...\n"; - kill 15, $oldPid; - - my $retryCount = 20; - while ((kill(0, $oldPid) != 0) && $retryCount) { - sleep 1; - --$retryCount; - } - - if (!$retryCount) { + if (!killHTTPD($oldPid)) { cleanUp(); die "Timed out waiting for httpd to quit"; } } + unlink $httpdPidFile; } $httpdPath = "/usr/sbin/httpd" unless ($httpdPath); @@ -196,22 +189,31 @@ sub openHTTPD(@) sub closeHTTPD { close HTTPDIN; - my $retryCount = 20; - if ($httpdPid) { - kill 15, $httpdPid; - while (-f $httpdPidFile && $retryCount) { - sleep 1; - --$retryCount; - } - } + my $succeeded = killHTTPD($httpdPid); cleanUp(); - if (!$retryCount) { - print STDERR "Timed out waiting for httpd to terminate!\n"; + unless ($succeeded) { + print STDERR "Timed out waiting for httpd to terminate!\n" unless $succeeded; return 0; } return 1; } +sub killHTTPD +{ + my ($pid) = @_; + + return 1 unless $pid; + + kill 15, $pid; + + my $retryCount = 20; + while (kill(0, $pid) && $retryCount) { + sleep 1; + --$retryCount; + } + return $retryCount != 0; +} + sub setShouldWaitForUserInterrupt { $waitForUserInterrupt = 1; @@ -219,7 +221,16 @@ sub setShouldWaitForUserInterrupt sub handleInterrupt { - closeHTTPD(); + # On Cygwin, when we receive a signal Apache is still running, so we need + # to kill it. On other platforms (at least Mac OS X), Apache will have + # already been killed, and trying to kill it again will cause us to hang. + # All we need to do in this case is clean up our own files. + if (isCygwin()) { + closeHTTPD(); + } else { + cleanUp(); + } + print "\n"; exit(1); } diff --git a/WebKitTools/Scripts/webkitpy/common/config/committers.py b/WebKitTools/Scripts/webkitpy/common/config/committers.py index e5f0a50..0354981 100644 --- a/WebKitTools/Scripts/webkitpy/common/config/committers.py +++ b/WebKitTools/Scripts/webkitpy/common/config/committers.py @@ -74,6 +74,7 @@ committers_unable_to_review = [ Committer("Andrei Popescu", "andreip@google.com", "andreip"), Committer("Andrew Wellington", ["andrew@webkit.org", "proton@wiretapped.net"], "proton"), Committer("Andras Becsi", "abecsi@webkit.org", "bbandix"), + Committer("Andreas Kling", "andreas.kling@nokia.com", "kling"), Committer("Andy Estes", "aestes@apple.com", "estes"), Committer("Anthony Ricaud", "rik@webkit.org", "rik"), Committer("Anton Muhin", "antonm@chromium.org", "antonm"), @@ -132,6 +133,7 @@ committers_unable_to_review = [ Committer("Keishi Hattori", "keishi@webkit.org", "keishi"), Committer("Kelly Norton", "knorton@google.com"), Committer("Kenneth Russell", "kbr@google.com"), + Committer("Kent Hansen", "kent.hansen@nokia.com", "khansen"), Committer("Kinuko Yasuda", "kinuko@chromium.org", "kinuko"), Committer("Krzysztof Kowalczyk", "kkowalczyk@gmail.com"), Committer("Leandro Pereira", ["leandro@profusion.mobi", "leandro@webkit.org"], "acidx"), @@ -165,7 +167,7 @@ committers_unable_to_review = [ Committer("Tony Gentilcore", "tonyg@chromium.org", "tonyg-cr"), Committer("Trey Matteson", "trey@usa.net", "trey"), Committer("Tristan O'Tierney", ["tristan@otierney.net", "tristan@apple.com"]), - Committer("Victor Wang", "victorw@chromium.org"), + Committer("Victor Wang", "victorw@chromium.org", "victorw"), Committer("Vitaly Repeshko", "vitalyr@chromium.org"), Committer("William Siegrist", "wsiegrist@apple.com", "wms"), Committer("Xiaomei Ji", "xji@chromium.org", "xji"), @@ -174,7 +176,7 @@ committers_unable_to_review = [ Committer("Yong Li", ["yong.li.webkit@gmail.com", "yong.li@torchmobile.com"], "yong"), Committer("Yongjun Zhang", "yongjun.zhang@nokia.com"), Committer("Yuzo Fujishima", "yuzo@google.com", "yuzo"), - Committer("Zhenyao Mo", "zmo@google.com"), + Committer("Zhenyao Mo", "zmo@google.com", "zhenyao"), Committer("Zoltan Herczeg", "zherczeg@webkit.org", "zherczeg"), Committer("Zoltan Horvath", "zoltan@webkit.org", "zoltan"), ] diff --git a/WebKitTools/Scripts/webkitpy/common/net/statusserver.py b/WebKitTools/Scripts/webkitpy/common/net/statusserver.py index 0bd68d1..c8fced6 100644 --- a/WebKitTools/Scripts/webkitpy/common/net/statusserver.py +++ b/WebKitTools/Scripts/webkitpy/common/net/statusserver.py @@ -39,7 +39,7 @@ _log = logging.getLogger("webkitpy.common.net.statusserver") class StatusServer: - default_host = "webkit-commit-queue.appspot.com" + default_host = "queues.webkit.org" def __init__(self, host=default_host): self.set_host(host) diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py index e1b23ac..d226e64 100644 --- a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py +++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py @@ -410,6 +410,8 @@ class Port(object): """Relative unix-style path for a filename under the LayoutTests directory. Filenames outside the LayoutTests directory should raise an error.""" + # FIXME This should assert() here but cannot due to printing_unittest.Testprinter + # assert(filename.startswith(self.layout_tests_dir())) return filename[len(self.layout_tests_dir()) + 1:] def results_directory(self): diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/http_server_base.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/http_server_base.py index c9805d6..2745cce 100644 --- a/WebKitTools/Scripts/webkitpy/layout_tests/port/http_server_base.py +++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/http_server_base.py @@ -67,8 +67,8 @@ class HttpServerBase(object): try: response = urllib.urlopen(url) _log.debug("Server running at %s" % url) - except IOError: - _log.debug("Server NOT running at %s" % url) + except IOError, e: + _log.debug("Server NOT running at %s: %s" % (url, e)) return False return True diff --git a/WebKitTools/Scripts/webkitpy/thirdparty/__init__.py b/WebKitTools/Scripts/webkitpy/thirdparty/__init__.py index 3321293..1cb554a 100644 --- a/WebKitTools/Scripts/webkitpy/thirdparty/__init__.py +++ b/WebKitTools/Scripts/webkitpy/thirdparty/__init__.py @@ -95,8 +95,8 @@ installer.install(url="http://surfnet.dl.sourceforge.net/project/python-irclib/p pywebsocket_dir = os.path.join(autoinstalled_dir, "pywebsocket") installer = AutoInstaller(target_dir=pywebsocket_dir) -installer.install(url="http://pywebsocket.googlecode.com/files/mod_pywebsocket-0.5.tar.gz", - url_subpath="pywebsocket-0.5/src/mod_pywebsocket") +installer.install(url="http://pywebsocket.googlecode.com/files/mod_pywebsocket-0.5.1.tar.gz", + url_subpath="pywebsocket-0.5.1/src/mod_pywebsocket") readme_path = os.path.join(autoinstalled_dir, "README") if not os.path.exists(readme_path): diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/__init__.py b/WebKitTools/Scripts/webkitpy/tool/commands/__init__.py index 71c3719..9bdec8f 100644 --- a/WebKitTools/Scripts/webkitpy/tool/commands/__init__.py +++ b/WebKitTools/Scripts/webkitpy/tool/commands/__init__.py @@ -1,4 +1,5 @@ # Required for Python to search this directory for module files from webkitpy.tool.commands.prettydiff import PrettyDiff +from webkitpy.tool.commands.rebaseline import Rebaseline # FIXME: Add the rest of the commands here. diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/queries.py b/WebKitTools/Scripts/webkitpy/tool/commands/queries.py index 645060c..91ce5e9 100644 --- a/WebKitTools/Scripts/webkitpy/tool/commands/queries.py +++ b/WebKitTools/Scripts/webkitpy/tool/commands/queries.py @@ -273,6 +273,7 @@ class FailureReason(AbstractDeclarativeCommand): return 1 return self._explain_failures_for_builder(builder, start_revision=int(start_revision)) + class TreeStatus(AbstractDeclarativeCommand): name = "tree-status" help_text = "Print the status of the %s buildbots" % BuildBot.default_host diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/rebaseline.py b/WebKitTools/Scripts/webkitpy/tool/commands/rebaseline.py new file mode 100644 index 0000000..78e06c6 --- /dev/null +++ b/WebKitTools/Scripts/webkitpy/tool/commands/rebaseline.py @@ -0,0 +1,113 @@ +# 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 os.path +import re +import shutil +import urllib + +from webkitpy.common.net.buildbot import BuildBot, LayoutTestResults +from webkitpy.common.system.user import User +from webkitpy.layout_tests.port import factory +from webkitpy.tool.grammar import pluralize +from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand + + +# FIXME: I'm not sure where this logic should go in the end. +# For now it's here, until we have a second need for it. +class BuilderToPort(object): + _builder_name_to_port_name = { + r"SnowLeopard": "mac-snowleopard", + r"Leopard": "mac-leopard", + r"Tiger": "mac-tiger", + r"Windows": "win", + r"GTK": "gtk", + r"Qt": "qt", + r"Chromium Mac": "chromium-mac", + r"Chromium Linux": "chromium-linux", + r"Chromium Win": "chromium-win", + } + + def _port_name_for_builder_name(self, builder_name): + for regexp, port_name in self._builder_name_to_port_name.items(): + if re.match(regexp, builder_name): + return port_name + + def port_for_builder(self, builder_name): + port_name = self._port_name_for_builder_name(builder_name) + assert(port_name) # Need to update _builder_name_to_port_name + port = factory.get(port_name) + assert(port) # Need to update _builder_name_to_port_name + return port + + +class Rebaseline(AbstractDeclarativeCommand): + name = "rebaseline" + help_text = "Replaces local expected.txt files with new results from build bots" + + # FIXME: This should share more code with FailureReason._builder_to_explain + def _builder_to_pull_from(self): + builder_statuses = self.tool.buildbot.builder_statuses() + red_statuses = [status for status in builder_statuses if not status["is_green"]] + print "%s failing" % (pluralize("builder", len(red_statuses))) + builder_choices = [status["name"] for status in red_statuses] + chosen_name = self.tool.user.prompt_with_list("Which builder to pull results from:", 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: + return (self.tool.buildbot.builder_with_name(chosen_name), status["build_number"]) + + def _replace_expectation_with_remote_result(self, local_file, remote_file): + (downloaded_file, headers) = urllib.urlretrieve(remote_file) + shutil.move(downloaded_file, local_file) + + def _tests_to_update(self, build): + parsed_results = build.layout_test_results().parsed_results() + # FIXME: This probably belongs as API on LayoutTestResults + # but .failing_tests() already means something else. + return parsed_results[LayoutTestResults.fail_key] + + def _results_url_for_test(self, build, test): + test_base = os.path.splitext(test)[0] + actual_path = test_base + "-actual.txt" + return build.results_url() + "/" + actual_path + + def execute(self, options, args, tool): + builder, build_number = self._builder_to_pull_from() + build = builder.build(build_number) + port = BuilderToPort().port_for_builder(builder.name()) + + for test in self._tests_to_update(build): + results_url = self._results_url_for_test(build, test) + # Port operates with absolute paths. + absolute_path = os.path.join(port.layout_tests_dir(), test) + expected_file = port.expected_filename(absolute_path, ".txt") + print test + self._replace_expectation_with_remote_result(expected_file, results_url) + + # FIXME: We should handle new results too. diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py b/WebKitTools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py new file mode 100644 index 0000000..d6582a7 --- /dev/null +++ b/WebKitTools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py @@ -0,0 +1,38 @@ +# 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.tool.commands.rebaseline import BuilderToPort + + +class BuilderToPortTest(unittest.TestCase): + def test_port_for_builder(self): + converter = BuilderToPort() + port = converter.port_for_builder("Leopard Intel Debug (Tests)") + self.assertEqual(port.name(), "mac-leopard") diff --git a/WebKitTools/Scripts/webkitpy/tool/mocktool.py b/WebKitTools/Scripts/webkitpy/tool/mocktool.py index a467364..2114c30 100644 --- a/WebKitTools/Scripts/webkitpy/tool/mocktool.py +++ b/WebKitTools/Scripts/webkitpy/tool/mocktool.py @@ -332,6 +332,9 @@ class MockBuilder(object): def name(self): return self._name + def results_url(self): + return "http://example.com/builders/%s/results/" % self.name() + def force_build(self, username, comments): log("MOCK: force_build: name=%s, username=%s, comments=%s" % ( self._name, username, comments)) diff --git a/WebKitTools/WebKitTestRunner/Configurations/Base.xcconfig b/WebKitTools/WebKitTestRunner/Configurations/Base.xcconfig index af3f4e6..7ceab07 100644 --- a/WebKitTools/WebKitTestRunner/Configurations/Base.xcconfig +++ b/WebKitTools/WebKitTestRunner/Configurations/Base.xcconfig @@ -66,3 +66,6 @@ SDKROOT_1060_1050 = macosx10.5; SDKROOT_1070_1040 = macosx10.4; SDKROOT_1070_1050 = macosx10.5; SDKROOT_1070_1060 = macosx10.6; + +WEBKIT_UMBRELLA_FRAMEWORKS_DIR = $(NEXT_ROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Frameworks; +WEBCORE_PRIVATE_HEADERS_DIR = $(WEBKIT_UMBRELLA_FRAMEWORKS_DIR)/WebCore.framework/PrivateHeaders; diff --git a/WebKitTools/WebKitTestRunner/Configurations/DebugRelease.xcconfig b/WebKitTools/WebKitTestRunner/Configurations/DebugRelease.xcconfig index 8b156e8..41600b1 100644 --- a/WebKitTools/WebKitTestRunner/Configurations/DebugRelease.xcconfig +++ b/WebKitTools/WebKitTestRunner/Configurations/DebugRelease.xcconfig @@ -38,3 +38,5 @@ MACOSX_DEPLOYMENT_TARGET_1040 = 10.4; MACOSX_DEPLOYMENT_TARGET_1050 = 10.5; MACOSX_DEPLOYMENT_TARGET_1060 = 10.6; MACOSX_DEPLOYMENT_TARGET_1070 = 10.7; + +WEBKIT_UMBRELLA_FRAMEWORKS_DIR = $(BUILT_PRODUCTS_DIR); diff --git a/WebKitTools/WebKitTestRunner/Configurations/InjectedBundleCommon.vsprops b/WebKitTools/WebKitTestRunner/Configurations/InjectedBundleCommon.vsprops new file mode 100644 index 0000000..20a4852 --- /dev/null +++ b/WebKitTools/WebKitTestRunner/Configurations/InjectedBundleCommon.vsprops @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="InjectedBundleCommon"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""$(ProjectDir)\..";"$(ProjectDir)\..\..";"$(ProjectDir)\..\Bindings";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders";"$(WebKitLibrariesDir)\include";"$(WebKitOutputDir)\obj\InjectedBundle\DerivedSources\""
+ ForcedIncludeFiles="WebKitTestRunnerPrefix.h"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
+ OutputFile="$(OutDir)\$(ProjectName)$(WebKitConfigSuffix).dll"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed""
+ />
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="%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 errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"
"
+ />
+</VisualStudioPropertySheet>
diff --git a/WebKitTools/WebKitTestRunner/DerivedSources.make b/WebKitTools/WebKitTestRunner/DerivedSources.make new file mode 100644 index 0000000..6134380 --- /dev/null +++ b/WebKitTools/WebKitTestRunner/DerivedSources.make @@ -0,0 +1,49 @@ +# Copyright (C) 2010 Apple 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. 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. + +VPATH = \ + $(WebKitTestRunner)/InjectedBundle/Bindings \ +# + +INTERFACES = \ + LayoutTestController \ +# + +SCRIPTS = \ + $(WebCoreScripts)/CodeGenerator.pm \ + $(WebKitTestRunner)/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm \ + $(WebCoreScripts)/IDLParser.pm \ + $(WebCoreScripts)/IDLStructure.pm \ + $(WebCoreScripts)/generate-bindings.pl \ +# + +.PHONY : all + +JS%.h JS%.cpp : %.idl $(SCRIPTS) + @echo Generating bindings for $*... + @perl -I $(WebCoreScripts) -I $(WebKitTestRunner)/InjectedBundle/Bindings $(WebCoreScripts)/generate-bindings.pl --defines "" --include InjectedBundle/Bindings --outputDir . --generator TestRunner $< + +all : \ + $(INTERFACES:%=JS%.h) \ + $(INTERFACES:%=JS%.cpp) \ +# diff --git a/WebKitTools/WebKitTestRunner/ForwardingHeaders/wtf/GetPtr.h b/WebKitTools/WebKitTestRunner/ForwardingHeaders/wtf/GetPtr.h new file mode 100644 index 0000000..aedd784 --- /dev/null +++ b/WebKitTools/WebKitTestRunner/ForwardingHeaders/wtf/GetPtr.h @@ -0,0 +1 @@ +#include <JavaScriptCore/GetPtr.h> diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/ActivateFonts.h b/WebKitTools/WebKitTestRunner/InjectedBundle/ActivateFonts.h new file mode 100644 index 0000000..5ee1276 --- /dev/null +++ b/WebKitTools/WebKitTestRunner/InjectedBundle/ActivateFonts.h @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2010 Apple 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. 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. + */ + +#ifndef ActivateFonts_h +#define ActivateFonts_h + +namespace WTR { + +void activateFonts(); + +} // namespace WTR + +#endif // ActivateFonts_h diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm new file mode 100644 index 0000000..d72d4fc --- /dev/null +++ b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm @@ -0,0 +1,525 @@ +# Copyright (C) 2010 Apple 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. 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. + +use strict; +use warnings; +use File::Spec; + +package CodeGeneratorTestRunner; + +sub new +{ + my ($class, $codeGenerator, $outputDir) = @_; + + my $reference = { + codeGenerator => $codeGenerator, + outputDir => $outputDir, + }; + + bless($reference, $class); + return $reference; +} + +sub GenerateModule +{ +} + +sub GenerateInterface +{ + my ($self, $interface, $defines) = @_; + + foreach my $file ($self->_generateHeaderFile($interface), $self->_generateImplementationFile($interface)) { + open(FILE, ">", File::Spec->catfile($$self{outputDir}, $$file{name})) or die "Failed to open $$file{name} for writing: $!"; + print FILE @{$$file{contents}}; + close(FILE) or die "Failed to close $$file{name} after writing: $!"; + } +} + +sub finish +{ +} + +sub _className +{ + my ($idlType) = @_; + + return "JS" . _implementationClassName($idlType); +} + +sub _classRefGetter +{ + my ($self, $idlType) = @_; + return $$self{codeGenerator}->WK_lcfirst(_implementationClassName($idlType)) . "Class"; +} + +sub _fileHeaderString +{ + my ($filename) = @_; + + # FIXME: We should pull header out of the IDL file to get the copyright + # year(s) right. + return <<EOF; +/* + * Copyright (C) 2010 Apple 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. 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. + */ +EOF +} + +sub _generateHeaderFile +{ + my ($self, $interface) = @_; + + my @contents = (); + + my $idlType = $interface->name; + my $className = _className($idlType); + my $implementationClassName = _implementationClassName($idlType); + my $filename = $className . ".h"; + + push(@contents, _fileHeaderString($filename)); + + my $parentClassName = _parentClassName($interface); + + push(@contents, <<EOF); + +#ifndef ${className}_h +#define ${className}_h + +#include "${parentClassName}.h" +EOF + push(@contents, <<EOF); + +namespace WTR { + +class ${implementationClassName}; + +class ${className} : public ${parentClassName} { +public: + static JSClassRef @{[$self->_classRefGetter($idlType)]}(); + +private: + static const JSStaticFunction* staticFunctions(); + static const JSStaticValue* staticValues(); +EOF + + if (my @functions = @{$interface->functions}) { + push(@contents, "\n // Functions\n\n"); + foreach my $function (@functions) { + push(@contents, " static JSValueRef @{[$function->signature->name]}(JSContextRef, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*);\n"); + } + } + + if (my @attributes = @{$interface->attributes}) { + push(@contents, "\n // Attributes\n\n"); + foreach my $attribute (@attributes) { + push(@contents, " static JSValueRef @{[$self->_getterName($attribute)]}(JSContextRef, JSObjectRef, JSStringRef, JSValueRef*);\n"); + push(@contents, " static bool @{[$self->_setterName($attribute)]}(JSContextRef, JSObjectRef, JSStringRef, JSValueRef, JSValueRef*);\n") unless $attribute->type =~ /^readonly/; + } + } + + push(@contents, <<EOF); +}; + +${implementationClassName}* to${implementationClassName}(JSContextRef, JSValueRef); + +} // namespace WTR + +#endif // ${className}_h +EOF + + return { name => $filename, contents => \@contents }; +} + +sub _generateImplementationFile +{ + my ($self, $interface) = @_; + + my @contentsPrefix = (); + my %contentsIncludes = (); + my @contents = (); + + my $idlType = $interface->name; + my $className = _className($idlType); + my $implementationClassName = _implementationClassName($idlType); + my $filename = $className . ".cpp"; + + push(@contentsPrefix, _fileHeaderString($filename)); + + my $classRefGetter = $self->_classRefGetter($idlType); + my $parentClassName = _parentClassName($interface); + + $contentsIncludes{"${className}.h"} = 1; + $contentsIncludes{"${implementationClassName}.h"} = 1; + + push(@contentsPrefix, <<EOF); + +EOF + + push(@contents, <<EOF); +#include <JavaScriptCore/JSRetainPtr.h> +#include <wtf/GetPtr.h> + +namespace WTR { + +${implementationClassName}* to${implementationClassName}(JSContextRef context, JSValueRef value) +{ + if (!context || !value || !${className}::${classRefGetter}() || !JSValueIsObjectOfClass(context, value, ${className}::${classRefGetter}())) + return 0; + return static_cast<${implementationClassName}*>(JSWrapper::unwrap(context, value)); +} + +JSClassRef ${className}::${classRefGetter}() +{ + static JSClassRef jsClass; + if (!jsClass) { + JSClassDefinition definition = kJSClassDefinitionEmpty; + definition.className = "${idlType}"; + definition.parentClass = @{[$self->_parentClassRefGetterExpression($interface)]}; + definition.staticValues = staticValues(); + definition.staticFunctions = staticFunctions(); +EOF + + push(@contents, " definition.initialize = initialize;\n") unless _parentInterface($interface); + push(@contents, " definition.finalize = finalize;\n") unless _parentInterface($interface); + + push(@contents, <<EOF); + jsClass = JSClassCreate(&definition); + } + return jsClass; +} + +EOF + + push(@contents, $self->_staticFunctionsGetterImplementation($interface), "\n"); + push(@contents, $self->_staticValuesGetterImplementation($interface)); + + if (my @functions = @{$interface->functions}) { + push(@contents, "\n// Functions\n"); + + foreach my $function (@functions) { + push(@contents, <<EOF); + +JSValueRef ${className}::@{[$function->signature->name]}(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + ${implementationClassName}* impl = to${implementationClassName}(context, thisObject); + if (!impl) + return JSValueMakeUndefined(context); +EOF + my @parameters = (); + my @specifiedParameters = @{$function->parameters}; + + push(@contents, "\n") if scalar @specifiedParameters; + + $self->_includeHeaders(\%contentsIncludes, $function->signature->type, $function->signature); + + foreach my $i (0..$#specifiedParameters) { + my $parameter = $specifiedParameters[$i]; + + $self->_includeHeaders(\%contentsIncludes, $idlType, $parameter); + + push(@contents, " " . $self->_platformTypeVariableDeclaration($parameter, $parameter->name, "arguments[$i]", "argumentCount > $i") . "\n"); + + push(@parameters, $self->_paramterExpression($parameter)); + } + + my $isVoidReturn = $function->signature->type eq "void"; + my $functionName = "impl->" . $function->signature->name; + my $functionCall = $functionName . "(" . join(", ", @parameters) . ")"; + + push(@contents, "\n") unless scalar @specifiedParameters == 1; + push(@contents, " ${functionCall};\n\n") if $isVoidReturn; + push(@contents, " return " . $self->_returnExpression($function->signature, $functionCall) . ";\n}\n"); + } + } + + if (my @attributes = @{$interface->attributes}) { + push(@contents, "\n// Attributes\n"); + foreach my $attribute (@attributes) { + $self->_includeHeaders(\%contentsIncludes, $attribute->signature->type, $attribute->signature); + + my $getterName = $self->_getterName($attribute); + my $getterExpression = "impl->${getterName}()"; + + push(@contents, <<EOF); + +JSValueRef ${className}::${getterName}(JSContextRef context, JSObjectRef object, JSStringRef, JSValueRef* exception) +{ + ${implementationClassName}* impl = to${implementationClassName}(context, object); + if (!impl) + return JSValueMakeUndefined(context); + + return @{[$self->_returnExpression($attribute->signature, $getterExpression)]}; +} +EOF + + unless ($attribute->type =~ /^readonly/) { + push(@contents, <<EOF); + +bool ${className}::@{[$self->_setterName($attribute)]}(JSContextRef context, JSObjectRef object, JSStringRef, JSValueRef value, JSValueRef* exception) +{ + ${implementationClassName}* impl = to${implementationClassName}(context, object); + if (!impl) + return false; + +EOF + + my $platformValue = $self->_platformTypeConstructor($attribute->signature, "value"); + + push(@contents, <<EOF); + impl->@{[$self->_setterName($attribute)]}(${platformValue}); + + return true; +} +EOF + } + } + } + + push(@contents, <<EOF); + +} // namespace WTR + +EOF + + unshift(@contents, map { "#include \"$_\"\n" } sort keys(%contentsIncludes)); + unshift(@contents, @contentsPrefix); + + return { name => $filename, contents => \@contents }; +} + +sub _getterName +{ + my ($self, $attribute) = @_; + + my $signature = $attribute->signature; + my $name = $signature->name; + + return $name; +} + +sub _includeHeaders +{ + my ($self, $headers, $idlType, $signature) = @_; + + return unless defined $idlType; + return if $idlType eq "boolean" or $$self{codeGenerator}->IsNonPointerType($idlType); + + $$headers{_className($idlType) . ".h"} = 1; + $$headers{_implementationClassName($idlType) . ".h"} = 1; +} + +sub _implementationClassName +{ + my ($idlType) = @_; + + return $idlType; +} + +sub _parentClassName +{ + my ($interface) = @_; + + my $parentInterface = _parentInterface($interface); + return $parentInterface ? _className($parentInterface) : "JSWrapper"; +} + +sub _parentClassRefGetterExpression +{ + my ($self, $interface) = @_; + + my $parentInterface = _parentInterface($interface); + return $parentInterface ? $self->_classRefGetter($parentInterface) . "()" : "0"; +} + +sub _parentInterface +{ + my ($interface) = @_; + return $interface->parents->[0]; +} + +sub _platformType +{ + my ($self, $idlType, $signature) = @_; + + return undef unless defined $idlType; + + return "bool" if $idlType eq "boolean"; + return "JSRetainPtr<JSStringRef>" if $$self{codeGenerator}->IsStringType($idlType); + return "double" if $$self{codeGenerator}->IsNonPointerType($idlType); + return _implementationClassName($idlType); +} + +sub _platformTypeConstructor +{ + my ($self, $signature, $argumentName) = @_; + + my $idlType = $signature->type; + + return "JSRetainPtr<JSStringRef>(Adopt, JSValueToStringCopy(context, $argumentName, 0))" if $$self{codeGenerator}->IsStringType($idlType); + return "JSValueToBoolean(context, $argumentName)" if $idlType eq "boolean"; + return "JSValueToNumber(context, $argumentName, 0)" if $$self{codeGenerator}->IsNonPointerType($idlType); + return "to" . _implementationClassName($idlType) . "(context, $argumentName)"; +} + +sub _platformTypeVariableDeclaration +{ + my ($self, $signature, $variableName, $argumentName, $condition) = @_; + + my $platformType = $self->_platformType($signature->type, $signature); + my $constructor = $self->_platformTypeConstructor($signature, $argumentName); + + my %nonPointerTypes = ( + "bool" => 1, + "double" => 1, + "JSRetainPtr<JSStringRef>" => 1, + ); + + my $nullValue = "0"; + $nullValue = "$platformType()" if defined $nonPointerTypes{$platformType} && $platformType ne "double"; + + $platformType .= "*" unless defined $nonPointerTypes{$platformType}; + + return "$platformType $variableName = $condition && $constructor;" if $condition && $platformType eq "bool"; + return "$platformType $variableName = $condition ? $constructor : $nullValue;" if $condition; + return "$platformType $variableName = $constructor;"; +} + +sub _returnExpression +{ + my ($self, $signature, $expression) = @_; + + my $convertNullStringAttribute = $signature->extendedAttributes->{"ConvertNullStringTo"}; + my $nullOrEmptyString = "NullStringAsEmptyString"; + $nullOrEmptyString = "NullStringAsNull" if defined $convertNullStringAttribute && $convertNullStringAttribute eq "Null"; + + my $returnIDLType = $signature->type; + + return "JSValueMakeUndefined(context)" if $returnIDLType eq "void"; + return "JSValueMakeBoolean(context, ${expression})" if $returnIDLType eq "boolean"; + return "JSValueMakeNumber(context, ${expression})" if $$self{codeGenerator}->IsNonPointerType($returnIDLType); + return "toJS(context, WTF::getPtr(${expression}))"; +} + +sub _paramterExpression +{ + my ($self, $parameter) = @_; + + my $idlType = $parameter->type; + my $name = $parameter->name; + + return "${name}.get()" if $$self{codeGenerator}->IsStringType($idlType); + return $name; +} + +sub _setterName +{ + my ($self, $attribute) = @_; + + my $name = $attribute->signature->name; + + return "set" . $$self{codeGenerator}->WK_ucfirst($name); +} + +sub _staticFunctionsGetterImplementation +{ + my ($self, $interface) = @_; + + my $mapFunction = sub { + my $name = $_->signature->name; + my @attributes = qw(kJSPropertyAttributeDontDelete kJSPropertyAttributeReadOnly); + push(@attributes, "kJSPropertyAttributeDontEnum") if $_->signature->extendedAttributes->{"DontEnum"}; + + return "{ \"$name\", $name, " . join(" | ", @attributes) . " }"; + }; + + return $self->_staticFunctionsOrValuesGetterImplementation($interface, "function", "{ 0, 0, 0 }", $mapFunction, $interface->functions); +} + +sub _staticFunctionsOrValuesGetterImplementation +{ + my ($self, $interface, $functionOrValue, $arrayTerminator, $mapFunction, $functionsOrAttributes) = @_; + + my $className = _className($interface->name); + my $uppercaseFunctionOrValue = $$self{codeGenerator}->WK_ucfirst($functionOrValue); + + my $result = <<EOF; +const JSStatic${uppercaseFunctionOrValue}* ${className}::static${uppercaseFunctionOrValue}s() +{ +EOF + + my @initializers = map(&$mapFunction, @{$functionsOrAttributes}); + return $result . " return 0;\n}\n" unless @initializers; + + $result .= <<EOF + static const JSStatic${uppercaseFunctionOrValue} ${functionOrValue}s[] = { + @{[join(",\n ", @initializers)]}, + ${arrayTerminator} + }; + return ${functionOrValue}s; +} +EOF +} + +sub _staticValuesGetterImplementation +{ + my ($self, $interface) = @_; + + my $mapFunction = sub { + return if $_->signature->extendedAttributes->{"NoImplementation"}; + + my $attributeName = $_->signature->name; + my $attributeIsReadonly = $_->type =~ /^readonly/; + my $getterName = $self->_getterName($_); + my $setterName = $attributeIsReadonly ? "0" : $self->_setterName($_); + my @attributes = qw(kJSPropertyAttributeDontDelete); + push(@attributes, "kJSPropertyAttributeReadOnly") if $attributeIsReadonly; + push(@attributes, "kJSPropertyAttributeDontEnum") if $_->signature->extendedAttributes->{"DontEnum"}; + + return "{ \"$attributeName\", $getterName, $setterName, " . join(" | ", @attributes) . " }"; + }; + + return $self->_staticFunctionsOrValuesGetterImplementation($interface, "value", "{ 0, 0, 0, 0 }", $mapFunction, $interface->attributes); +} + +1; diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h new file mode 100644 index 0000000..cf56c5d --- /dev/null +++ b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2010 Apple 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. 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. + */ + +#ifndef JSWrappable_h +#define JSWrappable_h + +#include <JavaScriptCore/JavaScriptCore.h> +#include <wtf/RefCounted.h> + +namespace WTR { + +class JSWrappable : public RefCounted<JSWrappable> { +public: + virtual ~JSWrappable() { } + virtual JSClassRef wrapperClass() = 0; +}; + +} // namespace WTR + +#endif // JSWrappable_h diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp new file mode 100644 index 0000000..a62cb2e --- /dev/null +++ b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2010 Apple 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. 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. + */ + +#include "JSWrapper.h" + +#include <JavaScriptCore/JSContextRefPrivate.h> + +namespace WTR { + +JSValueRef JSWrapper::wrap(JSContextRef context, JSWrappable* object) +{ + ASSERT_ARG(context, context); + + if (!object) + return JSValueMakeNull(context); + + JSClassRef objectClass = object->wrapperClass(); + ASSERT(objectClass); + JSObjectRef wrapperObject = JSObjectMake(context, objectClass, object); + ASSERT(wrapperObject); + + return wrapperObject; +} + +JSWrappable* JSWrapper::unwrap(JSContextRef context, JSValueRef value) +{ + ASSERT_ARG(context, context); + ASSERT_ARG(value, value); + if (!context || !value) + return 0; + return static_cast<JSWrappable*>(JSObjectGetPrivate(JSValueToObject(context, value, 0))); +} + +static JSWrappable* unwrapObject(JSObjectRef object) +{ + JSWrappable* wrappable = static_cast<JSWrappable*>(JSObjectGetPrivate(object)); + ASSERT(wrappable); + return wrappable; +} + +void JSWrapper::initialize(JSContextRef ctx, JSObjectRef object) +{ + JSWrappable* wrappable = unwrapObject(object); + if (!wrappable) + return; + wrappable->ref(); +} + +void JSWrapper::finalize(JSObjectRef object) +{ + JSWrappable* wrappable = unwrapObject(object); + if (!wrappable) + return; + wrappable->deref(); +} + +} // namespace WTR diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h new file mode 100644 index 0000000..9839cb4 --- /dev/null +++ b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2010 Apple 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. 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. + */ + +#ifndef JSWrapper_h +#define JSWrapper_h + +#include "JSWrappable.h" + +namespace WTR { + +// FIXME: If necessary, we can do wrapper caching here. +class JSWrapper { +public: + static JSValueRef wrap(JSContextRef context, JSWrappable* object); + static JSWrappable* unwrap(JSContextRef context, JSValueRef value); + + static void initialize(JSContextRef, JSObjectRef); + static void finalize(JSObjectRef); +}; + +inline JSValueRef toJS(JSContextRef context, JSWrappable* impl) +{ + return JSWrapper::wrap(context, impl); +} + +} // namespace WTR + +#endif // JSWrapper_h diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl new file mode 100644 index 0000000..7da2e81 --- /dev/null +++ b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2010 Apple 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. 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. + */ + +module WTR { + + interface LayoutTestController { + void dumpAsText(); + void dumpStatusCallbacks(); + + void waitUntilDone(); + void notifyDone(); + + // Repaint testing + void testRepaint(); + void repaintSweepHorizontally(); + void display(); + + // Animation testing + int numberOfActiveAnimations(); + boolean pauseAnimationAtTimeOnElementWithId(in DOMString animationName, in double time, in DOMString elementId); + }; + +} diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp index 9eea3e2..d3c66fd 100644 --- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp +++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp @@ -25,6 +25,7 @@ #include "InjectedBundle.h" +#include "ActivateFonts.h" #include "InjectedBundlePage.h" #include <WebKit2/WKBundle.h> #include <WebKit2/WKBundlePage.h> @@ -73,6 +74,8 @@ void InjectedBundle::initialize(WKBundleRef bundle) _didRecieveMessage }; WKBundleSetClient(m_bundle, &client); + + activateFonts(); } void InjectedBundle::done() diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp index 27779df..b1bc89d 100644 --- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp +++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp @@ -26,7 +26,12 @@ #include "InjectedBundle.h" #include <WebKit2/WKBundleInitialize.h> -extern "C" void WKBundleInitialize(WKBundleRef bundle) +#if defined(WIN32) || defined(_WIN32) +extern "C" __declspec(dllexport) +#else +extern "C" +#endif +void WKBundleInitialize(WKBundleRef bundle) { WTR::InjectedBundle::shared().initialize(bundle); } diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp index b254405..cbba470 100644 --- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp +++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp @@ -37,6 +37,19 @@ namespace WTR { +static PassOwnPtr<Vector<char> > WKStringToUTF8(WKStringRef wkStringRef) +{ + RetainPtr<CFStringRef> cfString(AdoptCF, WKStringCopyCFString(0, wkStringRef)); + CFIndex bufferLength = CFStringGetMaximumSizeForEncoding(CFStringGetLength(cfString.get()), kCFStringEncodingUTF8) + 1; + OwnPtr<Vector<char> > buffer(new Vector<char>(bufferLength)); + if (!CFStringGetCString(cfString.get(), buffer->data(), bufferLength, kCFStringEncodingUTF8)) { + buffer->shrink(1); + (*buffer)[0] = 0; + } else + buffer->shrink(strlen(buffer->data()) + 1); + return buffer.release(); +} + InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page) : m_page(page) , m_isLoading(false) @@ -58,10 +71,13 @@ InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page) WKBundlePageUIClient uiClient = { 0, this, - _addMessageToConsole + _willAddMessageToConsole, + _willSetStatusbarText, + _willRunJavaScriptAlert, + _willRunJavaScriptConfirm, + _willRunJavaScriptPrompt }; WKBundlePageSetUIClient(m_page, &uiClient); - } InjectedBundlePage::~InjectedBundlePage() @@ -128,24 +144,11 @@ void InjectedBundlePage::didCommitLoadForFrame(WKBundleFrameRef frame) { } -static PassOwnPtr<Vector<char> > WKStringToUTF8(WKStringRef wkStringRef) -{ - RetainPtr<CFStringRef> cfString(AdoptCF, WKStringCopyCFString(0, wkStringRef)); - CFIndex bufferLength = CFStringGetMaximumSizeForEncoding(CFStringGetLength(cfString.get()), kCFStringEncodingUTF8) + 1; - OwnPtr<Vector<char> > buffer(new Vector<char>(bufferLength)); - if (!CFStringGetCString(cfString.get(), buffer->data(), bufferLength, kCFStringEncodingUTF8)) { - buffer->shrink(1); - (*buffer)[0] = 0; - } else - buffer->shrink(strlen(buffer->data()) + 1); - return buffer.release(); -} - void InjectedBundlePage::dump() { InjectedBundle::shared().layoutTestController()->invalidateWaitToDumpWatchdog(); - if (InjectedBundle::shared().layoutTestController()->dumpAsText()) { + if (InjectedBundle::shared().layoutTestController()->shouldDumpAsText()) { // FIXME: Support dumping subframes when layoutTestController()->dumpChildFramesAsText() is true. WKRetainPtr<WKStringRef> innerText(AdoptWK, WKBundleFrameCopyInnerText(WKBundlePageGetMainFrame(m_page))); OwnPtr<Vector<char> > utf8InnerText = WKStringToUTF8(innerText.get()); @@ -193,16 +196,64 @@ void InjectedBundlePage::didClearWindowForFrame(WKBundleFrameRef frame, JSContex // UI Client Callbacks -void InjectedBundlePage::_addMessageToConsole(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void *clientInfo) +void InjectedBundlePage::_willAddMessageToConsole(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void *clientInfo) +{ + static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willAddMessageToConsole(message, lineNumber); +} + +void InjectedBundlePage::_willSetStatusbarText(WKBundlePageRef page, WKStringRef statusbarText, const void *clientInfo) +{ + static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willSetStatusbarText(statusbarText); +} + +void InjectedBundlePage::_willRunJavaScriptAlert(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void *clientInfo) +{ + static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willRunJavaScriptAlert(message, frame); +} + +void InjectedBundlePage::_willRunJavaScriptConfirm(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void *clientInfo) +{ + return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willRunJavaScriptConfirm(message, frame); +} + +void InjectedBundlePage::_willRunJavaScriptPrompt(WKBundlePageRef page, WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef frame, const void *clientInfo) { - static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->addMessageToConsole(message, lineNumber); + static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willRunJavaScriptPrompt(message, defaultValue, frame); } -void InjectedBundlePage::addMessageToConsole(WKStringRef message, uint32_t lineNumber) +void InjectedBundlePage::willAddMessageToConsole(WKStringRef message, uint32_t lineNumber) { // FIXME: Strip file: urls. OwnPtr<Vector<char> > utf8Message = WKStringToUTF8(message); InjectedBundle::shared().os() << "CONSOLE MESSAGE: line " << lineNumber << ": " << utf8Message->data() << "\n"; } +void InjectedBundlePage::willSetStatusbarText(WKStringRef statusbarText) +{ + if (!InjectedBundle::shared().layoutTestController()->shouldDumpStatusCallbacks()) + return; + + OwnPtr<Vector<char> > utf8StatusbarText = WKStringToUTF8(statusbarText); + InjectedBundle::shared().os() << "UI DELEGATE STATUS CALLBACK: setStatusText:" << utf8StatusbarText->data() << "\n"; +} + +void InjectedBundlePage::willRunJavaScriptAlert(WKStringRef message, WKBundleFrameRef) +{ + OwnPtr<Vector<char> > utf8Message = WKStringToUTF8(message); + InjectedBundle::shared().os() << "ALERT: " << utf8Message->data() << "\n"; +} + +void InjectedBundlePage::willRunJavaScriptConfirm(WKStringRef message, WKBundleFrameRef) +{ + OwnPtr<Vector<char> > utf8Message = WKStringToUTF8(message); + InjectedBundle::shared().os() << "CONFIRM: " << utf8Message->data() << "\n"; +} + +void InjectedBundlePage::willRunJavaScriptPrompt(WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef) +{ + OwnPtr<Vector<char> > utf8Message = WKStringToUTF8(message); + OwnPtr<Vector<char> > utf8DefaultValue = WKStringToUTF8(defaultValue); + InjectedBundle::shared().os() << "PROMPT: " << utf8Message->data() << ", default text: " << utf8DefaultValue->data() << "\n"; +} + } // namespace WTR diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h index 79aebb7..bce9d2c 100644 --- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h +++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h @@ -60,8 +60,16 @@ private: void didClearWindowForFrame(WKBundleFrameRef frame, JSContextRef ctx, JSObjectRef window); // UI Client - static void _addMessageToConsole(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void *clientInfo); - void addMessageToConsole(WKStringRef message, uint32_t lineNumber); + static void _willAddMessageToConsole(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void* clientInfo); + static void _willSetStatusbarText(WKBundlePageRef page, WKStringRef statusbarText, const void* clientInfo); + static void _willRunJavaScriptAlert(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void* clientInfo); + static void _willRunJavaScriptConfirm(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void* clientInfo); + static void _willRunJavaScriptPrompt(WKBundlePageRef page, WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef frame, const void* clientInfo); + void willAddMessageToConsole(WKStringRef message, uint32_t lineNumber); + void willSetStatusbarText(WKStringRef statusbarText); + void willRunJavaScriptAlert(WKStringRef message, WKBundleFrameRef); + void willRunJavaScriptConfirm(WKStringRef message, WKBundleFrameRef); + void willRunJavaScriptPrompt(WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef); WKBundlePageRef m_page; bool m_isLoading; diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp index cf3e0fb..fafa1e3 100644 --- a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp +++ b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp @@ -24,9 +24,10 @@ */ #include "LayoutTestController.h" + #include "InjectedBundle.h" #include "InjectedBundlePage.h" - +#include "JSLayoutTestController.h" #include <JavaScriptCore/JSRetainPtr.h> #include <WebKit2/WKBundleFrame.h> #include <WebKit2/WKRetainPtr.h> @@ -42,7 +43,10 @@ PassRefPtr<LayoutTestController> LayoutTestController::create(const std::string& LayoutTestController::LayoutTestController(const std::string& testPathOrURL) : m_dumpAsText(false) + , m_dumpStatusCallbacks(false) , m_waitToDump(false) + , m_testRepaint(false) + , m_testRepaintSweepHorizontally(false) , m_testPathOrURL(testPathOrURL) { } @@ -51,8 +55,19 @@ LayoutTestController::~LayoutTestController() { } -static const CFTimeInterval waitToDumpWatchdogInterval = 30.0; +JSClassRef LayoutTestController::wrapperClass() +{ + return JSLayoutTestController::layoutTestControllerClass(); +} +// This is lower than DumpRenderTree's timeout, to make it easier to work through the failures +// Eventually it should be changed to match. +static const CFTimeInterval waitToDumpWatchdogInterval = 6.0; + +void LayoutTestController::display() +{ + // FIXME: actually implement, once we want pixel tests +} void LayoutTestController::invalidateWaitToDumpWatchdog() { @@ -67,7 +82,7 @@ static void waitUntilDoneWatchdogFired(CFRunLoopTimerRef timer, void* info) InjectedBundle::shared().layoutTestController()->waitToDumpWatchdogTimerFired(); } -void LayoutTestController::setWaitToDump() +void LayoutTestController::waitUntilDone() { m_waitToDump = true; if (!m_waitToDumpWatchdog) { @@ -109,97 +124,12 @@ bool LayoutTestController::pauseAnimationAtTimeOnElementWithId(JSStringRef anima return WKBundleFramePauseAnimationOnElementWithId(mainFrame, nameWK.get(), idWK.get(), time); } -static JSValueRef dumpAsTextCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) -{ - LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); - controller->setDumpAsText(true); - return JSValueMakeUndefined(context); -} - -static JSValueRef waitUntilDoneCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) -{ - LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); - controller->setWaitToDump(); - return JSValueMakeUndefined(context); -} - -static JSValueRef notifyDoneCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) -{ - LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); - controller->notifyDone(); - return JSValueMakeUndefined(context); -} - -static JSValueRef numberOfActiveAnimationsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) -{ - if (argumentCount) - return JSValueMakeUndefined(context); - - LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); - return JSValueMakeNumber(context, controller->numberOfActiveAnimations()); -} - -static JSValueRef pauseAnimationAtTimeOnElementWithIdCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) -{ - if (argumentCount != 3) - return JSValueMakeUndefined(context); - - JSRetainPtr<JSStringRef> animationName(Adopt, JSValueToStringCopy(context, arguments[0], exception)); - ASSERT(!*exception); - double time = JSValueToNumber(context, arguments[1], exception); - ASSERT(!*exception); - JSRetainPtr<JSStringRef> elementId(Adopt, JSValueToStringCopy(context, arguments[2], exception)); - ASSERT(!*exception); - - LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); - return JSValueMakeBoolean(context, controller->pauseAnimationAtTimeOnElementWithId(animationName.get(), time, elementId.get())); -} - -// Object Finalization - -static void layoutTestControllerObjectFinalize(JSObjectRef object) -{ - LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(object)); - controller->deref(); -} - // Object Creation void LayoutTestController::makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception) { JSRetainPtr<JSStringRef> layoutTestContollerStr(Adopt, JSStringCreateWithUTF8CString("layoutTestController")); - ref(); - - JSClassRef classRef = getJSClass(); - JSValueRef layoutTestContollerObject = JSObjectMake(context, classRef, this); - JSClassRelease(classRef); - - JSObjectSetProperty(context, windowObject, layoutTestContollerStr.get(), layoutTestContollerObject, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, exception); -} - -JSClassRef LayoutTestController::getJSClass() -{ - static JSStaticFunction* staticFunctions = LayoutTestController::staticFunctions(); - static JSClassDefinition classDefinition = { - 0, kJSClassAttributeNone, "LayoutTestController", 0, 0, staticFunctions, - 0, layoutTestControllerObjectFinalize, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; - - return JSClassCreate(&classDefinition); -} - -JSStaticFunction* LayoutTestController::staticFunctions() -{ - static JSStaticFunction staticFunctions[] = { - { "dumpAsText", dumpAsTextCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, - { "notifyDone", notifyDoneCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, - { "numberOfActiveAnimations", numberOfActiveAnimationsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, - { "pauseAnimationAtTimeOnElementWithId", pauseAnimationAtTimeOnElementWithIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, - { "waitUntilDone", waitUntilDoneCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, - { 0, 0, 0 } - }; - - return staticFunctions; + JSObjectSetProperty(context, windowObject, layoutTestContollerStr.get(), JSWrapper::wrap(context, this), kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, exception); } } // namespace WTR diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h index 203f358..f9585a3 100644 --- a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h +++ b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h @@ -26,30 +26,40 @@ #ifndef LayoutTestController_h #define LayoutTestController_h +#include "JSWrappable.h" #include <JavaScriptCore/JavaScriptCore.h> #include <wtf/PassRefPtr.h> -#include <wtf/RefCounted.h> #include <wtf/RetainPtr.h> #include <string> namespace WTR { -class LayoutTestController : public RefCounted<LayoutTestController> { +class LayoutTestController : public JSWrappable { public: static PassRefPtr<LayoutTestController> create(const std::string& testPathOrURL); ~LayoutTestController(); + // JSWrappable + JSClassRef wrapperClass(); + void makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception); - bool dumpAsText() const { return m_dumpAsText; } - void setDumpAsText(bool dumpAsText) { m_dumpAsText = dumpAsText; } + bool shouldDumpAsText() const { return m_dumpAsText; } + void dumpAsText() { m_dumpAsText = true; } + + bool shouldDumpStatusCallbacks() const { return m_dumpStatusCallbacks; } + void dumpStatusCallbacks() { m_dumpStatusCallbacks = true; } bool waitToDump() const { return m_waitToDump; } - void setWaitToDump(); void waitToDumpWatchdogTimerFired(); void invalidateWaitToDumpWatchdog(); + void waitUntilDone(); void notifyDone(); + void testRepaint() { m_testRepaint = true; } + void repaintSweepHorizontally() { m_testRepaintSweepHorizontally = true; } + void display(); + unsigned numberOfActiveAnimations() const; bool pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId); @@ -57,15 +67,14 @@ private: LayoutTestController(const std::string& testPathOrURL); bool m_dumpAsText; + bool m_dumpStatusCallbacks; bool m_waitToDump; // True if waitUntilDone() has been called, but notifyDone() has not yet been called. + bool m_testRepaint; + bool m_testRepaintSweepHorizontally; std::string m_testPathOrURL; RetainPtr<CFRunLoopTimerRef> m_waitToDumpWatchdog; - - static JSClassRef getJSClass(); - static JSStaticValue* staticValues(); - static JSStaticFunction* staticFunctions(); }; } // namespace WTR diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm b/WebKitTools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm new file mode 100644 index 0000000..b5bc4a1 --- /dev/null +++ b/WebKitTools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2010 Apple 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. 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. + */ + +#include "ActivateFonts.h" + +#import <AppKit/AppKit.h> +#import <CoreFoundation/CoreFoundation.h> +#import <Foundation/Foundation.h> + +@interface WKTRFontActivatorDummyClass : NSObject +@end + +@implementation WKTRFontActivatorDummyClass +@end + +namespace WTR { + +void activateFonts() +{ + // Work around <rdar://problem/6698023> by activating fonts from disk + + static const char* fontFileNames[] = { + "AHEM____.TTF", + "ColorBits.ttf", + "WebKitWeightWatcher100.ttf", + "WebKitWeightWatcher200.ttf", + "WebKitWeightWatcher300.ttf", + "WebKitWeightWatcher400.ttf", + "WebKitWeightWatcher500.ttf", + "WebKitWeightWatcher600.ttf", + "WebKitWeightWatcher700.ttf", + "WebKitWeightWatcher800.ttf", + "WebKitWeightWatcher900.ttf", + 0 + }; + + NSMutableArray *fontURLs = [NSMutableArray array]; + NSURL *resourcesDirectory = [[NSBundle bundleForClass:[WKTRFontActivatorDummyClass class]] resourceURL]; + for (unsigned i = 0; fontFileNames[i]; ++i) { + NSURL *fontURL = [resourcesDirectory URLByAppendingPathComponent:[NSString stringWithUTF8String:fontFileNames[i]]]; + [fontURLs addObject:[fontURL absoluteURL]]; + } + + CFArrayRef errors = 0; + if (!CTFontManagerRegisterFontsForURLs((CFArrayRef)fontURLs, kCTFontManagerScopeProcess, &errors)) { + NSLog(@"Failed to activate fonts: %@", errors); + CFRelease(errors); + exit(1); + } +} + +} + diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/win/ActivateFonts.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/win/ActivateFonts.cpp new file mode 100644 index 0000000..c7532ce --- /dev/null +++ b/WebKitTools/WebKitTestRunner/InjectedBundle/win/ActivateFonts.cpp @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2010 Apple 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. 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. + */ + +#include "ActivateFonts.h" + +namespace WTR { + +void activateFonts() +{ + // FIXME: Not implemented. +} + +} diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/win/InjectedBundle.vcproj b/WebKitTools/WebKitTestRunner/InjectedBundle/win/InjectedBundle.vcproj new file mode 100644 index 0000000..601a4ac --- /dev/null +++ b/WebKitTools/WebKitTestRunner/InjectedBundle/win/InjectedBundle.vcproj @@ -0,0 +1,355 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="InjectedBundle"
+ ProjectGUID="{CBC3391C-F060-4BF5-A66E-81404168816B}"
+ RootNamespace="InjectedBundle"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;..\..\Configurations\InjectedBundleCommon.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ ForcedIncludeFiles=""
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=""
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;..\..\Configurations\InjectedBundleCommon.vsprops"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ ForcedIncludeFiles=""
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=""
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug_All|Win32"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops;..\..\Configurations\InjectedBundleCommon.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ RuntimeLibrary="3"
+ ForcedIncludeFiles=""
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=""
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug_Internal|Win32"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;..\..\Configurations\InjectedBundleCommon.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ ForcedIncludeFiles=""
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=""
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Bindings"
+ >
+ <File
+ RelativePath="..\Bindings\CodeGeneratorTestRunner.pm"
+ >
+ </File>
+ <File
+ RelativePath="..\Bindings\JSWrappable.h"
+ >
+ </File>
+ <File
+ RelativePath="..\Bindings\JSWrapper.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\Bindings\JSWrapper.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Derived Sources"
+ >
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSLayoutTestController.cpp"
+ >
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSLayoutTestController.h"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath="ActivateFonts.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\InjectedBundle.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\InjectedBundle.h"
+ >
+ </File>
+ <File
+ RelativePath="..\InjectedBundleMain.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\InjectedBundlePage.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\InjectedBundlePage.h"
+ >
+ </File>
+ <File
+ RelativePath="..\LayoutTestController.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\LayoutTestController.h"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/WebKitTools/WebKitTestRunner/TestController.cpp b/WebKitTools/WebKitTestRunner/TestController.cpp index b5b15d1..fec6b56 100644 --- a/WebKitTools/WebKitTestRunner/TestController.cpp +++ b/WebKitTools/WebKitTestRunner/TestController.cpp @@ -27,7 +27,7 @@ #include "PlatformWebView.h" #include "TestInvocation.h" -#include <getopt.h> +#include <WebKit2/WKContextPrivate.h> namespace WTR { @@ -38,62 +38,44 @@ TestController& TestController::shared() } TestController::TestController() - : m_dumpTree(false) - , m_dumpPixels(false) - , m_threaded(false) - , m_forceComplexText(false) + : m_dumpPixels(false) , m_verbose(false) , m_printSeparators(false) , m_usingServerMode(false) { } -void TestController::initialize(int argc, const char *argv[]) +void TestController::initialize(int argc, const char* argv[]) { - int dumpTree = 0; - int dumpPixels = 0; - int threaded = 0; - int forceComplexText = 0; - int useHTML5Parser = 0; - int verbose = 0; - - struct option options[] = { - {"notree", no_argument, &dumpTree, false}, - {"pixel-tests", no_argument, &dumpPixels, true}, - {"tree", no_argument, &dumpTree, true}, - {"threaded", no_argument, &threaded, true}, - {"complex-text", no_argument, &forceComplexText, true}, - {"legacy-parser", no_argument, &useHTML5Parser, false}, - {"verbose", no_argument, &verbose, true}, - {0, 0, 0, 0} - }; - - int option; - while ((option = getopt_long(argc, (char * const *)argv, "", options, 0)) != -1) { - switch (option) { - case '?': // unknown or ambiguous option - case ':': // missing argument - exit(1); - break; + platformInitialize(); + + for (int i = 1; i < argc; ++i) { + std::string argument(argv[i]); + + if (argument == "--pixel-tests") { + m_dumpPixels = true; + continue; } - } + if (argument == "--verbose") { + m_verbose = true; + continue; + } + + // Skip any other arguments that begin with '--'. + if (argument.length() >= 2 && argument[0] == '-' && argument[1] == '-') + continue; - m_dumpTree = dumpTree; - m_dumpPixels = dumpPixels; - m_threaded = threaded; - m_forceComplexText = forceComplexText; - m_verbose = verbose; + m_paths.push_back(argument); + } - m_usingServerMode = (argc == optind + 1 && strcmp(argv[optind], "-") == 0); + m_usingServerMode = (m_paths.size() == 1 && m_paths[0] == "-"); if (m_usingServerMode) m_printSeparators = true; - else { - m_printSeparators = (optind < argc - 1 || (m_dumpPixels && m_dumpTree)); - for (int i = optind; i != argc; ++i) - m_paths.push_back(std::string(argv[i])); - } + else + m_printSeparators = m_paths.size() > 1; initializeInjectedBundlePath(); + initializeTestPluginPath(); m_context.adopt(WKContextCreateWithInjectedBundlePath(injectedBundlePath())); @@ -104,6 +86,8 @@ void TestController::initialize(int argc, const char *argv[]) }; WKContextSetInjectedBundleClient(m_context.get(), &injectedBundlePathClient); + _WKContextSetAdditionalPluginPath(m_context.get(), testPluginPath()); + m_pageNamespace.adopt(WKPageNamespaceCreate(m_context.get())); m_mainWebView = new PlatformWebView(m_pageNamespace.get()); } diff --git a/WebKitTools/WebKitTestRunner/TestController.h b/WebKitTools/WebKitTestRunner/TestController.h index 7ad11fe..7e829b6 100644 --- a/WebKitTools/WebKitTestRunner/TestController.h +++ b/WebKitTools/WebKitTestRunner/TestController.h @@ -49,6 +49,7 @@ public: bool verbose() const { return m_verbose; } WKStringRef injectedBundlePath() { return m_injectedBundlePath.get(); } + WKStringRef testPluginPath() { return m_testPluginPath.get(); } PlatformWebView* mainWebView() { return m_mainWebView; } WKPageNamespaceRef pageNamespace() { return m_pageNamespace.get(); } @@ -60,8 +61,10 @@ private: void runTestingServerLoop(); void runTest(const char* pathOrURL); - + + void platformInitialize(); void initializeInjectedBundlePath(); + void initializeTestPluginPath(); // WKContextInjectedBundleClient static void _didRecieveMessageFromInjectedBundle(WKContextRef context, WKStringRef message, const void*); @@ -69,15 +72,13 @@ private: OwnPtr<TestInvocation> m_currentInvocation; - bool m_dumpTree; bool m_dumpPixels; - bool m_threaded; - bool m_forceComplexText; bool m_verbose; bool m_printSeparators; bool m_usingServerMode; std::vector<std::string> m_paths; WKRetainPtr<WKStringRef> m_injectedBundlePath; + WKRetainPtr<WKStringRef> m_testPluginPath; PlatformWebView* m_mainWebView; WKRetainPtr<WKContextRef> m_context; diff --git a/WebKitTools/WebKitTestRunner/TestInvocation.cpp b/WebKitTools/WebKitTestRunner/TestInvocation.cpp index d3bb8d2..1434d50 100644 --- a/WebKitTools/WebKitTestRunner/TestInvocation.cpp +++ b/WebKitTools/WebKitTestRunner/TestInvocation.cpp @@ -46,7 +46,11 @@ static WKURLRef createWKURL(const char* pathOrURL) if (CFStringHasPrefix(pathOrURLCFString.get(), CFSTR("http://")) || CFStringHasPrefix(pathOrURLCFString.get(), CFSTR("https://"))) cfURL.adoptCF(CFURLCreateWithString(0, pathOrURLCFString.get(), 0)); else +#if defined(WIN32) || defined(_WIN32) + cfURL.adoptCF(CFURLCreateWithFileSystemPath(0, pathOrURLCFString.get(), kCFURLWindowsPathStyle, false)); +#else cfURL.adoptCF(CFURLCreateWithFileSystemPath(0, pathOrURLCFString.get(), kCFURLPOSIXPathStyle, false)); +#endif return WKURLCreateWithCFURL(cfURL.get()); } @@ -92,9 +96,18 @@ static void sizeWebViewForCurrentTest(char* pathOrURL) TestController::shared().mainWebView()->resizeTo(normalWidth, normalHeight); } +void TestInvocation::resetPreferencesToConsistentValues() +{ + WKPreferencesRef preferences = WKContextGetPreferences(TestController::shared().context()); + + WKPreferencesSetOfflineWebApplicationCacheEnabled(preferences, true); +} + void TestInvocation::invoke() { sizeWebViewForCurrentTest(m_pathOrURL); + resetPreferencesToConsistentValues(); + WKRetainPtr<WKStringRef> message(AdoptWK, WKStringCreateWithCFString(CFSTR("BeginTest"))); WKContextPostMessageToInjectedBundle(TestController::shared().context(), message.get()); diff --git a/WebKitTools/WebKitTestRunner/TestInvocation.h b/WebKitTools/WebKitTestRunner/TestInvocation.h index ea1e840..b5fc041 100644 --- a/WebKitTools/WebKitTestRunner/TestInvocation.h +++ b/WebKitTools/WebKitTestRunner/TestInvocation.h @@ -42,6 +42,8 @@ public: private: void dump(const char*); + void resetPreferencesToConsistentValues(); + // Helper static void runUntil(bool& done); diff --git a/WebKitTools/WebKitTestRunner/WebKitTestRunner.sln b/WebKitTools/WebKitTestRunner/WebKitTestRunner.sln new file mode 100644 index 0000000..e2435d3 --- /dev/null +++ b/WebKitTools/WebKitTestRunner/WebKitTestRunner.sln @@ -0,0 +1,78 @@ +
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKitTestRunner", "win\WebKitTestRunner.vcproj", "{3B99669B-1817-443B-BCBE-835580146668}"
+ ProjectSection(ProjectDependencies) = postProject
+ {CBC3391C-F060-4BF5-A66E-81404168816B} = {CBC3391C-F060-4BF5-A66E-81404168816B}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InjectedBundleGenerated", "win\InjectedBundleGenerated.vcproj", "{4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {59CC0547-70AC-499C-9B19-EC01C6F61137} = {59CC0547-70AC-499C-9B19-EC01C6F61137}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FindSafari", "..\FindSafari\FindSafari.vcproj", "{DA31DA52-6675-48D4-89E0-333A7144397C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageDiff", "..\DumpRenderTree\win\ImageDiff.vcproj", "{59CC0547-70AC-499C-9B19-EC01C6F61137}"
+ ProjectSection(ProjectDependencies) = postProject
+ {DA31DA52-6675-48D4-89E0-333A7144397C} = {DA31DA52-6675-48D4-89E0-333A7144397C}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InjectedBundle", "InjectedBundle\win\InjectedBundle.vcproj", "{CBC3391C-F060-4BF5-A66E-81404168816B}"
+ ProjectSection(ProjectDependencies) = postProject
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD} = {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug_All|Win32 = Debug_All|Win32
+ Debug_Internal|Win32 = Debug_Internal|Win32
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug|Win32.Build.0 = Debug|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Release|Win32.ActiveCfg = Release|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Release|Win32.Build.0 = Release|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_All|Win32.ActiveCfg = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_All|Win32.Build.0 = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_Internal|Win32.ActiveCfg = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_Internal|Win32.Build.0 = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug|Win32.ActiveCfg = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug|Win32.Build.0 = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Release|Win32.ActiveCfg = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Release|Win32.Build.0 = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_All|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_All|Win32.Build.0 = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.Build.0 = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.Build.0 = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.Build.0 = all|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.ActiveCfg = Debug|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.Build.0 = Debug|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.ActiveCfg = Release|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.Build.0 = Release|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug|Win32.Build.0 = Debug|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Release|Win32.ActiveCfg = Release|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/WebKitTools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj b/WebKitTools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj index caf26a4..eccf330 100644 --- a/WebKitTools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj +++ b/WebKitTools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj @@ -6,7 +6,33 @@ objectVersion = 45; objects = { +/* Begin PBXAggregateTarget section */ + BC952D7711F3BF5D003398B4 /* Derived Sources */ = { + isa = PBXAggregateTarget; + buildConfigurationList = BC952D7D11F3BF6A003398B4 /* Build configuration list for PBXAggregateTarget "Derived Sources" */; + buildPhases = ( + BC952D8211F3BF78003398B4 /* Generate Derived Sources */, + ); + dependencies = ( + ); + name = "Derived Sources"; + productName = "Derived Sources"; + }; +/* End PBXAggregateTarget section */ + /* Begin PBXBuildFile section */ + 6510A78211EC643800410867 /* AHEM____.TTF in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77711EC643800410867 /* AHEM____.TTF */; }; + 6510A78311EC643800410867 /* ColorBits.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77811EC643800410867 /* ColorBits.ttf */; }; + 6510A78411EC643800410867 /* WebKitWeightWatcher100.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77911EC643800410867 /* WebKitWeightWatcher100.ttf */; }; + 6510A78511EC643800410867 /* WebKitWeightWatcher200.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77A11EC643800410867 /* WebKitWeightWatcher200.ttf */; }; + 6510A78611EC643800410867 /* WebKitWeightWatcher300.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77B11EC643800410867 /* WebKitWeightWatcher300.ttf */; }; + 6510A78711EC643800410867 /* WebKitWeightWatcher400.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77C11EC643800410867 /* WebKitWeightWatcher400.ttf */; }; + 6510A78811EC643800410867 /* WebKitWeightWatcher500.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77D11EC643800410867 /* WebKitWeightWatcher500.ttf */; }; + 6510A78911EC643800410867 /* WebKitWeightWatcher600.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77E11EC643800410867 /* WebKitWeightWatcher600.ttf */; }; + 6510A78A11EC643800410867 /* WebKitWeightWatcher700.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77F11EC643800410867 /* WebKitWeightWatcher700.ttf */; }; + 6510A78B11EC643800410867 /* WebKitWeightWatcher800.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A78011EC643800410867 /* WebKitWeightWatcher800.ttf */; }; + 6510A78C11EC643800410867 /* WebKitWeightWatcher900.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A78111EC643800410867 /* WebKitWeightWatcher900.ttf */; }; + 65EB85A011EC67CC0034D300 /* ActivateFonts.mm in Sources */ = {isa = PBXBuildFile; fileRef = 65EB859F11EC67CC0034D300 /* ActivateFonts.mm */; }; BC25193E11D15D8B002EBC01 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC7934A411906584005EA8E2 /* Cocoa.framework */; }; BC25193F11D15D8B002EBC01 /* WebKit2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC7934AB1190658C005EA8E2 /* WebKit2.framework */; }; BC25194011D15D8B002EBC01 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCDA2B991191051F00C3BC47 /* JavaScriptCore.framework */; }; @@ -17,6 +43,8 @@ BC7934AC1190658C005EA8E2 /* WebKit2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC7934AB1190658C005EA8E2 /* WebKit2.framework */; }; BC7934E811906846005EA8E2 /* PlatformWebViewMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC7934E711906846005EA8E2 /* PlatformWebViewMac.mm */; }; BC8C795C11D2785D004535A1 /* TestControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC8C795B11D2785D004535A1 /* TestControllerMac.mm */; }; + BC952C0D11F3B965003398B4 /* JSWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC952C0C11F3B965003398B4 /* JSWrapper.cpp */; }; + BC952F1F11F3C652003398B4 /* JSLayoutTestController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC952F1D11F3C652003398B4 /* JSLayoutTestController.cpp */; }; BCC997A411D3C8F60017BCA2 /* InjectedBundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC997A011D3C8F60017BCA2 /* InjectedBundle.cpp */; }; BCC997A511D3C8F60017BCA2 /* InjectedBundlePage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC997A211D3C8F60017BCA2 /* InjectedBundlePage.cpp */; }; BCC9981811D3F51E0017BCA2 /* LayoutTestController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC9981711D3F51E0017BCA2 /* LayoutTestController.cpp */; }; @@ -33,21 +61,29 @@ remoteGlobalIDString = BC25186111D15D54002EBC01; remoteInfo = InjectedBundle; }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 8DD76F9E0486AA7600D96B5E /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 8; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; + BC952ED611F3C38B003398B4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = BC952D7711F3BF5D003398B4; + remoteInfo = "Derived Sources"; }; -/* End PBXCopyFilesBuildPhase section */ +/* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 6510A77711EC643800410867 /* AHEM____.TTF */ = {isa = PBXFileReference; lastKnownFileType = file; name = "AHEM____.TTF"; path = "fonts/AHEM____.TTF"; sourceTree = "<group>"; }; + 6510A77811EC643800410867 /* ColorBits.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = ColorBits.ttf; path = fonts/ColorBits.ttf; sourceTree = "<group>"; }; + 6510A77911EC643800410867 /* WebKitWeightWatcher100.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher100.ttf; path = fonts/WebKitWeightWatcher100.ttf; sourceTree = "<group>"; }; + 6510A77A11EC643800410867 /* WebKitWeightWatcher200.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher200.ttf; path = fonts/WebKitWeightWatcher200.ttf; sourceTree = "<group>"; }; + 6510A77B11EC643800410867 /* WebKitWeightWatcher300.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher300.ttf; path = fonts/WebKitWeightWatcher300.ttf; sourceTree = "<group>"; }; + 6510A77C11EC643800410867 /* WebKitWeightWatcher400.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher400.ttf; path = fonts/WebKitWeightWatcher400.ttf; sourceTree = "<group>"; }; + 6510A77D11EC643800410867 /* WebKitWeightWatcher500.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher500.ttf; path = fonts/WebKitWeightWatcher500.ttf; sourceTree = "<group>"; }; + 6510A77E11EC643800410867 /* WebKitWeightWatcher600.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher600.ttf; path = fonts/WebKitWeightWatcher600.ttf; sourceTree = "<group>"; }; + 6510A77F11EC643800410867 /* WebKitWeightWatcher700.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher700.ttf; path = fonts/WebKitWeightWatcher700.ttf; sourceTree = "<group>"; }; + 6510A78011EC643800410867 /* WebKitWeightWatcher800.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher800.ttf; path = fonts/WebKitWeightWatcher800.ttf; sourceTree = "<group>"; }; + 6510A78111EC643800410867 /* WebKitWeightWatcher900.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher900.ttf; path = fonts/WebKitWeightWatcher900.ttf; sourceTree = "<group>"; }; + 65EB859D11EC67CC0034D300 /* ActivateFonts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ActivateFonts.h; sourceTree = "<group>"; }; + 65EB859F11EC67CC0034D300 /* ActivateFonts.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ActivateFonts.mm; sourceTree = "<group>"; }; 8DD76FA10486AA7600D96B5E /* WebKitTestRunner */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = WebKitTestRunner; sourceTree = BUILT_PRODUCTS_DIR; }; BC25184611D15767002EBC01 /* InjectedBundleMain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleMain.cpp; sourceTree = "<group>"; }; BC25186211D15D54002EBC01 /* InjectedBundle.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InjectedBundle.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -65,6 +101,14 @@ BC7934DD119066EC005EA8E2 /* PlatformWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformWebView.h; sourceTree = "<group>"; }; BC7934E711906846005EA8E2 /* PlatformWebViewMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformWebViewMac.mm; sourceTree = "<group>"; }; BC8C795B11D2785D004535A1 /* TestControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestControllerMac.mm; sourceTree = "<group>"; }; + BC952C0B11F3B965003398B4 /* JSWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWrapper.h; sourceTree = "<group>"; }; + BC952C0C11F3B965003398B4 /* JSWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWrapper.cpp; sourceTree = "<group>"; }; + BC952C0E11F3B97B003398B4 /* JSWrappable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWrappable.h; sourceTree = "<group>"; }; + BC952EC511F3C10F003398B4 /* DerivedSources.make */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DerivedSources.make; sourceTree = "<group>"; }; + BC952ED211F3C29F003398B4 /* LayoutTestController.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LayoutTestController.idl; sourceTree = "<group>"; }; + BC952ED311F3C318003398B4 /* CodeGeneratorTestRunner.pm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = CodeGeneratorTestRunner.pm; sourceTree = "<group>"; }; + BC952F1D11F3C652003398B4 /* JSLayoutTestController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSLayoutTestController.cpp; path = DerivedSources/WebKitTestRunner/JSLayoutTestController.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; + BC952F1E11F3C652003398B4 /* JSLayoutTestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSLayoutTestController.h; path = DerivedSources/WebKitTestRunner/JSLayoutTestController.h; sourceTree = BUILT_PRODUCTS_DIR; }; BCC997A011D3C8F60017BCA2 /* InjectedBundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundle.cpp; sourceTree = "<group>"; }; BCC997A111D3C8F60017BCA2 /* InjectedBundle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundle.h; sourceTree = "<group>"; }; BCC997A211D3C8F60017BCA2 /* InjectedBundlePage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundlePage.cpp; sourceTree = "<group>"; }; @@ -104,6 +148,7 @@ 08FB7794FE84155DC02AAC07 /* WebKitTestRunner */ = { isa = PBXGroup; children = ( + BC952EC511F3C10F003398B4 /* DerivedSources.make */, 08FB7795FE84155DC02AAC07 /* Source */, BC25183511D1571D002EBC01 /* InjectedBundle */, BC793401118F7C8A005EA8E2 /* Configurations */, @@ -147,16 +192,28 @@ name = Products; sourceTree = "<group>"; }; + 65EB859E11EC67CC0034D300 /* mac */ = { + isa = PBXGroup; + children = ( + 65EB859F11EC67CC0034D300 /* ActivateFonts.mm */, + ); + path = mac; + sourceTree = "<group>"; + }; BC25183511D1571D002EBC01 /* InjectedBundle */ = { isa = PBXGroup; children = ( + BC952D3A11F3BF1F003398B4 /* Derived Sources */, + BC952C0A11F3B939003398B4 /* Bindings */, + 65EB859E11EC67CC0034D300 /* mac */, + 65EB859D11EC67CC0034D300 /* ActivateFonts.h */, BCC997A011D3C8F60017BCA2 /* InjectedBundle.cpp */, BCC997A111D3C8F60017BCA2 /* InjectedBundle.h */, BC25184611D15767002EBC01 /* InjectedBundleMain.cpp */, BCC997A211D3C8F60017BCA2 /* InjectedBundlePage.cpp */, BCC997A311D3C8F60017BCA2 /* InjectedBundlePage.h */, - BCC9981611D3F51E0017BCA2 /* LayoutTestController.h */, BCC9981711D3F51E0017BCA2 /* LayoutTestController.cpp */, + BCC9981611D3F51E0017BCA2 /* LayoutTestController.h */, ); path = InjectedBundle; sourceTree = "<group>"; @@ -165,6 +222,17 @@ isa = PBXGroup; children = ( BC25186311D15D54002EBC01 /* InjectedBundle-Info.plist */, + 6510A77711EC643800410867 /* AHEM____.TTF */, + 6510A77811EC643800410867 /* ColorBits.ttf */, + 6510A77911EC643800410867 /* WebKitWeightWatcher100.ttf */, + 6510A77A11EC643800410867 /* WebKitWeightWatcher200.ttf */, + 6510A77B11EC643800410867 /* WebKitWeightWatcher300.ttf */, + 6510A77C11EC643800410867 /* WebKitWeightWatcher400.ttf */, + 6510A77D11EC643800410867 /* WebKitWeightWatcher500.ttf */, + 6510A77E11EC643800410867 /* WebKitWeightWatcher600.ttf */, + 6510A77F11EC643800410867 /* WebKitWeightWatcher700.ttf */, + 6510A78011EC643800410867 /* WebKitWeightWatcher800.ttf */, + 6510A78111EC643800410867 /* WebKitWeightWatcher900.ttf */, ); name = Resources; sourceTree = "<group>"; @@ -191,6 +259,27 @@ path = Configurations; sourceTree = "<group>"; }; + BC952C0A11F3B939003398B4 /* Bindings */ = { + isa = PBXGroup; + children = ( + BC952ED311F3C318003398B4 /* CodeGeneratorTestRunner.pm */, + BC952C0E11F3B97B003398B4 /* JSWrappable.h */, + BC952C0C11F3B965003398B4 /* JSWrapper.cpp */, + BC952C0B11F3B965003398B4 /* JSWrapper.h */, + BC952ED211F3C29F003398B4 /* LayoutTestController.idl */, + ); + path = Bindings; + sourceTree = "<group>"; + }; + BC952D3A11F3BF1F003398B4 /* Derived Sources */ = { + isa = PBXGroup; + children = ( + BC952F1D11F3C652003398B4 /* JSLayoutTestController.cpp */, + BC952F1E11F3C652003398B4 /* JSLayoutTestController.h */, + ); + name = "Derived Sources"; + sourceTree = "<group>"; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -200,7 +289,6 @@ buildPhases = ( 8DD76F990486AA7600D96B5E /* Sources */, 8DD76F9B0486AA7600D96B5E /* Frameworks */, - 8DD76F9E0486AA7600D96B5E /* CopyFiles */, ); buildRules = ( ); @@ -224,6 +312,7 @@ buildRules = ( ); dependencies = ( + BC952ED711F3C38B003398B4 /* PBXTargetDependency */, ); name = InjectedBundle; productName = InjectedBundle; @@ -244,6 +333,7 @@ targets = ( 8DD76F960486AA7600D96B5E /* WebKitTestRunner */, BC25186111D15D54002EBC01 /* InjectedBundle */, + BC952D7711F3BF5D003398B4 /* Derived Sources */, ); }; /* End PBXProject section */ @@ -253,11 +343,39 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 6510A78211EC643800410867 /* AHEM____.TTF in Resources */, + 6510A78311EC643800410867 /* ColorBits.ttf in Resources */, + 6510A78411EC643800410867 /* WebKitWeightWatcher100.ttf in Resources */, + 6510A78511EC643800410867 /* WebKitWeightWatcher200.ttf in Resources */, + 6510A78611EC643800410867 /* WebKitWeightWatcher300.ttf in Resources */, + 6510A78711EC643800410867 /* WebKitWeightWatcher400.ttf in Resources */, + 6510A78811EC643800410867 /* WebKitWeightWatcher500.ttf in Resources */, + 6510A78911EC643800410867 /* WebKitWeightWatcher600.ttf in Resources */, + 6510A78A11EC643800410867 /* WebKitWeightWatcher700.ttf in Resources */, + 6510A78B11EC643800410867 /* WebKitWeightWatcher800.ttf in Resources */, + 6510A78C11EC643800410867 /* WebKitWeightWatcher900.ttf in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + BC952D8211F3BF78003398B4 /* Generate Derived Sources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Generate Derived Sources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitTestRunner\"\ncd \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitTestRunner\"\n\nexport WebKitTestRunner=\"${SRCROOT}\"\nexport WebCoreScripts=\"${WEBCORE_PRIVATE_HEADERS_DIR}\"\n\nif [ \"${ACTION}\" = \"build\" -o \"${ACTION}\" = \"install\" -o \"${ACTION}\" = \"installhdrs\" ]; then\n make -f \"${WebKitTestRunner}/DerivedSources.make\" -j `/usr/sbin/sysctl -n hw.availcpu`\nfi\n"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 8DD76F990486AA7600D96B5E /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -280,6 +398,9 @@ BCC997A411D3C8F60017BCA2 /* InjectedBundle.cpp in Sources */, BCC997A511D3C8F60017BCA2 /* InjectedBundlePage.cpp in Sources */, BCC9981811D3F51E0017BCA2 /* LayoutTestController.cpp in Sources */, + 65EB85A011EC67CC0034D300 /* ActivateFonts.mm in Sources */, + BC952C0D11F3B965003398B4 /* JSWrapper.cpp in Sources */, + BC952F1F11F3C652003398B4 /* JSLayoutTestController.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -291,6 +412,11 @@ target = BC25186111D15D54002EBC01 /* InjectedBundle */; targetProxy = BC25194111D15D94002EBC01 /* PBXContainerItemProxy */; }; + BC952ED711F3C38B003398B4 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = BC952D7711F3BF5D003398B4 /* Derived Sources */; + targetProxy = BC952ED611F3C38B003398B4 /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ @@ -337,6 +463,27 @@ }; name = Release; }; + BC952D7811F3BF5E003398B4 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + PRODUCT_NAME = "Derived Sources"; + }; + name = Debug; + }; + BC952D7911F3BF5E003398B4 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + PRODUCT_NAME = "Derived Sources"; + ZERO_LINK = NO; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -367,6 +514,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + BC952D7D11F3BF6A003398B4 /* Build configuration list for PBXAggregateTarget "Derived Sources" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BC952D7811F3BF5E003398B4 /* Debug */, + BC952D7911F3BF5E003398B4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; diff --git a/WebKitTools/WebKitTestRunner/WebKitTestRunnerPrefix.h b/WebKitTools/WebKitTestRunner/WebKitTestRunnerPrefix.h index ffb6950..9d508ed 100644 --- a/WebKitTools/WebKitTestRunner/WebKitTestRunnerPrefix.h +++ b/WebKitTools/WebKitTestRunner/WebKitTestRunnerPrefix.h @@ -27,8 +27,7 @@ #include <Cocoa/Cocoa.h> #endif -#include <wtf/Platform.h> -#if PLATFORM(WIN) +#if defined(WIN32) || defined(_WIN32) // If we don't define these, they get defined in windef.h. // We want to use std::min and std::max #define max max diff --git a/WebKitTools/WebKitTestRunner/fonts/AHEM____.TTF b/WebKitTools/WebKitTestRunner/fonts/AHEM____.TTF Binary files differnew file mode 100644 index 0000000..ac81cb0 --- /dev/null +++ b/WebKitTools/WebKitTestRunner/fonts/AHEM____.TTF diff --git a/WebKitTools/WebKitTestRunner/fonts/ColorBits-A.png b/WebKitTools/WebKitTestRunner/fonts/ColorBits-A.png Binary files differnew file mode 100644 index 0000000..8b9319c --- /dev/null +++ b/WebKitTools/WebKitTestRunner/fonts/ColorBits-A.png diff --git a/WebKitTools/WebKitTestRunner/fonts/ColorBits.ttf b/WebKitTools/WebKitTestRunner/fonts/ColorBits.ttf Binary files differnew file mode 100644 index 0000000..cd919e8 --- /dev/null +++ b/WebKitTools/WebKitTestRunner/fonts/ColorBits.ttf diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKit Layout Tests 2.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKit Layout Tests 2.ttf Binary files differnew file mode 100644 index 0000000..e732fbc --- /dev/null +++ b/WebKitTools/WebKitTestRunner/fonts/WebKit Layout Tests 2.ttf diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKit Layout Tests.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKit Layout Tests.ttf Binary files differnew file mode 100644 index 0000000..f9f997e --- /dev/null +++ b/WebKitTools/WebKitTestRunner/fonts/WebKit Layout Tests.ttf diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher100.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher100.ttf Binary files differnew file mode 100644 index 0000000..22b00de --- /dev/null +++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher100.ttf diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher200.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher200.ttf Binary files differnew file mode 100644 index 0000000..1ccadba --- /dev/null +++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher200.ttf diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher300.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher300.ttf Binary files differnew file mode 100644 index 0000000..ab5563d --- /dev/null +++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher300.ttf diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher400.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher400.ttf Binary files differnew file mode 100644 index 0000000..56d279e --- /dev/null +++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher400.ttf diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher500.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher500.ttf Binary files differnew file mode 100644 index 0000000..d827d7d --- /dev/null +++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher500.ttf diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher600.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher600.ttf Binary files differnew file mode 100644 index 0000000..9141596 --- /dev/null +++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher600.ttf diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher700.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher700.ttf Binary files differnew file mode 100644 index 0000000..a2d0505 --- /dev/null +++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher700.ttf diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher800.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher800.ttf Binary files differnew file mode 100644 index 0000000..d0f354b --- /dev/null +++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher800.ttf diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher900.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher900.ttf Binary files differnew file mode 100644 index 0000000..6b895ca --- /dev/null +++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher900.ttf diff --git a/WebKitTools/WebKitTestRunner/mac/TestControllerMac.mm b/WebKitTools/WebKitTestRunner/mac/TestControllerMac.mm index 5957e0e..ae4cc2f 100644 --- a/WebKitTools/WebKitTestRunner/mac/TestControllerMac.mm +++ b/WebKitTools/WebKitTestRunner/mac/TestControllerMac.mm @@ -30,22 +30,19 @@ namespace WTR { -void TestController::initializeInjectedBundlePath() +void TestController::platformInitialize() { - uint32_t pathLength = 0; - _NSGetExecutablePath(0, &pathLength); - char* path = (char*)malloc(pathLength); - _NSGetExecutablePath(path, &pathLength); - char* theRealPath = (char*)malloc(pathLength); - realpath(path, theRealPath); - - NSString *pwd = [[NSString stringWithUTF8String:theRealPath] stringByDeletingLastPathComponent]; - NSString *nsBundlePath = [pwd stringByAppendingPathComponent:@"InjectedBundle.bundle"]; +} - free(path); - free(theRealPath); - +void TestController::initializeInjectedBundlePath() +{ + NSString *nsBundlePath = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"InjectedBundle.bundle"]; m_injectedBundlePath.adopt(WKStringCreateWithCFString((CFStringRef)nsBundlePath)); } +void TestController::initializeTestPluginPath() +{ + m_testPluginPath.adopt(WKStringCreateWithCFString((CFStringRef)[[NSBundle mainBundle] bundlePath])); +} + } // namespace WTR diff --git a/WebKitTools/WebKitTestRunner/win/InjectedBundleGenerated.vcproj b/WebKitTools/WebKitTestRunner/win/InjectedBundleGenerated.vcproj new file mode 100755 index 0000000..1148edd --- /dev/null +++ b/WebKitTools/WebKitTestRunner/win/InjectedBundleGenerated.vcproj @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="InjectedBundleGenerated"
+ ProjectGUID="{4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}"
+ RootNamespace="InjectedBundleGenerated"
+ Keyword="MakeFileProj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="all|Win32"
+ OutputDirectory="$(WebKitOutputDir)\lib"
+ IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\$(ConfigurationName)"
+ ConfigurationType="0"
+ >
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="if exist "$(WebKitOutputDir)\buildfailed" grep XX$(ProjectName)XX "$(WebKitOutputDir)\buildfailed"
if errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"

set PATH=%SystemDrive%\cygwin\bin;%PATH%
bash build-generated-files.sh "$(WebKitOutputDir)" "$(WebKitLibrariesDir)"
if errorlevel 1 exit 1

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
+ ReBuildCommandLine="echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"

del /s /q "$(WebKitOutputDir)\obj\InjectedBundle\DerivedSources"
set PATH=%SystemDrive%\cygwin\bin;%PATH%
bash build-generated-files.sh "$(WebKitOutputDir)" "$(WebKitLibrariesDir)"
if errorlevel 1 exit 1

if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
+ CleanCommandLine="del /s /q "$(WebKitOutputDir)\obj\InjectedBundle\DerivedSources"
if exist "$(WebKitOutputDir)\buildfailed" del "$(WebKitOutputDir)\buildfailed"
"
+ Output=""
+ PreprocessorDefinitions=""
+ IncludeSearchPath=""
+ ForcedIncludes=""
+ AssemblySearchPath=""
+ ForcedUsingAssemblies=""
+ CompileAsManaged=""
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\build-generated-files.sh"
+ >
+ </File>
+ <File
+ RelativePath="..\DerivedSources.make"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/WebKitTools/WebKitTestRunner/win/PlatformWebViewWin.cpp b/WebKitTools/WebKitTestRunner/win/PlatformWebViewWin.cpp index e55bcf7..e602d0e 100644 --- a/WebKitTools/WebKitTestRunner/win/PlatformWebViewWin.cpp +++ b/WebKitTools/WebKitTestRunner/win/PlatformWebViewWin.cpp @@ -27,14 +27,40 @@ namespace WTR { +static LPCWSTR hostWindowClassName = L"WTRWebViewHostWindow"; + +static void registerWindowClass() +{ + static bool initialized; + if (initialized) + return; + initialized = true; + + WNDCLASSEXW wndClass = {0}; + wndClass.cbSize = sizeof(wndClass); + wndClass.style = CS_HREDRAW | CS_VREDRAW; + wndClass.lpfnWndProc = DefWindowProcW; + wndClass.hCursor = LoadCursor(0, IDC_ARROW); + wndClass.hInstance = GetModuleHandle(0); + wndClass.lpszClassName = hostWindowClassName; + + RegisterClassExW(&wndClass); +} + PlatformWebView::PlatformWebView(WKPageNamespaceRef namespaceRef) { - // Implement + registerWindowClass(); + + RECT viewRect = {0, 0, 800, 600}; + m_window = CreateWindowExW(0, hostWindowClassName, L"WebKitTestRunner", WS_OVERLAPPEDWINDOW, 0 /*XOFFSET*/, 0 /*YOFFSET*/, viewRect.right, viewRect.bottom, 0, 0, GetModuleHandle(0), 0); + m_view = WKViewCreate(viewRect, namespaceRef, m_window); } PlatformWebView::~PlatformWebView() { - // Implement + if (::IsWindow(m_window)) + ::DestroyWindow(m_window); + WKViewRelease(m_view); } void PlatformWebView::resizeTo(unsigned width, unsigned height) @@ -44,8 +70,7 @@ void PlatformWebView::resizeTo(unsigned width, unsigned height) WKPageRef PlatformWebView::page() { - // Implement - return 0; + return WKViewGetPage(m_view); } } // namespace WTR diff --git a/WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp b/WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp index 00b2d50..232c396 100644 --- a/WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp +++ b/WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp @@ -25,13 +25,36 @@ #include "TestController.h" +#include <fcntl.h> +#include <io.h> #include <WebKit2/WKStringCF.h> namespace WTR { +void TestController::platformInitialize() +{ + _setmode(1, _O_BINARY); + _setmode(2, _O_BINARY); +} + void TestController::initializeInjectedBundlePath() { - // Implement + CFStringRef exeContainerPath = CFURLCopyFileSystemPath(CFURLCreateCopyDeletingLastPathComponent(0, CFBundleCopyExecutableURL(CFBundleGetMainBundle())), kCFURLWindowsPathStyle); + CFMutableStringRef bundlePath = CFStringCreateMutableCopy(0, 0, exeContainerPath); +#ifndef NDEBUG + CFStringAppendCString(bundlePath, "\\InjectedBundle_debug.dll", kCFStringEncodingWindowsLatin1); +#else + CFStringAppendCString(bundlePath, "\\InjectedBundle.dll", kCFStringEncodingWindowsLatin1); +#endif + + m_injectedBundlePath.adopt(WKStringCreateWithCFString(bundlePath)); +} + +void TestController::initializeTestPluginPath() +{ + CFStringRef exeContainerPath = CFURLCopyFileSystemPath(CFURLCreateCopyDeletingLastPathComponent(0, CFBundleCopyExecutableURL(CFBundleGetMainBundle())), kCFURLWindowsPathStyle); + CFMutableStringRef bundlePath = CFStringCreateMutableCopy(0, 0, exeContainerPath); + m_testPluginPath.adopt(WKStringCreateWithCFString(bundlePath)); } } // namespace WTR diff --git a/WebKitTools/WebKitTestRunner/win/TestInvocationWin.cpp b/WebKitTools/WebKitTestRunner/win/TestInvocationWin.cpp index 83199bd..cfeebcc 100644 --- a/WebKitTools/WebKitTestRunner/win/TestInvocationWin.cpp +++ b/WebKitTools/WebKitTestRunner/win/TestInvocationWin.cpp @@ -29,7 +29,14 @@ namespace WTR { void TestInvocation::runUntil(bool& done) { - // Implement + while (!done) { + MSG msg; + BOOL result = GetMessage(&msg, 0, 0, 0); + if (result == -1) + return; + TranslateMessage(&msg); + DispatchMessage(&msg); + } } } // namespace WTR diff --git a/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.sln b/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.sln index e89e66d..757b7fb 100644 --- a/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.sln +++ b/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.sln @@ -2,6 +2,11 @@ Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKitTestRunner", "WebKitTestRunner.vcproj", "{3B99669B-1817-443B-BCBE-835580146668}"
+ ProjectSection(ProjectDependencies) = postProject
+ {CBC3391C-F060-4BF5-A66E-81404168816B} = {CBC3391C-F060-4BF5-A66E-81404168816B}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InjectedBundle", "..\InjectedBundle\win\InjectedBundle.vcproj", "{CBC3391C-F060-4BF5-A66E-81404168816B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -19,6 +24,14 @@ Global {3B99669B-1817-443B-BCBE-835580146668}.Debug|Win32.Build.0 = Debug|Win32
{3B99669B-1817-443B-BCBE-835580146668}.Release|Win32.ActiveCfg = Release|Win32
{3B99669B-1817-443B-BCBE-835580146668}.Release|Win32.Build.0 = Release|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug|Win32.Build.0 = Debug|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Release|Win32.ActiveCfg = Release|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj b/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj index 4885feb..4802c3a 100644 --- a/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj +++ b/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj @@ -39,7 +39,7 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(ProjectDir)\.";"$(ProjectDir)\..";"$(ProjectDir)\..\cg";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitOutputDir)\Include\WebKitTestRunner\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore""
+ AdditionalIncludeDirectories=""$(ProjectDir)\..";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitOutputDir)\Include\WebKitTestRunner\ForwardingHeaders";"$(WebKitLibrariesDir)\Include""
PreprocessorDefinitions="__WIN32__;_CONSOLE"
DisableSpecificWarnings="4146"
ForcedIncludeFiles="WebKitTestRunnerPrefix.h"
@@ -56,9 +56,7 @@ <Tool
Name="VCLinkerTool"
AdditionalOptions="/NXCOMPAT"
- AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebKit2$(WebKitDLLConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib getopt$(LibraryConfigSuffix).lib gdi32.lib ole32.lib oleaut32.lib user32.lib shlwapi.lib oleacc.lib comsuppw.lib"
- AdditionalLibraryDirectories=""
- DelayLoadDLLs=""
+ AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
SubSystem="1"
TargetMachine="1"
/>
@@ -113,7 +111,7 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(ProjectDir)\.";"$(ProjectDir)\..";"$(ProjectDir)\..\cg";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitOutputDir)\Include\WebKitTestRunner\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore""
+ AdditionalIncludeDirectories=""$(ProjectDir)\..";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitOutputDir)\Include\WebKitTestRunner\ForwardingHeaders";"$(WebKitLibrariesDir)\Include""
PreprocessorDefinitions="__WIN32__;_CONSOLE"
DisableSpecificWarnings="4146"
ForcedIncludeFiles="WebKitTestRunnerPrefix.h"
@@ -130,9 +128,7 @@ <Tool
Name="VCLinkerTool"
AdditionalOptions="/NXCOMPAT"
- AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebKit2$(WebKitDLLConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib getopt$(LibraryConfigSuffix).lib gdi32.lib ole32.lib oleaut32.lib user32.lib shlwapi.lib oleacc.lib comsuppw.lib"
- AdditionalLibraryDirectories=""
- DelayLoadDLLs=""
+ AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
SubSystem="1"
TargetMachine="1"
/>
@@ -170,7 +166,7 @@ >
<Tool
Name="VCPreBuildEventTool"
- CommandLine="%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 errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"

mkdir 2>NUL "$(WebKitOutputDir)\include\"
mkdir 2>NUL "$(WebKitOutputDir)\include\\ForwardingHeaders"
mkdir 2>NUL "$(WebKitOutputDir)\include\\ForwardingHeaders\wtf"

xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\*.h" "$(WebKitOutputDir)\include\\ForwardingHeaders\wtf"
"
+ CommandLine="%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 errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"

mkdir 2>NUL "$(WebKitOutputDir)\include\WebKitTestRunner"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebKitTestRunner\ForwardingHeaders"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebKitTestRunner\ForwardingHeaders\wtf"

xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\*.h" "$(WebKitOutputDir)\include\WebKitTestRunner\ForwardingHeaders\wtf"
"
/>
<Tool
Name="VCCustomBuildTool"
@@ -186,10 +182,10 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(ProjectDir)\.";"$(ProjectDir)\..";"$(ProjectDir)\..\cg";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitOutputDir)\Include\\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore""
+ AdditionalIncludeDirectories=""$(ProjectDir)\..";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitOutputDir)\Include\WebKitTestRunner\ForwardingHeaders";"$(WebKitLibrariesDir)\Include""
PreprocessorDefinitions="__WIN32__;_CONSOLE"
DisableSpecificWarnings="4146"
- ForcedIncludeFiles="Prefix.h"
+ ForcedIncludeFiles="WebKitTestRunnerPrefix.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -203,9 +199,7 @@ <Tool
Name="VCLinkerTool"
AdditionalOptions="/NXCOMPAT"
- AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebKit2$(WebKitDLLConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib getopt$(LibraryConfigSuffix).lib gdi32.lib ole32.lib oleaut32.lib user32.lib shlwapi.lib oleacc.lib comsuppw.lib"
- AdditionalLibraryDirectories=""
- DelayLoadDLLs=""
+ AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
SubSystem="1"
/>
<Tool
@@ -242,7 +236,7 @@ >
<Tool
Name="VCPreBuildEventTool"
- CommandLine="%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 errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"

mkdir 2>NUL "$(WebKitOutputDir)\include\"
mkdir 2>NUL "$(WebKitOutputDir)\include\\ForwardingHeaders"
mkdir 2>NUL "$(WebKitOutputDir)\include\\ForwardingHeaders\wtf"

xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\*.h" "$(WebKitOutputDir)\include\\ForwardingHeaders\wtf"
"
+ CommandLine="%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 errorlevel 1 exit 1
echo XX$(ProjectName)XX > "$(WebKitOutputDir)\buildfailed"

mkdir 2>NUL "$(WebKitOutputDir)\include\WebKitTestRunner"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebKitTestRunner\ForwardingHeaders"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebKitTestRunner\ForwardingHeaders\wtf"

xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\*.h" "$(WebKitOutputDir)\include\WebKitTestRunner\ForwardingHeaders\wtf"
"
/>
<Tool
Name="VCCustomBuildTool"
@@ -258,10 +252,10 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(ProjectDir)\.";"$(ProjectDir)\..";"$(ProjectDir)\..\cg";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitOutputDir)\Include\\ForwardingHeaders";"$(WebKitOutputDir)\Include\JavaScriptCore";"$(WebKitOutputDir)\Include\private\JavaScriptCore";"$(WebKitLibrariesDir)\Include";"$(WebKitLibrariesDir)\Include\private";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitOutputDir)\Include\WebCore";"$(WebKitLibrariesDir)\Include\WebCore""
+ AdditionalIncludeDirectories=""$(ProjectDir)\..";"$(WebKitOutputDir)\Include";"$(WebKitOutputDir)\Include\private";"$(WebKitOutputDir)\Include\WebKitTestRunner\ForwardingHeaders";"$(WebKitLibrariesDir)\Include""
PreprocessorDefinitions="__WIN32__;_CONSOLE"
DisableSpecificWarnings="4146"
- ForcedIncludeFiles="Prefix.h"
+ ForcedIncludeFiles="WebKitTestRunnerPrefix.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -275,9 +269,7 @@ <Tool
Name="VCLinkerTool"
AdditionalOptions="/NXCOMPAT"
- AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebKit2$(WebKitDLLConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib getopt$(LibraryConfigSuffix).lib gdi32.lib ole32.lib oleaut32.lib user32.lib shlwapi.lib oleacc.lib comsuppw.lib"
- AdditionalLibraryDirectories=""
- DelayLoadDLLs=""
+ AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
SubSystem="1"
/>
<Tool
@@ -330,38 +322,6 @@ >
</File>
</Filter>
- <Filter
- Name="InjectedBundle"
- >
- <File
- RelativePath="..\InjectedBundle\InjectedBundle.cpp"
- >
- </File>
- <File
- RelativePath="..\InjectedBundle\InjectedBundle.h"
- >
- </File>
- <File
- RelativePath="..\InjectedBundle\InjectedBundleMain.cpp"
- >
- </File>
- <File
- RelativePath="..\InjectedBundle\InjectedBundlePage.cpp"
- >
- </File>
- <File
- RelativePath="..\InjectedBundle\InjectedBundlePage.h"
- >
- </File>
- <File
- RelativePath="..\InjectedBundle\LayoutTestController.cpp"
- >
- </File>
- <File
- RelativePath="..\InjectedBundle\LayoutTestController.h"
- >
- </File>
- </Filter>
<File
RelativePath="..\PlatformWebView.h"
>
diff --git a/WebKitTools/WebKitTestRunner/win/build-generated-files.sh b/WebKitTools/WebKitTestRunner/win/build-generated-files.sh new file mode 100644 index 0000000..8c599c1 --- /dev/null +++ b/WebKitTools/WebKitTestRunner/win/build-generated-files.sh @@ -0,0 +1,42 @@ +# Copyright (C) 2010 Apple 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. 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. + +# Calls to `cygpath -ms` below are needed to remove spaces from paths, which +# confuse GNU make. See <http://webkit.org/b/8173>. + +WebKitOutputDir=$(cygpath -u "$(cygpath -ms "${1}")") +WebKitLibrariesDir=$(cygpath -u "$(cygpath -ms "${2}")") +DerivedSources="${WebKitOutputDir}/obj/InjectedBundle/DerivedSources" + +export WebKitTestRunner=$(cygpath -u "$(cygpath -ms "$(realpath ..)")") + +if [ -e "${WebKitOutputDir}/obj/WebCore/scripts" ]; then + export WebCoreScripts="${WebKitOutputDir}/obj/WebCore/scripts" +else + export WebCoreScripts="${WebKitLibrariesDir}/tools/scripts" +fi + +mkdir -p "${DerivedSources}" +cd "${DerivedSources}" + +make -f "${WebKitTestRunner}/DerivedSources.make" diff --git a/WebKitTools/wx/build/settings.py b/WebKitTools/wx/build/settings.py index fe0bc9b..122f93a 100644 --- a/WebKitTools/wx/build/settings.py +++ b/WebKitTools/wx/build/settings.py @@ -99,6 +99,7 @@ jscore_dirs = [ webcore_dirs = [ 'accessibility', 'bindings', + 'bindings/generic', 'bindings/js', 'bridge', 'bridge/c', |