summaryrefslogtreecommitdiffstats
path: root/WebKitTools
diff options
context:
space:
mode:
authorCary Clark <>2009-04-14 06:33:00 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-04-14 06:33:00 -0700
commit563af33bc48281d19dce701398dbb88cb54fd7ec (patch)
tree395b4502f029dea8b25b342d66dc06b5d8f99985 /WebKitTools
parent5cfedfef172691d0f4bcf2be5ca3cddd8c9a47f4 (diff)
downloadexternal_webkit-563af33bc48281d19dce701398dbb88cb54fd7ec.zip
external_webkit-563af33bc48281d19dce701398dbb88cb54fd7ec.tar.gz
external_webkit-563af33bc48281d19dce701398dbb88cb54fd7ec.tar.bz2
AI 146110: add missing files to webkit
brings it in sync with webkit svn cl 42046 Automated import of CL 146110
Diffstat (limited to 'WebKitTools')
-rwxr-xr-xWebKitTools/BuildSlaveSupport/build-launcher-app120
-rwxr-xr-xWebKitTools/BuildSlaveSupport/build-launcher-dmg118
-rw-r--r--WebKitTools/BuildSlaveSupport/build.webkit.org-config/Makefile19
-rw-r--r--WebKitTools/BuildSlaveSupport/build.webkit.org-config/buildbot.css116
-rw-r--r--WebKitTools/BuildSlaveSupport/build.webkit.org-config/buildbot.tac10
-rw-r--r--WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg22
-rw-r--r--WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/__init__.py5
-rw-r--r--WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/auth.py9
-rw-r--r--WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/basesteps.py51
-rw-r--r--WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/builders.py51
-rw-r--r--WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/factories.py109
-rw-r--r--WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/schedulers.py16
-rw-r--r--WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/status.py19
-rw-r--r--WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/steps.py262
-rwxr-xr-xWebKitTools/BuildSlaveSupport/run-performance-tests80
-rw-r--r--WebKitTools/CLWrapper/CLWrapper.cpp52
-rw-r--r--WebKitTools/CLWrapper/CLWrapper.sln20
-rw-r--r--WebKitTools/CLWrapper/CLWrapper.vcproj199
-rw-r--r--WebKitTools/ChangeLog23208
-rw-r--r--WebKitTools/CodeCoverage/README22
-rw-r--r--WebKitTools/CodeCoverage/amber.pngbin0 -> 127 bytes
-rw-r--r--WebKitTools/CodeCoverage/cov.py201
-rw-r--r--WebKitTools/CodeCoverage/emerald.pngbin0 -> 127 bytes
-rw-r--r--WebKitTools/CodeCoverage/gcov.css116
-rw-r--r--WebKitTools/CodeCoverage/glass.pngbin0 -> 127 bytes
-rwxr-xr-xWebKitTools/CodeCoverage/regenerate-coverage-display382
-rw-r--r--WebKitTools/CodeCoverage/ruby.pngbin0 -> 127 bytes
-rwxr-xr-xWebKitTools/CodeCoverage/run-generate-coverage-data240
-rw-r--r--WebKitTools/CodeCoverage/snow.pngbin0 -> 127 bytes
-rw-r--r--WebKitTools/CygwinDownloader/cygwin-downloader.py157
-rw-r--r--WebKitTools/CygwinDownloader/cygwin-downloader.zipbin0 -> 2989085 bytes
-rwxr-xr-xWebKitTools/CygwinDownloader/make-zip.sh30
-rw-r--r--WebKitTools/CygwinDownloader/setup.py4
-rw-r--r--WebKitTools/DrawTest/AppDelegate.h37
-rw-r--r--WebKitTools/DrawTest/AppDelegate.m52
-rw-r--r--WebKitTools/DrawTest/DrawTest.xcodeproj/project.pbxproj387
-rw-r--r--WebKitTools/DrawTest/DrawTestDocument.h45
-rw-r--r--WebKitTools/DrawTest/DrawTestDocument.m151
-rw-r--r--WebKitTools/DrawTest/DrawTestInspectorController.h37
-rw-r--r--WebKitTools/DrawTest/DrawTestInspectorController.m48
-rw-r--r--WebKitTools/DrawTest/DrawTestToolbarController.h37
-rw-r--r--WebKitTools/DrawTest/DrawTestToolbarController.m354
-rw-r--r--WebKitTools/DrawTest/DrawTestView.h38
-rw-r--r--WebKitTools/DrawTest/DrawTestView.m43
-rw-r--r--WebKitTools/DrawTest/DrawTest_Prefix.pch37
-rw-r--r--WebKitTools/DrawTest/English.lproj/DrawTestDocument.nib/classes.nib34
-rw-r--r--WebKitTools/DrawTest/English.lproj/DrawTestDocument.nib/info.nib22
-rw-r--r--WebKitTools/DrawTest/English.lproj/DrawTestDocument.nib/keyedobjects.nibbin0 -> 6746 bytes
-rw-r--r--WebKitTools/DrawTest/English.lproj/Inspector.nib/classes.nib12
-rw-r--r--WebKitTools/DrawTest/English.lproj/Inspector.nib/info.nib16
-rw-r--r--WebKitTools/DrawTest/English.lproj/Inspector.nib/keyedobjects.nibbin0 -> 9256 bytes
-rw-r--r--WebKitTools/DrawTest/English.lproj/MainMenu.nib/classes.nib44
-rw-r--r--WebKitTools/DrawTest/English.lproj/MainMenu.nib/info.nib21
-rw-r--r--WebKitTools/DrawTest/English.lproj/MainMenu.nib/keyedobjects.nibbin0 -> 17633 bytes
-rw-r--r--WebKitTools/DrawTest/English.lproj/TestViewer.nib/classes.nib36
-rw-r--r--WebKitTools/DrawTest/English.lproj/TestViewer.nib/info.nib17
-rw-r--r--WebKitTools/DrawTest/English.lproj/TestViewer.nib/keyedobjects.nibbin0 -> 11724 bytes
-rw-r--r--WebKitTools/DrawTest/Info.plist49
-rw-r--r--WebKitTools/DrawTest/SVGTest.h48
-rw-r--r--WebKitTools/DrawTest/SVGTest.m113
-rw-r--r--WebKitTools/DrawTest/ScalingImageView.h33
-rw-r--r--WebKitTools/DrawTest/ScalingImageView.m57
-rw-r--r--WebKitTools/DrawTest/TestController.h72
-rw-r--r--WebKitTools/DrawTest/TestController.m270
-rw-r--r--WebKitTools/DrawTest/TestViewerSplitView.h31
-rw-r--r--WebKitTools/DrawTest/TestViewerSplitView.m77
-rw-r--r--WebKitTools/DrawTest/main.m29
-rw-r--r--WebKitTools/DumpRenderTree/AccessibilityController.cpp70
-rw-r--r--WebKitTools/DumpRenderTree/AccessibilityController.h48
-rw-r--r--WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp333
-rw-r--r--WebKitTools/DumpRenderTree/AccessibilityUIElement.h116
-rw-r--r--WebKitTools/DumpRenderTree/DumpRenderTree.h61
-rw-r--r--WebKitTools/DumpRenderTree/DumpRenderTree.sln47
-rw-r--r--WebKitTools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj877
-rw-r--r--WebKitTools/DumpRenderTree/DumpRenderTreePrefix.h38
-rw-r--r--WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/ASCIICType.h1
-rw-r--r--WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Assertions.h1
-rw-r--r--WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/HashMap.h1
-rw-r--r--WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/HashSet.h1
-rwxr-xr-xWebKitTools/DumpRenderTree/ForwardingHeaders/wtf/HashTraits.h1
-rw-r--r--WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Locker.h1
-rw-r--r--WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/MathExtras.h1
-rw-r--r--WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Noncopyable.h1
-rw-r--r--WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/OwnPtr.h1
-rw-r--r--WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/PassRefPtr.h1
-rw-r--r--WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Platform.h1
-rw-r--r--WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/RefCounted.h1
-rw-r--r--WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/RefPtr.h1
-rw-r--r--WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/RetainPtr.h1
-rw-r--r--WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/StringExtras.h1
-rw-r--r--WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Threading.h1
-rw-r--r--WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Vector.h1
-rw-r--r--WebKitTools/DumpRenderTree/GCController.cpp108
-rw-r--r--WebKitTools/DumpRenderTree/GCController.h51
-rw-r--r--WebKitTools/DumpRenderTree/JavaScriptThreading.h40
-rw-r--r--WebKitTools/DumpRenderTree/LayoutTestController.cpp874
-rw-r--r--WebKitTools/DumpRenderTree/LayoutTestController.h199
-rw-r--r--WebKitTools/DumpRenderTree/Makefile2
-rw-r--r--WebKitTools/DumpRenderTree/PixelDumpSupport.h46
-rw-r--r--WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/Info.plist60
-rw-r--r--WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp722
-rw-r--r--WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h55
-rw-r--r--WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.cpp167
-rw-r--r--WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.h29
-rw-r--r--WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp423
-rw-r--r--WebKitTools/DumpRenderTree/WorkQueue.cpp89
-rw-r--r--WebKitTools/DumpRenderTree/WorkQueue.h51
-rw-r--r--WebKitTools/DumpRenderTree/WorkQueueItem.h108
-rw-r--r--WebKitTools/DumpRenderTree/cg/ImageDiffCG.cpp256
-rw-r--r--WebKitTools/DumpRenderTree/cg/PixelDumpSupportCG.cpp146
-rw-r--r--WebKitTools/DumpRenderTree/cg/PixelDumpSupportCG.h84
-rw-r--r--WebKitTools/DumpRenderTree/config.h47
-rw-r--r--WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher100.ttfbin0 -> 28512 bytes
-rw-r--r--WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher200.ttfbin0 -> 28512 bytes
-rw-r--r--WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher300.ttfbin0 -> 28492 bytes
-rw-r--r--WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher400.ttfbin0 -> 28440 bytes
-rw-r--r--WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher500.ttfbin0 -> 28424 bytes
-rw-r--r--WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher600.ttfbin0 -> 28460 bytes
-rw-r--r--WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher700.ttfbin0 -> 28384 bytes
-rw-r--r--WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher800.ttfbin0 -> 28492 bytes
-rw-r--r--WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher900.ttfbin0 -> 28492 bytes
-rw-r--r--WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp525
-rw-r--r--WebKitTools/DumpRenderTree/gtk/DumpRenderTreeGtk.h41
-rw-r--r--WebKitTools/DumpRenderTree/gtk/GCControllerGtk.cpp43
-rw-r--r--WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp323
-rw-r--r--WebKitTools/DumpRenderTree/gtk/TestNetscapePlugin/ForwardingHeaders/WebKit/npapi.h1
-rw-r--r--WebKitTools/DumpRenderTree/gtk/TestNetscapePlugin/ForwardingHeaders/WebKit/npfunctions.h1
-rw-r--r--WebKitTools/DumpRenderTree/gtk/TestNetscapePlugin/ForwardingHeaders/WebKit/npruntime.h1
-rw-r--r--WebKitTools/DumpRenderTree/gtk/TestNetscapePlugin/TestNetscapePlugin.cpp309
-rw-r--r--WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp82
-rw-r--r--WebKitTools/DumpRenderTree/mac/AccessibilityControllerMac.mm54
-rw-r--r--WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm471
-rw-r--r--WebKitTools/DumpRenderTree/mac/AppleScriptController.h39
-rw-r--r--WebKitTools/DumpRenderTree/mac/AppleScriptController.m126
-rw-r--r--WebKitTools/DumpRenderTree/mac/CheckedMalloc.cpp59
-rw-r--r--WebKitTools/DumpRenderTree/mac/CheckedMalloc.h31
-rw-r--r--WebKitTools/DumpRenderTree/mac/Configurations/Base.xcconfig17
-rw-r--r--WebKitTools/DumpRenderTree/mac/Configurations/DebugRelease.xcconfig15
-rw-r--r--WebKitTools/DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig4
-rw-r--r--WebKitTools/DumpRenderTree/mac/Configurations/ImageDiff.xcconfig1
-rw-r--r--WebKitTools/DumpRenderTree/mac/Configurations/TestNetscapePlugIn.xcconfig6
-rw-r--r--WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm1168
-rw-r--r--WebKitTools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.h53
-rw-r--r--WebKitTools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm108
-rw-r--r--WebKitTools/DumpRenderTree/mac/DumpRenderTreeMac.h65
-rw-r--r--WebKitTools/DumpRenderTree/mac/DumpRenderTreePasteboard.h38
-rw-r--r--WebKitTools/DumpRenderTree/mac/DumpRenderTreePasteboard.m205
-rw-r--r--WebKitTools/DumpRenderTree/mac/DumpRenderTreeWindow.h44
-rw-r--r--WebKitTools/DumpRenderTree/mac/DumpRenderTreeWindow.mm124
-rw-r--r--WebKitTools/DumpRenderTree/mac/EditingDelegate.h38
-rw-r--r--WebKitTools/DumpRenderTree/mac/EditingDelegate.mm191
-rw-r--r--WebKitTools/DumpRenderTree/mac/EventSendingController.h55
-rw-r--r--WebKitTools/DumpRenderTree/mac/EventSendingController.mm674
-rw-r--r--WebKitTools/DumpRenderTree/mac/FrameLoadDelegate.h39
-rw-r--r--WebKitTools/DumpRenderTree/mac/FrameLoadDelegate.mm351
-rw-r--r--WebKitTools/DumpRenderTree/mac/GCControllerMac.mm47
-rw-r--r--WebKitTools/DumpRenderTree/mac/InternalHeaders/WebKit/WebHTMLRepresentationInternal.h1
-rw-r--r--WebKitTools/DumpRenderTree/mac/InternalHeaders/WebKit/WebTypesInternal.h1
-rw-r--r--WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm422
-rw-r--r--WebKitTools/DumpRenderTree/mac/NavigationController.h39
-rw-r--r--WebKitTools/DumpRenderTree/mac/NavigationController.m109
-rw-r--r--WebKitTools/DumpRenderTree/mac/ObjCController.h38
-rw-r--r--WebKitTools/DumpRenderTree/mac/ObjCController.m239
-rw-r--r--WebKitTools/DumpRenderTree/mac/ObjCPlugin.h36
-rw-r--r--WebKitTools/DumpRenderTree/mac/ObjCPlugin.m206
-rw-r--r--WebKitTools/DumpRenderTree/mac/ObjCPluginFunction.h34
-rw-r--r--WebKitTools/DumpRenderTree/mac/ObjCPluginFunction.m37
-rw-r--r--WebKitTools/DumpRenderTree/mac/PixelDumpSupportMac.mm246
-rw-r--r--WebKitTools/DumpRenderTree/mac/PolicyDelegate.h38
-rw-r--r--WebKitTools/DumpRenderTree/mac/PolicyDelegate.mm81
-rw-r--r--WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.h35
-rw-r--r--WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.mm194
-rw-r--r--WebKitTools/DumpRenderTree/mac/TextInputController.h42
-rw-r--r--WebKitTools/DumpRenderTree/mac/TextInputController.m429
-rw-r--r--WebKitTools/DumpRenderTree/mac/UIDelegate.h37
-rw-r--r--WebKitTools/DumpRenderTree/mac/UIDelegate.mm163
-rw-r--r--WebKitTools/DumpRenderTree/mac/WorkQueueItemMac.mm77
-rw-r--r--WebKitTools/DumpRenderTree/pthreads/JavaScriptThreadingPthreads.cpp137
-rw-r--r--WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp359
-rw-r--r--WebKitTools/DumpRenderTree/qt/DumpRenderTree.h103
-rw-r--r--WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro22
-rw-r--r--WebKitTools/DumpRenderTree/qt/WorkQueue.cpp90
-rw-r--r--WebKitTools/DumpRenderTree/qt/WorkQueue.h52
-rw-r--r--WebKitTools/DumpRenderTree/qt/WorkQueueItem.h121
-rw-r--r--WebKitTools/DumpRenderTree/qt/fonts.conf258
-rw-r--r--WebKitTools/DumpRenderTree/qt/fonts/AHEM____.TTFbin0 -> 12480 bytes
-rw-r--r--WebKitTools/DumpRenderTree/qt/jsobjects.cpp520
-rw-r--r--WebKitTools/DumpRenderTree/qt/jsobjects.h159
-rw-r--r--WebKitTools/DumpRenderTree/qt/main.cpp174
-rw-r--r--WebKitTools/DumpRenderTree/qt/testplugin.cpp67
-rw-r--r--WebKitTools/DumpRenderTree/qt/testplugin.h45
-rw-r--r--WebKitTools/DumpRenderTree/win/AccessibilityControllerWin.cpp84
-rw-r--r--WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp293
-rw-r--r--WebKitTools/DumpRenderTree/win/DraggingInfo.h62
-rw-r--r--WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp1140
-rw-r--r--WebKitTools/DumpRenderTree/win/DumpRenderTree.vcproj411
-rw-r--r--WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h59
-rw-r--r--WebKitTools/DumpRenderTree/win/EditingDelegate.cpp355
-rw-r--r--WebKitTools/DumpRenderTree/win/EditingDelegate.h176
-rw-r--r--WebKitTools/DumpRenderTree/win/EventSender.cpp597
-rw-r--r--WebKitTools/DumpRenderTree/win/EventSender.h42
-rw-r--r--WebKitTools/DumpRenderTree/win/FrameLoadDelegate.cpp314
-rw-r--r--WebKitTools/DumpRenderTree/win/FrameLoadDelegate.h139
-rw-r--r--WebKitTools/DumpRenderTree/win/GCControllerWin.cpp60
-rw-r--r--WebKitTools/DumpRenderTree/win/ImageDiff.vcproj230
-rw-r--r--WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp745
-rw-r--r--WebKitTools/DumpRenderTree/win/MD5.cpp78
-rw-r--r--WebKitTools/DumpRenderTree/win/MD5.h45
-rw-r--r--WebKitTools/DumpRenderTree/win/PixelDumpSupportWin.cpp68
-rw-r--r--WebKitTools/DumpRenderTree/win/PolicyDelegate.cpp124
-rw-r--r--WebKitTools/DumpRenderTree/win/PolicyDelegate.h78
-rw-r--r--WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp264
-rw-r--r--WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.h103
-rw-r--r--WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.def6
-rw-r--r--WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.rc101
-rw-r--r--WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj263
-rw-r--r--WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.c183
-rw-r--r--WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.cpp215
-rw-r--r--WebKitTools/DumpRenderTree/win/TestNetscapePlugin/resource.h14
-rwxr-xr-xWebKitTools/DumpRenderTree/win/UIDelegate.cpp444
-rwxr-xr-xWebKitTools/DumpRenderTree/win/UIDelegate.h321
-rw-r--r--WebKitTools/DumpRenderTree/win/WorkQueueItemWin.cpp134
-rw-r--r--WebKitTools/FindSafari/FindSafari.cpp276
-rw-r--r--WebKitTools/FindSafari/FindSafari.rc70
-rw-r--r--WebKitTools/FindSafari/FindSafari.vcproj118
-rw-r--r--WebKitTools/FindSafari/Safari.exe.manifest129
-rw-r--r--WebKitTools/FindSafari/resource.h16
-rw-r--r--WebKitTools/GNUmakefile.am121
-rw-r--r--WebKitTools/GtkLauncher/main.c205
-rw-r--r--WebKitTools/GtkLauncher/simple.svg15
-rw-r--r--WebKitTools/GtkLauncher/text.html9
-rw-r--r--WebKitTools/MIDLWrapper/MIDLWrapper.cpp86
-rw-r--r--WebKitTools/MIDLWrapper/MIDLWrapper.sln20
-rw-r--r--WebKitTools/MIDLWrapper/MIDLWrapper.vcproj199
-rw-r--r--WebKitTools/Makefile17
-rw-r--r--WebKitTools/Scripts/SpacingHeuristics.pm101
-rw-r--r--WebKitTools/Scripts/VCSUtils.pm135
-rwxr-xr-xWebKitTools/Scripts/bisect-builds431
-rwxr-xr-xWebKitTools/Scripts/build-drawtest48
-rwxr-xr-xWebKitTools/Scripts/build-dumprendertree54
-rwxr-xr-xWebKitTools/Scripts/build-jsc78
-rwxr-xr-xWebKitTools/Scripts/build-webkit333
-rwxr-xr-xWebKitTools/Scripts/check-dom-results141
-rwxr-xr-xWebKitTools/Scripts/check-for-exit-time-destructors151
-rwxr-xr-xWebKitTools/Scripts/check-for-global-initializers135
-rwxr-xr-xWebKitTools/Scripts/check-for-weak-vtables101
-rwxr-xr-xWebKitTools/Scripts/clean-header-guards53
-rwxr-xr-xWebKitTools/Scripts/commit-log-editor189
-rwxr-xr-xWebKitTools/Scripts/compare-timing-files88
-rwxr-xr-xWebKitTools/Scripts/create-exports5
-rwxr-xr-xWebKitTools/Scripts/debug-safari38
-rwxr-xr-xWebKitTools/Scripts/detect-mismatched-virtual-const167
-rwxr-xr-xWebKitTools/Scripts/do-file-rename115
-rwxr-xr-xWebKitTools/Scripts/do-webcore-rename184
-rwxr-xr-xWebKitTools/Scripts/extract-localizable-strings351
-rwxr-xr-xWebKitTools/Scripts/find-extra-includes102
-rwxr-xr-xWebKitTools/Scripts/find-included-framework-headers10
-rwxr-xr-xWebKitTools/Scripts/gdb-safari53
-rwxr-xr-xWebKitTools/Scripts/generate-coverage-data71
-rwxr-xr-xWebKitTools/Scripts/generate-qt-inspector-resource53
-rwxr-xr-xWebKitTools/Scripts/make-js-test-wrappers165
-rwxr-xr-xWebKitTools/Scripts/num-cpus16
-rwxr-xr-xWebKitTools/Scripts/parallelcl224
-rwxr-xr-xWebKitTools/Scripts/parse-malloc-history154
-rwxr-xr-xWebKitTools/Scripts/pdevenv25
-rwxr-xr-xWebKitTools/Scripts/prepare-ChangeLog1445
-rwxr-xr-xWebKitTools/Scripts/print-msvc-project-dependencies143
-rwxr-xr-xWebKitTools/Scripts/report-include-statistics114
-rwxr-xr-xWebKitTools/Scripts/resolve-ChangeLogs513
-rwxr-xr-xWebKitTools/Scripts/run-drawtest47
-rwxr-xr-xWebKitTools/Scripts/run-iexploder-tests172
-rwxr-xr-xWebKitTools/Scripts/run-javascriptcore-tests184
-rwxr-xr-xWebKitTools/Scripts/run-jsc58
-rwxr-xr-xWebKitTools/Scripts/run-launcher67
-rwxr-xr-xWebKitTools/Scripts/run-leaks212
-rwxr-xr-xWebKitTools/Scripts/run-mangleme-tests175
-rwxr-xr-xWebKitTools/Scripts/run-pageloadtest92
-rwxr-xr-xWebKitTools/Scripts/run-safari41
-rwxr-xr-xWebKitTools/Scripts/run-sunspider131
-rwxr-xr-xWebKitTools/Scripts/run-webkit-app50
-rwxr-xr-xWebKitTools/Scripts/run-webkit-httpd127
-rwxr-xr-xWebKitTools/Scripts/run-webkit-nightly.cmd10
-rwxr-xr-xWebKitTools/Scripts/run-webkit-tests1895
-rwxr-xr-xWebKitTools/Scripts/set-webkit-configuration79
-rwxr-xr-xWebKitTools/Scripts/sort-Xcode-project-file167
-rwxr-xr-xWebKitTools/Scripts/split-file-by-class159
-rwxr-xr-xWebKitTools/Scripts/sunspider-compare-results101
-rwxr-xr-xWebKitTools/Scripts/svn-apply443
-rwxr-xr-xWebKitTools/Scripts/svn-create-patch442
-rwxr-xr-xWebKitTools/Scripts/svn-unapply374
-rwxr-xr-xWebKitTools/Scripts/update-iexploder-cssproperties112
-rwxr-xr-xWebKitTools/Scripts/update-javascriptcore-test-results73
-rw-r--r--WebKitTools/Scripts/update-sources-list.py93
-rwxr-xr-xWebKitTools/Scripts/update-webkit92
-rwxr-xr-xWebKitTools/Scripts/update-webkit-auxiliary-libs121
-rwxr-xr-xWebKitTools/Scripts/update-webkit-localizable-strings46
-rwxr-xr-xWebKitTools/Scripts/update-webkit-support-libs133
-rw-r--r--WebKitTools/Scripts/webkitdirs.pm1249
-rwxr-xr-xWebKitTools/Scripts/wkstyle89
-rw-r--r--WebKitTools/WebKitLauncher/Info.plist476
-rw-r--r--WebKitTools/WebKitLauncher/VERSION1
-rw-r--r--WebKitTools/WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj358
-rw-r--r--WebKitTools/WebKitLauncher/WebKitNightlyEnabler.m165
-rw-r--r--WebKitTools/WebKitLauncher/main.m164
-rw-r--r--WebKitTools/WebKitLauncher/start.html33
-rw-r--r--WebKitTools/WebKitLauncher/webkit.icnsbin0 -> 56937 bytes
-rw-r--r--WebKitTools/WinLauncher/WinLauncher.cpp409
-rw-r--r--WebKitTools/WinLauncher/WinLauncher.h109
-rw-r--r--WebKitTools/WinLauncher/WinLauncher.icobin0 -> 23558 bytes
-rw-r--r--WebKitTools/WinLauncher/WinLauncher.rc136
-rw-r--r--WebKitTools/WinLauncher/WinLauncher.vcproj343
-rw-r--r--WebKitTools/WinLauncher/resource.h27
-rw-r--r--WebKitTools/WinLauncher/small.icobin0 -> 23558 bytes
-rw-r--r--WebKitTools/WinLauncher/stdafx.cpp33
-rw-r--r--WebKitTools/WinLauncher/stdafx.h69
-rw-r--r--WebKitTools/iExploder/CHANGELOG.txt328
-rw-r--r--WebKitTools/iExploder/LICENSE.txt20
-rw-r--r--WebKitTools/iExploder/README.txt149
-rw-r--r--WebKitTools/iExploder/htdocs/config.rb6
-rw-r--r--WebKitTools/iExploder/htdocs/cssproperties.in348
-rw-r--r--WebKitTools/iExploder/htdocs/cssvalues.in339
-rw-r--r--WebKitTools/iExploder/htdocs/htmlattrs.in259
-rw-r--r--WebKitTools/iExploder/htdocs/htmltags.in128
-rw-r--r--WebKitTools/iExploder/htdocs/htmlvalues.in35
-rwxr-xr-xWebKitTools/iExploder/htdocs/iexploder.cgi45
-rw-r--r--WebKitTools/iExploder/htdocs/iexploder.rb337
-rw-r--r--WebKitTools/iExploder/htdocs/index.html34
-rwxr-xr-xWebKitTools/iExploder/htdocs/webserver.rb75
-rwxr-xr-xWebKitTools/iExploder/tools/lasthit.rb53
-rwxr-xr-xWebKitTools/iExploder/tools/osx_last_crash.rb48
-rwxr-xr-xWebKitTools/iExploder/tools/showtest.rb43
-rw-r--r--WebKitTools/mangleme/LICENSE504
-rw-r--r--WebKitTools/mangleme/Makefile16
-rw-r--r--WebKitTools/mangleme/README20
-rw-r--r--WebKitTools/mangleme/mangle.cgi.c122
-rw-r--r--WebKitTools/mangleme/remangle.cgi.c125
-rw-r--r--WebKitTools/mangleme/tags.h76
-rw-r--r--WebKitTools/record-memory-win/main.cpp187
-rw-r--r--WebKitTools/record-memory-win/record-memory-win.vcproj124
-rwxr-xr-xWebKitTools/vcbin/cl.exebin0 -> 6656 bytes
-rwxr-xr-xWebKitTools/vcbin/midl.exebin0 -> 7168 bytes
-rw-r--r--WebKitTools/wx/browser/browser.bkl63
-rw-r--r--WebKitTools/wx/browser/browser.cpp62
-rwxr-xr-xWebKitTools/wx/build-wxwebkit407
-rwxr-xr-xWebKitTools/wx/install-unix-extras172
-rw-r--r--WebKitTools/wx/packaging/build-win-installer.py109
-rw-r--r--WebKitTools/wx/packaging/wxWebKitInstaller.iss.in79
347 files changed, 71094 insertions, 0 deletions
diff --git a/WebKitTools/BuildSlaveSupport/build-launcher-app b/WebKitTools/BuildSlaveSupport/build-launcher-app
new file mode 100755
index 0000000..117b008
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/build-launcher-app
@@ -0,0 +1,120 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
+# Copyright (C) 2006 Mark Rowe <opendarwin.org@bdash.net.nz>. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Creates the launcher WebKit.app with bundled frameworks.
+
+use strict;
+
+use FindBin;
+use lib "$FindBin::Bin/../Scripts";
+use webkitdirs;
+
+my @xcodeBuildArguments = XcodeOptions();
+my $nightlyLauncherTemplatePath = "$FindBin::Bin/../WebKitLauncher";
+my $nightlyLauncherStagingPath = productDir() . "/WebKit.app";
+
+sub buildNightlyLauncher
+{
+ chdir($nightlyLauncherTemplatePath);
+ system("xcodebuild", "clean", "-alltargets", @xcodeBuildArguments, @ARGV) == 0 or die "Failed cleaning WebKitLauncher project";
+ system("xcodebuild", @xcodeBuildArguments, @ARGV) == 0 or die "Failed building WebKitLauncher project";
+ chdirWebKit();
+}
+
+sub currentRevision
+{
+ my $sourceDir = sourceDir();
+ if (isSVNDirectory($sourceDir)) {
+ return currentSVNRevision();
+ } elsif (isGitDirectory($sourceDir)) {
+ my $gitLog = `cd $sourceDir && LC_ALL=C git log --grep='git-svn-id: ' -n 1 | grep git-svn-id:`;
+ (my $revision) = ($gitLog =~ m/ +git-svn-id: .+@(\d+) /g);
+ return $revision;
+ }
+}
+
+sub currentBranch
+{
+ my $sourceDir = sourceDir();
+ my ($url, $branch);
+ if (isSVNDirectory($sourceDir)) {
+ my $svnInfo = `LC_ALL=C svn info $sourceDir | grep URL:`;
+ ($url) = ($svnInfo =~ m/URL: (.+)/g);
+ } elsif (isGitDirectory($sourceDir)) {
+ my $gitLog = `cd $sourceDir && LC_ALL=C git log --grep='git-svn-id: ' -n 1 | grep git-svn-id:`;
+ ($url) = ($gitLog =~ m/ +git-svn-id: (.+)@\d+ /g);
+ }
+ ($branch) = ($url =~ m/\/webkit\/(trunk|branches\/[^\/]+)/);
+ die "Unable to determine current SVN branch in $sourceDir" unless (defined $branch);
+ $branch =~ s/^branches\///;
+ return $branch;
+}
+
+sub copyNightlyLauncher
+{
+ my $revision = currentRevision();
+ my $branch = currentBranch();
+
+ my $infoPlist = "$nightlyLauncherStagingPath/Contents/Info.plist";
+ my $versionFile = "$nightlyLauncherStagingPath/Contents/Resources/VERSION";
+ my $branchFile = "$nightlyLauncherStagingPath/Contents/Resources/BRANCH";
+ my $data;
+ open(IN, $infoPlist) or die "Couldn't open Info.plist in built application for reading";
+ {
+ undef $/;
+ $data = <IN>;
+ }
+ close(IN);
+ open(OUT, ">$infoPlist") or die "Couldn't open Info.plist in built application for writing";
+ $data =~ s/VERSION/$revision/g;
+ print OUT $data;
+ close(OUT);
+
+ open(OUT, ">$versionFile") or die "Couldn't open VERSION in built application for writing";
+ print OUT "$revision\n";
+ close(OUT);
+
+ open(OUT, ">$branchFile") or die "Couldn't open BRANCH in built application for writing";
+ print OUT "$branch\n";
+ close(OUT);
+
+ my @frameworks = ("JavaScriptCore", "JavaScriptGlue", "WebCore", "WebKit");
+ for my $framework (@frameworks) {
+ system("ditto", productDir() . "/$framework.framework", "$nightlyLauncherStagingPath/Contents/Resources/$framework.framework") == 0 or die "Failed copying $framework.framework into $nightlyLauncherStagingPath";
+ }
+}
+
+my $b = currentBranch();
+my $r = currentRevision();
+print "Branch: ", $b, "\n";
+print "Revision: ", $r, "\n";
+
+chdirWebKit();
+buildNightlyLauncher();
+copyNightlyLauncher();
diff --git a/WebKitTools/BuildSlaveSupport/build-launcher-dmg b/WebKitTools/BuildSlaveSupport/build-launcher-dmg
new file mode 100755
index 0000000..4dce7fb
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/build-launcher-dmg
@@ -0,0 +1,118 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
+# Copyright (C) 2006 Mark Rowe <opendarwin.org@bdash.net.nz>. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Script used by build slaves to create a disk-image containing WebKit.app.
+
+use strict;
+
+use File::Basename;
+use Getopt::Long;
+use FindBin;
+use lib "$FindBin::Bin/../Scripts";
+use webkitdirs;
+
+my $nightlyLauncherStagingPath = productDir() . "/WebKit.app";
+my $droseraStagingPath = productDir() . "/DroseraLauncher.app";
+my $nightlyLauncherDiskImagePath;
+
+my $nightlyRemoteHost = 'webkit-nightlies@live.nightly.webkit.org';
+my $nightlyRemotePath = "/home/webkit-nightlies";
+my $nightlyRemoteLatestPath = "$nightlyRemotePath/update-latest.sh";
+
+sub buildDiskImage
+{
+ my $revision = currentSVNRevision();
+ my $productDir = productDir();
+ $nightlyLauncherDiskImagePath = productDir() . "/WebKit-SVN-r$revision.dmg";
+
+ print "Removing previous temp source directory (if any)...\n";
+ `rm -rf /tmp/WebKitNightly`;
+ die "Removing previous temp source directory failed" if $?;
+
+ print "Making a new temp source directory...\n";
+ `mkdir /tmp/WebKitNightly`;
+ die "Making a new temp source directory failed" if $?;
+
+ print "Copying WebKit.app to temp source directory...\n";
+ `cp -R \"$nightlyLauncherStagingPath\" /tmp/WebKitNightly/WebKit.app`;
+ die "Copying WebKit.app to temp source directory failed" if $?;
+
+ print "Copying Drosera.app to temp source directory...\n";
+ `cp -R \"$droseraStagingPath\" /tmp/WebKitNightly/Drosera.app`;
+ die "Copying Drosera.app to temp source directory failed" if $?;
+
+ print "Creating disk image...\n";
+ `hdiutil create \"$nightlyLauncherDiskImagePath\" -ov -srcfolder /tmp/WebKitNightly -fs HFS+ -volname \"WebKit\"`;
+ die "Creating disk image failed" if $?;
+
+ print "Removing temp source directory...\n";
+ `rm -rf /tmp/WebKitNightly`;
+ die "Removing temp source directory failed" if $?;
+
+ print "Compressing disk image...\n";
+ system("mv", "-f", $nightlyLauncherDiskImagePath, "$nightlyLauncherDiskImagePath.uncompressed.dmg") == 0 or die "Renaming disk image failed";
+ system("hdiutil", "convert", "-quiet", "$nightlyLauncherDiskImagePath.uncompressed.dmg", "-format", "UDBZ", "-imagekey", "zlib-level=9", "-o", "$nightlyLauncherDiskImagePath");
+ die "Compressing disk image failed" if $?;
+
+ unlink "$nightlyLauncherDiskImagePath.uncompressed.dmg";
+}
+
+sub uploadNightlyDiskImage
+{
+ my $buildTag = shift(@_);
+ my $nightlyRemoteDiskImagePath = "$nightlyRemotePath/builds/$buildTag/mac/" . basename($nightlyLauncherDiskImagePath);
+ my $revision = currentSVNRevision();
+ system("rsync", "-vP", $nightlyLauncherDiskImagePath, "$nightlyRemoteHost:$nightlyRemoteDiskImagePath") == 0 or die "Failed uploading disk image";
+ system("ssh", $nightlyRemoteHost, $nightlyRemoteLatestPath, $buildTag, "mac", $nightlyRemoteDiskImagePath, $revision) == 0 or die "Failed linking disk image to latest";
+}
+
+sub uploadBuildSlaveDiskImage
+{
+ my $remoteDiskImagePath = shift(@_) . basename($nightlyLauncherDiskImagePath);
+ system("rsync", "-vP", $nightlyLauncherDiskImagePath, $remoteDiskImagePath) == 0 or die "Failed uploading disk image";
+}
+
+
+my $uploadTo;
+my $nightlyBuild = 0;
+my $buildTag = 'trunk';
+GetOptions('upload-to-host=s' => \$uploadTo,
+ 'upload-as-nightly!' => \$nightlyBuild,
+ 'tag=s' => \$buildTag);
+
+chdirWebKit();
+buildDiskImage($buildTag);
+
+if ($nightlyBuild) {
+ uploadNightlyDiskImage($buildTag);
+} elsif ($uploadTo) {
+ uploadBuildSlaveDiskImage($uploadTo);
+} else {
+ print "Disk image left at $nightlyLauncherDiskImagePath\n";
+}
diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/Makefile b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/Makefile
new file mode 100644
index 0000000..c3a935f
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/Makefile
@@ -0,0 +1,19 @@
+# -*- makefile -*-
+
+# This is a simple makefile which lives in a buildmaster/buildslave
+# directory (next to the buildbot.tac file). It allows you to start/stop the
+# master or slave by doing 'make start' or 'make stop'.
+
+# The 'reconfig' target will tell a buildmaster to reload its config file.
+
+start:
+ twistd --no_save -y buildbot.tac
+
+stop:
+ kill `cat twistd.pid`
+
+reconfig:
+ kill -HUP `cat twistd.pid`
+
+log:
+ tail -f twistd.log
diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/buildbot.css b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/buildbot.css
new file mode 100644
index 0000000..534de25
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/buildbot.css
@@ -0,0 +1,116 @@
+* {
+ font-family: Verdana, Cursor;
+ font-size: 10px;
+ font-weight: bold;
+}
+
+a:link,a:visited,a:active {
+ color: #444;
+}
+a:hover {
+ color: #FFFFFF;
+}
+
+table {
+ border-spacing: 1px 1px;
+}
+
+table td {
+ padding: 3px 0px 3px 0px;
+ text-align: center;
+}
+
+.Project {
+ width: 100px;
+}
+
+.LastBuild, .Activity {
+ width: 230px;
+ padding: 0 0 0 4px;
+}
+
+td.Time {
+ color: #000;
+ border-bottom: 1px solid #aaa;
+ background-color: #eee;
+}
+
+td.Activity, td.Change, td.Builder {
+ color: #333333;
+ background-color: #CCCCCC;
+}
+
+td.Change {
+ border-radius: 5px;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+}
+td.Event {
+ color: #777;
+ background-color: #ddd;
+ border-radius: 5px;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+}
+
+td.Activity {
+ border-top-left-radius: 10px;
+ -webkit-border-top-left-radius: 10px;
+ -moz-border-radius-topleft: 10px;
+ min-height: 20px;
+ padding: 8px 0 8px 0;
+}
+
+td.idle, td.waiting, td.offline, td.building {
+ border-top-left-radius: 0px;
+ -webkit-border-top-left-radius: 0px;
+ -moz-border-radius-topleft: 0px;
+}
+
+.LastBuild {
+ border-top-left-radius: 5px;
+ -webkit-border-top-left-radius: 5px;
+ -moz-border-radius-topleft: 5px;
+ border-top-right-radius: 5px;
+ -webkit-border-top-right-radius: 5px;
+ -moz-border-radius-topright: 5px;
+}
+
+/* LastBuild, BuildStep states */
+.success {
+ color: #FFFFFF;
+ background-color: #8fdf5f;
+}
+
+.failure {
+ color: #FFFFFF;
+ background-color: #e98080;
+}
+
+.warnings {
+ color: #FFFFFF;
+ background-color: #ffc343;
+}
+
+.exception, td.offline {
+ color: #FFFFFF;
+ background-color: #e0b0ff;
+}
+
+.start,.running, td.building {
+ color: #666666;
+ background-color: #fffc6c;
+}
+
+.start {
+ border-bottom-left-radius: 10px;
+ -webkit-border-bottom-left-radius: 10px;
+ -moz-border-radius-bottomleft: 10px;
+ border-bottom-right-radius: 10px;
+ -webkit-border-bottom-right-radius: 10px;
+ -moz-border-radius-bottomright: 10px;
+}
+
+td.Project a:hover, td.start a:hover {
+ color: #000;
+}
diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/buildbot.tac b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/buildbot.tac
new file mode 100644
index 0000000..f66e068
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/buildbot.tac
@@ -0,0 +1,10 @@
+
+from twisted.application import service
+from buildbot.master import BuildMaster
+
+basedir = r'/home/mrowe/sites/build.webkit.org/buildbot'
+configfile = r'master.cfg'
+
+application = service.Application('buildmaster')
+BuildMaster(basedir, configfile).setServiceParent(application)
+
diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg
new file mode 100644
index 0000000..677e82a
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg
@@ -0,0 +1,22 @@
+# -*- python -*-
+
+import os
+from twisted.web import static
+static.File.contentTypes = static.loadMimeTypes(['/etc/mime.types', os.path.join(basedir, 'mime.types')])
+
+from buildbot.changes.pb import PBChangeSource
+import webkit
+reload(webkit)
+
+c = BuildmasterConfig = {}
+
+c['slaves'] = webkit.auth.getSlaveAuthenticationDetails()
+c['change_source'] = [PBChangeSource()]
+c['builders'] = webkit.builders.getBuilders()
+c['schedulers'] = webkit.schedulers.getSchedulers(c['builders'])
+c['status'] = webkit.status.getStatusListeners()
+
+c['slavePortnum'] = 9989
+c['projectName'] = "WebKit"
+c['projectURL'] = "http://webkit.org/"
+c['buildbotURL'] = "http://build.webkit.org/"
diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/__init__.py b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/__init__.py
new file mode 100644
index 0000000..f81fcae
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/__init__.py
@@ -0,0 +1,5 @@
+from webkit import auth, status, builders, schedulers
+reload(auth)
+reload(status)
+reload(builders)
+reload(schedulers)
diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/auth.py b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/auth.py
new file mode 100644
index 0000000..b182e16
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/auth.py
@@ -0,0 +1,9 @@
+from buildbot.buildslave import BuildSlave
+
+def getSlaveAuthenticationDetails():
+ def createBuildSlave((name, password)):
+ return BuildSlave(name, password, max_builds=1)
+ return map(createBuildSlave, _getSlaveAuthenticationDetails())
+
+def _getSlaveAuthenticationDetails():
+ return [("slave-name", "password")]
diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/basesteps.py b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/basesteps.py
new file mode 100644
index 0000000..8bba881
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/basesteps.py
@@ -0,0 +1,51 @@
+from buildbot.steps import shell, source
+import os
+
+
+def buildStepWithDefaultTimeout(klass, default_timeout=75*60):
+ class Step(klass):
+ timeout = default_timeout
+ def __init__(self, *args, **kwargs):
+ kwargs['timeout'] = self.timeout
+ klass.__init__(self, *args, **kwargs)
+
+ return Step
+
+
+Test = buildStepWithDefaultTimeout(shell.Test)
+Compile = buildStepWithDefaultTimeout(shell.Compile)
+ShellCommand = buildStepWithDefaultTimeout(shell.ShellCommand)
+SVN = buildStepWithDefaultTimeout(source.SVN)
+
+
+class UploadCommand:
+ def initializeForUpload(self):
+ try:
+ try:
+ umask = os.umask(0)
+ os.makedirs(self.getDestinationPath(), 042770)
+ except OSError, e:
+ if e.errno != 17:
+ raise
+ finally:
+ os.umask(umask)
+
+ def getDestinationPath(self):
+ return "/home/buildresults%s" % (self.getURLPath(), )
+
+ def getRemotePath(self):
+ return "buildresults@build.webkit.org:%s" % (self.getDestinationPath(), )
+
+ def getURLPath(self):
+ return '/results/%s/%s/' % (self.getBuild().builder.name, self.getBuild().getProperty("buildnumber"), )
+
+ def getBuild(self):
+ return self.build
+
+
+ def getText(self, cmd, results):
+ return self.getText2(cmd, results)
+
+ def getText2(self, cmd, results):
+ return ['<a href="%s">%s</a>' % (self.getURLPath(), self.name)]
+
diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/builders.py b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/builders.py
new file mode 100644
index 0000000..a79011c
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/builders.py
@@ -0,0 +1,51 @@
+from webkit.factories import *
+
+allWinBuilders = ['apple-slave-7', 'apple-slave-2'] # pewtermoose-slave-1
+allMacPPCBuilders = ['apple-slave-1', 'apple-slave-3', 'apple-slave-6']
+allMacIntelBuilders = ['bdash-slave-1', 'bdash-slave-2']
+macIntelPixelBuilders = ['apple-slave-8']
+allQtLinuxBuilders = ['webtroll-slave-1']
+allQtWinBuilders = ['qt-slave-2']
+allGtkLinuxBuilders = ['zecke-slave-1']
+allWxMacBuilders = ['kollivier-slave-1']
+
+# apple-slave-4 is currently giving incomprehensible ICEs when compiling:
+# WebKit/History/WebBackForwardList.mm: In function 'WebHistoryItem* -[WebBackForwardList currentItem](WebBackForwardList*, objc_selector*)':
+# WebKit/History/WebBackForwardList.mm:178: internal compiler error: Bus error
+
+# apple-slave-5 is currently giving incomprehensible link errors:
+# WebKitBuild/JavaScriptCore.build/Release/JavaScriptCore.build/Objects-normal/ppc/pcre_tables.o r_address (0x34a10d) field of relocation entry 12 in section (__DWARFA,__debug_info) out of range
+# /usr/bin/libtool: internal link edit command failed
+
+
+_builders = [('trunk-mac-ppc-release', StandardBuildFactory, allMacPPCBuilders, False),
+ ('trunk-mac-intel-release', StandardBuildFactory, allMacIntelBuilders, False),
+# ('trunk-mac-ppc-debug', LeakBuildFactory, allMacPPCBuilders, False),
+ ('trunk-mac-intel-debug', LeakBuildFactory, allMacIntelBuilders, False),
+ ('trunk-mac-intel-pixel', PixelTestBuildFactory, macIntelPixelBuilders, False),
+# ('trunk-win-release', Win32BuildFactory, allWinBuilders, False),
+ ('trunk-win-debug', Win32BuildFactory, allWinBuilders, False),
+ ('trunk-qt-linux-release', QtBuildFactory, allQtLinuxBuilders, False),
+ ('trunk-qt-win-release', QtBuildFactory, allQtWinBuilders, False),
+ ('trunk-gtk-linux-release', GtkBuildFactory, allGtkLinuxBuilders, False),
+ ('trunk-wx-mac-debug', WxBuildFactory, allWxMacBuilders, False),
+
+# ('trunk-mac-intel-coverage', CoverageDataBuildFactory, ['bdash-slave-1'], True),
+# ('trunk-mac-intel-nosvg', NoSVGBuildFactory, ['bdash-slave-2'], True),
+
+# ('stable-mac-ppc-release', StandardBuildFactory, allMacPPCBuilders, False),
+# ('stable-mac-intel-release', StandardBuildFactory, allMacIntelBuilders, False),
+# ('stable-mac-ppc-debug', LeakBuildFactory, allMacPPCBuilders, False),
+# ('stable-mac-intel-debug', LeakBuildFactory, allMacIntelBuilders, False),
+# ('stable-win-release', Win32BuildFactory, allWinBuilders, False),
+ ]
+
+def getBuilders():
+ result = []
+ for name, factory, slaves, periodic in _builders:
+ result.append({'name': name,
+ 'slavenames': slaves,
+ 'builddir': name,
+ 'factory': factory(),
+ 'periodic': periodic})
+ return result
diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/factories.py b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/factories.py
new file mode 100644
index 0000000..59eb9cd
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/factories.py
@@ -0,0 +1,109 @@
+from webkit.steps import *
+from buildbot.process import factory
+
+s = factory.s
+
+class BuildFactory(factory.BuildFactory):
+ useProgress = False
+ def __init__(self):
+ factory.BuildFactory.__init__(self, [s(CheckOutSource)])
+
+class StandardBuildFactory(BuildFactory):
+ def __init__(self):
+ BuildFactory.__init__(self)
+ self.steps.append(s(SetConfiguration, configuration="release"))
+ self.addCompileStep()
+ self.addJavaScriptCoreTestStep()
+ self.addLayoutTestStep()
+ self.steps.append(s(UploadLayoutResults))
+# self.steps.append(s(UploadDiskImage))
+
+ def addCompileStep(self):
+ self.steps.append(s(CompileWebKit, configuration="release"))
+
+ def addJavaScriptCoreTestStep(self):
+ self.steps.append(s(JavaScriptCoreTest))
+
+ def addLayoutTestStep(self):
+ self.steps.append(s(LayoutTest))
+
+
+class NoSVGBuildFactory(StandardBuildFactory):
+ def addCompileStep(self):
+ self.steps.append(s(CompileWebKitNoSVG, configuration="release"))
+
+
+class PixelTestBuildFactory(BuildFactory):
+ def __init__(self):
+ BuildFactory.__init__(self)
+ self.steps.append(s(SetConfiguration, configuration="release"))
+ self.steps.append(s(CompileWebKit, configuration="release"))
+ self.steps.append(s(PixelLayoutTest))
+ self.steps.append(s(UploadLayoutResults))
+
+
+class LeakBuildFactory(BuildFactory):
+ def __init__(self):
+ BuildFactory.__init__(self)
+ self.steps.append(s(SetConfiguration, configuration="debug"))
+ self.steps.append(s(CompileWebKit, configuration="debug"))
+ self.steps.append(s(JavaScriptCoreTest))
+ self.steps.append(s(LeakTest))
+ self.steps.append(s(UploadLayoutResults))
+# self.steps.append(s(UploadDiskImage))
+
+
+class PageLoadTestBuildFactory(BuildFactory):
+ def __init__(self):
+ BuildFactory.__init__(self)
+ self.steps.append(s(CompileWebKit, configuration="release"))
+ self.steps.append(s(PageLoadTest))
+
+
+class Win32BuildFactory(StandardBuildFactory):
+ def addCompileStep(self):
+ self.steps.append(s(InstallWin32Dependencies))
+ self.steps.append(s(SetConfiguration, configuration="debug"))
+ self.steps.append(s(CompileWebKitWindows, configuration="debug"))
+
+ def addLayoutTestStep(self):
+ self.steps.append(s(LayoutTestWindows))
+
+class GtkBuildFactory(StandardBuildFactory):
+ def addCompileStep(self):
+# self.steps.append(s(CleanWebKitGtk, configuration="release"))
+ self.steps.append(s(CompileWebKitGtk, configuration="release"))
+
+ def addJavaScriptCoreTestStep(self):
+ self.steps.append(s(JavaScriptCoreTestGtk))
+
+ def addLayoutTestStep(self):
+ pass
+
+
+class WxBuildFactory(StandardBuildFactory):
+ def addCompileStep(self):
+ self.steps.append(s(CleanWebKitWx, configuration="release"))
+ self.steps.append(s(CompileWebKitWx, configuration="release"))
+
+ def addJavaScriptCoreTestStep(self):
+ self.steps.append(s(JavaScriptCoreTestWx))
+
+ def addLayoutTestStep(self):
+ pass
+
+
+class QtBuildFactory(StandardBuildFactory):
+ def addCompileStep(self):
+ self.steps.append(s(CleanWebKit, configuration="release"))
+ self.steps.append(s(CompileWebKit, configuration="release"))
+
+ def addLayoutTestStep(self):
+ pass # self.steps.append(s(LayoutTestQt))
+
+
+class CoverageDataBuildFactory(BuildFactory):
+ def __init__(self):
+ BuildFactory.__init__(self)
+ self.steps.append(s(GenerateCoverageData))
+ self.steps.append(s(UploadCoverageData))
diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/schedulers.py b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/schedulers.py
new file mode 100644
index 0000000..4bece4f
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/schedulers.py
@@ -0,0 +1,16 @@
+from buildbot.scheduler import AnyBranchScheduler, Periodic
+
+def getSchedulers(builders):
+ builders = map(lambda builder: (builder['name'], builder['periodic']), builders)
+ trunkBuilders = [name for name, periodic in builders if name.startswith('trunk-') and not periodic]
+ trunkBuilders.sort()
+ stableBuilders = [name for name, periodic in builders if name.startswith('stable-') and not periodic]
+ stableBuilders.sort()
+ periodicBuilders = [name for name, periodic in builders if periodic]
+ periodicBuilders.sort()
+
+ trunk = AnyBranchScheduler(name="trunk", branches=['trunk'], treeStableTimer=90, builderNames=trunkBuilders)
+# stable = AnyBranchScheduler(name="stable", branches=['branches/Safari-3-1-branch'], treeStableTimer=90, builderNames=stableBuilders)
+ periodic = Periodic("periodic", periodicBuilders, 6 * 60 * 60)
+
+ return [trunk, periodic]
diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/status.py b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/status.py
new file mode 100644
index 0000000..a7228ef
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/status.py
@@ -0,0 +1,19 @@
+from buildbot.status import html, mail, words
+
+web = html.WebStatus(http_port=8010)
+
+allBuildsEmail = mail.MailNotifier(fromaddr="buildbot@webkit.org",
+ extraRecipients=["mark+webkit-builds@bdash.net.nz"],
+ sendToInterestedUsers=False)
+breakageEmail = mail.MailNotifier(fromaddr="buildbot@webkit.org",
+ lookup=mail.Domain("webkit.org"),
+ mode="failing")
+
+IRC = words.IRC(host="irc.freenode.net",
+ nick="webkit-build",
+ channels=["#webkit-build"],
+# announceAllBuilds=True
+ )
+
+def getStatusListeners():
+ return [web, allBuildsEmail, IRC]
diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/steps.py b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/steps.py
new file mode 100644
index 0000000..e518c2c
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/steps.py
@@ -0,0 +1,262 @@
+from webkit.basesteps import ShellCommand, SVN, Test, Compile, UploadCommand
+from buildbot.status.builder import SUCCESS, FAILURE, WARNINGS
+
+class CheckOutSource(SVN):
+ baseURL = "http://svn.webkit.org/repository/webkit/"
+ mode = "update"
+ def __init__(self, *args, **kwargs):
+ SVN.__init__(self, baseURL=self.baseURL, defaultBranch="trunk", mode=self.mode, *args, **kwargs)
+
+class SetConfiguration(ShellCommand):
+ command = ["perl", "./WebKitTools/Scripts/set-webkit-configuration"]
+
+ def __init__(self, *args, **kwargs):
+ configuration = kwargs.pop('configuration')
+ self.command = self.command + ['--' + configuration]
+ self.name = "set-configuration-%s" % (configuration, )
+ self.description = ["set configuration %s" % (configuration, )]
+ self.descriptionDone = ["set configuration %s" % (configuration, )]
+ ShellCommand.__init__(self, *args, **kwargs)
+
+
+class LayoutTest(Test):
+ name = "layout-test"
+ description = ["layout-tests running"]
+ descriptionDone = ["layout-tests"]
+ command = ["perl", "./WebKitTools/Scripts/run-webkit-tests", "--no-launch-safari", "--no-new-test-results", "--no-sample-on-timeout", "--results-directory", "layout-test-results"]
+
+ def commandComplete(self, cmd):
+ Test.commandComplete(self, cmd)
+
+ logText = cmd.logs['stdio'].getText()
+ incorrectLayoutLines = [line for line in logText.splitlines() if line.find('had incorrect layout') >= 0 or (line.find('test case') >= 0 and (line.find(' crashed') >= 0 or line.find(' timed out') >= 0))]
+ self.incorrectLayoutLines = incorrectLayoutLines
+
+ def evaluateCommand(self, cmd):
+ if self.incorrectLayoutLines or cmd.rc != 0:
+ return FAILURE
+
+ return SUCCESS
+
+ def getText(self, cmd, results):
+ return self.getText2(cmd, results)
+
+ def getText2(self, cmd, results):
+ if results != SUCCESS and self.incorrectLayoutLines:
+ return self.incorrectLayoutLines
+
+ return [self.name]
+
+
+class JavaScriptCoreTest(Test):
+ name = "jscore-test"
+ description = ["jscore-tests running"]
+ descriptionDone = ["jscore-tests"]
+ command = ["perl", "./WebKitTools/Scripts/run-javascriptcore-tests"]
+ logfiles = {'results': 'JavaScriptCore/tests/mozilla/actual.html'}
+
+ def commandComplete(self, cmd):
+ Test.commandComplete(self, cmd)
+
+ logText = cmd.logs['stdio'].getText()
+ statusLines = [line for line in logText.splitlines() if line.find('regression') >= 0 and line.find(' found.') >= 0]
+ if statusLines and statusLines[0].split()[0] != '0':
+ self.regressionLine = statusLines[0]
+ else:
+ self.regressionLine = None
+
+ def evaluateCommand(self, cmd):
+ if self.regressionLine:
+ return FAILURE
+
+ if cmd.rc != 0:
+ return FAILURE
+
+ return SUCCESS
+
+ def getText(self, cmd, results):
+ return self.getText2(cmd, results)
+
+ def getText2(self, cmd, results):
+ if results != SUCCESS and self.regressionLine:
+ return [self.name, self.regressionLine]
+
+ return [self.name]
+
+class PixelLayoutTest(LayoutTest):
+ name = "pixel-layout-test"
+ description = ["pixel-layout-tests running"]
+ descriptionDone = ["pixel-layout-tests"]
+ command = LayoutTest.command + ["--pixel", "--tolerance", "0.1"]
+
+
+class LeakTest(LayoutTest):
+ command = ["perl", "./WebKitTools/Scripts/run-webkit-tests", "--no-launch-safari", "--no-sample-on-timeout", "--leaks", "--results-directory", "layout-test-results"]
+
+ def commandComplete(self, cmd):
+ LayoutTest.commandComplete(self, cmd)
+
+ logText = cmd.logs['stdio'].getText()
+ lines = logText.splitlines()
+ leakLines = [line for line in lines if line.find('total leaks found!') >= 0]
+ leakLines += [line for line in lines if line.find('LEAK: ') >= 0]
+ leakLines = [' '.join(x.split()[1:]) for x in leakLines]
+
+ leakSummary = {}
+ for line in leakLines:
+ count, key = line.split(' ', 1)
+ if key.find('total leaks found!') >= 0:
+ key = 'allocations found by "leaks" tool'
+
+ leakSummary[key] = leakSummary.get(key, 0) + int(count)
+
+ leakSummaryLines = []
+ for key in sorted(leakSummary.keys()):
+ leakSummaryLines.append('%s %s' % (leakSummary[key], key))
+
+ self.incorrectLayoutLines += leakSummaryLines
+
+
+class UploadLayoutResults(UploadCommand, ShellCommand):
+ name = "upload-results"
+ description = ["uploading results"]
+ descriptionDone = ["uploaded-results"]
+ command = "echo Disabled for now"
+
+ def __init__(self, *args, **kwargs):
+ ShellCommand.__init__(self, *args, **kwargs)
+
+ def setBuild(self, build):
+ ShellCommand.setBuild(self, build)
+ self.initializeForUpload()
+
+ self.command = '''
+ if [[ -d layout-test-results ]]; then \
+ find layout-test-results -type d -print0 | xargs -0 chmod ug+rx; \
+ find layout-test-results -type f -print0 | xargs -0 chmod ug+r; \
+ rsync -rlvzP --rsync-path=/home/buildresults/bin/rsync layout-test-results/ %s && rm -rf layout-test-results; \
+ fi; \
+ CRASH_LOG=~/Library/Logs/CrashReporter/DumpRenderTree*.crash*; \
+ if [[ -f $(ls -1 $CRASH_LOG | head -n 1 ) ]]; then \
+ chmod ug+r $CRASH_LOG; \
+ rsync -rlvzP --rsync-path=/home/buildresults/bin/rsync $CRASH_LOG %s && rm -rf $CRASH_LOG; \
+ fi; ''' % (self.getRemotePath(), self.getRemotePath())
+
+ self.addFactoryArguments(command=self.command)
+
+
+class CompileWebKit(Compile):
+ command = ["perl", "./WebKitTools/Scripts/build-webkit"]
+ env = {'WEBKITSUPPORTLIBRARIESZIPDIR': 'C:\\cygwin\\home\\buildbot', 'MFLAGS':''}
+ def __init__(self, *args, **kwargs):
+ configuration = kwargs.pop('configuration')
+
+ self.name = "compile-" + configuration
+ self.description = ["compiling " + configuration]
+ self.descriptionDone = ["compiled " + configuration]
+
+ Compile.__init__(self, env=self.env, *args, **kwargs)
+
+class CleanWebKit(CompileWebKit):
+ command = CompileWebKit.command + ['--clean']
+ description = ['cleaning']
+ descriptionDone = ['cleaned']
+
+class CompileWebKitNoSVG(CompileWebKit):
+ command = 'rm -rf WebKitBuild && perl ./WebKitTools/Scripts/build-webkit --no-svg'
+
+class CompileWebKitGtk(CompileWebKit):
+ command = ['perl', './WebKitTools/Scripts/build-webkit', '--gtk', '--qmake=qmake-qt4']
+
+class CleanWebKitGtk(CompileWebKitGtk):
+ command = CompileWebKitGtk.command + ['--clean']
+ description = ['cleaning']
+ descriptionDone = ['cleaned']
+
+class CompileWebKitWx(CompileWebKit):
+ command = ['perl', './WebKitTools/Scripts/build-webkit', '--wx']
+
+class CleanWebKitWx(CompileWebKitWx):
+ command = CompileWebKitWx.command + ['--clean']
+ description = ['cleaning']
+ descriptionDone = ['cleaned']
+
+class CompileWebKitWindows(UploadCommand, CompileWebKit):
+ def setBuild(self, build):
+ CompileWebKit.setBuild(self, build)
+ self.initializeForUpload()
+
+ self.command = '''\
+ ./WebKitTools/Scripts/build-webkit; \
+ RESULT=$?
+ for log in $(find WebKitBuild/*/*/*/*.htm); do \
+ chmod ug+r $log; \
+ REMOTE_NAME=$(echo $log | sed -e 's|WebKitBuild/obj/||' -e 's|/Release/|-|' -e 's|/Debug/|-|'); \
+ rsync -rlvzP --rsync-path="/home/buildresults/bin/rsync" $log %s/$REMOTE_NAME && rm $log; \
+ done; \
+ exit $RESULT;''' % (self.getRemotePath(), )
+
+ self.addFactoryArguments(command=self.command)
+
+class LayoutTestWindows(LayoutTest):
+ env = {'WEBKIT_TESTFONTS': 'C:\\cygwin\\home\\buildbot\\WebKitTestFonts'}
+
+ def __init__(self, *args, **kwargs):
+ return LayoutTest.__init__(self, env=self.env, *args, **kwargs)
+
+
+class JavaScriptCoreTestGtk(JavaScriptCoreTest):
+ command = JavaScriptCoreTest.command + ['--gtk']
+
+class JavaScriptCoreTestWx(JavaScriptCoreTest):
+ command = JavaScriptCoreTest.command + ['--wx']
+
+class LayoutTestQt(LayoutTest):
+ command = LayoutTest.command + ['--qt']
+
+class InstallWin32Dependencies(ShellCommand):
+ description = ["installing Windows dependencies"]
+ descriptionDone = ["installed Windows dependencies"]
+ command = ["perl", "./WebKitTools/Scripts/update-webkit-auxiliary-libs"]
+
+
+# class UploadDiskImage(UploadCommand, ShellCommand):
+# description = ["uploading disk image"]
+# descriptionDone = ["uploaded disk image"]
+# name = "upload-disk-image"
+
+# def __init__(self, *args, **kwargs):
+# UploadCommand.__init__(self, *args, **kwargs)
+# self.command = 'umask 002 && ./WebKitTools/BuildSlaveSupport/build-launcher-app && ./WebKitTools/BuildSlaveSupport/build-launcher-dmg --upload-to-host %s' % (self.getRemotePath(), )
+# ShellCommand.__init__(self, *args, **kwargs)
+
+class GenerateCoverageData(Compile):
+ command = ["perl", "./WebKitTools/Scripts/generate-coverage-data"]
+ description = ["generating coverage data"]
+ descriptionDone = ["generated coverage data"]
+
+
+class UploadCoverageData(UploadCommand, ShellCommand):
+ name = "upload-coverage-data"
+ description = ["uploading coverage data"]
+ descriptionDone = ["uploaded-coverage-data"]
+ command = "echo Disabled for now"
+
+ def __init__(self, *args, **kwargs):
+ ShellCommand.__init__(self, *args, **kwargs)
+
+ def setBuild(self, build):
+ ShellCommand.setBuild(self, build)
+ self.initializeForUpload()
+
+ self.command = '''\
+ if [[ -d WebKitBuild/Coverage/html ]]; then \
+ find WebKitBuild/Coverage/html -type d -print0 | xargs -0 chmod ug+rx; \
+ find WebKitBuild/Coverage/html -type f -print0 | xargs -0 chmod ug+r; \
+ rsync -rlvzP --rsync-path="/home/buildresults/bin/rsync" WebKitBuild/Coverage/html/ %s && rm -rf WebKitBuild/Coverage/html; \
+ fi;''' % (self.getRemotePath(), )
+
+ self.addFactoryArguments(command=self.command)
+
+ def getURLPath(self):
+ return "/results/code-coverage/"
diff --git a/WebKitTools/BuildSlaveSupport/run-performance-tests b/WebKitTools/BuildSlaveSupport/run-performance-tests
new file mode 100755
index 0000000..5d6ea44
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/run-performance-tests
@@ -0,0 +1,80 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2006 Apple Computer, 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Script used by WebKit build slave to kick off performance tests.
+
+use strict;
+
+use FindBin;
+use lib "$FindBin::Bin/../Scripts";
+use webkitdirs;
+
+use Getopt::Long;
+use IO::Socket;
+my $shouldPrebuild = 1;
+
+my $perfMaster = "webkit-build-1.local";
+my $perfSlave = "webkit-build-2.local";
+my $slaveUser = "buildbot";
+my $reportPort = 54481; # Something that looks sorta like SAFARI
+my $slaveDirectory = "/ToTest";
+
+my $buildDirectory = determineConfigurationProductDir();
+
+my $userAndHost = $slaveUser . "@" . $perfSlave;
+my $resultsUploadDestination;
+
+GetOptions('upload-results=s' => \$resultsUploadDestination);
+
+print "Copying built frameworks to PLT slave...\n";
+my @frameworks = ("$buildDirectory/JavaScriptCore.framework", "$buildDirectory/WebCore.framework", "$buildDirectory/WebKit.framework");
+die "Failed to copy to slave\n" unless (system("rsync", "-avz", @frameworks, "$userAndHost:$slaveDirectory") == 0);
+
+print "Opening reponse port for PLT slave...\n";
+my $sock = new IO::Socket::INET(LocalHost => $perfMaster,
+ LocalPort => $reportPort,
+ Proto => 'tcp',
+ Listen => 1,
+ Reuse => 1);
+die "Could not create socket for port $reportPort: $!\n" unless $sock;
+
+print "Starting performance tests on PLT slave...\n";
+die "Failed to start slave!\n" unless (system("ssh", $userAndHost, "autovicki", $slaveDirectory, "--safari", "$slaveDirectory/Safari.app", "--count", 5, "--clean-exit", "--webkit-revision", currentSVNRevision(), "--show-results", "send-completed-results.command") == 0);
+
+print "Waiting for PLT slave to respond...\n";
+my $new_sock = $sock->accept();
+while(<$new_sock>) {
+ print $_;
+}
+close($sock);
+
+if ($resultsUploadDestination) {
+ print "Uploading results to $resultsUploadDestination\n";
+ die "Failed to upload xml results file." unless (system("scp", "$userAndHost:/Results/PerformanceReportSummary.xml", $resultsUploadDestination) == 0);
+ die "Failed to upload svg results file." unless (system("scp", "$userAndHost:/Results/PerformanceGraph.svg", $resultsUploadDestination) == 0);
+}
diff --git a/WebKitTools/CLWrapper/CLWrapper.cpp b/WebKitTools/CLWrapper/CLWrapper.cpp
new file mode 100644
index 0000000..7d41f2b
--- /dev/null
+++ b/WebKitTools/CLWrapper/CLWrapper.cpp
@@ -0,0 +1,52 @@
+// CLWrapper.cpp : Calls the perl script parallelcl to perform parallel compilation
+
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+#include <process.h>
+#include <stdio.h>
+#include <string>
+#include <windows.h>
+
+using namespace std;
+
+int wmain(int argc, wchar_t* argv[])
+{
+ const int numArgs = 3;
+
+#ifndef NDEBUG
+ fwprintf(stderr, L"######### im in ur IDE, compiling ur c0des ########\n");
+#endif
+
+ wstring** args = new wstring*[numArgs];
+
+ args[0] = new wstring(L"sh");
+ args[1] = new wstring(L"-c");
+
+ args[2] = new wstring(L"\"parallelcl");
+ for (int i = 1; i < argc; ++i) {
+ args[2]->append(L" '");
+ args[2]->append(argv[i]);
+ if (i < argc - 1)
+ args[2]->append(L"' ");
+ else
+ args[2]->append(L"'");
+ }
+ args[2]->append(L"\"");
+
+ for (unsigned i = 0; i < args[2]->length(); i++) {
+ if (args[2]->at(i) == '\\')
+ args[2]->at(i) = '/';
+ }
+
+ wchar_t** newArgv = new wchar_t*[numArgs + 1];
+ for (int i = 0; i < numArgs; i++)
+ newArgv[i] = (wchar_t*)args[i]->c_str();
+
+ newArgv[numArgs] = 0;
+
+#ifndef NDEBUG
+ fwprintf(stderr, L"exec(\"%s\", \"%s\", \"%s\", \"%s\")\n", L"sh", newArgv[0], newArgv[1], newArgv[2]);
+#endif
+
+ return _wspawnvp(_P_WAIT, L"sh", newArgv);
+}
+
diff --git a/WebKitTools/CLWrapper/CLWrapper.sln b/WebKitTools/CLWrapper/CLWrapper.sln
new file mode 100644
index 0000000..add0423
--- /dev/null
+++ b/WebKitTools/CLWrapper/CLWrapper.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CLWrapper", "CLWrapper.vcproj", "{230BF635-9BD8-434A-8857-0B096EBC7233}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {230BF635-9BD8-434A-8857-0B096EBC7233}.Debug|Win32.ActiveCfg = Debug|Win32
+ {230BF635-9BD8-434A-8857-0B096EBC7233}.Debug|Win32.Build.0 = Debug|Win32
+ {230BF635-9BD8-434A-8857-0B096EBC7233}.Release|Win32.ActiveCfg = Release|Win32
+ {230BF635-9BD8-434A-8857-0B096EBC7233}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/WebKitTools/CLWrapper/CLWrapper.vcproj b/WebKitTools/CLWrapper/CLWrapper.vcproj
new file mode 100644
index 0000000..668a874
--- /dev/null
+++ b/WebKitTools/CLWrapper/CLWrapper.vcproj
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="CLWrapper"
+ ProjectGUID="{230BF635-9BD8-434A-8857-0B096EBC7233}"
+ RootNamespace="CLWrapper"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="..\vcbin"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\cl.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="..\vcbin"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\cl.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\CLWrapper.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
new file mode 100644
index 0000000..3cd309e
--- /dev/null
+++ b/WebKitTools/ChangeLog
@@ -0,0 +1,23208 @@
+2009-03-26 Darin Adler <darin@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ * Scripts/do-webcore-rename:Update for rename of JSUnprotectedEventListener to
+ JSEventListener.
+
+2009-03-26 Darin Adler <darin@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ * Scripts/do-webcore-rename: Update for rename of JSEventListener to
+ JSProtectedEventListener. This includes all the related renames, but
+ not that one because that one renames the file.
+
+2009-03-26 Adam Roben <aroben@apple.com>
+
+ Reduce run-webkit-tests's time out limit to 15 seconds (or 2.5 minutes
+ under GuardMalloc)
+
+ The previous limit was 60 seconds (or 10 minutes under GuardMalloc).
+ There's no evidence that we need the limit to be this long, and having
+ it be so long just makes timed-out tests take forever to complete.
+ DRT's watchdog timer is 10 seconds, so still has time to fire before
+ run-webkit-tests will cut it off.
+
+ Reviewed by Simon Fraser.
+
+ * Scripts/run-webkit-tests:
+ (sub readFromDumpToolWithTimer): Reduced the limit to 15 seconds (or
+ 2.5 mintues under GuardMalloc).
+
+2009-03-26 Adam Roben <aroben@apple.com>
+
+ Make DRT's watchdog timer actually work on Windows
+
+ We were previously trying to use a CFRunLoopTimer for the watchdog
+ timer on Windows. This doesn't work because we don't use a CFRunLoop
+ on the main thread on Windows.
+
+ This patch changes the watchdog timer on Windows be a normal Windows
+ timer.
+
+ Reviewed by Simon Fraser.
+
+ * DumpRenderTree/DumpRenderTree.h: Moved declaration of
+ waitToDumpWatchdog from here...
+ * DumpRenderTree/mac/DumpRenderTreeMac.h: ...to here.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (invalidateAnyPreviousWaitToDumpWatchdog): Added. This function
+ cancels an existing watchdog timer.
+ (dump): Call invalidateAnyPreviousWaitToDumpWatchdog. This will
+ prevent watchdogs from previous tests firing during subsequent ones.
+ This matches Mac's behavior.
+
+ * DumpRenderTree/win/DumpRenderTreeWin.h: Added a declaration of
+ waitToDumpWatchdog.
+
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (waitUntilDoneWatchdogFired): Converted this to be a Windows
+ TIMERPROC.
+ (LayoutTestController::setWaitToDump): Changed to use SetTimer instead
+ of CFRunLoopAddTimer.
+
+2009-03-25 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Steve Falkenburg.
+
+ Update test result search path for Windows now that it has updated versions of ICU, libxml2, and friends.
+
+ * Scripts/run-webkit-tests:
+
+2009-03-24 Mark Rowe <mrowe@apple.com>
+
+ Fix the Tiger build some more.
+
+ * DumpRenderTree/mac/TextInputController.m:
+
+2009-03-24 Mark Rowe <mrowe@apple.com>
+
+ Fix the Tiger build.
+
+ * DumpRenderTree/mac/TextInputController.m:
+
+2009-03-24 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Jon "The Most Boring Man in the World" Honeycutt.
+
+ Explicitly map NSNotFound to -1 so that the result of-characterIndexForPointX:Y: does
+ not differ between 32- and 64-bit.
+
+ * DumpRenderTree/mac/TextInputController.m:
+ (-[TextInputController characterIndexForPointX:Y:]):
+
+2009-03-24 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Use a different platform search path for tests and skip lists, so that Tiger doesn't end up
+ using the Leopard skip list. Tests and skip lists are now looked for in the directory for
+ the current OS and the generic "mac" directory. Tests and skip lists for newer OS versions are
+ ignored.
+
+ * Scripts/run-webkit-tests:
+
+2009-03-23 Stephanie <slewis@apple.com>
+
+ Fix root build.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+
+2009-03-23 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Add production configuration for creating roots of WebKitTools.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+
+2009-03-23 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Make testapi run as part of the standard JavaScriptCore tests.
+
+ We only run testapi on the mac as currently windows webkit doesn't
+ place all the necessary files for testapi, and we also test the
+ JSC/CF APIs as well.
+
+ * Scripts/run-javascriptcore-tests:
+
+2009-03-21 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Make build-jsc build testapi and minidom in addition to jsc itself.
+
+ * Scripts/build-jsc:
+
+2009-03-20 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Only release the result NPVariant if the call to NPN_Invoke was successful.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
+ (testNPRuntime):
+
+2009-03-19 Gustavo Noronha Silva <gns@gnome.org>
+
+ Reviewed by Mark Rowe.
+
+ Make determinePassedArchitecture always consume the --32-bit
+ option, also in non-AppleMacWebkit platforms. Solution pointed out
+ by Mark Rowe.
+
+ * Scripts/webkitdirs.pm:
+
+2009-03-19 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Work around <rdar://problem/6698023> by activating fonts from disk.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Copy fonts into DumpRenderTree.resources
+ in the built products directory.
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (activateFonts): Activate the fonts from disk.
+
+2009-03-18 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6693300> Don't rely on printf from TestNetscapePlugIn appearing in test results
+
+ Switch from using printf to using the NPAPI to invoke console.log so that plug-in messages appear
+ in test results even when the plug-in's stdout differs from DumpRenderTree's stdout.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp:
+ (log): Invoke console.log via the NPAPI.
+ (NPP_Destroy): Call log instead of printf.
+ (NPP_SetWindow): Ditto.
+ (handleEventCarbon): Ditto.
+ (handleEventCocoa): Ditto.
+ (NPP_HandleEvent): Pass the instance in to the event handler.
+
+2009-03-17 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Use the normal search rules for tests inside the platform directory.
+
+ This allows tests inside the platform directory to have different results
+ on different versions of Mac OS X.
+
+ * Scripts/run-webkit-tests:
+
+2009-03-17 David Kilzer <ddkilzer@apple.com>
+
+ resolve-ChangeLogs should not die on unmerged non-ChangeLog files
+
+ Reviewed by Adam Roben.
+
+ Fixes the following bug in resolve-ChangeLogs:
+
+ Use of uninitialized value in -e at ./WebKitTools/Scripts/resolve-ChangeLogs line 132.
+ Died at ./WebKitTools/Scripts/resolve-ChangeLogs line 164.
+
+ * Scripts/resolve-ChangeLogs:
+ (findUnmergedChangeLogs): Check the result of findChangeLog() to
+ make sure we don't add undef values to the list of files being
+ returned.
+
+2009-03-17 Gustavo Noronha Silva <gns@gnome.org>
+
+ Reviewed by Simon Fraser.
+
+ Fix the usage of the $architecture variable for non-Apple-Mac
+ ports.
+
+ * Scripts/webkitdirs.pm:
+
+2009-03-17 David Kilzer <ddkilzer@apple.com>
+
+ Bug 24645: bisect-builds script doesn't work with Safari 4 Public Beta (version string)
+
+ <https://bugs.webkit.org/show_bug.cgi?id=24645>
+
+ Reviewed by Mark Rowe.
+
+ * Scripts/bisect-builds:
+ (makeNightlyList): Added checks for Safari 4 Public Beta on
+ Tiger and Leopard.
+
+2009-03-17 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler
+
+ https://bugs.webkit.org/show_bug.cgi?id=24396
+
+ Change the terminology from '3D transforms' to '3D rendering'.
+
+ * Scripts/build-webkit:
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm:
+
+2009-03-17 Gustavo Noronha Silva <gns@gnome.org>
+
+ Reviewed by Mark Rowe.
+
+ Enable HTML5 media elements support by default also for the GTK+
+ port.
+
+ * Scripts/build-webkit:
+
+2009-03-17 Kevin Ollivier <kevino@theolliviers.com>
+
+ Reviewed by Mark Rowe.
+
+ Tweak the BUILDING_ON_* defines so that they work with the default values set by
+ AvailabilityMacros.h.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24630
+
+ * DumpRenderTree/mac/DumpRenderTreeMac.h:
+
+2009-03-17 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Make coverage testing more reliable by ensuring --coverage does not
+ clobber configuration settings, and by removing the unnecessary
+ dependency on matplotlib.
+
+ * CodeCoverage/regenerate-coverage-display:
+ * Scripts/webkitdirs.pm:
+
+2009-03-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler and John Sullivan.
+
+ When a plug-in instance is torn down, all plug-in objects will first be invalidated and then deallocated.
+ Since objects can be deallocated in any order, it is not safe to call NPN_ReleaseObject on member variables.
+
+ Instead, just zero out the member variable in invalidate.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
+ (pluginInvalidate):
+ (pluginDeallocate):
+
+2009-03-16 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Sam Weinig.
+
+ REGRESSION: undo-iframe-location-change.html is failing on the buildbots
+ https://bugs.webkit.org/show_bug.cgi?id=24626
+
+ Added a call to [[webview undoManager] removeAllActions]
+ to make sure anything left on the undo stack after one test
+ will not affect any later test.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetWebViewToConsistentStateBeforeTesting):
+
+2009-03-14 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Change the layout test result search policy for Mac OS X to fit better with the idea of
+ newer OS versions improving on previous OS versions.
+
+ The results for the latest version of Mac OS X are placed in the "mac" directory. The
+ results for older versions of Mac OS X are structured as a series of overlays. When
+ running on Leopard, the results in "mac-leopard" are searched before those in "mac".
+ When running on Tiger, the results in "mac-tiger" are searched before those in
+ "mac-leopard" and "mac".
+
+ * Scripts/run-webkit-tests:
+
+2009-03-13 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Dan Bernstein.
+
+ Take advantage of the ability of recent versions of Xcode to easily switch the active
+ architecture.
+
+ * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
+
+2009-03-13 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Remove the --64-bit argument from scripts in favor of them detecting when 64-bit should be preferred.
+
+ The scripts will automatically target 64-bit if the system and hardware support it. This can be
+ overridden by passing --32-bit to individual scripts, or using set-webkit-configuration --32-bit
+ to make the override persistent.
+
+ * Scripts/build-webkit: Remove architecture-related code.
+ * Scripts/gdb-safari: Remove architecture-related code, and clean up how the environment variables are passed to gdb.
+ * Scripts/run-javascriptcore-tests: Remove architecture-related code.
+ * Scripts/run-safari: Ditto.
+ * Scripts/run-webkit-tests: Ditto.
+ * Scripts/set-webkit-configuration: Handle the --32-bit and --64-bit arguments. The --32-bit argument will set the
+ architecture preference to the 32-bit architecture of the machine. The --64-bit argument will remove any architecture
+ override that is in effect so that 64-bit support will be automatically detected.
+ * Scripts/webkitdirs.pm: Add auto-detection of the best architecture for the machine, and the ability to override the
+ auto-detection.
+
+2009-03-13 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/6610666> Revise the Cocoa event model text API
+
+ Add a case statement for NPCocoaEventTextInput.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp:
+ (handleEventCocoa):
+
+2009-03-12 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fix. Let DerivedSources.make know we want database APIs.
+
+ * wx/build-wxwebkit:
+
+2009-03-12 David Kilzer <ddkilzer@apple.com>
+
+ Bug 24378: resolve-ChangeLogs should use git status or svn status to find and fix unmerged ChangeLogs
+
+ <https://bugs.webkit.org/show_bug.cgi?id=24378>
+
+ Reviewed by Adam Roben.
+
+ * Scripts/resolve-ChangeLogs: If -f|--fix-merged is not passed
+ and no file or directory names are specified on the command-line
+ then try to find unmerged ChangeLog files based on 'svn stat' or
+ 'git diff'. Added global $isGit and $isSVN variables so that
+ isGit() and isSVN() only have to be called once.
+ (findUnmergedChangeLogs): Added.
+
+2009-03-11 David Kilzer <ddkilzer@apple.com>
+
+ Clarify comments regarding order of FEATURE_DEFINES
+
+ Rubber-stamped by Mark Rowe.
+
+ * Scripts/build-webkit: Added warning about keeping
+ FEATURE_DEFINES in order and the consequences when they are not.
+
+2009-03-11 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Holger Freyther.
+
+ Gtk] Implement LayoutTestControllerGtk::setPrivateBrowsingEnabled
+ https://bugs.webkit.org/show_bug.cgi?id=24487
+
+ Also reset WebSettings to its default state for JavaScript
+ profiling, Developer Extras and Private Browsing before running
+ the test (can be after each test but we want to be consistent with
+ other ports in this regard)
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (resetWebViewToConsistentStateBeforeTesting):
+ (runTest):
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::setPrivateBrowsingEnabled):
+
+2009-03-11 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Holger Freyther.
+
+ [GTK]DumpRenderTree doesn't compile for non-X11 GTK ports anymore
+ https://bugs.webkit.org/show_bug.cgi?id=2260
+
+ Add plugin support only for X11 builds
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (setDefaultsToConsistentStateValuesForTesting):
+ * GNUmakefile.am:
+
+2009-03-08 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Mark Rowe.
+
+ Implement setJavaScriptProfilingEnabled by enabling the Developer
+ Extras and the JavaScript profiling on the WebKitWebInspector. After
+ this change we pass the three enabled tests in fast/profiler.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (runTest): Reset setJavaScriptProfilingEnabled after each test run
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::setJavaScriptProfilingEnabled):
+
+2009-03-07 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Holger Freyther.
+
+ [Gtk] Enable http history tests
+ https://bugs.webkit.org/show_bug.cgi?id=24394
+
+ Get the index of the current item from the list of (history) items
+ to print before adding the back history items to the list. This
+ will make the 'curr' pointer point to the correct item in the
+ actual results, therefore, passing some of the http/tests/history
+ tests.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (dumpBackForwardListForWebView):
+
+2009-03-06 Adam Treat <adam.treat@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ When building QtWebKit in release mode make sure that QT_SHARED is defined
+ otherwise none of the public API will be exported. This leads to missing
+ symbols and link errors if hidden-visibility is used.
+
+ * Scripts/webkitdirs.pm:
+
+2009-03-06 Adam Roben <aroben@apple.com>
+
+ Change the isCygwin check in update-webkit to isAppleWinWebKit
+
+ This matches a similar check in build-webkit, and is more correct.
+
+ Reviewed by Alexey Proskuryakov.
+
+ * Scripts/update-webkit: Only call update-webkit-auxiliary-libs if
+ isAppleWinWebKit is true.
+
+2009-03-06 Adam Roben <aroben@apple.com>
+
+ Make update-webkit-support-libs fail if WebKitSupportLibrary.zip is
+ present but out of date
+
+ Reviewed by Alexey Proskuryakov.
+
+ * Scripts/update-webkit-support-libs: Changed to use
+ dieAndInstructToDownload when the zip file doesn't exist. Added an MD5
+ check to make sure the file is up-to-date. If it is out of date, print
+ an error message and quit.
+ (sub dieAndInstructToDownload): Added. Prints an error message and
+ quits with an error.
+
+2009-03-03 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by John Sullivan.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22884
+ <rdar://problem/6449783>
+ modified layout test crashes Safari
+
+ Add destroyNullStream test function to the test plug-in.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
+ (destroyNullStream):
+ (pluginInvoke):
+
+2009-03-03 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler
+
+ Support layout test covering <rdar://problem/6616664>
+
+ Change NSURLRequest/IWebURLRequest dumping to include the mainDocumentURL
+
+ * DumpRenderTree/mac/ResourceLoadDelegate.mm:
+ (-[NSURLRequest _drt_descriptionSuitableForTestResult]): Return both the request URL and the
+ mainDocumentURL.
+
+ * DumpRenderTree/win/ResourceLoadDelegate.cpp:
+ (descriptionSuitableForTestResult): Return both the request URL and the mainDocumentURL.
+
+2009-03-02 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Enable Geolocation (except on Tiger and Leopard).
+
+ * Scripts/build-webkit:
+
+2009-03-02 Kevin Ollivier <kevino@theolliviers.com>
+
+ Build fixes for wxWidgets Mac trunk build.
+
+ * wx/build-wxwebkit:
+
+2009-03-02 Timothy Hatcher <timothy@apple.com>
+
+ Allow for multiline quoted text in JavaScript files when looking for function names.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24296
+
+ Reviewed by David Kilzer.
+
+ * Scripts/prepare-ChangeLog:
+
+2009-03-02 Adam Treat <adam.treat@torchmobile.com>
+
+ Reviewed by Eric Seidel.
+
+ Add three new drt helper functions that enable all of the tests in
+ LayoutTests/animation/* and LayoutTests/transitions/* to now pass.
+
+ * DumpRenderTree/qt/jsobjects.cpp:
+ (LayoutTestController::pauseAnimationAtTimeOnElementWithId):
+ (LayoutTestController::pauseTransitionAtTimeOnElementWithId):
+ (LayoutTestController::numberOfActiveAnimations):
+ * DumpRenderTree/qt/jsobjects.h:
+
+2009-03-02 Adam Roben <aroben@apple.com>
+
+ Windows build fix after r41349
+
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ (AccessibilityUIElement::getChildrenWithRange):
+
+2009-03-01 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Bug 24282: AX Palindrome error when asking for a specific index of the AXChildren array
+
+ Change getChildAtIndex() to get a range of children instead of all the children.
+ This exercises code in WebCore that returns elements when asked for from a range.
+
+ * DumpRenderTree/AccessibilityUIElement.h:
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::getChildrenWithRange):
+ (AccessibilityUIElement::getChildAtIndex):
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ (AccessibilityUIElement::getChildrenWithRange):
+
+2009-03-01 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Holger Freyther.
+
+ [Gtk] get the HTTP layout tests going
+ https://bugs.webkit.org/show_bug.cgi?id=24259
+
+ Determine the frame's response and decide whether to dump as text
+ or the render tree
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (dump):
+
+2009-03-01 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Holger Freyther.
+
+ [Gtk] get the HTTP layout tests going
+ https://bugs.webkit.org/show_bug.cgi?id=24259
+
+ Implement dumping of WebKitWebBackForwardList and its history
+ items.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (compareHistoryItems):
+ (dumpHistoryItem):
+ (dumpBackForwardListForWebView):
+ (dump):
+ (runTest):
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::clearBackForwardList):
+ * DumpRenderTree/gtk/WorkQueueItemGtk.cpp:
+ (BackForwardItem::invoke):
+
+2009-02-28 Zan Dobersek <zandobersek@gmail.com>
+
+ Reviewed by Holger Freyther.
+
+ Set the resolution for the default screen to 72.0.
+ This way, setting font sizes results in expected values.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (setDefaultsToConsistentStateValuesForTesting):
+
+2009-02-28 Gustavo Noronha Silva <gns@gnome.org>
+
+ Reviewed by Holger Freyther.
+
+ Adds a WebKitMakeArguments environment variable to enable passing
+ of arguments such as '-j2' to make for the autotools build.
+
+ * Scripts/webkitdirs.pm:
+
+2009-02-28 Gustavo Noronha Silva <gns@gnome.org>
+
+ Reviewed by Holger Freyther.
+
+ Add a GTK+-only option to enable GNOME Keyring when building.
+
+ * Scripts/build-webkit:
+
+2009-02-28 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Holger Freyther.
+
+ [Gtk] webkitdirs.pm modify path in when detecting 3D transforms and accelerated compositing
+ https://bugs.webkit.org/show_bug.cgi?id=24076
+
+ Refactor gtk lib detection and put it in builtDylibPathForName
+
+ * Scripts/webkitdirs.pm:
+
+2009-02-28 Christian Dywan <christian@twotoasts.de>
+
+ Rubber-stamped by Holger Freyther.
+
+ * GtkLauncher/main.c:
+ (activate_uri_entry_cb):
+ (main): Use the new webkit_web_view_load_uri to open URIs.
+
+2009-02-27 Xan Lopez <xan@gnome.org>
+
+ Rubber-stamped by Alexey Proskuryakov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24222
+ [GTK] Remove checks for old glib versions
+
+ libsoup, which is a hard dependency, needs at least glib 2.15.3,
+ so remove all glib checks for versions older than that.
+
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::setWaitToDump):
+
+2009-02-25 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Eric Seidel
+
+ Fix spew about a WebView being deallocated while key value observers are
+ still registered with it by making sure that we always stop observing
+ _isUsingAcceleratedCompositing in -[DumpRenderTreeWindow close].
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dumpRenderTree):
+ * DumpRenderTree/mac/DumpRenderTreeWindow.mm:
+ (-[DumpRenderTreeWindow close]):
+
+2009-02-25 Adam Treat <adam.treat@torchmobile.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Do not queue the calls to 'DumpRenderTree::dump()' as this can result
+ in more than one call as a test that calls 'notifyDone()' can then be
+ subsequently fully loaded and initiate a second dump. Also make sure
+ to stop any existing page load that is happening before running the next
+ test. Combined this serves to produce 217 more passing tests for the
+ Qt port or roughly 5% at this point.
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::open):
+
+2009-02-25 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein
+
+ https://bugs.webkit.org/show_bug.cgi?id=23854
+
+ Have the DumpRenderTreeWindow observe the -_isUsingAcceleratedCompositing
+ property of the WebView, and use that to turn -autodisplay on and off.
+ This is necessary so that accelerated animations start correctly.
+ We can thus remove the -display hack in createBitmapContextFromWebView().
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (createWebViewAndOffscreenWindow):
+ (dumpRenderTree):
+ * DumpRenderTree/mac/DumpRenderTreeWindow.h:
+ * DumpRenderTree/mac/DumpRenderTreeWindow.mm:
+ (-[DumpRenderTreeWindow close]):
+ (-[DumpRenderTreeWindow webView]):
+ (-[DumpRenderTreeWindow startObservingWebView]):
+ (-[DumpRenderTreeWindow stopObservingWebView]):
+ (-[DumpRenderTreeWindow observeValueForKeyPath:ofObject:change:context:]):
+ * DumpRenderTree/mac/PixelDumpSupportMac.mm:
+ (createBitmapContextFromWebView):
+
+2009-02-25 Adam Treat <adam.treat@torchmobile.com>
+
+ Reviewed by Zack Rusin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24158
+ Implement the queue*() methods of the layoutTestController and begin
+ implementing the dump of the back/forward list. This results in 2% more
+ tests passing as well as 23 currently skipped tests now passing.
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::dumpBackForwardList):
+ (WebCore::DumpRenderTree::dump):
+ * DumpRenderTree/qt/DumpRenderTree.h:
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+ * DumpRenderTree/qt/jsobjects.cpp:
+ (findFrameNamed):
+ (LoadItem::invoke):
+ (ReloadItem::invoke):
+ (ScriptItem::invoke):
+ (BackForwardItem::invoke):
+ (LayoutTestController::reset):
+ (LayoutTestController::processWork):
+ (LayoutTestController::maybeDump):
+ (LayoutTestController::queueBackNavigation):
+ (LayoutTestController::queueForwardNavigation):
+ (LayoutTestController::queueLoad):
+ (LayoutTestController::queueReload):
+ (LayoutTestController::queueScript):
+ * DumpRenderTree/qt/jsobjects.h:
+ (LayoutTestController::shouldDumpBackForwardList):
+ (LayoutTestController::dumpBackForwardList):
+
+2009-02-24 Adam Treat <adam.treat@torchmobile.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Don't print out that you are generating new results if you are not in fact
+ generating new results and disable generating new results by default for
+ the all ports other than the canonical Apple Mac port since this can litter
+ the source directory with hundreds of new results since other ports
+ are not as up to date.
+
+ * Scripts/run-webkit-tests:
+
+2009-02-24 Adam Treat <adam.treat@torchmobile.com>
+
+ Reviewed by Cameron Zwarich.
+
+ The Qt port does not support these yet nor does the nm check work with
+ QMake based build.
+
+ * Scripts/webkitdirs.pm:
+
+2009-02-24 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ [Gtk] add options for 3D transforms and HTML5 channel messaging to the build
+ https://bugs.webkit.org/show_bug.cgi?id=24072
+
+ Allow toggling of 3D transforms and HTML5 channel messaging
+ support for the Autotools (Gtk) build.
+
+ Also add '--gtk' in the build-webkit help doc and fix autotools
+ option for web-workers support.
+
+ * Scripts/build-webkit:
+
+2009-02-23 Xan Lopez <xan@gnome.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22624
+ [SOUP][GTK] Need API to get SoupSession from WebKit.
+
+ Add soup flags now that dependency is explicit.
+
+ * GNUmakefile.am:
+
+2009-02-22 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fix assertion failures in editing/pasteboard/paste-RTFD.html and editing/pasteboard/paste-TIFF.html in 64-bit.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (swizzleAllMethods): When adding a new method to a class, use the implementation and type of the new method rather
+ than of an arbitrary existing method on the class.
+
+2009-02-13 Eric Seidel <eric@webkit.org>
+
+ Rubber-stamped by Alexey Proskuryakov.
+
+ Add a few ignores to make-js-test-wrappers.
+
+ * Scripts/make-js-test-wrappers:
+
+2009-02-17 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Prepend file:// to the test result filename to make
+ GtkLauncher display the result page.
+
+ * Scripts/run-webkit-tests:
+
+2009-02-16 Gustavo Noronha Silva <gns@gnome.org>
+
+ Reviewed by Adam Roben
+
+ Actually use the installation prefix defined in WebKitInstallationPrefix,
+ in autotools builds.
+
+ * Scripts/webkitdirs.pm:
+
+2009-02-12 Simon Fraser <simon.fraser@apple.com>
+
+ No review.
+
+ Remove debugging code which was committed by mistake.
+
+ * Scripts/run-webkit-tests:
+
+2009-02-12 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Adam Roben
+
+ https://bugs.webkit.org/show_bug.cgi?id=23928
+
+ Add detection of accelerated compositing and 3d transforms,
+ and add various directories to $ignoredDirectories when these
+ features are off.
+
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm:
+
+2009-02-12 Adam Roben <aroben@apple.com>
+
+ Fix Bug 23922: Warning message from run-webkit-tests when Skipped file
+ contains non-existent tests is confusing and is given for disabled
+ tests
+
+ <https://bugs.webkit.org/show_bug.cgi?id=23922>
+
+ We now no longer warn about disabled tests. The warning now reads:
+
+ Skipped list contained '$item', but no file of that name could be
+ found
+
+ Reviewed by John Sullivan.
+
+ * Scripts/run-webkit-tests:
+ (top level): Pass the list name to processIgnoreTests so it can print
+ out a reasonable warning message.
+ (processIgnoreTests): Take a list name as a second parameter and use
+ it to display a better warning message. Also check for a "-disabled"
+ version of the test before warning about it not existing.
+
+2009-02-11 Adam Roben <aroben@apple.com>
+
+ Windows fix for Bug 22239: Implement missing animation & transition
+ APIs on LayoutTestController for non-mac platforms
+
+ <https://bugs.webkit.org/show_bug.cgi?id=22239>
+
+ Reviewed by Simon Fraser.
+
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::pauseAnimationAtTimeOnElementWithId):
+ (LayoutTestController::pauseTransitionAtTimeOnElementWithId):
+ (LayoutTestController::numberOfActiveAnimations):
+ Implemented these by calling through to IWebFramePrivate.
+
+2009-02-10 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ * Scripts/build-webkit:
+
+ https://bugs.webkit.org/show_bug.cgi?id=23883
+
+ Added support --3d-transforms. Defaults to off
+
+2009-02-11 Adam Roben <aroben@apple.com>
+
+ Fix crashes in http/tests/history/redirect-301.pl and friends on
+ Windows
+
+ Reviewed by Alexey Proskuryakov.
+
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::webHistoryItemCount): Null-check the shared
+ WebHistory instance before dereferencing it.
+
+2009-02-10 Adam Roben <aroben@apple.com>
+
+ Fix Bug 23869: Pixel tests can't be run on Windows
+
+ <https://bugs.webkit.org/show_bug.cgi?id=23869>
+
+ This patch gets the pixel tests limping along on Windows again.
+
+ Reviewed by Dan Bernstein.
+
+ * DumpRenderTree/DumpRenderTree.sln: Changed to use the new
+ Debug_Internal configuration of ImageDiff in the Debug_Internal
+ configuration of this solution.
+
+ * DumpRenderTree/cg/PixelDumpSupportCG.cpp:
+ (printPNG): Changed to call fwrite in a loop, since this call was
+ failing due to the buffer being too large on Windows.
+ (dumpWebViewAsPixelsAndCompareWithExpected): Removed an unnecessary
+ #if PLATFORM(MAC)/#endif.
+
+ * DumpRenderTree/win/ImageDiff.vcproj: Added a Debug_Internal
+ configuration that matches the Debug configuration but also references
+ debug_internal.vsprops.
+
+ * DumpRenderTree/win/PixelDumpSupportWin.cpp:
+ (createBitmapContextFromWebView): Renamed from
+ getBitmapContextFromWebView to match the name used in the
+ cross-platform code.
+
+2009-02-10 Adam Roben <aroben@apple.com>
+
+ Robustify DumpRenderTree/win a little
+
+ DumpRenderTree was previously not holding a ref to the WebViews it
+ created via window.open. It was getting away with this because
+ WebViews get reffed by being preference notification observers and by
+ registering for drag-n-drop messages. Now DRT does hold a ref, in case
+ this situation changes in the future.
+
+ Reviewed by Alexey Proskuryakov.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (dumpBackForwardListForAllWindows): Added a .get().
+ (windowToWebViewMap): Changed to use the WindowToWebViewMap typedef.
+ * DumpRenderTree/win/DumpRenderTreeWin.h: Changed the
+ windowToWebViewMap() to hold a ref to the WebViews it contains.
+
+2009-02-05 Simon Fraser <simon.fraser@apple.com>
+
+ Fix the #include file order, per review comments.
+
+ * DumpRenderTree/mac/PixelDumpSupportMac.mm:
+
+2009-02-05 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein
+
+ https://bugs.webkit.org/show_bug.cgi?id=23362
+
+ If the WebHTMLView uses accelerated compositing, we need for force
+ the on-screen capture path and also force animations to start with -display
+ since the DRT window has autodisplay disabled.
+
+ * DumpRenderTree/mac/PixelDumpSupportMac.mm:
+ (createBitmapContextFromWebView):
+
+2009-02-03 miggilin <mr.diggilin@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ Change the way wxWidgets build gets arguments.
+ Change "checkForArgumentAndRemoveFromARGV" in build-webkit to check if the
+ argument passed matches one in ARGV exactly (allows, ie, --wx-args not to be
+ removed when --wx is checked for).
+
+ https://bugs.webkit.org/show_bug.cgi?id=23701
+
+ * Scripts/build-webkit:
+ * Scripts/webkitdirs.pm:
+
+2009-01-30 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Catch exceptions thrown by AppKit when accessing an attribute than an element
+ doesn't return.
+
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (attributesOfElement):
+
+2009-01-29 David Kilzer <ddkilzer@apple.com>
+
+ Remove semi-colons from the end of ObjC method implementations
+
+ Rubber-stamped by Adam Roben.
+
+ $ find WebKitTools -name \*.m -o -name \*.mm -exec perl -e 'undef $/; $s = <>; while ($s =~ m/[\n\r][-+].*;[\s\r\n]+\{/g) { print "$ARGV: $&\n"; }' {} \;
+
+ * DumpRenderTree/mac/FrameLoadDelegate.mm:
+ (-[FrameLoadDelegate webView:didFailLoadWithError:forFrame:]):
+ (-[FrameLoadDelegate webView:windowScriptObjectAvailable:]):
+ (-[FrameLoadDelegate webView:didFinishDocumentLoadForFrame:]):
+ (-[FrameLoadDelegate webView:didHandleOnloadEventsForFrame:]):
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate webViewFrame:]):
+
+2009-01-28 Geoffrey Garen <ggaren@apple.com>
+
+ Build fix for GTK.
+
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::webHistoryItemCount):
+
+2009-01-28 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Added support for querying how many history items were created during a
+ layout test.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (getWebHistoryItemCountCallback):
+ (LayoutTestController::staticValues):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::webHistoryItemCount):
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::webHistoryItemCount):
+
+2009-01-26 Pierre-Olivier Latour <pol@apple.com>
+
+ Tweaked again earlier fix, this time just to print a warning and not abort if
+ attempting to generate pixel results and Perian is installed.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22615
+
+ * Scripts/run-webkit-tests:
+
+2009-01-26 Christian Dywan <christian@twotoasts.de>
+
+ Rubber stamped by Holger Freyther.
+
+ * GtkLauncher/main.c:
+ (main): Initialize threads, which is required for libSoup.
+
+2009-01-23 David Kilzer <ddkilzer@apple.com>
+
+ * Scripts/do-webcore-rename: Removed 10 header guard renames that
+ had already been fixed, and updated 4 renames whose original values
+ had changed.
+
+2009-01-22 Anders Carlsson <andersca@apple.com>
+
+ Fix Windows build.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h:
+
+2009-01-22 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Clean up the test plug-in code. We now always use the CG drawing model and the
+ Cocoa event model. It is however possible to revert to the old Carbon event model by
+ specifying forcecarbon=true in the embed/object tag.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h:
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp:
+ (NPP_New):
+ (handleEventCarbon):
+ (handleEventCocoa):
+ (NPP_HandleEvent):
+
+2009-01-21 Pierre-Olivier Latour <pol@apple.com>
+
+ Tweaked earlier fix to only print a warning when Perian is installed,
+ and fail completely only if attempting to generate new pixel test results.
+
+ https://bugs.webkit.org/show_bug.cgi?id=23392
+
+ * Scripts/run-webkit-tests:
+
+2009-01-20 Darin Adler <darin@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Bug 23450: string leaks seen in DumpRenderTree accessibility test code
+ https://bugs.webkit.org/show_bug.cgi?id=23450
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (isAttributeSettableCallback): Add the missing JSStringRelease call.
+ (attributeValueCallback): Ditto.
+
+2009-01-20 Pierre-Olivier Latour <pol@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Print warning regarding display color profile change in run-webkit-tests instead of DRT.
+
+ https://bugs.webkit.org/show_bug.cgi?id=23392
+
+ * DumpRenderTree/mac/PixelDumpSupportMac.mm:
+ (setupMainDisplayColorProfile):
+ * Scripts/run-webkit-tests:
+
+2009-01-20 Pierre-Olivier Latour <pol@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Changed run-webkit-tests to abort on the Mac if pixel tests are enabled and Perian is installed,
+ in order to avoid result differences in some media tests.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22615
+
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm:
+
+2009-01-19 Sam Weinig <sam@webkit.org>
+
+ * Scripts/do-webcore-rename: Add JSValuePtr and ProtectedJSValuePtr.
+
+2009-01-16 Gabor Loki <loki@inf.u-szeged.hu>
+
+ Reviewed by Darin Adler.
+
+ * Scripts/webkitdirs.pm: Added '--makeargs' parameter which can pass additional
+ parameters to make command in QMake projects.
+
+2009-01-16 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Add AX methods to retrieve the parent of an element.
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (parentElementCallback):
+ (AccessibilityUIElement::getJSClass):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::parentElement):
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ (AccessibilityUIElement::parentElement):
+
+2009-01-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Set the count to the right number of elements.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.cpp:
+ (testEnumerate):
+
+2009-01-14 David Kilzer <ddkilzer@apple.com>
+
+ BUILD FIX: Use COM API on Windows in LayoutTestController::setIconDatabaseEnabled()
+
+ Rubber-stamped by Alice Liu.
+
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::setIconDatabaseEnabled): Use COM API
+ to get the shared WebIconDatabase.
+
+2009-01-14 Jeremy Moskovich <jeremy@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ <https://bugs.webkit.org/show_bug.cgi?id=16829>
+ Implement NPN_SetException()
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
+ (pluginInvoke):
+ * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.cpp:
+ (initializeIdentifiers):
+ (testHasMethod):
+ (testInvoke):
+
+2009-01-13 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by David Kilzer.
+
+ https://bugs.webkit.org/show_bug.cgi?id=23304
+ Fix svn-apply to match svn-unapply to recognize added files in 'git diff' patches.
+
+ * Scripts/svn-apply: Added a check (similar to svn-unapply) to recognize added files.
+
+2009-01-14 David Kilzer <ddkilzer@apple.com>
+
+ BUILD FIX: Implement LayoutTestController::setIconDatabaseEnabled(bool) for GTK
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (runTest): Added call to reset the icon database to match Mac
+ and Windows ports.
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::setIconDatabaseEnabled): Implemented
+ stub method.
+
+2009-01-14 David Kilzer <ddkilzer@apple.com>
+
+ Bug 22795: favicons should be saved to webarchives
+
+ <https://bugs.webkit.org/show_bug.cgi?id=22795>
+
+ Reviewed by Darin Adler.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (setIconDatabaseEnabledCallback): Added.
+ (setJavaScriptProfilingEnabledCallback): Realphabetized.
+ (LayoutTestController::staticFunctions): Added entry for calling
+ LayoutTestController.setIconDatabaseEnabled(bool) from JavaScript.
+ * DumpRenderTree/LayoutTestController.h:
+ (setIconDatabaseEnabledCallback): Added declaration.
+ (setJavaScriptProfilingEnabledCallback): Realphabetized.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (runTest): Disable the icon database before each test.
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::setIconDatabaseEnabled): Added.
+ (LayoutTestController::setJavaScriptProfilingEnabled): Realphabetized.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (runTest): Disable the icon database before each test.
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::setIconDatabaseEnabled): Added.
+
+2009-01-14 Steve Falkenburg <sfalken@apple.com>
+
+ Update copyright year in version resources.
+
+ Reviewed by Adam Roben.
+
+ * DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.rc:
+
+2009-01-14 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by John Sullivan.
+
+ - update copyright
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/Info.plist:
+ * WebKitLauncher/Info.plist:
+
+2009-01-13 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add NPRuntime test.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
+ (testNPRuntime):
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h:
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp:
+ (NPP_New):
+ (NPP_GetValue):
+
+2009-01-12 Mark Rowe <mrowe@apple.com>
+
+ Use the modern spelling of WebKit.
+
+ * Scripts/find-extra-includes:
+ * Scripts/report-include-statistics:
+ * Scripts/run-webkit-app:
+ * Scripts/svn-unapply:
+ * Scripts/update-webkit:
+
+2009-01-11 Darin Adler <darin@apple.com>
+
+ * Scripts/make-js-test-wrappers: Updated so it won't overwrite tests in the svg/dom
+ directory that aren't using standard wrappers.
+
+2009-01-11 Robert Blaut <webkit@blaut.biz>
+
+ Reviewed by Eric Seidel.
+
+ <https://bugs.webkit.org/show_bug.cgi?id=23134>
+ Update bisect-builds for Safari 3.2 to prevent crashes
+
+ * Scripts/bisect-builds: Added Safari 3.2 and the corresponding minimal revision, r37348.
+
+2009-01-08 Adam Treat <adam.treat@torchmobile.com>
+
+ Reviewed by Simon Hausmann.
+
+ Explicitly set these so that the layout tests do not break.
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::WebPage::WebPage):
+
+2009-01-07 Glenn Wilson <gwilson@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Changed DumpRenderTree to re-enable Javascript in web preferences on every test.
+ This fixes the case when a user mistakenly disables Javascript, and all layout tests crash.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (testStringByEvaluatingJavaScriptFromString):
+ (setDefaultsToConsistentValuesForTesting):
+
+2009-01-07 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Maciej Stachowiak.
+
+ Implement numberOfActiveAnimations to fix the build
+
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::numberOfActiveAnimations):
+
+2009-01-07 Adam Treat <adam.treat@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ Fix unused variable warnings
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::WebPage::javaScriptAlert):
+ (WebCore::WebPage::javaScriptConfirm):
+ (WebCore::WebPage::javaScriptPrompt):
+ * DumpRenderTree/qt/jsobjects.cpp:
+ (LayoutTestController::maybeDump):
+ * DumpRenderTree/qt/main.cpp:
+ (get_backtrace):
+ * DumpRenderTree/qt/testplugin.cpp:
+ (TestPlugin::create):
+
+2009-01-06 Pierre-Olivier Latour <pol@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Added new JS API numberOfActiveAnimations() that returns the number of active CSS transitions & animations.
+ This effectively exposes the new AnimationController::numberOfActiveAnimations() API from WebCore.
+
+ https://bugs.webkit.org/show_bug.cgi?id=23126
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (numberOfActiveAnimationsCallback):
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::numberOfActiveAnimations):
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::numberOfActiveAnimations):
+
+2009-01-04 David Kilzer <ddkilzer@apple.com>
+
+ Don't install internal headers in WebKit framework
+
+ Reviewed by Darin Adler.
+
+ Since WebHTMLRepresentationInternal.h and WebTypesInternal.h are
+ no longer installed in WebKit.framework/PrivateHeaders, use the
+ special relationship of DumpRenderTree within the WebKit source
+ tree to include the internal headers through relative paths.
+ Created the concept of mac/InternalHeaders to hide the ugly
+ paths.
+
+ * DumpRenderTree/mac/Configurations/Base.xcconfig: Added
+ mac/InternalHeaders to HEADER_SEARCH_PATHS.
+ * DumpRenderTree/mac/InternalHeaders/WebKit/WebHTMLRepresentationInternal.h: Added.
+ * DumpRenderTree/mac/InternalHeaders/WebKit/WebTypesInternal.h: Added.
+
+2009-01-02 Adam Treat <treat@kde.org>
+
+ Reviewed by George Staikos.
+
+ Add support for fixedLayoutSize to the qt DRT
+
+ * DumpRenderTree/qt/jsobjects.cpp:
+ (LayoutTestController::setFixedLayoutSize):
+ (LayoutTestController::setUseFixedLayout):
+ * DumpRenderTree/qt/jsobjects.h:
+
+2009-01-03 David D. Kilzer <ddkilzer@webkit.org>
+
+ Bug 23091: Some webarchive http tests intermittently fail due to Connection/Keep-Alive header differences
+
+ <https://bugs.webkit.org/show_bug.cgi?id=23091>
+
+ Reviewed by Darin Adler.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (normalizeHTTPResponseHeaderFields): Remove Keep-Alive and
+ Connection headers from webarchive results.
+
+2008-12-31 Zan Dobersek <zandobersek@gmail.com>
+
+ Reviewed by Holger Freyther.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22812
+
+ Prevent TestNetscapePlugin from installing system-wide.
+
+ * GNUmakefile.am:
+
+2008-12-31 Zan Dobersek <zandobersek@gmail.com>
+
+ Reviewed by Holger Freyther.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22842
+
+ Move WebKitWebView's size allocation into a proper place.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (dump):
+ (runTest):
+
+2008-12-24 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Move the guts of determineCurrentSVNRevision to VCSUtils as svnRevisionForDirectory,
+ and make it work for git too.
+
+ * Scripts/VCSUtils.pm:
+ * Scripts/webkitdirs.pm:
+
+2008-12-22 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ Ignore http/tests/wml, if no WML support is present.
+ Add http/tests/wml to list of HTTP tests, allowed to access local resources.
+
+ * Scripts/run-webkit-tests:
+
+2008-12-19 David Levin <levin@chromium.org>
+
+ Reviewed by Mark Rowe.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22930
+
+ Make the git diff command used for preparing the change log avoid using any external diff tools.
+
+ * Scripts/prepare-ChangeLog:
+
+2008-12-19 Gustavo Noronha Silva <gns@gnome.org>
+
+ Reviewed by Holger Freyther.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22686
+
+ Added files which were missing from the TestNetscapePlugin
+ directory to the SOURCES variable, so that they will be
+ distributed in a make dist.
+
+ * GNUMakefile.am:
+
+2008-12-18 Cameron Zwarich <zwarich@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Add tests for bug 21855: REGRESSION (r37323): Gmail complains about popup blocking when opening a link
+ <https://bugs.webkit.org/show_bug.cgi?id=21855>
+ <rdar://problem/6278244>
+
+ Add support for scheduling asynchronous clicks to DumpRenderTree, but
+ only on the Mac.
+
+ * DumpRenderTree/mac/EventSendingController.h:
+ * DumpRenderTree/mac/EventSendingController.mm:
+ (+[EventSendingController isSelectorExcludedFromWebScript:]): Expose
+ scheduleAsynchronousClick to JavaScript.
+ (-[EventSendingController scheduleAsynchronousClick]): Add.
+
+2008-12-15 Darin Adler <darin@apple.com>
+
+ * Scripts/make-js-test-wrappers: Added another exception to avoid overwriting
+ a custom-written test.
+
+2008-12-15 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Holger Freyther.
+
+ Implement setJavaScriptProfilingEnabled in the Qt DRT to pass fast/profiler.
+
+ * DumpRenderTree/qt/jsobjects.cpp:
+ (LayoutTestController::setJavaScriptProfilingEnabled):
+ * DumpRenderTree/qt/jsobjects.h:
+
+2008-12-13 Zan Dobersek <zandobersek@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22039
+
+ Implement animation and transition pausing.
+
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::pauseAnimationAtTimeOnElementWithId):
+ (LayoutTestController::pauseTransitionAtTimeOnElementWithId):
+
+2008-12-12 Brent Fulgham <bfulgham@gmail.com>
+
+ Reviewed by Adam Roben.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22809
+
+ Increase timeout in call to initWithURL so that people actually see
+ new web pages when they type URLs rather than a blank screen.
+
+ * WinLauncher/WinLauncher.cpp:
+ (loadURL): Increase timeout in initWithURL from 0 to 60 seconds.
+
+2008-12-12 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Add a renaming idea.
+
+2008-12-12 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Hausmann.
+
+ Update the WebKit.qrc and add a script to automatically generate the file.
+
+ With the way rcc and qmake work this can not be done at build time
+ as the WebKit.qrc must sit inside the directory that contains the files
+ and at build time we may not change the content of the source directory.
+
+ * Scripts/generate-qt-inspector-resource: Added.
+
+2008-12-11 Cameron Zwarich <zwarich@apple.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ Roll out r39212 due to assertion failures during layout tests, multiple
+ layout test failures, memory leaks, and obvious incorrectness.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetWebViewToConsistentStateBeforeTesting):
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (resetWebViewToConsistentStateBeforeTesting):
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::pauseTransitionAtTimeOnElementWithId):
+
+2008-12-10 Glenn Wilson <gwilson@google.com>
+
+ Reviewed by Adam Roben.
+
+ Changed LayoutTestController and DumpRenderTree to allow for manual
+ overriding of default preferences at test time. Also added support for
+ resetting the preferences after each test.
+ https://bugs.webkit.org/show_bug.cgi?id=20534
+
+ * DumpRenderTree/LayoutTestController.cpp: Added callback method for overriding preferences
+ * DumpRenderTree/LayoutTestController.h: Added signature for callback
+ * DumpRenderTree/win/DumpRenderTree.cpp: Added calls to reset preferences after each test if necessary
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp: Added JS override function
+ * DumpRenderTree/mac/DumpRenderTree.mm: Added calls to reset preferences after each test if necessary
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm: Added JS override function
+
+2008-12-10 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Implement the new policy delegate (including navigation type and permissive mode) for DRT/win
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ * DumpRenderTree/win/DumpRenderTreeWin.h:
+
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::setCustomPolicyDelegate):
+
+ * DumpRenderTree/win/PolicyDelegate.cpp:
+ (PolicyDelegate::PolicyDelegate):
+ (PolicyDelegate::decidePolicyForNavigationAction):
+ * DumpRenderTree/win/PolicyDelegate.h:
+ (PolicyDelegate::setPermissive):
+
+2008-12-10 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin
+
+ Change the custom policy delegate to actually allow navigation for tests that need it.
+ The new behavior is opt-in and doesn't require any changes in old tests.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (setCustomPolicyDelegateCallback): Allow for a second boolean argument to set the permissive flag on the custom
+ policy delegate, which will be false by default to maintain original behavior.
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::setCustomPolicyDelegate):
+
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::setCustomPolicyDelegate): Partially stubbed out for now.
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::setCustomPolicyDelegate): Still stubbed out, but with new param.
+
+ * DumpRenderTree/mac/PolicyDelegate.h:
+ * DumpRenderTree/mac/PolicyDelegate.mm:
+ (-[PolicyDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]): If the permissive flag
+ is set, allow the navigation.
+ (-[PolicyDelegate setPermissive:]): Change the behavior between "use" and "ignore" - allowing navigation or not.
+
+2008-12-09 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Ada Chan.
+
+ Fix gdb-safari on Tiger.
+
+ gdb on Tiger does not take the -arch flag, so do not pass it.
+
+ * Scripts/gdb-safari:
+
+2008-12-09 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Ignore WML tests, if no WML support available.
+
+ * Scripts/run-webkit-tests:
+
+2008-12-08 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Added a shortcut for --jsDriver-args, which I use a lot.
+
+ * Scripts/run-javascriptcore-tests:
+
+2008-12-08 Stephanie Lewis <slewis@apple.com>
+
+ Fix Tiger build.
+
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+
+2008-12-08 Darin Adler <darin@apple.com>
+
+ Reviewed by John Sullivan.
+
+ - test machinery for https://bugs.webkit.org/show_bug.cgi?id=22409
+ REGRESSION: cmd-shift-left/right don't switch tabs, instead select text
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (isCommandEnabledCallback): Added.
+ (LayoutTestController::staticFunctions): Added "isCommandEnabled".
+ * DumpRenderTree/LayoutTestController.h: Ditto.
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::isCommandEnabled): Ditto.
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (-[CommandValidationTarget initWithAction:]): Added. Used to get the
+ command validation system to tell us if a comment is enabled.
+ (-[CommandValidationTarget action]): Ditto.
+ (-[CommandValidationTarget tag]): Ditto.
+ (LayoutTestController::isCommandEnabled): Ditto.
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::isCommandEnabled): Ditto.
+
+2008-12-08 David Kilzer <ddkilzer@apple.com>
+
+ Bug 22555: Sort "children" sections in Xcode project files
+
+ <https://bugs.webkit.org/show_bug.cgi?id=22555>
+
+ Reviewed by Eric Seidel.
+
+ * DrawTest/DrawTest.xcodeproj/project.pbxproj: Sorted.
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Sorted.
+ * WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj: Sorted.
+
+2008-12-08 David Kilzer <ddkilzer@apple.com>
+
+ Bug 22555: Sort "children" sections in Xcode project files
+
+ <https://bugs.webkit.org/show_bug.cgi?id=22555>
+
+ Reviewed by Timothy Hatcher.
+
+ * Scripts/sort-Xcode-project-file: By popular request, don't sort
+ the mainGroup in the project (the list of items below the top-level
+ project file).
+
+2008-12-05 David Kilzer <ddkilzer@apple.com>
+
+ Bug 22555: Sort "children" sections in Xcode project files
+
+ <https://bugs.webkit.org/show_bug.cgi?id=22555>
+
+ Reviewed by Darin Adler.
+
+ Sort "children" sections alphabetically, moving groups (folders) to
+ the top of each of the lists. Files are assumed to have extensions,
+ so %isFile is used to override this behavior.
+
+ * Scripts/sort-Xcode-project-file:
+ (sortChildrenByFileName): Added.
+ (sortFilesByFileName): Renamed from sortByFileName().
+
+2008-12-05 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Geoff Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22683
+ Fix gtk and qt builds which depend on --qt and --gtk being removed from ARGV
+ Add a new argumentsForConfiguration() function and clean up some old code to use it.
+ Rename checkArgV to checkForArgumentAndRemoveFromARGV to be more self-documenting.
+
+ * Scripts/run-javascriptcore-tests:
+ * Scripts/run-launcher:
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm:
+
+2008-12-03 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by Cameron Zwarich.
+
+ Further preparations for WML layout tests.
+ Ignore WMLTestCase.js, that's going to be in trunk soon.
+
+ * Scripts/make-js-test-wrappers:
+
+2008-12-03 Eric Seidel <eric@webkit.org>
+
+ Build fix for --gtk and --chromium, no review.
+
+ Fix run-javascriptcore-tests to pass --gtk, --qt, --chromium, etc.
+ through to build-jsc.
+
+ * Scripts/build-jsc:
+ * Scripts/webkitdirs.pm:
+
+2008-12-03 Eric Seidel <eric@webkit.org>
+
+ Build fix only, no review.
+
+ Remove support for build-webkit --svg-experimental.
+ All of the "experimental" svg features have their own toggles anyway.
+ I broke --svg-experimental in my last commit (which then broke clean builds)
+ I can't find any use of --svg-experimental in our source tree, so removing it.
+
+ * Scripts/build-webkit:
+
+2008-12-02 Eric Seidel <eric@webkit.org>
+
+ Reviewed by David Hyatt (and Mark Rowe).
+
+ Move --coverage support from build-webkit to webkitdirs.pm to share it with build-jsc
+ Move --coverage support out of run-javascriptcore-tests and into build-jsc
+
+ Finally add a buildXCodeProject function to webkitdirs.pm and move --clean support
+ there from build-webkit (to allow future sharing with other build-* scripts)
+
+ Change run-javascriptcore-tests to expect a --jsDriver-args= argument instead of
+ picking through ARGV with a blacklist of what arguments weren't jsDriver args
+ this makes run-javascriptcore-tests transparently support all arguments which
+ webkitdirs.pm gives it support for.
+
+ Make run-javascriptcore-tests actually print what commands it's running before running them.
+
+ Add --help support to build-jsc and run-javascriptcore-tests!
+
+ Make code to support --svg-experimental defaults take up half as many lines.
+
+ * Scripts/build-jsc:
+ * Scripts/build-webkit:
+ * Scripts/run-javascriptcore-tests:
+ * Scripts/webkitdirs.pm:
+
+2008-12-03 Adam Roben <aroben@apple.com>
+
+ Fix a leak in WinLauncher shutdown
+
+ Reviewed by Sam Weinig.
+
+ * WinLauncher/WinLauncher.cpp:
+ (_tWinMain): Replaced a delete with a Release. We can't delete the
+ WebView properly since we only have a pointer to one of its
+ interfaces. We also shouldn't be deleting COM objects directly anyway,
+ for a number of reasons.
+
+2008-12-03 Adam Roben <aroben@apple.com>
+
+ Fix a crash on exit in WinLauncher
+
+ Reviewed by Sam Weinig.
+
+ * WinLauncher/WinLauncher.cpp:
+ (_tWinMain): Call shutDownWebKit before exiting.
+
+2008-12-03 Adam Roben <aroben@apple.com>
+
+ Add a Debug_Internal configuration to WinLauncher
+
+ This matches our other projects.
+
+ Reviewed by Sam Weinig.
+
+ * WinLauncher/WinLauncher.vcproj: Added a Debug_Internal
+ configuration, which is identical to Debug except that it also
+ references debug_internal.vsprops. Also removed some settings that we
+ should be picking up from the .vsprops files.
+
+2008-12-02 Eric Seidel <eric@webkit.org>
+
+ Reviewed by David Kilzer.
+
+ Hack build-webkit --chromium to use Win32 python instead
+ of using the default cygwin python. Scons + CYGWIN tries
+ to build with GCC by default, we force MSVC in our file
+ but that just results in errors from Scons. Until we can fix
+ this latest round of errors, at least make build-webkit --chromium
+ actually "work" under CYGWIN instead of forcing users to use
+ a cmd shell directly.
+
+ This is working around a Scons bug:
+ http://scons.tigris.org/issues/show_bug.cgi?id=2266
+
+ * Scripts/webkitdirs.pm:
+
+2008-12-01 David Kilzer <ddkilzer@apple.com>
+
+ Bug 22466: REGRESSION (35867): Many resources missing when saving webarchive of webkit.org
+
+ <https://bugs.webkit.org/show_bug.cgi?id=22466>
+ <rdar://problem/6403593>
+
+ Reviewed by Brady Eidson.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (normalizeHTTPResponseHeaderFields): Added. Normalizes Date, Etag,
+ Keep-Alive, Last-Modified and Server header fields to prevent false
+ positive test failures.
+ (convertWebResourceResponseToDictionary): Call
+ normalizeHTTPResponseHeaderFields() to noramlize HTTP response
+ header fields.
+
+2008-12-01 David D. Kilzer <ddkilzer@webkit.org>
+
+ Bug 22559: Report builds left to test in bisect-builds (like git-bisect)
+
+ <https://bugs.webkit.org/show_bug.cgi?id=22559>
+
+ Reviewed by Adam Roben.
+
+ * Scripts/bisect-builds: Updated status message to report the
+ maximum number of builds left to test after the current one.
+ (max): Added.
+
+2008-11-27 Alp Toker <alp@nuanti.com>
+
+ Build GtkLauncher and minidom with the '-ansi' compiler flag to detect
+ API header breakage at build time.
+
+ * GNUmakefile.am:
+
+2008-11-26 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Nikolas Zimmermann and Mark Rowe.
+
+ Add support for build-webkit --chromium
+ https://bugs.webkit.org/show_bug.cgi?id=22515
+ More cleanups changing isCygwin calls to isAppleWinWebKit and deploying isAppleWebKit where necessary.
+
+ * Scripts/build-dumprendertree:
+ * Scripts/build-jsc:
+ * Scripts/build-webkit:
+ * Scripts/gdb-safari:
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm:
+
+2008-11-26 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Add support for build-webkit --chromium (tested on mac)
+ https://bugs.webkit.org/show_bug.cgi?id=22515
+ Also simplified some code using checkArgv
+
+ * Scripts/build-webkit:
+ * Scripts/webkitdirs.pm:
+
+2008-11-26 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ More pre-work for adding a build-webkit --chromium which works on Mac and Windows
+ https://bugs.webkit.org/show_bug.cgi?id=22515
+ Change a few calls to isCygwin to isAppleWinWebKit and a few calls to isAppleMacWebKit to isDarwin
+ in preparation for having a chromium cygwin and chromium mac build
+
+ * Scripts/build-webkit:
+ * Scripts/webkitdirs.pm:
+
+2008-11-26 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Pre-work for getting build-webkit --chromium to work
+ https://bugs.webkit.org/show_bug.cgi?id=22515
+ Rename isOSX to isAppleMacWebKit to match what the code does, and add isChromium()
+
+ * Scripts/build-dumprendertree:
+ * Scripts/build-jsc:
+ * Scripts/build-webkit:
+ * Scripts/gdb-safari:
+ * Scripts/run-javascriptcore-tests:
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm:
+
+2008-11-26 David Kilzer <ddkilzer@apple.com>
+
+ Bug 22488: Make DRT smarter about charset encoding when post-processing webarchive content
+
+ <https://bugs.webkit.org/show_bug.cgi?id=22488>
+
+ Reviewed by Brady Eidson.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (convertWebResourceDataToString): If an IANA charset encoding string
+ is provided, convert it to a CFStringEncoding value and then to an
+ NSStringEncoding value, else fall back to NSUTF8StringEncoding. We
+ also nil-check dataAsString, so the worst-case scenario is that the
+ data won't be decoded to a string (versus crashing DumpRenderTree).
+
+2008-11-26 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Holger Freyther.
+
+ [Gtk] add/remove tests from Skipped and fix netscape plugin test
+ https://bugs.webkit.org/show_bug.cgi?id=22484
+
+ Remove print'ing to stderr
+
+ * DumpRenderTree/gtk/TestNetscapePlugin/TestNetscapePlugin.cpp:
+ (NP_Initialize):
+ (NP_Shutdown):
+
+2008-11-25 Steve Falkenburg <sfalken@apple.com>
+
+ Windows build fix.
+
+ * DumpRenderTree/cg/PixelDumpSupportCG.h:
+
+2008-11-25 Steve Falkenburg <sfalken@apple.com>
+
+ Windows build fix.
+
+ * DumpRenderTree/cg/ImageDiffCG.cpp:
+
+2008-11-24 Darin Fisher <darin@chromium.org>
+
+ Fix bustage.
+
+ https://bugs.webkit.org/show_bug.cgi?id=15643
+
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::setSelectTrailingWhitespaceEnabled):
+
+2008-11-24 Glenn Wilson <gwilson@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ http://bugs.webkit.org/show_bug.cgi?id=15643
+
+ Added support for changing the "trailing whitespace" work-around
+ in LayoutTestController (so layout tests can verify this functionality)
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (setSelectTrailingWhitespaceEnabledCallback):
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::setSelectTrailingWhitespaceEnabled):
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::setSelectTrailingWhitespaceEnabled):
+
+2008-11-24 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler
+
+ https://bugs.webkit.org/show_bug.cgi?id=22433
+
+ Add script that attempts to detect virtual methods
+ whose signatures differ only by constness (which can
+ indicate a programming error).
+
+ * Scripts/detect-mismatched-virtual-const: Added.
+
+2008-11-24 Zan Dobersek <zandobersek@gmail.com>
+
+ Reviewed by Holger Freyther.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22039
+
+ [Gtk+] Implement TestNetscapePlugin for Gtk+ port and add it to the
+ build.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
+ * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.cpp:
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (setDefaultsToConsistentStateValuesForTesting):
+ * DumpRenderTree/gtk/TestNetscapePlugin/ForwardingHeaders/WebKit/npapi.h: Added.
+ * DumpRenderTree/gtk/TestNetscapePlugin/ForwardingHeaders/WebKit/npfunctions.h: Added.
+ * DumpRenderTree/gtk/TestNetscapePlugin/ForwardingHeaders/WebKit/npruntime.h: Added.
+ * GNUmakefile.am:
+
+2008-11-24 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Mark Rowe.
+
+ [Gtk+] Add configure option to enable Web Workers and enable it by default
+
+ Add --enable-workers to the buildsystem (used by build-webkit) add
+ the to be build files to the GNUmakefile.am and change build-webkit
+ to enable Web Workers by default.
+
+ * Scripts/build-webkit:
+
+2008-11-24 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Let gdb-safari accept the --debug and --release options once more.
+
+ * Scripts/gdb-safari:
+
+2008-11-23 Zan Dobersek <zandobersek@gmail.com>
+
+ Reviewed by Holger Freyther. Landed by Jan Alonzo.
+
+ Get SVG tests tested on GTK port.
+
+ * Scripts/webkitdirs.pm:
+
+2008-11-19 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=21810
+ Remove use of static C++ objects that are destroyed at exit time (destructors)
+
+ All static C++ objects that create atexit calls are gone. Update script
+ to indicate how to fix the problem should a new one appear.
+
+ * Scripts/check-for-exit-time-destructors:
+
+2008-11-18 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22337
+ Enable workers by default
+
+ * Scripts/build-webkit: Changed the default to enabled.
+
+2008-11-18 Alexey Proskuryakov <ap@webkit.org>
+
+ Rubber-stamped by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22306
+ Disable channel messaging support
+
+ * Scripts/build-webkit: Add an option to enable channel messaging.
+
+2008-11-17 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ Add --(no-)wml build flags.
+
+ * Scripts/build-webkit:
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm:
+
+2008-11-17 Geoffrey Garen <ggaren@apple.com>
+
+ Not reviewed.
+
+ Try to fix gtk build.
+
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::pauseAnimationAtTimeOnElementWithId):
+ (LayoutTestController::pauseTransitionAtTimeOnElementWithId):
+
+2008-11-17 Pierre-Olivier Latour <pol@apple.com>
+
+ Reviewed by Maciej.
+
+ Pixel tests should use a default tolerance of 0.1% on Leopard and 1.0%
+ on Tiger.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22271
+
+ * Scripts/run-webkit-tests:
+
+2008-11-17 Pierre-Olivier Latour <pol@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Added new JavaScript API on LayoutController to pause a running
+ CSS transition or animation at a given time.
+
+ https://bugs.webkit.org/show_bug.cgi?id=21261
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (pauseAnimationAtTimeOnElementWithIdCallback):
+ (pauseTransitionAtTimeOnElementWithIdCallback):
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::pauseAnimationAtTimeOnElementWithId):
+ (LayoutTestController::pauseTransitionAtTimeOnElementWithId):
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::pauseAnimationAtTimeOnElementWithId):
+ (LayoutTestController::pauseTransitionAtTimeOnElementWithId):
+
+2008-11-17 Gabor Loki <loki@inf.u-szeged.hu>
+
+ Reviewed by Darin Adler.
+
+ <https://bugs.webkit.org/show_bug.cgi?id=22309>
+ Pass the remaining options to build system on Qt-port
+
+ * Scripts/build-webkit:
+ * Scripts/webkitdirs.pm:
+
+2008-11-16 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=21810
+ Remove use of static C++ objects that are destroyed at exit time (destructors)
+
+ Remove .o files from the exclude list that have had their exit-time destructors removed.
+ Handle case when there is no current symbol.
+
+ * Scripts/check-for-exit-time-destructors:
+
+2008-11-16 Sam Weinig <sam@webkit.org>
+
+ * Scripts/do-webcore-rename: Remove now fixed renames.
+
+2008-11-16 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Plan some future renames.
+
+2008-11-15 Darin Adler <darin@apple.com>
+
+ Rubber stamped by Geoff Garen.
+
+ - do the long-planned StructureID -> Structure rename
+
+ * Scripts/check-for-global-initializers: Update name of StructureID.o.
+ * Scripts/do-webcore-rename: Renaming script that I used.
+
+2008-11-15 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=21810
+ Remove use of static C++ objects that are destroyed at exit time (destructors)
+
+ Create DEFINE_STATIC_LOCAL macro. Change static local objects to leak to avoid
+ exit-time destructor. Update code that was changed to fix this issue that ran
+ into a gcc bug (<rdar://problem/6354696> Codegen issue with C++ static reference
+ in gcc build 5465). Also typdefs for template types needed to be added in some
+ cases so the type could make it through the macro successfully.
+
+ Basically code of the form:
+ static T m;
+ becomes:
+ DEFINE_STATIC_LOCAL(T, m, ());
+
+ Also any code of the form:
+ static T& m = *new T;
+ also becomes:
+ DEFINE_STATIC_LOCAL(T, m, ());
+
+ Remove .o files from the exclude list that have had their exit-time destructors removed.
+
+ * Scripts/check-for-exit-time-destructors:
+
+2008-11-14 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx mac buildbot fix. Also, make sure we don't keep hitting this problem.
+
+ * wx/install-unix-extras:
+
+2008-11-14 Alp Toker <alp@nuanti.com>
+
+ GTK DRT build fix for gcc 4.4 snapshot. Add missing stdio include.
+
+ Fixes Debian bug #505723
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=505723
+
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+
+2008-11-14 Krishna <krishnamurty.podipireddy@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Fix hanging DRT with Qt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22209
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::dump):
+ Send empty pixel test data 'block', which is now
+ expected by run-layout-tests.
+
+2008-11-12 Dmitry Titov <dimich@chromium.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22216
+
+ * Scripts/build-webkit:
+ Addes ENABLE_WORKERS to build-webkit so it's possible to build with workers enabled.
+
+2008-11-06 David Kilzer <ddkilzer@apple.com>
+
+ BUILD FIX: Backed out r38189 (and r38203) for Xcode 3.0.
+
+ Apparently older versions of gcc have issues with this patch.
+ Backing out a second time until the issues are resolved.
+
+2008-11-06 David Kilzer <ddkilzer@apple.com>
+
+ BUILD WAS NOT BROKEN: Rolling r38189 back in.
+
+ Please perform a clean build if you see crashes.
+
+2008-11-06 David Kilzer <ddkilzer@apple.com>
+
+ BUILD FIX: Backed out r38189 since it apparently broke the world.
+
+2008-11-06 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Add ability to query an attribute's settable status and the
+ ability to retrieve a single attribute from an AXObject
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (isAttributeSettableCallback):
+ (attributeValueCallback):
+ (AccessibilityUIElement::getJSClass):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (+[NSString stringWithJSStringRef:]):
+ (AccessibilityUIElement::attributeValue):
+ (AccessibilityUIElement::isAttributeSettable):
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ (AccessibilityUIElement::attributeValue):
+ (AccessibilityUIElement::isAttributeSettable):
+
+2008-11-06 Greg Bolsinga <bolsinga@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 21810: Remove use of static C++ objects that are destroyed at exit time (destructors)
+ https://bugs.webkit.org/show_bug.cgi?id=21810
+
+ Remove .o files from the exclude list that have had their exit-time destructors removed.
+
+ * Scripts/check-for-exit-time-destructors:
+
+2008-11-05 Alp Toker <alp@nuanti.com>
+
+ GTK build script tweak.
+
+ Make the path relative since it will appear in all -I compiler flags.
+ Long argument lists cause bizarre slowdowns in libtool and result
+ in huge build logs.
+
+ * Scripts/webkitdirs.pm:
+
+2008-11-05 Anders Carlsson <andersca@apple.com>
+
+ Fix 64-bit build.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (setDefaultsToConsistentValuesForTesting):
+
+2008-11-04 Simon Fraser <simon.fraser@apple.com>
+
+ Add AccessibilityObject.o to the exclude list for the
+ check for global destructors.
+
+ * Scripts/check-for-exit-time-destructors:
+
+2008-11-04 Darin Adler <darin@apple.com>
+
+ * Scripts/check-for-exit-time-destructors: Fix failures seen on the
+ bot, but for some reason not on my computer.
+
+2008-11-03 Darin Adler <darin@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ - https://bugs.webkit.org/show_bug.cgi?id=22061
+ create script to check for exit-time destructors
+
+ * Scripts/check-for-exit-time-destructors: Added.
+ Started as a copy of check-for-global-initializers.
+
+ * Scripts/check-for-global-initializers: Added code to make
+ this script rerun any time it's modified, and also to properly
+ run again after the first time it reports an error.
+
+2008-11-03 Pierre-Olivier Latour <pol@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fixed the override of the "AppleScrollBarVariant" system setting to also work with HIToolbox.
+
+ https://bugs.webkit.org/show_bug.cgi?id=22054
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (setDefaultsToConsistentValuesForTesting):
+
+2008-10-31 Cameron Zwarich <zwarich@apple.com>
+
+ Not reviewed.
+
+ * Scripts/do-webcore-rename:
+
+ Add some renames to contemplate for the future.
+
+2008-10-31 Darin Adler <darin@apple.com>
+
+ Requested by Mark Rowe.
+
+ * Scripts/check-for-global-initializers: s/Web Kit/WebKit/.
+
+2008-10-31 David Kilzer <ddkilzer@apple.com>
+
+ Bug 21997: prepare-ChangeLog should filter out ChangeLog files
+
+ <https://bugs.webkit.org/show_bug.cgi?id=21997>
+
+ Reviewed by Darin Adler.
+
+ * Scripts/prepare-ChangeLog:
+ (generateFileList): Don't add ChangeLog files to %{$functionLists}.
+ This prevents them from showing up in the new ChangeLog entry. They
+ were already excluded from @{$changedFiles}.
+
+2008-10-30 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Jon Homeycutt.
+
+ Explicitly default to building for only the native architecture in debug and release builds.
+
+ * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
+
+2008-10-30 Pierre-Olivier Latour <pol@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fixed 64 bit build failure.
+
+ * DumpRenderTree/mac/PixelDumpSupportMac.mm:
+ (setupMainDisplayColorProfile):
+ (createBitmapContextFromWebView):
+
+2008-10-28 Alp Toker <alp@nuanti.com>
+
+ Fix GTK DRT following build breakage in r37928.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (dump):
+ (runTest):
+ (main):
+
+2008-10-28 Alp Toker <alp@nuanti.com>
+
+ Reviewed by Mark Rowe.
+
+ Fix recently introduced double-free crashes in GTK DRT.
+
+ LayoutTestController was made ref-counted in r36606 and Mac/Win DRT
+ were updated to call ->deref() but GTK DRT was still deleting
+ gLayoutTestController manually. This patch updates GTK to match the
+ other ports and resolves the memory allocation issues.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (runTest):
+
+2008-10-28 Alp Toker <alp@nuanti.com>
+
+ Reviewed by Mark Rowe.
+
+ Fix GTK DRT hang when running the tests.
+
+ Update output from the DRT tool to print an additional '#EOF' to match
+ breaking changes that were made in r37434.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (dump):
+
+2008-10-28 Adele Peterson <adele@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Specify which Localizable.strings to update since we don't always want to update the file in the same
+ directory where we're searching for the strings to localize.
+
+ * Scripts/extract-localizable-strings:
+ * Scripts/update-webkit-localizable-strings:
+
+2008-10-28 Timothy Hatcher <timothy@apple.com>
+
+ Add support for enabling the profiler, so the profiling tests can continue
+ work now that the profiler is not always enabled.
+
+ https://bugs.webkit.org/show_bug.cgi?id=21927
+
+ <rdar://problem/6211578> Make the JavaScript profiler opt-in, so it does
+ not slow down JavaScript all the time
+
+ Reviewed by Darin Adler and Kevin McCullough.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Make the editor use spaces.
+ * DumpRenderTree/LayoutTestController.cpp:
+ (setJavaScriptProfilingEnabledCallback): Added. Calls LayoutTestController::setJavaScriptProfilingEnabled.
+ (LayoutTestController::staticFunctions): Added setJavaScriptProfilingEnabled to the script class.
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::setJavaScriptProfilingEnabled): Stubbed out with a FIXME.
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetWebViewToConsistentStateBeforeTesting): Disables the developer extras and disables the profiler.
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::setJavaScriptProfilingEnabled): Toggles the developer extras and profiler.
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (resetWebViewToConsistentStateBeforeTesting): Disables the developer extras and disables the profiler.
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::setJavaScriptProfilingEnabled): Toggles the developer extras and profiler.
+
+2008-10-28 Pierre-Olivier Latour <pol@apple.com>
+
+ Reviewed by Dan Bernstein
+
+ Primary changes in DumpRenderTree:
+ - Ensure font smoothing is disabled (this is also called LCD anti-aliasing and
+ is different from regular font CG anti-aliasing) as font-smoothing settings
+ depends on the display and can also be changed by the user
+ - Use a new cleared buffer for each test instead of the reusing same one to
+ avoid potential result corruption across tests
+ - Can now receive the expected pixel hash as a suffix to the test path or
+ url as "path'hash"
+ - Make sure hash is computed in a endian-independent way
+ - Improve the code that sets/restores the screen color profile
+ - Make the code more cross-platformy with std::string goodness
+ - Added an "on-screen" mode where the snapshot will take into account surfaces
+ on the window (like OpenGL content): this uses the new CG APIs on 10.5 or
+ reading from the display framebuffer on 10.4. This mode is not active by
+ default for performance reason, but must be explicitly activated from the test
+ file using the new "testOnscreen()" JS API.
+
+ Primary changes in ImageDiff:
+ - Provide a new comparison algorithm that is more tolerant to "acceptable"
+ failures (i.e. very small differences in font rendering, which --threshold is
+ not really good at handling)
+ - Generate normalized intensity-only diff images
+
+ Primary changes in run-webkit-tests:
+ - Take advantage of hashes for pixel tests which makes them much faster by
+ minimizing image comparisons
+ - Removed repaint options as these should be set from within test files using
+ JS API
+ - Replaced "threshold" option in by "tolerance" expressed in percents
+ - Added more logging when in "verbose" mode
+
+ https://bugs.webkit.org/show_bug.cgi?id=21322
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/ForwardingHeaders/wtf/PassRefPtr.h: Copied from JavaScriptGlue/ForwardingHeaders/wtf/PassRefPtr.h.
+ * DumpRenderTree/ForwardingHeaders/wtf/RefPtr.h: Copied from JavaScriptGlue/ForwardingHeaders/wtf/RefPtr.h.
+ * DumpRenderTree/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (testOnscreenCallback):
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ (LayoutTestController::testOnscreen):
+ (LayoutTestController::setTestOnscreen):
+ (LayoutTestController::testPathOrURL):
+ (LayoutTestController::expectedPixelHash):
+ * DumpRenderTree/PixelDumpSupport.h:
+ * DumpRenderTree/cg/ImageDiffCG.cpp:
+ (strtof):
+ (releaseMallocBuffer):
+ (createDifferenceImage):
+ (imageHasAlpha):
+ (main):
+ * DumpRenderTree/cg/PixelDumpSupportCG.cpp:
+ (computeMD5HashStringForBitmapContext):
+ (dumpWebViewAsPixelsAndCompareWithExpected):
+ * DumpRenderTree/cg/PixelDumpSupportCG.h:
+ (BitmapContext::createByAdoptingBitmapAndContext):
+ (BitmapContext::~BitmapContext):
+ (BitmapContext::cgContext):
+ (BitmapContext::BitmapContext):
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (shouldIgnoreWebCoreNodeLeaks):
+ (setDefaultsToConsistentValuesForTesting):
+ (crashHandler):
+ (initializeGlobalsFromCommandLineOptions):
+ (prepareConsistentTestingEnvironment):
+ (dumpRenderTree):
+ (sizeWebViewForCurrentTest):
+ (dump):
+ (runTest):
+ * DumpRenderTree/mac/PixelDumpSupportMac.mm:
+ (restoreMainDisplayColorProfile):
+ (setupMainDisplayColorProfile):
+ (createBitmapContextFromWebView):
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (dump):
+ (runTest):
+ * DumpRenderTree/win/PixelDumpSupportWin.cpp:
+ (getBitmapContextFromWebView):
+ * Scripts/run-webkit-tests:
+
+2008-10-27 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fix on Linux/GTK. Enable support for #include <JavaScriptCore/XYZ.h> style includes.
+
+ * wx/build-wxwebkit:
+
+2008-10-24 Anders Carlsson <andersca@apple.com>
+
+ Try fixing the 64-bit build.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.cpp:
+ (testGetProperty):
+
+2008-10-24 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/5440917> Support NPN_Construct
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
+ (testCallback):
+ Fix a memory leak.
+
+ (testConstruct):
+ New test method that treats it first argument as a constructor and invokes it with the rest of the arguments.
+
+ (pluginInvoke):
+ Handle testConstruct.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.cpp:
+ (testGetProperty):
+ Add objectPointer property.
+
+ (testEnumerate):
+ Only enumerate the two first properties.
+
+ (testConstruct):
+ Add a simple construct implementation that just returns the test object.
+
+2008-10-24 David Kilzer <ddkilzer@apple.com>
+
+ Bug 21850: svn-apply and svn-unapply should preserve patch line endings
+
+ <https://bugs.webkit.org/show_bug.cgi?id=21850>
+
+ Reviewed by Adam Roben.
+
+ * Scripts/svn-apply: Save end-of-line characters when stripping them
+ off each line of a patch so that they may be restored after
+ processing the line.
+ * Scripts/svn-unapply: Ditto.
+
+2008-10-23 David Kilzer <ddkilzer@apple.com>
+
+ Bug 21832: Fix scripts using 'new File::Temp' for Perl 5.10
+
+ <https://bugs.webkit.org/show_bug.cgi?id=21832>
+
+ Reviewed by Sam Weinig.
+
+ * Scripts/bisect-builds: Use imported tempfile() from File::Temp
+ instead of 'new File::Temp' to make the script work with Perl 5.10.
+ * Scripts/sort-Xcode-project-file: Ditto.
+
+2008-10-22 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Adam Roben
+
+ <rdar://6261773> - autocomplete="off" doesn't work on Windows
+
+ Implement LayoutTestController::elementDoesAutoCompleteForElementWithId() on Windows
+
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+
+2008-10-22 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: More renaming plans.
+
+2008-10-21 Steve Falkenburg <sfalken@apple.com>
+
+ Exclude strings marked with UNLOCALIZED_STRING or UNLOCALIZED_LPCTSTR.
+
+ * Scripts/extract-localizable-strings:
+
+2008-10-17 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ - default to 1000 tests per dump tool instance again, now that CTI no longer causes
+ excess different stack logs.
+
+ (Also fix a small bug in my last change.)
+
+ * Scripts/run-webkit-tests:
+
+2008-10-17 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Fix layout tests that use prologues and epilogues.
+
+ * Scripts/run-webkit-tests:
+
+2008-10-17 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ - make sure MallocStackLogging is only on for tools we want to
+ leak check, not other random stuff as well.
+
+ * Scripts/run-webkit-tests:
+
+2008-10-17 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Stephanie Lewis.
+
+ - make run-webkit-tests --leaks default to 100 tests per run instead of 1000
+
+ This should reduce or eliminate crashes on the buildbot due to
+ running out of memory while stack logging.
+
+ * Scripts/run-webkit-tests:
+
+2008-10-16 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Gtk build fix. Not reviewed.
+
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::setSmartInsertDeleteEnabled):
+
+2008-10-15 Glenn Wilson <gwilson@google.com>
+
+ Added new method to allow tests to disable smart editing in the course of a test.
+ This is a possible solution to bug .20655
+
+ Reviewed by Tim Hatcher.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (setSmartInsertDeleteEnabledCallback): new method
+ (LayoutTestController::staticFunctions): added new method to static list of callbacks
+ * DumpRenderTree/LayoutTestController.h: added signature of new method
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetWebViewToConsistentStateBeforeTesting): added state resetting
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::setSmartInsertDeleteEnabled): added new method
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (resetWebViewToConsistentStateBeforeTesting): added state resetting
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::setSmartInsertDeleteEnabled): added new method
+
+2008-10-14 Ada Chan <adachan@apple.com>
+
+ Fix windows build.
+
+ Reviewed by Sam Weinig.
+
+ * DumpRenderTree/cg/PixelDumpSupportCG.cpp:
+ * DumpRenderTree/config.h:
+ * DumpRenderTree/win/DumpRenderTreeWin.h:
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ * DumpRenderTree/win/UIDelegate.cpp:
+
+2008-10-13 Timothy Hatcher <timothy@apple.com>
+
+ Make prepare-ChangeLog populate the changed functions for JavaScript files.
+
+ https://bugs.webkit.org/show_bug.cgi?id=21567
+
+ Reviewed by David Kilzer.
+
+ * Scripts/prepare-ChangeLog:
+ (get_function_line_ranges): Call get_function_line_ranges_for_javascript for
+ files that end with ".js".
+ (get_function_line_ranges_for_javascript): Find functions, anonymous functions
+ and getters/setters.
+
+2008-10-14 Alp Toker <alp@nuanti.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=16299
+ Add a config.h file to DRT
+
+ Add a config.h to DumpRenderTree and reduce use of DumpRenderTree.h as
+ an ad-hoc config header.
+
+ * DumpRenderTree/AccessibilityController.cpp:
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ * DumpRenderTree/AccessibilityUIElement.h:
+ * DumpRenderTree/DumpRenderTree.h:
+ * DumpRenderTree/GCController.cpp:
+ * DumpRenderTree/LayoutTestController.cpp:
+ * DumpRenderTree/WorkQueue.cpp:
+ * DumpRenderTree/config.h: Added.
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ * DumpRenderTree/gtk/GCControllerGtk.cpp:
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ * DumpRenderTree/gtk/WorkQueueItemGtk.cpp:
+ * DumpRenderTree/win/AccessibilityControllerWin.cpp:
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ * DumpRenderTree/win/DumpRenderTreeWin.h:
+ * DumpRenderTree/win/EditingDelegate.cpp:
+ * DumpRenderTree/win/EventSender.cpp:
+ * DumpRenderTree/win/FrameLoadDelegate.cpp:
+ * DumpRenderTree/win/GCControllerWin.cpp:
+ * DumpRenderTree/win/MD5.cpp:
+ * DumpRenderTree/win/PixelDumpSupportWin.cpp:
+ * DumpRenderTree/win/PolicyDelegate.cpp:
+ * DumpRenderTree/win/ResourceLoadDelegate.cpp:
+ * DumpRenderTree/win/WorkQueueItemWin.cpp:
+ * GNUmakefile.am:
+
+2008-10-13 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Added a method to get the links in a webpage
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (attributesOfDocumentLinksCallback):
+ (AccessibilityUIElement::getJSClass):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::getDocumentLinks):
+ (AccessibilityUIElement::attributesOfDocumentLinks):
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ (AccessibilityUIElement::getDocumentLinks):
+ (AccessibilityUIElement::attributesOfDocumentLinks):
+
+2008-10-13 David Kilzer <ddkilzer@apple.com>
+
+ Bug 21457: resolve-ChangeLogs should be able to operate on a git revision range
+
+ <https://bugs.webkit.org/show_bug.cgi?id=21457>
+
+ Reviewed by Adam.
+
+ * Scripts/resolve-ChangeLogs: Added optional parameter to
+ -f|--fix-merged switch to run the script on a revision range.
+ Updated command-line validation checks.
+ (findChangeLog): Fixed long-standing bug that should have used
+ $_[0] instead of $_.
+ (fixMergedChangeLog): Renamed to fixOneMergedChangeLog($). Updated
+ to work when called from git filter-branch. It always restores a
+ copy of the previous revision before reapplying the patch.
+ (fixMergedChangeLogs): Added. Calls itself through git filter-branch
+ to re-merge ChangeLog files across a revision range. Removes
+ .git/refs/original directory on success.
+ (parseFixMerged): Added. Custom method to parse the -f|--fix-merged
+ switch.
+ (removeChangeLogArguments): Added. Removes items from @ARGV when
+ they are ChangeLog paths, and return a list of paths. This makes it
+ easier to validate the command-line.
+ (resolveChangeLog): Added. Extracted from main code block. Runs
+ the traditional single-file merge algorithm.
+ (usageAndExit): Added. Extracted from main code block. Prints
+ usage statement and exits with error status.
+
+2008-10-12 Darin Adler <darin@apple.com>
+
+ * Scripts/make-js-test-wrappers: Update exceptions list so the script
+ won't overwrite files and mangle tests.
+
+2008-10-11 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig and Anders Carlsson.
+
+ - update Mac DumpRenderTree to use the new WebView SPI for forcing the
+ complex text code path
+ - add --complex-text support to Windows DumpRenderTree
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dumpRenderTree):
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (createWebViewAndOffscreenWindow):
+ (main):
+ * Scripts/run-webkit-tests:
+
+2008-10-09 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=21498
+
+ * Scripts/make-js-test-wrappers: ignore resources/shadow-offset.js
+
+2008-10-09 Cameron Zwarich <zwarich@apple.com>
+
+ Not reviewed.
+
+ Add StructureID.o to the exclusion list in the global initializers
+ script to fix the Debug build.
+
+ * Scripts/check-for-global-initializers:
+
+2008-10-08 Mark Rowe <mrowe@apple.com>
+
+ Fix the Windows build after r37434.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (dump): Update code to approximate valid C++ syntax.
+
+2008-10-08 Timothy Hatcher <timothy@apple.com>
+
+ Add SVGElementInstance to the list of exceptions that have
+ global initializers in debug builds.
+
+ Rubber-stamped by Mark Rowe.
+
+ * Scripts/check-for-global-initializers: Add SVGElementInstance.o.
+
+2008-10-08 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein
+
+ Avoid disconnect between DRT and run-webkit-tests
+ about whether to expect PNG dumps by having DRT always
+ print two blocks terminated by #EOF, the second of which
+ may be empty.
+
+ https://bugs.webkit.org/show_bug.cgi?id=21483
+
+ * DumpRenderTree/cg/PixelDumpSupportCG.cpp:
+ (printPNG):
+ (dumpWebViewAsPixelsAndCompareWithExpected):
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dump):
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (dump):
+ * Scripts/run-webkit-tests:
+
+2008-10-07 Adam Roben <aroben@apple.com>
+
+ Make sure short functions get included in ChangeLog output for git
+ repositories
+
+ Reviewed by Dave Kilzer.
+
+ * Scripts/prepare-ChangeLog:
+ (sub diffCommand): Pass -U0 to git diff so that each contiguous change
+ will get its own chunk without any surrounding context.
+ (sub extractLineRange): Use the line numbers from the chunk header
+ without modifying them now that they're accurate.
+
+2008-10-04 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Update check-for-weak-vtables to check only the final linked image for weak vtables.
+ This gives more useful results than checking each object file independently.
+
+ * Scripts/check-for-weak-vtables:
+
+2008-10-03 Pierre-Olivier Latour <pol@apple.com>
+
+ Reviewed by Darin Adler
+
+ Render images to RGBA8 bitmaps independently of platform endianness.
+
+ Create image difference bitmap in reference image colorspace instead of device colorspace
+ (which depends on the main display profile), so that no color matching happens.
+
+ https://bugs.webkit.org/show_bug.cgi?id=21336
+
+ * DumpRenderTree/cg/ImageDiffCG.cpp:
+ (createDifferenceBitmap):
+ (computePercentageDifferent):
+ (compareImages):
+
+2008-10-02 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler
+
+ Fix hang when running with --pixel --reset, which occurs
+ because DRT spews PNG data when the script does not expect it.
+
+ https://bugs.webkit.org/show_bug.cgi?id=21323
+
+ * Scripts/run-webkit-tests:
+
+2008-09-30 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add a leak counter for CachedResources since we've had two recent leaks involving them.
+
+ * Scripts/check-for-global-initializers:
+
+2008-09-30 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Dan Bernstein.
+
+ Fix many leaks seen on fast/backgrounds/svg-as-background-1.html.
+
+ JavaScript wrappers were keeping DOM objects alive, which was leading to the SVG background image
+ being kept alive in the memory cache past our last attempt to empty the cache prior to quitting.
+ We need to empty the memory cache after forcing a JavaScript garbage collection to ensure that
+ any live JavaScript wrappers are collected and their corresponding DOM objects have a chance to be
+ torn down before we exit.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dumpRenderTree):
+ (main):
+
+2008-09-30 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein
+
+ Don't run pixel comparison for text-only tests.
+ https://bugs.webkit.org/show_bug.cgi?id=21124
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dump):
+ * Scripts/run-webkit-tests:
+
+2008-09-29 Thiago Macieira <thiago.macieira@nokia.com>
+
+ Reviewed by Simon.
+
+ Changed copyright from Trolltech ASA to Nokia.
+
+ Nokia acquired Trolltech ASA, assets were transferred on September 26th 2008.
+
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ * DumpRenderTree/qt/jsobjects.cpp:
+ * DumpRenderTree/qt/jsobjects.h:
+ * DumpRenderTree/qt/main.cpp:
+ * DumpRenderTree/qt/testplugin.cpp:
+ * DumpRenderTree/qt/testplugin.h:
+
+2008-09-28 David Kilzer <ddkilzer@apple.com>
+
+ Bug 21185: resolve-ChangeLogs should be able to fix poorly merged ChangeLog entries after a git svn rebase
+
+ <https://bugs.webkit.org/show_bug.cgi?id=21185>
+
+ Reviewed by Adam.
+
+ * Scripts/resolve-ChangeLogs: Added new -f|--fix-merge switch that
+ will attempt to reapply the last commit to a ChangeLog file such
+ that the ChangeLog entry appears at the top of the file.
+ (findChangeLog): Added prototype and moved method below the exit
+ statement.
+ (fixMergedChangeLog): Added. Method to fix incorrectly merged
+ ChangeLog entries.
+
+2008-09-27 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=21178
+ <rdar://problem/6248651>
+
+ Return the result value from getURL.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
+ (getURL):
+
+2008-09-26 Matt Lilek <webkit@mattlilek.com>
+
+ Reviewed by Tim Hatcher.
+
+ Update FEATURE_DEFINES after ENABLE_CROSS_DOCUMENT_MESSAGING was removed.
+
+ * Scripts/build-webkit:
+
+2008-09-26 Alice Liu <alice.liu@apple.com>
+
+ Remove usage of atlstr.h and CString for VCExpress compatibility
+
+ Reviewed by Stephanie Lewis.
+
+ * record-memory-win/main.cpp:
+ (ProcessArgs):
+ (UseImage):
+ (QueryContinuously):
+ (OneQuery):
+ (OneQueryMP):
+
+2008-09-26 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fix. Update the version of libpng.
+
+ * wx/install-unix-extras:
+
+2008-09-24 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=21080
+ <rdar://problem/6243534>
+ Crash below Function.apply when using a runtime array as the argument list
+
+ Add method to ObjCController to return a runtime array.
+
+ * DumpRenderTree/mac/ObjCController.m:
+ (+[ObjCController isSelectorExcludedFromWebScript:]):
+ (+[ObjCController webScriptNameForSelector:]):
+ (-[ObjCController testArray]):
+
+2008-09-24 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Speculative build fix.
+
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ (AccessibilityUIElement::supportsPressAction):
+
+2008-09-23 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ This patch extends DumpRenderTree's AccessibilityController to ask
+ if the focused element supports the press action.
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (getSupportsPressActionCallback):
+ (AccessibilityUIElement::getJSClass):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::supportsPressAction):
+
+2008-09-22 Alice Liu <alice.liu@apple.com>
+
+ Adding a stand-alone Windows console application to record a process's memory usage
+
+ Reviewed by Steve Falkenburg.
+
+ * record-memory-win: Added.
+ * record-memory-win/main.cpp: Added.
+ * record-memory-win/record-memory-win.vcproj: Added.
+
+2008-09-22 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Support ability to get/set selected text ranges for text controls through AX.
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (setSelectedTextRangeCallback):
+ (getSelectedTextRangeCallback):
+ (AccessibilityUIElement::getJSClass):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::attributesOfRowHeaders):
+ (AccessibilityUIElement::attributesOfVisibleCells):
+ (AccessibilityUIElement::rowIndexRange):
+ (AccessibilityUIElement::columnIndexRange):
+ (AccessibilityUIElement::cellForColumnAndRow):
+ (AccessibilityUIElement::selectedTextRange):
+ (AccessibilityUIElement::setSelectedTextRange):
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ (AccessibilityUIElement::selectedTextRange):
+ (AccessibilityUIElement::setSelectedTextRange):
+
+2008-09-20 Darin Adler <darin@apple.com>
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (convertMIMEType): Turn on Stephanie's workaround for Tiger too.
+
+2008-09-19 Alp Toker <alp@nuanti.com>
+
+ Build fix for the 'gold' linker and recent binutils. New behaviour
+ requires that we link to used libraries explicitly.
+
+ * GNUmakefile.am:
+
+2008-09-19 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Implement a workaround for an incorrect mime-type on machines with
+ Dashcode 2.0.1. Dashcode is overriding the UTI type for .js files.
+ See radar <rdar://problem/6234318>.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (convertMIMEType):
+
+2008-09-19 Chris Fleizach <cfleizach@apple.com>
+
+ Fixed Windows bustage
+
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ (AccessibilityUIElement::titleUIElement):
+
+2008-09-18 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Expose titleUIElement call for DumpRenderTree
+
+ * ChangeLog:
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (titleUIElementCallback):
+ (AccessibilityUIElement::getJSClass):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::titleUIElement):
+
+2008-09-18 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: More renaming plans.
+
+2008-09-18 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Clear the main frame's name between tests to get more consistent test results
+ when running the WebKit tests with --nthly.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetWebViewToConsistentStateBeforeTesting):
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (resetWebViewToConsistentStateBeforeTesting):
+
+2008-09-18 Stephanie Lewis <slewis@apple.com>
+
+ Really fix tiger jsc tests.
+
+ * Scripts/run-javascriptcore-tests:
+
+2008-09-18 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Fix jsc tests on Tiger. Make jsc tests smarter about when to use the arch flag.
+
+ * Scripts/run-javascriptcore-tests:
+ * Scripts/webkitdirs.pm:
+
+2008-09-18 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Sam Weinig.
+
+ Print warning to stdout rather than stderr when a test attempts to access a remote resource.
+ This should make it more obvious when a test does this, as stderr output tends to be obscured
+ by noise in the test results.
+
+ Also fixes some coding style issues in ResourceLoadDelegate.mm.
+
+ * DumpRenderTree/mac/ResourceLoadDelegate.mm:
+ (-[NSError _drt_descriptionSuitableForTestResult]):
+ (-[NSURL _drt_descriptionSuitableForTestResult]):
+ (-[ResourceLoadDelegate webView:identifierForInitialRequest:fromDataSource:]):
+ (-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]):
+ (-[ResourceLoadDelegate webView:resource:didReceiveResponse:fromDataSource:]):
+ (-[ResourceLoadDelegate webView:resource:didFinishLoadingFromDataSource:]):
+ (-[ResourceLoadDelegate webView:resource:didFailLoadingWithError:fromDataSource:]):
+ (-[ResourceLoadDelegate webView:resource:willCacheResponse:fromDataSource:]):
+
+2008-09-18 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Mark Rowe and Maciej Stachowiak..
+
+ add a --64-bit option and specify which architecture to run on Mac.
+
+ * Scripts/run-javascriptcore-tests:
+
+2008-09-17 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fix a crash seen running DumpRenderTree on fast/dom/null-document-window-open-crash.html under guard malloc.
+
+ The JS wrapper for LayoutTestController could outlive the wrapped instance, and would crash when
+ attempting to access the wrapped instance within layoutTestControllerObjectFinalize. We fix this by making
+ LayoutTestController ref-counted to ensure that it is not outlived by the JS wrapper.
+
+ * DumpRenderTree/ForwardingHeaders/wtf/RefCounted.h: Copied from JavaScriptGlue/ForwardingHeaders/wtf/RefCounted.h.
+ * DumpRenderTree/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (notifyDoneCallback): Remove code that is no longer needed now that we must always have a wrapped instance.
+ (layoutTestControllerObjectFinalize): Deref the wrapped object.
+ (LayoutTestController::makeWindowObject): Ref the wrapped object.
+ * DumpRenderTree/LayoutTestController.h: Make LayoutTestController RefCounted.
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (runTest): Deref the LayoutTestController object rather than explicitly deleting it.
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm: Remove code that is no longer needed.
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (runTest): Deref the LayoutTestController object rather than explicitly deleting it.
+
+2008-09-16 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Add flag to disable running sample on tests that timeout.
+
+ * Scripts/run-webkit-tests:
+
+2008-09-16 Adam Roben <aroben@apple.com>
+
+ Windows build fix after r36511
+
+ Update for rename of layoutTestController to gLayoutTestController.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ * DumpRenderTree/win/EditingDelegate.cpp:
+ * DumpRenderTree/win/FrameLoadDelegate.cpp:
+ * DumpRenderTree/win/ResourceLoadDelegate.cpp:
+ * DumpRenderTree/win/UIDelegate.cpp:
+
+2008-09-16 Adam Roben <aroben@apple.com>
+
+ Add a script to print out the dependency tree of a Visual Studio
+ solution file
+
+ * Scripts/print-msvc-project-dependencies: Added.
+
+2008-09-16 Mark Rowe <mrowe@apple.com>
+
+ Fix the build.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (notifyDoneCallback): Call fprintf in a safer manner.
+
+2008-09-16 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Eric Seidel
+
+ Protect against tests that call layoutTestController.notifyDone()
+ more than once, which would lead to memory corruption, by nulling
+ out the LayoutTestController on the JSObjectRef on destruction. Also
+ add a finalize callback on the class so that if the LTC outlives
+ the JSObjectRef, the JSObjectRef backpointer on the LTC can be
+ nulled out.
+
+ https://bugs.webkit.org/show_bug.cgi?id=20875
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (notifyDoneCallback):
+ (layoutTestControllerObjectFinalize):
+ (LayoutTestController::makeWindowObject):
+ (LayoutTestController::getJSClass):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::~LayoutTestController):
+
+2008-09-16 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Eric Seidel
+
+ Step 1 patch: rename global variable for clarity.
+ https://bugs.webkit.org/show_bug.cgi?id=20875
+
+ * DumpRenderTree/DumpRenderTree.h:
+ * DumpRenderTree/cg/PixelDumpSupportCG.cpp:
+ (dumpWebViewAsPixelsAndCompareWithExpected):
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (dumpFramesAsText):
+ (dump):
+ (runTest):
+ (processWork):
+ (webViewLoadFinished):
+ (webViewWindowObjectCleared):
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (allocateGlobalControllers):
+ (dumpFrameScrollPosition):
+ (dumpFramesAsText):
+ (methodNameStringForFailedTest):
+ (dump):
+ (runTest):
+ * DumpRenderTree/mac/DumpRenderTreeMac.h:
+ * DumpRenderTree/mac/DumpRenderTreeWindow.mm:
+ * DumpRenderTree/mac/EditingDelegate.mm:
+ (-[EditingDelegate webView:shouldBeginEditingInDOMRange:]):
+ (-[EditingDelegate webView:shouldInsertNode:replacingDOMRange:givenAction:]):
+ (-[EditingDelegate webView:shouldInsertText:replacingDOMRange:givenAction:]):
+ (-[EditingDelegate webView:shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
+ (-[EditingDelegate webView:shouldApplyStyle:toElementsInDOMRange:]):
+ (-[EditingDelegate webView:shouldChangeTypingStyle:toStyle:]):
+ (-[EditingDelegate webViewDidBeginEditing:]):
+ (-[EditingDelegate webViewDidChange:]):
+ (-[EditingDelegate webViewDidEndEditing:]):
+ (-[EditingDelegate webViewDidChangeTypingStyle:]):
+ * DumpRenderTree/mac/FrameLoadDelegate.mm:
+ (-[FrameLoadDelegate processWork:]):
+ (-[FrameLoadDelegate webView:locationChangeDone:forDataSource:]):
+ (-[FrameLoadDelegate webView:didStartProvisionalLoadForFrame:]):
+ (-[FrameLoadDelegate webView:didCommitLoadForFrame:]):
+ (-[FrameLoadDelegate webView:didFinishLoadForFrame:]):
+ (-[FrameLoadDelegate webView:didClearWindowObject:forFrame:]):
+ (-[FrameLoadDelegate webView:didReceiveTitle:forFrame:]):
+ * DumpRenderTree/mac/ResourceLoadDelegate.mm:
+ (-[ResourceLoadDelegate webView:identifierForInitialRequest:fromDataSource:]):
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate webView:dragImage:at:offset:event:pasteboard:source:slideBack:forView:]):
+ (-[UIDelegate webViewFocus:]):
+ (-[UIDelegate webViewUnfocus:]):
+ (-[UIDelegate webView:createWebViewWithRequest:]):
+ (-[UIDelegate webViewClose:]):
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (dumpFrameScrollPosition):
+ (dumpFramesAsText):
+ (dump):
+ (runTest):
+
+2008-09-15 Alice Liu <alice.liu@apple.com>
+
+ A change needed to make PPC bots pass accessibility/table-cell-spans.html layout test
+
+ Reviewed by Stephanie Lewis.
+
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ Calling -[NSValue rangeValue] on nil object was returning bogus results on PPC,
+ but not Intel. Add a check for nil before calling.
+ (AccessibilityUIElement::rowIndexRange):
+ (AccessibilityUIElement::columnIndexRange):
+
+2008-09-14 Mark Rowe <mrowe@apple.com>
+
+ Build fix.
+
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (waitUntilDoneWatchdogFired):
+ * DumpRenderTree/mac/ObjCPlugin.m:
+
+2008-09-08 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ - add an option to run-webkit-tests to always use the complex text code path
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (initializeGlobalsFromCommandLineOptions):
+ (dumpRenderTree):
+ * Scripts/run-webkit-tests:
+
+2008-09-08 Steve Falkenburg <sfalken@apple.com>
+
+ Another Windows nightly build fix.
+
+ Reviewed by Sam Weinig.
+
+ * FindSafari/FindSafari.cpp:
+ (_tmain): Delete existing WebKitNightly directory in temp.
+ * FindSafari/Safari.exe.manifest: Add PROGIDs for each COM class. Remove non-production classes.
+
+2008-09-07 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Fix DRT build
+
+ * DumpRenderTree/DumpRenderTreePrefix.h:
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+
+2008-09-06 Steve Falkenburg <sfalken@apple.com>
+
+ Fix Windows nightlies.
+
+ Copy WebKit.dll alongside application so registry-free COM can find it.
+ Update embedded manifest to force use registry-free COM.
+
+ Reviewed by Dave Hyatt.
+
+ * FindSafari/FindSafari.cpp:
+ (copyManifest):
+ (replaceManifest):
+ (_tmain):
+ * FindSafari/FindSafari.rc: Added.
+ * FindSafari/FindSafari.vcproj:
+ * FindSafari/Safari.exe.manifest: Added.
+ * FindSafari/resource.h: Added.
+
+=== End merge of squirrelfish-extreme ===
+
+2008-08-31 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Add a --profile flag to run-sunspider.
+
+ * Scripts/webkitdirs.pm: Detect --profile or --profiling passed as a command-line argument
+ to build scripts as indicating that we should use the "Profiling" configuration. At present
+ this is only supported by JavaScriptCore, so using this argument to build any other project
+ will likely result in unexpected behaviour.
+
+2008-08-27 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fix run-webkit-tests to handle DRT exiting early.
+
+ * Scripts/run-webkit-tests: Initialize $expectedResultPaths{$base} before it will be used.
+
+=== Start merge of squirrelfish-extreme ===
+
+2008-09-04 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ Fix https://bugs.webkit.org/show_bug.cgi?id=20639.
+ Bug 20639: ENABLE_DASHBOARD_SUPPORT does not need to be a FEATURE_DEFINE
+
+ * Scripts/build-webkit: Remove ENABLE_DASHBOARD_SUPPORT-related code.
+
+2008-09-04 Cameron Zwarich <cwzwarich@uwaterloo.ca>
+
+ Reviewed by Oliver Hunt.
+
+ Bug 20616: Incorporate V8 benchmarks in testing
+ <https://bugs.webkit.org/show_bug.cgi?id=20616>
+
+ Add support for the --v8 option to run-sunspider.
+
+ * Scripts/run-sunspider:
+
+2008-09-04 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx buildbot fix. More robust handling of clean when makefiles are not built or
+ are not completely made.
+
+ * wx/build-wxwebkit:
+
+2008-09-03 Mark Rowe <mrowe@apple.com>
+
+ More Mac build fixes.
+
+ Set ENABLE_DASHBOARD_SUPPORT when building for Mac via build-webkit.
+ Also set ENABLE_CROSS_DOCUMENT_MESSAGING in order to match the
+ default configuration specified in the .xcconfig files.
+
+ * Scripts/build-webkit:
+
+2008-09-03 Mark Rowe <mrowe@apple.com>
+
+ Mac build fix. Ensure that dashboard support is enabled.
+
+ * DumpRenderTree/mac/Configurations/Base.xcconfig:
+
+2008-08-25 Steve Falkenburg <sfalken@apple.com>
+
+ Build fix. Copy correct version of ICU.
+
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+
+2008-08-25 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon.
+
+ [run-webkit-tests] Use QtLauncher to show the results of the tests
+ konqueror might not be installed, xdg-open might not be installed but the
+ QtLauncher should be present.
+
+ * Scripts/run-webkit-tests:
+
+2008-08-24 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Initial support for accessibility layout tests on Windows.
+ https://bugs.webkit.org/show_bug.cgi?id=20497
+
+ Reviewed by Sam Weinig.
+
+ * DumpRenderTree/AccessibilityController.h: Fix typos.
+ * DumpRenderTree/AccessibilityUIElement.cpp: Change #import to #include.
+ * DumpRenderTree/AccessibilityUIElement.h: Define _WINSOCKAPI_ to
+ prevent oleacc.h, which includes windows.h, from including winsock.h.
+ Fixed typos.
+ * DumpRenderTree/win/AccessibilityControllerWin.cpp: Added.
+ (AccessibilityController::AccessibilityController):
+ (AccessibilityController::~AccessibilityController):
+ (AccessibilityController::focusedElement): Get the root element, and
+ request its focused object.
+ (AccessibilityController::rootElement): Query Windows for the
+ accessible client object for the WebView's window.
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp: Added.
+ (AccessibilityUIElement::AccessibilityUIElement):
+ (AccessibilityUIElement::~AccessibilityUIElement):
+ (AccessibilityUIElement::getLinkedUIElements): Not implemented.
+ (AccessibilityUIElement::getChildren): Get the child count, and append
+ each child.
+ (AccessibilityUIElement::getChildAtIndex): Get the child at the given
+ index offset by 1. In MSAA, child 0 is the object itself.
+ (AccessibilityUIElement::allAttributes): Not implemented.
+ (AccessibilityUIElement::attributesOfLinkedUIElements): Same.
+ (AccessibilityUIElement::attributesOfChildren): Same.
+ (AccessibilityUIElement::parameterizedAttributeNames): Same.
+ (self): Return a VARIANT representing the "self" object. This is used
+ when calling methods that require a child variant.
+ (AccessibilityUIElement::role): Get the MSAA role, a long value, and
+ convert it into a string with GetRoleText().
+ (AccessibilityUIElement::title): Get the element's title, and convert
+ it to a JS String.
+ (AccessibilityUIElement::description): Same, for description.
+ (AccessibilityUIElement::width):
+ (AccessibilityUIElement::height):
+ (AccessibilityUIElement::intValue): Get the object's value as a string,
+ and convert the string to a double.
+ (AccessibilityUIElement::minValue): Not implemented.
+ (AccessibilityUIElement::maxValue): Same.
+ (AccessibilityUIElement::insertionPointLineNumber): Same.
+ (AccessibilityUIElement::attributesOfColumnHeaders): Same.
+ (AccessibilityUIElement::attributesOfRowHeaders): Same.
+ (AccessibilityUIElement::attributesOfColumns): Same.
+ (AccessibilityUIElement::attributesOfRows): Same.
+ (AccessibilityUIElement::attributesOfVisibleCells): Same.
+ (AccessibilityUIElement::attributesOfHeader): Same.
+ (AccessibilityUIElement::indexInTable): Same.
+ (AccessibilityUIElement::rowIndexRange): Same.
+ (AccessibilityUIElement::columnIndexRange): Same.
+ (AccessibilityUIElement::lineForIndex): Same.
+ (AccessibilityUIElement::boundsForRange): Same.
+ (AccessibilityUIElement::cellForColumnAndRow): Same.
+ * DumpRenderTree/win/DumpRenderTree.vcproj: Add accessibility files to
+ project. Link to oleacc.lib, the MSAA library.
+ * DumpRenderTree/win/FrameLoadDelegate.cpp:
+ (FrameLoadDelegate::FrameLoadDelegate): Initialize the accessibility
+ controller.
+ (FrameLoadDelegate::didClearWindowObject): Create a new window object
+ for the accessibility controller.
+ * DumpRenderTree/win/FrameLoadDelegate.h:
+
+2008-08-21 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Mark Rowe
+
+ Make build-launcher-app work when run from a git repository.
+ https://bugs.webkit.org/show_bug.cgi?id=20478
+
+ * BuildSlaveSupport/build-launcher-app:
+
+2008-08-20 Maxime Britto <britto@apple.com>
+
+ Reviewed by Ada Chan.
+
+ rdar://5259746
+ Mouse events are sent to page while resizing window (affects Gmail)
+
+ * DumpRenderTree/win/UIDelegate.h:
+ (UIDelegate::webViewSendResizeMessage): Add the new interface method, not implemented.
+
+2008-08-19 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Add snowleopard platform in layout tests
+
+ Added support for accessing the attributes of
+ accessibility tables through the accessibility controller
+ in DumpRenderTree
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (attributesOfColumnHeadersCallback):
+ (attributesOfRowHeadersCallback):
+ (attributesOfColumnsCallback):
+ (attributesOfRowsCallback):
+ (attributesOfVisibleCellsCallback):
+ (attributesOfHeaderCallback):
+ (indexInTableCallback):
+ (rowIndexRangeCallback):
+ (columnIndexRangeCallback):
+ (childAtIndexCallback):
+ (cellForColumnAndRowCallback):
+ (AccessibilityUIElement::getJSClass):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (convertNSArrayToVector):
+ (descriptionOfElements):
+ (AccessibilityUIElement::getLinkedUIElements):
+ (AccessibilityUIElement::getChildren):
+ (AccessibilityUIElement::attributesOfLinkedUIElements):
+ (AccessibilityUIElement::attributesOfChildren):
+ (AccessibilityUIElement::attributesOfColumnHeaders):
+ (AccessibilityUIElement::attributesOfRowHeaders):
+ (AccessibilityUIElement::attributesOfColumns):
+ (AccessibilityUIElement::attributesOfRows):
+ (AccessibilityUIElement::attributesOfVisibleCells):
+ (AccessibilityUIElement::attributesOfHeader):
+ (AccessibilityUIElement::indexInTable):
+ (AccessibilityUIElement::rowIndexRange):
+ (AccessibilityUIElement::columnIndexRange):
+ (AccessibilityUIElement::cellForColumnAndRow):
+ * Scripts/run-webkit-tests:
+
+2008-08-19 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Fix run-webkit-tests misreporting crashed tests as timed out ones because DumpRenderTree
+ is waiting for crash reporter to let it exit.
+
+ The fix does not work on Tiger, because the state of the process is indistinguishable from
+ other waiting processes, at least not with this technique.
+
+ * Scripts/run-webkit-tests:
+
+2008-08-18 Alp Toker <alp@nuanti.com>
+
+ Reviewed by Holger Freyther.
+
+ https://bugs.webkit.org/show_bug.cgi?id=20350
+ [GTK] Get DumpRenderTree working
+
+ Fixes and enhancements to DumpRenderTree. With these changes, the test
+ suite can now complete a run producing text and render tree dumps.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (dumpFramesAsText):
+ (dump):
+ (runTest):
+ (webViewLoadFinished):
+ (webViewWindowObjectCleared):
+ (webViewConsoleMessage):
+ (webViewScriptAlert):
+ (webViewScriptPrompt):
+ (webViewScriptConfirm):
+ (webViewTitleChanged):
+ (main):
+ * DumpRenderTree/gtk/DumpRenderTreeGtk.h:
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::clearBackForwardList):
+ (LayoutTestController::pathToLocalResource):
+ (LayoutTestController::setAcceptsEditing):
+ (LayoutTestController::setUserStyleSheetEnabled):
+ (LayoutTestController::setUserStyleSheetLocation):
+ (waitToDumpWatchdogFired):
+ (LayoutTestController::windowCount):
+ * DumpRenderTree/gtk/WorkQueueItemGtk.cpp:
+ (JSStringCopyUTF8CString):
+ (ScriptItem::invoke):
+
+2008-08-17 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Cameron Zwarich.
+
+ Updated project files to XCode 3.1.
+
+ * DrawTest/DrawTest.xcodeproj/project.pbxproj:
+ * WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj:
+
+2008-08-15 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Geoff Garen.
+
+ <rdar://problem/6139914> Please include a _debug version of JavaScriptCore framework
+
+ * Scripts/check-for-global-initializers: Ignore initializers when building the debug variant.
+
+2008-08-13 Simon Hausmann <hausmann@webkit.org>
+
+ Rubber-stamped by Holger.
+
+ Revert r31585 and disable http tests for the Qt build again unless
+ explicitly enabled.
+
+ Running the http tests unfortunately currently still triggers
+ failures in non-http tests due to side-effects. Disable them by default for
+ now, for more reliable results.
+
+ * Scripts/run-webkit-tests:
+
+2008-08-10 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed (and updated) by Alp Toker.
+
+ https://bugs.webkit.org/show_bug.cgi?id=16620
+ [GTK] Autotools make dist and make check support
+
+ Get make dist working.
+
+ Note that not all possible configurations have been tested yet.
+
+ * GNUmakefile.am:
+
+2008-08-10 Alp Toker <alp@nuanti.com>
+
+ Remove leftover qmake/GTK+ build files.
+
+ * DumpRenderTree/gtk/DumpRenderTree.pro: Removed.
+ * GtkLauncher/GtkLauncher.pro: Removed.
+
+2008-08-06 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin
+
+ AX functions shouldn't return position information because it changes
+ based on the platform
+
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::boundsForRange):
+
+2008-08-06 Eric Seidel <eric@webkit.org>
+
+ Reviewed by darin.
+
+ Fix leaks seen on build-bot by fixing memory management of AccessibilityUIElement.
+ <https://bugs.webkit.org/show_bug.cgi?id=20297>
+ <rdar://problem/6093153>
+
+ I've made AccessibilityUIElement a stack object for now. It could be
+ made RefCounted, but I figured that might be overkill for the moment.
+ Essentially it's just a RefPtr itself. :)
+
+ I also fixed a few typos, such as AccessibilityUIElement() instead of ~AccessibilityUIElement()
+ which was causing additional leaks. :)
+
+ I added toAXElement to remove a bunch of copy/paste code.
+
+ * DumpRenderTree/AccessibilityController.h:
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (toAXElement):
+ (allAttributesCallback):
+ (attributesOfLinkedUIElementsCallback):
+ (attributesOfChildrenCallback):
+ (lineForIndexCallback):
+ (boundsForRangeCallback):
+ (childAtIndexCallback):
+ (getRoleCallback):
+ (getTitleCallback):
+ (getDescriptionCallback):
+ (getWidthCallback):
+ (getHeightCallback):
+ (getIntValueCallback):
+ (getMinValueCallback):
+ (getMaxValueCallback):
+ (getInsertionPointLineNumberCallback):
+ (finalize):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ (AccessibilityUIElement::platformUIElement):
+ * DumpRenderTree/mac/AccessibilityControllerMac.mm:
+ (AccessibilityController::focusedElement):
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::AccessibilityUIElement):
+ (AccessibilityUIElement::getLinkedUIElements):
+ (AccessibilityUIElement::getChildren):
+ (AccessibilityUIElement::getChildAtIndex):
+ (AccessibilityUIElement::attributesOfLinkedUIElements):
+ (AccessibilityUIElement::attributesOfChildren):
+
+2008-08-06 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Cameron Zwarich.
+
+ Speculative fix for an error I keep seeing in my Cygwin build
+
+ * Scripts/webkitdirs.pm: make determineConfigurationProductDir() always call determineConfiguration() even on cygwin
+
+2008-08-02 Kevin Ollivier <kevino@theolliviers.com>
+
+ Forgot to commit licensing correction in last commit.
+
+ * wx/packaging/wxWebKitInstaller.iss.in:
+
+2008-08-02 Kevin Ollivier <kevino@theolliviers.com>
+
+ Reviewed by Eric Seidel.
+
+ Scripts for building a wxWebKit installer for wxPython on Win, eventually will
+ be used for nightlies.
+
+ https://bugs.webkit.org/show_bug.cgi?id=20036
+
+ * wx/packaging: Added.
+ * wx/packaging/build-win-installer.py: Added.
+ * wx/packaging/wxWebKitInstaller.iss.in: Added.
+
+2008-07-31 Adam Roben <aroben@apple.com>
+
+ Follow-up to r35500
+
+ * WinLauncher/WinLauncher.vcproj: Set the manifest properties for the
+ Release configuration, too.
+
+2008-07-31 Stefan Landvogt <stefan.landvogt@gmail.com>
+
+ Fix Bug 20245: WinLauncher does not start in WebKit-debug right out of
+ the box
+
+ <https://bugs.webkit.org/show_bug.cgi?id=20245>
+
+ Reviewed by Adam Roben.
+
+ * WinLauncher/WinLauncher.vcproj: adding the following properties to
+ WinLauncher > Properties > Manifest Tool > Isolated COM
+ Type Library File: $(WebKitOutputDir)\lib\WebKit.tlb
+ Component File Name: WebKit$(WebKitDLLConfigSuffix)
+ Doing the change on "All Configurations"
+
+2008-07-31 Adam Roben <aroben@apple.com>
+
+ Windows build bot fix
+
+ * DumpRenderTree/win/ImageDiff.vcproj: Don't fail if files that only
+ exist for people at Apple can't be found. Also updated the ICU version
+ to 3.8.
+
+2008-07-31 David Kilzer <ddkilzer@apple.com>
+
+ Fix layout test results for webarchive/test-xml-stylesheet.xml
+
+ Reviewed by Darin Adler.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (convertMIMEType): Work around the "text/xml" local file type
+ regression in Leopard using the BUILDING_ON_LEOPARD macro. Also
+ stop mangling "application/x-javascript" into "text/javascript".
+ (convertWebResourceDataToString): When checking whether to dump a
+ resource as text, also check to see if the MIME type is in the
+ -[WebHTMLRepresentation supportedNonImageMIMETypes] array.
+ * DumpRenderTree/mac/DumpRenderTreeMac.h: Added BUILDING_ON_LEOPARD
+ macro.
+
+2008-07-31 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Alice Liu
+
+ Add AX support to get the bounds for a range of text
+ Add AX support to get the child of an element
+ Add AX support to get all the parameterized attribute names of an element
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (parameterizedAttributeNamesCallback):
+ (boundsForRangeCallback):
+ (childAtIndexCallback):
+ (AccessibilityUIElement::getJSClass):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::getChildAtIndex):
+ (AccessibilityUIElement::parameterizedAttributeNames):
+ (AccessibilityUIElement::boundsForRange):
+
+2008-07-31 Erik Bunce <elbunce@thehive.com>
+
+ Reviewed by Simon.
+
+ Make run-launcher set DYLD_LIBRARY_PATH to make things work on Mac OS X.
+
+ * Scripts/run-launcher:
+
+2008-07-30 Jessica Kahn <jess@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Slightly stricter checking for previous change, suggested by Adam.
+
+ * Scripts/extract-localizable-strings:
+
+2008-07-30 Jessica Kahn <jess@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Added support for UI_STRING and UI_STRING_KEY macros with flexible prefixes.
+
+ * Scripts/extract-localizable-strings:
+
+2008-07-30 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam.
+
+ Copy icu38* files instead of icu36* files.
+
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+
+2008-07-25 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ DRT/Gtk build fix for r35362
+
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::elementDoesAutoCompleteForElementWithId):
+
+2008-07-25 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam
+
+ Add the ability to dump whether-or-not an element should have autocomplete enabled,
+ from the perspective of the WebKit API
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (elementDoesAutoCompleteForElementWithIdCallback):
+ (LayoutTestController::staticFunctions):
+
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::elementDoesAutoCompleteForElementWithId):
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::elementDoesAutoCompleteForElementWithId): Stub for now until I can get on Windows
+
+2008-07-25 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin
+
+ Add support for AXLineForIndex and AXInsertionPointIndex through the
+ accessibility controller
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (lineForIndexCallback):
+ (getInsertionPointLineNumberCallback):
+ (AccessibilityUIElement::getJSClass):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::insertionPointLineNumber):
+ (AccessibilityUIElement::lineForIndex):
+
+2008-07-25 Adam Roben <aroben@apple.com>
+
+ Try to fix the Windows build bot
+
+ * DumpRenderTree/win/DumpRenderTree.vcproj: Don't try to copy files
+ that don't exist for people outside of Apple.
+
+2008-07-18 Landry Breuil <landry@openbsd.org>
+
+ Bug 19975: [OpenBSD] Patches to enable build of WebKit
+
+ <https://bugs.webkit.org/show_bug.cgi?id=19975>
+
+ Reviewed by David Kilzer.
+
+ * DumpRenderTree/DumpRenderTree.h: OpenBSD doesn't support wide characters.
+
+2008-07-16 Jon Honeycutt <jhoneycutt@apple.com>
+
+ CygwinDownloader fails to install necessary packages
+ https://bugs.webkit.org/show_bug.cgi?id=20075
+
+ Reviewed by Mark Rowe.
+
+ * CygwinDownloader/cygwin-downloader.zip: Rebuilt after two broken
+ mirrors removed in r34116. Set MIME type to application/octet-stream.
+
+2008-07-16 Jon Honeycutt <jhoneycutt@apple.com>
+
+ CygwinDownloader's make-zip.sh script fails
+ https://bugs.webkit.org/show_bug.cgi?id=20074
+
+ Reviewed by Mark Rowe.
+
+ * CygwinDownloader/cygwin-downloader.py:
+
+2008-07-15 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Refactor accessibility testing code.
+
+ We now have:
+ - AccessibilityController
+ Controller which has access to the WebView and can provide the focused element, root element
+ and in the future, elementAtPoint.
+
+ - AccessibilityUIElement
+ Object which provides access to the data provided by the Accessibility APIs.
+
+ * DumpRenderTree/AccessibilityController.cpp:
+ (getFocusedElementCallback):
+ (getRootElementCallback):
+ (AccessibilityController::getJSClass):
+ * DumpRenderTree/AccessibilityController.h:
+ * DumpRenderTree/AccessibilityUIElement.cpp: Added.
+ (allAttributesCallback):
+ (attributesOfLinkedUIElementsCallback):
+ (attributesOfChildrenCallback):
+ (getRoleCallback):
+ (getTitleCallback):
+ (getDescriptionCallback):
+ (getWidthCallback):
+ (getHeightCallback):
+ (getIntValueCallback):
+ (getMinValueCallback):
+ (getMaxValueCallback):
+ (finalize):
+ (AccessibilityUIElement::makeJSAccessibilityUIElement):
+ (AccessibilityUIElement::getJSClass):
+ * DumpRenderTree/AccessibilityUIElement.h: Added.
+ (AccessibilityUIElement::platformUIElement):
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/mac/AccessibilityControllerMac.mm:
+ (AccessibilityController::AccessibilityController):
+ (AccessibilityController::~AccessibilityController):
+ (AccessibilityController::focusedElement):
+ (AccessibilityController::rootElement):
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm: Added.
+ (AccessibilityUIElement::AccessibilityUIElement):
+ (descriptionOfValue):
+ (attributesOfElement):
+ (nsStringToJSStringRef):
+ (concatenateAttributeAndValue):
+ (AccessibilityUIElement::getLinkedUIElements):
+ (AccessibilityUIElement::getChildren):
+ (AccessibilityUIElement::attributesOfLinkedUIElements):
+ (AccessibilityUIElement::attributesOfChildren):
+ (AccessibilityUIElement::allAttributes):
+ (AccessibilityUIElement::role):
+ (AccessibilityUIElement::title):
+ (AccessibilityUIElement::description):
+ (AccessibilityUIElement::width):
+ (AccessibilityUIElement::height):
+ (AccessibilityUIElement::intValue):
+ (AccessibilityUIElement::minValue):
+ (AccessibilityUIElement::maxValue):
+
+2008-07-14 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin
+
+ Add support to get attributes of the AXChildren of an objecty
+
+ * DumpRenderTree/AccessibilityController.cpp:
+ (attributesOfChildrenForFocusedElementCallback):
+ (AccessibilityController::staticFunctions):
+ * DumpRenderTree/AccessibilityController.h:
+ * DumpRenderTree/mac/AccessibilityControllerMac.mm:
+ (descriptionOfValue):
+ (AccessibilityController::attributesOfChildrenForFocusedElement):
+
+2008-07-14 Steve Falkenburg <sfalken@apple.com>
+
+ Build fix.
+
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+
+2008-07-14 Adam Roben <aroben@apple.com>
+
+ Attempted Windows build fix
+
+ * DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj: Add
+ CoreFoundation/OSXCompatibilityHeaders[/GNUCompatibility] to the
+ include path.
+
+2008-07-14 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Geoff Garen.
+
+ Eliminate per-thread JavaScript global data instance support and make arbitrary
+ global data/global object combinations possible.
+
+ * DumpRenderTree/pthreads/JavaScriptThreadingPthreads.cpp:
+ (runJavaScriptThread): Don't pass a released context reference to JSGarbageCollect.
+ In this scenario, it was causing crashes after each 10-20 tests, because there was a large
+ chance for a different thread to cause GC after the context was released.
+
+2008-07-11 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Make sure we read WebCore Leak messages. Force full document teardown for DumpRenderTree.
+
+ Up timeout limit, some slower machines were timing out before crashtracer finished writing out to disk and quitting DRT.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (setDefaultsToConsistentValuesForTesting):
+ (resetWebViewToConsistentStateBeforeTesting):
+ * Scripts/run-webkit-tests:
+
+2008-07-10 Steve Falkenburg <sfalken@apple.com>
+
+ Build fix.
+
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+
+2008-07-09 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Print <div> backgrounds when printing from DRT.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (setDefaultsToConsistentValuesForTesting):
+
+2008-07-09 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Fix copying of expected results to correct location
+
+ * Scripts/run-webkit-tests:
+
+2008-07-09 Eric Seidel <eric@webkit.org>
+
+ Reviewed by aroben.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (dumpAsPDFCallback):
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ (LayoutTestController::dumpAsPDF):
+ (LayoutTestController::setDumpAsPDF):
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dumpFrameAsPDF):
+ (dump):
+
+2008-07-09 Eric Seidel <eric@webkit.org>
+
+ Reviewed by weinig.
+
+ Add Content-Type support to DumpRenderTree and run-webkit-tests
+ and move expected.txt files to expected.webarchive
+
+ https://bugs.webkit.org/show_bug.cgi?id=15565
+
+ * DumpRenderTree/cg/ImageDiffCG.cpp:
+ (compareImages):
+ (main):
+ * DumpRenderTree/cg/PixelDumpSupportCG.cpp:
+ (printPNG):
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dump):
+ * Scripts/run-webkit-tests:
+
+2008-07-08 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Reviewed by Anders.
+
+ Port r34988 to Mac: allow tests to define JavaScript to execute when
+ NPP_DestroyStream or NPP_URLNotify is called.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp:
+ (NPP_New): Remove initialization that happens in pluginAllocate. Look
+ for new arguments onStreamDestroy and onURLNotify.
+ (NPP_Destroy): Free onStreamDestroy and onURLNotify.
+ (executeScript): Code moved from onStreamLoad.
+ (NPP_NewStream): Call executeScript.
+ (NPP_DestroyStream): Same.
+ (NPP_URLNotify): Same.
+
+2008-07-07 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Anders.
+
+ This patch extends DRT accessibility tests to add the ability to
+ query the intValue, minValue, and maxValue of the focused element.
+
+ * DumpRenderTree/AccessibilityController.cpp:
+ (intValueOfFocusedElementCallback):
+ (minValueOfFocusedElementCallback):
+ (maxValueOfFocusedElementCallback):
+ (AccessibilityController::staticFunctions):
+ * DumpRenderTree/AccessibilityController.h:
+ * DumpRenderTree/mac/AccessibilityControllerMac.mm:
+ (AccessibilityController::intValueOfFocusedElement):
+ (AccessibilityController::minValueOfFocusedElement):
+ (AccessibilityController::maxValueOfFocusedElement):
+
+2008-07-07 Steve Falkenburg <sfalken@apple.com>
+
+ Fix build.
+
+ * DumpRenderTree/win/ImageDiff.vcproj:
+
+2008-07-02 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Allow tests to define JavaScript to execute when NPP_DestroyStream or
+ NPP_URLNotify is called.
+
+ Reviewed by Anders.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp: Add a new
+ property, "returnErrorFromNewStream." This is to support the test for
+ <rdar://5983747> Safari crashes trying to load the SilverLight plugin,
+ caused by WebKit calling NPP_DestroyStream after a plug-in returns an
+ error from NPP_NewStream.
+ (pluginGetProperty):
+ (pluginSetProperty):
+ (pluginAllocate):
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h: Added new
+ members, onStreamDestroy and onURLNotify.
+ * DumpRenderTree/win/TestNetscapePlugin/main.cpp:
+ (NPP_New): Remove initialization of onStreamLoad; this was moved to
+ pluginAllocate. Look for new arguments onStreamDestroy and
+ onURLNotify, and store their values.
+ (NPP_Destroy): Free new members.
+ (executeScript): Code moved from onStreamLoad
+ (NPP_NewStream): If returnErrorFromNewStream has been set to true,
+ return a generic error code. If onStreamLoad is set, execute it as
+ JavaScript.
+ (NPP_DestroyStream): If onStreamDestroy is set, execute it as JS.
+ (NPP_URLNotify): Same, for onURLNotify.
+
+2008-07-02 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Mitz Pettel and John Sullivan
+
+ Add the ability to tell DRT to call stopLoading on a WebFrame inside of a didStartProvisionalLoadForFrame
+ load delegate.
+
+ Required to add a layout test for the fix for <rdar://problem/5549871>
+
+ * DumpRenderTree/mac/FrameLoadDelegate.mm:
+ (-[FrameLoadDelegate webView:didStartProvisionalLoadForFrame:]): If stopProvisionalFrameLoads is set, call
+ [WebFrame stopLoading] to test for the crash reflected in 5549871
+
+ All of the following are infrastructure to add the layoutTestController.setStopProvisionalFrameLoads() call:
+ * DumpRenderTree/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (setStopProvisionalFrameLoadsCallback):
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ (LayoutTestController::stopProvisionalFrameLoads):
+ (LayoutTestController::setStopProvisionalFrameLoads):
+
+2008-07-01 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin
+
+ Support ability to get width and height of an element through accessibility
+
+ * DumpRenderTree/AccessibilityController.cpp:
+ (widthOfFocusedElementCallback):
+ (heightOfFocusedElementCallback):
+ (AccessibilityController::staticFunctions):
+ * DumpRenderTree/AccessibilityController.h:
+ * DumpRenderTree/mac/AccessibilityControllerMac.mm:
+ (AccessibilityController::widthOfFocusedElement):
+ (AccessibilityController::heightOfFocusedElement):
+
+2008-06-30 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin
+
+ Support the ability to get the linked ui elements of an object
+
+ * DumpRenderTree/AccessibilityController.cpp:
+ (attributesOfLinkedUIElementsForFocusedElementCallback):
+ (AccessibilityController::staticFunctions):
+ * DumpRenderTree/AccessibilityController.h:
+ * DumpRenderTree/mac/AccessibilityControllerMac.mm:
+ (AccessibilityController::attributesOfLinkedUIElementsForFocusedElement):
+ (AccessibilityController::allAttributesOfFocusedElement):
+ (attributesOfElement):
+ (nsStringToJSStringRef):
+
+2008-06-29 Sam Weinig <sam@webkit.org>
+
+ Fix Tiger build.
+
+ * DumpRenderTree/mac/EventSendingController.mm:
+ (eventTypeForMouseButtonAndAction):
+
+2008-06-27 Eric Seidel <eric@webkit.org>
+
+ Reviewed by darin.
+
+ Add multi-button mouseevent support to DRT
+ https://bugs.webkit.org/show_bug.cgi?id=15173
+
+ It's now possible to specify the mouse button with:
+ eventSender.mouseDown(1); eventSender.mouseUp(1); etc.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/mac/EventSendingController.h:
+ * DumpRenderTree/mac/EventSendingController.mm:
+ (+[EventSendingController isSelectorExcludedFromWebScript:]):
+ (+[EventSendingController webScriptNameForSelector:]):
+ (eventTypeForMouseButtonAndAction):
+ (-[EventSendingController updateClickCountForButton:]):
+ (-[EventSendingController mouseDown:]):
+ (-[EventSendingController mouseUp:]):
+ (-[EventSendingController mouseMoveToX:Y:]):
+ (-[EventSendingController contextClick]):
+
+2008-06-28 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Oliver.
+
+ Copy <test>-expected.png from the right location to /tmp/layout-test-results.
+ Use $expectedPixelDir instead of $expectedDir. Allows using SVG pixel tests again.
+
+ * Scripts/run-webkit-tests:
+
+2008-06-27 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Christian Dywan.
+
+ [Gtk] Initialize webview settings before running DRT tests
+ http://bugs.webkit.org/show_bug.cgi?id=19778
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (setDefaultsToConsistentStateValuesForTesting):
+ (main):
+
+2008-06-26 Darin Adler <darin@apple.com>
+
+ * Scripts/check-for-weak-vtables: Fixed comment.
+
+2008-06-26 Darin Adler <darin@apple.com>
+
+ * Scripts/check-for-weak-vtables: Added.
+
+2008-06-26 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Sam.
+
+ Do not include AXPosition in the dump of all of the accessibility
+ attributes since it is screen-specific.
+
+ * DumpRenderTree/mac/AccessibilityControllerMac.mm:
+ (AccessibilityController::allAttributesOfFocusedElement):
+
+2008-06-26 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Anders.
+
+ This is a speculative fix for the failing layout test on the build
+ bot. It seems that the problem that the Build Bot is having is
+ Tiger-specific. On Tiger, [NSValue description] was not very smart.
+ So I replaced our call to description with a hand-rolled equivalent
+ that will match on both platforms.
+
+ * DumpRenderTree/mac/AccessibilityControllerMac.mm:
+ (descriptionOfValue):
+
+2008-06-25 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ This patch adds support to the AccessibilityController to query the
+ following attributes specifically, without a full attribute dump:
+ AXRole, AXTitle, and AXDescription.
+
+ * DumpRenderTree/AccessibilityController.cpp:
+ (allAttributesForFocusedElementCallback):
+ (roleOfFocusedElementCallback):
+ (titleOfFocusedElementCallback):
+ (descriptionOfFocusedElementCallback):
+ (AccessibilityController::staticFunctions):
+ * DumpRenderTree/AccessibilityController.h:
+ * DumpRenderTree/mac/AccessibilityControllerMac.mm:
+ (AccessibilityController::allAttributesForFocusedElement):
+ (concatenateAttributeAndValue):
+ (AccessibilityController::roleOfFocusedElement):
+ (AccessibilityController::titleOfFocusedElement):
+ (AccessibilityController::descriptionOfFocusedElement):
+
+2008-06-24 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Stephanie Lewis.
+
+ - move the linker flags from the debug configuration in the project
+ to the shared configuration
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig:
+
+2008-06-24 Dan Bernstein <mitz@apple.com>
+
+ - try to fix the Tiger build
+
+ * DumpRenderTree/mac/AccessibilityControllerMac.mm:
+
+2008-06-24 Sam Weinig and Beth Dakin <bdakin@apple.com and sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Fix for <rdar://problem/5884881> Make DumpRenderTree support
+ accessibility tests
+
+ This patch adds some basic support for accessibility layout tests
+ on the Mac.
+
+ * DumpRenderTree/AccessibilityController.cpp: Added.
+ (AccessibilityController::AccessibilityController):
+ (AccessibilityController::~AccessibilityController):
+ (dumpCurrentAttributesCallback):
+ (AccessibilityController::makeWindowObject):
+ (AccessibilityController::getJSClass):
+ (AccessibilityController::staticFunctions):
+ * DumpRenderTree/AccessibilityController.h: Added.
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/mac/AccessibilityControllerMac.mm: Added.
+ (descriptionOfValue):
+ (AccessibilityController::dumpCurrentAttributes):
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ * DumpRenderTree/mac/FrameLoadDelegate.h:
+ * DumpRenderTree/mac/FrameLoadDelegate.mm:
+ (-[FrameLoadDelegate init]):
+ (-[FrameLoadDelegate webView:didClearWindowObject:forFrame:]):
+
+2008-06-24 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Dan Bernstein
+
+ * Scripts/extract-localizable-strings:
+ add UI_STRING_LOCALIZE_LATER, LPCTSTR_UI_STRING_LOCALIZE_LATER, and LOG_WARNING to the
+ list of debugging macros, to avoid noise when keeping the list of localized string
+ exceptions up to date
+
+2008-06-24 Dan Bernstein <mitz@apple.com>
+
+ Rubber-stamped by Darin Adler.
+
+ - add a font family for testing font-weight
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Added linker
+ flags to create data sections for the WeightWatcher fonts.
+ * DumpRenderTree/fonts: Added.
+ * DumpRenderTree/fonts/WebKitWeightWatcher100.ttf: Added.
+ * DumpRenderTree/fonts/WebKitWeightWatcher200.ttf: Added.
+ * DumpRenderTree/fonts/WebKitWeightWatcher300.ttf: Added.
+ * DumpRenderTree/fonts/WebKitWeightWatcher400.ttf: Added.
+ * DumpRenderTree/fonts/WebKitWeightWatcher500.ttf: Added.
+ * DumpRenderTree/fonts/WebKitWeightWatcher600.ttf: Added.
+ * DumpRenderTree/fonts/WebKitWeightWatcher700.ttf: Added.
+ * DumpRenderTree/fonts/WebKitWeightWatcher800.ttf: Added.
+ * DumpRenderTree/fonts/WebKitWeightWatcher900.ttf: Added.
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (activateFonts): Renamed activateAhemFont to this and made it activate
+ the WeightWatcher fonts in addition to Ahem.
+ (prepareConsistentTestingEnvironment): Adjusted for the name change.
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (initialize): Added the WeightWatcher fonts.
+
+2008-06-20 Brent Fulgham <bfulgham@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ Extend the build-webkit (and set-webkit-configuration) script to
+ support Cairo-based webkit builds. (see http://bugs.webkit.org/show_bug.cgi?17952)
+
+ * Scripts/build-webkit: Add --cairo-win32 to the help message
+ * Scripts/webkitdirs.pm: Extend the 'determinePassedConfiguration
+ subroutine to recognize the --cairo-win32 flag. When present,
+ the build configuration is changed from Debug/Release to
+ Debug_Cairo/Release_Cairo. This flag is only active when the
+ isCygwin() test is true.
+
+2008-06-17 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Justin Garcia.
+
+ - prefer Leopard results when running on Snow Leopard.
+
+ * Scripts/run-webkit-tests: Added a mapping of Snow Leopard to
+ mac-leopard.
+ * Scripts/webkitdirs.pm: Added isSnowLeopard().
+
+2008-06-15 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Updated for the latest round of renaming.
+
+2008-06-15 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Updated for the latest round of renaming.
+
+2008-06-15 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Updated for the latest round of renaming.
+
+2008-06-15 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Updated for the latest round of renaming.
+
+2008-06-15 Darin Adler <darin@apple.com>
+
+ * Scripts/do-file-rename: Updated.
+ * Scripts/do-webcore-rename: Updated for the latest round of renaming.
+
+2008-06-15 Darin Adler <darin@apple.com>
+
+ * Scripts/do-file-rename: Updated for the latest round of renaming.
+ * Scripts/do-webcore-rename: Tweaked and reorganized a bit.
+
+2008-06-15 Darin Adler <darin@apple.com>
+
+ * Scripts/create-exports: Added.
+ * Scripts/do-file-rename: Added some planned renames.
+ * Scripts/do-webcore-rename: Updated for the latest round of renaming.
+
+2008-06-15 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Updated for the latest round of renaming.
+
+2008-06-15 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Oliver.
+
+ - rename testkjs to jsc
+
+ * Scripts/build-jsc: Copied from Scripts/build-testkjs.
+ * Scripts/build-testkjs: Removed.
+ * Scripts/run-javascriptcore-tests:
+ * Scripts/run-jsc: Copied from Scripts/run-testkjs.
+ * Scripts/run-sunspider:
+ * Scripts/run-testkjs: Removed.
+ * Scripts/sunspider-compare-results:
+
+2008-06-14 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Moved planned renames into a separate hash
+ from the actual renames. Removed many renames that are either done or
+ no longer planned.
+
+2008-06-14 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Fixed obvious typo.
+
+2008-06-13 Darin Adler <darin@apple.com>
+
+ * Scripts/make-js-test-wrappers: Added three more exceptions.
+
+2008-06-10 Joerg Bornemann <joerg.bornemann@trolltech.com>
+
+ Reviewed by Simon.
+
+ For the qmake based build make it possible to build against makespecs where
+ QMAKE_CC is defined in a configuration file included from qmake.conf.
+
+ * Scripts/webkitdirs.pm: Added support for include() statements in
+ qmake.conf.
+
+2008-06-09 Alp Toker <alp@nuanti.com>
+
+ gcc3/autotools build fix. Add explicit -O2 -fno-strict-aliasing to
+ each of the tools since these are no longer set globally.
+
+ * GNUmakefile.am:
+
+2008-06-08 Darin Adler <darin@apple.com>
+
+ * Scripts/make-js-test-wrappers: Added another exception.
+
+2008-06-07 Cameron Zwarich <cwzwarich@uwaterloo.ca>
+
+ Reviewed by Timothy.
+
+ Remove the --squirrelfish option from SunSpider, as it is no longer needed.
+
+ * Scripts/run-sunspider:
+
+2008-06-05 Alp Toker <alp@nuanti.com>
+
+ Build fix for r34387.
+
+ * GNUmakefile.am:
+
+2008-06-04 Cameron Zwarich <cwzwarich@uwaterloo.ca>
+
+ Reviewed by Oliver.
+
+ Add an exception for Opcode.o to the global initializers check so that
+ we can dump instruction statistics in the JavaScript virtual machine.
+
+ * Scripts/check-for-global-initializers:
+
+2008-05-30 Steve Falkenburg <sfalken@apple.com>
+
+ Generate an isolated COM manifest for registry free COM.
+
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+
+2008-06-02 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by David Hyatt and Mitz.
+
+ <rdar://problem/5704119>
+ repro crash in WebCore::RenderPart::setWidget (plugin-related?)
+
+ Call -[WebView display] in the "plug-in" failed delegate method, simulating
+ the sheet that Safari puts up.
+
+ * DumpRenderTree/mac/ResourceLoadDelegate.mm:
+ (-[ResourceLoadDelegate webView:plugInFailedWithError:dataSource:]):
+
+2008-05-30 Timothy Hatcher <timothy@apple.com>
+
+ Made the starting line number of scripts be 1-based throughout the engine.
+ This cleans up script line numbers so they are all consistent now.
+
+ Reviewed by Oliver Hunt.
+
+ * DumpRenderTree/mac/ObjCController.m:
+ (runJavaScriptThread): Pass a line number of 1 instead of 0 to JSEvaluateScript.
+ * DumpRenderTree/pthreads/JavaScriptThreadingPthreads.cpp:
+ (runJavaScriptThread): Ditto.
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (runJavaScriptThread): Ditto.
+
+2008-05-29 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Fixed VCSUtils.pm to work with git repositories inside symlinks.
+
+ * Scripts/VCSUtils.pm: Compute a relative path from the git repository
+ root, instead of the root of the filesystem, to work around a bug in
+ abs2rel when traversing symlinked home directories.
+
+2008-05-29 Kevin Ollivier <kevino@theolliviers.com>
+
+ Reviewed by Darin Adler.
+
+ Restore original behavior of isOSX() referring to the Mac port, not the OS itself.
+
+ https://bugs.webkit.org/show_bug.cgi?id=19311
+
+ * Scripts/webkitdirs.pm:
+
+2008-05-29 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Fix run-iexploder-tests and run-mangleme-tests to work with updated shared scripts and
+ configuration files.
+
+ * Scripts/run-iexploder-tests:
+ * Scripts/run-mangleme-tests:
+ Renamed runSafari to not conflict with the one in webkitdirs.
+ Added SSLCertificateFile option for httpd, as now needed.
+
+2008-05-27 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fix. Update the sample app after wxWebFrame->wxWebBrowserShell rename.
+
+ * wx/browser/browser.cpp:
+ (MyApp::OnInit):
+
+2008-05-24 Andreia Gaita <shana@isninja.com>
+
+ Reviewed by Alp Toker.
+
+ cygwin-downloader.py fixes.
+
+ Remove two non-working mirrors. Add a check for missing dependency
+ packages to avoid bailing out on an inconsistent Cygwin package list.
+
+ * CygwinDownloader/cygwin-downloader.py:
+
+2008-05-24 Jan Michael Alonzo <jmalonzo@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Remove useQmake usage. QMake build doesn't support Gtk port
+ anymore.
+
+ Also fix 2 occurences of "Web Kit". Should be WebKit.
+
+ * Scripts/build-webkit:
+ * Scripts/run-javascriptcore-tests:
+ * Scripts/run-launcher:
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm:
+
+2008-05-22 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Dan.
+
+ implement the beforeUnload UI delegate so that DRT will dispatch beforeunload events.
+
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:]):
+ * DumpRenderTree/win/UIDelegate.cpp:
+ (SearchableWebViewHost::runBeforeUnloadConfirmPanelWithMessage):
+
+2008-05-21 Adele Peterson <adele@apple.com>
+
+ Reviewed by Adam.
+
+ DumpRenderTree support for <rdar://problem/5787733> fast/dom/HTMLDocument/hasFocus.html fails on Windows
+
+ * DumpRenderTree/win/UIDelegate.cpp:
+ (UIDelegate::webViewFocus): Added.
+ (UIDelegate::webViewUnfocus): Added.
+ * DumpRenderTree/win/UIDelegate.h:
+
+2008-05-21 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Stephanie Lewis.
+
+ Set the pass_through flag on Getopt so that extra arguments can be passed through to Safari,
+ rather than trigger an unknown argument message. This allows run-webkit-tests to display results
+ once more.
+
+ * Scripts/run-safari:
+
+2008-05-21 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Maciej, Mark.
+
+ arch doesn't take arguments on tiger. expand DRT timeout for guardMalloc.
+
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm:
+
+2008-05-20 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Stephanie Lewis.
+
+ Improve the behavior of run-webkit-tests with 64-bit WebKit by automatically inferring whether to run 64-bit.
+
+ If --64-bit is not passed to run-webkit-tests, attempt to guess whether we should run 64-bit.
+ This decision is made based on the 64-bitness of the built WebKit framework if it exists, and
+ can be manually overridden by passing --64-bit or --no-64-bit. This removes the need to always
+ pass an argument to run-webkit-tests after having built with "make x86_64".
+
+ * Scripts/gdb-safari:
+ * Scripts/run-safari:
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm: Split the setting of the 64-bit flag, the determination of the
+ preferred architecture, and exporting of the environment variables for 'arch' out into
+ separate subroutines.
+
+2008-05-20 Mark Rowe <mrowe@apple.com>
+
+ Fix "make x86_64" by adding x86_64 target to WebKitTools Makefile.
+
+ * Makefile:
+
+=== End merge of squirrelfish ===
+
+2008-04-14 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Oliver.
+
+ - added support for --ubench mode
+
+ * Scripts/run-sunspider:
+
+2008-03-26 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ --squirrelfish mode: pared down tests for squirrelfish to chew on.
+
+ * Scripts/run-sunspider:
+
+=== Start merge of squirrelfish ===
+
+2008-05-21 Darin Adler <darin@apple.com>
+
+ * Scripts/make-js-test-wrappers: Added another exception.
+
+2008-05-19 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Adam.
+
+ Explicitly set run mode to 32bit unless overridden to avoid
+ confusion when running tests
+
+ * Scripts/build-dumprendertree:
+ * Scripts/gdb-safari:
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm:
+
+2008-05-16 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Steve.
+
+ Print out pending unload event count. Also print out main frame name to match Mac.
+
+ * DumpRenderTree/win/FrameLoadDelegate.cpp:
+ (descriptionSuitableForTestResult):
+ (FrameLoadDelegate::didFinishDocumentLoadForFrame):
+
+2008-05-16 Timothy Hatcher <timothy@apple.com>
+
+ Remove the Drosera project, code and resources since it has been
+ replaced with the Web Inspector's debugger. Removes references to
+ Drosera in various scripts and makefiles.
+
+ Rubber-stamped by Mark Rowe.
+
+ * BuildSlaveSupport/build-launcher-app:
+ * Drosera/DebuggerDocument.cpp: Removed.
+ * Drosera/DebuggerDocument.h: Removed.
+ * Drosera/Drosera.icns: Removed.
+ * Drosera/DroseraWin.make: Removed.
+ * Drosera/English.lproj/Debugger.nib/classes.nib: Removed.
+ * Drosera/English.lproj/Debugger.nib/info.nib: Removed.
+ * Drosera/English.lproj/Debugger.nib/keyedobjects.nib: Removed.
+ * Drosera/English.lproj/MainMenu.nib/classes.nib: Removed.
+ * Drosera/English.lproj/MainMenu.nib/info.nib: Removed.
+ * Drosera/English.lproj/MainMenu.nib/keyedobjects.nib: Removed.
+ * Drosera/ForwardingHeaders/wtf/Assertions.h: Removed.
+ * Drosera/ForwardingHeaders/wtf/HashTraits.h: Removed.
+ * Drosera/ForwardingHeaders/wtf/Noncopyable.h: Removed.
+ * Drosera/ForwardingHeaders/wtf/OwnPtr.h: Removed.
+ * Drosera/ForwardingHeaders/wtf/Platform.h: Removed.
+ * Drosera/ForwardingHeaders/wtf/RetainPtr.h: Removed.
+ * Drosera/Images/Drosera.ico: Removed.
+ * Drosera/Images/SourceArrow.png: Removed.
+ * Drosera/Images/SourceArrowBlank.png: Removed.
+ * Drosera/Images/SourceArrowOpen.png: Removed.
+ * Drosera/Images/background_stripe.png: Removed.
+ * Drosera/Images/breakPoint.tif: Removed.
+ * Drosera/Images/breakPointDisabled.tif: Removed.
+ * Drosera/Images/breakpointeditor.png: Removed.
+ * Drosera/Images/close.tif: Removed.
+ * Drosera/Images/close_active.tif: Removed.
+ * Drosera/Images/close_hover.tif: Removed.
+ * Drosera/Images/console.png: Removed.
+ * Drosera/Images/continue.tif: Removed.
+ * Drosera/Images/fileIcon.jpg: Removed.
+ * Drosera/Images/finishFunction.tif: Removed.
+ * Drosera/Images/glossyFooterFill.tif: Removed.
+ * Drosera/Images/glossyHeader.png: Removed.
+ * Drosera/Images/glossyHeaderPressed.png: Removed.
+ * Drosera/Images/gradientBackground.png: Removed.
+ * Drosera/Images/gutter.png: Removed.
+ * Drosera/Images/navLeftDisabled.png: Removed.
+ * Drosera/Images/navLeftNormal.png: Removed.
+ * Drosera/Images/navLeftPressed.png: Removed.
+ * Drosera/Images/navRightDisabled.png: Removed.
+ * Drosera/Images/navRightNormal.png: Removed.
+ * Drosera/Images/navRightPressed.png: Removed.
+ * Drosera/Images/pause.tif: Removed.
+ * Drosera/Images/popUpArrows.png: Removed.
+ * Drosera/Images/programCounter.tif: Removed.
+ * Drosera/Images/programCounterBreakPoint.tif: Removed.
+ * Drosera/Images/programCounterBreakPointDisabled.tif: Removed.
+ * Drosera/Images/run.tif: Removed.
+ * Drosera/Images/siteCollapsed.tif: Removed.
+ * Drosera/Images/siteExpanded.tif: Removed.
+ * Drosera/Images/siteIcon.tif: Removed.
+ * Drosera/Images/small.ico: Removed.
+ * Drosera/Images/splitterBar.tif: Removed.
+ * Drosera/Images/splitterDimple.tif: Removed.
+ * Drosera/Images/step.tif: Removed.
+ * Drosera/Images/stepOut.tif: Removed.
+ * Drosera/Images/stepOver.tif: Removed.
+ * Drosera/Images/stop.tif: Removed.
+ * Drosera/Images/toolbarBackground.png: Removed.
+ * Drosera/Images/verticalSplitterBar.tiff: Removed.
+ * Drosera/Images/verticalSplitterDimple.tiff: Removed.
+ * Drosera/Makefile: Removed.
+ * Drosera/breakpointEditor.html: Removed.
+ * Drosera/config.h: Removed.
+ * Drosera/console.css: Removed.
+ * Drosera/console.html: Removed.
+ * Drosera/console.js: Removed.
+ * Drosera/debugger.css: Removed.
+ * Drosera/debugger.html: Removed.
+ * Drosera/debugger.js: Removed.
+ * Drosera/mac/DebuggerApplication.h: Removed.
+ * Drosera/mac/DebuggerApplication.mm: Removed.
+ * Drosera/mac/DebuggerClient.h: Removed.
+ * Drosera/mac/DebuggerClient.mm: Removed.
+ * Drosera/mac/DebuggerDocumentPlatform.mm: Removed.
+ * Drosera/mac/Drosera.xcodeproj/project.pbxproj: Removed.
+ * Drosera/mac/Info.plist: Removed.
+ * Drosera/mac/LauncherInfo.plist: Removed.
+ * Drosera/mac/Makefile: Removed.
+ * Drosera/mac/ServerConnection.h: Removed.
+ * Drosera/mac/ServerConnection.mm: Removed.
+ * Drosera/mac/launcher.m: Removed.
+ * Drosera/mac/main.m: Removed.
+ * Drosera/viewer.css: Removed.
+ * Drosera/viewer.html: Removed.
+ * Drosera/win/BaseDelegate.h: Removed.
+ * Drosera/win/DebuggerClient.cpp: Removed.
+ * Drosera/win/DebuggerClient.h: Removed.
+ * Drosera/win/DebuggerDocumentPlatform.cpp: Removed.
+ * Drosera/win/Drosera.cpp: Removed.
+ * Drosera/win/Drosera.h: Removed.
+ * Drosera/win/Drosera.vcproj/Drosera.rc: Removed.
+ * Drosera/win/Drosera.vcproj/Drosera.vcproj: Removed.
+ * Drosera/win/DroseraPrefix.cpp: Removed.
+ * Drosera/win/DroseraPrefix.h: Removed.
+ * Drosera/win/Info.plist: Removed.
+ * Drosera/win/ServerConnection.cpp: Removed.
+ * Drosera/win/ServerConnection.h: Removed.
+ * Drosera/win/resource.h: Removed.
+ * Makefile:
+ * Scripts/build-drosera: Removed.
+ * Scripts/gdb-drosera: Removed.
+ * Scripts/run-drosera: Removed.
+ * Scripts/run-drosera-nightly.cmd: Removed.
+ * Scripts/run-drosera.cmd: Removed.
+ * Scripts/webkitdirs.pm:
+
+2008-05-15 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Anders.
+
+ Dump the unload count for a frame after parsing is finished.
+
+ * DumpRenderTree/mac/FrameLoadDelegate.mm:
+ (-[FrameLoadDelegate webView:didFinishDocumentLoadForFrame:]):
+
+2008-05-15 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=10707
+ DumpRenderTree should not be able to access non-local resources
+
+ * DumpRenderTree/mac/ResourceLoadDelegate.mm:
+ (-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]):
+ Block them, and complain.
+
+2008-05-15 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fix. Update the version of libpng to download and instsall.
+
+ * wx/install-unix-extras:
+
+2008-05-14 Julien Chaffraix <jchaffraix@webkit.org>
+
+ Reviewed by Eric.
+
+ - isDarwin() and isCygwin() returned an empty string if the platform equality check fails.
+ We now force the return value to be numeric.
+
+ - Removed platform checks as it was a work around the previous issue.
+
+ - Replaced isDarwin() by isOSX() as they have now the same behaviour.
+
+ * Scripts/build-webkit:
+ * Scripts/webkitdirs.pm:
+
+2008-05-12 Adam Roben <aroben@apple.com>
+
+ Support for testing NPN_PostURL
+
+ Reviewed by Anders Carlsson.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
+ (toCString): Added this helper function.
+ (testPostURLFile): Added. Writes the passed-in content to the
+ passed-in file and calls NPN_PostURL with the passed-in URL and
+ target.
+ (pluginInvoke): Added a case for testPostURLFile.
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (followShortcuts): Changed to allow paths that don't yet exist.
+
+2008-05-12 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Minor cleanup of the DRT Xcode project.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Use GCC_OPTIMIZATION_LEVEL rather than
+ OPTIMIZATION_CFLAGS. Don't include Info.plist in the "Copy Bundle Resources" build phase as it does
+ not need to be there.
+
+2008-05-12 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam.
+
+ Add support for testing application caches.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dumpRenderTree):
+ Empty the cache.
+
+ (resetWebViewToConsistentStateBeforeTesting):
+ Turn on support for the application cache.
+
+2008-05-09 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Update TestNetscapePlugIn to build 64-bit using the Cocoa event model.
+
+ It currently does not attempt to print events which means that plugins/mouse-events.html
+ will fail when run 64-bit. All other tests that use this plugin pass.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
+ (testGetIntIdentifier):
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp:
+ (NPP_New):
+ (NPP_HandleEvent):
+
+2008-05-09 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Adam Roben
+
+ Explicitly call shutDownWebKit() before quitting.
+
+ * Drosera/win/Drosera.cpp:
+ (_tWinMain):
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (main):
+
+2008-05-09 Mark Rowe <mrowe@apple.com>
+
+ Fix the Tiger build of Drosera.
+
+ * Drosera/config.h: Define BUILDING_ON_TIGER when building on Tiger.
+
+2008-05-09 Sam Weinig <sam@webkit.org>
+
+ Rubber-stamped by Mark Rowe.
+
+ Remove the ENABLE_CROSS_DOCUMENT_MESSAGING #ifdefs.
+
+ * Scripts/build-webkit:
+
+2008-05-08 Mark Rowe <mrowe@apple.com>
+
+ Another attempt at a Tiger build fix.
+
+ Use DumpRenderTreeMac.h rather than DumpRenderTree.h as DumpRenderTreePasteboard is not an Obj-C++ file.
+
+ * DumpRenderTree/mac/DumpRenderTreePasteboard.m:
+
+2008-05-08 Mark Rowe <mrowe@apple.com>
+
+ Tiger build fix. Include DumpRenderTree.h so that BUILDING_ON_TIGER will be defined.
+
+ * DumpRenderTree/mac/DumpRenderTreePasteboard.m:
+
+2008-05-08 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt and Dan Bernstein.
+
+ Update DumpRenderTree to build 64-bit.
+
+ The three major changes here are:
+ 1) Use NSInteger in the appropriate places.
+ 2) Use ColorSync API that is available in 64-bit to switch display profiles.
+ 3) Use method-swizzling to achieve similar results to class posing when using the Obj-C 2.0 runtime.
+
+ The build of DumpRenderTree will still fail in 64-bit for now as the TestNetscapePlugIn target also
+ needs updated to successfully build.
+
+ * DumpRenderTree/mac/Configurations/Base.xcconfig: Don't prevent Xcode from building 64-bit.
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (swizzleAllMethods):
+ (poseAsClass):
+ (prepareConsistentTestingEnvironment):
+ * DumpRenderTree/mac/DumpRenderTreeMac.h:
+ * DumpRenderTree/mac/DumpRenderTreePasteboard.h:
+ * DumpRenderTree/mac/DumpRenderTreePasteboard.m:
+ * DumpRenderTree/mac/DumpRenderTreeWindow.mm:
+ * DumpRenderTree/mac/PixelDumpSupportMac.mm:
+ (restoreColorSpace):
+ (failedGettingCurrentProfile):
+ (setDefaultColorProfileToRGB):
+
+2008-05-08 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Clean up Drosera so that it will build 64-bit.
+
+ * Drosera/mac/DebuggerApplication.mm:
+ (-[DebuggerApplication numberOfRowsInTableView:]): Use NSInteger rather than int.
+ (-[DebuggerApplication tableView:objectValueForTableColumn:row:]): Ditto.
+ * Drosera/mac/Drosera.xcodeproj/project.pbxproj: Use the default value for VALID_ARCHS.
+
+2008-05-07 David Kilzer <ddkilzer@apple.com>
+
+ Use File::Find and Getopt::Long in make-js-test-wrappers
+
+ Reviewed by Darin Adler.
+
+ * Scripts/make-js-test-wrappers:
+ - Updated Apple copyright statement.
+ - Added command-line switch parsing and -h|--help switch.
+ - Allowed user to pass list of files/directories on which to do
+ a restricted search for TEMPLATE.html files. The default
+ behavior is still to search the entire LayoutTests directory.
+ - Removed duplicate 'use strict' statement.
+ - Replaced use of `find` statements with File::Find::find().
+ - Remove unneeded chomp() calls now that we use File::Find.
+ (directoryFilter): Added. Filters .svn directories when used
+ with File::Find::find().
+ (findTemplateFiles): Added. Returns a list of TEMPLATE.html
+ files found.
+
+2008-05-05 Steve Falkenburg <sfalken@apple.com>
+
+ Copy dependencies of ImageDiff, DumpRenderTree in post-build step.
+
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+ * DumpRenderTree/win/ImageDiff.vcproj:
+
+2008-05-05 Adele Peterson <adele@apple.com>
+
+ Reviewed by Adam.
+
+ Look for the right ImageDiff executable for debug builds.
+
+ * Scripts/run-webkit-tests:
+
+2008-05-05 Darin Adler <darin@apple.com>
+
+ * Scripts/run-webkit-tests: Ignore a Java leak showing up in the WebKit
+ leak tests.
+
+2008-05-05 Ariya Hidayat <ariya.hidayat@trolltech.com>
+
+ Reviewed by Simon.
+
+ In the Qt's DumpRenderTree, adjust the web view properly (because W3C SVG
+ tests expect to be 480x360)
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::open):
+
+2008-05-02 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Adam Roben.
+
+ - add an option to svn-apply to set the reviewer name in change logs
+
+ * Scripts/svn-apply: Added a [-r|--reviewer name] option.
+
+2008-05-01 David Kilzer <ddkilzer@apple.com>
+
+ Clean up configuration usage in run-webkit-tests
+
+ Reviewed by Adam.
+
+ * Scripts/run-webkit-tests: Parse configuration switches using
+ passedConfiguration() from webkitdirs.pm like every other script.
+ Note that we must still call setConfiguration() afterwards in
+ case the --configuration switch was used. Use $configurationOption
+ when running build-dumprendertree instead of recreating the switch.
+
+2008-04-29 Adam Roben <aroben@apple.com>
+
+ Restore the beloved COMPtr::operator&
+
+2008-04-29 Adam Roben <aroben@apple.com>
+
+ Windows build fixes
+
+ Replace COMPtr::operator& with COMPtr::adoptionPointer.
+
+2008-04-25 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Fix run-webkit-tests --threading
+ and provisionally fix <https://bugs.webkit.org/show_bug.cgi?id=18661>
+ Proxy server issue in Sunday's Nightly
+
+ * DumpRenderTree/pthreads/JavaScriptThreadingPthreads.cpp:
+ (runJavaScriptThread):
+ (startJavaScriptThreads):
+ (stopJavaScriptThreads):
+ Spawned threads were immediately detached, unlike the original ones, so joining them
+ made no sense. Now, all threads are created detached, and stopJavaScriptThreads() just
+ waits for them all to exit.
+
+2008-04-28 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon.
+
+ Reset dumping resource load callbacks to false for the next test
+
+
+ * DumpRenderTree/qt/jsobjects.cpp:
+ (LayoutTestController::reset):
+
+2008-04-28 Tor Arne Vestbø <tavestbo@trolltech.com>
+
+ Reviewed by Simon.
+
+ Adapt to the latest API changes in WebKit/qt/Api.
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ * DumpRenderTree/qt/jsobjects.cpp:
+
+2008-04-26 Robin Dunn <robin@alldunn.com>
+
+ Reviewed by Kevin Ollivier.
+
+ Delete the DerivedSources after make clean has been done so that the DerivedSources
+ don't get re-created. Also, use the proper extension for the Win wxPython extension.
+
+ https://bugs.webkit.org/show_bug.cgi?id=18756
+
+ * wx/build-wxwebkit:
+
+2008-04-26 Adam Barth <hk9565@gmail.com>
+
+ Reviewed by Adam Roben and Sam Weinig.
+
+ Updates LayoutTestController to use host instead of domain.
+
+ Collin Jackson <collinj-webkit@collinjackson.com> also contributed to this patch.
+
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::setDatabaseQuota):
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate webView:frame:exceededDatabaseQuotaForSecurityOrigin:database:]):
+
+2008-04-26 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fix. Need the latest libpng. (Somehow my initial test passed without it.)
+
+ * wx/install-unix-extras:
+
+2008-04-26 Robin Dunn <robin@alldunn.com>
+
+ Reviewed by Kevin Ollivier.
+
+ Allow the user to set the path to SWIG using an environment variable.
+
+ https://bugs.webkit.org/show_bug.cgi?id=18660
+
+ * wx/build-wxwebkit:
+
+2008-04-26 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fix. Download the latest libpng version for building the
+ dependencies.
+
+ * wx/install-unix-extras:
+
+2008-04-25 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Simon.
+
+ Implement dumping of resource load callbacks to pass http/tests/xmlhttprequest/abort-should-cancel-load.html
+
+ Similar to Editing and Frameloading we do the dumping within WebCore
+
+
+ * DumpRenderTree/qt/jsobjects.cpp:
+ (LayoutTestController::dumpResourceLoadCallbacks):
+ * DumpRenderTree/qt/jsobjects.h:
+
+2008-04-24 Jan Michael Alonzo <jmalonzo@unpluggable.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ http://bugs.webkit.org/show_bug.cgi?id=18485
+ Typo and documentation fix for build-webkit
+
+ * Scripts/build-webkit:
+
+2008-04-24 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam.
+
+ Don't call fprintf from the signal handler.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (crashHandler):
+
+2008-04-23 Adam Roben <aroben@apple.com>
+
+ Make crashes be reported as crashes, not hangs
+
+ Reviewed by David Kilzer.
+
+ * Scripts/run-webkit-tests:
+ (top level): Use the new status field of the output from
+ readFromDumpToolWithTimer to determine if the test crashed or hung.
+ (sub readFromDumpToolWithTimer):
+ - If we fail to read a line and $! is not EAGAIN, then we've crashed
+ and should not try to read any more.
+ - Changed the timedout field to a more general status field.
+
+2008-04-22 David Kilzer <ddkilzer@apple.com>
+
+ Bug 18683: update-webkit returns 0 even if it fails
+
+ <https://bugs.webkit.org/show_bug.cgi?id=18683>
+
+ Reviewed by Mitz Pettel.
+
+ * Scripts/update-webkit:
+ (runSvnUpdate): Die if close() fails.
+
+2008-04-21 Adam Roben <aroben@apple.com>
+
+ Flush stdout/stderr after printing every #EOF separator
+
+ This fixes a hang when running the pixel tests on Windows
+
+ Reviewed by Mitz Pettel.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (dump):
+ (main): We don't have to flush stdout/stderr in the arguments loop
+ anymore, as runTest flushes for us.
+
+2008-04-21 Adam Roben <aroben@apple.com>
+
+ Fix pixel tests
+
+ * Scripts/run-webkit-tests:
+ (sub readFromDumpToolWithTimer): Use readline instead of read to
+ ensure that we don't read past the #EOF marker.
+
+2008-04-21 Holger Hans Peter Freyther <holger.freyther@trolltech.com>
+
+ Reviewed by Simon.
+
+ Build fix for Qt 4.3
+
+ * When building WebCore/internal make sure the QT_[BEGIN,END]_NAMESPACE is
+ always defined. Do this by adding defines to the compiler line
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+
+2008-04-19 Mike Hommey <glandium@debian.org>
+
+ Reviewed by Alp Toker.
+
+ Don't build GtkLauncher and DumpRenderTree with rpath.
+
+ * GNUmakefile.am:
+
+2008-04-18 Jan Michael Alonzo <jmalonzo@unpluggable.com>
+
+ Reviewed by Alp Toker.
+
+ http://bugs.webkit.org/show_bug.cgi?id=16620
+ [GTK] Autotools make dist and make check support
+
+ Cleanups.
+
+ * GNUmakefile.am:
+
+2008-04-18 Adam Roben <aroben@apple.com>
+
+ Drop the hang timer to 30 seconds
+
+ This matches what DRT/mac was using.
+
+ Reviewed by Mitz Pettel.
+
+ * Scripts/run-webkit-tests:
+
+2008-04-18 Adam Roben <aroben@apple.com>
+
+ Get rid of DRT's Watchdog
+
+ run-webkit-tests now detects hangs and samples DRT as needed.
+
+ Reviewed by Mitz Pettel.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Removed
+ Watchdog* files from the project.
+ * DumpRenderTree/Watchdog.cpp: Removed.
+ * DumpRenderTree/Watchdog.h: Removed.
+ * DumpRenderTree/mac/DumpRenderTree.mm: Removed uses of Watchdog
+ (dumpRenderTree):
+ (runTest):
+ * DumpRenderTree/mac/WatchdogMac.h: Removed.
+ * DumpRenderTree/mac/WatchdogMac.mm: Removed.
+ * Scripts/run-webkit-tests:
+ (sub testCrashedOrTimedOut): Call sampleDumpTool() if we timed out.
+ (sub sampleDumpTool): Added. Writes a sample report to
+ ~/Library/Logs/DumpRenderTree/HangReport.txt.
+
+2008-04-18 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Holger.
+
+ Adapt to the API changes in WebKit/qt
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::WebPage::WebPage):
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::initJSObjects):
+ (WebCore::DumpRenderTree::dumpFramesAsText):
+ (WebCore::DumpRenderTree::dump):
+
+2008-04-17 Adam Roben <aroben@apple.com>
+
+ Fix many tests on Windows
+
+ * Scripts/run-webkit-tests:
+ (readFromDumpToolWithTimer):
+ - Use read instead of sysread to ensure that we don't interfere with
+ other uses of buffered IO in this script.
+ (setFileHandleNonBlocking): Actually set the filehandle to blocking
+ when specified.
+
+2008-04-17 Adam Roben <aroben@apple.com>
+
+ Fix ~10 tests
+
+ * Scripts/run-webkit-tests: Only remove the newline after #EOF, not
+ whatever newline happens to be at the end of what we've read.
+
+2008-04-17 Adam Roben <aroben@apple.com>
+
+ Remove DRT/win's hang timer
+
+ run-webkit-tests takes care of this for us now
+
+ Reviewed by Anders Carlsson.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+
+2008-04-17 Adam Roben <aroben@apple.com>
+
+ Don't wait for the hang timer twice in the case of a hang
+
+ Previously we'd wait for a hang while reading both stdout and stderr
+ from DRT. Now we'll only wait for one or the other.
+
+ Reviewed by Anders Carlsson.
+
+ * Scripts/run-webkit-tests:
+ (top level): Don't wait for stderr to time out if stdout already timed
+ out.
+ (readFromDumpToolWithTimer): If $dontWaitForTimeOut is true, quit
+ after the first read that returns no data.
+
+2008-04-17 Adam Roben <aroben@apple.com>
+
+ Don't throw away the output from timed out tests
+
+ Reviewed by Anders Carlsson.
+
+ * Scripts/run-webkit-tests:
+ (top level): Updated for changes to readFromDumpToolWithTimer.
+ (readFromDumpToolWithTimer): Return a hash that contains both the
+ output and whether or not the test timed out.
+
+2008-04-17 Adam Roben <aroben@apple.com>
+
+ Make the hang timer 60 seconds
+
+ * Scripts/run-webkit-tests:
+
+2008-04-17 Adam Roben <aroben@apple.com>
+
+ Get rid of carriage returns in DRT/win's stderr
+
+ Reviewed by Eric Seidel.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (main): Mark stderr as binary like we already do for stdout.
+
+2008-04-17 Adam Roben <aroben@apple.com>
+
+ Fix Bug 17678: run-webkit-tests should have a watchdog timer (and
+ timeout long tests)
+
+ <https://bugs.webkit.org/show_bug.cgi?id=17678>
+
+ We now abort tests that take longer than 60 seconds to produce output.
+ This matches the watchdog timer in DRT/mac and DRT/win (which we can
+ now remove).
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/run-webkit-tests:
+ (top level): Read DRT's output using the new readFromDumpToolWithTimer
+ subroutine. If readFromDumpToolWithTimer returns undefined it means
+ the test timed out, so we register the test as a hang and move on.
+ (sub testCrashedOrTimedOut): Renamed from testCrashed. Now handles
+ both crashed and timed out tests. If the test timed out, we kill DRT
+ before returning.
+ (sub linksForTimedOutTest): Added. We don't have any output to link to for
+ tests that timed out.
+ (sub recordActualResultsAndDiff): Don't call length on undefined.
+ (sub readFromDumpToolWithTimer): Added. Performs non-blocking reads
+ from a filehandle until an #EOF is reached or
+ $maximumSecondsWithoutOutput have elapsed.
+ (sub setFileHandleNonBlocking): Marks a filehandle as blocking or
+ non-blocking.
+
+2008-04-17 Adam Roben <aroben@apple.com>
+
+ Refactor test results page generation
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/run-webkit-tests:
+ (sub htmlForResultsSection): Added. Takes a set of tests, a
+ description, and a subroutine to generate the links for each test, and
+ creates a HTML string containing a table of the tests and their
+ links.
+ (sub linksForExpectedAndActualResults): Added. Replaces the
+ htmlForExpectedAndActualResults subroutine.
+ (sub linksForMismatchTest): Added.
+ (sub linksForCrashOrErrorTest): Added.
+ (sub linksForNewTest): Added.
+
+2008-04-17 Adam Roben <aroben@apple.com>
+
+ Print the extension for all tests in the test results page
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/run-webkit-tests:
+
+2008-04-17 Adam Roben <aroben@apple.com>
+
+ Move code that counts finished tests into a subroutine
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/run-webkit-tests:
+ (sub countFinishedTest): Added.
+
+2008-04-17 Adam Roben <aroben@apple.com>
+
+ Move code that handles a crash into a subroutine
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/run-webkit-tests:
+ (sub testCrashed): Added.
+
+2008-04-17 Eric Seidel <eric@webkit.org>
+
+ Reviewed by hyatt.
+
+ Rename RenderView to RenderViewport in the next rename patch.
+
+ * Scripts/do-webcore-rename:
+
+2008-04-17 Mario Bensi <mbensi@pleyo.com>
+
+ Reviewed by Alp Toker.
+
+ http://bugs.webkit.org/show_bug.cgi?id=18543
+ DumpRenderTree gtk freeze
+
+ fix DumpRenderTree gtk freeze
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (dump):
+
+2008-04-15 Anders Carlsson <andersca@apple.com>
+
+ Add missing ;
+
+ * Scripts/build-webkit:
+
+2008-04-15 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam.
+
+ Add ENABLE_OFFLINE_WEB_APPLICATIONS to FEATURE_DEFINES.
+
+ * Scripts/build-webkit:
+
+2008-04-15 Andre Poenitz <andre.poenitz@trolltech.com>
+
+ Reviewed by Simon.
+
+ Fix compilation with Qt namespaces
+
+ Qt can be configured to have all of its classes inside a specified namespaces.
+ This is for example used in plugin/component environments like Eclipse.
+
+ This change makes it possible to let the Qt port compile against a namespaced
+ Qt by the use of macros Qt provides to properly forward declare Qt classes in
+ the namespace.
+
+ * DumpRenderTree/qt/DumpRenderTree.h:
+
+2008-04-08 Kevin Ollivier <kevino@theolliviers.com>
+
+ Reviewed by Darin Adler.
+
+ Add a script that propagates any file changes made to the Bakefiles
+ over to GTK and Qt build systems. Still needs to be wired into
+ those ports though.
+
+ * Scripts/update-sources-list.py: Added.
+
+2008-04-08 Mark Rowe <mrowe@apple.com>
+
+ Clean up after Brady.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm: Add an include so that NSInteger can be found.
+
+2008-04-08 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Mitzpettel
+
+ Fixed http://bugs.webkit.org/show_bug.cgi?id=18302
+ -WebArchive subresources dump in random order, intermittent failures
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (compareResourceURLs): Sorting function based on the resource URLs
+ (serializeWebArchiveToXML): Sort the subresource array
+
+2008-04-07 Brady Eidson <beidson@apple.com>
+
+ OMG, BUILD - please!
+
+ * Scripts/build-webkit:
+
+2008-04-03 Holger Hans Peter Freyther <holger.freyther@trolltech.com>
+
+ Reviewed by Simon.
+
+ * Enable running http tests for Qt again. Failing tests can be put into the skipped list.
+ * Running these tests on windows and other platforms might need some work.
+
+ * Scripts/run-webkit-tests:
+
+2008-04-03 Holger Hans Peter Freyther <holger.freyther@trolltech.com>
+
+ Reviewed by Simon.
+
+ * For the http tests we need the output of the FrameLoaderClient. The QtWebKit API
+ is not exporting enough to create the output in DRT itself. Settle with the approach
+ Lars has taken for the Editing support and add branches to our FrameLoaderClient code.
+ * run-webkit-tests http/tests(/loading) can now be executed.
+ * For tests in loading/ directories we are going to throw away the dirty
+ QWebPage to start with something clean.
+
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+
+2008-04-03 Holger Hans Peter Freyther <holger.freyther@trolltech.com>
+
+ Reviewed by Simon.
+
+ * Treat http and https as special URLs as well. Change the main.cpp and
+ DumpRenderTree.cpp to handle http and https URIs as input.
+ * I'm not doing the clean up and merging of these two checks now.
+
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::readStdin):
+ * DumpRenderTree/qt/main.cpp:
+ (main):
+
+2008-04-03 Holger Hans Peter Freyther <holger.freyther@trolltech.com>
+
+ Reviewed by Simon.
+
+ * Remove dumpFrameLoadCallbacks from simple-subframe.html because it is
+ located in a directory with the name "loading". And this will autoamtically
+ enable dumping.
+ * Remove this method from the LayoutTestController as it is unused now and this
+ avoids adding it to the DRT of the Qt port.
+
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (setPrivateBrowsingEnabledCallback):
+
+2008-04-01 Christian Dywan <christian@imendio.com>
+
+ Build fix for GCC 4.3.
+
+ * DumpRenderTree/gtk/WorkQueueItemGtk.cpp: include string.h
+
+2008-04-01 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Holger.
+
+ Fix Qt DRT run by also printing EOF on stderr, as expected by
+ run-webkit-tests.
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::dump):
+
+2008-03-31 Julien Chaffraix <julien.chaffraix@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 17665: determineSourceDir() dies if $sourceDir has a trailing backslash
+
+ Remove trailing '/' in $sourceDir in determineSourceDir().
+
+ Fix suggested by Dmitriy Kazachkov.
+
+ * Scripts/webkitdirs.pm:
+
+2008-03-29 Adam Roben <aroben@apple.com>
+
+ Update for rename of an IWebViewPrivate method
+
+ Reviewed by Mitz Pettel.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (createWebViewAndOffscreenWindow):
+
+2008-03-26 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Anders.
+
+ Enable SVG animation support by default.
+
+ * Scripts/build-webkit:
+
+2008-03-25 Adam Roben <aroben@apple.com>
+
+ Windows build fix
+
+ * DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj:
+ Add $(WebKitLibrariesDir)\include to the include path so we can find
+ stdint.h there.
+
+2008-03-24 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Mark.
+
+ Clean up SVG features message to be less confusing.
+
+ * Scripts/build-webkit:
+
+2008-03-24 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dave Hyatt.
+
+ Add EventSender.zoomPageIn/zoomPageOut support to DRT.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetWebViewToConsistentStateBeforeTesting):
+ * DumpRenderTree/mac/EventSendingController.mm:
+ (+[EventSendingController isSelectorExcludedFromWebScript:]):
+ (-[EventSendingController zoomPageIn]):
+ (-[EventSendingController zoomPageOut]):
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (resetWebViewToConsistentStateBeforeTesting):
+ * DumpRenderTree/win/EventSender.cpp:
+ (textZoomInCallback):
+ (textZoomOutCallback):
+ (zoomPageInCallback):
+ (zoomPageOutCallback):
+
+2008-03-24 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ - update bisect-builds for Safari 3.1
+
+ * Scripts/bisect-builds: Added Safari 3.1 and the corresponding minimal
+ revision, r29711.
+
+2008-03-21 Rodney Dawes <dobey@wayofthemonkey.com>
+
+ Reviewed by Holger.
+
+ http://bugs.webkit.org/show_bug.cgi?id=17981
+
+ Add webcore and javascriptcore cppflags to programs' _CPPFLAGS.
+
+ * GNUmakefile.am:
+
+2008-03-21 Adam Roben <aroben@apple.com>
+
+ Remove a non-working mirror from cygwin-downloader and add the ruby package
+
+ * CygwinDownloader/cygwin-downloader.py:
+ * CygwinDownloader/cygwin-downloader.zip: Updated.
+
+2008-03-20 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Ensure that the defines generated for FEATURE_DEFINES are sorted so that they will match the default settings of each project.
+ This will prevent the world from being rebuilt if you happen to switch between building in Xcode and with build-webkit on the
+ command-line.
+
+ * Scripts/build-webkit:
+
+2008-03-17 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ Fix bogus argCount check breaking plugin test.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
+
+2008-03-17 Eric Seidel <eric@webkit.org>
+
+ Reviewed by darin.
+
+ Cleanup PluginObject.cpp and add support for testing
+ converting from int -> identifier -> string
+ and from string -> identifier -> int
+ as well as round-tripping ints and stings through identifiers
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
+ (pluginGetProperty):
+ (pluginSetProperty):
+ (testDOMAccess):
+ (stringVariantToIdentifier):
+ (int32VariantToIdentifier):
+ (doubleVariantToIdentifier):
+ (variantToIdentifier):
+ (testIdentifierToString):
+ (testIdentifierToInt):
+ (testCallback):
+ (getURL):
+ (removeDefaultMethod):
+ (getURLNotify):
+ (testInvokeDefault):
+ (destroyStream):
+ (testEnumerate):
+ (testGetIntIdentifier):
+ (testGetProperty):
+ (testEvaluate):
+ (testGetPropertyReturnValue):
+ (pluginInvoke):
+ (pluginInvokeDefault):
+ (pluginInvalidate):
+ (pluginAllocate):
+ (pluginDeallocate):
+ (handleCallback):
+
+2008-03-16 Kevin Ollivier <kevino@theolliviers.com>
+
+ Rubber stamped by Darin Adler.
+
+ Add set-webkit-configuration support for wx port, and centralize
+ build dir location setting.
+
+ http://bugs.webkit.org/show_bug.cgi?id=17790
+
+ * wx/browser/browser.bkl:
+ * wx/build-wxwebkit:
+
+2008-03-15 Darin Adler <darin@apple.com>
+
+ * Scripts/commit-log-editor: Include the name line of the change log entry.
+ A long time ago I designed this script to not include the name because I
+ thought it was redundant (same as the name of the person checking in), but
+ nowadays it's more common for someone to check something in done by someone
+ else.
+
+ * Scripts/do-webcore-rename: Added some more planned renames and removed
+ some that were already done "by hand".
+
+2008-03-13 Brent Fulgham <bfulgham@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ Correct paths to vsprops files so they use the environment
+ variable, rather than hard-coded path.
+ http://bugs.webkit.org/show_bug.cgi?id=17797.
+
+ * WinLauncher/WinLauncher.vcproj: Correct paths to vsprops.
+
+2008-03-12 Steve Falkenburg <sfalken@apple.com>
+
+ VSExpress build fix
+
+ * WinLauncher/WinLauncher.vcproj:
+
+2008-03-12 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Alp Toker.
+
+ Run testkjs in the correct productsDir in the GTK+ port.
+
+ * Scripts/run-javascriptcore-tests:
+
+2008-03-11 Brent Fulgham <bfulgham@gmail.com>
+
+ Reviewed by Adam Roben.
+
+ Enabled WinLauncher as part of normal Windows build.
+ http://bugs.webkit.org/show_bug.cgi?id=17715.
+
+ * WinLauncher/WinLauncher.vcproj: Update to use vsprops so that
+ it can find the proper libraries to link against.
+
+2008-03-10 Julien Chaffraix <julien.chaffraix@gmail.com>
+
+ Reviewed and landed by Darin Adler.
+
+ http://bugs.webkit.org/show_bug.cgi?id=17581
+ Bug 17581: Use of uninitialized value in string ne at WebKitTools/Scripts/run-webkit-tests line 1576.
+
+ Remove the previous warning which occurs when the --random option is used.
+
+ * Scripts/run-webkit-tests: verify that $component[0] is defined before checking for
+ its inequality
+
+2008-03-07 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Done with Lars.
+
+ Ported the netscape test plugin to QWebPluginFactory.
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::WebPage::WebPage):
+ * DumpRenderTree/qt/main.cpp:
+ * DumpRenderTree/qt/testplugin.cpp:
+ (TestPlugin::plugins):
+ (TestPlugin::create):
+ * DumpRenderTree/qt/testplugin.h:
+
+2008-03-09 Steve Falkenburg <sfalken@apple.com>
+
+ Stop Windows build if an error occurs in a prior project.
+
+ Rubber stamped by Darin Adler.
+
+ * Drosera/win/Drosera.vcproj/Drosera.vcproj:
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+ * DumpRenderTree/win/ImageDiff.vcproj:
+ * DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj:
+
+2008-03-08 Julien Chaffraix <julien.chaffraix@gmail.com>
+
+ Reviewed by Mark Rowe.
+
+ DRT build fix for Tiger.
+
+ * DumpRenderTree/mac/DumpRenderTreeMac.h: Define BUILDING_ON_TIGER.
+
+2008-03-07 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fix WebKit build with GCC 4.2.
+
+ * DumpRenderTree/mac/ResourceLoadDelegate.mm: Use correct argument type in method signature.
+
+2008-03-07 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Oliver.
+
+ Add Windows part of <rdar://problem/5693690>
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (dump):
+ (main):
+
+2008-03-07 Alp Toker <alp@atoker.com>
+
+ Back out the r30818, r30819 build fix attempts now the GTK+ build
+ server has been upgraded.
+
+ * Scripts/webkitdirs.pm:
+
+2008-03-07 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Geoff.
+
+ <rdar://problem/5693690> run-webkit-tests swallows STDERR output, including WebCore LEAK messages
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dump): push EOF to stderr after every test
+ * Scripts/run-webkit-tests: collect stderr output and print it
+
+2008-03-07 Steve Falkenburg <sfalken@apple.com>
+
+ Get pdevenv working with Visual Studio Express.
+
+ Reviewed by Adam.
+
+ * Scripts/pdevenv:
+
+2008-03-06 Adele Peterson <adele@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Updated for testing <rdar://problem/5785895> Implement hasFocus() for HTMLDocument (HTML5)
+
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate webViewFocus:]): Remove duplicate code that was also in LayoutTestController::setWindowIsKey
+ (-[UIDelegate webViewUnfocus:]): Added. In Safari, the default is to focus another window if there is one.
+ To easily test cases where the window is unfocused, I made this just call setWindowIsKey(false).
+
+2008-03-06 Matt Lilek <webkit@mattlilek.com>
+
+ Reviewed by Adam Roben.
+
+ Bug 17691: REGRESSION: FindSafari doesn't work
+ http://bugs.webkit.org/show_bug.cgi?id=17691
+
+ Swap my change from r30394 to use the Release libraries instead of Debug
+ since some machines don't have the Debug version.
+
+ * FindSafari/FindSafari.vcproj:
+
+2008-03-06 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Sam and Tim.
+
+ <rdar://5631450> Drosera: breakpoint indicators disappear after the
+ script is finished running.
+ - If there is a pre-existing breakpoint on a line when the file is
+ updated we need to redraw it.
+
+ * Drosera/debugger.js:
+
+2008-03-06 Brady Eidson <beidson@apple.com>
+
+ Tiger build fix...?
+
+ * DumpRenderTree/mac/WatchdogMac.mm:
+
+2008-03-06 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin
+
+ Added a cross-platform Watchdog thread to DRT.
+
+ The current watchdog in both DRTWin and DRTMac is Timer based. Therefore, deadlocks and long running
+ main thread hangs still affect DRT.
+
+ By placing the watchdog on a thread and having DRT "check in" after each test, long-running hangs
+ and true deadlocks can be caught.
+
+ There is one hook for platform specific code. As I did my development and testing on Mac, and Mac has
+ `sample` available, the Mac implementation of this hook samples the process before it is killed.
+
+ I arbitrarily chose 30 seconds as the timeout for now - this can be tweaked easily if we find a need.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/mac/Configurations/Base.xcconfig: Added LINKER_DISPLAYS_MANGLED_NAMES
+
+ * DumpRenderTree/ForwardingHeaders/wtf/Locker.h: Added.
+ * DumpRenderTree/ForwardingHeaders/wtf/Threading.h: Added.
+
+ * DumpRenderTree/Watchdog.cpp: Added.
+ (Watchdog::Watchdog):
+ (Watchdog::~Watchdog):
+ (Watchdog::start):
+ (Watchdog::stop):
+ (Watchdog::checkIn):
+ (Watchdog::setWatchdogInterval):
+ (Watchdog::handleHang):
+ (Watchdog::watchdogThreadStart):
+ (Watchdog::watchdogThread):
+ * DumpRenderTree/Watchdog.h: Added.
+
+ * DumpRenderTree/mac/WatchdogMac.h: Added.
+ * DumpRenderTree/mac/WatchdogMac.mm: Added.
+ (WatchdogMac::handleHang): Sample the process and write it out to a file
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dumpRenderTree): Setup and start the watchdog before running any tests
+ (runTest): Checkin with the watchdog after each test
+
+2008-03-05 Alp Toker <alp@atoker.com>
+
+ Attempt to get the autotools build working again on the bot with
+ build-webkit.
+
+ Force the use of /bin/bash since we seem to have bash-isms in the
+ configure script right now.
+
+ * Scripts/webkitdirs.pm:
+
+2008-03-05 Alp Toker <alp@atoker.com>
+
+ Re-attempt to switch to the autotools build system for GTK+.
+
+ Change scripts to continue when distclean fails.
+
+ * Scripts/webkitdirs.pm:
+
+2008-03-05 Alp Toker <alp@atoker.com>
+
+ Force qmake for the GTK+ build until we get the build bot to succeed
+ with autotools (currently dies at make distclean)
+
+ * Scripts/webkitdirs.pm:
+
+2008-03-04 Alp Toker <alp@atoker.com>
+
+ Reviewed by Mark Rowe.
+
+ Switch the default GTK+ build system from qmake to autotools.
+
+ qmake can still be used by defining WEBKIT_BUILD_SYSTEM=qmake
+
+ * Scripts/build-webkit:
+ * Scripts/run-launcher:
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm:
+
+2008-03-04 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ * Scripts/do-webcore-rename: Update renaming plan.
+
+2008-03-02 Brent Fulgham <bfulgham@gmail.com>
+
+ Reviewed by Alp Toker.
+
+ Remove some needless LIBS.
+
+ * GNUmakefile.am:
+
+2008-03-02 Alp Toker <alp@atoker.com>
+
+ Reviewed by Mark Rowe.
+
+ Split the WebKit GTK+ build out of the WebCore build and change the
+ shared object name to match the package name.
+
+ * GNUmakefile.am:
+
+2008-03-01 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Update Xcode configuration to support building debug and release from the mysterious future.
+
+ * DumpRenderTree/mac/Configurations/Base.xcconfig:
+
+2008-02-29 David Kilzer <ddkilzer@apple.com>
+
+ Pass the correct configuration switch (--Debug|--Release) to build-testkjs.
+
+ Reviewed by Dan.
+
+ Originally broken in r26838.
+
+ * Scripts/run-javascriptcore-tests: Push configuration switch onto @xcodeArgs
+ not local, unused @args variable.
+
+2008-02-29 David Kilzer <ddkilzer@apple.com>
+
+ Bug 15754: webarchive layout tests fail when WebKit directory path contains symlinks
+
+ <http://bugs.webkit.org/show_bug.cgi?id=15754>
+
+ Reviewed by Geoff and Darin.
+
+ We were using -[NSFileManager currentDirectoryPath] to get the current working directory,
+ then removing that path from all file:/// URLs in the WebArchive output so these tests
+ would pass no matter where they were run.
+
+ The problem was that -[NSFileManager currentDirectoryPath] resolves symlinks in the
+ current working directory, but the WebArchive does not. This left the current working
+ directory in all file:/// URLs in the test output, and thus all tests failed, for any
+ developer that used symlinks to get to their WebKit source directory.
+
+ The fix is to look backwards for "/LayoutTests/" in the URL we're passed, and simply
+ remove the current working directory path (no matter what it is) after "file://" but
+ before "/LayoutTests/".
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (normalizeWebResourceURL): Removed unused oldURLBase argument. We now replace the
+ current working directory as described above.
+ (convertWebResourceResponseToDictionary): Remove unused oldURLBase argument. Update
+ calls to normalizeWebResourceURL().
+ (serializeWebArchiveToXML): Removed now unused cwdURL variable. Update calls to
+ normalizeWebResourceURL() and convertWebResourceResponseToDictionary().
+
+2008-02-26 Robin Dunn <robin@alldunn.com>
+
+ Reviewed by Kevin Ollivier.
+
+ Improvements to the wx build script.
+
+ http://bugs.webkit.org/show_bug.cgi?id=17492
+
+ * wx/build-wxwebkit:
+ - Update the Windows dll copying logic to copy dlls inside WebKitLibraries/win
+ - Allow the build script to properly find wxPython includes under different setups
+ - Make sure WX_PREFIX is set to WXWIN (wxWindows dir environment var.) if not defined
+
+2008-02-26 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Darin Adler.
+
+ * Scripts/build-webkit: Add --universal and --64-bit flags to make building
+ 64-bit architectures easy. Combine the two flags to build 4-way universal.
+ * Makefile: Add "64" and "64u" make rules. Fix the universal rule to return
+ non-zero when the build failes.
+
+2008-02-26 Jessica Kahn <jess@apple.com>
+
+ Reviewed by Darin Adler.
+
+ * Scripts/gdb-safari: Set WEBKIT_UNSET_DYLD_FRAMEWORK_PATH in gdb's environment,
+ so that Safari inherits it when launched. Preexisting code in WebKit checks this
+ environment variable, and if set, unsets DYLD_FRAMEWORK_PATH, so that applications
+ launched by Safari continue to use the standard system WebKit.
+
+2008-02-25 Adam Roben <aroben@apple.com>
+
+ Fix run-webkit-tests after r30394
+
+ * Scripts/webkitdirs.pm: Never append _debug to FindSafari's
+ executable name.
+
+2008-02-24 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Make some updates based on a trial run of
+ the renaming script.
+
+2008-02-24 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: More renaming plans.
+
+2008-02-23 Jan Michael Alonzo <jmalonzo@unpluggable.com>
+
+ Rubber stamped by Darin Adler.
+
+ Add separator '\' after libJavaScriptCore_la_LIBADD and cleanup
+ whitespaces introduced in the previous commit.
+
+ * GNUmakefile.am:
+
+2008-02-23 Jan Michael Alonzo <jmalonzo@unpluggable.com>
+
+ Rubber-stamped by Darin Adler.
+
+ * GNUmakefile.am: Add both GLOBALDEPS and WEBKITDEPS instead of DEPENDENCIES.
+
+2008-02-23 David Kilzer <ddkilzer@apple.com>
+
+ Please clarify licensing for some files
+ <http://bugs.webkit.org/show_bug.cgi?id=14970>
+
+ Reviewed by Darin Adler.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp: Added
+ copyright statement. Replaced license with newer Apple BSD-style license.
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h: Ditto.
+ * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.cpp: Ditto.
+ * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.h: Ditto.
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp: Ditto.
+ * DumpRenderTree/win/TestNetscapePlugin/main.c: Ditto.
+ * mangleme/LICENSE: Added (LGPL).
+
+2008-02-22 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam.
+
+ <rdar://problem/5748781>
+ https://bugs.webkit.org/show_bug.cgi?id=17413
+ REGRESSION: Latest Nightly doesn't load Java plugin w/Safari 3.1b
+
+ Copy the Java plug-in over to the new location.
+
+ * FindSafari/FindSafari.cpp:
+ (_tmain):
+
+2008-02-22 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam.
+
+ <rdar://problem/5747325> REGRESSION: HTTP layout tests hang
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (runTest):
+ Init the URL request with the correct timeout.
+
+2008-02-21 Mike Auty <mike.auty@gmail.com>
+
+ Reviewed by Alp Toker.
+
+ http://bugs.webkit.org/show_bug.cgi?id=17445
+ [GTK] WebKit doesn't compile with LDFLAGS="-Wl,--as-needed"
+
+ GTK+/autotools build system improvements
+
+ The GNUmakefile.am files make use of the LDFLAGS variable to include library
+ additions such as -ljpeg etc. Unfortunately, if these inclusions aren't made
+ in LIBADD/LDADD variables, then they are mis-ordered during the linking.
+
+ The as-needed flag discards libraries whose functions have not been needed by
+ earlier libraries, which therefore makes the ordering important.
+
+ This moves all -l library inclusion statements from LDFLAGS variables to
+ LIBADD/LDADD variables.
+
+ * GNUmakefile.am:
+
+2008-02-20 Brent Fulgham <bfulgham@gmail.com>
+
+ Reviewed by Alp.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=17428
+ Reenable a Windows-based launcher
+
+ This patch reenables the venerable Spinneret application,
+ changing its name to match the other lanch applications.
+
+ * WinLauncher: Added.
+ * WinLauncher/WinLauncher.cpp: Added.
+ (WinLauncherWebHost::updateAddressBar):
+ (WinLauncherWebHost::QueryInterface):
+ (WinLauncherWebHost::AddRef):
+ (WinLauncherWebHost::Release):
+ (resizeSubViews):
+ (_tWinMain):
+ (MyRegisterClass):
+ (InitInstance):
+ (WndProc):
+ (MyEditProc):
+ (About):
+ (loadURL):
+ * WinLauncher/WinLauncher.h: Added.
+ (WinLauncherWebHost::WinLauncherWebHost):
+ (WinLauncherWebHost::didStartProvisionalLoadForFrame):
+ (WinLauncherWebHost::didReceiveServerRedirectForProvisionalLoadForFrame):
+ (WinLauncherWebHost::didFailProvisionalLoadWithError):
+ (WinLauncherWebHost::didCommitLoadForFrame):
+ (WinLauncherWebHost::didReceiveTitle):
+ (WinLauncherWebHost::didReceiveIcon):
+ (WinLauncherWebHost::didFinishLoadForFrame):
+ (WinLauncherWebHost::didFailLoadWithError):
+ (WinLauncherWebHost::didChangeLocationWithinPageForFrame):
+ (WinLauncherWebHost::willPerformClientRedirectToURL):
+ (WinLauncherWebHost::didCancelClientRedirectForFrame):
+ (WinLauncherWebHost::willCloseFrame):
+ (WinLauncherWebHost::windowScriptObjectAvailable):
+ * WinLauncher/WinLauncher.ico: Added.
+ * WinLauncher/WinLauncher.rc: Added.
+ * WinLauncher/WinLauncher.vcproj: Added.
+ * WinLauncher/resource.h: Added.
+ * WinLauncher/small.ico: Added.
+ * WinLauncher/stdafx.cpp: Added.
+ * WinLauncher/stdafx.h: Added.
+
+2008-02-19 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Geoff
+
+ Fixed a bug in DRT --threaded mode
+
+ * DumpRenderTree/pthreads/JavaScriptThreadingPthreads.cpp:
+ (startJavaScriptThreads): Don't detach the newly created thread. The later call to stopJavaScriptThreads() tries
+ to pthread_join() each thread that had been created, but you can't join a detached thread!
+
+2008-02-18 Brady Eidson <beidson@apple.com>
+
+ Changes by Geoff Garen, Reviewed by Darin
+
+ Fix for <rdar://5747529> - ObjC Exception can cause JSLock to never be released
+
+ DRT changes for test: platform/mac/plugins/webScriptObject-exception-deadlock.html
+
+ [WebScriptObject valueForKey:] might throw an exception, and previously might have "leaked" the global JSLock
+ This test calls valueForKey, then runs some arbitrary Javascript on a 2ndary thread. If the lock has leaked,
+ this series of method calls will deadlock. If things are good, it will complete successfully.
+
+ * DumpRenderTree/mac/ObjCController.m:
+ (runJavaScriptThread):
+ (+[ObjCController isSelectorExcludedFromWebScript:]):
+ (+[ObjCController webScriptNameForSelector:]):
+ (-[ObjCController testValueForKey]):
+
+2008-02-18 Matt Lilek <webkit@mattlilek.com>
+
+ Reviewed by Adam.
+
+ Remove FindSafari's Release configuration.
+
+ * FindSafari/FindSafari.vcproj:
+
+2008-02-15 Adam Roben <aroben@apple.com>
+
+ Fix a typo that broke the Mac build
+
+ Reviewed by Mark.
+
+ * Scripts/build-webkit:
+
+2008-02-14 Adam Roben <aroben@apple.com>
+
+ Turn on cross-document messaging support by default
+
+ Reviewed by Darin Adler.
+
+ * Scripts/build-webkit:
+
+2008-02-14 Adam Roben <aroben@apple.com>
+
+ Conditionalize cross-document messaging support
+
+ The cross-document messaging parts of HTML 5 are in flux and we want
+ ports to be able to turn off the support as needed.
+
+ Note that the support is turned off by default right now. A subsequent
+ commit will turn it on by default.
+
+ Reviewed by Darin Adler.
+
+ * Scripts/build-webkit:
+
+2008-02-14 Darin Adler <darin@apple.com>
+
+ - fix Windows build
+
+ * DumpRenderTree/win/UIDelegate.cpp:
+ (UIDelegate::setStatusText): Update parameter types to match declaration.
+
+2008-02-14 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Geoff G and Weinig.
+
+ Add ability for DRT to report tests setting the status text.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (dumpStatusCallbacksCallback):
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate webView:setStatusText:]):
+ * DumpRenderTree/win/UIDelegate.cpp:
+ * DumpRenderTree/win/UIDelegate.h:
+
+2008-02-13 Adam Roben <aroben@apple.com>
+
+ Windows build fix
+
+ * DumpRenderTree/ForwardingHeaders/wtf/MathExtras.h: Added.
+
+2008-02-13 Adam Roben <aroben@apple.com>
+
+ Windows/GTK+ build fix
+
+ * DumpRenderTree/LayoutTestController.cpp: #include MathExtras.h to
+ get isnan.
+
+2008-02-13 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Darin Adler
+
+ Add some much needed Database support to DRT
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (dumpDatabaseCallbacksCallback): Flag to control if the UIDelegate methods related to
+ databases are called
+ (clearAllDatabasesCallback): Allow a test to delete all databases
+ (setDatabaseQuotaCallback): Allow a test to set the quota new origins will get
+ (LayoutTestController::staticFunctions):
+
+ * DumpRenderTree/LayoutTestController.h:
+ (LayoutTestController::dumpDatabaseCallbacks):
+ (LayoutTestController::setDumpDatabaseCallbacks):
+
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::clearAllDatabases):
+ (LayoutTestController::setDatabaseQuota):
+
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::clearAllDatabases): Stubbed out
+ (LayoutTestController::setDatabaseQuota): Ditto
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::clearAllDatabases): Stubbed out with error message
+ (LayoutTestController::setDatabaseQuota): Ditto
+
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate webView:frame:exceededDatabaseQuotaForSecurityOrigin:database:]): Print a
+ message with details about the event then return a 5mb quota like before
+
+
+2008-02-12 Steve Falkenburg <sfalken@apple.com>
+
+ Changes to support merged MIDL output.
+
+ All COM interfaces are now generated to WebKit.h.
+
+ Reviewed by Sam, Ada.
+
+ * Drosera/win/BaseDelegate.h:
+ * Drosera/win/DebuggerClient.cpp:
+ * Drosera/win/DebuggerDocumentPlatform.cpp:
+ * Drosera/win/Drosera.cpp:
+ * Drosera/win/ServerConnection.cpp:
+ * Drosera/win/ServerConnection.h:
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ * DumpRenderTree/win/EditingDelegate.h:
+ * DumpRenderTree/win/EventSender.cpp:
+ * DumpRenderTree/win/FrameLoadDelegate.cpp:
+ * DumpRenderTree/win/FrameLoadDelegate.h:
+ * DumpRenderTree/win/GCControllerWin.cpp:
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ * DumpRenderTree/win/PolicyDelegate.h:
+ * DumpRenderTree/win/ResourceLoadDelegate.h:
+ * DumpRenderTree/win/UIDelegate.cpp:
+ * DumpRenderTree/win/UIDelegate.h:
+ * DumpRenderTree/win/WorkQueueItemWin.cpp:
+
+2008-02-10 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ - fix a memory leak
+
+ * DumpRenderTree/cg/ImageDiffCG.cpp:
+ (getDifferenceBitmap): Use a static CFMutableData instead of allocating
+ and leaking the buffer each time.
+
+2008-02-07 Adam Roben <aroben@apple.com>
+
+ Fix error in bisect-builds when responding "broken" for the first
+ build
+
+ Reviewed by Dave Kilzer.
+
+ * Scripts/bisect-builds: Only try to test the build if the nightly
+ info for the current index has not been deleted.
+
+2008-02-07 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Fixed two minor typos in the --root option, to get it working.
+
+ * Scripts/run-sunspider:
+ 1. Actually assign the function argument to our local variable.
+ 2. Actually set the $root variable, so we don't try to build later.
+
+2008-02-05 Oliver Hunt <oliver@apple.com>
+
+ RS=Eric.
+
+ Re-enable foreignObject by default as it is needed for a number of non-fO
+ related SVG tests and none of the old known crashes occur anymore.
+
+ * Scripts/build-webkit:
+
+2008-02-05 Steve Falkenburg <sfalken@apple.com>
+
+ Build fix. Don't override intermediate directory.
+
+ * Drosera/win/Drosera.vcproj/Drosera.vcproj:
+
+2008-02-05 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Build fix for Windows. willCloseFrame is a pure virtual and we are
+ forced to have an implementation.
+
+ This partially reverts r30014.
+
+ * DumpRenderTree/win/FrameLoadDelegate.cpp:
+ (FrameLoadDelegate::willCloseFrame):
+ * DumpRenderTree/win/FrameLoadDelegate.h:
+
+2008-02-05 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Holger.
+
+ Don't build wrapper for SVGTestCase.js (special file for svg/dynamic-updates)
+
+ * Scripts/make-js-test-wrappers:
+
+2008-02-05 Holger Freyther <zecke@selfish.org>
+
+ Reviewed by Darin Adler.
+
+ In http://bugs.webkit.org/show_bug.cgi?id=16853 it was identified that the
+ the output of the willCloseFrame and didClearWindowObject FrameLoadDelegate
+ depends on the order the tests are executed.
+
+ Propose to remove willCloseFrame and didlCearWindowObject output from the
+ FrameLoadDelegate and update the test results. The output of didClearWindowObject
+ is not interesting for any of the current tests and we have other ways to find
+ out if a frame was closed or not.
+
+ * DumpRenderTree/mac/FrameLoadDelegate.mm:
+ * DumpRenderTree/win/FrameLoadDelegate.cpp:
+ (FrameLoadDelegate::didClearWindowObject):
+ * DumpRenderTree/win/FrameLoadDelegate.h:
+
+2008-02-04 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Workaround for http://bugs.webkit.org/show_bug.cgi?id=16842
+ Bug 16842: Hang in DRT in leaks mode due to signal handler doing unsafe things
+
+ Don't install the signal handler unless we are running the pixel tests.
+ It is currently only used to restore the color profile, but by catching
+ signals we can trigger a deadlock in DRT while running leak tests.
+ The deadlock is tracked by http://bugs.webkit.org/show_bug.cgi?id=16842,
+ and a more complete fix will need to be developed to address this for
+ pixel tests as well.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dumpRenderTree):
+
+2008-02-04 Mark Rowe <mrowe@apple.com>
+
+ Gtk qmake build fix.
+
+ * Scripts/webkitdirs.pm: Fix perl's complaint about an odd number of elements in anonymous hash.
+
+2008-02-04 Jan Michael Alonzo <jmalonzo@unpluggable.com>
+
+ Reviewed by Alp Toker and Mark Rowe.
+
+ http://bugs.webkit.org/show_bug.cgi?id=16618
+ [GTK] build-webkit and run-webkit-tests autootools support
+
+ * Scripts/build-webkit: added --database and --icon-database options
+ * Scripts/run-launcher:
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm:
+
+2008-02-04 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Steve F.
+
+ Partial fix for <rdar://5621244> Drag & Drop doesn't work correctly in DRT
+
+ Implement required DRT functionality to allow majority of Drag and Drop testcases to work.
+ Issues include:
+ * Uses Sleep() to implement leapForward reliably.
+ * 3 DND tests still fail for reasons that i have not yet determined
+ * Has to explicitly ignore an extraneous WM_MOUSELEAVE that i am at a loss to explain
+
+ * DumpRenderTree/win/EventSender.cpp:
+ (leapForwardCallback):
+ (mouseDownCallback):
+ (doMouseUp):
+ (mouseUpCallback):
+ (doMouseMove):
+ (mouseMoveToCallback):
+ Minor updates to these functions to handle the different message queue structure.
+
+ (replaySavedEvents):
+ More complicated now. Where possible we just use the old while-loop model of execution,
+ but when leapForward has been used we have to jump through some hoops and set up an
+ inner event loop so that we can ensure messages get the correct time stamp.
+
+ * DumpRenderTree/win/UIDelegate.cpp:
+ (UIDelegate::doDragDrop):
+ Call replaySavedEvents directly to force synchronous handling of drag and drop.
+
+2008-02-04 Rodney Dawes <dobey@wayofthemonkey.com>
+
+ Reviewed by Alp Toker and Mark Rowe.
+
+ Fix http://bugs.webkit.org/show_bug.cgi?id=17175.
+ Bug 17175: Use of C++ compiler flags in CFLAGS
+
+ * GNUmakefile.am: Use global_cxxflags as well as global_cflags in CXXFLAGS.
+
+2008-02-04 Darin Adler <darin@apple.com>
+
+ Reviewed by Geoff.
+
+ * Scripts/make-js-test-wrappers: Look at the whole LayoutTests tree, not just the fast
+ and svg subdirectories. Added some more exceptions for the benefit of the fast/dom
+ subdirectory.
+
+2008-02-04 Adam Roben <aroben@apple.com>
+
+ Windows Apple-only build fix
+
+ * DumpRenderTree/win/DumpRenderTree.vcproj: Added a new include
+ directory.
+
+2008-02-04 Alp Toker <alp@atoker.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ Remove all trailing whitespace in the GTK+ port and related
+ components.
+
+ * DumpRenderTree/gtk/DumpRenderTreeGtk.h:
+ * DumpRenderTree/gtk/GCControllerGtk.cpp:
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ * GNUmakefile.am:
+
+2008-02-01 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Oliver.
+
+ Also search LayoutTests/svg for js-based tests.
+
+ * Scripts/make-js-test-wrappers:
+
+2008-01-31 Alp Toker <alp@atoker.com>
+
+ Rubber-stamped by Adam Roben.
+
+ http://bugs.webkit.org/show_bug.cgi?id=17006
+ [GTK] Header path should be webkit/webkit.h
+
+ Move the GTK+ API sources as needed and update the build systems.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ * DumpRenderTree/gtk/DumpRenderTreeGtk.h:
+ * DumpRenderTree/gtk/WorkQueueItemGtk.cpp:
+ * GNUmakefile.am:
+ * GtkLauncher/main.c:
+
+2008-01-30 Stephanie <slewis@apple.com>
+
+ Reviewed by Geoff.
+
+ Add an option to run-webkit-tests to merge leaks results and print the number of unique leaks found under a certain call depth. This should make it easier for the buildbots to track new leaks.
+
+ * Scripts/run-webkit-tests:
+
+2008-01-30 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ One more debug (external) fix.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp: TestNetscapePlugin is built with a _debug suffix in both DebugInternal
+ and Debug configurations.
+
+2008-01-29 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig. Sam Weinig.
+
+ Fixed <rdar://problem/5692566> fast/encoding/mailto-always-utf-8.html
+ fails when run after fast/dom/Window/window-property-shadowing.html (16902)
+
+ Modified our policy delegates not to output window.name. Since a
+ previous test may have explicitly set window.name, we can't rely on its
+ implicit value in test results.
+
+ * DumpRenderTree/mac/PolicyDelegate.mm:
+ (-[PolicyDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]):
+
+ * DumpRenderTree/win/PolicyDelegate.cpp:
+ (PolicyDelegate::decidePolicyForNavigationAction):
+
+2008-01-29 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ <rdar://problem/5600926> WebCore on Tiger must link to its own copy of SQLite 3.4 or newer (so HTML database behavior will be correct).
+
+ * Scripts/build-webkit: Copy SQLite static library and headers into the build directory.
+
+2008-01-29 David Kilzer <ddkilzer@apple.com>
+
+ Refactor ChangeLog path code
+
+ Reviewed by Adam.
+
+ * Scripts/prepare-ChangeLog: Simplify code in one foreach() loop, and extract
+ duplicate code in another foreach() loop.
+
+2008-01-29 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/5710692> All storage tests fail/crash
+
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate webView:frame:exceededDatabaseQuotaForSecurityOrigin:database:]): Set an
+ arbitrary quota of 5 megabytes.
+
+ (-[UIDelegate webView:frame:quotaForSecurityOrigin:toCreateDatabase:withEstimatedSize:]):
+ (-[UIDelegate webView:frame:quotaForSecurityOrigin:fromProposedQuota:database:]):
+ Removed unused (I think) code.
+
+ * DumpRenderTree/win/UIDelegate.cpp:
+ (UIDelegate::QueryInterface): IWebUIDelegatePrivate3 is now supported.
+ (UIDelegate::webViewPainted): A stub implementation.
+ (UIDelegate::exceededDatabaseQuota): Set an arbitrary quota of 5 megabytes.
+ * DumpRenderTree/win/UIDelegate.h:
+
+2008-01-27 Jan Michael Alonzo <jmalonzo@unpluggable.com>
+
+ GTK+ DRT build fix for breakage introduced in r29822.
+
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::setPersistentUserStyleSheetLocation):
+ (LayoutTestController::clearPersistentUserStyleSheet):
+
+2008-01-27 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - add support for directory prologues and epilogues to run-webkit-tests
+ - allow setting a persistent user style sheet in DumpRenderTree
+ - activate the WebKit Layout Tests font in Windows DumpRenderTree
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (clearPersistentUserStyleSheetCallback): Added.
+ (setPersistentUserStyleSheetLocationCallback): Added.
+ (LayoutTestController::staticFunctions): Added.
+ clearPersistentUserStyleSheet and setPersistentUserStyleSheet.
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (setPersistentUserStyleSheetLocation): Added.
+ (resetWebViewToConsistentStateBeforeTesting): Added the user style sheet
+ to the set of things this function resets. Now it either disables the
+ user style sheet or sets it to the persistent user style sheet and
+ enables it.
+ * DumpRenderTree/mac/DumpRenderTreeMac.h:
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::setPersistentUserStyleSheetLocation): Added.
+ (LayoutTestController::clearPersistentUserStyleSheet): Added.
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (setPersistentUserStyleSheetLocation): Added.
+ (initialize): Added the WebKit Layout Tests font to the set of fonts to
+ install.
+ (resetWebViewToConsistentStateBeforeTesting): See DumpRenderTree.mm.
+ * DumpRenderTree/win/DumpRenderTreeWin.h:
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::setPersistentUserStyleSheetLocation): Added.
+ (LayoutTestController::clearPersistentUserStyleSheet): Added.
+ * Scripts/run-webkit-tests: Changed to look for, and if found process in
+ DumpRenderTree, files named run-webkit-tests-prologue.html and
+ run-webkit-tests-epilogue.html in the resources subdirectory of any
+ test directory and platform test results directory. The prologues are
+ processed before the first test from the directory (and its
+ subdirectories) is run, and the epilogues are processed after the last
+ test from the directory is run. Platform-specific prologues and
+ epilogues are processed in order of specificity.
+
+2008-01-25 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ <rdar://problem/5699933> http/tests/security/cross-frame-access-get.html is still failing
+
+ * DumpRenderTree/win/DumpRenderTree.cpp: (main): Clear HTTP cache to ensure consistent test environment
+ (matching Mac DRT).
+ * DumpRenderTree/win/DumpRenderTree.vcproj: Link to CFNetwork.
+
+2008-01-24 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Ada Chan.
+
+ Fix for <rdar://5131975> DumpRenderTree doesn't support undo/redo
+
+ - Adds simplified UndoManager to windows DRT to allow testing the
+ undo/redo code paths in WebCore and WebKit. This is a temporary
+ solution to an issue that should eventually be solved by having a
+ shared UndoManager in WebKit.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (runTest):
+ * DumpRenderTree/win/UIDelegate.cpp:
+ (DRTUndoObject::DRTUndoObject):
+ (DRTUndoObject::invoke):
+ (DRTUndoStack::~DRTUndoStack):
+ (DRTUndoStack::isEmpty):
+ (DRTUndoStack::clear):
+ (DRTUndoStack::push):
+ (DRTUndoStack::pop):
+ (DRTUndoManager::canRedo):
+ (DRTUndoManager::canUndo):
+ (DRTUndoManager::DRTUndoManager):
+ (DRTUndoManager::removeAllActions):
+ (DRTUndoManager::registerUndoWithTarget):
+ (DRTUndoManager::redo):
+ (DRTUndoManager::undo):
+ (UIDelegate::UIDelegate):
+ (UIDelegate::resetUndoManager):
+ (UIDelegate::registerUndoWithTarget):
+ (UIDelegate::removeAllActionsWithTarget):
+ (UIDelegate::setActionTitle):
+ (UIDelegate::undo):
+ (UIDelegate::redo):
+ (UIDelegate::canUndo):
+ (UIDelegate::canRedo):
+ * DumpRenderTree/win/UIDelegate.h:
+
+2008-01-23 Adam Roben <aroben@apple.com>
+
+ Allow directories containing ChangeLogs to be passed to
+ resolve-ChangeLogs
+
+ Reviewed by David Kilzer.
+
+ * Scripts/resolve-ChangeLogs:
+ (sub findChangeLog): Return a ChangeLog contained within the specified
+ directory if one exists.
+
+2008-01-23 Steve Falkenburg <sfalken@apple.com>
+
+ <rdar://problem/5698732> Copyright strings should include 2008
+
+ Reviewed by Sam.
+
+ * Drosera/win/Drosera.vcproj/Drosera.rc:
+ * DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.rc:
+
+2008-01-23 Alp Toker <alp@atoker.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ Remove whitespace after -I in automake include lists.
+
+ * GNUmakefile.am:
+
+2008-01-23 Michael Goddard <michael.goddard@trolltech.com>
+
+ Reviewed by Lars Knoll <lars@trolltech.com>.
+
+ Reworked the JavaScriptCore Qt bindings:
+
+ * Update JS DRT controller for Qt JS binding changes.
+ There were two functions that needed some changes
+ so that the layout tests would work, so this makes
+ a few tests pass again.
+
+ * Bump the timeout for layout tests up to 11s.
+ At least some tests have an internal timeout of
+ 10 seconds, so make the waitUntilDone approach
+ wait at least 11s. fast/dom/open-and-close-by-DOM.html
+ is one of these - now the failure message is more
+ accurate.
+
+
+ * DumpRenderTree/qt/jsobjects.cpp:
+ (LayoutTestController::waitUntilDone):
+ * DumpRenderTree/qt/jsobjects.h:
+
+2008-01-22 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin and Adam.
+
+ <rdar://problem/5688975>
+ div element on microsoft site has wrong left offset.
+
+ Add new method for testing the return vale of NPN_GetProperty.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
+ (pluginInvoke):
+
+2008-01-22 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ <rdar://problem/5670257> editing/selection/4895428-3.html makes editing/selection/5131716-2.html fail
+
+ * DumpRenderTree/win/EventSender.cpp: (makeEventSender): Reset static variables for a new test.
+
+2008-01-21 Jan Michael Alonzo <jmalonzo@unpluggable.com>
+
+ Reviewed by Alp Toker.
+
+ http://bugs.webkit.org/show_bug.cgi?id=16955
+ Get errors when cross-compile webkit-gtk
+
+ * GNUmakefile.am: Removed ICU_CFLAGS
+
+2008-01-21 Darin Adler <darin@apple.com>
+
+ Reviewed by Mitz and Adam.
+
+ * Scripts/svn-create-patch: Sort ChangeLog files first. Also slightly improved the
+ sorting speed by doing all sort criteria in a single pass instead of three sorts.
+
+2008-01-21 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Holger.
+
+ Fix focus chain handling and cycling through focusable objects (links) using tab/backtab.
+
+ * Fix GraphicsContext::drawFocusRing to also draw single focus rects.
+ * Implemented QWebPage::focusNextPrevChild by sending fake tab/shift-tab events
+ and make the return value depend on whether we successfully determined a focusable
+ node or not.
+ * Changed QWebView::focusNextPrevChild() to call the base QWidget implementation correctly
+ if we could not handle the focus chain ourselves.
+ * Changed the focus policy of QWebView to correctly use WheelFocus instead of ClickFocus.
+ * Made ChromeClientQt::canTakeFocus() and takeFocus() dummy method since they are only
+ used to control the situation of stepping out of the focus chain inside the page.
+ * Made inclusion of links in the focus chain configurable through QWebSettings::LinksIncludedInFocusChain.
+ The layout tests expect this to be disabled but for the user it seems sensible to have it
+ on by default, hence the default in qwebsettings.cpp
+
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::WebPage::WebPage):
+
+2008-01-19 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Alp Toker.
+
+ Allow the --http flag to run-webkit-tests to override
+ the default behaviour of disabling HTTP tests for Qt,
+ Gtk and Wx.
+
+ * Scripts/run-webkit-tests:
+
+2008-01-19 David Kilzer <ddkilzer@apple.com>
+
+ <rdar://problem/5695344> check-for-global-initializers script never checks any object files
+
+ Reviewed by Darin Adler.
+
+ We now touch a check-for-global-initializers.timestamp file in
+ the TARGET_TEMP_DIR directory to determine when new object files
+ have been compiled and thus need to be checked. If the timestamp
+ file doesn't exist, all object files will be checked.
+
+ Previously the modification time of the "executable" (the
+ framework binary, e.g., WebKit.framework/WebKit) was used, but
+ since this was the last file modified at the end of the compile
+ phase, no object files would ever get checked!
+
+ Also added JSCustomSQLTransactionCallback.o to the list of files
+ since it has static initializers in Debug builds of WebCore.
+
+ * Scripts/check-for-global-initializers:
+
+2008-01-18 Adam Roben <aroben@apple.com>
+
+ Build fix
+
+ * Scripts/build-webkit:
+
+2008-01-18 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Oliver.
+
+ Update build-webkit to account for foreign-object being disabled by
+ default.
+
+ * Scripts/build-webkit:
+
+2008-01-18 Adam Roben <aroben@apple.com>
+
+ Updated for method renames
+
+ Reviewed by Adele.
+
+ * DumpRenderTree/mac/FrameLoadDelegate.mm:
+ (-[FrameLoadDelegate webView:didCommitLoadForFrame:]):
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::setMainFrameIsFirstResponder):
+ (LayoutTestController::setWindowIsKey):
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate webViewFocus:]):
+ * DumpRenderTree/win/FrameLoadDelegate.cpp:
+ (FrameLoadDelegate::didCommitLoadForFrame):
+
+2008-01-18 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Fix plugin-related tests in Debug_Internal configuration, which are failing because of CRT version mismatch
+ between DRT and TestNetscapePlugin.
+
+ * DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj: Added a Debug_Internal configuration.
+ * DumpRenderTree/DumpRenderTree.sln: Use this configuration.
+
+2008-01-18 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Holger.
+
+ Fix fast/dom/Window/window-resize.html
+
+ In DRT connect the page's geometryChangeRequest signal to a slot that
+ sets the geometry of the view widget.
+
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::WebPage::setViewGeometry):
+ (WebCore::WebPage::WebPage):
+
+2008-01-17 Steve Falkenburg <sfalken@apple.com>
+
+ Build fix.
+
+ * Drosera/DroseraWin.make:
+
+2008-01-17 Darin Adler <darin@apple.com>
+
+ * Scripts/run-webkit-tests: Fixed a bug number.
+
+2008-01-17 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ http://bugs.webkit.org/show_bug.cgi?id=16908
+ run-webkit-tests complains about missing FindSafari.exe
+
+ * Scripts/webkitdirs.pm: Append _debug as appropriate.
+
+2008-01-17 Steve Falkenburg <sfalken@apple.com>
+
+ Re-add DEBUG_WEBKIT_HAS_SUFFIX.
+
+ Rubber-stamped by Jon Honeycutt.
+
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+
+2008-01-16 Alp Toker <alp@atoker.com>
+
+ Reviewed by Mark Rowe.
+
+ http://bugs.webkit.org/show_bug.cgi?id=16218
+ [GTK] API: Should this entry point be called go_back rather than go_backward?
+
+ Track back/forward API changes in the tools.
+
+ * DumpRenderTree/gtk/WorkQueueItemGtk.cpp:
+ (BackForwardItem::invoke):
+ * GtkLauncher/main.c:
+ (go_back_cb):
+
+2008-01-16 Adam Roben <aroben@apple.com>
+
+ Windows build fix after r29488
+
+ * DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj:
+ Build into a subdirectory of $WebKitOutputDir\bin to match where DRT
+ expects to find the plugin.
+
+2008-01-11 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fixed the waitUntilDone watchdog timer -- the old code never added the
+ timer to the run loop, so it didn't do anything.
+
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::setWaitToDump):
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::setWaitToDump):
+
+2008-01-14 Steve Falkenburg <sfalken@apple.com>
+
+ Use shared vsprops for most vcproj properties.
+
+ Reviewed by Darin Adler.
+
+ * Drosera/win/Drosera.vcproj/Drosera.vcproj:
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+ * DumpRenderTree/win/ImageDiff.vcproj:
+ * DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj:
+ * FindSafari/FindSafari.vcproj:
+
+2008-01-14 Stephanie <slewis@apple.com>
+
+ Reviewed by NOBODY.
+
+ revert accidental character.
+
+ * Scripts/run-webkit-tests:
+
+2008-01-14 Stephanie <slewis@apple.com>
+
+ RS=Oliver
+
+ add Quicktime PPC only leaks to Leopard exclude list. See <rdar://problem/5667132>
+
+ * Scripts/run-webkit-tests:
+
+2008-01-14 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Queue up another rename.
+
+2008-01-14 Holger Hans Peter Freyther <holger.freyther@trolltech.com>
+
+ Reviewed by Darin Adler.
+
+ * Allow to run the tests in reverse order to spot test cases where the result depends on the order
+ the tests were ran.
+ * This is from http://bugs.webkit.org/show_bug.cgi?id=16869
+
+ * Scripts/run-webkit-tests:
+
+2008-01-14 Holger Hans Peter Freyther <holger.freyther@trolltech.com>
+
+ Reviewed by Darin Adler.
+
+ * Randomize tests array to spot test cases where the results depends on the order
+ the tests are ran.
+ * This is from http://bugs.webkit.org/show_bug.cgi?id=16869
+
+ * Scripts/run-webkit-tests:
+
+2008-01-14 Darin Adler <darin@apple.com>
+
+ * Scripts/run-webkit-tests: More ignore list tweaking.
+
+2008-01-14 Darin Adler <darin@apple.com>
+
+ * Scripts/run-webkit-tests: Add another leak to the ignore list.
+
+2008-01-14 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Adam Roben.
+
+ - try to fix failure in fast/dom/Window/window-onFocus.html seen on the
+ build bots
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (resetWebViewToConsistentStateBeforeTesting): Focus the web view.
+
+2008-01-13 Steve Falkenburg <sfalken@apple.com>
+
+ Share common files across projects.
+
+ Unify vsprops files
+ Debug: common.vsprops, debug.vsprops
+ Debug_Internal: common.vsprops, debug.vsprops, debug_internal.vsprops
+ Release: common.vsprops, release.vsprops
+
+ Shared properties can go into common.vsprops, shared debug settings can go into debug.vsprops.
+ debug_internal.vsprops will be mostly empty except for file path prefix modifiers.
+
+ Pull auto-version.sh, VERSION, and PRODUCTVERSION from tools.
+
+ Reviewed by Adam Roben.
+
+ * Drosera/win/Drosera.vcproj/Drosera.vcproj:
+ * Drosera/win/Drosera.vcproj/PRODUCTVERSION: Removed.
+ * Drosera/win/Drosera.vcproj/VERSION: Removed.
+ * Drosera/win/Drosera.vcproj/auto-version.sh: Removed.
+ * Drosera/win/Drosera.vcproj/debug.vsprops: Removed.
+ * Drosera/win/Drosera.vcproj/debug_internal.vsprops: Removed.
+ * Drosera/win/Drosera.vcproj/release.vsprops: Removed.
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+ * DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj:
+ * DumpRenderTree/win/debug.vsprops: Removed.
+ * DumpRenderTree/win/debug_internal.vsprops: Removed.
+ * DumpRenderTree/win/release.vsprops: Removed.
+
+2008-01-13 Brent Fulgham <bfulgham@gmail.com>
+
+ Reviewed by Maciej.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=16314
+ Script to launch Drosera
+
+ * Scripts/gdb-drosera: Added.
+ * Scripts/run-drosera: Added.
+ * Scripts/run-drosera-nightly.cmd: Added.
+ * Scripts/webkitdirs.pm: Added runDrosera function.
+
+2008-01-13 Dan Bernstein <mitz@apple.com>
+
+ - fix breakage due to last-minute change
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (runTest): Declare the loop variable.
+
+2008-01-13 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Adam Roben.
+
+ - fix <rdar://problem/5132009> Windows DRT does not support multiple windows
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (DumpRenderTreeWndProc):
+ (initialize):
+ (dumpBackForwardList):
+ (dumpBackForwardListForAllWindows):
+ (dump):
+ (resetWebViewToConsistentStateBeforeTesting): Factored out of
+ runTest().
+ (runTest):
+ (allWindows): Added. Returns a vector of all open windows.
+ (windowToWebViewMap): Added. Returns a map from open windows to their
+ WebViews.
+ (createWebViewAndOffscreenWindow): Factored out of main() to be
+ reusable for creating extra windows.
+ (main):
+ * DumpRenderTree/win/DumpRenderTreeWin.h:
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::windowCount): Implemented.
+ * DumpRenderTree/win/UIDelegate.cpp:
+ (UIDelegate::createWebViewWithRequest): Implemented.
+ (UIDelegate::webViewClose): Implemented.
+ * DumpRenderTree/win/UIDelegate.h:
+
+2008-01-12 Alp Toker <alp@atoker.com>
+
+ Reviewed by Mark Rowe.
+
+ Hide non-public symbols in GTK+/autotools release builds.
+
+ * GNUmakefile.am:
+
+2008-01-12 Holger Hans Peter Freyther <holger.freyther@trolltech.com>
+
+ Reviewed by Ap.
+
+ * Make launching of the WebKit httpd work on GNU/Debian/Linux
+
+ The configuration of Apache2 and installation does not depend on
+ the kernel but on the distribution policy. Make launching of httpd
+ work for Debian derived distributions.
+
+ * Scripts/run-webkit-httpd:
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm:
+
+2008-01-12 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Fix crash in http/tests/security/local-JavaScript-from-remote.html under guard malloc.
+
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm: Retain string before returning it to
+ match the callers expectations that it can take ownership of the string.
+
+2008-01-11 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ <rdar://problem/5667275> fast/dynamic/layer-hit-test-crash.html is failing
+
+ * DumpRenderTree/win/DumpRenderTree.cpp: (runTest): Ignore WM_MOUSELEAVE events,
+ as these are only posted because the test window is not a normal visible one, and
+ they confuse drag&drop machinery.
+
+2008-01-11 Adam Roben <aroben@apple.com>
+
+ Fix a crash when pathToLocalResource fails and a leak
+
+ Reviewed by Darin Adler.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (pathToLocalResourceCallback): Dont leak the JSStringRef, and make
+ sure not to pass null to JSValueMakeString.
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::pathToLocalResource): Print an error message if
+ the conversion fails so it's clear what happened.
+
+2008-01-11 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by John Sullivan.
+
+ * DumpRenderTree/mac/GCControllerMac.mm:
+ (GCController::collectOnAlternateThread): Updated for name change.
+
+2008-01-10 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fix. Don't build dftables any longer since it's now a Perl
+ script.
+
+ * wx/build-wxwebkit:
+
+2008-01-10 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Make DRT track open windows instead of allocated windows so that
+ we can avoid ASSERTION due to late deallocs out of our control.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dumpBackForwardListForAllWindows):
+ (runTest):
+ * DumpRenderTree/mac/DumpRenderTreeMac.h:
+ * DumpRenderTree/mac/DumpRenderTreeWindow.h:
+ * DumpRenderTree/mac/DumpRenderTreeWindow.mm:
+ (+[DumpRenderTreeWindow openWindows]):
+ (-[DumpRenderTreeWindow initWithContentRect:styleMask:backing:defer:]):
+ (-[DumpRenderTreeWindow close]):
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::windowCount):
+
+2008-01-10 Ada Chan <adachan@apple.com>
+
+ Meta key is not the same as Alt key on windows.
+
+ Reviewed by Darin Adler.
+
+ * DumpRenderTree/win/EventSender.cpp:
+ (keyDownCallback):
+
+2008-01-09 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Darin, Sam and Adam.
+
+ -<rdar://problem/5654486> REGRESSION (Safari 3.0.4-TOT): clicking on
+ link in gmail message displays JavaScript alert falsely complaining
+ about pop-up blocking.
+ - Added the ability to enable the pop-up blocker via the
+ LayoutTestController.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (setPopupBlockingEnabledCallback):
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (setDefaultsToConsistentValuesForTesting):
+ (resetWebViewToConsistentStateBeforeTesting):
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::setPopupBlockingEnabled):
+
+2008-01-10 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Simon.
+
+ rename QWebPageHistory to QWebHistory.
+
+
+ * DumpRenderTree/qt/jsobjects.cpp:
+
+2008-01-09 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - add some more renames, adjust some
+
+ * Scripts/do-webcore-rename:
+
+2008-01-07 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Oliver.
+
+ Enable SVG Fonts support by default.
+
+ * Scripts/build-webkit:
+
+2008-01-07 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Adam.
+
+ Fixes: http://bugs.webkit.org/show_bug.cgi?id=16244
+ DRT doesn't handle platform specific pixel test results correctly.
+
+ <test>-expected.txt files and <test>-expected.png files may now live
+ in different directories (ie. a cross-platform <test>-expected.txt file
+ and a platform-specific <test>-expected.png file).
+
+ * Scripts/run-webkit-tests:
+
+2008-01-04 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - <rdar://problem/5666914> fast/regex/test{1,4}.html are failing
+ DRT did not correctly handle printing the '\0' char. Now it does.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (dumpFramesAsText):
+ (dump):
+
+2008-01-07 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Lars.
+
+ Ported of the network backend of the Qt platform to Qt 4.4's new networking API.
+
+
+ * DumpRenderTree/qt/main.cpp:
+ * DumpRenderTree/qt/testplugin.cpp:
+ * DumpRenderTree/qt/testplugin.h:
+
+2008-01-05 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Alp Toker.
+
+ Fix hang in fast/frames/frame-display-none-focus.html during Gtk layout tests.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (processWork): Process pending work.
+ (webViewLoadFinished): Schedule processing of pending work.
+ * DumpRenderTree/gtk/WorkQueueItemGtk.cpp: Use webkit_web_frame_reload.
+
+2008-01-05 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Some more renaming plans.
+
+2008-01-04 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Alexey and Darin.
+
+ Adding "home" and "end" to DRT's keydown since
+ DOM key events can't handle keyIdentifiers at this point.
+
+ * DumpRenderTree/mac/EventSendingController.mm:
+ (-[EventSendingController keyDown:withModifiers:]):
+ * DumpRenderTree/win/EventSender.cpp:
+ (keyDownCallback):
+
+2008-01-04 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Simon.
+
+ fix DRT after the changes to QWebPage.
+
+ The great thing is that we actually don't have
+ any regressions from the QWebPage change :)
+
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+
+2008-01-04 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Simon.
+
+ make QWebPage a QObject and get things to compile.
+
+ Nothing works currently though.
+
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+
+2008-01-04 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Simon.
+
+ take a QString as identifier in QWebFrame::addToJSWindowObject.
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::initJSObjects):
+
+2008-01-04 Alp Toker <alp@atoker.com>
+
+ GTK+ DRT build fix for breakage introduced in r29149.
+
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::execCommand):
+
+2008-01-03 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/5463489> A number of layout tests should be using execCommand instead of textInputController
+
+ Added layoutTestController.execCommand to access editor commands that are not available
+ via document.execCommand.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (execCommandCallback):
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::execCommand):
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::queueLoad):
+ (LayoutTestController::execCommand):
+
+2008-01-03 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Darin, Mitz.
+
+ fixed <rdar://5130762> mousedowns in different locations increase the clickcount incorrectly
+
+ the clickcount should not increase if the last click was at a different location. it's a new click.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (runTest):
+ * DumpRenderTree/mac/EventSendingController.h:
+ * DumpRenderTree/mac/EventSendingController.mm:
+ (-[EventSendingController mouseDown]):
+ (-[EventSendingController mouseUp]):
+
+2008-01-03 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam.
+
+ * Scripts/update-webkit: Make this work a little better for the people at Apple
+ who have a directory named Internal.
+
+2008-01-03 Adam Roben <aroben@apple.com>
+
+ Use HTTP::Date instead of Date::Parse because it's installed by Cygwin by default
+
+ Rubberstamped by Mark.
+
+ * Scripts/update-webkit-auxiliary-libs:
+
+2008-01-03 Adam Roben <aroben@apple.com>
+
+ Fix Bug 15663: update-webkit re-downloads WebKitAuxiliaryLibrary unnecessarily
+
+ http://bugs.webkit.org/show_bug.cgi?id=15663
+
+ Added a fuzz factor into the Last-Modified comparison for downloading
+ WebKitAuxiliaryLibrary.zip.
+
+ The zip file is served from a set of mirrors who give Last-Modified
+ times that are off by 1-3 seconds from each other. This was causing
+ the build bots to redownload WebKitAuxiliaryLibrary for every build,
+ which would then cause all of WebCore to rebuild each time.
+
+ Reviewed by Mark.
+
+ * Scripts/update-webkit-auxiliary-libs: Check if the new zip file is
+ at least 30 seconds newer than the old one -- otherwise we assume that
+ the difference in time is due to the mirrors being slightly offset
+ from each other.
+ (sub lastModifiedToUnixTime): Added.
+
+2008-01-03 Alexey Proskuryakov <ap@webkit.org>
+
+ Windows build fix.
+
+ * DumpRenderTree/ForwardingHeaders/wtf/HashTraits.h: Added (needed by COMPtr.h).
+
+2008-01-03 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Lars.
+
+ Moved QWebPage::open to QWebFrame::load and added setHtml.
+
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::open):
+
+2008-01-03 Simon Hausmann <hausmann@webkit.org>
+
+ Reviewed by Lars.
+
+ Added the first revision of QWebView and started moving functionality from QWebPave over to QWebView and QWebFrame.
+
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+
+2008-01-02 Sam Weinig <sam@webkit.org>
+
+ * Scripts/do-webcore-rename: Yet more renaming ideas.
+
+2008-01-02 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: More renaming ideas. (Maciej, please merge yours with mine.)
+
+2008-01-02 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ fixing assertion hit with editing/selection/move-begin-end.html
+
+ * DumpRenderTree/ForwardingHeaders/wtf/ASCIICType.h: Added.
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+ * DumpRenderTree/win/EventSender.cpp:
+ (keyDownCallback):
+ using isupper will cause an assertion for inputs outside of ascii range. use isASCIIUpper instead.
+
+2008-01-02 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Some more name change plans.
+
+2008-01-02 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Maciej.
+
+ Added handling for page up and page down in EventSender
+
+ * DumpRenderTree/mac/EventSendingController.mm:
+ (-[EventSendingController keyDown:withModifiers:]):
+ * DumpRenderTree/win/EventSender.cpp:
+ (keyDownCallback):
+
+2008-01-02 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Fix fast/events/arrow-keys-on-body.html for real.
+
+ * DumpRenderTree/win/EventSender.cpp: (keyDownCallback): Pass proper keyData for WM_KEYUP, too.
+
+2008-01-02 Luca Bruno <lethalman88@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ http://bugs.webkit.org/show_bug.cgi?id=16674
+ [GTK] run-launcher sets wrong LD_LIBRARY_PATH
+
+ * Scripts/run-launcher:
+
+2007-12-31 Darin Adler <darin@apple.com>
+
+ Suggested by Antti.
+
+ * Scripts/webkitdirs.pm: Turned off the QuickTime requirement for Windows until
+ we get it installed on the build bots.
+
+2007-12-30 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Sam.
+
+ * Scripts/do-webcore-rename: Add a few more planned renames s/(\w+)Imp/\1/
+
+2007-12-29 Darin Adler <darin@apple.com>
+
+ Reviewed by Oliver.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=16663
+ leak bot shows createCStringFromNPVariant result leaking
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
+ (pluginInvoke): Added a missing free.
+
+2007-12-26 Jan Michael Alonzo <jmalonzo@unpluggable.com>
+
+ Reviewed by Alp Toker.
+
+ http://bugs.webkit.org/show_bug.cgi?id=16390
+ Use autotools or GNU make as the build system for the GTK port
+
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: include glib.h
+ * GNUmakefile.am: Added.
+
+2007-12-24 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Oliver.
+
+ Fix fast/events/arrow-keys-on-body.html, failing on Windows.
+
+ * DumpRenderTree/win/EventSender.cpp:
+ (keyDownCallback): Add KF_EXTENDED flag to arrow keys. Also add a count
+ of 1, even though WebKit currently ignores it.
+
+2007-12-23 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx buildbot fix. Update libpng dl script to the latest version.
+
+ * wx/install-unix-extras:
+
+2007-12-22 Antti Koivisto <antti@apple.com>
+
+ Fix a typo.
+
+ * Scripts/webkitdirs.pm:
+
+2007-12-21 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ - Disable the back/forward cache using the new WebPreferences API
+ instead of through the BackForwardList. This makes us match what
+ we do on Windows.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (createWebViewAndOffscreenWindow):
+ (setDefaultsToConsistentValuesForTesting):
+
+2007-12-21 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ - disable the back/forward cache in Windows DumpRenderTree. It is
+ already disabled in Mac DumpRenderTree.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (initializePreferences):
+
+2007-12-13 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Darin and Steve.
+
+ - check for QuickTime SDK on Windows.
+ - build media support on Windows by default
+
+ * Scripts/build-webkit:
+ * Scripts/webkitdirs.pm:
+
+2007-12-21 Kevin Ollivier <kevino@theolliviers.com>
+
+ Build script fix for buildbot.
+
+ * wx/build-wxwebkit:
+
+2007-12-20 Eric Seidel <eric@webkit.org>
+
+ Reviewed by mjs.
+
+ * Scripts/run-sunspider: change --runs default to 10 for better accuracy
+
+2007-12-20 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Steve.
+
+ - <rdar://5656485> Drosera: Win: Nightly does not reliably connect to
+ WebKit.
+
+ - Drosera and Safari need to use the same ProgIDs in order for
+ CoCreateInstance to work properly. The most robust way to do this is
+ for WebKit to dynamically publish those ProgIDs.
+
+ * Drosera/win/DebuggerClient.cpp: Use the published ProgIDs
+ (DebuggerClient::createWebViewWithRequest):
+ * Drosera/win/Drosera.cpp: Use the published ProgIDs and rename some
+ statics.
+ (Drosera::initUI):
+ (Drosera::attach):
+ (Drosera::attemptToCreateServerConnection):
+ * Drosera/win/Drosera.vcproj/Drosera.vcproj: Fix a runtime failure.
+ * Drosera/win/ServerConnection.cpp: Reformat the connection function and
+ make use of the published ProgIDs.
+ (ServerConnection::attemptToCreateServerConnection):
+
+2007-12-20 Kevin McCullough <kmccullough@apple.com>
+
+ - <rdar://problem/5658317> REGRESSION: 20+ leaks seen on buildbots.
+ - Build bot and leak fix.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (pathToLocalResourceCallback):
+
+2007-12-19 David Kilzer <ddkilzer@apple.com>
+
+ Make svn-apply/svn-unapply work with patches from git-format-patch.
+
+ Reviewed by Darin Adler.
+
+ * Scripts/svn-apply:
+ (patch): If 'Index:' can't be found in the text passed in, print it
+ out with a warning and return early.
+ * Scripts/svn-unapply:
+ (patch): Ditto.
+
+2007-12-18 Kevin Ollivier <kevino@theolliviers.com>
+
+ Reviewed by Alp Toker.
+
+ Build related fixes.
+
+ * wx/build-wxwebkit:
+ - Check to make sure the user is running a supported wx port
+ - More robust checks for Cygwin
+ - Only run install-unix-extras on Mac, it's not the right solution
+ for Linux distros.
+ - Remove outdated Linux instructions after successful build
+ - Clean Bakefile-generated files during a clean operation
+
+2007-12-18 Darin Adler <darin@apple.com>
+
+ * Scripts/make-js-test-wrappers: Don't generate a wrapper for select-options-remove.js.
+
+2007-12-18 Steve Falkenburg <sfalken@apple.com>
+
+ Add script to run Drosera as part of the nightly.
+
+ Reviewed by Kevin M.
+
+ * Scripts/run-drosera.cmd: Added.
+
+2007-12-18 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Remove a stray K.
+
+2007-12-18 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Plan more renaming.
+
+2007-12-14 Juan A. Suarez Romero <jasuarez@igalia.com>
+
+ Reviewed by Alp Toker.
+
+ http://bugs.webkit.org/show_bug.cgi?id=16042
+ [GTK] Eliminate webkit_init()
+
+ Moving webkit initialization to WebView class init.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (main):
+ * GtkLauncher/main.c:
+ (main):
+
+2007-12-17 Luca Bruno <lethalman88@gmail.com>
+
+ Reviewed by Alp Toker.
+
+ http://bugs.webkit.org/show_bug.cgi?id=13542
+ gdklauncher doesnt change URL in adress GTKEntry.
+
+ * GtkLauncher/main.c:
+ (load_commit_cb): added
+ (title_change_cb):
+ (create_browser):
+
+2007-12-16 Dimitri Glazkov <dimitri@glazkov.com>
+
+ Reviewed by Adam Roben.
+
+ Remove the double-quotes around the PATH variable value, in order to make it work in Windows shell.
+
+ * FindSafari/FindSafari.cpp:
+ (_tmain):
+
+2007-12-16 Brent Fulgham <bfulgham@gmail.com>
+
+ Reviewed by Adam Roben.
+
+ http://bugs.webkit.org/show_bug.cgi?id=16315
+ FindSafari needs a path-only option.
+
+ * FindSafari/FindSafari.cpp:
+ (_tmain):
+
+2007-12-16 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ http://bugs.webkit.org/show_bug.cgi?id=16462
+ REGRESSION: access keys broken on Windows
+
+ * DumpRenderTree/win/EventSender.cpp: (keyDownCallback): Send system key events
+ if Alt is pressed.
+
+2007-12-15 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Fix urlSuitableForTestResult to correctly identify wstring::npos as
+ the case when wstring.find doesn't find anything.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (urlSuitableForTestResult):
+
+2007-12-15 Alp Toker <alp@atoker.com>
+
+ GTK+ DRT build fix for GLib < 2.14.
+
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::setWaitToDump):
+
+2007-12-05 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Alp Toker.
+
+ Add a watchdog timer to Gtk DumpRenderTree, and implement alert/prompt/confirm. This prevents
+ many layout tests from hanging while waiting on user responses to dialogs.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (invalidateAnyPreviousWaitToDumpWatchdog):
+ (webViewScriptAlert):
+ (webViewScriptPrompt):
+ (webViewScriptConfirm):
+ (main):
+ * DumpRenderTree/gtk/DumpRenderTreeGtk.h:
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (waitToDumpWatchdogFired):
+ (LayoutTestController::setWaitToDump):
+
+2007-12-05 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Alp Toker.
+
+ Flesh out DumpRenderTree for Gtk. After these changes, the majority of the tests in fast/js pass.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (dumpFramesAsText): Don't print the frame name when dumping the main frame as text.
+ (dump):
+ (runTest):
+ (webViewLoadStarted): Store the top frame when it starts loading so we can use it to determine when to dump.
+ (webViewLoadFinished): Dump when the top frame load completes if we're not waiting for a JS callback and the
+ work queue is empty.
+ (webViewWindowObjectCleared): Set up window.layoutTestController.
+ (webViewConsoleMessage): Match the console message format expected by the layout test results.
+ (main): Hook up the new signals.
+ * DumpRenderTree/gtk/DumpRenderTreeGtk.h:
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: Only notify done if the top frame has completed loading to avoid
+ dumping multiple times.
+ * Scripts/build-dumprendertree: Ensure build-dumprendertree is a no-op for Gtk too.
+ * Scripts/run-webkit-tests: Teach run-webkit-tests that Gtk is like Qt in many ways. Use run-launcher to open test results.
+
+2007-12-14 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Brady.
+
+ Assert that a web frame that's loading a resource always has either a data source or
+ a provisional data source.
+
+ * DumpRenderTree/mac/ResourceLoadDelegate.mm:
+ (-[ResourceLoadDelegate webView:identifierForInitialRequest:fromDataSource:]):
+
+2007-12-14 Darin Adler <darin@apple.com>
+
+ - fix mistake causing nearly all tests to fail on Windows
+
+ * DumpRenderTree/win/UIDelegate.cpp:
+ (UIDelegate::webViewAddMessageToConsole): Need to compare the result of find with
+ npos, not 0. Also pass URL in to URL function rather than passing the entire message.
+
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate webView:addMessageToConsole:]): Pass path only to path function rather
+ than passing the entire message.
+
+2007-12-14 Darin Adler <darin@apple.com>
+
+ - fix Tiger build
+
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate webView:addMessageToConsole:]): Re-implement this without using any
+ new-to-Leopard methods.
+
+2007-12-14 Darin Adler <darin@apple.com>
+
+ * DumpRenderTree/mac/FrameLoadDelegate.mm: Don't implement didReceiveIcon delegate method
+ since it now triggers unwanted icon loading. We only had it because we implemented "all"
+ delegate methods here.
+
+2007-12-14 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin and Geoff.
+
+ <rdar://problem/5619295>
+ REGRESSION: 303-304: Embedded YouTube video fails to render- JS errors (16150) (Flash 9)
+
+ Add property getting methods to the plug-in.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
+ (pluginInvoke):
+
+2007-12-14 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - Layout test fix for mac. When dumped to the console local file paths
+ now only show the name of the resource not the whole path. This is to
+ make the results machine and OS independent.
+
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate webView:addMessageToConsole:]):
+
+2007-12-13 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam.
+
+ - Layout tests fix. We need a way to remove machine-dependent
+ information from paths in layout test results. The UIDelegate now does
+ this.
+
+ * DumpRenderTree/DumpRenderTree.h:
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (urlSuitableForTestResult):
+ * DumpRenderTree/win/DumpRenderTreeWin.h:
+ * DumpRenderTree/win/ResourceLoadDelegate.cpp:
+ * DumpRenderTree/win/UIDelegate.cpp:
+ (UIDelegate::webViewAddMessageToConsole):
+
+2007-12-13 Alp Toker <alp@atoker.com>
+
+ Build fix for DRT breakage introduced in r28690.
+
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::pathToLocalResource):
+
+2007-12-12 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Alice and Sam.
+
+ - <rdar://5621435> Need a way to specify local resources (being loaded
+ from HTTP tests) on Windows.
+ - Implemented pathToLocalResource which exposes the functionality of
+ converting a given unix path to the correct location on Windows.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (pathToLocalResourceCallback):
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::pathToLocalResource):
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::pathToLocalResource):
+
+2007-12-12 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam.
+
+ <rdar://problem/5132003>
+ dumpResourceLoadCallbacks is not implemented in DRT on Windows.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (main):
+ Set the resource load delegate.
+
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+
+ * DumpRenderTree/win/ResourceLoadDelegate.cpp: Added.
+ * DumpRenderTree/win/ResourceLoadDelegate.h: Added.
+
+2007-12-12 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Fix conversion from double to LPARAM in dispatchMessage().
+
+ * DumpRenderTree/win/EventSender.cpp:
+ (dispatchMessageCallback):
+
+2007-12-11 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe and Sam Weinig too!
+
+ - added Helvetica Oblique and Helvetica Bold Oblique to the list of
+ fonts DumpRenderTree registers.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (initialize):
+
+2007-12-11 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Anders
+
+ Make DumpRenderTree on mac use its own path for Databases testing
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (setDefaultsToConsistentValuesForTesting): Keep a string to ~/Library/Application Support/DumpRenderTree
+ for future DRT-only use, then use it to construct the Databases path and set that default
+
+2007-12-07 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/5535636>
+ Have to press 4 times instead of 2 times to get the expected result of ^^ with german keyboard.
+
+ http://bugs.webkit.org/show_bug.cgi?id=13916
+ JavaScript detects Tab as a character input on a textfield validation
+
+ * DumpRenderTree/mac/EventSendingController.mm:
+ (-[EventSendingController keyDown:withModifiers:]): Added a few more named keys.
+ Dispatch a keyup to better match what happens when a key is physically pressed.
+
+ * DumpRenderTree/win/EventSender.cpp:
+ (keyDownCallback): Ditto. Also make sure that WM_CHAR is consistently dispatched before
+ returning from keyDown().
+ (getConstantCallback): Fixed a couple copy/paste mistakes.
+
+2007-12-07 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Oliver.
+
+ - <rdar://5599845> Drosera: Does not show loal files in the file list
+ on the left side.
+
+ * Drosera/debugger.js: - Updated url dividing regex to handle %s and :s.
+ * Drosera/win/Drosera.vcproj/Drosera.vcproj: - Updated Debug settings
+ so the open source community can build.
+
+2007-12-10 Brady Eidson <beidson@apple.com>
+
+ Rubberstamped by Sam Weinig
+
+ Update DRT Mac to reflect the new UI Delegate methods I just checked into WebKit/mac
+
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate webView:frame:quotaForSecurityOrigin:toCreateDatabase:withEstimatedSize:]):
+ (-[UIDelegate webView:frame:quotaForSecurityOrigin:fromProposedQuota:database:]):
+
+2007-12-08 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Sam W.
+
+ Split the ENABLE_SVG_EXPERIMENTAL_FEATURES flag into separate flags.
+
+ Fixes <rdar://problem/5620249> Must disable SVG animation
+ <rdar://problem/5612772> Disable SVG filters on Mac to match Windows behavior
+
+ In order to allow finer grained control over the set of SVG features
+ this patch splits ENABLE_SVG_EXPERIMENTAL_FEATURES into the following
+ distinct flags:
+ ENABLE_SVG_ANIMATION
+ ENABLE_SVG_FILTERS
+ ENABLE_SVG_FONTS
+ ENABLE_SVG_AS_IMAGE
+ ENABLE_SVG_USE
+
+ by default only ENABLE_SVG_AS_IMAGE and ENABLE_SVG_USE are set.
+
+ Script handles all the new build flags, and allows --svg-experimental
+ to automatically enable all features.
+
+ * Scripts/build-webkit:
+
+2007-12-07 Steve Falkenburg <sfalken@apple.com>
+
+ Fix version parsing.
+
+ Rubber-stamped by Oliver.
+
+ * Drosera/win/Drosera.vcproj/auto-version.sh:
+
+2007-12-07 Steve Falkenburg <sfalken@apple.com>
+
+ Build modifications for Drosera.
+
+ Reviewed by Adam.
+
+ * Drosera/DroseraWin.make: Added.
+ * Drosera/win/Drosera.vcproj/Drosera.rc:
+ * Drosera/win/Drosera.vcproj/Drosera.vcproj:
+ * Drosera/win/Drosera.vcproj/PRODUCTVERSION: Added.
+ * Drosera/win/Drosera.vcproj/VERSION: Added.
+ * Drosera/win/Drosera.vcproj/auto-version.sh: Added.
+
+2007-12-06 Adam Roben <aroben@apple.com>
+
+ Explicitly turn on the Mac font ascent hack on Windows
+
+ This keeps our font metrics matching those from Mac.
+
+ Reviewed by Hyatt.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (main):
+
+2007-12-06 Anders Carlsson <andersca@apple.com>
+
+ Rename main.c to main.cpp here too.
+
+ * DumpRenderTree/win/TestNetscapePlugin/main.cpp: Copied from DumpRenderTree/win/TestNetscapePlugin/main.c.
+
+2007-12-06 Sam Weinig <sam@webkit.org>
+
+ Rubber stamped by Geoff.
+
+ * Scripts/do-webcore-rename: Don't rename kjs_css twice.
+
+2007-12-06 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Some more renaming plans.
+
+2007-12-06 Anders Carlsson <andersca@apple.com>
+
+ Restore implementation of testGetIntIdentifier that was accidentally
+ removed somehow (possibly when I made PluginObject be a cpp file).
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
+ (pluginInvoke):
+
+2007-12-05 Anders Carlsson <andersca@apple.com>
+
+ Make the entry points extern "C".
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp:
+
+2007-12-05 Anders Carlsson <andersca@apple.com>
+
+ C++ warning fixes.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp:
+ (NPP_New):
+ (NPP_Destroy):
+ (NPP_SetWindow):
+ (NPP_NewStream):
+ (NPP_HandleEvent):
+ (NPP_URLNotify):
+ (NPP_GetValue):
+
+2007-12-05 Anders Carlsson <andersca@apple.com>
+
+ Add the .cpp files to the TestNetscapePlugIn target.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+
+2007-12-05 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Geoff.
+
+ Rename the TestNetscapePlugIn .c files to be .cpp.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c: Removed.
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp: Copied from DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c.
+ * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.c: Removed.
+ * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.cpp: Copied from DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.c.
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.c: Removed.
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp: Copied from DumpRenderTree/TestNetscapePlugIn.subproj/main.c.
+ * DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj:
+
+2007-12-05 Adam Roben <aroben@apple.com>
+
+ Fix case of keypresses from the Windows implementation of eventSender.keyDown
+
+ This fixes several regression tests.
+
+ Reviewed by Alice.
+
+ * DumpRenderTree/win/EventSender.cpp:
+ (keyDownCallback): Virtual keycodes for ASCII characters are always
+ uppercase, so we need to check the case of the original character
+ passed in to eventSender.keyDown.
+
+2007-12-05 Adam Roben <aroben@apple.com>
+
+ Learn from Tim's mistakes
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (runTest): Reset the authorAndUserStylesEnabled preference for each
+ test.
+
+2007-12-05 Alp Toker <alp@atoker.com>
+
+ Reviewed by Mark Rowe.
+
+ Initialize GTK+ and WebKit so the tests can run.
+
+ Reorganize the headers a little.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (main):
+
+2007-12-04 Anders Carlsson <andersca@apple.com>
+
+ Remove IWebScriptScope include.
+
+ * Drosera/win/DebuggerDocumentPlatform.cpp:
+
+2007-12-04 Sam Weinig <sam@webkit.org>
+
+ Rubber stamped by Mark Rowe.
+
+ Define CF as platform for mac and revert r28409
+
+ * DumpRenderTree/DumpRenderTree.h:
+ * DumpRenderTree/mac/DumpRenderTreeMac.h:
+
+2007-12-04 Sam Weinig <sam@webkit.org>
+
+ Define CF as platform for windows.
+
+ Reviewed by Adam Roben.
+
+ * DumpRenderTree/win/DumpRenderTreeWin.h:
+
+2007-12-04 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam and Darin.
+
+ - Removed a needless BSTR cleanup.
+
+ * Drosera/win/DebuggerDocumentPlatform.cpp:
+ (DebuggerDocument::getPlatformCurrentFunctionStack):
+
+2007-11-27 Adam Roben <aroben@apple.com>
+
+ Fix <rdar://5614497> setAuthorAndUserStylesEnabled is not implemented in DRT
+
+ Reviewed by Maciej.
+
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::setAuthorAndUserStylesEnabled): Implemented.
+
+2007-12-04 Alp Toker <alp@atoker.com>
+
+ Prospective Win DRT build fix.
+
+ * DumpRenderTree/DumpRenderTree.h:
+
+2007-12-04 Alp Toker <alp@atoker.com>
+
+ Fix a clobbered copyright header.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+
+2007-12-04 Xan Lopez <xan@gnome.org>
+
+ Reviewed by Alp Toker.
+
+ http://bugs.webkit.org/show_bug.cgi?id=15561
+ GTK port needs DumpRenderTree implementation
+
+ Start work on the GTK+ DRT.
+
+ This does not work yet, and there are a few lingering style issues
+ (nothing major) but this patch has been stuck in the bug tracker for
+ too long already.
+
+ * DumpRenderTree/DumpRenderTree.h:
+ * DumpRenderTree/gtk: Added.
+ * DumpRenderTree/gtk/DumpRenderTree.cpp: Added.
+ (autocorrectURL):
+ (shouldLogFrameLoadDelegates):
+ (dumpFrameScrollPosition):
+ (displayWebView):
+ (appendString):
+ (dumpFramesAsText):
+ (dumpRenderTreeAsText):
+ (dump):
+ (runTest):
+ (main):
+ * DumpRenderTree/gtk/DumpRenderTree.pro: Added.
+ * DumpRenderTree/gtk/DumpRenderTreeGtk.h: Added.
+ * DumpRenderTree/gtk/GCControllerGtk.cpp: Added.
+ (GCController::collect):
+ (GCController::collectOnAlternateThread):
+ (GCController::getJSObjectCount):
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: Added.
+ (LayoutTestController::~LayoutTestController):
+ (LayoutTestController::addDisallowedURL):
+ (LayoutTestController::clearBackForwardList):
+ (LayoutTestController::copyDecodedHostName):
+ (LayoutTestController::copyEncodedHostName):
+ (LayoutTestController::display):
+ (LayoutTestController::keepWebHistory):
+ (LayoutTestController::notifyDone):
+ (LayoutTestController::queueBackNavigation):
+ (LayoutTestController::queueForwardNavigation):
+ (LayoutTestController::queueLoad):
+ (LayoutTestController::queueReload):
+ (LayoutTestController::queueScript):
+ (LayoutTestController::setAcceptsEditing):
+ (LayoutTestController::setCustomPolicyDelegate):
+ (LayoutTestController::setMainFrameIsFirstResponder):
+ (LayoutTestController::setTabKeyCyclesThroughElements):
+ (LayoutTestController::setUseDashboardCompatibilityMode):
+ (LayoutTestController::setUserStyleSheetEnabled):
+ (LayoutTestController::setUserStyleSheetLocation):
+ (LayoutTestController::setWindowIsKey):
+ (LayoutTestController::setWaitToDump):
+ (LayoutTestController::windowCount):
+ (LayoutTestController::setPrivateBrowsingEnabled):
+ (LayoutTestController::setAuthorAndUserStylesEnabled):
+ * DumpRenderTree/gtk/WorkQueueItemGtk.cpp: Added.
+ (JSStringCopyUTF8CString):
+ (LoadItem::invoke):
+ (ReloadItem::invoke):
+ (ScriptItem::invoke):
+ (BackForwardItem::invoke):
+
+2007-12-03 Sam Weinig <sam@webkit.org>
+
+ Move JavaScriptCore thread testing code to pthread specific directory
+ and remove the dependance on CoreFoundation by using WTF::HashSet.
+
+ Reviewed by Geoff and Oliver.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/ForwardingHeaders/wtf/HashMap.h: Added.
+ * DumpRenderTree/ForwardingHeaders/wtf/HashSet.h: Added.
+ * DumpRenderTree/ForwardingHeaders/wtf/Vector.h: Added.
+ * DumpRenderTree/JavaScriptThreading.h: Copied from DumpRenderTree/mac/JavaScriptThreading.h.
+ * DumpRenderTree/mac/JavaScriptThreading.cpp: Removed.
+ * DumpRenderTree/mac/JavaScriptThreading.h: Removed.
+ * DumpRenderTree/pthreads: Added.
+ * DumpRenderTree/pthreads/JavaScriptThreadingPthreads.cpp: Copied from DumpRenderTree/mac/JavaScriptThreading.cpp.
+ (javaScriptThreads):
+ (runJavaScriptThread):
+ (startJavaScriptThreads):
+ (stopJavaScriptThreads):
+
+2007-12-03 Andrew Bonventre <andybons@google.com>
+
+ Reviewed by Darin Adler.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=16267
+ Symbol lookup menu broken in debugger view
+
+ * Drosera/debugger.js: Fixed javascript error where document property
+ should have been used instead of contentDocument in switchFunction that
+ was breaking the select symbol dropdown menu. This is because
+ window.frames will return a Window object and not a frame object like
+ the author was originally expecting.
+
+2007-12-03 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam.
+
+ - <rdar://5618942> Drosera: Console window does not process everything
+ correctly.
+ - <rdar://5619005> Drosera: could be sped up by moving the
+ WebScriptScope stuff into the WebScriptCallFrame.
+ - Now the console can correctly process objects and does not receive
+ notifications from JavaScriptCore about the JavaScript in Drosera's
+ own process.
+
+ * Drosera/win/DebuggerDocumentPlatform.cpp:
+ (DebuggerDocument::getPlatformLocalScopeVariableNamesForCallFrame):
+ (DebuggerDocument::platformValueForScopeVariableNamed):
+
+2007-12-03 Stephanie <slewis@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Check to see if we are building a debug root
+
+ * Scripts/check-for-global-initializers:
+
+2007-12-03 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - added a testGetIntIdentifier() method to TestNetscapePlugIn
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
+ (pluginInvoke):
+
+2007-12-03 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Oliver.
+
+ Added eventSender.dispatchMessage() - will be used to test Windows keyboard input
+ in a more fine-grained manner than eventSender.keyDown().
+
+ * DumpRenderTree/win/EventSender.cpp:
+ (getConstantCallback):
+ (dispatchMessageCallback):
+
+2007-12-02 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: More planned renaming.
+
+2007-12-02 Sam Weinig <sam@webkit.org>
+
+ Rubber stamped by Anders.
+
+ Use [NSURL absoluteString] instead of [NSURL description] in order to get
+ more uniform results cross platform.
+
+ * DumpRenderTree/mac/ResourceLoadDelegate.mm:
+ (-[NSURL _drt_descriptionSuitableForTestResult]):
+
+2007-12-02 Sam Weinig <sam@webkit.org>
+
+ Rubber stamped by Niko.
+
+ Rename FrameLoaderDelegate.h/cpp to FrameLoadDelegate.h/cpp.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+ * DumpRenderTree/win/FrameLoadDelegate.cpp: Copied from DumpRenderTree/win/FrameLoaderDelegate.cpp.
+ * DumpRenderTree/win/FrameLoadDelegate.h: Copied from DumpRenderTree/win/FrameLoaderDelegate.h.
+ * DumpRenderTree/win/FrameLoaderDelegate.cpp: Removed.
+ * DumpRenderTree/win/FrameLoaderDelegate.h: Removed.
+
+2007-12-01 Alp Toker <alp@atoker.com>
+
+ Reviewed by Adam Roben.
+
+ Make use of the newly introduced webkit.h convenience header.
+
+ * GtkLauncher/main.c:
+
+2007-12-01 Adam Treat <treat@kde.org>
+
+ Reviewed by Simon.
+
+ * Check to see if the directory exists and exit if not.
+
+ * DumpRenderTree/qt/main.cpp:
+ (main):
+
+2007-12-01 Adam Treat <treat@kde.org>
+
+ Reviewed by Simon.
+
+ * Don't hide symbols when in Debug mode
+ * On Linux (glibc) provide a backtrace in the test output for debugging purposes
+
+
+ * DumpRenderTree/qt/main.cpp:
+ (messageHandler):
+
+2007-11-30 Alp Toker <alp@atoker.com>
+
+ Reviewed by Adam Roben.
+
+ http://bugs.webkit.org/show_bug.cgi?id=15691
+ [GTK] Public API does not follow GTK+ conventions
+
+ Refactor the WebKit/GTK+ public API. Changes:
+ WebKitPage -> WebKitWebView
+ WebKitFrame -> WebKitWebFrame
+
+ Public API source and header names have been updated to mirror the API
+ changes.
+
+ The API is now kept in WebKit/gtk/WebView to match other ports in the
+ same class such as Mac and Win.
+
+ * GtkLauncher/main.c:
+ (activate_uri_entry_cb):
+ (link_hover_cb):
+ (title_change_cb):
+ (progress_change_cb):
+ (go_back_cb):
+ (go_forward_cb):
+ (create_browser):
+ (main):
+
+2007-11-30 Adam Roben <aroben@apple.com>
+
+ Hopefully the final build fix
+
+ * Drosera/win/Drosera.vcproj/Drosera.vcproj: Link against WTF.lib to
+ pull in WTF's assertion/logging functions.
+
+2007-11-30 Adam Roben <aroben@apple.com>
+
+ Another build fix
+
+ * Drosera/win/Drosera.vcproj/Drosera.vcproj: Use the right suffix for
+ WebKit.lib.
+
+2007-11-30 Adam Roben <aroben@apple.com>
+
+ Debug build fix
+
+ * Drosera/win/Drosera.vcproj/Drosera.vcproj: Added a Debug_Internal
+ configuration.
+ * Drosera/win/Drosera.vcproj/debug.vsprops: Updated to match other
+ projects.
+ * Drosera/win/Drosera.vcproj/release.vsprops: Ditto.
+ * Drosera/win/Drosera.vcproj/debug_internal.vsprops: Copied from
+ WebKitTools/DumpRenderTree/win/debug_internal.vsprops.
+
+2007-11-30 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Fix drawSelectionRect to actually draw the selection rect.
+
+ * DumpRenderTree/cg/PixelDumpSupportCG.cpp:
+ (drawSelectionRect):
+
+2007-11-30 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: WildFox already did the TextStyle -> FontStyle one.
+
+2007-11-30 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Get ready for some future renaming.
+
+2007-11-29 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam.
+
+ - Removed some unnecessary functions and changed an unused return type.
+
+ * Drosera/win/DebuggerClient.cpp:
+ (registerConsoleClass):
+ * Drosera/win/DebuggerClient.h:
+ * Drosera/win/Drosera.cpp:
+ (registerDroseraClass):
+
+2007-11-28 Alp Toker <alp@atoker.com>
+
+ Reviewed by Timothy Hatcher.
+
+ http://bugs.webkit.org/show_bug.cgi?id=16174
+ [GTK] Use "URI" not "URL" in public API
+
+ Replace use of the term "URL" with "URI" in public headers,
+ documentation and some internal code to match GLib/GTK+ convention.
+
+ This is now mentioned in the API guidelines:
+ http://trac.webkit.org/projects/webkit/wiki/HackingGtk
+
+ * GtkLauncher/main.c:
+ (activate_uri_entry_cb):
+ (title_change_cb):
+ (create_toolbar):
+ (main):
+
+2007-11-29 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam.
+
+ <rdar://problem/5230478>
+ FrameLoadDelegate callbacks are not dumped in DRT.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (shouldLogFrameLoadDelegates):
+ (runTest):
+ (main):
+ * DumpRenderTree/win/FrameLoaderDelegate.cpp:
+ (BSTRtoString):
+ (descriptionSuitableForTestResult):
+ (FrameLoadDelegate::QueryInterface):
+ (FrameLoadDelegate::didStartProvisionalLoadForFrame):
+ (FrameLoadDelegate::didFailProvisionalLoadWithError):
+ (FrameLoadDelegate::didCommitLoadForFrame):
+ (FrameLoadDelegate::didFinishLoadForFrame):
+ (FrameLoadDelegate::willCloseFrame):
+ (FrameLoadDelegate::didClearWindowObject):
+ (FrameLoadDelegate::didFinishDocumentLoadForFrame):
+ (FrameLoadDelegate::didHandleOnloadEventsForFrame):
+ * DumpRenderTree/win/FrameLoaderDelegate.h:
+ (FrameLoadDelegate::windowScriptObjectAvailable):
+ (FrameLoadDelegate::didFirstLayoutInFrame):
+
+2007-11-29 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders.
+
+ Add database quota UIDelegates methods to DRT UIDelegate.
+
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate webView:quotaForSecurityOrigin:toCreateDatabase:withEstimatedSize:]):
+ (-[UIDelegate webView:quotaForSecurityOrigin:fromProposedQuota:database:]):
+
+2007-11-29 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Sam.
+
+ - <rdar://5618976> Drosera: should listen for the WebScriptDebugServer
+ dying and vice versa.
+ - This fix will allow Drosera and Safari to reconnect if either of them
+ closes correctly, but does not fix the case where one of them dies
+ silently.
+
+ * Drosera/win/ServerConnection.cpp:
+ (ServerConnection::attemptToCreateServerConnection): Added a safety
+ check, because it's possilbe to try to connect to a server that's dying.
+ (ServerConnection::serverDidDie): Implemented. This resets Drosera when
+ the server has died.
+ * Drosera/win/ServerConnection.h: Added the new function and removed
+ an unnecessary member.
+
+2007-11-29 Anders Carlsson <andersca@apple.com>
+
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+ Add shlwapi.lib to all configurations.
+
+2007-11-29 Kevin McCullough <kmccullough@apple.com>
+
+ - Build fix. Added additional includes for VS Express to the Release
+ project.
+
+ * Drosera/win/Drosera.vcproj/Drosera.vcproj:
+
+2007-11-29 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam.
+
+ <rdar://problem/5132005>
+ setUserStyleSheetEnabled is not fully implemented in Windows DRT.
+
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+ Add shlwapi.lib
+
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::setUserStyleSheetEnabled):
+ Implement this.
+
+ (appendComponentToPath):
+ New method which wraps the Win32 API PathAppend.
+
+ (followShortcuts):
+ New method which checks if a file points to a shortcut and
+ follows the shortcut.
+
+ (resolveCygwinPath):
+ New method that takes a cygwin unix-style path and returns the Win32 path.
+
+ (cfStringRefToWString):
+
+ (LayoutTestController::setUserStyleSheetLocation):
+ Implement this.
+
+2007-11-29 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Adam.
+
+ Fixed <rdar://5133828> fast/frames/iframe-window-focus.html output is lowercase
+
+ * DumpRenderTree/win/EventSender.cpp:
+ (keyDownCallback):
+ uppercase letters were being sent as lowercase letters without the shift key down.
+
+2007-11-29 Kevin McCullough <kmccullough@apple.com>
+
+ - Windows build fix. VS express needs some love.
+
+ * Drosera/win/Drosera.vcproj/Drosera.vcproj:
+
+2007-11-28 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ * DumpRenderTree/mac/EventSendingController.mm:
+ (-[EventSendingController keyDown:withModifiers:]):
+ Send capital letters through as lowercase letters with the shift key down
+ rather than sending them as if they were highly unusual "capital letter keys".
+
+ * Scripts/update-javascriptcore-test-results: Add a "--force" option for cases
+ where you need to update results and more tests are failing than before.
+
+2007-11-28 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/5132001>
+ contextClick is not implemented in DRT on Windows.
+
+ * DumpRenderTree/win/EventSender.cpp:
+ (contextClickCallback):
+ Add a callback for contextClick, which sends a WM_RBUTTONDOWN message followed
+ by a WM_RBUTTONUP message.
+
+ * DumpRenderTree/win/UIDelegate.cpp:
+ (UIDelegate::hasCustomMenuImplementation):
+ (UIDelegate::trackCustomPopupMenu):
+ * DumpRenderTree/win/UIDelegate.h:
+ Add a no-op implementation of trackCustomPopupMenu, to prevent the default popup
+ menu from being shown (and causing the DRT to hang).
+
+2007-11-27 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix DumpRenderTree ObjC bug comparing strings.
+
+ * DumpRenderTree/mac/ObjCController.m:
+ (-[ObjCController identityIsEqual::]): Compare strings with string
+ equality instead of identiy equality.
+
+2007-11-27 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Sam.
+
+ Reset the authorAndUserStylesEnabled preference
+ back to YES for each test. Fixes the broken tests.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetWebViewToConsistentStateBeforeTesting):
+
+2007-11-27 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam.
+
+ - Drosera now displays the console window, although it cannot currently
+ process JavaScript.
+
+ * Drosera/win/DebuggerClient.cpp: Shows the console window.
+ (registerConsoleClass): Implemented.
+ (consoleWndProc): Implemented.
+ (DebuggerClient::onSize): Implemented.
+ (DebuggerClient::createWebViewWithRequest): Implemented, now creates a
+ new window.
+ * Drosera/win/DebuggerClient.h: Added needed method and members for
+ creating and maintaining a new window.
+ * Drosera/win/Drosera.cpp: Fixed some minor bugs, and moved a couple of
+ lines of code to more appropriate places.
+ (Drosera::handleCommand):
+ (Drosera::initUI):
+ (Drosera::onSize):
+ (Drosera::attach):
+
+2007-11-27 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ <rdar://problem/5569233> Add the ability to disable author and user CSS styles
+
+ Add support for disabling author and user styles for testing.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/LayoutTestController.cpp:
+ (setAuthorAndUserStylesEnabledCallback):
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::setAuthorAndUserStylesEnabled):
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::setAuthorAndUserStylesEnabled):
+
+2007-11-26 Dan Bernstein <mitz@apple.com>
+
+ - Tiger build fix.
+
+ * DumpRenderTree/mac/Configurations/Base.xcconfig:
+
+2007-11-26 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Maciej.
+
+ - Implemented displaying variables for Drosera on Win.
+
+ * Drosera/win/DebuggerDocumentPlatform.cpp: Changed Drosera functions
+ that retrieve variables to not hold onto the return value since it's
+ not returned. Also changed to use the new signatures of the retrieval
+ functions.
+ (DebuggerDocument::getPlatformLocalScopeVariableNamesForCallFrame):
+ (DebuggerDocument::platformValueForScopeVariableNamed):
+ * Drosera/win/Drosera.cpp: Removed a needless TODO.
+ (droseraWndProc):
+
+2007-11-26 Sam Weinig <sam@webkit.org>
+
+ Cleanup names of painting and repainting functions.
+
+ Reviewed by Adam Roben.
+
+ * DumpRenderTree/cg/PixelDumpSupportCG.cpp:
+ (drawSelectionRect): was drawSelectionRectIntoContext.
+ (dumpWebViewAsPixelsAndCompareWithExpected):
+ * DumpRenderTree/cg/PixelDumpSupportCG.h:
+ * DumpRenderTree/mac/PixelDumpSupportMac.mm:
+ (paintWebView): was drawWebViewIntoContext.
+ (repaintWebView): was repaintWithVerticalSweep and repaintWithHorizontalSweep.
+
+2007-11-26 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ - Leopard build fix
+
+ * DumpRenderTree/mac/Configurations/Base.xcconfig:
+
+2007-11-26 Sam Weinig <sam@webkit.org>
+
+ Fix for http://bugs.webkit.org/show_bug.cgi?id=16136
+ Use shared PixelDumpSupport for Mac DRT
+
+ Reviewed by Adam Roben.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/PixelDumpSupport.h: Copied from DumpRenderTree/win/PixelDumpSupport.h.
+ * DumpRenderTree/cg/ImageDiffCG.cpp:
+ * DumpRenderTree/cg/PixelDumpSupportCG.cpp:
+ (drawSelectionRectIntoContext):
+ (dumpWebViewAsPixelsAndCompareWithExpected):
+ * DumpRenderTree/cg/PixelDumpSupportCG.h:
+ * DumpRenderTree/mac/Configurations/Base.xcconfig:
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dump):
+ * DumpRenderTree/mac/ImageDiff.m: Removed.
+ * DumpRenderTree/mac/PixelDumpSupport.h: Removed.
+ * DumpRenderTree/mac/PixelDumpSupport.mm: Removed.
+ * DumpRenderTree/mac/PixelDumpSupportMac.mm: Copied from DumpRenderTree/mac/PixelDumpSupport.mm.
+ (setDefaultColorProfileToRGB):
+ (getBitmapContextFromWebView):
+ (drawWebViewIntoContext):
+ (repaintWithVerticalSweep):
+ (repaintWithHorizontalSweep):
+ (getSelectionRect):
+ * DumpRenderTree/win/PixelDumpSupport.h: Removed.
+
+2007-11-25 David D. Kilzer <ddkilzer@webkit.org>
+
+ Bug 16052: prepare-ChangeLog doesn't report deleted files
+ <http://bugs.webkit.org/show_bug.cgi?id=16052>
+
+ Reviewed by Sam.
+
+ * Scripts/prepare-ChangeLog: Fixed logic that checks for removed files.
+
+2007-11-25 David Kilzer <ddkilzer@webkit.org>
+
+ Bug 15864: Replace merge-changelog with resolve-ChangeLogs
+ <http://bugs.webkit.org/show_bug.cgi?id=15864>
+
+ Reviewed by Adam.
+
+ Roll functionality of merge-changelog into resolve-ChangeLogs
+ script. The script now checks for ChangeLog.rej and
+ ChangeLog.orig files first. If it finds them, it uses the
+ ChangeLog.rej file as a patch (in old contextual diff format) to
+ apply with --fuzz=3.
+
+ * Scripts/merge-changelog: Removed.
+ * Scripts/resolve-ChangeLogs: Handle traditional rejected patches.
+
+2007-11-25 Sam Weinig <sam@webkit.org>
+
+ Add .xcconfig files for the ImageDiff and TestNetscapePlugIn targets of the DumpRenderTree.
+
+ Reviewed by Mark Rowe.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/mac/Configurations/Base.xcconfig:
+ * DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig:
+ * DumpRenderTree/mac/Configurations/ImageDiff.xcconfig: Added.
+ * DumpRenderTree/mac/Configurations/TestNetscapePlugIn.xcconfig: Added.
+
+2007-11-25 Sam Weinig <sam@webkit.org>
+
+ Convert DumpRenderTree to ues .xcconfig files.
+
+ Reviewed by Mark Rowe.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/mac/Configurations: Added.
+ * DumpRenderTree/mac/Configurations/Base.xcconfig: Added.
+ * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig: Added.
+ * DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig: Added.
+
+2007-11-25 Sam Weinig <sam@webkit.org>
+
+ Add ForwardingHeaders to wtf for DumpRenderTree.
+
+ Reviewed by Mark Rowe.
+
+ * DumpRenderTree/DumpRenderTree.h:
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/ForwardingHeaders: Added.
+ * DumpRenderTree/ForwardingHeaders/wtf: Added.
+ * DumpRenderTree/ForwardingHeaders/wtf/Assertions.h: Added.
+ * DumpRenderTree/ForwardingHeaders/wtf/Noncopyable.h: Added.
+ * DumpRenderTree/ForwardingHeaders/wtf/OwnPtr.h: Added.
+ * DumpRenderTree/ForwardingHeaders/wtf/Platform.h: Added.
+ * DumpRenderTree/ForwardingHeaders/wtf/RetainPtr.h: Added.
+ * DumpRenderTree/ForwardingHeaders/wtf/StringExtras.h: Added.
+ * DumpRenderTree/LayoutTestController.cpp:
+ * DumpRenderTree/WorkQueue.cpp:
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ * DumpRenderTree/mac/FrameLoadDelegate.mm:
+ * DumpRenderTree/mac/JavaScriptThreading.cpp:
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ * DumpRenderTree/mac/ObjCController.m:
+ * DumpRenderTree/mac/UIDelegate.mm:
+ * DumpRenderTree/mac/WorkQueueItemMac.mm:
+
+2007-11-25 Adam Roben <aroben@apple.com>
+
+ Fix some test failures caused by r28019
+
+ Now that stdout is in binary mode, we need to always use printf
+ instead of wprintf. Otherwise we'll end up with UTF-16 characters in
+ the output.
+
+ Reviewed by Sam.
+
+ * DumpRenderTree/win/UIDelegate.cpp: Replaced uses of wprintf with
+ printf.
+ (UIDelegate::runJavaScriptAlertPanelWithMessage):
+ (UIDelegate::runJavaScriptConfirmPanelWithMessage):
+ (UIDelegate::runJavaScriptTextInputPanelWithPrompt):
+ (UIDelegate::webViewAddMessageToConsole):
+
+2007-11-25 Adam Roben <aroben@apple.com>
+
+ Set the font smoothing preference in DRT
+
+ This makes the pixel results on Windows closer to the Mac results.
+
+ Reviewed by Mitz.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (initializePreferences):
+
+2007-11-25 Adam Roben <aroben@apple.com>
+
+ Port ImageDiff to CG and C++
+
+ Final part of http://bugs.webkit.org/show_bug.cgi?id=16133
+ <rdar://5071708>
+
+ Reviewed by Sam.
+
+ * DumpRenderTree/DumpRenderTree.sln: Added ImageDiff.vcproj.
+ * DumpRenderTree/cg/ImageDiffCG.cpp: Added.
+ (main):
+ (createImageFromStdin):
+ (compareImages):
+ (getDifferenceBitmap):
+ (computePercentageDifferent):
+ * DumpRenderTree/win/ImageDiff.vcproj: Added.
+
+2007-11-25 Adam Roben <aroben@apple.com>
+
+ Fix image diff link generation on Windows
+
+ Reviewed by Sam.
+
+ * Scripts/run-webkit-tests: Removed unnecessary and incorrect calls
+ to toURL.
+
+2007-11-25 Adam Roben <aroben@apple.com>
+
+ Implement pixel dumping in Windows DRT
+
+ Part of http://bugs.webkit.org/show_bug.cgi?id=16133
+ <rdar://5071708>
+
+ Reviewed by Sam.
+
+ * DumpRenderTree/cg/PixelDumpSupportCG.cpp: Added.
+ (printPNG): Dumps a CGImageRef as a PNG to stdout, along with a
+ Content-Length header.
+ (getMD5HashStringForBitmap):
+ (dumpWebViewAsPixelsAndCompareWithExpected):
+ * DumpRenderTree/cg/PixelDumpSupportCG.h: Copied from WebKitTools/DumpRenderTree/mac/DumpRenderTreePasteboard.h.
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (dump): Do a pixel dump if requested.
+ (main): Parse pixel test options.
+ * DumpRenderTree/win/DumpRenderTree.vcproj: Added new files and added
+ the cg/ subdirectory to the include path.
+ * DumpRenderTree/win/MD5.cpp: Added. Windows MD5 functions aren't
+ available in a header or import library, so we have to go through this
+ LoadLibrary/GetProcAddress dance to use them.
+ (cryptDLL):
+ (init):
+ (update):
+ (final):
+ (MD5_Init):
+ (MD5_Update):
+ (MD5_Final):
+ * DumpRenderTree/win/MD5.h: Added.
+ * DumpRenderTree/win/PixelDumpSupport.h: Added. This file should be
+ moved up to the top level to share it with Mac eventually.
+ * DumpRenderTree/win/PixelDumpSupportWin.cpp: Added.
+ (getBitmapContextFromWebView): Forces the WebView to paint using a
+ WM_PRINTCLIENT message, and puts the result in a CGBitmapContext.
+
+2007-11-25 Adam Roben <aroben@apple.com>
+
+ Clean up Windows DRT's option parsing a little bit
+
+ Reviewed by Sam.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (main): Put non-option arguments into a Vector.
+
+2007-11-25 Adam Roben <aroben@apple.com>
+
+ Make Windows DRT stop changing LF into CRLF
+
+ Reviewed by Sam.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (main): Put stdout in binary mode.
+ * Scripts/run-webkit-tests: Remove the CRLF hack.
+
+2007-11-24 David Kilzer <ddkilzer@webkit.org>
+
+ Removed empty directory.
+
+ * Scripts/resources: Removed.
+
+2007-11-23 David D. Kilzer <ddkilzer@webkit.org>
+
+ Fix bisect-builds to work with recent WebKit nightly builds.
+
+ Reviewed by Dan.
+
+ * Scripts/bisect-builds: Check for the
+ WebKit.app/Contents/Frameworks/10.[45] directory. If it exists, use
+ it for the DYLD_FRAMEWORK_PATH environment variable, else fallback
+ to WebKit.app/Contents/Resources.
+
+2007-11-23 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Maciej.
+
+ <rdar://problem/5539306> REGRESSION: redirect fails when subframe's document is opened but
+ not closed (affects digg.com)
+
+ * DumpRenderTree/mac/DumpRenderTree.mm: (runTest): Replace the current document with a blank
+ one after finishing with a test to avoid having its delayed onload handler firing when
+ replaced with the next one. This is ugly and still unreliable (see LayoutTests ChangeLog),
+ but it helps somewhat.
+
+2007-11-22 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Alp Toker.
+
+ Fix build-webkit to propagate make's exit status if it fails.
+
+ * Scripts/webkitdirs.pm:
+
+2007-11-22 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ - fix crash when running pixel tests
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dumpRenderTree): Parse the command line options before setting up the
+ environment so that we know if we need to set up the pixel dump
+ machinery.
+
+2007-11-21 Eric Seidel <eric@webkit.org>
+
+ Speculative build fix for Tiger.
+
+ * DumpRenderTree/mac/PixelDumpSupport.mm: include unistd.h
+
+2007-11-21 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Tim Hatcher.
+
+ Break out more of DumpRenderTree.mm into individual files
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/mac/CheckedMalloc.cpp: Added.
+ (checkedMalloc):
+ (checkedRealloc):
+ (makeLargeMallocFailSilently):
+ * DumpRenderTree/mac/CheckedMalloc.h: Added.
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (crashHandler):
+ (dump):
+ * DumpRenderTree/mac/DumpRenderTreeMac.h:
+ * DumpRenderTree/mac/DumpRenderTreePasteboard.h:
+ * DumpRenderTree/mac/DumpRenderTreePasteboard.m:
+ * DumpRenderTree/mac/DumpRenderTreeWindow.h:
+ * DumpRenderTree/mac/DumpRenderTreeWindow.mm:
+ * DumpRenderTree/mac/JavaScriptThreading.cpp: Added.
+ (javaScriptThreads):
+ (runJavaScriptThread):
+ (startJavaScriptThreads):
+ (stopJavaScriptThreads):
+ * DumpRenderTree/mac/JavaScriptThreading.h: Added.
+ * DumpRenderTree/mac/PixelDumpSupport.h: Added.
+ * DumpRenderTree/mac/PixelDumpSupport.mm: Added.
+ (restoreColorSpace):
+ (setDefaultColorProfileToRGB):
+ (initializeColorSpaceAndScreeBufferForPixelTests):
+ (md5HashStringForBitmap):
+ (dumpWebViewAsPixelsAndCompareWithExpected):
+
+2007-11-21 Kevin Ollivier <kevino@theolliviers.com>
+
+ Move install-unix-extras to wx directory as it seems only to be used by that
+ port now. It now supports universal binaries on Mac and adds libpng and libjpeg.
+ Also, have build-wxwebkit run it in order to fix the Mac buildbot, and
+ have install-unix-extras install into WebKitLibraries as per
+ convention.
+
+ Reviewed by Mark Rowe.
+
+ * Scripts/install-unix-extras: Removed.
+ * wx/build-wxwebkit:
+ * wx/install-unix-extras: Copied from WebKitTools/Scripts/install-unix-extras.
+
+2007-11-21 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam.
+
+ More refactoring for greater code readability
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (initializeGlobalsFromCommandLineOptions):
+ (initializeColorSpaceAndScreeBufferForPixelTests):
+ (addTestPluginsToPluginSearchPath):
+ (useLongRunningServerMode):
+ (runTestingServerLoop):
+ (prepareConsistentTestingEnvironment):
+ (dumpRenderTree):
+ (main):
+ (dumpFramesAsText):
+ (dumpBackForwardListForWebView):
+ (sizeWebViewForCurrentTest):
+ (methodNameStringForFailedTest):
+ (dumpBackForwardListForAllWindows):
+ (dumpWebViewAsPixelsAndCompareWithExpected):
+ (invalidateAnyPreviousWaitToDumpWatchdog):
+ (dump):
+ * DumpRenderTree/mac/DumpRenderTreeMac.h:
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate webView:createWebViewWithRequest:]):
+
+2007-11-21 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Tim Hatcher.
+
+ Abstract more of DRT into static methods
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (setDefaultsToConsistentValuesForTesting):
+ (setupSignalHandlers):
+ (allocateGlobalControllers):
+ (releaseAndZero):
+ (releaseGlobalControllers):
+ (dumpRenderTree):
+ (shouldLogFrameLoadDelegates):
+ (createCFURLFromPathOrURL):
+ (resetWebViewToConsistentStateBeforeTesting):
+ (runTest):
+
+2007-11-21 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Tim Hatcher.
+
+ Pull DumpRenderTreeWindow and DumpRenderTreePasteboard out into their own files
+
+ * DumpRenderTree/DumpRenderTree.h:
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dumpRenderTree):
+ (dump):
+ (runTest):
+ * DumpRenderTree/mac/DumpRenderTreePasteboard.h: Added.
+ * DumpRenderTree/mac/DumpRenderTreePasteboard.m: Added.
+ (+[DumpRenderTreePasteboard _pasteboardWithName:]):
+ (+[DumpRenderTreePasteboard releaseLocalPasteboards]):
+ (-[DumpRenderTreePasteboard declareType:owner:]):
+ (+[LocalPasteboard alloc]):
+ (-[LocalPasteboard init]):
+ (-[LocalPasteboard dealloc]):
+ (-[LocalPasteboard name]):
+ (-[LocalPasteboard releaseGlobally]):
+ (-[LocalPasteboard declareTypes:owner:]):
+ (-[LocalPasteboard addTypes:owner:]):
+ (-[LocalPasteboard changeCount]):
+ (-[LocalPasteboard types]):
+ (-[LocalPasteboard availableTypeFromArray:]):
+ (-[LocalPasteboard setData:forType:]):
+ (-[LocalPasteboard dataForType:]):
+ (-[LocalPasteboard setPropertyList:forType:]):
+ (-[LocalPasteboard setString:forType:]):
+ * DumpRenderTree/mac/DumpRenderTreeWindow.h: Added.
+ * DumpRenderTree/mac/DumpRenderTreeWindow.mm: Added.
+ (+[DumpRenderTreeWindow allWindows]):
+ (-[DumpRenderTreeWindow initWithContentRect:styleMask:backing:defer:]):
+ (-[DumpRenderTreeWindow dealloc]):
+ (-[DumpRenderTreeWindow isKeyWindow]):
+ (-[DumpRenderTreeWindow keyDown:]):
+
+2007-11-20 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fix for Windows. Don't use WebCore/move-js-headers.sh as
+ it indiscriminately copies any headers inside JavaScriptCore,
+ which includes Tiger ICU headers.
+
+ * wx/build-wxwebkit:
+ Don't run WebCore/move-js-headers.sh any longer.
+
+2007-11-20 Adam Treat <treat@kde.org>
+
+ Reviewed by David Kilzer.
+
+ * Prepend git branch name to $baseProductDir
+
+ * Scripts/VCSUtils.pm:
+ * Scripts/webkitdirs.pm:
+
+2007-11-20 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Simon Hausmann.
+
+ * Scripts/build-webkit: Pass "clean" flag down into buildQMakeProject.
+ * Scripts/webkitdirs.pm: Respect the "clean" flag passed down from build-webkit.
+ Have it trigger a "make distclean" rather than "make clean" to ensure that the
+ built product and generated Makefile's are removed.
+
+2007-11-19 Alp Toker <alp@atoker.com>
+
+ Reviewed by Mark Rowe.
+
+ http://bugs.webkit.org/show_bug.cgi?id=16040
+ [GTK] GtkLauncher should be written in C
+
+ Port GtkLauncher to plain C.
+
+ Use a more conventional GTK+ coding style.
+
+ Use a toolbar instead of menus.
+
+ Various signature fixes and cleanups.
+
+ Add a license header. Assume all previous modifications were copyright
+ assigned to Apple Inc. by default.
+
+ * GtkLauncher/GtkLauncher.pro:
+ * GtkLauncher/main.c: Added.
+ (activate_url_entry_cb):
+ (update_title):
+ (link_hover_cb):
+ (title_change_cb):
+ (progress_change_cb):
+ (destroy_cb):
+ (go_back_cb):
+ (go_forward_cb):
+ (create_browser):
+ (create_statusbar):
+ (create_toolbar):
+ (create_window):
+ (main):
+ * GtkLauncher/main.cpp: Removed.
+
+2007-11-19 Kevin Ollivier <kevino@theolliviers.com>
+
+ Build script fixes to ensure they do the right thing for the
+ wx port, and update build-wxwebkit to reflect the way the
+ build scripts now work.
+
+ Reviewed by Adam.
+
+ * Scripts/build-testkjs:
+ * Scripts/build-webkit:
+ * Scripts/run-javascriptcore-tests:
+ * Scripts/webkitdirs.pm:
+ * wx/build-wxwebkit:
+
+2007-11-18 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Anders.
+
+ Make run-javascriptcore-tests report failures on exit (to support git bisect)
+
+ * Scripts/run-javascriptcore-tests:
+
+2007-11-18 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Make run-webkit-tests work with Windows debug build.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp: (main): Only use memory checks with debug CRT.
+ * DumpRenderTree/win/DumpRenderTree.vcproj: Switched Debug configuration to release CRT,
+ as it is supposed to run with release Apple libraries. Removed _DEBUG preprocessor
+ symbol, as it goes with debug CRT (AFAIK, it is supposed to be added automatically,
+ and shouldn't be needed in Debug_internal configuration, but I didn't dare to change that).
+
+2007-11-18 Kevin Ollivier <kevino@theolliviers.com>
+
+ Add wxWebKit sample and build script, and integrate it with
+ build-webkit. Also make build-webkit --clean work for all
+ ports.
+
+ Reviewed by Darin Adler.
+
+ * Scripts/build-webkit:
+ * Scripts/webkitdirs.pm:
+ * wx: Added.
+ * wx/browser: Added.
+ * wx/browser/browser.bkl: Added.
+ * wx/browser/browser.cpp: Added.
+ * wx/build-wxwebkit: Added.
+
+2007-11-17 Adam Roben <aroben@apple.com>
+
+ Make it easy to run Safari in the debugger on Windows
+
+ I've added a new script, debug-safari, which launches Safari in the
+ debugger. On OS X it just calls gdb-safari.
+
+ Reviewed by Mark Rowe.
+
+ * FindSafari/FindSafari.cpp:
+ (_tmain): Added a /debugger flag, which in combination with
+ /printSafariLauncher will print a script that launches Safari in the
+ debugger.
+ * Scripts/debug-safari: Added.
+ * Scripts/run-safari: Changed to call runSafari().
+ * Scripts/run-webkit-nightly.cmd: Prepends the launcher script with
+ vsvars32.bat, which will let us find VS/VC++ Express, and passes the
+ first argument along to FindSafari.
+ * Scripts/webkitdirs.pm:
+ (sub runSafari): Added.
+
+2007-11-16 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ * Scripts/run-webkit-tests: Avoid an uninitialized warning if WEBKIT_TESTFONTS is not defined.
+
+2007-11-16 Ryan Leavengood <leavengood@gmail.com>
+
+ Reviewed by David Kilzer.
+
+ The git config command was renamed to repo-config at some point. This
+ change tries git config and then git repo-config if the first fails.
+
+ * Scripts/prepare-ChangeLog:
+ (gitConfig):
+
+2007-11-16 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler and Sam Weinig.
+
+ - fix <rdar://problem/5134075> fast/forms/select-type-ahead-non-latin.html fails on Windows
+
+ * DumpRenderTree/win/EventSender.cpp:
+ (keyDownCallback): For characters that cannot be entered on the active
+ keyboard layout, send a WM_CHAR message with the character along with
+ a WM_KEYDOWN message with a virtual key code of 255.
+
+2007-11-16 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Don't weak link against WebCore now that it is a sub-framework of WebKit in all configurations.
+
+ * Drosera/mac/Drosera.xcodeproj/project.pbxproj:
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+
+2007-11-15 Adam Roben <aroben@apple.com>
+
+ Make run-safari actually work on Windows
+
+ * Scripts/run-safari: Fixed the order of arguments to cp, and added a
+ chdir call.
+
+2007-11-14 Adam Roben <aroben@apple.com>
+
+ Updates to Safari launching now that 3.0.4 is released
+
+ Reviewed by Sam.
+
+ * FindSafari/FindSafari.cpp:
+ (getWebViewCLSID): Use version-independent ProgID.
+ * Scripts/run-safari: Use run-webkit-nightly.cmd.
+
+2007-11-14 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam.
+
+ <rdar://problem/5309081>
+ In DRT, "plugin.logDestroy = true" not working on Windows.
+
+ * DumpRenderTree/win/TestNetscapePlugin/main.c:
+ (NPP_Destroy):
+
+2007-11-14 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Sam.
+
+ * Scripts/run-sunspider: add --shark-cache for L2 Cache Miss profiling
+
+2007-11-14 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam.
+
+ <rdar://problem/5141186>
+ window.layoutTestController.setWindowIsKey is not implemented in DRT.
+
+ Implement setWindowIsKey.
+
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::setWindowIsKey):
+
+2007-11-13 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Fix for <rdar://problem/5382579>
+ http/tests/security/cross-frame-access-put.html reports large
+ negative numbers for screenLeft and screenTop (Mac reports "0")
+
+ * DumpRenderTree/win/UIDelegate.cpp:
+ (UIDelegate::UIDelegate): Initialize the RECT.
+ (UIDelegate::setFrame): copy the contents of the rect, not the pointer.
+ (UIDelegate::webViewFrame): ditto.
+ * DumpRenderTree/win/UIDelegate.h: Use a RECT not a RECT*
+
+2007-11-13 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam.
+
+ - Make Drosera show source, source URLs, and function stack on Windows,
+ and some minor fixes.
+
+ * Drosera/DebuggerDocument.cpp: Force source to always update display.
+ (DebuggerDocument::updateFileSource):
+ * Drosera/debugger.js: Force source to always update display.
+ * Drosera/win/DebuggerClient.cpp: Create the needed functions for the
+ menu controls.
+ (DebuggerClient::resume):
+ (DebuggerClient::pause):
+ (DebuggerClient::stepInto):
+ (DebuggerClient::stepOver):
+ (DebuggerClient::stepOut):
+ (DebuggerClient::showConsole):
+ (DebuggerClient::closeCurrentFile):
+ * Drosera/win/DebuggerClient.h: Ditto.
+ * Drosera/win/DebuggerDocumentPlatform.cpp: Changed
+ getPlatformCurrentFunctionStack to not use an unecessary HRESULT and
+ removed two bugs. 1) caller could be in a bad state when asked to
+ assign into it. 2) BSTRs were not created correctly.
+ (DebuggerDocument::getPlatformCurrentFunctionStack):
+ * Drosera/win/Drosera.cpp: Hook up the menu controls.
+ (droseraWndProc):
+ (handleCommand):
+ (Drosera::resume):
+ (Drosera::pause):
+ (Drosera::stepInto):
+ (Drosera::stepOver):
+ (Drosera::stepOut):
+ (Drosera::showConsole):
+ (Drosera::closeCurrentFile):
+ * Drosera/win/Drosera.h: Hook up the menu controls.
+ * Drosera/win/ServerConnection.cpp: Removed unncessary server connection
+ functions, added a null check, and fixed another bug where caller could
+ be in a bad state when asked to assign into it.
+ (ServerConnection::didLoadMainResourceForDataSource):
+ (ServerConnection::getCallerFrame):
+ * Drosera/win/ServerConnection.h: Safety first.
+
+2007-11-13 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - fix <http://bugs.webkit.org/show_bug.cgi?id=13371>
+ DumpRenderTree --pixel-tests renders each test twice
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dumpRenderTree): Removed the --paint option because the painting code
+ is always exercised as a result of
+ -[FrameLoadDelegate webView:didFinishLoadFromFrame:]
+ calling -displayIfNeeded.
+ (dump): Changed to always grab the image from the window since the view
+ is always displayed.
+ (runTest):
+ (displayWebView):
+ * Scripts/run-webkit-tests: No need to pass --paint to DumpRenderTree
+ because it always paints.
+
+2007-11-12 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Adele.
+
+ Add support for http media tests
+
+ * Scripts/run-webkit-tests:
+
+2007-11-12 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Implement LayoutTestController.setPrivateBrowsingEnabled(bool) for windows.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (runTest):
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::setPrivateBrowsingEnabled):
+
+2007-11-12 Adam Roben <aroben@apple.com>
+
+ * Scripts/update-webkit-localizable-strings: Changed to only scan the
+ mac and win subdirectories.
+
+2007-11-11 Adam Roben <aroben@apple.com>
+
+ Fix <rdar://5133816> keepWebHistory is not implemented
+
+ Fixes fast/history/clicked-link-is-visited.html.
+
+ Reviewed by Darin Adler.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (runTest): Clear the optionalSharedHistory.
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::keepWebHistory): Set the optionalSharedHistory.
+
+2007-11-10 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Tim Hatcher.
+
+ Follow up to <rdar://problem/5394877> Safari should not log unsafe JavaScript
+ attempts when in private browsing mode (only an issue if Log JavaScript Exceptions
+ is turned on)
+
+ - Add LayoutTestController.setPrivateBrowsingEnabled(bool) (stub out implementation for windows)
+
+ Added test: http/tests/security/cross-frame-access-private-browsing.html
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (setPrivateBrowsingEnabledCallback):
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (runTest): Default to private browsing disabled.
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::setPrivateBrowsingEnabled):
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::setPrivateBrowsingEnabled):
+
+2007-11-08 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam.
+
+ - Changed the vcproj file to use Drosera's ForwardingHeaders and not
+ WebCore's!
+
+ * Drosera/ForwardingHeaders/wtf/Assertions.h: Added.
+ * Drosera/ForwardingHeaders/wtf/HashTraits.h: Added.
+ * Drosera/ForwardingHeaders/wtf/Noncopyable.h: Added.
+ * Drosera/ForwardingHeaders/wtf/OwnPtr.h: Added.
+ * Drosera/ForwardingHeaders/wtf/RetainPtr.h: Added.
+ * Drosera/win/Drosera.cpp:
+ * Drosera/win/Drosera.vcproj/Drosera.vcproj:
+
+2007-11-08 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Sam.
+
+ - Use the new IWebFrame [local] function signature and get the shared
+ server correctly.
+
+ * Drosera/win/DebuggerClient.cpp:
+ (DebuggerClient::didFinishLoadForFrame):
+ * Drosera/win/ServerConnection.cpp:
+ (ServerConnection::attemptToCreateServerConnection):
+
+2007-11-07 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - add an option to run-webkit-tests to ignore pixel test failures where
+ all pixels differ by no more than a specified threshold
+
+ * DumpRenderTree/mac/ImageDiff.m:
+ (main):
+ (compareImages):
+ (computePercentageDifferent):
+ * Scripts/run-webkit-tests:
+
+2007-11-07 Simon Hausmann <hausmann@kde.org>
+
+ Reviewed by Lars.
+
+ Make the setting of letting Javascript access the clipboard configurable through QWebSettings, turn it off by default and turn it on in DumpRenderTree.
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+
+2007-11-07 Simon Hausmann <hausmann@kde.org>
+
+ Reviewed by Lars.
+
+ Reworked the QWebSettings API.
+ QWebPage now returns a pointer to its mutable QWebSettings object and the settings of newly created QWebPageObjects are initialized from QWebSettings::defaultSettings().
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+
+2007-11-07 Simon Hausmann <hausmann@kde.org>
+
+ Reviewed by Lars.
+
+ Make QWebHistory an explicitly shared object, returned as a pointer by QWebPage::history().
+
+ * DumpRenderTree/qt/jsobjects.cpp:
+
+2007-11-07 Simon Hausmann <hausmann@kde.org>
+
+ Reviewed by Lars Knoll <lars@trolltech.com>.
+
+ Add a QWebPage::frameCreated() signal and fix DRT
+
+ The removal of createFrame in QWebPage broke the re-implementation
+ in DumpRenderTree. Instead emit a frameCreated() signal and
+ connect to it in DumpRenderTree.
+
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::WebPage::WebPage):
+ (WebCore::DumpRenderTree::dump):
+ (WebCore::DumpRenderTree::connectFrame):
+ * DumpRenderTree/qt/DumpRenderTree.h:
+
+2007-11-07 Simon Hausmann <hausmann@kde.org>
+
+ Reviewed by Lars Knoll <lars@trolltech.com>.
+
+ Moved all the event handlers from QWebFrame into QWebPage.
+
+ This cleans up the public API and allows us to remove the
+ HackWebFrame hack in DumpRenderTree.
+
+
+ * DumpRenderTree/qt/jsobjects.cpp:
+ (EventSender::mouseDown):
+ (EventSender::mouseUp):
+ (EventSender::mouseMoveTo):
+
+2007-11-07 Simon Hausmann <hausmann@kde.org>
+
+ Reviewed by Mark.
+
+ Implemented the two Javascript prompt callbacks in qt/DumpRenderTree
+ to prevent the default implementation from popping up messageboxes.
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::WebPage::javaScriptConfirm):
+ (WebCore::WebPage::javaScriptPrompt):
+
+2007-11-06 Eric Seidel <eric@webkit.org>
+
+ * Scripts/build-testkjs: build fix... too many $$
+
+2007-11-06 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ * Scripts/build-testkjs: return xcodebuild's exit status, instead of grep's
+
+2007-11-05 Adam Roben <aroben@apple.com>
+
+ Add support on Windows for WEBKIT_TESTFONTS
+
+ This environment variable lets you specify where the fonts to be used
+ by DumpRenderTree reside. The Qt port is already using this, so I'm
+ just following their lead.
+
+ Reviewed by Darin Adler.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (exePath): Refactored code out of initialize().
+ (fontsPath): Returns either $WEBKIT_TESTFONTS or
+ DumpRenderTree.resources.
+ (initialize): Use the new fontsPath function.
+ (main): Use the new exePath function.
+ * Scripts/run-webkit-tests: Propagate the WEBKIT_TESTFONTS environment
+ variable to DRT, like Qt does.
+
+2007-11-05 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Alp Toker.
+
+ Remove buggy "autocomplete" from GtkLauncher as it causes more problems than it solves.
+
+ * GtkLauncher/main.cpp:
+ (goToURLBarText):
+ (main):
+
+2007-11-04 David D. Kilzer <ddkilzer@webkit.org>
+
+ bisect-builds doesn't work with nightly build r19992 or newer on Leopard
+ <http://bugs.webkit.org/show_bug.cgi?id=15830>
+
+ Reviewed by Timothy.
+
+ Restrict the range of nightly builds used by the bisect-builds script
+ based on the version of Safari and the version of Mac OS X being used.
+
+ Mac OS X 10.4: Safari 2.0: r11976 or newer
+ Mac OS X 10.4: Safari 3.0: r19992 or newer
+
+ Mac OS X 10.5: Safari 2.0: r19594 or newer
+ Mac OS X 10.5: Safari 3.0: r25124 or newer
+
+ * Scripts/bisect-builds:
+ (findMacOSXVersion): Added.
+ (makeNightlyList): Added argument to provide version of Mac OS X.
+ Restrict range of nightly builds based on Safari and Mac OS X versions.
+
+2007-11-04 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Maciej.
+
+ - This patch involves several changes, all of them were noticed that
+ they were needed by the work being done in WebKit to get Drosera and
+ WebKit working together on Windows.
+ - The changes are:
+ 1) Added a debugger console for output messages.
+ 2) Drosera now listens for the WebKit server (before, the server would
+ have to be running before Drosera was started.)
+ 3) Fixed a bug where the WebView started out as 0x0 pixels.
+ 4) Fixed a bug when there is no scope.
+ 5) Added the HTML, JS, and CSS to the project file to make them easy to
+ find.
+ 6) Made the ServerConnection functions virtual.
+
+ * Drosera/win/DebuggerClient.cpp: This is part of how Drosera listens
+ for the WebKit server.
+ (DebuggerClient::DebuggerClient):
+ (DebuggerClient::~DebuggerClient):
+ (DebuggerClient::didFinishLoadForFrame):
+ (DebuggerClient::serverConnected):
+ (DebuggerClient::attemptToCreateServerConnection):
+ * Drosera/win/DebuggerClient.h: Ditto.
+ * Drosera/win/DebuggerDocumentPlatform.cpp: Fixed a bug when there is no
+ scope.
+ (DebuggerDocument::getPlatformLocalScopeVariableNamesForCallFrame):
+ (DebuggerDocument::platformValueForScopeVariableNamed):
+ * Drosera/win/Drosera.cpp:
+ (_tWinMain): Added a console in debug for output messages.
+ (Drosera::Drosera): Listen for server.
+ (Drosera::initUI): The server now Initializes COM.
+ (Drosera::serverConnected): Part of the listening for the server.
+ (Drosera::attemptToCreateServerConnection): Ditto.
+ * Drosera/win/Drosera.h: New interface for listening for the server.
+ * Drosera/win/Drosera.vcproj/Drosera.vcproj: Added HTML, JS, and CSS
+ files to the VS project.
+ * Drosera/win/ServerConnection.cpp: Part of listening for the server
+ connection.
+ (ServerConnection::ServerConnection):
+ (ServerConnection::attemptToCreateServerConnection):
+ * Drosera/win/ServerConnection.h: Ditto and virtualized the Interface
+ methods.
+ (ServerConnection::serverConnected):
+
+2007-11-04 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Maciej.
+
+ http://bugs.webkit.org/show_bug.cgi?id=15832
+ fast/dom/gc-10.html crashes when run alone
+
+ Check for !done before using objects that can be already deallocated.
+
+ * DumpRenderTree/mac/EditingDelegate.mm:
+ (-[EditingDelegate webView:shouldBeginEditingInDOMRange:]):
+ (-[EditingDelegate webView:shouldEndEditingInDOMRange:]):
+ (-[EditingDelegate webView:shouldInsertNode:replacingDOMRange:givenAction:]):
+ (-[EditingDelegate webView:shouldInsertText:replacingDOMRange:givenAction:]):
+ (-[EditingDelegate webView:shouldDeleteDOMRange:]):
+ (-[EditingDelegate webView:shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
+ (-[EditingDelegate webView:shouldApplyStyle:toElementsInDOMRange:]):
+ (-[EditingDelegate webView:shouldChangeTypingStyle:toStyle:]):
+ (-[EditingDelegate webViewDidBeginEditing:]):
+ (-[EditingDelegate webViewDidChange:]):
+ (-[EditingDelegate webViewDidEndEditing:]):
+ (-[EditingDelegate webViewDidChangeTypingStyle:]):
+ (-[EditingDelegate webViewDidChangeSelection:]):
+ * DumpRenderTree/mac/FrameLoadDelegate.mm:
+ (-[FrameLoadDelegate webView:didStartProvisionalLoadForFrame:]):
+ (-[FrameLoadDelegate webView:didCommitLoadForFrame:]):
+ (-[FrameLoadDelegate webView:didFailProvisionalLoadWithError:forFrame:]):
+ (-[FrameLoadDelegate webView:didFinishLoadForFrame:]):
+ (-[FrameLoadDelegate webView:didFailLoadWithError:forFrame:]):
+ (-[FrameLoadDelegate webView:windowScriptObjectAvailable:]):
+ (-[FrameLoadDelegate webView:didClearWindowObject:forFrame:]):
+ (-[FrameLoadDelegate webView:didReceiveTitle:forFrame:]):
+ (-[FrameLoadDelegate webView:didReceiveServerRedirectForProvisionalLoadForFrame:]):
+ (-[FrameLoadDelegate webView:didReceiveIcon:forFrame:]):
+ (-[FrameLoadDelegate webView:didChangeLocationWithinPageForFrame:]):
+ (-[FrameLoadDelegate webView:willPerformClientRedirectToURL:delay:fireDate:forFrame:]):
+ (-[FrameLoadDelegate webView:didCancelClientRedirectForFrame:]):
+ (-[FrameLoadDelegate webView:willCloseFrame:]):
+ (-[FrameLoadDelegate webView:didFinishDocumentLoadForFrame:]):
+ (-[FrameLoadDelegate webView:didHandleOnloadEventsForFrame:]):
+ * DumpRenderTree/mac/ResourceLoadDelegate.mm:
+ (-[ResourceLoadDelegate webView:identifierForInitialRequest:fromDataSource:]):
+ (-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]):
+ (-[ResourceLoadDelegate webView:resource:didReceiveResponse:fromDataSource:]):
+ (-[ResourceLoadDelegate webView:resource:didFinishLoadingFromDataSource:]):
+ (-[ResourceLoadDelegate webView:resource:didFailLoadingWithError:fromDataSource:]):
+ (-[ResourceLoadDelegate webView:resource:willCacheResponse:fromDataSource:]):
+
+2007-11-04 Mark Rowe <mrowe@apple.com>
+
+ Build fix. Don't use Carbon.h as the prefix header as it triggers
+ warnings that would otherwise be suppressed due to it being a system header.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+
+2007-11-03 Maciej Stachowiak <mjs@apple.com>
+
+ Rubber stamped by Adam.
+
+ - Turn off deprecated function warnings for TestNetscapePlugin because Carbon.h triggers them
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+
+2007-11-03 David D. Kilzer <ddkilzer@webkit.org>
+
+ Sort files(...); sections of Xcode project files.
+
+ Rubber-stamped by Darin Adler.
+
+ * DrawTest/DrawTest.xcodeproj/project.pbxproj:
+ * Drosera/mac/Drosera.xcodeproj/project.pbxproj:
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj:
+
+2007-11-03 David D. Kilzer <ddkilzer@webkit.org>
+
+ Script to sort "files(...);" sections in Xcode project.pbxproj files.
+
+ Reviewed by Darin Adler.
+
+ * Scripts/sort-Xcode-project-file: Added.
+
+2007-11-02 Darin Adler <darin@apple.com>
+
+ * Scripts/run-sunspider: Changed "--base" to "--set-baseline".
+
+2007-11-02 Darin Adler <darin@apple.com>
+
+ Reviewed by Maciej.
+
+ * Scripts/run-sunspider: Pass the "--base" option through.
+
+ * Scripts/sunspider-compare-results: Don't check the number of parameters; let
+ the real script do that. Default configuration to Release to match run-sunspider
+ so we don't end up building Debug just to compare results.
+
+2007-11-01 Adam Roben <aroben@apple.com>
+
+ Make changes in WebKit/win show up under "WebKit/win:" instead of just "win:"
+
+ Reviewed by Sam.
+
+ * Scripts/commit-log-editor: Show all the directories beneath the
+ source root, instead of just the last one.
+
+2007-11-01 Kevin Ollivier <kevino@theolliviers.com>
+
+ Reviewed by Adam Roben.
+
+ Print out an error message when the Windows build fails
+ and provide guidance on how to find out what went wrong.
+
+ * Scripts/build-webkit:
+ * Scripts/webkitdirs.pm:
+
+2007-11-01 Alexey Proskuryakov <ap@webkit.org>
+
+ Rubber-stamped by Adam Roben.
+
+ Rolled out r27326 - debug CRT seems to cause no problems after all.
+
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+
+2007-10-31 Adam Roben <aroben@apple.com>
+
+ Switch the Debug configuration to using the non-debug CRT
+
+ This matches WebKit.
+
+ Reviewed by Steve.
+
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+
+2007-10-31 Antti Koivisto <antti@apple.com>
+
+ Reviewed by bdash.
+
+ Disable media tests when doing leak checking on Tiger.
+ They crash in QuickTime (rdar://problem/5537157).
+
+ * Scripts/run-webkit-tests:
+
+2007-10-29 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Maciej.
+
+ Build media support by default on OSX only.
+
+ * Scripts/build-webkit:
+
+2007-10-30 Kevin McCullough <kmccullough@apple.com>
+
+ - Made Adam the reviewer for a previous checkin. Not sure how it didn't
+ get caught by the pre-commit hooks.
+
+2007-10-30 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam.
+
+ - This is a collection of relatively unrelated changes and cleanups
+ to Drosera to prepare it for interacting with WebKit. A lot of these
+ changes are just correcting mistakes, for example removing included
+ headers that are no longer needed.
+
+ * Drosera/DebuggerDocument.h: Added accessor for the ServerConnection
+ this will be needed by the DebuggerClient.
+ (DebuggerDocument::server):
+ * Drosera/win/BaseDelegate.h: Removed unnecessary include.
+ * Drosera/win/DebuggerClient.cpp:
+ (DebuggerClient::didFinishLoadForFrame): Finished implementing.
+ (DebuggerClient::didReceiveTitle): Added comment about its purpose.
+ (DebuggerClient::createWebViewWithRequest): Added comment about its
+ purpose.
+ * Drosera/win/DebuggerClient.h: Removed unnecessary include, and forward
+ declarations.
+ (DebuggerClient::webViewLoaded): Moved.
+ * Drosera/win/Drosera.cpp: Moved a function from the HelperFunctions
+ file, since this was the only place it was used.
+ (cfStringToBSTR):
+ * Drosera/win/Drosera.h: Cleaned up the includes.
+ * Drosera/win/Drosera.vcproj/Drosera.vcproj: Removed HelperFunctions.h
+ * Drosera/win/HelperFunctions.h: Removed.
+
+2007-10-30 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam.
+
+ - Small cleanup in the ServerConnection class.
+
+ * Drosera/win/ServerConnection.cpp: Added comments, moved some functions
+ and added an include.
+ (ServerConnection::currentFrame):
+ (ServerConnection::getCallerFrame):
+ * Drosera/win/ServerConnection.h: Added comments, moved some functions,
+ made a pointer into a COMPtr, and cleaned up the includes.
+
+2007-10-29 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by John Sullivan.
+
+ - Place the Localizable.strings file in mac or win directories
+ if that location exists.
+ - Also look for UI_STRING in .c files.
+
+ * Scripts/extract-localizable-strings:
+
+2007-10-30 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam.
+
+ - Set the eol-style to native and made all the line endings the same
+ so that I avoid messy diffs that show eol changes.
+
+ * Drosera/win/ServerConnection.cpp:
+ (ServerConnection::didParseSource):
+ (ServerConnection::didEnterCallFrame):
+ (ServerConnection::willExecuteStatement):
+ (ServerConnection::willLeaveCallFrame):
+ (ServerConnection::exceptionWasRaised):
+
+2007-10-30 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam.
+
+ * Drosera/win/DebuggerDocumentPlatform.cpp:Implemented much of the
+ functionality that could not have existed previously without the new
+ interfaces.
+ (JSValueRefCreateWithBSTR): Added a helper function to easily convert
+ from a BSTR to a JSValueRef.
+ (DebuggerDocument::platformEvaluateScript): Implemented.
+ (DebuggerDocument::getPlatformCurrentFunctionStack): Implemented.
+ (DebuggerDocument::getPlatformLocalScopeVariableNamesForCallFrame):
+ Implemented.
+ (DebuggerDocument::platformValueForScopeVariableNamed): Implemented.
+ * Drosera/win/HelperFunctions.h: Cleaned up some comments.
+ * Drosera/win/ServerConnection.cpp: Added a helper function.
+ (ServerConnection::getCallerFrame):
+ * Drosera/win/ServerConnection.h: Added a helper function.
+
+2007-10-29 Kevin McCullough <kmccullough@apple.com>
+
+ updated reviewers for my previous changelog.
+
+2007-10-29 Kevin McCullough <kmccullough@apple.com>
+ Reviewed by Maciej and Adam and Geoff.
+
+ - Minor mac-side improvements including moving a function to a more
+ appropriate location, fixing a warning, and correctly checking
+ exceptions.
+
+ * Drosera/DebuggerDocument.cpp: Corrected the exception checking.
+ (DebuggerDocument::willExecuteStatement):
+ (DebuggerDocument::didEnterCallFrame):
+ (DebuggerDocument::willLeaveCallFrame):
+ (DebuggerDocument::windowScriptObjectAvailable):
+ (DebuggerDocument::callFunctionOnObject):
+ * Drosera/mac/DebuggerClient.mm: Fixes a warning.
+ * Drosera/mac/DebuggerDocumentPlatform.mm: Moved
+ webScriptAttributeKeysForScriptObject to DebuggerDocumentPlatform
+ because it doesn't require the ServerConnection at all.
+ (NSStringCreateWithJSStringRef): Made an argument const.
+ (JSValueRefCreateWithNSString): Made an argument const.
+ (+[WebScriptObject webScriptAttributeKeysForScriptObject:]):
+ (DebuggerDocument::getPlatformLocalScopeVariableNamesForCallFrame):
+ * Drosera/mac/ServerConnection.h: Moved aforementioned function.
+ * Drosera/mac/ServerConnection.mm: Ditto.
+ (-[ServerConnection webView:didLoadMainResourceForDataSource:]):
+
+2007-10-29 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Add a globalFlag property to the LayoutTestController to allow cross-domain indications.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (getGlobalFlagCallback):
+ (setGlobalFlagCallback):
+ (LayoutTestController::getJSClass):
+ (LayoutTestController::staticValues):
+ * DumpRenderTree/LayoutTestController.h:
+ (LayoutTestController::globalFlag):
+ (LayoutTestController::setGlobalFlag):
+
+2007-10-29 Darin Adler <darin@apple.com>
+
+ Reviewed by Maciej.
+
+ * Scripts/run-sunspider: Added --shark20 option, to run Shark at its highest sample
+ resolution instead of its default.
+
+2007-10-29 David Kilzer <ddkilzer@webkit.org>
+
+ Fixed showStatus() to print status for successfully resolved conflicts when using git.
+
+ Reviewed by Mark Rowe.
+
+ Previously showStatus() would run "git diff --name-status" after a ChangeLog conflict
+ was successfully resolved, but this would not show any status because the change had
+ already been cached in the index using "git add". The solution is to add an optional
+ second argument to showStatus() which adds the "--cached" switch to the command.
+
+ * Scripts/resolve-ChangeLogs:
+ (showStatus):
+
+2007-10-28 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Maciej and Geoff, in unison.
+
+ * Scripts/run-webkit-tests: remove broken --svg option
+
+2007-10-28 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam.
+
+ * Scripts/run-sunspider: Default to "Release" configuration rather than
+ defaulting to the last configuration used as other scripts do. This can
+ still be overriden on the command line with "--debug" if there's some
+ reason to do so. Also fix a typo.
+
+ * Scripts/sunspider-compare-results: Fix a typo.
+
+2007-10-26 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam.
+
+ - Implemented the WebScriptDebugListener functions now that the
+ WebScriptDebugServer exists
+
+ * Drosera/win/ServerConnection.cpp: Implemented WebScriptDebugListener
+ functions.
+ (ServerConnection::currentFrame):
+ (ServerConnection::didLoadMainResourceForDataSource):
+ (ServerConnection::didParseSource):
+ (ServerConnection::failedToParseSource):
+ (ServerConnection::didEnterCallFrame):
+ (ServerConnection::willExecuteStatement):
+ (ServerConnection::willLeaveCallFrame):
+ (ServerConnection::exceptionWasRaised):
+ * Drosera/win/ServerConnection.h: Removed unused arguments from the
+ members arguments list.
+
+2007-10-26 David Kilzer <ddkilzer@webkit.org>
+
+ prepare-ChangeLog and update-webkit create needless ChangeLog conflicts
+ <http://bugs.webkit.org/show_bug.cgi?id=15600>
+
+ Reviewed by Darin Adler.
+
+ The resolve-ChangeLog script merges conflicted ChangeLogs in svn or git by creating
+ a patch of the local changes and applying it with a fuzz level of 3 to the new file.
+ If the patch is successful, it runs 'svn resolved' or 'git add' on the new ChangeLog
+ file. Note that it may also be used as a stand-alone script.
+
+ * Scripts/prepare-ChangeLog: Call resolve-ChangeLogs for conflicted ChangeLog files.
+ * Scripts/resolve-ChangeLogs: Added.
+ * Scripts/update-webkit: Call resolve-ChangeLogs for conflicted ChangeLog files.
+
+2007-10-26 Mark Rowe <mrowe@apple.com>
+
+ Qt build fix. r27084 added a destructor implementation for LayoutTestController
+ to the Qt port on the assumption that it was an implementation of the cross-platform
+ LayoutTestController class. It is not, so it did not need to be changed.
+
+ * DumpRenderTree/qt/jsobjects.cpp: Remove empty destructor.
+
+2007-10-25 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Maciej.
+
+ Fix builds with code coverage enabled.
+
+ * Scripts/build-webkit: Don't overwrite the existing value of OTHER_LDFLAGS.
+
+2007-10-25 Darin Adler <darin@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ * Scripts/make-js-test-wrappers: Don't generate a wrapper for intersectsNode.js.
+ * Scripts/prepare-ChangeLog: Add a special case for prefix of empty string.
+
+2007-10-25 Stephanie <slewis@apple.com>
+
+ build Fix
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+
+2007-10-25 Stephanie <slewis@apple.com>
+
+ Reviewed by Mark Rowe, Adam Roben.
+
+ Weak link against WebCore so DumpRenderTree can be bundled with production roots.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+
+2007-10-25 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Adam.
+
+ Fixed <rdar://5549689> 2 tests in fast/forms fail when run with other tests on Windows
+
+ Moving destructor into platform-specific files
+ * DumpRenderTree/LayoutTestController.cpp:
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::~LayoutTestController):
+ * DumpRenderTree/qt/jsobjects.cpp:
+ (LayoutTestController::~LayoutTestController):
+
+ LayoutTestController wasn't being destroyed
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (runTest):
+
+ Added declspec
+ * DumpRenderTree/win/EditingDelegate.h:
+
+ Reset certain values on the webview (or related delegate) that might
+ have changed while running a test
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::~LayoutTestController):
+
+2007-10-25 Adam Roben <aroben@apple.com>
+
+ Make sunspider-compare-results work with relative paths
+
+ Reviewed by Sam.
+
+ * Scripts/sunspider-compare-results: Convert arguments to absolute
+ paths before we chdir.
+
+2007-10-25 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Sam.
+
+ - Implemented server calls now the WebScriptDebugServer exists.
+ - Also removed no longer needed call to initialize CG.
+
+ * Drosera/win/Drosera.cpp: No longer initializes CG because this happens
+ automatically now.
+ (_tWinMain):
+ * Drosera/win/ServerConnection.cpp: Now uses the COM class.
+ (ServerConnection::ServerConnection):
+ (ServerConnection::~ServerConnection):
+ (ServerConnection::pause):
+ (ServerConnection::resume):
+ (ServerConnection::stepInto):
+ (ServerConnection::applicationTerminating):
+ (ServerConnection::serverConnectionDidDie):
+ * Drosera/win/ServerConnection.h: Now uses the COM class.
+
+2007-10-24 George Staikos <staikos@kde.org>
+
+ Unbreak Qt build.
+
+ * Scripts/build-webkit:
+
+2007-10-24 Adam Roben <aroben@apple.com>
+
+ Remove now-unnecessary call to InitializeCoreGraphics
+
+ WebKit takes care of this now.
+
+ Reviewed by Ada.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (initialize):
+
+2007-10-24 Adam Roben <aroben@apple.com>
+
+ Use WebTextRenderer in DRT
+
+ Reviewed by Ada.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (initialize): Use WebTextRenderer instead of using AddFontResourceEx.
+
+2007-10-24 Sven Herzberg <sven@imendio.com>
+
+ Reviewed by Mark Rowe.
+
+ Fixes http://bugs.webkit.org/show_bug.cgi?id=15614
+ Bug 15614: [GTK] qmake based backends don't build on OS X
+
+ * Scripts/build-webkit: set QMAKESPEC correctly if building the QT or
+ GTK backend on a Mac
+ * Scripts/webkitdirs.pm: extracted the darwin-test from isOSX() into
+ isDarwin() to make it reusable in other places (like the workaround-
+ for-prebuilt-qmake in build-webkit)
+
+2007-10-24 David Kilzer <ddkilzer@webkit.org>
+
+ Refurbish update-webkit script.
+
+ Reviewed by Adam.
+
+ * Scripts/update-webkit: Add -h|--help switch and usage statement. Check result of
+ GetOptions() call. Fix -q|--quiet switch to be passed to svn command properly. Use
+ multi-argument version of system() for flexibility and security. Check for existence
+ of Internal directory using -d test instead of -x.
+
+2007-10-24 David Kilzer <ddkilzer@webkit.org>
+
+ Minor clean-up of prepare-ChangeLog script.
+
+ Reviewed by Adam.
+
+ * Scripts/prepare-ChangeLog: Keep list of updated ChangeLog files in an array instead
+ of a string. Use multi-argument versions of open() and system() for flexibility and
+ security.
+
+2007-10-24 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Oliver.
+
+ Fix <rdar://5410959> editing/selection/drag-to-contenteditable-iframe.html fails on Windows
+
+ Move the call to replaySavedEvents from doDragDrop to doMouseMove because we don't want to
+ replay the saved events when we're still processing the mousedown that starts the drag
+ * DumpRenderTree/win/EventSender.cpp:
+ (doMouseMove):
+ * DumpRenderTree/win/UIDelegate.cpp:
+ (UIDelegate::doDragDrop):
+
+2007-10-24 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Sam, Steve and Darin.
+
+ - Stubbed out the WebScriptDebugListener functionality in the Server
+ Connection class to prepare it for receiving those callbacks.
+ - Also I changed the instantiation of DebuggerClient, DebuggerDocument
+ and the ServerConnection to not need to be initialized with a server
+ name, since that is not the way we connect to the WebKit server.
+
+ * Drosera/DebuggerDocument.cpp: Fixed a bug where I was always logging
+ no exception. Now it only loggs when there is an exception
+ (DebuggerDocument::willExecuteStatement):
+ (DebuggerDocument::didEnterCallFrame):
+ (DebuggerDocument::willLeaveCallFrame):
+ (DebuggerDocument::windowScriptObjectAvailable):
+ (DebuggerDocument::callFunctionOnObject):
+ * Drosera/win/DebuggerClient.cpp: No longer needs the ServerConnection
+ to be instantiated with a server's name.
+ (DebuggerClient::DebuggerClient):
+ (DebuggerClient::didFinishLoadForFrame):
+ * Drosera/win/DebuggerClient.h: Removed unsued variable.
+ * Drosera/win/Drosera.cpp: Client no longer needs to be initialized with
+ a server name.
+ (Drosera::init):
+ (Drosera::initServer):
+ * Drosera/win/Drosera.h: No longer need the ServerConnection to be
+ instantiated with a server's name.
+ * Drosera/win/ServerConnection.cpp:
+ (ServerConnection::ServerConnection): No longer needs a server name
+ (ServerConnection::~ServerConnection): Only release the global context
+ if there is one.
+ (ServerConnection::serverConnectionDidDie): Stub for
+ IWebScriptDebugListener
+ (ServerConnection::QueryInterface): ditto
+ (ServerConnection::AddRef): ditto
+ (ServerConnection::Release): ditto
+ (ServerConnection::didLoadMainResourceForDataSource): ditto
+ (ServerConnection::didParseSource): ditto
+ (ServerConnection::failedToParseSource): ditto
+ (ServerConnection::didEnterCallFrame): ditto
+ (ServerConnection::willExecuteStatement): ditto
+ (ServerConnection::willLeaveCallFrame): ditto
+ (ServerConnection::exceptionWasRaised): ditto
+ * Drosera/win/ServerConnection.h: Stubbed out the
+ IWebScriptDebugListener functions, and this class no longer needs to be
+ instantiated with a server name.
+
+2007-10-24 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Simon.
+
+ add a layoutTestController.dumpSelectionRect() dummy. It only has an effect on mac pixel tests anyway. Makes us pass another 5 test cases.
+
+ * DumpRenderTree/qt/jsobjects.h:
+
+2007-10-24 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Simon.
+
+ add another command.
+
+ * DumpRenderTree/qt/jsobjects.cpp:
+ (TextInputController::doCommand):
+
+2007-10-24 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Simon.
+
+ add empty eventSender.clearKillRing(), and map some of the special keys used in eventSender.keyDown() to things that work on Qt/X11.
+
+ * DumpRenderTree/qt/jsobjects.cpp:
+ (EventSender::keyDown):
+ * DumpRenderTree/qt/jsobjects.h:
+
+2007-10-24 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Simon.
+
+ implement eventSender.keyDown().
+
+ * DumpRenderTree/qt/jsobjects.cpp:
+ (EventSender::keyDown):
+
+2007-10-24 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Simon.
+
+ some smaller fixes to the editing support in DRT. Makes another few tests pass.
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::initJSObjects):
+ * DumpRenderTree/qt/jsobjects.cpp:
+ (TextInputController::doCommand):
+
+2007-10-24 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Simon.
+
+ first bit of implementation for the textinputcontroller.
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ * DumpRenderTree/qt/DumpRenderTree.h:
+ * DumpRenderTree/qt/jsobjects.cpp:
+ (TextInputController::TextInputController):
+ (TextInputController::doCommand):
+ * DumpRenderTree/qt/jsobjects.h:
+
+2007-10-24 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Simon.
+
+ make the man webpage believe it has focus, so the editing tests work correctly.
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+
+2007-10-24 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Simon.
+
+ implement layoutTestController.dumpEditingCallbacks() correctly.
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ * DumpRenderTree/qt/jsobjects.cpp:
+ (LayoutTestController::reset):
+ (LayoutTestController::dumpEditingCallbacks):
+
+2007-10-24 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Simon.
+
+ Implement support for testing editing.
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+
+2007-10-23 Sam Weinig <sam@webkit.org>
+
+ Check for null BSTR that can be passed to the UIDelegate methods
+ from javascript null and undefined. Fixes a failing test case on
+ Windows (fast/dom/Window/alert-undefined.html)
+
+ Reviewed by Eric Seidel.
+
+ * DumpRenderTree/win/UIDelegate.cpp:
+ (UIDelegate::runJavaScriptAlertPanelWithMessage):
+ (UIDelegate::runJavaScriptConfirmPanelWithMessage):
+ (UIDelegate::runJavaScriptTextInputPanelWithPrompt):
+ (UIDelegate::webViewAddMessageToConsole):
+
+2007-10-23 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Don't print a massive pile of setenvs from tools that automatically build testkjs.
+
+ * Scripts/build-testkjs:
+
+2007-10-23 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - add wrapper that finds the right copy of testkjs
+
+ * Scripts/sunspider-compare-results: Added.
+
+2007-10-23 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Sam.
+
+ - After talking with Steve I now see that the WebKit server must be
+ running for DCOM to create the distributed objects, which makes sense
+ and currently WebKit only allows one instance to be running at a time
+ which avoids accidentally connecting to the wrong server
+ - In light of this I have removed the code for the attach box and
+ NotificationServer and known server names, since they are all extranious
+ now.
+
+ * Drosera/win/Drosera.cpp: Removed notification classes and known server
+ names.
+ (_tWinMain): Uses init instead of initUI.
+ (droseraWndProc): No longer creats an attach dialog box.
+ (Drosera::Drosera): Does the OleInitialize so COM is ready to go and
+ it's not manditory to call init before doing COM stuff.
+ (Drosera::init): calls initUI and will call attach when the
+ functionality exists.
+ (Drosera::initUI): Has changed very little.
+ (Drosera::attach): Changed the signature to reflect that we no longer
+ need the dictionary of known server names.
+ * Drosera/win/Drosera.h: Removed notification classes and known server
+ names. Also renamed and moved some functions.
+ * Drosera/win/Drosera.vcproj/Drosera.rc: Removed the Attach box.
+ * Drosera/win/Drosera.vcproj/Drosera.vcproj: Moved resource.h from the
+ headers to the resources folder.
+ * Drosera/win/resource.h: Removed the Attach box.
+
+2007-10-22 Adam Roben <aroben@apple.com>
+
+ Windows build fix
+
+ * Scripts/build-dumprendertree: Fix path to DumpRenderTree.sln.
+
+2007-10-22 Kevin McCullough <kmccullough@apple.com>
+
+ - Removed a leak that was fixed.
+
+ * Scripts/run-webkit-tests:
+
+2007-10-19 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - Changed the Client so that the DebuggerDocument now own the
+ ServerConnection. This simplifies ownership and cleanup.
+
+ * Drosera/win/DebuggerClient.cpp: The DebuggerDocument now owns the
+ ServerConnection.
+ (DebuggerClient::initWithServerName):
+ (DebuggerClient::didFinishLoadForFrame):
+ * Drosera/win/DebuggerClient.h: DebuggerDocument now owns the
+ ServerConnection.
+ * Drosera/win/Drosera.cpp: Moved some WebFrame initialization logic to
+ until after we have a server which we are attached to.
+ (Drosera::initUI):
+ (Drosera::attach):
+ * Drosera/win/Drosera.h: Removed two needless pointers I forgot to take
+ out previously.
+
+2007-10-22 Simon Hausmann <hausmann@kde.org>
+
+ Reviewed by Nikolas.
+
+ When running build-testkjs make sure it's called through the perl interpreter, to fix the build for Qt/Windows.
+
+ * Scripts/run-javascriptcore-tests:
+
+2007-10-22 Simon Hausmann <hausmann@kde.org>
+
+ Reviewed by Nikolas.
+
+ Wrap WEXITSTATUS with a little exitStatus() helper function that falls back to the use of $returnvalue >> 8 on Windows to determine the exit status on platforms without WEXITSTATUS.
+
+ * Scripts/build-drosera:
+ * Scripts/build-dumprendertree:
+ * Scripts/build-testkjs:
+ * Scripts/build-webkit:
+ * Scripts/run-javascriptcore-tests:
+ * Scripts/run-sunspider:
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm:
+
+2007-10-22 Andrew Wellington <proton@wiretapped.net>
+
+ Reviewed by Mark Rowe.
+
+ Fix for local database support after r26879
+ Ensure that ENABLE_DATABASE and ENABLE_ICONDATABASE are correctly set
+
+ * Scripts/build-webkit:
+
+2007-10-22 Holger Freyther <zecke@selfish.org>
+
+ Reviewed by Simon Hausmann <hausmann@kde.org>.
+
+ - Do not build testkjs as an application bundle. This is
+ needed for run-javascriptcore-tests on OSX.
+ - Also, based on r26633, allow to test the WebKit/Qt port on OSX.
+ - Set DYLD_LIBRARY_PATH if it was set in the environment. It must be set
+ as we do not have -rpath on OSX.
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+ * Scripts/run-webkit-tests:
+
+2007-10-22 Simon Hausmann <hausmann@kde.org>
+
+ Reviewed by aroben.
+
+ Fix support for Signed-off-by detection in prepare-ChangeLog
+ --git-commit. The Signed-off-by tag does not appear in the header
+ but usually at the end.
+
+ * Scripts/prepare-ChangeLog:
+
+2007-10-21 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Eric.
+
+ Fix run-javascriptcore-tests for Gtk.
+
+ * Scripts/build-testkjs: testkjs is built by build-webkit for Gtk.
+
+2007-10-20 Eric Seidel <eric@webkit.org>
+
+ Reviewed by aroben.
+
+ * Scripts/find-extra-includes: fix path matching regex to not match ".patch"
+
+2007-10-20 Eric Seidel <eric@webkit.org>
+
+ Reviewed by darin.
+
+ Add improved argument handling to run-sunspider, including
+ --runs=<number>, --shell=<path>, --tests=<pattern>, --shark, and --help
+ Also re-factor code into subroutines
+
+ * Scripts/build-dumprendertree: removed bogus comments
+ * Scripts/build-testkjs: Added.
+ * Scripts/run-javascriptcore-tests: use build-testkjs
+ * Scripts/run-sunspider: improved argument handling, abstraction
+ * Scripts/run-webkit-tests: improved abstraction
+
+2007-10-20 Matt Lilek <webkit@mattlilek.com>
+
+ Not reviewed, Windows build fix.
+
+ * DumpRenderTree/win/EventSender.cpp:
+ (keyDownCallback):
+
+2007-10-20 Darin Adler <darin@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=15544
+ <rdar://problem/5076426> fast/events/arrow-navigation.html needs to
+ not rely on Apple-specific key codes
+
+ * DumpRenderTree/mac/EventSendingController.mm:
+ (-[EventSendingController keyDown:withModifiers:]):
+ Added named key "rightArrow". Later we could have a whole table of these.
+ Also tweaked modifiers code a little.
+
+ * DumpRenderTree/win/EventSender.cpp: (keyDownCallback): Ditto.
+
+2007-10-19 Darin Adler <darin@apple.com>
+
+ Reviewed by Eric.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=15566
+ possible fix for leak seen in DumpRenderTree
+
+ * DumpRenderTree/WorkQueue.cpp: (WorkQueue::queue):
+ Delete the item if it's not put on the queue, since the caller has
+ no way of knowing that. Would be better to have the parameter type
+ be auto_ptr to express the fact that we take ownership.
+
+ - unrelated change
+
+ * Drosera/mac/main.m: Add missing include.
+
+2007-10-19 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam.
+
+ - This change should be identical but for some reason was not working
+ on my machine.
+
+ * Scripts/prepare-ChangeLog:
+
+2007-10-19 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Oliver and Tim.
+
+ - Made use of RetainPtr to avoid retain and release issues and moved the
+ log function to DebuggerDocumentPlatform, which seems to be a more
+ logical place for it to live.
+ - Also moved knownServers from the ServerConnection to
+ DebuggerApplication to match the Windows code and because it makes sense
+ that a connection knows its own server but not all of them.
+
+ * Drosera/mac/DebuggerClient.h: Moved the log function to
+ DebuggerDocumentPlatform.
+ * Drosera/mac/DebuggerClient.mm: Ditto. Also do not release the server
+ Because it's owned by an own Ptr in DebuggerDocument. Also moved the
+ call for the server name up from the ServerConnection class.
+ (-[DebuggerClient dealloc]):
+ (-[DebuggerClient webView:didReceiveTitle:forFrame:]): Moved the call
+ for the server name up from the ServerConnection.
+ * Drosera/mac/DebuggerDocumentPlatform.mm: Made the server an OwnPtr.
+ (DebuggerDocument::platformPause):
+ (DebuggerDocument::platformResume):
+ (DebuggerDocument::platformStepInto):
+ (DebuggerDocument::platformEvaluateScript):
+ (DebuggerDocument::getPlatformCurrentFunctionStack):
+ (DebuggerDocument::getPlatformLocalScopeVariableNamesForCallFrame):
+ (DebuggerDocument::platformValueForScopeVariableNamed):
+ (DebuggerDocument::platformLog): Log directly from here. No need to call
+ DebuggerClient.
+ * Drosera/mac/ServerConnection.h: Removed the knownServers function. The
+ way I see it, a ServerConnection should only know about its connection
+ and the group of all possible servers should be kept by the
+ application.
+ * Drosera/mac/ServerConnection.mm: Removed knownServer but added
+ currentServerName, it makes sense that the connection should know that
+ name.
+ (-[ServerConnection currentServerName]):
+
+2007-10-19 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam.
+
+ - Integrated changes from mac drosera. Recently I've encapsulated
+ out the server connection object from the rest of Drosera because
+ it is very platform dependent right now and RPC is not implemented on
+ windows. This functionality, of communicating with the WebKit server
+ is the next area I will be focusing on in Windows.
+
+ - Other changes and cleanup were made to organize the code and add notes
+ on which parts still need work. Also some mac code is added and
+ commented out, to act as pseudocode for the logic of those parts.
+
+ * Drosera/DebuggerDocument.h: Make the ServerConnection live in a smart
+ pointer.
+ * Drosera/config.h: Added whitespace.
+ * Drosera/win/DebuggerApplication.cpp: Removed. The functionality of
+ these files got moved into Drosera.h/cpp
+ * Drosera/win/DebuggerApplication.h: Removed.
+ * Drosera/win/DebuggerClient.cpp: Lots of cleanup and restructuring
+ happened here to better match the logic flow of the same code on the
+ mac side and to use the new ServerConnection class.
+ (DebuggerClient::DebuggerClient): Constructor that takes a server name.
+ (DebuggerClient::initWithServerName): Initializer that will set up the
+ class to use a ServerConnection object. This was necessary so I could
+ create a DebuggerClient without having to initilaize it at
+ construction.
+ (DebuggerClient::QueryInterface): Moved from Drosera.cpp, the Client
+ will be the UIDelegate and FrameLoadDelegate.
+ (DebuggerClient::AddRef): For IUnknown.
+ (DebuggerClient::Release): For IUnknown.
+ (DebuggerClient::didFinishLoadForFrame): Part of the FrameLoadDelegate
+ this still needs to set the global context of the server, but
+ IWebFrame does not have an accessor for the global context yet.
+ (DebuggerClient::windowScriptObjectAvailable): Part of FrameLoadDelegate
+ this is a pass through for the same function in the document.
+ (DebuggerClient::didReceiveTitle): Unimplemented part of
+ FrameLoadDelegate this would change the title of the window.
+ (DebuggerClient::createWebViewWithRequest): Part of the
+ FrameLoadDelegate. This is about new windows via Window.open() and
+ how their delegates are set.
+ (DebuggerClient::runJavaScriptAlertPanelWithMessage): Part of the
+ UIDelegate. Just a debug function for printing messages.
+ * Drosera/win/DebuggerClient.h: Moved functionality from Drosera.h
+ because the Client should be the UIDelegate and FrameLoadDelegate
+ to match the delegates on mac.
+ (DebuggerClient::webViewLoaded): Added accessor method.
+ * Drosera/win/DebuggerDocumentPlatform.cpp: Added. I had apperently
+ forgotten to add this file before. This is where the platform
+ dependent versions of the Documents functions live. Most of these are
+ unimplemented because some piece of functionality does not exist on
+ Windows yet.
+ (DebuggerDocument::platformPause):
+ (DebuggerDocument::platformResume):
+ (DebuggerDocument::platformStepInto):
+ (DebuggerDocument::platformEvaluateScript):
+ (DebuggerDocument::getPlatformCurrentFunctionStack):
+ (DebuggerDocument::getPlatformLocalScopeVariableNamesForCallFrame):
+ (DebuggerDocument::platformValueForScopeVariableNamed):
+ (DebuggerDocument::platformLog):
+ * Drosera/win/Drosera.cpp: Removed UIDelegate and FrameLoadDelegate
+ responsibilities becaue they belong in the Client. Also I laid the
+ groundwork for attaching Drosera to a WebKit process
+ (attachWndProc): Now if a server is selected the Client becomes it's
+ delegate.
+ (Drosera::Drosera): Added the construction of the Client and dictionary
+ of server names.
+ (Drosera::initUI): This is no longer the delegates, the Client is.
+ (Drosera::webViewLoaded): Now asks the Client instead of holding local
+ state.
+ (Drosera::applicationDidFinishLaunching): Placeholder for needed
+ notification registration when it's possible to implement.
+ (Drosera::serverLoaded): Ditto
+ (Drosera::serverUnloaded): Ditto
+ (Drosera::attach): Attach Drosera to the WebKit server.
+ * Drosera/win/Drosera.h: Ditto for Drosera.cpp comment.
+ (Drosera::getInst):
+ (Drosera::setInst):
+ (Drosera::knownServers):
+ * Drosera/win/Drosera.vcproj/Drosera.vcproj: Removed DebuggerApplication
+ and added the ServerConnection.
+ * Drosera/win/DroseraPrefix.h: Added an ifndef check.
+ * Drosera/win/ServerConnection.cpp: Added. This is the interesting part
+ Most of the functions are completely unimlemented because they cannot
+ connect with the WebKit server, because one does not exist on Windows
+ yet.
+ (ServerConnection::initWithServerName):
+ (ServerConnection::~ServerConnection):
+ (ServerConnection::setGlobalContext):
+ (ServerConnection::pause):
+ (ServerConnection::resume):
+ (ServerConnection::stepInto):
+ (ServerConnection::switchToServerNamed):
+ (ServerConnection::applicationTerminating):
+ (ServerConnection::serverConnectionDidDie):
+ (ServerConnection::currentFrame):
+ * Drosera/win/ServerConnection.h: Added. Ditto.
+ (ServerConnection::ServerConnection):
+
+2007-10-19 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for these broken layout tests on Windows:
+
+ fast/forms/focus-selection-input.html
+ fast/forms/focus-selection-textarea.html
+ fast/forms/select-accesskey.html
+
+ * DumpRenderTree/win/EventSender.cpp:
+ (keyDownCallback):
+ correct the VK code for alt key.
+
+2007-10-19 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Make the GtkLauncher code slightly more readable.
+
+ * GtkLauncher/main.cpp:
+ (setupMainMenu): Added.
+ (setupMainWindowUI): Added.
+ (main):
+
+2007-10-19 Maciej Stachowiak <mjs@apple.com>
+
+ Rubber stamped by Adam.
+
+ - don't delay-load WebKit in DumpRenderTree.
+
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+
+2007-10-18 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Adam Roben.
+
+ - fix <rdar://problem/5313523>
+ REGRESSION(Leopard): http/tests/incremental/slow-utf8-text.pl fails on Leopard
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dump): Changed to use _responseMIMEType.
+
+2007-10-17 Adam Roben <aroben@apple.com>
+
+ Make it possible to have Windows-specific tests and results
+
+ When searching for tests to run and the Skipped file, we will only
+ look in platform/win and the cross-platform directory. When looking
+ for expected results, we will look in platform/win, then
+ platform/mac-leopard, then platform/mac, then finally the
+ cross-platform directory.
+
+ Reviewed by Sam.
+
+ * Scripts/run-webkit-tests:
+ (sub expectedDirectoryForTest): Search in mac-leopard and mac before
+ searching in the cross-platform directory.
+ (sub buildPlatformHierarchy): Removed some unneeded calls to
+ dirname/basename.
+
+2007-10-17 Adam Roben <aroben@apple.com>
+
+ Add back the call to register WebKit that we had before WebKitInitializer existed
+
+ This is needed to ensure that the right WebKit is used when
+ instantiating COM objects.
+
+ Reviewed by Oliver.
+
+ * DumpRenderTree/win/debug_internal.vsprops: Define
+ DEBUG_WEBKIT_HAS_SUFFIX.
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (initialize):
+
+2007-10-17 Adam Roben <aroben@apple.com>
+
+ Import File::Basename in webkitdirs since we use it
+
+ * Scripts/webkitdirs.pm:
+
+2007-10-17 Kevin McCullough <kmccullough@apple.com>
+
+ - Updated the tiger leaks list to make the internal bots green.
+
+ * Scripts/run-webkit-tests:
+
+2007-10-17 Adam Roben <aroben@apple.com>
+
+ Build fix for VC++ Express
+
+ * FindSafari/FindSafari.vcproj: Explicitly link against advapi32.lib
+ and ole32.lib.
+
+2007-10-16 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Sam.
+
+ - Minor mac improvements based on observations I made while implementing the
+ Windows code.
+
+ * Drosera/mac/DebuggerApplication.mm: Attach does not need to create the server
+ then hand it to the Client who will retain it, it should just be the client who
+ creates and owns the server.
+ (-[DebuggerApplication attach:]):
+ * Drosera/mac/DebuggerClient.h: Can now be created with just a server name.
+ * Drosera/mac/DebuggerClient.mm: Creates the server.
+ (-[DebuggerClient initWithServerName:]):
+ * Drosera/mac/ServerConnection.mm: Does not need to include 2 header files, but
+ can instead forward declare what it needs.
+
+2007-10-16 Darin Adler <darin@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ * Scripts/run-webkit-tests: Added --add-platform-exceptions; useful when you
+ want to turn failing tests into platform-specific test results. Also did a
+ number of tweaks, including fixing a potential bug where expectedDirectoryForTest
+ would take the type of results into account only some of the time.
+
+2007-10-16 Adam Roben <aroben@apple.com>
+
+ Add a new nightly launcher script for Windows
+
+ This new script is for versions of Safari that don't delay-load
+ WebKit. I had to make FindSafari be able to print out the nightly
+ launcher script on stdout because Windows shell scripts can't capture
+ the output from a command into an environment variable.
+
+ Reviewed by Steve.
+
+ * FindSafari/FindSafari.cpp:
+ (_tmain): Added /printSafariLauncher option.
+ * Scripts/run-webkit-nightly.cmd: Added.
+
+2007-10-16 Adam Roben <aroben@apple.com>
+
+ Replace WebKitInitializer with FindSafari
+
+ We now rely on setting the PATH environment variable to tell Windows
+ where to find WebKit and its dependencies (similar to
+ DYLD_FRAMEWORK_PATH on Mac).
+
+ This change also make DumpRenderTree no longer delay-load WebKit.
+
+ Reviewed by Sam.
+
+ * DumpRenderTree/DumpRenderTree.sln: Removed WebKitInitializer, added
+ FindSafari.
+ * DumpRenderTree/win/DumpRenderTree.cpp: Don't use WebKitInitializer.
+ * DumpRenderTree/win/DumpRenderTree.vcproj: Don't link against
+ WebKitInitializer, don't delay-load WebKit.
+ * Scripts/run-javascriptcore-tests: Call setPathForRunningWebKitApp.
+ * Scripts/run-webkit-tests: Ditto.
+ * Scripts/webkitdirs.pm:
+ (sub setPathForRunningWebKitApp): Added.
+ * WebKitInitializer/WebKitInitializer.cpp: Removed.
+ * WebKitInitializer/WebKitInitializer.h: Removed.
+ * WebKitInitializer/WebKitInitializer.vcproj: Removed.
+ * WebKitInitializer/debug.vsprops: Removed.
+ * WebKitInitializer/debug_internal.vsprops: Removed.
+ * WebKitInitializer/release.vsprops: Removed.
+
+2007-10-16 Adam Roben <aroben@apple.com>
+
+ Fix Bug 15532: run-safari fails if Safari is installed in a non-default location
+
+ http://bugs.webkit.org/show_bug.cgi?id=15532
+
+ FindSafari simply prints the location of an installed Safari.exe on
+ stdout.
+
+ Reviewed by Darin Adler.
+
+ * FindSafari/FindSafari.cpp: Copied from WebKitTools/WebKitInitializer/WebKitInitializer.cpp.
+ (getStringValue):
+ (getWebViewCLSID):
+ (getInstalledWebKitDirectory):
+ (_tmain):
+ * FindSafari/FindSafari.vcproj: Added.
+ * Scripts/webkitdirs.pm:
+ (sub installedSafariPath): Added. Calls FindSafari on Windows.
+
+2007-10-16 Adam Roben <aroben@apple.com>
+
+ Updated for rename of WebKit_debug.dll to WebKit.dll for the Debug configuration
+
+ Reviewed by Kevin McCullough.
+
+ * DumpRenderTree/win/DumpRenderTree.vcproj: Use WebKitDLLConfigSuffix
+ when referring to WebKit.dll.
+ * DumpRenderTree/win/debug.vsprops: Added WebKitDLLConfigSuffix.
+ * DumpRenderTree/win/debug_internal.vsprops: Ditto.
+ * DumpRenderTree/win/release.vsprops: Ditto.
+ * Scripts/run-safari: Don't pass /debug to Safari anymore because we
+ never have a _debug suffix on WebKit.dll.
+ * WebKitInitializer/WebKitInitializer.cpp:
+ (initializeWebKit): Only use the _debug suffix for WebKit.dll when
+ specified.
+ * WebKitInitializer/debug_internal.vsprops: Added
+ DEBUG_WEBKIT_HAS_SUFFIX preprocessor definition.
+
+2007-10-16 Darin Adler <darin@apple.com>
+
+ Reviewed by Adele.
+
+ * DumpRenderTree/win/EventSender.cpp: (keyDownCallback):
+ Remove now-unneeded control/alt key hack; the tests have been updated.
+
+2007-10-16 Kevin McCullough <kmccullough@apple.com>
+
+ - Updated leaks list because our internal bot upgraded it's version of leopard and
+ one of the leaks was fixed between that revision and the bot's previous version of
+ leopard.
+
+ * Scripts/run-webkit-tests:
+
+2007-10-15 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Tim.
+
+ - I encapsulated out the server connecton functionality because it is a specific part
+ of Drosera that will be platform dependant until the WebScriptDebugServer can be moved
+ into WebCore and C++. But if it is encapsulated out it can be easily replaced on
+ Windows. So the majority of this patch is moving preexisting functionality.
+
+ - Also I removed the prefix header and changed to use config.h because it is more
+ standard on how we use config.h in windows and it didn't make much sense to keep
+ the prefix header and the config.h
+
+ * Drosera/DebuggerDocument.cpp:
+ (DebuggerDocument::DebuggerDocument):
+ * Drosera/DebuggerDocument.h:
+ * Drosera/config.h:
+ * Drosera/mac/DebuggerApplication.mm:
+ (-[DebuggerApplication attach:]):
+ * Drosera/mac/DebuggerClient.h:
+ * Drosera/mac/DebuggerClient.mm:
+ (-[DebuggerClient initWithServerConnection:]):
+ (-[DebuggerClient dealloc]):
+ (-[DebuggerClient windowDidLoad]):
+ (-[DebuggerClient windowWillClose:]):
+ (-[DebuggerClient webView:didFinishLoadForFrame:]):
+ (-[DebuggerClient webView:didReceiveTitle:forFrame:]):
+ * Drosera/mac/DebuggerDocumentPlatform.mm:
+ (DebuggerDocument::platformPause):
+ (DebuggerDocument::platformResume):
+ (DebuggerDocument::platformStepInto):
+ (DebuggerDocument::platformEvaluateScript):
+ (DebuggerDocument::getPlatformCurrentFunctionStack):
+ (DebuggerDocument::getPlatformLocalScopeVariableNamesForCallFrame):
+ (DebuggerDocument::platformValueForScopeVariableNamed):
+ (DebuggerDocument::platformLog):
+ * Drosera/mac/Drosera.pch: Removed.
+ * Drosera/mac/Drosera.xcodeproj/project.pbxproj:
+ * Drosera/mac/ServerConnection.h: Added.
+ * Drosera/mac/ServerConnection.mm: Added.
+ (-[ServerConnection initWithServerName:]):
+ (-[ServerConnection dealloc]):
+ (-[ServerConnection setGlobalContext:]):
+ (-[ServerConnection pause]):
+ (-[ServerConnection resume]):
+ (-[ServerConnection stepInto]):
+ (-[ServerConnection switchToServerNamed:]):
+ (-[ServerConnection applicationTerminating:]):
+ (-[ServerConnection serverConnectionDidDie:]):
+ (-[ServerConnection webView:didLoadMainResourceForDataSource:]):
+ (-[ServerConnection webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:]):
+ (-[ServerConnection webView:failedToParseSource:baseLineNumber:fromURL:withError:forWebFrame:]):
+ (-[ServerConnection webView:didEnterCallFrame:sourceId:line:forWebFrame:]):
+ (-[ServerConnection webView:willExecuteStatement:sourceId:line:forWebFrame:]):
+ (-[ServerConnection webView:willLeaveCallFrame:sourceId:line:forWebFrame:]):
+ (-[ServerConnection webView:exceptionWasRaised:sourceId:line:forWebFrame:]):
+ (-[ServerConnection currentFrame]):
+ (-[ServerConnection webScriptAttributeKeysForScriptObject:]):
+ (-[ServerConnection knownServers]):
+
+2007-10-15 David Kilzer <ddkilzer@webkit.org>
+
+ Reviewed by Eric.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=15002
+ Script to automatically search nightly builds for regressions (bisect-builds)
+
+ * Scripts/bisect-builds: Added.
+
+2007-10-14 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - New JavaScript benchmark
+ http://bugs.webkit.org/show_bug.cgi?id=15515
+
+ * Scripts/run-sunspider: Added. Wrapper to run sunspider on the
+ current development or release build of JavaScriptCore.
+
+2007-10-15 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Sam.
+
+ Fix 'run-webkit-tests --qt' complaining about the --qt argument.
+
+ * Scripts/webkitdirs.pm:
+ - Change checkArgv to remove the options from @ARGV to prevent
+ them from interfering with further option processing.
+ - Fix logic error in determineIsQt that would prevent it from bailing out early.
+ - Change isOSX to mean OS X and not Qt or Gtk. Most of our uses of isOSX assume that this is the meaning
+ already, so this change fixes several broken areas of the scripts including 'run-webkit-tests --qt' on a Mac
+ incorrectly using the Mac results, and 'run-webkit-tests --gtk' attempting to build the Mac DumpRenderTree.
+
+2007-10-15 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam.
+
+ - added logging of window.prompt and window.confirm
+
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:]):
+ Implement the recommended delegate rather than the deprecated one.
+ (-[UIDelegate webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:]):
+ Added.
+ (-[UIDelegate webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:]):
+ Added.
+
+ * DumpRenderTree/win/UIDelegate.h:
+ * DumpRenderTree/win/UIDelegate.cpp:
+ (UIDelegate::runJavaScriptAlertPanelWithMessage): Got rid of unnecessary check for null string.
+ (UIDelegate::runJavaScriptConfirmPanelWithMessage): Added.
+ (UIDelegate::runJavaScriptTextInputPanelWithPrompt): Added.
+ (UIDelegate::webViewAddMessageToConsole): Got rid of unnecessary check for null string.
+
+2007-10-15 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fixed <rdar://5382546> layoutTestController.setCustomPolicyDelegate is unimplemented causing tests to fail
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (runTest): Like on mac, before running each test, set the webview's policy delegate to null
+ (main): allocate the global policy delegate for DRT's custom use
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+ Adding files to project
+ * DumpRenderTree/win/DumpRenderTreeWin.h: declaring global DRT policy delegate
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::setCustomPolicyDelegate):
+ set the webview's policy delegate to DRT's custom one if the test requests it.
+ * DumpRenderTree/win/PolicyDelegate.cpp: Added.
+ Implementation is a direct port of DumpRenderTree/mac/PolicyDelegate.mm
+ (PolicyDelegate::PolicyDelegate):
+ (PolicyDelegate::QueryInterface):
+ (PolicyDelegate::AddRef):
+ (PolicyDelegate::Release):
+ (PolicyDelegate::decidePolicyForNavigationAction):
+ * DumpRenderTree/win/PolicyDelegate.h: Added.
+ (PolicyDelegate::decidePolicyForNewWindowAction):
+ (PolicyDelegate::decidePolicyForMIMEType):
+ (PolicyDelegate::unableToImplementPolicyWithError):
+
+2007-10-14 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Mark.
+
+ * Scripts/webkitdirs.pm: Use qmake binary specified via --qmake on command-line
+ when querying for QMAKE_MKSPECS.
+
+2007-10-14 Andrew Wellington <proton@wiretapped.net>
+
+ Reviewed by Adam Roben.
+
+ Fix run-webkit-tests is too greedy calculating platform hierarchy
+ http://bugs.webkit.org/show_bug.cgi?id=15465
+
+ Fix run-webkit-tests being too greedy in trying to split the platform name up
+ causing it to try and find tests in every directory above the first "-" in the
+ path to the LayoutTests
+
+ * Scripts/run-webkit-tests:
+
+2007-10-14 Oleg Sukhodolsky <son.two@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ http://bugs.webkit.org/show_bug.cgi?id=15006
+ Refactoring of buildQMakeGdkProject()/buildQMakeQtProject() and isGdk()/isQt()
+ to reduce code duplication.
+
+ * Scripts/build-webkit:
+ * Scripts/webkitdirs.pm:
+ buildQMakeProject() renamed to buildQMakeQtProject().
+ buildQMakeGdkProject()/buildQMakeQtProject() now take just one parameter (directory),
+ unused $colorize has been removed.
+
+=== Start merge of feature-branch 2007-10-12 ===
+
+2007-10-08 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ * Scripts/build-webkit: add --help, remove unused --color
+
+2007-10-07 Eric Seidel <eric@webkit.org>
+
+ Reviewed by darin.
+
+ * Drosera/mac/DebuggerDocumentPlatform.mm:
+ (DebuggerDocument::platformEvaluateScript): null check before trying to make a JSString
+
+2007-10-03 Rob Buis <buis@kde.org>
+
+ Reviewed by Olliej.
+
+ Adapt to changed location of Ahem font.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+
+2007-10-02 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Make pixel tests more useful!
+ Finally fix the image diff 0.00% mystery problem
+ Highlight any image differences in the image diff.
+ Add a link from image diffs back to original test file.
+
+ * DumpRenderTree/mac/ImageDiff.m:
+ (compareImages): highlight any differences
+ (computePercentageDifferent): round to two decimal places
+ * Scripts/run-webkit-tests: add a few more toURL calls for the windows folks
+
+2007-10-02 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ * Scripts/run-webkit-tests: print the % image difference on main results page
+
+2007-10-02 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver.
+
+ Update WebKitLauncher to notify you of new builds from the correct branch, rather than always checking trunk.
+
+ * BuildSlaveSupport/build-launcher-app: Generate a file named BRANCH into WebKit.app so that it knows which branch it was built from.
+ * WebKitLauncher/start.html: Use the new URL format that includes the branch we were built from.
+
+2007-10-01 Mark Rowe <mrowe@apple.com>
+
+ * BuildSlaveSupport/build-launcher-dmg: Tweak once more to handle nightly builds for branches.
+
+2007-09-25 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ DerivedSources.make was finding "ENABLE_SVG" in the string
+ "ENABLE_SVG_EXPERIMENTAL_FEATURES" thus --no-svg wasn't functioning
+ quite correctly.
+
+ * Scripts/build-webkit: make --no-svg imply --no-svg-experimental
+
+2007-09-25 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Eric.
+
+ * BuildSlaveSupport/build-launcher-dmg: Allow the platform tag to be specified on the command line.
+ This makes it possible to automate nightly builds for the feature-branch.
+
+2007-07-11 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Rubber stamped by Mark.
+
+ Enable svg experimental features as default here in feature-branch.
+
+ * Scripts/build-webkit:
+
+2007-06-29 Antti Koivisto <antti@apple.com>
+
+ Reviewed by Weinig.
+
+ Add VIDEO flag for timed media features
+
+ * Scripts/build-webkit
+
+=== End merge of feature-branch 2007-10-12 ===
+
+2007-10-11 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - Updated rational for the leaks list to be more clear.
+
+ * Scripts/run-webkit-tests:
+
+2007-10-11 Kevin McCullough <kmccullough@apple.com>
+
+ Rubber Stamp by Sam.
+
+ Adding a known Leopard leak that is already fixed but the bot is on an old version of Leopard.
+ I believe there was a radar on this leak, it looks familiar to me, but I could not find it.
+
+ * Scripts/run-webkit-tests:
+
+2007-10-10 Simon Hausmann <hausmann@kde.org>
+
+ Reviewed by Lars.
+
+ Fix compilation using gcc 4.3. Header files have been reorganized and as a result some extra
+ includes are needed for INT_MAX, std::auto_ptr and the like.
+
+ * DumpRenderTree/qt/main.cpp:
+
+2007-10-09 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Simon.
+
+ implement layoutTestController.encode/decodeHostName. We still don't pass fast/encoding/idn-security.html, since our QUrl::from/toACE is somewhat stricter than ICU.
+
+ * DumpRenderTree/qt/jsobjects.cpp:
+ (LayoutTestController::encodeHostName):
+ (LayoutTestController::decodeHostName):
+ * DumpRenderTree/qt/jsobjects.h:
+
+2007-10-09 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Simon.
+
+ Don't set up connections inside QWebPage::createFrame, as users might be reimplementing that method. Make sure we get only one titleChanged() signal per title change, and implement the support for testing this in DRT.
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::WebPage::createFrame):
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::titleChanged):
+ * DumpRenderTree/qt/DumpRenderTree.h:
+ * DumpRenderTree/qt/jsobjects.cpp:
+ (LayoutTestController::reset):
+ * DumpRenderTree/qt/jsobjects.h:
+
+2007-10-09 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Simon.
+
+ add a dummy implementation for layoutTestController.display() and implement layoutTestController.clearBackForwardList().
+
+ * DumpRenderTree/qt/DumpRenderTree.h:
+ * DumpRenderTree/qt/jsobjects.cpp:
+ (LayoutTestController::clearBackForwardList):
+ * DumpRenderTree/qt/jsobjects.h:
+
+2007-10-09 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Simon.
+
+ make --git-reviewer work again.
+
+ * Scripts/prepare-ChangeLog:
+
+2007-10-07 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Rubber stamped by Eric.
+
+ Connect to the "hovering-over-link" signal emitted by WebKitPage and
+ show the current link inside the statusbar.
+ This shows how to make use of this signal and allows to easily test
+ http://bugs.webkit.org/show_bug.cgi?id=15299.
+
+ * GtkLauncher/main.cpp:
+ (hoveringOverLink):
+ (main):
+
+2007-10-05 Lars Knoll <lars@trolltech.com>
+
+ add proper error messages to the FrameLoaderClient.
+ Implement ChromeClientQt::closeWindowSoon and
+ FrameLoaderClientQt::dispatchCreatePage (which should go away IMO).
+ Some fixes in DRT to make it work correctly with multiple windows.
+
+ Reviewed by Maciej.
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::createWindow):
+ (WebCore::DumpRenderTree::windowCount):
+ * DumpRenderTree/qt/DumpRenderTree.h:
+ * DumpRenderTree/qt/jsobjects.cpp:
+ (LayoutTestController::maybeDump):
+ (LayoutTestController::windowCount):
+ * DumpRenderTree/qt/jsobjects.h:
+
+2007-10-05 Lars Knoll <lars@trolltech.com>
+
+ Add a dummy plugin to DRT to fix fast/dom/Window/Plug-Ins.html.
+ Add support for layoutTextController.setCanOpenWindows() to DRT
+ fixing another 2 test cases in fast/dom/Window.
+
+ Reviewed by Maciej.
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp:
+ (WebCore::WebPage::WebPage):
+ (WebCore::WebPage::createWindow):
+ (WebCore::DumpRenderTree::resetJSObjects):
+ (WebCore::DumpRenderTree::createWindow):
+ * DumpRenderTree/qt/DumpRenderTree.h:
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+ * DumpRenderTree/qt/jsobjects.cpp:
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::reset):
+ * DumpRenderTree/qt/jsobjects.h:
+ * DumpRenderTree/qt/main.cpp:
+ * DumpRenderTree/qt/testplugin.cpp: Added.
+ * DumpRenderTree/qt/testplugin.h: Added.
+
+2007-10-04 Sam Weinig <sam@webkit.org>
+
+ Rubber stamped by Adam.
+
+ Remove empty directories.
+
+ * DumpRenderTree/DumpRenderTree.qtproj: Removed.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts: Removed.
+
+2007-10-03 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam.
+
+ * Scripts/webkitdirs.pm: Automatically use "Debug_Internal" if
+ we find the internal libraries in the libraries directory. This
+ is helpful for Safari team engineers at Apple.
+
+2007-10-03 Adam Roben <aroben@apple.com>
+
+ Update the location of AHEM___.TTF after r25968
+
+ Reviewed by Sam.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+
+2007-10-03 Alp Toker <alp@atoker.com>
+
+ Reviewed by Adam.
+
+ http://bugs.webkit.org/show_bug.cgi?id=14726
+ [gtk] API design. Mapping the WebView delegates to signals.
+
+ Change the API namespace of the Gtk+ port from 'WebKitGtk' to 'WebKit'.
+
+ * GtkLauncher/main.cpp:
+ (goToURLBarText):
+ (titleChanged):
+ (progressChanged):
+ (menuMainBackCallback):
+ (menuMainForwardCallback):
+ (main):
+
+2007-10-03 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Rob.
+
+ This fixes --strict mode in run-webkit-tests again after
+ the platform dependent test results have been moved.
+
+ * Scripts/run-webkit-tests:
+
+2007-10-03 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by bdash.
+
+ remove the hack in run-webkit-tests that forced text only test
+ to be taken from the platform independent dir. It was only left
+ there from early days.
+
+ Remove platform dependent results for tests that are text only nowadays,
+ and add one platform dependent result for a text only test that requires it.
+
+ * Scripts/run-webkit-tests:
+
+2007-10-03 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by olliej.
+
+ Move the Qt version of DRT into the correct place and put the binary into BUILDDIR/bin.
+
+ * DumpRenderTree/qt/DumpRenderTree.cpp: Renamed from WebKitTools/DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp.
+ (WebCore::WebFrame::WebFrame):
+ (WebCore::WebPage::WebPage):
+ (WebCore::WebPage::createFrame):
+ (WebCore::WebPage::javaScriptAlert):
+ (WebCore::WebPage::javaScriptConsoleMessage):
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::~DumpRenderTree):
+ (WebCore::DumpRenderTree::open):
+ (WebCore::DumpRenderTree::readStdin):
+ (WebCore::DumpRenderTree::resetJSObjects):
+ (WebCore::DumpRenderTree::initJSObjects):
+ (WebCore::DumpRenderTree::dumpFramesAsText):
+ (WebCore::DumpRenderTree::dump):
+ * DumpRenderTree/qt/DumpRenderTree.h: Renamed from WebKitTools/DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.h.
+ (WebCore::DumpRenderTree::layoutTestController):
+ (WebCore::DumpRenderTree::eventSender):
+ * DumpRenderTree/qt/DumpRenderTree.pro: Renamed from WebKitTools/DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.pro.
+ * DumpRenderTree/qt/fonts.conf: Renamed from WebKitTools/DumpRenderTree/DumpRenderTree.qtproj/fonts.conf.
+ * DumpRenderTree/qt/fonts/AHEM____.TTF: Renamed from WebKitTools/DumpRenderTree/DumpRenderTree.qtproj/fonts/AHEM____.TTF.
+ * DumpRenderTree/qt/jsobjects.cpp: Renamed from WebKitTools/DumpRenderTree/DumpRenderTree.qtproj/jsobjects.cpp.
+ (HackWebFrame::mousePressEvent):
+ (HackWebFrame::mouseReleaseEvent):
+ (HackWebFrame::mouseMoveEvent):
+ (HackWebFrame::HackWebFrame):
+ (HackWebFrame::~HackWebFrame):
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::reset):
+ (LayoutTestController::maybeDump):
+ (LayoutTestController::waitUntilDone):
+ (LayoutTestController::notifyDone):
+ (LayoutTestController::dumpEditingCallbacks):
+ (LayoutTestController::queueReload):
+ (LayoutTestController::provisionalLoad):
+ (LayoutTestController::timerEvent):
+ (EventSender::EventSender):
+ (EventSender::mouseDown):
+ (EventSender::mouseUp):
+ (EventSender::mouseMoveTo):
+ (EventSender::leapForward):
+ (EventSender::keyDown):
+ (EventSender::frameUnderMouse):
+ * DumpRenderTree/qt/jsobjects.h: Renamed from WebKitTools/DumpRenderTree/DumpRenderTree.qtproj/jsobjects.h.
+ (LayoutTestController::isLoading):
+ (LayoutTestController::setLoading):
+ (LayoutTestController::shouldDumpAsText):
+ (LayoutTestController::shouldDumpChildrenAsText):
+ (LayoutTestController::shouldWaitUntilDone):
+ (LayoutTestController::dumpAsText):
+ (LayoutTestController::dumpChildFramesAsText):
+ * DumpRenderTree/qt/main.cpp: Renamed from WebKitTools/DumpRenderTree/DumpRenderTree.qtproj/main.cpp.
+ (messageHandler):
+ (crashHandler):
+ (main):
+ * Scripts/run-webkit-tests:
+
+2007-10-03 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Alp Toker.
+
+ Fix build-webkit when both QTDIR and --gtk are set. The presence of --gtk
+ should take precedence over QTDIR when determining which port we are working with.
+
+ * Scripts/webkitdirs.pm:
+
+2007-10-02 Adam Roben <aroben@apple.com>
+
+ Add keychain to the list of default packages to install
+
+ Rubberstamped by Sam.
+
+ * CygwinDownloader/cygwin-downloader.py:
+ * CygwinDownloader/cygwin-downloader.zip: Regenerated.
+
+2007-10-02 David Kilzer <ddkilzer@webkit.org>
+
+ Reviewed by Adam.
+
+ Make "--git-commit trunk..HEAD" work with prepare-ChangeLog.
+ Also makes WebCore regression test case logic work when using git.
+
+ * Scripts/prepare-ChangeLog:
+ (reviewerAndDescriptionForGitCommit): Added.
+
+2007-10-02 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by bdash.
+
+ Add API to retrieve the frame name from QWebFrame.
+ Implement support for DRT::dumpChildrenAsText.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::dumpFramesAsText):
+ (WebCore::DumpRenderTree::dump):
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.h:
+ * DumpRenderTree/DumpRenderTree.qtproj/jsobjects.cpp:
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::reset):
+ * DumpRenderTree/DumpRenderTree.qtproj/jsobjects.h:
+
+2007-10-02 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by bdash.
+
+ Fix the handling of the response header for data urls. Make sure we always pass absolute URLs to WebKit from both DRT and QtLauncher.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::readStdin):
+
+2007-10-02 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver.
+
+ Update WebKitLauncher to notify you of new builds from the correct branch, rather than always checking trunk.
+
+ * BuildSlaveSupport/build-launcher-app: Generate a file named BRANCH into WebKit.app so that it knows which branch it was built from.
+ * WebKitLauncher/start.html: Use the new URL format that includes the branch we were built from.
+
+2007-10-02 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Maciej.
+
+ Configuration changes from build.webkit.org. The major change is refactoring to work
+ with Buildbot 0.7.6, but it does include other smaller changes that have been made in the
+ last few weeks.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ * BuildSlaveSupport/build.webkit.org-config/webkit/auth.py:
+ * BuildSlaveSupport/build.webkit.org-config/webkit/basesteps.py:
+ * BuildSlaveSupport/build.webkit.org-config/webkit/builders.py:
+ * BuildSlaveSupport/build.webkit.org-config/webkit/factories.py:
+ * BuildSlaveSupport/build.webkit.org-config/webkit/schedulers.py:
+ * BuildSlaveSupport/build.webkit.org-config/webkit/status.py:
+ * BuildSlaveSupport/build.webkit.org-config/webkit/steps.py:
+
+2007-10-02 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Maciej.
+
+ Add support for eventSender.mouseMove to DRT.
+ Fixes fast/css/hover-affects-child.html
+
+ * DumpRenderTree/DumpRenderTree.qtproj/jsobjects.cpp:
+ (EventSender::mouseMoveTo):
+
+2007-10-01 Mark Rowe <mrowe@apple.com>
+
+ * BuildSlaveSupport/build-launcher-dmg: Tweak once more to handle nightly builds for branches.
+
+2007-10-01 David Kilzer <ddkilzer@webkit.org>
+
+ Reviewed by Hyatt.
+
+ Make svn-apply and svn-unapply work with added files in git-diff formatted patches.
+
+ * Scripts/svn-apply:
+ (gitdiff2svndiff): Ignore lines beginning with "new file".
+ * Scripts/svn-unapply:
+ (gitdiff2svndiff): Ditto.
+
+2007-09-30 George Staikos <staikos@kde.org>
+
+ Qt build fix (Mac OS X specific)
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.pro:
+
+2007-09-29 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Mark.
+
+ -Fix http://bugs.webkit.org/show_bug.cgi?id=13226.
+ Remove Bakefiles from svn.
+
+ * GtkLauncher/Bakefiles.bkgen: Removed.
+ * GtkLauncher/ENV: Removed.
+ * GtkLauncher/gdklauncher.bkl: Removed.
+ * GtkLauncher/mk: Removed.
+ * Scripts/regenerate-makefiles: Removed.
+
+2007-09-25 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by John.
+
+ - Updating leopard leak list to refelct bugs that have been fixed and no longer leak.
+
+ * Scripts/run-webkit-tests:
+
+2007-09-26 Adam Roben <aroben@apple.com>
+
+ Make not finding an installed WebKit non-fatal
+
+ What really matters is that we are able to load WebKit and its
+ dependencies, not whether we think we've found an installed WebKit.
+
+ Reviewed by Sam.
+
+ * WebKitInitializer/WebKitInitializer.cpp:
+ (getWebViewCLSID): Use new LOG_WARNING macro.
+ (getInstalledWebKitDirectory): Ditto.
+ (initializeWebKit): Don't die if we didn't find an installed WebKit,
+ and use new macros.
+ * WebKitInitializer/WebKitInitializer.vcproj: Disabled a warning.
+
+2007-09-26 Adam Roben <aroben@apple.com>
+
+ Committed this file before saving it
+
+ * WebKitInitializer/debug_internal.vsprops:
+
+2007-09-26 Adam Roben <aroben@apple.com>
+
+ Load WebKit and its dependencies manually so they come from DllDirectory
+
+ I had to change WebKitInitializer to use malloc/free instead of
+ new/delete to avoid pulling in WebKit (and its dependencies) early
+ through use of fastMalloc.
+
+ Reviewed by Oliver.
+
+ * WebKitInitializer/WebKitInitializer.cpp:
+ (getStringValue): Changed to use malloc/free.
+ (getInstalledWebKitDirectory): Ditto.
+ (initializeWebKit): Call SetDllDirectory first, then load all of
+ WebKit's dependencies manually, finally followed by WebKit itself.
+ * WebKitInitializer/WebKitInitializer.vcproj: Added a new
+ configuration to match our other projects.
+ * WebKitInitializer/debug_internal.vsprops: Added.
+
+2007-09-25 Adam Roben <aroben@apple.com>
+
+ Actually define DEBUG/NDEBUG so that we load WebKit correctly
+
+ Rubberstamped by Sam.
+
+ * WebKitInitializer/WebKitInitializer.vcproj:
+
+2007-09-25 Adam Roben <aroben@apple.com>
+
+ Make DumpRenderTree delay-load its dependencies
+
+ This lets WebKitInitializer re-route the dependencies to be loaded out
+ of the Safari installation directory.
+
+ Also replaced all uses of kCFAllocatorDefault with 0 (which means the
+ same thing), since we can't import the kCFAllocatorDefault symbol when
+ delay-loading CoreFoundation.dll.
+
+ Rubberstamped by Sam.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (runTest):
+ (javaScriptThreads):
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::setWaitToDump):
+
+2007-09-25 Adam Roben <aroben@apple.com>
+
+ Pull ole32.lib into WebKitInitializer
+
+ Rubberstamped by Sam.
+
+ * WebKitInitializer/WebKitInitializer.vcproj:
+
+2007-09-25 David Kilzer <ddkilzer@webkit.org>
+
+ Reviewed by Adam.
+
+ - Fix http://bugs.webkit.org/show_bug.cgi?id=14885
+ LGPL'ed files contain incorrect FSF address
+
+ * Drosera/config.h:
+
+2007-09-25 David Kilzer <ddkilzer@webkit.org>
+
+ Reviewed by Adam.
+
+ Make svn-apply and svn-unapply work with git-diff formatted patches.
+
+ * Scripts/svn-apply: Apply a filter to the input if we find a git-diff marker before a patch.
+ (gitdiff2svndiff): Added.
+ * Scripts/svn-unapply: Ditto.
+ (gitdiff2svndiff): Added.
+
+2007-09-25 Adam Roben <aroben@apple.com>
+
+ Pull advapi32.lib into WebKitInitializer
+
+ This is needed to get the registry functions we use.
+
+ Rubberstamped by Sam.
+
+ * WebKitInitializer/WebKitInitializer.vcproj:
+
+2007-09-25 Adam Roben <aroben@apple.com>
+
+ Add python and rsync to cygwin-downloader
+
+ Our build slaves need this, and it can't hurt for everyone else to
+ have it, too.
+
+ Reviewed by Sam.
+
+ * CygwinDownloader/cygwin-downloader.py: Added python and rsync.
+ * CygwinDownloader/cygwin-downloader.zip: Regenerated.
+
+2007-09-25 Adam Roben <aroben@apple.com>
+
+ Add WebKitInitializer and use it in DumpRenderTree
+
+ WebKitInitializer is a static library that has one function,
+ initializeWebKit(). This registers WebKit and sets up the DLL search
+ path so that WebKit's dependencies that are installed with Safari can
+ be found.
+
+ Reviewed by Sam.
+
+ * DumpRenderTree/DumpRenderTree.sln: Added WebKitInitializer and made
+ DumpRenderTree depend on it.
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (initialize): Call initializeWebKit.
+ * DumpRenderTree/win/DumpRenderTree.vcproj: Link against
+ WebKitInitializer.lib.
+ * WebKitInitializer/WebKitInitializer.cpp: Added.
+ (getStringValue):
+ (getWebViewCLSID):
+ (getInstalledWebKitDirectory):
+ (initializeWebKit):
+ * WebKitInitializer/WebKitInitializer.h: Added.
+ * WebKitInitializer/WebKitInitializer.vcproj: Added.
+ * WebKitInitializer/debug.vsprops: Added.
+ * WebKitInitializer/release.vsprops: Added.
+
+2007-09-25 Adam Roben <aroben@apple.com>
+
+ Make run-webkit-tests respect set-webkit-configuration
+
+ Reviewed by Sam.
+
+ * Scripts/run-webkit-tests: Initialize $configuration to whatever
+ set-webkit-configuration was last set to.
+
+2007-09-25 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Eric.
+
+ * BuildSlaveSupport/build-launcher-dmg: Allow the platform tag to be specified on the command line.
+ This makes it possible to automate nightly builds for the feature-branch.
+
+2007-09-25 Adam Roben <aroben@apple.com>
+
+ A couple of fixes/enhancements to update-webkit-*-libs
+
+ You can now specify WEBKITSUPPORTLIBRARIESZIPDIR=C:\my\special\place
+ to tell update-webkit-support-libraries where it should find the
+ WebKitSupportLibrary.zip file you downloaded.
+
+ These scripts also now correctly interpret WEBKITLIBRARIESDIR as a
+ Windows-style path.
+
+ Reviewed by Sam.
+
+ * Scripts/update-webkit-auxiliary-libs: Also renamed $supportLibsURL
+ to $auxiliaryLibsURL and removed an irrelevant comment.
+ * Scripts/update-webkit-support-libs:
+
+2007-09-25 Adam Treat <treat@kde.org>
+
+ Reviewed by Simon and Lars.
+
+ Refactors and cleans up Qt DRT member variable names, member variable
+ initialization, style fixes and general code cleanup.
+
+ Adds queueReload slot to LayoutTestController that some tests require.
+
+ Subclasses QWebFrame to make sure that all frames have an associated
+ LayoutTestController JS window object.
+
+ Takes advantage of new QWebFrame provisionalLoad signal to ensure frames
+ aren't dumped twice.
+
+ EOF fixes.
+
+ Together, this patch fixes some 20+ layout tests in QtWebKit.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::WebFrame::WebFrame):
+ (WebCore::WebPage::WebPage):
+ (WebCore::WebPage::createFrame):
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::open):
+ (WebCore::DumpRenderTree::readStdin):
+ (WebCore::DumpRenderTree::initJSObjects):
+ (WebCore::DumpRenderTree::dump):
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.h:
+ (WebCore::DumpRenderTree::layoutTestController):
+ (WebCore::DumpRenderTree::eventSender):
+ * DumpRenderTree/DumpRenderTree.qtproj/jsobjects.cpp:
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::reset):
+ (LayoutTestController::maybeDump):
+ (LayoutTestController::waitUntilDone):
+ (LayoutTestController::notifyDone):
+ (LayoutTestController::queueReload):
+ (LayoutTestController::provisionalLoad):
+ (EventSender::EventSender):
+ (EventSender::mouseDown):
+ (EventSender::mouseUp):
+ (EventSender::mouseMoveTo):
+ (EventSender::frameUnderMouse):
+ * DumpRenderTree/DumpRenderTree.qtproj/jsobjects.h:
+ (LayoutTestController::isLoading):
+ (LayoutTestController::setLoading):
+ (LayoutTestController::dumpAsText):
+ * DumpRenderTree/DumpRenderTree.qtproj/main.cpp:
+ (main):
+
+2007-09-24 Kevin McCullough <kmccullough@apple.com>
+
+
+ - Reverted an accidentally checked in file.
+
+ * Drosera/win/DebuggerDocumentPlatform.cpp: Removed.
+
+2007-09-24 Kevin McCullough <kmccullough@apple.com>
+ Reviewed by Sam.
+
+ - Updated project files to not use Edit and Continue for Debug Information since it doesn't work and breaks some functionality.
+
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+ * DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj:
+
+2007-09-20 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Rubber stamped by Adam.
+
+ * GdkLauncher: Removed.
+ * GdkLauncher/Bakefiles.bkgen: Removed.
+ * GdkLauncher/ENV: Removed.
+ * GdkLauncher/GdkLauncher.pro: Removed.
+ * GdkLauncher/gdklauncher.bkl: Removed.
+ * GdkLauncher/main.cpp: Removed.
+ * GdkLauncher/mk: Removed.
+ * GdkLauncher/simple.svg: Removed.
+ * GdkLauncher/text.html: Removed.
+ * GtkLauncher: Added.
+ * GtkLauncher/GdkLauncher.pro: Removed.
+ * GtkLauncher/GtkLauncher.pro: Added.
+ * GtkLauncher/main.cpp:
+ (updateWindowTitle):
+ (main):
+ * Scripts/build-webkit:
+ * Scripts/regenerate-makefiles:
+ * Scripts/run-javascriptcore-tests:
+ * Scripts/run-launcher:
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm:
+
+2007-09-21 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/5491013> REGRESSION: -[WebView windowScriptObject] returns a dummy object or nil if a page hasn't loaded (breaks EA Sports Online)
+
+ Assert that the -[WebScriptObject JSObject] return value is only NULL for non-window objects.
+ This is tested by plugins/root-object-premature-delete-crash.html.
+
+ * DumpRenderTree/mac/ObjCController.m:
+ (-[ObjCController accessStoredWebScriptObject]):
+
+2007-09-21 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Oliver.
+
+ - We need to initialize the ref count to 1 at initialization so that objects are not garbage collected. (actual patch written by Oliver)
+
+ * DumpRenderTree/win/FrameLoaderDelegate.cpp:
+ (FrameLoadDelegate::FrameLoadDelegate):
+
+2007-09-20 Julien Chaffraix <julien.chaffraix@gmail.com>
+
+ Reviewed by Adam.
+
+ Fix: http://bugs.webkit.org/show_bug.cgi?id=15223
+ webkitdir.pm::isQt() is not working properly in run-webkit-tests under Linux/Qt
+
+ Added determineIsQt() and determineIsGdk() to webkitdirs.pm.
+ Now isQt() and isGdk() use global variables that are only set once.
+
+ An array of all the parameters is now given to build-dumprender which includes
+ the platform on linux.
+
+ * Scripts/build-dumprendertree:
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm:
+
+2007-09-19 Adam Roben <aroben@apple.com>
+
+ Rubberstamped by Hyatt.
+
+ * Spinneret: Removed.
+
+2007-09-19 Tuukka Hastrup <Tuukka.Hastrup@iki.fi>
+
+ Reviewed by David Kilzer.
+
+ * Scripts/webkitdirs.pm: On Gdk and Qt, check that flex, bison, gperf are available.
+
+2007-09-18 Sam Weinig <sam@webkit.org>
+
+ Add JSRetainPtr.h #include to fix some builds.
+
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+
+2007-09-18 Mike Hommey <glandium@debian.org>
+
+ Reviewed by Adam.
+
+ * Scripts/prepare-ChangeLog:
+ - Properly parse GECOS field.
+ - Use git configuration for user name and email when appropriate.
+
+2007-09-17 Sam Weinig <sam@webkit.org>
+
+ Build fix.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+
+2007-09-17 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Share more code between mac and windows DRT.
+ - GCController is now shared.
+ - Rename WaitUntilDoneDelegate to FrameLoadDelegate for consistency.
+
+ * DumpRenderTree/GCController.cpp:
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+ * DumpRenderTree/win/FrameLoaderDelegate.cpp: Copied from DumpRenderTree/win/WaitUntilDoneDelegate.cpp.
+ (FrameLoadDelegate::FrameLoadDelegate):
+ (FrameLoadDelegate::~FrameLoadDelegate):
+ (FrameLoadDelegate::windowScriptObjectAvailable):
+ * DumpRenderTree/win/FrameLoaderDelegate.h: Copied from DumpRenderTree/win/WaitUntilDoneDelegate.h.
+ * DumpRenderTree/win/GCController.cpp: Removed.
+ * DumpRenderTree/win/GCController.h: Removed.
+ * DumpRenderTree/win/GCControllerWin.cpp: Copied from DumpRenderTree/win/GCController.cpp.
+ (GCController::collect):
+ (GCController::collectOnAlternateThread):
+ (GCController::getJSObjectCount):
+ * DumpRenderTree/win/WaitUntilDoneDelegate.cpp: Removed.
+ * DumpRenderTree/win/WaitUntilDoneDelegate.h: Removed.
+
+2007-09-17 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Begin sharing code between mac and windows DRT.
+ - both now share LayoutTestController.h/cpp and implement platform dependant
+ operations in LayoutTestControllerMac/Win.
+ - DumpRenderTree.h is now shared.
+ - WorkQueue and WorkQueueItem are also shared.
+
+ * DumpRenderTree/DumpRenderTree.h:
+ * DumpRenderTree/LayoutTestController.cpp:
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (displayWebView):
+ (dumpFrameScrollPosition):
+ (dumpFramesAsText):
+ (dump):
+ (runTest):
+ * DumpRenderTree/win/DumpRenderTree.h: Removed.
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+ * DumpRenderTree/win/DumpRenderTreeWin.h: Copied from DumpRenderTree/win/DumpRenderTree.h.
+ * DumpRenderTree/win/EditingDelegate.cpp:
+ (EditingDelegate::shouldBeginEditingInDOMRange):
+ (EditingDelegate::shouldEndEditingInDOMRange):
+ (EditingDelegate::shouldInsertNode):
+ (EditingDelegate::shouldInsertText):
+ (EditingDelegate::shouldDeleteDOMRange):
+ (EditingDelegate::shouldChangeSelectedDOMRange):
+ (EditingDelegate::shouldApplyStyle):
+ (EditingDelegate::shouldChangeTypingStyle):
+ (EditingDelegate::doPlatformCommand):
+ (EditingDelegate::webViewDidBeginEditing):
+ (EditingDelegate::webViewDidChange):
+ (EditingDelegate::webViewDidEndEditing):
+ (EditingDelegate::webViewDidChangeTypingStyle):
+ (EditingDelegate::webViewDidChangeSelection):
+ * DumpRenderTree/win/LayoutTestController.cpp: Removed.
+ * DumpRenderTree/win/LayoutTestController.h: Removed.
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp: Copied from DumpRenderTree/win/LayoutTestController.cpp.
+ (LayoutTestController::addDisallowedURL):
+ (LayoutTestController::clearBackForwardList):
+ (LayoutTestController::copyDecodedHostName):
+ (LayoutTestController::copyEncodedHostName):
+ (LayoutTestController::display):
+ (LayoutTestController::keepWebHistory):
+ (LayoutTestController::notifyDone):
+ (LayoutTestController::queueBackNavigation):
+ (LayoutTestController::queueForwardNavigation):
+ (jsStringRefToWString):
+ (LayoutTestController::queueLoad):
+ (LayoutTestController::queueReload):
+ (LayoutTestController::queueScript):
+ (LayoutTestController::setAcceptsEditing):
+ (LayoutTestController::setCustomPolicyDelegate):
+ (LayoutTestController::setMainFrameIsFirstResponder):
+ (LayoutTestController::setTabKeyCyclesThroughElements):
+ (LayoutTestController::setUseDashboardCompatibilityMode):
+ (LayoutTestController::setUserStyleSheetEnabled):
+ (LayoutTestController::setUserStyleSheetLocation):
+ (LayoutTestController::setWindowIsKey):
+ (waitUntilDoneWatchdogFired):
+ (LayoutTestController::setWaitToDump):
+ (LayoutTestController::windowCount):
+ * DumpRenderTree/win/WaitUntilDoneDelegate.cpp:
+ (FrameLoadDelegate::didReceiveTitle):
+ (FrameLoadDelegate::processWork):
+ (FrameLoadDelegate::locationChangeDone):
+ (FrameLoadDelegate::windowScriptObjectAvailable):
+ * DumpRenderTree/win/WorkQueue.cpp: Removed.
+ * DumpRenderTree/win/WorkQueue.h: Removed.
+ * DumpRenderTree/win/WorkQueueItem.cpp: Removed.
+ * DumpRenderTree/win/WorkQueueItem.h: Removed.
+ * DumpRenderTree/win/WorkQueueItemWin.cpp: Copied from DumpRenderTree/win/WorkQueueItem.cpp.
+ (jsStringRefToWString):
+ (LoadItem::invoke):
+ (ScriptItem::invoke):
+
+2007-09-17 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ - Move Windows DumpRenderTree and TestNetscapePlugin to WebCoreTools/DumpRenderTree/win
+
+ * DumpRenderTree/DumpRenderTree.sln: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree.sln.
+ * DumpRenderTree/DumpRenderTree.vcproj: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree.sln: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DraggingInfo.h: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.cpp: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.h: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.vcproj: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/EditingDelegate.cpp: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/EditingDelegate.h: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/EventSender.cpp: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/EventSender.h: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/GCController.cpp: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/GCController.h: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/LayoutTestController.cpp: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/LayoutTestController.h: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/UIDelegate.cpp: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/UIDelegate.h: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WaitUntilDoneDelegate.cpp: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WaitUntilDoneDelegate.h: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WorkQueue.cpp: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WorkQueue.h: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WorkQueueItem.cpp: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WorkQueueItem.h: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/debug.vsprops: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/debug_internal.vsprops: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/release.vsprops: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/TestNetscapePlugin: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/TestNetscapePlugin/TestNetscapePlugin.def: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/TestNetscapePlugin/TestNetscapePlugin.rc: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/TestNetscapePlugin/TestNetscapePlugin.vcproj: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/TestNetscapePlugin/main.c: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/TestNetscapePlugin/resource.h: Removed.
+ * DumpRenderTree/win: Added.
+ * DumpRenderTree/win/DraggingInfo.h: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DraggingInfo.h.
+ * DumpRenderTree/win/DumpRenderTree.cpp: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.cpp.
+ * DumpRenderTree/win/DumpRenderTree.h: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.h.
+ * DumpRenderTree/win/DumpRenderTree.vcproj: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.vcproj.
+ * DumpRenderTree/win/EditingDelegate.cpp: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/EditingDelegate.cpp.
+ * DumpRenderTree/win/EditingDelegate.h: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/EditingDelegate.h.
+ * DumpRenderTree/win/EventSender.cpp: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/EventSender.cpp.
+ * DumpRenderTree/win/EventSender.h: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/EventSender.h.
+ * DumpRenderTree/win/GCController.cpp: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/GCController.cpp.
+ * DumpRenderTree/win/GCController.h: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/GCController.h.
+ * DumpRenderTree/win/LayoutTestController.cpp: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/LayoutTestController.cpp.
+ * DumpRenderTree/win/LayoutTestController.h: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/LayoutTestController.h.
+ * DumpRenderTree/win/TestNetscapePlugin: Copied from DumpRenderTree/DumpRenderTree.vcproj/TestNetscapePlugin.
+ * DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj:
+ * DumpRenderTree/win/UIDelegate.cpp: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/UIDelegate.cpp.
+ * DumpRenderTree/win/UIDelegate.h: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/UIDelegate.h.
+ * DumpRenderTree/win/WaitUntilDoneDelegate.cpp: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WaitUntilDoneDelegate.cpp.
+ * DumpRenderTree/win/WaitUntilDoneDelegate.h: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WaitUntilDoneDelegate.h.
+ * DumpRenderTree/win/WorkQueue.cpp: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WorkQueue.cpp.
+ * DumpRenderTree/win/WorkQueue.h: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WorkQueue.h.
+ * DumpRenderTree/win/WorkQueueItem.cpp: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WorkQueueItem.cpp.
+ * DumpRenderTree/win/WorkQueueItem.h: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WorkQueueItem.h.
+ * DumpRenderTree/win/debug.vsprops: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/debug.vsprops.
+ * DumpRenderTree/win/debug_internal.vsprops: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/debug_internal.vsprops.
+ * DumpRenderTree/win/release.vsprops: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/release.vsprops.
+ * Scripts/run-webkit-tests: Update to point to the new location of the sln.
+
+2007-09-15 Mark Rowe <mrowe@apple.com>
+
+ Build fix for DumpRenderTree.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Reinstate -Wno-deprecated-declarations on DumpRenderTree.mm.
+
+2007-09-14 Sam Weinig <sam@webkit.org>
+
+ Rubber stamped by Adam Roben.
+
+ Split the WaitUntilDoneDelegate into a UIDelegate and a FrameLoadDelegate.
+ - The UIDelegate was put into a new file while the FrameLoadDelegate was
+ kept in the WaitUntilDoneDelegate file for the time being.
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.cpp:
+ (main):
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.vcproj:
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/UIDelegate.cpp: Added.
+ (UIDelegate::QueryInterface):
+ (UIDelegate::AddRef):
+ (UIDelegate::Release):
+ (UIDelegate::hasCustomMenuImplementation):
+ (UIDelegate::setFrame):
+ (UIDelegate::webViewFrame):
+ (UIDelegate::runJavaScriptAlertPanelWithMessage):
+ (UIDelegate::webViewAddMessageToConsole):
+ (UIDelegate::doDragDrop):
+ (UIDelegate::webViewGetDlgCode):
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/UIDelegate.h: Added.
+ (UIDelegate::UIDelegate):
+ (UIDelegate::createWebViewWithRequest):
+ (UIDelegate::webViewShow):
+ (UIDelegate::webViewClose):
+ (UIDelegate::webViewFocus):
+ (UIDelegate::webViewUnfocus):
+ (UIDelegate::webViewFirstResponder):
+ (UIDelegate::makeFirstResponder):
+ (UIDelegate::setStatusText):
+ (UIDelegate::webViewStatusText):
+ (UIDelegate::webViewAreToolbarsVisible):
+ (UIDelegate::setToolbarsVisible):
+ (UIDelegate::webViewIsStatusBarVisible):
+ (UIDelegate::setStatusBarVisible):
+ (UIDelegate::webViewIsResizable):
+ (UIDelegate::setResizable):
+ (UIDelegate::setContentRect):
+ (UIDelegate::webViewContentRect):
+ (UIDelegate::runJavaScriptConfirmPanelWithMessage):
+ (UIDelegate::runJavaScriptTextInputPanelWithPrompt):
+ (UIDelegate::runBeforeUnloadConfirmPanelWithMessage):
+ (UIDelegate::runOpenPanelForFileButtonWithResultListener):
+ (UIDelegate::mouseDidMoveOverElement):
+ (UIDelegate::contextMenuItemsForElement):
+ (UIDelegate::validateUserInterfaceItem):
+ (UIDelegate::shouldPerformAction):
+ (UIDelegate::dragDestinationActionMaskForDraggingInfo):
+ (UIDelegate::willPerformDragDestinationAction):
+ (UIDelegate::dragSourceActionMaskForPoint):
+ (UIDelegate::willPerformDragSourceAction):
+ (UIDelegate::contextMenuItemSelected):
+ (UIDelegate::trackCustomPopupMenu):
+ (UIDelegate::measureCustomMenuItem):
+ (UIDelegate::drawCustomMenuItem):
+ (UIDelegate::addCustomMenuDrawingData):
+ (UIDelegate::cleanUpCustomMenuDrawingData):
+ (UIDelegate::canTakeFocus):
+ (UIDelegate::takeFocus):
+ (UIDelegate::registerUndoWithTarget):
+ (UIDelegate::removeAllActionsWithTarget):
+ (UIDelegate::setActionTitle):
+ (UIDelegate::undo):
+ (UIDelegate::redo):
+ (UIDelegate::canUndo):
+ (UIDelegate::canRedo):
+ (UIDelegate::webViewResizerRect):
+ (UIDelegate::webViewDrawResizer):
+ (UIDelegate::webViewScrolled):
+ (UIDelegate::webViewShouldInterruptJavaScript):
+ (UIDelegate::webViewReceivedFocus):
+ (UIDelegate::webViewLostFocus):
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WaitUntilDoneDelegate.cpp:
+ (FrameLoadDelegate::QueryInterface):
+ (FrameLoadDelegate::AddRef):
+ (FrameLoadDelegate::Release):
+ (FrameLoadDelegate::didStartProvisionalLoadForFrame):
+ (FrameLoadDelegate::didCommitLoadForFrame):
+ (FrameLoadDelegate::didReceiveTitle):
+ (FrameLoadDelegate::processWork):
+ (processWorkTimer):
+ (FrameLoadDelegate::locationChangeDone):
+ (FrameLoadDelegate::didFinishLoadForFrame):
+ (FrameLoadDelegate::didFailLoadWithError):
+ (FrameLoadDelegate::windowScriptObjectAvailable):
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WaitUntilDoneDelegate.h:
+ (FrameLoadDelegate::FrameLoadDelegate):
+
+2007-09-14 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Kevin McCullough.
+
+ Move mac specific globals in to mac/DumpRenderTreeMac.h
+
+ * DumpRenderTree/DumpRenderTree.h:
+ * DumpRenderTree/DumpRenderTree.mm: Removed.
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/mac/DumpRenderTree.mm: Copied from DumpRenderTree/DumpRenderTree.mm.
+ * DumpRenderTree/mac/DumpRenderTreeMac.h: Added.
+
+2007-09-14 Brady Eidson <beidson@apple.com>
+
+ Rubberstamped by Weinig
+
+ You know, Sam, some of us use case-sensitve filesystems...
+
+ * DumpRenderTree/DumpRenderTree.h:
+ * DumpRenderTree/mac/UIDelegate.mm:
+
+2007-09-14 Sam Weinig <sam@webkit.org>
+
+ Rubber stamped by Adam Roben.
+
+ - Move dump state data to LayoutTestContoller and add getter/setters to accommodate.
+ - Move mac specific DumpRenderTree files to DumpRenderTree/mac
+
+ * DumpRenderTree/AppleScriptController.h: Removed.
+ * DumpRenderTree/AppleScriptController.m: Removed.
+ * DumpRenderTree/DumpRenderTree.h:
+ * DumpRenderTree/DumpRenderTree.mm:
+ (startJavaScriptThreads):
+ (stopJavaScriptThreads):
+ (activateAhemFont):
+ (setDefaultColorProfileToRGB):
+ (makeLargeMallocFailSilently):
+ (dumpFrameScrollPosition):
+ (dumpFramesAsText):
+ (dump):
+ (runTest):
+ (-[DumpRenderTreeWindow isKeyWindow]):
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/DumpRenderTreeDraggingInfo.h: Removed.
+ * DumpRenderTree/DumpRenderTreeDraggingInfo.m: Removed.
+ * DumpRenderTree/EditingDelegate.h: Removed.
+ * DumpRenderTree/EditingDelegate.m: Removed.
+ * DumpRenderTree/EventSendingController.h: Removed.
+ * DumpRenderTree/EventSendingController.m: Removed.
+ * DumpRenderTree/FrameLoadDelegate.h: Removed.
+ * DumpRenderTree/FrameLoadDelegate.mm: Removed.
+ * DumpRenderTree/GCController.mm: Removed.
+ * DumpRenderTree/ImageDiff.m: Removed.
+ * DumpRenderTree/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (dumpAsTextCallback):
+ (dumpBackForwardListCallback):
+ (dumpChildFramesAsTextCallback):
+ (dumpChildFrameScrollPositionsCallback):
+ (dumpDOMAsWebArchiveCallback):
+ (dumpEditingCallbacksCallback):
+ (dumpFrameLoadCallbacksCallback):
+ (dumpResourceLoadCallbacksCallback):
+ (dumpSelectionRectCallback):
+ (dumpSourceAsWebArchiveCallback):
+ (dumpTitleChangesCallback):
+ (repaintSweepHorizontallyCallback):
+ (setCallCloseOnWebViewsCallback):
+ (setCanOpenWindowsCallback):
+ (setCloseRemainingWindowsWhenCompleteCallback):
+ (testRepaintCallback):
+ (addFileToPasteboardOnDragCallback):
+ (waitUntilDoneCallback):
+ * DumpRenderTree/LayoutTestController.h:
+ (LayoutTestController::dumpAsText):
+ (LayoutTestController::setDumpAsText):
+ (LayoutTestController::dumpBackForwardList):
+ (LayoutTestController::setDumpBackForwardList):
+ (LayoutTestController::dumpChildFrameScrollPositions):
+ (LayoutTestController::setDumpChildFrameScrollPositions):
+ (LayoutTestController::dumpChildFramesAsText):
+ (LayoutTestController::setDumpChildFramesAsText):
+ (LayoutTestController::dumpDOMAsWebArchive):
+ (LayoutTestController::setDumpDOMAsWebArchive):
+ (LayoutTestController::dumpSelectionRect):
+ (LayoutTestController::setDumpSelectionRect):
+ (LayoutTestController::dumpSourceAsWebArchive):
+ (LayoutTestController::setDumpSourceAsWebArchive):
+ (LayoutTestController::dumpTitleChanges):
+ (LayoutTestController::setDumpTitleChanges):
+ (LayoutTestController::dumpEditingCallbacks):
+ (LayoutTestController::setDumpEditingCallbacks):
+ (LayoutTestController::dumpResourceLoadCallbacks):
+ (LayoutTestController::setDumpResourceLoadCallbacks):
+ (LayoutTestController::dumpFrameLoadCallbacks):
+ (LayoutTestController::setDumpFrameLoadCallbacks):
+ (LayoutTestController::addFileToPasteboardOnDrag):
+ (LayoutTestController::setAddFileToPasteboardOnDrag):
+ (LayoutTestController::callCloseOnWebViews):
+ (LayoutTestController::setCallCloseOnWebViews):
+ (LayoutTestController::canOpenWindows):
+ (LayoutTestController::setCanOpenWindows):
+ (LayoutTestController::closeRemainingWindowsWhenComplete):
+ (LayoutTestController::setCloseRemainingWindowsWhenComplete):
+ (LayoutTestController::testRepaint):
+ (LayoutTestController::setTestRepaint):
+ (LayoutTestController::testRepaintSweepHorizontally):
+ (LayoutTestController::setTestRepaintSweepHorizontally):
+ (LayoutTestController::waitToDump):
+ (LayoutTestController::windowIsKey):
+ * DumpRenderTree/LayoutTestControllerMac.mm: Removed.
+ * DumpRenderTree/NavigationController.h: Removed.
+ * DumpRenderTree/NavigationController.m: Removed.
+ * DumpRenderTree/ObjCController.h: Removed.
+ * DumpRenderTree/ObjCController.m: Removed.
+ * DumpRenderTree/ObjCPlugin.h: Removed.
+ * DumpRenderTree/ObjCPlugin.m: Removed.
+ * DumpRenderTree/ObjCPluginFunction.h: Removed.
+ * DumpRenderTree/ObjCPluginFunction.m: Removed.
+ * DumpRenderTree/PolicyDelegate.h: Removed.
+ * DumpRenderTree/PolicyDelegate.m: Removed.
+ * DumpRenderTree/ResourceLoadDelegate.h: Removed.
+ * DumpRenderTree/ResourceLoadDelegate.m: Removed.
+ * DumpRenderTree/TextInputController.h: Removed.
+ * DumpRenderTree/TextInputController.m: Removed.
+ * DumpRenderTree/UIDelegate.h: Removed.
+ * DumpRenderTree/UIDelegate.mm: Removed.
+ * DumpRenderTree/WorkQueueItemMac.mm: Removed.
+ * DumpRenderTree/mac: Added.
+ * DumpRenderTree/mac/AppleScriptController.h: Copied from DumpRenderTree/AppleScriptController.h.
+ * DumpRenderTree/mac/AppleScriptController.m: Copied from DumpRenderTree/AppleScriptController.m.
+ * DumpRenderTree/mac/DumpRenderTreeDraggingInfo.h: Copied from DumpRenderTree/DumpRenderTreeDraggingInfo.h.
+ * DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm: Copied from DumpRenderTree/DumpRenderTreeDraggingInfo.m.
+ * DumpRenderTree/mac/EditingDelegate.h: Copied from DumpRenderTree/EditingDelegate.h.
+ * DumpRenderTree/mac/EditingDelegate.mm: Copied from DumpRenderTree/EditingDelegate.m.
+ (-[EditingDelegate webView:shouldBeginEditingInDOMRange:]):
+ (-[EditingDelegate webView:shouldEndEditingInDOMRange:]):
+ (-[EditingDelegate webView:shouldInsertNode:replacingDOMRange:givenAction:]):
+ (-[EditingDelegate webView:shouldInsertText:replacingDOMRange:givenAction:]):
+ (-[EditingDelegate webView:shouldDeleteDOMRange:]):
+ (-[EditingDelegate webView:shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
+ (-[EditingDelegate webView:shouldApplyStyle:toElementsInDOMRange:]):
+ (-[EditingDelegate webView:shouldChangeTypingStyle:toStyle:]):
+ (-[EditingDelegate webViewDidBeginEditing:]):
+ (-[EditingDelegate webViewDidChange:]):
+ (-[EditingDelegate webViewDidEndEditing:]):
+ (-[EditingDelegate webViewDidChangeTypingStyle:]):
+ (-[EditingDelegate webViewDidChangeSelection:]):
+ * DumpRenderTree/mac/EventSendingController.h: Copied from DumpRenderTree/EventSendingController.h.
+ * DumpRenderTree/mac/EventSendingController.mm: Copied from DumpRenderTree/EventSendingController.m.
+ * DumpRenderTree/mac/FrameLoadDelegate.h: Copied from DumpRenderTree/FrameLoadDelegate.h.
+ * DumpRenderTree/mac/FrameLoadDelegate.mm: Copied from DumpRenderTree/FrameLoadDelegate.mm.
+ (-[FrameLoadDelegate init]):
+ (-[FrameLoadDelegate dealloc]):
+ (-[FrameLoadDelegate processWork:]):
+ (-[FrameLoadDelegate webView:locationChangeDone:forDataSource:]):
+ (-[FrameLoadDelegate webView:didStartProvisionalLoadForFrame:]):
+ (-[FrameLoadDelegate webView:didCommitLoadForFrame:]):
+ (-[FrameLoadDelegate webView:didFailProvisionalLoadWithError:forFrame:]):
+ (-[FrameLoadDelegate webView:didFinishLoadForFrame:]):
+ (-[FrameLoadDelegate webView:didFailLoadWithError:forFrame:]):
+ (-[FrameLoadDelegate webView:windowScriptObjectAvailable:]):
+ (-[FrameLoadDelegate webView:didClearWindowObject:forFrame:]):
+ (-[FrameLoadDelegate webView:didReceiveTitle:forFrame:]):
+ (-[FrameLoadDelegate webView:didReceiveServerRedirectForProvisionalLoadForFrame:]):
+ (-[FrameLoadDelegate webView:didReceiveIcon:forFrame:]):
+ (-[FrameLoadDelegate webView:didChangeLocationWithinPageForFrame:]):
+ (-[FrameLoadDelegate webView:willPerformClientRedirectToURL:delay:fireDate:forFrame:]):
+ (-[FrameLoadDelegate webView:didCancelClientRedirectForFrame:]):
+ (-[FrameLoadDelegate webView:willCloseFrame:]):
+ (-[FrameLoadDelegate webView:didFinishDocumentLoadForFrame:]):
+ (-[FrameLoadDelegate webView:didHandleOnloadEventsForFrame:]):
+ * DumpRenderTree/mac/GCControllerMac.mm: Copied from DumpRenderTree/GCController.mm.
+ * DumpRenderTree/mac/ImageDiff.m: Copied from DumpRenderTree/ImageDiff.m.
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm: Copied from DumpRenderTree/LayoutTestControllerMac.mm.
+ (LayoutTestController::notifyDone):
+ (LayoutTestController::setWindowIsKey):
+ (LayoutTestController::setWaitToDump):
+ * DumpRenderTree/mac/NavigationController.h: Copied from DumpRenderTree/NavigationController.h.
+ * DumpRenderTree/mac/NavigationController.m: Copied from DumpRenderTree/NavigationController.m.
+ * DumpRenderTree/mac/ObjCController.h: Copied from DumpRenderTree/ObjCController.h.
+ * DumpRenderTree/mac/ObjCController.m: Copied from DumpRenderTree/ObjCController.m.
+ * DumpRenderTree/mac/ObjCPlugin.h: Copied from DumpRenderTree/ObjCPlugin.h.
+ * DumpRenderTree/mac/ObjCPlugin.m: Copied from DumpRenderTree/ObjCPlugin.m.
+ * DumpRenderTree/mac/ObjCPluginFunction.h: Copied from DumpRenderTree/ObjCPluginFunction.h.
+ * DumpRenderTree/mac/ObjCPluginFunction.m: Copied from DumpRenderTree/ObjCPluginFunction.m.
+ * DumpRenderTree/mac/PolicyDelegate.h: Copied from DumpRenderTree/PolicyDelegate.h.
+ * DumpRenderTree/mac/PolicyDelegate.mm: Copied from DumpRenderTree/PolicyDelegate.m.
+ * DumpRenderTree/mac/ResourceLoadDelegate.h: Copied from DumpRenderTree/ResourceLoadDelegate.h.
+ * DumpRenderTree/mac/ResourceLoadDelegate.mm: Copied from DumpRenderTree/ResourceLoadDelegate.m.
+ (-[ResourceLoadDelegate webView:identifierForInitialRequest:fromDataSource:]):
+ (-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]):
+ (-[ResourceLoadDelegate webView:resource:didReceiveResponse:fromDataSource:]):
+ (-[ResourceLoadDelegate webView:resource:didFinishLoadingFromDataSource:]):
+ (-[ResourceLoadDelegate webView:resource:didFailLoadingWithError:fromDataSource:]):
+ (-[ResourceLoadDelegate webView:resource:willCacheResponse:fromDataSource:]):
+ * DumpRenderTree/mac/TextInputController.h: Copied from DumpRenderTree/TextInputController.h.
+ * DumpRenderTree/mac/TextInputController.m: Copied from DumpRenderTree/TextInputController.m.
+ * DumpRenderTree/mac/UIDelegate.h: Copied from DumpRenderTree/UIDelegate.h.
+ * DumpRenderTree/mac/UIDelegate.mm: Copied from DumpRenderTree/UIDelegate.mm.
+ (-[UIDelegate webView:dragImage:at:offset:event:pasteboard:source:slideBack:forView:]):
+ (-[UIDelegate webViewFocus:]):
+ (-[UIDelegate webView:createWebViewWithRequest:]):
+ (-[UIDelegate webViewClose:]):
+ * DumpRenderTree/mac/WorkQueueItemMac.mm: Copied from DumpRenderTree/WorkQueueItemMac.mm.
+
+2007-09-14 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam.
+
+ - Changing Win version of Drosera work with recent changes.
+
+ * Drosera/DebuggerDocument.cpp:
+ * Drosera/DebuggerDocument.h:
+ * Drosera/mac/DebuggerDocumentPlatform.mm:
+ (NSStringCreateWithJSStringRef):
+ (JSValueRefCreateWithNSString):
+ * Drosera/win/DebuggerClient.cpp:
+ (DebuggerClient::stepInto):
+ * Drosera/win/Drosera.vcproj/Drosera.vcproj:
+
+2007-09-13 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Tim.
+
+ - Moved isPaused into the JS for efficiency and simplicity.
+
+ * Drosera/DebuggerDocument.cpp:
+ (DebuggerDocument::DebuggerDocument):
+ (DebuggerDocument::pauseCallback):
+ (DebuggerDocument::resumeCallback):
+ (DebuggerDocument::isPaused):
+ (DebuggerDocument::staticFunctions):
+ * Drosera/DebuggerDocument.h:
+ * Drosera/console.js:
+ * Drosera/debugger.js:
+ * Drosera/mac/DebuggerClient.mm:
+ (-[DebuggerClient validateUserInterfaceItem:]):
+
+2007-09-13 Sam Weinig <sam@webkit.org>
+
+ Rubber stamped by Darin Adler.
+
+ Make DumpRenderTree more cross platform ready.
+ - Convert GCController to use the JSCore API instead of the WebScriptObject.
+ - Use CF types instead of NS objects.
+ - General cleanup.
+
+ * DumpRenderTree/DumpRenderTree.h:
+ * DumpRenderTree/DumpRenderTree.mm:
+ (dumpRenderTree):
+ (dump):
+ (runTest):
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/EditingDelegate.m:
+ * DumpRenderTree/FrameLoadDelegate.h:
+ * DumpRenderTree/FrameLoadDelegate.mm:
+ (-[FrameLoadDelegate init]):
+ (-[FrameLoadDelegate dealloc]):
+ (-[FrameLoadDelegate webView:didClearWindowObject:forFrame:]):
+ * DumpRenderTree/GCController.cpp: Added.
+ (GCController::GCController):
+ (GCController::~GCController):
+ (collectCallback):
+ (collectOnAlternateThreadCallback):
+ (getJSObjectCountCallback):
+ (GCController::makeWindowObject):
+ (GCController::getJSClass):
+ (GCController::staticFunctions):
+ * DumpRenderTree/GCController.h:
+ * DumpRenderTree/GCController.mm:
+ (GCController::collect):
+ (GCController::collectOnAlternateThread):
+ (GCController::getJSObjectCount):
+ * DumpRenderTree/LayoutTestController.cpp:
+ (LayoutTestController::makeWindowObject):
+ (LayoutTestController::getJSClass):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/LayoutTestControllerMac.mm:
+ (LayoutTestController::addDisallowedURL):
+ (waitUntilDoneWatchdogFired):
+ (LayoutTestController::waitUntilDone):
+ * DumpRenderTree/ResourceLoadDelegate.m:
+ (-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]):
+
+2007-09-12 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Stephanie.
+
+ Fix leaks in mac DumpRenderTree.
+
+ * DumpRenderTree/FrameLoadDelegate.mm:
+ (-[FrameLoadDelegate init]): Initalize in the correct order.
+ (-[FrameLoadDelegate processWork:]): Delete WorkQueueItem's after dequeueing them.
+ * DumpRenderTree/LayoutTestController.cpp:
+ (decodeHostNameCallback): Put return value in a temporary JSRetainPtr to ensure it gets released.
+ (encodeHostNameCallback): ditto.
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/LayoutTestControllerMac.mm:
+ (LayoutTestController::copyDecodedHostName): Rename function to signal that it follows the Create rule.
+ (LayoutTestController::copyEncodedHostName): ditto
+ (LayoutTestController::queueLoad): Use a JSRetainPtr to ensure the url gets released.
+
+2007-09-12 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Geof.
+
+ - Updated Leopard leak list to include a leak which appears to be fixed in 9A549 but not the version the bot is on. This will allow us to get the bot green, but later we should remove it.
+
+ * Scripts/run-webkit-tests:
+
+2007-09-12 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - Simplified code paths and extracted out functions to increase encapsulation.
+
+ * Drosera/DebuggerDocument.cpp:
+ (DebuggerDocument::breakpointEditorHTMLCallback):
+ (DebuggerDocument::isPausedCallback):
+ (DebuggerDocument::pauseCallback):
+ (DebuggerDocument::resumeCallback):
+ (DebuggerDocument::stepIntoCallback):
+ (DebuggerDocument::evaluateScriptCallback):
+ (DebuggerDocument::currentFunctionStackCallback):
+ (DebuggerDocument::localScopeVariableNamesForCallFrameCallback):
+ (DebuggerDocument::valueForScopeVariableNamedCallback):
+ (DebuggerDocument::logCallback):
+ * Drosera/DebuggerDocument.h:
+ (DebuggerDocument::getPaused):
+ * Drosera/mac/DebuggerClient.mm:
+ (-[DebuggerClient pause:]):
+ (-[DebuggerClient resume:]):
+ (-[DebuggerClient stepInto:]):
+ (-[DebuggerClient stepOver:]):
+ (-[DebuggerClient stepOut:]):
+ (-[DebuggerClient showConsole:]):
+ (-[DebuggerClient closeCurrentFile:]):
+ (-[DebuggerClient validateUserInterfaceItem:]):
+ * Drosera/mac/DebuggerDocumentPlatform.mm: Added.
+ (+[NSString stringOrNilFromWebScriptResult:]):
+ (DebuggerDocument::platformPause):
+ (DebuggerDocument::platformResume):
+ (DebuggerDocument::platformStepInto):
+ (DebuggerDocument::platformEvaluateScript):
+ (DebuggerDocument::getPlatformCurrentFunctionStack):
+ (DebuggerDocument::getPlatformLocalScopeVariableNamesForCallFrame):
+ (DebuggerDocument::platformValueForScopeVariableNamed):
+ (DebuggerDocument::platformLog):
+ * Drosera/mac/Drosera.xcodeproj/project.pbxproj:
+
+2007-09-12 Sam Weinig <sam@webkit.org>
+
+ Build fix for Buildbot.
+
+ * DumpRenderTree/DumpRenderTree.mm:
+ (dump):
+
+2007-09-12 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Geoff.
+
+ - Updated the leaks list for leopard to help identify regressions.
+
+ * Scripts/run-webkit-tests:
+
+2007-09-12 Sam Weinig <sam@webkit.org>
+
+ Rubber stamped by Darin Adler.
+
+ Convert the LayoutTestController to use the JSCore API instead of WebScriptObject.
+
+ * DumpRenderTree/DumpRenderTree.h: Re-order variables.
+ * DumpRenderTree/DumpRenderTree.m: Removed.
+ * DumpRenderTree/DumpRenderTree.mm: Copied from DumpRenderTree/DumpRenderTree.m.
+ (stopJavaScriptThreads): Fix initialization.
+ (setDefaultColorProfileToRGB): Add explicit cast from void*.
+ (dumpRenderTree): Ditto.
+ (runTest):
+ Used the WorkQueue from the windows DRT instead of the old NSMutableArray one.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/FrameLoadDelegate.h: Add LayoutTestController instance variable.
+ * DumpRenderTree/FrameLoadDelegate.m: Removed.
+ * DumpRenderTree/FrameLoadDelegate.mm: Copied from DumpRenderTree/FrameLoadDelegate.m.
+ (-[FrameLoadDelegate init]):
+ (-[FrameLoadDelegate dealloc]):
+ (-[FrameLoadDelegate processWork:]):
+ (-[FrameLoadDelegate webView:locationChangeDone:forDataSource:]):
+ (-[FrameLoadDelegate webView:didClearWindowObject:forFrame:]):
+ Convert to use the new JSCore based LayoutTestController and the new WorkQueue.
+
+ * DumpRenderTree/LayoutTestController.cpp: Added.
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::~LayoutTestController):
+ (dumpAsTextCallback):
+ (dumpBackForwardListCallback):
+ (dumpChildFramesAsTextCallback):
+ (dumpChildFrameScrollPositionsCallback):
+ (dumpDOMAsWebArchiveCallback):
+ (dumpEditingCallbacksCallback):
+ (dumpFrameLoadCallbacksCallback):
+ (dumpResourceLoadCallbacksCallback):
+ (dumpSelectionRectCallback):
+ (dumpSourceAsWebArchiveCallback):
+ (dumpTitleChangesCallback):
+ (repaintSweepHorizontallyCallback):
+ (setCallCloseOnWebViewsCallback):
+ (setCanOpenWindowsCallback):
+ (setCloseRemainingWindowsWhenCompleteCallback):
+ (testRepaintCallback):
+ (addFileToPasteboardOnDragCallback):
+ (addDisallowedURLCallback):
+ (clearBackForwardListCallback):
+ (decodeHostNameCallback):
+ (displayCallback):
+ (encodeHostNameCallback):
+ (keepWebHistoryCallback):
+ (notifyDoneCallback):
+ (queueBackNavigationCallback):
+ (queueForwardNavigationCallback):
+ (queueLoadCallback):
+ (queueReloadCallback):
+ (queueScriptCallback):
+ (setAcceptsEditingCallback):
+ (setCustomPolicyDelegateCallback):
+ (setMainFrameIsFirstResponderCallback):
+ (setTabKeyCyclesThroughElementsCallback):
+ (setUseDashboardCompatibilityModeCallback):
+ (setUserStyleSheetEnabledCallback):
+ (setUserStyleSheetLocationCallback):
+ (setWindowIsKeyCallback):
+ (waitUntilDoneCallback):
+ (windowCountCallback):
+ (LayoutTestController::makeWindowObject):
+ (LayoutTestController::getLayoutTestControllerJSClass):
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h: Replaced.
+ * DumpRenderTree/LayoutTestController.m: Removed.
+ * DumpRenderTree/LayoutTestControllerMac.mm: Added.
+ (LayoutTestController::dumpAsText):
+ (LayoutTestController::dumpBackForwardList):
+ (LayoutTestController::dumpChildFramesAsText):
+ (LayoutTestController::dumpChildFrameScrollPositions):
+ (LayoutTestController::dumpDOMAsWebArchive):
+ (LayoutTestController::dumpEditingCallbacks):
+ (LayoutTestController::dumpFrameLoadCallbacks):
+ (LayoutTestController::dumpResourceLoadCallbacks):
+ (LayoutTestController::dumpSelectionRect):
+ (LayoutTestController::dumpSourceAsWebArchive):
+ (LayoutTestController::dumpTitleChanges):
+ (LayoutTestController::repaintSweepHorizontally):
+ (LayoutTestController::setCallCloseOnWebViews):
+ (LayoutTestController::setCanOpenWindows):
+ (LayoutTestController::setCloseRemainingWindowsWhenComplete):
+ (LayoutTestController::testRepaint):
+ (LayoutTestController::addFileToPasteboardOnDrag):
+ (LayoutTestController::addDisallowedURL):
+ (LayoutTestController::clearBackForwardList):
+ (LayoutTestController::decodeHostName):
+ (LayoutTestController::encodeHostName):
+ (LayoutTestController::display):
+ (LayoutTestController::keepWebHistory):
+ (LayoutTestController::notifyDone):
+ (LayoutTestController::queueBackNavigation):
+ (LayoutTestController::queueForwardNavigation):
+ (LayoutTestController::queueLoad):
+ (LayoutTestController::queueReload):
+ (LayoutTestController::queueScript):
+ (LayoutTestController::setAcceptsEditing):
+ (LayoutTestController::setCustomPolicyDelegate):
+ (LayoutTestController::setMainFrameIsFirstResponder):
+ (LayoutTestController::setTabKeyCyclesThroughElements):
+ (LayoutTestController::setUseDashboardCompatibilityMode):
+ (LayoutTestController::setUserStyleSheetEnabled):
+ (LayoutTestController::setUserStyleSheetLocation):
+ (LayoutTestController::setWindowIsKey):
+ (+[WaitToDumpWatchdog waitUntilDoneWatchdogFired]):
+ (LayoutTestController::waitUntilDone):
+ (LayoutTestController::windowCount):
+ Use the JSCore API to implement the LayoutTestController.
+
+ * DumpRenderTree/ObjCController.h:
+ * DumpRenderTree/ObjCController.m:
+ (+[ObjCController isSelectorExcludedFromWebScript:]):
+ (+[ObjCController webScriptNameForSelector:]):
+ (-[ObjCController accessStoredWebScriptObject]):
+ (-[ObjCController storeWebScriptObject:]):
+ (-[ObjCController dealloc]):
+ (-[ObjCController invokeUndefinedMethodFromWebScript:withArguments:]):
+ Move WebScriptObject tests to ObjCController.
+
+ * DumpRenderTree/UIDelegate.m: Removed.
+ * DumpRenderTree/UIDelegate.mm: Copied from DumpRenderTree/UIDelegate.m.
+
+ * DumpRenderTree/WorkQueue.cpp: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WorkQueue.cpp.
+ * DumpRenderTree/WorkQueue.h: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WorkQueue.h.
+ * DumpRenderTree/WorkQueueItem.h: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WorkQueueItem.h.
+ (WorkQueueItem::~WorkQueueItem):
+ (LoadItem::LoadItem):
+ (LoadItem::url):
+ (LoadItem::target):
+ (ScriptItem::ScriptItem):
+ (ScriptItem::script):
+ * DumpRenderTree/WorkQueueItemMac.mm: Added.
+ (LoadItem::invoke):
+ (ReloadItem::invoke):
+ (ScriptItem::invoke):
+ (BackForwardItem::invoke):
+ Copy WorkQueue and WorkQueueItem from windows DRT. Changed the WorkQueueItem to use JSStringRefs instead of wstrings
+ to avoid conversion until the last possible moment. These changes will be merged with the windows DRT when we start
+ sharing code.
+
+2007-09-11 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Maciej.
+
+ - Updated Win side to take advantage of the platform separating changes.
+
+ * Drosera/DebuggerDocument.cpp:
+ (DebuggerDocument::localScopeVariableNamesForCallFrame):
+ * Drosera/DebuggerDocument.h:
+ * Drosera/win/DebuggerClient.cpp:
+ (DebuggerClient::pause):
+ (DebuggerClient::resume):
+ (DebuggerClient::stepInto):
+ (DebuggerDocument::platformPause):
+ (DebuggerDocument::platformResume):
+ (DebuggerDocument::platformStepInto):
+ (DebuggerDocument::platformEvaluateScript):
+ (DebuggerDocument::getPlatformCurrentFunctionStack):
+ (DebuggerDocument::getPlatformLocalScopeVariableNamesForCallFrame):
+ (DebuggerDocument::platformValueForScopeVariableNamed):
+ (DebuggerDocument::platformLog):
+ * Drosera/win/DebuggerClient.h:
+ * Drosera/win/Drosera.cpp:
+ (Drosera::Drosera):
+ (Drosera::windowScriptObjectAvailable):
+ (Drosera::initWithServerName):
+ (Drosera::switchToServerNamed):
+ * Drosera/win/Drosera.h:
+ * Drosera/win/Drosera.vcproj/Drosera.vcproj:
+
+2007-09-11 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam.
+
+ - Just doing the moves in a separate patch so the changes are easier to see.
+
+ * Drosera/win/DebuggerClient.cpp: Copied from Drosera/win/DebuggerDocumentWin.cpp.
+ * Drosera/win/DebuggerClient.h: Copied from Drosera/win/DebuggerDocumentWin.h.
+ * Drosera/win/DebuggerDocumentWin.cpp: Removed.
+ * Drosera/win/DebuggerDocumentWin.h: Removed.
+ * Drosera/win/Drosera.vcproj/Drosera.vcproj:
+
+2007-09-11 Sven Herzberg <sven@imendio.com>
+
+ Don't overwrite LD_LIBRARY_PATH, prepend to it. Fixes:
+ http://bugs.webkit.org/show_bug.cgi?id=15176
+
+ * Scripts/run-launcher: don't replace LD_LIBRARY_PATH with
+ $projectDir, but prepend $projectDir to LD_LIBRARY_PATH (to preserve
+ other paths eg. from jhbuild)
+
+2007-09-10 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam.
+
+ - Made an order-of-deletion mistake.
+
+ * Drosera/DebuggerDocument.h:
+ * Drosera/ForwardingHeaders/wtf/Assertions.h: Removed.
+ * Drosera/ForwardingHeaders/wtf/Noncopyable.h: Removed.
+ * Drosera/ForwardingHeaders/wtf/OwnPtr.h: Removed.
+ * Drosera/mac/DebuggerClient.mm:
+ (DebuggerDocument::platformPause):
+ (DebuggerDocument::platformResume):
+ (DebuggerDocument::platformStepInto):
+ (DebuggerDocument::platformEvaluateScript):
+ (DebuggerDocument::getPlatformCurrentFunctionStack):
+ (DebuggerDocument::getPlatformLocalScopeVariableNamesForCallFrame):
+ (DebuggerDocument::platformValueForScopeVariableNamed):
+ * Drosera/mac/Drosera.xcodeproj/project.pbxproj:
+
+2007-09-10 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - Renaming DebuggerDocument[platform] to DebuggerClient to be more clear.
+
+ * Drosera/DebuggerDocument.cpp:
+ (DebuggerDocument::DebuggerDocument):
+ * Drosera/DebuggerDocument.h:
+ * Drosera/ForwardingHeaders/wtf/Assertions.h: Added.
+ * Drosera/ForwardingHeaders/wtf/Noncopyable.h: Added.
+ * Drosera/ForwardingHeaders/wtf/OwnPtr.h: Added.
+ * Drosera/mac/DebuggerApplication.mm:
+ (-[DebuggerApplication attach:]):
+ * Drosera/mac/DebuggerClient.h: Copied from Drosera/mac/DebuggerDocumentMac.h.
+ * Drosera/mac/DebuggerClient.mm: Copied from Drosera/mac/DebuggerDocumentMac.mm.
+ (DebuggerDocument::platformPause):
+ (DebuggerDocument::platformResume):
+ (DebuggerDocument::platformStepInto):
+ (DebuggerDocument::platformEvaluateScript):
+ (DebuggerDocument::getPlatformCurrentFunctionStack):
+ (DebuggerDocument::getPlatformLocalScopeVariableNamesForCallFrame):
+ (DebuggerDocument::platformValueForScopeVariableNamed):
+ (DebuggerDocument::platformLog):
+ * Drosera/mac/DebuggerDocumentMac.h: Removed.
+ * Drosera/mac/DebuggerDocumentMac.mm: Removed.
+ * Drosera/mac/Drosera.xcodeproj/project.pbxproj:
+
+2007-09-09 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Remove 'objC' prefix from methods now in the ObjCController.
+
+ * DumpRenderTree/ObjCController.m:
+ (+[ObjCController isSelectorExcludedFromWebScript:]):
+ (+[ObjCController webScriptNameForSelector:]):
+ (-[ObjCController classNameOf:]):
+ (-[ObjCController objectOfClass:]):
+ (-[ObjCController identityIsEqual::]):
+ (-[ObjCController longLongRoundTrip:]):
+ (-[ObjCController unsignedLongLongRoundTrip:]):
+
+2007-09-09 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Oliver.
+
+ Initial refactor of DumpRenderTree in preparation of making it more platform independent.
+ - Move LayoutTestController into its own file.
+ - Move Objective-C only functions on LayoutTestController into a new controller called the
+ ObjCController.
+
+ * DumpRenderTree/DumpRenderTree.h:
+ * DumpRenderTree/DumpRenderTree.m:
+ (displayWebView):
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/FrameLoadDelegate.m:
+ (-[FrameLoadDelegate webView:didClearWindowObject:forFrame:]):
+ * DumpRenderTree/LayoutTestController.h: Added.
+ * DumpRenderTree/LayoutTestController.m: Added.
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (+[LayoutTestController webScriptNameForSelector:]):
+ (-[LayoutTestController clearBackForwardList]):
+ (-[LayoutTestController setUseDashboardCompatibilityMode:]):
+ (-[LayoutTestController setCloseRemainingWindowsWhenComplete:]):
+ (-[LayoutTestController setCustomPolicyDelegate:]):
+ (-[LayoutTestController keepWebHistory]):
+ (-[LayoutTestController setCallCloseOnWebViews:]):
+ (-[LayoutTestController setCanOpenWindows]):
+ (-[LayoutTestController waitUntilDone]):
+ (-[LayoutTestController waitUntilDoneWatchdogFired]):
+ (-[LayoutTestController notifyDone]):
+ (-[LayoutTestController dumpAsText]):
+ (-[LayoutTestController addFileToPasteboardOnDrag]):
+ (-[LayoutTestController addDisallowedURL:]):
+ (-[LayoutTestController setUserStyleSheetLocation:]):
+ (-[LayoutTestController setUserStyleSheetEnabled:]):
+ (-[LayoutTestController dumpDOMAsWebArchive]):
+ (-[LayoutTestController dumpSourceAsWebArchive]):
+ (-[LayoutTestController dumpSelectionRect]):
+ (-[LayoutTestController dumpTitleChanges]):
+ (-[LayoutTestController dumpBackForwardList]):
+ (-[LayoutTestController windowCount]):
+ (-[LayoutTestController dumpChildFrameScrollPositions]):
+ (-[LayoutTestController dumpChildFramesAsText]):
+ (-[LayoutTestController dumpEditingCallbacks]):
+ (-[LayoutTestController dumpResourceLoadCallbacks]):
+ (-[LayoutTestController dumpFrameLoadCallbacks]):
+ (-[LayoutTestController setWindowIsKey:]):
+ (-[LayoutTestController setMainFrameIsFirstResponder:]):
+ (-[LayoutTestController display]):
+ (-[LayoutTestController testRepaint]):
+ (-[LayoutTestController repaintSweepHorizontally]):
+ (-[LayoutTestController invokeUndefinedMethodFromWebScript:withArguments:]):
+ (-[LayoutTestController _addWorkForTarget:selector:arg1:arg2:]):
+ (-[LayoutTestController _doLoad:target:]):
+ (-[LayoutTestController _doBackOrForwardNavigation:]):
+ (-[LayoutTestController queueBackNavigation:]):
+ (-[LayoutTestController queueForwardNavigation:]):
+ (-[LayoutTestController queueReload]):
+ (-[LayoutTestController queueScript:]):
+ (-[LayoutTestController queueLoad:target:]):
+ (-[LayoutTestController setAcceptsEditing:]):
+ (-[LayoutTestController setTabKeyCyclesThroughElements:]):
+ (-[LayoutTestController storeWebScriptObject:]):
+ (-[LayoutTestController accessStoredWebScriptObject]):
+ (-[LayoutTestController dealloc]):
+ (-[LayoutTestController decodeHostName:]):
+ (-[LayoutTestController encodeHostName:]):
+ * DumpRenderTree/ObjCController.h: Added.
+ * DumpRenderTree/ObjCController.m: Added.
+ (+[ObjCController isSelectorExcludedFromWebScript:]):
+ (+[ObjCController webScriptNameForSelector:]):
+ (-[ObjCController objCClassNameOf:]):
+ (-[ObjCController objCObjectOfClass:]):
+ (-[ObjCController objCIdentityIsEqual::]):
+ (-[ObjCController objCLongLongRoundTrip:]):
+ (-[ObjCController objCUnsignedLongLongRoundTrip:]):
+ (-[ObjCController testWrapperRoundTripping:]):
+
+2007-09-07 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Alice.
+
+ Strip trailing and leading space/newline characters from skiplist file names.
+
+ * Scripts/run-webkit-tests:
+
+2007-09-06 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Maciej.
+
+ - Changed Drosera to take advantage of the JSRetainPtr changes.
+
+ * Drosera/DebuggerDocument.cpp:
+ (DebuggerDocument::breakpointEditorHTML):
+ (DebuggerDocument::evaluateScript):
+ (DebuggerDocument::valueForScopeVariableNamed):
+ (DebuggerDocument::log):
+ (DebuggerDocument::windowScriptObjectAvailable):
+ (DebuggerDocument::toJSArray):
+ (DebuggerDocument::callFunctionOnObject):
+ (DebuggerDocument::logException):
+ * Drosera/mac/DebuggerDocumentMac.mm:
+ (-[DebuggerClientMac webView:didLoadMainResourceForDataSource:]):
+ (-[DebuggerClientMac webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:]):
+ (DebuggerDocument::platformEvaluateScript):
+ (DebuggerDocument::getPlatformCurrentFunctionStack):
+ (DebuggerDocument::getPlatformLocalScopeVariableNamesForCallFrame):
+ (DebuggerDocument::platformValueForScopeVariableNamed):
+
+2007-09-05 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam, Sam, Darin.
+
+ - Separated what is platform dependant from what is not. Creating the structure needed for Drosera for Win.
+
+ * Drosera/Debugger.h: Added.
+ * Drosera/DebuggerDocument.cpp:
+ (DebuggerDocument::breakpointEditorHTMLCallback):
+ (DebuggerDocument::isPausedCallback):
+ (DebuggerDocument::pauseCallback):
+ (DebuggerDocument::resumeCallback):
+ (DebuggerDocument::stepIntoCallback):
+ (DebuggerDocument::evaluateScriptCallback):
+ (DebuggerDocument::currentFunctionStackCallback):
+ (DebuggerDocument::localScopeVariableNamesForCallFrameCallback):
+ (DebuggerDocument::valueForScopeVariableNamedCallback):
+ (DebuggerDocument::logCallback):
+ (DebuggerDocument::breakpointEditorHTML):
+ (DebuggerDocument::isPaused):
+ (DebuggerDocument::pause):
+ (DebuggerDocument::resume):
+ (DebuggerDocument::stepInto):
+ (DebuggerDocument::evaluateScript):
+ (DebuggerDocument::currentFunctionStack):
+ (DebuggerDocument::localScopeVariableNamesForCallFrame):
+ (DebuggerDocument::valueForScopeVariableNamed):
+ (DebuggerDocument::log):
+ (DebuggerDocument::toolbarPause):
+ (DebuggerDocument::toolbarResume):
+ (DebuggerDocument::toolbarStepInto):
+ (DebuggerDocument::toolbarStepOver):
+ (DebuggerDocument::toolbarStepOut):
+ (DebuggerDocument::toolbarShowConsole):
+ (DebuggerDocument::toolbarCloseCurrentFile):
+ (DebuggerDocument::updateFileSource):
+ (DebuggerDocument::didParseScript):
+ (DebuggerDocument::willExecuteStatement):
+ (DebuggerDocument::didEnterCallFrame):
+ (DebuggerDocument::willLeaveCallFrame):
+ (DebuggerDocument::exceptionWasRaised):
+ (DebuggerDocument::windowScriptObjectAvailable):
+ (DebuggerDocument::toJSArray):
+ (DebuggerDocument::callGlobalFunction):
+ (DebuggerDocument::callFunctionOnObject):
+ (DebuggerDocument::getDroseraJSClass):
+ (DebuggerDocument::staticFunctions):
+ (DebuggerDocument::logException):
+ * Drosera/DebuggerDocument.h:
+ (DebuggerDocument::DebuggerDocument):
+ * Drosera/ForwardingHeaders: Added.
+ * Drosera/ForwardingHeaders/wtf: Added.
+ * Drosera/ForwardingHeaders/wtf/Platform.h: Added.
+ * Drosera/config.h:
+ * Drosera/console.html:
+ * Drosera/console.js:
+ * Drosera/debugger.js:
+ * Drosera/mac/DebuggerApplication.mm:
+ (-[DebuggerApplication attach:]):
+ * Drosera/mac/DebuggerDocumentMac.h:
+ * Drosera/mac/DebuggerDocumentMac.mm:
+ (+[NSString stringOrNilFromWebScriptResult:]):
+ (+[DebuggerClientMac log:]):
+ (-[DebuggerClientMac initWithServerName:]):
+ (-[DebuggerClientMac dealloc]):
+ (-[DebuggerClientMac pause]):
+ (-[DebuggerClientMac resume]):
+ (-[DebuggerClientMac pause:]):
+ (-[DebuggerClientMac resume:]):
+ (-[DebuggerClientMac stepInto:]):
+ (-[DebuggerClientMac stepOver:]):
+ (-[DebuggerClientMac stepOut:]):
+ (-[DebuggerClientMac showConsole:]):
+ (-[DebuggerClientMac closeCurrentFile:]):
+ (-[DebuggerClientMac validateUserInterfaceItem:]):
+ (-[DebuggerClientMac webView:windowScriptObjectAvailable:]):
+ (-[DebuggerClientMac webView:didEnterCallFrame:sourceId:line:forWebFrame:]):
+ (-[DebuggerClientMac webView:willExecuteStatement:sourceId:line:forWebFrame:]):
+ (-[DebuggerClientMac webView:willLeaveCallFrame:sourceId:line:forWebFrame:]):
+ (-[DebuggerClientMac webView:exceptionWasRaised:sourceId:line:forWebFrame:]):
+ (DebuggerDocument::platformPause):
+ (DebuggerDocument::platformResume):
+ (DebuggerDocument::platformStepInto):
+ (DebuggerDocument::platformEvaluateScript):
+ (DebuggerDocument::platformCurrentFunctionStack):
+ (DebuggerDocument::platformLocalScopeVariableNamesForCallFrame):
+ (DebuggerDocument::platformValueForScopeVariableNamed):
+ (DebuggerDocument::platformLog):
+ * Drosera/mac/Drosera.xcodeproj/project.pbxproj:
+
+2007-09-06 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Register the WebKit DLL on initialization of the DumpRenderTree.
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.cpp:
+ (initialize):
+
+2007-09-05 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Oliver.
+
+ Fix many layout test failures caused by r25364.
+ Set text size to standand size at the begining of each test matching the mac.
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.cpp:
+ (runTest):
+
+2007-09-04 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Adam.
+
+ Fix for <rdar://problem/5382277>
+ Implement eventSender.textZoomIn and eventSender.textZoomOut for windows DRT.
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/EventSender.cpp:
+ (textZoomInCallback):
+ (textZoomOutCallback):
+
+2007-08-29 David Kilzer <ddkilzer@apple.com>
+
+ Reviewed by Adam.
+
+ Added case-insensitivity to checks for adding regression tests.
+
+ * Scripts/prepare-ChangeLog:
+ (generateFileList):
+
+2007-08-28 David Kilzer <ddkilzer@apple.com>
+
+ Reviewed by Maciej.
+
+ Ignore files in /resources/ subdirectories when creating a list of added tests.
+
+ * Scripts/prepare-ChangeLog:
+ (generateFileList):
+
+2007-08-27 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by John.
+
+ - Removed Leopard leaks list since all of those radars were fixed.
+
+ * Scripts/run-webkit-tests:
+
+2007-08-27 Adam Roben <aroben@apple.com>
+
+ Rubberstamped by Mark.
+
+ * Scripts/pdevenv: Pass arguments along to devenv.com.
+
+2007-08-26 David Kilzer <ddkilzer@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Update prepare-ChangeLog to generate the datestamp in the correct timezone.
+
+ * Scripts/prepare-ChangeLog:
+ (changeLogDate): Added.
+
+2007-08-24 Sam Weinig <sam@webkit.org>
+
+ Revert r25216 which renamed the COM DOM bindings to use Deprecated prefix.
+
+2007-08-24 Sam Weinig <sam@webkit.org>
+
+ Rubber-stamped by Adam Roben.
+
+ <rdar://problem/5434593> Deprecate current manually written COM DOM bindings in anticipation of autogeneration
+
+ Rename COM DOM bindings to use Deprecated prefix.
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.cpp:
+ (dumpFramesAsText):
+ (dump):
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/EditingDelegate.cpp:
+ (dumpPath):
+ (dump):
+ (EditingDelegate::shouldBeginEditingInDOMRange):
+ (EditingDelegate::shouldEndEditingInDOMRange):
+ (EditingDelegate::shouldInsertNode):
+ (EditingDelegate::shouldInsertText):
+ (EditingDelegate::shouldDeleteDOMRange):
+ (EditingDelegate::shouldChangeSelectedDOMRange):
+ (EditingDelegate::shouldApplyStyle):
+ (EditingDelegate::shouldChangeTypingStyle):
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/EditingDelegate.h:
+
+2007-08-24 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by John H.
+
+ WebDataSource::response can legitimately have a null response, so we
+ must check that case.
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/LayoutTestController.cpp:
+ (queueLoadCallback):
+
+2007-08-23 Mitz Pettel <mitz@webkit.org>
+
+ Reviewed by Darin and Adam.
+
+ - DumpRenderTree changes to allow testing for
+ http://bugs.webkit.org/show_bug.cgi?id=11756
+ REGRESSION: link targeting a frame in another window does not work
+ <rdar://problem/5286420>
+
+ Use a frame group name for all WebViews created by DumpRenderTree to
+ allow testing of cross-page frame lookup.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (createWebView): Pass group name to -[WebView initWithFrame:frameName:groupName:].
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.cpp:
+ (main): Pass group name to WebView::initWithFrame(RECT, BSTR, BSTR).
+
+2007-08-23 David Kilzer <ddkilzer@webkit.org>
+
+ Reviewed by Adam.
+
+ Quote the $sslCertificate path in case it contains a space.
+
+ * Scripts/run-webkit-httpd:
+ * Scripts/run-webkit-tests:
+
+2007-08-22 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by John and Adam.
+
+ WebDataSource::response can legitimately have a null response, so we
+ must check that case.
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.cpp:
+ (dump):
+
+2007-08-21 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Geof.
+
+ - Changing the usage to be more clear.
+
+ * Scripts/run-testkjs:
+
+2007-08-20 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Adam Roben
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (runTest):
+ call new +[WebView _setUsesTestModeFocusRingColor:YES] so we get the same focus ring colors
+ in layout tests on Tiger and Leopard
+
+2007-08-20 Adam Roben <aroben@apple.com>
+
+ Put LayoutTests after all other ChangeLogs in commit logs
+
+ We use "~" to sort LayoutTests after all the other ChangeLogs because
+ "~" is the last ASCII character (other than "DEL").
+
+ Reviewed by Sam.
+
+ * Scripts/commit-log-editor:
+
+2007-08-20 Adam Roben <aroben@apple.com>
+
+ Detect that DRT crashed even if a crash dialog is running
+
+ On Windows, when DRT crashes a crash dialog commonly appears. The DRT
+ process is still running at this point, so run-webkit-tests wouldn't
+ detect that DRT had crashed. We now record the crash in our SIGPIPE
+ handler so that we know if DRT crashed even if the crash dialog is up.
+
+ Reviewed by Sam.
+
+ * Scripts/run-webkit-tests:
+ (sub catch_pipe): Set the crashed bit.
+ (sub openDumpTool): Reset the crashed bit.
+ (sub dumpToolDidCrash): Check the crashed bit.
+
+2007-08-20 Adam Roben <aroben@apple.com>
+
+ Fix Bug 15026: prepare-ChangeLog should list new tests in WebCore/ChangeLog
+
+ http://bugs.webkit.org/show_bug.cgi?id=15026
+
+ Reviewed by David Kilzer and Darin Adler.
+
+ * Scripts/prepare-ChangeLog:
+ (sub isModifiedStatus): Split out from isModifiedOrAddedStatus.
+ (sub isAddedStatus): Ditto.
+ (sub testListForChangeLog): Added.
+
+2007-08-19 Oleg Sukhodolsky <son.two@gmail.com>
+
+ Reviewed by Mark.
+
+ -fixes http://bugs.webkit.org/show_bug.cgi?id=14632
+
+ * Scripts/webkitdirs.pm:
+ qt and gtk ports now explicitly pass debug (or release) mode to qmake.
+
+2007-08-17 Darin Adler <darin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ - don't look for Apple-style localizable strings in the GTK version of WebKit
+
+ * Scripts/extract-localizable-strings: Add a feature where you can pass in the
+ name of subdirectories to skip.
+ * Scripts/update-webkit-localizable-strings: Pass WebKit/gtk as a subdirectory
+ to skip.
+
+2007-08-17 Anders Carlsson <andersca@apple.com>
+
+ Build fix.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
+ (NPP_SetWindow):
+
+2007-08-17 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ <rdar://problem/5379040>
+ REGRESSION (Tiger-Leopard): ADOBE: Safari calls NPP_SetWindow with bad values sometimes
+
+ Add a way for the plug-in to dump the width and height when it gets its NPP_SetWindow call.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
+ (pluginAllocate):
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h:
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
+ (NPP_New):
+ (NPP_SetWindow):
+
+2007-08-16 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Maciej.
+
+ Fix <rdar://problem/5360135> REGRESSION (Leopard only): editing/selection/5354455-1.html is causing subsequent tests to fail
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (createWebView):
+ Create a DumpRenderTreeWindow instead of a NSWindow, now that a DumpRenderTreeWindow no longer poses as a NSWindow.
+ (dumpRenderTree):
+ Don't pose as a NSWindow, since when the spelling panel gets created, it creates an NSWindow which ends up creating a DumpRenderTreeWindow.
+
+2007-08-16 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam.
+
+ - Added tests for regressions in other components. In this case we also need to add a skipped list for Tiger since this functionality didn't exist in 10.4.
+
+ * Scripts/run-webkit-tests:
+
+2007-08-15 Timothy Hatcher <timothy@apple.com>
+
+ Look for the new Xcode 3 preference key (PBXApplicationwideBuildSettings) for the global build locations.
+ The value of PBXApplicationwideBuildSettings is a dictionary, so we have to pull the SYMROOT out of it.
+
+ Also pass xcodebuild OBJROOT with the same value as SYMROOT if we fallback to the default WebKitBuild,
+ this prevents making "build" directories in each project folder.
+
+ * Scripts/webkitdirs.pm:
+
+2007-08-14 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Kevin Mccullough.
+
+ Removed special case that didn't belong. (It would allow a global
+ initializer to sneak into production builds, which would cause a
+ system-wide performance regression on Mac OS X.)
+
+ * Scripts/check-for-global-initializers:
+
+2007-08-14 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by Tim.
+
+ <rdar://problem/5408255> REGRESSION: In Mail, clicking the containing element's UI closebox doesn't delete element
+
+ * DumpRenderTree/EditingDelegate.m:
+ (-[EditingDelegate webView:shouldShowDeleteInterfaceForElement:]): Added, return YES
+ only for elements with the class needsDeletionUI.
+
+2007-08-14 David Kilzer <ddkilzer@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=14965
+ svn-create-patch uses deprecated tail switch
+
+ * Scripts/svn-create-patch: Use 'tail -n +3' instead of 'tail +3'.
+
+2007-08-13 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Use the cygwin specific Apache config file under cygwin.
+
+ * Scripts/run-webkit-httpd:
+
+2007-08-12 Adam Roben <aroben@apple.com>
+
+ Generate results for new tests in a more logical location
+
+ New platform-specific tests always have their results generated right
+ next to the test. New cross-platform tests will have their results
+ generated a) in the cross-platform directory, if they are text-only,
+ or b) in the least-specific platform directory, if they are render
+ tree dumps.
+
+ Reviewed by Lars.
+
+ * Scripts/run-webkit-tests:
+
+2007-08-12 Adam Roben <aroben@apple.com>
+
+ Print the actual directory where new results are generated.
+
+ Before, we were printing an unpredictable, context-specific substring
+ of the directory.
+
+ Reviewed by Lars.
+
+ * Scripts/run-webkit-tests:
+
+2007-08-12 Adam Roben <aroben@apple.com>
+
+ Factor some common code into a stripExtension() subroutine.
+
+ Reviewed by Lars.
+
+ * Scripts/run-webkit-tests: Also removed some debugging output.
+
+2007-08-11 Matt Lilek <pewtermoose@gmail.com>
+
+ Reviewed over and over and over by Adam Roben.
+
+ Bug 14740: Hierarchical layout tests and platform organization
+ http://bugs.webkit.org/show_bug.cgi?id=14740
+
+ Add support for platform-specific layout tests and results.
+
+ * Scripts/run-webkit-tests:
+
+2007-08-11 David Kilzer <ddkilzer@webkit.org>
+
+ Reviewed by Adam.
+
+ Refactored svn-create-path to use a hash-of-hashes data structure to keep
+ track of changed files. In the top level hash, keys are paths to files and
+ values are 'fileData' hashes with the following keys and values:
+
+ - isBinary: boolean value (set to true for non-text files like images, etc.)
+ - isTestFile: boolean value (set to true if file exists within a known test
+ directory)
+ - modificationType: string equal to one of 'addition', 'additionWithHistory',
+ 'modification' or 'deletion'
+ - path: string equal to the path to the file (this may seem redundant, but it
+ is required to use the second-level 'fileData' hash independent of the
+ top-level hash)
+ - sourceFile: [optional] string equal to the path of the original file that was
+ copied or moved
+ - sourceRevision: [optional] string equal to the revision of the original file
+ that was copied or moved
+
+ * Scripts/svn-create-patch: Moved call to GetOptions() to its own statement
+ that saves the return value in $result, then checks it before printing help.
+ Combined sourceFiles, %testFiles, and %binaryFiles into single %diffFiles hash
+ and eliminated two for() loops.
+ (binarycmp): Added. Used with sort() to order non-binary files before binary
+ files.
+ (findBaseUrl): Added. Extracted from findSourceFileAndRevision().
+ (findMimeType): Added optional second argument that takes a revision number.
+ (generateDiff): Updated to take one fileData argument instead of three ($file,
+ $modificationType, $isBinary).
+ (generateFileList): Updated to take one hash ref argument (%diffFiles)
+ instead of three (%sourceFiles, %testFiles, %binaryFiles). Populates
+ %diffFiles using paths for keys and fileData hashes for values.
+ (manufacturePatchForAdditionWithHistory): Updated to take one fileData
+ argument.
+ (pathcmp): Updated to take two fileData arguments instead of two strings.
+ (testfilecmp): Added. Used with sort() to order non-test files before test
+ files.
+
+2007-08-11 Darin Adler <darin@apple.com>
+
+ * Scripts/run-webkit-tests: Give a different message when only the pixel test failed.
+
+2007-08-06 Nigel Tao <nigeltao@gnome.org>
+
+ Reviewed by David Kilzer.
+
+ Fix bug 14745: WebKitTools/Scripts/run-launcher doesn't speak --gdk
+ http://bugs.webkit.org/show_bug.cgi?id=14745
+
+ * Scripts/run-launcher:
+ Scrub the "--gdk" out of the command line args, if given, so that
+ GdkLauncher doesn't try to interpret it as a URL.
+
+2007-08-03 Adam Roben <aroben@apple.com>
+
+ Catch SIGPIPE on Windows so that run-webkit-tests doesn't quit when DRT crashes
+
+ Reviewed by Sam.
+
+ * Scripts/run-webkit-tests: Also close ERROR when we finish running the tests.
+
+2007-08-03 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Recursively dump all frames as text using new
+ layoutTestController.dumpChildFramesAsText() function.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (dumpFramesAsText):
+ (dump):
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (-[LayoutTestController dumpChildFramesAsText]):
+ (runTest):
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.cpp:
+ (dumpFramesAsText):
+ (dump):
+ (runTest):
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.h:
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/LayoutTestController.cpp:
+ (dumpChildFramesAsTextCallback):
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+
+2007-08-02 Adam Roben <aroben@apple.com>
+
+ Fix fast/dom/Window/alert-undefined.html
+
+ Reviewed by Sam.
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WaitUntilDoneDelegate.cpp:
+ (WaitUntilDoneDelegate::runJavaScriptAlertPanelWithMessage): Don't let
+ Windows translate a null BSTR into "(null)"
+
+2007-08-02 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Tim.
+
+ - It would help if I actually called the right function.
+
+ * Drosera/DebuggerDocument.cpp:
+ (DebuggerDocument::showConsole):
+
+2007-08-02 Adam Roben <aroben@apple.com>
+
+ Don't delete the stderr file right after creating it
+
+ * Scripts/run-webkit-tests:
+
+2007-08-01 Adam Roben <aroben@apple.com>
+
+ When DRT crashes, record stderr and restart DRT
+
+ This prevents a DRT crash from causing the next few hundred tests to
+ "fail" because DRT is no longer running.
+
+ I also changed the terminology that run-webkit-tests uses in its
+ output a bit, so that crashing tests are referred to as "crashes"
+ instead of "failures".
+
+ Reviewed by Mark.
+
+ * Scripts/run-webkit-tests: Detect a crash and record it as a tool
+ failure.
+ (sub openDumpTool): Use open3 so that we can access stderr.
+ (sub dumpToolCrashed): Added.
+ (sub printFailureMessageForTest): Added.
+ (sub htmlForExpectedAndActualResults): Added.
+ (sub deleteExpectedAndActualResults): Added.
+ (sub recordActualResultsAndDiff): Added.
+
+2007-07-30 Darin Adler <darin@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ * DumpRenderTree/DumpRenderTree.m: (dump): Fix dumping for documents that include null
+ characters. This turned out not to be needed for the test case that motivated me to
+ do it, but it's nice to have this for the future.
+
+2007-07-30 Simon Hausmann <hausmann@kde.org>
+
+ Reviewed by Lars.
+
+ Link QtLauncher into $$OUTPUT_DIR/bin
+
+ * Scripts/run-launcher:
+
+2007-07-27 David Kilzer <ddkilzer@apple.com>
+
+ Reviewed by Geoff and Darin.
+
+ Use a subroutine for validating the --skipped switch.
+
+ * Scripts/run-webkit-tests:
+
+2007-07-27 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam.
+
+ * Scripts/run-webkit-tests: Remove exception for leaks bug that has been fixed on Leopard.
+
+2007-07-27 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Mark.
+
+ Correct the path of GdkLauncher and make checkFrameworks work on OSX
+ when building the Qt or Gtk+ port.
+
+ * GdkLauncher/GdkLauncher.pro: Don't create an app bundle on OSX
+ * Scripts/run-launcher:
+ * Scripts/webkitdirs.pm: Don't add WebKit if we build the Qt or Gtk+ port.
+
+2007-07-27 Simon Hausmann <hausmann@kde.org>
+
+ Done with and reviewed by Lars and Zack.
+
+ Fix build-webkit for the Qt build on Windows with msvc/nmake by trying to detect the Qt mkspec and using "nmake" instead of "make" as build command.
+
+ * Scripts/webkitdirs.pm:
+
+2007-07-27 Simon Hausmann <hausmann@kde.org>
+
+ Done with and reviewed by Lars and Zack.
+
+ For detecting the SVG support for the Qt build don't do the nm hack. Just always claim SVG support is enabled because that's what it is. The nm hack doesn't work on Windows anyway.
+
+ * Scripts/webkitdirs.pm:
+
+2007-07-26 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Darin, Geoff, Sam.
+
+ - <rdar://problem/5150461> Resizing the window larger than the screen causes no resize.
+
+ - Added delegate methods to intercept and fake the frame location so methods like resizeTo and moveTo can change the window location without actually making the window appear on-screen.
+
+ * DumpRenderTree/UIDelegate.h:
+ * DumpRenderTree/UIDelegate.m:
+ (-[UIDelegate webView:setFrame:]):
+ (-[UIDelegate webViewFrame:]):
+
+2007-07-26 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam.
+
+ - Lars wanted this check for Qt but it breaks platform specific layout tests.
+
+ * Scripts/run-webkit-tests:
+
+2007-07-25 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Tim, Darin, Oliver.
+
+ - <rdar://problem/5329440> REGRESSION: Clicking links with the feed:// protocol in Safari 3 does nothing
+ - Change DRT to be able to intercept the requst to load so it can check if a scheme was allowed or not.
+
+ * ChangeLog:
+ * DumpRenderTree/DumpRenderTree.m:
+ (createWebView):
+ (dumpRenderTree):
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (+[LayoutTestController webScriptNameForSelector:]):
+ (-[LayoutTestController setCustomPolicyDelegate:]):
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/FrameLoadDelegate.h:
+ * DumpRenderTree/PolicyDelegate.h: Added.
+ * DumpRenderTree/PolicyDelegate.m: Added.
+ (-[PolicyDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]):
+ * DumpRenderTree/ResourceLoadDelegate.h:
+
+2007-07-25 Adam Treat <treat@kde.org>
+
+ Reviewed by Niko.
+
+ Fix build for some reported systems.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/jsobjects.cpp:
+
+2007-07-23 Adam Treat <treat@kde.org>
+
+ Reviewed by Nikolas.
+
+ Fix qt DRT to suppress js popup alerts and log instead.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::WebPage::javaScriptAlert):
+
+2007-07-22 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Adam.
+
+ Make the GdkLauncher use the new WebKit/Gtk API. Change webkitdirs.pm to
+ honor --qmakearg for the Gdk/Gtk build as well.
+
+ * GdkLauncher/main.cpp: Switch to the new API
+ * Scripts/webkitdirs.pm: Allow to specify --qmakearg, e.g. to control the WEBKIT_{INC,LIB}_DIR
+
+2007-07-22 Darin Adler <darin@apple.com>
+
+ * DumpRenderTree/TextInputController.m: (-[TextInputController interpretKeyEvents:withSender:]):
+ Fix a leak by releasing the array used here.
+
+2007-07-22 David Kilzer <ddkilzer@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=14713
+ Script to update iExploder cssproperties.in file based on CSSPropertyNames.in
+
+ Added script to update WebKitTools/iExploder/htdocs/cssproperties.in based on the contents
+ of WebCore/css/CSSPropertyNames.in. Also updated cssproperties.in.
+
+ * Scripts/update-iexploder-cssproperties: Added.
+ * iExploder/htdocs/cssproperties.in: Updated by running update-iexploder-cssproperties script.
+ Added new CSS3 property section and Moved box-sizing property to it.
+
+2007-07-22 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Darin Adler.
+
+ http://bugs.webkit.org/show_bug.cgi?id=14710
+
+ Add preliminary support for testing Input Method/WebKit behaviour and interaction
+ in DRT. This provides the NSTextInput API which is most of what should be necessary
+ to mimic the event sequences Input Methods trigger.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/TextInputController.h:
+ * DumpRenderTree/TextInputController.m:
+ (-[WebHTMLView interpretKeyEvents:]):
+ (+[TextInputController isSelectorExcludedFromWebScript:]):
+ (+[TextInputController webScriptNameForSelector:]):
+ (-[TextInputController initWithWebView:]):
+ (-[TextInputController dealloc]):
+ (-[TextInputController textInput]):
+ (-[TextInputController setInputMethodHandler:]):
+ (-[TextInputController interpretKeyEvents:withSender:]):
+
+2007-07-20 Adam Roben <aroben@apple.com>
+
+ * Scripts/commit-log-editor: Small fix to make an all-whitespace log
+ message not count as an existing log.
+
+2007-07-19 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Updated DumpRenderTree for <rdar://problem/5348384> Restore old return
+ value behavior of stringByEvaluatingJavaScriptFromString
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (testStringByEvaluatingJavaScriptFromString):
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+
+2007-07-19 Adam Roben <aroben@apple.com>
+
+ Make commit-log-editor work with git
+
+ Reviewed by Sam.
+
+ * Scripts/commit-log-editor: Use VCSUtils and accept a git-style
+ commit message template. Also removed the unused $breakPoint variable.
+
+2007-07-19 Adam Roben <aroben@apple.com>
+
+ Move generally-useful VCS code into a new VCSUtils.pm module
+
+ This is in preparation for making commit-log-editor git-friendly.
+
+ Reviewed by Sam.
+
+ * Scripts/VCSUtils.pm: Added. Code moved here from prepare-ChangeLog.
+ * Scripts/prepare-ChangeLog: Use VCSUtils.
+
+2007-07-19 Lars Knoll <lars@trolltech.com>
+
+ Fix a crash on exit when running DRT against a current
+ Qt 4.4 snapshot.
+
+ Reviewed by Zack
+
+ * DumpRenderTree/DumpRenderTree.qtproj/main.cpp:
+ (main):
+
+2007-07-18 Adam Roben <aroben@apple.com>
+
+ Don't try to use an SSL certificate on Windows until <rdar://problem/5345985> is fixed
+
+ Reviewed by Mark.
+
+ * Scripts/run-webkit-httpd:
+ * Scripts/run-webkit-tests:
+
+2007-07-18 Adam Roben <aroben@apple.com>
+
+ More git friendliness for prepare-ChangeLog
+
+ The overall change is to remove the use of git-status and replace it
+ with git-diff --name-status (which we were already using in the
+ --git-commit case).
+
+ This lets us respect directories specified on the command line when
+ using git, just as we do for Subversion. It also speeds things up a
+ bit, especially in the subdirectory case, as git-status is pretty slow.
+
+ I also fixed some issues where we wouldn't detect copied files and
+ would reverse the new filename and the original filename for renamed files.
+
+ Reviewed by Mark.
+
+ * Scripts/prepare-ChangeLog:
+ (sub diffFromToString): Added.
+ (sub diffCommand): Don't append the paths in the --git-commit case, as
+ we should be operating on the entire commit.
+ (sub statusCommand): Always use git-diff --name-status, and added an
+ extra -C option to git-diff to make it find a few more copied files.
+ (sub createPatchCommand): Collapsed the two git cases a bit, and added
+ the extra -C option as above.
+ (sub generateFileList): Remove the git-status codepath, and recognize
+ file copies in the --name-status output.
+ (sub isModifiedOrAddedStatus): Collapsed the status codes into one
+ dictionary.
+ (sub isConflictStatus): Updated the git dictionary.
+ (sub statusDescription): Updated the git dictionary.
+
+2007-07-18 Timothy Hatcher <timothy@apple.com>
+
+ * Scripts/build-drosera: Update where we look for the Xcode project.
+
+2007-07-18 Adam Treat <treat@kde.org>
+
+ Reviewed by bdash.
+
+ Use the old wording for Safari.
+
+ * Scripts/build-webkit:
+ * Scripts/webkitdirs.pm:
+
+2007-07-18 Adam Treat <treat@kde.org>
+
+ Reviewed by bdash.
+
+ Add convenience script for launching test apps for Qt and Gdk ports.
+ Change the build-webkit script accordingly.
+
+ * Scripts/build-webkit:
+ * Scripts/run-launcher: Added.
+ * Scripts/webkitdirs.pm:
+
+2007-07-18 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Adam.
+
+ Make the Page with the now required InspectorClient.
+
+ * GdkLauncher/main.cpp:
+ (main):
+
+2007-07-18 Timothy Hatcher <timothy@apple.com>
+
+ Remove the redundant copies of Makefile.shared and the new Makefile.Drosera.
+ Now included the main Makefile.shared and change the SCRIPTS_PATH variable as needed.
+
+ * Drosera/Makefile: Added.
+ * Drosera/mac/Makefile:
+ * DumpRenderTree/Makefile:
+ * Makefile:
+ * Makefile.Drosera: Removed.
+ * Makefile.shared: Removed.
+
+2007-07-18 Timothy Hatcher <timothy@apple.com>
+
+ The console log was 20px down from the top for no reason, move it up.
+
+ * Drosera/console.css:
+
+2007-07-18 Timothy Hatcher <timothy@apple.com>
+
+ Use contentDocument to get the source view's iframe document.
+ Also adds a null/undefined check for localVariableNames.
+
+ * Drosera/debugger.js:
+
+2007-07-18 Lars Knoll <lars@trolltech.com>
+
+ We really don't want to compare non text only tests to the
+ Mac results if we don't have a result for Qt, as this would
+ give a failure and not a notification that the test is new.
+
+ Reviewed by Zack
+
+ * Scripts/run-webkit-tests:
+
+2007-07-18 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Zack & Simon
+
+ Adjust to changed API in QWebFrame
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+
+2007-07-18 Mark Rowe <mrowe@apple.com>
+
+ Update path to the Drosera Xcode project now that it has moved into a subdirectory.
+
+ * BuildSlaveSupport/build-launcher-app:
+
+2007-07-17 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Antti Koivisto.
+
+ Added watchdog timer to waitUntilDone to prevent a run-away test from
+ hanging the test harness.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (dump):
+ (-[LayoutTestController waitUntilDone]):
+ (-[LayoutTestController waitUntilDoneWatchdogFired]):
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+
+2007-07-17 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam.
+
+ - Implemented cross-platform code for functions calling into the JavaScript.
+
+ * Drosera/DebuggerDocument.cpp:
+ (DebuggerDocument::callAsFunction):
+ (DebuggerDocument::pauseJS):
+ (DebuggerDocument::resumeJS):
+ (DebuggerDocument::stepIntoJS):
+ (DebuggerDocument::stepOverJS):
+ (DebuggerDocument::stepOutJS):
+ (DebuggerDocument::showConsoleJS):
+ (DebuggerDocument::closeCurrentFileJS):
+ (DebuggerDocument::updateFileSource):
+ (DebuggerDocument::didParseScript):
+ (DebuggerDocument::willExecuteStatement):
+ (DebuggerDocument::didEnterCallFrame):
+ (DebuggerDocument::willLeaveCallFrame):
+ (DebuggerDocument::exceptionWasRaised):
+ * Drosera/DebuggerDocument.h:
+ * Drosera/mac/DebuggerDocumentMac.mm:
+ (-[DebuggerDocumentMac pause:]):
+ (-[DebuggerDocumentMac resume:]):
+ (-[DebuggerDocumentMac stepInto:]):
+ (-[DebuggerDocumentMac stepOver:]):
+ (-[DebuggerDocumentMac stepOut:]):
+ (-[DebuggerDocumentMac showConsole:]):
+ (-[DebuggerDocumentMac closeCurrentFile:]):
+ (-[DebuggerDocumentMac webView:didLoadMainResourceForDataSource:]):
+ (-[DebuggerDocumentMac webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:]):
+ (-[DebuggerDocumentMac webView:didEnterCallFrame:sourceId:line:forWebFrame:]):
+ (-[DebuggerDocumentMac webView:willExecuteStatement:sourceId:line:forWebFrame:]):
+ (-[DebuggerDocumentMac webView:willLeaveCallFrame:sourceId:line:forWebFrame:]):
+ (-[DebuggerDocumentMac webView:exceptionWasRaised:sourceId:line:forWebFrame:]):
+
+2007-07-16 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - Continued x-platform modifications.
+
+ * Drosera/win/DebuggerDocumentWin.cpp: Copied from Drosera/win/DebuggerObjectCallbacks.cpp.
+ * Drosera/win/DebuggerDocumentWin.h: Copied from Drosera/win/DebuggerObjectCallbacks.h.
+ * Drosera/win/DebuggerObjectCallbacks.cpp: Removed.
+ * Drosera/win/DebuggerObjectCallbacks.h: Removed.
+ * Drosera/win/Drosera.cpp:
+ * Drosera/win/Drosera.vcproj/Drosera.vcproj:
+ * Drosera/win/stdafx.cpp: Removed.
+ * Drosera/win/stdafx.h: Removed.
+
+2007-07-16 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Sam.
+
+ - Modified files to use cross-platform code.
+
+ * Drosera/DebuggerDocument.cpp: Added.
+ (DebuggerDocument::breakpointEditorHTML):
+ (DebuggerDocument::isPaused):
+ (DebuggerDocument::pause):
+ (DebuggerDocument::resume):
+ (DebuggerDocument::stepInto):
+ (DebuggerDocument::evaluateScript):
+ (DebuggerDocument::currentFunctionStack):
+ (DebuggerDocument::localScopeVariableNamesForCallFrame):
+ (DebuggerDocument::valueForScopeVariableNamed):
+ * Drosera/DebuggerDocument.h: Added.
+ (DebuggerDocument::DebuggerDocument):
+ * Drosera/config.h: Added.
+ * Drosera/mac/DebuggerApplication.mm:
+ (-[DebuggerApplication attach:]):
+ * Drosera/mac/DebuggerDocument.h: Removed.
+ * Drosera/mac/DebuggerDocument.mm: Removed.
+ * Drosera/mac/DebuggerDocumentMac.h: Copied from Drosera/mac/DebuggerDocument.h.
+ * Drosera/mac/DebuggerDocumentMac.mm: Copied from Drosera/mac/DebuggerDocument.mm.
+ (-[DebuggerDocumentMac initWithServerName:]):
+ (-[DebuggerDocumentMac dealloc]):
+ (-[DebuggerDocumentMac breakpointEditorHTML]):
+ (-[DebuggerDocumentMac isPaused]):
+ (-[DebuggerDocumentMac pause]):
+ (-[DebuggerDocumentMac resume]):
+ * Drosera/mac/Drosera.xcodeproj/project.pbxproj:
+ * Drosera/win/DebuggerApplication.cpp:
+ * Drosera/win/DebuggerObjectCallbacks.cpp:
+ (breakpointEditorHTMLCallback):
+ (currentFunctionStackCallback):
+ (evaluateScript_inCallFrame_Callback):
+ (isPausedCallback):
+ (localScopeVariableNamesForCallFrame_Callback):
+ (pauseCallback):
+ (resumeCallback):
+ (stepIntoCallback):
+ (valueForScopeVariableNamed_inCallFrame_Callback):
+ (staticFunctions):
+ * Drosera/win/Drosera.cpp:
+ * Drosera/win/DroseraPrefix.cpp: Added.
+ * Drosera/win/DroseraPrefix.h: Added.
+
+2007-07-16 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam, Sam and Tim.
+
+ - Moving files to prepare for cross-platform architecture.
+
+ * Drosera/DebuggerApplication.h: Removed.
+ * Drosera/DebuggerApplication.m: Removed.
+ * Drosera/DebuggerDocument.h: Removed.
+ * Drosera/DebuggerDocument.m: Removed.
+ * Drosera/Drosera.pch: Removed.
+ * Drosera/Drosera.xcodeproj: Removed.
+ * Drosera/Drosera.xcodeproj/project.pbxproj: Removed.
+ * Drosera/Info.plist: Removed.
+ * Drosera/LauncherInfo.plist: Removed.
+ * Drosera/Makefile: Removed.
+ * Drosera/launcher.m: Removed.
+ * Drosera/mac: Added.
+ * Drosera/mac/DebuggerApplication.h: Copied from Drosera/DebuggerApplication.h.
+ * Drosera/mac/DebuggerApplication.mm: Copied from Drosera/DebuggerApplication.m.
+ * Drosera/mac/DebuggerDocument.h: Copied from Drosera/DebuggerDocument.h.
+ * Drosera/mac/DebuggerDocument.mm: Copied from Drosera/DebuggerDocument.m.
+ * Drosera/mac/Drosera.pch: Copied from Drosera/Drosera.pch.
+ * Drosera/mac/Drosera.xcodeproj: Copied from Drosera/Drosera.xcodeproj.
+ * Drosera/mac/Drosera.xcodeproj/project.pbxproj:
+ * Drosera/mac/Info.plist: Copied from Drosera/Info.plist.
+ * Drosera/mac/LauncherInfo.plist: Copied from Drosera/LauncherInfo.plist.
+ * Drosera/mac/Makefile: Copied from Drosera/Makefile.
+ * Drosera/mac/launcher.m: Copied from Drosera/launcher.m.
+ * Drosera/mac/main.m: Copied from Drosera/main.m.
+ * Drosera/main.m: Removed.
+ * Makefile:
+ * Makefile.Drosera: Added.
+
+2007-07-15 Mark Rowe <mrowe@apple.com>
+
+ * Scripts/generate-coverage-data: Don't fail if WebKitBuild directory does not exist.
+
+2007-07-13 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Geoff Garen.
+
+ Add support for running SSL tests over HTTPS.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (runTest):
+ * DumpRenderTree/FrameLoadDelegate.m:
+ (-[FrameLoadDelegate webView:didFailProvisionalLoadWithError:forFrame:]):
+ * Scripts/run-webkit-httpd:
+ * Scripts/run-webkit-tests:
+
+2007-07-13 David Kilzer <ddkilzer@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Added support for -h|--help argument and verify that all command line arguments parse
+ correctly.
+
+ * Scripts/run-webkit-httpd:
+
+2007-07-12 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Ada.
+
+ Remove leak suppression for xmlDocPtrForString now that <rdar://problem/5329877> is fixed.
+
+ * Scripts/run-webkit-tests:
+
+2007-07-12 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Made the leaks tests pass on Leopard.
+
+ * Scripts/run-webkit-tests: Added some leaks to exclude on Leopard.
+ * Scripts/run-leaks: Updated parser for slight change in text output.
+
+2007-07-11 David Kilzer <ddkilzer@apple.com>
+
+ Reviewed by Maciej.
+
+ Update the iExploder list of CSS properties after box-sizing was renamed to
+ -webkit-box-sizing in r21026 to fix <rdar://problem/4667227>.
+
+ * iExploder/htdocs/cssproperties.in: Added -webkit-box-sizing. Both box-sizing and
+ -moz-box-sizing remain.
+
+2007-07-10 Darin Adler <darin@apple.com>
+
+ * Scripts/run-webkit-tests: Add an ignore item for a leak in Tiger's
+ Foundation's multipart/mixed-replace support -- I already verified that
+ the bug has been fixed.
+
+2007-07-10 Alice Liu <alice.liu@apple.com>
+
+ rubber stamped by Maciej.
+
+ fixed <rdar://5137972> editing/selection/editable-links.html fails on Windows
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.cpp:
+ (initializePreferences):
+ set editable link behavior to match Mac DRT.
+
+2007-07-10 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Ignore Page.o in debug builds because it now has a static PageCounter
+ object.
+
+ * Scripts/check-for-global-initializers:
+
+2007-07-09 Darin Adler <darin@apple.com>
+
+ * Scripts/run-webkit-tests: Moved leaks from Tiger that are marked as fixed in Leopard to a Tiger-only section.
+
+2007-07-09 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Adam Roben.
+
+ setting DOM Paste Allowed Pref
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.cpp:
+ (initializePreferences):
+
+2007-07-05 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam, Sam, and Ada.
+
+ - Inital checkin of Drosera for Win. This isn't pretty and doesn't connect to Safari but debug builds and runs.
+
+ * Drosera/Images/Drosera.ico: Added.
+ * Drosera/Images/small.ico: Added.
+ * Drosera/win: Added.
+ * Drosera/win/BaseDelegate.h: Added.
+ (BaseDelegate::QueryInterface):
+ (BaseDelegate::didFinishLoadForFrame):
+ (BaseDelegate::windowScriptObjectAvailable):
+ (BaseDelegate::didStartProvisionalLoadForFrame):
+ (BaseDelegate::didReceiveServerRedirectForProvisionalLoadForFrame):
+ (BaseDelegate::didFailProvisionalLoadWithError):
+ (BaseDelegate::didCommitLoadForFrame):
+ (BaseDelegate::didReceiveTitle):
+ (BaseDelegate::didReceiveIcon):
+ (BaseDelegate::didFailLoadWithError):
+ (BaseDelegate::didChangeLocationWithinPageForFrame):
+ (BaseDelegate::willPerformClientRedirectToURL):
+ (BaseDelegate::didCancelClientRedirectForFrame):
+ (BaseDelegate::willCloseFrame):
+ (BaseDelegate::createWebViewWithRequest):
+ (BaseDelegate::webViewShow):
+ (BaseDelegate::webViewClose):
+ (BaseDelegate::webViewFocus):
+ (BaseDelegate::webViewUnfocus):
+ (BaseDelegate::webViewFirstResponder):
+ (BaseDelegate::makeFirstResponder):
+ (BaseDelegate::setStatusText):
+ (BaseDelegate::webViewStatusText):
+ (BaseDelegate::webViewAreToolbarsVisible):
+ (BaseDelegate::setToolbarsVisible):
+ (BaseDelegate::webViewIsStatusBarVisible):
+ (BaseDelegate::setStatusBarVisible):
+ (BaseDelegate::webViewIsResizable):
+ (BaseDelegate::setResizable):
+ (BaseDelegate::setFrame):
+ (BaseDelegate::webViewFrame):
+ (BaseDelegate::setContentRect):
+ (BaseDelegate::webViewContentRect):
+ (BaseDelegate::runJavaScriptAlertPanelWithMessage):
+ (BaseDelegate::runJavaScriptConfirmPanelWithMessage):
+ (BaseDelegate::runJavaScriptTextInputPanelWithPrompt):
+ (BaseDelegate::runBeforeUnloadConfirmPanelWithMessage):
+ (BaseDelegate::runOpenPanelForFileButtonWithResultListener):
+ (BaseDelegate::mouseDidMoveOverElement):
+ (BaseDelegate::contextMenuItemsForElement):
+ (BaseDelegate::validateUserInterfaceItem):
+ (BaseDelegate::shouldPerformAction):
+ (BaseDelegate::dragDestinationActionMaskForDraggingInfo):
+ (BaseDelegate::willPerformDragDestinationAction):
+ (BaseDelegate::dragSourceActionMaskForPoint):
+ (BaseDelegate::willPerformDragSourceAction):
+ (BaseDelegate::contextMenuItemSelected):
+ (BaseDelegate::hasCustomMenuImplementation):
+ (BaseDelegate::trackCustomPopupMenu):
+ (BaseDelegate::measureCustomMenuItem):
+ (BaseDelegate::drawCustomMenuItem):
+ (BaseDelegate::addCustomMenuDrawingData):
+ (BaseDelegate::cleanUpCustomMenuDrawingData):
+ (BaseDelegate::canTakeFocus):
+ (BaseDelegate::takeFocus):
+ (BaseDelegate::registerUndoWithTarget):
+ (BaseDelegate::removeAllActionsWithTarget):
+ (BaseDelegate::setActionTitle):
+ (BaseDelegate::undo):
+ (BaseDelegate::redo):
+ (BaseDelegate::canUndo):
+ (BaseDelegate::canRedo):
+ * Drosera/win/DebuggerApplication.cpp: Added.
+ (DebuggerApplication::serverLoaded):
+ (DebuggerApplication::serverUnloaded):
+ (DebuggerApplication::attach):
+ (DebuggerApplication::numberOfRowsInTableView):
+ (DebuggerApplication::tableView):
+ * Drosera/win/DebuggerApplication.h: Added.
+ (DebuggerApplication::DebuggerApplication):
+ (DebuggerApplication::knownServers):
+ * Drosera/win/DebuggerObjectCallbacks.cpp: Added.
+ (breakpointEditorHTMLCallback):
+ (currentFunctionStackCallback):
+ (doubleClickMillisecondsCallback):
+ (evaluateScript_inCallFrame_Callback):
+ (isPausedCallback):
+ (localScopeVariableNamesForCallFrame_Callback):
+ (pauseCallback):
+ (resumeCallback):
+ (stepIntoCallback):
+ (valueForScopeVariableNamed_inCallFrame_Callback):
+ (staticFunctions):
+ * Drosera/win/DebuggerObjectCallbacks.h: Added.
+ * Drosera/win/Drosera.cpp: Added.
+ (_tWinMain):
+ (RegisterDroseraClass):
+ (DroseraWndProc):
+ (About):
+ (Attach):
+ (Drosera::Drosera):
+ (Drosera::initUI):
+ (Drosera::QueryInterface):
+ (Drosera::AddRef):
+ (Drosera::Release):
+ (Drosera::didFinishLoadForFrame):
+ (getDroseraJSClass):
+ (Drosera::windowScriptObjectAvailable):
+ (Drosera::webViewClose):
+ (Drosera::validateUserInterfaceItem):
+ (Drosera::runJavaScriptAlertPanelWithMessage):
+ (Drosera::onSize):
+ * Drosera/win/Drosera.h: Added.
+ (Drosera::webViewLoaded):
+ * Drosera/win/Drosera.vcproj: Added.
+ * Drosera/win/Drosera.vcproj/Drosera.rc: Added.
+ * Drosera/win/Drosera.vcproj/Drosera.vcproj: Added.
+ * Drosera/win/Drosera.vcproj/debug.vsprops: Added.
+ * Drosera/win/Drosera.vcproj/release.vsprops: Added.
+ * Drosera/win/HelperFunctions.h: Added.
+ (CFStringToBSTR):
+ * Drosera/win/Info.plist: Added.
+ * Drosera/win/resource.h: Added.
+ * Drosera/win/stdafx.cpp: Added.
+ * Drosera/win/stdafx.h: Added.
+
+2007-07-09 Adam Treat <adam@staikos.net>
+
+ Reviewed by George Staikos.
+
+ Convert QWebFrame from a QFrame to a pure QObject to eliminate all
+ traces of widgets.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+
+2007-07-09 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Oliver.
+
+ <rdar://problem/4954319>
+ Acrobat 7 / Safari crash: CrashTracer: 99 crashes in Safari at
+ com.apple.WebCore: WebCore::NetscapePlugInStreamLoader::isDone const + 0
+
+ If the src url is "data:application/x-webkit-test-netscape,returnerrorfromnewstream",
+ return an error from NPP_NewStream.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
+ (pluginAllocate):
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h:
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
+ (NPP_New):
+ (NPP_NewStream):
+
+2007-07-08 Mark Rowe <mrowe@apple.com>
+
+ Change name from WebKit/Qt to WebKit.
+
+ * CodeCoverage/regenerate-coverage-display:
+
+2007-07-08 Rob Buis <buis@kde.org>
+
+ Reviewed by Mitz.
+
+ http://bugs.webkit.org/show_bug.cgi?id=14209
+ DRT should be able to deal with text zoom
+
+ Allow increasing/decreasing text zoom using eventSender.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (runTest):
+ * DumpRenderTree/EventSendingController.m:
+ (+[EventSendingController initialize]):
+ (+[EventSendingController isSelectorExcludedFromWebScript:]):
+ (-[EventSendingController textZoomIn]):
+ (-[EventSendingController textZoomOut]):
+
+2007-07-07 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (convertWebResourceResponseToDictionary): Fix leak of two NSMutableString's introduced in r24076.
+
+2007-07-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by David Kilzer.
+
+ <rdar://problem/5313502>
+ Many webarchive tests fail due to different NSURLResponse serialization on Leopard
+
+ Don't dump the serialized form of NSURLResponse. Instead, create a dictionary with the
+ response's attributes. Also change the JavaScript MIME type to be "text/javascript".
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (convertMIMEType):
+ (convertWebResourceDataToString):
+ (convertWebResourceResponseToDictionary):
+ (serializeWebArchiveToXML):
+
+2007-07-06 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Oliver.
+
+ Initialize the NSMutableAttributedString directly instead of creating
+ a NSAttributedString first.
+
+ * DumpRenderTree/TextInputController.m:
+ (-[TextInputController attributedStringWithString:]):
+
+2007-07-06 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by David Kilzer.
+
+ Replace "Apple Computer" with "Apple" in the DTD declaration.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (serializeWebArchiveToXML):
+
+2007-07-06 Adam Treat <adam@staikos.net>
+
+ Reviewed by George Staikos.
+
+ Adjust for conversion of QWebFrame to a QFrame from a scroll area.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+
+2007-07-06 George Staikos <staikos@kde.org>
+
+ Reviewed by Anders.
+
+ Allow passing of additional arguments to qmake with --qmakearg=
+
+ * Scripts/webkitdirs.pm:
+
+2007-07-05 George Staikos <staikos@kde.org>
+
+ Reviewed by Maciej.
+
+ Add --qt and --qmake= to force Qt even when QTDIR isn't present and to
+ give a path to a specific qmake binary. Both are optional.
+
+ * Scripts/webkitdirs.pm:
+
+2007-07-05 Adam Roben <aroben@apple.com>
+
+ Warn about tests in the Skipped file that succeeded
+
+ * Scripts/run-webkit-tests:
+
+2007-07-05 Adam Roben <aroben@apple.com>
+
+ Removed unused install-win-extras script
+
+ Rubberstamped by Mark.
+
+ * Scripts/install-win-extras: Removed.
+
+2007-07-05 Adam Roben <aroben@apple.com>
+
+ Show the test's extension in the results page
+
+ * Scripts/run-webkit-tests:
+
+2007-07-05 Adam Roben <aroben@apple.com>
+
+ Add more options for controlling the interpretation of the Skipped file
+
+ Reviewed by Mark.
+
+ * Scripts/run-webkit-tests:
+
+2007-07-04 Adam Roben <aroben@apple.com>
+
+ Add --skipped-only option to run-webkit-tests
+
+ When this option is specified, only those tests listed in the Skipped
+ file are run.
+
+ Reviewed by Mark.
+
+ * Scripts/run-webkit-tests:
+
+2007-07-04 Adam Roben <aroben@apple.com>
+
+ Clean up/alphabetize the run-webkit-tests help message
+
+ * Scripts/run-webkit-tests:
+
+2007-07-04 Adam Roben <aroben@apple.com>
+
+ Enable a Leopard-specific Skipped list.
+
+ Reviewed by Mark.
+
+ * Scripts/run-webkit-tests: Check for Leopard.
+ * Scripts/webkitdirs.pm: Added isTiger/isLeopard.
+
+2007-07-03 Adam Roben <aroben@apple.com>
+
+ Fixed update-webkit-localizable-strings to work with new extract-localizable-strings
+
+ Got rid of extract-webkit-localizable-strings because it was trying to
+ do update-webkit-localizable-strings' job.
+
+ Rubberstamped by Darin Adler.
+
+ * Scripts/extract-webkit-localizable-strings: Removed.
+ * Scripts/update-webkit-localizable-strings: Renamed from
+ extract-localizable-strings.
+
+2007-07-03 Adam Roben <aroben@apple.com>
+
+ Modify scripts to keep Mac/Windows localized strings in sync
+
+ extract-webkit-localizable-strings now handles extracting strings from
+ both the Mac and Windows WebKit ports and updating their respective
+ Localizable.strings files. extract-localizable-strings is now really a
+ piece of plumbing rather than a top-level tool.
+
+ Reviewed by Darin and Anders.
+
+ * Scripts/extract-localizable-strings: Changed to handle multiple
+ directories.
+ * Scripts/extract-webkit-localizable-strings: Added.
+
+2007-07-03 Adele Peterson <adele@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Extended DumpRenderTree to test encoding and decoding host names.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]): Added cases for encodeHostName and decodeHostName.
+ (+[LayoutTestController webScriptNameForSelector:]): ditto.
+ (-[LayoutTestController decodeHostName:]): Added.
+ (-[LayoutTestController encodeHostName:]): Added.
+
+2007-07-03 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Eleventh round of fixes for implicit 64-32 bit conversion errors.
+ <rdar://problem/5292262>
+
+ Add functions to test long long and unsigned long long.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (+[LayoutTestController webScriptNameForSelector:]):
+ (-[LayoutTestController objCLongLongRoundTrip:]):
+ (-[LayoutTestController objCUnsignedLongLongRoundTrip:]):
+
+2007-07-01 Adam Roben <aroben@apple.com>
+
+ Fix some paths to make http tests work again on Windows
+
+ Rubberstamped by Sam.
+
+ * Scripts/run-webkit-tests:
+
+2007-06-28 Stephanie <slewis@apple.com>
+
+ Reviewed by Adam,
+
+ Allow tests to use pre-built roots instead of building the tests.
+
+ * Scripts/run-javascriptcore-tests: added --root option
+ * Scripts/run-webkit-tests: added --root option
+ * Scripts/webkitdirs.pm: added support for using a root
+
+2007-06-25 Adam Roben <aroben@apple.com>
+
+ Fix Bug 14405: LayoutTestResults/qt should be in LayoutTests/qt
+ http://bugs.webkit.org/show_bug.cgi?id=14405
+
+ Reviewed by Anders.
+
+ * Scripts/run-webkit-tests:
+
+2007-06-25 Adam Roben <aroben@apple.com>
+
+ Enable running the regression tests on Windows.
+
+ These changes were developed alongside the Windows WebKit port and
+ have been well tested.
+
+ Rubberstamped by Sam.
+
+ * Scripts/run-webkit-tests:
+
+2007-06-25 Adam Roben <aroben@apple.com>
+
+ Fix Bug 14403: prepare-ChangeLog --git-commit doesn't support --diff
+ http://bugs.webkit.org/show_bug.cgi?id=14403
+
+ Reviewed by Mark Rowe.
+
+ * Scripts/prepare-ChangeLog: Don't spew to stdout, use stderr instead.
+ (sub createPatchCommand): Generate a correct diff in the $gitCommit
+ case.
+
+2007-06-25 Adam Roben <aroben@apple.com>
+
+ Land pdevenv and supporting scripts/programs
+
+ pdevenv is a script that will open an instance of Visual Studio that
+ can compile multiple files in parallel, similar to make -jN. It uses
+ the following scripts/programs to accomplish this:
+
+ CLWrapper: Compiles to vcbin/cl.exe. Calls Scripts/parallelcl.
+
+ parallelcl: Actually performs the parallel compilation by forking
+ multiple instances of the Microsoft-supplied cl.exe.
+
+ MIDLWrapper: Compiles to vcbin/midl.exe. Calls through to the
+ Microsoft-supplied midl.exe. This avoids having to invoke perl for
+ every invocation of midl.exe, which would be quite slow.
+
+ Rubberstamped by Sam.
+
+ * CLWrapper/CLWrapper.cpp: Added.
+ (wmain):
+ * CLWrapper/CLWrapper.sln: Added.
+ * CLWrapper/CLWrapper.vcproj: Added.
+ * MIDLWrapper/MIDLWrapper.cpp: Added.
+ (wmain):
+ * MIDLWrapper/MIDLWrapper.sln: Added.
+ * MIDLWrapper/MIDLWrapper.vcproj: Added.
+ * Scripts/parallelcl: Added.
+ * Scripts/pdevenv: Added.
+ * vcbin/cl.exe: Added.
+ * vcbin/midl.exe: Added.
+
+2007-06-23 Adam Roben <aroben@apple.com>
+
+ Land num-cpus for the Windows build.
+
+ Reviewed by Mark Rowe.
+
+ * Scripts/num-cpus: Added.
+
+2007-06-22 Simon Hausmann <hausmann@kde.org>
+
+ Reviewed by Adam Roben.
+
+ Added support for populating ChangeLog entries from given git commits
+ using --git-commit=<commitish> and --git-reviewer=<name>.
+
+ * Scripts/prepare-ChangeLog:
+
+2007-06-22 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Anders.
+
+ <rdar://problem/5228168> Leopard regression test failures: fast/applescript
+
+ There were some changes in Leopard that made our test output inconsistent with Tiger.
+
+ NSAppleEventDescriptor no longer returns a stringValue for typeType descriptors
+ on Leopard, so output our own readable string for typeType descriptors.
+
+ NSArray's description also changed on Leopard to output more whitespace, so
+ make our own string representation for typeAEList descriptors. This requires
+ a special case typeUnicodeText too, so the output is a quoted string.
+
+ * DumpRenderTree/AppleScriptController.m:
+ (convertAEDescToObject):
+
+2007-06-21 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Geoff.
+
+ Don't dump didFirstLayout callbacks, they happen intermittently.
+
+ * DumpRenderTree/FrameLoadDelegate.m:
+
+2007-06-21 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Simon.
+
+ look for the Qt library in the installed location
+
+ * Scripts/webkitdirs.pm:
+
+2007-06-20 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Adele Peterson, Oliver Hunt, Anders Carlsson.
+
+ Added tests for stringByEvaluatingJavaScriptFromString.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (testStringByEvaluatingJavaScriptFromString):
+ (dumpRenderTree):
+
+2007-06-19 Andrew Wellington <proton@wiretapped.net>
+
+ Reviewed by Mark Rowe.
+
+ Support applications with spaces or special characters in their names
+
+ * Scripts/run-webkit-app:
+
+2007-06-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Assert that the frame has a dataSource.
+
+ * DumpRenderTree/FrameLoadDelegate.m:
+ (-[FrameLoadDelegate webView:didFinishLoadForFrame:]):
+
+2007-06-18 Adam Treat <adam@staikos.net>
+
+ Reviewed by George.
+
+ Reflect the library name change.
+
+ * Scripts/webkitdirs.pm:
+
+2007-06-18 Jake Helfert <jake@jakeonthenet.com>
+
+ Reviewed by Adam.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=14154
+ Spinneret doesn't build against the new Win32 port.
+
+ * Spinneret/Spinneret/Spinneret.cpp:
+ (_tWinMain):
+ -Changed IWebViewExt to IWebViewPrivate
+ -Changed Co[Un]initialize to Ole[Un]initialize because WebKit now calls
+ the WIN32 function RegisterDragDrop which requires the Ole* calls.
+ * Spinneret/Spinneret/Spinneret.h:
+ (SpinneretWebHost::didReceiveIcon): Updated method signature.
+ (SpinneretWebHost::willPerformClientRedirectToURL): Updated method signature.
+ (SpinneretWebHost::windowScriptObjectAvailable): Updated method signature.
+
+2007-06-14 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Brady.
+
+ Update set of files to download for cygwin to include
+ diffutils and regenerate the zip file. This should fix
+ an issue on vista where svn-create-patch doesn't work.
+
+ * CygwinDownloader/cygwin-downloader.py:
+ * CygwinDownloader/cygwin-downloader.zip:
+
+2007-06-14 Mark Rowe <mrowe@apple.com>
+
+ Update script to match new nightly.webkit.org infrastructure.
+
+ * BuildSlaveSupport/build-launcher-dmg: Upload to the live web server, not the caching proxy. Let the server know it's a Mac build.
+
+2007-06-12 Adam Roben <aroben@apple.com>
+
+ Land CygwinDownloader.
+
+ Rubberstamped by Hyatt.
+
+ * CygwinDownloader/cygwin-downloader.py: Added.
+ * CygwinDownloader/cygwin-downloader.zip: Added.
+ * CygwinDownloader/make-zip.sh: Added.
+ * CygwinDownloader/setup.py: Added.
+
+2007-06-06 Vladimir Olexa <vladimir.olexa@gmail.com>
+
+ Reviewed by Mark Rowe.
+
+ Fixes Bug 13996: http://bugs.webkit.org/show_bug.cgi?id=13996
+ [Drosera] Items in the file list don't get un-highlighted when
+ files are selected from the file drop-down
+
+ * Drosera/debugger.js: currentFile was getting modified before file in the file
+ browser got un-highlighted. Changed the order in which the functions execute.
+
+2007-06-06 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Maciej.
+
+ http://bugs.webkit.org/show_bug.cgi?id=13988
+ Bug 13988: Colon in file path crashes WebKit Nightly
+
+ The WebKit launcher makes use of two `dyld' variables to coerce Safari into running with
+ the bundled WebKit framework. Both of these variables are interpreted as containing a
+ colon-delimited list of paths. There is no escaping mechanism defined, so if we detect
+ a path with a colon in it we need to bail out to prevent `dyld' from throwing an error
+ when we execute Safari.
+
+ * WebKitLauncher/main.m:
+ (main):
+
+2007-06-05 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Anders.
+
+ * WebKitLauncher/Info.plist: Update CFBundleGetInfoString, and add CFBundleShortVersionString.
+
+2007-05-30 Alp Toker <alp.toker@collabora.co.uk>
+
+ Reviewed by Brady.
+
+ Enable logging in the Gdk port.
+ http://bugs.webkit.org/show_bug.cgi?id=13936
+
+ * GdkLauncher/main.cpp:
+ (main):
+
+2007-05-29 Holger Freyther <zecke@selfish.org>
+
+ Reviewed by Anders.
+
+ Create a GtkLayout and pass it to the FrameView/ScrollView. Embed the GtkLayout into a GtkScrolledWindow
+ to provide ScrollBars for the FrameView.
+
+ * GdkLauncher/main.cpp:
+ (registerRenderingAreaEvents):
+ (layout_realize_callback): Only after realization we can access the GtkLayout::bin_window
+ (frameResizeCallback): Inform the ScrollView about its new viewport size, and ask the FrameView to adjust
+ (main):
+
+2007-05-29 David Kilzer <ddkilzer@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=13901
+ run-pageloadtest does not obey testName on command-line
+
+ * Scripts/run-pageloadtest: Grab $testName from the command-line if it is present,
+ otherwise default to "svg". Added dummy check to make sure $testName.pltsuite
+ exists.
+
+2007-05-29 David Kilzer <ddkilzer@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=13900
+ svnStatus($) subroutine in svn-[un]apply does not work properly with directories
+
+ This patch also fixes an instance of the "broken pipe" warning that happened when
+ a directory contained modified files that were not part of an applied or unapplied
+ patch.
+
+ * Scripts/svn-apply:
+ (svnStatus($)): If we're trying to get status on a directory (instead of a file),
+ make sure we actually get the directory's status (if it has one), not the first
+ file's status reported within the directory. Fix "broken pipe" warnings by
+ reading all of the output from the SVN filehandle before closing it.
+ * Scripts/svn-unapply:
+ (svnStatus($)): Ditto.
+
+2007-05-28 David Kilzer <ddkilzer@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=10342
+ prepare-ChangeLog only shows removed files but not added files when files are moved
+ - fix prepare-ChangeLog part of http://bugs.webkit.org/show_bug.cgi?id=13408
+ prepare-ChangeLog and svn-create-patch don't show replaced files
+
+ Switched method used to find list of changed files from "diff" to "status". This
+ makes added and replaced files with history appear in the changed file list for svn.
+ Added check for "+" in output from the svn status command to detect file history, and
+ handle it in the generateFileList(\@\@\%) and in statusDescription($$) subroutines.
+
+ * Scripts/prepare-ChangeLog:
+ (diffCommand(@)): Switched argument from hash ref to array to match statusCommand(@).
+ (statusCommand(@)): Switched argument from array ref to array. Necessary to use
+ the output of "keys $paths" without creating a temporary array variable.
+ (findOriginalFileFromSvn($)): Added. Based on findSourceFileAndRevision($)
+ subroutine in svn-create-patch.
+ (generateFileList(\@\@\%)): Added. Extracted from main body of script. Runs status
+ command using command-line arguments instead of list of changed files from the diff
+ command. Changed svn regex to only accept file statuses that we know how to handle.
+ Identify original file when an added/replaced status with history is present.
+ (statusDescription($$)): Handled added/replaced statuses with history. Added
+ fall-through return statement.
+
+2007-05-28 Holger Freyther <zecke@selfish.org>
+
+ Reviewed by Mark Rowe.
+
+ Add scripts and data to generate a coverage data for WebKit.
+
+ * CodeCoverage/README: Added.
+ * CodeCoverage/amber.png: Added.
+ * CodeCoverage/cov.py: Added.
+ * CodeCoverage/emerald.png: Added.
+ * CodeCoverage/gcov.css: Added.
+ * CodeCoverage/glass.png: Added.
+ * CodeCoverage/regenerate-coverage-display: Added.
+ * CodeCoverage/ruby.png: Added.
+ * CodeCoverage/run-generate-coverage-data: Added.
+ * CodeCoverage/snow.png: Added.
+ * Scripts/build-webkit: Add --coverage by Niko
+ * Scripts/check-for-global-initializers: Skip the check on coverage builds
+ * Scripts/generate-coverage-data: Added.
+ * Scripts/run-javascriptcore-tests: Add --coverage by Niko
+
+2007-05-29 Mark Rowe <mrowe@apple.com>
+
+ Build fix after r21745.
+
+ * Scripts/check-for-global-initializers: Skip CachedPage.o as it now has a global initializer in debug builds.
+
+2007-05-25 Anders Carlsson <andersca@apple.com>
+
+ Fix build.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ * DumpRenderTree/FrameLoadDelegate.m:
+
+2007-05-25 Simon Hausmann <hausmann@kde.org>
+
+ Reviewed by Zack.
+
+ For the keyDown binding use QStringList instead of QList<QString>. The former is a default
+ registered metatype. Also print out critical messages in dumprendertree's qt message handler.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/jsobjects.cpp:
+ * DumpRenderTree/DumpRenderTree.qtproj/jsobjects.h:
+ * DumpRenderTree/DumpRenderTree.qtproj/main.cpp:
+
+2007-05-20 David Kilzer <ddkilzer@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=13565
+ Change svn-create-patch to put LayoutTests in the end
+
+ In addition to reordering test files under the LayoutTests directory so that they
+ appear after source code files, this patch fixes an issue with prepare-ChangeLog
+ if the first argument passed to it is a file name instead of a directory name.
+
+ * Scripts/prepare-ChangeLog:
+ (isGIT()): If first value in @dirs array is a file, use dirname() to get the directory.
+ (isSVN()): Ditto.
+ * Scripts/svn-create-patch:
+ (generateFileList($\%\%\%)): Differentiate test files in the LayoutTests directory from
+ source code files.
+
+2007-05-18 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver.
+
+ Force LC_ALL to C when parsing locale-specific strings in 'svn' output.
+
+ * Scripts/svn-create-patch:
+ * Scripts/webkitdirs.pm:
+
+2007-05-18 Holger Freyther <zecke@selfish.org>
+
+ Reviewed by Maciej.
+
+ * GdkLauncher/main.cpp: Call setGtkWidget
+ (main):
+
+2007-05-18 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Mark Rowe.
+
+ * GdkLauncher/main.cpp:
+ (main): Call Frame::init to catch up with Maciej's changes.
+ * Scripts/run-javascriptcore-tests: Remove --gdk from the command line
+ passed to the helper scripts.
+
+2007-05-16 Brady Eidson <beidson@apple.com>
+
+ Build fix for some dev configurations
+
+ * DumpRenderTree/DumpRenderTree.m:
+
+2007-05-16 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Justin.
+
+ - created a new mechanism to log FrameLoadDelegate callbacks in directories named "loading"
+
+ The reason for doing things in this slightly odd way is to make sure we don't miss the load delegates
+ that happen before the load commits.
+
+ Basically I moved WaitUntilDoneDelegate into a separate file (FrameLoadDelegate.m) and added
+ optional logging for every FrameLoadDelegate callback, including SPI callbacks.
+
+ * DumpRenderTree/DumpRenderTree.h:
+ * DumpRenderTree/DumpRenderTree.m:
+ (createWebView):
+ (dumpRenderTree):
+ (dump):
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (-[LayoutTestController clearBackForwardList]):
+ (-[LayoutTestController setUseDashboardCompatibilityMode:]):
+ (-[LayoutTestController dumpFrameLoadCallbacks]):
+ (-[LayoutTestController setWindowIsKey:]):
+ (-[LayoutTestController setMainFrameIsFirstResponder:]):
+ (-[LayoutTestController _doLoad:target:]):
+ (-[LayoutTestController _doBackOrForwardNavigation:]):
+ (-[LayoutTestController queueReload]):
+ (-[LayoutTestController queueScript:]):
+ (-[LayoutTestController queueLoad:target:]):
+ (-[LayoutTestController setAcceptsEditing:]):
+ (-[LayoutTestController setTabKeyCyclesThroughElements:]):
+ (shouldLogFrameLoadDelegates):
+ (runTest):
+ (displayWebView):
+ (+[DumpRenderTreeEvent mouseLocation]):
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/DumpRenderTreeDraggingInfo.m:
+ (-[DumpRenderTreeDraggingInfo draggingDestinationWindow]):
+ * DumpRenderTree/EventSendingController.m:
+ (-[EventSendingController mouseDown]):
+ (-[EventSendingController mouseUp]):
+ (-[EventSendingController mouseMoveToX:Y:]):
+ (-[EventSendingController contextClick]):
+ * DumpRenderTree/FrameLoadDelegate.h: Added.
+ * DumpRenderTree/FrameLoadDelegate.m: Added.
+ (-[WebFrame _drt_descriptionSuitableForTestResult]):
+ (-[FrameLoadDelegate processWork:]):
+ (-[FrameLoadDelegate webView:locationChangeDone:forDataSource:]):
+ (-[FrameLoadDelegate webView:didStartProvisionalLoadForFrame:]):
+ (-[FrameLoadDelegate webView:didCommitLoadForFrame:]):
+ (-[FrameLoadDelegate webView:didFailProvisionalLoadWithError:forFrame:]):
+ (-[FrameLoadDelegate webView:didFinishLoadForFrame:]):
+ (-[FrameLoadDelegate webView:didFailLoadWithError:forFrame:]):
+ (-[FrameLoadDelegate webView:windowScriptObjectAvailable:]):
+ (-[FrameLoadDelegate webView:didClearWindowObject:forFrame:]):
+ (-[FrameLoadDelegate webView:didReceiveTitle:forFrame:]):
+ (-[FrameLoadDelegate webView:didReceiveServerRedirectForProvisionalLoadForFrame:]):
+ (-[FrameLoadDelegate webView:didReceiveIcon:forFrame:]):
+ (-[FrameLoadDelegate webView:didChangeLocationWithinPageForFrame:]):
+ (-[FrameLoadDelegate webView:willPerformClientRedirectToURL:delay:fireDate:forFrame:]):
+ (-[FrameLoadDelegate webView:didCancelClientRedirectForFrame:]):
+ (-[FrameLoadDelegate webView:willCloseFrame:]):
+ (-[FrameLoadDelegate webView:didFirstLayoutInFrame:]):
+ (-[FrameLoadDelegate webView:didFinishDocumentLoadForFrame:]):
+ (-[FrameLoadDelegate webView:didHandleOnloadEventsForFrame:]):
+ * DumpRenderTree/ResourceLoadDelegate.m:
+ (-[NSURL _drt_descriptionSuitableForTestResult]):
+ * DumpRenderTree/UIDelegate.m:
+ (-[UIDelegate webViewFocus:]):
+
+2007-05-16 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Darin and Geoff.
+
+ - rdar://problem/4981886
+ - Now windows opened by the DOM can be closed by JS.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (-[LayoutTestController windowCount]):
+
+2007-05-15 Adam Roben <aroben@apple.com>
+
+ Reviewed by David Kilzer.
+
+ http://bugs.webkit.org/show_bug.cgi?id=13732
+ prepare-ChangeLog should work with git
+
+ * Scripts/prepare-ChangeLog: Added support for Git.
+
+2007-05-15 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Zack
+
+ Add the EventSender object to DRT. Currently it implements
+ mouseDown, mouseUp and mouseMoveTo.
+
+ Make run-webkit-tests --strict work somewhat better for form elements.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::initJSObjects):
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.h:
+ * DumpRenderTree/DumpRenderTree.qtproj/jsobjects.cpp:
+ (HackWebFrame::mousePressEvent):
+ (HackWebFrame::mouseReleaseEvent):
+ (EventSender::EventSender):
+ (EventSender::mouseDown):
+ (EventSender::mouseUp):
+ (EventSender::mouseMoveTo):
+ (EventSender::leapForward):
+ (EventSender::keyDown):
+ (EventSender::frameUnderMouse):
+ * DumpRenderTree/DumpRenderTree.qtproj/jsobjects.h:
+ * Scripts/run-webkit-tests:
+
+2007-05-12 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Hyatt.
+
+ Add new api to DRT to allow us to test a file being dragged
+ onto <input type="file">
+
+ * DumpRenderTree/DumpRenderTree.h:
+ * DumpRenderTree/DumpRenderTree.m:
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (-[LayoutTestController addFileToPasteboardOnDrag]):
+ (runTest):
+ * DumpRenderTree/UIDelegate.m:
+ (-[UIDelegate webView:dragImage:at:offset:event:pasteboard:source:slideBack:forView:]):
+
+2007-05-11 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Maciej.
+
+ Bug 13656: [gdk] Resize the drawing area of the GdkLauncher
+ http://bugs.webkit.org/show_bug.cgi?id=13656
+
+ * GdkLauncher/main.cpp: Handle resizing the drawing area
+ (frameResizeCallback):
+ (main):
+
+2007-05-11 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Updated test now that +[WebScriptObject scriptObjectForJSObject:frame:]
+ is gone.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (-[WaitUntilDoneDelegate webView:didClearWindowObject:forFrame:]):
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (+[LayoutTestController webScriptNameForSelector:]):
+ (-[LayoutTestController testWrapperRoundTripping:]):
+
+2007-05-08 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Oliver.
+
+ - don't clear events whenever an EventSendingController goes away, only do it at predictable times,
+ since destroying a subframe can make one go away
+
+ (Discovered while fixing:
+
+ <rdar://problem/5063277> blank screen after login to Citibank Online (accessing document before frame starts loading cancels load)
+ <rdar://problem/5159541> REGRESSION (r20972): Wall Street Journal pages replaced by advertisements (13465)
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (runTest): explicitly clear saved events after every page load
+ * DumpRenderTree/EventSendingController.h:
+ * DumpRenderTree/EventSendingController.m:
+ (-[EventSendingController dealloc]): don't clear saved events here...
+ (+[EventSendingController clearSavedEvents]): do it here
+ * Scripts/check-for-global-initializers:
+
+2007-05-10 Mark Rowe <mrowe@apple.com>
+
+ Build fix for DumpRenderTree. Enable Objective-C exceptions in Release configuration.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+
+2007-05-09 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Added support for testing ObjC/JS type bridging.
+
+ Added ASSERT that -JSObject returns nil when the underlying JSObject
+ is no longer GC protected.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (returnThisCallback):
+ (returnThisClass):
+ (-[WaitUntilDoneDelegate webView:didClearWindowObject:forFrame:]):
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (+[LayoutTestController webScriptNameForSelector:]):
+ (-[LayoutTestController accessStoredWebScriptObject]):
+ (-[LayoutTestController testWrapperRoundTripping]):
+ (-[LayoutTestController objCClassNameOf:]):
+ (-[LayoutTestController objCObjectOfClass:]):
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+
+2007-05-10 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Simon
+
+ Move setting of the DPI value a few lines up. Should fix
+ the last two remaining failures in the layout tests.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/main.cpp:
+ (main):
+
+2007-05-09 Holger Freyther <zecke@selfish.org>
+
+ Reviewed by Mark Rowe.
+
+ * GdkLauncher/main.cpp: Always include config.h.
+
+2007-05-08 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Added support for testing ObjC object identity.
+
+ Added ASSERT to verify that you can round-trip the object passed to you
+ in -didClearWindowObject:forFrame:.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (-[WaitUntilDoneDelegate webView:didClearWindowObject:forFrame:]):
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (+[LayoutTestController webScriptNameForSelector:]):
+ (-[LayoutTestController accessStoredWebScriptObject]):
+ (-[LayoutTestController objCIdentityIsEqual::]):
+
+2007-05-07 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Added tests for new APIs: -[WebFrame windowObject], -[WebFrame globalContext],
+ and - (void)webView:(WebView *)webView didClearWindowObject:(WebScriptObject *)windowObject
+ forFrame:(WebFrame *)frame, in the form of ASSERTs.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (runJavaScriptThread): Fixed quote mismatch that prepare-changelog likes
+ to complain about.
+
+ (-[WaitUntilDoneDelegate webView:windowScriptObjectAvailable:]):
+ (-[WaitUntilDoneDelegate webView:didClearWindowObject:forFrame:]):
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+
+2007-05-08 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Zack.
+
+ Dump JavaScript console messages as well. Also requires a slight
+ change in run-webkit-tests, so we still correctly differentiate
+ between text only and rendertree tests.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::WebPage::WebPage):
+ (WebCore::WebPage::javaScriptConsoleMessage):
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::dump):
+ * Scripts/run-webkit-tests:
+
+2007-05-08 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Zack
+
+ Specify what the serif, sans-serif and monospace aliases
+ should map to and explicitly select the Gui style of
+ DRT to be plastique.
+
+ Fixes most of the test failures still seen on the build bot.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts.conf:
+ * DumpRenderTree/DumpRenderTree.qtproj/main.cpp:
+ (main):
+
+2007-05-07 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Zack
+
+ Fix the default font to 9pt Sans Serif.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/main.cpp:
+ (main):
+
+2007-05-04 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Zack
+
+ Revert on line of the last commit. We still want to keep the RPATH
+ support in the pro file.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.pro:
+
+2007-05-04 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Zack
+
+ Remove the old bitmap fonts I tried using to get reliable results from
+ DumpRenderTree on X11. Instead we now use the URW Type1 fonts from
+ ghostscript. I've added a mirror to simply check them out at
+ svn://labs.trolltech.com/svn/webkit/testfonts.
+
+ Fixed DumpRenderTree to make sure these fonts are the only ones we use
+ on X11 and added a fonts.conf file to get a well defined fontconfig
+ configuration.
+
+ Made sure run-webkit-tests forwards the WEBKIT_TESTFONTS environment variable
+ I use to find the fonts to DumpRenderTree.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.pro:
+ * DumpRenderTree/DumpRenderTree.qtproj/fontoverload.cpp: Removed.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/COPYING: Removed.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/CourierBold.ttf: Removed.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/CourierBoldOblique.ttf: Removed.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/CourierMedium.ttf: Removed.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/CourierMediumOblique.ttf: Removed.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/HelveticaBold.ttf: Removed.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/HelveticaBoldOblique.ttf: Removed.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/HelveticaMedium.ttf: Removed.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/HelveticaMediumOblique.ttf: Removed.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/SymbolMedium.ttf: Removed.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/TimesBold.ttf: Removed.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/TimesBoldItalic.ttf: Removed.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/TimesMedium.ttf: Removed.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/TimesMediumItalic.ttf: Removed.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts.conf: Added.
+ * DumpRenderTree/DumpRenderTree.qtproj/main.cpp:
+ (main):
+ * Scripts/run-webkit-tests:
+
+2007-05-03 Holger Freyther <freyther@kde.org>
+
+ Reviewed by Zack, landed by Simon.
+ This is bugzilla bug 13499.
+
+ * GdkLauncher/GdkLauncher.pro: Build the GdkLauncher using qmake
+ * GdkLauncher/main.cpp: We don't have a config.h with the qmake build
+ * Scripts/build-webkit: Add --gdk for the Gdk port
+ * Scripts/webkitdirs.pm: Add helper methods for the Gdk port
+
+2007-05-03 Geoffrey Garen <ggaren@apple.com>
+
+ Build fix: Add AllInOneFile.o to the ignore list, since it includes files
+ in the ignore list.
+
+ * Scripts/check-for-global-initializers:
+
+2007-05-02 Holger Freyther <freyther@kde.org>
+
+ Reviewed by Mark Rowe.
+
+ * Scripts/build-webkit: Remove the CMake call.
+ * Scripts/webkitdirs.pm: Remove isQtWithQMake as QMake is now the only
+ buildsystem for the Qt port.
+
+2007-04-27 Kevin McCullough <kmccullough@apple.com>
+
+ - Removed debugging statements and took out the removal of the deletion
+ of the symlink. This is because multiple instances of run-webkit-tests
+ can be running at the same time.
+ * Scripts/run-webkit-tests:
+
+2007-04-27 Adam Roben <aroben@apple.com>
+
+ Reviewed by Maciej.
+
+ Cleaned up prepare-ChangeLog
+
+ * Scripts/prepare-ChangeLog: No code changes, but style now matches
+ the prevalent style of our perl scripts.
+
+2007-04-27 Nazar Kulyk <schamane@myeburg.net>
+
+ Reviewed by Mark Rowe.
+
+ Basic auto-correction of user-entered URLs.
+
+ * GdkLauncher/main.cpp:
+ (autocorrectURL):
+ (goToURLBarText):
+ (main):
+
+2007-04-28 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Anders.
+
+ Rename some methods and variables to match the style guidelines.
+
+ * GdkLauncher/main.cpp:
+ (stringIsEmpty):
+ (stringIsEqual):
+ (goToURLBarText):
+ (goButtonClickedCallback):
+ (urlBarEnterCallback):
+ (frameResizeCallback):
+ (frameDestroyCallback):
+ (menuMainBackCallback):
+ (menuMainForwardCallback):
+ (menuMainQuitCallback):
+ (main):
+
+2007-04-27 Holger Freyther <freyther@kde.org>
+
+ Reviewed by Maciej.
+
+ Remove unmaintained CMake build system.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/CMakeLists.txt: Removed.
+ * Scripts/build-webkit: Remove references to CMake.
+ * Scripts/webkitdirs.pm: Remove references to CMake.
+
+2007-04-26 Alp Toker <alp@atoker.com>
+
+ Reviewed by Mark Rowe.
+
+ * GdkLauncher/main.cpp:
+ (main): Avoid use of deprecated API.
+
+2007-04-26 Kevin McCullough <kmccullough@apple.com>
+
+ - Changed debugging statements for more information.
+
+ * Scripts/run-webkit-tests:
+
+2007-04-26 Kevin McCullough <kmccullough@apple.com>
+
+ - Adding debugging statements to see why these tests fail. These will be removed.
+
+ * Scripts/run-webkit-tests:
+
+2007-04-25 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Mitz.
+
+ Add a setUseDashboardCompatibilityMode method to LayoutTestController which is used to toggle
+ the dashboard compatibility mode.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (+[LayoutTestController webScriptNameForSelector:]):
+ (-[LayoutTestController setUseDashboardCompatibilityMode:]):
+ (runTest):
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+
+2007-04-24 Timothy Hatcher <timothy@apple.com>
+
+ Setting the valid architectures to 32-bit only, so these projects
+ will ignore requests to build them 64-bit. Once they can be built 64-bit,
+ the valid architectures can be updated.
+
+ * Drosera/Drosera.xcodeproj/project.pbxproj:
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+
+2007-04-23 Adam Roben <aroben@apple.com>
+
+ Reviewed by Mark Rowe and David Kilzer.
+
+ * Scripts/build-webkit: Print the path to the run-safari script when
+ finished building so that users can copy-and-paste the command to
+ execute it.
+
+2007-04-23 Darin Adler <darin@apple.com>
+
+ Reviewed by Hyatt.
+
+ - rename box-sizing to -webkit-box-sizing
+
+ * Drosera/console.css: Here.
+ * Drosera/debugger.css: And here.
+ * Drosera/viewer.css: And here.
+
+2007-04-21 Mitz Pettel <mitz@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=13350
+ Build Ahem into DumpRenderTree
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (activateAhemFont): Added. Activates the copy of Ahem included in the
+ DumpRenderTree binary.
+ (dumpRenderTree): Replaced the check that Ahem is available with a call
+ to activateAhemFont().
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ Added linker options to include Ahem in the data section of the
+ DumpRenderTree binary.
+
+2007-04-20 Adam Roben <aroben@apple.com>
+
+ Reviewed by Darin Adler.
+
+ http://bugs.webkit.org/show_bug.cgi?id=13421
+ Bug 13421: prepare-ChangeLog should use svn-create-patch when spewing diffs
+
+ * Scripts/prepare-ChangeLog: Use svn-create-patch instead of svn diff.
+
+2007-04-18 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Tim
+
+ <rdar://problem/5008925>
+ Expose the NSURLConnection delegate willCacheResponse API to WebResourceLoadDelegate
+
+ * DumpRenderTree/ResourceLoadDelegate.m:
+ (-[ResourceLoadDelegate webView:resource:willCacheResponse:fromDataSource:]):
+ Add the willCacheResponse delegate call
+
+2007-04-18 Adam Roben <aroben@apple.com>
+
+ Reviewed by David Kilzer.
+
+ * Scripts/webkitdirs.pm:
+ (sub setConfiguration): Added an optional argument to set the
+ configuration instead of parsing it from ARGV.
+
+2007-04-17 Adam Roben <aroben@apple.com>
+
+ * Scripts/find-included-framework-headers: Search Obj-C and Obj-C++
+ files as well.
+
+2007-04-17 Adam Roben <aroben@apple.com>
+
+ Added a simple shell script to find all the headers from a specified
+ framework or frameworks that are included by files beneath the working
+ directory.
+
+ * Scripts/find-included-framework-headers: Added.
+
+2007-04-16 Timothy Hatcher <timothy@apple.com>
+
+ * Drosera/debugger.css: hide the borders for iframes
+
+2007-04-13 Adam Roben <aroben@apple.com>
+
+ Rubberstamped by Anders.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c: #include
+ stdio.h so that snprintf is defined.
+
+2007-04-13 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Anders
+
+ Add the ability to dump the back/forward history of all windows open at the end of a test
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (dumpBackForwardListForWebView): Dump B/F list for the given WebView
+ (dump): Call dumpBackForwardListForWebView for each WebView open after the test
+
+2007-04-13 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Brady.
+
+ By default, close any windows that have been opened during a test. This can be overridden by
+ calling setCloseRemainingWindowsWhenComplete(false).
+
+ Change the windows set to an array so we can gurantee the enumeration order.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (+[LayoutTestController webScriptNameForSelector:]):
+ (-[LayoutTestController setCloseRemainingWindowsWhenComplete:]):
+ (runTest):
+ (-[DumpRenderTreeWindow initWithContentRect:styleMask:backing:defer:]):
+ (-[DumpRenderTreeWindow dealloc]):
+
+2007-04-13 Geoffrey Garen <ggaren@apple.com>
+
+ Build fix.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
+ (handleCallback): Explicitly cast the void* returned by malloc.
+
+2007-04-12 Deneb Meketa <dmeketa@adobe.com>
+
+ Reviewed by Darin Adler.
+
+ http://bugs.webkit.org/show_bug.cgi?id=13029
+ rdar://problem/4994849
+ Bug 13029: Permit NPAPI plug-ins to see HTTP response headers.
+ Changes in WebKitTools are only for the NPAPI test plugin.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c: main test logic.
+ (pluginInvoke): support null window argument for NPStream creation.
+ (pluginAllocate): initialization.
+ (pluginDeallocate): cleanup.
+ (handleCallback): add second JS callback arg: header dump.
+ (notifyStream): added; hook from NPP_NewStream to record headers.
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h: declarations.
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.c: call new header hook.
+ (NPP_NewStream): call new header hook.
+
+2007-04-09 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Fixed fast/forms/textarea-paste-newline.html.
+
+ This failure was pretty funny. run-webkit-tests kills and respawns
+ DumpRenderTree once every 1000 runs. Adding a few tests caused
+ textarea-paste-newline.html to run right at the beginning of DumpRenderTree's
+ lifetime, before any render tree dumps had occurred. However, WebCore
+ used a render tree dump as the hook that set a global flag to allow
+ pasting through the DOM API, so running before any render tree dumps had
+ occurred caused this test to fail.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (dumpRenderTree): Explicitly tell WebKit to allow pasting through the DOM
+ API, instead of hoping it will read the tea leaves.
+
+2007-04-07 Mark Rowe <mrowe@apple.com>
+
+ Not reviewed. Update to match some configuration changes that have been active on build.webkit.org.
+
+ * BuildSlaveSupport/build.webkit.org-config/webkit/status.py:
+
+2007-04-05 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Adam.
+
+ Add support for opening new windows in DumpRenderTree.
+
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (+[LayoutTestController webScriptNameForSelector:]):
+ (-[LayoutTestController setCallCloseOnWebViews:]):
+ (-[LayoutTestController setCanOpenWindows]):
+ Add two new methods callable from JavaScript. setCanOpenWindows controls whether a test
+ can open new windows, and setCallCloseOnWebViews controls whether -[WebView close] should be called on
+ web views that are about to be closed.
+
+ (runTest):
+ Make sure that only the main window is around when a test has finished running.
+
+ (-[DumpRenderTreeWindow initWithContentRect:styleMask:backing:defer:]):
+ (-[DumpRenderTreeWindow dealloc]):
+ Manage the set of windows.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h:
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
+ (NPP_Destroy):
+ Add a "logDestroy" property which controls whether plugins should print when they are destroyed or not.
+
+ * DumpRenderTree/UIDelegate.m:
+ (-[UIDelegate webView:createWebViewWithRequest:]):
+ Create new windows.
+
+ (-[UIDelegate webViewClose:]):
+ Close windows.
+
+2007-04-05 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Maciej.
+
+ Move WebView and NSWindow creation to a separate function in preparation of supporting opening new
+ windows in DRT.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (createWebView):
+ (dumpRenderTree):
+
+2007-04-03 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add the notion of a "disallowed URL", which the resource loader won't allow to be loaded.
+
+ * DumpRenderTree/DumpRenderTree.h:
+ * DumpRenderTree/DumpRenderTree.m:
+ (dumpRenderTree):
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (+[LayoutTestController webScriptNameForSelector:]):
+ (-[LayoutTestController addDisallowedURL:]):
+ (runTest):
+ * DumpRenderTree/ResourceLoadDelegate.m:
+ (-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]):
+
+2007-04-03 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Antti.
+
+ * BuildSlaveSupport/build-launcher-dmg: Use bzip2 compression in nightly build disk images rather than gzip.
+
+2007-04-02 Anders Carlsson <andersca@apple.com>
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h:
+ Don't use #import in a header included by C files.
+
+2007-03-31 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Mitz.
+
+ Fix http://bugs.webkit.org/show_bug.cgi?id=13239
+ Bug 13239: REGRESSION (r20343): Drosera hits exception trying to call "count" cross-process
+
+ Use -[WebScriptObject valueForKey:@"length"] to retrieve the length of a JavaScript array
+ rather than -[WebScriptObject count].
+
+ * Drosera/DebuggerDocument.m:
+ (-[DebuggerDocument webScriptAttributeKeysForScriptObject:]):
+
+2007-03-30 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Geoff.
+
+ Add an "onstreamload" attribute to the plugin which is called when a stream starts loading.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h:
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
+ (NPP_New):
+ Look for the onstreamload attribute.
+
+ (NPP_Destroy):
+ Free the onstreamload attribute.
+
+ (NPP_NewStream):
+ Call the onstreamload handler.
+
+2007-03-30 Geoffrey Garen <ggaren@apple.com>
+
+ Removing an assertion I just added because it's crashing the Leopard
+ buildbot. The related layout test will still report a failure, so we
+ don't really need this assertion.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
+ (pluginInvoke):
+
+2007-03-30 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Geoff.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.c:
+ (testAllocate):
+ (testEnumerate):
+ Add casts.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.h:
+ Don't use #import, use #include.
+
+2007-03-30 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Alexey.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
+ (pluginInvoke):
+ Free the identifier string.
+
+2007-03-30 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Geoff.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ Add TestObject.c and TestObject.h
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
+ (pluginGetProperty):
+ Implement the testObject property.
+
+ (pluginInvoke):
+ Implement testEnumerate which takes an object and an array and enumerates
+ the properties of the object and adds them to the array.
+
+ (pluginAllocate):
+ Allocate the test object.
+
+ (pluginDeallocate):
+ Free the test object.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.c: Added.
+ * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.h: Added.
+ Add a test object with two enumerable properties.
+
+2007-03-29 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Layout test for <rdar://problem/5091330> REGRESSION: Repro crash in
+ -[WebBaseNetscapePluginView(WebNPPCallbacks) destroyStream:reason:]
+ navigating away from page with DivX movie plug-in (13203)
+
+ Added hasStream property and destroyStream function, used by layout test.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
+ (pluginGetProperty):
+ (pluginInvoke):
+ (pluginAllocate):
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h:
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
+ (NPP_NewStream):
+
+2007-03-27 Anders Carlsson <acarlsson@apple.com>
+
+ Reviewed by Geoff.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
+ (pluginInvoke):
+ Add new function which takes a function and calls it using NPN_InvokeDefault.
+
+2007-03-27 Adele Peterson <adele@apple.com>
+
+ Adding comment.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (-[WaitUntilDoneDelegate webView:didFinishLoadForFrame:]):
+
+2007-03-27 Adele Peterson <adele@apple.com>
+
+ Fix svg tests by calling displayIfNeeded.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (-[WaitUntilDoneDelegate webView:didFinishLoadForFrame:]):
+
+2007-03-26 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Upload crash logs from DumpRenderTree as part of the test results to ease debugging
+ of hard-to-reproduce crashes.
+
+ * BuildSlaveSupport/build.webkit.org-config/webkit/steps.py:
+
+2007-03-23 Adam Treat <adam@staikos.net>
+
+ Reviewed and committed by George.
+
+ Patch by Adam Treat. Removes hardcoded path to .pro file.
+
+2007-03-22 Adam Roben <aroben@apple.com>
+
+ Reviewed by Geoff.
+
+ Removed eventSender.mouseClick because it was only useful for AppKit
+ controls, which we don't use anymore.
+
+ * DumpRenderTree/EventSendingController.m:
+ (+[EventSendingController isSelectorExcludedFromWebScript:]): Removed
+ mouseClick.
+
+2007-03-22 Adam Roben <aroben@apple.com>
+
+ Reviewed by Ada.
+
+ Make eventSender.mouseClick actually send a mouse up event.
+
+ * DumpRenderTree/EventSendingController.m:
+ (-[EventSendingController mouseClick]):
+
+2007-03-19 David Hyatt <hyatt@apple.com>
+
+ Update the minimum font size pref to match the actual default setting in Safari. It should have been 1
+ all this time and not 9.
+
+ Reviewed by aroben
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (dumpRenderTree):
+
+2007-03-18 Dan Waylonis <waylonis@mac.com>
+
+ Reviewed by Tim Hatcher.
+
+ DumpRenderTree changes for http://bugs.webkit.org/show_bug.cgi?id=13005
+ Bug 13005: WebScriptObject +throwException needs NULL check.
+
+ Add tests to ensure that a plugin can safely throw an exception in dealloc.
+
+ * DumpRenderTree/ObjCPlugin.h:
+ * DumpRenderTree/ObjCPlugin.m:
+ (+[ObjCPlugin webScriptNameForKey:]):
+ (+[ObjCPlugin isKeyExcludedFromWebScript:]):
+ (-[ObjCPlugin dealloc]):
+
+2007-03-13 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Maciej.
+
+ Have the nightly launcher prefer Safari found in /Applications or ~/Applications
+ if present, otherwise fall back on using LaunchServices to locate it elsewhere
+ on the system. The motivation for this is to make the behaviour of the nightly
+ builds more predictable on machines with multiple copies of Safari present.
+
+ * WebKitLauncher/main.m:
+ (locateSafariBundle):
+ (main):
+
+2007-03-12 Darin Adler <darin@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ - add a DumpRenderTree feature where you can get the Objective-C
+ class name of a JavaScript object
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]): Add the
+ objCClassNameOf: selector.
+ (+[LayoutTestController webScriptNameForSelector:]): Add the
+ objCClassNameOf: selector, with the name "objCClassName".
+ (-[LayoutTestController objCClassNameOf:]): Added.
+
+2007-03-11 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Beefed up --threaded mode in light of <rdar://problem/4681051> Installer
+ crashes in KJS::Collector::markOtherThreadConservatively(KJS::Collector::Thread*)
+ trying to install iLife 06 using Rosetta on an Intel Machine
+
+ --threaded mode now runs a bunch of different JavaScript threads, randomly
+ killing and respawning them. This was sufficient for reproducing the
+ bug on my MacBook Pro.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (javaScriptThreads):
+ (runJavaScriptThread):
+ (startJavaScriptThreads):
+ (stopJavaScriptThreads):
+ (dumpRenderTree):
+
+2007-03-11 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+
+ Reviewed by Brady Eidson.
+
+ Add forward/backward/quit menus for easier testing.
+
+ * GdkLauncher/main.cpp:
+ (menuMainBackCb):
+ (menuMainForwardCb):
+ (menuMainQuitCb):
+ (main):
+
+2007-03-09 Andrew Wellington <proton@wiretapped.net>
+
+ Reviewed by Darin Adler.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=13007
+ svn-create-patch doesn't handle UTF files with BOMs as text
+
+ Force diff to treat files that svn-create-patch thinks are text as text.
+
+ * Scripts/svn-create-patch: Added -a switch to diff command.
+
+2007-03-09 Mark Rowe <mrowe@apple.com>
+
+ Unreviewed. Use the new SVN URL on the buildbot.
+
+ * BuildSlaveSupport/build.webkit.org-config/webkit/steps.py:
+
+2007-03-08 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Antti.
+
+ Fix compiler warnings when building Drosera as 64-bit.
+
+ * Drosera/DebuggerDocument.m:
+ (-[DebuggerDocument breakpointEditorHTML]): Move away from deprecated NSString method.
+ (-[DebuggerDocument scriptConfirmSheetDidEnd:returnCode:contextInfo:]): Update type.
+ (-[DebuggerDocument webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:]): Update type to accommodate constant.
+
+2007-03-07 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Maciej.
+
+ Update check-for-global-initializers to ignore new debug initializers in bidi.o and kjs_events.o.
+
+ * Scripts/check-for-global-initializers:
+
+2007-03-07 Anders Carlsson <acarlsson@apple.com>
+
+ Reviewed by Adam.
+
+ Add some assertions.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (-[WaitUntilDoneDelegate webView:didStartProvisionalLoadForFrame:]):
+ (-[WaitUntilDoneDelegate webView:didCommitLoadForFrame:]):
+ (-[WaitUntilDoneDelegate webView:didFailProvisionalLoadWithError:forFrame:]):
+ (-[WaitUntilDoneDelegate webView:didFailLoadWithError:forFrame:]):
+
+2007-03-07 David Kilzer <ddkilzer@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ - WebKitTools part of fix for http://bugs.webkit.org/show_bug.cgi?id=12463
+ WebArchiver - attempt to insert nil exception when archive empty iframe
+
+ The dumpDOMAsWebArchive() test method uses the DOMDocument as a basis for creating
+ a webarchive while the dumpSourceAsWebArchive() test method uses the original
+ dataSource (page source) to create a webarchive. Most tests currently use
+ dumpDOMAsWebArchive() since this is what Safari does when saving a web page as a
+ webarchive.
+
+ * DumpRenderTree/DumpRenderTree.m: Renamed dumpAsWebArchive to dumpDOMAsWebArchive.
+ Added dumpSourceAsWebArchive.
+ (dump):
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (-[LayoutTestController dumpDOMAsWebArchive]):
+ (-[LayoutTestController dumpSourceAsWebArchive]):
+ (runTest):
+
+2007-03-05 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Mark and Dave H.
+
+ - rdar://problem/4922454
+ - This fixes a security issue by making remote referrers not able to access local
+ resources, unless they register their schemes to be treated as local. The result is
+ that those schemes can access local resources and cannot be accessed by remote
+ referrers.
+ Because this behavior is new a link-on-or-after check is made to determine if the
+ app should use the older, less safe, behavior.
+
+ * DumpRenderTree/DumpRenderTree.m: Add ability to set user style sheet to DRT.
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (+[LayoutTestController webScriptNameForSelector:]):
+ (-[LayoutTestController setUserStyleSheetLocation:]):
+ (-[LayoutTestController setUserStyleSheetEnabled:]):
+
+2007-03-05 Anders Carlsson <acarlsson@apple.com>
+
+ Reviewed by Adam, Darin.
+
+ <rdar://problem/5025212>
+ In Mail, a crash occurs at WebCore::Frame::tree() when clicking on embedded flash object
+
+ Add a "getURLNotify" method to the plugin object. This lets you pass a URL, a target and a callback function
+ to be run when the URL has finished (or failed) loading.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
+ (pluginInvoke):
+ (handleCallback):
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h:
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
+ (NPP_URLNotify):
+
+2007-03-04 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Load a url given on a command line in a way that also
+ works for local (file://) urls.
+
+ * GdkLauncher/main.cpp:
+ (main):
+
+2007-03-02 Geoffrey Garen <ggaren@apple.com>
+
+ Tweaked parse-malloc-history to work with new malloc_history output format.
+
+ * Scripts/parse-malloc-history:
+
+2007-02-28 Vladimir Olexa <vladimir.olexa@gmail.com>
+
+ Reviewed by Tim H.
+
+ Fixes: http://bugs.webkit.org/show_bug.cgi?id=12887
+ Bug#12887: [Drosera] Add ability to close loaded files
+
+ * Drosera/DebuggerDocument.h:
+ * Drosera/DebuggerDocument.m:
+ (-[DebuggerDocument closeCurrentFile:]): Adds delegation to call a JS script to close files
+ * Drosera/Drosera.xcodeproj/project.pbxproj:
+ * Drosera/English.lproj/MainMenu.nib/classes.nib:
+ * Drosera/English.lproj/MainMenu.nib/info.nib:
+ * Drosera/English.lproj/MainMenu.nib/keyedobjects.nib: Adds Close Current File menu item
+ * Drosera/debugger.html: Changed "no files loaded" to "<No files loaded>" to match Xcode style
+ * Drosera/debugger.js: Adds implementation of closeFile() to unload currently loaded file
+
+2007-02-28 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Maciej.
+
+ Add new flags to build-webkit to be able to switch on/off xpath, xslt, etc. easily.
+
+ * Scripts/build-webkit:
+
+2007-02-27 Geoffrey Garen <ggaren@apple.com>
+
+ Small tweak to run-webkit-tests.
+
+ * Scripts/run-webkit-tests: Allow people with lots of RAM to run more than
+ 1000 MallocStackLogging tests at a time.
+
+2007-02-26 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Lars.
+
+ - set ENABLE_XSLT even when compiling without SVG support, since that is no
+ longer hardcoded into config.h.
+
+ * Scripts/build-webkit:
+
+2007-02-26 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+
+ Reviewed by Adam Roben.
+
+ Rename *_SUPPORT defines to ENABLE_*.
+
+ * GdkLauncher/gdklauncher.bkl:
+
+2007-02-24 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin Adler.
+
+ * Scripts/run-webkit-tests: Stop ignoring BidiRun leaks, now that they're
+ fixed.
+
+2007-02-24 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+
+ Reviewed by Adam Roben.
+
+ Improve gdklauncher: add text field for entering url.
+
+ * GdkLauncher/gdklauncher.bkl:
+ * GdkLauncher/main.cpp:
+ (strEmpty):
+ (strEq):
+ (handleGdkEvent):
+ (goToUrlBarText):
+ (goButtonClickedCb):
+ (urlBarEnterCb):
+ (registerRenderingAreaEvents):
+ (frameResizeCb):
+ (frameDestroyCb):
+ (main):
+
+2007-02-22 Vladimir Olexa <vladimir.olexa@gmail.com>
+
+ Reviewed by Tim H.
+
+ Fixes: http://bugs.webkit.org/show_bug.cgi?id=12852
+ Bug#12852: Drosera should select function name, not "function" keyword when selecting from function list pop-up
+ * Drosera/debugger.js: Fixed some logic errors resulting in generating double IDs and names.
+
+2007-02-22 Adele Peterson <adele@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Added option in layoutTestController to setTabKeyCyclesThroughElements, so we
+ can test <rdar://problem/5014970> 9A374: Tabs don't work in the message body
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (+[LayoutTestController webScriptNameForSelector:]):
+ (-[LayoutTestController setTabKeyCyclesThroughElements:]):
+
+2007-02-22 Geoffrey Garen <ggaren@apple.com>
+
+ Used svn merge -r19786:19785 to roll out previous hack to work around
+ SVG painting issue in DRT.
+
+ Implemented new work-around, which makes --paint paint *after* dumping
+ the render tree instead of before, so that painting doesn't influence
+ the SVG render tree.
+
+ This should fix the ~400 new pixel failures introduced in r19786.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (dump):
+ * Scripts/run-webkit-tests:
+
+2007-02-22 Geoffrey Garen <ggaren@apple.com>
+
+ Resetting --leaks mode default to run 1000 tests at a time because setting it
+ to 750 didn't stop the stack logging related crashes, and running more tests
+ at a time is faster. The crashes seem to be a real bug in stack logging,
+ not an out of memory condition.
+
+ * Scripts/run-webkit-tests:
+
+2007-02-21 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Added hack to force painting when running an SVG test. This is a work-around
+ for http://bugs.webkit.org/show_bug.cgi?id=12849 SVG renderers update at
+ paint time instead of style resolution time.
+
+ We need this so that --leaks mode, which always paints, doesn't appear to
+ fail SVG tests. We also need this if we ever want to test style application
+ in SVG, since many SVGs don't apply style to their renderers until they paint.
+
+ * Scripts/run-webkit-tests:
+
+2007-02-21 Geoffrey Garen <ggaren@apple.com>
+
+ Reduced --leaks mode to running only 750 tests at a time, in the hopes
+ of fixing intermittent crasher that may be caused by out of memory
+ conditions.
+
+ * Scripts/run-webkit-tests:
+
+2007-02-21 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Made DRT paint when running run-webkit-tests in --leaks mode, to check
+ for painting leaks.
+
+ * DumpRenderTree/DumpRenderTree.m: Removed some "NO" initializations, since
+ that's the default for statics.
+ (dumpRenderTree): Added --paint command line option, which specifies that
+ DRT should paint at the end of every test.
+ (displayWebView): New function, called by dump() and -[LayoutTestController display].
+ * Scripts/run-webkit-tests: Use the --paint command line option when checking
+ for leaks.
+
+ * Scripts/run-webkit-tests: Added a new, painting leak to the ignore list.
+ Removed stale comment about THRD leaks -- we now ignore them reliably.
+
+2007-02-21 Geoffrey Garen <ggaren@apple.com>
+
+ Tools tweak. No review necessary.
+
+ * Scripts/parse-malloc-history: Enabled multiple merge-regexp command line
+ arguments. Changed command line argument variables from special implicit
+ no-op values to specific empty values that we test explicitly.
+
+2007-02-21 Vladimir Olexa <vladimir.olexa@gmail.com>
+
+ Reviewed by Tim H.
+
+ Bug 12834: Drosera should remember scroll position of open files like Xcode
+ http://bugs.webkit.org/show_bug.cgi?id=12834
+
+ * Drosera/debugger.js: Implemented scrolling memory
+
+2007-02-20 Geoffrey Garen <ggaren@apple.com>
+
+ Tools tweak. No review necessary.
+
+ Made parse-malloc-history executable. (Oops!)
+
+ Made parse-malloc-history parse 'leaks' output in addition to 'malloc_history"
+ output.
+
+ Added the ability to merge callstacks by regexp, not just depth, so you
+ can ask questions like, "How many of these allocations were due to that one
+ call to ...?"
+
+ * Scripts/parse-malloc-history:
+
+2007-02-20 Geoffrey Garen <ggaren@apple.com>
+
+ * Scripts/parse-malloc-history: Added copyright info.
+
+2007-02-20 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin Adler.
+
+ New script to parse the output from malloc_history, so we can determine
+ what's using memory in WebKit.
+
+ * Scripts/parse-malloc-history: Added.
+
+2007-02-20 Graham Dennis <graham.dennis@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for http://bugs.webkit.org/show_bug.cgi?id=12802
+ WebKit.framework is built with SVG_SUPPORT for No-SVG build
+
+ * Scripts/build-webkit: Pass the "FEATURE_DEFINES=" option when building WebKit as well.
+
+2007-02-19 Geoffrey Garen <ggaren@apple.com>
+
+ Build fix.
+
+ * Scripts/check-for-global-initializers: Ignore the global counter I added
+ for SubresourceLoaders.
+
+2007-02-19 Darin Adler <darin@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ * Scripts/check-for-global-initializers: Delete the linked executable if the check fails.
+ Without this, you only see the global initializer error once, which makes it very easy
+ to miss them.
+
+2007-02-16 Mark Rowe <mrowe@apple.com>
+
+ Not reviewed.
+
+ <rdar://problem/4982312> leaks bot should run in normal mode, rather than quiet mode
+
+ * BuildSlaveSupport/build.webkit.org-config/webkit/steps.py: Switch back to default verbosity for output of leaks tests.
+
+2007-02-15 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ * DumpRenderTree/DumpRenderTree.m: Don't ignore NSAttributedString WebCore::Node
+ leaks anymore, either, since r19486 fixed them, too.
+ (shouldIgnoreWebCoreNodeLeaks):
+
+2007-02-15 Darin Adler <darin@apple.com>
+
+ * Scripts/run-webkit-tests: Don't ignore NSAttributedString leaks any more. Those were
+ fixed by change 19486.
+
+2007-02-15 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Ignore another leak, seen recently on the buildbot.
+
+ * Scripts/run-webkit-tests:
+
+2007-02-14 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Ignore another leak, seen recently on the buildbot.
+
+ * Scripts/run-webkit-tests:
+
+2007-02-13 Darin Adler <darin@apple.com>
+
+ * Scripts/run-webkit-tests: Fix a bug where --reset-results output would all go in one
+ giant line.
+
+2007-02-11 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Mitz.
+
+ - add contextClick() operation to eventSender to be able to test this
+
+ * DumpRenderTree/EventSendingController.m:
+ (+[EventSendingController isSelectorExcludedFromWebScript:]):
+ (-[EventSendingController contextClick]):
+
+2007-02-11 Darin Adler <darin@apple.com>
+
+ * Scripts/check-for-global-initializers: Fix case where executable doesn't exist at all
+ so it doesn't give a perl exception (happens in clean builds, for example).
+
+2007-02-10 David Kilzer <ddkilzer@webkit.org>
+
+ Reviewed by Adam.
+
+ * Scripts/svn-create-patch:
+ (findSourceFileAndRevision($)): Use File::Spec->abs2rel() instead of substr() to generate
+ a relative path to the copied file.
+
+2007-02-10 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ * Drosera/Drosera.icns: updated the icon with 512px and 256px variants
+
+2007-02-10 David Kilzer <ddkilzer@webkit.org>
+
+ Reviewed by Timothy.
+
+ * Scripts/svn-apply:
+ (handleBinaryChange($$)): Binary patches don't need a trailing newline after the base64
+ encoded text.
+
+2007-02-10 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Maciej
+
+ <rdar://problem/4965133> WebKit sends file:// url referrers
+
+ * Scripts/run-webkit-tests: Enhanced the http tests so that we can run layout tests
+ on local files, but have an httpd for remote resources
+
+2007-02-08 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Ignore another false leak report.
+
+ * Scripts/run-webkit-tests:
+
+2007-02-08 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Kevin McCullough.
+
+ * Scripts/run-webkit-tests: Don't try to create /tmp/LayoutTests if it
+ already exists, to avoid confusing error message.
+
+ Also, remove /tmp/LayoutTests after running so unsupecting fools don't
+ try to rm -rf it, only later to discover that they have completely hosed
+ their machines.
+
+2007-02-08 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+
+ Reviewed by Adam Roben.
+
+ Linux/gdk build fixes.
+
+ * GdkLauncher/main.cpp: Add -exit-after-loading and
+ -dump-render-tree as debugging aid.
+ (strEq):
+ (main):
+
+2007-02-08 Geoffrey Garen <ggaren@apple.com>
+
+ Minor fixup based on Maciej's review last night.
+
+ * Scripts/run-webkit-tests: Use normal "increment at end of loop" behavior,
+ and do a little math to make it work.
+
+2007-02-08 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+
+ Reviewed by Adam Roben.
+
+ Linux/gdk build fixes.
+
+ * GdkLauncher/gdklauncher.bkl:
+
+2007-02-08 Kevin McCullough <KMcCullough@apple.com>
+
+ - Fix layout test failures.
+
+ * Scripts/run-webkit-tests:
+
+2007-02-08 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders.
+
+ * Scripts/check-for-global-initializers: For speed, only check files that
+ have been modified since the last time we linked. For tidiness, capture
+ stderr from nm, and prevent "nm: no name list" messages from going out.
+
+2007-02-08 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Maciej Stachowiak, Adam Roben.
+
+ Added 'nthly' support to run-webkit-tests. It's like 'singly', for an
+ arbitrary number n.
+
+ Plus some renames:
+ - DumpRenderTree => "dumpTool" (to match abstraction elsewhere)
+ - checkLeaks => "shouldCheckLeaks" (to match style guidelines)
+ - tool => dumpTool (to match abstraction elsewhere)
+ - httpdOpen => isHttpdOpen (to match style guidelines)
+
+ Plus a few logic fixups:
+ - Don't check isDumpToolOpen when we know we've called openDumpTool().
+ - Use a single code path to decide when to shut down dumpTool and
+ when to check for leaks, since the operations are coincidental.
+ - Use a single code path for running the leaks tool, since the only
+ thing that varies between configurations is the output file name.
+ - Increment $count after each test finishes, instead of at the end
+ of the loop, to help with comparing to the length of the array
+ and %-ing by n.
+ - Use a more robust test inside the loop to determine if we need to
+ close dumpTool, instead of copying the closing code outside the loop.
+
+ Layout tests pass.
+
+ * Scripts/run-webkit-tests:
+
+2007-02-06 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Beth Dakin, evil twin to Bethany P. Dakin.
+
+ Ignore known leaks in CFRunLoop. Exclude THRD leaks by type so that we can
+ catch all reports of them, not just those inside pthread_create.
+
+ Also, use "\\" instead of "\" because we need the actual \ to get into the
+ regexp string if it's going to do any escaping. (Oops!)
+
+ * Scripts/run-webkit-tests:
+
+2007-02-06 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Bethany P. Dakin.
+
+ The 's' is optional when the leaks tool reports 'leaks'.
+
+ * Scripts/run-leaks:
+
+2007-02-06 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Bethany P. Dakin.
+
+ Hooked up run-webkit-tests to the run-leaks script. No change in behavior yet.
+
+ * Scripts/run-webkit-tests: Changed symbol names to valid regular expressions.
+
+2007-02-06 David Smith <catfish.man@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ Patch for http://bugs.webkit.org/show_bug.cgi?id=12566
+ [Drosera] Console history fixups
+
+ * Drosera/console.js: assorted cleanups and fixes
+
+2007-02-05 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin Adler.
+
+ New script that allows you to ignore leaks by regular expression.
+
+ * Scripts/run-leaks: Added.
+
+2007-02-03 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Mark.
+
+ Patch for http://bugs.webkit.org/show_bug.cgi?id=12555
+ Drosera doesn't handle CR ( carriage returns ) well
+
+ - Normalize all the line endings.
+
+ * Drosera/debugger.js:
+
+2007-02-02 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Added some more known leaks to the leaks ignore list.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Why does XCode
+ hate itself so much?
+ * Scripts/run-webkit-tests:
+
+2007-02-02 Geoffrey Garen <ggaren@apple.com>
+
+ Even better build fix than the last.
+
+ * ChangeLog:
+ * DumpRenderTree/DumpRenderTree.m:
+ (shouldIgnoreWebCoreNodeLeaks):
+
+2007-02-02 Geoffrey Garen <ggaren@apple.com>
+
+ Fixed build. Added work-around for GCC bug.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (shouldIgnoreWebCoreNodeLeaks):
+
+2007-02-01 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Added support for selectively ignoring WebCore::Node leaks during layout
+ tests, so that we can ignore known leaks in other components.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (shouldIgnoreWebCoreNodeLeaks): Implements a black list of tests whose
+ WebCore::Node leaks we have to ignore. Does this CFString gobbledy-gook
+ confuse anyone else?
+ (runTest):
+
+2007-02-01 Anders Carlsson <acarlsson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ * DumpRenderTree/UIDelegate.m:
+ (-[UIDelegate webView:addMessageToConsole:]):
+ Dump console messages.
+
+2007-01-31 Anders Carlsson <acarlsson@apple.com>
+
+ * DumpRenderTree/ResourceLoadDelegate.m:
+ (-[ResourceLoadDelegate webView:identifierForInitialRequest:fromDataSource:]):
+ Use an NSString here so we can guarantee that -description always returns the same value.
+
+2007-01-31 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Added Selection::toRange to the leaks -exclude list, since it comes up
+ as a false positive (Radar 4967949).
+
+ Also added RangeCounter to the global initializer exclude list. I added
+ a RangeCounter since leaks won't detect all Range leaks anymore.
+
+ * Scripts/check-for-global-initializers:
+ * Scripts/run-webkit-tests:
+
+2007-01-31 Anders Carlsson <acarlsson@apple.com>
+
+ * DumpRenderTree/ResourceLoadDelegate.m:
+ (-[ResourceLoadDelegate webView:identifierForInitialRequest:fromDataSource:]):
+ Don't try to create an identifier if resource loads shouldn't be dumped.
+
+2007-01-31 Anders Carlsson <acarlsson@apple.com>
+
+ Reviewed by Geoff.
+
+ Add dumping of resource loads. This isn't completely tweaked yet since the test results would
+ rely on resources being delivered in the same order which might not always be true. However, it works good
+ enough for the simple webarchive tests I want to do right now.
+
+ * DumpRenderTree/DumpRenderTree.h:
+ * DumpRenderTree/DumpRenderTree.m:
+ (dumpRenderTree):
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (-[LayoutTestController dumpResourceLoadCallbacks]):
+ (runTest):
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/ResourceLoadDelegate.h: Added.
+ * DumpRenderTree/ResourceLoadDelegate.m: Added.
+ Add new resource load delegate.
+
+2007-01-31 Geoffrey Garen <ggaren@apple.com>
+
+ Backing out the CFRunLoopRunSpecific exclude command because it was overly
+ broad. We'll either need to work around this leak in DRT, or do some
+ custom grep-based leak ignoring.
+
+ * Scripts/run-webkit-tests:
+
+2007-01-30 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Filed some more Radars in other components, added some more leaks to the
+ exclusion list.
+
+ * Scripts/run-webkit-tests: Ignore leaks in CFNotificationCenterAddObserver,
+ CFRunLoopRunSpecific, and NSSpellChecker.
+
+2007-01-30 David Kilzer <ddkilzer@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ http://bugs.webkit.org/show_bug.cgi?id=11882
+ Need a way to regression test .webarchive output files
+
+ Implement layoutTestController.dumpAsWebArchive() to test WebArchive format.
+ Alters WebResourceResponse and WebResourceURL properties within WebArchive format
+ to normalize URLs to remove path where WebKit was checked out. Also converts
+ WebDataResource properties from data to string if the corresponding
+ WebResourceMIMEType property starts with "text/" or equals
+ "application/x-javascript".
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (convertWebResourceDataToString): Added.
+ (normalizeWebResourceURL): Added.
+ (normalizeWebResourceResponse): Added.
+ (serializeWebArchiveToXML): Added.
+ (dump):
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (-[LayoutTestController dumpAsWebArchive]): Added.
+ (runTest):
+
+2007-01-30 David Kilzer <ddkilzer@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ http://bugs.webkit.org/show_bug.cgi?id=12470
+ svn-create-patch creates duplicate patches for files within an added/modified directory
+
+ * Scripts/svn-create-patch:
+ (sub generateFileList($\%\%)): Ignore directories when generating the file list.
+
+2007-01-29 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Fixed <rdar://problem/4485644> REGRESSION: JavaScriptCore has init routines
+
+ No more mollycoddling for you, FastMalloc.o!
+
+ * Scripts/check-for-global-initializers:
+
+2007-01-29 Graham Dennis <graham.dennis@gmail.com>
+
+ Reviewed by Maciej.
+
+ Enables layout test for: http://bugs.webkit.org/show_bug.cgi?id=10725
+ Image data in from RTFD clipboard data thrown away
+
+ - This method is needed because NSArrays are bridged to JS Arrays,
+ which in turn are bridged back to WebScriptObjects when passed from
+ JS to ObjC. Hence it is not possbile to pass an NSArray from JS.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (-[DumpRenderTreePasteboard declareType:owner:]): Added a convenience method for JS.
+
+2007-01-25 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Added support for test for <rdar://problem/4608404> WebScriptObject's
+ _rootObject lack of ownership policy causes crashes (e.g., in Dashcode)
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (+[LayoutTestController webScriptNameForSelector:]):
+ (-[LayoutTestController storeWebScriptObject:]):
+ (-[LayoutTestController accessStoredWebScriptObject]):
+ (-[LayoutTestController dealloc]):
+
+2007-01-26 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Zack
+
+ Small hack to ensure that our top level frame actually has the
+ correct size. Unfortunately this means I'll have to regenerate
+ all test cases :/
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+
+2007-01-25 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Darin and Zack
+
+ Move the test results for Qt into a directory of it's own
+ (WebKit/LayoutTestResults/qt). Leave the Mac results where
+ they are for now and share the text only results between
+ Mac and Qt.
+
+ Add support for a LayoutTestResults/platform/Skipped file
+ to run-webkit-tests to be able to ignore certain tests
+
+ Remove the old tests-skipped.txt from Qts DumpRenderTree
+ implementation.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::open):
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.h:
+ * DumpRenderTree/DumpRenderTree.qtproj/tests-skipped.txt: Removed.
+ * Scripts/run-webkit-tests:
+
+2007-01-24 Darin Adler <darin@apple.com>
+
+ Reviewed by Oliver.
+
+ - fix crash seen in layout tests
+
+ * DumpRenderTree/EventSendingController.m: (-[EventSendingController dealloc]):
+ Add back the line of code that sets savedMouseEvents to nil. I thought it was
+ a field of the EventSendingController, but it's actually a global.
+
+2007-01-24 Darin Adler <darin@apple.com>
+
+ Reviewed by Maciej.
+
+ - changed dragMode to be a property instead of a function
+
+ * DumpRenderTree/EventSendingController.h: Renamed inDragMode to dragMode.
+ * DumpRenderTree/EventSendingController.m:
+ (+[EventSendingController isSelectorExcludedFromWebScript:]): Removed setDragMode.
+ (+[EventSendingController isKeyExcludedFromWebScript:]): Added dragMode.
+ (-[EventSendingController init]): Updated for name change.
+ (-[EventSendingController leapForward:]): Ditto.
+ (-[EventSendingController mouseUp]): Ditto.
+ (-[EventSendingController mouseMoveToX:Y:]): Ditto.
+
+2007-01-24 Darin Adler <darin@apple.com>
+
+ Reviewed by Maciej.
+
+ - made the deferral of mouse events until drag completes conditional
+ it's needed for drag testing, and harmful for selection testing
+
+ * DumpRenderTree/EventSendingController.h: Added inDragMode boolean.
+ * DumpRenderTree/EventSendingController.m:
+ (+[EventSendingController isSelectorExcludedFromWebScript:]): Added setDragMode:.
+ (+[EventSendingController webScriptNameForSelector:]): Added name for setDragMode,
+ and remove unneeded clearKillRing name.
+ (-[EventSendingController init]): Initialize inDragMode to true.
+ (-[EventSendingController dealloc]): Removed overzealous assertions -- we should
+ not be asserting things that are dependent on the test content!
+ (-[EventSendingController leapForward:]): Only queue events in drag mode.
+ (-[EventSendingController setDragMode:]): Added.
+ (-[EventSendingController mouseDown]): Removed overzealous assertion.
+ (-[EventSendingController mouseUp]): Removed overzealous assertions.
+ Only queue events in drag mode.
+ (-[EventSendingController mouseMoveToX:Y:]): Only queue events in drag mode.
+
+2007-01-24 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Zack
+
+ Add a signal handler, always dump immediately if we get an
+ error during a page load and raise the timeout to 5 seconds
+ (as we get a lot less such failures now)
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::maybeDump):
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.h:
+ * DumpRenderTree/DumpRenderTree.qtproj/jsobjects.cpp:
+ (LayoutTestController::waitUntilDone):
+ * DumpRenderTree/DumpRenderTree.qtproj/main.cpp:
+ (crashHandler):
+ (main):
+ * DumpRenderTree/DumpRenderTree.qtproj/tests-skipped.txt:
+
+2007-01-22 Darin Adler <darin@apple.com>
+
+ Reviewed by Mitz.
+
+ - a couple tiny tweaks to make --reset-results work better
+
+ * Scripts/run-webkit-tests: Always generate results when --reset-results is specified.
+ Don't make a separate "new" entry while generating results when --reset-results
+ is specified since new results are the norm in that case.
+
+2007-01-21 Sanjay Madhav <sanjay12@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ Test support for: <rdar://problem/4928583> Memory usage grows when reloading google.com/ig
+
+ This adds a getJSObjectCount test-accessible function to allow test scripts to track JSObject usage.
+
+ * DumpRenderTree/GCController.h:
+ * DumpRenderTree/GCController.mm:
+ (+[GCController isSelectorExcludedFromWebScript:]):
+ (-[GCController getJSObjectCount]):
+
+2007-01-20 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Maciej.
+
+ * BuildSlaveSupport/build.webkit.org-config/webkit/steps.py: Track the output of run-javascriptcore-tests,
+ catch single regressions, and don't generate tests results for new tests.
+
+2007-01-20 Adam Roben <aroben@apple.com>
+
+ Rubberstamped by Maciej.
+
+ * Scripts/run-webkit-tests: Change the default behavior back to
+ generating results for new tests (this can be disabled with
+ --no-new-test-results)
+
+2007-01-19 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Adam Roben.
+
+ run-webkit-tests does now not generate new results by default anymore.
+ You'll have to pass the --new-tests flag to it to force it to do so.
+
+ This is required to make it possible to have tests running on multiple
+ platforms peacefully together.
+
+ * Scripts/run-webkit-tests:
+
+2007-01-18 Darin Adler <darin@apple.com>
+
+ Reviewed by John Sullivan.
+
+ * Scripts/run-webkit-tests: Fix handling of configuration so it
+ does the right thing when no explicit configuration is passed in.
+ The old code assumed that the result of setConfiguration() was the
+ configuration, but it's undefined when no configuration is
+ explicitly passed in. The correct function to use is
+ configuration(), and I also streamlined the code.
+
+2007-01-17 Lars Knoll <lars@trolltech.com>
+
+ Fix my last commit to actually work in all cases.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::readStdin):
+
+2007-01-17 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Maciej
+
+ Make sure DumpRenderTree exits when run-webkit-tests
+ is done.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::readStdin):
+
+2007-01-17 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Zack
+
+ Small fixes in DumpRenderTree, so we don't by
+ accident dump twice for the same test.
+
+ Exclude one more test as it currently causes DumpRenderTree to
+ hang forever.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::readStdin):
+ (WebCore::DumpRenderTree::dump):
+ * DumpRenderTree/DumpRenderTree.qtproj/jsobjects.cpp:
+ (LayoutTestController::notifyDone):
+ * DumpRenderTree/DumpRenderTree.qtproj/tests-skipped.txt:
+
+2007-01-17 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Zack
+
+ Add a message handler to DumpRenderTree that will
+ suppress all debug output coming from qDebug() statements.
+ Like this we can get rid of all the noise coming
+ from the notImplemented() macro when running the
+ layout tests. You can get it back by adding -v to
+ DumpRenderTree's command line.
+
+ Changed run-webkit-tests slightly, so we by default
+ don't fail anymore when our output differs from what
+ is generated on the Mac. Added a --strict option, so
+ that we can still see this cases and fix them one by one.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/main.cpp:
+ (messageHandler):
+ (main):
+ * Scripts/run-webkit-tests:
+
+2007-01-16 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Zack
+
+ Use the new public API for the Qt build, and don't rely on
+ WebKit internals anymore.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::~DumpRenderTree):
+ (WebCore::DumpRenderTree::open):
+ (WebCore::DumpRenderTree::readStdin):
+ (WebCore::DumpRenderTree::initJSObjects):
+ (WebCore::DumpRenderTree::dump):
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.h:
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.pro:
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTreeClient.cpp: Removed.
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTreeClient.h: Removed.
+ * DumpRenderTree/DumpRenderTree.qtproj/jsobjects.cpp:
+ (LayoutTestController::notifyDone):
+ (LayoutTestController::timerEvent):
+ * DumpRenderTree/DumpRenderTree.qtproj/main.cpp:
+ (main):
+ * DumpRenderTree/DumpRenderTree.qtproj/tests-skipped.txt:
+
+2007-01-15 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by mjs
+
+ <rdar://problem/4810960>
+ Gmail Editor: window.focus() called on keyDown (9640)
+
+ * DumpRenderTree/EventSendingController.m: Send the keyDown event
+ to the firstResponder, not the event's locationInWindow. A
+ key press's locationInWindow is meaningless and just a dummy
+ coordinate.
+
+2007-01-15 Eric Seidel <eric@webkit.org>
+
+ Reviewed by bdash.
+
+ Add a script to keep our header guards squeaky clean.
+
+ * Scripts/clean-header-guards: Added.
+
+2007-01-15 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Zack
+
+ Fix a few smaller issues in here, and update
+ our list of skipped tests.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::readStdin):
+ (WebCore::DumpRenderTree::dump):
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.h:
+ * DumpRenderTree/DumpRenderTree.qtproj/jsobjects.cpp:
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::reset):
+ (LayoutTestController::waitUntilDone):
+ (LayoutTestController::notifyDone):
+ (LayoutTestController::dumpEditingCallbacks):
+ (LayoutTestController::timerEvent):
+ * DumpRenderTree/DumpRenderTree.qtproj/jsobjects.h:
+ * DumpRenderTree/DumpRenderTree.qtproj/tests-skipped.txt:
+
+2007-01-14 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Adam.
+
+ <rdar://problem/4908909> Need to create Leopard nightly build
+
+ * WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj: Always use the 10.4 Universal SDK. The disk images don't mount pre-10.4 so we aren't losing anything here.
+ * WebKitLauncher/WebKitNightlyEnabler.m:
+ (poseAsWebKitApp): Simplify CoreFoundation-related hackery by using _CFGetProcessPath instead of walking the mach-o symbol tables. The smaller timeframe where the
+ CFProcessPath environment variable is set allows this to work correctly on Leopard where the old code failed.
+ (enableWebKitNightlyBehaviour):
+ * WebKitLauncher/main.m:
+ (main): Pass executable path as WebKitAppPath rather than CFProcessPath to prevent it being picked up too early by CoreFoundation.
+ * Drosera/launcher.m:
+ (main): Ditto
+
+2007-01-12 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Zack
+
+ Get DumpRenderTree to work again for the Qt build.
+
+ Make run-webkit-tests a little less verbose when testing
+ Qt, and add an option to run DumpRenderTree inside valgrind
+ (useful for debugging)
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::~DumpRenderTree):
+ (WebCore::DumpRenderTree::open):
+ (WebCore::DumpRenderTree::dump):
+ (WebCore::DumpRenderTree::maybeDump):
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.h:
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTreeClient.cpp:
+ (WebCore::DumpRenderTreeClient::dispatchDidHandleOnloadEvents):
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTreeClient.h:
+ * DumpRenderTree/DumpRenderTree.qtproj/tests-skipped.txt:
+ * Scripts/run-webkit-tests:
+
+2007-01-12 Zack Rusin <zack@kde.org>
+
+ Add WEBKIT_FULLBUILD env variable to get the
+ build do a make clean before make to cleanout the
+ stale depenendencies (for buildbot mainly).
+
+ * Scripts/webkitdirs.pm:
+
+2007-01-11 Mitz Pettel <mitz@webkit.org>
+
+ Reviewed by Hyatt.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=10249
+ Temporarily disable tests that are causing kernel panics
+
+ Changed the ImageDiff tool not to use CoreImage filters.
+
+ * DumpRenderTree/ImageDiff.m:
+ (main):
+ (createImageFromStdin):
+ (compareImages):
+ (getDifferenceBitmap):
+
+2007-01-11 Lars Knoll <lars@trolltech.com>
+
+ Fix compilation
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.pro:
+
+2007-01-11 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Darin Adler.
+
+ Adjust to loader changes.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+
+2007-01-06 George Staikos <staikos@kde.org>
+
+ This doesn't build on all unix platforms!
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.pro:
+
+2007-01-05 Zack Rusin <zack@kde.org>
+
+ Reviewed by Simon.
+
+ Fix the undefined warnings and try to detect
+ the DISPLAY properly.
+
+ * Scripts/run-webkit-tests:
+
+2007-01-05 David Kilzer <ddkilzer@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Speed up svn-create-patch for copied and moved files.
+
+ * Scripts/svn-create-patch:
+ (manufacturePatchForAdditionWithHistory($$)): Use 'svn cat' instead of 'svn cat -rNNNNN'
+ so svn pulls original from local disk.
+
+2007-01-04 Lars Knoll <lars@trolltech.com>
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.pro:
+ Link with RPATH to (hopefully) get the automatic tests working.
+
+2007-01-03 Mark Rowe <bdash@webkit.org>
+
+ Reviewed by Anders.
+
+ * Scripts/run-webkit-tests: Launch Safari using the same WebKit build configuration as the layout tests used.
+
+2007-01-02 Zack Rusin <zack@kde.org>
+
+ Make it work after javascriptcore/bindings changes.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::initJSObjects):
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.pro:
+
+2007-01-01 David Kilzer <ddkilzer@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ http://bugs.webkit.org/show_bug.cgi?id=12023
+ svn-create-patch and friends should handle moved/copied files
+
+ * Scripts/svn-apply: Identify copied files and handle those before all other patches.
+ * Scripts/svn-create-patch: Generate patches with subtle changes for copied files.
+ (findMimeType($)): Added.
+ (findModificationTime($)): Added.
+ (findSourceFileAndRevision($)): Added.
+ (generateDiff($$$)): Changed to use svn stat instead of svn diff.
+ (isBinaryMimeType($)): Added.
+ (manufacturePatchForAdditionWithHistory($$)): Added.
+ * Scripts/svn-unapply: Identify copied files and handle those after unapplying all other patches.
+
+2006-12-29 Eric Seidel <eric@webkit.org>
+
+ Reviewed by olliej.
+
+ Stop DumpRenderTree from reporting false Frame/Node leaks due to new SVGImage
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (dumpRenderTree): clear WebCore cache before exiting
+
+2006-12-29 David Kilzer <ddkilzer@webkit.org>
+
+ Reverted last commit until WebResourceData issue is fixed.
+
+ http://bugs.webkit.org/show_bug.cgi?id=11882
+ Need a way to regression test .webarchive output files
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (serializeWebArchiveToXML): Removed.
+ (dump):
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (-[LayoutTestController dumpAsWebArchive]): Removed.
+ (runTest):
+
+2006-12-28 David Kilzer <ddkilzer@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ http://bugs.webkit.org/show_bug.cgi?id=11882
+ Need a way to regression test .webarchive output files
+
+ Implement layoutTestController.dumpAsWebArchive() to test WebArchive format.
+ Saves WebArchive plist in xml format, then alters file:// URLs to remove path
+ where WebKit was checked out.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (serializeWebArchiveToXML): Added.
+ (dump):
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (-[LayoutTestController dumpAsWebArchive]): Added.
+ (runTest):
+
+2006-12-28 George Staikos <staikos@kde.org>
+
+ Reviewed by Olliej.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.pro: don't build on non-X11
+
+2006-12-27 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Eric Seidel. Prose edited by Mitz Pettel.
+
+ Some cleanup I did while debugging the regression in plugins/netscape-dom-access.html.
+
+ No behavior change. Layout tests pass.
+
+ * DumpRenderTree/DumpRenderTree.h: Exported the done BOOL in place of the
+ doneLoading() accessor function. This matches the rest of DRT's exports and
+ makes it easier to search for clients who check (!done).
+
+ * DumpRenderTree/DumpRenderTree.m: Moved fflush() call to runTest() so
+ it would cover both code paths for calling runTest().
+
+ (dumpRenderTree): "doneLoading()" => "done"
+ (dump): ditto
+ * DumpRenderTree/EditingDelegate.m: ditto
+ (-[EditingDelegate webView:shouldBeginEditingInDOMRange:]): ditto
+ (-[EditingDelegate webView:shouldEndEditingInDOMRange:]): ditto
+ (-[EditingDelegate webView:shouldInsertNode:replacingDOMRange:givenAction:]): ditto
+ (-[EditingDelegate webView:shouldInsertText:replacingDOMRange:givenAction:]): ditto
+ (-[EditingDelegate webView:shouldDeleteDOMRange:]): ditto
+ (-[EditingDelegate webView:shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]): ditto
+ (-[EditingDelegate webView:shouldApplyStyle:toElementsInDOMRange:]): ditto
+ (-[EditingDelegate webView:shouldChangeTypingStyle:toStyle:]): ditto
+ (-[EditingDelegate webViewDidBeginEditing:]): ditto
+ (-[EditingDelegate webViewDidChange:]): ditto
+ (-[EditingDelegate webViewDidEndEditing:]): ditto
+ (-[EditingDelegate webViewDidChangeTypingStyle:]): ditto
+ (-[EditingDelegate webViewDidChangeSelection:]): ditto
+ * DumpRenderTree/UIDelegate.m: ditto
+ (-[UIDelegate webView:runJavaScriptAlertPanelWithMessage:]): ditto
+
+2006-12-26 Eric Seidel <eric@webkit.org>
+
+ Reviewed by bradee-oh.
+
+ Add very simple run-pageloadtest script for running SVG page load test.
+
+ * Scripts/run-pageloadtest: Added.
+
+2006-12-26 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ Some cleanup in preparation for fixing <rdar://problem/4740328> Safari
+ crash on quit in _NPN_ReleaseObject from KJS::Bindings::CInstance::~CInstance
+
+ (dumpRenderTree): Renamed "installedPlugins" to "sharedDatabase."
+
+2006-12-23 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Added --threaded support to run-webkit-tests and DumpRenderTree.
+
+ In "threaded" mode, DRT runs a concurrent JavaScript thread with each test,
+ stressing the thread safety of JavaScriptCore and the JavaScriptCore/WebCore
+ interface. This is useful for tracking down bugs you might see on a system
+ configured to use a PAC file.
+
+ Ironically, I can proudly state that very few layout tests pass.
+
+ * DumpRenderTree/DumpRenderTree.m: Added javaScriptThread and helper functions
+ for starting and stopping it.
+ (runJavaScriptThread): helper function
+ (startJavaScriptThread): helper function
+ (stopJavaScriptThread): helper function
+
+ (dumpRenderTree): Added --threaded command line argument.
+ * Scripts/run-webkit-tests: ditto
+
+2006-12-22 Mark Rowe <bdash@webkit.org>
+
+ Reviewed by Brady.
+
+ Fix for <rdar://problem/4265976>
+ prepare-ChangeLog sometimes lists the wrong Objective-C class name for a changed method
+
+ * Scripts/prepare-ChangeLog: Treat @end as the end of both the interface and the method declaration.
+
+2006-12-21 Mark Rowe <bdash@webkit.org>
+
+ Reviewed by Tim Hatcher.
+
+ http://bugs.webkit.org/show_bug.cgi?id=11922
+ Bug 11922: REGRESSION(r17128): Drosera no longer shows local variables in stack frame
+
+ * Drosera/DebuggerDocument.m:
+ (-[WebScriptObject webScriptAttributeKeysForScriptObject:]): Use an anonymous function with function.call to
+ ensure that the properties are being retrieved from the correct scope object.
+
+2006-12-21 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Zack
+
+ Add support for the layoutTestController JavaScript object
+ to be able to get textOnly dumps.
+ Added a Qt specific hack to always get the same fonts (the ones
+ added in this submit) and the same dpi when running the layout tests.
+ Modified the run-webkit-tests script to also do a comparison to the
+ Mac generated outputs (by stripping out positioning information).
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::open):
+ (WebCore::DumpRenderTree::resetJSObjects):
+ (WebCore::DumpRenderTree::initJSObjects):
+ (WebCore::DumpRenderTree::dump):
+ (WebCore::DumpRenderTree::checkLoaded):
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.h:
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.pro:
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTreeClient.cpp:
+ (WebCore::DumpRenderTreeClient::DumpRenderTreeClient):
+ (WebCore::DumpRenderTreeClient::partClearedInBegin):
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTreeClient.h:
+ * DumpRenderTree/DumpRenderTree.qtproj/fontoverload.cpp: Added.
+ (QX11Info::appDpiY):
+ (QX11Info::appDpiX):
+ (qt_x11ft_convert_pattern):
+ (LayoutTestController::LayoutTestController):
+ * DumpRenderTree/DumpRenderTree.qtproj/jsobjects.h: Added.
+ * DumpRenderTree/DumpRenderTree.qtproj/jsobjects.cpp: Added.
+ (LayoutTestController::shouldDumpAsText):
+ (LayoutTestController::shouldWaitUntilDone):
+ (LayoutTestController::reset):
+ (LayoutTestController::dumpAsText):
+ (LayoutTestController::waitUntilDone):
+ (LayoutTestController::notifyDone):
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/AHEM____.TTF: Added.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/COPYING: Added.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/CourierBold.ttf: Added.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/CourierBoldOblique.ttf: Added.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/CourierMedium.ttf: Added.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/CourierMediumOblique.ttf: Added.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/HelveticaBold.ttf: Added.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/HelveticaBoldOblique.ttf: Added.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/HelveticaMedium.ttf: Added.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/HelveticaMediumOblique.ttf: Added.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/SymbolMedium.ttf: Added.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/TimesBold.ttf: Added.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/TimesBoldItalic.ttf: Added.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/TimesMedium.ttf: Added.
+ * DumpRenderTree/DumpRenderTree.qtproj/fonts/TimesMediumItalic.ttf: Added.
+ * Scripts/run-webkit-tests:
+
+2006-12-21 Mark Rowe <bdash@webkit.org>
+
+ Reviewed by Geoff.
+
+ http://bugs.webkit.org/show_bug.cgi?id=11888
+ Bug 11888: REGRESSION (r18320): Web Inspector panes broken
+
+ * Drosera/debugger.js: Use removeProperty to reset a style property to its initial value.
+
+2006-12-18 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Updated EventSender to be able to send mouse up events outside the WebView.
+ This is a minor tweak to a hackish implementation. The real solution
+ should be to use NSApplication's event sending model instead of rolling
+ our own, but I don't have time for that right now.
+
+ * DumpRenderTree/EventSendingController.m:
+ (-[EventSendingController mouseUp]):
+
+2006-12-15 Marvin Decker <marv.decker@gmail.com>
+
+ Reviewed by Darin and Alexey.
+
+ Fix the Windows build, move various Client implementations out of
+ WebCore and into WebKit.
+
+ * Spinneret/Spinneret.sln:
+
+2006-12-14 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Brady.
+
+ * Makefile.shared: use $PIPESTATUS[0] and a sub-shell to exit with xcodebuild's exit status
+
+2006-12-13 Zack Rusin <zack@kde.org>
+
+ Reviewed by rwlbuis
+
+ Use the qmake build by default with Qt - it's the one that works
+ currently.
+
+ * Scripts/build-webkit:
+ * Scripts/webkitdirs.pm:
+
+2006-12-10 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Zack
+
+ Some more fixes to the dumprendertree application.
+ Fix the run-webkit-tests script for Qt.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::open):
+ (WebCore::DumpRenderTree::readStdin):
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.h:
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.pro: Added.
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm:
+
+2006-12-10 Rob Buis <buis@kde.org>
+
+ Reviewed by Darin Adler.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (dump):
+
+2006-12-10 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Zack
+
+ Get the DumpRenderTree app to compile again
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::open):
+ (WebCore::DumpRenderTree::readStdin):
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.pro: Added.
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTreeClient.cpp:
+ (WebCore::DumpRenderTreeClient::DumpRenderTreeClient):
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTreeClient.h:
+ * DumpRenderTree/DumpRenderTree.qtproj/main.cpp:
+ (main):
+
+2006-12-09 George Staikos <staikos@kde.org>
+
+ Reviewed by Zack.
+
+ Repair QMake build on OS X.
+
+ * Scripts/build-webkit:
+
+2006-12-09 Zack Rusin <zack@kde.org>
+
+ Fixing small mistakes in the build scripts for
+ the qmake builds.
+
+ * Scripts/build-webkit:
+ * Scripts/webkitdirs.pm:
+
+2006-12-09 Simon Hausmann <hausmann@kde.org>
+
+ Reviewed by hyatt.
+
+ Add support for a QMake build using build-webkit --qmake
+
+ * Scripts/build-webkit:
+ * Scripts/webkitdirs.pm:
+
+2006-12-09 George Staikos <staikos@kde.org>
+
+ Reviewed by Zack.
+
+ Remove reference to Unity.
+
+ * Scripts/webkitdirs.pm:
+
+2006-12-08 Zack Rusin <zack@kde.org>
+
+ Reviewed by Maciej.
+
+ Fix the compile after recent API changes.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ * DumpRenderTree/DumpRenderTree.qtproj/main.cpp:
+ (main):
+
+2006-12-08 George Staikos <staikos@kde.org>
+
+ Reviewed by Maciej.
+
+ Build Qt webkit on non-linux, and prefer it if $QTDIR is set
+
+ * Scripts/build-webkit:
+ * Scripts/webkitdirs.pm:
+
+2006-12-06 Steve Falkenburg <sfalken@apple.com>
+
+ Support C strings for localization
+
+ * Scripts/extract-localizable-strings:
+
+2006-12-04 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Make extract-localizable-strings compatible with cpp file extensions.
+
+ * Scripts/extract-localizable-strings:
+
+2006-11-21 Darin Adler <darin@apple.com>
+
+ Reviewed by Maciej.
+
+ - a couple changes to reduce the chance of false positives on the leakbot
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (dumpRenderTree): Move the main function into a separate function so we can run
+ a final garbage collect afterward without any stray values on the stack. Replaced
+ the old way of closing down a WebView (setting the delegates to nil) with the new
+ way (calling the close method), which does a more complete job of shutting
+ everything down without waiting for the WebView object to be deallocated.
+ (main): Put auto-release pool here and added an explicit call to garbage collect.
+ With a separate function, we greatly reduce the chance that a stray address on the
+ stack will keep an object alive.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Let Xcode do its thing,
+ because I don't have what it takes to fight the power.
+
+2006-11-17 Zack Rusin <zack@kde.org>
+
+ Reviewed by Mitz. Landed by Niko.
+
+ Fixing compilation.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree): Adding
+ ContextMenuClient to the constructor
+
+2006-11-12 Mark Rowe <bdash@webkit.org>
+
+ Reviewed by Mitz.
+
+ Clean up of GdkLauncher bakefile.
+
+ * GdkLauncher/gdklauncher.bkl:
+
+2006-11-11 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed and landed by Anders.
+
+ Make DRT work again on Qt/Linux.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+
+2006-11-10 Zack Rusin <zack@kde.org>
+
+ Reviewed and landed by Anders.
+
+ Adjusting to the recent loader changes, making it compile
+ and work.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::checkLoaded):
+ * DumpRenderTree/DumpRenderTree.qtproj/main.cpp:
+
+2006-11-10 Zack Rusin <zack@kde.org>
+
+ Reviewed by Anders.
+
+ Making the Qt code work after refactorings in WebCore.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::checkLoaded):
+ * DumpRenderTree/DumpRenderTree.qtproj/main.cpp:
+
+2006-11-08 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders.
+
+ - same change as below, only tested this time
+
+ * DumpRenderTree/DumpRenderTree.m: (main): Explicitly turn "tab to links"
+ mode off. I think we need to do this because WebPreferences saves things
+ for us automatically. It would be good to turn that off for DumpRenderTree,
+ but for now lets handle this like the other preferences (set it explicitly
+ each time).
+
+2006-11-08 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders.
+
+ * DumpRenderTree/DumpRenderTree.m: (main): Get rid of code to turn on
+ "tab to links" mode. No current tests depend on this, and there's a new
+ test I want to land that depends on the default setting.
+
+2006-11-06 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+
+ Reviewed by Maciej.
+
+ Linux\gdk build fixes.
+
+ * GdkLauncher/main.cpp:
+ (LauncherFrameGdk::LauncherFrameGdk):
+ (main):
+
+2006-11-06 Alexey Proskuryakov <ap@nypop.com>
+
+ Build fix, approved in principle by Tim H.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ Disable deprecated warnings for main.c (TestNetscapePlugin),
+ as it now uses QuickDraw to convert mouse event coordinates.
+
+2006-11-05 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Maciej.
+
+ Bug 11525: [Drosera] function menu doesn't understand object.method = function() {} syntax
+ http://bugs.webkit.org/show_bug.cgi?id=11525
+
+ * Drosera/debugger.js: imporved the function name code
+
+2006-11-06 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Maciej.
+
+ Make sure that alerts and delegate output made after notifyDone() are ignored, rather than
+ being attributed to the next test.
+
+ * DumpRenderTree/EditingDelegate.m:
+ (-[EditingDelegate webView:shouldBeginEditingInDOMRange:]):
+ (-[EditingDelegate webView:shouldEndEditingInDOMRange:]):
+ (-[EditingDelegate webView:shouldInsertNode:replacingDOMRange:givenAction:]):
+ (-[EditingDelegate webView:shouldInsertText:replacingDOMRange:givenAction:]):
+ (-[EditingDelegate webView:shouldDeleteDOMRange:]):
+ (-[EditingDelegate webView:shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
+ (-[EditingDelegate webView:shouldApplyStyle:toElementsInDOMRange:]):
+ (-[EditingDelegate webView:shouldChangeTypingStyle:toStyle:]):
+ (-[EditingDelegate webViewDidBeginEditing:]):
+ (-[EditingDelegate webViewDidChange:]):
+ (-[EditingDelegate webViewDidEndEditing:]):
+ (-[EditingDelegate webViewDidChangeTypingStyle:]):
+ (-[EditingDelegate webViewDidChangeSelection:]):
+ * DumpRenderTree/UIDelegate.m:
+ (-[UIDelegate webView:runJavaScriptAlertPanelWithMessage:]):
+
+2006-11-06 Mark Rowe <bdash@webkit.org>
+
+ Reviewed by Alexey.
+
+ Fix "Undefined subroutine &main::WEXITSTATUS" when build-dumprendertree fails.
+
+ * Scripts/run-webkit-tests: import the POSIX module.
+
+2006-11-06 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Maciej.
+
+ Test for http://bugs.webkit.org/show_bug.cgi?id=11517
+ REGRESSION: Flash clicks/interactivity not working properly
+
+ Teach TestNetscapePlugin to log events passed to it. To enable, set eventLoggingEnabled to true:
+
+ <embed name="plg" type="application/x-webkit-test-netscape" width=100 height=100></embed>
+ <script>
+ plg.eventLoggingEnabled = true;
+ // use eventSender to simulate events...
+ </script>
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
+ (pluginGetProperty):
+ (pluginSetProperty):
+ (pluginAllocate):
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h:
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
+ (NPP_HandleEvent):
+
+2006-11-04 David Smith <catfish.man@gmail.com>
+
+ Reviewed by Tim H.
+
+ Fixes: http://bugs.webkit.org/show_bug.cgi?id=11521
+ Bug 11521: [Drosera] Breakpoint editor UI behaves incorrectly when multiple editors are open
+
+ * Drosera/debugger.js: Use .// instead of // so that it doesn't root the search at the document.
+
+2006-11-04 David Smith <catfish.man@gmail.com>
+
+ Reviewed by Tim H.
+
+ Fixes: http://bugs.webkit.org/show_bug.cgi?id=11513
+ Bug 11513: [Drosera] Function popup fails to appear when clicking supposedly valid areas.
+
+ * Drosera/debugger.css: Stick a min-width on the menu to keep it from becoming smaller than the control.
+
+2006-11-04 David Smith <catfish.man@gmail.com>
+
+ Reviewed by Tim H.
+
+ Fixes: http://bugs.webkit.org/show_bug.cgi?id=11512
+ Bug 11512: [Drosera] Scrolling via keyboard breaks after clicking in function popup.
+
+ * Drosera/debugger.js: blur() the function popup when we're done with it.
+
+2006-11-04 Mark Rowe <bdash@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Fix use of uninitialized value in pattern match.
+
+ * Scripts/webkitdirs.pm:
+
+2006-11-04 Darin Adler <darin@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ * Scripts/webkitdirs.pm: Don't try to use the Xcode build setting if it's project-relative.
+
+2006-11-03 David Smith <catfish.man@gmail.com>
+
+ Reviewed by Tim H.
+
+ Fixes: http://bugs.webkit.org/show_bug.cgi?id=11510
+ Bug 11510: [Drosera] Doubleclicking the attach table should attach to the clicked item.
+
+ * Drosera/DebuggerApplication.m:
+ (-[DebuggerApplication showAttachPanel:]): Set the doubleAction for the table view
+
+2006-11-03 Vladimir Olexa <vladimir.olexa@gmail.com>
+
+ Reviewed by Tim H.
+
+ Fixes: http://bugs.webkit.org/show_bug.cgi?id=9596
+ Bug 9596: [Drosera] add a function popup to the source pane
+
+ * Drosera/debugger.css: Added styles for function popup
+ * Drosera/debugger.html: Added function popup button and select
+ * Drosera/debugger.js: Added function popup functionality
+
+2006-11-03 Michael Emmel <mike.emmel@gmail.com>
+
+ Reviewed by Maciej.
+
+ http://bugs.webkit.org/show_bug.cgi?id=9671
+
+ * Scripts/wkstyle:
+ Adds astyle sed script formats according to most of the style guidelines.
+
+2006-11-03 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Adele.
+
+ http://bugs.webkit.org/show_bug.cgi?id=7323
+ REGRESSION (10.4.4): ondrag* events don't fire on page in a frame
+
+ When dragging, do not send EventSendingController's events immediately. Dragging
+ is supposed to be modal, so we need to perform it from within the delegate, without
+ returning to JS to make the next mouse movement.
+
+ When the mouse is down, mouse events are now recorded, and executed when mouseUp is sent.
+
+ * DumpRenderTree/EventSendingController.h:
+ * DumpRenderTree/EventSendingController.m:
+ (-[EventSendingController dealloc]):
+ (-[EventSendingController leapForward:]):
+ (-[EventSendingController mouseDown]):
+ (-[EventSendingController mouseUp]):
+ (-[EventSendingController mouseMoveToX:Y:]):
+ (+[EventSendingController saveEvent:]):
+ (+[EventSendingController replaySavedEvents]):
+ * DumpRenderTree/UIDelegate.m:
+ (-[UIDelegate webView:dragImage:at:offset:event:pasteboard:source:slideBack:forView:]):
+
+2006-11-02 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Justin Garcia.
+
+ Made dumping of editing callbacks opt-in, so that editing spew doesn't
+ cloud non-editing tests.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (-[LayoutTestController shouldDumpEditingCallbacks]):
+ (runTest):
+ * DumpRenderTree/EditingDelegate.m:
+ (-[EditingDelegate webView:shouldBeginEditingInDOMRange:]):
+ (-[EditingDelegate webView:shouldEndEditingInDOMRange:]):
+ (-[EditingDelegate webView:shouldInsertNode:replacingDOMRange:givenAction:]):
+ (-[EditingDelegate webView:shouldInsertText:replacingDOMRange:givenAction:]):
+ (-[EditingDelegate webView:shouldDeleteDOMRange:]):
+ (-[EditingDelegate webView:shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
+ (-[EditingDelegate webView:shouldApplyStyle:toElementsInDOMRange:]):
+ (-[EditingDelegate webView:shouldChangeTypingStyle:toStyle:]):
+ (-[EditingDelegate webViewDidBeginEditing:]):
+ (-[EditingDelegate webViewDidChange:]):
+ (-[EditingDelegate webViewDidEndEditing:]):
+ (-[EditingDelegate webViewDidChangeTypingStyle:]):
+ (-[EditingDelegate webViewDidChangeSelection:]):
+
+2006-11-02 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Maciej, landed by Anders.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=7802
+ devenv.com not available in VC++ Express installations
+
+ * Scripts/webkitdirs.pm: Make Windows build work with Visual C++ Express.
+ * Scripts/install-win-extras: Make setx.exe actually run.
+
+2006-11-01 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Kevin.
+
+ Fixed bug where additional arguments got fed to xcode and jsdriver.pl
+ Since testkjs is being built before the tests are run, we don't need
+ to build it with webkit.
+
+ Fixes bugs
+ http://bugs.webkit.org/show_bug.cgi?id=11462
+ http://bugs.webkit.org/show_bug.cgi?id=6168
+
+ * Scripts/build-webkit:
+ * Scripts/run-javascriptcore-tests:
+
+2006-11-01 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Tim Hatcher
+
+ Added accessor to get the source directory for use in client scripts
+
+ * Scripts/webkitdirs.pm:
+
+2006-11-01 Mark Rowe <bdash@webkit.org>
+
+ Reviewed by Mitz.
+
+ Update references to webkit.opendarwin.org to webkit.org in Spinneret and WebKit.app.
+
+ * Spinneret/Spinneret/Spinneret.cpp:
+ (_tWinMain):
+ * WebKitLauncher/WebKitNightlyEnabler.m:
+ (cleanUpAfterOurselves):
+
+2006-10-31 Mark Rowe <bdash@webkit.org>
+
+ Reviewed by Stephanie.
+
+ Limit build slaves to a single build to prevent concurrent builds on a single slave from significantly increasing build time.
+
+ * BuildSlaveSupport/build.webkit.org-config/webkit/builders.py: Adjust slave distribution, and make use of a SlaveLock.
+ * BuildSlaveSupport/build.webkit.org-config/webkit/factories.py: Remove unused Qt build factory.
+
+2006-10-31 Darin Adler <darin@apple.com>
+
+ * DumpRenderTree/DumpRenderTree.m: Instead of allocating a single local
+ pasteboard, allocate any number of local pasteboards.
+ (main): Allocate the dictionary of pasteboards.
+ (+[DumpRenderTreePasteboard _pasteboardWithName:]): Allocate a pasteboard,
+ given a name.
+ (+[LocalPasteboard alloc]): Added, so we don't have to call NSAllocateObject
+ explicitly elsewhere.
+ (-[LocalPasteboard addTypes:owner:]): Added a check that the owner responds
+ to the selector rather than calling unconditionally.
+
+2006-10-30 Darin Adler <darin@apple.com>
+
+ - fixed build
+
+ * DumpRenderTree/DumpRenderTree.m: (-[LocalPasteboard setString:forType:]):
+ Don't use CFPasteboard.
+
+2006-10-30 Vladimir Olexa <vladimir.olexa@gmail.com>
+
+ Reviewed by Tim H.
+
+ Fixes: http://bugs.webkit.org/show_bug.cgi?id=11353
+
+ * Drosera/debugger.js: ParsedURL() object now recognizes local files
+
+2006-10-30 Darin Adler <darin@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ * DumpRenderTree/DumpRenderTree.m: Changed to allocate a local pasteboard.
+ This should make our buildbot tests no longer need a pasteboard server.
+
+2006-10-30 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Beth.
+
+ Reorganized project file into Delegates and Controllers groups, and split
+ UIDelegate stuff into a UIDelegate class.
+
+ A little birdy told me that I might end up adding some UIDelegate methods
+ to DRT soon.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main):
+ (runTest):
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+
+2006-10-31 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Oliver.
+
+ Add new platform/graphics include directory.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/CMakeLists.txt:
+
+2006-10-30 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Stephanie.
+
+ Add a special case for the Internal makefiles, so it can find the OepnSource.
+
+ * Scripts/webkitdirs.pm:
+
+2006-10-30 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Change Makefiles to return non-zero when module make fails.
+ Fix bug where if xcode options are not set, modules can build in the
+ wrong directory.
+
+ * Makefile:
+ * Scripts/webkitdirs.pm:
+
+2006-10-30 Matt Lilek <pewtermoose@gmail.com>
+
+ Reviewed by Tim H.
+
+ Fix for http://bugs.webkit.org/show_bug.cgi?id=10468
+ [Drosera] The Console toolbar button should bring the console window to the front.
+
+ The console now gets focus when its activated but already open. Command + L also
+ now activates/focuses the console.
+
+ * Drosera/English.lproj/MainMenu.nib/classes.nib:
+ * Drosera/English.lproj/MainMenu.nib/info.nib:
+ * Drosera/English.lproj/MainMenu.nib/keyedobjects.nib:
+ * Drosera/debugger.js:
+
+2006-10-29 Darin Adler <darin@apple.com>
+
+ * Scripts/do-file-rename: Renames done, ready for the next round.
+ * Scripts/do-webcore-rename: Ditto.
+
+2006-10-29 Darin Adler <darin@apple.com>
+
+ * Scripts/do-file-rename: And again.
+
+2006-10-29 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Tweaked plans for renaming again.
+
+2006-10-29 Darin Adler <darin@apple.com>
+
+ Reviewed by Mitz.
+
+ * DumpRenderTree/DumpRenderTree.m: (-[DumpRenderTreeWindow keyDown:]):
+ Added. Does nothing, which prevents a beep.
+
+ * Scripts/do-webcore-rename: Tweaked plans for renaming a bit.
+
+2006-10-27 Brady Eidson <beidson@apple.com>
+
+ Rubber stamped by Tim Hatcher
+
+ Added "make universal" to build universal binaries
+
+ * Makefile:
+ * Makefile.shared:
+
+2006-10-26 Sam Weinig <sam.weinig@gmail.com>
+
+ Reviewed by Geoff.
+
+ Fix for http://bugs.webkit.org/show_bug.cgi?id=11419
+ REGRESSION (r17299): Assertion failure in -[WebHTMLView(WebPrivate) _topHTMLView]
+ ([view isKindOfClass:[WebHTMLView class]]) when running the layout tests
+
+ * DumpRenderTree/EventSendingController.m:
+ (-[EventSendingController mouseMoveToX:Y:]):
+
+2006-10-26 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Darin Adler.
+
+ Fix Qt/Linux build.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::open):
+
+2006-10-24 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Maciej.
+
+ - Changed run-javascriptcore tests to build testkjs before running.
+
+ * Scripts/run-javascriptcore-tests:
+
+2006-10-24 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Maciej.
+
+ Fix Qt/Linux build.
+
+ - Remove BrowserExtensionQt, move it's methods to Page/FrameQt.
+ - Fix CMakeLists.txt to include platform/network.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/CMakeLists.txt:
+
+2006-10-24 David Smith <catfish.man@gmail.com>
+
+ Reviewed by Tim H.
+
+ Bug 11382: [Drosera] Dragging breakpoints onto each other can mess up inline editor
+ http://bugs.webkit.org/show_bug.cgi?id=11382
+
+ * Drosera/debugger.js: Breakpoint dragging now ensures that editors aren't orphaned.
+
+2006-10-21 Darin Adler <darin@apple.com>
+
+ * Scripts/commit-log-editor: Use baseProductDir() to find the base product directory.
+ This was still using "symroots" so it almost never worked!
+
+2006-10-21 Darin Adler <darin@apple.com>
+
+ * Makefile: Build DumpRenderTree too.
+ * Scripts/do-webcore-rename: Removed bogus comment.
+
+2006-10-20 David Smith <catfish.man@gmail.com>
+
+ Reviewed by Tim H.
+
+ Bug 11367: Inline Breakpoint Editor Improvements: Act III
+ http://bugs.webkit.org/show_bug.cgi?id=11367
+
+ Major breakpoint editor changes:
+ * Breakpoints can now either pause or log to console
+ * Code cleanup through use of XPath and converting breakpoints to objects
+ * Breakpoints now track how many times they've been reached
+ * UI tweaks
+ * The breakpoint editor now saves changes as they're entered
+ * Because changes are auto-saved now, the save button has been converted to a close button (images from PSMTabBarControl, BSD licensed)
+ * If an expression with no return is entered as a condition, it will be wrapped transparently with a return statement.
+
+ * Drosera/DebuggerDocument.m:
+ (-[WebScriptObject breakpointEditorHTML]): A way of loading this from an external file, as it was getting too complex to include inline.
+ * Drosera/Drosera.xcodeproj/project.pbxproj:
+ * Drosera/Images/close.tif: Added.
+ * Drosera/Images/close_active.tif: Added.
+ * Drosera/Images/close_hover.tif: Added.
+ * Drosera/breakpointEditor.html: Added.
+ * Drosera/console.js: Added a way to append messages from outside the console window.
+ * Drosera/debugger.js:
+ * Drosera/viewer.css:
+ * Drosera/viewer.html:
+
+2006-10-18 David Smith <catfish.man@gmail.com>
+
+ Reviewed by Tim H.
+
+ Improve the doubleclick behavior of breakpoints, and make breakpoints with no custom condition set appear blank instead of return [-1, 1] depending on enabled state.
+
+ * Drosera/DebuggerDocument.m:
+ (-[WebScriptObject getDoubleClickMillis]): Add an ObjC wrapper for GetDblTime() so that JS can call it
+ * Drosera/Drosera.xcodeproj/project.pbxproj: link Carbon for GetDblTime()
+ * Drosera/debugger.js:
+
+2006-10-18 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Anders.
+
+ Bug 10851: Crash with Drosera
+ http://bugs.webkit.org/show_bug.cgi?id=10851
+
+ This crash results in an assert in debug builds.
+
+ assert(implementsCall());
+
+ The __drosera_introspection propery was not callable. Now we just assign
+ this.__drosera_introspection in the evaluateWebScript call.
+ This change also removes one DO message.
+
+ * Drosera/DebuggerDocument.m:
+ (-[WebScriptObject webScriptAttributeKeysForScriptObject:]):
+
+2006-10-18 Mark Rowe <bdash@webkit.org>
+
+ Reviewed by Tim H.
+
+ http://bugs.webkit.org/show_bug.cgi?id=11304
+ Bug 11304: Drosera fails to link as universal binary on PowerPC machine
+
+ * Drosera/Drosera.xcodeproj/project.pbxproj: Use -weak_framework to link against JavaScriptCore and WebCore directly
+ when they are not part of the WebKit umbrella framework.
+
+2006-10-18 Adam Roben <aroben@apple.com>
+
+ fixo el buildo II: Release's Pride.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+
+2006-10-18 Geoffrey Garen <ggaren@apple.com>
+
+ fixo el buildo.
+
+ Work around #import of <PDFKit/PDFView.h>.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+
+2006-10-18 David Smith <catfish.man@gmail.com>
+
+ Reviewed by Tim H.
+
+ Add Xcode 3 style inline breakpoint editor. Credit to xenon for the CSS wizardry to get the appearance working properly.
+
+ * Drosera/Drosera.xcodeproj/project.pbxproj:
+ * Drosera/Images/breakpointeditor.png: Added.
+ * Drosera/breakpointEditor.css: Removed.
+ * Drosera/breakpointEditor.html: Removed.
+ * Drosera/breakpointEditor.js: Removed.
+ * Drosera/debugger.js:
+ * Drosera/viewer.css:
+
+2006-10-18 David Harrison <harrison@apple.com>
+
+ Reviewed by Tim H.
+
+ Bug 11341: REGRESSION (r16760): editing/selection/editable-links is failing
+ http://bugs.webkit.org/show_bug.cgi?id=11341
+
+ Link editing behavior became a preference. DumpRenderTree needs to specify the
+ non-default behavior it wants (WebKitEditableLinkOnlyLiveWithShiftKey).
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main):
+
+2006-10-15 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+
+ Reviewed by Anders.
+
+ Make compiler not complain about unused gk. SpinneretWebHost was not setting
+ initial refcount upon creation, so it is completely bogus.
+
+ * GdkLauncher/main.cpp:
+ (main):
+ * Spinneret/Spinneret/Spinneret.h:
+ (SpinneretWebHost::SpinneretWebHost):
+
+2006-10-15 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Oliver.
+
+ Add another hanging test, to the "to be skipped" list.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/tests-skipped.txt:
+
+2006-10-14 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Anders.
+
+ Some fixes to get the Qt BuildSlave to run the LayoutTests.
+
+ * Scripts/build-dumprendertree: No need to call cmake again.
+ * Scripts/run-webkit-tests: Expose LD_LIBRARY_PATH.
+
+2006-10-13 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Eric.
+
+ Force --no-http on Qt/Linux.
+
+ * Scripts/run-webkit-tests:
+
+2006-10-13 Kevin McCullough <KMcCullough@apple.com>
+
+ Reviewed by Adam.
+
+ Gets JavaScripCore tests running on windows.
+
+ * Scripts/run-javascriptcore-tests:
+ * Scripts/webkitdirs.pm:
+
+2006-10-12 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Maciej.
+
+ Exclude some tests which crash or hang from Qt/Linux DRT.
+ These are known to fail, and will be fixed at some point :-)
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::open):
+ (WebCore::DumpRenderTree::readStdin):
+ (WebCore::DumpRenderTree::readSkipFile):
+ (WebCore::DumpRenderTree::checkLoaded):
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.h:
+ * DumpRenderTree/DumpRenderTree.qtproj/tests-skipped.txt: Added.
+
+2006-10-12 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Maciej.
+
+ Specialization of alert() for DumpRenderTree - just log the output, don't show any message box.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTreeClient.cpp:
+ (WebCore::DumpRenderTreeClient::runJavaScriptAlert):
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTreeClient.h:
+
+2006-10-12 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+
+ Reviewed by Maciej.
+
+ Also regenerate GdkLauncher makefiles, since not doing that might
+ lead to mismatch between WebCore and GdkLauncher compiler settings.
+
+ * Scripts/regenerate-makefiles:
+
+2006-10-10 David Smith <catfish.man@gmail.com>
+
+ Reviewed by Tim H.
+
+ Bug 11246: Minor Drosera code cleanup
+ http://bugs.webkit.org/show_bug.cgi?id=11246
+
+ * Drosera/debugger.js: Change [has, add, remove]StyleClass to be a function on Element rather than taking an Element as an argument.
+
+2006-10-10 Vladimir Olexa <vladimir.olexa@gmail.com>
+
+ Reviewed by Tim H.
+
+ Bug 9778: http://bugs.webkit.org/show_bug.cgi?id=9778
+
+ * Drosera/Drosera.xcodeproj/project.pbxproj: Added files
+ * Drosera/English.lproj/Debugger.nib/info.nib: Resized the main window and WebView
+ * Drosera/English.lproj/Debugger.nib/keyedobjects.nib: Resized the main window and WebView
+ * Drosera/Images/SourceArrowOpen.png: Added.
+ * Drosera/Images/fileIcon.jpg: Added.
+ * Drosera/Images/siteCollapsed.tif: Added.
+ * Drosera/Images/siteExpanded.tif: Added.
+ * Drosera/Images/siteIcon.tif: Added.
+ * Drosera/debugger.css: Added File Browser styles
+ * Drosera/debugger.html: Added File Browser UI
+ * Drosera/debugger.js: Added File Browser functionality
+
+2006-10-10 Darin Adler <darin@apple.com>
+
+ * Scripts/do-file-rename: Added.
+
+2006-10-09 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+
+ Reviewed by Geoff.
+
+ Add -exit-after-loading option to make gdklauncher quit after fully loading and rendering
+ a page. This allows automatic testing via e.g. valgrind.
+
+ * GdkLauncher/gdklauncher.bkl:
+ * GdkLauncher/main.cpp:
+ (LauncherFrameGdk::LauncherFrameGdk):
+ (LauncherFrameGdk::setExitAfterLoading):
+ (LauncherFrameGdk::handledOnloadEvents):
+ (handle_event):
+ (main):
+
+2006-10-06 David Smith <catfish.man@gmail.com>
+
+ Reviewed by Timothy.
+
+ Bug 9665: [Drosera] Conditional breakpoints. http://bugs.webkit.org/show_bug.cgi?id=9665
+
+ * Drosera/Drosera.xcodeproj/project.pbxproj: Added new files
+ * Drosera/breakpointEditor.css: Added.
+ * Drosera/breakpointEditor.html: Added.
+ * Drosera/breakpointEditor.js: Added.
+ * Drosera/debugger.js: Added conditional breakpoint support, and the ability to open the breakpoint editor window on option-clicking a breakpoint.
+
+2006-10-06 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Tim H.
+
+ Fix Qt/Linux build by adapting the s/ScrollBar/Scrollbar/ changes.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+
+2006-10-05 Oliver Hunt <ohunt@apple.com>
+
+ Reviewed by Anders.
+
+ * Scripts/run-webkit-tests:
+ Fix pixel tests.
+
+2006-10-04 Anders Carlsson <acarlsson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ * Scripts/run-webkit-tests:
+ Add an environment variable, WebKitExpectedTestResultsDirectory, which controls where expected test
+ results should be.
+
+2006-10-05 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed and landed by ap.
+
+ Cmake: make it possible to install the libraries after having built using 'build-webkit'.
+ Just set the "WebKitInstallationPrefix" environment variable to your desired prefix.
+
+ * Scripts/webkitdirs.pm:
+
+2006-10-04 Mark Rowe <bdash@webkit.org>
+
+ Reviewed by Stephanie.
+
+ Switch the Qt buildbot to the standard set of build steps.
+ Have JavaScriptCoreTest check the output of run-javascriptcore-tests to
+ see if any regressions were spotted, and fail the test if so.
+
+ * BuildSlaveSupport/build.webkit.org-config/webkit/builders.py:
+ * BuildSlaveSupport/build.webkit.org-config/webkit/factories.py:
+ * BuildSlaveSupport/build.webkit.org-config/webkit/steps.py:
+
+2006-10-04 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Mitz Pettel!
+
+ Bug 10708: [Drosera] Make the console input plaintext-only
+ http://bugs.webkit.org/show_bug.cgi?id=10708
+
+ Change the console input -webkit-user-modify property to
+ read-write-plaintext-only.
+
+ * Drosera/console.css:
+
+2006-10-04 David Smith <catfish.man@gmail.com>
+
+ Reviewed by Tim H.
+
+ Bug 10473: [Drosera] Overlapping text in JavaScript Console
+ http://bugs.webkit.org/show_bug.cgi?id=10473
+
+ Using min-height instead of height to avoid overlapping text.
+
+ * Drosera/console.css:
+
+2006-10-04 David Smith <catfish.man@gmail.com>
+
+ Reviewed by Tim H.
+
+ Added a bash-style command history.
+
+ * Drosera/console.js:
+
+2006-10-03 Anders Carlsson <acarlsson@apple.com>
+
+ Reviewed by Adam and Brady.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main):
+ Update URL to Ahem.ttf
+
+2006-10-03 Darin Adler <darin@apple.com>
+
+ * Scripts/commit-log-editor: Added missing "close" call. Oops!
+
+2006-10-03 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by eseidel. Landed by eseidel.
+
+ Offer a way for BuildBot to not colorize the cmake output, when building
+ with the 'build-webkit' script. Add "--color" / "--no-color" option pair.
+
+ Default is colorize output, though only Qt platform handles this for now.
+
+ * Scripts/build-dumprendertree:
+ * Scripts/build-webkit:
+ * Scripts/webkitdirs.pm:
+
+2006-10-03 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by eseidel. Landed by eseidel.
+
+ Make all important scripts work with Qt/Linux.
+
+ You can safely use this now:
+ set-configuration-release --debug && build-webkit && run-javascriptcore-tests && run-webkit-tests
+
+ * Scripts/build-dumprendertree:
+ * Scripts/run-javascriptcore-tests:
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm:
+
+2006-10-03 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Eric.
+
+ build-webkit tweak: Use WebKitBuild/$config as output dir (Release/Debug).
+
+ * Scripts/webkitdirs.pm:
+
+2006-10-02 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed/landed by Adam.
+
+ Proper build-webkit support for Qt/Linux.
+
+ Compilation process is similar to OSX now, aka.
+ the build directory is RootCheckoutDir/WebKitBuild now.
+
+ * Scripts/build-webkit: Recognize Qt.
+ * Scripts/webkitdirs.pm: Add buildCMakeProject() logic.
+
+2006-10-01 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed by Maciej.
+
+ Add QT build slave to Buildbot.
+
+ * BuildSlaveSupport/build.webkit.org-config/webkit/builders.py: Add QT build slave, fix existing errors.
+ * BuildSlaveSupport/build.webkit.org-config/webkit/factories.py: Add QT build factory.
+ * BuildSlaveSupport/build.webkit.org-config/webkit/status.py: Disable forcing of builds via web interface to prevent spamming. Use the IRC bot in #webkit-build instead.
+ * BuildSlaveSupport/build.webkit.org-config/webkit/steps.py: Add CMake build step.
+
+2006-09-28 David Harrison <harrison@apple.com>
+
+ Suggested by Darin Adler.
+
+ Moved an extern declaration from inside a method to the top of the file.
+
+ * DumpRenderTree/EventSendingController.m:
+ (-[EventSendingController clearKillRing]):
+
+2006-09-28 David Harrison <harrison@apple.com>
+
+ Reviewed by Justin.
+
+ Add clearKillRing so we can test emacs support with empty kill ring.
+
+ * DumpRenderTree/EventSendingController.m:
+ (+[EventSendingController isSelectorExcludedFromWebScript:]):
+ (+[EventSendingController webScriptNameForSelector:]):
+ (-[EventSendingController clearKillRing]):
+
+2006-09-27 MorganL <morganl.webkit@yahoo.com>
+
+ Reviewed by Maciej, landed by Brady
+
+ Fix URL bar updating.
+
+ * Spinneret/Spinneret/Spinneret.h:
+ (SpinneretWebHost::didStartProvisionalLoadForFrame):
+ (SpinneretWebHost::didCommitLoadForFrame):
+ (SpinneretWebHost::didFinishLoadForFrame):
+
+2006-09-23 Sam Weinig <sam.weinig@gmail.com>
+
+ Reviewed by Eric.
+
+ Build Fix.
+
+ * DumpRenderTree/EventSendingController.m:
+ (-[EventSendingController enableDOMUIEventLogging:]):
+
+2006-09-22 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by darin
+
+ * Scripts/do-webcore-rename:
+
+2006-09-21 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Adam.
+
+ Bug 10923: Frame scroll layout test failures on the buildbot
+ http://bugs.webkit.org/show_bug.cgi?id=10923
+
+ Added a new method that will toggle on the recursive dump of
+ child frame scroll positions.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (dumpFrameScrollPosition):
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (-[LayoutTestController dumpChildFrameScrollPositions]):
+
+2006-09-19 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+
+ Reviewed by eseidel. Landed by eseidel.
+
+ Detect that close button was pressed and exit cleanly.
+
+ * GdkLauncher/main.cpp:
+ (handle_event):
+ (main):
+
+2006-09-17 Adam Roben <aroben@apple.com>
+
+ Reviewed by hyatt, sfalken.
+
+ Get DumpRenderTree compiling and limping along on Windows.
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.cpp:
+ (loadResourceIntoArray): Added this function that WebCore::ImageWin needs from WebKit
+ (main): Add NULL argument to Page constructor.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.vcproj: Remove incorrect "wininet.dll" argument to CC, fix JavaScriptCore.lib path, add *_SECURE_NO_DEPRECATE #defines
+ * Scripts/webkitdirs.pm: Fix JavaScriptCore.lib path
+
+2006-09-15 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed by Brady.
+
+ http://bugs.webkit.org/show_bug.cgi?id=10635
+ Bug 10635: Buildbot configuration in SVN is out of sync with build.webkit.org
+
+ * BuildSlaveSupport/build.webkit.org-config/webkit/builders.py: Reorder build slaves within build factories in an attempt to spread the load evenly.
+ * BuildSlaveSupport/build.webkit.org-config/webkit/status.py: Return to sending status emails to <svnuser>@opensource.apple.com addresses.
+ * BuildSlaveSupport/build.webkit.org-config/webkit/steps.py: Update configuration to match changes in Buildbot. Always do clean SVG builds.
+
+2006-09-09 Sam Weinig <sam.weinig@gmail.com>
+
+ Reviewed by Eric.
+
+ Patch for http://bugs.webkit.org/show_bug.cgi?id=10791
+ Even More Objective-C DOM auto-generation cleanup
+
+ - Change to use new, more Objectice-C'ish version of
+ DOMKeyboardEvent's initKeyboardEvent. Fixes an error with
+ regression test for fast/events/dblclick-addEventListener.html.
+
+ * DumpRenderTree/EventSendingController.m:
+ (-[EventSendingController fireKeyboardEventsToElement:]):
+
+2006-09-04 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Tim H.
+
+ Fixes last part of: http://bugs.webkit.org/show_bug.cgi?id=10644
+ Move QtLauncher down to WebKitQt.
+
+ * QtLauncher/CMakeLists.txt: Removed.
+ * QtLauncher/main.cpp: Removed.
+
+2006-09-04 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Darin Adler.
+
+ Fixes parts of: http://bugs.webkit.org/show_bug.cgi?id=10644
+ Adjust DumpRenderTree to the FrameQtClient changes.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/CMakeLists.txt:
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::~DumpRenderTree):
+ (WebCore::DumpRenderTree::frame):
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.h:
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTreeClient.cpp: Added.
+ (WebCore::DumpRenderTreeClient::DumpRenderTreeClient):
+ (WebCore::DumpRenderTreeClient::~DumpRenderTreeClient):
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTreeClient.h: Added.
+
+2006-09-03 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: More renaming plans.
+
+2006-09-03 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Tim H.
+
+ http://bugs.webkit.org/show_bug.cgi?id=10693
+ Convert JavaScript arrays to AppleScript lists
+
+ * DumpRenderTree/AppleScriptController.m:
+ (convertAEDescToObject):
+ (-[AppleScriptController doJavaScript:]): Support printing AEDescLists.
+
+2006-08-31 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Prepare for another round of renaming.
+
+2006-08-29 Dan Waylonis <waylonis@google.com>
+
+ Reviewed by ggaren.
+
+ - Verification of exceptions thrown in a plugin. Test for bug 10114.
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/ObjCPlugin.m:
+ (+[ObjCPlugin isSelectorExcludedFromWebScript:]):
+ (+[ObjCPlugin webScriptNameForSelector:]):
+ (-[ObjCPlugin throwIfArgumentIsNotHello:]):
+
+2006-08-30 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Tim H.
+
+ Commit KDE related tweaks, to be able to
+ differentiate between a Qt-only or a KDE build.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/CMakeLists.txt: Add ksvg2/ includes.
+ * QtLauncher/CMakeLists.txt: Add ksvg2/ includes.
+
+2006-08-29 Darin Adler <darin@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ * Scripts/gdb-safari: Set DYLD_FRAMEWORK_PATH inside gdb instead of setting it in gdb's environment
+ to work around what seems to be a bug in some versions of gdb.
+
+2006-08-16 Tim Omernick <timo@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Part of <rdar://problem/4481553> NetscapeMoviePlugIn example code scripting doesn't work in Firefox (4319)
+ <http://bugs.webkit.org/show_bug.cgi?id=4319>: NetscapeMoviePlugIn example code scripting doesn't work
+ in Firefox
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
+ (NPP_GetValue):
+ WebKit's NPP_GetValue() reference counting behavior has been changed to match Firefox. NPObject return values
+ are expected to be retained by the plug-in, and released by the caller.
+
+2006-08-28 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Tim Hatcher.
+
+ Fixes one chunk of: http://bugs.webkit.org/show_bug.cgi?id=10604
+
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::checkLoaded): Faster polling for isLoaded() in
+ Qt's DumpRenderTree.
+
+ * Scripts/run-webkit-tests:
+ Use -expected-qt.txt etc.. output in run-webkit-test if isQt().
+
+2006-08-28 Darin Adler <darin@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ * Scripts/build-drosera: Fix behavior when there are multiple options.
+
+2006-08-27 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Anders.
+
+ Drosera will be built when you type make.
+
+ * Drosera/Makefile: Added.
+ * Makefile: Added.
+ * Makefile.shared: Added.
+
+2006-08-27 Anders Carlsson <acarlsson@apple.com>
+
+ Forgot to add these.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/CMakeLists.txt: Added.
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp: Added.
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::~DumpRenderTree):
+ (WebCore::DumpRenderTree::open):
+ (WebCore::DumpRenderTree::readStdin):
+ (WebCore::DumpRenderTree::checkLoaded):
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.h: Added.
+ * DumpRenderTree/DumpRenderTree.qtproj/main.cpp: Added.
+ (main):
+
+2006-08-27 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Eric, landed by Anders.
+
+ Add DumpRenderTree support for Qt/Linux.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/CMakeLists.txt: Added.
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp: Added.
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::~DumpRenderTree):
+ (WebCore::DumpRenderTree::open):
+ (WebCore::DumpRenderTree::readStdin):
+ (WebCore::DumpRenderTree::checkLoaded):
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.h: Added.
+ * DumpRenderTree/DumpRenderTree.qtproj/main.cpp: Added.
+ (main):
+ * Scripts/build-dumprendertree:
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm:
+
+2006-08-24 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Eric. Landed by rwlbuis.
+
+ Add QtLauncher (was testunity before), which provides a
+ standalone "browser" to test the Qt platform stuff.
+
+ * QtLauncher/CMakeLists.txt: Added.
+ * QtLauncher/main.cpp: Added.
+ (main):
+
+2006-08-22 Trey Matteson <trey@usa.net>
+
+ Reviewed by ggaren.
+
+ Added support for a new set of browser navigation tests. The main feature
+ is the ability for a test to queue up a set of future actions that will
+ happen after that first page is loaded. This is used to simulate a sequence
+ of user actions such as filling out forms, loading additional pages or
+ going back. In addition we can now dump out the state of the back/forward
+ list, and the scroll position is dumped if not at 0,0.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main): Init new state
+ (compareHistoryItems): New utility to support sorting.
+ (dumpHistoryItem): Write out a WebHistoryItem and kids.
+ (dumpFrameScrollPosition): Write out the scroll position.
+ (dump): Optionally write b/f list or scroll position.
+ (-[WaitUntilDoneDelegate processWork:]): Perform queued work.
+ (-[WaitUntilDoneDelegate webView:locationChangeDone:forDataSource:]):
+ Kick off any queued actions. Fixed for the case of loads started in
+ a subframe instead of the root frame.
+ (-[WaitUntilDoneDelegate webView:didStartProvisionalLoadForFrame:]):
+ Grab the topmost frame that is being loaded. Do this as early as possible,
+ instead of in didCommitLoadForFrame.
+ (-[WaitUntilDoneDelegate webView:didCommitLoadForFrame:]):
+ Noting a load has started now happens in previous method.
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]): Boilerplate
+ (+[LayoutTestController webScriptNameForSelector:]): Boilerplate
+ (-[LayoutTestController notifyDone]): readyToDump var is subsumed by
+ topFrameLoading
+ (-[LayoutTestController dumpBackForwardList]): New impl, just set a bit.
+ (-[LayoutTestController _addWorkForTarget:selector:arg1:arg2:]):
+ Add new work to the queue.
+ (-[LayoutTestController _doLoad:target:]): Do a queued load.
+ (-[LayoutTestController _doBackOrForwardNav:]): Do a queued back/forward.
+ (-[LayoutTestController scheduleBackNav:]): Ways for scripts to queue actions
+ (-[LayoutTestController scheduleForwardNav:]):
+ (-[LayoutTestController scheduleReload]):
+ (-[LayoutTestController scheduleScript:]):
+ (-[LayoutTestController scheduleLoad:target:]):
+ (runTest): Clear new state for each test. Renamed from "dumpRenderTree"
+ since it's not one of the functions that does any dumping.
+
+2006-08-15 Jonas Witt <jonas.witt@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ - added a function to create a few DOMKeyboardEvents and dispatch
+ them to a specified HTML element
+ http://bugs.webkit.org/show_bug.cgi?id=9736
+
+ * DumpRenderTree/EventSendingController.m:
+ (+[EventSendingController isSelectorExcludedFromWebScript:]):
+ (+[EventSendingController webScriptNameForSelector:]):
+ (-[EventSendingController fireKeyboardEventsToElement:]):
+
+2006-08-15 Duncan Wilcox <duncan@mclink.it>
+
+ Reviewed and tweaked by Darin Adler.
+
+ - added DumpRenderTree support so editing delegate can be made to refuse edits
+ to enable tests for http://bugs.webkit.org/show_bug.cgi?id=10129
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]): Add setAcceptsEditing:
+ to the list of methods.
+ (+[LayoutTestController webScriptNameForSelector:]): Use the name setAcceptsEditing,
+ without the colon, for the JavaScript name.
+ (-[LayoutTestController setAcceptsEditing:]): Added. Calls through to the editing
+ delegate.
+ (dumpRenderTree): Set the acceptsEditing flag to YES before each test.
+
+ * DumpRenderTree/EditingDelegate.h: Added an "acceptsEditing" flag and getter and
+ setter methods to the class.
+ * DumpRenderTree/EditingDelegate.m:
+ (-[EditingDelegate init]): Initialize acceptsEditing to YES.
+ (-[EditingDelegate webView:shouldBeginEditingInDOMRange:]): Instead of always returning YES,
+ return the value of acceptsEditing.
+ (-[EditingDelegate webView:shouldEndEditingInDOMRange:]): Ditto.
+ (-[EditingDelegate webView:shouldInsertNode:replacingDOMRange:givenAction:]): Ditto.
+ (-[EditingDelegate webView:shouldInsertText:replacingDOMRange:givenAction:]): Ditto.
+ (-[EditingDelegate webView:shouldDeleteDOMRange:]): Ditto.
+ (-[EditingDelegate webView:shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
+ Ditto.
+ (-[EditingDelegate webView:shouldApplyStyle:toElementsInDOMRange:]): Ditto.
+ (-[EditingDelegate webView:shouldChangeTypingStyle:toStyle:]): Ditto.
+ (-[EditingDelegate setAcceptsEditing:]): Added.
+
+2006-08-03 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed by Darin Adler.
+
+ Bug 10224: [Drosera] Drosera icon should be set on DroseraLauncher so it appears in nightly builds
+ http://bugs.webkit.org/show_bug.cgi?id=10224
+
+ * Drosera/Drosera.xcodeproj/project.pbxproj:
+ * Drosera/LauncherInfo.plist:
+
+2006-08-03 Mitz Pettel <opendarwin.org@mitzpettel.com>
+
+ - fix ASSERTION FAILURE: draggingDocumentView == nil in -[WebViewPrivate dealloc]
+ when a test performs an unsuccessful drag and drop operation.
+
+ * DumpRenderTree/EventSendingController.m:
+ (-[EventSendingController mouseUp]): Added a call to -draggingExited: if the
+ drag operation for the mouse release is NSDragOperationNone.
+
+2006-08-02 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 9632: [Drosera] syntax highlighting is slow (reproducible 40 second hang)
+ http://bugs.webkit.org/show_bug.cgi?id=9632
+
+ Do not change the file source when normalizing the line endings.
+ We use this file source to compare against new versions of the source
+ as it comes in, so we can skip re-syntax highlighting if they are the same.
+ The problem is apparent on yahoo.com since they have mixed line endings and
+ once we normalize them the source will always be different. This was
+ compounded by the fact that yahoo has around 40 inline scripts. Each
+ inline script causes us to check if the main document has more loaded,
+ that is when we compare the source strings. Since they are always different
+ we would syntax highlight yahoo.com 40 times! We do check source length before
+ doing a more expensive string comparison, but the lengths were the same.
+
+ * Drosera/debugger.js:
+
+2006-08-02 Niels Leenheer <niels.leenheer@gmail.com>
+
+ Reviewed by Timothy.
+
+ Bug 9931: [Drosera] Needs a cool icon
+ http://bugs.webkit.org/show_bug.cgi?id=9931
+
+ * Drosera/Drosera.icns: Added.
+ * Drosera/Drosera.xcodeproj/project.pbxproj:
+ * Drosera/Info.plist:
+
+2006-08-01 Darin Adler <darin@apple.com>
+
+ - fix a bug in my recent change where the mouse position at the end of
+ the last test would affect the results of the next test
+
+ * DumpRenderTree/DumpRenderTree.m: (dumpRenderTree): Set lastMousePosition to 0.
+
+2006-07-31 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed by Maciej.
+
+ http://bugs.webkit.org/show_bug.cgi?id=10182
+ Bug 10182: [Drosera] Evaluating expressions in Console is slow when current frame has many variables
+
+ * Drosera/console.js: String.indexOf returns -1 when the string is not found.
+ Correct the logic to not reload local variable list unless an '=' character is in the expression.
+
+2006-07-31 Darin Adler <darin@apple.com>
+
+ Reviewed by Maciej.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=10171
+ REGRESSION: failing layout test: fast/events/objc-event-api.html
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main): Add pose so we can implement +[NSEvent mouseLocation]. Put the window at a predictable
+ location in flipped coordinates, since those are the coordinates that we use.
+ (+[DumpRenderTreeEvent mouseLocation]): Implement this, since it's used for mouse event handling
+ inside WebHTMLView.
+
+ * DumpRenderTree/EventSendingController.m:
+ (+[EventSendingController initialize]): Removed unused webkitDomEventProperties array.
+ (-[EventSendingController init]): Removed, since the whole thing was a no-op.
+ (-[EventSendingController mouseMoveToX:Y:]): Convert the x,y pair to window coordinates. The old code
+ probably worked OK, but this is needed to be correct.
+ (-[EventSendingController handleEvent:]): Put clientX/Y before screenX/Y and removed the flipping
+ code from screenY. We didn't really need to flip screenY -- what was actually happening was that the
+ position that DumpRenderTree chose was in non-flipped coordinates, and with that fixed we can just
+ dump the screenY as-is.
+
+2006-07-31 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed by Darin Adler.
+
+ http://bugs.webkit.org/show_bug.cgi?id=10178
+ Bug 10178: [Drosera] Selecting a frame in the stack list should take you to that location in the source
+
+ * Drosera/debugger.js: Keep a stack that contains the source file and line number references for outer
+ frames. Use this stack to determine which file and line to highlight when a stack frame is selected.
+
+2006-07-31 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed by Darin Adler.
+
+ http://bugs.webkit.org/show_bug.cgi?id=10175
+ Bug 10175: [Drosera] Anonymous functions show up as "(global scope)" in stack list
+
+ * Drosera/DebuggerDocument.m:
+ (-[WebScriptObject currentFunctionStack]): If the frame has a caller it isn't the global scope.
+
+2006-07-31 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed by Darin Adler.
+
+ http://bugs.webkit.org/show_bug.cgi?id=10167
+ Bug 10167: REGRESSION(r15688): ASSERTION FAILED: _private->mouseDownEvent != nil in layout tests
+
+ * DumpRenderTree/EventSendingController.m: Don't set the mouse down flag
+ in keyDown handler.
+
+2006-07-30 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed by Maciej.
+
+ Bug 9686: [Drosera] Need the ability to break into Drosera on Javascript exceptions
+ http://bugs.webkit.org/show_bug.cgi?id=9686
+
+ * Drosera/DebuggerDocument.m:
+ (-[WebScriptObject switchToServerNamed:]): Remove as listener before resuming to
+ ensure that the server does not try and notify us of events related to the resumption.
+ (-[WebScriptObject webView:exceptionWasRaised:sourceId:line:forWebFrame:]): Delegate
+ call through to JavaScript.
+ * Drosera/debugger.js: Pause debugger when exception is raised.
+
+2006-07-29 Mike Emmel <mike.emmel@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ - fixes for Linux build
+
+ * GdkLauncher/mk: Added call to bakefile_gen before calling make.
+ * GdkLauncher/gdklauncher.bkl: Tweak comment.
+
+2006-07-24 Dan Waylonis <waylonis@google.com>
+
+ Reviewed and tweaked a bit by Darin Adler.
+
+ * DumpRenderTree/ObjCPlugin.m:
+ (+[ObjCPlugin isSelectorExcludedFromWebScript:]): Added "echo:".
+ (+[ObjCPlugin webScriptNameForSelector:]): Use the name "echo" for
+ "echo:" so it's nice to call from JavaScript.
+ (-[ObjCPlugin echo:]): Just returns the same object -- can be used
+ to test a round trip through Objective-C types.
+
+2006-07-24 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Darin Adler.
+
+ Fix http://bugs.webkit.org/show_bug.cgi?id=10060
+ Improve iExploder results parsing
+
+ * Scripts/run-iexploder-tests: Fix Apach logs parsing to produce a correct results
+ in random mode, too.
+
+2006-07-18 David Kilzer <ddkilzer@kilzer.net>
+
+ Reviewed by Timothy.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=9964
+ Add switch to prepare-ChangeLog to skip svn update of ChangeLog files
+
+ * Scripts/prepare-ChangeLog: Added --[no-]update switch.
+
+2006-07-16 David Kilzer <ddkilzer@kilzer.net>
+
+ Reviewed by Darin Adler.
+
+ * BuildSlaveSupport/build.webkit.org-config/buildbot.css:
+ Removed "No newline at end of file" that snuck in as part of the "apply patch" process.
+ * GdkLauncher/mk:
+ Removed "Property changes" that snuck in as part of the "apply patch" process.
+
+2006-07-16 David Kilzer <ddkilzer@kilzer.net>
+
+ Reviewed by Darin Adler.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=9875
+ Teach svn-apply and svn-unapply to use patch(1) for additions and deletions
+
+ * Scripts/svn-apply:
+ (addDirectoriesIfNeeded): Don't try to add a directory that's already in svn.
+ (checksum): Added.
+ (patch): Use patch(1) for non-binary additions and deletions.
+ * Scripts/svn-unapply:
+ (checksum): Added.
+ (patch): Use patch(1) for reverting non-binary additions and deletions.
+ (revertDirectories): Don't try to revert a directory that hasn't changed in svn.
+
+2006-07-13 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed by Timothy.
+
+ Bug 9889: [Drosera] Stepping out when paused after last statement in function skips a frame
+ http://bugs.webkit.org/show_bug.cgi?id=9889
+
+ * Drosera/debugger.js: Track whether we paused during the execution of willLeaveFrame. If
+ so, have stepOut pause on the next call to willExecuteStatement rather than second.
+
+2006-07-12 David Kilzer <ddkilzer@kilzer.net>
+
+ Reviewed by Darin Adler.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=9848
+ Teach svn-create-patch and friends to fix ChangeLog patches
+
+ * Scripts/svn-apply: Added fixChangeLogPatch() and invoked it in the proper place.
+ * Scripts/svn-create-patch: Ditto.
+ * Scripts/svn-unapply: Ditto.
+
+2006-07-12 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed by ggaren.
+
+ Bug 9869: [Drosera] JS Console fails to evaluate input when paused in global scope
+ http://bugs.webkit.org/show_bug.cgi?id=9869
+
+ * Drosera/DebuggerDocument.m:
+ (-[WebScriptObject currentFunctionStack]): Include the global frame in the stack.
+
+2006-07-12 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed by ggaren.
+
+ Bug 9863: Drosera needs to show something at launch
+ http://bugs.webkit.org/show_bug.cgi?id=9863
+
+ * Drosera/DebuggerApplication.m:
+ (-[DebuggerApplication applicationDidFinishLaunching:]): Show the attach window on launch.
+
+2006-07-12 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed by Timothy.
+
+ Lets Drosera build universal for the nightlies. Right now it is not
+ possible to build a universal binary on a PPC machine because of a
+ conflict with the universal SDK.
+
+ * BuildSlaveSupport/build-launcher-app:
+ * WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj:
+
+2006-07-11 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Tim O.
+
+ - test for http://bugs.webkit.org/show_bug.cgi?id=7808
+ Assertion failure in -[WebBaseNetscapePluginStream dealloc] when requesting an invalid URL
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
+ (pluginInvoke): treat getURL() with one parameter as if the second parameter were NULL -
+ should open a new stream and deliver the data to the current instance.
+
+2006-07-11 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 9598: [Drosera] add a JavaScript evaluator console
+ http://bugs.webkit.org/show_bug.cgi?id=9598
+
+ * Drosera/DebuggerApplication.h:
+ * Drosera/DebuggerApplication.m:
+ (-[DebuggerApplication knownServers]):
+ * Drosera/DebuggerDocument.h:
+ * Drosera/DebuggerDocument.m:
+ (-[WebScriptObject evaluateScript:inCallFrame:]):
+ (-[WebScriptObject showConsole:]):
+ (-[WebScriptObject toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar:]):
+ (-[WebScriptObject toolbarDefaultItemIdentifiers:]):
+ (-[WebScriptObject toolbarAllowedItemIdentifiers:]):
+ (-[WebScriptObject webView:createWebViewWithRequest:]):
+ (-[WebScriptObject webViewShow:]):
+ (-[WebScriptObject webViewAreToolbarsVisible:]):
+ (-[WebScriptObject webView:setToolbarsVisible:]):
+ (-[WebScriptObject webView:setResizable:]):
+ (-[WebScriptObject webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:]):
+ (-[WebScriptObject scriptConfirmSheetDidEnd:returnCode:contextInfo:]):
+ (-[WebScriptObject webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:]):
+ (-[WebScriptObject webView:windowScriptObjectAvailable:]):
+ (-[WebScriptObject webView:didFinishLoadForFrame:]):
+ (-[WebScriptObject webView:didReceiveTitle:forFrame:]):
+ * Drosera/Drosera.xcodeproj/project.pbxproj:
+ * Drosera/Images/console.png: Added.
+ * Drosera/console.css: Added.
+ * Drosera/console.html: Added.
+ * Drosera/console.js: Added.
+
+2006-07-11 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by a tired Geoff.
+
+ Bug 9597: [Drosera] hook up the variables table to show stack variables
+ http://bugs.webkit.org/show_bug.cgi?id=9597
+
+ * Drosera/DebuggerDocument.m:
+ (-[WebScriptObject isSelectorExcludedFromWebScript:]):
+ (-[WebScriptObject webScriptAttributeKeysForScriptObject:]):
+ (-[WebScriptObject localScopeVariableNamesForCallFrame:]):
+ (-[WebScriptObject valueForScopeVariableNamed:inCallFrame:]):
+ (-[WebScriptObject webView:didReceiveTitle:forFrame:]):
+ (-[WebScriptObject webView:didLoadMainResourceForDataSource:]):
+ (-[WebScriptObject webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:]):
+ (-[WebScriptObject webView:didEnterCallFrame:sourceId:line:forWebFrame:]):
+ (-[WebScriptObject webView:willExecuteStatement:sourceId:line:forWebFrame:]):
+ (-[WebScriptObject webView:willLeaveCallFrame:sourceId:line:forWebFrame:]):
+ * Drosera/debugger.css:
+ * Drosera/debugger.html:
+ * Drosera/debugger.js:
+
+2006-07-10 Tim Omernick <timo@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ <http://bugs.webkit.org/show_bug.cgi?id=9844>:
+ Add DOM access test to DumpRenderTree's Netscape plug-in
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
+ (testDOMAccess):
+ (pluginInvoke):
+
+2006-07-10 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed by Darin Adler.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=9839
+ Bug 9839: Nightly launcher fails to detect extensions when extension causes crash on load
+
+ Now track three states: initializing, running, and closed. If we are launched and the previous
+ state was initializing then we likely just experienced a crash on launch.
+
+ * WebKitLauncher/WebKitNightlyEnabler.m:
+ (myApplicationWillFinishLaunching): Improve wording of dialog. Update to set new running state.
+ (myApplicationWillTerminate): Update to use new states.
+ (cleanUpAfterOurselves): Display alert if previous state was initializing. Set state as
+ initializing as early as practical.
+ (symbol_lookup): Bring code up to speed with formatting guidelines.
+ (GDSymbolLookup): Ditto.
+
+2006-07-10 Darin Adler <darin@apple.com>
+
+ - try to fix Windows build
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.vcproj:
+ Remove include paths with "khtml" in them. Add one for "html" subdir or WebCore.
+
+2006-07-09 David Kilzer <ddkilzer@kilzer.net>
+
+ Build fix.
+
+ - Backed out http://bugs.webkit.org/show_bug.cgi?id=7802
+ devenv.com not available in VC++ Express installations
+
+ * Scripts/webkitdirs.pm: Backed out previous change.
+
+2006-07-09 David Kilzer <ddkilzer@kilzer.net>
+
+ Reviewed by Darin Adler.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=9693
+ svn-apply should set ChangeLog date correctly when applying patches
+
+ * Scripts/svn-apply: Set the ChangeLog entry date using a configurable timezone
+ before applying the patch.
+ * Scripts/svn-unapply: Reset the ChangeLog entry date before unapplying the patch.
+
+2006-07-09 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Final version of this round of renaming for posterity.
+
+2006-07-09 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Next round of renaming. (Last round was done.)
+
+2006-07-09 David Kilzer <ddkilzer@kilzer.net>
+
+ - http://bugs.webkit.org/show_bug.cgi?id=7802
+ devenv.com not available in VC++ Express installations
+
+ * Scripts/webkitdirs.pm: Restore Hyatt's original logic to make buildbot
+ work again. Add VC++ Express check as the fallback.
+
+2006-07-09 Bjoern Graf <bjoern.graf@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=7802
+ devenv.com not available in VC++ Express installations
+
+ * Scripts/webkitdirs.pm: Make Windows build work with Visual C++ Express.
+
+2006-07-09 Joost de Valk <jdevalk@opendarwin.org>
+
+ Reviewed by Eric.
+
+ Fixes bug http://bugs.webkit.org/show_bug.cgi?id=9804 .
+ Patch by coldwinter@katamail.com.
+
+ In the congratulations message, "capatibilies" should be "capabilities".
+
+ * Scripts/build-webkit:
+
+2006-07-09 David Kilzer <ddkilzer@kilzer.net>
+
+ Reviewed by Timothy Hatcher.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=9794
+ Teach run-webkit-tests how to ignore tests with performance improvements
+
+ * Scripts/run-webkit-tests: Speed up test list generation, implement --ignore-tests
+ feature, and minor clean up.
+
+2006-07-08 Darin Adler <darin@apple.com>
+
+ Reviewed by Geoff (well, half of it at least).
+
+ - http://bugs.webkit.org/show_bug.cgi?id=9788
+ storage leaks in Objective-C tests
+
+ * DumpRenderTree/DumpRenderTree.m: (-[LayoutTestController keepWebHistory]):
+ * DumpRenderTree/ObjCPlugin.m: (-[ObjCPlugin removeBridgeRestrictions:]):
+ Add a release to fix a storage leak.
+
+2006-07-08 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: A few more.
+
+2006-07-08 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Another cut at renames. About ready to go (later today).
+
+2006-07-04 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Darin Adler.
+
+ http://bugs.webkit.org/show_bug.cgi?id=9734
+ - add support for dumping non-HTML as text - in this case use textContent
+ instead of innerText
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (dump):
+
+2006-07-02 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Eric.
+
+ Bug 9631: [Drosera] Add "Step Over" and "Step Out"
+ http://bugs.webkit.org/show_bug.cgi?id=9631
+
+ Adds step over and step out. Along with a little code cleanup
+ that was minor enough to piggyback on this fix.
+
+ * Drosera/DebuggerDocument.h:
+ * Drosera/DebuggerDocument.m:
+ (-[DebuggerDocument stepOver:]):
+ (-[DebuggerDocument stepOut:]):
+ (-[DebuggerDocument windowDidLoad]):
+ (-[DebuggerDocument windowWillClose:]):
+ (-[DebuggerDocument toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar:]):
+ (-[DebuggerDocument toolbarDefaultItemIdentifiers:]):
+ (-[DebuggerDocument toolbarAllowedItemIdentifiers:]):
+ (-[DebuggerDocument validateUserInterfaceItem:]):
+ * Drosera/Drosera.xcodeproj/project.pbxproj:
+ * Drosera/debugger.html:
+ * Drosera/debugger.js:
+ * Drosera/viewer.css:
+
+2006-07-02 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Eric.
+
+ Bug 9628: [Drosera] Split Views acting oddly
+ http://bugs.webkit.org/show_bug.cgi?id=9628
+
+ Only update the last X or Y coordinate if the new
+ size was not constrained. Also adds the resize cursor to
+ the body during the drag incase there is a constrained
+ over drag off of the resizer element.
+
+ * Drosera/debugger.js:
+
+2006-07-02 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Bug 9692: Warning about Safari extensions on every launch is obnoxious
+ http://bugs.webkit.org/show_bug.cgi?id=9692
+
+ * WebKitLauncher/WebKitNightlyEnabler.m:
+ (myApplicationWillTerminate): Note that we are exiting cleanly.
+ (cleanUpAfterOurselves): Install bundle load tracking only if we failed
+ to exit cleanly on our last invocation. This doesn't play nicely with
+ multiple concurrent instances of WebKit.app so it can be disabled via
+ defaults write com.apple.Safari WKNEShouldMonitorShutdowns -bool NO.
+
+2006-07-02 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Bug 9654: Refresh Loop when accessing feed URLs
+ http://bugs.webkit.org/show_bug.cgi?id=9654
+
+ * WebKitLauncher/Info.plist: Don't claim to handle feed:// URLs.
+
+2006-07-02 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed by Timothy Hatcher.
+
+ Bug 9689: Nightly builds should warn a user about potential problems when using
+ "Safari extensions"
+ http://bugs.webkit.org/show_bug.cgi?id=9689
+
+ * WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj:
+ * WebKitLauncher/WebKitNightlyEnabler.m:
+ (myBundleDidLoad): Keep track of if any bundles that are loaded.
+ (myApplicationWillFinishLaunching): Notify user if any bundles are loaded.
+ (cleanUpAfterOurselves): Register for NSBundleDidLoadNotification and
+ NSApplicationWillFinishLaunchingNotification notifications so that we can
+ track bundle loads and notify the user at launch completion.
+
+2006-06-30 Mike Emmel <mike.emmel@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ - first check-in of a Gdk shell for testing WebKit
+
+ * GdkLauncher: Added.
+
+2006-06-29 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Need to call window close so WebView tears-down completly.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main): call [window close]
+
+2006-06-29 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed by Darin Adler.
+
+ Bug 9615: Buildbot configuration should be in SVN repository
+ http://bugs.webkit.org/show_bug.cgi?id=9615
+
+ Import BuildBot configuration files as used by build.webkit.org.
+ auth.py has been stubbed out so that slave passwords are not disclosed.
+
+ * BuildSlaveSupport/build.webkit.org-config/Makefile: Added.
+ * BuildSlaveSupport/build.webkit.org-config/buildbot.css: Added.
+ * BuildSlaveSupport/build.webkit.org-config/buildbot.tac: Added.
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg: Added.
+ * BuildSlaveSupport/build.webkit.org-config/webkit/__init__.py: Added.
+ * BuildSlaveSupport/build.webkit.org-config/webkit/auth.py: Added.
+ * BuildSlaveSupport/build.webkit.org-config/webkit/basesteps.py: Added.
+ * BuildSlaveSupport/build.webkit.org-config/webkit/builders.py: Added.
+ * BuildSlaveSupport/build.webkit.org-config/webkit/factories.py: Added.
+ * BuildSlaveSupport/build.webkit.org-config/webkit/schedulers.py: Added.
+ * BuildSlaveSupport/build.webkit.org-config/webkit/status.py: Added.
+ * BuildSlaveSupport/build.webkit.org-config/webkit/steps.py: Added.
+
+2006-06-29 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed by Darin Adler.
+
+ Bug 9614: Nightly builds should notify user if a newer build is available
+ http://bugs.webkit.org/show_bug.cgi?id=9614
+
+ * BuildSlaveSupport/build-launcher-app: Write revision number to WebKit.app's VERSION file.
+ * BuildSlaveSupport/build-launcher-dmg: Pass revision number to server-side nightly maintenance
+ script so it can keep track of the latest revision.
+ * Scripts/run-webkit-tests: Pass build-dumprendertree's exit status through correctly.
+ * WebKitLauncher/VERSION: Added. Placeholder for SVN revision number
+ * WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj:
+ * WebKitLauncher/start.html: Retrieve revision number from VERSION file, and pass it through to
+ the nightly start page.
+
+2006-06-26 Jonas Witt <jonas.witt@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 9579: LayoutTests/fast/events/objc-event-api.html failing due to screenY output
+ http://bugs.webkit.org/show_bug.cgi?id=9579
+
+ Report screenY values as (height of zero screen - screenY)
+
+ * DumpRenderTree/EventSendingController.m: (-[EventSendingController handleEvent:]):
+
+2006-06-25 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Geoff.
+
+ Bug 9591: [Drosera] breakpoints should be dragable and deletable by dragging off the gutter
+ http://bugs.webkit.org/show_bug.cgi?id=9591
+
+ Makes breakpoints dragable. If dragged off the gutter they are deleted.
+
+ * Drosera/debugger.js:
+ * Drosera/viewer.css:
+
+2006-06-25 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 9568: assertion failure in Safari after quitting Drosera
+ http://bugs.webkit.org/show_bug.cgi?id=9568
+
+ Call switchToServerNamed:nil and not removeLister to make sure
+ the server object is set to nil to prevent further removeListener calls.
+
+ * Drosera/DebuggerDocument.m:
+ (-[DebuggerDocument applicationTerminating:]):
+
+2006-06-25 David Kilzer <ddkilzer@kilzer.net>
+
+ Reviewed by Darin Adler.
+
+ * Scripts/svn-apply: Speed up isDirectoryEmptyForRemoval() by returning as soon as we find
+ that the directory is not empty instead of reading in every single file and directory first,
+ then checking the count. Avoid warning in removeDirectoriesIfNeeded() if $svnOutput is not
+ defined.
+
+2006-06-25 Darin Adler <darin@apple.com>
+
+ * Scripts/svn-apply: Tweak comments.
+ * Scripts/svn-create-patch: Ditto.
+ * Scripts/svn-unapply: Ditto.
+
+2006-06-25 David Kilzer <ddkilzer@kilzer.net>
+
+ Formatting fix per Bug 9571 Comment #2.
+
+ http://bugs.webkit.org/show_bug.cgi?id=9571#c2
+
+ * Scripts/svn-apply: Formatting fix.
+
+2006-06-25 David Kilzer <ddkilzer@kilzer.net>
+
+ Reviewed by Darin Adler.
+
+ http://bugs.webkit.org/show_bug.cgi?id=9571
+ Teach svn-apply and svn-unapply to handle directory adds and removes better
+
+ * Scripts/svn-apply: Handle directory adds more intelligently. Handle directory removes.
+ * Scripts/svn-unapply: Handle undoing both directory adds and removes.
+
+2006-06-25 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 9574: Drosera should show inline scripts within the original HTML
+ http://bugs.webkit.org/show_bug.cgi?id=9574
+
+ Refactor the JavaScript code to have a distinction between files
+ and scripts. Show the script in the context of the HTML file if
+ it's URL is the same as the frame's main resource. At the time of
+ the disParseScript callback the main resource might not be completely
+ loaded, but Drosera needs to show whatever we have at the time. Once
+ the main resource is finished, update the file source and reload the file.
+
+ * Drosera/DebuggerDocument.m:
+ (-[DebuggerDocument pause]):
+ (-[DebuggerDocument webView:didLoadMainResourceForDataSource:]):
+ (-[DebuggerDocument webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:]):
+ (-[DebuggerDocument webView:failedToParseSource:baseLineNumber:fromURL:withError:forWebFrame:]):
+ * Drosera/debugger.css:
+ * Drosera/debugger.js:
+
+2006-06-24 David Kilzer <ddkilzer@kilzer.net>
+
+ Reviewed by Darin Adler.
+
+ http://bugs.webkit.org/show_bug.cgi?id=9570
+ Teach prepare-ChangeLog to operate on a list of files or directories
+
+ * Scripts/prepare-ChangeLog: Accept a list of files and/or directories when running.
+ * Scripts/svn-create-patch: Code refactoring.
+
+2006-06-24 James G. Speth <speth@end.com>
+
+ Reviewed by Darin Adler.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=8843
+ add a way to build Objective-C test cases in HTML
+
+ Tests running in DumpRenderTree can choose to relax some restrictions of the JavaScript/Objective-C bridge
+ allowing more extensive testing of the Obj-C API. (and by more extensive, I mean this lets scripts do
+ pretty much whatever they want, including acting as delegates, generating events, instantiating obj-c
+ objects, etc... )
+
+ * DumpRenderTree/ObjCPlugin.h:
+ * DumpRenderTree/ObjCPlugin.m: this ability is only exposed to scripts running in DumpRenderTree
+ (+[ObjCPlugin isSelectorExcludedFromWebScript:]):
+ (+[ObjCPlugin webScriptNameForSelector:]):
+ (-[ObjCPlugin removeBridgeRestrictions:]): scripts call this to open up obj-c for extensive testing
+ (+[NSObject setAllowsScriptsFullAccess:]): makes NSObject allow all selectors to be invoked from script
+ (+[NSObject allowsScriptsFullAccess]):
+ (+[NSObject isSelectorExcludedFromWebScript:]): when full access is enabled, no selector is excluded
+ (+[NSObject webScriptNameForSelector:]): always return nil for the default selector mutation
+ (-[JSObjC classNameOfObject:isSelectorExcludedFromWebScript:]):
+ (+[JSObjC webScriptNameForSelector:]):
+ (-[JSObjC invokeDefaultMethodWithArguments:]): shortcut for accessing classes
+ (-[JSObjC lookUpClass:]): allow scripts to retrieve obj-c classes by name
+ (-[JSObjC log:]): access to NSLog function
+ (-[JSObjC retainObject:]): useful obj-c functions that are otherwise hard to reach from javascript
+ (-[JSObjC classOfObject:]):
+ (-[JSObjC classNameOfObject:]):
+
+2006-06-24 David Kilzer <ddkilzer@kilzer.net>
+
+ Reviewed by Timothy.
+
+ * DrawTest/Info.plist: Added copyright statement.
+ * Drosera/Info.plist: Ditto.
+ * DumpRenderTree/TestNetscapePlugIn.subproj/Info.plist: Ditto.
+ * WebKitLauncher/Info.plist: Ditto.
+
+2006-06-24 David Kilzer <ddkilzer@kilzer.net>
+
+ Build fix.
+
+ - Backed out http://bugs.webkit.org/show_bug.cgi?id=7802
+ devenv.com not available in VC++ Express installations
+
+ * Scripts/webkitdirs.pm: Backed out previous change.
+
+2006-06-24 Bjoern Graf <bjoern.graf@gmail.com>
+
+ Reviewed by Maciej.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=7802
+ devenv.com not available in VC++ Express installations
+
+ * Scripts/webkitdirs.pm: Make Windows build work with Visual C++ Express.
+
+2006-06-24 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Darin Adler.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=9564
+ A bunch of fixes to run-webkit-httpd
+
+ - Add an -all-interfaces (-a) flag to bind to all interfaces, not just
+ 127.0.0.1. Useful for testing with WinIE running on another machine;
+ - don't call checkFrameworks() - we do not need a built WebKit here;
+ - changed tabs to spaces;
+ - disable HTTP keepalive (since Apache doesn't spawn sub-processes in
+ interactive mode, they were a hassle when testing with several browsers, as one
+ had to wait for connection to expire);
+ - remove httpd.pid when done, so that Apache doesn't complain next time.
+
+ * Scripts/run-webkit-httpd:
+
+2006-06-24 Jonas Witt <jonas.witt@gmail.com>
+
+ Reviewed by ggaren, landed by ap.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=9181
+ Complete DOMUIEvent Obj-C API to reflect UIEvent
+
+ Add function to enable logging of all events of one DOM node to stdout.
+
+ * DumpRenderTree/EventSendingController.h:
+ * DumpRenderTree/EventSendingController.m:
+ (+[EventSendingController initialize]):
+ (+[EventSendingController isSelectorExcludedFromWebScript:]):
+ (+[EventSendingController webScriptNameForSelector:]):
+ (-[EventSendingController enableDOMUIEventLogging:]):
+ (-[EventSendingController handleEvent:]):
+
+2006-06-23 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ - Made column headers in Drosera resizable.
+
+2006-06-22 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by ggaren.
+
+ - see http://bugs.webkit.org/show_bug.cgi?id=9539
+ Another case error preventing build
+
+ * Scripts/webkitdirs.pm: Building WebKit now requires Xcode 2.3.
+
+2006-06-22 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Eric.
+
+ Adds a native toolbar to Drosera to be a good citizen.
+ Adds a Debug menu with key-commands for Continue, Pause and Step Into.
+ Fixes a dragging bug from an earlier fix to the divider code.
+ Fixes some poor indenting in debugger.js.
+
+ * Drosera/DebuggerDocument.h:
+ * Drosera/DebuggerDocument.m:
+ (-[DebuggerDocument stepInto]):
+ (-[DebuggerDocument pause:]):
+ (-[DebuggerDocument resume:]):
+ (-[DebuggerDocument stepInto:]):
+ (-[DebuggerDocument windowDidLoad]):
+ (-[DebuggerDocument toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar:]):
+ (-[DebuggerDocument toolbarDefaultItemIdentifiers:]):
+ (-[DebuggerDocument toolbarAllowedItemIdentifiers:]):
+ (-[DebuggerDocument validateUserInterfaceItem:]):
+ * Drosera/English.lproj/MainMenu.nib/classes.nib:
+ * Drosera/English.lproj/MainMenu.nib/info.nib:
+ * Drosera/English.lproj/MainMenu.nib/keyedobjects.nib:
+ * Drosera/debugger.css:
+ * Drosera/debugger.html:
+ * Drosera/debugger.js:
+ * Drosera/viewer.html:
+
+2006-06-22 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Anders.
+
+ - Added pressed column header image.
+ - Made column headers behave more like Xcode.
+
+2006-06-22 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Code clean up. Adds the stackframe and makes only the body
+ of the tables scrollable keeping the header visible.
+ Shows the current function stack when paused or stepping.
+
+ * Drosera/DebuggerApplication.m:
+ (-[DebuggerApplication awakeFromNib]):
+ (-[DebuggerApplication numberOfRowsInTableView:]):
+ (-[DebuggerApplication tableView:objectValueForTableColumn:row:]):
+ * Drosera/DebuggerDocument.h:
+ * Drosera/DebuggerDocument.m:
+ (-[DebuggerDocument dealloc]):
+ (-[DebuggerDocument currentFrame]):
+ (-[DebuggerDocument currentFrameFunctionName]):
+ (-[DebuggerDocument currentFunctionStack]):
+ (-[DebuggerDocument log:]):
+ (-[DebuggerDocument windowWillClose:]):
+ (-[DebuggerDocument webView:didEnterCallFrame:sourceId:line:forWebFrame:]):
+ (-[DebuggerDocument webView:willLeaveCallFrame:sourceId:line:forWebFrame:]):
+ * Drosera/Drosera.xcodeproj/project.pbxproj:
+ * Drosera/debugger.css:
+ * Drosera/debugger.html:
+ * Drosera/debugger.js:
+
+2006-06-22 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Anders.
+
+ Teach run-webkit-httpd to properly look for webkitdirs.pm.
+
+ * Scripts/run-webkit-httpd:
+
+2006-06-22 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ - More progress toward Javascript Debugger.
+ - Added some new images to the project.
+
+2006-06-21 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Anders.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=9516
+ Would like a script to run a httpd server with the same configuration as run-webkit-tests http
+
+ * Scripts/run-webkit-httpd: Added.
+
+2006-06-20 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Eric.
+
+ Builds Drosera and a launcher to include with the nightly.
+
+ * BuildSlaveSupport/build-launcher-app:
+ * BuildSlaveSupport/build-launcher-dmg:
+ * Drosera/Drosera.xcodeproj/project.pbxproj:
+ * Drosera/Info.plist:
+ * Drosera/LauncherInfo.plist: Added.
+ * Drosera/launcher.m: Added.
+ (displayErrorAndQuit):
+ (checkMacOSXVersion):
+ (myExecve):
+ (main):
+ * Scripts/build-drosera
+ * WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj:
+ * WebKitLauncher/main.m:
+ (main):
+
+2006-06-20 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Adds a JavaScript debugger, called Drosera. Named after
+ a genus of bug eating plants.
+
+ * Drosera/DebuggerApplication.h: Added.
+ * Drosera/DebuggerApplication.m: Added.
+ (-[DebuggerApplication applicationDidFinishLaunching:]):
+ (-[DebuggerApplication serverLoaded:]):
+ (-[DebuggerApplication serverUnloaded:]):
+ (-[DebuggerApplication awakeFromNib]):
+ (-[DebuggerApplication showAttachPanel:]):
+ (-[DebuggerApplication attach:]):
+ (-[DebuggerApplication numberOfRowsInTableView:]):
+ (-[DebuggerApplication tableView:objectValueForTableColumn:row:]):
+ (-[DebuggerApplication tableView:willDisplayCell:forTableColumn:row:]):
+ (-[DebuggerApplication tableViewSelectionDidChange:]):
+ * Drosera/DebuggerDocument.h: Added.
+ * Drosera/DebuggerDocument.m: Added.
+ (+[WebScriptCallFrame isSelectorExcludedFromWebScript:]):
+ (+[WebScriptCallFrame isKeyExcludedFromWebScript:]):
+ (+[DebuggerDocument isSelectorExcludedFromWebScript:]):
+ (+[DebuggerDocument isKeyExcludedFromWebScript:]):
+ (-[DebuggerDocument initWithServerName:]):
+ (-[DebuggerDocument windowWillClose:]):
+ (-[DebuggerDocument dealloc]):
+ (-[DebuggerDocument isPaused]):
+ (-[DebuggerDocument pause]):
+ (-[DebuggerDocument resume]):
+ (-[DebuggerDocument step]):
+ (-[DebuggerDocument windowNibName]):
+ (-[DebuggerDocument windowDidLoad]):
+ (-[DebuggerDocument switchToServerNamed:]):
+ (-[DebuggerDocument applicationTerminating:]):
+ (-[DebuggerDocument serverConnectionDidDie:]):
+ (-[DebuggerDocument webView:windowScriptObjectAvailable:]):
+ (-[DebuggerDocument webView:didFinishLoadForFrame:]):
+ (-[DebuggerDocument webView:didParseSource:fromURL:sourceId:forWebFrame:]):
+ (-[DebuggerDocument webView:didEnterCallFrame:sourceId:line:forWebFrame:]):
+ (-[DebuggerDocument webView:willExecuteStatement:sourceId:line:forWebFrame:]):
+ (-[DebuggerDocument webView:willLeaveCallFrame:sourceId:line:forWebFrame:]):
+ * Drosera/Drosera.pch: Added.
+ * Drosera/Drosera.xcodeproj/project.pbxproj: Added.
+ * Drosera/English.lproj/Debugger.nib/classes.nib: Added.
+ * Drosera/English.lproj/Debugger.nib/info.nib: Added.
+ * Drosera/English.lproj/Debugger.nib/keyedobjects.nib: Added.
+ * Drosera/English.lproj/MainMenu.nib/classes.nib: Added.
+ * Drosera/English.lproj/MainMenu.nib/info.nib: Added.
+ * Drosera/English.lproj/MainMenu.nib/keyedobjects.nib: Added.
+ * Drosera/Images/breakPoint.tif: Added.
+ * Drosera/Images/breakPointDisabled.tif: Added.
+ * Drosera/Images/continue.tif: Added.
+ * Drosera/Images/finishFunction.tif: Added.
+ * Drosera/Images/glossyFooterFill.tif: Added.
+ * Drosera/Images/glossyHeader.png: Added.
+ * Drosera/Images/gradientBackground.png: Added.
+ * Drosera/Images/gutter.png: Added.
+ * Drosera/Images/navLeftDisabled.png: Added.
+ * Drosera/Images/navLeftNormal.png: Added.
+ * Drosera/Images/navLeftPressed.png: Added.
+ * Drosera/Images/navRightDisabled.png: Added.
+ * Drosera/Images/navRightNormal.png: Added.
+ * Drosera/Images/navRightPressed.png: Added.
+ * Drosera/Images/pause.tif: Added.
+ * Drosera/Images/popUpArrows.png: Added.
+ * Drosera/Images/programCounter.tif: Added.
+ * Drosera/Images/programCounterBreakPoint.tif: Added.
+ * Drosera/Images/programCounterBreakPointDisabled.tif: Added.
+ * Drosera/Images/run.tif: Added.
+ * Drosera/Images/splitterBar.tif: Added.
+ * Drosera/Images/splitterDimple.tif: Added.
+ * Drosera/Images/step.tif: Added.
+ * Drosera/Images/stepOver.tif: Added.
+ * Drosera/Images/stop.tif: Added.
+ * Drosera/Images/toolbarBackground.png: Added.
+ * Drosera/Info.plist: Added.
+ * Drosera/debugger.css: Added.
+ * Drosera/debugger.html: Added.
+ * Drosera/debugger.js: Added.
+ * Drosera/main.m: Added.
+ (main):
+ * Drosera/viewer.css: Added.
+ * Drosera/viewer.html: Added.
+
+2006-06-18 David Kilzer <ddkilzer@kilzer.net>
+
+ Reviewed by darin.
+
+ http://bugs.webkit.org/show_bug.cgi?id=9485
+ Teach svn-apply and svn-unapply to use full path names
+
+ * Scripts/svn-apply: Changed to use full path names. Cleaned up code.
+ * Scripts/svn-unapply: Ditto.
+
+2006-06-18 David Kilzer <ddkilzer@kilzer.net>
+
+ Reviewed by ggaren.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=9150
+ DumpRenderTree should be able to keep URL history during runs
+
+ Test: LayoutTests/fast/history/clicked-link-is-visited.html
+
+ * DumpRenderTree/DumpRenderTree.m: Add keepWebHistory function to layoutTestController
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]): Updated for keepWebHistory.
+ (-[LayoutTestController keepWebHistory]): Added. We only set optional shared history if
+ it is currently nil since keepWebHistory() might be called more than once incidentally
+ for the same test.
+ (dumpRenderTree): Set optional shared history in WebHistory to nil by default.
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Xcode 2.3 clean up.
+
+2006-06-11 David Kilzer <ddkilzer@kilzer.net>
+
+ Reviewed by darin.
+
+ http://bugs.webkit.org/show_bug.cgi?id=9395
+ Make prepare-ChangeLog faster
+
+ * Scripts/prepare-ChangeLog: Use "svn diff" instead of "svn stat" to find changed files,
+ then save the diff output for reuse. Keep a status variable if changes are made to
+ LayoutTests so "svn diff LayoutTests" doesn't have to be run to check for changes when
+ WebCore is updated. Added -h|--help command-line switch and help message. Move test
+ for no changed files closer to the beginning of the program.
+
+2006-06-10 Mitz Pettel <opendarwin.org@mitzpettel.com>
+
+ Reviewed and landed by ap.
+
+ - make DumpRenderTree build
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (-[WaitUntilDoneDelegate webView:didCommitLoadForFrame:]): Changed _updateFocusState to _updateActiveState
+ (-[WaitUntilDoneDelegate webViewFocus:]): Ditto.
+ (-[LayoutTestController setWindowIsKey:]): Ditto.
+ (-[LayoutTestController setMainFrameIsFirstResponder:]): Ditto.
+
+2006-06-09 David Kilzer <ddkilzer@kilzer.net>
+
+ Reviewed by Darin, landed by Geoff.
+
+ http://bugs.webkit.org/show_bug.cgi?id=9350
+ Use pathcmp() when sorting paths in svn-create-patch
+
+ * Scripts/run-webkit-tests: Fixed splitpath() to use File::Basename subroutines instead of regex.
+ * Scripts/svn-create-patch: Copied numericcmp(), pathcmp() and splitpath() from run-webkit-tests.
+ Changed sort() functions to use pathcmp(). Added subroutine prototypes. Added -h command-line
+ switch and printUsage() subroutine.
+
+2006-06-06 David Kilzer <ddkilzer@kilzer.net>
+
+ Reviewed by darin.
+
+ http://bugs.webkit.org/show_bug.cgi?id=9322
+ Teach svn-create-patch to sort its output
+
+ * Scripts/svn-create-patch: Clean up perl code. Sort patch output alphabetically
+ by text files first, then by binary files.
+
+2006-06-04 David Kilzer <ddkilzer@kilzer.net>
+
+ Reviewed by darin.
+
+ http://bugs.webkit.org/show_bug.cgi?id=9299
+ Teach svn-create-patch and friends to work with binary files
+
+ * Scripts/svn-apply: Updated to use base64-encoded text for binary files when applying patches.
+ * Scripts/svn-create-patch: Updated to include binary file content as base64-encoded text in patches.
+ * Scripts/svn-unapply: Updated to recognize binary files when unapplying patches.
+
+2006-06-03 David Kilzer <ddkilzer@kilzer.net>
+
+ Reviewed by Maciej.
+
+ http://bugs.webkit.org/show_bug.cgi?id=9296
+ Performance improvement for svn-create-patch
+
+ * Scripts/svn-create-patch: Undef $indexPath after all paths have been fixed for a given patch.
+
+2006-06-03 David Kilzer <ddkilzer@kilzer.net>
+
+ Reviewed by darin.
+
+ http://bugs.webkit.org/show_bug.cgi?id=9290
+ Teach svn-apply and svn-unapply to patch ChangeLogs cleanly
+
+ * Scripts/svn-apply: Fixed to apply ChangeLog patches without failing.
+ * Scripts/svn-unapply: Ditto. Also simplified reversing a deletion.
+
+2006-06-03 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by hyatt.
+
+ Switch Spinneret to new hosting mechanism
+
+ * Spinneret/Spinneret.sln:
+ * Spinneret/Spinneret/Spinneret.cpp:
+ (SpinneretWebHost::updateAddressBar):
+ (SpinneretWebHost::QueryInterface):
+ (SpinneretWebHost::AddRef):
+ (SpinneretWebHost::Release):
+ (resizeSubViews):
+ (_tWinMain):
+ (WndProc):
+ (MyEditProc):
+ (About):
+ (loadURL):
+ * Spinneret/Spinneret/Spinneret.h:
+ (SpinneretWebHost::didStartProvisionalLoadForFrame):
+ (SpinneretWebHost::didReceiveServerRedirectForProvisionalLoadForFrame):
+ (SpinneretWebHost::didFailProvisionalLoadWithError):
+ (SpinneretWebHost::didCommitLoadForFrame):
+ (SpinneretWebHost::didReceiveTitle):
+ (SpinneretWebHost::didReceiveIcon):
+ (SpinneretWebHost::didFinishLoadForFrame):
+ (SpinneretWebHost::didFailLoadWithError):
+ (SpinneretWebHost::didChangeLocationWithinPageForFrame):
+ (SpinneretWebHost::willPerformClientRedirectToURL):
+ (SpinneretWebHost::didCancelClientRedirectForFrame):
+ (SpinneretWebHost::willCloseFrame):
+ (SpinneretWebHost::windowScriptObjectAvailable):
+ * Spinneret/Spinneret/Spinneret.vcproj:
+
+2006-06-02 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by darin.
+
+ Updated build script
+
+ * Scripts/build-webkit:
+
+2006-06-01 Anders Carlsson <acarlsson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (-[LayoutTestController clearBackForwardList]):
+ Add clearBackForwardList function to layoutTestController
+
+2006-06-01 Anders Carlsson <acarlsson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ http://bugs.webkit.org/show_bug.cgi?id=8996
+ slow-utf8-text layout test case failing (no longer deterministic?)
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (dump):
+ Dump as text when the response MIME type is text/plain
+
+2006-05-26 Steve Falkenburg <sfalken@apple.com>
+
+ Build fixes/tweaks
+
+ * Spinneret/Spinneret.sln:
+ * Spinneret/Spinneret/Spinneret.vcproj:
+
+2006-05-24 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by mjs.
+
+ Added 'GCController' to DRT to support garbage collection layout tests.
+
+ GCController.collect() and GCController.collectOnAlternateThread() do
+ what you would expect. The latter takes a boolean argument sepcifying
+ whether to wait for garbage collection to finish before continuing to
+ execute script.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (-[WaitUntilDoneDelegate webView:windowScriptObjectAvailable:]):
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/GCController.h: Added.
+ * DumpRenderTree/GCController.mm: Added.
+ (+[GCController isSelectorExcludedFromWebScript:]):
+ (+[GCController webScriptNameForSelector:]):
+ (-[GCController collect]):
+ (-[GCController collectOnAlternateThread:]):
+
+2006-05-23 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Maciej.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ Newer Xcode removed some obsolete cruft
+
+ * DumpRenderTree/TextInputController.m:
+ (-[TextInputController textInput]):
+ added (id) cast to make newer compiler happy
+
+2006-05-22 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by adele.
+
+ Fix build.
+
+ * Spinneret/Spinneret.sln:
+
+2006-05-18 Darin Adler <darin@apple.com>
+
+ - try to fix no-SVG, no-XPATH build, again
+
+ * Scripts/build-webkit: Use FEATURE_DEFINES= instead of FEATURE_DEFINES=''.
+
+2006-05-18 Darin Adler <darin@apple.com>
+
+ - try to fix no-SVG, no-XPATH build
+
+ * Scripts/build-webkit: Pass FEATURE_DEFINES rather than GCC_PREPROCESSOR_DEFINITIONS,
+ since the former is what's used in the WebCore project now.
+
+2006-05-17 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Some more future renames.
+
+2006-05-16 Adele Peterson <adele@apple.com>
+
+ Reviewed by Hyatt.
+
+ * Scripts/do-webcore-rename: Added RenderTextField => RenderTextControl and
+ HTMLTextFieldInnerElement => HTMLTextControlInnerElement to list for future renames.
+
+2006-05-15 Alexey Proskuryakov <ap@nypop.com>
+
+ * Scripts/install-unix-extras: Changed to be executable and removed
+ text in the file generated by "svn diff".
+ * Scripts/regenerate-makefiles: Ditto.
+
+2006-05-13 Kevin M. Ollivier <kevino@theolliviers.com>
+
+ Reviewed by Darin, landed by ap.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=8528
+ Bakefiles (and generated Makefiles) for wx and gdk ports
+
+ * Scripts/install-unix-extras: Added.
+ * Scripts/regenerate-makefiles: Added.
+
+2006-05-10 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Maciej.
+
+ Fix registry usage from perl script. Turns out libwin32's
+ SetRegValueEx, even for REG_DWORD, always takes its value as a string!
+
+ * Scripts/install-win-extras:
+
+2006-05-09 Steve Falkenburg <sfalken@apple.com>
+
+ Fix Windows build.
+ Add load ended callback.
+
+ Reviewed by kevin.
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.vcproj: Fix include paths
+ * Scripts/build-webkit: Build WebKitWin instead of WebCore/JavaScriptCore (WebKitWin builds those indirectly).
+ * Spinneret/Spinneret/Spinneret.cpp:
+ (SpinneretWebHost::loadEnd): Add callback for loadEnd() to determine success/failure of page load.
+ (_tWinMain): Load built-in test content here instead of in lower-level code.
+ * Spinneret/Spinneret/Spinneret.h: Add loadEnd() callback.
+
+2006-05-08 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Anders.
+
+ * Scripts/extract-localizable-strings: Update for correct names of log macros.
+
+2006-05-09 Anders Carlsson <acarlsson@apple.com>
+
+ Reviewed by Maciej.
+
+ * Scripts/check-dom-results:
+ Add XPath to the list of results.
+
+2006-05-08 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Add another rename.
+
+2006-05-01 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by eric.
+
+ Spinneret now links against the new separate lib.
+
+ * Spinneret/Spinneret.sln:
+ * Spinneret/Spinneret/Spinneret.cpp:
+ (SpinneretWebHost::updateLocationBar):
+ (_tWinMain):
+ * Spinneret/Spinneret/Spinneret.h:
+ * Spinneret/Spinneret/Spinneret.vcproj:
+ * Spinneret/Spinneret/WebFrame.cpp: Removed.
+ * Spinneret/Spinneret/WebFrame.h: Removed.
+ * Spinneret/Spinneret/WebView.cpp: Removed.
+ * Spinneret/Spinneret/WebView.h: Removed.
+
+2006-04-28 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by kdecker
+
+ Modify error reporting registry keys to disable Dr. Watson.
+ This allows Javascript test cases to complete without blocking UI.
+
+ * Scripts/install-win-extras:
+ - Use Perl Win32 registry functions to disable blocking UI
+
+
+2006-04-28 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by eric.
+
+ Turned off C++ exceptions, fixed memory leaks
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.vcproj:
+ * Spinneret/Spinneret.sln:
+ * Spinneret/Spinneret/Spinneret.cpp:
+ (_tWinMain):
+ * Spinneret/Spinneret/Spinneret.vcproj:
+ * Spinneret/Spinneret/WebFrame.cpp:
+ (WebKit::WebFrame::WebFramePrivate::~WebFramePrivate):
+ (WebKit::WebFrame::WebFrame):
+ (WebKit::WebFrame::~WebFrame):
+ (WebKit::WebFrame::impl):
+ * Spinneret/Spinneret/WebFrame.h:
+ * Spinneret/Spinneret/WebView.cpp:
+ * Spinneret/Spinneret/stdafx.h:
+
+2006-04-28 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Darin Adler.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=8633
+ DumpRenderTree should reset the URL cache
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main): Call [[NSURLCache sharedURLCache] removeAllCachedResponses].
+
+2006-04-28 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by andersca.
+
+ * Scripts/do-webcore-rename: rename KCanvasContainer too
+ * Scripts/run-webkit-tests: output total time
+
+2006-04-26 Mitz Pettel <opendarwin.org@mitzpettel.com>
+
+ Reviewed by hyatt. Landed by eseidel.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=8549
+ Enable detection of excessive repainting with DumpRenderTree
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (-[LayoutTestController display]):
+
+2006-04-23 Mitz Pettel <opendarwin.org@mitzpettel.com>
+
+ Reviewed by Darin Adler.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=6905
+ DumpRenderTree needs a way to force painting (to allow invalidation tests)
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (dump): If display() has been called during the test, grab the pixels from
+ the view, after letting it repaint invalidated rects.
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (-[LayoutTestController display]): Added. Calls -display on the view
+ and changes the subsequent behavior of dump().
+ (dumpRenderTree):
+
+2006-04-22 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Maciej.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=8532
+ Update iExploder to 1.3.2
+
+ Test case numbers are not compatible with iExploder 1.2.
+
+ * Scripts/run-iexploder-tests: Print the numbers of the last five tests that were accessed.
+
+ * iExploder/CHANGELOG.txt: Added.
+ * iExploder/LICENSE.txt: Changed to a standard zlib/png license.
+ * iExploder/README.txt: Added some performance hints.
+
+ * iExploder/htdocs/config.rb: Added.
+ * iExploder/htdocs/cssproperties.in:
+ * iExploder/htdocs/cssvalues.in:
+ * iExploder/htdocs/htmlattrs.in:
+ * iExploder/htdocs/htmltags.in:
+ * iExploder/htdocs/iexploder.cgi:
+ - Updated to support the latest HTML & CSS tags, properties, and values from both
+ the WebKit and Mozilla CVS tree
+ - cssproperties.in cleanup
+ - Modularized the code a little bit.
+ - Fix subtest bug that was causing last 5 tags to be missed
+ - new subtest algorithm to deal better with larger tag counts
+ - default HTML_MAX_TAGS increased from 32 to 96
+
+ * iExploder/htdocs/index.html: Updated version to 1.3.2.
+ * iExploder/htdocs/webserver.rb: Added. New standalone webserver, can be used as an
+ alternative to our run-iexploder-tests.
+ * iExploder/tools/showtest.rb: Added. Similar to run-iexploder-tests --get.
+ * iExploder/htdocs/iexploder.rb: Added. Used by webserver.rb.
+ * iExploder/tools/osx_last_crash.rb: Find logs modified in the last two days.
+
+2006-04-22 Alexey Proskuryakov <ap@nypop.com>
+
+ - commit Scripts/run-mangleme-tests (missed it the previous time).
+
+2006-04-18 Darin Adler <darin@apple.com>
+
+ - attempt to fix Windows buildbot
+
+ * Scripts/install-win-extras: Temporarily changed URLs to fr.rpmfind.net.
+ We need a better long-term solution for this.
+
+2006-04-17 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Darin Adler.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=8444
+ Integrate mangleme test script.
+
+ Works in a similar way to run-iexploder-tests.
+
+ * Scripts/run-mangleme-tests: Added.
+ * mangleme: Added.
+ * mangleme/Makefile: Added.
+ * mangleme/README: Added.
+ * mangleme/mangle.cgi.c: Added.
+ * mangleme/remangle.cgi.c: Added.
+ * mangleme/tags.h: Added.
+
+2006-04-17 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Darin Adler.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=8443
+ An easier way to save iExploder tests.
+
+ * Scripts/run-iexploder-tests: Added a --get option to save a test into a file.
+
+2006-04-17 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Darin Adler.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=8421
+ Integrate iExploder test script.
+
+ This script generates artificially mangled HTML documents, to test that the browser
+ doesn't crash when handling ill-formed code.
+
+ How to use:
+ run-iexploder-tests Open an interactive test page in Safari+ToT.
+ run-iexploder-tests nnnnn Open test #nnnnn.
+
+ Command line options:
+ --guard-malloc (-g) Use Guard Malloc.
+ --port=nnnn Run Apache on port nnnn (default is 8000).
+
+ To save a crashing test, you can use curl while the crash reporter dialog is on the screen
+ (thus, Apache is still running), e.g.:
+ curl -o iexploder293.html "http://127.0.0.1:8000/iexploder.cgi?lookup=1&test=293"
+
+ Additionally, there are some useful scripts in WebKitTools/iExploder/tools directory.
+
+ * Scripts/run-iexploder-tests: Added.
+ * iExploder: Added.
+ * iExploder/LICENSE.txt: Added.
+ * iExploder/README.txt: Added.
+ * iExploder/htdocs: Added.
+ * iExploder/htdocs/cssproperties.in: Added.
+ * iExploder/htdocs/cssvalues.in: Added.
+ * iExploder/htdocs/htmlattrs.in: Added.
+ * iExploder/htdocs/htmltags.in: Added.
+ * iExploder/htdocs/htmlvalues.in: Added.
+ * iExploder/htdocs/iexploder.cgi: Added.
+ * iExploder/htdocs/index.html: Added.
+ * iExploder/tools: Added.
+ * iExploder/tools/lasthit.rb: Added.
+ * iExploder/tools/osx_last_crash.rb: Added.
+
+2006-04-16 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Darin Adler.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=8412
+ Restore color profile after a crash
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (crashHandler): Added a handler for signals that are raised on a crash. Keeping separate
+ from the existing handler for manual interruption (SIGINT/SIGHUP/SIGTERM), because
+ I'm trying to find a way to prevent the Crash Reporter dialog from appearing on crash,
+ and this code may change significantly.
+
+ (main): Install crashHandler.
+
+ (setDefaultColorProfileToRGB): Properly convert CFStringRef to a char buffer
+ (CFStringGetCStringPtr should NEVER EVER be used!).
+
+2006-04-15 Darin Adler <darin@apple.com>
+
+ Reviewed by Eric.
+
+ * Scripts/install-win-extras: Try to fix the Windows build by fixing the URLs here.
+ Seems xmlsoft.org's HTTP no longer has what we need.
+
+2006-04-13 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Rubber-stamped by Darin Adler.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=8348
+ upload-disk-image stage on buildslaves fail with "No space left on device"
+
+ * BuildSlaveSupport/build-launcher-dmg: Use the -srcfolder option to
+ 'hdiutil create'. This creates the initial disk image based on the size of
+ the source folder, and copies the contents to the new disk image. The file
+ extension on the temporary uncompressed disk image has also been altered from
+ ".uncompressed" to ".uncompressed.dmg" as hdiutil on 10.4.6 Intel fails when
+ the extension is not ".dmg".
+
+2006-04-12 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by Tim H.
+
+ * Scripts/update-webkit: Make this return non-zero when svn fails.
+
+2006-04-10 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Darin Adler.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=8157
+ Make HTTP tests using Perl use .pl extension
+
+ * Scripts/run-webkit-tests: Added support for running .pl and .php tests,
+ removed support for .text. Reduced the number of places that explicitly list supported
+ extensions. Some of the changes come from bug 8121, the patch for which got landed only
+ partially.
+
+2006-04-06 Darin Adler <darin@apple.com>
+
+ Changes requested by Mark Rowe.
+
+ * BuildSlaveSupport/build-launcher-app: Set executable bit, removed property change
+ trash at the end of the file.
+ * BuildSlaveSupport/build-launcher-dmg: Ditto.
+
+ * WebKitLauncher/main.m: Removed trash at end of file.
+
+ * WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj: Let Xcode update comments
+ to make name match.
+
+2006-04-06 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed by Darin, landed by Maciej.
+
+ * BuildSlaveSupport/build-launcher-app: Added. Builds WebKit.app from WebKitLauncher
+ and bundles the WebKit frameworks inside it.
+ * BuildSlaveSupport/build-launcher-dmg: Added. Builds, and optionally uploads, a disk image
+ containing WebKit.app.
+ * BuildSlaveSupport/run-performance-tests: Use currentSVNRevision.
+ * Scripts/webkitdirs.pm: Add currentSVNRevision to retrieve the revision
+ number of the SVN working copy.
+ * WebKitLauncher: Added.
+ * WebKitLauncher/Info.plist: Added.
+ * WebKitLauncher/WebKitLauncher.xcodeproj: Added.
+ * WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj: Added.
+ * WebKitLauncher/WebKitNightlyEnabler.m: Added. This makes
+ up the WebKitNightlyEnabler dylib which is loaded into Safari's address space
+ to cause LaunchServices to treat Safari.app as WebKit.app when it is run from
+ the nightly launcher.
+ * WebKitLauncher/main.m: Added. The WebKit.app launcher.
+ It sets up the environment to have Safari use the bundled frameworks
+ and load the WebKitNightlyEnabler dylib before exec'ing Safari
+ * WebKitLauncher/start.html: Added.
+ * WebKitLauncher/webkit.icns: Added.
+
+2006-04-05 Darin Adler <darin@apple.com>
+
+ Reviewed by Maciej.
+
+ * Scripts/check-for-global-initializers: Remove StringImpl from the list of files that
+ are allowed to have global initializers.
+
+2006-04-05 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by OMG BETH
+
+ * Scripts/run-testkjs:
+ - pipe STDERR to /dev/null by default; new --verbose option overrides
+ this behavior
+ - set DYLD_FRAMEWORK_PATH to the webkit-configured path
+ - output run command in a format that can be copied and pasted into the
+ terminal to run manually
+
+2006-04-03 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by harrison
+
+ <http://bugs.webkit.org/show_bug.cgi?id=7567>
+ A drag and drop in DumpRenderTree copies the source, instead of cutting it
+
+ Tell the source that the drag is over after the drag is performed, not before.
+
+ * DumpRenderTree/EventSendingController.m:
+ (-[EventSendingController mouseUp]):
+
+2006-04-01 Darin Adler <darin@apple.com>
+
+ Reviewed by Justin.
+
+ * DumpRenderTree/EventSendingController.m: (-[EventSendingController keyDown:withModifiers:]):
+ Fixed keyDown function so that it will work if you don't pass an array of modifiers or if
+ elements in that array are not strings.
+
+2006-03-31 Darin Adler <darin@apple.com>
+
+ Reviewed by John Sullivan.
+
+ - added a "--reset-results" option to run-webkit-tests so you can reset
+ the results without first deleting expected results
+ - <rdar://problem/4185878> add scroll position to dumpRenderTree
+
+ * Scripts/run-webkit-tests: Rearranged the code a bit to make the sequence
+ more logical. Moved all the subroutines to the end of the file. Added a
+ "--force" option.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main): Added a new --dump-all-pixels option, used when forcing run-webkit-tests
+ to generate new output for all tests it runs.
+ (dump): Dump the scroll position if it's non-zero. Always dump the image when
+ the --dump-all-pixels option is passed. Also tightened up the image dumping
+ code and replaced the incorrect use of +[NSGraphicsContext saveGraphicsState]
+ with code to save and restore the context.
+
+ * DumpRenderTree/DumpRenderTree.h: Tweaked includes a bit and added (void).
+ * DumpRenderTree/EventSendingController.m: Added now-needed include.
+
+2006-03-30 Tim Omernick <timo@apple.com>
+
+ * DumpRenderTree/ObjCPlugin.h:
+ Fixed copyright.
+ * DumpRenderTree/ObjCPlugin.m: ditto
+ * DumpRenderTree/ObjCPluginFunction.h: ditto
+ * DumpRenderTree/ObjCPluginFunction.m: ditto
+
+2006-03-30 Tim Omernick <timo@apple.com>
+
+ Reviewed by Geoff.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (-[WaitUntilDoneDelegate webView:windowScriptObjectAvailable:]):
+ Add "objCPlugin", "objCPluginFunction" properties to the window. objCPlugin simulates
+ an Objective C object exposed to JS; objCPluginFunction simulates an Objective C method
+ exposed to JS as a callable object.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ Added ObjCPlugin.[hm], ObjCPluginFunction.[hm].
+
+ * DumpRenderTree/ObjCPlugin.h: Added.
+ * DumpRenderTree/ObjCPlugin.m: Added.
+ * DumpRenderTree/ObjCPluginFunction.h: Added.
+ * DumpRenderTree/ObjCPluginFunction.m: Added.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
+ Added a new method, "removeDefaultMethod", which removes the default method from the
+ plugin object's class. The effect is that the plugin object is mutated from a callable
+ function to a simple object.
+ (pluginInvoke):
+ Handle "removeDefaultMethod".
+ (pluginInvokeDefault):
+ Made the default method actually do something (return 1).
+
+2006-03-30 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by ggaren.
+
+ Remove WebFrame::viewImpl(), setMainFrame on page.
+
+ * Spinneret/Spinneret/WebFrame.cpp:
+ (WebKit::WebFrame::WebFrame):
+ * Spinneret/Spinneret/WebFrame.h:
+ * Spinneret/Spinneret/WebView.cpp:
+ (WebKit::WebView::mouseMoved):
+ (WebKit::WebView::mouseDown):
+ (WebKit::WebView::mouseUp):
+ (WebKit::WebView::mouseDoubleClick):
+ (WebKit::WebViewWndProc):
+
+2006-03-30 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by hyatt.
+
+ Fix html editing input & basic form submission.
+
+ * Spinneret/Spinneret/WebFrame.cpp:
+ (WebKit::WebFrame::submitForm):
+ (WebKit::WebFrame::loadURL):
+ * Spinneret/Spinneret/WebFrame.h:
+ * Spinneret/Spinneret/WebView.cpp:
+ (WebKit::WebView::keyPress):
+ (WebKit::WebViewWndProc):
+
+2006-03-28 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by darin
+
+ <rdar://problem/4402375>
+ REGRESSION (417.8-TOT): selectionRect sometimes includes adjacent images
+
+ Added an option to draw the selectionRect.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (dump):
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (-[LayoutTestController dumpSelectionRect]):
+ (dumpRenderTree):
+
+2006-03-29 Darin Adler <darin@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ - make the global initializer check work on Xcode 2.1 (although it's better on 2.2)
+
+ * Scripts/check-for-global-initializers: Use NATIVE_ARCH if there is no CURRENT_ARCH.
+
+2006-03-28 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by darin.
+
+ * Scripts/check-for-global-initializers: remove svg exceptions.
+
+2006-03-28 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Exit gracefully if $ENV{'CURRENT_ARCH'} is undefined. Rolling out my previous change.
+
+ * Scripts/check-for-global-initializers:
+
+2006-03-28 Timothy Hatcher <timothy@apple.com>
+
+ Build fix. Turn off uninitialized warnings for the first block of code.
+
+ * Scripts/check-for-global-initializers:
+
+2006-03-28 Darin Adler <darin@apple.com>
+
+ Reviewed by Geoff.
+
+ * Scripts/check-for-global-initializers: Added.
+
+2006-03-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
+
+ Reviewed by darin. Landed by eseidel.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=7947
+ Add repaint testing support to run-webkit-tests
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main): Added --repaint and --horizontal-sweep options.
+ (dump): Repaint line-by-line or column-by-column when the appropriate option
+ is selected.
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]): Added testRepaint()
+ and repaintSweepHorizontally() methods to layoutTestController.
+ (-[LayoutTestController testRepaint]):
+ (-[LayoutTestController repaintSweepHorizontally]):
+ (dumpRenderTree):
+ * Scripts/run-webkit-tests: Added --repaint and --horizontal-sweep options
+ to force these settings on tests that do not ask for them.
+
+2006-03-24 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by mjs.
+
+ Build fix.
+
+ * Spinneret/Spinneret/WebFrame.cpp:
+ (WebKit::WebFrame::openURL): replace QString with DeprecatedString
+
+2006-03-21 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Maciej
+
+ Add support for keyDown() to DumpRenderTree.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main): Set the preference for tabbing to links.
+ * DumpRenderTree/EventSendingController.m:
+ (+[EventSendingController isSelectorExcludedFromWebScript:]):
+ (+[EventSendingController webScriptNameForSelector:]):
+ (-[EventSendingController keyDown:withModifiers:]):
+
+2006-03-20 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by hyatt.
+
+ Fix win32 build.
+
+ * Spinneret/Spinneret/Spinneret.vcproj:
+ * Spinneret/Spinneret/WebFrame.h:
+ * Spinneret/Spinneret/WebView.cpp:
+ (WebKit::WebView::mouseMoved):
+ (WebKit::WebView::mouseDown):
+ (WebKit::WebView::mouseUp):
+ (WebKit::WebView::mouseDoubleClick):
+ (WebKit::WebView::keyPress):
+ (WebKit::WebViewWndProc):
+
+2006-03-19 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders.
+
+ * DumpRenderTree/DumpRenderTree.m: (main): Turn on pop-up blocking so that
+ we can test it in layout tests. We don't really need tests that run with
+ pop-up blocking off at the moment. If we do some day, we can add some
+ API for turning it off in the layout test controller.
+
+ * Scripts/run-webkit-tests: Since we don't use NSLanguage at all any more,
+ don't ignore the leak; it should no longer show up.
+
+2006-03-17 Anders Carlsson <andersca@mac.com>
+
+ Reviewed by Eric.
+
+ * Scripts/install-win-extras:
+ Fetch "Program Files" location from the environment.
+
+2006-03-17 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by ggaren.
+
+ Fix Spinneret to pass Events as const & not as pointers.
+
+ * Spinneret/Spinneret/WebView.cpp:
+ (WebKit::WebView::mouseMoved):
+ (WebKit::WebView::mouseDown):
+ (WebKit::WebView::mouseUp):
+ (WebKit::WebView::mouseDoubleClick):
+ (WebKit::WebView::keyPress):
+
+2006-03-17 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by justing.
+
+ Add support for basic HTML editing.
+
+ * Spinneret/Spinneret/WebView.cpp:
+ (WebKit::WebView::WebView):
+ (WebKit::WebView::keyPress):
+
+2006-03-17 Eric Seidel <eseidel@apple.com>
+
+ Rubber-stamped by ggaren.
+
+ Break DumpRenderTree.m up into several files to make the code more readable.
+
+ * DumpRenderTree/DumpRenderTree.h: Added.
+ * DumpRenderTree/DumpRenderTree.m:
+ (doneLoading): new accessor function for "done" global.
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/DumpRenderTreeDraggingInfo.h: Added.
+ * DumpRenderTree/DumpRenderTreeDraggingInfo.m: Added.
+ * DumpRenderTree/EditingDelegate.h: Added.
+ * DumpRenderTree/EditingDelegate.m: Added.
+ (-[EditingDelegate webViewDidChangeSelection:]):
+ * DumpRenderTree/EventSendingController.h: Added.
+ * DumpRenderTree/EventSendingController.m: Added.
+
+2006-03-16 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by darin.
+
+ Add resize, scroll event support.
+
+ * Spinneret/Spinneret/WebView.cpp:
+ (WebKit::WebView::mouseMoved):
+ (WebKit::WebView::mouseDown):
+ (WebKit::WebView::mouseUp):
+ (WebKit::WebView::mouseDoubleClick):
+ (WebKit::WebView::keyPress):
+ (WebKit::WebViewWndProc):
+ * Spinneret/Spinneret/WebView.h:
+
+2006-03-16 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by darin.
+
+ Make build-webkit print correctly to stdout on windows.
+
+ * Scripts/webkitdirs.pm: Fix to use devenv.com instead of devenv.exe
+
+2006-03-15 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by mjs.
+
+ Fix eventSender.mouseClick() to update lastClick timestamp.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (-[EventSendingController mouseClick]):
+
+2006-03-15 Darin Adler <darin@apple.com>
+
+ Reviewed by Maciej.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Fix path
+ that had a lowercase "i" in it so this builds on case-sensitive
+ file systems.
+
+2006-03-15 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Eric.
+
+ Added run-testkjs and compare-timing-files scripts, to support super
+ accurate JS iBench.
+
+ * Scripts/compare-timing-files: Added.
+ * Scripts/run-testkjs: Added.
+
+2006-03-14 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by mjs.
+
+ Make the URL bar relinquish focus on page load.
+
+ * Spinneret/Spinneret/Spinneret.cpp:
+ (MyEditProc):
+
+2006-03-14 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by mjs.
+
+ Fix WebView to allow KeyFocus.
+ Add handling of space and shift-space for scrolling.
+
+ * Spinneret/Spinneret/WebView.cpp:
+ (WebKit::scrollMessageForKey):
+ (WebKit::WebViewWndProc):
+
+2006-03-10 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by hyatt.
+
+ Add scrolling support into Spinneret.
+
+ * Spinneret/Spinneret/WebFrame.cpp:
+ (WebKit::WebFrame::paint):
+ * Spinneret/Spinneret/WebView.cpp:
+ (WebKit::WebView::createWebView):
+ (WebKit::calculateScrollDelta):
+ (WebKit::scrollMessageForKey):
+ (WebKit::WebViewWndProc):
+
+2006-03-13 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by mjs.
+
+ Fix checksum generation on Intel machines.
+ Also moved to CGImage APIs instead of NSBitmapImageRep, may possibly
+ give a small speed boost now that it uses a shared buffer.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main):
+ (dump):
+ (md5HashStringForBitmap):
+ * DumpRenderTree/ImageDiff.m:
+ (computePercentageDifferent):
+
+2006-03-13 Darin Adler <darin@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ * Scripts/run-webkit-tests: Fix httpd handling to work on systems that
+ have it named httpd-1.3 instead.
+
+2006-03-13 Alexey Proskuryakov <ap@nypop.com>
+
+ Fix proposed by Mitz Pettel, reviewed by Darin Adler.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=7718
+ run-webkit-tests fast/dom/HTMLObjectElement/ hangs
+
+ * Scripts/run-webkit-tests: Make test paths canonical, to form proper URLs
+ (sequences of slashes are equivalent to a single slash in POSIX paths, but not
+ in URLs).
+
+2006-03-09 Darin Adler <darin@apple.com>
+
+ Reviewed by John Sullivan.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=7681
+ memory leak in the plug-in tests
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
+ (NPP_Destroy): Added code to release the plug-in object. This is the leak fix.
+ (NPP_SetWindow): Remove unneeded code to store the window pointer.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
+ Moved the browser global in here since it's declared in this file's header.
+ Changed the code to set up the pluginClass structure to not use function
+ pointer casts. Those are dangerous because they can hide many types of mismatch.
+ And indeed when I did this I discovered that many functions were missing their
+ boolean return values or had parameter declarations with the wrong types.
+ (pluginGetProperty): Use STRINGZ_TO_NPVARIANT macro for greater simplicity and
+ clarity. Added boolean return value: return true when successful and false when not.
+ (pluginSetProperty): Added boolean return value, return false since we have no
+ properties we can set.
+ (pluginInvoke): Added boolean return value. Return true when successful and false
+ when not. Use NPVARIANT macros where appropriate. Added a missing release for the
+ return value from calling the browser. Changed code to put the strings in malloc
+ buffers instead of relying on GCC's extension that allows variable-sized arrays
+ on the stack.
+ (pluginInvokeDefault): Added boolean return value, return false since we have no
+ default function to call.
+ (pluginInvalidate): Added missing parameter. Removed comment.
+ (pluginAllocate): Removed unneeded cast. This is C code, not C++, so you don't have
+ to cast the result of malloc.
+ (pluginDeallocate): Removed uneeded cast.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h: Removed some unneeded
+ includes. Changed our PluginObject to use NPObject instead of re-declaring fields
+ that match NPObject's fields. Removed unused NPWindow pointer.
+
+2006-03-09 Mitz Pettel <opendarwin.org@mitzpettel.com>
+
+ Test: fast/events/event-sender-mouse-click.html
+
+ Reviewed by Darin Adler.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=7583
+ DRT hangs when doing eventSender.mouseDown on native widgets
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (+[EventSendingController isSelectorExcludedFromWebScript:]):
+ (-[EventSendingController mouseClick]): Simulates a click in a native
+ widget by queueing a mouseUp before sending the mouseDown, so that
+ the widget's mouse tracking event loop doesn't hang indefinitely.
+
+2006-03-09 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Eric.
+
+ - make link clicks work by handling link click requests
+ from WebCore
+
+ * Spinneret/Spinneret/Spinneret.cpp:
+ (updateLocationBar):
+ * Spinneret/Spinneret/Spinneret.h:
+ * Spinneret/Spinneret/WebFrame.cpp:
+ (WebKit::WebFrame::WebFrame):
+ (WebKit::WebFrame::openURL):
+ (WebKit::WebFrame::loadURL):
+ * Spinneret/Spinneret/WebFrame.h:
+
+2006-03-08 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by mjs.
+
+ Focus URL bar on Spinneret launch, remove border from WebView.
+ Stop WebFrame from deleting the job (prevent crash).
+
+ * Spinneret/Spinneret/Spinneret.cpp:
+ (_tWinMain):
+ * Spinneret/Spinneret/WebFrame.cpp:
+ (WebKit::WebFrame::receivedAllData):
+ (WebKit::WebFrame::paint):
+ * Spinneret/Spinneret/WebView.cpp:
+ (WebKit::WebView::createWebView):
+
+2006-03-09 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Darin Adler.
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
+ (pluginInvoke): Added a method to test getURL.
+
+2006-03-08 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Eric.
+
+ - load URLs, not file paths, in Spinneret
+
+ * Spinneret/Spinneret/Spinneret.cpp:
+ (MyEditProc):
+ * Spinneret/Spinneret/Spinneret.vcproj:
+ * Spinneret/Spinneret/WebFrame.cpp:
+ (WebKit::WebFrame::loadURL):
+ (WebKit::WebFrame::receivedData):
+ (WebKit::WebFrame::receivedAllData):
+ * Spinneret/Spinneret/WebFrame.h:
+ * Spinneret/Spinneret/WebView.cpp:
+ (WebKit::WebView::WebView):
+
+2006-03-08 Darin Adler <darin@apple.com>
+
+ Reviewed by Eric.
+
+ - fixed AppleScript layout test results to not be endian-dependent
+ (Hyatt complained to me about this one)
+
+ * DumpRenderTree/AppleScriptController.m: (-[AppleScriptController doJavaScript:]):
+ Added specific code for dumping LongDateTime, instead of dumping the raw bytes
+ (which are endian-dependent).
+
+2006-03-07 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=7655
+ unwanted output while running layout tests
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (checkedMalloc): Added.
+ (checkedRealloc): Added.
+ (makeLargeMallocFailSilently): Added.
+ (main): Call makeLargeMallocFailSilently.
+
+2006-03-06 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Add some more planned renaming.
+
+2006-03-06 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by hyatt.
+
+ * Spinneret/Spinneret/WebFrame.cpp:
+ (WebKit::WebFrame::paint): force layout before painting
+
+2006-03-06 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by darin
+
+ Sent the windowNumber when sending events.
+ Added leapForward so that we don't have to spend time waiting
+ in layout tests that do mouse operations that require delays.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (+[EventSendingController isSelectorExcludedFromWebScript:]):
+ (+[EventSendingController webScriptNameForSelector:]):
+ (-[EventSendingController currentEventTime]):
+ (-[EventSendingController leapForward:]):
+ (-[EventSendingController mouseDown]):
+ (-[EventSendingController mouseUp]):
+ (-[EventSendingController mouseMoveToX:Y:]):
+
+2006-03-05 Darin Adler <darin@apple.com>
+
+ * Scripts/do-webcore-rename: Fix a couple of things found while testing.
+ Script now works (after landing my two pending patches).
+
+2006-03-05 Darin Adler <darin@apple.com>
+
+ - check in a script to do a "big" rename in WebCore
+ (can be run whenever we're ready to do it)
+
+ * Scripts/do-webcore-rename: Added.
+
+2006-03-05 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Eric.
+
+ * Spinneret/Spinneret/WebFrame.cpp:
+ (WebKit::WebFrame::loadFilePath): Close file when done.
+
+2006-03-05 Mitz Pettel <opendarwin.org@mitzpettel.com>
+
+ Reviewed by Darin, landed by ap.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=7589
+ Mouse moved events do not work in DumpRenderTree
+
+ Test: fast/events/event-sender-mouse-moved.html
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (-[EventSendingController mouseMoveToX:Y:]): Pass the correct windowNumber in the event.
+
+2006-03-04 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by hyatt.
+
+ Take advantage of new GraphicsContext constructor to implement double buffering to avoid tearing.
+ Disable background erase to avoid tearing.
+ Fix potential memory smasher from extra long urls.
+
+ * Spinneret/Spinneret/Spinneret.cpp:
+ (MyRegisterClass):
+ * Spinneret/Spinneret/Spinneret.vcproj:
+ * Spinneret/Spinneret/WebFrame.cpp:
+ (WebKit::WebFrame::loadFilePath):
+ (WebKit::WebFrame::paint):
+ * Spinneret/Spinneret/WebView.cpp:
+ (WebKit::registerWebViewWithInstance):
+
+2006-03-04 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by ggaren.
+
+ Hang WebView pointer off of HWND (gets rid of global hack).
+ Remove MessageBox displayed on url change.
+
+ * Spinneret/Spinneret/Spinneret.cpp:
+ (WndProc):
+ (MyEditProc):
+ * Spinneret/Spinneret/WebView.cpp:
+ (WebKit::registerWebViewWithInstance):
+ (WebKit::WebView::createWebView):
+ (WebKit::WebViewWndProc):
+
+2006-03-04 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Eric.
+
+ Automatically kill httpd if it appears to be already running.
+
+ * Scripts/run-webkit-tests:
+
+2006-03-04 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Eric.
+
+ * Spinneret/Spinneret/WebFrame.cpp:
+ (WebKit::WebFrame::loadFilePath): Improved local file loading.
+
+2006-03-03 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by hyatt.
+
+ A few more fixes to make run-webkit-tests really work on win32.
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.cpp:
+ (localFileTest):
+ * Scripts/run-webkit-tests:
+
+2006-03-03 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by darin.
+
+ Make run-webkit-tests work on win32.
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.cpp:
+ (localFileTest):
+ (dumpRenderTreeMain):
+ (dumpRenderTreeToStdOut):
+ (serializeToStdOut):
+ (main):
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm:
+ * Spinneret/Spinneret/WebView.cpp:
+ (WebKit::WebView::WebView):
+
+2006-03-03 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by mjs.
+
+ Add WebFrame class (to hold Frame and FrameView).
+ Add Location bar support to Spinneret.
+
+ * Spinneret/Spinneret/Spinneret.cpp:
+ (resizeSubViews):
+ (_tWinMain):
+ (WndProc):
+ (MyEditProc):
+ * Spinneret/Spinneret/Spinneret.vcproj:
+ * Spinneret/Spinneret/WebFrame.cpp: Added.
+ (WebKit::WebFrame::WebFramePrivate::WebFramePrivate):
+ (WebKit::WebFrame::WebFramePrivate::~WebFramePrivate):
+ (WebKit::WebFrame::WebFrame):
+ (WebKit::WebFrame::loadFilePath):
+ (WebKit::WebFrame::loadHTMLString):
+ (WebKit::WebFrame::paint):
+ (WebKit::WebFrame::impl):
+ (WebKit::WebFrame::viewImpl):
+ * Spinneret/Spinneret/WebFrame.h: Added.
+ * Spinneret/Spinneret/WebView.cpp:
+ (WebKit::WebView::WebViewPrivate::~WebViewPrivate):
+ (WebKit::WebView::WebView):
+ (WebKit::WebView::windowHandle):
+ (WebKit::WebView::mainFrame):
+ (WebKit::WebView::mouseMoved):
+ (WebKit::WebView::mouseDown):
+ (WebKit::WebView::mouseUp):
+ (WebKit::WebView::mouseDoubleClick):
+ (WebKit::WebViewWndProc):
+ * Spinneret/Spinneret/WebView.h:
+
+2006-03-02 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by ggaren.
+
+ * Spinneret/Spinneret/WebView.cpp:
+ (WebKit::registerWebViewWithInstance):
+ (WebKit::WebView::WebView):
+ (WebKit::WebView::mouseMoved):
+ (WebKit::WebView::mouseDown):
+ (WebKit::WebView::mouseUp):
+ (WebKit::WebView::mouseDoubleClick):
+ (WebKit::WebViewWndProc):
+ * Spinneret/Spinneret/WebView.h:
+
+2006-03-01 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by andersca.
+
+ Make spinneret take advantage of the new GraphicsContextCairo.
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.cpp:
+ (main): updated to match style guidelines.
+ * Spinneret/Spinneret/Spinneret.cpp:
+ (_tWinMain):
+ * Spinneret/Spinneret/WebView.cpp:
+ (WebKit::registerWebViewWithInstance):
+ (WebKit::WebView::WebView):
+ (WebKit::WebView::~WebView):
+ (WebKit::WebView::drawRect):
+ (WebKit::WndProc):
+ * Spinneret/Spinneret/WebView.h:
+
+2006-03-01 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by darin
+
+ Give the events that eventSender sends a unique eventNumber
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (-[EventSendingController mouseDown]):
+ (-[EventSendingController mouseUp]):
+ (-[EventSendingController mouseMoveToX:Y:]):
+
+2006-03-01 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by hyatt.
+
+ Add a stub win32 application to test WebCore drawing on windows.
+
+ * Spinneret: Added.
+ * Spinneret/Spinneret: Added.
+ * Spinneret/Spinneret.sln: Added.
+ * Spinneret/Spinneret/Resource.h: Added.
+ * Spinneret/Spinneret/Spinneret.cpp: Added.
+ (_tWinMain):
+ (MyRegisterClass):
+ (InitInstance):
+ (WndProc):
+ (About):
+ * Spinneret/Spinneret/Spinneret.h: Added.
+ * Spinneret/Spinneret/Spinneret.ico: Added.
+ * Spinneret/Spinneret/Spinneret.rc: Added.
+ * Spinneret/Spinneret/Spinneret.vcproj: Added.
+ * Spinneret/Spinneret/WebView.cpp: Added.
+ (WebKit::WebView::WebViewPrivate::WebViewPrivate):
+ (WebKit::WebView::WebViewPrivate::~WebViewPrivate):
+ (WebKit::registerWebViewWithInstance):
+ (WebKit::WebView::createWebView):
+ (WebKit::WebView::WebView):
+ (WebKit::WebView::~WebView):
+ (WebKit::WebView::drawRect):
+ (WebKit::WebView::windowHandle):
+ (WebKit::WndProc):
+ * Spinneret/Spinneret/WebView.h: Added.
+ * Spinneret/Spinneret/small.ico: Added.
+ * Spinneret/Spinneret/stdafx.cpp: Added.
+ * Spinneret/Spinneret/stdafx.h: Added.
+
+2006-02-28 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by mjs.
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.cpp:
+ (main): add ability to dump render tree and read from a local file.
+
+2006-02-27 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by darin.
+
+ * Scripts/install-win-extras: fix dll permissions & download zlib too.
+
+2006-02-27 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by ggaren.
+
+ Test new KConfig -> PlugInInfoStore change.
+ http://bugs.webkit.org/show_bug.cgi?id=7498
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main): load test netscape plugin
+ * Scripts/run-webkit-tests: style update
+
+2006-02-24 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by mjs.
+
+ Make DumpRenderTree link against icu.
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.vcproj:
+
+2006-02-24 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by mjs.
+
+ Make DumpRenderTree link against libxml, etc.
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.vcproj:
+
+2006-02-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
+
+ Reviewed and landed by Anders.
+
+ Prevent rendering to the offscreen window. -[NSWindow displayIfNeeded] was
+ getting called from the run loop, making the view render each test and thus slowing
+ down the tests.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main): Set the offscreen window to not autodisplay.
+
+2006-02-23 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Darin Adler.
+
+ - Turn http tests back on by default.
+ - Wait for Apache to actually start serving requests.
+ - Get user id from a built-in variable rather than an external command;
+ don't pass the group.
+
+ * Scripts/run-webkit-tests:
+
+2006-02-23 Alexey Proskuryakov <ap@nypop.com>
+
+ Suggested by Mitz Pettel, reviewed by Darin Adler.
+
+ * Scripts/run-webkit-tests: Pass User and Group directives, so that Apache
+ can run CGIs even if the permissions are 700 or 600.
+
+2006-02-23 Darin Adler <darin@apple.com>
+
+ Collaborating with Alexey.
+
+ - turn off http tests by default until we figure out how to get them
+ to run even when permissions on CGI files are 700 instead of 755
+
+ * Scripts/run-webkit-tests: Set $testHTTP to 0 instead of 1 for now.
+
+2006-02-23 Eric Seidel <eseidel@apple.com>
+
+ Add *.user to ignore list.
+
+2006-02-23 Eric Seidel <eseidel@apple.com>
+
+ Remove binary file which shouldn't have been commited (and add to ignore list).
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree.ncb: Removed.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree.suo: Removed.
+
+2006-02-22 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Eric.
+
+ * Scripts/run-webkit-tests: Put Apache log files in the right directory.
+
+2006-02-22 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Fix install-win-extras to not try to re-install setx if installed.
+
+ * Scripts/install-win-extras:
+
+2006-02-22 Eric Seidel <eseidel@apple.com>
+
+ One more file possibly missing from previous commit?
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree.ncb:
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree.suo:
+
+2006-02-22 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by justing.
+
+ Files missing from previous commit.
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree.suo:
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.vcproj:
+
+2006-02-22 Eric Seidel <eseidel@apple.com>
+
+ Rubber-stamped by justing.
+
+ Corrected path for DumpRenderTree.intermediate files
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree.suo:
+
+2006-02-22 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by justing.
+
+ Fixed build-dumprendertree to exit with correct error codes.
+
+ * Scripts/build-dumprendertree:
+
+2006-02-22 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by justing.
+
+ Update build scripts to generalize building on Win32, and allow
+ building of DumpRenderTree on Win32 from build-dumprendertree.
+
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.cpp:
+ (main):
+ * Scripts/build-dumprendertree:
+ * Scripts/build-webkit:
+ * Scripts/webkitdirs.pm:
+
+2006-02-22 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by hyatt.
+
+ * DumpRenderTree/DumpRenderTree.vcproj: Added.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree: Added.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree.ncb: Added.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree.sln: Added.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree.suo: Added.
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.cpp: Added.
+ (_tmain):
+ * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.vcproj: Added.
+ * Scripts/build-webkit: make build-webkit cleanup after itself
+
+2006-02-22 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Darin Adler.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=7409
+ Some minor fixes to http tests.
+
+ * Scripts/run-webkit-tests: Pass CustomLog and ErrorLog directives to httpd.
+
+2006-02-21 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Darin Adler.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=6197
+ Would like to use locally installed Apache for testing.
+
+ Added two run-webkit-tests options:
+ --http (--nohttp) - whether to launch Apache (defaults to yes);
+ --port - which port to listen on (defaults to 8000).
+
+ Tests in LayoutTests/http are not run directly, and Apache is used instead.
+ For example, http/tests/xmlhttprequest/post-content-type.html is loaded as
+ http://127.0.0.1:8000/xmlhttprequest/post-content-type.html.
+
+ Also added support for .shtml and .text files. Text files give an empty
+ *-expected.txt, but a correct image.
+
+ Apache only listens on the loopback interface. It writes logs to /tmp/WebKit.
+
+ * Scripts/run-webkit-tests:
+
+2006-02-21 Darin Adler <darin@apple.com>
+
+ Suggested by Mark Rowe.
+
+ * Scripts/run-webkit-tests: Don't include the number of excluded leaks when
+ reporting leak counts.
+
+2006-02-18 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - Added install-win-extras script which installs some extra
+ programs and libraries, and does Windows first-time setup.
+
+ * Scripts/build-webkit: Add a newline between build results.
+ * Scripts/install-win-extras: Added.
+
+2006-02-19 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Darin Adler.
+
+ - http://bugs.webkit.org/show_bug.cgi?id=7308
+ DumpRenderTree should be able to load files via HTTP
+
+ * DumpRenderTree/DumpRenderTree.m: (dumpRenderTree):
+ Handle tests starting with "http://" as real URLs, not file system paths.
+
+2006-02-19 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Maciej.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=7357
+ REGRESSION: Warnings from WebKit scripts if PBXProductDirectory is undefined
+
+ * Scripts/webkitdirs.pm: only call chomp if PBXProductDirectory is configured.
+
+2006-02-18 Darin Adler <darin@apple.com>
+
+ * Scripts/commit-log-editor: Added.
+
+2006-02-17 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by hyatt.
+
+ Make Win32 have the same default "WebKitBuild" directory behavior.
+
+ * Scripts/build-webkit:
+ * Scripts/webkitdirs.pm:
+
+2006-02-17 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by Beth.
+
+ * Scripts/build-webkit: make win32 actually report errors
+
+2006-02-17 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by adele.
+
+ * Scripts/run-webkit-tests: Ignore quicktime plugin leaks
+
+2006-02-17 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by adele.
+
+ * Scripts/run-webkit-tests: Ignore flash leaks
+
+2006-02-15 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by darin
+
+ <http://bugs.webkit.org/show_bug.cgi?id=7148>
+ Add drag and drop support to DumpRenderTree
+
+ Intercept the drag start using the new UI delegate method, package an NSDraggingInfo,
+ and send dragging updates. Put DumpRenderTree's WebView into an offscreen window.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main):
+ (-[WaitUntilDoneDelegate webView:didCommitLoadForFrame:]):
+ (-[WaitUntilDoneDelegate webView:dragImage:at:offset:event:pasteboard:source:slideBack:forView:]):
+ (-[WaitUntilDoneDelegate webViewFocus:]):
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (+[LayoutTestController webScriptNameForSelector:]):
+ (-[LayoutTestController setWindowIsKey:]):
+ (-[LayoutTestController setMainFrameIsFirstResponder:]):
+ (-[EventSendingController init]):
+ (-[EventSendingController mouseDown]):
+ (-[EventSendingController mouseUp]):
+ (-[EventSendingController mouseMoveToX:Y:]):
+ (dumpRenderTree):
+ (-[DumpRenderTreeWindow isKeyWindow]):
+ (-[DumpRenderTreeDraggingInfo initWithImage:offset:pasteboard:source:]):
+ (-[DumpRenderTreeDraggingInfo dealloc]):
+ (-[DumpRenderTreeDraggingInfo draggingDestinationWindow]):
+ (-[DumpRenderTreeDraggingInfo draggingSourceOperationMask]):
+ (-[DumpRenderTreeDraggingInfo draggingLocation]):
+ (-[DumpRenderTreeDraggingInfo draggedImageLocation]):
+ (-[DumpRenderTreeDraggingInfo draggedImage]):
+ (-[DumpRenderTreeDraggingInfo draggingPasteboard]):
+ (-[DumpRenderTreeDraggingInfo draggingSource]):
+ (-[DumpRenderTreeDraggingInfo draggingSequenceNumber]):
+ (-[DumpRenderTreeDraggingInfo slideDraggedImageTo:]):
+ (-[DumpRenderTreeDraggingInfo namesOfPromisedFilesDroppedAtDestination:]):
+ * DumpRenderTree/TextInputController.m:
+ (-[TextInputController firstRectForCharactersFrom:length:]):
+ (-[TextInputController characterIndexForPointX:Y:]):
+
+2006-02-15 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Eric.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (-[LayoutTestController invokeUndefinedMethodFromWebScript:withArguments:]):
+ Added a dummy method for the sake of LayoutTests/plugins/
+ undefined-property-crash.html. (It tests a crash due to fallback
+ object use. WebCore won't create a fallback object if the method is
+ not defined.)
+
+2006-02-14 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by adele.
+
+ * Scripts/run-webkit-tests: added --results-directory (-o) option
+
+2006-02-09 Eric Seidel <eseidel@apple.com>
+
+ Rubber-stamped by mjs.
+
+ Renamed split-class to split-file-by-class.
+
+ * Scripts/build-webkit: Updated copyright.
+ * Scripts/split-class: Removed.
+ * Scripts/split-file-by-class: Added.
+
+2006-02-08 Eric Seidel <eseidel@apple.com>
+
+ Rubber-stamped by mjs.
+
+ Adding new script for splitting multi-class files.
+ Also adding supporting perl module with space removing heuristics.
+
+ * Scripts/SpacingHeuristics.pm: Added.
+ * Scripts/build-drawtest: updated copyright header
+ * Scripts/split-class: Added.
+
+2006-02-08 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by thatcher
+
+ Changes to test fix for:
+ <http://bugs.webkit.org/show_bug.cgi?id=3982>
+ webViewDidBeginEditing, webViewDidEndEditing notification methods not called on delegate
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (-[WaitUntilDoneDelegate webView:didCommitLoadForFrame:]):
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+ (+[LayoutTestController webScriptNameForSelector:]):
+ (-[LayoutTestController setWindowHasFocus:]):
+ (-[LayoutTestController setDisplaysWithFocusAttributes:]):
+
+2006-02-07 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Timothy.
+
+ Support automated testing of AppleScript "do JavaScript" command
+ http://bugs.webkit.org/show_bug.cgi?id=7012
+
+ * DumpRenderTree/AppleScriptController.h: Added.
+ * DumpRenderTree/AppleScriptController.m: Added.
+ * DumpRenderTree/DumpRenderTree.m:
+ (-[WaitUntilDoneDelegate webView:windowScriptObjectAvailable:]):
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+
+2006-02-06 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by hyatt.
+
+ Fix build-webkit for use on win32 (unblocks buildbot usage).
+ http://bugs.webkit.org/show_bug.cgi?id=7122
+
+ * Scripts/build-webkit: use ifCygwin() to conditionalize builds
+ * Scripts/webkitdirs.pm: add ifOSX() and ifCygwin()
+
+2006-02-06 Eric Seidel <eseidel@apple.com>
+
+ Rubber-stamped by darin & mjs.
+
+ Added new support directory for build slave scripts.
+ Committing the first script, for use by the PLT's build slave.
+ This script is used to kick of the PLT (Page Load Test) slave.
+
+ * BuildSlaveSupport: Added.
+ * BuildSlaveSupport/run-performance-tests: Added.
+
+2006-02-06 Eric Seidel <eseidel@apple.com>
+
+ Rubber-stamped by darin.
+
+ Adding setSourceDir for scripts stored in non-standard locations.
+
+ * Scripts/webkitdirs.pm:
+
+2006-02-04 Darin Adler <darin@apple.com>
+
+ * Scripts/webkitdirs.pm: Add a compatibilty hack for people with old
+ Configuration files that say Development or Deployment in them.
+
+2006-02-04 Darin Adler <darin@apple.com>
+
+ * Scripts/make-js-test-wrappers: Don't create a wrapper if there's a disabled
+ wrapper already in the directory.
+ * Scripts/svn-apply: Handle additions and deletions properly -- I've been noticing
+ these haven't been working at all.
+ * Scripts/svn-unapply: Ditto.
+
+2006-02-03 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Justin.
+
+ Renamed configuration names to Debug, Release and Production.
+
+ * DrawTest/DrawTest.xcodeproj/project.pbxproj:
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * Scripts/set-webkit-configuration:
+ * Scripts/webkitdirs.pm:
+
+2006-02-02 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by thatcher
+
+ Enabled spell checking for layout tests.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main):
+
+2006-01-29 Darin Adler <darin@apple.com>
+
+ * Scripts/svn-apply: Added comments about things we should do to improve.
+ * Scripts/svn-create-patch: Ditto.
+ * Scripts/svn-unapply: Ditto.
+
+2006-01-28 Darin Adler <darin@apple.com>
+
+ * DumpRenderTree/DumpRenderTree.m: (dump): Dump the image if it's not
+ already there, even if the checksum is correct.
+
+2006-01-27 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by adele.
+
+ * Scripts/run-webkit-tests: make new tests use absolute urls
+
+2006-01-27 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by mjs.
+
+ make run-webkit-tests output total leaks count
+
+ * Scripts/run-webkit-tests:
+
+2006-01-27 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by mjs.
+
+ run-webkit-test --leaks crashes (malloc logging runs out of memory)
+ http://bugs.webkit.org/show_bug.cgi?id=6869
+
+ * Scripts/run-webkit-tests: fix --leaks to not crash
+
+2006-01-26 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by darin.
+
+ run-webkit-tests should produce a self-contained results directory
+ http://bugs.webkit.org/show_bug.cgi?id=6864
+
+ * Scripts/run-webkit-tests: copy failing items to results dir.
+
+2006-01-23 Darin Adler <darin@apple.com>
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=3608
+ need script to update localizable strings file in WebKit
+
+ * Scripts/update-webkit-localizable-strings: Added.
+
+2006-01-23 Darin Adler <darin@apple.com>
+
+ - added a couple of scripts -- more about these two soon
+
+ * Scripts/extract-localizable-strings: Added.
+ * Scripts/merge-changelog: Added.
+
+2006-01-22 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed by Anders.
+
+ Build fix. build-webkit dies with "invalid build action: (empty string)"
+
+ * Scripts/build-webkit:
+ Use svgOptions in an array context so xcodebuild doesn't choke on an empty argument.
+
+2006-01-22 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by anders.
+
+ Fix --no-svg option to use XCode flags instead of gcc flags.
+
+ * Scripts/build-webkit:
+
+2006-01-22 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by anders.
+
+ Update build-webkit to use -USVG_SUPPORT instead of -no-SVG target.
+
+ * Scripts/build-webkit:
+
+2006-01-20 David Kilzer <ddkilzer@kilzer.net>
+
+ Reviewed by eseidel.
+
+ - fix for http://bugs.webkit.org/show_bug.cgi?id=6682
+ Call to checkWebCoreSVGSupport() broken in build-drawtest and run-drawtest
+
+ * Scripts/build-drawtest: Changed bareword 'true' to 1.
+ * Scripts/run-drawtest: Changed bareword 'true' to 1.
+
+2006-01-19 Darin Adler <darin@apple.com>
+
+ * Scripts/report-include-statistics: Added a new script.
+
+2006-01-19 Timothy Hatcher <timothy@apple.com>
+
+ * Scripts/build-webkit: include JavaScriptGlue in the build
+
+2006-01-19 Darin Adler <darin@apple.com>
+
+ * Scripts/webkitdirs.pm: Changed SVG check to work even if the path has
+ spaces in it by using the form of open that treats each argument as a string
+ rather than backtick syntax for reading the output of the nm tool.
+
+2006-01-12 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - make prepare-ChangeLog way faster by using svn diff instead of svn status to
+ detect if there are any new tests
+
+ * Scripts/prepare-ChangeLog:
+
+2006-01-12 Darin Adler <darin@apple.com>
+
+ - removed some of the cvs-specific scripts -- not needed for this project any more
+
+ * Scripts/cvs-abandon: Removed.
+ * Scripts/cvs-apply: Removed.
+ * Scripts/cvs-create-patch: Removed.
+ * Scripts/cvs-unapply: Removed.
+
+2006-01-10 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed by eseidel. Committed by eseidel.
+
+ - run-webkit-tests always launches Safari when tests fail
+ http://bugs.webkit.org/show_bug.cgi?id=6456
+
+ * Scripts/run-webkit-tests:
+ Add a command-line flag to prevent Safari being launched to display failed
+ tests. Always exit with non-zero status when tests have failed.
+
+2006-01-10 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed by eseidel. Committed by eseidel.
+
+ - build-webkit should exit with non-zero status when build fails
+ http://bugs.webkit.org/show_bug.cgi?id=6459
+
+ * Scripts/build-webkit:
+ Use correct bits of subprocess exit code when passing back through
+ as build-webkit's exit code.
+
+2006-01-10 Eric Seidel <eseidel@apple.com>
+
+ Restored corrupted nibs from TOT CVS.
+
+ * DrawTest/English.lproj/DrawTestDocument.nib: Replaced.
+ * DrawTest/English.lproj/DrawTestDocument.nib/classes.nib: Replaced.
+ * DrawTest/English.lproj/DrawTestDocument.nib/info.nib: Replaced.
+ * DrawTest/English.lproj/DrawTestDocument.nib/keyedobjects.nib: Replaced.
+ * DrawTest/English.lproj/Inspector.nib: Replaced.
+ * DrawTest/English.lproj/Inspector.nib/classes.nib: Replaced.
+ * DrawTest/English.lproj/Inspector.nib/info.nib: Replaced.
+ * DrawTest/English.lproj/Inspector.nib/keyedobjects.nib: Replaced.
+ * DrawTest/English.lproj/MainMenu.nib: Replaced.
+ * DrawTest/English.lproj/MainMenu.nib/classes.nib: Replaced.
+ * DrawTest/English.lproj/MainMenu.nib/info.nib: Replaced.
+ * DrawTest/English.lproj/MainMenu.nib/keyedobjects.nib: Replaced.
+ * DrawTest/English.lproj/TestViewer.nib: Replaced.
+ * DrawTest/English.lproj/TestViewer.nib/classes.nib: Replaced.
+ * DrawTest/English.lproj/TestViewer.nib/info.nib: Replaced.
+ * DrawTest/English.lproj/TestViewer.nib/keyedobjects.nib: Replaced.
+
+2006-01-10 Nefaur Khandker <nefaurk@gmail.com>
+
+ Reviewed by eseidel. Committed by eseidel.
+
+ DrawTestView now subclasses WebView instead of DrawView.
+
+ * DrawTest/DrawTest.xcodeproj/project.pbxproj:
+ * DrawTest/DrawTestDocument.h:
+ * DrawTest/DrawTestDocument.m:
+ (-[DrawTestDocument dealloc]):
+ (-[DrawTestDocument readFromFile:ofType:]):
+ (-[DrawTestDocument windowControllerDidLoadNib:]):
+ (-[DrawTestDocument dumpSVGToConsole:]):
+ (-[DrawTestDocument openSourceForSelection:]):
+ (-[DrawTestDocument dataRepresentationOfType:]):
+ * DrawTest/DrawTestToolbarController.h:
+ * DrawTest/DrawTestToolbarController.m:
+ (-[DrawTestToolbarController initWithDrawView:]):
+ (-[DrawTestToolbarController clickedToolbarItem:]):
+ (-[DrawTestToolbarController validateToolbarItem:]):
+ * DrawTest/DrawTestView.h:
+ * DrawTest/DrawTestView.m:
+ (-[DrawTestView initWithFrame:]):
+ (-[DrawTestView setDocument:]):
+ * DrawTest/SVGTest.h:
+ * DrawTest/SVGTest.m:
+ (+[SVGTest sharedDrawView]):
+ (-[SVGTest generateCompositeIfNecessary]):
+ * DrawTest/TestController.h:
+ * DrawTest/TestController.m:
+ (-[TestController awakeFromNib]):
+ (-[TestController setSelectedTest:]):
+ (-[TestController openTestViewerForSelection:]):
+ (-[TestController toggleViewersScaleRule:]):
+ * DrawTest/TestViewerSplitView.m:
+ (-[TestViewerSplitView drawRect:]):
+
+2006-01-10 Anders Carlsson <andersca@mac.com>
+
+ Reviewed by Timothy.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main): Set the default language to "en", so language tests will work.
+
+2006-01-08 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Eric.
+
+ - script to generate HTML wrappers for JS tests
+ http://bugs.webkit.org/show_bug.cgi?id=6441
+
+ * Scripts/make-js-test-wrappers: Added.
+
+2006-01-08 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Eric.
+
+ * Scripts/svn-create-patch: Fix to work when passed directory names.
+
+2006-01-08 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Eric.
+
+ - Added back/forward navigation support to DumpRenderTree. Hopefully we
+ can start writing automated loader tests now. I have one in the works.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main): Construct global navigationController on entry, destroy on exit.
+ Set frame to nil on exit too, to match all the other global objects.
+ (Probably academic, since the process is exiting, anyway.)
+ (-[WaitUntilDoneDelegate webView:didFinishLoadForFrame:]): Notify the
+ navigationController, in case it wants to kick off a load.
+ (-[WaitUntilDoneDelegate webView:windowScriptObjectAvailable:]): Expose
+ the navigationController to scripting.
+
+ New class, should be straightforward:
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/NavigationController.h: Added.
+ * DumpRenderTree/NavigationController.m: Added.
+
+ (+[NavigationController isSelectorExcludedFromWebScript:]):
+ (+[NavigationController webScriptNameForSelector:]):
+ (-[NavigationController setPendingScript:]):
+ (-[NavigationController setPendingRequest:]):
+ (-[NavigationController evaluateWebScript:afterBackForwardNavigation:]):
+ (-[NavigationController webView:didFinishLoadForFrame:]):
+ (-[NavigationController dealloc]):
+
+2006-01-08 Timothy Hatcher <timothy@apple.com>
+
+ Removed this script, no longer needs with the Subversion switch.
+
+ * checkout: Removed.
+
+2006-01-08 Timothy Hatcher <timothy@apple.com>
+
+ Removes some stray tabs.
+
+ * Scripts/update-webkit:
+
+2005-01-07 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by darin.
+
+ build-webkit should pass on build arguments from command line
+ http://bugs.webkit.org/show_bug.cgi?id=5854
+
+ * Scripts/build-webkit:
+
+2006-01-07 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by mjs & xenon.
+
+ * Scripts/update-webkit: support Internal updates as well
+
+2006-01-06 Geoffrey Garen <ggaren@apple.com>
+
+ Temporarily rolling out plugin support from DumpRenderTree because it
+ caused lots of layout test regressions.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main): Remove invisible window added to support plugins.
+
+2006-01-06 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by darin.
+
+ - Fixed http://bugs.webkit.org/show_bug.cgi?id=6361
+ Add plugin support to DumpRenderTree
+
+ Also wrote first test plugin.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main):
+ (1) Put the WebView in an invisible window, because PlugIns are
+ optimized not to load if there's no parent window.
+ (2) Tell WebKit to load any PlugIns in the directory from which we
+ loaded. This means we can build nasty PlugIns alongside DumpRenderTree
+ and they'll load automagically during layout testing, but they won't be
+ added to the user's system, hosing apps like Safari.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Added new
+ test PlugIn to project.
+
+ PlugIn added to project:
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/Info.plist: Added.
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c: Added.
+ (getPluginClass):
+ (initializeIdentifiers):
+ (pluginHasProperty):
+ (pluginHasMethod):
+ (pluginGetProperty):
+ (pluginSetProperty):
+ (pluginInvoke):
+ (pluginInvokeDefault):
+ (pluginInvalidate):
+ (pluginAllocate):
+ (pluginDeallocate):
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h: Added.
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.c: Added.
+ (NP_Initialize):
+ (NP_GetEntryPoints):
+ (NP_Shutdown):
+ (NPP_New):
+ (NPP_Destroy):
+ (NPP_SetWindow):
+ (NPP_NewStream):
+ (NPP_DestroyStream):
+ (NPP_WriteReady):
+ (NPP_Write):
+ (NPP_StreamAsFile):
+ (NPP_Print):
+ (NPP_HandleEvent):
+ (NPP_URLNotify):
+ (NPP_GetValue):
+ (NPP_SetValue):
+
+2006-01-04 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Darin Adler.
+ Created by Eric.
+ Tweaked and tested by me.
+
+ New scripts to work with Subversion when the switch happens.
+ These will replace cvs-apply, cvs-unapply, and cvs-create-patch.
+
+ * Scripts/svn-apply: Added.
+ * Scripts/svn-create-patch: Added.
+ * Scripts/svn-unapply: Added.
+
+2005-12-30 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by mjs.
+
+ Move WebView width/height logic into DumpRenderTree to support
+ running the W3C SVG 1.1 tests along side other tests. The W3C
+ SVG 1.1 tests require a 480x360 view.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main): don't accept width/height
+ (dump): override width/height for SVG/W3C
+ * Scripts/run-webkit-tests: don't pass width/height
+
+2005-12-30 Eric Seidel <eseidel@apple.com>
+
+ No review, only removing dead code.
+
+ * DumpKCanvasTree/DumpKCanvasTree.m: Removed.
+ * DumpKCanvasTree/DumpKCanvasTree.xcodeproj/project.pbxproj: Removed.
+
+2005-12-30 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by darin.
+
+ DumpRenderTree should set a consistent color profile while running
+ http://bugs.webkit.org/show_bug.cgi?id=6155
+
+ Creates consistent colormatched renderings on every test machine
+ using the only way possible with Tiger APIs: by setting the
+ system color profile on the test machine for the duration of the
+ tests. This will (unfortunately) cause colors to change while
+ running DumpRenderTree. This can also cause "permanent" color
+ changes to occur if DRT is to crash (SIGSEGV, etc.) while running.
+ This is far from ideal, but it's be best way we've found to deal
+ with the issue for now.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (restoreColorSpace):
+ (setDefaultColorProfileToRGB):
+ (main):
+
+2005-12-20 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Darin Adler.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=5846
+ cvs-create-patch --include produces incorrect paths
+
+ * Scripts/cvs-create-patch: Handle newly-added directories using chdir.
+
+2005-12-19 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by darin.
+
+ * Scripts/run-webkit-tests: stop /etc/catalog warnings
+
+2005-12-19 Darin Adler <darin@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=4990
+ WebKit needs to use a local pasteboard during testing
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main): Call poseAs to substitute our NSPasteboard class for the default one.
+ Create a local pasteboard (really a global one with a unique name) and release
+ it when exiting from the function so we don't leave it in the pasteboard server.
+ (dumpRenderTree): Added an autorelease pool around one small bit of code that
+ ddn't have one. Fixed a leak in an unlikely error case.
+ (+[DumpRenderTreePasteboard generalPasteboard]): Override the default version
+ of this method to return our local pasteboard.
+
+2005-12-15 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ * Scripts/build-webkit: --svg is now default!
+
+2005-12-15 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by mjs.
+
+ Don't run svg test automatically if +SVG is built (yet).
+
+ * Scripts/run-webkit-tests:
+
+2005-12-15 Darin Adler <darin@apple.com>
+
+ * Scripts/run-webkit-tests: Don't run tests in directories named "svg" if SVG
+ support is not compiled in. Report the 10 slowest tests if "--slowest" is
+ passed on the command line.
+
+2005-12-06 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Darin Adler.
+
+ * Scripts/prepare-ChangeLog:
+ Remove special-case handling for nib files. This avoided trouble with cvs diff
+ when we were using wrappers for nib files. Now that we aren't using wrappers,
+ there's no reason to avoid adding the modified nib files to the file list that
+ gets diffed.
+
+2005-12-05 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by mjs.
+
+ Script updates for SVG files move (remove references to SVGSupport)
+
+ * Scripts/build-webkit: remove SVGSupport
+ * Scripts/run-webkit-tests: Resources -> resources for --svg
+ * Scripts/update-webkit: remove SVGSupport
+
+2005-12-05 Eric Seidel <eseidel@apple.com>
+
+ Reviewed mjs.
+
+ * checkout: remove --svg support, SVG is now checked out by default
+
+2005-11-29 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by darin.
+
+ Update scripts to run SVG tests automatically (w/o --svg) if
+ WebCore is built with SVG support.
+
+ * Scripts/build-drawtest: SVG support required
+ * Scripts/build-dumpkcanvastree: Removed.
+ * Scripts/run-drawtest: SVG support required to run
+ * Scripts/run-webkit-tests: pass *.svg files if WebCore has support
+ * Scripts/webkitdirs.pm: changed CheckWebCoreSVGSupport
+
+2005-11-28 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed by Darin Adler. Committed by Maciej.
+
+ - fixed "DumpRenderTree should test for Ahem before doing anything else"
+ (http://bugs.webkit.org/show_bug.cgi?id=5838)
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main):
+
+2005-11-28 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by sullivan and GGAREN.
+
+ Minor additions to make error messages more clear from cvs-apply.
+
+ * Scripts/cvs-apply: make errors more clear
+
+2005-11-27 Oliver Hunt <ojh16@student.canterbury.ac.nz>
+
+ Reviewed and committed by Maciej.
+
+ - fixed cvs-create-patch --include produces incorrect paths
+ (http://bugs.webkit.org/show_bug.cgi?id=5846)
+
+ * Scripts/cvs-create-patch: produce proper paths for new files.
+
+2005-11-21 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by hyatt.
+
+ Some simple fixes to the build/test scripts now that SVG uses the
+ WebCore DOM. JSC+SVG is no longer needed, nor is RTTI support
+ or symlinks for KDOM.
+
+ * Scripts/build-webkit: No longer builds JavaScriptCore+SVG
+ * Scripts/prepare-ChangeLog: handles missing LayoutTests directory
+ * Scripts/run-webkit-tests: now runs SVG tests using DRT
+ * Scripts/webkitdirs.pm: use SVG symbols instead of RTTI
+ * checkout: no longer symlink kdom
+
+2005-11-10 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by ggaren.
+
+ * Scripts/build-webkit: Pass through options to xcodebuild
+
+2005-11-07 Darin Adler <darin@apple.com>
+
+ * Scripts/cvs-apply: Fix case where the patch has files at the top level.
+
+2005-11-03 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Darin Adler.
+
+ * Scripts/run-safari:
+ changed message to say "Starting Safari" instead of odd "Start Safari"
+ * Scripts/run-webkit-tests:
+ changed the way we pass the file parameter to use -NSOpen rather than relying on
+ unlabeled arguments being treated as files. This was failing on some machines that
+ (mysteriously) had NSTreatUnknownArgumentsAsOpen set to NO in com.apple.Safari.plist.
+
+2005-10-27 Geoffrey Garen <ggaren@apple.com>
+
+ Patch by Alexey Proskuryakov.
+
+ Reviewed by Maciej.
+
+ Fixes http://bugs.webkit.org/show_bug.cgi?id=5303
+ TextInputController should support attributed strings
+
+ * DumpRenderTree/TextInputController.m:
+ (+[NSMutableAttributedString isSelectorExcludedFromWebScript:]):
+ (+[NSMutableAttributedString webScriptNameForSelector:]):
+ (-[NSMutableAttributedString getLength]):
+ (-[NSMutableAttributedString attributeNamesAtIndex:]):
+ (-[NSMutableAttributedString valueOfAttribute:atIndex:]):
+ (-[NSMutableAttributedString addAttribute:value:]):
+ (-[NSMutableAttributedString addAttribute:value:from:length:]):
+ (-[NSMutableAttributedString addColorAttribute:red:green:blue:alpha:]):
+ (-[NSMutableAttributedString addColorAttribute:red:green:blue:alpha:from:length:]):
+ (-[NSMutableAttributedString addFontAttribute:fontName:size:]):
+ (-[NSMutableAttributedString addFontAttribute:fontName:size:from:length:]):
+ (+[TextInputController isSelectorExcludedFromWebScript:]):
+ (+[TextInputController webScriptNameForSelector:]):
+ (-[TextInputController insertText:]):
+ (-[TextInputController attributedSubstringFrom:length:]):
+ (-[TextInputController attributedStringWithString:]):
+
+2005-10-11 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by hyatt.
+
+ Checks for leaks in ImageDiff too.
+
+ * Scripts/run-webkit-tests:
+
+2005-10-09 Darin Adler <darin@apple.com>
+
+ * Scripts/check-dom-results: Dump ".xhtml" for tests in the xhtml directory.
+ * Scripts/cvs-apply: Handle added/deleted files in the current directory.
+ * Scripts/cvs-unapply: Ditto.
+ * Scripts/run-webkit-tests: Add a few more false-positive leaks.
+
+2005-10-08 Alexey Proskuryakov <ap@nypop.com>
+
+ Reviewed, rearranged and landed by Darin Adler.
+
+ - fixed http://bugs.webkit.org/show_bug.cgi?id=4707
+ Need a way to automatically test for regressions in NSTextInput implementation
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (-[WaitUntilDoneDelegate webView:windowScriptObjectAvailable:]):
+ Create a text input controller and put it in a property of the window object.
+
+ * DumpRenderTree/TextInputController.h: Added.
+ * DumpRenderTree/TextInputController.m: Added.
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Added files.
+
+2005-10-06 Darin Adler <darin@apple.com>
+
+ * Scripts/cvs-apply: Fixed merge option to work better when not all directories
+ are controlled by cvs, or when changes cross multiple repositories.
+ * Scripts/update-webkit: Don't print messages if the "quiet" flag is set.
+
+2005-10-03 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by mjs.
+
+ Make mouseDown and mouseUp force layout before acting.
+ This is used by a new test case for 4233558.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (-[EventSendingController mouseDown]): force layout
+ (-[EventSendingController mouseUp]): force layout
+
+2005-09-30 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by xenon.
+
+ Updated all the scripts for the move:
+ WebCore/layout-tests -> LayoutTests
+
+ * Scripts/check-dom-results:
+ * Scripts/prepare-ChangeLog:
+ * Scripts/run-webkit-tests:
+ * Scripts/update-webkit: added --no-tests
+ * checkout: added --no-tests
+
+2005-09-28 Darin Adler <darin@apple.com>
+
+ - fixed http://bugs.webkit.org/show_bug.cgi?id=5144
+ pixel test should run even if render trees differ
+
+ * Scripts/run-webkit-tests: Don't check if the text dump matches.
+
+2005-09-27 Eric Seidel <eseidel@apple.com>
+
+ No review needed, SVG build fix only.
+
+ * DumpKCanvasTree/DumpKCanvasTree.m:
+ Missed one in my previous checkin.
+ http://bugs.webkit.org/show_bug.cgi?id=5141
+
+2005-09-26 Eric Seidel <eseidel@apple.com>
+
+ No review needed, SVG build fix only.
+
+ * DrawTest/DrawTestDocument.m:
+ * DrawTest/DrawTestToolbarController.m:
+ * DrawTest/DrawTestView.h:
+ * DrawTest/DrawTestView.m:
+ * DrawTest/SVGTest.m:
+ * DrawTest/TestController.m:
+ Updated for WebCore+SVG -> WebCore rename.
+ http://bugs.webkit.org/show_bug.cgi?id=5141
+
+2005-09-26 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by hyatt.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (dump): updated error message
+ * Scripts/check-dom-results: now includes xhtml
+ Tool updates for xhtml.
+ http://bugs.webkit.org/show_bug.cgi?id=4907
+
+2005-09-22 Duncan Wilcox <duncan@mclink.it>
+
+ Reviewed by Maciej.
+ Landed by Darin Adler.
+
+ - patch for <http://bugs.webkit.org/show_bug.cgi?id=4963>
+ "Would like to simulate human interaction with webview"
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (-[WaitUntilDoneDelegate webView:windowScriptObjectAvailable:]):
+ (+[EventSendingController isSelectorExcludedFromWebScript:]):
+ (+[EventSendingController webScriptNameForSelector:]):
+ (-[EventSendingController init]):
+ (-[EventSendingController mouseDown]):
+ (-[EventSendingController mouseUp]):
+ (-[EventSendingController mouseMoveToX:Y:]):
+ Add eventSender javascript object, that sends fake mouse events to the webview.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ link with Carbon.framework
+
+2005-09-22 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by mjs.
+
+ Update tools for WebCore+SVG -> WebCore rename.
+ Also fold several SVG specific tools into their original
+ WebCore counterparts.
+ http://bugs.webkit.org/show_bug.cgi?id=5003
+
+ * DrawTest/DrawTest.xcodeproj/project.pbxproj:
+ * DumpKCanvasTree/DumpKCanvasTree.xcodeproj/project.pbxproj:
+ * Scripts/build-drawtest:
+ * Scripts/build-dumpkcanvastree:
+ * Scripts/build-webcore-svg: Removed.
+ * Scripts/build-webkit: added --svg option
+ * Scripts/run-drawtest:
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitdirs.pm: various additions.
+ * checkout: added --svg option
+ * checkout-svg: Removed.
+
+2005-09-19 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by darin.
+
+ * Scripts/run-webkit-tests: added --guard-malloc option
+ http://bugs.webkit.org/show_bug.cgi?id=4613
+
+2005-09-16 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by geoff
+
+ Removed a script that is only used by apple internal developers
+
+ * Scripts/update-webkitsysteminterface: Removed.
+
+2005-09-16 Adele Peterson <adele@apple.com>
+
+ Reviewed by Maciej.
+
+ * Scripts/prepare-ChangeLog: Allow semicolons for protocols too.
+
+2005-09-14 Darin Adler <darin@apple.com>
+
+ - fixed http://bugs.webkit.org/show_bug.cgi?id=4291
+ dumpAsText doesn't work with XHTML documents
+
+ * DumpRenderTree/DumpRenderTree.m: (dump): Dump the innerText of the document element
+ rather than of the body element. This works with typical XHTML documents. We can probably
+ do something even better in the long run, but this fixes the immediate issue.
+
+ - separate tweak
+
+ * Scripts/run-webkit-tests: Show the results in the current built Safari by using
+ run-safari instead of just using "open", which often runs another copy of Safari instead.
+
+2005-09-11 Mark Rowe <opendarwin.org@bdash.net.nz>
+
+ Reviewed, tweaked, and landed by Darin Adler.
+
+ - fixed http://bugs.webkit.org/show_bug.cgi?id=4286
+ .Mac prefpane crashes when Safari using CVS WebKit is running
+
+ * Scripts/run-safari: Set WEBKIT_UNSET_DYLD_FRAMEWORK_PATH.
+ * Scripts/run-webkit-app: Ditto.
+
+2005-09-11 Darin Adler <darin@apple.com>
+
+ * Scripts/run-webkit-tests: Oops. Use spaces, not tabs.
+
+2005-09-11 Darin Adler <darin@apple.com>
+
+ Reviewed by Eric.
+
+ * Scripts/run-webkit-tests: Sort tests with a new "pathcmp" function that's better in
+ two ways: 1) puts all files in a directory before any files in a subdirectory, and
+ 2) sort file names with numeric digits in them in a logical way, so test-33 will come
+ before test-3.
+
+2005-09-08 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by darin
+
+ * Scripts/update-webkitsysteminterface: Added.
+ Builds webkitsysteminterface and moves the built product and header into WebKitLibraries
+
+2005-09-01 John Sullivan <sullivan@apple.com>
+
+ * Scripts/run-webkit-tests:
+ Excluded a known system leak to reduce noise; added comments about which leaks
+ are being excluded.
+
+2005-09-01 Tim Omernick <tomernick@apple.com>
+
+ Change made by Darin, reviewed by John and myself.
+
+ - Allow semicolons at the end of method declarations (this is for method implementations; the semicolon is required for interface declarations).
+
+ * Scripts/prepare-ChangeLog:
+
+2005-08-31 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - set color variant and font settings to a consistent value.
+ (http://bugs.webkit.org/show_bug.cgi?id=4769)
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main):
+
+2005-08-30 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by mjs.
+
+ * Scripts/build-svg2png: Removed.
+ * svg2png/ImageDiff.h: Removed.
+ * svg2png/ImageDiff.m: Removed.
+ * svg2png/svg2png.m: Removed.
+ * svg2png/svg2png.xcodeproj/project.pbxproj: Removed.
+ * svg2png/svg2png_Prefix.pch: Removed.
+ svg2png is no longer needed.
+
+2005-08-30 Darin Adler <darin@apple.com>
+
+ * Scripts/check-dom-results: Special case 100% to say something nice.
+ * Scripts/cvs-apply: Added "--merge" which automatically rolls back the tree before
+ applying the patch (need a better name).
+ * Scripts/find-extra-includes: Added. Experimental tool to find unneeded includes.
+
+2005-08-30 Darin Adler <darin@apple.com>
+
+ * Scripts/run-webkit-tests: Small formatting fix for leaks mode.
+
+2005-08-29 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - fixed http://bugs.webkit.org/show_bug.cgi?id=4723
+ (some pixel tests fail when AA settings are changed)
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main): set AA settings to the default values
+
+2005-08-29 Darin Adler <darin@apple.com>
+
+ Reviewed by John Sullivan.
+
+ * Scripts/run-webkit-tests: Added a mode where each test is run with a separate
+ executable -- much slower but can help pinpoint leaks. Changed formatting of some
+ messages too.
+
+2005-08-28 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Eric.
+
+ - fixed http://bugs.webkit.org/show_bug.cgi?id=4720
+ (webkit pixel tests don't give consistent results with changed scrollbar arrow setting)
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main): set scrollbar arrow setting to a consistent value
+
+2005-08-27 Jussi Hagman <juhagman@abo.fi>
+
+ Reviewed and landed by Darin Adler.
+
+ - fixed http://bugs.webkit.org/show_bug.cgi?id=4676
+ output of update-webkit is too verbose
+
+ * Scripts/update-webkit:
+ Added option --quiet (-q) to decrease the amount of output.
+
+2005-08-27 Darin Adler <darin@apple.com>
+
+ - fixed http://bugs.webkit.org/show_bug.cgi?id=4596
+ cvs-create-patch --include-unknowns should ignore hidden files
+
+ * Scripts/cvs-create-patch: Add code to check for files starting with ".".
+
+2005-08-25 Ben La Monica <ben.lamonica@gmail.com>
+
+ Reviewed, tweaked, and landed by Darin Adler.
+
+ - fixed http://bugs.webkit.org/show_bug.cgi?id=4585
+ update-webkit doesn't notice when you have SVGSupport and update properly
+
+ * Scripts/update-webkit: Build SVGSupport directory if it's present.
+
+2005-08-25 Anders Carlsson <andersca@mac.com>
+
+ Reviewed and landed by Darin Adler.
+
+ - fixed http://bugs.webkit.org/show_bug.cgi?id=4572
+ layout test machinery can't handle tests with applets that have code attributes
+
+ * DumpRenderTree/DumpRenderTree.m: (main): Disable Java while running tests.
+
+2005-08-24 Darin Adler <darin@apple.com>
+
+ Reviewed by Maciej.
+
+ - fixed http://bugs.webkit.org/show_bug.cgi?id=4625
+ DumpRenderTree --pixel-tests crash
+ - landed some other small changes I had sitting in my tree
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main): Don't bother saving and restoring the preferences. Not sure
+ why this was ever done since the preferences are specific to DumpRenderTree.
+ Clear delegates before releasing the WebView, because you can't count on the
+ order of object deallocation.
+ (dumpRenderTree): Fix code that releases a string before storing it in a
+ global variable.
+
+ * Scripts/run-webkit-tests: Use "-s" rather than a function to get the size
+ of a file. Fix lots of cases that were using tabs for indenting to use spaces instead.
+
+2005-08-23 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by mjs.
+
+ * Scripts/run-webkit-tests:
+ Made --leaks option more readable by printing to a file.
+ http://bugs.webkit.org/show_bug.cgi?id=4590
+
+2005-08-22 Eric Seidel <eseidel@apple.com>
+ Fix by Tobias Lidskog <tobiaslidskog@mac.com>
+
+ Reviewed by darin.
+
+ * Scripts/run-webkit-tests: hides "expected actual diffs" links
+ when they are not needed (for pixel-only failures)
+ http://bugs.webkit.org/show_bug.cgi?id=4584
+
+2005-08-22 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by darin.
+
+ * Scripts/run-webkit-tests: Added the ability to display more than
+ just two images as part of the image-diff "slideshow".
+ Added display of "-w3c.png" baseline images for SVG.
+ http://bugs.webkit.org/show_bug.cgi?id=4581
+
+2005-08-20 Eric Seidel <eseidel@apple.com>
+
+ * Scripts/run-webkit-tests:
+ "build" fix after committing incorrect version.
+
+2005-08-20 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by darin.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main): cleans up delegates
+ (dumpRenderTree): closes CFString/CFURL leak
+ * Scripts/run-webkit-tests:
+ Adds --leaks option to run-webkit-tests
+ http://bugs.webkit.org/show_bug.cgi?id=4542
+
+2005-08-19 Ben La Monica <ben.lamonica@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ * Scripts/cvs-create-patch: Add an --include-unknowns option that will cause
+ new files to be included in the patch even without "cvs add".
+
+2005-08-19 Darin Adler <darin@apple.com>
+
+ * Scripts/cvs-apply: Fix to not garble patches that are mix of cvs-style and
+ non-cvs-generated patches. Anders has been creating these, so it's bad that
+ the script can't handle them.
+ * Scripts/cvs-unapply: Ditto.
+
+2005-08-18 Darin Adler <darin@apple.com>
+
+ * Scripts/webkitdirs.pm: Fix version checking to work on Xcode versions with
+ "." in them -- based on complaint by someone here at Apple.
+
+2005-08-18 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by mjs.
+
+ * Scripts/run-webkit-tests:
+ Made --svg imply --pixel-tests (pixel tests on-by-default for svg).
+
+2005-08-17 Maciej Stachowiak <mjs@apple.com>
+
+ - add file that I forgot in the last checkin
+
+ * DumpRenderTree/ImageDiff.m: Added.
+ (main):
+ (getImageFromStdin):
+ (compareImages):
+ (getDifferenceBitmap):
+ (computePercentageDifferent):
+
+2005-08-17 Maciej Stachowiak <mjs@apple.com>
+
+ Changes by Ben Lamonica and Eric Seidel, reviewed mostly by Eric and
+ somewhat by me, and also tweaked by me a little bit.
+
+ - better support for pixel-dumping
+ - use checksums of the images so the tests are fast
+ - change output format to make the tests run faster
+ - don't dump pixel results for tests that dump as text
+
+ * DumpKCanvasTree/DumpKCanvasTree.m:
+ (main):
+ (dumpRenderTree):
+ (md5HashStringForBitmap):
+ (dumpPixelTests):
+ (constrainSizeToMaximum):
+ (getBitmapImageRepForSVGDocument):
+ * DumpKCanvasTree/DumpKCanvasTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/DumpRenderTree.m:
+ (main):
+ (dump):
+ (dumpRenderTree):
+ (md5HashStringForBitmap):
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * Scripts/run-webkit-tests:
+
+2005-08-17 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - hacked DumpRenderTree to make the scrollbars appear and disappear properly.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main):
+
+2005-08-14 Oliver Hunt <ojh16@student.canterbury.ac.nz>
+
+ Reviewed and landed by Darin Adler.
+
+ - fixed http://bugs.webkit.org/show_bug.cgi?id=4251
+ Ideally would be able to pass arguments to apps using run-safari and run-webkit-app scripts
+
+ * Scripts/run-safari: Pass arguments through to Safari on command line.
+ * Scripts/run-webkit-app: Pass arguments through to "open" tool on command line.
+
+2005-08-11 Eric Seidel <eseidel@apple.com>
+ Fix by Tobias Lidskog <tobiaslidskog@mac.com>
+
+ Reviewed by eseidel.
+
+ * DrawTest/TestController.m:
+ (-[TestController imagePathForSVGPath:]):
+ Fixed support for using TextViewer with the layout-tests.
+ http://bugs.webkit.org/show_bug.cgi?id=4385
+
+2005-08-11 Maciej Stachowiak <mjs@apple.com>
+
+ At Least Roughly Glanced At by Anders.
+
+ - fix change with totally breaks the layout tests.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (-[WaitUntilDoneDelegate webView:didCommitLoadForFrame:]): Make tests unready if you start another
+ load, to avoid dumping twice accidentally.
+
+2005-08-10 Eric Seidel <eseidel@apple.com>
+ Fixed made by Mitz Pettel <opendarwin.org@mitzpettel.com>
+
+ Reviewed by darin.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ Added support for rendering to a PNG file.
+ http://bugs.webkit.org/show_bug.cgi?id=3840
+
+2005-08-07 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by darin.
+
+ * Scripts/run-webkit-tests: added --svg option
+ * Scripts/run-webkit-tests-svg: Removed.
+ http://bugs.webkit.org/show_bug.cgi?id=4300
+
+2005-08-07 Eric Seidel <eseidel@apple.com>
+ Changes by Ben La Monica <ben.lamonica@gmail.com>
+
+ Reviewed by darin.
+
+ * svg2png/ImageDiff.h: Added.
+ * svg2png/ImageDiff.m: Added.
+ (getDifferenceBitmap):
+ (computePercentageDifferent):
+ (saveAnimatedGIFToFile):
+ * svg2png/svg2png.m:
+ (usage): added several new options
+ (getBitmapForSVG): added NSBitmapImageRep generation
+ (main): various argument changes.
+ * svg2png/svg2png.xcodeproj/project.pbxproj:
+ Several additions to provide image differencing functionality.
+ http://bugs.webkit.org/show_bug.cgi?id=4193
+
+2005-08-07 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by darin.
+
+ * Scripts/run-webkit-tests-svg: now uses WebCore/svg-tests
+ * checkout-svg: links WebCore/svg-tests to SVGSupport/layout-tests
+ Adding the first SVG layout tests:
+ http://bugs.webkit.org/show_bug.cgi?id=4303
+
+2005-08-07 Darin Adler <darin@apple.com>
+
+ * Scripts/cvs-create-patch: Do all the directories at once, for speed.
+
+2005-08-06 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by darin.
+
+ * DumpKCanvasTree/DumpKCanvasTree.m: Added.
+ * DumpKCanvasTree/DumpKCanvasTree.xcodeproj/project.pbxproj: Added.
+ * Scripts/build-dumpkcanvastree: Added.
+ * Scripts/run-webkit-tests-svg: Added.
+ Adds a DumpRenderTree-like tool for SVG which allows us to do
+ text-based layout regression testing. This (like most of the
+ SVG specific stuff) is temporary and will be replaced by
+ DumpRenderTree once the DOMs and RenderTrees merge.
+ http://bugs.webkit.org/show_bug.cgi?id=3917
+
+2005-08-06 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by darin.
+
+ * DrawTest/DrawTestView.m:
+ (-[DrawTestView toggleFilterSupport:]): missing negation.
+ One half of fix for toggling filter support.
+ http://bugs.webkit.org/show_bug.cgi?id=4252
+
+2005-08-04 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by darin.
+
+ * Scripts/build-drawtest:
+ * Scripts/build-dumprendertree:
+ * Scripts/build-svg2png:
+ * Scripts/build-webcore-svg:
+ * Scripts/build-webkit:
+ * Scripts/webkitdirs.pm: added checkRequiredSystemConfig()
+ Added checkRequiredSystemConfig and made all the build-* scripts
+ use it to print a pretty warning when trying to compile on an
+ unsupported system (less than 10.4, Xcode 2.1).
+ http://bugs.webkit.org/show_bug.cgi?id=4280
+
+2005-08-04 Darin Adler <darin@apple.com>
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Bring this file back from
+ the dead. It was removed by accident when someone was trying to work on the branch.
+
+2005-07-31 Darin Adler <darin@apple.com>
+
+ - a little tools cleanup
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Moved options from target to
+ project as a whole. Removed unused Default configuration.
+
+ * Scripts/check-dom-results: Added license header, comment to explain purpose of tool.
+
+2005-07-31 Duncan Wilcox <duncan@mclink.it>
+
+ Reviewed and landed by Darin Adler.
+
+ Add logging of editing delegate calls for regression checking.
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (main):
+ setup editing delegate
+
+ (-[DOMNode dumpPath]):
+ (-[DOMRange dump]):
+ utility for editing delegate logging
+
+ (-[EditingDelegate webView:shouldBeginEditingInDOMRange:]):
+ (-[EditingDelegate webView:shouldEndEditingInDOMRange:]):
+ (-[EditingDelegate webView:shouldInsertNode:replacingDOMRange:givenAction:]):
+ (-[EditingDelegate webView:shouldInsertText:replacingDOMRange:givenAction:]):
+ (-[EditingDelegate webView:shouldDeleteDOMRange:]):
+ (-[EditingDelegate webView:shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
+ (-[EditingDelegate webView:shouldApplyStyle:toElementsInDOMRange:]):
+ (-[EditingDelegate webView:shouldChangeTypingStyle:toStyle:]):
+ (-[EditingDelegate webViewDidBeginEditing:]):
+ (-[EditingDelegate webViewDidChange:]):
+ (-[EditingDelegate webViewDidEndEditing:]):
+ (-[EditingDelegate webViewDidChangeTypingStyle:]):
+ log corresponding editing delegate methods
+
+ (-[EditingDelegate webViewDidChangeSelection:]):
+ log selection except when clearing selection after end of test (uses existing "done" flag)
+
+ (dumpRenderTree):
+ added clearing of selection after test
+
+2005-07-31 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by hyatt.
+
+ * Scripts/build-drawtest: Added.
+ * Scripts/build-svg2png: Added.
+ * Scripts/build-webcore-svg: Added.
+ * Scripts/run-drawtest: Added.
+ * Scripts/webkitdirs.pm: added checkSVGFrameworks
+ Made it much easier to build WebCore+SVG.
+ http://bugs.webkit.org/show_bug.cgi?id=4208
+
+2005-07-29 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by vicki.
+
+ * DrawTest/DrawTest.xcodeproj/project.pbxproj:
+ Build fix. Removed bad path.
+
+2005-07-29 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by sullivan.
+
+ * DrawTest/AppDelegate.h: Added.
+ * DrawTest/AppDelegate.m: Added.
+ * DrawTest/DrawTest.xcodeproj/project.pbxproj: Added.
+ * DrawTest/DrawTestDocument.h: Added.
+ * DrawTest/DrawTestDocument.m: Added.
+ * DrawTest/DrawTestInspectorController.h: Added.
+ * DrawTest/DrawTestInspectorController.m: Added.
+ * DrawTest/DrawTestToolbarController.h: Added.
+ * DrawTest/DrawTestToolbarController.m: Added.
+ * DrawTest/DrawTestView.h: Added.
+ * DrawTest/DrawTestView.m: Added.
+ * DrawTest/DrawTest_Prefix.pch: Added.
+ * DrawTest/English.lproj/DrawTestDocument.nib/classes.nib: Added.
+ * DrawTest/English.lproj/DrawTestDocument.nib/info.nib: Added.
+ * DrawTest/English.lproj/DrawTestDocument.nib/keyedobjects.nib: Added.
+ * DrawTest/English.lproj/InfoPlist.strings: Added.
+ * DrawTest/English.lproj/Inspector.nib/classes.nib: Added.
+ * DrawTest/English.lproj/Inspector.nib/info.nib: Added.
+ * DrawTest/English.lproj/Inspector.nib/keyedobjects.nib: Added.
+ * DrawTest/English.lproj/MainMenu.nib/classes.nib: Added.
+ * DrawTest/English.lproj/MainMenu.nib/info.nib: Added.
+ * DrawTest/English.lproj/MainMenu.nib/keyedobjects.nib: Added.
+ * DrawTest/English.lproj/TestViewer.nib/classes.nib: Added.
+ * DrawTest/English.lproj/TestViewer.nib/info.nib: Added.
+ * DrawTest/English.lproj/TestViewer.nib/keyedobjects.nib: Added.
+ * DrawTest/Info.plist: Added.
+ * DrawTest/SVGTest.h: Added.
+ * DrawTest/SVGTest.m: Added.
+ * DrawTest/ScalingImageView.h: Added.
+ * DrawTest/ScalingImageView.m: Added.
+ * DrawTest/TestController.h: Added.
+ * DrawTest/TestController.m: Added.
+ * DrawTest/TestViewerSplitView.h: Added.
+ * DrawTest/TestViewerSplitView.m: Added.
+ * DrawTest/main.m: Added.
+ Adding simple cocoa app for testing SVG rendering, interaction.
+ http://bugs.webkit.org/show_bug.cgi?id=4157
+
+2005-07-28 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by ggaren.
+
+ * svg2png/svg2png.m: Added.
+ * svg2png/svg2png.xcodeproj/project.pbxproj: Added.
+ * svg2png/svg2png_Prefix.pch: Added.
+ Added a simple test tool which dumps a PNG from an SVG using
+ WebCore+SVG's SVG rendering support.
+ http://bugs.webkit.org/show_bug.cgi?id=4156
+
+2005-07-26 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Darin Adler.
+
+ - new script to review the DOM layout test results and see where we stand
+ on actual success and failure
+
+ * Scripts/check-dom-results: Added.
+
+2005-07-25 Darin Adler <darin@apple.com>
+
+ * Scripts/webkitdirs.pm: Check in missing line of code.
+
+2005-07-25 Darin Adler <darin@apple.com>
+
+ - fixed problem that was causing JavaScriptCore test to fail
+ (except for people who had set DYLD_FRAMEWORK_PATH)
+
+ * Scripts/run-javascriptcore-tests: Add code to set DYLD_FRAMEWORK_PATH.
+ Add code to parse configuration parameter so you can pass --deployment if you like.
+ * Scripts/run-webkit-tests: Add code to parse configuration parameter.
+
+ * Scripts/update-javascriptcore-test-results: Add license header.
+
+ * Scripts/webkitdirs.pm: Change code that reads configuration option to remove it
+ from @ARGV. This lets us use this option in commands that take other options and
+ pass them along to a subsequent tool.
+
+2005-07-25 Darin Adler <darin@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ - Fixed run-safari and gdb-safari to use the Safari application in the build results
+ directory, if any, falling back to the one in the Applications directory otherwise.
+ Does no harm for open source contributors who don't build Safari, and helps out the
+ Safari team, since we do build Safari.
+
+ * Scripts/webkitdirs.pm: Added safariPath function that uses WEBKIT_SAFARI environment
+ variable, and if that's not present, looks in either the build results directory or
+ /Applications; factors code that was in both scripts before into a shared function.
+ Also removed some Xcode 2.0 support which is no longer relevant since our projects are
+ now in Xcode 2.1 format and incompatible with older versions of Xcode.
+
+ * Scripts/gdb-safari: Use safariPath.
+ * Scripts/run-safari: Use safariPath.
+
+2005-07-22 Geoffrey Garen <ggaren@apple.com>
+
+ Moved Tools/Scripts/run-mozilla-tests to WebKitTools/Scripts/run-javascriptcore-tests.
+ run-javascriptcore-tests now passes its command-line arguments to jsDriver.pl
+
+ Moved Tools/Scripts/update-mozilla-js-test-results to
+ WebKitTools/Scripts/update-javascriptcore-test-results.
+
+ Reviewed by darin.
+
+ * Scripts/run-javascriptcore-tests: Added.
+
+2005-07-21 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin Adler.
+
+ * Scripts/build-dumprendertree: changed XCode 2.0 project file reference to 2.1
+
+2005-07-21 Geoffrey Garen <ggaren@apple.com>
+
+ * DumpRenderTree/DumpRenderTree.xcode/.cvsignore: Removed.
+
+2005-07-21 Geoffrey Garen <ggaren@apple.com>
+
+ * DumpRenderTree/DumpRenderTree.xcode/project.pbxproj: Removed.
+
+2005-07-21 Geoffrey Garen <ggaren@apple.com>
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/.cvsignore: Added.
+
+2005-07-21 Geoffrey Garen <ggaren@apple.com>
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Added.
+
+2005-07-21 Geoffrey Garen <ggaren@apple.com>
+
+ * Scripts/build-webkit:
+
+2005-07-12 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by mjs.
+
+ * checkout-svg: Fixed error with symlink creation.
+
+2005-07-12 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by mjs.
+
+ * checkout-svg: Added.
+ Script to check out WebCore+SVG
+
+2005-06-30 Darin Adler <darin@apple.com>
+
+ Changes based on input from Michael Kahl.
+
+ * Scripts/cvs-create-patch: Use "-f" so we are compatible with .cvsrc files that
+ specify different style of "diff".
+ * Scripts/webkitdirs.pm: Add missing call to determineBaseProductDir, so that
+ determineConfigurationProductDir works in all cases.
+
+2005-06-29 Darin Adler <darin@apple.com>
+
+ - fixed bug which would result in multiple unwanted dumps in a single layout test
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (-[WaitUntilDoneDelegate webView:locationChangeDone:forDataSource:]): Set new
+ "readyToDump" flag.
+ (-[LayoutTestController waitUntilDone]): Update for name change.
+ (-[LayoutTestController notifyDone]): Dump only if ready.
+ (dumpRenderTree): Set up new boolean and update for name change.
+
+2005-06-29 Darin Adler <darin@apple.com>
+
+ Changes by Timothy Hatcher.
+ Reviewed by me.
+
+ * Scripts/run-webkit-app: Added script to open an arbritrary application with
+ a CVS built WebKit. Example: ./run-webkit-app Colloquy
+
+ * Scripts/gdb-safari: Added support for WEBKIT_SAFARI environment variable to specify
+ a custom location to the Safari.app bundle. This is optional, script defaults to the stock location.
+ * Scripts/run-safari: Ditto.
+
+2005-06-26 Darin Adler <darin@apple.com>
+
+ * Scripts/build-dumprendertree: Pass -project option so that having a second
+ copy of the project (like the one Xcode 2.1 offers to make for you) that's
+ out of date won't screw you up.
+ * Scripts/build-webkit: Ditto.
+
+2005-06-23 Darin Adler <darin@apple.com>
+
+ * Scripts/webkitdirs.pm: Fixed a regular expression in the code I just landed.
+
+2005-06-23 Darin Adler <darin@apple.com>
+
+ Changes based on input from Michael Kahl.
+
+ * Scripts/cvs-create-patch: Added code to handle getting changes in the top-level
+ directory passed in.
+
+ * Scripts/webkitdirs.pm: Eliminate use of changing the current directory and using
+ getcwd() in the code to find the base product dir. Added code to handle unusual
+ base product directory values that use SRCROOT.
+
+2005-06-22 Darin Adler <darin@apple.com>
+
+ Change by Anders Carlsson.
+
+ - added support for dumping title changes
+
+ * DumpRenderTree/DumpRenderTree.m:
+ (-[WaitUntilDoneDelegate webView:didReceiveTitle:forFrame:]): Added. Dump title change
+ if requested by JavaScript.
+ (+[LayoutTestController isSelectorExcludedFromWebScript:]): Added dumpTitleChanges.
+ (-[LayoutTestController dumpTitleChanges]): Added, sets flag.
+ (dumpRenderTree): Start flag as NO.
+
+2005-06-20 Darin Adler <darin@apple.com>
+
+ Reviewed by Justin Garcia.
+
+ * Scripts/run-webkit-tests: Report number of tests when they succeed.
+
+2005-06-18 Darin Adler <darin@apple.com>
+
+ * DumpRenderTree/DumpRenderTree.m: (dumpRenderTree): Add more auto-release pools
+ in the hope of making the tool use less memory and run faster.
+
+2005-06-18 Darin Adler <darin@apple.com>
+
+ * Scripts/cvs-apply: Improve handling of patches with CR characters in them.
+ * Scripts/cvs-unapply: Ditto.
+
+2005-06-17 Maciej Stachowiak <mjs@apple.com>
+
+ - added prepare-ChangeLog script which we use internally to make ChangeLogs, for
+ benefit of all WebKit hackerdom
+
+ * Scripts/prepare-ChangeLog: Added.
+
+2005-06-16 Darin Adler <darin@apple.com>
+
+ - recent changes to XcodeOptions made it depend on the current directory
+ The intent was to have the WebKitBuild directory be next to WebKitTools,
+ not inside the various build directories. Workaround for now is to call
+ XcodeOptions when the directory is set to the WebKit directory.
+
+ * Scripts/build-dumprendertree: Use a local variable for XcodeOptions and get it
+ at the start of the script.
+ * Scripts/build-webkit: Ditto.
+
+2005-06-15 Darin Adler <darin@apple.com>
+
+ * Scripts/webkitdirs.pm: Recognize all 1.X versions of Xcode as old too, not just 2.0.
+
+2005-06-14 Darin Adler <darin@apple.com>
+
+ Changes by Anders Carlsson.
+ Reviewed by me.
+
+ - fixed <http://bugs.webkit.org/show_bug.cgi?id=3496>
+ Add gdb-safari script to launch Safari under gdb
+
+ * Scripts/gdb-safari: Added.
+
+2005-06-12 Darin Adler <darin@apple.com>
+
+ Changes by Stuart Morgan.
+ Reviewed by me.
+
+ * Scripts/cvs-abandon: Use cwd instead of `pwd`.
+ * Scripts/cvs-apply: Ditto.
+ * Scripts/cvs-create-patch: Ditto.
+ * Scripts/cvs-unapply: Ditto.
+ * Scripts/run-webkit-tests: Ditto.
+ * Scripts/webkitdirs.pm: Ditto. Also improve handling when there's no "Configuration" file.
+
+2005-06-12 Darin Adler <darin@apple.com>
+
+ * Scripts/cvs-apply: Handle case of an empty patch better.
+ * Scripts/cvs-unapply: Ditto.
+
+2005-06-12 Darin Adler <darin@apple.com>
+
+ Changes by Michael Gaiman.
+ Reviewed by me.
+
+ - fixed <http://bugs.webkit.org/show_bug.cgi?id=3487>
+ WebKit no longer builds after configuration supporting build changes
+
+ * Scripts/webkitdirs.pm: Chomp off the result of `pwd`, and don't die when no Configuration file.
+
+2005-06-12 Darin Adler <darin@apple.com>
+
+ * Scripts/update-webkit: Make this script work when called from any directory.
+
+2005-06-12 Darin Adler <darin@apple.com>
+
+ Reviewed by Maciej.
+ Includes changes by Stuart Morgan as well as my own.
+
+ * Scripts/build-dumprendertree: Call the new setConfiguration function, and use XcodeOptions instead of
+ symrootXcodeOptions to set the -buildstyle option.
+ * Scripts/build-webkit: Ditto. Also remove the old way of supporting Xcode 2.1 and the old --debug option.
+ The new --development option does the same thing.
+ * Scripts/run-safari: Ditto.
+ * Scripts/run-webkit-tests: Ditto.
+ * Scripts/update-webkit: Ditto.
+ * Scripts/set-webkit-configuration: Added. Sets the default configuration to Development or Deployment.
+
+ * Scripts/webkitdirs.pm: use FindBin to find the WebKit directory; works no matter what the current
+ directory is when invoking a script. Add code to determine the Xcode version so we can do the right
+ thing for 2.0 and 2.1. Change the productDir function to return the appropriate per-configuration
+ product directory. Read the default configuration from a file, overridable by a passed-in command-line
+ option.
+
+2005-06-11 Darin Adler <darin@apple.com>
+
+ * Scripts/cvs-create-patch: Improve handling of directories with mixed CVS roots by going into each directory
+ to execute the cvs diff commands.
+
+2005-06-11 Darin Adler <darin@apple.com>
+
+ - added first cuts at some cvs scripts
+
+ cvs-abandon is for throwing away changes; discards any local changes, reverting to the state in CVS
+ cvs-create-patch is for making patches; runs cvs diff with all the right options and handles added/deleted files
+ cvs-apply is for applying patches; runs patch and cvs add and cvs rm
+ cvs-unapply is for unapplying patches; does the opposite of cvs-apply
+
+ An argument against these is "waste of time if we switch to Subversion", but they should be good for a while.
+
+ * Scripts/cvs-abandon: Added.
+ * Scripts/cvs-apply: Added.
+ * Scripts/cvs-create-patch: Added.
+ * Scripts/cvs-unapply: Added.
+
+2005-06-09 Darin Adler <darin@apple.com>
+
+ Reviewed by Maciej.
+
+ - fixed http://bugs.webkit.org/show_bug.cgi?id=3397
+ Build DumpRenderTree fails with unresolved NSAutoreleasePool, etc
+
+ * DumpRenderTree/DumpRenderTree.xcode/project.pbxproj: Change type from "folder" to "wrapper.framework"
+ for Foundation.framework. How was it ever wrong?
+
+ - finally, I tested making the default build directory work; it works now
+
+ * Scripts/webkitdirs.pm: Changed structure of the code a little bit, added symrootXcodeOptions function
+ that sets SYMROOT on the command line in case there's no product directory set in Xcode preferences.
+ * Scripts/build-webkit: Pass symrootXcodeOptions when invoking Xcode.
+ * Scripts/build-dumprendertree: Ditto.
+
+2005-06-09 Darin Adler <darin@apple.com>
+
+ * Scripts/webkitdirs.pm: Another try at making the default build directory of ~/WebKitBuild
+ work. Someone should try building without setting the Xcode build product directory now,
+ and let me know if it works.
+
+2005-06-08 Darin Adler <darin@apple.com>
+
+ - quick fix to try to get build scripts working again
+
+ * Scripts/build-dumprendertree: Add FindBin.
+ * Scripts/build-webkit: Ditto.
+ * Scripts/run-safari: Ditto.
+ * Scripts/run-webkit-tests: Ditto.
+ * Scripts/update-webkit: Ditto.
+
+2005-06-08 Darin Adler <darin@apple.com>
+
+ Reviewed by Maciej.
+
+ - some build script enhancements
+
+ * Scripts/build-dumprendertree: Changed to use webkitdirs.
+ * Scripts/build-webkit: Changed to use webkitdirs, also only copy files from WebKitLibraries if
+ they are newer.
+ * Scripts/run-safari: Reduce number of log messages, change to respect "-d" flag and get Development
+ before Deplyment in that case.
+ * Scripts/run-webkit-tests: Changed to use webkitdirs.
+ * Scripts/update-webkit: Changed to use webkitdirs.
+
+ * Scripts/webkitdirs.pm: Added.
+
+2005-06-08 Maciej Stachowiak <mjs@apple.com>
+
+ Code change by Toby Peterson <toby@opendarwin.org>
+ Reviewed by me.
+
+ * Scripts/run-safari: Fix to work with Xcode 2.0 again. The script would
+ get confused because build-webkit now makes even 2.0 build directories look
+ like 2.1.
+
+2005-06-07 Darin Adler <darin@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ * DumpRenderTree/DumpRenderTree.xcode/project.pbxproj: Added Deployment build style.
+ * Scripts/build-dumprendertree: For now, always use Deployment build style. This may fix things
+ so we can run tests with Xcode 2.1.
+
+2005-06-07 Darin Adler <darin@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ * Scripts/run-webkit-tests: Pass -L to find command to follow symlinks. This allows symlinks in the
+ layout-tests directory to include additional sets of tests.
+
+2005-06-07 Darin Adler <darin@apple.com>
+
+ * checkout: Added license.
+ * Scripts/build-dumprendertree: Ditto.
+ * Scripts/run-webkit-tests: Ditto.
+ * Scripts/update-webkit: Ditto.
+
+2005-06-07 Darin Adler <darin@apple.com>
+
+ Change by Toby Peterson <toby@opendarwin.org>.
+ Reviewed by me.
+
+ * Scripts/build-webkit: Changes so you can build with Xcode 2.1. (I also added a license to this file.)
+ * Scripts/run-safari: Ditto.
+
+2005-06-06 Maciej Stachowiak <mjs@apple.com>
+
+ * Scripts/build-webkit: run ranlib on libWebKitSystemInterface.a
+
+2005-06-06 Maciej Stachowiak <mjs@apple.com>
+
+ * Scripts/build-webkit: Chop newline off of $productDir to avoid problems with logic to copy files ther.
+
+2005-06-06 Maciej Stachowiak <mjs@apple.com>
+
+ * Scripts/build-webkit: Install WebKitSystemInterface stuff into build products dir.
+
+2005-06-05 Darin Adler <darin@apple.com>
+
+ * DumpRenderTree/DumpRenderTree.xcode/project.pbxproj: Tweak, simplify.
+ * Scripts/build-dumprendertree: Added.
+ * Scripts/build-webkit: Build All in the JavaScriptCore directory.
+ * Scripts/run-webkit-tests: Build DumpRenderTree before running.
+
+2005-06-05 Darin Adler <darin@apple.com>
+
+ * Scripts/run-safari: Fix path to Safari executable. Add check for frameworks.
+
+2005-06-05 Darin Adler <darin@apple.com>
+
+ - add run-webkit-tests script; not working yet but the pieces are there
+
+ * Scripts/run-webkit-tests: Added.
+
+ * DumpRenderTree/DumpRenderTree.m: Added.
+ * DumpRenderTree/DumpRenderTree.xcode/.cvsignore: Added.
+ * DumpRenderTree/DumpRenderTree.xcode/project.pbxproj: Added.
+ * DumpRenderTree/DumpRenderTreePrefix.h: Added.
+
+2005-06-05 Darin Adler <darin@apple.com>
+
+ - created module, first cut at Web Kit Open Source Project scripts
+
+ * ChangeLog: Added.
+ * Scripts/build-webkit: Added.
+ * Scripts/run-safari: Added.
+ * Scripts/update-webkit: Added.
+ * checkout: Added.
+
+=== creation of WebKitTools module ===
diff --git a/WebKitTools/CodeCoverage/README b/WebKitTools/CodeCoverage/README
new file mode 100644
index 0000000..5315f4a
--- /dev/null
+++ b/WebKitTools/CodeCoverage/README
@@ -0,0 +1,22 @@
+Generate coverage on Mac
+
+call WebKitTools/Script/generate-coverage-data
+
+or by hand
+
+
+# delete
+find . -name '*.gcda' -delete
+
+# build, -framework CoreFoundation might suffice as well
+WebKitTools/Scripts/build-webkit GCC_GENERATE_TEST_COVERAGE_FILES=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES EXTRA_LINK=" -ftest-coverage -fprofile-arcs" OTHER_CFLAGS=" -MD " OTHER_LDFLAGS=" -ftest-coverage -fprofile-arcs -framework AppKit"
+WebKitTools/Scripts/run-webkit-tests
+WebKitTools/Scripts/run-javascriptcore-tests GCC_GENERATE_TEST_COVERAGE_FILES=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES EXTRA_LINK=" -ftest-coverage -fprofile-arcs" OTHER_CFLAGS=" -MD " OTHER_LDFLAGS=" -ftest-coverage -fprofile-arcs -framework AppKit"
+
+
+# Collect files
+WebKitTools/CodeCoverage/run-generate-coverage-data <RUN_ID> ../coverage-results/
+
+
+# Generate graph
+WebKitTools/CodeCoverage/regenerate-coverage-display ../coverage-results/ ../coverage-results/html
diff --git a/WebKitTools/CodeCoverage/amber.png b/WebKitTools/CodeCoverage/amber.png
new file mode 100644
index 0000000..ee5d920
--- /dev/null
+++ b/WebKitTools/CodeCoverage/amber.png
Binary files differ
diff --git a/WebKitTools/CodeCoverage/cov.py b/WebKitTools/CodeCoverage/cov.py
new file mode 100644
index 0000000..443e601
--- /dev/null
+++ b/WebKitTools/CodeCoverage/cov.py
@@ -0,0 +1,201 @@
+# Copyright (C) 2004, 2005, 2006 Nathaniel Smith
+# Copyright (C) 2006, 2007 Holger Hans Peter Freyther
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import csv
+import time
+import os.path
+import shutil
+
+def analyze_coverage(possible_gcov_files, source_files, runid, data_dir, base):
+
+ if not os.path.exists(data_dir):
+ os.makedirs(data_dir)
+
+ output = open(os.path.join(data_dir, runid + ".csv"), "w")
+ w = csv.writer(output)
+ # First row: id and time
+ w.writerow([runid, time.time()])
+
+ results = scan_gcov_files(possible_gcov_files, source_files)
+ annotated_dir = os.path.join(data_dir, runid + ".annotated")
+ if os.path.exists(annotated_dir):
+ shutil.rmtree(annotated_dir)
+
+ keys = results.keys()
+ keys.sort()
+ for path in keys:
+ (total, covered, annotated_data) = results[path]
+ path = path[path.find(base)+len(base):]
+ # Rest of the rows: filename, total_lines, covered_lines
+ w.writerow([path, total, covered])
+
+ if path[:1] == "/":
+ path = path[1:]
+ annotated_path = os.path.join(annotated_dir, path)
+ try:
+ os.makedirs(os.path.dirname(annotated_path))
+ except OSError:
+ pass
+ a = open(annotated_path, "w")
+ a.write(annotated_data)
+ a.close()
+
+
+# zecke's rewrite
+STATE_NOT_CODE = -1
+STATE_NOT_SEEN = -2
+STATE_TEST_CODE = -3
+
+def find_gcov(f, possible_gcovs):
+ """
+ Find .gcov files that could be of interest for us
+ """
+ try:
+ return possible_gcovs[f]
+ except:
+ return []
+
+
+def parse_source_file(file):
+ """
+ Parse one source file and return a list of lines
+ """
+ f_source_list = []
+ init_state = STATE_NOT_SEEN
+ in_test_code = False
+ nesting = 0
+
+ for line in open(file, "r"):
+ code = line.split(":", 2)[-1]
+ if not in_test_code and code.startswith("#ifdef BUILD_UNIT_TESTS"):
+ in_test_code = 1
+ if in_test_code and code.startswith("#if"):
+ nesting += 1
+ if in_test_code and code.startswith("#endif"):
+ nesting -= 1
+ if not nesting:
+ in_test_code = True
+ if in_test_code:
+ init_state = STATE_TEST_CODE
+ else:
+ init_state = STATE_NOT_SEEN
+ f_source_list.append([init_state, line.split(":", 1)[1]])
+
+ return f_source_list
+
+# Runner-up, 3rd annual "write Python that looks like Perl" competition,
+# Well, not really. It doesn't even use regexps.
+# He is right so I'm cleaning it up (zecke)
+def scan_gcov_files(possible_gcov_files, source_files):
+ """Takes a list of gcov filenames and a list of source filenames.
+
+ The gcov files should have names of the form foo.o##foo.cc.gcov, as
+ created by 'gcov -l'.
+
+ Returns a dict mapping source filenames to tuples
+ (total_lines, tested_lines, gcov_annotated_source)
+ which are a number, a number, and a very long string, respectively.
+
+ The fun bit is that we merge .gcov output generated by different object
+ files; this way we can provide accurate information for header files and
+ for monotone's current unit test system."""
+ results = {}
+ for f in source_files:
+ possible_gcovs = find_gcov(f, possible_gcov_files)
+ base_name = os.path.splitext(os.path.basename(f))[0]
+ if len(possible_gcovs) == 0:
+ print "No gcov files found for: '%s' but it was compiled" % f
+ continue
+
+ (garbage,extension) = os.path.splitext(f)
+ if extension in [".cc", ".c", ".moc", ".cpp", ".cxx", ".m", ".mm"]:
+ lines = open(f, "r").readlines()
+ results[f] = (len(lines), 0, "".join(lines))
+ continue
+ elif len(possible_gcovs) > 1:
+ print "More than one gcov file for %s %d" % (f,len(possible_gcovs))
+ base_gcov_lines = parse_source_file(possible_gcovs[0])
+
+ # Now we will try hard to merge the results with others
+ # Our requirement is that we have the same amount of lines as
+ # as the original file
+ for cov_file in possible_gcovs:
+ lines = open(cov_file, "r").readlines()
+
+ # e.g. with phonon we have visualisation.h and we can not know
+ # which header file (foldername) it is refering to. This is a gcov
+ # limitation and i have no workaround yet. We just hope we will pick
+ # the right header file...
+ if len(lines) != len(base_gcov_lines):
+ print "Error Base: %s and Target: %s have different amount of lines" % (possible_gcovs[0],cov_file)
+ continue
+
+ # now do the merging of the file. If it has the same basename
+ # and the same number of lines things might work out
+ # In the future take a look at the header of the file
+ i = 0
+ for line in lines:
+ accumulator = base_gcov_lines[i]
+ if accumulator[0] != STATE_TEST_CODE:
+ info = line.split(":", 1)[0]
+ if info.endswith("-"):
+ if accumulator[0] == STATE_NOT_SEEN:
+ accumulator[0] = STATE_NOT_CODE
+ else:
+ if info.endswith("#"):
+ num = 0
+ else:
+ num = int(info)
+ if accumulator[0] in (STATE_NOT_SEEN, STATE_NOT_CODE):
+ accumulator[0] = 0
+ accumulator[0] += num
+ i += 1
+
+ # post processing of ths file
+ (total_lines, total_covered) = (0, 0)
+ annotated_lines = []
+ for state, line in base_gcov_lines:
+ if state == STATE_NOT_SEEN:
+ desc = "?????"
+ elif state == STATE_TEST_CODE:
+ desc = "+"
+ elif state == STATE_NOT_CODE:
+ desc = "-"
+ elif state == 0:
+ desc = "#####"
+ total_lines += 1
+ else:
+ desc = str(state)
+ total_lines += 1
+ total_covered += 1
+ annotated_lines.append(":".join([desc.rjust(9), line]))
+ results[f] = (total_lines, total_covered, "".join(annotated_lines))
+ return results
+
+
+
+ return results
diff --git a/WebKitTools/CodeCoverage/emerald.png b/WebKitTools/CodeCoverage/emerald.png
new file mode 100644
index 0000000..0e60294
--- /dev/null
+++ b/WebKitTools/CodeCoverage/emerald.png
Binary files differ
diff --git a/WebKitTools/CodeCoverage/gcov.css b/WebKitTools/CodeCoverage/gcov.css
new file mode 100644
index 0000000..71ca080
--- /dev/null
+++ b/WebKitTools/CodeCoverage/gcov.css
@@ -0,0 +1,116 @@
+body {
+ color: black; background-color: white;
+ font-family: Helvetica,Arial,sans-serif;
+ margin: 0; padding: 0em;
+ text-align: center;
+}
+
+.title {
+ text-align:center;
+ font-weight:bold;
+ font-style:italic;
+ font-size:1.8em;
+ padding:10px;
+}
+
+.ruler {
+ height:3px;
+ background-color:#638AD6;
+ margin-left:10px;
+ margin-right:10px;
+}
+
+.headerItem {
+ text-align:right;
+ font-weight:bold;
+}
+
+.headerValue {
+ text-align:left;
+ font-weight:bold;
+ color:#638AD6;
+}
+
+.tableHead {
+ text-align:center;
+ font-weight:bold;
+ background-color:#638AD6;
+ color:white;
+
+}
+
+.coverFile {
+ font-family: Courier;
+ background-color:#DEE7FF;
+ padding:3px;
+ width:70%;
+}
+
+.coverBar {
+ background-color:#DEE7FF;
+ padding:3px;
+ width:5%;
+}
+
+.coverBarOutline {
+}
+
+.coverPerHi {
+ font-family: Times;
+ text-align:center;
+ font-weight:bold;
+ background-color:lightgreen;
+ padding:3px;
+ width:5%;
+}
+
+.coverNumHi {
+ font-family: Times;
+ text-align:right;
+ background-color:lightgreen;
+ padding:3px;
+ width:25%;
+}
+
+.coverPerMed {
+ font-family: Times;
+ text-align:center;
+ font-weight:bold;
+ background-color:yellow;
+ padding:3px;
+}
+
+.coverNumMed {
+ font-family: Times;
+ text-align:right;
+ background-color:yellow;
+ padding:3px;
+}
+
+.coverPerLo {
+ font-family: Times;
+ text-align:center;
+ font-weight:bold;
+ background-color:red;
+ padding:3px;
+}
+
+.coverNumLo {
+ font-family: Times;
+ text-align:right;
+ background-color:red;
+ padding:3px;
+}
+
+.lineNum {
+ background-color:#EFE384;
+}
+
+.lineCov {
+ background-color:#CED7FF;
+}
+
+.lineNoCov {
+ background-color:#FF6131;
+}
+
diff --git a/WebKitTools/CodeCoverage/glass.png b/WebKitTools/CodeCoverage/glass.png
new file mode 100644
index 0000000..a4ba373
--- /dev/null
+++ b/WebKitTools/CodeCoverage/glass.png
Binary files differ
diff --git a/WebKitTools/CodeCoverage/regenerate-coverage-display b/WebKitTools/CodeCoverage/regenerate-coverage-display
new file mode 100755
index 0000000..c25b412
--- /dev/null
+++ b/WebKitTools/CodeCoverage/regenerate-coverage-display
@@ -0,0 +1,382 @@
+#!/usr/bin/env python
+#
+# Copyright (C) 2004, 2005, 2006 Nathaniel Smith
+# Copyright (C) 2007 Holger Hans Peter Freyther
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#
+# HTML output inspired by the output of lcov as found on the GStreamer
+# site. I assume this is not copyrightable.
+#
+
+
+#
+# Read all CSV files and
+# Create an overview file
+#
+#
+
+
+import sys
+import csv
+import glob
+import time
+import os
+import os.path
+import datetime
+import shutil
+
+os.environ["TTFPATH"] = ":".join(["/usr/share/fonts/truetype/" + d
+ for d in "ttf-bitstream-vera",
+ "freefont",
+ "msttcorefonts"])
+
+level_LOW = 10
+level_MEDIUM = 70
+
+def copy_files(dest_dir):
+ """
+ Copy the CSS and the png's to the destination directory
+ """
+ images = ["amber.png", "emerald.png", "glass.png", "ruby.png", "snow.png"]
+ css = "gcov.css"
+ (base_path, name) = os.path.split(__file__)
+ base_path = os.path.abspath(base_path)
+
+ shutil.copyfile(os.path.join(base_path,css), os.path.join(dest_dir,css))
+ map(lambda x: shutil.copyfile(os.path.join(base_path,x), os.path.join(dest_dir,x)), images)
+
+def sumcov(cov):
+ return "%.2f%% (%s/%s)" % (cov[1] * 100.0 / (cov[0] or 1), cov[1], cov[0])
+
+def create_page(dest_dir, name):
+ index = open(os.path.join(dest_dir, name), "w")
+ index.write("""<HTML>
+ <HEAD>
+ <TITLE>WebKit test coverage information</TITLE>
+ <link rel="stylesheet" type="text/css" href="gcov.css">
+ </HEAD>
+ <BODY>
+ """)
+ return index
+
+def generate_header(file, last_time, total_lines, total_executed, path, image):
+ product = "WebKit"
+ date = time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(last_time))
+ covered_lines = sumcov((total_lines, total_executed))
+
+ file.write("""<table width="100%%" border=0 cellspacing=0 cellpadding=0>
+ <tr><td class="title">GCOV code coverage report</td></tr>
+ <tr><td class="ruler"><img src="glass.png" width=3 height=3 alt=""></td></tr>
+
+ <tr>
+ <td width="100%%">
+ <table cellpadding=1 border=0 width="100%%">
+ <tr>
+ <td class="headerItem" width="20%%">Current&nbsp;view:</td>
+ <td class="headerValue" width="80%%" colspan=4>%(path)s</td>
+ </tr>
+ <tr>
+ <td class="headerItem" width="20%%">Test:</td>
+ <td class="headerValue" width="80%%" colspan=4>%(product)s</td>
+ </tr>
+ <tr>
+ <td class="headerItem" width="20%%">Date:</td>
+ <td class="headerValue" width="20%%">%(date)s</td>
+ <td width="20%%"></td>
+ <td class="headerItem" width="20%%">Instrumented&nbsp;lines:</td>
+ <td class="headerValue" width="20%%">%(total_lines)s</td>
+ </tr>
+ <tr>
+ <td class="headerItem" width="20%%">Code&nbsp;covered:</td>
+ <td class="headerValue" width="20%%">%(covered_lines)s</td>
+ <td width="20%%"></td>
+ <td class="headerItem" width="20%%">Executed&nbsp;lines:</td>
+ <td class="headerValue" width="20%%">%(total_executed)s</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr><td class="ruler"><img src="glass.png" width=3 height=3 alt=""></td></tr>
+ </table>""" % vars())
+ # disabled for now <tr><td><img src="%(image)s"></td></tr>
+
+def generate_table_item(file, name, total_lines, covered_lines):
+ covered_precise = (covered_lines*100.0)/(total_lines or 1.0)
+ covered = int(round(covered_precise))
+ remainder = 100-covered
+ (image,perClass,numClass) = coverage_icon(covered_precise)
+ site = "%s.html" % name.replace(os.path.sep,'__')
+ file.write("""
+ <tr>
+ <td class="coverFile"><a href="%(site)s">%(name)s</a></td>
+ <td class="coverBar" align="center">
+ <table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="%(image)s" width=%(covered)s height=10 alt="%(covered_precise).2f"><img src="snow.png" width=%(remainder)s height=10 alt="%(covered_precise).2f"></td></tr></table>
+ </td>
+ <td class="%(perClass)s">%(covered_precise).2f&nbsp;%%</td>
+ <td class="%(numClass)s">%(covered_lines)s&nbsp;/&nbsp;%(total_lines)s&nbsp;lines</td>
+ </tr>
+ """ % vars())
+
+def generate_table_header_start(file):
+ file.write("""<center>
+ <table width="80%%" cellpadding=2 cellspacing=1 border=0>
+
+ <tr>
+ <td width="50%%"><br></td>
+ <td width="15%%"></td>
+ <td width="15%%"></td>
+ <td width="20%%"></td>
+ </tr>
+
+ <tr>
+ <td class="tableHead">Directory&nbsp;name</td>
+ <td class="tableHead" colspan=3>Coverage</td>
+ </tr>
+ """)
+
+def coverage_icon(percent):
+ if percent < level_LOW:
+ return ("ruby.png", "coverPerLo", "coverNumLo")
+ elif percent < level_MEDIUM:
+ return ("amber.png", "coverPerMed", "coverNumMed")
+ else:
+ return ("emerald.png", "coverPerHi", "coverNumHi")
+
+def replace(text, *pairs):
+ """
+ From pydoc... almost identical at least
+ """
+ from string import split, join
+ while pairs:
+ (a,b) = pairs[0]
+ text = join(split(text, a), b)
+ pairs = pairs[1:]
+ return text
+
+def escape(text):
+ """
+ Escape string to be conform HTML
+ """
+ return replace(text,
+ ('&', '&amp;'),
+ ('<', '&lt;' ),
+ ('>', '&gt;' ) )
+
+def generate_table_header_end(file):
+ file.write("""</table>
+ </center>""")
+
+def write_title_page(dest_dir, last_time, last_tot_lines, last_tot_covered, dir_series):
+ """
+ Write the index.html with a overview of each directory
+ """
+ index= create_page(dest_dir, "index.html")
+ generate_header(index, last_time, last_tot_lines, last_tot_covered, "directory", "images/Total.png")
+ # Create the directory overview
+ generate_table_header_start(index)
+ dirs = dir_series.keys()
+ dirs.sort()
+ for dir in dirs:
+ (dir_files, total_lines, covered_lines,_) = dir_series[dir][-1]
+ generate_table_item(index, dir, total_lines, covered_lines)
+ generate_table_header_end(index)
+
+ index.write("""</BODY></HTML>""")
+ index.close()
+
+def write_directory_site(dest_dir, dir_name, last_time, dir_series, file_series):
+ escaped_dir = dir_name.replace(os.path.sep,'__')
+ site = create_page(dest_dir, "%s.html" % escaped_dir)
+ (_,tot_lines,tot_covered,files) = dir_series[dir_name][-1]
+ generate_header(site, last_time, tot_lines, tot_covered, "directory - %s" % dir_name, "images/%s.png" % escaped_dir)
+
+ files.sort()
+
+ generate_table_header_start(site)
+ for file in files:
+ (lines,covered) = file_series[file][-1]
+ generate_table_item(site, file, lines, covered)
+
+ generate_table_header_end(site)
+ site.write("""</BODY></HTML>""")
+ site.close()
+
+def write_file_site(dest_dir, file_name, last_time, data_dir, last_id, file_series):
+ escaped_name = file_name.replace(os.path.sep,'__')
+ site = create_page(dest_dir, "%s.html" % escaped_name)
+ (tot_lines,tot_covered) = file_series[file_name][-1]
+ generate_header(site, last_time, tot_lines, tot_covered, "file - %s" % file_name, "images/%s.png" % escaped_name)
+
+ path = "%s/%s.annotated%s" % (data_dir,last_id,file_name)
+
+ # In contrast to the lcov we want to show files that have been compiled
+ # but have not been tested at all. This means we have sourcefiles with 0
+ # lines covered in the path but they are not lcov files.
+ # To identify them we check the first line now. If we see that we can
+ # continue
+ # -: 0:Source:
+ try:
+ file = open(path, "r")
+ except:
+ return
+ all_lines = file.read().split("\n")
+
+ # Convert the gcov file to HTML if we have a chanche to do so
+ # Scan each line and see if it was covered or not and escape the
+ # text
+ if len(all_lines) == 0 or not "-: 0:Source:" in all_lines[0]:
+ site.write("<p>The file was not excercised</p>")
+ else:
+ site.write("""</br><table cellpadding=0 cellspacing=0 border=0>
+ <tr>
+ <td><br></td>
+ </tr>
+ <tr>
+ <td><pre class="source">
+ """)
+ for line in all_lines:
+ split_line = line.split(':',2)
+ # e.g. at the EOF
+ if len(split_line) == 1:
+ continue
+ line_number = split_line[1].strip()
+ if line_number == "0":
+ continue
+ covered = 15*" "
+ end = ""
+ if "#####" in split_line[0]:
+ covered = '<span class="lineNoCov">%15s' % "0"
+ end = "</span>"
+ elif split_line[0].strip() != "-":
+ covered = '<span class="lineCov">%15s' % split_line[0].strip()
+ end = "</span>"
+
+ escaped_line = escape(split_line[2])
+ str = '<span class="lineNum">%(line_number)10s </span>%(covered)s: %(escaped_line)s%(end)s\n' % vars()
+ site.write(str)
+ site.write("</pre></td></tr></table>")
+ site.write("</BODY></HTML>")
+ site.close()
+
+def main(progname, args):
+ if len(args) != 2:
+ sys.exit("Usage: %s DATADIR OUTDIR" % progname)
+
+ branch = "WebKit from trunk"
+ datadir, outdir = args
+
+ # First, load in all data from the data directory.
+ data = []
+ for datapath in glob.glob(os.path.join(datadir, "*.csv")):
+ data.append(read_csv(datapath))
+ # Sort by time
+ data.sort()
+
+ # Calculate time series for each file.
+ times = [sample[0] for sample in data]
+ times = [datetime.datetime.utcfromtimestamp(t) for t in times]
+
+ all_files = {}
+ all_dirs = {}
+ for sample in data:
+ t, i, tot_line, tot_cover, per_file, per_dir = sample
+ all_files.update(per_file)
+ all_dirs.update(per_dir)
+ total_series = []
+ file_serieses = dict([[k, [(0, 0)] * len(times)] for k in all_files.keys()])
+ dir_serieses = dict([[k, [(0, 0, 0, [])] * len(times)] for k in all_dirs.keys()])
+ data_idx = 0
+ for sample in data:
+ t, i, tot_line, tot_cover, per_file, per_dir = sample
+ total_series.append([tot_line, tot_cover])
+ for f, covinfo in per_file.items():
+ file_serieses[f][data_idx] = covinfo
+ for f, covinfo in per_dir.items():
+ dir_serieses[f][data_idx] = covinfo
+ data_idx += 1
+
+
+ # Okay, ready to start outputting. First make sure our directories
+ # exist.
+ if not os.path.exists(outdir):
+ os.makedirs(outdir)
+ rel_imgdir = "images"
+ imgdir = os.path.join(outdir, rel_imgdir)
+ if not os.path.exists(imgdir):
+ os.makedirs(imgdir)
+
+
+ # And look up the latest revision id, and coverage information
+ last_time, last_id, last_tot_lines, last_tot_covered = data[-1][:4]
+
+ # Now start generating our html file
+ copy_files(outdir)
+ write_title_page(outdir, last_time, last_tot_lines, last_tot_covered, dir_serieses)
+
+ dir_keys = dir_serieses.keys()
+ dir_keys.sort()
+ for dir_name in dir_keys:
+ write_directory_site(outdir, dir_name, last_time, dir_serieses, file_serieses)
+
+ file_keys = file_serieses.keys()
+ for file_name in file_keys:
+ write_file_site(outdir, file_name, last_time, datadir, last_id, file_serieses)
+
+def read_csv(path):
+ r = csv.reader(open(path, "r"))
+ # First line is id, time
+ for row in r:
+ id, time_str = row
+ break
+ time = int(float(time_str))
+ # Rest of lines are path, total_lines, covered_lines
+ per_file = {}
+ per_dir = {}
+ grand_total_lines, grand_covered_lines = 0, 0
+ for row in r:
+ path, total_lines_str, covered_lines_str = row
+ total_lines = int(total_lines_str)
+ covered_lines = int(covered_lines_str)
+ grand_total_lines += total_lines
+ grand_covered_lines += covered_lines
+ per_file[path] = [total_lines, covered_lines]
+
+ # Update dir statistics
+ dirname = os.path.dirname(path)
+ if not dirname in per_dir:
+ per_dir[dirname] = (0,0,0,[])
+ (dir_files,dir_total_lines,dir_covered_lines, files) = per_dir[dirname]
+ dir_files += 1
+ dir_total_lines += total_lines
+ dir_covered_lines += covered_lines
+ files.append(path)
+ per_dir[dirname] = (dir_files,dir_total_lines,dir_covered_lines,files)
+ return [time, id, grand_total_lines, grand_covered_lines, per_file, per_dir]
+
+if __name__ == "__main__":
+ import sys
+ main(sys.argv[0], sys.argv[1:])
diff --git a/WebKitTools/CodeCoverage/ruby.png b/WebKitTools/CodeCoverage/ruby.png
new file mode 100644
index 0000000..a582d35
--- /dev/null
+++ b/WebKitTools/CodeCoverage/ruby.png
Binary files differ
diff --git a/WebKitTools/CodeCoverage/run-generate-coverage-data b/WebKitTools/CodeCoverage/run-generate-coverage-data
new file mode 100755
index 0000000..a87da1d
--- /dev/null
+++ b/WebKitTools/CodeCoverage/run-generate-coverage-data
@@ -0,0 +1,240 @@
+#!/usr/bin/env python
+
+# Copyright (C) 2004, 2005, 2006 Nathaniel Smith
+# Copyright (C) 2007 Holger Hans Peter Freyther
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import os, sys
+
+# from BitBake
+def mkdirhier(dir):
+ """Create a directory like 'mkdir -p', but does not complain if
+ directory already exists like os.makedirs
+ """
+ try:
+ os.makedirs(dir)
+ except OSError, e:
+ if e.errno != 17: raise e
+
+def collect_base(src,match_array):
+ """
+ Collect all files that match the match_array.
+ """
+
+ sources = []
+ for root, dirs, files in os.walk(src):
+ if ".svn" in root:
+ continue
+
+ for file in files:
+ base,ext = os.path.splitext(file)
+ if ext in match_array:
+ sources.append( os.path.join(root, file) )
+
+ return sources
+
+def collect_depends(src):
+ return collect_base(src, [".d"])
+
+def parse_dependency_file(src, base_dir, black_list):
+ """
+ Parse the .d files of the gcc
+
+ Wow, the first time os.path.join is doing the right thing. We might
+ have a relative path in the depends using os.path.join(dirname of .d, dep)
+ we will end up in
+ """
+ file = open(src)
+ file = file.read()
+ file = file.replace('\\', '').replace('\n', '')
+
+ # We now have object: dependencies splitted
+ ar = file.split(':', 1)
+ obj = ar[0].strip()
+ dir = os.path.dirname(obj)
+ deps = ar[1].split(' ')
+
+ # Remove files outside WebKit, make path absolute
+ deps = filter(lambda x: base_dir in x, deps)
+ deps = map(lambda x: os.path.abspath(os.path.join(dir, x)), deps)
+ return (obj, dir, deps)
+
+def collect_cov(base_path,targets):
+ """
+ Collect gcov files, collect_sources is not used as it also creates
+ dirs and needs to do substituting.
+ Actually we will build a mapping from source file to gcov files of
+ interest. This is because we could have bytestream.h in many different
+ subdirectories. And we would endup with bla.cpp##bytestream.h and we
+ do not know which bytestream file was tested
+ """
+ def find_source_file(root,cov_file):
+ """ Find a Source line or crash
+
+ '#Users#ich#projekte#src#threadmessage.cpp###space#dports#include#qt3#qstring.h.gcov'
+ '#Users#ich#projekte#src#threadmessage.cpp##..#^#src#threadmessage.cpp.gcov'
+
+ ### is absolute path
+ ##..#^# is relative path... well a gcov bug as well
+ ## normal split file in the same directory
+ """
+ if '###' in cov_file:
+ split = cov_file.split('###')
+ if not len(split) == 2:
+ raise "Unexpected split result"
+ filepath = split[1][:-5].replace('#',os.path.sep)
+ return os.path.join(os.path.sep,filepath)
+ elif '##..#^#' in cov_file:
+ split = cov_file.split('##..#^#')
+ if not len(split) == 2:
+ raise "Unexpected split result"
+ filepath = split[1][:-5].replace('#',os.path.sep)
+ return os.path.abspath(os.path.join(root,os.path.pardir,os.path.pardir,filepath))
+ elif '##' in cov_file:
+ split = cov_file.split('##')
+ if not len(split) == 2:
+ raise "Unexpected split result"
+ filepath = split[1][:-5].replace('#',os.path.sep)
+ return os.path.abspath(os.path.join(root,filepath))
+ elif '#' in cov_file:
+ # wow a not broken gcov on OSX
+ basename=os.path.basename(cov_file).replace('#',os.path.sep)[:-5]
+ return os.path.abspath(os.path.join(root,basename))
+
+ else:
+ raise "No source found %s" % cov_file
+
+ def sanitize_path(path):
+ """
+ Well fix up paths once again /usr/lib/gcc/i486-linux-gnu/4.1.2/^/^/^/^/include/c++/4.1.2/bits/stl_pair.h
+ according to gcov '^' is a relative path, we will now build one from this one. Somehow it depends
+ on the gcov version if .. really gets replaced to ^....
+ """
+ import os
+ split = path.split(os.path.sep)
+ str = ""
+ for part in split:
+ if part == '':
+ str = os.path.sep
+ elif part == '^':
+ str = "%s..%s" % (str,os.path.sep)
+ else:
+ str = "%s%s%s" % (str,part,os.path.sep)
+ return os.path.abspath(str)
+
+
+ gcov = {}
+ for root, dirs, files in os.walk(base_path):
+ if ".svn" in root:
+ continue
+ for file in files:
+ base,ext = os.path.splitext(file)
+ if ext in [".gcov"]:
+ try:
+ cov = os.path.join(root, file)
+ src = find_source_file( root, cov )
+ src = sanitize_path( src )
+
+ if not src in gcov:
+ gcov[src] = []
+ gcov[src].append( cov )
+ except Exception,e:
+ print "Exception on ", e
+ #import sys
+ #sys.exit(0)
+ pass
+
+ #print gcov
+ return gcov
+
+def generate_covs(candidates):
+ """
+ Generate gcov files in the right directory
+
+ candidtaes contains the directories we have used when
+ building. Each directory contains a set of files we will
+ try to generate gcov files for.
+ """
+ print candidates.keys()
+ for dir in candidates.keys():
+ print "Trying in %s" % (dir)
+ for dep in candidates[dir].keys():
+ cmd = "cd %s; gcov -p -l %s" % (dir, dep)
+ os.system("%s > /dev/null 2>&1 " % cmd)
+
+
+def analyze_coverage(sources,data,dirs,runid,base):
+ """
+ sources actual source files relative to src_dir e.g kdelibs/kdecore/klibloader.cpp
+ data Where to put the stuff
+ dirs Where to take a look for gcov files
+ base The base directory for files. All files not inside base will be ignored
+ """
+ import cov
+ print base
+ gcov = collect_cov(base,dirs)
+ result = cov.analyze_coverage(gcov, sources, runid, data, base)
+ print result
+
+if __name__ == "__main__":
+ #global targets
+ if not len(sys.argv) == 3:
+ print "This script needs three parameters"
+ print "Call it with generate_cov RUNID ResultsDir"
+ sys.exit(-1)
+ runid = sys.argv[1]
+ results = sys.argv[2]
+
+ # create directories for out result
+ mkdirhier(results)
+
+ print "Collection Sources and preparing data tree"
+ base_dir = os.path.abspath(os.path.curdir)
+ depends = collect_depends(base_dir)
+ candidates = map(lambda x: parse_dependency_file(x,base_dir,[]), depends)
+
+ # Build a number of sources from the candidates. This is a Set for the poor
+ # Two level dict. One for
+ dirs = {}
+ files = {}
+ for (_,dir,deps) in candidates:
+ if not dir in dirs:
+ dirs[dir] = {}
+ for dep in deps:
+ if not dep in dirs[dir]:
+ dirs[dir][dep] = dep
+ if not dep in files:
+ files[dep] = dep
+
+ sources = files.keys()
+
+ print "Found %d candidates" % (len(sources))
+ print "Will run inefficient generation of gcov files now"
+ generate_covs(dirs)
+
+ print "Analyzing Gcov"
+ analyze_coverage(sources, results, dirs.keys(), runid, base_dir)
+ print "Done"
diff --git a/WebKitTools/CodeCoverage/snow.png b/WebKitTools/CodeCoverage/snow.png
new file mode 100644
index 0000000..a4ba373
--- /dev/null
+++ b/WebKitTools/CodeCoverage/snow.png
Binary files differ
diff --git a/WebKitTools/CygwinDownloader/cygwin-downloader.py b/WebKitTools/CygwinDownloader/cygwin-downloader.py
new file mode 100644
index 0000000..d87e0da
--- /dev/null
+++ b/WebKitTools/CygwinDownloader/cygwin-downloader.py
@@ -0,0 +1,157 @@
+#!/usr/bin/env python
+
+import os, random, sys, time, urllib
+
+#
+# Options
+#
+
+dry_run = len(sys.argv) > 1 and "--dry-run" in set(sys.argv[1:])
+quiet = len(sys.argv) > 1 and "--quiet" in set(sys.argv[1:])
+
+#
+# Functions and constants
+#
+
+def download_progress_hook(block_count, block_size, total_blocks):
+ if quiet or random.random() > 0.5:
+ return
+ sys.stdout.write(".")
+ sys.stdout.flush()
+
+def download_url_to_file(url, file, message):
+ if not quiet:
+ print message + " ",
+ if not dry_run:
+ dir = os.path.dirname(file)
+ if len(dir) and not os.path.exists(dir):
+ os.makedirs(dir)
+ urllib.urlretrieve(url, file, download_progress_hook)
+ if not quiet:
+ print
+
+# This is mostly just the list of North America http mirrors from http://cygwin.com/mirrors.html,
+# but a few have been removed that seemed unresponsive from Cupertino.
+mirror_servers = ["http://cygwin.elite-systems.org/",
+ "http://mirror.mcs.anl.gov/cygwin/",
+ "http://cygwin.osuosl.org/",
+ "http://mirrors.kernel.org/sourceware/cygwin/",
+ "http://mirrors.xmission.com/cygwin/",
+ "http://sourceware.mirrors.tds.net/pub/sourceware.org/cygwin/"]
+
+package_mirror_url = mirror_servers[random.choice(range(len(mirror_servers)))]
+
+def download_package(package, message):
+ download_url_to_file(package_mirror_url + package["path"], package["path"], message)
+
+required_packages = frozenset(["apache",
+ "bc",
+ "bison",
+ "curl",
+ "diffutils",
+ "e2fsprogs",
+ "emacs",
+ "flex",
+ "gcc",
+ "gperf",
+ "keychain",
+ "make",
+ "nano",
+ "openssh",
+ "patch",
+ "perl",
+ "perl-libwin32",
+ "python",
+ "rebase",
+ "rsync",
+ "ruby",
+ "subversion",
+ "unzip",
+ "vim",
+ "zip"])
+
+#
+# Main
+#
+
+print "Using Cygwin mirror server " + package_mirror_url + " to download setup.ini..."
+
+urllib.urlretrieve(package_mirror_url + "setup.ini", "setup.ini.orig")
+
+downloaded_packages_file_path = "setup.ini.orig"
+downloaded_packages_file = file(downloaded_packages_file_path, "r")
+if not dry_run:
+ modified_packages_file = file("setup.ini", "w")
+
+packages = {}
+current_package = ''
+for line in downloaded_packages_file.readlines():
+ if line[0] == "@":
+ current_package = line[2:-1]
+ packages[current_package] = {"name": current_package, "needs_download": False, "requires": [], "path": ""}
+ elif line[:10] == "category: ":
+ if current_package in required_packages:
+ line = "category: Base\n"
+ if "Base" in set(line[10:-1].split()):
+ packages[current_package]["needs_download"] = True
+ elif line[:10] == "requires: ":
+ packages[current_package]["requires"] = line[10:].split()
+ packages[current_package]["requires"].sort()
+ elif line[:9] == "install: " and not len(packages[current_package]["path"]):
+ end_of_path = line.find(" ", 9)
+ if end_of_path != -1:
+ packages[current_package]["path"] = line[9:end_of_path]
+ if not dry_run:
+ modified_packages_file.write(line)
+
+downloaded_packages_file.close()
+os.remove(downloaded_packages_file_path)
+if not dry_run:
+ modified_packages_file.close()
+
+names_to_download = set()
+package_names = packages.keys()
+package_names.sort()
+
+def add_package_and_dependencies(name):
+ if name in names_to_download:
+ return
+ if not name in packages:
+ return
+ packages[name]["needs_download"] = True
+ names_to_download.add(name)
+ for dep in packages[name]["requires"]:
+ add_package_and_dependencies(dep)
+
+for name in package_names:
+ if packages[name]["needs_download"]:
+ add_package_and_dependencies(name)
+
+downloaded_so_far = 0
+for name in package_names:
+ if packages[name]["needs_download"]:
+ downloaded_so_far += 1
+ download_package(packages[name], "Downloading package %3d of %3d (%s)" % (downloaded_so_far, len(names_to_download), name))
+
+download_url_to_file("http://cygwin.com/setup.exe", "setup.exe", "Downloading setup.exe")
+
+seconds_to_sleep = 10
+
+print """
+Finished downloading Cygwin. In %d seconds,
+I will run setup.exe. Select the "Install
+from Local Directory" option and browse to
+"%s"
+when asked for the "Local Package Directory".
+""" % (seconds_to_sleep, os.getcwd())
+
+
+while seconds_to_sleep > 0:
+ print "%d..." % seconds_to_sleep,
+ sys.stdout.flush()
+ time.sleep(1)
+ seconds_to_sleep -= 1
+print
+
+if not dry_run:
+ os.execl("setup.exe")
diff --git a/WebKitTools/CygwinDownloader/cygwin-downloader.zip b/WebKitTools/CygwinDownloader/cygwin-downloader.zip
new file mode 100644
index 0000000..9b9c0f0
--- /dev/null
+++ b/WebKitTools/CygwinDownloader/cygwin-downloader.zip
Binary files differ
diff --git a/WebKitTools/CygwinDownloader/make-zip.sh b/WebKitTools/CygwinDownloader/make-zip.sh
new file mode 100755
index 0000000..4a389a9
--- /dev/null
+++ b/WebKitTools/CygwinDownloader/make-zip.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+PYTHONEXE=$(cygpath -u "${SYSTEMDRIVE}\\Python25\\python.exe")
+ZIPNAME="cygwin-downloader.zip"
+
+if [[ ! -f "${PYTHONEXE}" ]]; then
+ echo "Couldn't find python.exe at ${PYTHONEXE}" 1>&2
+ exit 1
+fi
+
+"${PYTHONEXE}" setup.py py2exe || {
+ echo "Failed executing setup.py" 1>&2
+ exit 1
+}
+
+rm -f "${ZIPNAME}"
+
+cd dist
+
+zip -r ../"${ZIPNAME}" * || {
+ echo "Failed to create cygwin-downloader" 1>&2
+ exit 1
+}
+
+cd ..
+
+rm -rf build dist || {
+ echo "Failed to cleanup cygwin-downloader and build directories" 1>&2
+ exit 1
+}
diff --git a/WebKitTools/CygwinDownloader/setup.py b/WebKitTools/CygwinDownloader/setup.py
new file mode 100644
index 0000000..c3171d9
--- /dev/null
+++ b/WebKitTools/CygwinDownloader/setup.py
@@ -0,0 +1,4 @@
+from distutils.core import setup
+import py2exe
+
+setup(console=['cygwin-downloader.py'])
diff --git a/WebKitTools/DrawTest/AppDelegate.h b/WebKitTools/DrawTest/AppDelegate.h
new file mode 100644
index 0000000..7103bb8
--- /dev/null
+++ b/WebKitTools/DrawTest/AppDelegate.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2005 Apple Computer, 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 COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface AppDelegate : NSObject {
+ IBOutlet NSWindow *svgImageRepTestWindow;
+}
+
+- (IBAction)showTestsPanel:(id)sender;
+- (IBAction)showImageRepTestWindow:(id)sender;
+- (IBAction)showInspectorPanel:(id)sender;
+
+@end
diff --git a/WebKitTools/DrawTest/AppDelegate.m b/WebKitTools/DrawTest/AppDelegate.m
new file mode 100644
index 0000000..0f20b35
--- /dev/null
+++ b/WebKitTools/DrawTest/AppDelegate.m
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2005 Apple Computer, 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 COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#import "AppDelegate.h"
+
+#import "TestController.h"
+#import "DrawTestInspectorController.h"
+
+@implementation AppDelegate
+
+- (IBAction)showTestsPanel:(id)sender
+{
+ [[TestController sharedController] showTestsPanel:sender];
+}
+
+- (IBAction)showImageRepTestWindow:(id)sender
+{
+ [svgImageRepTestWindow makeKeyAndOrderFront:sender];
+}
+
+- (IBAction)showInspectorPanel:(id)sender
+{
+ [[DrawTestInspectorController sharedInstance] showInspectorPanel:sender];
+}
+
+- (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender
+{
+ return NO;
+}
+
+@end
diff --git a/WebKitTools/DrawTest/DrawTest.xcodeproj/project.pbxproj b/WebKitTools/DrawTest/DrawTest.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..9bafb2a
--- /dev/null
+++ b/WebKitTools/DrawTest/DrawTest.xcodeproj/project.pbxproj
@@ -0,0 +1,387 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 42;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 78662E6D096B4E1600907EA7 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 78662E6C096B4E1600907EA7 /* WebKit.framework */; };
+ 8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
+ 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
+ 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
+ 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
+ A8C006CF0898634600BA5114 /* SVGTest.m in Sources */ = {isa = PBXBuildFile; fileRef = A8C006B00898634600BA5114 /* SVGTest.m */; };
+ A8C006D00898634600BA5114 /* ScalingImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = A8C006B20898634600BA5114 /* ScalingImageView.m */; };
+ A8C006D20898634600BA5114 /* DrawTestView.m in Sources */ = {isa = PBXBuildFile; fileRef = A8C006B50898634600BA5114 /* DrawTestView.m */; };
+ A8C006D30898634600BA5114 /* DrawTestToolbarController.m in Sources */ = {isa = PBXBuildFile; fileRef = A8C006B70898634600BA5114 /* DrawTestToolbarController.m */; };
+ A8C006D40898634600BA5114 /* DrawTestInspectorController.m in Sources */ = {isa = PBXBuildFile; fileRef = A8C006BB0898634600BA5114 /* DrawTestInspectorController.m */; };
+ A8C006D50898634600BA5114 /* DrawTestDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = A8C006BD0898634600BA5114 /* DrawTestDocument.m */; };
+ A8C006E10898634600BA5114 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A8C006CA0898634600BA5114 /* AppDelegate.m */; };
+ A8C006E20898634600BA5114 /* TestViewerSplitView.m in Sources */ = {isa = PBXBuildFile; fileRef = A8C006CC0898634600BA5114 /* TestViewerSplitView.m */; };
+ A8C006E30898634600BA5114 /* TestController.m in Sources */ = {isa = PBXBuildFile; fileRef = A8C006CE0898634600BA5114 /* TestController.m */; };
+ A8C006F3089865E900BA5114 /* DrawTestDocument.nib in Resources */ = {isa = PBXBuildFile; fileRef = A8C006ED089865E900BA5114 /* DrawTestDocument.nib */; };
+ A8C006F4089865E900BA5114 /* Inspector.nib in Resources */ = {isa = PBXBuildFile; fileRef = A8C006EF089865E900BA5114 /* Inspector.nib */; };
+ A8C006F5089865E900BA5114 /* TestViewer.nib in Resources */ = {isa = PBXBuildFile; fileRef = A8C006F1089865E900BA5114 /* TestViewer.nib */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+ 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
+ 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 29B97319FDCFA39411CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; 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>"; };
+ 32CA4F630368D1EE00C91783 /* DrawTest_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawTest_Prefix.pch; sourceTree = "<group>"; };
+ 78662E6C096B4E1600907EA7 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WebKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+ 8D1107320486CEB800E47090 /* DrawTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DrawTest.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ A8C006AF0898634600BA5114 /* TestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestController.h; sourceTree = "<group>"; };
+ A8C006B00898634600BA5114 /* SVGTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVGTest.m; sourceTree = "<group>"; };
+ A8C006B10898634600BA5114 /* SVGTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTest.h; sourceTree = "<group>"; };
+ A8C006B20898634600BA5114 /* ScalingImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScalingImageView.m; sourceTree = "<group>"; };
+ A8C006B30898634600BA5114 /* ScalingImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScalingImageView.h; sourceTree = "<group>"; };
+ A8C006B50898634600BA5114 /* DrawTestView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DrawTestView.m; sourceTree = "<group>"; };
+ A8C006B60898634600BA5114 /* DrawTestView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawTestView.h; sourceTree = "<group>"; };
+ A8C006B70898634600BA5114 /* DrawTestToolbarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DrawTestToolbarController.m; sourceTree = "<group>"; };
+ A8C006B80898634600BA5114 /* DrawTestDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawTestDocument.h; sourceTree = "<group>"; };
+ A8C006BA0898634600BA5114 /* DrawTestToolbarController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawTestToolbarController.h; sourceTree = "<group>"; };
+ A8C006BB0898634600BA5114 /* DrawTestInspectorController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DrawTestInspectorController.m; sourceTree = "<group>"; };
+ A8C006BC0898634600BA5114 /* DrawTestInspectorController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawTestInspectorController.h; sourceTree = "<group>"; };
+ A8C006BD0898634600BA5114 /* DrawTestDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DrawTestDocument.m; sourceTree = "<group>"; };
+ A8C006CA0898634600BA5114 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
+ A8C006CB0898634600BA5114 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+ A8C006CC0898634600BA5114 /* TestViewerSplitView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestViewerSplitView.m; sourceTree = "<group>"; };
+ A8C006CD0898634600BA5114 /* TestViewerSplitView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestViewerSplitView.h; sourceTree = "<group>"; };
+ A8C006CE0898634600BA5114 /* TestController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestController.m; sourceTree = "<group>"; };
+ A8C006EE089865E900BA5114 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/DrawTestDocument.nib; sourceTree = "<group>"; };
+ A8C006F0089865E900BA5114 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/Inspector.nib; sourceTree = "<group>"; };
+ A8C006F2089865E900BA5114 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/TestViewer.nib; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 8D11072E0486CEB800E47090 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
+ 78662E6D096B4E1600907EA7 /* WebKit.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 080E96DDFE201D6D7F000001 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ A8C006E6089863B100BA5114 /* Test Browser */,
+ A8C006E5089863A100BA5114 /* Viewer */,
+ A8C006CB0898634600BA5114 /* AppDelegate.h */,
+ A8C006CA0898634600BA5114 /* AppDelegate.m */,
+ A8C006B30898634600BA5114 /* ScalingImageView.h */,
+ A8C006B20898634600BA5114 /* ScalingImageView.m */,
+ );
+ name = Classes;
+ sourceTree = "<group>";
+ };
+ 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
+ 78662E6C096B4E1600907EA7 /* WebKit.framework */,
+ );
+ name = "Linked Frameworks";
+ sourceTree = "<group>";
+ };
+ 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 29B97324FDCFA39411CA2CEA /* AppKit.framework */,
+ 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
+ 29B97325FDCFA39411CA2CEA /* Foundation.framework */,
+ );
+ name = "Other Frameworks";
+ sourceTree = "<group>";
+ };
+ 19C28FACFE9D520D11CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 8D1107320486CEB800E47090 /* DrawTest.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 29B97314FDCFA39411CA2CEA /* DrawTest */ = {
+ isa = PBXGroup;
+ children = (
+ 080E96DDFE201D6D7F000001 /* Classes */,
+ 29B97315FDCFA39411CA2CEA /* Other Sources */,
+ 29B97317FDCFA39411CA2CEA /* Resources */,
+ 29B97323FDCFA39411CA2CEA /* Frameworks */,
+ 19C28FACFE9D520D11CA2CBB /* Products */,
+ );
+ name = DrawTest;
+ sourceTree = "<group>";
+ };
+ 29B97315FDCFA39411CA2CEA /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ 32CA4F630368D1EE00C91783 /* DrawTest_Prefix.pch */,
+ 29B97316FDCFA39411CA2CEA /* main.m */,
+ );
+ name = "Other Sources";
+ sourceTree = "<group>";
+ };
+ 29B97317FDCFA39411CA2CEA /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ A8C006ED089865E900BA5114 /* DrawTestDocument.nib */,
+ 8D1107310486CEB800E47090 /* Info.plist */,
+ 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
+ A8C006EF089865E900BA5114 /* Inspector.nib */,
+ 29B97318FDCFA39411CA2CEA /* MainMenu.nib */,
+ A8C006F1089865E900BA5114 /* TestViewer.nib */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
+ 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ A8C006E5089863A100BA5114 /* Viewer */ = {
+ isa = PBXGroup;
+ children = (
+ A8C006B80898634600BA5114 /* DrawTestDocument.h */,
+ A8C006BD0898634600BA5114 /* DrawTestDocument.m */,
+ A8C006BA0898634600BA5114 /* DrawTestToolbarController.h */,
+ A8C006B70898634600BA5114 /* DrawTestToolbarController.m */,
+ A8C006B60898634600BA5114 /* DrawTestView.h */,
+ A8C006B50898634600BA5114 /* DrawTestView.m */,
+ );
+ name = Viewer;
+ sourceTree = "<group>";
+ };
+ A8C006E6089863B100BA5114 /* Test Browser */ = {
+ isa = PBXGroup;
+ children = (
+ A8C006BC0898634600BA5114 /* DrawTestInspectorController.h */,
+ A8C006BB0898634600BA5114 /* DrawTestInspectorController.m */,
+ A8C006B10898634600BA5114 /* SVGTest.h */,
+ A8C006B00898634600BA5114 /* SVGTest.m */,
+ A8C006AF0898634600BA5114 /* TestController.h */,
+ A8C006CE0898634600BA5114 /* TestController.m */,
+ A8C006CD0898634600BA5114 /* TestViewerSplitView.h */,
+ A8C006CC0898634600BA5114 /* TestViewerSplitView.m */,
+ );
+ name = "Test Browser";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 8D1107260486CEB800E47090 /* DrawTest */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = A8C006740898624E00BA5114 /* Build configuration list for PBXNativeTarget "DrawTest" */;
+ buildPhases = (
+ 8D1107290486CEB800E47090 /* Resources */,
+ 8D11072C0486CEB800E47090 /* Sources */,
+ 8D11072E0486CEB800E47090 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = DrawTest;
+ productInstallPath = "$(HOME)/Applications";
+ productName = DrawTest;
+ productReference = 8D1107320486CEB800E47090 /* DrawTest.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 29B97313FDCFA39411CA2CEA /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = A8C006780898624E00BA5114 /* Build configuration list for PBXProject "DrawTest" */;
+ compatibilityVersion = "Xcode 2.4";
+ hasScannedForEncodings = 1;
+ mainGroup = 29B97314FDCFA39411CA2CEA /* DrawTest */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 8D1107260486CEB800E47090 /* DrawTest */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 8D1107290486CEB800E47090 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ A8C006F3089865E900BA5114 /* DrawTestDocument.nib in Resources */,
+ 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
+ A8C006F4089865E900BA5114 /* Inspector.nib in Resources */,
+ 8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */,
+ A8C006F5089865E900BA5114 /* TestViewer.nib in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 8D11072C0486CEB800E47090 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ A8C006E10898634600BA5114 /* AppDelegate.m in Sources */,
+ A8C006D50898634600BA5114 /* DrawTestDocument.m in Sources */,
+ A8C006D40898634600BA5114 /* DrawTestInspectorController.m in Sources */,
+ A8C006D30898634600BA5114 /* DrawTestToolbarController.m in Sources */,
+ A8C006D20898634600BA5114 /* DrawTestView.m in Sources */,
+ A8C006CF0898634600BA5114 /* SVGTest.m in Sources */,
+ A8C006D00898634600BA5114 /* ScalingImageView.m in Sources */,
+ A8C006E30898634600BA5114 /* TestController.m in Sources */,
+ A8C006E20898634600BA5114 /* TestViewerSplitView.m in Sources */,
+ 8D11072D0486CEB800E47090 /* main.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 089C165DFE840E0CC02AAC07 /* English */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ 29B97318FDCFA39411CA2CEA /* MainMenu.nib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 29B97319FDCFA39411CA2CEA /* English */,
+ );
+ name = MainMenu.nib;
+ sourceTree = "<group>";
+ };
+ A8C006ED089865E900BA5114 /* DrawTestDocument.nib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ A8C006EE089865E900BA5114 /* English */,
+ );
+ name = DrawTestDocument.nib;
+ sourceTree = "<group>";
+ };
+ A8C006EF089865E900BA5114 /* Inspector.nib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ A8C006F0089865E900BA5114 /* English */,
+ );
+ name = Inspector.nib;
+ sourceTree = "<group>";
+ };
+ A8C006F1089865E900BA5114 /* TestViewer.nib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ A8C006F2089865E900BA5114 /* English */,
+ );
+ name = TestViewer.nib;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ A8C006750898624E00BA5114 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = DrawTest_Prefix.pch;
+ GCC_TREAT_WARNINGS_AS_ERRORS = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "$(HOME)/Applications";
+ PREBINDING = NO;
+ PRODUCT_NAME = DrawTest;
+ WRAPPER_EXTENSION = app;
+ ZERO_LINK = YES;
+ };
+ name = Debug;
+ };
+ A8C006760898624E00BA5114 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = DrawTest_Prefix.pch;
+ GCC_TREAT_WARNINGS_AS_ERRORS = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "$(HOME)/Applications";
+ PREBINDING = NO;
+ PRODUCT_NAME = DrawTest;
+ WRAPPER_EXTENSION = app;
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
+ A8C006790898624E00BA5114 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ };
+ name = Debug;
+ };
+ A8C0067A0898624E00BA5114 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ A8C006740898624E00BA5114 /* Build configuration list for PBXNativeTarget "DrawTest" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ A8C006750898624E00BA5114 /* Debug */,
+ A8C006760898624E00BA5114 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ A8C006780898624E00BA5114 /* Build configuration list for PBXProject "DrawTest" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ A8C006790898624E00BA5114 /* Debug */,
+ A8C0067A0898624E00BA5114 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
diff --git a/WebKitTools/DrawTest/DrawTestDocument.h b/WebKitTools/DrawTest/DrawTestDocument.h
new file mode 100644
index 0000000..b0b16d9
--- /dev/null
+++ b/WebKitTools/DrawTest/DrawTestDocument.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2006 Nefaur Khandker <nefaurk@gmail.com> All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+@class DrawTestView;
+@class DrawTestToolbarController;
+
+@interface DrawTestDocument : NSDocument
+{
+ IBOutlet DrawTestView *drawView;
+ IBOutlet NSDrawer *debugDrawer;
+
+ DrawTestToolbarController *toolbarController;
+}
+
+// Debug menu
+- (IBAction)dumpSVGToConsole:(id)sender;
+- (IBAction)toggleDebugDrawer:(id)sender;
+- (IBAction)runWindowResizeTest:(id)sender;
+
+@end
diff --git a/WebKitTools/DrawTest/DrawTestDocument.m b/WebKitTools/DrawTest/DrawTestDocument.m
new file mode 100644
index 0000000..c71e7ad
--- /dev/null
+++ b/WebKitTools/DrawTest/DrawTestDocument.m
@@ -0,0 +1,151 @@
+/*
+ * Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2006 Nefaur Khandker <nefaurk@gmail.com> All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "DrawTestDocument.h"
+#import "DrawTestView.h"
+#import "DrawTestToolbarController.h"
+#import <WebKit/WebView.h>
+#import <WebKit/WebFrame.h>
+#import <WebKit/WebDataSource.h>
+
+@implementation DrawTestDocument
+
+- (id)initWithType:(NSString *)typeName error:(NSError **)outError
+{
+ if (outError) {
+ NSDictionary *errorInfo = [NSDictionary dictionaryWithObjectsAndKeys:
+ @"No document could be created.", NSLocalizedDescriptionKey,
+ @"New document creation not yet supported.", NSLocalizedFailureReasonErrorKey,
+ nil];
+ *outError = [NSError errorWithDomain:NSCocoaErrorDomain code:0 userInfo:errorInfo];
+ }
+ [self release];
+ return nil;
+}
+
+- (void)dealloc
+{
+ [toolbarController release];
+ [super dealloc];
+}
+
+- (NSString *)windowNibName
+{
+ return @"DrawTestDocument";
+}
+
+- (BOOL)readFromFile:(NSString *)filename ofType:(NSString *)docType
+{
+ // TODO: Check the validity of the document before returning YES.
+ return YES;
+}
+
+- (void)windowControllerDidLoadNib:(NSWindowController *)aController
+{
+ [super windowControllerDidLoadNib:aController];
+ toolbarController = [[DrawTestToolbarController alloc] initWithDrawView:drawView];
+ [drawView setDocument:[self fileURL]];
+}
+
+- (IBAction)dumpSVGToConsole:(id)sender
+{
+ WebDataSource* dataSource = [[drawView mainFrame] dataSource];
+ NSLog(@"SVG Markup for file %@:\n%@", [self fileURL], [[dataSource representation] documentSource]);
+}
+
+- (IBAction)openSourceForSelection:(id)sender
+{
+ // TODO: The "path" message (below) will not produce a valid pathname if we are dealing with a remote file.
+ NSString *filename = [[self fileURL] path];
+ [[NSWorkspace sharedWorkspace] openFile:filename withApplication:@"TextEdit"];
+}
+
+- (NSData *)dataRepresentationOfType:(NSString *)aType
+{
+ WebDataSource* dataSource = [[drawView mainFrame] dataSource];
+ return [dataSource data];
+}
+
+#pragma mark -
+#pragma mark Debug Methods
+
+- (IBAction)toggleDebugDrawer:(id)sender
+{
+ [debugDrawer toggle:sender];
+}
+
+- (id)outlineView:(NSOutlineView *)outlineView child:(int)index ofItem:(id)item
+{
+ return nil;
+}
+
+- (BOOL)outlineView:(NSOutlineView *)outlineView isItemExpandable:(id)item
+{
+ return NO;
+}
+
+- (int)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item
+{
+ return 0;
+}
+
+- (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item
+{
+ return nil;
+}
+
+- (IBAction)runWindowResizeTest:(id)sender
+{
+ NSWindow *window = [drawView window];
+ NSScreen *screen = [window screen];
+ float screenHeight = [screen visibleFrame].size.height;
+ NSRect originalFrame = [window frame];
+ // initial setup
+ BOOL toolbarVisible = [[window toolbar] isVisible];
+ if (toolbarVisible) [window toggleToolbarShown:self];
+ [window setFrame:NSMakeRect(0,screenHeight-100,100,100) display:YES];
+
+ // grab time.
+ CFAbsoluteTime start = CFAbsoluteTimeGetCurrent();
+
+ // run test
+ for (int x = 0; x < 3; x++) {
+ for (float size = 100; size < 500.f; size += 20.f) {
+ [window setFrame:NSMakeRect(0, screenHeight-size, size, size) display:YES];
+ }
+ }
+
+ double elapsed = CFAbsoluteTimeGetCurrent() - start;
+
+ // log
+ NSLog(@"Window resize test: %fs", elapsed);
+
+ // restore
+ if (toolbarVisible) [window toggleToolbarShown:self];
+ [window setFrame:originalFrame display:YES];
+}
+
+@end
diff --git a/WebKitTools/DrawTest/DrawTestInspectorController.h b/WebKitTools/DrawTest/DrawTestInspectorController.h
new file mode 100644
index 0000000..43c06f0
--- /dev/null
+++ b/WebKitTools/DrawTest/DrawTestInspectorController.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2005 Apple Computer, 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 COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface DrawTestInspectorController : NSObject {
+ IBOutlet NSPanel *_inspectorPanel;
+}
+
++ (id)sharedInstance;
+
+- (IBAction)showInspectorPanel:(id)sender;
+
+@end
diff --git a/WebKitTools/DrawTest/DrawTestInspectorController.m b/WebKitTools/DrawTest/DrawTestInspectorController.m
new file mode 100644
index 0000000..604bf03
--- /dev/null
+++ b/WebKitTools/DrawTest/DrawTestInspectorController.m
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2005 Apple Computer, 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 COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "DrawTestInspectorController.h"
+
+@implementation DrawTestInspectorController
+
++ (id)sharedInstance
+{
+ static DrawTestInspectorController *__sharedController = nil;
+ if (!__sharedController) {
+ __sharedController = [[self alloc] init];
+ }
+ return __sharedController;
+}
+
+- (IBAction)showInspectorPanel:(id)sender
+{
+ if (!_inspectorPanel) {
+ [NSBundle loadNibNamed:@"Inspector" owner:self];
+ }
+ [_inspectorPanel makeKeyAndOrderFront:self];
+}
+
+
+@end
diff --git a/WebKitTools/DrawTest/DrawTestToolbarController.h b/WebKitTools/DrawTest/DrawTestToolbarController.h
new file mode 100644
index 0000000..a69fb57
--- /dev/null
+++ b/WebKitTools/DrawTest/DrawTestToolbarController.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2005 Apple Computer, 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 COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+@class WebView;
+
+@interface DrawTestToolbarController : NSObject {
+ WebView *_drawView;
+ NSMutableDictionary *_toolbarItems;
+}
+
+- (id)initWithDrawView:(WebView *)drawView;
+
+@end
diff --git a/WebKitTools/DrawTest/DrawTestToolbarController.m b/WebKitTools/DrawTest/DrawTestToolbarController.m
new file mode 100644
index 0000000..9190252
--- /dev/null
+++ b/WebKitTools/DrawTest/DrawTestToolbarController.m
@@ -0,0 +1,354 @@
+/*
+ * Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2006 Nefaur Khandker <nefaurk@gmail.com> All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "DrawTestToolbarController.h"
+
+enum
+{
+ ToolbarBrowseToolTag = 0,
+ ToolbarPanToolTag,
+ ToolbarZoomToolTag,
+
+ ToolbarPointerToolTag,
+ ToolbarLineToolTag,
+ ToolbarRectangleToolTag,
+ ToolbarElipseToolTag,
+ ToolbarTriangleToolTag,
+ ToolbarPolyLineToolTag,
+ ToolbarArcToolTag,
+
+ ToolbarDeleteSelectionTag,
+
+ ToolbarMoveForwardTag,
+ ToolbarMoveBackwardTag,
+ ToolbarMoveToFrontTag,
+ ToolbarMoveToBackTag,
+ ToolbarMiscItem
+};
+
+// Constants
+NSString *ToolbarIdentifier = @"Main Document Toolbar";
+
+NSString *ToolbarBrowseToolIdentifier = @"Browse";
+NSString *ToolbarPanToolIdentifier = @"Pan";
+NSString *ToolbarZoomToolIdentifier = @"Zoom";
+
+NSString *ToolbarPointerToolIdentifier = @"Pointer";
+NSString *ToolbarRectangleToolIdentifier = @"Rectangle";
+NSString *ToolbarElipseToolIdentifier = @"Oval";
+NSString *ToolbarTriangleToolIdentifier = @"Triangle";
+NSString *ToolbarPolyLineToolIdentifier = @"PolyLine";
+NSString *ToolbarArcToolIdentifier = @"Arc";
+
+NSString *ToolbarDeleteShapeIdentifier = @"Delete";
+NSString *ToolbarMoveForwardIdentifier = @"Forward";
+NSString *ToolbarMoveBackwardIdentifier = @"Backward";
+NSString *ToolbarMoveToFrontIdentifier = @"Front";
+NSString *ToolbarMoveToBackIdentifier = @"Back";
+
+NSString *ToolbarPointerToolImage = @"Toolbar_Pointer";
+NSString *ToolbarRectangleToolImage = @"Toolbar_Rectangle";
+NSString *ToolbarElipseToolImage = @"Toolbar_Oval";
+NSString *ToolbarTriangleToolImage = @"Toolbar_Triangle";
+
+NSString *ToolbarDeleteShapeImage = @"Toolbar_Delete";
+NSString *ToolbarMoveForwardImage = @"Toolbar_Forward";
+NSString *ToolbarMoveBackwardImage = @"Toolbar_Backward";
+NSString *ToolbarMoveToFrontImage = @"Toolbar_Front";
+NSString *ToolbarMoveToBackImage = @"Toolbar_Back";
+
+@interface DrawTestToolbarController (InternalMethods)
+- (void)setupToolbar;
+- (void)addToolbarItemWithIdentifier:(NSString *)identifier withImage:(NSString *)image withTag:(int)tag;
+- (void)addToolbarItemWithIdentifier:(NSString *)identifier withImage:(NSString *)image;
+- (void)addToolbarItem:(NSString *)identifier
+ withLabel:(NSString *)label
+ withPaletteLabel:(NSString *)paletteLabel
+ withImage:(NSString *)imageName
+ withToolTip:(NSString *)toolTip
+ withTag:(int)tag;
+@end
+
+
+@implementation DrawTestToolbarController
+
+- (id)initWithDrawView:(WebView *)drawView
+{
+ if (self = [super init]){
+ _drawView = [drawView retain];
+ [self setupToolbar]; // could be done lazily.
+ }
+ return self;
+}
+
+- (void)dealloc
+{
+ [_toolbarItems release];
+ [super dealloc];
+}
+
+
+- (void)addToolbarItemWithIdentifier:(NSString *)identifier withImage:(NSString *)image withTag:(int)tag
+{
+
+ [self addToolbarItem:identifier
+ withLabel:identifier
+ withPaletteLabel:identifier
+ withImage:image
+ withToolTip:identifier
+ withTag:tag];
+}
+
+- (void)addToolbarItemWithIdentifier:(NSString *)identifier withImage:(NSString *)image
+{
+ [self addToolbarItemWithIdentifier:identifier withImage:image withTag:ToolbarMiscItem];
+}
+
+- (void)addToolbarItem:(NSString *)identifier
+ withLabel:(NSString *)label
+ withPaletteLabel:(NSString *)paletteLabel
+ withImage:(NSString *)imageName
+ withToolTip:(NSString *)toolTip
+ withTag:(int)tag
+{
+ NSToolbarItem *item = [[[NSToolbarItem alloc] initWithItemIdentifier:identifier] autorelease];
+
+ [item setLabel:label];
+ [item setPaletteLabel:paletteLabel];
+ [item setToolTip:toolTip];
+ [item setImage:[NSImage imageNamed:imageName]];
+ [item setTarget:self];
+ [item setAction:@selector(clickedToolbarItem:)];
+ [item setTag:tag];
+
+ [_toolbarItems setObject:item forKey:identifier];
+}
+
+- (void)setupToolbar
+{
+ _toolbarItems = [[NSMutableDictionary alloc] init];
+
+ [self addToolbarItemWithIdentifier:ToolbarBrowseToolIdentifier
+ withImage:ToolbarPointerToolImage
+ withTag:ToolbarBrowseToolTag];
+ [[_toolbarItems objectForKey:ToolbarBrowseToolIdentifier] setImage:[[NSCursor pointingHandCursor] image]];
+
+ [self addToolbarItemWithIdentifier:ToolbarPanToolIdentifier
+ withImage:ToolbarPointerToolImage
+ withTag:ToolbarPanToolTag];
+ [[_toolbarItems objectForKey:ToolbarPanToolIdentifier] setImage:[[NSCursor openHandCursor] image]];
+
+ [self addToolbarItemWithIdentifier:ToolbarZoomToolIdentifier
+ withImage:ToolbarPointerToolImage
+ withTag:ToolbarZoomToolTag];
+
+
+ [self addToolbarItemWithIdentifier:ToolbarPointerToolIdentifier
+ withImage:ToolbarPointerToolImage
+ withTag:ToolbarPointerToolTag];
+
+ [self addToolbarItemWithIdentifier:ToolbarRectangleToolIdentifier
+ withImage:ToolbarRectangleToolImage
+ withTag:ToolbarRectangleToolTag];
+
+ [self addToolbarItemWithIdentifier:ToolbarElipseToolIdentifier
+ withImage:ToolbarElipseToolImage
+ withTag:ToolbarElipseToolTag];
+
+ [self addToolbarItemWithIdentifier:ToolbarTriangleToolIdentifier
+ withImage:ToolbarTriangleToolImage
+ withTag:ToolbarTriangleToolTag];
+
+ [self addToolbarItemWithIdentifier:ToolbarDeleteShapeIdentifier
+ withImage:ToolbarDeleteShapeImage
+ withTag:ToolbarDeleteSelectionTag];
+
+ [self addToolbarItemWithIdentifier:ToolbarMoveForwardIdentifier
+ withImage:ToolbarMoveForwardImage
+ withTag:ToolbarMoveForwardTag];
+
+ [self addToolbarItemWithIdentifier:ToolbarMoveBackwardIdentifier
+ withImage:ToolbarMoveBackwardImage
+ withTag:ToolbarMoveBackwardTag];
+
+ [self addToolbarItemWithIdentifier:ToolbarMoveToFrontIdentifier
+ withImage:ToolbarMoveToFrontImage
+ withTag:ToolbarMoveToFrontTag];
+
+ [self addToolbarItemWithIdentifier:ToolbarMoveToBackIdentifier
+ withImage:ToolbarMoveToBackImage
+ withTag:ToolbarMoveToBackTag];
+
+
+ NSToolbar *toolbar = [[[NSToolbar alloc] initWithIdentifier:ToolbarIdentifier] autorelease];
+
+ [toolbar setAllowsUserCustomization:YES];
+ [toolbar setAutosavesConfiguration:YES];
+ [toolbar setDisplayMode:NSToolbarDisplayModeIconAndLabel];
+ [toolbar setSizeMode:NSToolbarSizeModeSmall];
+ [toolbar setDisplayMode:NSToolbarDisplayModeLabelOnly];
+ [toolbar setDelegate:self];
+ [toolbar setSelectedItemIdentifier:ToolbarBrowseToolIdentifier];
+ [toolbar setVisible:NO];
+
+ [[_drawView window] setToolbar:toolbar];
+}
+
+
+- (void)clickedToolbarItem:(id)sender
+{
+ int tag = [sender tag];
+
+ switch(tag) {
+#if 0
+ case ToolbarBrowseToolTag:
+ [_drawView setToolMode:DrawViewToolBrowse];
+ break;
+ case ToolbarPanToolTag:
+ [_drawView setToolMode:DrawViewToolPan];
+ break;
+ case ToolbarZoomToolTag:
+ [_drawView setToolMode:DrawViewToolZoom];
+ break;
+ case ToolbarPointerToolTag:
+ [_drawView setToolMode:DrawViewToolArrow];
+ break;
+ case ToolbarRectangleToolTag:
+ [_drawView setToolMode:DrawViewToolRectangle];
+ break;
+ case ToolbarElipseToolTag:
+ [_drawView setToolMode:DrawViewToolElipse];
+ break;
+ case ToolbarTriangleToolTag:
+ [_drawView setToolMode:DrawViewToolTriangle];
+ break;
+ case ToolbarMoveForwardTag:
+ [_drawView moveSelectionForward:sender];
+ break;
+ case ToolbarMoveBackwardTag:
+ [_drawView moveSelectionBackward:sender];
+ break;
+ case ToolbarDeleteSelectionTag:
+ [_drawView deleteSelection:sender];
+ break;
+#endif
+ default:
+ NSLog(@"Toolbar item: %i not implemented!", tag);
+ }
+
+ [_drawView setNeedsDisplay:YES];
+}
+
+// NSToolbar delegate methods
+- (NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdent
+ willBeInsertedIntoToolbar:(BOOL)willBeInserted
+{
+ NSToolbarItem * toolbarItem = [_toolbarItems objectForKey:itemIdent];
+
+ if( toolbarItem == nil )
+ toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier:itemIdent] autorelease];
+
+ return toolbarItem;
+}
+
+- (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar *)toolbar
+{
+ return [NSArray arrayWithObjects:
+ ToolbarBrowseToolIdentifier,
+ ToolbarPanToolIdentifier,
+ ToolbarZoomToolIdentifier,
+ ToolbarPointerToolIdentifier,
+ ToolbarRectangleToolIdentifier,
+ ToolbarElipseToolIdentifier,
+ ToolbarTriangleToolIdentifier,
+ ToolbarDeleteShapeIdentifier,
+ NSToolbarShowColorsItemIdentifier,
+ ToolbarMoveForwardIdentifier,
+ ToolbarMoveBackwardIdentifier,
+ ToolbarMoveToFrontIdentifier,
+ ToolbarMoveToBackIdentifier,
+ NSToolbarCustomizeToolbarItemIdentifier,
+ NSToolbarFlexibleSpaceItemIdentifier,
+ NSToolbarSpaceItemIdentifier,
+ NSToolbarSeparatorItemIdentifier, nil];
+}
+
+- (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar *)toolbar
+{
+ return [NSArray arrayWithObjects:
+ ToolbarBrowseToolIdentifier,
+ ToolbarPanToolIdentifier,
+ //ToolbarZoomToolIdentifier,
+ NSToolbarFlexibleSpaceItemIdentifier,
+ ToolbarPointerToolIdentifier,
+ ToolbarRectangleToolIdentifier,
+ ToolbarElipseToolIdentifier,
+ //ToolbarTriangleToolIdentifier,
+ //NSToolbarSeparatorItemIdentifier,
+ ToolbarDeleteShapeIdentifier,
+ //ToolbarMoveForwardIdentifier,
+ //ToolbarMoveBackwardIdentifier,
+ //ToolbarMoveToFrontIdentifier,
+ //ToolbarMoveToBackIdentifier,
+ NSToolbarSeparatorItemIdentifier,
+ //NSToolbarShowColorsItemIdentifier,
+ //NSToolbarFlexibleSpaceItemIdentifier,
+ NSToolbarCustomizeToolbarItemIdentifier,
+ nil];
+}
+
+- (NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar
+{
+ return [NSArray arrayWithObjects:
+ ToolbarBrowseToolIdentifier,
+ ToolbarPanToolIdentifier,
+ ToolbarZoomToolIdentifier,
+ ToolbarPointerToolIdentifier,
+ ToolbarRectangleToolIdentifier,
+ ToolbarElipseToolIdentifier,
+ ToolbarTriangleToolIdentifier,
+ nil];
+}
+
+- (BOOL)validateToolbarItem:(NSToolbarItem *)theItem
+{
+ BOOL enabled = YES;
+
+#if 0
+ switch([theItem tag]) {
+ case ToolbarMoveForwardTag:
+ case ToolbarMoveBackwardTag:
+ case ToolbarMoveToFrontTag:
+ case ToolbarMoveToBackTag:
+ case ToolbarDeleteSelectionTag:
+ enabled = ([[_drawView selectedCanvasItems] count] != 0);
+ }
+#endif
+
+ return enabled;
+}
+
+@end
diff --git a/WebKitTools/DrawTest/DrawTestView.h b/WebKitTools/DrawTest/DrawTestView.h
new file mode 100644
index 0000000..95d5956
--- /dev/null
+++ b/WebKitTools/DrawTest/DrawTestView.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2006 Nefaur Khandker <nefaurk@gmail.com> All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+#import <WebKit/WebView.h>
+
+@interface DrawTestView : WebView
+{
+
+}
+
+- (void)setDocument:(NSURL *)documentURL;
+
+@end
diff --git a/WebKitTools/DrawTest/DrawTestView.m b/WebKitTools/DrawTest/DrawTestView.m
new file mode 100644
index 0000000..c865f99
--- /dev/null
+++ b/WebKitTools/DrawTest/DrawTestView.m
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2006 Nefaur Khandker <nefaurk@gmail.com> All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <WebKit/WebFrame.h>
+
+#import "DrawTestView.h"
+
+@implementation DrawTestView
+
+- (void)setDocument:(NSURL *)documentURL
+{
+ [[self mainFrame] loadRequest:[NSURLRequest requestWithURL:documentURL]];
+}
+
+- (BOOL)acceptsFirstResponder
+{
+ return YES;
+}
+
+@end
diff --git a/WebKitTools/DrawTest/DrawTest_Prefix.pch b/WebKitTools/DrawTest/DrawTest_Prefix.pch
new file mode 100644
index 0000000..8393f01
--- /dev/null
+++ b/WebKitTools/DrawTest/DrawTest_Prefix.pch
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2005 Apple Computer, 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 COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+//
+// Prefix header for all source files of the 'DrawTest' target in the 'DrawTest' project
+//
+
+#ifdef __OBJC__
+#import <Cocoa/Cocoa.h>
+
+#define foreacharray(__variable, __container) \
+ for (int __variable##__i=0, __variable##__n=[__container count]; \
+ __variable##__i < __variable##__n && (__variable = [__container objectAtIndex:__variable##__i]); \
+ ++__variable##__i)
+#endif
diff --git a/WebKitTools/DrawTest/English.lproj/DrawTestDocument.nib/classes.nib b/WebKitTools/DrawTest/English.lproj/DrawTestDocument.nib/classes.nib
new file mode 100644
index 0000000..296ffc3
--- /dev/null
+++ b/WebKitTools/DrawTest/English.lproj/DrawTestDocument.nib/classes.nib
@@ -0,0 +1,34 @@
+{
+ IBClasses = (
+ {
+ ACTIONS = {toggleShowDebugAxes = id; toggleShowDebugString = id; };
+ CLASS = DrawTestView;
+ LANGUAGE = ObjC;
+ SUPERCLASS = DrawView;
+ },
+ {
+ ACTIONS = {
+ deleteSelection = id;
+ moveSelectionBackward = id;
+ moveSelectionForward = id;
+ zoomIn = id;
+ zoomOriginal = id;
+ zoomOut = id;
+ zoomToFit = id;
+ };
+ CLASS = DrawView;
+ LANGUAGE = ObjC;
+ SUPERCLASS = NSView;
+ },
+ {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
+ {
+ ACTIONS = {dumpSVGToConsole = id; };
+ CLASS = MyDocument;
+ LANGUAGE = ObjC;
+ OUTLETS = {drawView = KCanvasTestView; };
+ SUPERCLASS = NSDocument;
+ },
+ {CLASS = NSSegmentedControl; LANGUAGE = ObjC; SUPERCLASS = NSControl; }
+ );
+ IBVersion = 1;
+} \ No newline at end of file
diff --git a/WebKitTools/DrawTest/English.lproj/DrawTestDocument.nib/info.nib b/WebKitTools/DrawTest/English.lproj/DrawTestDocument.nib/info.nib
new file mode 100644
index 0000000..3c96fd5
--- /dev/null
+++ b/WebKitTools/DrawTest/English.lproj/DrawTestDocument.nib/info.nib
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IBDocumentLocation</key>
+ <string>86 30 356 240 0 0 1024 746 </string>
+ <key>IBEditorPositions</key>
+ <dict>
+ <key>50</key>
+ <string>377 327 270 342 0 0 1024 746 </string>
+ </dict>
+ <key>IBFramework Version</key>
+ <string>437.0</string>
+ <key>IBOpenObjects</key>
+ <array>
+ <integer>50</integer>
+ <integer>5</integer>
+ </array>
+ <key>IBSystem Version</key>
+ <string>8C42</string>
+</dict>
+</plist>
diff --git a/WebKitTools/DrawTest/English.lproj/DrawTestDocument.nib/keyedobjects.nib b/WebKitTools/DrawTest/English.lproj/DrawTestDocument.nib/keyedobjects.nib
new file mode 100644
index 0000000..b78ff2c
--- /dev/null
+++ b/WebKitTools/DrawTest/English.lproj/DrawTestDocument.nib/keyedobjects.nib
Binary files differ
diff --git a/WebKitTools/DrawTest/English.lproj/Inspector.nib/classes.nib b/WebKitTools/DrawTest/English.lproj/Inspector.nib/classes.nib
new file mode 100644
index 0000000..725f5a4
--- /dev/null
+++ b/WebKitTools/DrawTest/English.lproj/Inspector.nib/classes.nib
@@ -0,0 +1,12 @@
+{
+ IBClasses = (
+ {
+ CLASS = DrawTestInspectorController;
+ LANGUAGE = ObjC;
+ OUTLETS = {"_inspectorPanel" = NSPanel; };
+ SUPERCLASS = NSObject;
+ },
+ {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
+ );
+ IBVersion = 1;
+} \ No newline at end of file
diff --git a/WebKitTools/DrawTest/English.lproj/Inspector.nib/info.nib b/WebKitTools/DrawTest/English.lproj/Inspector.nib/info.nib
new file mode 100644
index 0000000..d930763
--- /dev/null
+++ b/WebKitTools/DrawTest/English.lproj/Inspector.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IBDocumentLocation</key>
+ <string>261 184 356 240 0 0 1024 746 </string>
+ <key>IBFramework Version</key>
+ <string>437.0</string>
+ <key>IBOpenObjects</key>
+ <array>
+ <integer>7</integer>
+ </array>
+ <key>IBSystem Version</key>
+ <string>8B9</string>
+</dict>
+</plist>
diff --git a/WebKitTools/DrawTest/English.lproj/Inspector.nib/keyedobjects.nib b/WebKitTools/DrawTest/English.lproj/Inspector.nib/keyedobjects.nib
new file mode 100644
index 0000000..02869ca
--- /dev/null
+++ b/WebKitTools/DrawTest/English.lproj/Inspector.nib/keyedobjects.nib
Binary files differ
diff --git a/WebKitTools/DrawTest/English.lproj/MainMenu.nib/classes.nib b/WebKitTools/DrawTest/English.lproj/MainMenu.nib/classes.nib
new file mode 100644
index 0000000..c0ca441
--- /dev/null
+++ b/WebKitTools/DrawTest/English.lproj/MainMenu.nib/classes.nib
@@ -0,0 +1,44 @@
+{
+ IBClasses = (
+ {
+ ACTIONS = {showImageRepTestWindow = id; showInspectorPanel = id; showTestsPanel = id; };
+ CLASS = AppDelegate;
+ LANGUAGE = ObjC;
+ OUTLETS = {svgImageRepTestWindow = NSWindow; };
+ SUPERCLASS = NSObject;
+ },
+ {
+ ACTIONS = {
+ dumpSVGToConsole = id;
+ openSelectionInViewer = id;
+ openSourceForSelection = id;
+ runWindowResizeTest = id;
+ showCompositeWindow = id;
+ showImageRepTestWindow = id;
+ showInspectorPanel = id;
+ showTestsPanel = id;
+ toggleDebugDrawer = id;
+ toggleFilterSupport = id;
+ toggleShowDebugAxes = id;
+ toggleShowDebugString = id;
+ toggleViewersScaleRule = id;
+ zoomIn = id;
+ zoomOriginal = id;
+ zoomOut = id;
+ zoomToContent = id;
+ };
+ CLASS = FirstResponder;
+ LANGUAGE = ObjC;
+ SUPERCLASS = NSObject;
+ },
+ {CLASS = KCanvasTestView; LANGUAGE = ObjC; SUPERCLASS = NSView; },
+ {
+ ACTIONS = {dumpSVGToConsole = id; };
+ CLASS = MyDocument;
+ LANGUAGE = ObjC;
+ OUTLETS = {canvasView = KCanvasTestView; };
+ SUPERCLASS = NSDocument;
+ }
+ );
+ IBVersion = 1;
+} \ No newline at end of file
diff --git a/WebKitTools/DrawTest/English.lproj/MainMenu.nib/info.nib b/WebKitTools/DrawTest/English.lproj/MainMenu.nib/info.nib
new file mode 100644
index 0000000..9b783e0
--- /dev/null
+++ b/WebKitTools/DrawTest/English.lproj/MainMenu.nib/info.nib
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IBDocumentLocation</key>
+ <string>274 58 356 240 0 0 1024 746 </string>
+ <key>IBEditorPositions</key>
+ <dict>
+ <key>29</key>
+ <string>128 678 355 44 0 0 1024 746 </string>
+ </dict>
+ <key>IBFramework Version</key>
+ <string>439.0</string>
+ <key>IBOpenObjects</key>
+ <array>
+ <integer>29</integer>
+ </array>
+ <key>IBSystem Version</key>
+ <string>8C32</string>
+</dict>
+</plist>
diff --git a/WebKitTools/DrawTest/English.lproj/MainMenu.nib/keyedobjects.nib b/WebKitTools/DrawTest/English.lproj/MainMenu.nib/keyedobjects.nib
new file mode 100644
index 0000000..642b5ae
--- /dev/null
+++ b/WebKitTools/DrawTest/English.lproj/MainMenu.nib/keyedobjects.nib
Binary files differ
diff --git a/WebKitTools/DrawTest/English.lproj/TestViewer.nib/classes.nib b/WebKitTools/DrawTest/English.lproj/TestViewer.nib/classes.nib
new file mode 100644
index 0000000..eb82ec7
--- /dev/null
+++ b/WebKitTools/DrawTest/English.lproj/TestViewer.nib/classes.nib
@@ -0,0 +1,36 @@
+{
+ IBClasses = (
+ {CLASS = DrawView; LANGUAGE = ObjC; SUPERCLASS = NSView; },
+ {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
+ {CLASS = KCanvasTestView; LANGUAGE = ObjC; SUPERCLASS = NSView; },
+ {CLASS = MyImageView; LANGUAGE = ObjC; SUPERCLASS = NSImageView; },
+ {
+ ACTIONS = {
+ browse = id;
+ jumpToParentDirectory = id;
+ openSelectionInViewer = id;
+ openSourceForSelection = id;
+ openTestViewerForSelection = id;
+ showCompositeWindow = id;
+ showTestWindow = id;
+ showTestsPanel = id;
+ toggleViewersScaleRule = id;
+ };
+ CLASS = TestController;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ "_compositeImageView" = NSImageView;
+ "_compositeWindow" = NSWindow;
+ "_parentDirectoryPopup" = NSPopUpButton;
+ "_splitView" = TestViewerSplitView;
+ "_testPanel" = NSPanel;
+ "_testWindow" = NSWindow;
+ "_testsArrayController" = NSArrayController;
+ "_testsTableView" = NSTableView;
+ };
+ SUPERCLASS = NSObject;
+ },
+ {CLASS = TestViewerSplitView; LANGUAGE = ObjC; SUPERCLASS = NSView; }
+ );
+ IBVersion = 1;
+} \ No newline at end of file
diff --git a/WebKitTools/DrawTest/English.lproj/TestViewer.nib/info.nib b/WebKitTools/DrawTest/English.lproj/TestViewer.nib/info.nib
new file mode 100644
index 0000000..ca801e8
--- /dev/null
+++ b/WebKitTools/DrawTest/English.lproj/TestViewer.nib/info.nib
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IBDocumentLocation</key>
+ <string>263 119 356 240 0 0 1024 746 </string>
+ <key>IBFramework Version</key>
+ <string>437.0</string>
+ <key>IBOpenObjects</key>
+ <array>
+ <integer>24</integer>
+ <integer>60</integer>
+ </array>
+ <key>IBSystem Version</key>
+ <string>8C26</string>
+</dict>
+</plist>
diff --git a/WebKitTools/DrawTest/English.lproj/TestViewer.nib/keyedobjects.nib b/WebKitTools/DrawTest/English.lproj/TestViewer.nib/keyedobjects.nib
new file mode 100644
index 0000000..46b8964
--- /dev/null
+++ b/WebKitTools/DrawTest/English.lproj/TestViewer.nib/keyedobjects.nib
Binary files differ
diff --git a/WebKitTools/DrawTest/Info.plist b/WebKitTools/DrawTest/Info.plist
new file mode 100644
index 0000000..0fd092b
--- /dev/null
+++ b/WebKitTools/DrawTest/Info.plist
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>svg</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>SVG Document</string>
+ <key>CFBundleTypeOSTypes</key>
+ <array>
+ <string>????</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ <key>LSTypeIsPackage</key>
+ <false/>
+ <key>NSDocumentClass</key>
+ <string>DrawTestDocument</string>
+ <key>NSPersistentStoreTypeKey</key>
+ <string>Binary</string>
+ </dict>
+ </array>
+ <key>CFBundleExecutable</key>
+ <string>DrawTest</string>
+ <key>CFBundleGetInfoString</key>
+ <string>420+, Copyright 2005, 2006 Apple Computer, Inc.</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.apple.DrawTest</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>NSMainNibFile</key>
+ <string>MainMenu</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+</dict>
+</plist>
diff --git a/WebKitTools/DrawTest/SVGTest.h b/WebKitTools/DrawTest/SVGTest.h
new file mode 100644
index 0000000..70eed41
--- /dev/null
+++ b/WebKitTools/DrawTest/SVGTest.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2006 Nefaur Khandker <nefaurk@gmail.com> All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+@interface SVGTest : NSObject {
+ NSString *_svgPath;
+ NSString *_imagePath;
+
+ NSImage *_image;
+ NSImage *_compositeImage;
+ BOOL _hasPassed;
+}
+
++ (id)testWithSVGPath:(NSString *)svgPath imagePath:(NSString *)imagePath;
+- (id)initWithSVGPath:(NSString *)svgPath imagePath:(NSString *)imagePath;
+
+- (NSString *)imagePath;
+- (NSString *)svgPath;
+
+- (NSImage *)image;
+- (NSImage *)compositeImage;
+- (NSString *)name;
+
+@end
diff --git a/WebKitTools/DrawTest/SVGTest.m b/WebKitTools/DrawTest/SVGTest.m
new file mode 100644
index 0000000..4ea562d
--- /dev/null
+++ b/WebKitTools/DrawTest/SVGTest.m
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2006 Nefaur Khandker <nefaurk@gmail.com> All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SVGTest.h"
+
+#import <WebKit/WebView.h>
+
+@implementation SVGTest
+
++ (id)testWithSVGPath:(NSString *)svgPath imagePath:(NSString *)imagePath
+{
+ SVGTest *test = [[self alloc] initWithSVGPath:svgPath imagePath:imagePath];
+ return [test autorelease];
+}
+
+static WebView *__sharedDrawView = nil;
++ (WebView *)sharedDrawView
+{
+ if (!__sharedDrawView) {
+ __sharedDrawView = [[WebView alloc] initWithFrame:NSMakeRect(0,0,0,0)];
+ }
+ return __sharedDrawView;
+}
+
+- (id)initWithSVGPath:(NSString *)svgPath imagePath:(NSString *)imagePath
+{
+ if (self = [super init]) {
+ _svgPath = [svgPath copy];
+ _imagePath = [imagePath copy];
+ }
+ return self;
+}
+
+- (NSString *)imagePath
+{
+ return _imagePath;
+}
+
+- (NSString *)svgPath
+{
+ return _svgPath;
+}
+
+- (NSImage *)image
+{
+ if (!_image && _imagePath) {
+ _image = [[NSImage alloc] initByReferencingFile:_imagePath];
+ }
+ return _image;
+}
+
+- (NSString *)name
+{
+ NSMutableString *name = [[[[_svgPath lastPathComponent] stringByDeletingPathExtension] mutableCopy] autorelease];
+ [name replaceOccurrencesOfString:@"_" withString:@" " options:0 range:NSMakeRange(0, [name length])];
+ return [name capitalizedString];
+}
+
+- (void)generateCompositeIfNecessary
+{
+ if (!_compositeImage) {
+ WebView *view = [SVGTest sharedDrawView];
+ NSSize svgSize = [view bounds].size;
+
+ NSImage *image = [self image];
+ NSSize imageSize = [image size];
+
+ NSBitmapImageRep *svgImage = [view bitmapImageRepForCachingDisplayInRect:[view bounds]];
+ [view cacheDisplayInRect:[view bounds] toBitmapImageRep:svgImage];
+
+ NSSize unionSize = NSMakeSize(MAX(svgSize.width, imageSize.width), MAX(svgSize.height, imageSize.height));
+ _compositeImage = [[NSImage alloc] initWithSize:unionSize];
+
+ [_compositeImage lockFocus];
+ [svgImage drawInRect:NSMakeRect(0,0,svgSize.width,svgSize.height)];
+ [image drawInRect:NSMakeRect(0,0,imageSize.width,imageSize.height)
+ fromRect:NSMakeRect(0,0,imageSize.width,imageSize.height)
+ operation:NSCompositeXOR fraction:1.0];
+ [_compositeImage unlockFocus];
+ }
+}
+
+- (NSImage *)compositeImage
+{
+ [self generateCompositeIfNecessary];
+ return _compositeImage;
+}
+
+
+@end
diff --git a/WebKitTools/DrawTest/ScalingImageView.h b/WebKitTools/DrawTest/ScalingImageView.h
new file mode 100644
index 0000000..4370ff5
--- /dev/null
+++ b/WebKitTools/DrawTest/ScalingImageView.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2005 Apple Computer, 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 COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface ScalingImageView : NSImageView {
+
+}
+
+@end
diff --git a/WebKitTools/DrawTest/ScalingImageView.m b/WebKitTools/DrawTest/ScalingImageView.m
new file mode 100644
index 0000000..605397a
--- /dev/null
+++ b/WebKitTools/DrawTest/ScalingImageView.m
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2005 Apple Computer, 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 COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+#import "ScalingImageView.h"
+
+@implementation ScalingImageView
+
+/*
+ This class offers two behaviors different from the standard NSImageView
+ (and which were not available w/o subclassing)
+ 1. Scale an image proportionally up to fit a larger view (NSImageView refuses)
+ 2. Draw a background color w/o needing to show a bezel.
+*/
+
+- (void)drawRect:(NSRect)dirtyRect
+{
+ [[NSColor whiteColor] set];
+ NSRectFill(dirtyRect);
+
+ NSSize imageSize = [[self image] size];
+ float scale = 1.0f;
+ if ([self imageScaling] == NSScaleProportionally && imageSize.width && imageSize.height) {
+ float widthScale = [self bounds].size.width / imageSize.width;
+ float heightScale = [self bounds].size.height / imageSize.height;
+ scale = MIN(widthScale, heightScale);
+ }
+
+ float scaledHeight = imageSize.height * scale;
+ NSRect destRect = NSMakeRect(0,[self bounds].size.height - scaledHeight,imageSize.width * scale, scaledHeight);
+ [[self image] drawInRect:destRect
+ fromRect:NSMakeRect(0,0,imageSize.width, imageSize.height) operation:NSCompositeSourceOver fraction:1.0];
+}
+
+@end
diff --git a/WebKitTools/DrawTest/TestController.h b/WebKitTools/DrawTest/TestController.h
new file mode 100644
index 0000000..1e781fe
--- /dev/null
+++ b/WebKitTools/DrawTest/TestController.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2006 Nefaur Khandker <nefaurk@gmail.com> All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+@class DrawTestView;
+@class SVGTest;
+@class TestViewerSplitView;
+
+@interface TestController : NSObject {
+ IBOutlet NSPanel *_testPanel;
+ IBOutlet NSWindow *_testWindow;
+ IBOutlet TestViewerSplitView *_splitView;
+
+ IBOutlet NSArrayController *_testsArrayController;
+ IBOutlet NSPopUpButton *_parentDirectoryPopup;
+ IBOutlet NSTableView *_testsTableView;
+
+ IBOutlet NSWindow *_compositeWindow;
+ IBOutlet NSImageView *_compositeImageView;
+
+@private
+ NSString *_currentPath;
+ NSArray *_tests;
+ SVGTest *_selectedTest;
+
+ DrawTestView *_drawView;
+ NSImageView *_imageView;
+}
+
++ (id)sharedController;
+
+- (IBAction)showTestsPanel:(id)sender;
+- (IBAction)showTestWindow:(id)sender;
+- (IBAction)showCompositeWindow:(id)sender;
+
+- (IBAction)browse:(id)sender;
+- (IBAction)jumpToParentDirectory:(id)sender;
+- (IBAction)openTestViewerForSelection:(id)sender;
+- (IBAction)openSourceForSelection:(id)sender;
+- (IBAction)openSelectionInViewer:(id)sender;
+- (IBAction)toggleViewersScaleRule:(id)sender;
+
+- (NSArray *)tests;
+- (NSString *)currentPath;
+- (void)setCurrentPath:(NSString *)newPath;
+- (NSArray *)directoryHierarchy;
+
+@end
diff --git a/WebKitTools/DrawTest/TestController.m b/WebKitTools/DrawTest/TestController.m
new file mode 100644
index 0000000..506920b
--- /dev/null
+++ b/WebKitTools/DrawTest/TestController.m
@@ -0,0 +1,270 @@
+/*
+ * Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2006 Nefaur Khandker <nefaurk@gmail.com> All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "TestController.h"
+#import "SVGTest.h"
+#import "TestViewerSplitView.h"
+#import "ScalingImageView.h"
+#import "DrawTestView.h"
+
+#import <WebKit/WebView.h>
+
+@interface NSArray (TestControllerAdditions)
+- (id)firstObject;
+@end
+
+@implementation NSArray (TestControllerAdditions)
+- (id)firstObject
+{
+ if ([self count])
+ return [self objectAtIndex:0];
+ return nil;
+}
+@end
+
+static TestController *__sharedInstance = nil;
+
+@implementation TestController
+
+- (id)init
+{
+ if (self = [super init]) {
+ NSString *path = [[NSUserDefaults standardUserDefaults] objectForKey:@"TestDirectory"];
+ BOOL isDirectory = NO;
+ if (![[NSFileManager defaultManager] fileExistsAtPath:path isDirectory:&isDirectory] || !isDirectory) {
+ path = [@"~" stringByStandardizingPath];
+ }
+ [self setCurrentPath:path];
+ }
+ return self;
+}
+
++ (void)initialize
+{
+ [self setKeys:[NSArray arrayWithObject:@"currentPath"] triggerChangeNotificationsForDependentKey:@"directoryHierarchy"];
+ [self setKeys:[NSArray arrayWithObject:@"currentPath"] triggerChangeNotificationsForDependentKey:@"tests"];
+}
+
++ (id)sharedController
+{
+ if (!__sharedInstance) {
+ __sharedInstance = [[self alloc] init];
+ }
+ return __sharedInstance;
+}
+
+- (void)loadNibIfNecessary
+{
+ if (!_testPanel) {
+ [NSBundle loadNibNamed:@"TestViewer" owner:self];
+ }
+}
+
+- (void)awakeFromNib
+{
+ [_testsTableView setTarget:self];
+ [_testsTableView setDoubleAction:@selector(openTestViewerForSelection:)];
+ _drawView = [[DrawTestView alloc] initWithFrame:NSZeroRect];
+ _imageView = [[ScalingImageView alloc] initWithFrame:NSZeroRect];
+ [_splitView addSubview:_drawView];
+ [_splitView addSubview:_imageView];
+}
+
+- (IBAction)showTestsPanel:(id)sender
+{
+ [self loadNibIfNecessary];
+ [_testPanel makeKeyAndOrderFront:sender];
+}
+
+- (IBAction)showTestWindow:(id)sender
+{
+ [self loadNibIfNecessary];
+ [_testWindow makeKeyAndOrderFront:sender];
+}
+
+- (IBAction)showCompositeWindow:(id)sender
+{
+ [self loadNibIfNecessary];
+ NSLog(@"showCompositeWindow: %@", _compositeWindow);
+ [_compositeWindow makeKeyAndOrderFront:sender];
+}
+
+- (IBAction)browse:(id)sender
+{
+ NSOpenPanel *openPanel = [NSOpenPanel openPanel];
+ [openPanel setCanChooseDirectories:YES];
+ [openPanel setCanChooseFiles:NO];
+ [openPanel beginSheetForDirectory:nil file:nil modalForWindow:_testPanel modalDelegate:self didEndSelector:@selector(openPanelDidEnd:returnCode:contextInfo:) contextInfo:NULL];
+}
+
+- (void)openPanelDidEnd:(NSOpenPanel *)openPanel returnCode:(int)returnCode contextInfo:(void *)contextInfo
+{
+ if (returnCode == NSOKButton) {
+ NSArray *folders = [openPanel filenames];
+ NSString *selectedFolder = [folders firstObject];
+ [self setCurrentPath:selectedFolder];
+ }
+}
+
+- (IBAction)jumpToParentDirectory:(id)sender
+{
+ int index = [_parentDirectoryPopup indexOfSelectedItem];
+ NSArray *components = [_currentPath pathComponents];
+ NSArray *newComponents = [components subarrayWithRange:NSMakeRange(0, [components count] - index)];
+ NSString *newPath = [NSString pathWithComponents:newComponents];
+ [self setCurrentPath:newPath];
+}
+
+- (void)setSelectedTest:(SVGTest *)selectedTest
+{
+ id oldTest = _selectedTest;
+ _selectedTest = [selectedTest retain];
+ [oldTest release];
+
+ if ([_testWindow isVisible]) {
+ [_testWindow setTitle:[NSString stringWithFormat:@"Test Viewer - %@", [_selectedTest name]]];
+ [_drawView setDocument:[NSURL fileURLWithPath:[_selectedTest svgPath]]];
+ [_imageView setImage:[_selectedTest image]];
+ if ([_compositeWindow isVisible])
+ [_compositeImageView setImage:[_selectedTest compositeImage]];
+ }
+}
+
+- (void)tableViewSelectionDidChange:(NSNotification *)aNotification
+{
+ [self setSelectedTest:[[_testsArrayController selectedObjects] firstObject]];
+}
+
+- (IBAction)openTestViewerForSelection:(id)sender
+{
+ [self showTestWindow:sender];
+ [_drawView setDocument:[NSURL fileURLWithPath:[_selectedTest svgPath]]];
+ [_imageView setImage:[_selectedTest image]];
+}
+
+- (IBAction)openSourceForSelection:(id)sender
+{
+ [[NSWorkspace sharedWorkspace] openFile:[_selectedTest svgPath] withApplication:@"TextEdit"];
+}
+
+- (IBAction)openSelectionInViewer:(id)sender
+{
+ [[NSWorkspace sharedWorkspace] openFile:[_selectedTest svgPath]];
+}
+
+- (NSString *)imagePathForSVGPath:(NSString *)svgPath
+{
+ // eventually this code will build an array instead...
+
+ NSString *currentDirectory = [self currentPath];
+ NSString *parentDirectory = [currentDirectory stringByDeletingLastPathComponent];
+
+ NSString *testName = [[svgPath lastPathComponent] stringByDeletingPathExtension];
+ NSString *imageName, *imageDirectory, *imagePath;
+
+ // first look in ../png/test.png -- SVG 1.1 baselines
+ // The SVG 1.1 spec has various different pngs, we should allow the
+ // tester to choose...
+ imageName = [[@"full-" stringByAppendingString:testName] stringByAppendingPathExtension:@"png"];
+ imageDirectory = [parentDirectory stringByAppendingPathComponent:@"png"];
+ imagePath = [imageDirectory stringByAppendingPathComponent:imageName];
+ if ([[NSFileManager defaultManager] fileExistsAtPath:imagePath]) return imagePath;
+
+ // then look for ../name.png -- openclipart.org
+ imageName = [testName stringByAppendingPathExtension:@"png"];
+ imageDirectory = parentDirectory;
+ imagePath = [imageDirectory stringByAppendingPathComponent:imageName];
+ if ([[NSFileManager defaultManager] fileExistsAtPath:imagePath]) return imagePath;
+
+ // then look for ./name-w3c.png -- WebCore tests
+ imageName = [[testName stringByAppendingString:@"-w3c"] stringByAppendingPathExtension:@"png"];
+ imageDirectory = currentDirectory;
+ imagePath = [imageDirectory stringByAppendingPathComponent:imageName];
+ if ([[NSFileManager defaultManager] fileExistsAtPath:imagePath]) return imagePath;
+
+ // finally try name-baseline.png -- ksvg regression baselines
+ imageName = [[testName stringByAppendingString:@"-baseline"] stringByAppendingPathExtension:@"png"];
+ imageDirectory = currentDirectory;
+ imagePath = [imageDirectory stringByAppendingPathComponent:imageName];
+ if ([[NSFileManager defaultManager] fileExistsAtPath:imagePath]) return imagePath;
+
+ return nil;
+}
+
+- (NSArray *)tests
+{
+ if (!_tests) {
+ NSMutableArray *newTests = [[NSMutableArray alloc] init];
+ NSArray *files = [[NSFileManager defaultManager] directoryContentsAtPath:[self currentPath]];
+ NSString *file = nil;
+ foreacharray(file, files) {
+ if ([[file pathExtension] isEqualToString:@"svg"]) {
+ NSString *svgPath = [[self currentPath] stringByAppendingPathComponent:file];
+ NSString *imagePath = [self imagePathForSVGPath:svgPath];
+ [newTests addObject:[SVGTest testWithSVGPath:svgPath imagePath:imagePath]];
+ }
+ }
+ [self setValue:newTests forKey:@"tests"];
+ }
+ return _tests;
+}
+
+- (NSArray *)directoryHierarchy
+{
+ // A hackish way to reverse an array.
+ return [[[_currentPath pathComponents] reverseObjectEnumerator] allObjects];
+}
+
+- (NSString *)currentPath
+{
+ return _currentPath;
+}
+
+- (void)setCurrentPath:(NSString *)newPath
+{
+ if (![newPath isEqualToString:_currentPath]) {
+ [_currentPath release];
+ _currentPath = [newPath copy];
+ [self setValue:nil forKey:@"tests"];
+ }
+
+ [[NSUserDefaults standardUserDefaults] setObject:_currentPath forKey:@"TestDirectory"];
+}
+
+- (IBAction)toggleViewersScaleRule:(id)sender
+{
+#if 0
+ if ([_drawView imageScaling] == NSScaleProportionally) {
+ [_drawView setImageScaling:NSScaleNone];
+ [_imageView setImageScaling:NSScaleNone];
+ } else {
+ [_drawView setImageScaling:NSScaleProportionally];
+ [_imageView setImageScaling:NSScaleProportionally];
+ }
+#endif
+}
+
+@end
diff --git a/WebKitTools/DrawTest/TestViewerSplitView.h b/WebKitTools/DrawTest/TestViewerSplitView.h
new file mode 100644
index 0000000..e663f23
--- /dev/null
+++ b/WebKitTools/DrawTest/TestViewerSplitView.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2005 Apple Computer, 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 COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#import <Cocoa/Cocoa.h>
+
+@interface TestViewerSplitView : NSView {
+ NSMutableArray *subviewLabels;
+}
+
+@end
diff --git a/WebKitTools/DrawTest/TestViewerSplitView.m b/WebKitTools/DrawTest/TestViewerSplitView.m
new file mode 100644
index 0000000..96f2055
--- /dev/null
+++ b/WebKitTools/DrawTest/TestViewerSplitView.m
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2005 Apple Computer, 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 COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "TestViewerSplitView.h"
+
+@implementation TestViewerSplitView
+
+- (void)drawRect:(NSRect)rect
+{
+ NSArray *subviews = [self subviews];
+ int subviewCount = [subviews count];
+ for (int x=0; x < subviewCount; x++) {
+ NSView *subview = [subviews objectAtIndex:x];
+ [subview drawRect:rect];
+#if 0
+ NSString *label = [subviewLabels objectAtIndex:0];
+ [label drawAtPoint:[subview frame].origin withAttributes:NULL];
+#endif
+ }
+}
+
+- (void)retileSubviews
+{
+ NSRect bounds = [self bounds];
+ NSArray *subviews = [self subviews];
+ int subviewCount = [subviews count];
+ if (!subviewCount) return;
+ float subviewWidth = bounds.size.width / subviewCount;
+
+ for (int x=0; x < subviewCount; x++) {
+ [[subviews objectAtIndex:x] setFrame:NSMakeRect(x * subviewWidth, 0, subviewWidth, bounds.size.height)];
+ }
+}
+
+- (void)didAddSubview:(NSView *)subview
+{
+ [super didAddSubview:subview];
+ [self retileSubviews];
+}
+
+- (void)willRemoveSubview:(NSView *)subview
+{
+ [super willRemoveSubview:subview];
+ [self retileSubviews];
+}
+
+- (void)setFrame:(NSRect)newFrame
+{
+ // ideally we also want to catch when the bounds changes without the
+ // frame changing, but we're not bothering with that now - ECS 7/29/05
+ [super setFrame:newFrame];
+ [self retileSubviews];
+}
+
+@end
diff --git a/WebKitTools/DrawTest/main.m b/WebKitTools/DrawTest/main.m
new file mode 100644
index 0000000..90337b6
--- /dev/null
+++ b/WebKitTools/DrawTest/main.m
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2005 Apple Computer, 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 COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+int main (int argc, const char *argv[])
+{
+ return NSApplicationMain(argc, argv);
+}
diff --git a/WebKitTools/DumpRenderTree/AccessibilityController.cpp b/WebKitTools/DumpRenderTree/AccessibilityController.cpp
new file mode 100644
index 0000000..d2ed2a6
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/AccessibilityController.cpp
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2008 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. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "AccessibilityController.h"
+
+#include "AccessibilityUIElement.h"
+#include <JavaScriptCore/JSRetainPtr.h>
+
+// Static Value Getters
+
+static JSValueRef getFocusedElementCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ AccessibilityController* controller = reinterpret_cast<AccessibilityController*>(JSObjectGetPrivate(thisObject));
+ return AccessibilityUIElement::makeJSAccessibilityUIElement(context, controller->focusedElement());
+}
+
+static JSValueRef getRootElementCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ AccessibilityController* controller = reinterpret_cast<AccessibilityController*>(JSObjectGetPrivate(thisObject));
+ return AccessibilityUIElement::makeJSAccessibilityUIElement(context, controller->rootElement());
+}
+
+// Object Creation
+
+void AccessibilityController::makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> accessibilityControllerStr(Adopt, JSStringCreateWithUTF8CString("accessibilityController"));
+ JSValueRef accessibilityControllerObject = JSObjectMake(context, getJSClass(), this);
+ JSObjectSetProperty(context, windowObject, accessibilityControllerStr.get(), accessibilityControllerObject, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, exception);
+}
+
+JSClassRef AccessibilityController::getJSClass()
+{
+ static JSStaticValue staticValues[] = {
+ { "focusedElement", getFocusedElementCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "rootElement", getRootElementCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { 0, 0, 0, 0 }
+ };
+
+ static JSClassDefinition classDefinition = {
+ 0, kJSClassAttributeNone, "AccessibilityController", 0, staticValues, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ };
+
+ static JSClassRef accessibilityControllerClass = JSClassCreate(&classDefinition);
+ return accessibilityControllerClass;
+}
diff --git a/WebKitTools/DumpRenderTree/AccessibilityController.h b/WebKitTools/DumpRenderTree/AccessibilityController.h
new file mode 100644
index 0000000..0af6613
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/AccessibilityController.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2008 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. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef AccessibilityController_h
+#define AccessibilityController_h
+
+#include <JavaScriptCore/JSObjectRef.h>
+
+class AccessibilityUIElement;
+
+class AccessibilityController {
+public:
+ AccessibilityController();
+ ~AccessibilityController();
+
+ void makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception);
+
+ // Controller Methods - platform-independent implementations
+ AccessibilityUIElement rootElement();
+ AccessibilityUIElement focusedElement();
+
+private:
+ static JSClassRef getJSClass();
+};
+
+#endif // AccessibilityController_h
diff --git a/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp b/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp
new file mode 100644
index 0000000..c3f8867
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp
@@ -0,0 +1,333 @@
+/*
+ * Copyright (C) 2008, 2009 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. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "AccessibilityUIElement.h"
+
+#include <JavaScriptCore/JSRetainPtr.h>
+
+// Static Functions
+
+static AccessibilityUIElement* toAXElement(JSObjectRef object)
+{
+ // FIXME: We should ASSERT that it is the right class here.
+ return reinterpret_cast<AccessibilityUIElement*>(JSObjectGetPrivate(object));
+}
+
+static JSValueRef allAttributesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> attributes(Adopt, toAXElement(thisObject)->allAttributes());
+ return JSValueMakeString(context, attributes.get());
+}
+
+static JSValueRef attributesOfLinkedUIElementsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> linkedUIDescription(Adopt, toAXElement(thisObject)->attributesOfLinkedUIElements());
+ return JSValueMakeString(context, linkedUIDescription.get());
+}
+
+static JSValueRef attributesOfDocumentLinksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> linkedUIDescription(Adopt, toAXElement(thisObject)->attributesOfDocumentLinks());
+ return JSValueMakeString(context, linkedUIDescription.get());
+}
+
+static JSValueRef attributesOfChildrenCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> childrenDescription(Adopt, toAXElement(thisObject)->attributesOfChildren());
+ return JSValueMakeString(context, childrenDescription.get());
+}
+
+static JSValueRef parameterizedAttributeNamesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> parameterizedAttributeNames(Adopt, toAXElement(thisObject)->parameterizedAttributeNames());
+ return JSValueMakeString(context, parameterizedAttributeNames.get());
+}
+
+static JSValueRef attributesOfColumnHeadersCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> attributesOfColumnHeaders(Adopt, toAXElement(thisObject)->attributesOfColumnHeaders());
+ return JSValueMakeString(context, attributesOfColumnHeaders.get());
+}
+
+static JSValueRef attributesOfRowHeadersCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> attributesOfRowHeaders(Adopt, toAXElement(thisObject)->attributesOfRowHeaders());
+ return JSValueMakeString(context, attributesOfRowHeaders.get());
+}
+
+static JSValueRef attributesOfColumnsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> attributesOfColumns(Adopt, toAXElement(thisObject)->attributesOfColumns());
+ return JSValueMakeString(context, attributesOfColumns.get());
+}
+
+static JSValueRef attributesOfRowsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> attributesOfRows(Adopt, toAXElement(thisObject)->attributesOfRows());
+ return JSValueMakeString(context, attributesOfRows.get());
+}
+
+static JSValueRef attributesOfVisibleCellsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> attributesOfVisibleCells(Adopt, toAXElement(thisObject)->attributesOfVisibleCells());
+ return JSValueMakeString(context, attributesOfVisibleCells.get());
+}
+
+static JSValueRef attributesOfHeaderCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> attributesOfHeader(Adopt, toAXElement(thisObject)->attributesOfHeader());
+ return JSValueMakeString(context, attributesOfHeader.get());
+}
+
+static JSValueRef indexInTableCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ return JSValueMakeNumber(context, toAXElement(thisObject)->indexInTable());
+}
+
+static JSValueRef rowIndexRangeCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> rowIndexRange(Adopt, toAXElement(thisObject)->rowIndexRange());
+ return JSValueMakeString(context, rowIndexRange.get());
+}
+
+static JSValueRef columnIndexRangeCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> columnIndexRange(Adopt, toAXElement(thisObject)->columnIndexRange());
+ return JSValueMakeString(context, columnIndexRange.get());
+}
+
+static JSValueRef lineForIndexCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ int indexNumber = -1;
+ if (argumentCount == 1)
+ indexNumber = JSValueToNumber(context, arguments[0], exception);
+
+ return JSValueMakeNumber(context, toAXElement(thisObject)->lineForIndex(indexNumber));
+}
+
+static JSValueRef boundsForRangeCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ unsigned location = UINT_MAX, length = 0;
+ if (argumentCount == 2) {
+ location = JSValueToNumber(context, arguments[0], exception);
+ length = JSValueToNumber(context, arguments[1], exception);
+ }
+
+ JSRetainPtr<JSStringRef> boundsDescription(Adopt, toAXElement(thisObject)->boundsForRange(location, length));
+ return JSValueMakeString(context, boundsDescription.get());
+}
+
+static JSValueRef childAtIndexCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ int indexNumber = -1;
+ if (argumentCount == 1)
+ indexNumber = JSValueToNumber(context, arguments[0], exception);
+
+ return AccessibilityUIElement::makeJSAccessibilityUIElement(context, toAXElement(thisObject)->getChildAtIndex(indexNumber));
+}
+
+static JSValueRef isAttributeSettableCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ JSStringRef attribute = NULL;
+ if (argumentCount == 1)
+ attribute = JSValueToStringCopy(context, arguments[0], exception);
+ JSValueRef result = JSValueMakeNumber(context, toAXElement(thisObject)->isAttributeSettable(attribute));
+ if (attribute)
+ JSStringRelease(attribute);
+ return result;
+}
+
+static JSValueRef attributeValueCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ JSStringRef attribute = NULL;
+ if (argumentCount == 1)
+ attribute = JSValueToStringCopy(context, arguments[0], exception);
+ JSValueRef result = JSValueMakeString(context, toAXElement(thisObject)->attributeValue(attribute));
+ if (attribute)
+ JSStringRelease(attribute);
+ return result;
+}
+
+static JSValueRef cellForColumnAndRowCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ unsigned column = 0, row = 0;
+ if (argumentCount == 2) {
+ column = JSValueToNumber(context, arguments[0], exception);
+ row = JSValueToNumber(context, arguments[1], exception);
+ }
+
+ return AccessibilityUIElement::makeJSAccessibilityUIElement(context, toAXElement(thisObject)->cellForColumnAndRow(column, row));
+}
+
+static JSValueRef titleUIElementCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ return AccessibilityUIElement::makeJSAccessibilityUIElement(context, toAXElement(thisObject)->titleUIElement());
+}
+
+static JSValueRef parentElementCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ return AccessibilityUIElement::makeJSAccessibilityUIElement(context, toAXElement(thisObject)->parentElement());
+}
+
+static JSValueRef setSelectedTextRangeCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ unsigned location = UINT_MAX, length = 0;
+ if (argumentCount == 2) {
+ location = JSValueToNumber(context, arguments[0], exception);
+ length = JSValueToNumber(context, arguments[1], exception);
+ }
+
+ toAXElement(thisObject)->setSelectedTextRange(location, length);
+ return 0;
+}
+
+// Static Value Getters
+
+static JSValueRef getRoleCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> role(Adopt, toAXElement(thisObject)->role());
+ return JSValueMakeString(context, role.get());
+}
+
+static JSValueRef getTitleCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> title(Adopt, toAXElement(thisObject)->title());
+ return JSValueMakeString(context, title.get());
+}
+
+static JSValueRef getDescriptionCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> description(Adopt, toAXElement(thisObject)->description());
+ return JSValueMakeString(context, description.get());
+}
+
+static JSValueRef getWidthCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ return JSValueMakeNumber(context, toAXElement(thisObject)->width());
+}
+
+static JSValueRef getHeightCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ return JSValueMakeNumber(context, toAXElement(thisObject)->height());
+}
+
+static JSValueRef getIntValueCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ return JSValueMakeNumber(context, toAXElement(thisObject)->intValue());
+}
+
+static JSValueRef getMinValueCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ return JSValueMakeNumber(context, toAXElement(thisObject)->minValue());
+}
+
+static JSValueRef getMaxValueCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ return JSValueMakeNumber(context, toAXElement(thisObject)->maxValue());
+}
+
+static JSValueRef getInsertionPointLineNumberCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ return JSValueMakeNumber(context, toAXElement(thisObject)->insertionPointLineNumber());
+}
+
+static JSValueRef getSelectedTextRangeCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> selectedTextRange(Adopt, toAXElement(thisObject)->selectedTextRange());
+ return JSValueMakeString(context, selectedTextRange.get());
+}
+
+static JSValueRef getSupportsPressActionCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ return JSValueMakeBoolean(context, toAXElement(thisObject)->supportsPressAction());
+}
+
+// Destruction
+
+static void finalize(JSObjectRef thisObject)
+{
+ delete toAXElement(thisObject);
+}
+
+// Object Creation
+
+JSObjectRef AccessibilityUIElement::makeJSAccessibilityUIElement(JSContextRef context, const AccessibilityUIElement& element)
+{
+ return JSObjectMake(context, AccessibilityUIElement::getJSClass(), new AccessibilityUIElement(element));
+}
+
+JSClassRef AccessibilityUIElement::getJSClass()
+{
+ static JSStaticValue staticValues[] = {
+ { "role", getRoleCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "title", getTitleCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "description", getDescriptionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "width", getWidthCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "height", getHeightCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "intValue", getIntValueCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "minValue", getMinValueCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "maxValue", getMaxValueCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "insertionPointLineNumber", getInsertionPointLineNumberCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "selectedTextRange", getSelectedTextRangeCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "supportsPressAction", getSupportsPressActionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { 0, 0, 0, 0 }
+ };
+
+ static JSStaticFunction staticFunctions[] = {
+ { "allAttributes", allAttributesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "attributesOfLinkedUIElements", attributesOfLinkedUIElementsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "attributesOfDocumentLinks", attributesOfDocumentLinksCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "attributesOfChildren", attributesOfChildrenCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "parameterizedAttributeNames", parameterizedAttributeNamesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "lineForIndex", lineForIndexCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "boundsForRange", boundsForRangeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "childAtIndex", childAtIndexCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "attributesOfColumnHeaders", attributesOfColumnHeadersCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "attributesOfRowHeaders", attributesOfRowHeadersCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "attributesOfColumns", attributesOfColumnsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "attributesOfRows", attributesOfRowsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "attributesOfVisibleCells", attributesOfVisibleCellsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "attributesOfHeader", attributesOfHeaderCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "indexInTable", indexInTableCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "rowIndexRange", rowIndexRangeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "columnIndexRange", columnIndexRangeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "cellForColumnAndRow", cellForColumnAndRowCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "titleUIElement", titleUIElementCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setSelectedTextRange", setSelectedTextRangeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "attributeValue", attributeValueCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "isAttributeSettable", isAttributeSettableCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "parentElement", parentElementCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { 0, 0, 0 }
+ };
+
+ static JSClassDefinition classDefinition = {
+ 0, kJSClassAttributeNone, "AccessibilityUIElement", 0, staticValues, staticFunctions,
+ 0, finalize, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ };
+
+ static JSClassRef accessibilityUIElementClass = JSClassCreate(&classDefinition);
+ return accessibilityUIElementClass;
+}
diff --git a/WebKitTools/DumpRenderTree/AccessibilityUIElement.h b/WebKitTools/DumpRenderTree/AccessibilityUIElement.h
new file mode 100644
index 0000000..a7b4c8c
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/AccessibilityUIElement.h
@@ -0,0 +1,116 @@
+/*
+ * Copyright (C) 2008 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. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef AccessibilityUIElement_h
+#define AccessibilityUIElement_h
+
+#include <JavaScriptCore/JSObjectRef.h>
+#include <wtf/Vector.h>
+
+#if PLATFORM(MAC)
+#ifdef __OBJC__
+typedef id PlatformUIElement;
+#else
+typedef struct objc_object* PlatformUIElement;
+#endif
+#elif PLATFORM(WIN)
+#undef _WINSOCKAPI_
+#define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h
+
+#include <oleacc.h>
+#include <WebCore/COMPtr.h>
+
+typedef COMPtr<IAccessible> PlatformUIElement;
+#else
+typedef void* PlatformUIElement;
+#endif
+
+class AccessibilityUIElement {
+public:
+ AccessibilityUIElement(PlatformUIElement);
+ AccessibilityUIElement(const AccessibilityUIElement&);
+ ~AccessibilityUIElement();
+
+ PlatformUIElement platformUIElement() { return m_element; }
+
+ static JSObjectRef makeJSAccessibilityUIElement(JSContextRef, const AccessibilityUIElement&);
+
+ void getLinkedUIElements(Vector<AccessibilityUIElement>&);
+ void getDocumentLinks(Vector<AccessibilityUIElement>&);
+ void getChildren(Vector<AccessibilityUIElement>&);
+ void getChildrenWithRange(Vector<AccessibilityUIElement>&, unsigned location, unsigned length);
+
+ AccessibilityUIElement getChildAtIndex(unsigned);
+ AccessibilityUIElement titleUIElement();
+ AccessibilityUIElement parentElement();
+
+ // Methods - platform-independent implementations
+ JSStringRef allAttributes();
+ JSStringRef attributesOfLinkedUIElements();
+ JSStringRef attributesOfDocumentLinks();
+ JSStringRef attributesOfChildren();
+ JSStringRef parameterizedAttributeNames();
+
+ // Attributes - platform-independent implementations
+ JSStringRef attributeValue(JSStringRef attribute);
+ bool isAttributeSettable(JSStringRef attribute);
+ JSStringRef role();
+ JSStringRef title();
+ JSStringRef description();
+ double width();
+ double height();
+ double intValue();
+ double minValue();
+ double maxValue();
+ int insertionPointLineNumber();
+ JSStringRef selectedTextRange();
+ bool supportsPressAction();
+
+ // Table-specific attributes
+ JSStringRef attributesOfColumnHeaders();
+ JSStringRef attributesOfRowHeaders();
+ JSStringRef attributesOfColumns();
+ JSStringRef attributesOfRows();
+ JSStringRef attributesOfVisibleCells();
+ JSStringRef attributesOfHeader();
+ int indexInTable();
+ JSStringRef rowIndexRange();
+ JSStringRef columnIndexRange();
+
+ // Parameterized attributes
+ int lineForIndex(int);
+ JSStringRef boundsForRange(unsigned location, unsigned length);
+ void setSelectedTextRange(unsigned location, unsigned length);
+
+ // Table-specific
+ AccessibilityUIElement cellForColumnAndRow(unsigned column, unsigned row);
+
+private:
+ static JSClassRef getJSClass();
+
+ PlatformUIElement m_element;
+};
+
+#endif // AccessibilityUIElement_h
diff --git a/WebKitTools/DumpRenderTree/DumpRenderTree.h b/WebKitTools/DumpRenderTree/DumpRenderTree.h
new file mode 100644
index 0000000..72c2c09
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/DumpRenderTree.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2006, 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DumpRenderTree_h
+#define DumpRenderTree_h
+
+// FIXME: Remove this when all platforms are using config.h
+#ifndef Config_H
+#include <wtf/Platform.h>
+#endif
+
+#if PLATFORM(MAC)
+#include "DumpRenderTreeMac.h"
+#elif PLATFORM(WIN)
+#include "DumpRenderTreeWin.h"
+#elif PLATFORM(GTK)
+#include "DumpRenderTreeGtk.h"
+#endif
+
+#include <string>
+
+#if !PLATFORM(OPENBSD)
+std::wstring urlSuitableForTestResult(const std::wstring& url);
+#endif
+
+class LayoutTestController;
+
+extern volatile bool done;
+
+// FIXME: This is a bad abstraction. We should insted pass this to other controller objects which need access to it.
+extern LayoutTestController* gLayoutTestController;
+
+void dump();
+void displayWebView();
+
+#endif // DumpRenderTree_h
diff --git a/WebKitTools/DumpRenderTree/DumpRenderTree.sln b/WebKitTools/DumpRenderTree/DumpRenderTree.sln
new file mode 100644
index 0000000..43d2b61
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/DumpRenderTree.sln
@@ -0,0 +1,47 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DumpRenderTree", "win\DumpRenderTree.vcproj", "{6567DFD4-D6DE-4CD5-825D-17E353D160E1}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestNetscapePlugin", "win\TestNetscapePlugin\TestNetscapePlugin.vcproj", "{C0737398-3565-439E-A2B8-AB2BE4D5430C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FindSafari", "..\FindSafari\FindSafari.vcproj", "{DA31DA52-6675-48D4-89E0-333A7144397C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageDiff", "win\ImageDiff.vcproj", "{59CC0547-70AC-499C-9B19-EC01C6F61137}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug_Internal|Win32 = Debug_Internal|Win32
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug|Win32.Build.0 = Debug|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release|Win32.ActiveCfg = Release|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release|Win32.Build.0 = Release|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug|Win32.Build.0 = Debug|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.ActiveCfg = Release|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.Build.0 = Release|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.ActiveCfg = Debug|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.Build.0 = Debug|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.Build.0 = Debug|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.ActiveCfg = Release|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.Build.0 = Release|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
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/WebKitTools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj b/WebKitTools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..249a647
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
@@ -0,0 +1,877 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 42;
+ objects = {
+
+/* Begin PBXAggregateTarget section */
+ A84F608D08B1370600E9745F /* All */ = {
+ isa = PBXAggregateTarget;
+ buildConfigurationList = A84F609208B1371400E9745F /* Build configuration list for PBXAggregateTarget "All" */;
+ buildPhases = (
+ );
+ dependencies = (
+ A84F609108B1370E00E9745F /* PBXTargetDependency */,
+ A84F608F08B1370E00E9745F /* PBXTargetDependency */,
+ 141BF238096A451E00E0753C /* PBXTargetDependency */,
+ );
+ name = All;
+ productName = All;
+ };
+/* End PBXAggregateTarget section */
+
+/* Begin PBXBuildFile section */
+ 141BF435096A455900E0753C /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9335435F03D75502008635CE /* WebKit.framework */; };
+ 141BF436096A455900E0753C /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A84F608908B136DA00E9745F /* Cocoa.framework */; };
+ 141BF438096A455900E0753C /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A817090308B164D300CCB9FB /* JavaScriptCore.framework */; };
+ 141BF439096A455900E0753C /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE8257EF08D22389000507AB /* Carbon.framework */; };
+ 141BF453096A45EB00E0753C /* PluginObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 141BF447096A45C800E0753C /* PluginObject.h */; };
+ 14770FE20A22ADF7009342EE /* GCController.h in Headers */ = {isa = PBXBuildFile; fileRef = 14770FE00A22ADF7009342EE /* GCController.h */; };
+ 1A8F02E80BB9B4EC008CFA34 /* TestObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8F024C0BB9B056008CFA34 /* TestObject.h */; };
+ 1AC6C8490D07638600CD3161 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC6C77F0D07589B00CD3161 /* main.cpp */; };
+ 1AC6C84A0D07638600CD3161 /* PluginObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC6C7800D07589B00CD3161 /* PluginObject.cpp */; };
+ 1AC6C84B0D07638600CD3161 /* TestObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC6C7810D07589B00CD3161 /* TestObject.cpp */; };
+ 23BCB8900EA57623003C6289 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 23BCB88F0EA57623003C6289 /* OpenGL.framework */; };
+ 5DB9AC970F722C3600684641 /* AHEM____.TTF in Copy Font Files */ = {isa = PBXBuildFile; fileRef = AA7F10C20CB3C1030003BDC9 /* AHEM____.TTF */; };
+ 5DB9AC980F722C3600684641 /* WebKitWeightWatcher100.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 375F09710DAC3CB600C8B4E5 /* WebKitWeightWatcher100.ttf */; };
+ 5DB9AC990F722C3600684641 /* WebKitWeightWatcher200.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 375F09720DAC3CB600C8B4E5 /* WebKitWeightWatcher200.ttf */; };
+ 5DB9AC9A0F722C3600684641 /* WebKitWeightWatcher300.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 375F09730DAC3CB600C8B4E5 /* WebKitWeightWatcher300.ttf */; };
+ 5DB9AC9B0F722C3600684641 /* WebKitWeightWatcher400.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 375F09740DAC3CB600C8B4E5 /* WebKitWeightWatcher400.ttf */; };
+ 5DB9AC9C0F722C3600684641 /* WebKitWeightWatcher500.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 375F09750DAC3CB600C8B4E5 /* WebKitWeightWatcher500.ttf */; };
+ 5DB9AC9D0F722C3600684641 /* WebKitWeightWatcher600.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 375F09760DAC3CB600C8B4E5 /* WebKitWeightWatcher600.ttf */; };
+ 5DB9AC9E0F722C3600684641 /* WebKitWeightWatcher700.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 375F09770DAC3CB600C8B4E5 /* WebKitWeightWatcher700.ttf */; };
+ 5DB9AC9F0F722C3600684641 /* WebKitWeightWatcher800.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 375F09780DAC3CB600C8B4E5 /* WebKitWeightWatcher800.ttf */; };
+ 5DB9ACA00F722C3600684641 /* WebKitWeightWatcher900.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 375F09790DAC3CB600C8B4E5 /* WebKitWeightWatcher900.ttf */; };
+ 9340994C08540CAE007F3BC8 /* DumpRenderTreePrefix.h in Headers */ = {isa = PBXBuildFile; fileRef = 32A70AAB03705E1F00C91783 /* DumpRenderTreePrefix.h */; };
+ 9340995108540CAE007F3BC8 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9335435F03D75502008635CE /* WebKit.framework */; };
+ A817090008B163EF00CCB9FB /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A84F608908B136DA00E9745F /* Cocoa.framework */; };
+ A817090408B164D300CCB9FB /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A817090308B164D300CCB9FB /* JavaScriptCore.framework */; };
+ A84F608A08B136DA00E9745F /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A84F608908B136DA00E9745F /* Cocoa.framework */; };
+ A8B91ADA0CF3B32F008F91FF /* DumpRenderTreePasteboard.m in Sources */ = {isa = PBXBuildFile; fileRef = A8B91AD70CF3B32F008F91FF /* DumpRenderTreePasteboard.m */; };
+ A8B91ADC0CF3B32F008F91FF /* DumpRenderTreeWindow.mm in Sources */ = {isa = PBXBuildFile; fileRef = A8B91AD90CF3B32F008F91FF /* DumpRenderTreeWindow.mm */; };
+ A8B91AE00CF3B372008F91FF /* DumpRenderTreeWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = A8B91ADD0CF3B372008F91FF /* DumpRenderTreeWindow.h */; };
+ A8B91AE20CF3B372008F91FF /* DumpRenderTreePasteboard.h in Headers */ = {isa = PBXBuildFile; fileRef = A8B91ADF0CF3B372008F91FF /* DumpRenderTreePasteboard.h */; };
+ A8B91BFD0CF522B4008F91FF /* CheckedMalloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8B91BF70CF522B4008F91FF /* CheckedMalloc.cpp */; };
+ A8B91BFF0CF522B4008F91FF /* CheckedMalloc.h in Headers */ = {isa = PBXBuildFile; fileRef = A8B91BF90CF522B4008F91FF /* CheckedMalloc.h */; };
+ AE8259F308D22463000507AB /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE8257EF08D22389000507AB /* Carbon.framework */; };
+ AE8259F408D22463000507AB /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE8257EF08D22389000507AB /* Carbon.framework */; };
+ B5A752A208AF5D1F00138E45 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B5A752A108AF5D1F00138E45 /* QuartzCore.framework */; };
+ BC0131DA0C9772010087317D /* LayoutTestController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC0131D80C9772010087317D /* LayoutTestController.cpp */; };
+ BC0131DB0C9772010087317D /* LayoutTestController.h in Headers */ = {isa = PBXBuildFile; fileRef = BC0131D90C9772010087317D /* LayoutTestController.h */; };
+ BC0E24E00E2D9451001B6BC2 /* AccessibilityUIElement.h in Headers */ = {isa = PBXBuildFile; fileRef = BC0E24DE0E2D9451001B6BC2 /* AccessibilityUIElement.h */; };
+ BC0E24E10E2D9451001B6BC2 /* AccessibilityUIElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC0E24DF0E2D9451001B6BC2 /* AccessibilityUIElement.cpp */; };
+ BC0E26150E2DA4C6001B6BC2 /* AccessibilityUIElementMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC0E26140E2DA4C6001B6BC2 /* AccessibilityUIElementMac.mm */; };
+ BC47412A0D038A4C0072B006 /* JavaScriptThreading.h in Headers */ = {isa = PBXBuildFile; fileRef = BC4741290D038A4C0072B006 /* JavaScriptThreading.h */; };
+ BC4741410D038A570072B006 /* JavaScriptThreadingPthreads.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC4741400D038A570072B006 /* JavaScriptThreadingPthreads.cpp */; };
+ BC9D90240C97472E0099A4A3 /* WorkQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC9D90210C97472D0099A4A3 /* WorkQueue.cpp */; };
+ BC9D90250C97472E0099A4A3 /* WorkQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC9D90220C97472E0099A4A3 /* WorkQueue.h */; };
+ BC9D90260C97472E0099A4A3 /* WorkQueueItem.h in Headers */ = {isa = PBXBuildFile; fileRef = BC9D90230C97472E0099A4A3 /* WorkQueueItem.h */; };
+ BCA18B230C9B014B00114369 /* GCControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCA18B210C9B014B00114369 /* GCControllerMac.mm */; };
+ BCA18B240C9B014B00114369 /* LayoutTestControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCA18B220C9B014B00114369 /* LayoutTestControllerMac.mm */; };
+ BCA18B260C9B015C00114369 /* WorkQueueItemMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCA18B250C9B015C00114369 /* WorkQueueItemMac.mm */; };
+ BCA18B310C9B01B400114369 /* ObjCController.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA18B2F0C9B01B400114369 /* ObjCController.h */; };
+ BCA18B320C9B01B400114369 /* ObjCController.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA18B300C9B01B400114369 /* ObjCController.m */; };
+ BCA18B380C9B021900114369 /* AppleScriptController.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA18B360C9B021900114369 /* AppleScriptController.h */; };
+ BCA18B390C9B021900114369 /* AppleScriptController.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA18B370C9B021900114369 /* AppleScriptController.m */; };
+ BCA18B3C0C9B024900114369 /* TextInputController.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA18B3A0C9B024900114369 /* TextInputController.h */; };
+ BCA18B490C9B02C400114369 /* TextInputController.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA18B480C9B02C400114369 /* TextInputController.m */; };
+ BCA18B610C9B08C200114369 /* EditingDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA18B570C9B08C200114369 /* EditingDelegate.h */; };
+ BCA18B620C9B08C200114369 /* EditingDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCA18B580C9B08C200114369 /* EditingDelegate.mm */; };
+ BCA18B630C9B08C200114369 /* FrameLoadDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA18B590C9B08C200114369 /* FrameLoadDelegate.h */; };
+ BCA18B640C9B08C200114369 /* FrameLoadDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCA18B5A0C9B08C200114369 /* FrameLoadDelegate.mm */; };
+ BCA18B650C9B08C200114369 /* PolicyDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA18B5B0C9B08C200114369 /* PolicyDelegate.h */; };
+ BCA18B660C9B08C200114369 /* PolicyDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCA18B5C0C9B08C200114369 /* PolicyDelegate.mm */; };
+ BCA18B670C9B08C200114369 /* ResourceLoadDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA18B5D0C9B08C200114369 /* ResourceLoadDelegate.h */; };
+ BCA18B680C9B08C200114369 /* ResourceLoadDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCA18B5E0C9B08C200114369 /* ResourceLoadDelegate.mm */; };
+ BCA18B690C9B08C200114369 /* UIDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA18B5F0C9B08C200114369 /* UIDelegate.h */; };
+ BCA18B6A0C9B08C200114369 /* UIDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCA18B600C9B08C200114369 /* UIDelegate.mm */; };
+ BCA18B6F0C9B08DB00114369 /* EventSendingController.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA18B6B0C9B08DB00114369 /* EventSendingController.h */; };
+ BCA18B700C9B08DB00114369 /* EventSendingController.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCA18B6C0C9B08DB00114369 /* EventSendingController.mm */; };
+ BCA18B710C9B08DB00114369 /* NavigationController.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA18B6D0C9B08DB00114369 /* NavigationController.h */; };
+ BCA18B720C9B08DB00114369 /* NavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA18B6E0C9B08DB00114369 /* NavigationController.m */; };
+ BCA18B7A0C9B08F100114369 /* DumpRenderTreeDraggingInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA18B730C9B08F100114369 /* DumpRenderTreeDraggingInfo.h */; };
+ BCA18B7B0C9B08F100114369 /* DumpRenderTreeDraggingInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCA18B740C9B08F100114369 /* DumpRenderTreeDraggingInfo.mm */; };
+ BCA18B7D0C9B08F100114369 /* ObjCPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA18B760C9B08F100114369 /* ObjCPlugin.h */; };
+ BCA18B7E0C9B08F100114369 /* ObjCPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA18B770C9B08F100114369 /* ObjCPlugin.m */; };
+ BCA18B7F0C9B08F100114369 /* ObjCPluginFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA18B780C9B08F100114369 /* ObjCPluginFunction.h */; };
+ BCA18B800C9B08F100114369 /* ObjCPluginFunction.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA18B790C9B08F100114369 /* ObjCPluginFunction.m */; };
+ BCA18C0B0C9B59EF00114369 /* DumpRenderTreeMac.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA18C0A0C9B59EF00114369 /* DumpRenderTreeMac.h */; };
+ BCA18C470C9B5B9400114369 /* DumpRenderTree.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCA18C460C9B5B9400114369 /* DumpRenderTree.mm */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; };
+ BCB284C70CFA83C4007E533E /* PixelDumpSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB2848A0CFA820F007E533E /* PixelDumpSupport.h */; };
+ BCB284CD0CFA83C8007E533E /* PixelDumpSupportCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB284880CFA8202007E533E /* PixelDumpSupportCG.cpp */; };
+ BCB284D00CFA83CC007E533E /* PixelDumpSupportCG.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB284890CFA8202007E533E /* PixelDumpSupportCG.h */; };
+ BCB284D60CFA83D1007E533E /* PixelDumpSupportMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCB2848C0CFA8221007E533E /* PixelDumpSupportMac.mm */; };
+ BCB284F60CFA84F8007E533E /* ImageDiffCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB284F30CFA84F2007E533E /* ImageDiffCG.cpp */; };
+ BCD08B3A0E1057EF00A7D0C1 /* AccessibilityController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD08B390E1057EF00A7D0C1 /* AccessibilityController.cpp */; };
+ BCD08B710E1059D200A7D0C1 /* AccessibilityControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCD08B700E1059D200A7D0C1 /* AccessibilityControllerMac.mm */; };
+ BCF6C6500C98E9C000AC063E /* GCController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCF6C64F0C98E9C000AC063E /* GCController.cpp */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 141BF237096A451E00E0753C /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 141BF21E096A441D00E0753C;
+ remoteInfo = TestNetscapePlugIn;
+ };
+ A84F608E08B1370E00E9745F /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = B5A7525A08AF4A4A00138E45;
+ remoteInfo = ImageDiff;
+ };
+ A84F609008B1370E00E9745F /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 9340994A08540CAE007F3BC8;
+ remoteInfo = DumpRenderTree;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 5DB9ACAA0F722C4400684641 /* Copy Font Files */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = DumpRenderTree.resources;
+ dstSubfolderSpec = 7;
+ files = (
+ 5DB9AC970F722C3600684641 /* AHEM____.TTF in Copy Font Files */,
+ 5DB9AC980F722C3600684641 /* WebKitWeightWatcher100.ttf in Copy Font Files */,
+ 5DB9AC990F722C3600684641 /* WebKitWeightWatcher200.ttf in Copy Font Files */,
+ 5DB9AC9A0F722C3600684641 /* WebKitWeightWatcher300.ttf in Copy Font Files */,
+ 5DB9AC9B0F722C3600684641 /* WebKitWeightWatcher400.ttf in Copy Font Files */,
+ 5DB9AC9C0F722C3600684641 /* WebKitWeightWatcher500.ttf in Copy Font Files */,
+ 5DB9AC9D0F722C3600684641 /* WebKitWeightWatcher600.ttf in Copy Font Files */,
+ 5DB9AC9E0F722C3600684641 /* WebKitWeightWatcher700.ttf in Copy Font Files */,
+ 5DB9AC9F0F722C3600684641 /* WebKitWeightWatcher800.ttf in Copy Font Files */,
+ 5DB9ACA00F722C3600684641 /* WebKitWeightWatcher900.ttf in Copy Font Files */,
+ );
+ name = "Copy Font Files";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 141BF233096A44CF00E0753C /* TestNetscapePlugIn.plugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TestNetscapePlugIn.plugin; sourceTree = BUILT_PRODUCTS_DIR; };
+ 141BF447096A45C800E0753C /* PluginObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PluginObject.h; sourceTree = "<group>"; };
+ 141BF448096A45C800E0753C /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+ 14770FE00A22ADF7009342EE /* GCController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCController.h; sourceTree = "<group>"; };
+ 1A8F024C0BB9B056008CFA34 /* TestObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestObject.h; sourceTree = "<group>"; };
+ 1AC6C77F0D07589B00CD3161 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
+ 1AC6C7800D07589B00CD3161 /* PluginObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginObject.cpp; sourceTree = "<group>"; };
+ 1AC6C7810D07589B00CD3161 /* TestObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TestObject.cpp; sourceTree = "<group>"; };
+ 23BCB88F0EA57623003C6289 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
+ 32A70AAB03705E1F00C91783 /* DumpRenderTreePrefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DumpRenderTreePrefix.h; sourceTree = "<group>"; };
+ 375F09710DAC3CB600C8B4E5 /* WebKitWeightWatcher100.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher100.ttf; path = fonts/WebKitWeightWatcher100.ttf; sourceTree = "<group>"; };
+ 375F09720DAC3CB600C8B4E5 /* WebKitWeightWatcher200.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher200.ttf; path = fonts/WebKitWeightWatcher200.ttf; sourceTree = "<group>"; };
+ 375F09730DAC3CB600C8B4E5 /* WebKitWeightWatcher300.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher300.ttf; path = fonts/WebKitWeightWatcher300.ttf; sourceTree = "<group>"; };
+ 375F09740DAC3CB600C8B4E5 /* WebKitWeightWatcher400.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher400.ttf; path = fonts/WebKitWeightWatcher400.ttf; sourceTree = "<group>"; };
+ 375F09750DAC3CB600C8B4E5 /* WebKitWeightWatcher500.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher500.ttf; path = fonts/WebKitWeightWatcher500.ttf; sourceTree = "<group>"; };
+ 375F09760DAC3CB600C8B4E5 /* WebKitWeightWatcher600.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher600.ttf; path = fonts/WebKitWeightWatcher600.ttf; sourceTree = "<group>"; };
+ 375F09770DAC3CB600C8B4E5 /* WebKitWeightWatcher700.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher700.ttf; path = fonts/WebKitWeightWatcher700.ttf; sourceTree = "<group>"; };
+ 375F09780DAC3CB600C8B4E5 /* WebKitWeightWatcher800.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher800.ttf; path = fonts/WebKitWeightWatcher800.ttf; sourceTree = "<group>"; };
+ 375F09790DAC3CB600C8B4E5 /* WebKitWeightWatcher900.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher900.ttf; path = fonts/WebKitWeightWatcher900.ttf; sourceTree = "<group>"; };
+ 9335435F03D75502008635CE /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WebKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 9340995408540CAF007F3BC8 /* DumpRenderTree */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = DumpRenderTree; sourceTree = BUILT_PRODUCTS_DIR; };
+ A803FF7409CAAD08009B2A37 /* DumpRenderTree.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = DumpRenderTree.h; sourceTree = "<group>"; };
+ A817090308B164D300CCB9FB /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ A84F608908B136DA00E9745F /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+ A8B91AD70CF3B32F008F91FF /* DumpRenderTreePasteboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DumpRenderTreePasteboard.m; path = mac/DumpRenderTreePasteboard.m; sourceTree = "<group>"; };
+ A8B91AD90CF3B32F008F91FF /* DumpRenderTreeWindow.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DumpRenderTreeWindow.mm; path = mac/DumpRenderTreeWindow.mm; sourceTree = "<group>"; };
+ A8B91ADD0CF3B372008F91FF /* DumpRenderTreeWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DumpRenderTreeWindow.h; path = mac/DumpRenderTreeWindow.h; sourceTree = "<group>"; };
+ A8B91ADF0CF3B372008F91FF /* DumpRenderTreePasteboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DumpRenderTreePasteboard.h; path = mac/DumpRenderTreePasteboard.h; sourceTree = "<group>"; };
+ A8B91BF70CF522B4008F91FF /* CheckedMalloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CheckedMalloc.cpp; path = mac/CheckedMalloc.cpp; sourceTree = "<group>"; };
+ A8B91BF90CF522B4008F91FF /* CheckedMalloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CheckedMalloc.h; path = mac/CheckedMalloc.h; sourceTree = "<group>"; };
+ AA7F10C20CB3C1030003BDC9 /* AHEM____.TTF */ = {isa = PBXFileReference; lastKnownFileType = file; name = "AHEM____.TTF"; path = "qt/fonts/AHEM____.TTF"; sourceTree = "<group>"; };
+ AE8257EF08D22389000507AB /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
+ B5A7526708AF4A4A00138E45 /* ImageDiff */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ImageDiff; sourceTree = BUILT_PRODUCTS_DIR; };
+ B5A752A108AF5D1F00138E45 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = "<absolute>"; };
+ BC0131D80C9772010087317D /* LayoutTestController.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 30; path = LayoutTestController.cpp; sourceTree = "<group>"; };
+ BC0131D90C9772010087317D /* LayoutTestController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LayoutTestController.h; sourceTree = "<group>"; };
+ BC0E24DE0E2D9451001B6BC2 /* AccessibilityUIElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityUIElement.h; sourceTree = "<group>"; };
+ BC0E24DF0E2D9451001B6BC2 /* AccessibilityUIElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityUIElement.cpp; sourceTree = "<group>"; };
+ BC0E26140E2DA4C6001B6BC2 /* AccessibilityUIElementMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AccessibilityUIElementMac.mm; path = mac/AccessibilityUIElementMac.mm; sourceTree = "<group>"; };
+ BC4741290D038A4C0072B006 /* JavaScriptThreading.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavaScriptThreading.h; sourceTree = "<group>"; };
+ BC4741400D038A570072B006 /* JavaScriptThreadingPthreads.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JavaScriptThreadingPthreads.cpp; path = pthreads/JavaScriptThreadingPthreads.cpp; sourceTree = "<group>"; };
+ BC9D90210C97472D0099A4A3 /* WorkQueue.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 30; path = WorkQueue.cpp; sourceTree = "<group>"; };
+ BC9D90220C97472E0099A4A3 /* WorkQueue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WorkQueue.h; sourceTree = "<group>"; };
+ BC9D90230C97472E0099A4A3 /* WorkQueueItem.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WorkQueueItem.h; sourceTree = "<group>"; };
+ BCA18B210C9B014B00114369 /* GCControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = GCControllerMac.mm; path = mac/GCControllerMac.mm; sourceTree = "<group>"; };
+ BCA18B220C9B014B00114369 /* LayoutTestControllerMac.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = LayoutTestControllerMac.mm; path = mac/LayoutTestControllerMac.mm; sourceTree = "<group>"; };
+ BCA18B250C9B015C00114369 /* WorkQueueItemMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = WorkQueueItemMac.mm; path = mac/WorkQueueItemMac.mm; sourceTree = "<group>"; };
+ BCA18B2F0C9B01B400114369 /* ObjCController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ObjCController.h; path = mac/ObjCController.h; sourceTree = "<group>"; };
+ BCA18B300C9B01B400114369 /* ObjCController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = ObjCController.m; path = mac/ObjCController.m; sourceTree = "<group>"; };
+ BCA18B360C9B021900114369 /* AppleScriptController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = AppleScriptController.h; path = mac/AppleScriptController.h; sourceTree = "<group>"; };
+ BCA18B370C9B021900114369 /* AppleScriptController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = AppleScriptController.m; path = mac/AppleScriptController.m; sourceTree = "<group>"; };
+ BCA18B3A0C9B024900114369 /* TextInputController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = TextInputController.h; path = mac/TextInputController.h; sourceTree = "<group>"; };
+ BCA18B480C9B02C400114369 /* TextInputController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = TextInputController.m; path = mac/TextInputController.m; sourceTree = "<group>"; };
+ BCA18B570C9B08C200114369 /* EditingDelegate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = EditingDelegate.h; path = mac/EditingDelegate.h; sourceTree = "<group>"; };
+ BCA18B580C9B08C200114369 /* EditingDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = EditingDelegate.mm; path = mac/EditingDelegate.mm; sourceTree = "<group>"; };
+ BCA18B590C9B08C200114369 /* FrameLoadDelegate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = FrameLoadDelegate.h; path = mac/FrameLoadDelegate.h; sourceTree = "<group>"; };
+ BCA18B5A0C9B08C200114369 /* FrameLoadDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = FrameLoadDelegate.mm; path = mac/FrameLoadDelegate.mm; sourceTree = "<group>"; };
+ BCA18B5B0C9B08C200114369 /* PolicyDelegate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PolicyDelegate.h; path = mac/PolicyDelegate.h; sourceTree = "<group>"; };
+ BCA18B5C0C9B08C200114369 /* PolicyDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = PolicyDelegate.mm; path = mac/PolicyDelegate.mm; sourceTree = "<group>"; };
+ BCA18B5D0C9B08C200114369 /* ResourceLoadDelegate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ResourceLoadDelegate.h; path = mac/ResourceLoadDelegate.h; sourceTree = "<group>"; };
+ BCA18B5E0C9B08C200114369 /* ResourceLoadDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = ResourceLoadDelegate.mm; path = mac/ResourceLoadDelegate.mm; sourceTree = "<group>"; };
+ BCA18B5F0C9B08C200114369 /* UIDelegate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = UIDelegate.h; path = mac/UIDelegate.h; sourceTree = "<group>"; };
+ BCA18B600C9B08C200114369 /* UIDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = UIDelegate.mm; path = mac/UIDelegate.mm; sourceTree = "<group>"; };
+ BCA18B6B0C9B08DB00114369 /* EventSendingController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = EventSendingController.h; path = mac/EventSendingController.h; sourceTree = "<group>"; };
+ BCA18B6C0C9B08DB00114369 /* EventSendingController.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = EventSendingController.mm; path = mac/EventSendingController.mm; sourceTree = "<group>"; };
+ BCA18B6D0C9B08DB00114369 /* NavigationController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = NavigationController.h; path = mac/NavigationController.h; sourceTree = "<group>"; };
+ BCA18B6E0C9B08DB00114369 /* NavigationController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = NavigationController.m; path = mac/NavigationController.m; sourceTree = "<group>"; };
+ BCA18B730C9B08F100114369 /* DumpRenderTreeDraggingInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = DumpRenderTreeDraggingInfo.h; path = mac/DumpRenderTreeDraggingInfo.h; sourceTree = "<group>"; };
+ BCA18B740C9B08F100114369 /* DumpRenderTreeDraggingInfo.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = DumpRenderTreeDraggingInfo.mm; path = mac/DumpRenderTreeDraggingInfo.mm; sourceTree = "<group>"; };
+ BCA18B760C9B08F100114369 /* ObjCPlugin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ObjCPlugin.h; path = mac/ObjCPlugin.h; sourceTree = "<group>"; };
+ BCA18B770C9B08F100114369 /* ObjCPlugin.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = ObjCPlugin.m; path = mac/ObjCPlugin.m; sourceTree = "<group>"; };
+ BCA18B780C9B08F100114369 /* ObjCPluginFunction.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ObjCPluginFunction.h; path = mac/ObjCPluginFunction.h; sourceTree = "<group>"; };
+ BCA18B790C9B08F100114369 /* ObjCPluginFunction.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = ObjCPluginFunction.m; path = mac/ObjCPluginFunction.m; sourceTree = "<group>"; };
+ BCA18C0A0C9B59EF00114369 /* DumpRenderTreeMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DumpRenderTreeMac.h; path = mac/DumpRenderTreeMac.h; sourceTree = "<group>"; };
+ BCA18C460C9B5B9400114369 /* DumpRenderTree.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = DumpRenderTree.mm; path = mac/DumpRenderTree.mm; sourceTree = "<group>"; };
+ BCB281EE0CFA713D007E533E /* Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; name = Base.xcconfig; path = mac/Configurations/Base.xcconfig; sourceTree = "<group>"; };
+ BCB281F00CFA713D007E533E /* DumpRenderTree.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; name = DumpRenderTree.xcconfig; path = mac/Configurations/DumpRenderTree.xcconfig; sourceTree = "<group>"; };
+ BCB282F40CFA7450007E533E /* DebugRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; name = DebugRelease.xcconfig; path = mac/Configurations/DebugRelease.xcconfig; sourceTree = "<group>"; };
+ BCB283D80CFA7AFD007E533E /* ImageDiff.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; name = ImageDiff.xcconfig; path = mac/Configurations/ImageDiff.xcconfig; sourceTree = "<group>"; };
+ BCB283DE0CFA7C20007E533E /* TestNetscapePlugIn.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; name = TestNetscapePlugIn.xcconfig; path = mac/Configurations/TestNetscapePlugIn.xcconfig; sourceTree = "<group>"; };
+ BCB284880CFA8202007E533E /* PixelDumpSupportCG.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 30; name = PixelDumpSupportCG.cpp; path = cg/PixelDumpSupportCG.cpp; sourceTree = "<group>"; };
+ BCB284890CFA8202007E533E /* PixelDumpSupportCG.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PixelDumpSupportCG.h; path = cg/PixelDumpSupportCG.h; sourceTree = "<group>"; };
+ BCB2848A0CFA820F007E533E /* PixelDumpSupport.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PixelDumpSupport.h; sourceTree = "<group>"; };
+ BCB2848C0CFA8221007E533E /* PixelDumpSupportMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = PixelDumpSupportMac.mm; path = mac/PixelDumpSupportMac.mm; sourceTree = "<group>"; };
+ BCB284B20CFA82CB007E533E /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
+ BCB284F30CFA84F2007E533E /* ImageDiffCG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ImageDiffCG.cpp; path = cg/ImageDiffCG.cpp; sourceTree = "<group>"; };
+ BCD08A580E10496B00A7D0C1 /* AccessibilityController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityController.h; sourceTree = "<group>"; };
+ BCD08B390E1057EF00A7D0C1 /* AccessibilityController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityController.cpp; sourceTree = "<group>"; };
+ BCD08B700E1059D200A7D0C1 /* AccessibilityControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AccessibilityControllerMac.mm; path = mac/AccessibilityControllerMac.mm; sourceTree = "<group>"; };
+ BCF6C64F0C98E9C000AC063E /* GCController.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 30; path = GCController.cpp; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 141BF21D096A441D00E0753C /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 141BF439096A455900E0753C /* Carbon.framework in Frameworks */,
+ 141BF436096A455900E0753C /* Cocoa.framework in Frameworks */,
+ 141BF438096A455900E0753C /* JavaScriptCore.framework in Frameworks */,
+ 141BF435096A455900E0753C /* WebKit.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 9340994F08540CAE007F3BC8 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ AE8259F308D22463000507AB /* Carbon.framework in Frameworks */,
+ A84F608A08B136DA00E9745F /* Cocoa.framework in Frameworks */,
+ A817090408B164D300CCB9FB /* JavaScriptCore.framework in Frameworks */,
+ 23BCB8900EA57623003C6289 /* OpenGL.framework in Frameworks */,
+ 9340995108540CAE007F3BC8 /* WebKit.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ B5A7525F08AF4A4A00138E45 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ AE8259F408D22463000507AB /* Carbon.framework in Frameworks */,
+ A817090008B163EF00CCB9FB /* Cocoa.framework in Frameworks */,
+ B5A752A208AF5D1F00138E45 /* QuartzCore.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 08FB7794FE84155DC02AAC07 /* DumpRenderTree */ = {
+ isa = PBXGroup;
+ children = (
+ 32A70AAB03705E1F00C91783 /* DumpRenderTreePrefix.h */,
+ 1422A2750AF6F4BD00E1A883 /* Delegates */,
+ 1422A2690AF6F45200E1A883 /* Controllers */,
+ BCB284870CFA81ED007E533E /* PixelDump */,
+ A803FF7409CAAD08009B2A37 /* DumpRenderTree.h */,
+ BCA18C460C9B5B9400114369 /* DumpRenderTree.mm */,
+ A8B91BF70CF522B4008F91FF /* CheckedMalloc.cpp */,
+ A8B91BF90CF522B4008F91FF /* CheckedMalloc.h */,
+ BC4741290D038A4C0072B006 /* JavaScriptThreading.h */,
+ BC4741400D038A570072B006 /* JavaScriptThreadingPthreads.cpp */,
+ BCA18C0A0C9B59EF00114369 /* DumpRenderTreeMac.h */,
+ BCA18B730C9B08F100114369 /* DumpRenderTreeDraggingInfo.h */,
+ BCA18B740C9B08F100114369 /* DumpRenderTreeDraggingInfo.mm */,
+ BC9D90210C97472D0099A4A3 /* WorkQueue.cpp */,
+ BC9D90220C97472E0099A4A3 /* WorkQueue.h */,
+ BC9D90230C97472E0099A4A3 /* WorkQueueItem.h */,
+ A8B91AD20CF3B305008F91FF /* AppKit Overrides */,
+ A8B91AC40CF3B170008F91FF /* ObjCPlugin */,
+ 141BF1F5096A439800E0753C /* TestNetscapePlugIn.subproj */,
+ 9345229B0BD12B2C0086EDA0 /* Resources */,
+ A803FF6409CAACC1009B2A37 /* Frameworks */,
+ 9340995508540CAF007F3BC8 /* Products */,
+ BCB281ED0CFA711D007E533E /* Configurations */,
+ );
+ name = DumpRenderTree;
+ sourceTree = "<group>";
+ };
+ 141BF1F5096A439800E0753C /* TestNetscapePlugIn.subproj */ = {
+ isa = PBXGroup;
+ children = (
+ 141BF448096A45C800E0753C /* Info.plist */,
+ 1AC6C7800D07589B00CD3161 /* PluginObject.cpp */,
+ 141BF447096A45C800E0753C /* PluginObject.h */,
+ 1AC6C7810D07589B00CD3161 /* TestObject.cpp */,
+ 1A8F024C0BB9B056008CFA34 /* TestObject.h */,
+ 1AC6C77F0D07589B00CD3161 /* main.cpp */,
+ );
+ path = TestNetscapePlugIn.subproj;
+ sourceTree = "<group>";
+ };
+ 1422A2690AF6F45200E1A883 /* Controllers */ = {
+ isa = PBXGroup;
+ children = (
+ BCD08B390E1057EF00A7D0C1 /* AccessibilityController.cpp */,
+ BCD08A580E10496B00A7D0C1 /* AccessibilityController.h */,
+ BCD08B700E1059D200A7D0C1 /* AccessibilityControllerMac.mm */,
+ BC0E24DF0E2D9451001B6BC2 /* AccessibilityUIElement.cpp */,
+ BC0E24DE0E2D9451001B6BC2 /* AccessibilityUIElement.h */,
+ BC0E26140E2DA4C6001B6BC2 /* AccessibilityUIElementMac.mm */,
+ BCA18B360C9B021900114369 /* AppleScriptController.h */,
+ BCA18B370C9B021900114369 /* AppleScriptController.m */,
+ BCA18B6B0C9B08DB00114369 /* EventSendingController.h */,
+ BCA18B6C0C9B08DB00114369 /* EventSendingController.mm */,
+ BCF6C64F0C98E9C000AC063E /* GCController.cpp */,
+ 14770FE00A22ADF7009342EE /* GCController.h */,
+ BCA18B210C9B014B00114369 /* GCControllerMac.mm */,
+ BC0131D80C9772010087317D /* LayoutTestController.cpp */,
+ BC0131D90C9772010087317D /* LayoutTestController.h */,
+ BCA18B220C9B014B00114369 /* LayoutTestControllerMac.mm */,
+ BCA18B6D0C9B08DB00114369 /* NavigationController.h */,
+ BCA18B6E0C9B08DB00114369 /* NavigationController.m */,
+ BCA18B2F0C9B01B400114369 /* ObjCController.h */,
+ BCA18B300C9B01B400114369 /* ObjCController.m */,
+ BCA18B3A0C9B024900114369 /* TextInputController.h */,
+ BCA18B480C9B02C400114369 /* TextInputController.m */,
+ );
+ name = Controllers;
+ sourceTree = "<group>";
+ usesTabs = 0;
+ };
+ 1422A2750AF6F4BD00E1A883 /* Delegates */ = {
+ isa = PBXGroup;
+ children = (
+ BCA18B570C9B08C200114369 /* EditingDelegate.h */,
+ BCA18B580C9B08C200114369 /* EditingDelegate.mm */,
+ BCA18B590C9B08C200114369 /* FrameLoadDelegate.h */,
+ BCA18B5A0C9B08C200114369 /* FrameLoadDelegate.mm */,
+ BCA18B5B0C9B08C200114369 /* PolicyDelegate.h */,
+ BCA18B5C0C9B08C200114369 /* PolicyDelegate.mm */,
+ BCA18B5D0C9B08C200114369 /* ResourceLoadDelegate.h */,
+ BCA18B5E0C9B08C200114369 /* ResourceLoadDelegate.mm */,
+ BCA18B5F0C9B08C200114369 /* UIDelegate.h */,
+ BCA18B600C9B08C200114369 /* UIDelegate.mm */,
+ );
+ name = Delegates;
+ sourceTree = "<group>";
+ };
+ 9340995508540CAF007F3BC8 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 9340995408540CAF007F3BC8 /* DumpRenderTree */,
+ B5A7526708AF4A4A00138E45 /* ImageDiff */,
+ 141BF233096A44CF00E0753C /* TestNetscapePlugIn.plugin */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 9345229B0BD12B2C0086EDA0 /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ AA7F10C20CB3C1030003BDC9 /* AHEM____.TTF */,
+ 375F09710DAC3CB600C8B4E5 /* WebKitWeightWatcher100.ttf */,
+ 375F09720DAC3CB600C8B4E5 /* WebKitWeightWatcher200.ttf */,
+ 375F09730DAC3CB600C8B4E5 /* WebKitWeightWatcher300.ttf */,
+ 375F09740DAC3CB600C8B4E5 /* WebKitWeightWatcher400.ttf */,
+ 375F09750DAC3CB600C8B4E5 /* WebKitWeightWatcher500.ttf */,
+ 375F09760DAC3CB600C8B4E5 /* WebKitWeightWatcher600.ttf */,
+ 375F09770DAC3CB600C8B4E5 /* WebKitWeightWatcher700.ttf */,
+ 375F09780DAC3CB600C8B4E5 /* WebKitWeightWatcher800.ttf */,
+ 375F09790DAC3CB600C8B4E5 /* WebKitWeightWatcher900.ttf */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ A803FF6409CAACC1009B2A37 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ BCB284B20CFA82CB007E533E /* ApplicationServices.framework */,
+ AE8257EF08D22389000507AB /* Carbon.framework */,
+ A84F608908B136DA00E9745F /* Cocoa.framework */,
+ A817090308B164D300CCB9FB /* JavaScriptCore.framework */,
+ 23BCB88F0EA57623003C6289 /* OpenGL.framework */,
+ B5A752A108AF5D1F00138E45 /* QuartzCore.framework */,
+ 9335435F03D75502008635CE /* WebKit.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ A8B91AC40CF3B170008F91FF /* ObjCPlugin */ = {
+ isa = PBXGroup;
+ children = (
+ BCA18B760C9B08F100114369 /* ObjCPlugin.h */,
+ BCA18B770C9B08F100114369 /* ObjCPlugin.m */,
+ BCA18B780C9B08F100114369 /* ObjCPluginFunction.h */,
+ BCA18B790C9B08F100114369 /* ObjCPluginFunction.m */,
+ BCA18B250C9B015C00114369 /* WorkQueueItemMac.mm */,
+ );
+ name = ObjCPlugin;
+ sourceTree = "<group>";
+ };
+ A8B91AD20CF3B305008F91FF /* AppKit Overrides */ = {
+ isa = PBXGroup;
+ children = (
+ A8B91ADF0CF3B372008F91FF /* DumpRenderTreePasteboard.h */,
+ A8B91AD70CF3B32F008F91FF /* DumpRenderTreePasteboard.m */,
+ A8B91ADD0CF3B372008F91FF /* DumpRenderTreeWindow.h */,
+ A8B91AD90CF3B32F008F91FF /* DumpRenderTreeWindow.mm */,
+ );
+ name = "AppKit Overrides";
+ sourceTree = "<group>";
+ };
+ BCB281ED0CFA711D007E533E /* Configurations */ = {
+ isa = PBXGroup;
+ children = (
+ BCB281EE0CFA713D007E533E /* Base.xcconfig */,
+ BCB282F40CFA7450007E533E /* DebugRelease.xcconfig */,
+ BCB281F00CFA713D007E533E /* DumpRenderTree.xcconfig */,
+ BCB283D80CFA7AFD007E533E /* ImageDiff.xcconfig */,
+ BCB283DE0CFA7C20007E533E /* TestNetscapePlugIn.xcconfig */,
+ );
+ name = Configurations;
+ sourceTree = "<group>";
+ };
+ BCB284870CFA81ED007E533E /* PixelDump */ = {
+ isa = PBXGroup;
+ children = (
+ BCB284F30CFA84F2007E533E /* ImageDiffCG.cpp */,
+ BCB2848A0CFA820F007E533E /* PixelDumpSupport.h */,
+ BCB284880CFA8202007E533E /* PixelDumpSupportCG.cpp */,
+ BCB284890CFA8202007E533E /* PixelDumpSupportCG.h */,
+ BCB2848C0CFA8221007E533E /* PixelDumpSupportMac.mm */,
+ );
+ name = PixelDump;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ 141BF44E096A45DD00E0753C /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 141BF453096A45EB00E0753C /* PluginObject.h in Headers */,
+ 1A8F02E80BB9B4EC008CFA34 /* TestObject.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 9340994B08540CAE007F3BC8 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ BC0E24E00E2D9451001B6BC2 /* AccessibilityUIElement.h in Headers */,
+ BCA18B380C9B021900114369 /* AppleScriptController.h in Headers */,
+ A8B91BFF0CF522B4008F91FF /* CheckedMalloc.h in Headers */,
+ BCA18B7A0C9B08F100114369 /* DumpRenderTreeDraggingInfo.h in Headers */,
+ BCA18C0B0C9B59EF00114369 /* DumpRenderTreeMac.h in Headers */,
+ A8B91AE20CF3B372008F91FF /* DumpRenderTreePasteboard.h in Headers */,
+ 9340994C08540CAE007F3BC8 /* DumpRenderTreePrefix.h in Headers */,
+ A8B91AE00CF3B372008F91FF /* DumpRenderTreeWindow.h in Headers */,
+ BCA18B610C9B08C200114369 /* EditingDelegate.h in Headers */,
+ BCA18B6F0C9B08DB00114369 /* EventSendingController.h in Headers */,
+ BCA18B630C9B08C200114369 /* FrameLoadDelegate.h in Headers */,
+ 14770FE20A22ADF7009342EE /* GCController.h in Headers */,
+ BC47412A0D038A4C0072B006 /* JavaScriptThreading.h in Headers */,
+ BC0131DB0C9772010087317D /* LayoutTestController.h in Headers */,
+ BCA18B710C9B08DB00114369 /* NavigationController.h in Headers */,
+ BCA18B310C9B01B400114369 /* ObjCController.h in Headers */,
+ BCA18B7D0C9B08F100114369 /* ObjCPlugin.h in Headers */,
+ BCA18B7F0C9B08F100114369 /* ObjCPluginFunction.h in Headers */,
+ BCB284C70CFA83C4007E533E /* PixelDumpSupport.h in Headers */,
+ BCB284D00CFA83CC007E533E /* PixelDumpSupportCG.h in Headers */,
+ BCA18B650C9B08C200114369 /* PolicyDelegate.h in Headers */,
+ BCA18B670C9B08C200114369 /* ResourceLoadDelegate.h in Headers */,
+ BCA18B3C0C9B024900114369 /* TextInputController.h in Headers */,
+ BCA18B690C9B08C200114369 /* UIDelegate.h in Headers */,
+ BC9D90250C97472E0099A4A3 /* WorkQueue.h in Headers */,
+ BC9D90260C97472E0099A4A3 /* WorkQueueItem.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ B5A7525B08AF4A4A00138E45 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ 141BF21E096A441D00E0753C /* TestNetscapePlugIn */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 141BF221096A441E00E0753C /* Build configuration list for PBXNativeTarget "TestNetscapePlugIn" */;
+ buildPhases = (
+ 141BF21B096A441D00E0753C /* Resources */,
+ 141BF44E096A45DD00E0753C /* Headers */,
+ 141BF21C096A441D00E0753C /* Sources */,
+ 141BF21D096A441D00E0753C /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = TestNetscapePlugIn;
+ productName = TestNetscapePlugIn.plugin;
+ productReference = 141BF233096A44CF00E0753C /* TestNetscapePlugIn.plugin */;
+ productType = "com.apple.product-type.bundle";
+ };
+ 9340994A08540CAE007F3BC8 /* DumpRenderTree */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 149C29BF08902C6D008A9EFC /* Build configuration list for PBXNativeTarget "DumpRenderTree" */;
+ buildPhases = (
+ 9340994B08540CAE007F3BC8 /* Headers */,
+ 9340994D08540CAE007F3BC8 /* Sources */,
+ 9340994F08540CAE007F3BC8 /* Frameworks */,
+ 5DB9ACAA0F722C4400684641 /* Copy Font Files */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = DumpRenderTree;
+ productInstallPath = "$(HOME)/bin";
+ productName = DumpRenderTree;
+ productReference = 9340995408540CAF007F3BC8 /* DumpRenderTree */;
+ productType = "com.apple.product-type.tool";
+ };
+ B5A7525A08AF4A4A00138E45 /* ImageDiff */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = B5A7526408AF4A4A00138E45 /* Build configuration list for PBXNativeTarget "ImageDiff" */;
+ buildPhases = (
+ B5A7525B08AF4A4A00138E45 /* Headers */,
+ B5A7525D08AF4A4A00138E45 /* Sources */,
+ B5A7525F08AF4A4A00138E45 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = ImageDiff;
+ productInstallPath = "$(HOME)/bin";
+ productName = DumpRenderTree;
+ productReference = B5A7526708AF4A4A00138E45 /* ImageDiff */;
+ productType = "com.apple.product-type.tool";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 08FB7793FE84155DC02AAC07 /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = 149C29C308902C6D008A9EFC /* Build configuration list for PBXProject "DumpRenderTree" */;
+ compatibilityVersion = "Xcode 2.4";
+ hasScannedForEncodings = 1;
+ mainGroup = 08FB7794FE84155DC02AAC07 /* DumpRenderTree */;
+ productRefGroup = 9340995508540CAF007F3BC8 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ A84F608D08B1370600E9745F /* All */,
+ 9340994A08540CAE007F3BC8 /* DumpRenderTree */,
+ B5A7525A08AF4A4A00138E45 /* ImageDiff */,
+ 141BF21E096A441D00E0753C /* TestNetscapePlugIn */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 141BF21B096A441D00E0753C /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 141BF21C096A441D00E0753C /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 1AC6C84A0D07638600CD3161 /* PluginObject.cpp in Sources */,
+ 1AC6C84B0D07638600CD3161 /* TestObject.cpp in Sources */,
+ 1AC6C8490D07638600CD3161 /* main.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 9340994D08540CAE007F3BC8 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ BCD08B3A0E1057EF00A7D0C1 /* AccessibilityController.cpp in Sources */,
+ BCD08B710E1059D200A7D0C1 /* AccessibilityControllerMac.mm in Sources */,
+ BC0E24E10E2D9451001B6BC2 /* AccessibilityUIElement.cpp in Sources */,
+ BC0E26150E2DA4C6001B6BC2 /* AccessibilityUIElementMac.mm in Sources */,
+ BCA18B390C9B021900114369 /* AppleScriptController.m in Sources */,
+ A8B91BFD0CF522B4008F91FF /* CheckedMalloc.cpp in Sources */,
+ BCA18C470C9B5B9400114369 /* DumpRenderTree.mm in Sources */,
+ BCA18B7B0C9B08F100114369 /* DumpRenderTreeDraggingInfo.mm in Sources */,
+ A8B91ADA0CF3B32F008F91FF /* DumpRenderTreePasteboard.m in Sources */,
+ A8B91ADC0CF3B32F008F91FF /* DumpRenderTreeWindow.mm in Sources */,
+ BCA18B620C9B08C200114369 /* EditingDelegate.mm in Sources */,
+ BCA18B700C9B08DB00114369 /* EventSendingController.mm in Sources */,
+ BCA18B640C9B08C200114369 /* FrameLoadDelegate.mm in Sources */,
+ BCF6C6500C98E9C000AC063E /* GCController.cpp in Sources */,
+ BCA18B230C9B014B00114369 /* GCControllerMac.mm in Sources */,
+ BC4741410D038A570072B006 /* JavaScriptThreadingPthreads.cpp in Sources */,
+ BC0131DA0C9772010087317D /* LayoutTestController.cpp in Sources */,
+ BCA18B240C9B014B00114369 /* LayoutTestControllerMac.mm in Sources */,
+ BCA18B720C9B08DB00114369 /* NavigationController.m in Sources */,
+ BCA18B320C9B01B400114369 /* ObjCController.m in Sources */,
+ BCA18B7E0C9B08F100114369 /* ObjCPlugin.m in Sources */,
+ BCA18B800C9B08F100114369 /* ObjCPluginFunction.m in Sources */,
+ BCB284CD0CFA83C8007E533E /* PixelDumpSupportCG.cpp in Sources */,
+ BCB284D60CFA83D1007E533E /* PixelDumpSupportMac.mm in Sources */,
+ BCA18B660C9B08C200114369 /* PolicyDelegate.mm in Sources */,
+ BCA18B680C9B08C200114369 /* ResourceLoadDelegate.mm in Sources */,
+ BCA18B490C9B02C400114369 /* TextInputController.m in Sources */,
+ BCA18B6A0C9B08C200114369 /* UIDelegate.mm in Sources */,
+ BC9D90240C97472E0099A4A3 /* WorkQueue.cpp in Sources */,
+ BCA18B260C9B015C00114369 /* WorkQueueItemMac.mm in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ B5A7525D08AF4A4A00138E45 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ BCB284F60CFA84F8007E533E /* ImageDiffCG.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 141BF238096A451E00E0753C /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 141BF21E096A441D00E0753C /* TestNetscapePlugIn */;
+ targetProxy = 141BF237096A451E00E0753C /* PBXContainerItemProxy */;
+ };
+ A84F608F08B1370E00E9745F /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = B5A7525A08AF4A4A00138E45 /* ImageDiff */;
+ targetProxy = A84F608E08B1370E00E9745F /* PBXContainerItemProxy */;
+ };
+ A84F609108B1370E00E9745F /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 9340994A08540CAE007F3BC8 /* DumpRenderTree */;
+ targetProxy = A84F609008B1370E00E9745F /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+ 141BF222096A441E00E0753C /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = BCB283DE0CFA7C20007E533E /* TestNetscapePlugIn.xcconfig */;
+ buildSettings = {
+ };
+ name = Debug;
+ };
+ 141BF223096A441E00E0753C /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = BCB283DE0CFA7C20007E533E /* TestNetscapePlugIn.xcconfig */;
+ buildSettings = {
+ };
+ name = Release;
+ };
+ 149C29C008902C6D008A9EFC /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = BCB281F00CFA713D007E533E /* DumpRenderTree.xcconfig */;
+ buildSettings = {
+ };
+ name = Debug;
+ };
+ 149C29C108902C6D008A9EFC /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = BCB281F00CFA713D007E533E /* DumpRenderTree.xcconfig */;
+ buildSettings = {
+ };
+ name = Release;
+ };
+ 149C29C408902C6D008A9EFC /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = BCB282F40CFA7450007E533E /* DebugRelease.xcconfig */;
+ buildSettings = {
+ GCC_OPTIMIZATION_LEVEL = 0;
+ };
+ name = Debug;
+ };
+ 149C29C508902C6D008A9EFC /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = BCB282F40CFA7450007E533E /* DebugRelease.xcconfig */;
+ buildSettings = {
+ };
+ name = Release;
+ };
+ 90CBC3500F748B1300A712B7 /* Production */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = BCB281EE0CFA713D007E533E /* Base.xcconfig */;
+ buildSettings = {
+ WEBKIT_FRAMEWORK_RESOURCES_PATH = WebKit.framework/Versions/A/Resources;
+ };
+ name = Production;
+ };
+ 90CBC3510F748B1300A712B7 /* Production */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Frameworks/$(WEBKIT_FRAMEWORK_RESOURCES_PATH)";
+ PRODUCT_NAME = All;
+ };
+ name = Production;
+ };
+ 90CBC3520F748B1300A712B7 /* Production */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = BCB281F00CFA713D007E533E /* DumpRenderTree.xcconfig */;
+ buildSettings = {
+ INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Frameworks/$(WEBKIT_FRAMEWORK_RESOURCES_PATH)";
+ SKIP_INSTALL = NO;
+ };
+ name = Production;
+ };
+ 90CBC3530F748B1300A712B7 /* Production */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = BCB283D80CFA7AFD007E533E /* ImageDiff.xcconfig */;
+ buildSettings = {
+ INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Frameworks/$(WEBKIT_FRAMEWORK_RESOURCES_PATH)";
+ SKIP_INSTALL = NO;
+ };
+ name = Production;
+ };
+ 90CBC3540F748B1300A712B7 /* Production */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = BCB283DE0CFA7C20007E533E /* TestNetscapePlugIn.xcconfig */;
+ buildSettings = {
+ INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Frameworks/$(WEBKIT_FRAMEWORK_RESOURCES_PATH)";
+ SKIP_INSTALL = NO;
+ };
+ name = Production;
+ };
+ A84F609308B1371400E9745F /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OTHER_CFLAGS = "";
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = All;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Debug;
+ };
+ A84F609408B1371400E9745F /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ OTHER_CFLAGS = "";
+ OTHER_REZFLAGS = "";
+ PRODUCT_NAME = All;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ };
+ name = Release;
+ };
+ B5A7526508AF4A4A00138E45 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = BCB283D80CFA7AFD007E533E /* ImageDiff.xcconfig */;
+ buildSettings = {
+ };
+ name = Debug;
+ };
+ B5A7526608AF4A4A00138E45 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = BCB283D80CFA7AFD007E533E /* ImageDiff.xcconfig */;
+ buildSettings = {
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 141BF221096A441E00E0753C /* Build configuration list for PBXNativeTarget "TestNetscapePlugIn" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 141BF222096A441E00E0753C /* Debug */,
+ 141BF223096A441E00E0753C /* Release */,
+ 90CBC3540F748B1300A712B7 /* Production */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Production;
+ };
+ 149C29BF08902C6D008A9EFC /* Build configuration list for PBXNativeTarget "DumpRenderTree" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 149C29C008902C6D008A9EFC /* Debug */,
+ 149C29C108902C6D008A9EFC /* Release */,
+ 90CBC3520F748B1300A712B7 /* Production */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Production;
+ };
+ 149C29C308902C6D008A9EFC /* Build configuration list for PBXProject "DumpRenderTree" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 149C29C408902C6D008A9EFC /* Debug */,
+ 149C29C508902C6D008A9EFC /* Release */,
+ 90CBC3500F748B1300A712B7 /* Production */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Production;
+ };
+ A84F609208B1371400E9745F /* Build configuration list for PBXAggregateTarget "All" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ A84F609308B1371400E9745F /* Debug */,
+ A84F609408B1371400E9745F /* Release */,
+ 90CBC3510F748B1300A712B7 /* Production */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Production;
+ };
+ B5A7526408AF4A4A00138E45 /* Build configuration list for PBXNativeTarget "ImageDiff" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ B5A7526508AF4A4A00138E45 /* Debug */,
+ B5A7526608AF4A4A00138E45 /* Release */,
+ 90CBC3530F748B1300A712B7 /* Production */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Production;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
+}
diff --git a/WebKitTools/DumpRenderTree/DumpRenderTreePrefix.h b/WebKitTools/DumpRenderTree/DumpRenderTreePrefix.h
new file mode 100644
index 0000000..1344754
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/DumpRenderTreePrefix.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2005 Apple Computer, 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef __OBJC__
+
+#import <Foundation/Foundation.h>
+
+#endif
+
+// If we don't define these, they get defined in windef.h.
+// We want to use std::min and std::max
+#define max max
+#define min min
diff --git a/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/ASCIICType.h b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/ASCIICType.h
new file mode 100644
index 0000000..f2258d2
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/ASCIICType.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/ASCIICType.h>
diff --git a/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Assertions.h b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Assertions.h
new file mode 100644
index 0000000..2144410
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Assertions.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/Assertions.h>
diff --git a/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/HashMap.h b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/HashMap.h
new file mode 100644
index 0000000..9f262e2
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/HashMap.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/HashMap.h>
diff --git a/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/HashSet.h b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/HashSet.h
new file mode 100644
index 0000000..cfe2d80
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/HashSet.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/HashSet.h>
diff --git a/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/HashTraits.h b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/HashTraits.h
new file mode 100755
index 0000000..412fa98
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/HashTraits.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/HashTraits.h>
diff --git a/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Locker.h b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Locker.h
new file mode 100644
index 0000000..75b0acd
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Locker.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/Locker.h>
diff --git a/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/MathExtras.h b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/MathExtras.h
new file mode 100644
index 0000000..2955786
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/MathExtras.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/MathExtras.h>
diff --git a/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Noncopyable.h b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Noncopyable.h
new file mode 100644
index 0000000..f8484d2
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Noncopyable.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/Noncopyable.h>
diff --git a/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/OwnPtr.h b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/OwnPtr.h
new file mode 100644
index 0000000..9211d38
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/OwnPtr.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/OwnPtr.h>
diff --git a/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/PassRefPtr.h b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/PassRefPtr.h
new file mode 100644
index 0000000..aafd1a2
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/PassRefPtr.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/PassRefPtr.h>
diff --git a/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Platform.h b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Platform.h
new file mode 100644
index 0000000..3b22955
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Platform.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/Platform.h>
diff --git a/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/RefCounted.h b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/RefCounted.h
new file mode 100644
index 0000000..628a63b
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/RefCounted.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/RefCounted.h>
diff --git a/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/RefPtr.h b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/RefPtr.h
new file mode 100644
index 0000000..0ff6213
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/RefPtr.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/RefPtr.h>
diff --git a/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/RetainPtr.h b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/RetainPtr.h
new file mode 100644
index 0000000..65fc27b
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/RetainPtr.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/RetainPtr.h>
diff --git a/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/StringExtras.h b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/StringExtras.h
new file mode 100644
index 0000000..063d500
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/StringExtras.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/StringExtras.h>
diff --git a/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Threading.h b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Threading.h
new file mode 100644
index 0000000..17359e5
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Threading.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/Threading.h>
diff --git a/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Vector.h b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Vector.h
new file mode 100644
index 0000000..c6d15fd
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/ForwardingHeaders/wtf/Vector.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/Vector.h>
diff --git a/WebKitTools/DumpRenderTree/GCController.cpp b/WebKitTools/DumpRenderTree/GCController.cpp
new file mode 100644
index 0000000..e1a16f2
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/GCController.cpp
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "GCController.h"
+
+#include <JavaScriptCore/JSObjectRef.h>
+#include <JavaScriptCore/JSRetainPtr.h>
+
+GCController::GCController()
+{
+}
+
+GCController::~GCController()
+{
+}
+
+// Static Functions
+
+static JSValueRef collectCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ GCController* controller = reinterpret_cast<GCController*>(JSObjectGetPrivate(thisObject));
+ controller->collect();
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef collectOnAlternateThreadCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ bool waitUntilDone = false;
+ if (argumentCount > 0)
+ waitUntilDone = JSValueToBoolean(context, arguments[0]);
+
+ GCController* controller = reinterpret_cast<GCController*>(JSObjectGetPrivate(thisObject));
+ controller->collectOnAlternateThread(waitUntilDone);
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef getJSObjectCountCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ GCController* controller = reinterpret_cast<GCController*>(JSObjectGetPrivate(thisObject));
+ size_t jsObjectCount = controller->getJSObjectCount();
+
+ return JSValueMakeNumber(context, jsObjectCount);
+}
+
+// Object Creation
+
+void GCController::makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> gcControllerStr(Adopt, JSStringCreateWithUTF8CString("GCController"));
+ JSValueRef gcControllerObject = JSObjectMake(context, getJSClass(), this);
+ JSObjectSetProperty(context, windowObject, gcControllerStr.get(), gcControllerObject, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, exception);
+}
+
+JSClassRef GCController::getJSClass()
+{
+ static JSClassRef gcControllerClass = 0;
+
+ if (!gcControllerClass) {
+ JSStaticFunction* staticFunctions = GCController::staticFunctions();
+ JSClassDefinition classDefinition = {
+ 0, kJSClassAttributeNone, "GCController", 0, 0, staticFunctions,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ };
+
+ gcControllerClass = JSClassCreate(&classDefinition);
+ }
+
+ return gcControllerClass;
+}
+
+JSStaticFunction* GCController::staticFunctions()
+{
+ static JSStaticFunction staticFunctions[] = {
+ { "collect", collectCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "collectOnAlternateThread", collectOnAlternateThreadCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "getJSObjectCount", getJSObjectCountCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { 0, 0, 0 }
+ };
+
+ return staticFunctions;
+}
diff --git a/WebKitTools/DumpRenderTree/GCController.h b/WebKitTools/DumpRenderTree/GCController.h
new file mode 100644
index 0000000..4284275
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/GCController.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2006 Apple Computer, 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef GCController_h
+#define GCController_h
+
+#include <JavaScriptCore/JSObjectRef.h>
+
+class GCController {
+public:
+ GCController();
+ ~GCController();
+
+ void makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception);
+
+ // Controller Methods - platfrom independant implementations
+ void collect() const;
+ void collectOnAlternateThread(bool waitUntilDone) const;
+ size_t getJSObjectCount() const;
+
+private:
+ static JSClassRef getJSClass();
+ static JSStaticFunction* staticFunctions();
+};
+
+#endif // GCController_h
diff --git a/WebKitTools/DumpRenderTree/JavaScriptThreading.h b/WebKitTools/DumpRenderTree/JavaScriptThreading.h
new file mode 100644
index 0000000..43795a1
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/JavaScriptThreading.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved.
+ * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
+ * (C) 2007 Eric Seidel <eric@webkit.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef JavaScriptThreading_h
+#define JavaScriptThreading_h
+
+/* These functions start/stop threads used to abuse the JavaScript interpreter
+ and assure that our JS implementation remains threadsafe */
+
+void startJavaScriptThreads();
+void stopJavaScriptThreads();
+
+#endif // JavaScriptThreading_h
diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/LayoutTestController.cpp
new file mode 100644
index 0000000..a78d115
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/LayoutTestController.cpp
@@ -0,0 +1,874 @@
+/*
+ * Copyright (C) 2007, 2008, 2009 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "LayoutTestController.h"
+
+#include <JavaScriptCore/JSObjectRef.h>
+#include <JavaScriptCore/JSRetainPtr.h>
+#include <wtf/Assertions.h>
+#include <wtf/MathExtras.h>
+
+LayoutTestController::LayoutTestController(const std::string& testPathOrURL, const std::string& expectedPixelHash)
+ : m_dumpAsText(false)
+ , m_dumpAsPDF(false)
+ , m_dumpBackForwardList(false)
+ , m_dumpChildFrameScrollPositions(false)
+ , m_dumpChildFramesAsText(false)
+ , m_dumpDatabaseCallbacks(false)
+ , m_dumpDOMAsWebArchive(false)
+ , m_dumpSelectionRect(false)
+ , m_dumpSourceAsWebArchive(false)
+ , m_dumpStatusCallbacks(false)
+ , m_dumpTitleChanges(false)
+ , m_dumpEditingCallbacks(false)
+ , m_dumpResourceLoadCallbacks(false)
+ , m_dumpFrameLoadCallbacks(false)
+ , m_addFileToPasteboardOnDrag(false)
+ , m_callCloseOnWebViews(true)
+ , m_canOpenWindows(false)
+ , m_closeRemainingWindowsWhenComplete(true)
+ , m_stopProvisionalFrameLoads(false)
+ , m_testOnscreen(false)
+ , m_testRepaint(false)
+ , m_testRepaintSweepHorizontally(false)
+ , m_waitToDump(false)
+ , m_windowIsKey(true)
+ , m_globalFlag(false)
+ , m_testPathOrURL(testPathOrURL)
+ , m_expectedPixelHash(expectedPixelHash)
+{
+}
+
+// Static Functions
+
+static JSValueRef dumpAsTextCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setDumpAsText(true);
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef dumpAsPDFCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setDumpAsPDF(true);
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef dumpBackForwardListCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setDumpBackForwardList(true);
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef dumpChildFramesAsTextCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setDumpChildFramesAsText(true);
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef dumpChildFrameScrollPositionsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setDumpChildFrameScrollPositions(true);
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef dumpDatabaseCallbacksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setDumpDatabaseCallbacks(true);
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef dumpDOMAsWebArchiveCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setDumpDOMAsWebArchive(true);
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef dumpEditingCallbacksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setDumpEditingCallbacks(true);
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef dumpResourceLoadCallbacksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setDumpResourceLoadCallbacks(true);
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef dumpSelectionRectCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setDumpSelectionRect(true);
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef dumpSourceAsWebArchiveCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setDumpSourceAsWebArchive(true);
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef dumpStatusCallbacksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setDumpStatusCallbacks(true);
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef dumpTitleChangesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setDumpTitleChanges(true);
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef pathToLocalResourceCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ JSRetainPtr<JSStringRef> localPath(Adopt, JSValueToStringCopy(context, arguments[0], exception));
+ ASSERT(!*exception);
+
+ JSRetainPtr<JSStringRef> convertedPath(Adopt, controller->pathToLocalResource(context, localPath.get()));
+ if (!convertedPath)
+ return JSValueMakeUndefined(context);
+
+ return JSValueMakeString(context, convertedPath.get());
+}
+
+static JSValueRef repaintSweepHorizontallyCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setTestRepaintSweepHorizontally(true);
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef setCallCloseOnWebViewsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setCallCloseOnWebViews(JSValueToBoolean(context, arguments[0]));
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef setCanOpenWindowsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setCanOpenWindows(true);
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef setCloseRemainingWindowsWhenCompleteCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setCloseRemainingWindowsWhenComplete(JSValueToBoolean(context, arguments[0]));
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef testOnscreenCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setTestOnscreen(true);
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef testRepaintCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setTestRepaint(true);
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef addFileToPasteboardOnDragCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setAddFileToPasteboardOnDrag(true);
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef addDisallowedURLCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac implementation
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ JSRetainPtr<JSStringRef> url(Adopt, JSValueToStringCopy(context, arguments[0], exception));
+ ASSERT(!*exception);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->addDisallowedURL(url.get());
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef clearAllDatabasesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac & windows implementation
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->clearAllDatabases();
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef clearBackForwardListCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac & windows implementation
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->clearBackForwardList();
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef clearPersistentUserStyleSheetCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac & windows implementation
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->clearPersistentUserStyleSheet();
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef decodeHostNameCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac implementation
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ JSRetainPtr<JSStringRef> name(Adopt, JSValueToStringCopy(context, arguments[0], exception));
+ ASSERT(!*exception);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ JSRetainPtr<JSStringRef> decodedHostName(Adopt, controller->copyDecodedHostName(name.get()));
+ return JSValueMakeString(context, decodedHostName.get());
+}
+
+static JSValueRef displayCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac & windows implementation
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->display();
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef encodeHostNameCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac implementation
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ JSRetainPtr<JSStringRef> name(Adopt, JSValueToStringCopy(context, arguments[0], exception));
+ ASSERT(!*exception);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ JSRetainPtr<JSStringRef> encodedHostName(Adopt, controller->copyEncodedHostName(name.get()));
+ return JSValueMakeString(context, encodedHostName.get());
+}
+
+static JSValueRef execCommandCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has Mac & Windows implementations.
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ JSRetainPtr<JSStringRef> name(Adopt, JSValueToStringCopy(context, arguments[0], exception));
+ ASSERT(!*exception);
+
+ // Ignoring the second parameter (userInterface), as this command emulates a manual action.
+
+ JSRetainPtr<JSStringRef> value;
+ if (argumentCount >= 3) {
+ value.adopt(JSValueToStringCopy(context, arguments[2], exception));
+ ASSERT(!*exception);
+ } else
+ value.adopt(JSStringCreateWithUTF8CString(""));
+
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->execCommand(name.get(), value.get());
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef isCommandEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has Mac implementation.
+
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ JSRetainPtr<JSStringRef> name(Adopt, JSValueToStringCopy(context, arguments[0], exception));
+ ASSERT(!*exception);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+
+ return JSValueMakeBoolean(context, controller->isCommandEnabled(name.get()));
+}
+
+static JSValueRef keepWebHistoryCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac implementation
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->keepWebHistory();
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef notifyDoneCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac & windows implementation
+ // May be able to be made platform independant by using shared WorkQueue
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->notifyDone();
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef queueBackNavigationCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac & windows implementation
+ // May be able to be made platform independant by using shared WorkQueue
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ double howFarBackDouble = JSValueToNumber(context, arguments[0], exception);
+ ASSERT(!*exception);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->queueBackNavigation(static_cast<int>(howFarBackDouble));
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef queueForwardNavigationCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac & windows implementation
+ // May be able to be made platform independant by using shared WorkQueue
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ double howFarForwardDouble = JSValueToNumber(context, arguments[0], exception);
+ ASSERT(!*exception);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->queueForwardNavigation(static_cast<int>(howFarForwardDouble));
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef queueLoadCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac & windows implementation
+ // May be able to be made platform independant by using shared WorkQueue
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ JSRetainPtr<JSStringRef> url(Adopt, JSValueToStringCopy(context, arguments[0], exception));
+ ASSERT(!*exception);
+
+ JSRetainPtr<JSStringRef> target;
+ if (argumentCount >= 2) {
+ target.adopt(JSValueToStringCopy(context, arguments[1], exception));
+ ASSERT(!*exception);
+ } else
+ target.adopt(JSStringCreateWithUTF8CString(""));
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->queueLoad(url.get(), target.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
+ // May be able to be made platform independant by using shared WorkQueue
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->queueReload();
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef queueScriptCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac & windows implementation
+ // May be able to be made platform independant by using shared WorkQueue
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ JSRetainPtr<JSStringRef> script(Adopt, JSValueToStringCopy(context, arguments[0], exception));
+ ASSERT(!*exception);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->queueScript(script.get());
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef setAcceptsEditingCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac & windows implementation
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setAcceptsEditing(JSValueToBoolean(context, arguments[0]));
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef setAuthorAndUserStylesEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac & windows implementation
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setAuthorAndUserStylesEnabled(JSValueToBoolean(context, arguments[0]));
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef setCustomPolicyDelegateCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac implementation
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ bool permissive = false;
+ if (argumentCount >= 2)
+ permissive = JSValueToBoolean(context, arguments[1]);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setCustomPolicyDelegate(JSValueToBoolean(context, arguments[0]), permissive);
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef setDatabaseQuotaCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac implementation
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+
+ double quota = JSValueToNumber(context, arguments[0], NULL);
+ if (!isnan(quota))
+ controller->setDatabaseQuota(static_cast<unsigned long long>(quota));
+
+ return JSValueMakeUndefined(context);
+
+}
+
+static JSValueRef setIconDatabaseEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac & windows implementation
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setIconDatabaseEnabled(JSValueToBoolean(context, arguments[0]));
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef setJavaScriptProfilingEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setJavaScriptProfilingEnabled(JSValueToBoolean(context, arguments[0]));
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef setMainFrameIsFirstResponderCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac implementation
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setMainFrameIsFirstResponder(JSValueToBoolean(context, arguments[0]));
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef setPersistentUserStyleSheetLocationCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac implementation
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ JSRetainPtr<JSStringRef> path(Adopt, JSValueToStringCopy(context, arguments[0], exception));
+ ASSERT(!*exception);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setPersistentUserStyleSheetLocation(path.get());
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef setPrivateBrowsingEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac & windows implementation
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setPrivateBrowsingEnabled(JSValueToBoolean(context, arguments[0]));
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef setTabKeyCyclesThroughElementsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac & windows implementation
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setTabKeyCyclesThroughElements(JSValueToBoolean(context, arguments[0]));
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef setUseDashboardCompatibilityModeCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac implementation
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setUseDashboardCompatibilityMode(JSValueToBoolean(context, arguments[0]));
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef setUserStyleSheetEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac implementation
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setUserStyleSheetEnabled(JSValueToBoolean(context, arguments[0]));
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef setUserStyleSheetLocationCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac implementation
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ JSRetainPtr<JSStringRef> path(Adopt, JSValueToStringCopy(context, arguments[0], exception));
+ ASSERT(!*exception);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setUserStyleSheetLocation(path.get());
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef setWindowIsKeyCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac implementation
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setWindowIsKey(JSValueToBoolean(context, arguments[0]));
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef waitUntilDoneCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac & windows implementation
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setWaitToDump(true);
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef windowCountCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac implementation
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ int windows = controller->windowCount();
+ return JSValueMakeNumber(context, windows);
+}
+
+static JSValueRef setPopupBlockingEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac & windows implementation
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setPopupBlockingEnabled(JSValueToBoolean(context, arguments[0]));
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef setSmartInsertDeleteEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setSmartInsertDeleteEnabled(JSValueToBoolean(context, arguments[0]));
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef setSelectTrailingWhitespaceEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setSelectTrailingWhitespaceEnabled(JSValueToBoolean(context, arguments[0]));
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef setStopProvisionalFrameLoadsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setStopProvisionalFrameLoads(true);
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef elementDoesAutoCompleteForElementWithIdCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ JSRetainPtr<JSStringRef> elementId(Adopt, JSValueToStringCopy(context, arguments[0], exception));
+ ASSERT(!*exception);
+
+ bool autoCompletes = controller->elementDoesAutoCompleteForElementWithId(elementId.get());
+
+ return JSValueMakeBoolean(context, autoCompletes);
+}
+
+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 = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ return JSValueMakeBoolean(context, controller->pauseAnimationAtTimeOnElementWithId(animationName.get(), time, elementId.get()));
+}
+
+static JSValueRef pauseTransitionAtTimeOnElementWithIdCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ if (argumentCount != 3)
+ return JSValueMakeUndefined(context);
+
+ JSRetainPtr<JSStringRef> propertyName(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 = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ return JSValueMakeBoolean(context, controller->pauseTransitionAtTimeOnElementWithId(propertyName.get(), time, elementId.get()));
+}
+
+static JSValueRef numberOfActiveAnimationsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ if (argumentCount != 0)
+ return JSValueMakeUndefined(context);
+
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ return JSValueMakeNumber(context, controller->numberOfActiveAnimations());
+}
+
+// Static Values
+
+static JSValueRef getGlobalFlagCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ return JSValueMakeBoolean(context, controller->globalFlag());
+}
+
+static JSValueRef getWebHistoryItemCountCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ return JSValueMakeNumber(context, controller->webHistoryItemCount());
+}
+
+static bool setGlobalFlagCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setGlobalFlag(JSValueToBoolean(context, value));
+ return true;
+}
+
+static void layoutTestControllerObjectFinalize(JSObjectRef object)
+{
+ LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(object));
+ controller->deref();
+}
+
+// Object Creation
+
+void LayoutTestController::makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> layoutTestContollerStr(Adopt, JSStringCreateWithUTF8CString("layoutTestController"));
+ ref();
+ JSValueRef layoutTestContollerObject = JSObjectMake(context, getJSClass(), this);
+ JSObjectSetProperty(context, windowObject, layoutTestContollerStr.get(), layoutTestContollerObject, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, exception);
+}
+
+JSClassRef LayoutTestController::getJSClass()
+{
+ static JSClassRef layoutTestControllerClass;
+
+ if (!layoutTestControllerClass) {
+ JSStaticValue* staticValues = LayoutTestController::staticValues();
+ JSStaticFunction* staticFunctions = LayoutTestController::staticFunctions();
+ JSClassDefinition classDefinition = {
+ 0, kJSClassAttributeNone, "LayoutTestController", 0, staticValues, staticFunctions,
+ 0, layoutTestControllerObjectFinalize, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ };
+
+ layoutTestControllerClass = JSClassCreate(&classDefinition);
+ }
+
+ return layoutTestControllerClass;
+}
+
+JSStaticValue* LayoutTestController::staticValues()
+{
+ static JSStaticValue staticValues[] = {
+ { "globalFlag", getGlobalFlagCallback, setGlobalFlagCallback, kJSPropertyAttributeNone },
+ { "webHistoryItemCount", getWebHistoryItemCountCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { 0, 0, 0, 0 }
+ };
+ return staticValues;
+
+}
+
+JSStaticFunction* LayoutTestController::staticFunctions()
+{
+ static JSStaticFunction staticFunctions[] = {
+ { "addDisallowedURL", addDisallowedURLCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "addFileToPasteboardOnDrag", addFileToPasteboardOnDragCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "clearAllDatabases", clearAllDatabasesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "clearBackForwardList", clearBackForwardListCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "clearPersistentUserStyleSheet", clearPersistentUserStyleSheetCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "decodeHostName", decodeHostNameCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "display", displayCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "dumpAsText", dumpAsTextCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "printToPDF", dumpAsPDFCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "dumpBackForwardList", dumpBackForwardListCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "dumpChildFramesAsText", dumpChildFramesAsTextCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "dumpChildFrameScrollPositions", dumpChildFrameScrollPositionsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "dumpDatabaseCallbacks", dumpDatabaseCallbacksCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "dumpDOMAsWebArchive", dumpDOMAsWebArchiveCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "dumpEditingCallbacks", dumpEditingCallbacksCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "dumpResourceLoadCallbacks", dumpResourceLoadCallbacksCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "dumpSelectionRect", dumpSelectionRectCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "dumpSourceAsWebArchive", dumpSourceAsWebArchiveCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "dumpStatusCallbacks", dumpStatusCallbacksCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "dumpTitleChanges", dumpTitleChangesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "encodeHostName", encodeHostNameCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "execCommand", execCommandCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "isCommandEnabled", isCommandEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "keepWebHistory", keepWebHistoryCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "notifyDone", notifyDoneCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "pathToLocalResource", pathToLocalResourceCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "queueBackNavigation", queueBackNavigationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "queueForwardNavigation", queueForwardNavigationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "queueLoad", queueLoadCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "queueReload", queueReloadCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "queueScript", queueScriptCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "repaintSweepHorizontally", repaintSweepHorizontallyCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setAcceptsEditing", setAcceptsEditingCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setAuthorAndUserStylesEnabled", setAuthorAndUserStylesEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setCallCloseOnWebViews", setCallCloseOnWebViewsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setCanOpenWindows", setCanOpenWindowsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setCloseRemainingWindowsWhenComplete", setCloseRemainingWindowsWhenCompleteCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setCustomPolicyDelegate", setCustomPolicyDelegateCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setDatabaseQuota", setDatabaseQuotaCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setIconDatabaseEnabled", setIconDatabaseEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setJavaScriptProfilingEnabled", setJavaScriptProfilingEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setMainFrameIsFirstResponder", setMainFrameIsFirstResponderCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setPersistentUserStyleSheetLocation", setPersistentUserStyleSheetLocationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setPrivateBrowsingEnabled", setPrivateBrowsingEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setPopupBlockingEnabled", setPopupBlockingEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setSmartInsertDeleteEnabled", setSmartInsertDeleteEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setSelectTrailingWhitespaceEnabled", setSelectTrailingWhitespaceEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setStopProvisionalFrameLoads", setStopProvisionalFrameLoadsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setTabKeyCyclesThroughElements", setTabKeyCyclesThroughElementsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setUseDashboardCompatibilityMode", setUseDashboardCompatibilityModeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setUserStyleSheetEnabled", setUserStyleSheetEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setUserStyleSheetLocation", setUserStyleSheetLocationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setWindowIsKey", setWindowIsKeyCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "testOnscreen", testOnscreenCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "testRepaint", testRepaintCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "waitUntilDone", waitUntilDoneCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "windowCount", windowCountCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "elementDoesAutoCompleteForElementWithId", elementDoesAutoCompleteForElementWithIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "pauseAnimationAtTimeOnElementWithId", pauseAnimationAtTimeOnElementWithIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "pauseTransitionAtTimeOnElementWithId", pauseTransitionAtTimeOnElementWithIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "numberOfActiveAnimations", numberOfActiveAnimationsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { 0, 0, 0 }
+ };
+
+ return staticFunctions;
+}
diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.h b/WebKitTools/DumpRenderTree/LayoutTestController.h
new file mode 100644
index 0000000..2de7f72
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/LayoutTestController.h
@@ -0,0 +1,199 @@
+/*
+ * Copyright (C) 2007, 2008, 2009 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef LayoutTestController_h
+#define LayoutTestController_h
+
+#include <JavaScriptCore/JSObjectRef.h>
+#include <wtf/RefCounted.h>
+#include <string>
+
+class LayoutTestController : public RefCounted<LayoutTestController> {
+public:
+ LayoutTestController(const std::string& testPathOrURL, const std::string& expectedPixelHash);
+ ~LayoutTestController();
+
+ void makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception);
+
+ void addDisallowedURL(JSStringRef url);
+ void clearAllDatabases();
+ void clearBackForwardList();
+ JSStringRef copyDecodedHostName(JSStringRef name);
+ JSStringRef copyEncodedHostName(JSStringRef name);
+ void execCommand(JSStringRef name, JSStringRef value);
+ void display();
+ bool isCommandEnabled(JSStringRef name);
+ void keepWebHistory();
+ size_t webHistoryItemCount();
+ void notifyDone();
+ JSStringRef pathToLocalResource(JSContextRef, JSStringRef url);
+ void queueBackNavigation(int howFarBackward);
+ void queueForwardNavigation(int howFarForward);
+ void queueLoad(JSStringRef url, JSStringRef target);
+ void queueReload();
+ void queueScript(JSStringRef url);
+ void setAcceptsEditing(bool acceptsEditing);
+ void setAuthorAndUserStylesEnabled(bool);
+ void setCustomPolicyDelegate(bool setDelegate, bool permissive);
+ void setDatabaseQuota(unsigned long long quota);
+ void setIconDatabaseEnabled(bool iconDatabaseEnabled);
+ void setJavaScriptProfilingEnabled(bool profilingEnabled);
+ void setMainFrameIsFirstResponder(bool flag);
+ void setPrivateBrowsingEnabled(bool flag);
+ void setPopupBlockingEnabled(bool flag);
+ void setTabKeyCyclesThroughElements(bool cycles);
+ void setSmartInsertDeleteEnabled(bool flag);
+ void setSelectTrailingWhitespaceEnabled(bool flag);
+ void setUseDashboardCompatibilityMode(bool flag);
+ void setUserStyleSheetEnabled(bool flag);
+ void setUserStyleSheetLocation(JSStringRef path);
+ void setPersistentUserStyleSheetLocation(JSStringRef path);
+ void clearPersistentUserStyleSheet();
+ int windowCount();
+
+ bool elementDoesAutoCompleteForElementWithId(JSStringRef id);
+
+ bool dumpAsText() const { return m_dumpAsText; }
+ void setDumpAsText(bool dumpAsText) { m_dumpAsText = dumpAsText; }
+
+ bool dumpAsPDF() const { return m_dumpAsPDF; }
+ void setDumpAsPDF(bool dumpAsPDF) { m_dumpAsPDF = dumpAsPDF; }
+
+ bool dumpBackForwardList() const { return m_dumpBackForwardList; }
+ void setDumpBackForwardList(bool dumpBackForwardList) { m_dumpBackForwardList = dumpBackForwardList; }
+
+ bool dumpChildFrameScrollPositions() const { return m_dumpChildFrameScrollPositions; }
+ void setDumpChildFrameScrollPositions(bool dumpChildFrameScrollPositions) { m_dumpChildFrameScrollPositions = dumpChildFrameScrollPositions; }
+
+ bool dumpChildFramesAsText() const { return m_dumpChildFramesAsText; }
+ void setDumpChildFramesAsText(bool dumpChildFramesAsText) { m_dumpChildFramesAsText = dumpChildFramesAsText; }
+
+ bool dumpDatabaseCallbacks() const { return m_dumpDatabaseCallbacks; }
+ void setDumpDatabaseCallbacks(bool dumpDatabaseCallbacks) { m_dumpDatabaseCallbacks = dumpDatabaseCallbacks; }
+
+ bool dumpStatusCallbacks() const { return m_dumpStatusCallbacks; }
+ void setDumpStatusCallbacks(bool dumpStatusCallbacks) { m_dumpStatusCallbacks = dumpStatusCallbacks; }
+
+ bool dumpDOMAsWebArchive() const { return m_dumpDOMAsWebArchive; }
+ void setDumpDOMAsWebArchive(bool dumpDOMAsWebArchive) { m_dumpDOMAsWebArchive = dumpDOMAsWebArchive; }
+
+ bool dumpSelectionRect() const { return m_dumpSelectionRect; }
+ void setDumpSelectionRect(bool dumpSelectionRect) { m_dumpSelectionRect = dumpSelectionRect; }
+
+ bool dumpSourceAsWebArchive() const { return m_dumpSourceAsWebArchive; }
+ void setDumpSourceAsWebArchive(bool dumpSourceAsWebArchive) { m_dumpSourceAsWebArchive = dumpSourceAsWebArchive; }
+
+ bool dumpTitleChanges() const { return m_dumpTitleChanges; }
+ void setDumpTitleChanges(bool dumpTitleChanges) { m_dumpTitleChanges = dumpTitleChanges; }
+
+ bool dumpEditingCallbacks() const { return m_dumpEditingCallbacks; }
+ void setDumpEditingCallbacks(bool dumpEditingCallbacks) { m_dumpEditingCallbacks = dumpEditingCallbacks; }
+
+ bool dumpResourceLoadCallbacks() const { return m_dumpResourceLoadCallbacks; }
+ void setDumpResourceLoadCallbacks(bool dumpResourceLoadCallbacks) { m_dumpResourceLoadCallbacks = dumpResourceLoadCallbacks; }
+
+ bool dumpFrameLoadCallbacks() const { return m_dumpFrameLoadCallbacks; }
+ void setDumpFrameLoadCallbacks(bool dumpFrameLoadCallbacks) { m_dumpFrameLoadCallbacks = dumpFrameLoadCallbacks; }
+
+ bool addFileToPasteboardOnDrag() const { return m_addFileToPasteboardOnDrag; }
+ void setAddFileToPasteboardOnDrag(bool addFileToPasteboardOnDrag) { m_addFileToPasteboardOnDrag = addFileToPasteboardOnDrag; }
+
+ bool callCloseOnWebViews() const { return m_callCloseOnWebViews; }
+ void setCallCloseOnWebViews(bool callCloseOnWebViews) { m_callCloseOnWebViews = callCloseOnWebViews; }
+
+ bool canOpenWindows() const { return m_canOpenWindows; }
+ void setCanOpenWindows(bool canOpenWindows) { m_canOpenWindows = canOpenWindows; }
+
+ bool closeRemainingWindowsWhenComplete() const { return m_closeRemainingWindowsWhenComplete; }
+ void setCloseRemainingWindowsWhenComplete(bool closeRemainingWindowsWhenComplete) { m_closeRemainingWindowsWhenComplete = closeRemainingWindowsWhenComplete; }
+
+ bool stopProvisionalFrameLoads() const { return m_stopProvisionalFrameLoads; }
+ void setStopProvisionalFrameLoads(bool stopProvisionalFrameLoads) { m_stopProvisionalFrameLoads = stopProvisionalFrameLoads; }
+
+ bool testOnscreen() const { return m_testOnscreen; }
+ void setTestOnscreen(bool testOnscreen) { m_testOnscreen = testOnscreen; }
+
+ bool testRepaint() const { return m_testRepaint; }
+ void setTestRepaint(bool testRepaint) { m_testRepaint = testRepaint; }
+
+ bool testRepaintSweepHorizontally() const { return m_testRepaintSweepHorizontally; }
+ void setTestRepaintSweepHorizontally(bool testRepaintSweepHorizontally) { m_testRepaintSweepHorizontally = testRepaintSweepHorizontally; }
+
+ bool waitToDump() const { return m_waitToDump; }
+ void setWaitToDump(bool waitToDump);
+
+ bool windowIsKey() const { return m_windowIsKey; }
+ void setWindowIsKey(bool windowIsKey);
+
+ bool globalFlag() const { return m_globalFlag; }
+ void setGlobalFlag(bool globalFlag) { m_globalFlag = globalFlag; }
+
+ const std::string& testPathOrURL() const { return m_testPathOrURL; }
+ const std::string& expectedPixelHash() const { return m_expectedPixelHash; }
+
+ bool pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId);
+ bool pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId);
+ unsigned numberOfActiveAnimations() const;
+
+private:
+ bool m_dumpAsText;
+ bool m_dumpAsPDF;
+ bool m_dumpBackForwardList;
+ bool m_dumpChildFrameScrollPositions;
+ bool m_dumpChildFramesAsText;
+ bool m_dumpDatabaseCallbacks;
+ bool m_dumpDOMAsWebArchive;
+ bool m_dumpSelectionRect;
+ bool m_dumpSourceAsWebArchive;
+ bool m_dumpStatusCallbacks;
+ bool m_dumpTitleChanges;
+ bool m_dumpEditingCallbacks;
+ bool m_dumpResourceLoadCallbacks;
+ bool m_dumpFrameLoadCallbacks;
+ bool m_addFileToPasteboardOnDrag;
+ bool m_callCloseOnWebViews;
+ bool m_canOpenWindows;
+ bool m_closeRemainingWindowsWhenComplete;
+ bool m_stopProvisionalFrameLoads;
+ bool m_testOnscreen;
+ bool m_testRepaint;
+ bool m_testRepaintSweepHorizontally;
+ bool m_waitToDump; // True if waitUntilDone() has been called, but notifyDone() has not yet been called.
+ bool m_windowIsKey;
+
+ bool m_globalFlag;
+
+ std::string m_testPathOrURL;
+ std::string m_expectedPixelHash; // empty string if no hash
+
+ static JSClassRef getJSClass();
+ static JSStaticValue* staticValues();
+ static JSStaticFunction* staticFunctions();
+};
+
+#endif // LayoutTestController_h
diff --git a/WebKitTools/DumpRenderTree/Makefile b/WebKitTools/DumpRenderTree/Makefile
new file mode 100644
index 0000000..1f1dbbc
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/Makefile
@@ -0,0 +1,2 @@
+SCRIPTS_PATH = ../Scripts
+include ../../Makefile.shared
diff --git a/WebKitTools/DumpRenderTree/PixelDumpSupport.h b/WebKitTools/DumpRenderTree/PixelDumpSupport.h
new file mode 100644
index 0000000..d4f8948
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/PixelDumpSupport.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PixelDumpSupport_h
+#define PixelDumpSupport_h
+
+#include <string>
+
+void dumpWebViewAsPixelsAndCompareWithExpected(const std::string& expectedHash);
+
+#if PLATFORM(MAC)
+
+// Can be used as a signal handler
+void restoreMainDisplayColorProfile(int ignored);
+
+// May change your color space, requiring a call to restoreMainDisplayColorProfile
+void setupMainDisplayColorProfile();
+
+#endif
+
+#endif // PixelDumpSupport_h
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/Info.plist b/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/Info.plist
new file mode 100644
index 0000000..7444b84
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/Info.plist
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>TestNetscapePlugIn</string>
+ <key>CFBundleGetInfoString</key>
+ <string>420+, Copyright 2006-2009 Apple Inc.</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.apple.testnetscapeplugin</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>BRPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>CFPlugInDynamicRegisterFunction</key>
+ <string></string>
+ <key>CFPlugInDynamicRegistration</key>
+ <string>NO</string>
+ <key>CFPlugInFactories</key>
+ <dict>
+ <key>00000000-0000-0000-0000-000000000000</key>
+ <string>MyFactoryFunction</string>
+ </dict>
+ <key>CFPlugInTypes</key>
+ <dict>
+ <key>00000000-0000-0000-0000-000000000000</key>
+ <array>
+ <string>00000000-0000-0000-0000-000000000000</string>
+ </array>
+ </dict>
+ <key>CFPlugInUnloadFunction</key>
+ <string></string>
+ <key>WebPluginDescription</key>
+ <string>Simple Netscape plug-in that handles test content for WebKit</string>
+ <key>WebPluginMIMETypes</key>
+ <dict>
+ <key>application/x-webkit-test-netscape</key>
+ <dict>
+ <key>WebPluginExtensions</key>
+ <array>
+ <string>testnetscape</string>
+ </array>
+ <key>WebPluginTypeDescription</key>
+ <string>test netscape content</string>
+ </dict>
+ </dict>
+ <key>WebPluginName</key>
+ <string>WebKit Test PlugIn</string>
+</dict>
+</plist>
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp b/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp
new file mode 100644
index 0000000..e321fee
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp
@@ -0,0 +1,722 @@
+/*
+ * Copyright (C) 2006, 2007, 2008 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. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "PluginObject.h"
+
+#include "TestObject.h"
+#include <assert.h>
+#include <stdio.h>
+
+#include <string.h>
+#include <stdlib.h>
+
+static void pluginInvalidate(NPObject*);
+static bool pluginHasProperty(NPObject*, NPIdentifier name);
+static bool pluginHasMethod(NPObject*, NPIdentifier name);
+static bool pluginGetProperty(NPObject*, NPIdentifier name, NPVariant*);
+static bool pluginSetProperty(NPObject*, NPIdentifier name, const NPVariant*);
+static bool pluginInvoke(NPObject*, NPIdentifier name, const NPVariant* args, uint32_t argCount, NPVariant* result);
+static bool pluginInvokeDefault(NPObject*, const NPVariant* args, uint32_t argCount, NPVariant* result);
+static NPObject* pluginAllocate(NPP npp, NPClass*);
+static void pluginDeallocate(NPObject*);
+
+NPNetscapeFuncs* browser;
+
+static NPClass pluginClass = {
+ NP_CLASS_STRUCT_VERSION,
+ pluginAllocate,
+ pluginDeallocate,
+ pluginInvalidate,
+ pluginHasMethod,
+ pluginInvoke,
+ pluginInvokeDefault,
+ pluginHasProperty,
+ pluginGetProperty,
+ pluginSetProperty,
+};
+
+NPClass *getPluginClass(void)
+{
+ return &pluginClass;
+}
+
+static bool identifiersInitialized = false;
+
+#define ID_PROPERTY_PROPERTY 0
+#define ID_PROPERTY_EVENT_LOGGING 1
+#define ID_PROPERTY_HAS_STREAM 2
+#define ID_PROPERTY_TEST_OBJECT 3
+#define ID_PROPERTY_LOG_DESTROY 4
+#define ID_PROPERTY_RETURN_ERROR_FROM_NEWSTREAM 5
+#define NUM_PROPERTY_IDENTIFIERS 6
+
+static NPIdentifier pluginPropertyIdentifiers[NUM_PROPERTY_IDENTIFIERS];
+static const NPUTF8 *pluginPropertyIdentifierNames[NUM_PROPERTY_IDENTIFIERS] = {
+ "property",
+ "eventLoggingEnabled",
+ "hasStream",
+ "testObject",
+ "logDestroy",
+ "returnErrorFromNewStream",
+};
+
+#define ID_TEST_CALLBACK_METHOD 0
+#define ID_TEST_GETURL 1
+#define ID_REMOVE_DEFAULT_METHOD 2
+#define ID_TEST_DOM_ACCESS 3
+#define ID_TEST_GET_URL_NOTIFY 4
+#define ID_TEST_INVOKE_DEFAULT 5
+#define ID_DESTROY_STREAM 6
+#define ID_TEST_ENUMERATE 7
+#define ID_TEST_GETINTIDENTIFIER 8
+#define ID_TEST_GET_PROPERTY 9
+#define ID_TEST_EVALUATE 10
+#define ID_TEST_GET_PROPERTY_RETURN_VALUE 11
+#define ID_TEST_IDENTIFIER_TO_STRING 12
+#define ID_TEST_IDENTIFIER_TO_INT 13
+#define ID_TEST_POSTURL_FILE 14
+#define ID_TEST_CONSTRUCT 15
+#define ID_TEST_THROW_EXCEPTION_METHOD 16
+#define ID_DESTROY_NULL_STREAM 17
+#define NUM_METHOD_IDENTIFIERS 18
+
+static NPIdentifier pluginMethodIdentifiers[NUM_METHOD_IDENTIFIERS];
+static const NPUTF8 *pluginMethodIdentifierNames[NUM_METHOD_IDENTIFIERS] = {
+ "testCallback",
+ "getURL",
+ "removeDefaultMethod",
+ "testDOMAccess",
+ "getURLNotify",
+ "testInvokeDefault",
+ "destroyStream",
+ "testEnumerate",
+ "testGetIntIdentifier",
+ "testGetProperty",
+ "testEvaluate",
+ "testGetPropertyReturnValue",
+ "testIdentifierToString",
+ "testIdentifierToInt",
+ "testPostURLFile",
+ "testConstruct",
+ "testThrowException",
+ "destroyNullStream"
+};
+
+static NPUTF8* createCStringFromNPVariant(const NPVariant* variant)
+{
+ size_t length = NPVARIANT_TO_STRING(*variant).UTF8Length;
+ NPUTF8* result = (NPUTF8*)malloc(length + 1);
+ memcpy(result, NPVARIANT_TO_STRING(*variant).UTF8Characters, length);
+ result[length] = '\0';
+ return result;
+}
+
+static void initializeIdentifiers(void)
+{
+ browser->getstringidentifiers(pluginPropertyIdentifierNames, NUM_PROPERTY_IDENTIFIERS, pluginPropertyIdentifiers);
+ browser->getstringidentifiers(pluginMethodIdentifierNames, NUM_METHOD_IDENTIFIERS, pluginMethodIdentifiers);
+}
+
+static bool pluginHasProperty(NPObject *obj, NPIdentifier name)
+{
+ for (int i = 0; i < NUM_PROPERTY_IDENTIFIERS; i++)
+ if (name == pluginPropertyIdentifiers[i])
+ return true;
+ return false;
+}
+
+static bool pluginHasMethod(NPObject *obj, NPIdentifier name)
+{
+ for (int i = 0; i < NUM_METHOD_IDENTIFIERS; i++)
+ if (name == pluginMethodIdentifiers[i])
+ return true;
+ return false;
+}
+
+static bool pluginGetProperty(NPObject* obj, NPIdentifier name, NPVariant* result)
+{
+ PluginObject* plugin = reinterpret_cast<PluginObject*>(obj);
+ if (name == pluginPropertyIdentifiers[ID_PROPERTY_PROPERTY]) {
+ STRINGZ_TO_NPVARIANT("property", *result);
+ return true;
+ } else if (name == pluginPropertyIdentifiers[ID_PROPERTY_EVENT_LOGGING]) {
+ BOOLEAN_TO_NPVARIANT(plugin->eventLogging, *result);
+ return true;
+ } else if (name == pluginPropertyIdentifiers[ID_PROPERTY_LOG_DESTROY]) {
+ BOOLEAN_TO_NPVARIANT(plugin->logDestroy, *result);
+ return true;
+ } else if (name == pluginPropertyIdentifiers[ID_PROPERTY_HAS_STREAM]) {
+ BOOLEAN_TO_NPVARIANT(plugin->stream != 0, *result);
+ return true;
+ } else if (name == pluginPropertyIdentifiers[ID_PROPERTY_TEST_OBJECT]) {
+ NPObject* testObject = plugin->testObject;
+ browser->retainobject(testObject);
+ OBJECT_TO_NPVARIANT(testObject, *result);
+ return true;
+ } else if (name == pluginPropertyIdentifiers[ID_PROPERTY_RETURN_ERROR_FROM_NEWSTREAM]) {
+ BOOLEAN_TO_NPVARIANT(plugin->returnErrorFromNewStream, *result);
+ return true;
+ }
+ return false;
+}
+
+static bool pluginSetProperty(NPObject* obj, NPIdentifier name, const NPVariant* variant)
+{
+ PluginObject* plugin = reinterpret_cast<PluginObject*>(obj);
+ if (name == pluginPropertyIdentifiers[ID_PROPERTY_EVENT_LOGGING]) {
+ plugin->eventLogging = NPVARIANT_TO_BOOLEAN(*variant);
+ return true;
+ } else if (name == pluginPropertyIdentifiers[ID_PROPERTY_LOG_DESTROY]) {
+ plugin->logDestroy = NPVARIANT_TO_BOOLEAN(*variant);
+ return true;
+ } else if (name == pluginPropertyIdentifiers[ID_PROPERTY_RETURN_ERROR_FROM_NEWSTREAM]) {
+ plugin->returnErrorFromNewStream = NPVARIANT_TO_BOOLEAN(*variant);
+ return true;
+ }
+
+ return false;
+}
+
+static bool testDOMAccess(PluginObject* obj, const NPVariant*, uint32_t, NPVariant* result)
+{
+ // Get plug-in's DOM element
+ NPObject* elementObject;
+ if (browser->getvalue(obj->npp, NPNVPluginElementNPObject, &elementObject) == NPERR_NO_ERROR) {
+ // Get style
+ NPVariant styleVariant;
+ NPIdentifier styleIdentifier = browser->getstringidentifier("style");
+ if (browser->getproperty(obj->npp, elementObject, styleIdentifier, &styleVariant) && NPVARIANT_IS_OBJECT(styleVariant)) {
+ // Set style.border
+ NPIdentifier borderIdentifier = browser->getstringidentifier("border");
+ NPVariant borderVariant;
+ STRINGZ_TO_NPVARIANT("3px solid red", borderVariant);
+ browser->setproperty(obj->npp, NPVARIANT_TO_OBJECT(styleVariant), borderIdentifier, &borderVariant);
+ browser->releasevariantvalue(&styleVariant);
+ }
+
+ browser->releaseobject(elementObject);
+ }
+ VOID_TO_NPVARIANT(*result);
+ return true;
+}
+
+static NPIdentifier stringVariantToIdentifier(NPVariant variant)
+{
+ assert(NPVARIANT_IS_STRING(variant));
+ NPUTF8* utf8String = createCStringFromNPVariant(&variant);
+ NPIdentifier identifier = browser->getstringidentifier(utf8String);
+ free(utf8String);
+ return identifier;
+}
+
+static NPIdentifier int32VariantToIdentifier(NPVariant variant)
+{
+ assert(NPVARIANT_IS_INT32(variant));
+ int32 integer = NPVARIANT_TO_INT32(variant);
+ return browser->getintidentifier(integer);
+}
+
+static NPIdentifier doubleVariantToIdentifier(NPVariant variant)
+{
+ assert(NPVARIANT_IS_DOUBLE(variant));
+ double value = NPVARIANT_TO_DOUBLE(variant);
+ // Sadly there is no "getdoubleidentifier"
+ int32 integer = static_cast<int32>(value);
+ return browser->getintidentifier(integer);
+}
+
+static NPIdentifier variantToIdentifier(NPVariant variant)
+{
+ if (NPVARIANT_IS_STRING(variant))
+ return stringVariantToIdentifier(variant);
+ else if (NPVARIANT_IS_INT32(variant))
+ return int32VariantToIdentifier(variant);
+ else if (NPVARIANT_IS_DOUBLE(variant))
+ return doubleVariantToIdentifier(variant);
+ return 0;
+}
+
+static bool testIdentifierToString(PluginObject*, const NPVariant* args, uint32_t argCount, NPVariant* result)
+{
+ if (argCount != 1)
+ return false;
+ NPIdentifier identifier = variantToIdentifier(args[0]);
+ if (!identifier)
+ return false;
+ NPUTF8* utf8String = browser->utf8fromidentifier(identifier);
+ if (!utf8String)
+ return false;
+ STRINGZ_TO_NPVARIANT(utf8String, *result);
+ return true;
+}
+
+static bool testIdentifierToInt(PluginObject*, const NPVariant* args, uint32_t argCount, NPVariant* result)
+{
+ if (argCount != 1)
+ return false;
+ NPIdentifier identifier = variantToIdentifier(args[0]);
+ if (!identifier)
+ return false;
+ int32 integer = browser->intfromidentifier(identifier);
+ INT32_TO_NPVARIANT(integer, *result);
+ return true;
+}
+
+static bool testCallback(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
+{
+ if (argCount == 0 || !NPVARIANT_IS_STRING(args[0]))
+ return false;
+
+ NPObject* windowScriptObject;
+ browser->getvalue(obj->npp, NPNVWindowNPObject, &windowScriptObject);
+
+ NPUTF8* callbackString = createCStringFromNPVariant(&args[0]);
+ NPIdentifier callbackIdentifier = browser->getstringidentifier(callbackString);
+ free(callbackString);
+
+ NPVariant browserResult;
+ browser->invoke(obj->npp, windowScriptObject, callbackIdentifier, 0, 0, &browserResult);
+ browser->releasevariantvalue(&browserResult);
+
+ browser->releaseobject(windowScriptObject);
+
+ VOID_TO_NPVARIANT(*result);
+ return true;
+}
+
+static bool getURL(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
+{
+ if (argCount == 2 && NPVARIANT_IS_STRING(args[0]) && NPVARIANT_IS_STRING(args[1])) {
+ NPUTF8* urlString = createCStringFromNPVariant(&args[0]);
+ NPUTF8* targetString = createCStringFromNPVariant(&args[1]);
+ NPError npErr = browser->geturl(obj->npp, urlString, targetString);
+ free(urlString);
+ free(targetString);
+
+ INT32_TO_NPVARIANT(npErr, *result);
+ return true;
+ } else if (argCount == 1 && NPVARIANT_IS_STRING(args[0])) {
+ NPUTF8* urlString = createCStringFromNPVariant(&args[0]);
+ NPError npErr = browser->geturl(obj->npp, urlString, 0);
+ free(urlString);
+
+ INT32_TO_NPVARIANT(npErr, *result);
+ return true;
+ }
+ return false;
+}
+
+static bool removeDefaultMethod(PluginObject*, const NPVariant* args, uint32_t argCount, NPVariant* result)
+{
+ pluginClass.invokeDefault = 0;
+ VOID_TO_NPVARIANT(*result);
+ return true;
+}
+
+static bool getURLNotify(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
+{
+ if (argCount != 3 || !NPVARIANT_IS_STRING(args[0])
+ || (!NPVARIANT_IS_STRING(args[1]) && !NPVARIANT_IS_NULL(args[1]))
+ || !NPVARIANT_IS_STRING(args[2]))
+ return false;
+
+ NPUTF8* urlString = createCStringFromNPVariant(&args[0]);
+ NPUTF8* targetString = (NPVARIANT_IS_STRING(args[1]) ? createCStringFromNPVariant(&args[1]) : NULL);
+ NPUTF8* callbackString = createCStringFromNPVariant(&args[2]);
+
+ NPIdentifier callbackIdentifier = browser->getstringidentifier(callbackString);
+ browser->geturlnotify(obj->npp, urlString, targetString, callbackIdentifier);
+
+ free(urlString);
+ free(targetString);
+ free(callbackString);
+
+ VOID_TO_NPVARIANT(*result);
+ return true;
+}
+
+static bool testInvokeDefault(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
+{
+ if (!NPVARIANT_IS_OBJECT(args[0]))
+ return false;
+
+ NPObject *callback = NPVARIANT_TO_OBJECT(args[0]);
+
+ NPVariant invokeArgs[1];
+ NPVariant browserResult;
+
+ STRINGZ_TO_NPVARIANT("test", invokeArgs[0]);
+ bool retval = browser->invokeDefault(obj->npp, callback, invokeArgs, 1, &browserResult);
+
+ if (retval)
+ browser->releasevariantvalue(&browserResult);
+
+ BOOLEAN_TO_NPVARIANT(retval, *result);
+ return true;
+}
+
+static bool destroyStream(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
+{
+ NPError npError = browser->destroystream(obj->npp, obj->stream, NPRES_USER_BREAK);
+ INT32_TO_NPVARIANT(npError, *result);
+ return true;
+}
+
+static bool destroyNullStream(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
+{
+ NPError npError = browser->destroystream(obj->npp, 0, NPRES_USER_BREAK);
+ INT32_TO_NPVARIANT(npError, *result);
+ return true;
+}
+
+static bool testEnumerate(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
+{
+ if (argCount != 2 || !NPVARIANT_IS_OBJECT(args[0]) || !NPVARIANT_IS_OBJECT(args[1]))
+ return false;
+
+ uint32_t count;
+ NPIdentifier* identifiers;
+ if (browser->enumerate(obj->npp, NPVARIANT_TO_OBJECT(args[0]), &identifiers, &count)) {
+ NPObject* outArray = NPVARIANT_TO_OBJECT(args[1]);
+ NPIdentifier pushIdentifier = browser->getstringidentifier("push");
+
+ for (uint32_t i = 0; i < count; i++) {
+ NPUTF8* string = browser->utf8fromidentifier(identifiers[i]);
+
+ if (!string)
+ continue;
+
+ NPVariant args[1];
+ STRINGZ_TO_NPVARIANT(string, args[0]);
+ NPVariant browserResult;
+ browser->invoke(obj->npp, outArray, pushIdentifier, args, 1, &browserResult);
+ browser->releasevariantvalue(&browserResult);
+ browser->memfree(string);
+ }
+
+ browser->memfree(identifiers);
+ }
+
+ VOID_TO_NPVARIANT(*result);
+ return true;
+}
+
+static bool testGetIntIdentifier(PluginObject*, const NPVariant* args, uint32_t argCount, NPVariant* result)
+{
+ if (argCount != 1 || !NPVARIANT_IS_DOUBLE(args[0]))
+ return false;
+
+ NPIdentifier identifier = browser->getintidentifier((int)NPVARIANT_TO_DOUBLE(args[0]));
+ INT32_TO_NPVARIANT((int32)(long long)identifier, *result);
+ return true;
+}
+
+static bool testGetProperty(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
+{
+ if (argCount == 0)
+ return false;
+
+ NPObject *object;
+ browser->getvalue(obj->npp, NPNVWindowNPObject, &object);
+
+ for (uint32_t i = 0; i < argCount; i++) {
+ assert(NPVARIANT_IS_STRING(args[i]));
+ NPUTF8* propertyString = createCStringFromNPVariant(&args[i]);
+ NPIdentifier propertyIdentifier = browser->getstringidentifier(propertyString);
+ free(propertyString);
+
+ NPVariant variant;
+ bool retval = browser->getproperty(obj->npp, object, propertyIdentifier, &variant);
+ browser->releaseobject(object);
+
+ if (!retval)
+ break;
+
+ if (i + 1 < argCount) {
+ assert(NPVARIANT_IS_OBJECT(variant));
+ object = NPVARIANT_TO_OBJECT(variant);
+ } else {
+ *result = variant;
+ return true;
+ }
+ }
+
+ VOID_TO_NPVARIANT(*result);
+ return false;
+}
+
+static bool testEvaluate(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
+{
+ if (argCount != 1 || !NPVARIANT_IS_STRING(args[0]))
+ return false;
+ NPObject* windowScriptObject;
+ browser->getvalue(obj->npp, NPNVWindowNPObject, &windowScriptObject);
+
+ NPString s = NPVARIANT_TO_STRING(args[0]);
+
+ bool retval = browser->evaluate(obj->npp, windowScriptObject, &s, result);
+ browser->releaseobject(windowScriptObject);
+ return retval;
+}
+
+static bool testGetPropertyReturnValue(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
+{
+ if (argCount != 2 || !NPVARIANT_IS_OBJECT(args[0]) || !NPVARIANT_IS_STRING(args[1]))
+ return false;
+
+ NPUTF8* propertyString = createCStringFromNPVariant(&args[1]);
+ NPIdentifier propertyIdentifier = browser->getstringidentifier(propertyString);
+ free(propertyString);
+
+ NPVariant variant;
+ bool retval = browser->getproperty(obj->npp, NPVARIANT_TO_OBJECT(args[0]), propertyIdentifier, &variant);
+ if (retval)
+ browser->releasevariantvalue(&variant);
+
+ BOOLEAN_TO_NPVARIANT(retval, *result);
+ return true;
+}
+
+static char* toCString(const NPString& string)
+{
+ char* result = static_cast<char*>(malloc(string.UTF8Length + 1));
+ memcpy(result, string.UTF8Characters, string.UTF8Length);
+ result[string.UTF8Length] = '\0';
+
+ return result;
+}
+
+static bool testPostURLFile(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
+{
+ if (argCount != 4 || !NPVARIANT_IS_STRING(args[0]) || !NPVARIANT_IS_STRING(args[1]) || !NPVARIANT_IS_STRING(args[2]) || !NPVARIANT_IS_STRING(args[3]))
+ return false;
+
+ NPString urlString = NPVARIANT_TO_STRING(args[0]);
+ char* url = toCString(urlString);
+
+ NPString targetString = NPVARIANT_TO_STRING(args[1]);
+ char* target = toCString(targetString);
+
+ NPString pathString = NPVARIANT_TO_STRING(args[2]);
+ char* path = toCString(pathString);
+
+ NPString contentsString = NPVARIANT_TO_STRING(args[3]);
+
+ FILE* tempFile = fopen(path, "w");
+ if (!tempFile)
+ return false;
+
+ fwrite(contentsString.UTF8Characters, contentsString.UTF8Length, 1, tempFile);
+ fclose(tempFile);
+
+ NPError error = browser->posturl(obj->npp, url, target, pathString.UTF8Length, path, TRUE);
+
+ free(path);
+ free(target);
+ free(url);
+
+ BOOLEAN_TO_NPVARIANT(error == NPERR_NO_ERROR, *result);
+ return true;
+}
+
+static bool testConstruct(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
+{
+ if (!argCount || !NPVARIANT_IS_OBJECT(args[0]))
+ return false;
+
+ return browser->construct(obj->npp, NPVARIANT_TO_OBJECT(args[0]), args + 1, argCount - 1, result);
+}
+
+static bool pluginInvoke(NPObject* header, NPIdentifier name, const NPVariant* args, uint32_t argCount, NPVariant* result)
+{
+ PluginObject* plugin = reinterpret_cast<PluginObject*>(header);
+ if (name == pluginMethodIdentifiers[ID_TEST_CALLBACK_METHOD])
+ return testCallback(plugin, args, argCount, result);
+ else if (name == pluginMethodIdentifiers[ID_TEST_GETURL])
+ return getURL(plugin, args, argCount, result);
+ else if (name == pluginMethodIdentifiers[ID_REMOVE_DEFAULT_METHOD])
+ return removeDefaultMethod(plugin, args, argCount, result);
+ else if (name == pluginMethodIdentifiers[ID_TEST_DOM_ACCESS])
+ return testDOMAccess(plugin, args, argCount, result);
+ else if (name == pluginMethodIdentifiers[ID_TEST_GET_URL_NOTIFY])
+ return getURLNotify(plugin, args, argCount, result);
+ else if (name == pluginMethodIdentifiers[ID_TEST_INVOKE_DEFAULT])
+ return testInvokeDefault(plugin, args, argCount, result);
+ else if (name == pluginMethodIdentifiers[ID_TEST_ENUMERATE])
+ return testEnumerate(plugin, args, argCount, result);
+ else if (name == pluginMethodIdentifiers[ID_DESTROY_STREAM])
+ return destroyStream(plugin, args, argCount, result);
+ else if (name == pluginMethodIdentifiers[ID_TEST_GETINTIDENTIFIER])
+ return testGetIntIdentifier(plugin, args, argCount, result);
+ else if (name == pluginMethodIdentifiers[ID_TEST_EVALUATE])
+ return testEvaluate(plugin, args, argCount, result);
+ else if (name == pluginMethodIdentifiers[ID_TEST_GET_PROPERTY])
+ return testGetProperty(plugin, args, argCount, result);
+ else if (name == pluginMethodIdentifiers[ID_TEST_GET_PROPERTY_RETURN_VALUE])
+ return testGetPropertyReturnValue(plugin, args, argCount, result);
+ else if (name == pluginMethodIdentifiers[ID_TEST_IDENTIFIER_TO_STRING])
+ return testIdentifierToString(plugin, args, argCount, result);
+ else if (name == pluginMethodIdentifiers[ID_TEST_IDENTIFIER_TO_INT])
+ return testIdentifierToInt(plugin, args, argCount, result);
+ else if (name == pluginMethodIdentifiers[ID_TEST_POSTURL_FILE])
+ return testPostURLFile(plugin, args, argCount, result);
+ else if (name == pluginMethodIdentifiers[ID_TEST_CONSTRUCT])
+ return testConstruct(plugin, args, argCount, result);
+ else if (name == pluginMethodIdentifiers[ID_TEST_THROW_EXCEPTION_METHOD]) {
+ browser->setexception(header, "plugin object testThrowException SUCCESS");
+ return true;
+ } else if (name == pluginMethodIdentifiers[ID_DESTROY_NULL_STREAM])
+ return destroyNullStream(plugin, args, argCount, result);
+
+ return false;
+}
+
+static bool pluginInvokeDefault(NPObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result)
+{
+ INT32_TO_NPVARIANT(1, *result);
+ return true;
+}
+
+static void pluginInvalidate(NPObject* header)
+{
+ PluginObject* plugin = reinterpret_cast<PluginObject*>(header);
+ plugin->testObject = 0;
+}
+
+static NPObject *pluginAllocate(NPP npp, NPClass *theClass)
+{
+ PluginObject* newInstance = (PluginObject*)malloc(sizeof(PluginObject));
+
+ if (!identifiersInitialized) {
+ identifiersInitialized = true;
+ initializeIdentifiers();
+ }
+
+ newInstance->npp = npp;
+ newInstance->testObject = browser->createobject(npp, getTestClass());
+ newInstance->eventLogging = FALSE;
+ newInstance->onStreamLoad = 0;
+ newInstance->onStreamDestroy = 0;
+ newInstance->onURLNotify = 0;
+ newInstance->logDestroy = FALSE;
+ newInstance->logSetWindow = FALSE;
+ newInstance->returnErrorFromNewStream = FALSE;
+ newInstance->stream = 0;
+
+ newInstance->firstUrl = NULL;
+ newInstance->firstHeaders = NULL;
+ newInstance->lastUrl = NULL;
+ newInstance->lastHeaders = NULL;
+
+ return (NPObject*)newInstance;
+}
+
+static void pluginDeallocate(NPObject* header)
+{
+ PluginObject* plugin = reinterpret_cast<PluginObject*>(header);
+ if (plugin->testObject)
+ browser->releaseobject(plugin->testObject);
+
+ free(plugin->firstUrl);
+ free(plugin->firstHeaders);
+ free(plugin->lastUrl);
+ free(plugin->lastHeaders);
+ free(plugin);
+}
+
+void handleCallback(PluginObject* object, const char *url, NPReason reason, void *notifyData)
+{
+ assert(object);
+
+ NPVariant args[2];
+
+ NPObject *windowScriptObject;
+ browser->getvalue(object->npp, NPNVWindowNPObject, &windowScriptObject);
+
+ NPIdentifier callbackIdentifier = notifyData;
+
+ INT32_TO_NPVARIANT(reason, args[0]);
+
+ char *strHdr = NULL;
+ if (object->firstUrl && object->firstHeaders && object->lastUrl && object->lastHeaders) {
+ // Format expected by JavaScript validator: four fields separated by \n\n:
+ // First URL; first header block; last URL; last header block.
+ // Note that header blocks already end with \n due to how NPStream::headers works.
+ int len = strlen(object->firstUrl) + 2
+ + strlen(object->firstHeaders) + 1
+ + strlen(object->lastUrl) + 2
+ + strlen(object->lastHeaders) + 1;
+ strHdr = (char*)malloc(len + 1);
+ snprintf(strHdr, len + 1, "%s\n\n%s\n%s\n\n%s\n",
+ object->firstUrl, object->firstHeaders, object->lastUrl, object->lastHeaders);
+ STRINGN_TO_NPVARIANT(strHdr, len, args[1]);
+ } else
+ NULL_TO_NPVARIANT(args[1]);
+
+ NPVariant browserResult;
+ browser->invoke(object->npp, windowScriptObject, callbackIdentifier, args, 2, &browserResult);
+ browser->releasevariantvalue(&browserResult);
+
+ free(strHdr);
+}
+
+void notifyStream(PluginObject* object, const char *url, const char *headers)
+{
+ if (object->firstUrl == NULL) {
+ if (url)
+ object->firstUrl = strdup(url);
+ if (headers)
+ object->firstHeaders = strdup(headers);
+ } else {
+ free(object->lastUrl);
+ free(object->lastHeaders);
+ object->lastUrl = (url ? strdup(url) : NULL);
+ object->lastHeaders = (headers ? strdup(headers) : NULL);
+ }
+}
+
+void testNPRuntime(NPP npp)
+{
+ NPObject* windowScriptObject;
+ browser->getvalue(npp, NPNVWindowNPObject, &windowScriptObject);
+
+ // Invoke
+ NPIdentifier testNPInvoke = browser->getstringidentifier("testNPInvoke");
+ NPVariant args[7];
+
+ VOID_TO_NPVARIANT(args[0]);
+ NULL_TO_NPVARIANT(args[1]);
+ BOOLEAN_TO_NPVARIANT(true, args[2]);
+ INT32_TO_NPVARIANT(242, args[3]);
+ DOUBLE_TO_NPVARIANT(242.242, args[4]);
+ STRINGZ_TO_NPVARIANT("Hello, World", args[5]);
+ OBJECT_TO_NPVARIANT(windowScriptObject, args[6]);
+
+ NPVariant result;
+ if (browser->invoke(npp, windowScriptObject, testNPInvoke, args, 7, &result))
+ browser->releasevariantvalue(&result);
+
+ browser->releaseobject(windowScriptObject);
+}
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h b/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h
new file mode 100644
index 0000000..77c35e0
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2006, 2007 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. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <WebKit/npfunctions.h>
+
+extern NPNetscapeFuncs *browser;
+
+typedef struct {
+ NPObject header;
+
+ NPP npp;
+ NPBool eventLogging;
+ NPBool logSetWindow;
+ NPBool logDestroy;
+ NPBool returnErrorFromNewStream;
+ NPObject* testObject;
+ NPStream* stream;
+ char* onStreamLoad;
+ char* onStreamDestroy;
+ char* onURLNotify;
+ char* firstUrl;
+ char* firstHeaders;
+ char* lastUrl;
+ char* lastHeaders;
+#ifdef XP_MACOSX
+ NPEventModel eventModel;
+#endif
+} PluginObject;
+
+extern NPClass *getPluginClass(void);
+extern void handleCallback(PluginObject* object, const char *url, NPReason reason, void *notifyData);
+extern void notifyStream(PluginObject* object, const char *url, const char *headers);
+extern void testNPRuntime(NPP npp);
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.cpp b/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.cpp
new file mode 100644
index 0000000..af60df4
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.cpp
@@ -0,0 +1,167 @@
+/*
+ * Copyright (C) 2007 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. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "TestObject.h"
+#include "PluginObject.h"
+
+#include <string.h>
+#include <stdlib.h>
+
+static bool testEnumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count);
+static bool testHasMethod(NPObject*, NPIdentifier name);
+static bool testInvoke(NPObject*, NPIdentifier name, const NPVariant* args, uint32_t argCount, NPVariant* result);
+static bool testHasProperty(NPObject*, NPIdentifier name);
+static bool testGetProperty(NPObject*, NPIdentifier name, NPVariant*);
+static NPObject *testAllocate(NPP npp, NPClass *theClass);
+static void testDeallocate(NPObject *obj);
+static bool testConstruct(NPObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result);
+
+static NPClass testClass = {
+ NP_CLASS_STRUCT_VERSION,
+ testAllocate,
+ testDeallocate,
+ 0,
+ testHasMethod,
+ testInvoke,
+ 0,
+ testHasProperty,
+ testGetProperty,
+ 0,
+ 0,
+ testEnumerate,
+ testConstruct
+};
+
+NPClass *getTestClass(void)
+{
+ return &testClass;
+}
+
+static bool identifiersInitialized = false;
+
+#define ID_OBJECT_POINTER 2
+
+#define NUM_ENUMERATABLE_TEST_IDENTIFIERS 2
+#define NUM_TEST_IDENTIFIERS 3
+
+static NPIdentifier testIdentifiers[NUM_TEST_IDENTIFIERS];
+static const NPUTF8 *testIdentifierNames[NUM_TEST_IDENTIFIERS] = {
+ "foo",
+ "bar",
+ "objectPointer",
+};
+
+#define ID_THROW_EXCEPTION_METHOD 0
+#define NUM_METHOD_IDENTIFIERS 1
+
+static NPIdentifier testMethodIdentifiers[NUM_METHOD_IDENTIFIERS];
+static const NPUTF8 *testMethodIdentifierNames[NUM_METHOD_IDENTIFIERS] = {
+ "throwException",
+};
+
+static void initializeIdentifiers(void)
+{
+ browser->getstringidentifiers(testIdentifierNames, NUM_TEST_IDENTIFIERS, testIdentifiers);
+ browser->getstringidentifiers(testMethodIdentifierNames, NUM_METHOD_IDENTIFIERS, testMethodIdentifiers);
+}
+
+static NPObject *testAllocate(NPP npp, NPClass *theClass)
+{
+ NPObject *newInstance = static_cast<NPObject*>(malloc(sizeof(NPObject)));
+
+ if (!identifiersInitialized) {
+ identifiersInitialized = true;
+ initializeIdentifiers();
+ }
+
+ return newInstance;
+}
+
+static void testDeallocate(NPObject *obj)
+{
+ free(obj);
+}
+
+static bool testHasMethod(NPObject*, NPIdentifier name)
+{
+ for (unsigned i = 0; i < NUM_METHOD_IDENTIFIERS; i++) {
+ if (testMethodIdentifiers[i] == name)
+ return true;
+ }
+ return false;
+}
+
+static bool testInvoke(NPObject* header, NPIdentifier name, const NPVariant* args, uint32_t argCount, NPVariant* result)
+{
+ if (name == testMethodIdentifiers[ID_THROW_EXCEPTION_METHOD]) {
+ browser->setexception(header, "test object throwException SUCCESS");
+ return true;
+ }
+ return false;
+}
+
+static bool testHasProperty(NPObject*, NPIdentifier name)
+{
+ for (unsigned i = 0; i < NUM_TEST_IDENTIFIERS; i++) {
+ if (testIdentifiers[i] == name)
+ return true;
+ }
+
+ return false;
+}
+
+static bool testGetProperty(NPObject* npobj, NPIdentifier name, NPVariant* result)
+{
+ if (name == testIdentifiers[ID_OBJECT_POINTER]) {
+ int32_t objectPointer = static_cast<int32_t>(reinterpret_cast<long long>(npobj));
+
+ INT32_TO_NPVARIANT(objectPointer, *result);
+ return true;
+ }
+
+ return false;
+}
+
+
+static bool testEnumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count)
+{
+ *count = NUM_ENUMERATABLE_TEST_IDENTIFIERS;
+
+ *value = (NPIdentifier*)browser->memalloc(NUM_ENUMERATABLE_TEST_IDENTIFIERS * sizeof(NPIdentifier));
+ memcpy(*value, testIdentifiers, sizeof(NPIdentifier) * NUM_ENUMERATABLE_TEST_IDENTIFIERS);
+
+ return true;
+}
+
+static bool testConstruct(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result)
+{
+ browser->retainobject(npobj);
+
+ // Just return the same object.
+ OBJECT_TO_NPVARIANT(npobj, *result);
+ return true;
+}
+
+
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.h b/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.h
new file mode 100644
index 0000000..1295fb7
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2007 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. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <WebKit/npapi.h>
+#include <WebKit/npruntime.h>
+
+NPClass *getTestClass(void);
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp b/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp
new file mode 100644
index 0000000..c764cfd
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp
@@ -0,0 +1,423 @@
+/*
+ * Copyright (C) 2006, 2007 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. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "PluginObject.h"
+
+static void log(NPP instance, const char* format, ...)
+{
+ va_list args;
+ va_start(args, format);
+ char message[2048] = "PLUGIN: ";
+ vsprintf(message + strlen(message), format, args);
+ va_end(args);
+
+ NPObject* windowObject = 0;
+ NPError error = browser->getvalue(instance, NPNVWindowNPObject, &windowObject);
+ if (error != NPERR_NO_ERROR) {
+ fprintf(stderr, "Failed to retrieve window object while logging: %s\n", message);
+ return;
+ }
+
+ NPVariant consoleVariant;
+ if (!browser->getproperty(instance, windowObject, browser->getstringidentifier("console"), &consoleVariant)) {
+ fprintf(stderr, "Failed to retrieve console object while logging: %s\n", message);
+ browser->releaseobject(windowObject);
+ return;
+ }
+
+ NPObject* consoleObject = NPVARIANT_TO_OBJECT(consoleVariant);
+
+ NPVariant messageVariant;
+ STRINGZ_TO_NPVARIANT(message, messageVariant);
+
+ NPVariant result;
+ if (!browser->invoke(instance, consoleObject, browser->getstringidentifier("log"), &messageVariant, 1, &result)) {
+ fprintf(stderr, "Failed to invoke console.log while logging: %s\n", message);
+ browser->releaseobject(consoleObject);
+ browser->releaseobject(windowObject);
+ return;
+ }
+
+ browser->releasevariantvalue(&result);
+ browser->releaseobject(consoleObject);
+ browser->releaseobject(windowObject);
+}
+
+// Mach-o entry points
+extern "C" {
+ NPError NP_Initialize(NPNetscapeFuncs *browserFuncs);
+ NPError NP_GetEntryPoints(NPPluginFuncs *pluginFuncs);
+ void NP_Shutdown(void);
+}
+
+// Mach-o entry points
+NPError NP_Initialize(NPNetscapeFuncs *browserFuncs)
+{
+ browser = browserFuncs;
+ return NPERR_NO_ERROR;
+}
+
+NPError NP_GetEntryPoints(NPPluginFuncs *pluginFuncs)
+{
+ pluginFuncs->version = 11;
+ pluginFuncs->size = sizeof(pluginFuncs);
+ pluginFuncs->newp = NPP_New;
+ pluginFuncs->destroy = NPP_Destroy;
+ pluginFuncs->setwindow = NPP_SetWindow;
+ pluginFuncs->newstream = NPP_NewStream;
+ pluginFuncs->destroystream = NPP_DestroyStream;
+ pluginFuncs->asfile = NPP_StreamAsFile;
+ pluginFuncs->writeready = NPP_WriteReady;
+ pluginFuncs->write = (NPP_WriteProcPtr)NPP_Write;
+ pluginFuncs->print = NPP_Print;
+ pluginFuncs->event = NPP_HandleEvent;
+ pluginFuncs->urlnotify = NPP_URLNotify;
+ pluginFuncs->getvalue = NPP_GetValue;
+ pluginFuncs->setvalue = NPP_SetValue;
+
+ return NPERR_NO_ERROR;
+}
+
+void NP_Shutdown(void)
+{
+}
+
+NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char *argn[], char *argv[], NPSavedData *saved)
+{
+ bool forceCarbon = false;
+
+ // Always turn on the CG model
+ NPBool supportsCoreGraphics;
+ if (browser->getvalue(instance, NPNVsupportsCoreGraphicsBool, &supportsCoreGraphics) != NPERR_NO_ERROR)
+ supportsCoreGraphics = false;
+
+ if (!supportsCoreGraphics)
+ return NPERR_INCOMPATIBLE_VERSION_ERROR;
+
+ browser->setvalue(instance, NPPVpluginDrawingModel, (void *)NPDrawingModelCoreGraphics);
+
+ PluginObject* obj = (PluginObject*)browser->createobject(instance, getPluginClass());
+ instance->pdata = obj;
+
+ for (int i = 0; i < argc; i++) {
+ if (strcasecmp(argn[i], "onstreamload") == 0 && !obj->onStreamLoad)
+ obj->onStreamLoad = strdup(argv[i]);
+ else if (strcasecmp(argn[i], "onStreamDestroy") == 0 && !obj->onStreamDestroy)
+ obj->onStreamDestroy = strdup(argv[i]);
+ else if (strcasecmp(argn[i], "onURLNotify") == 0 && !obj->onURLNotify)
+ obj->onURLNotify = strdup(argv[i]);
+ else if (strcasecmp(argn[i], "src") == 0 &&
+ strcasecmp(argv[i], "data:application/x-webkit-test-netscape,returnerrorfromnewstream") == 0)
+ obj->returnErrorFromNewStream = TRUE;
+ else if (strcasecmp(argn[i], "logfirstsetwindow") == 0)
+ obj->logSetWindow = TRUE;
+ else if (strcasecmp(argn[i], "testnpruntime") == 0)
+ testNPRuntime(instance);
+ else if (strcasecmp(argn[i], "forcecarbon") == 0)
+ forceCarbon = true;
+ }
+
+
+ if (forceCarbon) {
+ NPBool supportsCarbon;
+
+#ifndef NP_NO_CARBON
+ if (browser->getvalue(instance, NPNVsupportsCarbonBool, &supportsCarbon) != NPERR_NO_ERROR)
+ supportsCarbon = false;
+#else
+ supportsCarbon = false;
+#endif
+ if (!supportsCarbon)
+ return NPERR_INCOMPATIBLE_VERSION_ERROR;
+
+#ifndef NP_NO_CARBON
+ obj->eventModel = NPEventModelCarbon;
+#endif
+ } else {
+ NPBool supportsCocoa;
+ if (browser->getvalue(instance, NPNVsupportsCocoaBool, &supportsCocoa) != NPERR_NO_ERROR)
+ supportsCocoa = FALSE;
+
+ if (!supportsCocoa)
+ return NPERR_INCOMPATIBLE_VERSION_ERROR;
+
+ obj->eventModel = NPEventModelCocoa;
+ }
+
+ browser->setvalue(instance, NPPVpluginEventModel, (void *)obj->eventModel);
+ return NPERR_NO_ERROR;
+}
+
+NPError NPP_Destroy(NPP instance, NPSavedData **save)
+{
+ PluginObject* obj = static_cast<PluginObject*>(instance->pdata);
+ if (obj) {
+ if (obj->onStreamLoad)
+ free(obj->onStreamLoad);
+
+ if (obj->onStreamDestroy)
+ free(obj->onStreamDestroy);
+
+ if (obj->onURLNotify)
+ free(obj->onURLNotify);
+
+ if (obj->logDestroy)
+ log(instance, "NPP_Destroy");
+
+ browser->releaseobject(&obj->header);
+ }
+ return NPERR_NO_ERROR;
+}
+
+NPError NPP_SetWindow(NPP instance, NPWindow *window)
+{
+ PluginObject* obj = static_cast<PluginObject*>(instance->pdata);
+
+ if (obj) {
+ if (obj->logSetWindow) {
+ log(instance, "NPP_SetWindow: %d %d", (int)window->width, (int)window->height);
+ obj->logSetWindow = false;
+ }
+ }
+
+ return NPERR_NO_ERROR;
+}
+
+static void executeScript(const PluginObject* obj, const char* script)
+{
+ NPObject *windowScriptObject;
+ browser->getvalue(obj->npp, NPNVWindowNPObject, &windowScriptObject);
+
+ NPString npScript;
+ npScript.UTF8Characters = script;
+ npScript.UTF8Length = strlen(script);
+
+ NPVariant browserResult;
+ browser->evaluate(obj->npp, windowScriptObject, &npScript, &browserResult);
+ browser->releasevariantvalue(&browserResult);
+}
+
+NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream, NPBool seekable, uint16 *stype)
+{
+ PluginObject* obj = static_cast<PluginObject*>(instance->pdata);
+ obj->stream = stream;
+ *stype = NP_ASFILEONLY;
+
+ if (obj->returnErrorFromNewStream)
+ return NPERR_GENERIC_ERROR;
+
+ if (browser->version >= NPVERS_HAS_RESPONSE_HEADERS)
+ notifyStream(obj, stream->url, stream->headers);
+
+ if (obj->onStreamLoad)
+ executeScript(obj, obj->onStreamLoad);
+
+ return NPERR_NO_ERROR;
+}
+
+NPError NPP_DestroyStream(NPP instance, NPStream *stream, NPReason reason)
+{
+ PluginObject* obj = (PluginObject*)instance->pdata;
+
+ if (obj->onStreamDestroy)
+ executeScript(obj, obj->onStreamDestroy);
+
+ return NPERR_NO_ERROR;
+}
+
+int32 NPP_WriteReady(NPP instance, NPStream *stream)
+{
+ return 0;
+}
+
+int32 NPP_Write(NPP instance, NPStream *stream, int32 offset, int32 len, void *buffer)
+{
+ return 0;
+}
+
+void NPP_StreamAsFile(NPP instance, NPStream *stream, const char *fname)
+{
+}
+
+void NPP_Print(NPP instance, NPPrint *platformPrint)
+{
+}
+
+#ifndef NP_NO_CARBON
+static int16_t handleEventCarbon(NPP instance, PluginObject* obj, EventRecord* event)
+{
+ Point pt = { event->where.v, event->where.h };
+
+ switch (event->what) {
+ case nullEvent:
+ // these are delivered non-deterministically, don't log.
+ break;
+ case mouseDown:
+ GlobalToLocal(&pt);
+ log(instance, "mouseDown at (%d, %d)", pt.h, pt.v);
+ break;
+ case mouseUp:
+ GlobalToLocal(&pt);
+ log(instance, "mouseUp at (%d, %d)", pt.h, pt.v);
+ break;
+ case keyDown:
+ log(instance, "keyDown '%c'", (char)(event->message & 0xFF));
+ break;
+ case keyUp:
+ log(instance, "keyUp '%c'", (char)(event->message & 0xFF));
+ break;
+ case autoKey:
+ log(instance, "autoKey '%c'", (char)(event->message & 0xFF));
+ break;
+ case updateEvt:
+ log(instance, "updateEvt");
+ break;
+ case diskEvt:
+ log(instance, "diskEvt");
+ break;
+ case activateEvt:
+ log(instance, "activateEvt");
+ break;
+ case osEvt:
+ printf("PLUGIN: osEvt - ");
+ switch ((event->message & 0xFF000000) >> 24) {
+ case suspendResumeMessage:
+ printf("%s\n", (event->message & 0x1) ? "resume" : "suspend");
+ break;
+ case mouseMovedMessage:
+ printf("mouseMoved\n");
+ break;
+ default:
+ printf("%08lX\n", event->message);
+ }
+ break;
+ case kHighLevelEvent:
+ log(instance, "kHighLevelEvent");
+ break;
+ // NPAPI events
+ case getFocusEvent:
+ log(instance, "getFocusEvent");
+ break;
+ case loseFocusEvent:
+ log(instance, "loseFocusEvent");
+ break;
+ case adjustCursorEvent:
+ log(instance, "adjustCursorEvent");
+ break;
+ default:
+ log(instance, "event %d", event->what);
+ }
+
+ return 0;
+}
+#endif
+
+static int16_t handleEventCocoa(NPP instance, PluginObject* obj, NPCocoaEvent* event)
+{
+ switch (event->type) {
+ case NPCocoaEventWindowFocusChanged:
+
+ case NPCocoaEventFocusChanged:
+ if (event->data.focus.hasFocus)
+ log(instance, "getFocusEvent");
+ else
+ log(instance, "loseFocusEvent");
+ return 1;
+
+ case NPCocoaEventDrawRect:
+ return 1;
+
+ case NPCocoaEventKeyDown:
+ case NPCocoaEventKeyUp:
+ case NPCocoaEventFlagsChanged:
+ return 1;
+
+ case NPCocoaEventMouseDown:
+ log(instance, "mouseDown at (%d, %d)",
+ (int)event->data.mouse.pluginX,
+ (int)event->data.mouse.pluginY);
+ return 1;
+ case NPCocoaEventMouseUp:
+ log(instance, "mouseUp at (%d, %d)",
+ (int)event->data.mouse.pluginX,
+ (int)event->data.mouse.pluginY);
+ return 1;
+
+ case NPCocoaEventMouseMoved:
+ case NPCocoaEventMouseEntered:
+ case NPCocoaEventMouseExited:
+ case NPCocoaEventMouseDragged:
+ case NPCocoaEventScrollWheel:
+ case NPCocoaEventTextInput:
+ return 1;
+ }
+
+ return 0;
+}
+
+int16 NPP_HandleEvent(NPP instance, void *event)
+{
+ PluginObject* obj = static_cast<PluginObject*>(instance->pdata);
+ if (!obj->eventLogging)
+ return 0;
+
+#ifndef NP_NO_CARBON
+ if (obj->eventModel == NPEventModelCarbon)
+ return handleEventCarbon(instance, obj, static_cast<EventRecord*>(event));
+#endif
+
+ assert(obj->eventModel == NPEventModelCocoa);
+ return handleEventCocoa(instance, obj, static_cast<NPCocoaEvent*>(event));
+}
+
+void NPP_URLNotify(NPP instance, const char *url, NPReason reason, void *notifyData)
+{
+ PluginObject* obj = static_cast<PluginObject*>(instance->pdata);
+
+ if (obj->onURLNotify)
+ executeScript(obj, obj->onURLNotify);
+
+ handleCallback(obj, url, reason, notifyData);
+}
+
+NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value)
+{
+ PluginObject* obj = static_cast<PluginObject*>(instance->pdata);
+
+ if (variable == NPPVpluginScriptableNPObject) {
+ void **v = (void **)value;
+ // Return value is expected to be retained
+ browser->retainobject((NPObject *)obj);
+ *v = obj;
+ return NPERR_NO_ERROR;
+ }
+
+ return NPERR_GENERIC_ERROR;
+}
+
+NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value)
+{
+ return NPERR_GENERIC_ERROR;
+}
diff --git a/WebKitTools/DumpRenderTree/WorkQueue.cpp b/WebKitTools/DumpRenderTree/WorkQueue.cpp
new file mode 100644
index 0000000..0891b9c
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/WorkQueue.cpp
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WorkQueue.h"
+
+#include "WorkQueueItem.h"
+#include <wtf/Assertions.h>
+
+static const unsigned queueLength = 1024;
+
+static WorkQueueItem* theQueue[queueLength];
+static unsigned startOfQueue;
+static unsigned endOfQueue;
+
+WorkQueue* WorkQueue::shared()
+{
+ static WorkQueue* sharedInstance = new WorkQueue;
+ return sharedInstance;
+}
+
+WorkQueue::WorkQueue()
+ : m_frozen(false)
+{
+}
+
+void WorkQueue::queue(WorkQueueItem* item)
+{
+ ASSERT(endOfQueue < queueLength);
+ ASSERT(endOfQueue >= startOfQueue);
+
+ if (m_frozen) {
+ delete item;
+ return;
+ }
+
+ theQueue[endOfQueue++] = item;
+}
+
+WorkQueueItem* WorkQueue::dequeue()
+{
+ ASSERT(endOfQueue >= startOfQueue);
+
+ if (startOfQueue == endOfQueue)
+ return 0;
+
+ return theQueue[startOfQueue++];
+}
+
+unsigned WorkQueue::count()
+{
+ return endOfQueue - startOfQueue;
+}
+
+void WorkQueue::clear()
+{
+ for (unsigned i = startOfQueue; i < endOfQueue; ++i) {
+ delete theQueue[i];
+ theQueue[i] = 0;
+ }
+
+ startOfQueue = 0;
+ endOfQueue = 0;
+}
diff --git a/WebKitTools/DumpRenderTree/WorkQueue.h b/WebKitTools/DumpRenderTree/WorkQueue.h
new file mode 100644
index 0000000..c2850c5
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/WorkQueue.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WorkQueue_h
+#define WorkQueue_h
+
+class WorkQueueItem;
+
+class WorkQueue {
+public:
+ static WorkQueue* shared();
+
+ void queue(WorkQueueItem*);
+ WorkQueueItem* dequeue();
+ void clear();
+ unsigned count();
+
+ void setFrozen(bool b) { m_frozen = b; }
+
+private:
+ WorkQueue();
+
+ bool m_frozen;
+};
+
+#endif // !defined(WorkQueue_h)
diff --git a/WebKitTools/DumpRenderTree/WorkQueueItem.h b/WebKitTools/DumpRenderTree/WorkQueueItem.h
new file mode 100644
index 0000000..fd15329
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/WorkQueueItem.h
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WorkQueueItem_h
+#define WorkQueueItem_h
+
+#include <JavaScriptCore/JSRetainPtr.h>
+#include <JavaScriptCore/JSBase.h>
+
+class WorkQueueItem {
+public:
+ virtual ~WorkQueueItem() { }
+ virtual void invoke() const = 0;
+};
+
+class LoadItem : public WorkQueueItem {
+public:
+ LoadItem(const JSStringRef url, const JSStringRef target)
+ : m_url(url)
+ , m_target(target)
+ {
+ }
+
+ const JSStringRef url() const { return m_url.get(); }
+ const JSStringRef target() const { return m_target.get(); }
+
+ virtual void invoke() const;
+
+private:
+ JSRetainPtr<JSStringRef> m_url;
+ JSRetainPtr<JSStringRef> m_target;
+};
+
+class ReloadItem : public WorkQueueItem {
+public:
+ virtual void invoke() const;
+};
+
+class ScriptItem : public WorkQueueItem {
+public:
+ ScriptItem(const JSStringRef script)
+ : m_script(script)
+ {
+ }
+
+ const JSStringRef script() const { return m_script.get(); }
+
+ virtual void invoke() const;
+
+private:
+ JSRetainPtr<JSStringRef> m_script;
+};
+
+class BackForwardItem : public WorkQueueItem {
+public:
+ virtual void invoke() const;
+
+protected:
+ BackForwardItem(int howFar)
+ : m_howFar(howFar)
+ {
+ }
+
+ int m_howFar;
+};
+
+class BackItem : public BackForwardItem {
+public:
+ BackItem(unsigned howFar)
+ : BackForwardItem(-howFar)
+ {
+ }
+};
+
+class ForwardItem : public BackForwardItem {
+public:
+ ForwardItem(unsigned howFar)
+ : BackForwardItem(howFar)
+ {
+ }
+};
+
+#endif // !defined(WorkQueueItem_h)
diff --git a/WebKitTools/DumpRenderTree/cg/ImageDiffCG.cpp b/WebKitTools/DumpRenderTree/cg/ImageDiffCG.cpp
new file mode 100644
index 0000000..e6da06f
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/cg/ImageDiffCG.cpp
@@ -0,0 +1,256 @@
+/*
+ * Copyright (C) 2005, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2005 Ben La Monica <ben.lamonica@gmail.com>. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#define min min
+
+#include <stdio.h>
+#include <wtf/Platform.h>
+#include <wtf/RetainPtr.h>
+
+#if PLATFORM(WIN)
+#include <winsock2.h>
+#include <windows.h>
+#include <fcntl.h>
+#include <io.h>
+#include <wtf/MathExtras.h>
+#endif
+
+#include <CoreGraphics/CGBitmapContext.h>
+#include <CoreGraphics/CGImage.h>
+#include <ImageIO/CGImageDestination.h>
+
+#if PLATFORM(MAC)
+#include <LaunchServices/UTCoreTypes.h>
+#endif
+
+#ifndef CGFLOAT_DEFINED
+#ifdef __LP64__
+typedef double CGFloat;
+#else
+typedef float CGFloat;
+#endif
+#define CGFLOAT_DEFINED 1
+#endif
+
+using namespace std;
+
+#if PLATFORM(WIN)
+static inline float strtof(const char *nptr, char **endptr)
+{
+ return strtod(nptr, endptr);
+}
+static const CFStringRef kUTTypePNG = CFSTR("public.png");
+#endif
+
+static RetainPtr<CGImageRef> createImageFromStdin(int bytesRemaining)
+{
+ unsigned char buffer[2048];
+ RetainPtr<CFMutableDataRef> data(AdoptCF, CFDataCreateMutable(0, bytesRemaining));
+
+ while (bytesRemaining > 0) {
+ size_t bytesToRead = min(bytesRemaining, 2048);
+ size_t bytesRead = fread(buffer, 1, bytesToRead, stdin);
+ CFDataAppendBytes(data.get(), buffer, static_cast<CFIndex>(bytesRead));
+ bytesRemaining -= static_cast<int>(bytesRead);
+ }
+ RetainPtr<CGDataProviderRef> dataProvider(AdoptCF, CGDataProviderCreateWithCFData(data.get()));
+ return RetainPtr<CGImageRef>(AdoptCF, CGImageCreateWithPNGDataProvider(dataProvider.get(), 0, false, kCGRenderingIntentDefault));
+}
+
+static void releaseMallocBuffer(void* info, const void* data, size_t size)
+{
+ free((void*)data);
+}
+
+static RetainPtr<CGImageRef> createDifferenceImage(CGImageRef baseImage, CGImageRef testImage, float& difference)
+{
+ static RetainPtr<CGColorSpaceRef> colorSpace(AdoptCF, CGColorSpaceCreateDeviceRGB());
+ RetainPtr<CGImageRef> diffImage;
+
+ size_t width = CGImageGetWidth(baseImage);
+ size_t height = CGImageGetHeight(baseImage);
+ size_t rowBytes = width * 4;
+
+ // Draw base image in bitmap context
+ void* baseBuffer = calloc(height, rowBytes);
+ CGContextRef baseContext = CGBitmapContextCreate(baseBuffer, width, height, 8, rowBytes, colorSpace.get(), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host);
+ CGContextDrawImage(baseContext, CGRectMake(0, 0, width, height), baseImage);
+ CGContextRelease(baseContext);
+
+ // Draw test image in bitmap context
+ void* buffer = calloc(height, rowBytes);
+ CGContextRef context = CGBitmapContextCreate(buffer, width, height, 8, rowBytes, colorSpace.get(), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host);
+ CGContextDrawImage(context, CGRectMake(0, 0, width, height), testImage);
+ CGContextRelease(context);
+
+ // Compare the content of the 2 bitmaps
+ void* diffBuffer = malloc(width * height);
+ float count = 0.0f;
+ float sum = 0.0f;
+ float maxDistance = 0.0f;
+ unsigned char* basePixel = (unsigned char*)baseBuffer;
+ unsigned char* pixel = (unsigned char*)buffer;
+ unsigned char* diff = (unsigned char*)diffBuffer;
+ for (size_t y = 0; y < height; ++y) {
+ for (size_t x = 0; x < width; ++x) {
+ float red = (pixel[0] - basePixel[0]) / max<float>(255 - basePixel[0], basePixel[0]);
+ float green = (pixel[1] - basePixel[1]) / max<float>(255 - basePixel[1], basePixel[1]);
+ float blue = (pixel[2] - basePixel[2]) / max<float>(255 - basePixel[2], basePixel[2]);
+ float alpha = (pixel[3] - basePixel[3]) / max<float>(255 - basePixel[3], basePixel[3]);
+ float distance = sqrtf(red * red + green * green + blue * blue + alpha * alpha) / 2.0f;
+
+ *diff++ = (unsigned char)(distance * 255.0f);
+
+ if (distance >= 1.0f / 255.0f) {
+ count += 1.0f;
+ sum += distance;
+ if (distance > maxDistance)
+ maxDistance = distance;
+ }
+
+ basePixel += 4;
+ pixel += 4;
+ }
+ }
+
+ // Compute the difference as a percentage combining both the number of different pixels and their difference amount i.e. the average distance over the entire image
+ if (count > 0.0f)
+ difference = 100.0f * sum / (height * width);
+ else
+ difference = 0.0f;
+
+ // Generate a normalized diff image if there is any difference
+ if (difference > 0.0f) {
+ if (maxDistance < 1.0f) {
+ diff = (unsigned char*)diffBuffer;
+ for(size_t p = 0; p < height * width; ++p)
+ diff[p] = diff[p] / maxDistance;
+ }
+
+ CGDataProviderRef provider = CGDataProviderCreateWithData(0, diffBuffer, width * height, releaseMallocBuffer);
+ CGColorSpaceRef diffColorspace = CGColorSpaceCreateDeviceGray();
+ diffImage.adoptCF(CGImageCreate(width, height, 8, 8, width, diffColorspace, 0, provider, 0, false, kCGRenderingIntentDefault));
+ CGColorSpaceRelease(diffColorspace);
+ CGDataProviderRelease(provider);
+ }
+ else
+ free(diffBuffer);
+
+ // Destroy drawing buffers
+ if (buffer)
+ free(buffer);
+ if (baseBuffer)
+ free(baseBuffer);
+
+ return diffImage;
+}
+
+static inline bool imageHasAlpha(CGImageRef image)
+{
+ CGImageAlphaInfo info = CGImageGetAlphaInfo(image);
+
+ return (info >= kCGImageAlphaPremultipliedLast) && (info <= kCGImageAlphaFirst);
+}
+
+int main(int argc, const char* argv[])
+{
+#if PLATFORM(WIN)
+ _setmode(0, _O_BINARY);
+ _setmode(1, _O_BINARY);
+#endif
+
+ float tolerance = 0.0f;
+
+ for (int i = 1; i < argc; ++i) {
+ if (!strcmp(argv[i], "-t") || !strcmp(argv[i], "--tolerance")) {
+ if (i >= argc - 1)
+ exit(1);
+ tolerance = strtof(argv[i + 1], 0);
+ ++i;
+ continue;
+ }
+ }
+
+ char buffer[2048];
+ RetainPtr<CGImageRef> actualImage;
+ RetainPtr<CGImageRef> baselineImage;
+
+ while (fgets(buffer, sizeof(buffer), stdin)) {
+ // remove the CR
+ char* newLineCharacter = strchr(buffer, '\n');
+ if (newLineCharacter)
+ *newLineCharacter = '\0';
+
+ if (!strncmp("Content-Length: ", buffer, 16)) {
+ strtok(buffer, " ");
+ int imageSize = strtol(strtok(0, " "), 0, 10);
+
+ if (imageSize > 0 && !actualImage)
+ actualImage = createImageFromStdin(imageSize);
+ else if (imageSize > 0 && !baselineImage)
+ baselineImage = createImageFromStdin(imageSize);
+ else
+ fputs("error, image size must be specified.\n", stdout);
+ }
+
+ if (actualImage && baselineImage) {
+ RetainPtr<CGImageRef> diffImage;
+ float difference = 100.0f;
+
+ if ((CGImageGetWidth(actualImage.get()) == CGImageGetWidth(baselineImage.get())) && (CGImageGetHeight(actualImage.get()) == CGImageGetHeight(baselineImage.get())) && (imageHasAlpha(actualImage.get()) == imageHasAlpha(baselineImage.get()))) {
+ diffImage = createDifferenceImage(actualImage.get(), baselineImage.get(), difference); // difference is passed by reference
+ if (difference <= tolerance)
+ difference = 0.0f;
+ else {
+ difference = roundf(difference * 100.0f) / 100.0f;
+ difference = max(difference, 0.01f); // round to 2 decimal places
+ }
+ } else
+ fputs("error, test and reference image have different properties.\n", stderr);
+
+ if (difference > 0.0f) {
+ if (diffImage) {
+ RetainPtr<CFMutableDataRef> imageData(AdoptCF, CFDataCreateMutable(0, 0));
+ RetainPtr<CGImageDestinationRef> imageDest(AdoptCF, CGImageDestinationCreateWithData(imageData.get(), kUTTypePNG, 1, 0));
+ CGImageDestinationAddImage(imageDest.get(), diffImage.get(), 0);
+ CGImageDestinationFinalize(imageDest.get());
+ printf("Content-Length: %lu\n", CFDataGetLength(imageData.get()));
+ fwrite(CFDataGetBytePtr(imageData.get()), 1, CFDataGetLength(imageData.get()), stdout);
+ }
+
+ fprintf(stdout, "diff: %01.2f%% failed\n", difference);
+ } else
+ fprintf(stdout, "diff: %01.2f%% passed\n", difference);
+
+ actualImage = 0;
+ baselineImage = 0;
+ }
+
+ fflush(stdout);
+ }
+
+ return 0;
+}
diff --git a/WebKitTools/DumpRenderTree/cg/PixelDumpSupportCG.cpp b/WebKitTools/DumpRenderTree/cg/PixelDumpSupportCG.cpp
new file mode 100644
index 0000000..5dd505a
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/cg/PixelDumpSupportCG.cpp
@@ -0,0 +1,146 @@
+/*
+ * Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved.
+ * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
+ * (C) 2007 Eric Seidel <eric@webkit.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "PixelDumpSupportCG.h"
+
+#include "DumpRenderTree.h"
+#include "LayoutTestController.h"
+#include <ImageIO/CGImageDestination.h>
+#include <algorithm>
+#include <ctype.h>
+#include <wtf/Assertions.h>
+#include <wtf/RefPtr.h>
+#include <wtf/RetainPtr.h>
+#include <wtf/StringExtras.h>
+
+#if PLATFORM(WIN)
+#include "MD5.h"
+#elif PLATFORM(MAC)
+#include <LaunchServices/UTCoreTypes.h>
+#define COMMON_DIGEST_FOR_OPENSSL
+#include <CommonCrypto/CommonDigest.h>
+#endif
+
+using namespace std;
+
+#if PLATFORM(WIN)
+static const CFStringRef kUTTypePNG = CFSTR("public.png");
+#endif
+
+static void printPNG(CGImageRef image)
+{
+ RetainPtr<CFMutableDataRef> imageData(AdoptCF, CFDataCreateMutable(0, 0));
+ RetainPtr<CGImageDestinationRef> imageDest(AdoptCF, CGImageDestinationCreateWithData(imageData.get(), kUTTypePNG, 1, 0));
+ CGImageDestinationAddImage(imageDest.get(), image, 0);
+ CGImageDestinationFinalize(imageDest.get());
+
+ const UInt8* data = CFDataGetBytePtr(imageData.get());
+ CFIndex dataLength = CFDataGetLength(imageData.get());
+
+ printf("Content-Type: %s\n", "image/png");
+ printf("Content-Length: %lu\n", static_cast<unsigned long>(dataLength));
+
+ const size_t bytesToWriteInOneChunk = 1 << 15;
+ size_t dataRemainingToWrite = dataLength;
+ while (dataRemainingToWrite) {
+ size_t bytesToWriteInThisChunk = min(dataRemainingToWrite, bytesToWriteInOneChunk);
+ size_t bytesWritten = fwrite(data, 1, bytesToWriteInThisChunk, stdout);
+ if (bytesWritten != bytesToWriteInThisChunk)
+ break;
+ dataRemainingToWrite -= bytesWritten;
+ data += bytesWritten;
+ }
+}
+
+static void computeMD5HashStringForBitmapContext(CGContextRef bitmapContext, char hashString[33])
+{
+ ASSERT(CGBitmapContextGetBitsPerPixel(bitmapContext) == 32); // ImageDiff assumes 32 bit RGBA, we must as well.
+ size_t pixelsHigh = CGBitmapContextGetHeight(bitmapContext);
+ size_t pixelsWide = CGBitmapContextGetWidth(bitmapContext);
+ size_t bytesPerRow = CGBitmapContextGetBytesPerRow(bitmapContext);
+
+ // We need to swap the bytes to ensure consistent hashes independently of endianness
+ MD5_CTX md5Context;
+ MD5_Init(&md5Context);
+ unsigned char* bitmapData = static_cast<unsigned char*>(CGBitmapContextGetData(bitmapContext));
+#if PLATFORM(MAC)
+ if ((CGBitmapContextGetBitmapInfo(bitmapContext) & kCGBitmapByteOrderMask) == kCGBitmapByteOrder32Big) {
+ for (unsigned row = 0; row < pixelsHigh; row++) {
+ uint32_t buffer[pixelsWide];
+ for (unsigned column = 0; column < pixelsWide; column++)
+ buffer[column] = OSReadLittleInt32(bitmapData, 4 * column);
+ MD5_Update(&md5Context, buffer, 4 * pixelsWide);
+ bitmapData += bytesPerRow;
+ }
+ } else
+#endif
+ {
+ for (unsigned row = 0; row < pixelsHigh; row++) {
+ MD5_Update(&md5Context, bitmapData, 4 * pixelsWide);
+ bitmapData += bytesPerRow;
+ }
+ }
+ unsigned char hash[16];
+ MD5_Final(hash, &md5Context);
+
+ hashString[0] = '\0';
+ for (int i = 0; i < 16; i++)
+ snprintf(hashString, 33, "%s%02x", hashString, hash[i]);
+}
+
+void dumpWebViewAsPixelsAndCompareWithExpected(const std::string& expectedHash)
+{
+ RefPtr<BitmapContext> context;
+
+ context = createBitmapContextFromWebView(gLayoutTestController->testOnscreen(), gLayoutTestController->testRepaint(), gLayoutTestController->testRepaintSweepHorizontally(), gLayoutTestController->dumpSelectionRect());
+ ASSERT(context);
+
+ // Compute the hash of the bitmap context pixels
+ char actualHash[33];
+ computeMD5HashStringForBitmapContext(context->cgContext(), actualHash);
+ printf("\nActualHash: %s\n", actualHash);
+
+ // Check the computed hash against the expected one and dump image on mismatch
+ bool dumpImage = true;
+ if (expectedHash.length() > 0) {
+ ASSERT(expectedHash.length() == 32);
+
+ printf("\nExpectedHash: %s\n", expectedHash.c_str());
+
+ if (expectedHash == actualHash) // FIXME: do case insensitive compare
+ dumpImage = false;
+ }
+
+ if (dumpImage) {
+ RetainPtr<CGImageRef> image(AdoptCF, CGBitmapContextCreateImage(context->cgContext()));
+ printPNG(image.get());
+ }
+}
diff --git a/WebKitTools/DumpRenderTree/cg/PixelDumpSupportCG.h b/WebKitTools/DumpRenderTree/cg/PixelDumpSupportCG.h
new file mode 100644
index 0000000..f0c9746
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/cg/PixelDumpSupportCG.h
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved.
+ * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
+ * (C) 2007 Eric Seidel <eric@webkit.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PixelDumpSupportCG_h
+#define PixelDumpSupportCG_h
+
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/RetainPtr.h>
+
+#if PLATFORM(WIN)
+#include <windows.h>
+#endif
+
+typedef struct CGContext* CGContextRef;
+
+#if PLATFORM(MAC)
+typedef void* PlatformBitmapBuffer;
+#elif PLATFORM(WIN)
+typedef HBITMAP PlatformBitmapBuffer;
+#endif
+
+class BitmapContext : public RefCounted<BitmapContext> {
+public:
+ static PassRefPtr<BitmapContext> createByAdoptingBitmapAndContext(PlatformBitmapBuffer buffer, CGContextRef context)
+ {
+ return adoptRef(new BitmapContext(buffer, context));
+ }
+
+ ~BitmapContext()
+ {
+ if (m_buffer)
+#if PLATFORM(MAC)
+ free(m_buffer);
+#elif PLATFORM(WIN)
+ DeleteObject(m_buffer);
+#endif
+ }
+
+ CGContextRef cgContext() const { return m_context.get(); }
+
+private:
+
+ BitmapContext(PlatformBitmapBuffer buffer, CGContextRef context)
+ : m_buffer(buffer)
+ , m_context(AdoptCF, context)
+ {
+ }
+
+ PlatformBitmapBuffer m_buffer;
+ RetainPtr<CGContextRef> m_context;
+
+};
+
+PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool onscreen, bool incrementalRepaint, bool sweepHorizontally, bool drawSelectionRect);
+
+#endif // PixelDumpSupportCG_h
diff --git a/WebKitTools/DumpRenderTree/config.h b/WebKitTools/DumpRenderTree/config.h
new file mode 100644
index 0000000..4775ae2
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/config.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2008 Nuanti Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#define Config_H
+
+#if defined(HAVE_CONFIG_H) && HAVE_CONFIG_H
+#include "autotoolsconfig.h"
+#endif
+
+#include <wtf/Platform.h>
+
+#if PLATFORM(WIN)
+#define WTF_PLATFORM_CF 1
+
+#undef _WIN32_WINNT
+#define _WIN32_WINNT 0x0500
+
+#undef WINVER
+#define WINVER 0x0500
+
+// If we don't define these, they get defined in windef.h.
+// We want to use std::min and std::max
+#undef max
+#define max max
+#undef min
+#define min min
+
+#undef _WINSOCKAPI_
+#define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h
+#endif // PLATFORM(WIN)
diff --git a/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher100.ttf b/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher100.ttf
new file mode 100644
index 0000000..22b00de
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher100.ttf
Binary files differ
diff --git a/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher200.ttf b/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher200.ttf
new file mode 100644
index 0000000..1ccadba
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher200.ttf
Binary files differ
diff --git a/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher300.ttf b/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher300.ttf
new file mode 100644
index 0000000..ab5563d
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher300.ttf
Binary files differ
diff --git a/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher400.ttf b/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher400.ttf
new file mode 100644
index 0000000..56d279e
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher400.ttf
Binary files differ
diff --git a/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher500.ttf b/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher500.ttf
new file mode 100644
index 0000000..d827d7d
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher500.ttf
Binary files differ
diff --git a/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher600.ttf b/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher600.ttf
new file mode 100644
index 0000000..9141596
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher600.ttf
Binary files differ
diff --git a/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher700.ttf b/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher700.ttf
new file mode 100644
index 0000000..a2d0505
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher700.ttf
Binary files differ
diff --git a/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher800.ttf b/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher800.ttf
new file mode 100644
index 0000000..d0f354b
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher800.ttf
Binary files differ
diff --git a/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher900.ttf b/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher900.ttf
new file mode 100644
index 0000000..6b895ca
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher900.ttf
Binary files differ
diff --git a/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
new file mode 100644
index 0000000..d7f220b
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
@@ -0,0 +1,525 @@
+/*
+ * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
+ * Copyright (C) 2008 Alp Toker <alp@nuanti.com>
+ * Copyright (C) 2009 Jan Alonzo <jmalonzo@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "DumpRenderTree.h"
+
+#include "LayoutTestController.h"
+#include "WorkQueue.h"
+#include "WorkQueueItem.h"
+
+#include <gtk/gtk.h>
+#include <webkit/webkit.h>
+#include <JavaScriptCore/JavaScript.h>
+
+#include <wtf/Assertions.h>
+
+#include <cassert>
+#include <getopt.h>
+#include <stdlib.h>
+#include <string.h>
+
+using namespace std;
+
+extern "C" {
+// This API is not yet public.
+extern G_CONST_RETURN gchar* webkit_web_history_item_get_target(WebKitWebHistoryItem*);
+extern gboolean webkit_web_history_item_is_target_item(WebKitWebHistoryItem*);
+extern GList* webkit_web_history_item_get_children(WebKitWebHistoryItem*);
+extern GSList* webkit_web_frame_get_children(WebKitWebFrame* frame);
+extern gchar* webkit_web_frame_get_inner_text(WebKitWebFrame* frame);
+extern gchar* webkit_web_frame_dump_render_tree(WebKitWebFrame* frame);
+extern void webkit_web_settings_add_extra_plugin_directory(WebKitWebView* view, const gchar* directory);
+extern gchar* webkit_web_frame_get_response_mime_type(WebKitWebFrame* frame);
+}
+
+volatile bool done;
+static bool printSeparators;
+static int dumpPixels;
+static int dumpTree = 1;
+
+LayoutTestController* gLayoutTestController = 0;
+static WebKitWebView* webView;
+WebKitWebFrame* mainFrame = 0;
+WebKitWebFrame* topLoadingFrame = 0;
+guint waitToDumpWatchdog = 0;
+
+// current b/f item at the end of the previous test
+static WebKitWebHistoryItem* prevTestBFItem = NULL;
+
+const unsigned maxViewHeight = 600;
+const unsigned maxViewWidth = 800;
+const unsigned historyItemIndent = 8;
+
+static gchar* autocorrectURL(const gchar* url)
+{
+ if (strncmp("http://", url, 7) != 0 && strncmp("https://", url, 8) != 0) {
+ GString* string = g_string_new("file://");
+ g_string_append(string, url);
+ return g_string_free(string, FALSE);
+ }
+
+ return g_strdup(url);
+}
+
+static bool shouldLogFrameLoadDelegates(const char* pathOrURL)
+{
+ return strstr(pathOrURL, "loading/");
+}
+
+void dumpFrameScrollPosition(WebKitWebFrame* frame)
+{
+
+}
+
+void displayWebView()
+{
+
+}
+
+static void appendString(gchar*& target, gchar* string)
+{
+ gchar* oldString = target;
+ target = g_strconcat(target, string, NULL);
+ g_free(oldString);
+}
+
+static gchar* dumpFramesAsText(WebKitWebFrame* frame)
+{
+ gchar* result = 0;
+
+ // Add header for all but the main frame.
+ bool isMainFrame = (webkit_web_view_get_main_frame(webView) == frame);
+
+ gchar* innerText = webkit_web_frame_get_inner_text(frame);
+ if (isMainFrame)
+ result = g_strdup_printf("%s\n", innerText);
+ else {
+ const gchar* frameName = webkit_web_frame_get_name(frame);
+ result = g_strdup_printf("\n--------\nFrame: '%s'\n--------\n%s\n", frameName, innerText);
+ }
+ g_free(innerText);
+
+ if (gLayoutTestController->dumpChildFramesAsText()) {
+ GSList* children = webkit_web_frame_get_children(frame);
+ for (GSList* child = children; child; child = g_slist_next(child))
+ appendString(result, dumpFramesAsText((WebKitWebFrame*)children->data));
+ g_slist_free(children);
+ }
+
+ return result;
+}
+
+static gint compareHistoryItems(gpointer* item1, gpointer* item2)
+{
+ return g_ascii_strcasecmp(webkit_web_history_item_get_target(WEBKIT_WEB_HISTORY_ITEM(item1)),
+ webkit_web_history_item_get_target(WEBKIT_WEB_HISTORY_ITEM(item2)));
+}
+
+static void dumpHistoryItem(WebKitWebHistoryItem* item, int indent, bool current)
+{
+ ASSERT(item != NULL);
+ int start = 0;
+ g_object_ref(item);
+ if (current) {
+ printf("curr->");
+ start = 6;
+ }
+ for (int i = start; i < indent; i++)
+ putchar(' ');
+ printf("%s", webkit_web_history_item_get_uri(item));
+ const gchar* target = webkit_web_history_item_get_target(item);
+ if (target && g_utf8_strlen(target, 0) > 0)
+ printf(" (in frame \"%s\")", target);
+ if (webkit_web_history_item_is_target_item(item))
+ printf(" **nav target**");
+ putchar('\n');
+ GList* kids = webkit_web_history_item_get_children(item);
+ if (kids) {
+ // must sort to eliminate arbitrary result ordering which defeats reproducible testing
+ kids = g_list_sort(kids, (GCompareFunc) compareHistoryItems);
+ for (unsigned i = 0; i < g_list_length(kids); i++)
+ dumpHistoryItem(WEBKIT_WEB_HISTORY_ITEM(g_list_nth_data(kids, i)), indent+4, FALSE);
+ }
+ g_object_unref(item);
+}
+
+static void dumpBackForwardListForWebView(WebKitWebView* view)
+{
+ printf("\n============== Back Forward List ==============\n");
+ WebKitWebBackForwardList* bfList = webkit_web_view_get_back_forward_list(view);
+
+ // Print out all items in the list after prevTestBFItem, which was from the previous test
+ // Gather items from the end of the list, the print them out from oldest to newest
+ GList* itemsToPrint = NULL;
+ gint forwardListCount = webkit_web_back_forward_list_get_forward_length(bfList);
+ for (int i = forwardListCount; i > 0; i--) {
+ WebKitWebHistoryItem* item = webkit_web_back_forward_list_get_nth_item(bfList, i);
+ // something is wrong if the item from the last test is in the forward part of the b/f list
+ ASSERT(item != prevTestBFItem);
+ g_object_ref(item);
+ itemsToPrint = g_list_append(itemsToPrint, item);
+ }
+
+ WebKitWebHistoryItem* currentItem = webkit_web_back_forward_list_get_current_item(bfList);
+
+ g_object_ref(currentItem);
+ itemsToPrint = g_list_append(itemsToPrint, currentItem);
+
+ gint currentItemIndex = g_list_length(itemsToPrint) - 1;
+ gint backListCount = webkit_web_back_forward_list_get_back_length(bfList);
+ for (int i = -1; i >= -(backListCount); i--) {
+ WebKitWebHistoryItem* item = webkit_web_back_forward_list_get_nth_item(bfList, i);
+ if (item == prevTestBFItem)
+ break;
+ g_object_ref(item);
+ itemsToPrint = g_list_append(itemsToPrint, item);
+ }
+
+ for (int i = g_list_length(itemsToPrint) - 1; i >= 0; i--) {
+ WebKitWebHistoryItem* item = WEBKIT_WEB_HISTORY_ITEM(g_list_nth_data(itemsToPrint, i));
+ dumpHistoryItem(item, historyItemIndent, i == currentItemIndex);
+ g_object_unref(item);
+ }
+ g_list_free(itemsToPrint);
+ printf("===============================================\n");
+}
+
+static void invalidateAnyPreviousWaitToDumpWatchdog()
+{
+ if (waitToDumpWatchdog) {
+ g_source_remove(waitToDumpWatchdog);
+ waitToDumpWatchdog = 0;
+ }
+}
+
+static void resetWebViewToConsistentStateBeforeTesting()
+{
+ WebKitWebSettings* settings = webkit_web_view_get_settings(webView);
+ g_object_set(G_OBJECT(settings),
+ "enable-private-browsing", FALSE,
+ "enable-developer-extras", FALSE,
+ NULL);
+
+ WebKitWebInspector* inspector = webkit_web_view_get_inspector(webView);
+ g_object_set(G_OBJECT(inspector), "javascript-profiling-enabled", FALSE, NULL);
+}
+
+void dump()
+{
+ invalidateAnyPreviousWaitToDumpWatchdog();
+
+ bool dumpAsText = gLayoutTestController->dumpAsText();
+ if (dumpTree) {
+ char* result = 0;
+ gchar* responseMimeType = webkit_web_frame_get_response_mime_type(mainFrame);
+
+ dumpAsText = g_ascii_strcasecmp(responseMimeType, "text/plain");
+ g_free(responseMimeType);
+
+ gLayoutTestController->setDumpAsText(dumpAsText);
+ if (gLayoutTestController->dumpAsText())
+ result = dumpFramesAsText(mainFrame);
+ else
+ result = webkit_web_frame_dump_render_tree(mainFrame);
+
+ if (!result) {
+ const char* errorMessage;
+ if (gLayoutTestController->dumpAsText())
+ errorMessage = "[documentElement innerText]";
+ else if (gLayoutTestController->dumpDOMAsWebArchive())
+ errorMessage = "[[mainFrame DOMDocument] webArchive]";
+ else if (gLayoutTestController->dumpSourceAsWebArchive())
+ errorMessage = "[[mainFrame dataSource] webArchive]";
+ else
+ errorMessage = "[mainFrame renderTreeAsExternalRepresentation]";
+ printf("ERROR: nil result from %s", errorMessage);
+ } else {
+ printf("%s", result);
+ g_free(result);
+ if (!gLayoutTestController->dumpAsText() && !gLayoutTestController->dumpDOMAsWebArchive() && !gLayoutTestController->dumpSourceAsWebArchive())
+ dumpFrameScrollPosition(mainFrame);
+
+ if (gLayoutTestController->dumpBackForwardList()) {
+ // FIXME: multiple windows support
+ dumpBackForwardListForWebView(webView);
+
+ }
+ }
+
+ if (printSeparators) {
+ puts("#EOF"); // terminate the content block
+ fputs("#EOF\n", stderr);
+ fflush(stdout);
+ fflush(stderr);
+ }
+ }
+
+ if (dumpPixels) {
+ if (!gLayoutTestController->dumpAsText() && !gLayoutTestController->dumpDOMAsWebArchive() && !gLayoutTestController->dumpSourceAsWebArchive()) {
+ // FIXME: Add support for dumping pixels
+ }
+ }
+
+ // FIXME: call displayWebView here when we support --paint
+
+ puts("#EOF"); // terminate the (possibly empty) pixels block
+
+ fflush(stdout);
+ fflush(stderr);
+
+ done = true;
+}
+
+static void setDefaultsToConsistentStateValuesForTesting()
+{
+ gdk_screen_set_resolution(gdk_screen_get_default(), 72.0);
+
+ WebKitWebSettings* settings = webkit_web_view_get_settings(webView);
+ g_object_set(G_OBJECT(settings),
+ "default-font-family", "Times",
+ "monospace-font-family", "Courier",
+ "serif-font-family", "Times",
+ "sans-serif-font-family", "Helvetica",
+ "default-font-size", 16,
+ "default-monospace-font-size", 13,
+ "minimum-font-size", 1,
+ NULL);
+#if PLATFORM(X11)
+ webkit_web_settings_add_extra_plugin_directory(webView, TEST_PLUGIN_DIR);
+#endif
+}
+
+static void runTest(const string& testPathOrURL)
+{
+ ASSERT(!testPathOrURL.empty());
+
+ // Look for "'" as a separator between the path or URL, and the pixel dump hash that follows.
+ string pathOrURL(testPathOrURL);
+ string expectedPixelHash;
+
+ size_t separatorPos = pathOrURL.find("'");
+ if (separatorPos != string::npos) {
+ pathOrURL = string(testPathOrURL, 0, separatorPos);
+ expectedPixelHash = string(testPathOrURL, separatorPos + 1);
+ }
+
+ gchar* url = autocorrectURL(pathOrURL.c_str());
+ const string testURL(url);
+
+ resetWebViewToConsistentStateBeforeTesting();
+
+ gLayoutTestController = new LayoutTestController(testURL, expectedPixelHash);
+ topLoadingFrame = 0;
+ done = false;
+
+ gLayoutTestController->setIconDatabaseEnabled(false);
+
+ if (shouldLogFrameLoadDelegates(pathOrURL.c_str()))
+ gLayoutTestController->setDumpFrameLoadCallbacks(true);
+
+ WorkQueue::shared()->clear();
+ WorkQueue::shared()->setFrozen(false);
+
+ bool isSVGW3CTest = (gLayoutTestController->testPathOrURL().find("svg/W3C-SVG-1.1") != string::npos);
+ GtkAllocation size;
+ size.width = isSVGW3CTest ? 480 : maxViewWidth;
+ size.height = isSVGW3CTest ? 360 : maxViewHeight;
+ gtk_widget_size_allocate(GTK_WIDGET(webView), &size);
+
+ if (prevTestBFItem)
+ g_object_unref(prevTestBFItem);
+ WebKitWebBackForwardList* bfList = webkit_web_view_get_back_forward_list(webView);
+ prevTestBFItem = webkit_web_back_forward_list_get_current_item(bfList);
+ if (prevTestBFItem)
+ g_object_ref(prevTestBFItem);
+
+
+ webkit_web_view_open(webView, url);
+
+ g_free(url);
+ url = NULL;
+
+ while (!done)
+ g_main_context_iteration(NULL, TRUE);
+
+ // A blank load seems to be necessary to reset state after certain tests.
+ webkit_web_view_open(webView, "about:blank");
+
+ gLayoutTestController->deref();
+ gLayoutTestController = 0;
+}
+
+void webViewLoadStarted(WebKitWebView* view, WebKitWebFrame* frame, void*)
+{
+ // Make sure we only set this once per test. If it gets cleared, and then set again, we might
+ // end up doing two dumps for one test.
+ if (!topLoadingFrame && !done)
+ topLoadingFrame = frame;
+}
+
+static gboolean processWork(void* data)
+{
+ // quit doing work once a load is in progress
+ while (WorkQueue::shared()->count() > 0 && !topLoadingFrame) {
+ WorkQueueItem* item = WorkQueue::shared()->dequeue();
+ ASSERT(item);
+ item->invoke();
+ delete item;
+ }
+
+ // if we didn't start a new load, then we finished all the commands, so we're ready to dump state
+ if (!topLoadingFrame && !gLayoutTestController->waitToDump())
+ dump();
+
+ return FALSE;
+}
+
+static void webViewLoadFinished(WebKitWebView* view, WebKitWebFrame* frame, void*)
+{
+ if (frame != topLoadingFrame)
+ return;
+
+ topLoadingFrame = 0;
+ WorkQueue::shared()->setFrozen(true); // first complete load freezes the queue for the rest of this test
+ if (gLayoutTestController->waitToDump())
+ return;
+
+ if (WorkQueue::shared()->count())
+ g_timeout_add(0, processWork, 0);
+ else
+ dump();
+}
+
+static void webViewWindowObjectCleared(WebKitWebView* view, WebKitWebFrame* frame, JSGlobalContextRef context, JSObjectRef windowObject, gpointer data)
+{
+ JSValueRef exception = 0;
+ assert(gLayoutTestController);
+
+ gLayoutTestController->makeWindowObject(context, windowObject, &exception);
+ assert(!exception);
+}
+
+static gboolean webViewConsoleMessage(WebKitWebView* view, const gchar* message, unsigned int line, const gchar* sourceId, gpointer data)
+{
+ fprintf(stdout, "CONSOLE MESSAGE: line %d: %s\n", line, message);
+ return TRUE;
+}
+
+
+static gboolean webViewScriptAlert(WebKitWebView* view, WebKitWebFrame* frame, const gchar* message, gpointer data)
+{
+ fprintf(stdout, "ALERT: %s\n", message);
+ return TRUE;
+}
+
+static gboolean webViewScriptPrompt(WebKitWebView* webView, WebKitWebFrame* frame, const gchar* message, const gchar* defaultValue, gchar** value, gpointer data)
+{
+ fprintf(stdout, "PROMPT: %s, default text: %s\n", message, defaultValue);
+ *value = g_strdup(defaultValue);
+ return TRUE;
+}
+
+static gboolean webViewScriptConfirm(WebKitWebView* view, WebKitWebFrame* frame, const gchar* message, gboolean* didConfirm, gpointer data)
+{
+ fprintf(stdout, "CONFIRM: %s\n", message);
+ *didConfirm = TRUE;
+ return TRUE;
+}
+
+static void webViewTitleChanged(WebKitWebView* view, WebKitWebFrame* frame, const gchar* title, gpointer data)
+{
+ if (gLayoutTestController->dumpTitleChanges() && !done)
+ printf("TITLE CHANGED: %s\n", title ? title : "");
+}
+
+int main(int argc, char* argv[])
+{
+ g_thread_init(NULL);
+ gtk_init(&argc, &argv);
+
+ struct option options[] = {
+ {"notree", no_argument, &dumpTree, false},
+ {"pixel-tests", no_argument, &dumpPixels, true},
+ {"tree", no_argument, &dumpTree, true},
+ {NULL, 0, NULL, 0}
+ };
+
+ int option;
+ while ((option = getopt_long(argc, (char* const*)argv, "", options, NULL)) != -1)
+ switch (option) {
+ case '?': // unknown or ambiguous option
+ case ':': // missing argument
+ exit(1);
+ break;
+ }
+
+ GtkWidget* window = gtk_window_new(GTK_WINDOW_POPUP);
+ GtkContainer* container = GTK_CONTAINER(gtk_fixed_new());
+ gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(container));
+ gtk_widget_realize(window);
+
+ webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
+ gtk_container_add(container, GTK_WIDGET(webView));
+ gtk_widget_realize(GTK_WIDGET(webView));
+ mainFrame = webkit_web_view_get_main_frame(webView);
+
+ g_signal_connect(G_OBJECT(webView), "load-started", G_CALLBACK(webViewLoadStarted), 0);
+ g_signal_connect(G_OBJECT(webView), "load-finished", G_CALLBACK(webViewLoadFinished), 0);
+ g_signal_connect(G_OBJECT(webView), "window-object-cleared", G_CALLBACK(webViewWindowObjectCleared), 0);
+ g_signal_connect(G_OBJECT(webView), "console-message", G_CALLBACK(webViewConsoleMessage), 0);
+ g_signal_connect(G_OBJECT(webView), "script-alert", G_CALLBACK(webViewScriptAlert), 0);
+ g_signal_connect(G_OBJECT(webView), "script-prompt", G_CALLBACK(webViewScriptPrompt), 0);
+ g_signal_connect(G_OBJECT(webView), "script-confirm", G_CALLBACK(webViewScriptConfirm), 0);
+ g_signal_connect(G_OBJECT(webView), "title-changed", G_CALLBACK(webViewTitleChanged), 0);
+
+ setDefaultsToConsistentStateValuesForTesting();
+
+ if (argc == optind+1 && strcmp(argv[optind], "-") == 0) {
+ char filenameBuffer[2048];
+ printSeparators = true;
+ while (fgets(filenameBuffer, sizeof(filenameBuffer), stdin)) {
+ char* newLineCharacter = strchr(filenameBuffer, '\n');
+ if (newLineCharacter)
+ *newLineCharacter = '\0';
+
+ if (strlen(filenameBuffer) == 0)
+ continue;
+
+ runTest(filenameBuffer);
+ }
+ } else {
+ printSeparators = (optind < argc-1 || (dumpPixels && dumpTree));
+ for (int i = optind; i != argc; ++i)
+ runTest(argv[i]);
+ }
+
+ return 0;
+}
diff --git a/WebKitTools/DumpRenderTree/gtk/DumpRenderTreeGtk.h b/WebKitTools/DumpRenderTree/gtk/DumpRenderTreeGtk.h
new file mode 100644
index 0000000..1d2f179
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/gtk/DumpRenderTreeGtk.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DumpRenderTreeGtk_h
+#define DumpRenderTreeGtk_h
+
+#include <webkit/webkitdefines.h>
+#include <JavaScriptCore/JSBase.h>
+
+extern WebKitWebFrame* mainFrame;
+extern WebKitWebFrame* topLoadingFrame;
+extern guint waitToDumpWatchdog;
+
+gchar* JSStringCopyUTF8CString(JSStringRef jsString);
+
+#endif // DumpRenderTreeGtk_h
diff --git a/WebKitTools/DumpRenderTree/gtk/GCControllerGtk.cpp b/WebKitTools/DumpRenderTree/gtk/GCControllerGtk.cpp
new file mode 100644
index 0000000..35f1685
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/gtk/GCControllerGtk.cpp
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "GCController.h"
+
+void GCController::collect() const
+{
+}
+
+void GCController::collectOnAlternateThread(bool waitUntilDone) const
+{
+}
+
+size_t GCController::getJSObjectCount() const
+{
+ return 0;
+}
diff --git a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
new file mode 100644
index 0000000..ca3bc36
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
@@ -0,0 +1,323 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
+ * Copyright (C) 2008 Nuanti Ltd.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "LayoutTestController.h"
+
+#include "DumpRenderTree.h"
+#include "WorkQueue.h"
+#include "WorkQueueItem.h"
+#include <JavaScriptCore/JSRetainPtr.h>
+#include <JavaScriptCore/JSStringRef.h>
+
+#include <stdio.h>
+#include <glib.h>
+#include <webkit/webkit.h>
+
+extern "C" {
+bool webkit_web_frame_pause_animation(WebKitWebFrame* frame, const gchar* name, double time, const gchar* element);
+bool webkit_web_frame_pause_transition(WebKitWebFrame* frame, const gchar* name, double time, const gchar* element);
+unsigned int webkit_web_frame_number_of_active_animations(WebKitWebFrame* frame);
+}
+
+LayoutTestController::~LayoutTestController()
+{
+ // FIXME: implement
+}
+
+void LayoutTestController::addDisallowedURL(JSStringRef url)
+{
+ // FIXME: implement
+}
+
+void LayoutTestController::clearBackForwardList()
+{
+ WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);
+ WebKitWebBackForwardList* list = webkit_web_view_get_back_forward_list(webView);
+ WebKitWebHistoryItem* item = webkit_web_back_forward_list_get_current_item(list);
+ g_object_ref(item);
+
+ // We clear the history by setting the back/forward list's capacity to 0
+ // then restoring it back and adding back the current item.
+ gint limit = webkit_web_back_forward_list_get_limit(list);
+ webkit_web_back_forward_list_set_limit(list, 0);
+ webkit_web_back_forward_list_set_limit(list, limit);
+ webkit_web_back_forward_list_add_item(list, item);
+ webkit_web_back_forward_list_go_to_item(list, item);
+ g_object_unref(item);
+}
+
+JSStringRef LayoutTestController::copyDecodedHostName(JSStringRef name)
+{
+ // FIXME: implement
+ return 0;
+}
+
+JSStringRef LayoutTestController::copyEncodedHostName(JSStringRef name)
+{
+ // FIXME: implement
+ return 0;
+}
+
+void LayoutTestController::display()
+{
+ displayWebView();
+}
+
+void LayoutTestController::keepWebHistory()
+{
+ // FIXME: implement
+}
+
+size_t LayoutTestController::webHistoryItemCount()
+{
+ // FIXME: implement
+ return 0;
+}
+
+void LayoutTestController::notifyDone()
+{
+ if (m_waitToDump && !topLoadingFrame && !WorkQueue::shared()->count())
+ dump();
+ m_waitToDump = false;
+}
+
+JSStringRef LayoutTestController::pathToLocalResource(JSContextRef context, JSStringRef url)
+{
+ // Function introduced in r28690. This may need special-casing on Windows.
+ return JSStringRetain(url); // Do nothing on Unix.
+}
+
+void LayoutTestController::queueBackNavigation(int howFarBack)
+{
+ WorkQueue::shared()->queue(new BackItem(howFarBack));
+}
+
+void LayoutTestController::queueForwardNavigation(int howFarForward)
+{
+ WorkQueue::shared()->queue(new ForwardItem(howFarForward));
+}
+
+void LayoutTestController::queueLoad(JSStringRef url, JSStringRef target)
+{
+ // FIXME: We need to resolve relative URLs here
+ WorkQueue::shared()->queue(new LoadItem(url, target));
+}
+
+void LayoutTestController::queueReload()
+{
+ WorkQueue::shared()->queue(new ReloadItem);
+}
+
+void LayoutTestController::queueScript(JSStringRef script)
+{
+ WorkQueue::shared()->queue(new ScriptItem(script));
+}
+
+void LayoutTestController::setAcceptsEditing(bool acceptsEditing)
+{
+ WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);
+ webkit_web_view_set_editable(webView, acceptsEditing);
+}
+
+void LayoutTestController::setCustomPolicyDelegate(bool setDelegate, bool permissive)
+{
+ // FIXME: implement
+}
+
+void LayoutTestController::setMainFrameIsFirstResponder(bool flag)
+{
+ // FIXME: implement
+}
+
+void LayoutTestController::setTabKeyCyclesThroughElements(bool cycles)
+{
+ // FIXME: implement
+}
+
+void LayoutTestController::setUseDashboardCompatibilityMode(bool flag)
+{
+ // FIXME: implement
+}
+
+static gchar* userStyleSheet = NULL;
+static gboolean userStyleSheetEnabled = TRUE;
+
+void LayoutTestController::setUserStyleSheetEnabled(bool flag)
+{
+ userStyleSheetEnabled = flag;
+
+ WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);
+ WebKitWebSettings* settings = webkit_web_view_get_settings(webView);
+ if (flag && userStyleSheet)
+ g_object_set(G_OBJECT(settings), "user-stylesheet-uri", userStyleSheet, NULL);
+ else
+ g_object_set(G_OBJECT(settings), "user-stylesheet-uri", "", NULL);
+}
+
+void LayoutTestController::setUserStyleSheetLocation(JSStringRef path)
+{
+ g_free(userStyleSheet);
+ userStyleSheet = JSStringCopyUTF8CString(path);
+ if (userStyleSheetEnabled)
+ setUserStyleSheetEnabled(true);
+}
+
+void LayoutTestController::setWindowIsKey(bool windowIsKey)
+{
+ // FIXME: implement
+}
+
+void LayoutTestController::setSmartInsertDeleteEnabled(bool flag)
+{
+ // FIXME: implement
+}
+
+static gboolean waitToDumpWatchdogFired(void*)
+{
+ const char* message = "FAIL: Timed out waiting for notifyDone to be called\n";
+ fprintf(stderr, "%s", message);
+ fprintf(stdout, "%s", message);
+ waitToDumpWatchdog = 0;
+ dump();
+ return FALSE;
+}
+
+void LayoutTestController::setWaitToDump(bool waitUntilDone)
+{
+ static const int timeoutSeconds = 10;
+
+ m_waitToDump = waitUntilDone;
+ if (m_waitToDump && !waitToDumpWatchdog)
+ waitToDumpWatchdog = g_timeout_add_seconds(timeoutSeconds, waitToDumpWatchdogFired, 0);
+}
+
+int LayoutTestController::windowCount()
+{
+ // FIXME: implement
+ return 1;
+}
+
+void LayoutTestController::setPrivateBrowsingEnabled(bool flag)
+{
+ WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
+ ASSERT(view);
+
+ WebKitWebSettings* settings = webkit_web_view_get_settings(view);
+ g_object_set(G_OBJECT(settings), "enable-private-browsing", flag, NULL);
+}
+
+void LayoutTestController::setAuthorAndUserStylesEnabled(bool flag)
+{
+ // FIXME: implement
+}
+
+void LayoutTestController::setIconDatabaseEnabled(bool flag)
+{
+ // FIXME: implement
+}
+
+void LayoutTestController::setJavaScriptProfilingEnabled(bool flag)
+{
+ WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
+ ASSERT(view);
+
+ WebKitWebSettings* settings = webkit_web_view_get_settings(view);
+ g_object_set(G_OBJECT(settings), "enable-developer-extras", flag, NULL);
+
+ WebKitWebInspector* inspector = webkit_web_view_get_inspector(view);
+ g_object_set(G_OBJECT(inspector), "javascript-profiling-enabled", flag, NULL);
+}
+
+void LayoutTestController::setSelectTrailingWhitespaceEnabled(bool flag)
+{
+ // FIXME: implement
+}
+
+void LayoutTestController::setPopupBlockingEnabled(bool popupBlockingEnabled)
+{
+ // FIXME: implement
+}
+
+bool LayoutTestController::elementDoesAutoCompleteForElementWithId(JSStringRef id)
+{
+ // FIXME: implement
+ return false;
+}
+
+void LayoutTestController::execCommand(JSStringRef name, JSStringRef value)
+{
+ // FIXME: implement
+}
+
+bool LayoutTestController::isCommandEnabled(JSStringRef /*name*/)
+{
+ // FIXME: implement
+ return false;
+}
+
+void LayoutTestController::setPersistentUserStyleSheetLocation(JSStringRef jsURL)
+{
+ // FIXME: implement
+}
+
+void LayoutTestController::clearPersistentUserStyleSheet()
+{
+ // FIXME: implement
+}
+
+void LayoutTestController::clearAllDatabases()
+{
+ // FIXME: implement
+}
+
+void LayoutTestController::setDatabaseQuota(unsigned long long quota)
+{
+ // FIXME: implement
+}
+
+bool LayoutTestController::pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId)
+{
+ gchar* name = JSStringCopyUTF8CString(animationName);
+ gchar* element = JSStringCopyUTF8CString(elementId);
+ return webkit_web_frame_pause_animation(mainFrame, name, time, element);
+}
+
+bool LayoutTestController::pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId)
+{
+ gchar* name = JSStringCopyUTF8CString(propertyName);
+ gchar* element = JSStringCopyUTF8CString(elementId);
+ return webkit_web_frame_pause_transition(mainFrame, name, time, element);
+}
+
+unsigned LayoutTestController::numberOfActiveAnimations() const
+{
+ return webkit_web_frame_number_of_active_animations(mainFrame);
+}
diff --git a/WebKitTools/DumpRenderTree/gtk/TestNetscapePlugin/ForwardingHeaders/WebKit/npapi.h b/WebKitTools/DumpRenderTree/gtk/TestNetscapePlugin/ForwardingHeaders/WebKit/npapi.h
new file mode 100644
index 0000000..08706f7
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/gtk/TestNetscapePlugin/ForwardingHeaders/WebKit/npapi.h
@@ -0,0 +1 @@
+#include <bridge/npapi.h>
diff --git a/WebKitTools/DumpRenderTree/gtk/TestNetscapePlugin/ForwardingHeaders/WebKit/npfunctions.h b/WebKitTools/DumpRenderTree/gtk/TestNetscapePlugin/ForwardingHeaders/WebKit/npfunctions.h
new file mode 100644
index 0000000..54a603d
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/gtk/TestNetscapePlugin/ForwardingHeaders/WebKit/npfunctions.h
@@ -0,0 +1 @@
+#include <plugins/npfunctions.h>
diff --git a/WebKitTools/DumpRenderTree/gtk/TestNetscapePlugin/ForwardingHeaders/WebKit/npruntime.h b/WebKitTools/DumpRenderTree/gtk/TestNetscapePlugin/ForwardingHeaders/WebKit/npruntime.h
new file mode 100644
index 0000000..00bbc18
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/gtk/TestNetscapePlugin/ForwardingHeaders/WebKit/npruntime.h
@@ -0,0 +1 @@
+#include <bridge/npruntime.h>
diff --git a/WebKitTools/DumpRenderTree/gtk/TestNetscapePlugin/TestNetscapePlugin.cpp b/WebKitTools/DumpRenderTree/gtk/TestNetscapePlugin/TestNetscapePlugin.cpp
new file mode 100644
index 0000000..9d85476
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/gtk/TestNetscapePlugin/TestNetscapePlugin.cpp
@@ -0,0 +1,309 @@
+/*
+ * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Zan Dobersek <zandobersek@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "PluginObject.h"
+
+#include "npapi.h"
+#include "npruntime.h"
+#include "npfunctions.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/Xlib.h>
+
+extern "C" {
+ NPError NP_Initialize (NPNetscapeFuncs *aMozillaVTable, NPPluginFuncs *aPluginVTable);
+ NPError NP_Shutdown(void);
+ NPError NP_GetValue(void *future, NPPVariable variable, void *value);
+ char* NP_GetMIMEDescription(void);
+}
+
+static NPError
+webkit_test_plugin_new_instance(NPMIMEType mimetype,
+ NPP instance,
+ uint16_t mode,
+ int16_t argc,
+ char *argn[],
+ char *argv[],
+ NPSavedData *savedData)
+{
+ if (browser->version >= 14) {
+ PluginObject* obj = (PluginObject*)browser->createobject(instance, getPluginClass());
+
+ for (int i = 0; i < argc; i++) {
+ if (strcasecmp(argn[i], "onstreamload") == 0 && !obj->onStreamLoad)
+ obj->onStreamLoad = strdup(argv[i]);
+ else if (strcasecmp(argn[i], "onStreamDestroy") == 0 && !obj->onStreamDestroy)
+ obj->onStreamDestroy = strdup(argv[i]);
+ else if (strcasecmp(argn[i], "onURLNotify") == 0 && !obj->onURLNotify)
+ obj->onURLNotify = strdup(argv[i]);
+ else if (strcasecmp(argn[i], "src") == 0 &&
+ strcasecmp(argv[i], "data:application/x-webkit-test-netscape,returnerrorfromnewstream") == 0)
+ obj->returnErrorFromNewStream = TRUE;
+ else if (strcasecmp(argn[i], "logfirstsetwindow") == 0)
+ obj->logSetWindow = TRUE;
+ }
+
+ instance->pdata = obj;
+ }
+
+ return NPERR_NO_ERROR;
+}
+
+static NPError
+webkit_test_plugin_destroy_instance(NPP instance, NPSavedData **save)
+{
+ PluginObject* obj = static_cast<PluginObject*>(instance->pdata);
+ if (obj) {
+ if (obj->onStreamLoad)
+ free(obj->onStreamLoad);
+
+ if (obj->onStreamDestroy)
+ free(obj->onStreamDestroy);
+
+ if (obj->onURLNotify)
+ free(obj->onURLNotify);
+
+ if (obj->logDestroy)
+ printf("PLUGIN: NPP_Destroy\n");
+
+ browser->releaseobject(&obj->header);
+ }
+
+ return NPERR_NO_ERROR;
+}
+
+static NPError
+webkit_test_plugin_set_window(NPP instance, NPWindow *window)
+{
+ PluginObject* obj = static_cast<PluginObject*>(instance->pdata);
+
+ if (obj) {
+ if (obj->logSetWindow) {
+ printf("PLUGIN: NPP_SetWindow: %d %d\n", (int)window->width, (int)window->height);
+ obj->logSetWindow = false;
+ }
+ }
+
+ return NPERR_NO_ERROR;
+}
+
+static void executeScript(const PluginObject* obj, const char* script)
+{
+ NPObject *windowScriptObject;
+ browser->getvalue(obj->npp, NPNVWindowNPObject, &windowScriptObject);
+
+ NPString npScript;
+ npScript.UTF8Characters = script;
+ npScript.UTF8Length = strlen(script);
+
+ NPVariant browserResult;
+ browser->evaluate(obj->npp, windowScriptObject, &npScript, &browserResult);
+ browser->releasevariantvalue(&browserResult);
+}
+
+static NPError
+webkit_test_plugin_new_stream(NPP instance,
+ NPMIMEType type,
+ NPStream *stream,
+ NPBool seekable,
+ uint16* stype)
+{
+ PluginObject* obj = static_cast<PluginObject*>(instance->pdata);
+ obj->stream = stream;
+ *stype = NP_ASFILEONLY;
+
+ if (obj->returnErrorFromNewStream)
+ return NPERR_GENERIC_ERROR;
+
+ if (browser->version >= NPVERS_HAS_RESPONSE_HEADERS)
+ notifyStream(obj, stream->url, stream->headers);
+
+ if (obj->onStreamLoad)
+ executeScript(obj, obj->onStreamLoad);
+
+ return NPERR_NO_ERROR;
+}
+
+static NPError
+webkit_test_plugin_destroy_stream(NPP instance, NPStream *stream, NPError reason)
+{
+ PluginObject* obj = (PluginObject*)instance->pdata;
+
+ if (obj->onStreamDestroy)
+ executeScript(obj, obj->onStreamDestroy);
+
+ return NPERR_NO_ERROR;
+}
+
+static void
+webkit_test_plugin_stream_as_file(NPP instance, NPStream *stream, const char* fname)
+{
+}
+
+static int32
+webkit_test_plugin_write_ready(NPP instance, NPStream *stream)
+{
+ return 0;
+}
+
+static int32
+webkit_test_plugin_write(NPP instance,
+ NPStream *stream,
+ int32_t offset,
+ int32_t len,
+ void *buffer)
+{
+ return 0;
+}
+
+static void
+webkit_test_plugin_print(NPP instance, NPPrint* platformPrint)
+{
+}
+
+static int16_t
+webkit_test_plugin_handle_event(NPP instance, void* event)
+{
+ PluginObject* obj = static_cast<PluginObject*>(instance->pdata);
+ if (!obj->eventLogging)
+ return 0;
+
+ XEvent* evt = static_cast<XEvent*>(event);
+ fprintf(stderr, "PLUGIN: event %d\n", evt->type);
+
+ return 0;
+}
+
+static void
+webkit_test_plugin_url_notify(NPP instance, const char* url, NPReason reason, void* notifyData)
+{
+ PluginObject* obj = static_cast<PluginObject*>(instance->pdata);
+
+ if (obj->onURLNotify)
+ executeScript(obj, obj->onURLNotify);
+
+ handleCallback(obj, url, reason, notifyData);
+}
+
+static NPError
+webkit_test_plugin_get_value(NPP instance, NPPVariable variable, void *value)
+{
+ NPError err = NPERR_NO_ERROR;
+
+ switch (variable) {
+ case NPPVpluginNameString:
+ *((char **)value) = "WebKit Test PlugIn";
+ break;
+ case NPPVpluginDescriptionString:
+ *((char **)value) = "Simple Netscape plug-in that handles test content for WebKit";
+ break;
+ case NPPVpluginNeedsXEmbed:
+ *((NPBool *)value) = TRUE;
+ break;
+ case NPPVpluginScriptableIID:
+ case NPPVpluginScriptableInstance:
+ case NPPVpluginScriptableNPObject:
+ err = NPERR_GENERIC_ERROR;
+ break;
+ default:
+ fprintf(stderr, "Unhandled variable\n");
+ err = NPERR_GENERIC_ERROR;
+ break;
+ }
+
+ if (variable == NPPVpluginScriptableNPObject) {
+ void **v = (void **)value;
+ PluginObject* obj = static_cast<PluginObject*>(instance->pdata);
+ browser->retainobject((NPObject *)obj);
+ *v = obj;
+ err = NPERR_NO_ERROR;
+ }
+
+ return err;
+}
+
+static NPError
+webkit_test_plugin_set_value(NPP instance, NPNVariable variable, void *value)
+{
+ return NPERR_NO_ERROR;
+}
+
+char *
+NP_GetMIMEDescription(void)
+{
+ return "application/x-webkit-test-netscape:testnetscape:test netscape content";
+}
+
+NPError
+NP_Initialize (NPNetscapeFuncs *aMozillaVTable, NPPluginFuncs *aPluginVTable)
+{
+ if (aMozillaVTable == NULL || aPluginVTable == NULL)
+ return NPERR_INVALID_FUNCTABLE_ERROR;
+
+ if ((aMozillaVTable->version >> 8) > NP_VERSION_MAJOR)
+ return NPERR_INCOMPATIBLE_VERSION_ERROR;
+
+ if (aMozillaVTable->size < sizeof (NPNetscapeFuncs))
+ return NPERR_INVALID_FUNCTABLE_ERROR;
+ if (aPluginVTable->size < sizeof (NPPluginFuncs))
+ return NPERR_INVALID_FUNCTABLE_ERROR;
+
+ browser = aMozillaVTable;
+
+ aPluginVTable->size = sizeof (NPPluginFuncs);
+ aPluginVTable->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
+ aPluginVTable->newp = webkit_test_plugin_new_instance;
+ aPluginVTable->destroy = webkit_test_plugin_destroy_instance;
+ aPluginVTable->setwindow = webkit_test_plugin_set_window;
+ aPluginVTable->newstream = webkit_test_plugin_new_stream;
+ aPluginVTable->destroystream = webkit_test_plugin_destroy_stream;
+ aPluginVTable->asfile = webkit_test_plugin_stream_as_file;
+ aPluginVTable->writeready = webkit_test_plugin_write_ready;
+ aPluginVTable->write = webkit_test_plugin_write;
+ aPluginVTable->print = webkit_test_plugin_print;
+ aPluginVTable->event = webkit_test_plugin_handle_event;
+ aPluginVTable->urlnotify = webkit_test_plugin_url_notify;
+ aPluginVTable->javaClass = NULL;
+ aPluginVTable->getvalue = webkit_test_plugin_get_value;
+ aPluginVTable->setvalue = webkit_test_plugin_set_value;
+
+ return NPERR_NO_ERROR;
+}
+
+NPError
+NP_Shutdown(void)
+{
+ return NPERR_NO_ERROR;
+}
+
+NPError
+NP_GetValue(void *future, NPPVariable variable, void *value)
+{
+ return webkit_test_plugin_get_value(NULL, variable, value);
+}
diff --git a/WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp b/WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp
new file mode 100644
index 0000000..2e81ca8
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2007 Alp Toker <alp@atoker.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "WorkQueueItem.h"
+
+#include "DumpRenderTree.h"
+
+#include <JavaScriptCore/JSStringRef.h>
+#include <webkit/webkit.h>
+#include <string.h>
+
+// Returns a newly allocated UTF-8 character buffer which must be freed with g_free()
+gchar* JSStringCopyUTF8CString(JSStringRef jsString)
+{
+ size_t dataSize = JSStringGetMaximumUTF8CStringSize(jsString);
+ gchar* utf8 = (gchar*)g_malloc(dataSize);
+ JSStringGetUTF8CString(jsString, utf8, dataSize);
+
+ return utf8;
+}
+
+void LoadItem::invoke() const
+{
+ gchar* targetString = JSStringCopyUTF8CString(target());
+
+ WebKitWebFrame* targetFrame;
+ if (!strlen(targetString))
+ targetFrame = mainFrame;
+ else
+ targetFrame = webkit_web_frame_find_frame(mainFrame, targetString);
+ g_free(targetString);
+
+ gchar* urlString = JSStringCopyUTF8CString(url());
+ WebKitNetworkRequest* request = webkit_network_request_new(urlString);
+ g_free(urlString);
+ webkit_web_frame_load_request(targetFrame, request);
+ g_object_unref(request);
+}
+
+void ReloadItem::invoke() const
+{
+ webkit_web_frame_reload(mainFrame);
+}
+
+void ScriptItem::invoke() const
+{
+ WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);
+ gchar* scriptString = JSStringCopyUTF8CString(script());
+ webkit_web_view_execute_script(webView, scriptString);
+ g_free(scriptString);
+}
+
+void BackForwardItem::invoke() const
+{
+ WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);
+ if (m_howFar == 1)
+ webkit_web_view_go_forward(webView);
+ else if (m_howFar == -1)
+ webkit_web_view_go_back(webView);
+ else {
+ WebKitWebBackForwardList* webBackForwardList = webkit_web_view_get_back_forward_list(webView);
+ WebKitWebHistoryItem* item = webkit_web_back_forward_list_get_nth_item(webBackForwardList, m_howFar);
+ webkit_web_view_go_to_back_forward_item(webView, item);
+ }
+}
diff --git a/WebKitTools/DumpRenderTree/mac/AccessibilityControllerMac.mm b/WebKitTools/DumpRenderTree/mac/AccessibilityControllerMac.mm
new file mode 100644
index 0000000..482c4f3
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/AccessibilityControllerMac.mm
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2008 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. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "DumpRenderTree.h"
+#import "AccessibilityController.h"
+
+#import "AccessibilityUIElement.h"
+#import <Foundation/Foundation.h>
+#import <WebKit/WebFrame.h>
+#import <WebKit/WebHTMLView.h>
+
+AccessibilityController::AccessibilityController()
+{
+}
+
+AccessibilityController::~AccessibilityController()
+{
+}
+
+AccessibilityUIElement AccessibilityController::focusedElement()
+{
+ // FIXME: we could do some caching here.
+ id accessibilityObject = [[[mainFrame frameView] documentView] accessibilityFocusedUIElement];
+ return AccessibilityUIElement(accessibilityObject);
+}
+
+AccessibilityUIElement AccessibilityController::rootElement()
+{
+ // FIXME: we could do some caching here.
+ id accessibilityObject = [[mainFrame frameView] documentView];
+ return AccessibilityUIElement(accessibilityObject);
+}
diff --git a/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm b/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
new file mode 100644
index 0000000..2c4546d
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
@@ -0,0 +1,471 @@
+/*
+ * Copyright (C) 2008 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. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "DumpRenderTree.h"
+#import "AccessibilityUIElement.h"
+
+#import <Foundation/Foundation.h>
+#import <JavaScriptCore/JSStringRef.h>
+#import <JavaScriptCore/JSStringRefCF.h>
+#import <WebKit/WebFrame.h>
+#import <WebKit/WebHTMLView.h>
+#import <WebKit/WebTypesInternal.h>
+#import <wtf/RetainPtr.h>
+#import <wtf/Vector.h>
+
+@interface NSObject (WebKitAccessibilityArrayCategory)
+- (NSArray *)accessibilityArrayAttributeValues:(NSString *)attribute index:(NSUInteger)index maxCount:(NSUInteger)maxCount;
+@end
+
+AccessibilityUIElement::AccessibilityUIElement(PlatformUIElement element)
+ : m_element(element)
+{
+ [m_element retain];
+}
+
+AccessibilityUIElement::AccessibilityUIElement(const AccessibilityUIElement& other)
+ : m_element(other.m_element)
+{
+ [m_element retain];
+}
+
+AccessibilityUIElement::~AccessibilityUIElement()
+{
+ [m_element release];
+}
+
+@interface NSString (JSStringRefAdditions)
++ (NSString *)stringWithJSStringRef:(JSStringRef)jsStringRef;
+- (JSStringRef)createJSStringRef;
+@end
+
+@implementation NSString (JSStringRefAdditions)
+
++ (NSString *)stringWithJSStringRef:(JSStringRef)jsStringRef
+{
+ if (!jsStringRef)
+ return NULL;
+
+ CFStringRef cfString = JSStringCopyCFString(kCFAllocatorDefault, jsStringRef);
+ return [(NSString *)cfString autorelease];
+}
+
+- (JSStringRef)createJSStringRef
+{
+ return JSStringCreateWithCFString((CFStringRef)self);
+}
+
+@end
+
+static NSString* descriptionOfValue(id valueObject, id focusedAccessibilityObject)
+{
+ if (!valueObject)
+ return NULL;
+
+ if ([valueObject isKindOfClass:[NSArray class]])
+ return [NSString stringWithFormat:@"<array of size %d>", [(NSArray*)valueObject count]];
+
+ if ([valueObject isKindOfClass:[NSNumber class]])
+ return [(NSNumber*)valueObject stringValue];
+
+ if ([valueObject isKindOfClass:[NSValue class]]) {
+ NSString* type = [NSString stringWithCString:[valueObject objCType] encoding:NSASCIIStringEncoding];
+ NSValue* value = (NSValue*)valueObject;
+ if ([type rangeOfString:@"NSRect"].length > 0)
+ return [NSString stringWithFormat:@"NSRect: %@", NSStringFromRect([value rectValue])];
+ if ([type rangeOfString:@"NSPoint"].length > 0)
+ return [NSString stringWithFormat:@"NSPoint: %@", NSStringFromPoint([value pointValue])];
+ if ([type rangeOfString:@"NSSize"].length > 0)
+ return [NSString stringWithFormat:@"NSSize: %@", NSStringFromSize([value sizeValue])];
+ if ([type rangeOfString:@"NSRange"].length > 0)
+ return [NSString stringWithFormat:@"NSRange: %@", NSStringFromRange([value rangeValue])];
+ }
+
+ // Strip absolute URL paths
+ NSString* description = [valueObject description];
+ NSRange range = [description rangeOfString:@"LayoutTests"];
+ if (range.length)
+ return [description substringFromIndex:range.location];
+
+ // Strip pointer locations
+ if ([description rangeOfString:@"0x"].length) {
+ NSString* role = [focusedAccessibilityObject accessibilityAttributeValue:@"AXRole"];
+ NSString* title = [focusedAccessibilityObject accessibilityAttributeValue:@"AXTitle"];
+ if ([title length])
+ return [NSString stringWithFormat:@"<%@: '%@'>", role, title];
+ return [NSString stringWithFormat:@"<%@>", role];
+ }
+
+ return [valueObject description];
+}
+
+static NSString* attributesOfElement(id accessibilityObject)
+{
+ NSArray* supportedAttributes = [accessibilityObject accessibilityAttributeNames];
+
+ NSMutableString* attributesString = [NSMutableString string];
+ for (NSUInteger i = 0; i < [supportedAttributes count]; ++i) {
+ NSString* attribute = [supportedAttributes objectAtIndex:i];
+
+ // Right now, position provides useless and screen-specific information, so we do not
+ // want to include it for the sake of universally passing tests.
+ if ([attribute isEqualToString:@"AXPosition"])
+ continue;
+
+ // accessibilityAttributeValue: can throw an if an attribute is not returned.
+ // For DumpRenderTree's purpose, we should ignore those exceptions
+ @try {
+ id valueObject = [accessibilityObject accessibilityAttributeValue:attribute];
+ NSString* value = descriptionOfValue(valueObject, accessibilityObject);
+ [attributesString appendFormat:@"%@: %@\n", attribute, value];
+ } @catch (NSException* e) { }
+ }
+
+ return attributesString;
+}
+
+static JSStringRef concatenateAttributeAndValue(NSString* attribute, NSString* value)
+{
+ Vector<UniChar> buffer([attribute length]);
+ [attribute getCharacters:buffer.data()];
+ buffer.append(':');
+ buffer.append(' ');
+
+ Vector<UniChar> valueBuffer([value length]);
+ [value getCharacters:valueBuffer.data()];
+ buffer.append(valueBuffer);
+
+ return JSStringCreateWithCharacters(buffer.data(), buffer.size());
+}
+
+static void convertNSArrayToVector(NSArray* array, Vector<AccessibilityUIElement>& elementVector)
+{
+ NSUInteger count = [array count];
+ for (NSUInteger i = 0; i < count; ++i)
+ elementVector.append(AccessibilityUIElement([array objectAtIndex:i]));
+}
+
+static JSStringRef descriptionOfElements(Vector<AccessibilityUIElement>& elementVector)
+{
+ NSMutableString* allElementString = [NSMutableString string];
+ size_t size = elementVector.size();
+ for (size_t i = 0; i < size; ++i) {
+ NSString* attributes = attributesOfElement(elementVector[i].platformUIElement());
+ [allElementString appendFormat:@"%@\n------------\n", attributes];
+ }
+
+ return [allElementString createJSStringRef];
+}
+
+void AccessibilityUIElement::getLinkedUIElements(Vector<AccessibilityUIElement>& elementVector)
+{
+ NSArray* linkedElements = [m_element accessibilityAttributeValue:NSAccessibilityLinkedUIElementsAttribute];
+ convertNSArrayToVector(linkedElements, elementVector);
+}
+
+void AccessibilityUIElement::getDocumentLinks(Vector<AccessibilityUIElement>& elementVector)
+{
+ NSArray* linkElements = [m_element accessibilityAttributeValue:@"AXLinkUIElements"];
+ convertNSArrayToVector(linkElements, elementVector);
+}
+
+void AccessibilityUIElement::getChildren(Vector<AccessibilityUIElement>& elementVector)
+{
+ NSArray* children = [m_element accessibilityAttributeValue:NSAccessibilityChildrenAttribute];
+ convertNSArrayToVector(children, elementVector);
+}
+
+void AccessibilityUIElement::getChildrenWithRange(Vector<AccessibilityUIElement>& elementVector, unsigned location, unsigned length)
+{
+ NSArray* children = [m_element accessibilityArrayAttributeValues:NSAccessibilityChildrenAttribute index:location maxCount:length];
+ convertNSArrayToVector(children, elementVector);
+}
+
+AccessibilityUIElement AccessibilityUIElement::getChildAtIndex(unsigned index)
+{
+ Vector<AccessibilityUIElement> children;
+ getChildrenWithRange(children, index, 1);
+
+ if (children.size() == 1)
+ return children[0];
+ return nil;
+}
+
+AccessibilityUIElement AccessibilityUIElement::titleUIElement()
+{
+ id accessibilityObject = [m_element accessibilityAttributeValue:NSAccessibilityTitleUIElementAttribute];
+ if (accessibilityObject)
+ return AccessibilityUIElement(accessibilityObject);
+
+ return nil;
+}
+
+AccessibilityUIElement AccessibilityUIElement::parentElement()
+{
+ id accessibilityObject = [m_element accessibilityAttributeValue:NSAccessibilityParentAttribute];
+ if (accessibilityObject)
+ return AccessibilityUIElement(accessibilityObject);
+
+ return nil;
+}
+
+JSStringRef AccessibilityUIElement::attributesOfLinkedUIElements()
+{
+ Vector<AccessibilityUIElement> linkedElements;
+ getLinkedUIElements(linkedElements);
+ return descriptionOfElements(linkedElements);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfDocumentLinks()
+{
+ Vector<AccessibilityUIElement> linkElements;
+ getDocumentLinks(linkElements);
+ return descriptionOfElements(linkElements);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfChildren()
+{
+ Vector<AccessibilityUIElement> children;
+ getChildren(children);
+ return descriptionOfElements(children);
+}
+
+JSStringRef AccessibilityUIElement::allAttributes()
+{
+ NSString* attributes = attributesOfElement(m_element);
+ return [attributes createJSStringRef];
+}
+
+JSStringRef AccessibilityUIElement::attributeValue(JSStringRef attribute)
+{
+ id value = [m_element accessibilityAttributeValue:[NSString stringWithJSStringRef:attribute]];
+ if (![value isKindOfClass:[NSString class]])
+ return NULL;
+ return [value createJSStringRef];
+}
+
+bool AccessibilityUIElement::isAttributeSettable(JSStringRef attribute)
+{
+ return [m_element accessibilityIsAttributeSettable:[NSString stringWithJSStringRef:attribute]];
+}
+
+JSStringRef AccessibilityUIElement::parameterizedAttributeNames()
+{
+ NSArray* supportedParameterizedAttributes = [m_element accessibilityParameterizedAttributeNames];
+
+ NSMutableString* attributesString = [NSMutableString string];
+ for (NSUInteger i = 0; i < [supportedParameterizedAttributes count]; ++i) {
+ [attributesString appendFormat:@"%@\n", [supportedParameterizedAttributes objectAtIndex:i]];
+ }
+
+ return [attributesString createJSStringRef];
+}
+
+JSStringRef AccessibilityUIElement::role()
+{
+ NSString* role = descriptionOfValue([m_element accessibilityAttributeValue:@"AXRole"], m_element);
+ return concatenateAttributeAndValue(@"AXRole", role);
+}
+
+JSStringRef AccessibilityUIElement::title()
+{
+ NSString* title = descriptionOfValue([m_element accessibilityAttributeValue:@"AXTitle"], m_element);
+ return concatenateAttributeAndValue(@"AXTitle", title);
+}
+
+JSStringRef AccessibilityUIElement::description()
+{
+ id description = descriptionOfValue([m_element accessibilityAttributeValue:@"AXDescription"], m_element);
+ return concatenateAttributeAndValue(@"AXDescription", description);
+}
+
+double AccessibilityUIElement::width()
+{
+ NSValue* sizeValue = [m_element accessibilityAttributeValue:@"AXSize"];
+ return static_cast<double>([sizeValue sizeValue].width);
+}
+
+double AccessibilityUIElement::height()
+{
+ NSValue* sizeValue = [m_element accessibilityAttributeValue:@"AXSize"];
+ return static_cast<double>([sizeValue sizeValue].height);
+}
+
+double AccessibilityUIElement::intValue()
+{
+ id value = [m_element accessibilityAttributeValue:@"AXValue"];
+ if ([value isKindOfClass:[NSNumber class]])
+ return [(NSNumber*)value doubleValue];
+ return 0.0f;
+}
+
+double AccessibilityUIElement::minValue()
+{
+ id value = [m_element accessibilityAttributeValue:@"AXMinValue"];
+ if ([value isKindOfClass:[NSNumber class]])
+ return [(NSNumber*)value doubleValue];
+ return 0.0f;
+}
+
+double AccessibilityUIElement::maxValue()
+{
+ id value = [m_element accessibilityAttributeValue:@"AXMaxValue"];
+ if ([value isKindOfClass:[NSNumber class]])
+ return [(NSNumber*)value doubleValue];
+ return 0.0;
+}
+
+int AccessibilityUIElement::insertionPointLineNumber()
+{
+ id value = [m_element accessibilityAttributeValue:@"AXInsertionPointLineNumber"];
+ if ([value isKindOfClass:[NSNumber class]])
+ return [(NSNumber *)value intValue];
+ return -1;
+}
+
+bool AccessibilityUIElement::supportsPressAction()
+{
+ NSArray* actions = [m_element accessibilityActionNames];
+ return [actions containsObject:@"AXPress"];
+}
+
+// parameterized attributes
+int AccessibilityUIElement::lineForIndex(int index)
+{
+ id value = [m_element accessibilityAttributeValue:@"AXLineForIndex" forParameter:[NSNumber numberWithInt:index]];
+ if ([value isKindOfClass:[NSNumber class]])
+ return [(NSNumber *)value intValue];
+ return -1;
+}
+
+JSStringRef AccessibilityUIElement::boundsForRange(unsigned location, unsigned length)
+{
+ NSRange range = NSMakeRange(location, length);
+ id value = [m_element accessibilityAttributeValue:NSAccessibilityBoundsForRangeParameterizedAttribute forParameter:[NSValue valueWithRange:range]];
+ NSRect rect = NSMakeRect(0,0,0,0);
+ if ([value isKindOfClass:[NSValue class]])
+ rect = [value rectValue];
+
+ // don't return position information because it is platform dependent
+ NSMutableString* boundsDescription = [NSMutableString stringWithFormat:@"{{%f, %f}, {%f, %f}}",-1.0f,-1.0f,rect.size.width,rect.size.height];
+ return [boundsDescription createJSStringRef];
+}
+
+JSStringRef AccessibilityUIElement::attributesOfColumnHeaders()
+{
+ // not yet defined in AppKit... odd
+ NSArray* columnHeadersArray = [m_element accessibilityAttributeValue:@"AXColumnHeaderUIElements"];
+ Vector<AccessibilityUIElement> columnHeadersVector;
+ convertNSArrayToVector(columnHeadersArray, columnHeadersVector);
+ return descriptionOfElements(columnHeadersVector);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfRowHeaders()
+{
+ NSArray* rowHeadersArray = [m_element accessibilityAttributeValue:@"AXRowHeaderUIElements"];
+ Vector<AccessibilityUIElement> rowHeadersVector;
+ convertNSArrayToVector(rowHeadersArray, rowHeadersVector);
+ return descriptionOfElements(rowHeadersVector);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfColumns()
+{
+ NSArray* columnsArray = [m_element accessibilityAttributeValue:NSAccessibilityColumnsAttribute];
+ Vector<AccessibilityUIElement> columnsVector;
+ convertNSArrayToVector(columnsArray, columnsVector);
+ return descriptionOfElements(columnsVector);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfRows()
+{
+ NSArray* rowsArray = [m_element accessibilityAttributeValue:NSAccessibilityRowsAttribute];
+ Vector<AccessibilityUIElement> rowsVector;
+ convertNSArrayToVector(rowsArray, rowsVector);
+ return descriptionOfElements(rowsVector);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfVisibleCells()
+{
+ NSArray* cellsArray = [m_element accessibilityAttributeValue:@"AXVisibleCells"];
+ Vector<AccessibilityUIElement> cellsVector;
+ convertNSArrayToVector(cellsArray, cellsVector);
+ return descriptionOfElements(cellsVector);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfHeader()
+{
+ id headerObject = [m_element accessibilityAttributeValue:NSAccessibilityHeaderAttribute];
+ if (!headerObject)
+ return [@"" createJSStringRef];
+
+ Vector<AccessibilityUIElement> headerVector;
+ headerVector.append(headerObject);
+ return descriptionOfElements(headerVector);
+}
+
+int AccessibilityUIElement::indexInTable()
+{
+ NSNumber* indexNumber = [m_element accessibilityAttributeValue:NSAccessibilityIndexAttribute];
+ if (!indexNumber)
+ return -1;
+ return [indexNumber intValue];
+}
+
+JSStringRef AccessibilityUIElement::rowIndexRange()
+{
+ NSValue* indexRange = [m_element accessibilityAttributeValue:@"AXRowIndexRange"];
+ NSRange range = indexRange ? [indexRange rangeValue] : NSMakeRange(0,0);
+ NSMutableString* rangeDescription = [NSMutableString stringWithFormat:@"{%d, %d}",range.location, range.length];
+ return [rangeDescription createJSStringRef];
+}
+
+JSStringRef AccessibilityUIElement::columnIndexRange()
+{
+ NSNumber* indexRange = [m_element accessibilityAttributeValue:@"AXColumnIndexRange"];
+ NSRange range = indexRange ? [indexRange rangeValue] : NSMakeRange(0,0);
+ NSMutableString* rangeDescription = [NSMutableString stringWithFormat:@"{%d, %d}",range.location, range.length];
+ return [rangeDescription createJSStringRef];
+}
+
+AccessibilityUIElement AccessibilityUIElement::cellForColumnAndRow(unsigned col, unsigned row)
+{
+ NSArray *colRowArray = [NSArray arrayWithObjects:[NSNumber numberWithUnsignedInt:col], [NSNumber numberWithUnsignedInt:row], nil];
+ return [m_element accessibilityAttributeValue:@"AXCellForColumnAndRow" forParameter:colRowArray];
+}
+
+JSStringRef AccessibilityUIElement::selectedTextRange()
+{
+ NSNumber *indexRange = [m_element accessibilityAttributeValue:NSAccessibilitySelectedTextRangeAttribute];
+ NSRange range = indexRange ? [indexRange rangeValue] : NSMakeRange(0,0);
+ NSMutableString *rangeDescription = [NSMutableString stringWithFormat:@"{%d, %d}",range.location, range.length];
+ return [rangeDescription createJSStringRef];
+}
+
+void AccessibilityUIElement::setSelectedTextRange(unsigned location, unsigned length)
+{
+ NSRange textRange = NSMakeRange(location, length);
+ NSValue *textRangeValue = [NSValue valueWithRange:textRange];
+ [m_element accessibilitySetValue:textRangeValue forAttribute:NSAccessibilitySelectedTextRangeAttribute];
+}
diff --git a/WebKitTools/DumpRenderTree/mac/AppleScriptController.h b/WebKitTools/DumpRenderTree/mac/AppleScriptController.h
new file mode 100644
index 0000000..c29789c
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/AppleScriptController.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+
+@class WebView;
+
+@interface AppleScriptController : NSObject
+{
+ WebView *webView;
+}
+- (id)initWithWebView:(WebView *)view;
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/AppleScriptController.m b/WebKitTools/DumpRenderTree/mac/AppleScriptController.m
new file mode 100644
index 0000000..86d2881
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/AppleScriptController.m
@@ -0,0 +1,126 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "AppleScriptController.h"
+
+#import <WebKit/WebView.h>
+#import <WebKit/WebViewPrivate.h> // for aeDescByEvaluatingJavaScriptFromString, which is pending API review
+
+@implementation AppleScriptController
+
++ (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector
+{
+ if (aSelector == @selector(doJavaScript:))
+ return NO;
+ return YES;
+}
+
++ (NSString *)webScriptNameForSelector:(SEL)aSelector
+{
+ if (aSelector == @selector(doJavaScript:))
+ return @"doJavaScript";
+
+ return nil;
+}
+
+- (id)initWithWebView:(WebView *)wv
+{
+ self = [super init];
+ webView = wv;
+ return self;
+}
+
+static id convertAEDescToObject(NSAppleEventDescriptor *aeDesc)
+{
+ id value = nil;
+
+ DescType descType = [aeDesc descriptorType];
+ switch (descType) {
+ case typeUnicodeText:
+ value = [NSString stringWithFormat:@"\"%@\"", [aeDesc stringValue]];
+ break;
+ case typeLongDateTime:
+ if ([[aeDesc data] length] == sizeof(LongDateTime)) {
+ LongDateTime d;
+ [[aeDesc data] getBytes:&d];
+ value = [NSString stringWithFormat:@"%016llX", (unsigned long long)d];
+ }
+ break;
+ case typeAEList:
+ value = [NSMutableString stringWithString:@"("];
+ int numItems = [aeDesc numberOfItems];
+ for (int i = 0; i < numItems; ++i) {
+ if (i != 0)
+ [(NSMutableString*)value appendString:@", "];
+ id obj = convertAEDescToObject([aeDesc descriptorAtIndex:(i + 1)]);
+ [(NSMutableString*)value appendString:[obj description]];
+ }
+ [(NSMutableString*)value appendString:@")"];
+ break;
+ case typeType: {
+ OSType type = [aeDesc typeCodeValue];
+
+ char typeStr[5];
+ typeStr[0] = type >> 24;
+ typeStr[1] = type >> 16;
+ typeStr[2] = type >> 8;
+ typeStr[3] = type;
+ typeStr[4] = 0;
+
+ value = [NSString stringWithFormat:@"'%s'", typeStr];
+ break;
+ }
+ }
+
+ if (!value)
+ value = [aeDesc stringValue];
+ if (!value)
+ value = [aeDesc data];
+
+ return value;
+}
+
+- (NSString *)doJavaScript:(NSString *)aString
+{
+ NSAppleEventDescriptor *aeDesc = [webView aeDescByEvaluatingJavaScriptFromString:aString];
+ if (!aeDesc)
+ return @"(null)";
+
+ DescType descType = [aeDesc descriptorType];
+ char descTypeStr[5];
+ descTypeStr[0] = descType >> 24;
+ descTypeStr[1] = descType >> 16;
+ descTypeStr[2] = descType >> 8;
+ descTypeStr[3] = descType;
+ descTypeStr[4] = 0;
+
+ return [NSString stringWithFormat:@"%@ ('%s')", convertAEDescToObject(aeDesc), descTypeStr];
+}
+
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/CheckedMalloc.cpp b/WebKitTools/DumpRenderTree/mac/CheckedMalloc.cpp
new file mode 100644
index 0000000..467f1bb
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/CheckedMalloc.cpp
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2005, 2006, 2007 Apple, Inc. All rights reserved.
+ * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
+ * (C) 2007 Eric Seidel <eric@webkit.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "CheckedMalloc.h"
+
+#import <malloc/malloc.h>
+
+static void* (*savedMalloc)(malloc_zone_t*, size_t);
+static void* (*savedRealloc)(malloc_zone_t*, void*, size_t);
+
+static void* checkedMalloc(malloc_zone_t* zone, size_t size)
+{
+ if (size >= 0x10000000)
+ return 0;
+ return savedMalloc(zone, size);
+}
+
+static void* checkedRealloc(malloc_zone_t* zone, void* ptr, size_t size)
+{
+ if (size >= 0x10000000)
+ return 0;
+ return savedRealloc(zone, ptr, size);
+}
+
+void makeLargeMallocFailSilently()
+{
+ malloc_zone_t* zone = malloc_default_zone();
+ savedMalloc = zone->malloc;
+ savedRealloc = zone->realloc;
+ zone->malloc = checkedMalloc;
+ zone->realloc = checkedRealloc;
+}
diff --git a/WebKitTools/DumpRenderTree/mac/CheckedMalloc.h b/WebKitTools/DumpRenderTree/mac/CheckedMalloc.h
new file mode 100644
index 0000000..c03bd20
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/CheckedMalloc.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2005, 2006, 2007 Apple, Inc. All rights reserved.
+ * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
+ * (C) 2007 Eric Seidel <eric@webkit.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+void makeLargeMallocFailSilently();
diff --git a/WebKitTools/DumpRenderTree/mac/Configurations/Base.xcconfig b/WebKitTools/DumpRenderTree/mac/Configurations/Base.xcconfig
new file mode 100644
index 0000000..fce81d3
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/Configurations/Base.xcconfig
@@ -0,0 +1,17 @@
+HEADER_SEARCH_PATHS = ForwardingHeaders mac/InternalHeaders;
+FRAMEWORK_SEARCH_PATHS = $(FRAMEWORK_SEARCH_PATHS_$(MAC_OS_X_VERSION_MAJOR));
+FRAMEWORK_SEARCH_PATHS_ = $(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks
+FRAMEWORK_SEARCH_PATHS_1040 = $(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks
+FRAMEWORK_SEARCH_PATHS_1050 = $(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks
+FRAMEWORK_SEARCH_PATHS_1060 = $(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks
+GCC_PREPROCESSOR_DEFINITIONS = ENABLE_DASHBOARD_SUPPORT;
+DEBUG_INFORMATION_FORMAT = dwarf
+PREBINDING = NO
+GCC_C_LANGUAGE_STANDARD = gnu99
+GCC_PRECOMPILE_PREFIX_HEADER = YES
+GCC_TREAT_WARNINGS_AS_ERRORS = YES
+GCC_WARN_UNUSED_FUNCTION = YES
+GCC_WARN_UNUSED_VARIABLE = YES
+GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO
+WARNING_CFLAGS = -Wall -W -Wno-unused-parameter
+LINKER_DISPLAYS_MANGLED_NAMES = YES;
diff --git a/WebKitTools/DumpRenderTree/mac/Configurations/DebugRelease.xcconfig b/WebKitTools/DumpRenderTree/mac/Configurations/DebugRelease.xcconfig
new file mode 100644
index 0000000..eab511f
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/Configurations/DebugRelease.xcconfig
@@ -0,0 +1,15 @@
+#include "Base.xcconfig"
+
+ARCHS = $(ARCHS_$(MAC_OS_X_VERSION_MAJOR));
+ARCHS_ = $(ARCHS_1040);
+ARCHS_1040 = $(NATIVE_ARCH);
+ARCHS_1050 = $(NATIVE_ARCH);
+ARCHS_1060 = $(ARCHS_STANDARD_32_64_BIT);
+
+ONLY_ACTIVE_ARCH = YES;
+
+MACOSX_DEPLOYMENT_TARGET = $(MACOSX_DEPLOYMENT_TARGET_$(MAC_OS_X_VERSION_MAJOR))
+MACOSX_DEPLOYMENT_TARGET_ = 10.4;
+MACOSX_DEPLOYMENT_TARGET_1040 = 10.4;
+MACOSX_DEPLOYMENT_TARGET_1050 = 10.5;
+MACOSX_DEPLOYMENT_TARGET_1060 = 10.6;
diff --git a/WebKitTools/DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig b/WebKitTools/DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig
new file mode 100644
index 0000000..b977225
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig
@@ -0,0 +1,4 @@
+OTHER_LDFLAGS = -sectcreate __DATA Ahem qt/fonts/AHEM____.TTF -sectcreate __DATA WeightWatcher100 fonts/WebKitWeightWatcher100.ttf -sectcreate __DATA WeightWatcher200 fonts/WebKitWeightWatcher200.ttf -sectcreate __DATA WeightWatcher300 fonts/WebKitWeightWatcher300.ttf -sectcreate __DATA WeightWatcher400 fonts/WebKitWeightWatcher400.ttf -sectcreate __DATA WeightWatcher500 fonts/WebKitWeightWatcher500.ttf -sectcreate __DATA WeightWatcher600 fonts/WebKitWeightWatcher600.ttf -sectcreate __DATA WeightWatcher700 fonts/WebKitWeightWatcher700.ttf -sectcreate __DATA WeightWatcher800 fonts/WebKitWeightWatcher800.ttf -sectcreate __DATA WeightWatcher900 fonts/WebKitWeightWatcher900.ttf
+PRODUCT_NAME = DumpRenderTree
+GCC_ENABLE_OBJC_EXCEPTIONS = YES
+GCC_PREFIX_HEADER = DumpRenderTreePrefix.h
diff --git a/WebKitTools/DumpRenderTree/mac/Configurations/ImageDiff.xcconfig b/WebKitTools/DumpRenderTree/mac/Configurations/ImageDiff.xcconfig
new file mode 100644
index 0000000..fcd64c5
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/Configurations/ImageDiff.xcconfig
@@ -0,0 +1 @@
+PRODUCT_NAME = ImageDiff
diff --git a/WebKitTools/DumpRenderTree/mac/Configurations/TestNetscapePlugIn.xcconfig b/WebKitTools/DumpRenderTree/mac/Configurations/TestNetscapePlugIn.xcconfig
new file mode 100644
index 0000000..ea17629
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/Configurations/TestNetscapePlugIn.xcconfig
@@ -0,0 +1,6 @@
+PRODUCT_NAME = TestNetscapePlugIn
+WRAPPER_EXTENSION = plugin
+INFOPLIST_FILE = TestNetscapePlugIn.subproj/Info.plist
+INSTALL_PATH = "$(USER_LIBRARY_DIR)/Plugins"
+WARNING_CFLAGS = -Wmost -Wno-four-char-constants -Wno-unknown-pragmas
+LIBRARY_STYLE = BUNDLE
diff --git a/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm b/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
new file mode 100644
index 0000000..485dece
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
@@ -0,0 +1,1168 @@
+/*
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "DumpRenderTree.h"
+
+#import "AccessibilityController.h"
+#import "CheckedMalloc.h"
+#import "DumpRenderTreePasteboard.h"
+#import "DumpRenderTreeWindow.h"
+#import "EditingDelegate.h"
+#import "EventSendingController.h"
+#import "FrameLoadDelegate.h"
+#import "JavaScriptThreading.h"
+#import "LayoutTestController.h"
+#import "NavigationController.h"
+#import "ObjCPlugin.h"
+#import "ObjCPluginFunction.h"
+#import "PixelDumpSupport.h"
+#import "PolicyDelegate.h"
+#import "ResourceLoadDelegate.h"
+#import "UIDelegate.h"
+#import "WorkQueue.h"
+#import "WorkQueueItem.h"
+#import <Carbon/Carbon.h>
+#import <CoreFoundation/CoreFoundation.h>
+#import <WebKit/DOMElementPrivate.h>
+#import <WebKit/DOMExtensions.h>
+#import <WebKit/DOMRange.h>
+#import <WebKit/WebBackForwardList.h>
+#import <WebKit/WebCache.h>
+#import <WebKit/WebCoreStatistics.h>
+#import <WebKit/WebDataSourcePrivate.h>
+#import <WebKit/WebDatabaseManagerPrivate.h>
+#import <WebKit/WebDocumentPrivate.h>
+#import <WebKit/WebEditingDelegate.h>
+#import <WebKit/WebFrameView.h>
+#import <WebKit/WebHTMLRepresentationInternal.h>
+#import <WebKit/WebHistory.h>
+#import <WebKit/WebHistoryItemPrivate.h>
+#import <WebKit/WebInspector.h>
+#import <WebKit/WebPluginDatabase.h>
+#import <WebKit/WebPreferences.h>
+#import <WebKit/WebPreferencesPrivate.h>
+#import <WebKit/WebResourceLoadDelegate.h>
+#import <WebKit/WebTypesInternal.h>
+#import <WebKit/WebViewPrivate.h>
+#import <getopt.h>
+#import <mach-o/getsect.h>
+#import <objc/objc-runtime.h>
+#import <wtf/Assertions.h>
+#import <wtf/RetainPtr.h>
+#import <wtf/OwnPtr.h>
+
+using namespace std;
+
+@interface DumpRenderTreeEvent : NSEvent
+@end
+
+static void runTest(const string& testPathOrURL);
+
+// Deciding when it's OK to dump out the state is a bit tricky. All these must be true:
+// - There is no load in progress
+// - There is no work queued up (see workQueue var, below)
+// - waitToDump==NO. This means either waitUntilDone was never called, or it was called
+// and notifyDone was called subsequently.
+// Note that the call to notifyDone and the end of the load can happen in either order.
+
+volatile bool done;
+
+NavigationController* gNavigationController = 0;
+LayoutTestController* gLayoutTestController = 0;
+
+WebFrame *mainFrame = 0;
+// This is the topmost frame that is loading, during a given load, or nil when no load is
+// in progress. Usually this is the same as the main frame, but not always. In the case
+// where a frameset is loaded, and then new content is loaded into one of the child frames,
+// that child frame is the "topmost frame that is loading".
+WebFrame *topLoadingFrame = nil; // !nil iff a load is in progress
+
+
+CFMutableSetRef disallowedURLs = 0;
+CFRunLoopTimerRef waitToDumpWatchdog = 0;
+
+// Delegates
+static FrameLoadDelegate *frameLoadDelegate;
+static UIDelegate *uiDelegate;
+static EditingDelegate *editingDelegate;
+static ResourceLoadDelegate *resourceLoadDelegate;
+PolicyDelegate *policyDelegate;
+
+static int dumpPixels;
+static int threaded;
+static int dumpTree = YES;
+static int forceComplexText;
+static BOOL printSeparators;
+static RetainPtr<CFStringRef> persistentUserStyleSheetLocation;
+
+static WebHistoryItem *prevTestBFItem = nil; // current b/f item at the end of the previous test
+
+const unsigned maxViewHeight = 600;
+const unsigned maxViewWidth = 800;
+
+#if __OBJC2__
+static void swizzleAllMethods(Class imposter, Class original)
+{
+ unsigned int imposterMethodCount;
+ Method* imposterMethods = class_copyMethodList(imposter, &imposterMethodCount);
+
+ unsigned int originalMethodCount;
+ Method* originalMethods = class_copyMethodList(original, &originalMethodCount);
+
+ for (unsigned int i = 0; i < imposterMethodCount; i++) {
+ SEL imposterMethodName = method_getName(imposterMethods[i]);
+
+ // Attempt to add the method to the original class. If it fails, the method already exists and we should
+ // instead exchange the implementations.
+ if (class_addMethod(original, imposterMethodName, method_getImplementation(imposterMethods[i]), method_getTypeEncoding(imposterMethods[i])))
+ continue;
+
+ unsigned int j = 0;
+ for (; j < originalMethodCount; j++) {
+ SEL originalMethodName = method_getName(originalMethods[j]);
+ if (sel_isEqual(imposterMethodName, originalMethodName))
+ break;
+ }
+
+ // If class_addMethod failed above then the method must exist on the original class.
+ ASSERT(j < originalMethodCount);
+ method_exchangeImplementations(imposterMethods[i], originalMethods[j]);
+ }
+
+ free(imposterMethods);
+ free(originalMethods);
+}
+#endif
+
+static void poseAsClass(const char* imposter, const char* original)
+{
+ Class imposterClass = objc_getClass(imposter);
+ Class originalClass = objc_getClass(original);
+
+#if !__OBJC2__
+ class_poseAs(imposterClass, originalClass);
+#else
+
+ // Swizzle instance methods
+ swizzleAllMethods(imposterClass, originalClass);
+ // and then class methods
+ swizzleAllMethods(object_getClass(imposterClass), object_getClass(originalClass));
+#endif
+}
+
+void setPersistentUserStyleSheetLocation(CFStringRef url)
+{
+ persistentUserStyleSheetLocation = url;
+}
+
+static bool shouldIgnoreWebCoreNodeLeaks(const string& URLString)
+{
+ static char* const ignoreSet[] = {
+ // Keeping this infrastructure around in case we ever need it again.
+ };
+ static const int ignoreSetCount = sizeof(ignoreSet) / sizeof(char*);
+
+ for (int i = 0; i < ignoreSetCount; i++) {
+ // FIXME: ignore case
+ string curIgnore(ignoreSet[i]);
+ // Match at the end of the URLString
+ if (!URLString.compare(URLString.length() - curIgnore.length(), curIgnore.length(), curIgnore))
+ return true;
+ }
+ return false;
+}
+
+static void activateFonts()
+{
+#if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_TIGER)
+ static const char* fontSectionNames[] = {
+ "Ahem",
+ "WeightWatcher100",
+ "WeightWatcher200",
+ "WeightWatcher300",
+ "WeightWatcher400",
+ "WeightWatcher500",
+ "WeightWatcher600",
+ "WeightWatcher700",
+ "WeightWatcher800",
+ "WeightWatcher900",
+ 0
+ };
+
+ for (unsigned i = 0; fontSectionNames[i]; ++i) {
+ unsigned long fontDataLength;
+ char* fontData = getsectdata("__DATA", fontSectionNames[i], &fontDataLength);
+ if (!fontData) {
+ fprintf(stderr, "Failed to locate the %s font.\n", fontSectionNames[i]);
+ exit(1);
+ }
+
+ ATSFontContainerRef fontContainer;
+ OSStatus status = ATSFontActivateFromMemory(fontData, fontDataLength, kATSFontContextLocal, kATSFontFormatUnspecified, NULL, kATSOptionFlagsDefault, &fontContainer);
+
+ if (status != noErr) {
+ fprintf(stderr, "Failed to activate the %s font.\n", fontSectionNames[i]);
+ exit(1);
+ }
+ }
+#else
+
+ // Work around <rdar://problem/6698023> by activating fonts from disk
+ // FIXME: This code can be removed once <rdar://problem/6698023> is addressed.
+
+ static const char* fontFileNames[] = {
+ "AHEM____.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 = [NSURL URLWithString:@"DumpRenderTree.resources" relativeToURL:[[NSBundle mainBundle] executableURL]];
+ for (unsigned i = 0; fontFileNames[i]; ++i) {
+ NSURL *fontURL = [resourcesDirectory URLByAppendingPathComponent:[NSString stringWithUTF8String:fontFileNames[i]]];
+ [fontURLs addObject:fontURL];
+ }
+
+ CFArrayRef errors = 0;
+ if (!CTFontManagerRegisterFontsForURLs((CFArrayRef)fontURLs, kCTFontManagerScopeProcess, &errors)) {
+ NSLog(@"Failed to activate fonts: %@", errors);
+ CFRelease(errors);
+ exit(1);
+ }
+#endif
+}
+
+WebView *createWebViewAndOffscreenWindow()
+{
+ NSRect rect = NSMakeRect(0, 0, maxViewWidth, maxViewHeight);
+ WebView *webView = [[WebView alloc] initWithFrame:rect frameName:nil groupName:@"org.webkit.DumpRenderTree"];
+
+ [webView setUIDelegate:uiDelegate];
+ [webView setFrameLoadDelegate:frameLoadDelegate];
+ [webView setEditingDelegate:editingDelegate];
+ [webView setResourceLoadDelegate:resourceLoadDelegate];
+
+ // Register the same schemes that Safari does
+ [WebView registerURLSchemeAsLocal:@"feed"];
+ [WebView registerURLSchemeAsLocal:@"feeds"];
+ [WebView registerURLSchemeAsLocal:@"feedsearch"];
+
+ [webView setContinuousSpellCheckingEnabled:YES];
+
+ // To make things like certain NSViews, dragging, and plug-ins work, put the WebView a window, but put it off-screen so you don't see it.
+ // Put it at -10000, -10000 in "flipped coordinates", since WebCore and the DOM use flipped coordinates.
+ NSRect windowRect = NSOffsetRect(rect, -10000, [[[NSScreen screens] objectAtIndex:0] frame].size.height - rect.size.height + 10000);
+ DumpRenderTreeWindow *window = [[DumpRenderTreeWindow alloc] initWithContentRect:windowRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES];
+ [[window contentView] addSubview:webView];
+ [window orderBack:nil];
+ [window setAutodisplay:NO];
+
+ [window startObservingWebView];
+
+ // For reasons that are not entirely clear, the following pair of calls makes WebView handle its
+ // dynamic scrollbars properly. Without it, every frame will always have scrollbars.
+ NSBitmapImageRep *imageRep = [webView bitmapImageRepForCachingDisplayInRect:[webView bounds]];
+ [webView cacheDisplayInRect:[webView bounds] toBitmapImageRep:imageRep];
+
+ return webView;
+}
+
+void testStringByEvaluatingJavaScriptFromString()
+{
+ // maps expected result <= JavaScript expression
+ NSDictionary *expressions = [NSDictionary dictionaryWithObjectsAndKeys:
+ @"0", @"0",
+ @"0", @"'0'",
+ @"", @"",
+ @"", @"''",
+ @"", @"new String()",
+ @"", @"new String('0')",
+ @"", @"throw 1",
+ @"", @"{ }",
+ @"", @"[ ]",
+ @"", @"//",
+ @"", @"a.b.c",
+ @"", @"(function() { throw 'error'; })()",
+ @"", @"null",
+ @"", @"undefined",
+ @"true", @"true",
+ @"false", @"false",
+ nil
+ ];
+
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ WebView *webView = [[WebView alloc] initWithFrame:NSZeroRect frameName:@"" groupName:@""];
+
+ NSEnumerator *enumerator = [expressions keyEnumerator];
+ id expression;
+ while ((expression = [enumerator nextObject])) {
+ NSString *expectedResult = [expressions objectForKey:expression];
+ NSString *result = [webView stringByEvaluatingJavaScriptFromString:expression];
+ assert([result isEqualToString:expectedResult]);
+ }
+
+ [webView close];
+ [webView release];
+ [pool release];
+}
+
+static void setDefaultsToConsistentValuesForTesting()
+{
+ // Give some clear to undocumented defaults values
+ static const int NoFontSmoothing = 0;
+ static const int BlueTintedAppearance = 1;
+
+ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
+ [defaults setInteger:4 forKey:@"AppleAntiAliasingThreshold"]; // smallest font size to CG should perform antialiasing on
+ [defaults setInteger:NoFontSmoothing forKey:@"AppleFontSmoothing"];
+ [defaults setInteger:BlueTintedAppearance forKey:@"AppleAquaColorVariant"];
+ [defaults setObject:@"0.709800 0.835300 1.000000" forKey:@"AppleHighlightColor"];
+ [defaults setObject:@"0.500000 0.500000 0.500000" forKey:@"AppleOtherHighlightColor"];
+ [defaults setObject:[NSArray arrayWithObject:@"en"] forKey:@"AppleLanguages"];
+
+ // Scrollbars are drawn either using AppKit (which uses NSUserDefaults) or using HIToolbox (which uses CFPreferences / kCFPreferencesAnyApplication / kCFPreferencesCurrentUser / kCFPreferencesAnyHost)
+ [defaults setObject:@"DoubleMax" forKey:@"AppleScrollBarVariant"];
+ RetainPtr<CFTypeRef> initialValue = CFPreferencesCopyValue(CFSTR("AppleScrollBarVariant"), kCFPreferencesAnyApplication, kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
+ CFPreferencesSetValue(CFSTR("AppleScrollBarVariant"), CFSTR("DoubleMax"), kCFPreferencesAnyApplication, kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
+#ifndef __LP64__
+ // See <rdar://problem/6347388>.
+ ThemeScrollBarArrowStyle style;
+ GetThemeScrollBarArrowStyle(&style); // Force HIToolbox to read from CFPreferences
+#endif
+ if (initialValue)
+ CFPreferencesSetValue(CFSTR("AppleScrollBarVariant"), initialValue.get(), kCFPreferencesAnyApplication, kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
+
+ NSString *libraryPath = [@"~/Library/Application Support/DumpRenderTree" stringByExpandingTildeInPath];
+ [defaults setObject:[libraryPath stringByAppendingPathComponent:@"Databases"] forKey:WebDatabaseDirectoryDefaultsKey];
+
+ WebPreferences *preferences = [WebPreferences standardPreferences];
+
+ [preferences setStandardFontFamily:@"Times"];
+ [preferences setFixedFontFamily:@"Courier"];
+ [preferences setSerifFontFamily:@"Times"];
+ [preferences setSansSerifFontFamily:@"Helvetica"];
+ [preferences setCursiveFontFamily:@"Apple Chancery"];
+ [preferences setFantasyFontFamily:@"Papyrus"];
+ [preferences setDefaultFontSize:16];
+ [preferences setDefaultFixedFontSize:13];
+ [preferences setMinimumFontSize:1];
+ [preferences setJavaEnabled:NO];
+ [preferences setJavaScriptEnabled:YES];
+ [preferences setEditableLinkBehavior:WebKitEditableLinkOnlyLiveWithShiftKey];
+ [preferences setTabsToLinks:NO];
+ [preferences setDOMPasteAllowed:YES];
+ [preferences setFullDocumentTeardownEnabled:YES];
+ [preferences setShouldPrintBackgrounds:YES];
+
+ // The back/forward cache is causing problems due to layouts during transition from one page to another.
+ // So, turn it off for now, but we might want to turn it back on some day.
+ [preferences setUsesPageCache:NO];
+}
+
+static void crashHandler(int sig)
+{
+ char *signalName = strsignal(sig);
+ write(STDERR_FILENO, signalName, strlen(signalName));
+ write(STDERR_FILENO, "\n", 1);
+ restoreMainDisplayColorProfile(0);
+ exit(128 + sig);
+}
+
+static void installSignalHandlers()
+{
+ signal(SIGILL, crashHandler); /* 4: illegal instruction (not reset when caught) */
+ signal(SIGTRAP, crashHandler); /* 5: trace trap (not reset when caught) */
+ signal(SIGEMT, crashHandler); /* 7: EMT instruction */
+ signal(SIGFPE, crashHandler); /* 8: floating point exception */
+ signal(SIGBUS, crashHandler); /* 10: bus error */
+ signal(SIGSEGV, crashHandler); /* 11: segmentation violation */
+ signal(SIGSYS, crashHandler); /* 12: bad argument to system call */
+ signal(SIGPIPE, crashHandler); /* 13: write on a pipe with no reader */
+ signal(SIGXCPU, crashHandler); /* 24: exceeded CPU time limit */
+ signal(SIGXFSZ, crashHandler); /* 25: exceeded file size limit */
+}
+
+static void allocateGlobalControllers()
+{
+ // FIXME: We should remove these and move to the ObjC standard [Foo sharedInstance] model
+ gNavigationController = [[NavigationController alloc] init];
+ frameLoadDelegate = [[FrameLoadDelegate alloc] init];
+ uiDelegate = [[UIDelegate alloc] init];
+ editingDelegate = [[EditingDelegate alloc] init];
+ resourceLoadDelegate = [[ResourceLoadDelegate alloc] init];
+ policyDelegate = [[PolicyDelegate alloc] init];
+}
+
+// ObjC++ doens't seem to let me pass NSObject*& sadly.
+static inline void releaseAndZero(NSObject** object)
+{
+ [*object release];
+ *object = nil;
+}
+
+static void releaseGlobalControllers()
+{
+ releaseAndZero(&gNavigationController);
+ releaseAndZero(&frameLoadDelegate);
+ releaseAndZero(&editingDelegate);
+ releaseAndZero(&resourceLoadDelegate);
+ releaseAndZero(&uiDelegate);
+ releaseAndZero(&policyDelegate);
+}
+
+static void initializeGlobalsFromCommandLineOptions(int argc, const char *argv[])
+{
+ struct option options[] = {
+ {"notree", no_argument, &dumpTree, NO},
+ {"pixel-tests", no_argument, &dumpPixels, YES},
+ {"tree", no_argument, &dumpTree, YES},
+ {"threaded", no_argument, &threaded, YES},
+ {"complex-text", no_argument, &forceComplexText, YES},
+ {NULL, 0, NULL, 0}
+ };
+
+ int option;
+ while ((option = getopt_long(argc, (char * const *)argv, "", options, NULL)) != -1) {
+ switch (option) {
+ case '?': // unknown or ambiguous option
+ case ':': // missing argument
+ exit(1);
+ break;
+ }
+ }
+}
+
+static void addTestPluginsToPluginSearchPath(const char* executablePath)
+{
+ NSString *pwd = [[NSString stringWithUTF8String:executablePath] stringByDeletingLastPathComponent];
+ [WebPluginDatabase setAdditionalWebPlugInPaths:[NSArray arrayWithObject:pwd]];
+ [[WebPluginDatabase sharedDatabase] refresh];
+}
+
+static bool useLongRunningServerMode(int argc, const char *argv[])
+{
+ // This assumes you've already called getopt_long
+ return (argc == optind+1 && strcmp(argv[optind], "-") == 0);
+}
+
+static void runTestingServerLoop()
+{
+ // When DumpRenderTree run in server mode, we just wait around for file names
+ // to be passed to us and read each in turn, passing the results back to the client
+ char filenameBuffer[2048];
+ while (fgets(filenameBuffer, sizeof(filenameBuffer), stdin)) {
+ char *newLineCharacter = strchr(filenameBuffer, '\n');
+ if (newLineCharacter)
+ *newLineCharacter = '\0';
+
+ if (strlen(filenameBuffer) == 0)
+ continue;
+
+ runTest(filenameBuffer);
+ }
+}
+
+static void prepareConsistentTestingEnvironment()
+{
+ poseAsClass("DumpRenderTreePasteboard", "NSPasteboard");
+ poseAsClass("DumpRenderTreeEvent", "NSEvent");
+
+ setDefaultsToConsistentValuesForTesting();
+ activateFonts();
+
+ if (dumpPixels)
+ setupMainDisplayColorProfile();
+ allocateGlobalControllers();
+
+ makeLargeMallocFailSilently();
+}
+
+void dumpRenderTree(int argc, const char *argv[])
+{
+ initializeGlobalsFromCommandLineOptions(argc, argv);
+ prepareConsistentTestingEnvironment();
+ addTestPluginsToPluginSearchPath(argv[0]);
+ if (dumpPixels)
+ installSignalHandlers();
+
+ if (forceComplexText)
+ [WebView _setAlwaysUsesComplexTextCodePath:YES];
+
+ WebView *webView = createWebViewAndOffscreenWindow();
+ mainFrame = [webView mainFrame];
+
+ [[NSURLCache sharedURLCache] removeAllCachedResponses];
+
+ [WebCache empty];
+
+ // <rdar://problem/5222911>
+ testStringByEvaluatingJavaScriptFromString();
+
+ if (threaded)
+ startJavaScriptThreads();
+
+ if (useLongRunningServerMode(argc, argv)) {
+ printSeparators = YES;
+ runTestingServerLoop();
+ } else {
+ printSeparators = (optind < argc-1 || (dumpPixels && dumpTree));
+ for (int i = optind; i != argc; ++i)
+ runTest(argv[i]);
+ }
+
+ if (threaded)
+ stopJavaScriptThreads();
+
+ NSWindow *window = [webView window];
+ [webView close];
+ mainFrame = nil;
+
+ // Work around problem where registering drag types leaves an outstanding
+ // "perform selector" on the window, which retains the window. It's a bit
+ // inelegant and perhaps dangerous to just blow them all away, but in practice
+ // it probably won't cause any trouble (and this is just a test tool, after all).
+ [NSObject cancelPreviousPerformRequestsWithTarget:window];
+
+ [window close]; // releases when closed
+ [webView release];
+
+ releaseGlobalControllers();
+
+ [DumpRenderTreePasteboard releaseLocalPasteboards];
+
+ // FIXME: This should be moved onto LayoutTestController and made into a HashSet
+ if (disallowedURLs) {
+ CFRelease(disallowedURLs);
+ disallowedURLs = 0;
+ }
+
+ if (dumpPixels)
+ restoreMainDisplayColorProfile(0);
+}
+
+int main(int argc, const char *argv[])
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ [NSApplication sharedApplication]; // Force AppKit to init itself
+ dumpRenderTree(argc, argv);
+ [WebCoreStatistics garbageCollectJavaScriptObjects];
+ [WebCoreStatistics emptyCache]; // Otherwise SVGImages trigger false positives for Frame/Node counts
+ [pool release];
+ return 0;
+}
+
+static NSInteger compareHistoryItems(id item1, id item2, void *context)
+{
+ return [[item1 target] caseInsensitiveCompare:[item2 target]];
+}
+
+static void dumpHistoryItem(WebHistoryItem *item, int indent, BOOL current)
+{
+ int start = 0;
+ if (current) {
+ printf("curr->");
+ start = 6;
+ }
+ for (int i = start; i < indent; i++)
+ putchar(' ');
+ printf("%s", [[item URLString] UTF8String]);
+ NSString *target = [item target];
+ if (target && [target length] > 0)
+ printf(" (in frame \"%s\")", [target UTF8String]);
+ if ([item isTargetItem])
+ printf(" **nav target**");
+ putchar('\n');
+ NSArray *kids = [item children];
+ if (kids) {
+ // must sort to eliminate arbitrary result ordering which defeats reproducible testing
+ kids = [kids sortedArrayUsingFunction:&compareHistoryItems context:nil];
+ for (unsigned i = 0; i < [kids count]; i++)
+ dumpHistoryItem([kids objectAtIndex:i], indent+4, NO);
+ }
+}
+
+static void dumpFrameScrollPosition(WebFrame *f)
+{
+ NSPoint scrollPosition = [[[[f frameView] documentView] superview] bounds].origin;
+ if (ABS(scrollPosition.x) > 0.00000001 || ABS(scrollPosition.y) > 0.00000001) {
+ if ([f parentFrame] != nil)
+ printf("frame '%s' ", [[f name] UTF8String]);
+ printf("scrolled to %.f,%.f\n", scrollPosition.x, scrollPosition.y);
+ }
+
+ if (gLayoutTestController->dumpChildFrameScrollPositions()) {
+ NSArray *kids = [f childFrames];
+ if (kids)
+ for (unsigned i = 0; i < [kids count]; i++)
+ dumpFrameScrollPosition([kids objectAtIndex:i]);
+ }
+}
+
+static NSString *dumpFramesAsText(WebFrame *frame)
+{
+ DOMDocument *document = [frame DOMDocument];
+ DOMElement *documentElement = [document documentElement];
+
+ if (!documentElement)
+ return @"";
+
+ NSMutableString *result = [[[NSMutableString alloc] init] autorelease];
+
+ // Add header for all but the main frame.
+ if ([frame parentFrame])
+ result = [NSMutableString stringWithFormat:@"\n--------\nFrame: '%@'\n--------\n", [frame name]];
+
+ [result appendFormat:@"%@\n", [documentElement innerText]];
+
+ if (gLayoutTestController->dumpChildFramesAsText()) {
+ NSArray *kids = [frame childFrames];
+ if (kids) {
+ for (unsigned i = 0; i < [kids count]; i++)
+ [result appendString:dumpFramesAsText([kids objectAtIndex:i])];
+ }
+ }
+
+ return result;
+}
+
+static NSData *dumpFrameAsPDF(WebFrame *frame)
+{
+ if (!frame)
+ return nil;
+
+ // Sadly we have to dump to a file and then read from that file again
+ // +[NSPrintOperation PDFOperationWithView:insideRect:] requires a rect and prints to a single page
+ // likewise +[NSView dataWithPDFInsideRect:] also prints to a single continuous page
+ // The goal of this function is to test "real" printing across multiple pages.
+ // FIXME: It's possible there might be printing SPI to let us print a multi-page PDF to an NSData object
+ NSString *path = @"/tmp/test.pdf";
+
+ NSMutableDictionary *printInfoDict = [NSMutableDictionary dictionaryWithDictionary:[[NSPrintInfo sharedPrintInfo] dictionary]];
+ [printInfoDict setObject:NSPrintSaveJob forKey:NSPrintJobDisposition];
+ [printInfoDict setObject:path forKey:NSPrintSavePath];
+
+ NSPrintInfo *printInfo = [[NSPrintInfo alloc] initWithDictionary:printInfoDict];
+ [printInfo setHorizontalPagination:NSAutoPagination];
+ [printInfo setVerticalPagination:NSAutoPagination];
+ [printInfo setVerticallyCentered:NO];
+
+ NSPrintOperation *printOperation = [NSPrintOperation printOperationWithView:[frame frameView] printInfo:printInfo];
+ [printOperation setShowPanels:NO];
+ [printOperation runOperation];
+
+ [printInfo release];
+
+ NSData *pdfData = [NSData dataWithContentsOfFile:path];
+ [[NSFileManager defaultManager] removeFileAtPath:path handler:nil];
+
+ return pdfData;
+}
+
+static void convertMIMEType(NSMutableString *mimeType)
+{
+#ifdef BUILDING_ON_LEOPARD
+ // Workaround for <rdar://problem/5539824> on Leopard
+ if ([mimeType isEqualToString:@"text/xml"])
+ [mimeType setString:@"application/xml"];
+#endif
+ // Workaround for <rdar://problem/6234318> with Dashcode 2.0
+ if ([mimeType isEqualToString:@"application/x-javascript"])
+ [mimeType setString:@"text/javascript"];
+}
+
+static void convertWebResourceDataToString(NSMutableDictionary *resource)
+{
+ NSMutableString *mimeType = [resource objectForKey:@"WebResourceMIMEType"];
+ convertMIMEType(mimeType);
+
+ if ([mimeType hasPrefix:@"text/"] || [[WebHTMLRepresentation supportedNonImageMIMETypes] containsObject:mimeType]) {
+ NSString *textEncodingName = [resource objectForKey:@"WebResourceTextEncodingName"];
+ NSStringEncoding stringEncoding;
+ if ([textEncodingName length] > 0)
+ stringEncoding = CFStringConvertEncodingToNSStringEncoding(CFStringConvertIANACharSetNameToEncoding((CFStringRef)textEncodingName));
+ else
+ stringEncoding = NSUTF8StringEncoding;
+
+ NSData *data = [resource objectForKey:@"WebResourceData"];
+ NSString *dataAsString = [[NSString alloc] initWithData:data encoding:stringEncoding];
+ if (dataAsString)
+ [resource setObject:dataAsString forKey:@"WebResourceData"];
+ [dataAsString release];
+ }
+}
+
+static void normalizeHTTPResponseHeaderFields(NSMutableDictionary *fields)
+{
+ // Normalize headers
+ if ([fields objectForKey:@"Date"])
+ [fields setObject:@"Sun, 16 Nov 2008 17:00:00 GMT" forKey:@"Date"];
+ if ([fields objectForKey:@"Last-Modified"])
+ [fields setObject:@"Sun, 16 Nov 2008 16:55:00 GMT" forKey:@"Last-Modified"];
+ if ([fields objectForKey:@"Etag"])
+ [fields setObject:@"\"301925-21-45c7d72d3e780\"" forKey:@"Etag"];
+ if ([fields objectForKey:@"Server"])
+ [fields setObject:@"Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.7l PHP/5.2.6" forKey:@"Server"];
+
+ // Remove headers
+ if ([fields objectForKey:@"Connection"])
+ [fields removeObjectForKey:@"Connection"];
+ if ([fields objectForKey:@"Keep-Alive"])
+ [fields removeObjectForKey:@"Keep-Alive"];
+}
+
+static void normalizeWebResourceURL(NSMutableString *webResourceURL)
+{
+ static int fileUrlLength = [(NSString *)@"file://" length];
+ NSRange layoutTestsWebArchivePathRange = [webResourceURL rangeOfString:@"/LayoutTests/" options:NSBackwardsSearch];
+ if (layoutTestsWebArchivePathRange.location == NSNotFound)
+ return;
+ NSRange currentWorkingDirectoryRange = NSMakeRange(fileUrlLength, layoutTestsWebArchivePathRange.location - fileUrlLength);
+ [webResourceURL replaceCharactersInRange:currentWorkingDirectoryRange withString:@""];
+}
+
+static void convertWebResourceResponseToDictionary(NSMutableDictionary *propertyList)
+{
+ NSURLResponse *response = nil;
+ NSData *responseData = [propertyList objectForKey:@"WebResourceResponse"]; // WebResourceResponseKey in WebResource.m
+ if ([responseData isKindOfClass:[NSData class]]) {
+ // Decode NSURLResponse
+ NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:responseData];
+ response = [unarchiver decodeObjectForKey:@"WebResourceResponse"]; // WebResourceResponseKey in WebResource.m
+ [unarchiver finishDecoding];
+ [unarchiver release];
+ }
+
+ NSMutableDictionary *responseDictionary = [[NSMutableDictionary alloc] init];
+
+ NSMutableString *urlString = [[[response URL] description] mutableCopy];
+ normalizeWebResourceURL(urlString);
+ [responseDictionary setObject:urlString forKey:@"URL"];
+ [urlString release];
+
+ NSMutableString *mimeTypeString = [[response MIMEType] mutableCopy];
+ convertMIMEType(mimeTypeString);
+ [responseDictionary setObject:mimeTypeString forKey:@"MIMEType"];
+ [mimeTypeString release];
+
+ NSString *textEncodingName = [response textEncodingName];
+ if (textEncodingName)
+ [responseDictionary setObject:textEncodingName forKey:@"textEncodingName"];
+ [responseDictionary setObject:[NSNumber numberWithLongLong:[response expectedContentLength]] forKey:@"expectedContentLength"];
+
+ if ([response isKindOfClass:[NSHTTPURLResponse class]]) {
+ NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response;
+
+ NSMutableDictionary *allHeaderFields = [[httpResponse allHeaderFields] mutableCopy];
+ normalizeHTTPResponseHeaderFields(allHeaderFields);
+ [responseDictionary setObject:allHeaderFields forKey:@"allHeaderFields"];
+ [allHeaderFields release];
+
+ [responseDictionary setObject:[NSNumber numberWithInt:[httpResponse statusCode]] forKey:@"statusCode"];
+ }
+
+ [propertyList setObject:responseDictionary forKey:@"WebResourceResponse"];
+ [responseDictionary release];
+}
+
+static NSInteger compareResourceURLs(id resource1, id resource2, void *context)
+{
+ NSString *url1 = [resource1 objectForKey:@"WebResourceURL"];
+ NSString *url2 = [resource2 objectForKey:@"WebResourceURL"];
+
+ return [url1 compare:url2];
+}
+
+static NSString *serializeWebArchiveToXML(WebArchive *webArchive)
+{
+ NSString *errorString;
+ NSMutableDictionary *propertyList = [NSPropertyListSerialization propertyListFromData:[webArchive data]
+ mutabilityOption:NSPropertyListMutableContainersAndLeaves
+ format:NULL
+ errorDescription:&errorString];
+ if (!propertyList)
+ return errorString;
+
+ NSMutableArray *resources = [NSMutableArray arrayWithCapacity:1];
+ [resources addObject:propertyList];
+
+ while ([resources count]) {
+ NSMutableDictionary *resourcePropertyList = [resources objectAtIndex:0];
+ [resources removeObjectAtIndex:0];
+
+ NSMutableDictionary *mainResource = [resourcePropertyList objectForKey:@"WebMainResource"];
+ normalizeWebResourceURL([mainResource objectForKey:@"WebResourceURL"]);
+ convertWebResourceDataToString(mainResource);
+
+ // Add subframeArchives to list for processing
+ NSMutableArray *subframeArchives = [resourcePropertyList objectForKey:@"WebSubframeArchives"]; // WebSubframeArchivesKey in WebArchive.m
+ if (subframeArchives)
+ [resources addObjectsFromArray:subframeArchives];
+
+ NSMutableArray *subresources = [resourcePropertyList objectForKey:@"WebSubresources"]; // WebSubresourcesKey in WebArchive.m
+ NSEnumerator *enumerator = [subresources objectEnumerator];
+ NSMutableDictionary *subresourcePropertyList;
+ while ((subresourcePropertyList = [enumerator nextObject])) {
+ normalizeWebResourceURL([subresourcePropertyList objectForKey:@"WebResourceURL"]);
+ convertWebResourceResponseToDictionary(subresourcePropertyList);
+ convertWebResourceDataToString(subresourcePropertyList);
+ }
+
+ // Sort the subresources so they're always in a predictable order for the dump
+ if (NSArray *sortedSubresources = [subresources sortedArrayUsingFunction:compareResourceURLs context:nil])
+ [resourcePropertyList setObject:sortedSubresources forKey:@"WebSubresources"];
+ }
+
+ NSData *xmlData = [NSPropertyListSerialization dataFromPropertyList:propertyList
+ format:NSPropertyListXMLFormat_v1_0
+ errorDescription:&errorString];
+ if (!xmlData)
+ return errorString;
+
+ NSMutableString *string = [[[NSMutableString alloc] initWithData:xmlData encoding:NSUTF8StringEncoding] autorelease];
+
+ // Replace "Apple Computer" with "Apple" in the DTD declaration.
+ NSRange range = [string rangeOfString:@"-//Apple Computer//"];
+ if (range.location != NSNotFound)
+ [string replaceCharactersInRange:range withString:@"-//Apple//"];
+
+ return string;
+}
+
+static void dumpBackForwardListForWebView(WebView *view)
+{
+ printf("\n============== Back Forward List ==============\n");
+ WebBackForwardList *bfList = [view backForwardList];
+
+ // Print out all items in the list after prevTestBFItem, which was from the previous test
+ // Gather items from the end of the list, the print them out from oldest to newest
+ NSMutableArray *itemsToPrint = [[NSMutableArray alloc] init];
+ for (int i = [bfList forwardListCount]; i > 0; i--) {
+ WebHistoryItem *item = [bfList itemAtIndex:i];
+ // something is wrong if the item from the last test is in the forward part of the b/f list
+ assert(item != prevTestBFItem);
+ [itemsToPrint addObject:item];
+ }
+
+ assert([bfList currentItem] != prevTestBFItem);
+ [itemsToPrint addObject:[bfList currentItem]];
+ int currentItemIndex = [itemsToPrint count] - 1;
+
+ for (int i = -1; i >= -[bfList backListCount]; i--) {
+ WebHistoryItem *item = [bfList itemAtIndex:i];
+ if (item == prevTestBFItem)
+ break;
+ [itemsToPrint addObject:item];
+ }
+
+ for (int i = [itemsToPrint count]-1; i >= 0; i--)
+ dumpHistoryItem([itemsToPrint objectAtIndex:i], 8, i == currentItemIndex);
+
+ [itemsToPrint release];
+ printf("===============================================\n");
+}
+
+static void sizeWebViewForCurrentTest()
+{
+ // W3C SVG tests expect to be 480x360
+ bool isSVGW3CTest = (gLayoutTestController->testPathOrURL().find("svg/W3C-SVG-1.1") != string::npos);
+ if (isSVGW3CTest)
+ [[mainFrame webView] setFrameSize:NSMakeSize(480, 360)];
+ else
+ [[mainFrame webView] setFrameSize:NSMakeSize(maxViewWidth, maxViewHeight)];
+}
+
+static const char *methodNameStringForFailedTest()
+{
+ const char *errorMessage;
+ if (gLayoutTestController->dumpAsText())
+ errorMessage = "[documentElement innerText]";
+ else if (gLayoutTestController->dumpDOMAsWebArchive())
+ errorMessage = "[[mainFrame DOMDocument] webArchive]";
+ else if (gLayoutTestController->dumpSourceAsWebArchive())
+ errorMessage = "[[mainFrame dataSource] webArchive]";
+ else
+ errorMessage = "[mainFrame renderTreeAsExternalRepresentation]";
+
+ return errorMessage;
+}
+
+static void dumpBackForwardListForAllWindows()
+{
+ CFArrayRef openWindows = (CFArrayRef)[DumpRenderTreeWindow openWindows];
+ unsigned count = CFArrayGetCount(openWindows);
+ for (unsigned i = 0; i < count; i++) {
+ NSWindow *window = (NSWindow *)CFArrayGetValueAtIndex(openWindows, i);
+ WebView *webView = [[[window contentView] subviews] objectAtIndex:0];
+ dumpBackForwardListForWebView(webView);
+ }
+}
+
+static void invalidateAnyPreviousWaitToDumpWatchdog()
+{
+ if (waitToDumpWatchdog) {
+ CFRunLoopTimerInvalidate(waitToDumpWatchdog);
+ CFRelease(waitToDumpWatchdog);
+ waitToDumpWatchdog = 0;
+ }
+}
+
+void dump()
+{
+ invalidateAnyPreviousWaitToDumpWatchdog();
+
+ bool dumpAsText = gLayoutTestController->dumpAsText();
+ if (dumpTree) {
+ NSString *resultString = nil;
+ NSData *resultData = nil;
+ NSString *resultMimeType = @"text/plain";
+
+ dumpAsText |= [[[mainFrame dataSource] _responseMIMEType] isEqualToString:@"text/plain"];
+ gLayoutTestController->setDumpAsText(dumpAsText);
+ if (gLayoutTestController->dumpAsText()) {
+ resultString = dumpFramesAsText(mainFrame);
+ } else if (gLayoutTestController->dumpAsPDF()) {
+ resultData = dumpFrameAsPDF(mainFrame);
+ resultMimeType = @"application/pdf";
+ } else if (gLayoutTestController->dumpDOMAsWebArchive()) {
+ WebArchive *webArchive = [[mainFrame DOMDocument] webArchive];
+ resultString = serializeWebArchiveToXML(webArchive);
+ resultMimeType = @"application/x-webarchive";
+ } else if (gLayoutTestController->dumpSourceAsWebArchive()) {
+ WebArchive *webArchive = [[mainFrame dataSource] webArchive];
+ resultString = serializeWebArchiveToXML(webArchive);
+ resultMimeType = @"application/x-webarchive";
+ } else {
+ sizeWebViewForCurrentTest();
+ resultString = [mainFrame renderTreeAsExternalRepresentation];
+ }
+
+ if (resultString && !resultData)
+ resultData = [resultString dataUsingEncoding:NSUTF8StringEncoding];
+
+ printf("Content-Type: %s\n", [resultMimeType UTF8String]);
+
+ if (resultData) {
+ fwrite([resultData bytes], 1, [resultData length], stdout);
+
+ if (!gLayoutTestController->dumpAsText() && !gLayoutTestController->dumpDOMAsWebArchive() && !gLayoutTestController->dumpSourceAsWebArchive())
+ dumpFrameScrollPosition(mainFrame);
+
+ if (gLayoutTestController->dumpBackForwardList())
+ dumpBackForwardListForAllWindows();
+ } else
+ printf("ERROR: nil result from %s", methodNameStringForFailedTest());
+
+ if (printSeparators) {
+ puts("#EOF"); // terminate the content block
+ fputs("#EOF\n", stderr);
+ }
+ }
+
+ if (dumpPixels && !dumpAsText)
+ dumpWebViewAsPixelsAndCompareWithExpected(gLayoutTestController->expectedPixelHash());
+
+ puts("#EOF"); // terminate the (possibly empty) pixels block
+
+ fflush(stdout);
+ fflush(stderr);
+
+ done = YES;
+}
+
+static bool shouldLogFrameLoadDelegates(const char *pathOrURL)
+{
+ return strstr(pathOrURL, "loading/");
+}
+
+static void resetWebViewToConsistentStateBeforeTesting()
+{
+ WebView *webView = [mainFrame webView];
+ [(EditingDelegate *)[webView editingDelegate] setAcceptsEditing:YES];
+ [webView makeTextStandardSize:nil];
+ [webView resetPageZoom:nil];
+ [webView setTabKeyCyclesThroughElements:YES];
+ [webView setPolicyDelegate:nil];
+ [webView _setDashboardBehavior:WebDashboardBehaviorUseBackwardCompatibilityMode to:NO];
+ [webView _clearMainFrameName];
+ [[webView undoManager] removeAllActions];
+
+ WebPreferences *preferences = [webView preferences];
+ [preferences setPrivateBrowsingEnabled:NO];
+ [preferences setAuthorAndUserStylesEnabled:YES];
+ [preferences setJavaScriptCanOpenWindowsAutomatically:YES];
+ [preferences setOfflineWebApplicationCacheEnabled:YES];
+ [preferences setFullDocumentTeardownEnabled:YES];
+ [preferences setDeveloperExtrasEnabled:NO];
+
+ if (persistentUserStyleSheetLocation) {
+ [preferences setUserStyleSheetLocation:[NSURL URLWithString:(NSString *)(persistentUserStyleSheetLocation.get())]];
+ [preferences setUserStyleSheetEnabled:YES];
+ } else
+ [preferences setUserStyleSheetEnabled:NO];
+
+ [[mainFrame webView] setSmartInsertDeleteEnabled:YES];
+ [[[mainFrame webView] inspector] setJavaScriptProfilingEnabled:NO];
+
+ [WebView _setUsesTestModeFocusRingColor:YES];
+}
+
+static void runTest(const string& testPathOrURL)
+{
+ ASSERT(!testPathOrURL.empty());
+
+ // Look for "'" as a separator between the path or URL, and the pixel dump hash that follows.
+ string pathOrURL(testPathOrURL);
+ string expectedPixelHash;
+
+ size_t separatorPos = pathOrURL.find("'");
+ if (separatorPos != string::npos) {
+ pathOrURL = string(testPathOrURL, 0, separatorPos);
+ expectedPixelHash = string(testPathOrURL, separatorPos + 1);
+ }
+
+ NSString *pathOrURLString = [NSString stringWithUTF8String:pathOrURL.c_str()];
+ if (!pathOrURLString) {
+ fprintf(stderr, "Failed to parse \"%s\" as UTF-8\n", pathOrURL.c_str());
+ return;
+ }
+
+ NSURL *url;
+ if ([pathOrURLString hasPrefix:@"http://"] || [pathOrURLString hasPrefix:@"https://"])
+ url = [NSURL URLWithString:pathOrURLString];
+ else
+ url = [NSURL fileURLWithPath:pathOrURLString];
+ if (!url) {
+ fprintf(stderr, "Failed to parse \"%s\" as a URL\n", pathOrURL.c_str());
+ return;
+ }
+
+ const string testURL([[url absoluteString] UTF8String]);
+
+ resetWebViewToConsistentStateBeforeTesting();
+
+ gLayoutTestController = new LayoutTestController(testURL, expectedPixelHash);
+ topLoadingFrame = nil;
+ done = NO;
+
+ gLayoutTestController->setIconDatabaseEnabled(false);
+
+ if (disallowedURLs)
+ CFSetRemoveAllValues(disallowedURLs);
+ if (shouldLogFrameLoadDelegates(pathOrURL.c_str()))
+ gLayoutTestController->setDumpFrameLoadCallbacks(true);
+
+ if ([WebHistory optionalSharedHistory])
+ [WebHistory setOptionalSharedHistory:nil];
+ lastMousePosition = NSZeroPoint;
+ lastClickPosition = NSZeroPoint;
+
+ [prevTestBFItem release];
+ prevTestBFItem = [[[[mainFrame webView] backForwardList] currentItem] retain];
+
+ WorkQueue::shared()->clear();
+ WorkQueue::shared()->setFrozen(false);
+
+ bool ignoreWebCoreNodeLeaks = shouldIgnoreWebCoreNodeLeaks(testURL);
+ if (ignoreWebCoreNodeLeaks)
+ [WebCoreStatistics startIgnoringWebCoreNodeLeaks];
+
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ [mainFrame loadRequest:[NSURLRequest requestWithURL:url]];
+ [pool release];
+ while (!done) {
+ pool = [[NSAutoreleasePool alloc] init];
+ [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]];
+ [pool release];
+ }
+ pool = [[NSAutoreleasePool alloc] init];
+ [EventSendingController clearSavedEvents];
+ [[mainFrame webView] setSelectedDOMRange:nil affinity:NSSelectionAffinityDownstream];
+
+ WorkQueue::shared()->clear();
+
+ if (gLayoutTestController->closeRemainingWindowsWhenComplete()) {
+ NSArray* array = [DumpRenderTreeWindow openWindows];
+
+ unsigned count = [array count];
+ for (unsigned i = 0; i < count; i++) {
+ NSWindow *window = [array objectAtIndex:i];
+
+ // Don't try to close the main window
+ if (window == [[mainFrame webView] window])
+ continue;
+
+ WebView *webView = [[[window contentView] subviews] objectAtIndex:0];
+
+ [webView close];
+ [window close];
+ }
+ }
+
+ [mainFrame loadHTMLString:@"<html></html>" baseURL:[NSURL URLWithString:@"about:blank"]];
+ [mainFrame stopLoading];
+
+ [pool release];
+
+ // We should only have our main window left open when we're done
+ ASSERT(CFArrayGetCount(openWindowsRef) == 1);
+ ASSERT(CFArrayGetValueAtIndex(openWindowsRef, 0) == [[mainFrame webView] window]);
+
+ gLayoutTestController->deref();
+ gLayoutTestController = 0;
+
+ if (ignoreWebCoreNodeLeaks)
+ [WebCoreStatistics stopIgnoringWebCoreNodeLeaks];
+}
+
+void displayWebView()
+{
+ NSView *webView = [mainFrame webView];
+ [webView display];
+ [webView lockFocus];
+ [[[NSColor blackColor] colorWithAlphaComponent:0.66] set];
+ NSRectFillUsingOperation([webView frame], NSCompositeSourceOver);
+ [webView unlockFocus];
+}
+
+@implementation DumpRenderTreeEvent
+
++ (NSPoint)mouseLocation
+{
+ return [[[mainFrame webView] window] convertBaseToScreen:lastMousePosition];
+}
+
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.h b/WebKitTools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.h
new file mode 100644
index 0000000..249809c
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2005, 2006 Apple Computer, 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+@interface DumpRenderTreeDraggingInfo : NSObject <NSDraggingInfo> {
+@private
+ NSSize offset;
+ NSImage *draggedImage;
+ NSPasteboard *draggingPasteboard;
+ id draggingSource;
+}
+
+- (id)initWithImage:(NSImage *)image offset:(NSSize)offset pasteboard:(NSPasteboard *)pasteboard source:(id)source;
+
+- (NSWindow *)draggingDestinationWindow;
+- (NSDragOperation)draggingSourceOperationMask;
+- (NSPoint)draggingLocation;
+- (NSPoint)draggedImageLocation;
+- (NSImage *)draggedImage;
+- (NSPasteboard *)draggingPasteboard;
+- (id)draggingSource;
+- (int)draggingSequenceNumber;
+
+- (void)slideDraggedImageTo:(NSPoint)screenPoint;
+- (NSArray *)namesOfPromisedFilesDroppedAtDestination:(NSURL *)dropDestination;
+@end
+
diff --git a/WebKitTools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm b/WebKitTools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm
new file mode 100644
index 0000000..41aa639
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2005, 2006 Apple Computer, 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "DumpRenderTreeDraggingInfo.h"
+
+#import "DumpRenderTree.h"
+#import "EventSendingController.h"
+#import <WebKit/WebKit.h>
+
+@implementation DumpRenderTreeDraggingInfo
+
+- (id)initWithImage:(NSImage *)anImage offset:(NSSize)o pasteboard:(NSPasteboard *)pboard source:(id)source
+{
+ draggedImage = [anImage retain];
+ draggingPasteboard = [pboard retain];
+ draggingSource = [source retain];
+ offset = o;
+
+ return [super init];
+}
+
+- (void)dealloc
+{
+ [draggedImage release];
+ [draggingPasteboard release];
+ [draggingSource release];
+ [super dealloc];
+}
+
+- (NSWindow *)draggingDestinationWindow
+{
+ return [[mainFrame webView] window];
+}
+
+- (NSDragOperation)draggingSourceOperationMask
+{
+ return [draggingSource draggingSourceOperationMaskForLocal:YES];
+}
+
+- (NSPoint)draggingLocation
+{
+ return lastMousePosition;
+}
+
+- (NSPoint)draggedImageLocation
+{
+ return NSMakePoint(lastMousePosition.x + offset.width, lastMousePosition.y + offset.height);
+}
+
+- (NSImage *)draggedImage
+{
+ return draggedImage;
+}
+
+- (NSPasteboard *)draggingPasteboard
+{
+ return draggingPasteboard;
+}
+
+- (id)draggingSource
+{
+ return draggingSource;
+}
+
+- (int)draggingSequenceNumber
+{
+ NSLog(@"DumpRenderTree doesn't support draggingSequenceNumber");
+ return 0;
+}
+
+- (void)slideDraggedImageTo:(NSPoint)screenPoint
+{
+ NSLog(@"DumpRenderTree doesn't support slideDraggedImageTo:");
+}
+
+- (NSArray *)namesOfPromisedFilesDroppedAtDestination:(NSURL *)dropDestination
+{
+ NSLog(@"DumpRenderTree doesn't support namesOfPromisedFilesDroppedAtDestination:");
+ return nil;
+}
+
+@end
+
diff --git a/WebKitTools/DumpRenderTree/mac/DumpRenderTreeMac.h b/WebKitTools/DumpRenderTree/mac/DumpRenderTreeMac.h
new file mode 100644
index 0000000..72d5db1
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/DumpRenderTreeMac.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DumpRenderTreeMac_h
+#define DumpRenderTreeMac_h
+
+// FIXME: we should add a config.h file for DumpRenderTree.
+#define WTF_PLATFORM_CF 1
+
+#if !defined(MAC_OS_X_VERSION_10_5) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
+#define BUILDING_ON_TIGER 1
+#elif !defined(MAC_OS_X_VERSION_10_6) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
+#define BUILDING_ON_LEOPARD 1
+#endif
+
+@class DumpRenderTreeDraggingInfo;
+@class NavigationController;
+@class PolicyDelegate;
+@class WebFrame;
+@class WebView;
+
+typedef const struct __CFString* CFStringRef;
+
+extern CFMutableArrayRef openWindowsRef;
+extern CFMutableSetRef disallowedURLs;
+extern WebFrame* mainFrame;
+extern WebFrame* topLoadingFrame;
+extern DumpRenderTreeDraggingInfo *draggingInfo;
+extern NavigationController* gNavigationController;
+extern PolicyDelegate* policyDelegate;
+
+extern const unsigned maxViewHeight;
+extern const unsigned maxViewWidth;
+
+extern CFRunLoopTimerRef waitToDumpWatchdog;
+
+WebView* createWebViewAndOffscreenWindow();
+void setPersistentUserStyleSheetLocation(CFStringRef);
+
+#endif // DumpRenderTreeMac_h
diff --git a/WebKitTools/DumpRenderTree/mac/DumpRenderTreePasteboard.h b/WebKitTools/DumpRenderTree/mac/DumpRenderTreePasteboard.h
new file mode 100644
index 0000000..ba2754b
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/DumpRenderTreePasteboard.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2005, 2006, 2007 Apple, Inc. All rights reserved.
+ * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
+ * (C) 2007 Eric Seidel <eric@webkit.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <AppKit/AppKit.h>
+#import <WebKit/WebTypesInternal.h>
+
+@interface DumpRenderTreePasteboard : NSPasteboard
+- (NSInteger)declareType:(NSString *)type owner:(id)newOwner;
++ (void)releaseLocalPasteboards;
+@end
+
diff --git a/WebKitTools/DumpRenderTree/mac/DumpRenderTreePasteboard.m b/WebKitTools/DumpRenderTree/mac/DumpRenderTreePasteboard.m
new file mode 100644
index 0000000..a797b5c
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/DumpRenderTreePasteboard.m
@@ -0,0 +1,205 @@
+/*
+ * Copyright (C) 2005, 2006, 2007 Apple, Inc. All rights reserved.
+ * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
+ * (C) 2007 Eric Seidel <eric@webkit.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "DumpRenderTreeMac.h"
+#import "DumpRenderTreePasteboard.h"
+
+#import <WebKit/WebTypesInternal.h>
+
+@interface LocalPasteboard : NSPasteboard
+{
+ NSMutableArray *typesArray;
+ NSMutableSet *typesSet;
+ NSMutableDictionary *dataByType;
+ NSInteger changeCount;
+}
+@end
+
+static NSMutableDictionary *localPasteboards;
+
+@implementation DumpRenderTreePasteboard
+
+// Return a local pasteboard so we don't disturb the real pasteboards when running tests.
++ (NSPasteboard *)_pasteboardWithName:(NSString *)name
+{
+ static int number = 0;
+ if (!name)
+ name = [NSString stringWithFormat:@"LocalPasteboard%d", ++number];
+ if (!localPasteboards)
+ localPasteboards = [[NSMutableDictionary alloc] init];
+ LocalPasteboard *pasteboard = [localPasteboards objectForKey:name];
+ if (pasteboard)
+ return pasteboard;
+ pasteboard = [[LocalPasteboard alloc] init];
+ [localPasteboards setObject:pasteboard forKey:name];
+ [pasteboard release];
+ return pasteboard;
+}
+
++ (void)releaseLocalPasteboards
+{
+ [localPasteboards release];
+ localPasteboards = nil;
+}
+
+// Convenience method for JS so that it doesn't have to try and create a NSArray on the objc side instead
+// of the usual WebScriptObject that is passed around
+- (NSInteger)declareType:(NSString *)type owner:(id)newOwner
+{
+ return [self declareTypes:[NSArray arrayWithObject:type] owner:newOwner];
+}
+
+@end
+
+@implementation LocalPasteboard
+
++ (id)alloc
+{
+ return NSAllocateObject(self, 0, 0);
+}
+
+- (id)init
+{
+ typesArray = [[NSMutableArray alloc] init];
+ typesSet = [[NSMutableSet alloc] init];
+ dataByType = [[NSMutableDictionary alloc] init];
+ return self;
+}
+
+- (void)dealloc
+{
+ [typesArray release];
+ [typesSet release];
+ [dataByType release];
+ [super dealloc];
+}
+
+- (NSString *)name
+{
+ return nil;
+}
+
+- (void)releaseGlobally
+{
+}
+
+- (NSInteger)declareTypes:(NSArray *)newTypes owner:(id)newOwner
+{
+ [typesArray removeAllObjects];
+ [typesSet removeAllObjects];
+ [dataByType removeAllObjects];
+ return [self addTypes:newTypes owner:newOwner];
+}
+
+- (NSInteger)addTypes:(NSArray *)newTypes owner:(id)newOwner
+{
+ unsigned count = [newTypes count];
+ unsigned i;
+ for (i = 0; i < count; ++i) {
+ NSString *type = [newTypes objectAtIndex:i];
+ NSString *setType = [typesSet member:type];
+ if (!setType) {
+ setType = [type copy];
+ [typesArray addObject:setType];
+ [typesSet addObject:setType];
+ [setType release];
+ }
+ if (newOwner && [newOwner respondsToSelector:@selector(pasteboard:provideDataForType:)])
+ [newOwner pasteboard:self provideDataForType:setType];
+ }
+ return ++changeCount;
+}
+
+- (NSInteger)changeCount
+{
+ return changeCount;
+}
+
+- (NSArray *)types
+{
+ return typesArray;
+}
+
+- (NSString *)availableTypeFromArray:(NSArray *)types
+{
+ unsigned count = [types count];
+ unsigned i;
+ for (i = 0; i < count; ++i) {
+ NSString *type = [types objectAtIndex:i];
+ NSString *setType = [typesSet member:type];
+ if (setType)
+ return setType;
+ }
+ return nil;
+}
+
+- (BOOL)setData:(NSData *)data forType:(NSString *)dataType
+{
+ if (data == nil)
+ data = [NSData data];
+ if (![typesSet containsObject:dataType])
+ return NO;
+ [dataByType setObject:data forKey:dataType];
+ ++changeCount;
+ return YES;
+}
+
+- (NSData *)dataForType:(NSString *)dataType
+{
+ return [dataByType objectForKey:dataType];
+}
+
+- (BOOL)setPropertyList:(id)propertyList forType:(NSString *)dataType;
+{
+ CFDataRef data = NULL;
+ if (propertyList)
+ data = CFPropertyListCreateXMLData(NULL, propertyList);
+ BOOL result = [self setData:(NSData *)data forType:dataType];
+ if (data)
+ CFRelease(data);
+ return result;
+}
+
+- (BOOL)setString:(NSString *)string forType:(NSString *)dataType
+{
+ CFDataRef data = NULL;
+ if (string) {
+ if ([string length] == 0)
+ data = CFDataCreate(NULL, NULL, 0);
+ else
+ data = CFStringCreateExternalRepresentation(NULL, (CFStringRef)string, kCFStringEncodingUTF8, 0);
+ }
+ BOOL result = [self setData:(NSData *)data forType:dataType];
+ if (data)
+ CFRelease(data);
+ return result;
+}
+
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/DumpRenderTreeWindow.h b/WebKitTools/DumpRenderTree/mac/DumpRenderTreeWindow.h
new file mode 100644
index 0000000..d2fb60d
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/DumpRenderTreeWindow.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2005, 2006, 2007 Apple, Inc. All rights reserved.
+ * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
+ * (C) 2007 Eric Seidel <eric@webkit.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <AppKit/AppKit.h>
+
+@class WebView;
+
+@interface DumpRenderTreeWindow : NSWindow
+// I'm not sure why we can't just use [NSApp windows]
++ (NSArray *)openWindows;
+
+- (WebView *)webView;
+
+- (void)startObservingWebView;
+- (void)stopObservingWebView;
+
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/DumpRenderTreeWindow.mm b/WebKitTools/DumpRenderTree/mac/DumpRenderTreeWindow.mm
new file mode 100644
index 0000000..3b1fc1f
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/DumpRenderTreeWindow.mm
@@ -0,0 +1,124 @@
+/*
+ * Copyright (C) 2005, 2006, 2007 Apple, Inc. All rights reserved.
+ * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
+ * (C) 2007 Eric Seidel <eric@webkit.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "DumpRenderTreeWindow.h"
+
+#import "DumpRenderTree.h"
+
+// FIXME: This file is ObjC++ only because of this include. :(
+#import "LayoutTestController.h"
+#import <WebKit/WebViewPrivate.h>
+#import <WebKit/WebTypesInternal.h>
+
+CFMutableArrayRef openWindowsRef = 0;
+
+static CFArrayCallBacks NonRetainingArrayCallbacks = {
+ 0,
+ NULL,
+ NULL,
+ CFCopyDescription,
+ CFEqual
+};
+
+@implementation DumpRenderTreeWindow
+
++ (NSArray *)openWindows
+{
+ return [[(NSArray *)openWindowsRef copy] autorelease];
+}
+
+- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)styleMask backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation
+{
+ if (!openWindowsRef)
+ openWindowsRef = CFArrayCreateMutable(NULL, 0, &NonRetainingArrayCallbacks);
+
+ CFArrayAppendValue(openWindowsRef, self);
+
+ return [super initWithContentRect:contentRect styleMask:styleMask backing:bufferingType defer:deferCreation];
+}
+
+- (void)close
+{
+ [self stopObservingWebView];
+
+ CFRange arrayRange = CFRangeMake(0, CFArrayGetCount(openWindowsRef));
+ CFIndex i = CFArrayGetFirstIndexOfValue(openWindowsRef, arrayRange, self);
+ assert(i != -1);
+ CFArrayRemoveValueAtIndex(openWindowsRef, i);
+
+ [super close];
+}
+
+- (BOOL)isKeyWindow
+{
+ return gLayoutTestController ? gLayoutTestController->windowIsKey() : YES;
+}
+
+- (void)keyDown:(id)sender
+{
+ // Do nothing, avoiding the beep we'd otherwise get from NSResponder,
+ // once we get to the end of the responder chain.
+}
+
+- (WebView *)webView
+{
+ NSView *firstView = nil;
+ if ([[[self contentView] subviews] count] > 0) {
+ firstView = [[[self contentView] subviews] objectAtIndex:0];
+ if ([firstView isKindOfClass:[WebView class]])
+ return static_cast<WebView *>(firstView);
+ }
+ return nil;
+}
+
+- (void)startObservingWebView
+{
+ [[self webView] addObserver:self forKeyPath:@"_isUsingAcceleratedCompositing" options:0 context:0];
+}
+
+- (void)stopObservingWebView
+{
+ [[self webView] removeObserver:self forKeyPath:@"_isUsingAcceleratedCompositing"];
+}
+
+- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
+{
+ if ([keyPath isEqualToString:@"_isUsingAcceleratedCompositing"]) {
+ // When using accelerated compositing, the window needs to be autodisplay for AppKit/CA to
+ // start accelerated animations correctly.
+ BOOL isAccelerated = [[self webView] _isUsingAcceleratedCompositing];
+ [self setAutodisplay:isAccelerated];
+ return;
+ }
+
+ [super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
+}
+
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/EditingDelegate.h b/WebKitTools/DumpRenderTree/mac/EditingDelegate.h
new file mode 100644
index 0000000..b5563c8
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/EditingDelegate.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2005, 2006 Apple Computer, 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+@interface EditingDelegate : NSObject
+{
+ BOOL acceptsEditing;
+}
+
+- (void)setAcceptsEditing:(BOOL)newAcceptsEditing;
+
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/EditingDelegate.mm b/WebKitTools/DumpRenderTree/mac/EditingDelegate.mm
new file mode 100644
index 0000000..cf4026b
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/EditingDelegate.mm
@@ -0,0 +1,191 @@
+/*
+ * Copyright (C) 2005, 2006 Apple Computer, 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "EditingDelegate.h"
+
+#import "DumpRenderTree.h"
+#import "LayoutTestController.h"
+#import <WebKit/WebKit.h>
+
+@interface DOMNode (dumpPath)
+- (NSString *)dumpPath;
+@end
+
+@implementation DOMNode (dumpPath)
+- (NSString *)dumpPath
+{
+ DOMNode *parent = [self parentNode];
+ NSString *str = [NSString stringWithFormat:@"%@", [self nodeName]];
+ if (parent != nil) {
+ str = [str stringByAppendingString:@" > "];
+ str = [str stringByAppendingString:[parent dumpPath]];
+ }
+ return str;
+}
+@end
+
+@interface DOMRange (dump)
+- (NSString *)dump;
+@end
+
+@implementation DOMRange (dump)
+- (NSString *)dump
+{
+ return [NSString stringWithFormat:@"range from %ld of %@ to %ld of %@", [self startOffset], [[self startContainer] dumpPath], [self endOffset], [[self endContainer] dumpPath]];
+}
+@end
+
+@implementation EditingDelegate
+
+- (id)init
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ acceptsEditing = YES;
+ return self;
+}
+
+- (BOOL)webView:(WebView *)webView shouldBeginEditingInDOMRange:(DOMRange *)range
+{
+ if (!done && gLayoutTestController->dumpEditingCallbacks())
+ printf("EDITING DELEGATE: shouldBeginEditingInDOMRange:%s\n", [[range dump] UTF8String]);
+ return acceptsEditing;
+}
+
+- (BOOL)webView:(WebView *)webView shouldEndEditingInDOMRange:(DOMRange *)range
+{
+ if (!done && gLayoutTestController->dumpEditingCallbacks())
+ printf("EDITING DELEGATE: shouldEndEditingInDOMRange:%s\n", [[range dump] UTF8String]);
+ return acceptsEditing;
+}
+
+- (BOOL)webView:(WebView *)webView shouldInsertNode:(DOMNode *)node replacingDOMRange:(DOMRange *)range givenAction:(WebViewInsertAction)action
+{
+ static const char *insertactionstring[] = {
+ "WebViewInsertActionTyped",
+ "WebViewInsertActionPasted",
+ "WebViewInsertActionDropped",
+ };
+
+ if (!done && gLayoutTestController->dumpEditingCallbacks())
+ printf("EDITING DELEGATE: shouldInsertNode:%s replacingDOMRange:%s givenAction:%s\n", [[node dumpPath] UTF8String], [[range dump] UTF8String], insertactionstring[action]);
+ return acceptsEditing;
+}
+
+- (BOOL)webView:(WebView *)webView shouldInsertText:(NSString *)text replacingDOMRange:(DOMRange *)range givenAction:(WebViewInsertAction)action
+{
+ static const char *insertactionstring[] = {
+ "WebViewInsertActionTyped",
+ "WebViewInsertActionPasted",
+ "WebViewInsertActionDropped",
+ };
+
+ if (!done && gLayoutTestController->dumpEditingCallbacks())
+ printf("EDITING DELEGATE: shouldInsertText:%s replacingDOMRange:%s givenAction:%s\n", [[text description] UTF8String], [[range dump] UTF8String], insertactionstring[action]);
+ return acceptsEditing;
+}
+
+- (BOOL)webView:(WebView *)webView shouldDeleteDOMRange:(DOMRange *)range
+{
+ if (!done && gLayoutTestController->dumpEditingCallbacks())
+ printf("EDITING DELEGATE: shouldDeleteDOMRange:%s\n", [[range dump] UTF8String]);
+ return acceptsEditing;
+}
+
+- (BOOL)webView:(WebView *)webView shouldShowDeleteInterfaceForElement:(DOMHTMLElement *)element
+{
+ return [[element className] isEqualToString:@"needsDeletionUI"];
+}
+
+- (BOOL)webView:(WebView *)webView shouldChangeSelectedDOMRange:(DOMRange *)currentRange toDOMRange:(DOMRange *)proposedRange affinity:(NSSelectionAffinity)selectionAffinity stillSelecting:(BOOL)flag
+{
+ static const char *affinitystring[] = {
+ "NSSelectionAffinityUpstream",
+ "NSSelectionAffinityDownstream"
+ };
+ static const char *boolstring[] = {
+ "FALSE",
+ "TRUE"
+ };
+
+ if (!done && gLayoutTestController->dumpEditingCallbacks())
+ printf("EDITING DELEGATE: shouldChangeSelectedDOMRange:%s toDOMRange:%s affinity:%s stillSelecting:%s\n", [[currentRange dump] UTF8String], [[proposedRange dump] UTF8String], affinitystring[selectionAffinity], boolstring[flag]);
+ return acceptsEditing;
+}
+
+- (BOOL)webView:(WebView *)webView shouldApplyStyle:(DOMCSSStyleDeclaration *)style toElementsInDOMRange:(DOMRange *)range
+{
+ if (!done && gLayoutTestController->dumpEditingCallbacks())
+ printf("EDITING DELEGATE: shouldApplyStyle:%s toElementsInDOMRange:%s\n", [[style description] UTF8String], [[range dump] UTF8String]);
+ return acceptsEditing;
+}
+
+- (BOOL)webView:(WebView *)webView shouldChangeTypingStyle:(DOMCSSStyleDeclaration *)currentStyle toStyle:(DOMCSSStyleDeclaration *)proposedStyle
+{
+ if (!done && gLayoutTestController->dumpEditingCallbacks())
+ printf("EDITING DELEGATE: shouldChangeTypingStyle:%s toStyle:%s\n", [[currentStyle description] UTF8String], [[proposedStyle description] UTF8String]);
+ return acceptsEditing;
+}
+
+- (void)webViewDidBeginEditing:(NSNotification *)notification
+{
+ if (!done && gLayoutTestController->dumpEditingCallbacks())
+ printf("EDITING DELEGATE: webViewDidBeginEditing:%s\n", [[notification name] UTF8String]);
+}
+
+- (void)webViewDidChange:(NSNotification *)notification
+{
+ if (!done && gLayoutTestController->dumpEditingCallbacks())
+ printf("EDITING DELEGATE: webViewDidChange:%s\n", [[notification name] UTF8String]);
+}
+
+- (void)webViewDidEndEditing:(NSNotification *)notification
+{
+ if (!done && gLayoutTestController->dumpEditingCallbacks())
+ printf("EDITING DELEGATE: webViewDidEndEditing:%s\n", [[notification name] UTF8String]);
+}
+
+- (void)webViewDidChangeTypingStyle:(NSNotification *)notification
+{
+ if (!done && gLayoutTestController->dumpEditingCallbacks())
+ printf("EDITING DELEGATE: webViewDidChangeTypingStyle:%s\n", [[notification name] UTF8String]);
+}
+
+- (void)webViewDidChangeSelection:(NSNotification *)notification
+{
+ if (!done && gLayoutTestController->dumpEditingCallbacks())
+ printf("EDITING DELEGATE: webViewDidChangeSelection:%s\n", [[notification name] UTF8String]);
+}
+
+- (void)setAcceptsEditing:(BOOL)newAcceptsEditing
+{
+ acceptsEditing = newAcceptsEditing;
+}
+
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/EventSendingController.h b/WebKitTools/DumpRenderTree/mac/EventSendingController.h
new file mode 100644
index 0000000..9440575
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/EventSendingController.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2005, 2006, 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+#import <WebKit/WebKit.h>
+
+@interface EventSendingController : NSObject <DOMEventListener>
+{
+ BOOL leftMouseButtonDown;
+ BOOL dragMode;
+ int clickCount;
+ NSTimeInterval lastClick;
+ int eventNumber;
+ double timeOffset;
+}
+
++ (void)saveEvent:(NSInvocation *)event;
++ (void)replaySavedEvents;
++ (void)clearSavedEvents;
+
+- (void)scheduleAsynchronousClick;
+
+- (void)enableDOMUIEventLogging:(WebScriptObject *)node;
+
+- (void)handleEvent:(DOMEvent *)event;
+
+@end
+
+extern NSPoint lastMousePosition;
+extern NSPoint lastClickPosition; \ No newline at end of file
diff --git a/WebKitTools/DumpRenderTree/mac/EventSendingController.mm b/WebKitTools/DumpRenderTree/mac/EventSendingController.mm
new file mode 100644
index 0000000..5883026
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/EventSendingController.mm
@@ -0,0 +1,674 @@
+/*
+ * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2006 Jonas Witt <jonas.witt@gmail.com>
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ * Copyright (C) 2006 Alexey Proskuryakov <ap@nypop.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "EventSendingController.h"
+
+#import "DumpRenderTree.h"
+#import "DumpRenderTreeDraggingInfo.h"
+
+#import <Carbon/Carbon.h> // for GetCurrentEventTime()
+#import <WebKit/DOMPrivate.h>
+#import <WebKit/WebKit.h>
+#import <WebKit/WebViewPrivate.h>
+
+extern "C" void _NSNewKillRingSequence();
+
+enum MouseAction {
+ MouseDown,
+ MouseUp,
+ MouseDragged
+};
+
+// Match the DOM spec (sadly the DOM spec does not provide an enum)
+enum MouseButton {
+ LeftMouseButton = 0,
+ MiddleMouseButton = 1,
+ RightMouseButton = 2,
+ NoMouseButton = -1
+};
+
+NSPoint lastMousePosition;
+NSPoint lastClickPosition;
+int lastClickButton = NoMouseButton;
+NSArray *webkitDomEventNames;
+NSMutableArray *savedMouseEvents; // mouse events sent between mouseDown and mouseUp are stored here, and then executed at once.
+BOOL replayingSavedEvents;
+
+@implementation EventSendingController
+
++ (void)initialize
+{
+ webkitDomEventNames = [[NSArray alloc] initWithObjects:
+ @"abort",
+ @"beforecopy",
+ @"beforecut",
+ @"beforepaste",
+ @"blur",
+ @"change",
+ @"click",
+ @"contextmenu",
+ @"copy",
+ @"cut",
+ @"dblclick",
+ @"drag",
+ @"dragend",
+ @"dragenter",
+ @"dragleave",
+ @"dragover",
+ @"dragstart",
+ @"drop",
+ @"error",
+ @"focus",
+ @"input",
+ @"keydown",
+ @"keypress",
+ @"keyup",
+ @"load",
+ @"mousedown",
+ @"mousemove",
+ @"mouseout",
+ @"mouseover",
+ @"mouseup",
+ @"mousewheel",
+ @"beforeunload",
+ @"paste",
+ @"readystatechange",
+ @"reset",
+ @"resize",
+ @"scroll",
+ @"search",
+ @"select",
+ @"selectstart",
+ @"submit",
+ @"textInput",
+ @"textzoomin",
+ @"textzoomout",
+ @"unload",
+ @"zoom",
+ nil];
+}
+
++ (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector
+{
+ if (aSelector == @selector(mouseDown:)
+ || aSelector == @selector(mouseUp:)
+ || aSelector == @selector(contextClick)
+ || aSelector == @selector(scheduleAsynchronousClick)
+ || aSelector == @selector(mouseMoveToX:Y:)
+ || aSelector == @selector(leapForward:)
+ || aSelector == @selector(keyDown:withModifiers:)
+ || aSelector == @selector(enableDOMUIEventLogging:)
+ || aSelector == @selector(fireKeyboardEventsToElement:)
+ || aSelector == @selector(clearKillRing)
+ || aSelector == @selector(textZoomIn)
+ || aSelector == @selector(textZoomOut)
+ || aSelector == @selector(zoomPageIn)
+ || aSelector == @selector(zoomPageOut))
+ return NO;
+ return YES;
+}
+
++ (BOOL)isKeyExcludedFromWebScript:(const char*)name
+{
+ if (strcmp(name, "dragMode") == 0)
+ return NO;
+ return YES;
+}
+
++ (NSString *)webScriptNameForSelector:(SEL)aSelector
+{
+ if (aSelector == @selector(mouseDown:))
+ return @"mouseDown";
+ if (aSelector == @selector(mouseUp:))
+ return @"mouseUp";
+ if (aSelector == @selector(mouseMoveToX:Y:))
+ return @"mouseMoveTo";
+ if (aSelector == @selector(leapForward:))
+ return @"leapForward";
+ if (aSelector == @selector(keyDown:withModifiers:))
+ return @"keyDown";
+ if (aSelector == @selector(enableDOMUIEventLogging:))
+ return @"enableDOMUIEventLogging";
+ if (aSelector == @selector(fireKeyboardEventsToElement:))
+ return @"fireKeyboardEventsToElement";
+ if (aSelector == @selector(setDragMode:))
+ return @"setDragMode";
+ return nil;
+}
+
+- (id)init
+{
+ self = [super init];
+ if (self)
+ dragMode = YES;
+ return self;
+}
+
+- (void)dealloc
+{
+ [super dealloc];
+}
+
+- (double)currentEventTime
+{
+ return GetCurrentEventTime() + timeOffset;
+}
+
+- (void)leapForward:(int)milliseconds
+{
+ if (dragMode && leftMouseButtonDown && !replayingSavedEvents) {
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[EventSendingController instanceMethodSignatureForSelector:@selector(leapForward:)]];
+ [invocation setTarget:self];
+ [invocation setSelector:@selector(leapForward:)];
+ [invocation setArgument:&milliseconds atIndex:2];
+
+ [EventSendingController saveEvent:invocation];
+
+ return;
+ }
+
+ timeOffset += milliseconds / 1000.0;
+}
+
+- (void)clearKillRing
+{
+ _NSNewKillRingSequence();
+}
+
+static NSEventType eventTypeForMouseButtonAndAction(int button, MouseAction action)
+{
+ switch (button) {
+ case LeftMouseButton:
+ switch (action) {
+ case MouseDown:
+ return NSLeftMouseDown;
+ case MouseUp:
+ return NSLeftMouseUp;
+ case MouseDragged:
+ return NSLeftMouseDragged;
+ }
+ case RightMouseButton:
+ switch (action) {
+ case MouseDown:
+ return NSRightMouseDown;
+ case MouseUp:
+ return NSRightMouseUp;
+ case MouseDragged:
+ return NSRightMouseDragged;
+ }
+ default:
+ switch (action) {
+ case MouseDown:
+ return NSOtherMouseDown;
+ case MouseUp:
+ return NSOtherMouseUp;
+ case MouseDragged:
+ return NSOtherMouseDragged;
+ }
+ }
+ assert(0);
+ return static_cast<NSEventType>(0);
+}
+
+- (void)updateClickCountForButton:(int)buttonNumber
+{
+ if (([self currentEventTime] - lastClick >= 1) ||
+ !NSEqualPoints(lastMousePosition, lastClickPosition) ||
+ lastClickButton != buttonNumber) {
+ clickCount = 1;
+ lastClickButton = buttonNumber;
+ } else
+ clickCount++;
+}
+
+- (void)mouseDown:(int)buttonNumber
+{
+ [[[mainFrame frameView] documentView] layout];
+ [self updateClickCountForButton:buttonNumber];
+
+ NSEventType eventType = eventTypeForMouseButtonAndAction(buttonNumber, MouseDown);
+ NSEvent *event = [NSEvent mouseEventWithType:eventType
+ location:lastMousePosition
+ modifierFlags:0
+ timestamp:[self currentEventTime]
+ windowNumber:[[[mainFrame webView] window] windowNumber]
+ context:[NSGraphicsContext currentContext]
+ eventNumber:++eventNumber
+ clickCount:clickCount
+ pressure:0.0];
+
+ NSView *subView = [[mainFrame webView] hitTest:[event locationInWindow]];
+ if (subView) {
+ [subView mouseDown:event];
+ if (buttonNumber == LeftMouseButton)
+ leftMouseButtonDown = YES;
+ }
+}
+
+- (void)textZoomIn
+{
+ [[mainFrame webView] makeTextLarger:self];
+}
+
+- (void)textZoomOut
+{
+ [[mainFrame webView] makeTextSmaller:self];
+}
+
+- (void)zoomPageIn
+{
+ [[mainFrame webView] zoomPageIn:self];
+}
+
+- (void)zoomPageOut
+{
+ [[mainFrame webView] zoomPageOut:self];
+}
+
+- (void)mouseUp:(int)buttonNumber
+{
+ if (dragMode && !replayingSavedEvents) {
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[EventSendingController instanceMethodSignatureForSelector:@selector(mouseUp:)]];
+ [invocation setTarget:self];
+ [invocation setSelector:@selector(mouseUp:)];
+ [invocation setArgument:&buttonNumber atIndex:2];
+
+ [EventSendingController saveEvent:invocation];
+ [EventSendingController replaySavedEvents];
+
+ return;
+ }
+
+ [[[mainFrame frameView] documentView] layout];
+ NSEventType eventType = eventTypeForMouseButtonAndAction(buttonNumber, MouseUp);
+ NSEvent *event = [NSEvent mouseEventWithType:eventType
+ location:lastMousePosition
+ modifierFlags:0
+ timestamp:[self currentEventTime]
+ windowNumber:[[[mainFrame webView] window] windowNumber]
+ context:[NSGraphicsContext currentContext]
+ eventNumber:++eventNumber
+ clickCount:clickCount
+ pressure:0.0];
+
+ NSView *targetView = [[mainFrame webView] hitTest:[event locationInWindow]];
+ // FIXME: Silly hack to teach DRT to respect capturing mouse events outside the WebView.
+ // The right solution is just to use NSApplication's built-in event sending methods,
+ // instead of rolling our own algorithm for selecting an event target.
+ targetView = targetView ? targetView : [[mainFrame frameView] documentView];
+ assert(targetView);
+ [targetView mouseUp:event];
+ if (buttonNumber == LeftMouseButton)
+ leftMouseButtonDown = NO;
+ lastClick = [event timestamp];
+ lastClickPosition = lastMousePosition;
+ if (draggingInfo) {
+ WebView *webView = [mainFrame webView];
+
+ NSDragOperation dragOperation = [webView draggingUpdated:draggingInfo];
+
+ if (dragOperation != NSDragOperationNone)
+ [webView performDragOperation:draggingInfo];
+ else
+ [webView draggingExited:draggingInfo];
+ [[draggingInfo draggingSource] draggedImage:[draggingInfo draggedImage] endedAt:lastMousePosition operation:dragOperation];
+ [draggingInfo release];
+ draggingInfo = nil;
+ }
+}
+
+- (void)mouseMoveToX:(int)x Y:(int)y
+{
+ if (dragMode && leftMouseButtonDown && !replayingSavedEvents) {
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[EventSendingController instanceMethodSignatureForSelector:@selector(mouseMoveToX:Y:)]];
+ [invocation setTarget:self];
+ [invocation setSelector:@selector(mouseMoveToX:Y:)];
+ [invocation setArgument:&x atIndex:2];
+ [invocation setArgument:&y atIndex:3];
+
+ [EventSendingController saveEvent:invocation];
+
+ return;
+ }
+
+ NSView *view = [mainFrame webView];
+ lastMousePosition = [view convertPoint:NSMakePoint(x, [view frame].size.height - y) toView:nil];
+ NSEvent *event = [NSEvent mouseEventWithType:(leftMouseButtonDown ? NSLeftMouseDragged : NSMouseMoved)
+ location:lastMousePosition
+ modifierFlags:0
+ timestamp:[self currentEventTime]
+ windowNumber:[[view window] windowNumber]
+ context:[NSGraphicsContext currentContext]
+ eventNumber:++eventNumber
+ clickCount:(leftMouseButtonDown ? clickCount : 0)
+ pressure:0.0];
+
+ NSView *subView = [[mainFrame webView] hitTest:[event locationInWindow]];
+ if (subView) {
+ if (leftMouseButtonDown) {
+ [subView mouseDragged:event];
+ if (draggingInfo) {
+ [[draggingInfo draggingSource] draggedImage:[draggingInfo draggedImage] movedTo:lastMousePosition];
+ [[mainFrame webView] draggingUpdated:draggingInfo];
+ }
+ } else
+ [subView mouseMoved:event];
+ }
+}
+
+- (void)contextClick
+{
+ [[[mainFrame frameView] documentView] layout];
+ [self updateClickCountForButton:RightMouseButton];
+
+ NSEvent *event = [NSEvent mouseEventWithType:NSRightMouseDown
+ location:lastMousePosition
+ modifierFlags:0
+ timestamp:[self currentEventTime]
+ windowNumber:[[[mainFrame webView] window] windowNumber]
+ context:[NSGraphicsContext currentContext]
+ eventNumber:++eventNumber
+ clickCount:clickCount
+ pressure:0.0];
+
+ NSView *subView = [[mainFrame webView] hitTest:[event locationInWindow]];
+ if (subView)
+ [subView menuForEvent:event];
+}
+
+- (void)scheduleAsynchronousClick
+{
+ [self performSelector:@selector(mouseDown:) withObject:nil afterDelay:0];
+ [self performSelector:@selector(mouseUp:) withObject:nil afterDelay:0];
+}
+
++ (void)saveEvent:(NSInvocation *)event
+{
+ if (!savedMouseEvents)
+ savedMouseEvents = [[NSMutableArray alloc] init];
+ [savedMouseEvents addObject:event];
+}
+
++ (void)replaySavedEvents
+{
+ replayingSavedEvents = YES;
+ while ([savedMouseEvents count]) {
+ // if a drag is initiated, the remaining saved events will be dispatched from our dragging delegate
+ NSInvocation *invocation = [[[savedMouseEvents objectAtIndex:0] retain] autorelease];
+ [savedMouseEvents removeObjectAtIndex:0];
+ [invocation invoke];
+ }
+ replayingSavedEvents = NO;
+}
+
++ (void)clearSavedEvents
+{
+ [savedMouseEvents release];
+ savedMouseEvents = nil;
+}
+
+- (void)keyDown:(NSString *)character withModifiers:(WebScriptObject *)modifiers
+{
+ NSString *eventCharacter = character;
+ if ([character isEqualToString:@"leftArrow"]) {
+ const unichar ch = NSLeftArrowFunctionKey;
+ eventCharacter = [NSString stringWithCharacters:&ch length:1];
+ } else if ([character isEqualToString:@"rightArrow"]) {
+ const unichar ch = NSRightArrowFunctionKey;
+ eventCharacter = [NSString stringWithCharacters:&ch length:1];
+ } else if ([character isEqualToString:@"upArrow"]) {
+ const unichar ch = NSUpArrowFunctionKey;
+ eventCharacter = [NSString stringWithCharacters:&ch length:1];
+ } else if ([character isEqualToString:@"downArrow"]) {
+ const unichar ch = NSDownArrowFunctionKey;
+ eventCharacter = [NSString stringWithCharacters:&ch length:1];
+ } else if ([character isEqualToString:@"pageUp"]) {
+ const unichar ch = NSPageUpFunctionKey;
+ eventCharacter = [NSString stringWithCharacters:&ch length:1];
+ } else if ([character isEqualToString:@"pageDown"]) {
+ const unichar ch = NSPageDownFunctionKey;
+ eventCharacter = [NSString stringWithCharacters:&ch length:1];
+ } else if ([character isEqualToString:@"home"]) {
+ const unichar ch = NSHomeFunctionKey;
+ eventCharacter = [NSString stringWithCharacters:&ch length:1];
+ } else if ([character isEqualToString:@"end"]) {
+ const unichar ch = NSEndFunctionKey;
+ eventCharacter = [NSString stringWithCharacters:&ch length:1];
+ } else if ([character isEqualToString:@"delete"]) {
+ const unichar ch = 0x7f;
+ eventCharacter = [NSString stringWithCharacters:&ch length:1];
+ }
+
+ NSString *charactersIgnoringModifiers = eventCharacter;
+
+ int modifierFlags = 0;
+
+ if ([character length] == 1 && [character characterAtIndex:0] >= 'A' && [character characterAtIndex:0] <= 'Z') {
+ modifierFlags |= NSShiftKeyMask;
+ charactersIgnoringModifiers = [character lowercaseString];
+ }
+
+ if ([modifiers isKindOfClass:[WebScriptObject class]])
+ for (unsigned i = 0; [[modifiers webScriptValueAtIndex:i] isKindOfClass:[NSString class]]; i++) {
+ NSString *modifier = (NSString *)[modifiers webScriptValueAtIndex:i];
+ if ([modifier isEqual:@"ctrlKey"])
+ modifierFlags |= NSControlKeyMask;
+ else if ([modifier isEqual:@"shiftKey"])
+ modifierFlags |= NSShiftKeyMask;
+ else if ([modifier isEqual:@"altKey"])
+ modifierFlags |= NSAlternateKeyMask;
+ else if ([modifier isEqual:@"metaKey"])
+ modifierFlags |= NSCommandKeyMask;
+ }
+
+ [[[mainFrame frameView] documentView] layout];
+
+ NSEvent *event = [NSEvent keyEventWithType:NSKeyDown
+ location:NSMakePoint(5, 5)
+ modifierFlags:modifierFlags
+ timestamp:[self currentEventTime]
+ windowNumber:[[[mainFrame webView] window] windowNumber]
+ context:[NSGraphicsContext currentContext]
+ characters:eventCharacter
+ charactersIgnoringModifiers:charactersIgnoringModifiers
+ isARepeat:NO
+ keyCode:0];
+
+ [[[[mainFrame webView] window] firstResponder] keyDown:event];
+
+ event = [NSEvent keyEventWithType:NSKeyUp
+ location:NSMakePoint(5, 5)
+ modifierFlags:modifierFlags
+ timestamp:[self currentEventTime]
+ windowNumber:[[[mainFrame webView] window] windowNumber]
+ context:[NSGraphicsContext currentContext]
+ characters:eventCharacter
+ charactersIgnoringModifiers:charactersIgnoringModifiers
+ isARepeat:NO
+ keyCode:0];
+
+ [[[[mainFrame webView] window] firstResponder] keyUp:event];
+}
+
+- (void)enableDOMUIEventLogging:(WebScriptObject *)node
+{
+ NSEnumerator *eventEnumerator = [webkitDomEventNames objectEnumerator];
+ id eventName;
+ while ((eventName = [eventEnumerator nextObject])) {
+ [(id<DOMEventTarget>)node addEventListener:eventName listener:self useCapture:NO];
+ }
+}
+
+- (void)handleEvent:(DOMEvent *)event
+{
+ DOMNode *target = [event target];
+
+ printf("event type: %s\n", [[event type] UTF8String]);
+ printf(" target: <%s>\n", [[[target nodeName] lowercaseString] UTF8String]);
+
+ if ([event isKindOfClass:[DOMEvent class]]) {
+ printf(" eventPhase: %d\n", [event eventPhase]);
+ printf(" bubbles: %d\n", [event bubbles] ? 1 : 0);
+ printf(" cancelable: %d\n", [event cancelable] ? 1 : 0);
+ }
+
+ if ([event isKindOfClass:[DOMUIEvent class]]) {
+ printf(" detail: %d\n", [(DOMUIEvent*)event detail]);
+
+ DOMAbstractView *view = [(DOMUIEvent*)event view];
+ if (view) {
+ printf(" view: OK");
+ if ([view document])
+ printf(" (document: OK)");
+ printf("\n");
+ }
+ }
+
+ if ([event isKindOfClass:[DOMKeyboardEvent class]]) {
+ printf(" keyIdentifier: %s\n", [[(DOMKeyboardEvent*)event keyIdentifier] UTF8String]);
+ printf(" keyLocation: %d\n", [(DOMKeyboardEvent*)event keyLocation]);
+ printf(" modifier keys: c:%d s:%d a:%d m:%d\n",
+ [(DOMKeyboardEvent*)event ctrlKey] ? 1 : 0,
+ [(DOMKeyboardEvent*)event shiftKey] ? 1 : 0,
+ [(DOMKeyboardEvent*)event altKey] ? 1 : 0,
+ [(DOMKeyboardEvent*)event metaKey] ? 1 : 0);
+ printf(" keyCode: %d\n", [(DOMKeyboardEvent*)event keyCode]);
+ printf(" charCode: %d\n", [(DOMKeyboardEvent*)event charCode]);
+ }
+
+ if ([event isKindOfClass:[DOMMouseEvent class]]) {
+ printf(" button: %d\n", [(DOMMouseEvent*)event button]);
+ printf(" clientX: %d\n", [(DOMMouseEvent*)event clientX]);
+ printf(" clientY: %d\n", [(DOMMouseEvent*)event clientY]);
+ printf(" screenX: %d\n", [(DOMMouseEvent*)event screenX]);
+ printf(" screenY: %d\n", [(DOMMouseEvent*)event screenY]);
+ printf(" modifier keys: c:%d s:%d a:%d m:%d\n",
+ [(DOMMouseEvent*)event ctrlKey] ? 1 : 0,
+ [(DOMMouseEvent*)event shiftKey] ? 1 : 0,
+ [(DOMMouseEvent*)event altKey] ? 1 : 0,
+ [(DOMMouseEvent*)event metaKey] ? 1 : 0);
+ id relatedTarget = [(DOMMouseEvent*)event relatedTarget];
+ if (relatedTarget) {
+ printf(" relatedTarget: %s", [[[relatedTarget class] description] UTF8String]);
+ if ([relatedTarget isKindOfClass:[DOMNode class]])
+ printf(" (nodeName: %s)", [[(DOMNode*)relatedTarget nodeName] UTF8String]);
+ printf("\n");
+ }
+ }
+
+ if ([event isKindOfClass:[DOMMutationEvent class]]) {
+ printf(" prevValue: %s\n", [[(DOMMutationEvent*)event prevValue] UTF8String]);
+ printf(" newValue: %s\n", [[(DOMMutationEvent*)event newValue] UTF8String]);
+ printf(" attrName: %s\n", [[(DOMMutationEvent*)event attrName] UTF8String]);
+ printf(" attrChange: %d\n", [(DOMMutationEvent*)event attrChange]);
+ DOMNode *relatedNode = [(DOMMutationEvent*)event relatedNode];
+ if (relatedNode) {
+ printf(" relatedNode: %s (nodeName: %s)\n",
+ [[[relatedNode class] description] UTF8String],
+ [[relatedNode nodeName] UTF8String]);
+ }
+ }
+
+ if ([event isKindOfClass:[DOMWheelEvent class]]) {
+ printf(" clientX: %d\n", [(DOMWheelEvent*)event clientX]);
+ printf(" clientY: %d\n", [(DOMWheelEvent*)event clientY]);
+ printf(" screenX: %d\n", [(DOMWheelEvent*)event screenX]);
+ printf(" screenY: %d\n", [(DOMWheelEvent*)event screenY]);
+ printf(" modifier keys: c:%d s:%d a:%d m:%d\n",
+ [(DOMWheelEvent*)event ctrlKey] ? 1 : 0,
+ [(DOMWheelEvent*)event shiftKey] ? 1 : 0,
+ [(DOMWheelEvent*)event altKey] ? 1 : 0,
+ [(DOMWheelEvent*)event metaKey] ? 1 : 0);
+ printf(" isHorizontal: %d\n", [(DOMWheelEvent*)event isHorizontal] ? 1 : 0);
+ printf(" wheelDelta: %d\n", [(DOMWheelEvent*)event wheelDelta]);
+ }
+}
+
+// FIXME: It's not good to have a test hard-wired into this controller like this.
+// Instead we need to get testing framework based on the Objective-C bindings
+// to work well enough that we can test that way instead.
+- (void)fireKeyboardEventsToElement:(WebScriptObject *)element {
+
+ if (![element isKindOfClass:[DOMHTMLElement class]]) {
+ return;
+ }
+
+ DOMHTMLElement *target = (DOMHTMLElement*)element;
+ DOMDocument *document = [target ownerDocument];
+
+ // Keyboard Event 1
+
+ DOMEvent *domEvent = [document createEvent:@"KeyboardEvent"];
+ [(DOMKeyboardEvent*)domEvent initKeyboardEvent:@"keydown"
+ canBubble:YES
+ cancelable:YES
+ view:[document defaultView]
+ keyIdentifier:@"U+000041"
+ keyLocation:0
+ ctrlKey:YES
+ altKey:NO
+ shiftKey:NO
+ metaKey:NO];
+ [target dispatchEvent:domEvent];
+
+ // Keyboard Event 2
+
+ domEvent = [document createEvent:@"KeyboardEvent"];
+ [(DOMKeyboardEvent*)domEvent initKeyboardEvent:@"keypress"
+ canBubble:YES
+ cancelable:YES
+ view:[document defaultView]
+ keyIdentifier:@"U+000045"
+ keyLocation:1
+ ctrlKey:NO
+ altKey:YES
+ shiftKey:NO
+ metaKey:NO];
+ [target dispatchEvent:domEvent];
+
+ // Keyboard Event 3
+
+ domEvent = [document createEvent:@"KeyboardEvent"];
+ [(DOMKeyboardEvent*)domEvent initKeyboardEvent:@"keyup"
+ canBubble:YES
+ cancelable:YES
+ view:[document defaultView]
+ keyIdentifier:@"U+000056"
+ keyLocation:0
+ ctrlKey:NO
+ altKey:NO
+ shiftKey:NO
+ metaKey:NO];
+ [target dispatchEvent:domEvent];
+
+}
+
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/FrameLoadDelegate.h b/WebKitTools/DumpRenderTree/mac/FrameLoadDelegate.h
new file mode 100644
index 0000000..6c3cbdb
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/FrameLoadDelegate.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+
+class AccessibilityController;
+class GCController;
+
+@interface FrameLoadDelegate : NSObject
+{
+ AccessibilityController* accessibilityController;
+ GCController* gcController;
+}
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/FrameLoadDelegate.mm b/WebKitTools/DumpRenderTree/mac/FrameLoadDelegate.mm
new file mode 100644
index 0000000..f079cb5
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/FrameLoadDelegate.mm
@@ -0,0 +1,351 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "DumpRenderTree.h"
+#import "FrameLoadDelegate.h"
+
+#import "AccessibilityController.h"
+#import "AppleScriptController.h"
+#import "EventSendingController.h"
+#import "GCController.h"
+#import "LayoutTestController.h"
+#import "NavigationController.h"
+#import "ObjCController.h"
+#import "ObjCPlugin.h"
+#import "ObjCPluginFunction.h"
+#import "TextInputController.h"
+#import "WorkQueue.h"
+#import "WorkQueueItem.h"
+#import <JavaScriptCore/JavaScriptCore.h>
+#import <WebKit/WebFramePrivate.h>
+#import <WebKit/WebHTMLViewPrivate.h>
+#import <WebKit/WebKit.h>
+#import <WebKit/WebNSURLExtras.h>
+#import <wtf/Assertions.h>
+
+@interface NSURLRequest (PrivateThingsWeShouldntReallyUse)
++(void)setAllowsAnyHTTPSCertificate:(BOOL)allow forHost:(NSString *)host;
+@end
+
+@interface NSURL (DRTExtras)
+- (NSString *)_drt_descriptionSuitableForTestResult;
+@end
+
+@interface NSError (DRTExtras)
+- (NSString *)_drt_descriptionSuitableForTestResult;
+@end
+
+@interface NSURLResponse (DRTExtras)
+- (NSString *)_drt_descriptionSuitableForTestResult;
+@end
+
+@interface NSURLRequest (DRTExtras)
+- (NSString *)_drt_descriptionSuitableForTestResult;
+@end
+
+@interface WebFrame (DRTExtras)
+- (NSString *)_drt_descriptionSuitableForTestResult;
+@end
+
+@implementation WebFrame (DRTExtras)
+- (NSString *)_drt_descriptionSuitableForTestResult
+{
+ BOOL isMainFrame = (self == [[self webView] mainFrame]);
+ NSString *name = [self name];
+ if (isMainFrame) {
+ if ([name length])
+ return [NSString stringWithFormat:@"main frame \"%@\"", name];
+ else
+ return @"main frame";
+ } else {
+ if (name)
+ return [NSString stringWithFormat:@"frame \"%@\"", name];
+ else
+ return @"frame (anonymous)";
+ }
+}
+@end
+
+@implementation FrameLoadDelegate
+
+- (id)init
+{
+ if ((self = [super init])) {
+ gcController = new GCController;
+ accessibilityController = new AccessibilityController;
+ }
+ return self;
+}
+
+- (void)dealloc
+{
+ delete gcController;
+ [super dealloc];
+}
+
+// Exec messages in the work queue until they're all done, or one of them starts a new load
+- (void)processWork:(id)dummy
+{
+ // quit doing work once a load is in progress
+ while (WorkQueue::shared()->count() > 0 && !topLoadingFrame) {
+ WorkQueueItem* item = WorkQueue::shared()->dequeue();
+ ASSERT(item);
+ item->invoke();
+ delete item;
+ }
+
+ // if we didn't start a new load, then we finished all the commands, so we're ready to dump state
+ if (!topLoadingFrame && !gLayoutTestController->waitToDump())
+ dump();
+}
+
+- (void)webView:(WebView *)c locationChangeDone:(NSError *)error forDataSource:(WebDataSource *)dataSource
+{
+ if ([dataSource webFrame] == topLoadingFrame) {
+ topLoadingFrame = nil;
+ WorkQueue::shared()->setFrozen(true); // first complete load freezes the queue for the rest of this test
+ if (!gLayoutTestController->waitToDump()) {
+ if (WorkQueue::shared()->count())
+ [self performSelector:@selector(processWork:) withObject:nil afterDelay:0];
+ else
+ dump();
+ }
+ }
+}
+
+- (void)webView:(WebView *)sender didStartProvisionalLoadForFrame:(WebFrame *)frame
+{
+ if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
+ NSString *string = [NSString stringWithFormat:@"%@ - didStartProvisionalLoadForFrame", [frame _drt_descriptionSuitableForTestResult]];
+ printf ("%s\n", [string UTF8String]);
+ }
+
+ ASSERT([frame provisionalDataSource]);
+ // Make sure we only set this once per test. If it gets cleared, and then set again, we might
+ // end up doing two dumps for one test.
+ if (!topLoadingFrame && !done)
+ topLoadingFrame = frame;
+
+ if (!done && gLayoutTestController->stopProvisionalFrameLoads()) {
+ NSString *string = [NSString stringWithFormat:@"%@ - stopping load in didStartProvisionalLoadForFrame callback", [frame _drt_descriptionSuitableForTestResult]];
+ printf ("%s\n", [string UTF8String]);
+ [frame stopLoading];
+ }
+}
+
+- (void)webView:(WebView *)sender didCommitLoadForFrame:(WebFrame *)frame
+{
+ if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
+ NSString *string = [NSString stringWithFormat:@"%@ - didCommitLoadForFrame", [frame _drt_descriptionSuitableForTestResult]];
+ printf ("%s\n", [string UTF8String]);
+ }
+
+ ASSERT(![frame provisionalDataSource]);
+ ASSERT([frame dataSource]);
+
+ gLayoutTestController->setWindowIsKey(true);
+ NSView *documentView = [[mainFrame frameView] documentView];
+ [[[mainFrame webView] window] makeFirstResponder:documentView];
+ if ([documentView isKindOfClass:[WebHTMLView class]])
+ [(WebHTMLView *)documentView _updateFocusedAndActiveState];
+}
+
+- (void)webView:(WebView *)sender didFailProvisionalLoadWithError:(NSError *)error forFrame:(WebFrame *)frame
+{
+ if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
+ NSString *string = [NSString stringWithFormat:@"%@ - didFailProvisionalLoadWithError", [frame _drt_descriptionSuitableForTestResult]];
+ printf ("%s\n", [string UTF8String]);
+ }
+
+ if ([error domain] == NSURLErrorDomain && [error code] == NSURLErrorServerCertificateHasUnknownRoot) {
+ NSURL *failedURL = [[error userInfo] objectForKey:@"NSErrorFailingURLKey"];
+ [NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:[failedURL _web_hostString]];
+ [frame loadRequest:[[[[frame provisionalDataSource] request] mutableCopy] autorelease]];
+ return;
+ }
+
+ ASSERT([frame provisionalDataSource]);
+ [self webView:sender locationChangeDone:error forDataSource:[frame provisionalDataSource]];
+}
+
+- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame
+{
+ ASSERT([frame dataSource]);
+ ASSERT(frame == [[frame dataSource] webFrame]);
+
+ if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
+ NSString *string = [NSString stringWithFormat:@"%@ - didFinishLoadForFrame", [frame _drt_descriptionSuitableForTestResult]];
+ printf ("%s\n", [string UTF8String]);
+ }
+
+ // FIXME: This call to displayIfNeeded can be removed when <rdar://problem/5092361> is fixed.
+ // After that is fixed, we will reenable painting after WebCore is done loading the document,
+ // and this call will no longer be needed.
+ if ([[sender mainFrame] isEqual:frame])
+ [sender displayIfNeeded];
+ [self webView:sender locationChangeDone:nil forDataSource:[frame dataSource]];
+ [gNavigationController webView:sender didFinishLoadForFrame:frame];
+}
+
+- (void)webView:(WebView *)sender didFailLoadWithError:(NSError *)error forFrame:(WebFrame *)frame
+{
+ if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
+ NSString *string = [NSString stringWithFormat:@"%@ - didFailLoadWithError", [frame _drt_descriptionSuitableForTestResult]];
+ printf ("%s\n", [string UTF8String]);
+ }
+
+ ASSERT(![frame provisionalDataSource]);
+ ASSERT([frame dataSource]);
+
+ [self webView:sender locationChangeDone:error forDataSource:[frame dataSource]];
+}
+
+- (void)webView:(WebView *)webView windowScriptObjectAvailable:(WebScriptObject *)windowScriptObject
+{
+ if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
+ NSString *string = [NSString stringWithFormat:@"?? - windowScriptObjectAvailable"];
+ printf ("%s\n", [string UTF8String]);
+ }
+
+ ASSERT_NOT_REACHED();
+}
+
+- (void)webView:(WebView *)sender didClearWindowObject:(WebScriptObject *)obj forFrame:(WebFrame *)frame
+{
+ ASSERT(obj == [frame windowObject]);
+ ASSERT([obj JSObject] == JSContextGetGlobalObject([frame globalContext]));
+
+ // Make New-Style LayoutTestController
+ JSContextRef context = [frame globalContext];
+ JSObjectRef globalObject = JSContextGetGlobalObject(context);
+ JSValueRef exception = 0;
+
+ ASSERT(gLayoutTestController);
+ gLayoutTestController->makeWindowObject(context, globalObject, &exception);
+ ASSERT(!exception);
+
+ gcController->makeWindowObject(context, globalObject, &exception);
+ ASSERT(!exception);
+
+ accessibilityController->makeWindowObject(context, globalObject, &exception);
+ ASSERT(!exception);
+
+ // Make Old-Style controllers
+ EventSendingController *esc = [[EventSendingController alloc] init];
+ [obj setValue:esc forKey:@"eventSender"];
+ [esc release];
+
+ TextInputController *tic = [[TextInputController alloc] initWithWebView:sender];
+ [obj setValue:tic forKey:@"textInputController"];
+ [tic release];
+
+ AppleScriptController *asc = [[AppleScriptController alloc] initWithWebView:sender];
+ [obj setValue:asc forKey:@"appleScriptController"];
+ [asc release];
+
+ ObjCController *occ = [[ObjCController alloc] init];
+ [obj setValue:occ forKey:@"objCController"];
+ [occ release];
+
+ [obj setValue:gNavigationController forKey:@"navigationController"];
+
+ ObjCPlugin *plugin = [[ObjCPlugin alloc] init];
+ [obj setValue:plugin forKey:@"objCPlugin"];
+ [plugin release];
+
+ ObjCPluginFunction *pluginFunction = [[ObjCPluginFunction alloc] init];
+ [obj setValue:pluginFunction forKey:@"objCPluginFunction"];
+ [pluginFunction release];
+}
+
+- (void)webView:(WebView *)sender didReceiveTitle:(NSString *)title forFrame:(WebFrame *)frame
+{
+ if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
+ NSString *string = [NSString stringWithFormat:@"%@ - didReceiveTitle: %@", [frame _drt_descriptionSuitableForTestResult], title];
+ printf ("%s\n", [string UTF8String]);
+ }
+
+ if (gLayoutTestController->dumpTitleChanges())
+ printf("TITLE CHANGED: %s\n", [title UTF8String]);
+}
+
+- (void)webView:(WebView *)sender didReceiveServerRedirectForProvisionalLoadForFrame:(WebFrame *)frame
+{
+ if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
+ NSString *string = [NSString stringWithFormat:@"%@ - didReceiveServerRedirectForProvisionalLoadForFrame", [frame _drt_descriptionSuitableForTestResult]];
+ printf ("%s\n", [string UTF8String]);
+ }
+}
+
+- (void)webView:(WebView *)sender didChangeLocationWithinPageForFrame:(WebFrame *)frame
+{
+ if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
+ NSString *string = [NSString stringWithFormat:@"%@ - didChangeLocationWithinPageForFrame", [frame _drt_descriptionSuitableForTestResult]];
+ printf ("%s\n", [string UTF8String]);
+ }
+}
+
+- (void)webView:(WebView *)sender willPerformClientRedirectToURL:(NSURL *)URL delay:(NSTimeInterval)seconds fireDate:(NSDate *)date forFrame:(WebFrame *)frame
+{
+ if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
+ NSString *string = [NSString stringWithFormat:@"%@ - willPerformClientRedirectToURL: %@ ", [frame _drt_descriptionSuitableForTestResult], [URL _drt_descriptionSuitableForTestResult]];
+ printf ("%s\n", [string UTF8String]);
+ }
+}
+
+- (void)webView:(WebView *)sender didCancelClientRedirectForFrame:(WebFrame *)frame
+{
+ if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
+ NSString *string = [NSString stringWithFormat:@"%@ - didCancelClientRedirectForFrame", [frame _drt_descriptionSuitableForTestResult]];
+ printf ("%s\n", [string UTF8String]);
+ }
+}
+
+- (void)webView:(WebView *)sender didFinishDocumentLoadForFrame:(WebFrame *)frame
+{
+ if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
+ NSString *string = [NSString stringWithFormat:@"%@ - didFinishDocumentLoadForFrame", [frame _drt_descriptionSuitableForTestResult]];
+ printf ("%s\n", [string UTF8String]);
+ } else if (!done) {
+ unsigned pendingFrameUnloadEvents = [frame _pendingFrameUnloadEventCount];
+ if (pendingFrameUnloadEvents) {
+ NSString *string = [NSString stringWithFormat:@"%@ - has %u onunload handler(s)", [frame _drt_descriptionSuitableForTestResult], pendingFrameUnloadEvents];
+ printf ("%s\n", [string UTF8String]);
+ }
+ }
+}
+
+- (void)webView:(WebView *)sender didHandleOnloadEventsForFrame:(WebFrame *)frame
+{
+ if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
+ NSString *string = [NSString stringWithFormat:@"%@ - didHandleOnloadEventsForFrame", [frame _drt_descriptionSuitableForTestResult]];
+ printf ("%s\n", [string UTF8String]);
+ }
+}
+
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/GCControllerMac.mm b/WebKitTools/DumpRenderTree/mac/GCControllerMac.mm
new file mode 100644
index 0000000..4b845ba
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/GCControllerMac.mm
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "GCController.h"
+#import <WebKit/WebCoreStatistics.h>
+
+
+void GCController::collect() const
+{
+ [WebCoreStatistics garbageCollectJavaScriptObjects];
+}
+
+void GCController::collectOnAlternateThread(bool waitUntilDone) const
+{
+ [WebCoreStatistics garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging:waitUntilDone];
+}
+
+size_t GCController::getJSObjectCount() const
+{
+ return [WebCoreStatistics javaScriptObjectsCount];
+}
diff --git a/WebKitTools/DumpRenderTree/mac/InternalHeaders/WebKit/WebHTMLRepresentationInternal.h b/WebKitTools/DumpRenderTree/mac/InternalHeaders/WebKit/WebHTMLRepresentationInternal.h
new file mode 100644
index 0000000..b3d421d
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/InternalHeaders/WebKit/WebHTMLRepresentationInternal.h
@@ -0,0 +1 @@
+#include "../../../../WebKit/mac/WebView/WebHTMLRepresentationInternal.h"
diff --git a/WebKitTools/DumpRenderTree/mac/InternalHeaders/WebKit/WebTypesInternal.h b/WebKitTools/DumpRenderTree/mac/InternalHeaders/WebKit/WebTypesInternal.h
new file mode 100644
index 0000000..58049c2
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/InternalHeaders/WebKit/WebTypesInternal.h
@@ -0,0 +1 @@
+#include "../../../../WebKit/mac/Misc/WebTypesInternal.h"
diff --git a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
new file mode 100644
index 0000000..c80c78f
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
@@ -0,0 +1,422 @@
+/*
+ * Copyright (C) 2007, 2008, 2009 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "DumpRenderTree.h"
+#import "LayoutTestController.h"
+
+#import "EditingDelegate.h"
+#import "PolicyDelegate.h"
+#import "WorkQueue.h"
+#import "WorkQueueItem.h"
+#import <Foundation/Foundation.h>
+#import <JavaScriptCore/JSRetainPtr.h>
+#import <JavaScriptCore/JSStringRef.h>
+#import <JavaScriptCore/JSStringRefCF.h>
+#import <WebKit/DOMDocument.h>
+#import <WebKit/DOMElement.h>
+#import <WebKit/WebBackForwardList.h>
+#import <WebKit/WebDatabaseManagerPrivate.h>
+#import <WebKit/WebDataSource.h>
+#import <WebKit/WebFrame.h>
+#import <WebKit/WebFrameViewPrivate.h>
+#import <WebKit/WebIconDatabasePrivate.h>
+#import <WebKit/WebHTMLRepresentation.h>
+#import <WebKit/WebHTMLViewPrivate.h>
+#import <WebKit/WebHistory.h>
+#import <WebKit/WebHistoryPrivate.h>
+#import <WebKit/WebInspector.h>
+#import <WebKit/WebNSURLExtras.h>
+#import <WebKit/WebPreferences.h>
+#import <WebKit/WebPreferencesPrivate.h>
+#import <WebKit/WebSecurityOriginPrivate.h>
+#import <WebKit/WebTypesInternal.h>
+#import <WebKit/WebView.h>
+#import <WebKit/WebViewPrivate.h>
+#import <wtf/RetainPtr.h>
+
+@interface CommandValidationTarget : NSObject <NSValidatedUserInterfaceItem>
+{
+ SEL _action;
+}
+- (id)initWithAction:(SEL)action;
+@end
+
+@implementation CommandValidationTarget
+
+- (id)initWithAction:(SEL)action
+{
+ self = [super init];
+ if (!self)
+ return nil;
+
+ _action = action;
+ return self;
+}
+
+- (SEL)action
+{
+ return _action;
+}
+
+- (NSInteger)tag
+{
+ return 0;
+}
+
+@end
+
+LayoutTestController::~LayoutTestController()
+{
+}
+
+void LayoutTestController::addDisallowedURL(JSStringRef url)
+{
+ RetainPtr<CFStringRef> urlCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, url));
+
+ if (!disallowedURLs)
+ disallowedURLs = CFSetCreateMutable(kCFAllocatorDefault, 0, NULL);
+
+ // Canonicalize the URL
+ NSURLRequest* request = [NSURLRequest requestWithURL:[NSURL URLWithString:(NSString *)urlCF.get()]];
+ request = [NSURLProtocol canonicalRequestForRequest:request];
+
+ CFSetAddValue(disallowedURLs, [request URL]);
+}
+
+void LayoutTestController::clearAllDatabases()
+{
+ [[WebDatabaseManager sharedWebDatabaseManager] deleteAllDatabases];
+}
+
+void LayoutTestController::clearBackForwardList()
+{
+ WebBackForwardList *backForwardList = [[mainFrame webView] backForwardList];
+ WebHistoryItem *item = [[backForwardList currentItem] retain];
+
+ // We clear the history by setting the back/forward list's capacity to 0
+ // then restoring it back and adding back the current item.
+ int capacity = [backForwardList capacity];
+ [backForwardList setCapacity:0];
+ [backForwardList setCapacity:capacity];
+ [backForwardList addItem:item];
+ [backForwardList goToItem:item];
+ [item release];
+}
+
+JSStringRef LayoutTestController::copyDecodedHostName(JSStringRef name)
+{
+ RetainPtr<CFStringRef> nameCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, name));
+ NSString *nameNS = (NSString *)nameCF.get();
+ return JSStringCreateWithCFString((CFStringRef)[nameNS _web_decodeHostName]);
+}
+
+JSStringRef LayoutTestController::copyEncodedHostName(JSStringRef name)
+{
+ RetainPtr<CFStringRef> nameCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, name));
+ NSString *nameNS = (NSString *)nameCF.get();
+ return JSStringCreateWithCFString((CFStringRef)[nameNS _web_encodeHostName]);
+}
+
+void LayoutTestController::display()
+{
+ displayWebView();
+}
+
+void LayoutTestController::keepWebHistory()
+{
+ if (![WebHistory optionalSharedHistory]) {
+ WebHistory *history = [[WebHistory alloc] init];
+ [WebHistory setOptionalSharedHistory:history];
+ [history release];
+ }
+}
+
+size_t LayoutTestController::webHistoryItemCount()
+{
+ return [[[WebHistory optionalSharedHistory] allItems] count];
+}
+
+void LayoutTestController::notifyDone()
+{
+ if (m_waitToDump && !topLoadingFrame && !WorkQueue::shared()->count())
+ dump();
+ m_waitToDump = false;
+}
+
+JSStringRef LayoutTestController::pathToLocalResource(JSContextRef context, JSStringRef url)
+{
+ return JSStringRetain(url); // Do nothing on mac.
+}
+
+void LayoutTestController::queueBackNavigation(int howFarBack)
+{
+ WorkQueue::shared()->queue(new BackItem(howFarBack));
+}
+
+void LayoutTestController::queueForwardNavigation(int howFarForward)
+{
+ WorkQueue::shared()->queue(new ForwardItem(howFarForward));
+}
+
+void LayoutTestController::queueLoad(JSStringRef url, JSStringRef target)
+{
+ RetainPtr<CFStringRef> urlCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, url));
+ NSString *urlNS = (NSString *)urlCF.get();
+
+ NSURL *nsurl = [NSURL URLWithString:urlNS relativeToURL:[[[mainFrame dataSource] response] URL]];
+ NSString* nsurlString = [nsurl absoluteString];
+
+ JSRetainPtr<JSStringRef> absoluteURL(Adopt, JSStringCreateWithUTF8CString([nsurlString UTF8String]));
+ WorkQueue::shared()->queue(new LoadItem(absoluteURL.get(), target));
+}
+
+void LayoutTestController::queueReload()
+{
+ WorkQueue::shared()->queue(new ReloadItem);
+}
+
+void LayoutTestController::queueScript(JSStringRef script)
+{
+ WorkQueue::shared()->queue(new ScriptItem(script));
+}
+
+void LayoutTestController::setAcceptsEditing(bool newAcceptsEditing)
+{
+ [(EditingDelegate *)[[mainFrame webView] editingDelegate] setAcceptsEditing:newAcceptsEditing];
+}
+
+void LayoutTestController::setAuthorAndUserStylesEnabled(bool flag)
+{
+ [[[mainFrame webView] preferences] setAuthorAndUserStylesEnabled:flag];
+}
+
+void LayoutTestController::setCustomPolicyDelegate(bool setDelegate, bool permissive)
+{
+ if (setDelegate) {
+ [policyDelegate setPermissive:permissive];
+ [[mainFrame webView] setPolicyDelegate:policyDelegate];
+ } else
+ [[mainFrame webView] setPolicyDelegate:nil];
+}
+
+void LayoutTestController::setDatabaseQuota(unsigned long long quota)
+{
+ WebSecurityOrigin *origin = [[WebSecurityOrigin alloc] initWithURL:[NSURL URLWithString:@"file:///"]];
+ [origin setQuota:quota];
+ [origin release];
+}
+
+void LayoutTestController::setIconDatabaseEnabled(bool iconDatabaseEnabled)
+{
+ // FIXME: Workaround <rdar://problem/6480108>
+ static WebIconDatabase* sharedWebIconDatabase = NULL;
+ if (!sharedWebIconDatabase) {
+ if (!iconDatabaseEnabled)
+ return;
+ sharedWebIconDatabase = [WebIconDatabase sharedIconDatabase];
+ if ([sharedWebIconDatabase isEnabled] == iconDatabaseEnabled)
+ return;
+ }
+ [sharedWebIconDatabase setEnabled:iconDatabaseEnabled];
+}
+
+void LayoutTestController::setJavaScriptProfilingEnabled(bool profilingEnabled)
+{
+ [[[mainFrame webView] preferences] setDeveloperExtrasEnabled:profilingEnabled];
+ [[[mainFrame webView] inspector] setJavaScriptProfilingEnabled:profilingEnabled];
+}
+
+void LayoutTestController::setMainFrameIsFirstResponder(bool flag)
+{
+ NSView *documentView = [[mainFrame frameView] documentView];
+
+ NSResponder *firstResponder = flag ? documentView : nil;
+ [[[mainFrame webView] window] makeFirstResponder:firstResponder];
+
+ if ([documentView isKindOfClass:[WebHTMLView class]])
+ [(WebHTMLView *)documentView _updateFocusedAndActiveState];
+}
+
+void LayoutTestController::setPrivateBrowsingEnabled(bool privateBrowsingEnabled)
+{
+ [[[mainFrame webView] preferences] setPrivateBrowsingEnabled:privateBrowsingEnabled];
+}
+
+void LayoutTestController::setPopupBlockingEnabled(bool popupBlockingEnabled)
+{
+ [[[mainFrame webView] preferences] setJavaScriptCanOpenWindowsAutomatically:!popupBlockingEnabled];
+}
+
+void LayoutTestController::setTabKeyCyclesThroughElements(bool cycles)
+{
+ [[mainFrame webView] setTabKeyCyclesThroughElements:cycles];
+}
+
+void LayoutTestController::setUseDashboardCompatibilityMode(bool flag)
+{
+ [[mainFrame webView] _setDashboardBehavior:WebDashboardBehaviorUseBackwardCompatibilityMode to:flag];
+}
+
+void LayoutTestController::setUserStyleSheetEnabled(bool flag)
+{
+ [[WebPreferences standardPreferences] setUserStyleSheetEnabled:flag];
+}
+
+void LayoutTestController::setUserStyleSheetLocation(JSStringRef path)
+{
+ RetainPtr<CFStringRef> pathCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, path));
+ NSURL *url = [NSURL URLWithString:(NSString *)pathCF.get()];
+ [[WebPreferences standardPreferences] setUserStyleSheetLocation:url];
+}
+
+void LayoutTestController::setPersistentUserStyleSheetLocation(JSStringRef jsURL)
+{
+ RetainPtr<CFStringRef> urlString(AdoptCF, JSStringCopyCFString(0, jsURL));
+ ::setPersistentUserStyleSheetLocation(urlString.get());
+}
+
+void LayoutTestController::clearPersistentUserStyleSheet()
+{
+ ::setPersistentUserStyleSheetLocation(0);
+}
+
+void LayoutTestController::setWindowIsKey(bool windowIsKey)
+{
+ m_windowIsKey = windowIsKey;
+ NSView *documentView = [[mainFrame frameView] documentView];
+ if ([documentView isKindOfClass:[WebHTMLView class]])
+ [(WebHTMLView *)documentView _updateFocusedAndActiveState];
+}
+
+void LayoutTestController::setSmartInsertDeleteEnabled(bool flag)
+{
+ [[mainFrame webView] setSmartInsertDeleteEnabled:flag];
+}
+
+void LayoutTestController::setSelectTrailingWhitespaceEnabled(bool flag)
+{
+ [[mainFrame webView] setSelectTrailingWhitespaceEnabled:flag];
+}
+
+static const CFTimeInterval waitToDumpWatchdogInterval = 10.0;
+
+static void waitUntilDoneWatchdogFired(CFRunLoopTimerRef timer, void* info)
+{
+ const char* message = "FAIL: Timed out waiting for notifyDone to be called\n";
+ fprintf(stderr, "%s", message);
+ fprintf(stdout, "%s", message);
+ dump();
+}
+
+void LayoutTestController::setWaitToDump(bool waitUntilDone)
+{
+ m_waitToDump = waitUntilDone;
+ if (m_waitToDump && !waitToDumpWatchdog) {
+ waitToDumpWatchdog = CFRunLoopTimerCreate(kCFAllocatorDefault, CFAbsoluteTimeGetCurrent() + waitToDumpWatchdogInterval, 0, 0, 0, waitUntilDoneWatchdogFired, NULL);
+ CFRunLoopAddTimer(CFRunLoopGetCurrent(), waitToDumpWatchdog, kCFRunLoopCommonModes);
+ }
+}
+
+int LayoutTestController::windowCount()
+{
+ return CFArrayGetCount(openWindowsRef);
+}
+
+bool LayoutTestController::elementDoesAutoCompleteForElementWithId(JSStringRef id)
+{
+ RetainPtr<CFStringRef> idCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, id));
+ NSString *idNS = (NSString *)idCF.get();
+
+ DOMElement *element = [[mainFrame DOMDocument] getElementById:idNS];
+ id rep = [[mainFrame dataSource] representation];
+
+ if ([rep class] == [WebHTMLRepresentation class])
+ return [(WebHTMLRepresentation *)rep elementDoesAutoComplete:element];
+
+ return false;
+}
+
+void LayoutTestController::execCommand(JSStringRef name, JSStringRef value)
+{
+ RetainPtr<CFStringRef> nameCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, name));
+ NSString *nameNS = (NSString *)nameCF.get();
+
+ RetainPtr<CFStringRef> valueCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, value));
+ NSString *valueNS = (NSString *)valueCF.get();
+
+ [[mainFrame webView] _executeCoreCommandByName:nameNS value:valueNS];
+}
+
+bool LayoutTestController::isCommandEnabled(JSStringRef name)
+{
+ RetainPtr<CFStringRef> nameCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, name));
+ NSString *nameNS = reinterpret_cast<const NSString *>(nameCF.get());
+
+ // Accept command strings with capital letters for first letter without trailing colon.
+ if (![nameNS hasSuffix:@":"] && [nameNS length]) {
+ nameNS = [[[[nameNS substringToIndex:1] lowercaseString]
+ stringByAppendingString:[nameNS substringFromIndex:1]]
+ stringByAppendingString:@":"];
+ }
+
+ SEL selector = NSSelectorFromString(nameNS);
+ RetainPtr<CommandValidationTarget> target(AdoptNS, [[CommandValidationTarget alloc] initWithAction:selector]);
+ id validator = [NSApp targetForAction:selector to:[mainFrame webView] from:target.get()];
+ if (!validator)
+ return false;
+ if (![validator respondsToSelector:selector])
+ return false;
+ if (![validator respondsToSelector:@selector(validateUserInterfaceItem:)])
+ return true;
+ return [validator validateUserInterfaceItem:target.get()];
+}
+
+bool LayoutTestController::pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId)
+{
+ RetainPtr<CFStringRef> idCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, elementId));
+ NSString *idNS = (NSString *)idCF.get();
+ RetainPtr<CFStringRef> nameCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, animationName));
+ NSString *nameNS = (NSString *)nameCF.get();
+
+ return [mainFrame _pauseAnimation:nameNS onNode:[[mainFrame DOMDocument] getElementById:idNS] atTime:time];
+}
+
+bool LayoutTestController::pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId)
+{
+ RetainPtr<CFStringRef> idCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, elementId));
+ NSString *idNS = (NSString *)idCF.get();
+ RetainPtr<CFStringRef> nameCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, propertyName));
+ NSString *nameNS = (NSString *)nameCF.get();
+
+ return [mainFrame _pauseTransitionOfProperty:nameNS onNode:[[mainFrame DOMDocument] getElementById:idNS] atTime:time];
+}
+
+unsigned LayoutTestController::numberOfActiveAnimations() const
+{
+ return [mainFrame _numberOfActiveAnimations];
+}
diff --git a/WebKitTools/DumpRenderTree/mac/NavigationController.h b/WebKitTools/DumpRenderTree/mac/NavigationController.h
new file mode 100644
index 0000000..8ee3432
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/NavigationController.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2006 Apple Computer, 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+#import <WebKit/WebView.h>
+
+@interface NavigationController : NSObject
+{
+ enum { None, Load, GoBack, ExecuteScript } pendingAction;
+ NSString *pendingScript;
+ NSURLRequest *pendingRequest;
+}
+- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame;
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/NavigationController.m b/WebKitTools/DumpRenderTree/mac/NavigationController.m
new file mode 100644
index 0000000..44aed8a
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/NavigationController.m
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2006 Apple Computer, 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <WebKit/WebFrame.h>
+#import <WebKit/WebScriptObject.h>
+#import "NavigationController.h"
+
+@implementation NavigationController
++ (BOOL)isSelectorExcludedFromWebScript:(SEL)selector
+{
+ if (selector == @selector(evaluateWebScript:afterBackForwardNavigation:))
+ return NO;
+ return YES;
+}
+
++ (NSString *)webScriptNameForSelector:(SEL)selector
+{
+ if (selector == @selector(evaluateWebScript:afterBackForwardNavigation:))
+ return @"evalAfterBackForwardNavigation";
+ return nil;
+}
+
+- (void)setPendingScript:(NSString *)script
+{
+ if (script != pendingScript) {
+ [pendingScript release];
+ pendingScript = [script copy];
+ }
+}
+
+- (void)setPendingRequest:(NSURLRequest *)request
+{
+ if (request != pendingRequest) {
+ [pendingRequest release];
+ pendingRequest = [request copy];
+ }
+}
+
+- (void)evaluateWebScript:(NSString *)script afterBackForwardNavigation:(NSString *)navigation
+{
+ // Allow both arguments to be optional
+ if (![script isKindOfClass:[NSString class]])
+ script = @"";
+ if (![navigation isKindOfClass:[NSString class]])
+ navigation = @"about:blank";
+
+ [self setPendingScript:script];
+ [self setPendingRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:navigation]]];
+ pendingAction = Load;
+}
+
+- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame
+{
+ if (frame == [[frame webView] mainFrame]) {
+ switch (pendingAction) {
+ case Load:
+ pendingAction = GoBack;
+ [frame loadRequest:pendingRequest];
+ [self setPendingRequest:nil];
+ break;
+ case GoBack:
+ pendingAction = ExecuteScript;
+ [[frame webView] goBack];
+ break;
+ case ExecuteScript:
+ pendingAction = None;
+ [[[frame webView] windowScriptObject] evaluateWebScript:pendingScript];
+ [self setPendingScript:nil];
+ break;
+ case None:
+ default:
+ break;
+ }
+ }
+}
+
+- (void)dealloc
+{
+ [self setPendingScript:nil];
+ [self setPendingRequest:nil];
+ [super dealloc];
+}
+@end
+
diff --git a/WebKitTools/DumpRenderTree/mac/ObjCController.h b/WebKitTools/DumpRenderTree/mac/ObjCController.h
new file mode 100644
index 0000000..d1d001c
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/ObjCController.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+
+@class WebScriptObject;
+
+// This controller should be used to test Objective-C language features and the WebScriptObject.
+@interface ObjCController : NSObject
+{
+ WebScriptObject *storedWebScriptObject;
+}
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/ObjCController.m b/WebKitTools/DumpRenderTree/mac/ObjCController.m
new file mode 100644
index 0000000..ec1ed38
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/ObjCController.m
@@ -0,0 +1,239 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "ObjCController.h"
+
+#import <JavaScriptCore/JavaScriptCore.h>
+#import <WebKit/DOMAbstractView.h>
+#import <WebKit/WebScriptObject.h>
+#import <WebKit/WebView.h>
+#import <pthread.h>
+#import <wtf/Assertions.h>
+
+static void* runJavaScriptThread(void* arg)
+{
+ JSGlobalContextRef ctx = JSGlobalContextCreate(0);
+ JSStringRef scriptRef = JSStringCreateWithUTF8CString("'Hello World!'");
+
+ JSValueRef exception = 0;
+ JSEvaluateScript(ctx, scriptRef, 0, 0, 1, &exception);
+ ASSERT(!exception);
+
+ JSGlobalContextRelease(ctx);
+ JSStringRelease(scriptRef);
+
+ return 0;
+}
+
+@implementation ObjCController
+
++ (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector
+{
+ if (0
+ || aSelector == @selector(classNameOf:)
+ || aSelector == @selector(objectOfClass:)
+ || aSelector == @selector(identityIsEqual::)
+ || aSelector == @selector(longLongRoundTrip:)
+ || aSelector == @selector(unsignedLongLongRoundTrip:)
+ || aSelector == @selector(testWrapperRoundTripping:)
+ || aSelector == @selector(accessStoredWebScriptObject)
+ || aSelector == @selector(storeWebScriptObject:)
+ || aSelector == @selector(testValueForKey)
+ || aSelector == @selector(testArray)
+ )
+ return NO;
+ return YES;
+}
+
++ (NSString *)webScriptNameForSelector:(SEL)aSelector
+{
+ if (aSelector == @selector(classNameOf:))
+ return @"className";
+ if (aSelector == @selector(objectOfClass:))
+ return @"objectOfClass";
+ if (aSelector == @selector(identityIsEqual::))
+ return @"identityIsEqual";
+ if (aSelector == @selector(longLongRoundTrip:))
+ return @"longLongRoundTrip";
+ if (aSelector == @selector(unsignedLongLongRoundTrip:))
+ return @"unsignedLongLongRoundTrip";
+ if (aSelector == @selector(testWrapperRoundTripping:))
+ return @"testWrapperRoundTripping";
+ if (aSelector == @selector(storeWebScriptObject:))
+ return @"storeWebScriptObject";
+ if (aSelector == @selector(testValueForKey))
+ return @"testValueForKey";
+ if (aSelector == @selector(testArray))
+ return @"testArray";
+
+ return nil;
+}
+
+- (NSString *)classNameOf:(id)object
+{
+ if (!object)
+ return @"nil";
+ return NSStringFromClass([object class]);
+}
+
+- (id)objectOfClass:(NSString *)aClass
+{
+ if ([aClass isEqualToString:@"NSNull"])
+ return [NSNull null];
+ if ([aClass isEqualToString:@"WebUndefined"])
+ return [WebUndefined undefined];
+ if ([aClass isEqualToString:@"NSCFBoolean"])
+ return [NSNumber numberWithBool:true];
+ if ([aClass isEqualToString:@"NSCFNumber"])
+ return [NSNumber numberWithInt:1];
+ if ([aClass isEqualToString:@"NSCFString"])
+ return @"";
+ if ([aClass isEqualToString:@"WebScriptObject"])
+ return self;
+ if ([aClass isEqualToString:@"NSArray"])
+ return [NSArray array];
+
+ return nil;
+}
+
+- (BOOL)identityIsEqual:(WebScriptObject *)a :(WebScriptObject *)b
+{
+ if ([a isKindOfClass:[NSString class]] && [b isKindOfClass:[NSString class]])
+ return [(NSString *)a isEqualToString:(NSString *)b];
+ return a == b;
+}
+
+- (long long)longLongRoundTrip:(long long)num
+{
+ return num;
+}
+
+- (unsigned long long)unsignedLongLongRoundTrip:(unsigned long long)num
+{
+ return num;
+}
+
+- (void)testValueForKey
+{
+ ASSERT(storedWebScriptObject);
+
+ @try {
+ [storedWebScriptObject valueForKey:@"ThisKeyDoesNotExist"];
+ } @catch (NSException *e) {
+ }
+
+ pthread_t pthread;
+ pthread_create(&pthread, 0, &runJavaScriptThread, 0);
+ pthread_join(pthread, 0);
+}
+
+- (BOOL)testWrapperRoundTripping:(WebScriptObject *)webScriptObject
+{
+ JSObjectRef jsObject = [webScriptObject JSObject];
+
+ if (!jsObject)
+ return false;
+
+ if (!webScriptObject)
+ return false;
+
+ if ([[webScriptObject evaluateWebScript:@"({ })"] class] != [webScriptObject class])
+ return false;
+
+ [webScriptObject setValue:[NSNumber numberWithInt:666] forKey:@"key"];
+ if (![[webScriptObject valueForKey:@"key"] isKindOfClass:[NSNumber class]] ||
+ ![[webScriptObject valueForKey:@"key"] isEqualToNumber:[NSNumber numberWithInt:666]])
+ return false;
+
+ [webScriptObject removeWebScriptKey:@"key"];
+ @try {
+ if ([webScriptObject valueForKey:@"key"])
+ return false;
+ } @catch(NSException *exception) {
+ // NSObject throws an exception if the key doesn't exist.
+ }
+
+ [webScriptObject setWebScriptValueAtIndex:0 value:webScriptObject];
+ if ([webScriptObject webScriptValueAtIndex:0] != webScriptObject)
+ return false;
+
+ if ([[webScriptObject stringRepresentation] isEqualToString:@"[Object object]"])
+ return false;
+
+ if ([webScriptObject callWebScriptMethod:@"returnThis" withArguments:nil] != webScriptObject)
+ return false;
+
+ return true;
+}
+
+- (void)accessStoredWebScriptObject
+{
+#if !ASSERT_DISABLED
+ BOOL isWindowObject = [storedWebScriptObject isKindOfClass:[DOMAbstractView class]];
+#endif
+ JSObjectRef jsObject = [storedWebScriptObject JSObject];
+ ASSERT((jsObject && isWindowObject) || (!jsObject && !isWindowObject));
+
+ [storedWebScriptObject callWebScriptMethod:@"" withArguments:nil];
+ [storedWebScriptObject evaluateWebScript:@""];
+ [storedWebScriptObject setValue:[WebUndefined undefined] forKey:@"key"];
+ [storedWebScriptObject valueForKey:@"key"];
+ [storedWebScriptObject removeWebScriptKey:@"key"];
+ [storedWebScriptObject stringRepresentation];
+ [storedWebScriptObject webScriptValueAtIndex:0];
+ [storedWebScriptObject setWebScriptValueAtIndex:0 value:[WebUndefined undefined]];
+ [storedWebScriptObject setException:@"exception"];
+}
+
+- (void)storeWebScriptObject:(WebScriptObject *)webScriptObject
+{
+ if (webScriptObject == storedWebScriptObject)
+ return;
+
+ [storedWebScriptObject release];
+ storedWebScriptObject = [webScriptObject retain];
+}
+
+- (NSArray *)testArray
+{
+ return [NSArray array];
+}
+
+- (void)dealloc
+{
+ [storedWebScriptObject release];
+ [super dealloc];
+}
+
+- (id)invokeUndefinedMethodFromWebScript:(NSString *)name withArguments:(NSArray *)args
+{
+ // FIXME: Perhaps we should log that this has been called.
+ return nil;
+}
+
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/ObjCPlugin.h b/WebKitTools/DumpRenderTree/mac/ObjCPlugin.h
new file mode 100644
index 0000000..a6d3e50
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/ObjCPlugin.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2005 Apple Computer, 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 THE AUTHOR ``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 AUTHOR 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 <Cocoa/Cocoa.h>
+
+
+@interface ObjCPlugin : NSObject
+{
+ BOOL throwOnDealloc;
+}
+
+- (void)removeBridgeRestrictions:(id)container;
+
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/ObjCPlugin.m b/WebKitTools/DumpRenderTree/mac/ObjCPlugin.m
new file mode 100644
index 0000000..3ec3e74
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/ObjCPlugin.m
@@ -0,0 +1,206 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2006 James G. Speth (speth@end.com)
+ *
+ * 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 THE AUTHOR ``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 AUTHOR 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 "ObjCPlugin.h"
+#import <objc/objc-runtime.h>
+#import <WebKit/WebKit.h>
+
+
+// === NSObject category to expose almost everything to JavaScript ===
+
+// Warning: this class introduces huge security weaknesses, and should only be used
+// for testing inside of DumpRenderTree, and only with trusted code. By default, it has
+// the same restrictive behavior as the standard WebKit setup. However, scripts can use the
+// plugin's removeBridgeRestrictions: method to open up almost total access to the Cocoa
+// frameworks.
+
+static BOOL _allowsScriptsFullAccess = NO;
+
+@interface NSObject (ObjCScriptAccess)
+
++ (void)setAllowsScriptsFullAccess:(BOOL)value;
++ (BOOL)allowsScriptsFullAccess;
+
+@end
+
+@implementation NSObject (ObjCScriptAccess)
+
++ (void)setAllowsScriptsFullAccess:(BOOL)value
+{
+ _allowsScriptsFullAccess = value;
+}
+
++ (BOOL)allowsScriptsFullAccess
+{
+ return _allowsScriptsFullAccess;
+}
+
++ (BOOL)isSelectorExcludedFromWebScript:(SEL)selector
+{
+ return !_allowsScriptsFullAccess;
+}
+
++ (NSString *)webScriptNameForSelector:(SEL)selector
+{
+ return nil;
+}
+
+@end
+
+@interface JSObjC : NSObject {
+}
+
+// expose some useful objc functions to the scripting environment
+- (id)lookUpClass:(NSString *)name;
+- (void)log:(NSString *)message;
+- (id)retainObject:(id)obj;
+- (id)classOfObject:(id)obj;
+- (NSString *)classNameOfObject:(id)obj;
+
+@end
+
+@implementation JSObjC
+
++ (BOOL)isSelectorExcludedFromWebScript:(SEL)selector
+{
+ return NO;
+}
+
++ (NSString *)webScriptNameForSelector:(SEL)selector
+{
+ return nil;
+}
+
+- (id)invokeDefaultMethodWithArguments:(NSArray *)args
+{
+ // this is a useful shortcut for accessing objective-c classes from the scripting
+ // environment, e.g. 'var myObject = objc("NSObject").alloc().init();'
+ if ([args count] == 1)
+ return [self lookUpClass:[args objectAtIndex:0]];
+ return nil;
+}
+
+- (id)lookUpClass:(NSString *)name
+{
+ return NSClassFromString(name);
+}
+
+- (void)log:(NSString *)message
+{
+ NSLog(@"%@", message);
+}
+
+- (id)retainObject:(id)obj
+{
+ return [obj retain];
+}
+
+- (id)classOfObject:(id)obj
+{
+ return (id)[obj class];
+}
+
+- (NSString *)classNameOfObject:(id)obj
+{
+ return [obj className];
+}
+
+@end
+
+@implementation ObjCPlugin
+
++ (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector
+{
+ if (aSelector == @selector(removeBridgeRestrictions:))
+ return NO;
+
+ if (aSelector == @selector(echo:))
+ return NO;
+
+ if (aSelector == @selector(throwIfArgumentIsNotHello:))
+ return NO;
+
+ return YES;
+}
+
++ (NSString *)webScriptNameForSelector:(SEL)aSelector
+{
+ if (aSelector == @selector(echo:))
+ return @"echo";
+
+ if (aSelector == @selector(throwIfArgumentIsNotHello:))
+ return @"throwIfArgumentIsNotHello";
+
+ return nil;
+}
+
++ (NSString *)webScriptNameForKey:(const char *)key
+{
+ if (strcmp(key, "throwOnDealloc") == 0)
+ return @"throwOnDealloc";
+
+ return nil;
+}
+
++ (BOOL)isKeyExcludedFromWebScript:(const char *)key
+{
+ if (strcmp(key, "throwOnDealloc") == 0)
+ return NO;
+
+ return YES;
+}
+
+- (void)removeBridgeRestrictions:(id)container
+{
+ // let scripts invoke any selector
+ [NSObject setAllowsScriptsFullAccess:YES];
+
+ // store a JSObjC instance into the provided container
+ JSObjC *objc = [[JSObjC alloc] init];
+ [container setValue:objc forKey:@"objc"];
+ [objc release];
+}
+
+- (id)echo:(id)obj
+{
+ return obj;
+}
+
+- (void)throwIfArgumentIsNotHello:(NSString *)str
+{
+ if (![str isEqualToString:@"Hello"])
+ [WebScriptObject throwException:[NSString stringWithFormat:@"%@ != Hello", str]];
+}
+
+- (void)dealloc
+{
+ if (throwOnDealloc)
+ [WebScriptObject throwException:@"Throwing exception on dealloc of ObjCPlugin"];
+
+ [super dealloc];
+}
+
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/ObjCPluginFunction.h b/WebKitTools/DumpRenderTree/mac/ObjCPluginFunction.h
new file mode 100644
index 0000000..1e81b21
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/ObjCPluginFunction.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2006 Apple Computer, 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 THE AUTHOR ``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 AUTHOR 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 <Cocoa/Cocoa.h>
+
+
+@interface ObjCPluginFunction : NSObject
+{
+}
+
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/ObjCPluginFunction.m b/WebKitTools/DumpRenderTree/mac/ObjCPluginFunction.m
new file mode 100644
index 0000000..5cd16f8
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/ObjCPluginFunction.m
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2006 Apple Computer, 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 THE AUTHOR ``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 AUTHOR 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 "ObjCPluginFunction.h"
+
+
+@implementation ObjCPluginFunction
+
+- (id)invokeDefaultMethodWithArguments:(NSArray *)args
+{
+ return @"test";
+}
+
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/PixelDumpSupportMac.mm b/WebKitTools/DumpRenderTree/mac/PixelDumpSupportMac.mm
new file mode 100644
index 0000000..d17c111
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/PixelDumpSupportMac.mm
@@ -0,0 +1,246 @@
+/*
+ * Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved.
+ * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
+ * (C) 2007 Eric Seidel <eric@webkit.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "DumpRenderTree.h"
+#include "PixelDumpSupport.h"
+#include "PixelDumpSupportCG.h"
+
+#include "LayoutTestController.h"
+#include <CoreGraphics/CGBitmapContext.h>
+#ifndef BUILDING_ON_LEOPARD
+#include <OpenGL/OpenGL.h>
+#include <OpenGL/CGLMacro.h>
+#endif
+#include <wtf/Assertions.h>
+#include <wtf/RefPtr.h>
+
+#import <WebKit/WebDocumentPrivate.h>
+#import <WebKit/WebHTMLViewPrivate.h>
+#import <WebKit/WebKit.h>
+#import <WebKit/WebViewPrivate.h>
+
+// To ensure pixel tests consistency, we need to always render in the same colorspace.
+// Unfortunately, because of AppKit / WebKit constraints, we can't render directly in the colorspace of our choice.
+// This implies we have to temporarily change the profile of the main display to the colorspace we want to render into.
+// We also need to make sure the CGBitmapContext we return is in that same colorspace.
+
+#define PROFILE_PATH "/System/Library/ColorSync/Profiles/Generic RGB Profile.icc" // FIXME: This cannot be more than CS_MAX_PATH (256 characters)
+
+static CMProfileLocation sInitialProfileLocation; // The locType field is initialized to 0 which is the same as cmNoProfileBase
+
+void restoreMainDisplayColorProfile(int ignored)
+{
+ // This is used as a signal handler, and thus the calls into ColorSync are unsafe
+ // But we might as well try to restore the user's color profile, we're going down anyway...
+ if (sInitialProfileLocation.locType != cmNoProfileBase) {
+ const CMDeviceScope scope = { kCFPreferencesCurrentUser, kCFPreferencesCurrentHost };
+ int error = CMSetDeviceProfile(cmDisplayDeviceClass, (CMDeviceID)kCGDirectMainDisplay, &scope, cmDefaultProfileID, &sInitialProfileLocation);
+ if (error)
+ fprintf(stderr, "Failed to restore initial color profile for main display! Open System Preferences > Displays > Color and manually re-select the profile. (Error: %i)", error);
+ sInitialProfileLocation.locType = cmNoProfileBase;
+ }
+}
+
+void setupMainDisplayColorProfile()
+{
+ const CMDeviceScope scope = { kCFPreferencesCurrentUser, kCFPreferencesCurrentHost };
+ int error;
+
+ CMProfileRef profile = 0;
+ error = CMGetProfileByAVID((CMDisplayIDType)kCGDirectMainDisplay, &profile);
+ if (!error) {
+ UInt32 size = sizeof(CMProfileLocation);
+ error = NCMGetProfileLocation(profile, &sInitialProfileLocation, &size);
+ CMCloseProfile(profile);
+ }
+ if (error) {
+ fprintf(stderr, "Failed to retrieve current color profile for main display, thus it won't be changed. Many pixel tests may fail as a result. (Error: %i)", error);
+ sInitialProfileLocation.locType = cmNoProfileBase;
+ return;
+ }
+
+ CMProfileLocation location;
+ location.locType = cmPathBasedProfile;
+ strcpy(location.u.pathLoc.path, PROFILE_PATH);
+ error = CMSetDeviceProfile(cmDisplayDeviceClass, (CMDeviceID)kCGDirectMainDisplay, &scope, cmDefaultProfileID, &location);
+ if (error) {
+ fprintf(stderr, "Failed to set color profile for main display! Many pixel tests may fail as a result. (Error: %i)", error);
+ sInitialProfileLocation.locType = cmNoProfileBase;
+ return;
+ }
+
+ // Other signals are handled in installSignalHandlers() which also calls restoreMainDisplayColorProfile()
+ signal(SIGINT, restoreMainDisplayColorProfile);
+ signal(SIGHUP, restoreMainDisplayColorProfile);
+ signal(SIGTERM, restoreMainDisplayColorProfile);
+}
+
+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 = (4 * pixelsWide + 63) & ~63; // Use a multiple of 64 bytes to improve CG performance
+
+ void *buffer = calloc(pixelsHigh, rowBytes);
+ if (!buffer)
+ return 0;
+
+ static CGColorSpaceRef colorSpace = 0;
+ if (!colorSpace) {
+ CMProfileLocation location;
+ location.locType = cmPathBasedProfile;
+ strcpy(location.u.pathLoc.path, PROFILE_PATH);
+ CMProfileRef profile;
+ if (CMOpenProfile(&profile, &location) == noErr) {
+ colorSpace = CGColorSpaceCreateWithPlatformColorSpace(profile);
+ CMCloseProfile(profile);
+ }
+ }
+
+ CGContextRef context = CGBitmapContextCreate(buffer, pixelsWide, pixelsHigh, 8, rowBytes, colorSpace, kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host); // Use ARGB8 on PPC or BGRA8 on X86 to improve CG performance
+ if (!context) {
+ free(buffer);
+ return 0;
+ }
+
+ // The BitmapContext keeps the CGContextRef and the pixel buffer alive
+ RefPtr<BitmapContext> bitmapContext = BitmapContext::createByAdoptingBitmapAndContext(buffer, context);
+
+ NSGraphicsContext *nsContext = [NSGraphicsContext graphicsContextWithGraphicsPort:context flipped:NO];
+ ASSERT(nsContext);
+
+ if (incrementalRepaint) {
+ if (sweepHorizontally) {
+ for (NSRect column = NSMakeRect(0, 0, 1, webViewSize.height); column.origin.x < webViewSize.width; column.origin.x++)
+ [view displayRectIgnoringOpacity:column inContext:nsContext];
+ } else {
+ for (NSRect line = NSMakeRect(0, 0, webViewSize.width, 1); line.origin.y < webViewSize.height; line.origin.y++)
+ [view displayRectIgnoringOpacity:line inContext:nsContext];
+ }
+ } else {
+ if (onscreen) {
+#ifdef BUILDING_ON_LEOPARD
+ // Ask the window server to provide us a composited version of the *real* window content including surfaces (i.e. OpenGL content)
+ // Note that the returned image might differ very slightly from the window backing because of dithering artifacts in the window server compositor
+
+ CGImageRef image = CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, [[view window] windowNumber], kCGWindowImageBoundsIgnoreFraming | kCGWindowImageShouldBeOpaque);
+ CGContextDrawImage(context, CGRectMake(0, 0, CGImageGetWidth(image), CGImageGetHeight(image)), image);
+ CGImageRelease(image);
+#else
+ // On 10.4 and earlier, we have to move the window temporarily "onscreen" and read directly from the display framebuffer using OpenGL
+ // In this code path, we need to ensure the window is above any other window or captured result will be corrupted
+
+ NSWindow *window = [view window];
+ int oldLevel = [window level];
+ NSRect oldFrame = [window frame];
+
+ NSRect newFrame = [[[NSScreen screens] objectAtIndex:0] frame];
+ newFrame = NSMakeRect(newFrame.origin.x + (newFrame.size.width - oldFrame.size.width) / 2, newFrame.origin.y + (newFrame.size.height - oldFrame.size.height) / 2, oldFrame.size.width, oldFrame.size.height);
+ [window setLevel:NSScreenSaverWindowLevel];
+ [window setFrame:newFrame display:NO animate:NO];
+
+ CGRect rect = CGRectMake(newFrame.origin.x, newFrame.origin.y, webViewSize.width, webViewSize.height);
+ CGDirectDisplayID displayID;
+ CGDisplayCount count;
+ if (CGGetDisplaysWithRect(rect, 1, &displayID, &count) == kCGErrorSuccess) {
+ CGRect bounds = CGDisplayBounds(displayID);
+ rect.origin.x -= bounds.origin.x;
+ rect.origin.y -= bounds.origin.y;
+
+ CGLPixelFormatAttribute attributes[] = {kCGLPFAAccelerated, kCGLPFANoRecovery, kCGLPFAFullScreen, kCGLPFADisplayMask, (CGLPixelFormatAttribute)CGDisplayIDToOpenGLDisplayMask(displayID), (CGLPixelFormatAttribute)0};
+ CGLPixelFormatObj pixelFormat;
+ GLint num;
+ if (CGLChoosePixelFormat(attributes, &pixelFormat, &num) == kCGLNoError) {
+ CGLContextObj cgl_ctx;
+ if (CGLCreateContext(pixelFormat, 0, &cgl_ctx) == kCGLNoError) {
+ if (CGLSetFullScreen(cgl_ctx) == kCGLNoError) {
+ void *flipBuffer = calloc(pixelsHigh, rowBytes);
+ if (flipBuffer) {
+ glPixelStorei(GL_PACK_ROW_LENGTH, rowBytes / 4);
+ glPixelStorei(GL_PACK_ALIGNMENT, 4);
+#if __BIG_ENDIAN__
+ glReadPixels(rect.origin.x, rect.origin.y, rect.size.width, rect.size.height, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, flipBuffer);
+#else
+ glReadPixels(rect.origin.x, rect.origin.y, rect.size.width, rect.size.height, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, flipBuffer);
+#endif
+ if (!glGetError()) {
+ for(size_t i = 0; i < pixelsHigh; ++i)
+ bcopy((char*)flipBuffer + rowBytes * i, (char*)buffer + rowBytes * (pixelsHigh - i - 1), pixelsWide * 4);
+ }
+
+ free(flipBuffer);
+ }
+ }
+ CGLDestroyContext(cgl_ctx);
+ }
+ CGLDestroyPixelFormat(pixelFormat);
+ }
+ }
+
+ [window setFrame:oldFrame display:NO animate:NO];
+ [window setLevel:oldLevel];
+#endif
+ } else {
+ // Grab directly the contents of the window backing buffer (this ignores any surfaces on the window)
+ // FIXME: This path is suboptimal: data is read from window backing store, converted to RGB8 then drawn again into an RGBA8 bitmap
+
+ [view displayIfNeeded];
+ [view lockFocus];
+ NSBitmapImageRep *imageRep = [[[NSBitmapImageRep alloc] initWithFocusedViewRect:[view frame]] autorelease];
+ [view unlockFocus];
+
+ RetainPtr<NSGraphicsContext> savedContext = [NSGraphicsContext currentContext];
+ [NSGraphicsContext setCurrentContext:nsContext];
+ [imageRep draw];
+ [NSGraphicsContext setCurrentContext:savedContext.get()];
+ }
+ }
+
+ if (drawSelectionRect) {
+ NSView *documentView = [[mainFrame frameView] documentView];
+ ASSERT([documentView conformsToProtocol:@protocol(WebDocumentSelection)]);
+ NSRect rect = [documentView convertRect:[(id <WebDocumentSelection>)documentView selectionRect] fromView:nil];
+ CGContextSaveGState(context);
+ CGContextSetLineWidth(context, 1.0);
+ CGContextSetRGBStrokeColor(context, 1.0, 0.0, 0.0, 1.0);
+ CGContextStrokeRect(context, CGRectMake(rect.origin.x, rect.origin.y, rect.size.width, rect.size.height));
+ CGContextRestoreGState(context);
+ }
+
+ return bitmapContext.release();
+}
diff --git a/WebKitTools/DumpRenderTree/mac/PolicyDelegate.h b/WebKitTools/DumpRenderTree/mac/PolicyDelegate.h
new file mode 100644
index 0000000..4cdf7c0
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/PolicyDelegate.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface PolicyDelegate : NSObject {
+ BOOL permissiveDelegate;
+}
+
+- (void)setPermissive:(BOOL)permissive;
+
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/PolicyDelegate.mm b/WebKitTools/DumpRenderTree/mac/PolicyDelegate.mm
new file mode 100644
index 0000000..a0855d3
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/PolicyDelegate.mm
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "PolicyDelegate.h"
+
+#import "DumpRenderTree.h"
+#import "DumpRenderTreeDraggingInfo.h"
+#import <WebKit/WebPolicyDelegate.h>
+
+@implementation PolicyDelegate
+- (void)webView:(WebView *)webView decidePolicyForNavigationAction:(NSDictionary *)actionInformation
+ request:(NSURLRequest *)request
+ frame:(WebFrame *)frame
+ decisionListener:(id<WebPolicyDecisionListener>)listener
+{
+ WebNavigationType navType = (WebNavigationType)[[actionInformation objectForKey:WebActionNavigationTypeKey] intValue];
+
+ const char* typeDescription;
+ switch (navType) {
+ case WebNavigationTypeLinkClicked:
+ typeDescription = "link clicked";
+ break;
+ case WebNavigationTypeFormSubmitted:
+ typeDescription = "form submitted";
+ break;
+ case WebNavigationTypeBackForward:
+ typeDescription = "back/forward";
+ break;
+ case WebNavigationTypeReload:
+ typeDescription = "reload";
+ break;
+ case WebNavigationTypeFormResubmitted:
+ typeDescription = "form resubmitted";
+ break;
+ case WebNavigationTypeOther:
+ typeDescription = "other";
+ break;
+ default:
+ typeDescription = "illegal value";
+ }
+
+ printf("Policy delegate: attempt to load %s with navigation type '%s'\n", [[[request URL] absoluteString] UTF8String], typeDescription);
+
+ if (permissiveDelegate)
+ [listener use];
+ else
+ [listener ignore];
+}
+
+- (void)setPermissive:(BOOL)permissive
+{
+ permissiveDelegate = permissive;
+}
+
+
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.h b/WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.h
new file mode 100644
index 0000000..0c4618e
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface ResourceLoadDelegate : NSObject {
+}
+
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.mm b/WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.mm
new file mode 100644
index 0000000..2b7a8f3
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.mm
@@ -0,0 +1,194 @@
+/*
+ * Copyright (C) 2007, 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "ResourceLoadDelegate.h"
+
+#import "DumpRenderTree.h"
+#import "LayoutTestController.h"
+#import <WebKit/WebKit.h>
+#import <WebKit/WebTypesInternal.h>
+#import <wtf/Assertions.h>
+
+@interface NSURL (DRTExtras)
+- (NSString *)_drt_descriptionSuitableForTestResult;
+@end
+
+@interface NSError (DRTExtras)
+- (NSString *)_drt_descriptionSuitableForTestResult;
+@end
+
+@interface NSURLResponse (DRTExtras)
+- (NSString *)_drt_descriptionSuitableForTestResult;
+@end
+
+@interface NSURLRequest (DRTExtras)
+- (NSString *)_drt_descriptionSuitableForTestResult;
+@end
+
+@implementation NSError (DRTExtras)
+- (NSString *)_drt_descriptionSuitableForTestResult
+{
+ NSString *str = [NSString stringWithFormat:@"<NSError domain %@, code %d", [self domain], [self code]];
+ NSURL *failingURL;
+
+ if ((failingURL = [[self userInfo] objectForKey:@"NSErrorFailingURLKey"]))
+ str = [str stringByAppendingFormat:@", failing URL \"%@\"", [failingURL _drt_descriptionSuitableForTestResult]];
+
+ str = [str stringByAppendingFormat:@">"];
+
+ return str;
+}
+
+@end
+
+@implementation NSURL (DRTExtras)
+
+- (NSString *)_drt_descriptionSuitableForTestResult
+{
+ if (![self isFileURL])
+ return [self absoluteString];
+
+ WebDataSource *dataSource = [mainFrame dataSource];
+ if (!dataSource)
+ dataSource = [mainFrame provisionalDataSource];
+
+ NSString *basePath = [[[[dataSource request] URL] path] stringByDeletingLastPathComponent];
+
+ return [[self path] substringFromIndex:[basePath length] + 1];
+}
+
+@end
+
+@implementation NSURLResponse (DRTExtras)
+
+- (NSString *)_drt_descriptionSuitableForTestResult
+{
+ return [NSString stringWithFormat:@"<NSURLResponse %@>", [[self URL] _drt_descriptionSuitableForTestResult]];
+}
+
+@end
+
+@implementation NSURLRequest (DRTExtras)
+
+- (NSString *)_drt_descriptionSuitableForTestResult
+{
+ return [NSString stringWithFormat:@"<NSURLRequest URL %@, main document URL %@>", [[self URL] _drt_descriptionSuitableForTestResult], [[self mainDocumentURL] _drt_descriptionSuitableForTestResult]];
+}
+
+@end
+
+@implementation ResourceLoadDelegate
+
+- webView: (WebView *)wv identifierForInitialRequest: (NSURLRequest *)request fromDataSource: (WebDataSource *)dataSource
+{
+ ASSERT([[dataSource webFrame] dataSource] || [[dataSource webFrame] provisionalDataSource]);
+
+ if (!done && gLayoutTestController->dumpResourceLoadCallbacks())
+ return [[request URL] _drt_descriptionSuitableForTestResult];
+
+ return @"<unknown>";
+}
+
+-(NSURLRequest *)webView: (WebView *)wv resource:identifier willSendRequest: (NSURLRequest *)newRequest redirectResponse:(NSURLResponse *)redirectResponse fromDataSource:(WebDataSource *)dataSource
+{
+ if (!done && gLayoutTestController->dumpResourceLoadCallbacks()) {
+ NSString *string = [NSString stringWithFormat:@"%@ - willSendRequest %@ redirectResponse %@", identifier, [newRequest _drt_descriptionSuitableForTestResult],
+ [redirectResponse _drt_descriptionSuitableForTestResult]];
+ printf("%s\n", [string UTF8String]);
+ }
+
+ NSURL *url = [newRequest URL];
+ NSString *host = [url host];
+ if (host
+ && (NSOrderedSame == [[url scheme] caseInsensitiveCompare:@"http"] || NSOrderedSame == [[url scheme] caseInsensitiveCompare:@"https"])
+ && NSOrderedSame != [host compare:@"127.0.0.1"]
+ && NSOrderedSame != [host compare:@"255.255.255.255"] // used in some tests that expect to get back an error
+ && NSOrderedSame != [host caseInsensitiveCompare:@"localhost"]) {
+ printf("Blocked access to external URL %s\n", [[url absoluteString] cStringUsingEncoding:NSUTF8StringEncoding]);
+ return nil;
+ }
+
+ if (disallowedURLs && CFSetContainsValue(disallowedURLs, url))
+ return nil;
+
+ return newRequest;
+}
+
+- (void)webView:(WebView *)wv resource:(id)identifier didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge fromDataSource:(WebDataSource *)dataSource
+{
+}
+
+- (void)webView:(WebView *)wv resource:(id)identifier didCancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge fromDataSource:(WebDataSource *)dataSource
+{
+}
+
+-(void)webView: (WebView *)wv resource:identifier didReceiveResponse: (NSURLResponse *)response fromDataSource:(WebDataSource *)dataSource
+{
+ if (!done && gLayoutTestController->dumpResourceLoadCallbacks()) {
+ NSString *string = [NSString stringWithFormat:@"%@ - didReceiveResponse %@", identifier, [response _drt_descriptionSuitableForTestResult]];
+ printf("%s\n", [string UTF8String]);
+ }
+}
+
+-(void)webView: (WebView *)wv resource:identifier didReceiveContentLength: (NSInteger)length fromDataSource:(WebDataSource *)dataSource
+{
+}
+
+-(void)webView: (WebView *)wv resource:identifier didFinishLoadingFromDataSource:(WebDataSource *)dataSource
+{
+ if (!done && gLayoutTestController->dumpResourceLoadCallbacks()) {
+ NSString *string = [NSString stringWithFormat:@"%@ - didFinishLoading", identifier];
+ printf("%s\n", [string UTF8String]);
+ }
+}
+
+-(void)webView: (WebView *)wv resource:identifier didFailLoadingWithError:(NSError *)error fromDataSource:(WebDataSource *)dataSource
+{
+ if (!done && gLayoutTestController->dumpResourceLoadCallbacks()) {
+ NSString *string = [NSString stringWithFormat:@"%@ - didFailLoadingWithError: %@", identifier, [error _drt_descriptionSuitableForTestResult]];
+ printf("%s\n", [string UTF8String]);
+ }
+}
+
+- (void)webView: (WebView *)wv plugInFailedWithError:(NSError *)error dataSource:(WebDataSource *)dataSource
+{
+ // The call to -display here simulates the "Plug-in not found" sheet that Safari shows.
+ // It is used for platform/mac/plugins/update-widget-from-style-recalc.html
+ [wv display];
+}
+
+-(NSCachedURLResponse *) webView: (WebView *)wv resource:(id)identifier willCacheResponse:(NSCachedURLResponse *)response fromDataSource:(WebDataSource *)dataSource
+{
+ if (!done && gLayoutTestController->dumpResourceLoadCallbacks()) {
+ NSString *string = [NSString stringWithFormat:@"%@ - willCacheResponse: called", identifier];
+ printf("%s\n", [string UTF8String]);
+ }
+ return response;
+}
+
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/TextInputController.h b/WebKitTools/DumpRenderTree/mac/TextInputController.h
new file mode 100644
index 0000000..767e72f
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/TextInputController.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2005 Apple Computer, 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+
+@class WebView;
+@class WebHTMLView;
+@class WebScriptObject;
+
+@interface TextInputController : NSObject
+{
+ WebView *webView;
+ WebHTMLView *inputMethodView;
+ WebScriptObject *inputMethodHandler;
+}
+- (id)initWithWebView:(WebView *)view;
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/TextInputController.m b/WebKitTools/DumpRenderTree/mac/TextInputController.m
new file mode 100644
index 0000000..a635070
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/TextInputController.m
@@ -0,0 +1,429 @@
+/*
+ * Copyright (C) 2005, 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "DumpRenderTreeMac.h"
+#import "TextInputController.h"
+
+#import <AppKit/NSInputManager.h>
+#import <WebKit/WebDocument.h>
+#import <WebKit/WebFrame.h>
+#import <WebKit/WebFrameView.h>
+#import <WebKit/WebHTMLViewPrivate.h>
+#import <WebKit/WebScriptObject.h>
+#import <WebKit/WebTypesInternal.h>
+#import <WebKit/WebView.h>
+
+@interface TextInputController (DumpRenderTreeInputMethodHandler)
+- (BOOL)interpretKeyEvents:(NSArray *)eventArray withSender:(WebHTMLView *)sender;
+@end
+
+@interface WebHTMLView (DumpRenderTreeInputMethodHandler)
+- (void)interpretKeyEvents:(NSArray *)eventArray;
+@end
+
+@interface WebHTMLView (WebKitSecretsTextInputControllerIsAwareOf)
+- (WebFrame *)_frame;
+@end
+
+@implementation WebHTMLView (DumpRenderTreeInputMethodHandler)
+- (void)interpretKeyEvents:(NSArray *)eventArray
+{
+ WebScriptObject *obj = [[self _frame] windowObject];
+ TextInputController *tic = [obj valueForKey:@"textInputController"];
+ if (![tic interpretKeyEvents:eventArray withSender:self])
+ [super interpretKeyEvents:eventArray];
+}
+@end
+
+@implementation NSMutableAttributedString (TextInputController)
+
++ (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector
+{
+ if (aSelector == @selector(string)
+ || aSelector == @selector(getLength)
+ || aSelector == @selector(attributeNamesAtIndex:)
+ || aSelector == @selector(valueOfAttribute:atIndex:)
+ || aSelector == @selector(addAttribute:value:)
+ || aSelector == @selector(addAttribute:value:from:length:)
+ || aSelector == @selector(addColorAttribute:red:green:blue:alpha:)
+ || aSelector == @selector(addColorAttribute:red:green:blue:alpha:from:length:)
+ || aSelector == @selector(addFontAttribute:fontName:size:)
+ || aSelector == @selector(addFontAttribute:fontName:size:from:length:))
+ return NO;
+ return YES;
+}
+
++ (NSString *)webScriptNameForSelector:(SEL)aSelector
+{
+ if (aSelector == @selector(getLength))
+ return @"length";
+ if (aSelector == @selector(attributeNamesAtIndex:))
+ return @"getAttributeNamesAtIndex";
+ if (aSelector == @selector(valueOfAttribute:atIndex:))
+ return @"getAttributeValueAtIndex";
+ if (aSelector == @selector(addAttribute:value:))
+ return @"addAttribute";
+ if (aSelector == @selector(addAttribute:value:from:length:))
+ return @"addAttributeForRange";
+ if (aSelector == @selector(addColorAttribute:red:green:blue:alpha:))
+ return @"addColorAttribute";
+ if (aSelector == @selector(addColorAttribute:red:green:blue:alpha:from:length:))
+ return @"addColorAttributeForRange";
+ if (aSelector == @selector(addFontAttribute:fontName:size:))
+ return @"addFontAttribute";
+ if (aSelector == @selector(addFontAttribute:fontName:size:from:length:))
+ return @"addFontAttributeForRange";
+
+ return nil;
+}
+
+- (int)getLength
+{
+ return (int)[self length];
+}
+
+- (NSArray *)attributeNamesAtIndex:(int)index
+{
+ NSDictionary *attributes = [self attributesAtIndex:(unsigned)index effectiveRange:nil];
+ return [attributes allKeys];
+}
+
+- (id)valueOfAttribute:(NSString *)attrName atIndex:(int)index
+{
+ return [self attribute:attrName atIndex:(unsigned)index effectiveRange:nil];
+}
+
+- (void)addAttribute:(NSString *)attrName value:(id)value
+{
+ [self addAttribute:attrName value:value range:NSMakeRange(0, [self length])];
+}
+
+- (void)addAttribute:(NSString *)attrName value:(id)value from:(int)from length:(int)length
+{
+ [self addAttribute:attrName value:value range:NSMakeRange((unsigned)from, (unsigned)length)];
+}
+
+- (void)addColorAttribute:(NSString *)attrName red:(float)red green:(float)green blue:(float)blue alpha:(float)alpha
+{
+ [self addAttribute:attrName value:[NSColor colorWithDeviceRed:red green:green blue:blue alpha:alpha] range:NSMakeRange(0, [self length])];
+}
+
+- (void)addColorAttribute:(NSString *)attrName red:(float)red green:(float)green blue:(float)blue alpha:(float)alpha from:(int)from length:(int)length
+{
+ [self addAttribute:attrName value:[NSColor colorWithDeviceRed:red green:green blue:blue alpha:alpha] range:NSMakeRange((unsigned)from, (unsigned)length)];
+}
+
+- (void)addFontAttribute:(NSString *)attrName fontName:(NSString *)fontName size:(float)fontSize
+{
+ [self addAttribute:attrName value:[NSFont fontWithName:fontName size:fontSize] range:NSMakeRange(0, [self length])];
+}
+
+- (void)addFontAttribute:(NSString *)attrName fontName:(NSString *)fontName size:(float)fontSize from:(int)from length:(int)length
+{
+ [self addAttribute:attrName value:[NSFont fontWithName:fontName size:fontSize] range:NSMakeRange((unsigned)from, (unsigned)length)];
+}
+
+@end
+
+@implementation TextInputController
+
++ (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector
+{
+ if (aSelector == @selector(insertText:)
+ || aSelector == @selector(doCommand:)
+ || aSelector == @selector(setMarkedText:selectedFrom:length:)
+ || aSelector == @selector(unmarkText)
+ || aSelector == @selector(hasMarkedText)
+ || aSelector == @selector(conversationIdentifier)
+ || aSelector == @selector(substringFrom:length:)
+ || aSelector == @selector(attributedSubstringFrom:length:)
+ || aSelector == @selector(markedRange)
+ || aSelector == @selector(selectedRange)
+ || aSelector == @selector(firstRectForCharactersFrom:length:)
+ || aSelector == @selector(characterIndexForPointX:Y:)
+ || aSelector == @selector(validAttributesForMarkedText)
+ || aSelector == @selector(attributedStringWithString:)
+ || aSelector == @selector(setInputMethodHandler:))
+ return NO;
+ return YES;
+}
+
++ (NSString *)webScriptNameForSelector:(SEL)aSelector
+{
+ if (aSelector == @selector(insertText:))
+ return @"insertText";
+ else if (aSelector == @selector(doCommand:))
+ return @"doCommand";
+ else if (aSelector == @selector(setMarkedText:selectedFrom:length:))
+ return @"setMarkedText";
+ else if (aSelector == @selector(substringFrom:length:))
+ return @"substringFromRange";
+ else if (aSelector == @selector(attributedSubstringFrom:length:))
+ return @"attributedSubstringFromRange";
+ else if (aSelector == @selector(firstRectForCharactersFrom:length:))
+ return @"firstRectForCharacterRange";
+ else if (aSelector == @selector(characterIndexForPointX:Y:))
+ return @"characterIndexForPoint";
+ else if (aSelector == @selector(attributedStringWithString:))
+ return @"makeAttributedString"; // just a factory method, doesn't call into NSTextInput
+ else if (aSelector == @selector(setInputMethodHandler:))
+ return @"setInputMethodHandler";
+
+ return nil;
+}
+
+- (id)initWithWebView:(WebView *)wv
+{
+ self = [super init];
+ webView = wv;
+ inputMethodView = nil;
+ inputMethodHandler = nil;
+ return self;
+}
+
+- (void)dealloc
+{
+ [inputMethodHandler release];
+ inputMethodHandler = nil;
+
+ [super dealloc];
+}
+
+- (NSObject <NSTextInput> *)textInput
+{
+ NSView <NSTextInput> *view = inputMethodView ? inputMethodView : (id)[[[webView mainFrame] frameView] documentView];
+ return [view conformsToProtocol:@protocol(NSTextInput)] ? view : nil;
+}
+
+- (void)insertText:(id)aString
+{
+ NSObject <NSTextInput> *textInput = [self textInput];
+
+ if (textInput)
+ [textInput insertText:aString];
+}
+
+- (void)doCommand:(NSString *)aCommand
+{
+ NSObject <NSTextInput> *textInput = [self textInput];
+
+ if (textInput)
+ [textInput doCommandBySelector:NSSelectorFromString(aCommand)];
+}
+
+- (void)setMarkedText:(NSString *)aString selectedFrom:(int)from length:(int)length
+{
+ NSObject <NSTextInput> *textInput = [self textInput];
+
+ if (textInput)
+ [textInput setMarkedText:aString selectedRange:NSMakeRange(from, length)];
+}
+
+- (void)unmarkText
+{
+ NSObject <NSTextInput> *textInput = [self textInput];
+
+ if (textInput)
+ [textInput unmarkText];
+}
+
+- (BOOL)hasMarkedText
+{
+ NSObject <NSTextInput> *textInput = [self textInput];
+
+ if (textInput)
+ return [textInput hasMarkedText];
+
+ return FALSE;
+}
+
+- (long)conversationIdentifier
+{
+ NSObject <NSTextInput> *textInput = [self textInput];
+
+ if (textInput)
+ return [textInput conversationIdentifier];
+
+ return 0;
+}
+
+- (NSString *)substringFrom:(int)from length:(int)length
+{
+ NSObject <NSTextInput> *textInput = [self textInput];
+
+ if (textInput)
+ return [[textInput attributedSubstringFromRange:NSMakeRange(from, length)] string];
+
+ return @"";
+}
+
+- (NSMutableAttributedString *)attributedSubstringFrom:(int)from length:(int)length
+{
+ NSObject <NSTextInput> *textInput = [self textInput];
+
+ NSMutableAttributedString *ret = [[[NSMutableAttributedString alloc] init] autorelease];
+
+ if (textInput)
+ [ret setAttributedString:[textInput attributedSubstringFromRange:NSMakeRange(from, length)]];
+
+ return ret;
+}
+
+- (NSArray *)markedRange
+{
+ NSObject <NSTextInput> *textInput = [self textInput];
+
+ if (textInput) {
+ NSRange range = [textInput markedRange];
+ return [NSArray arrayWithObjects:[NSNumber numberWithUnsignedInt:range.location], [NSNumber numberWithUnsignedInt:range.length], nil];
+ }
+
+ return nil;
+}
+
+- (NSArray *)selectedRange
+{
+ NSObject <NSTextInput> *textInput = [self textInput];
+
+ if (textInput) {
+ NSRange range = [textInput selectedRange];
+ return [NSArray arrayWithObjects:[NSNumber numberWithUnsignedInt:range.location], [NSNumber numberWithUnsignedInt:range.length], nil];
+ }
+
+ return nil;
+}
+
+
+- (NSArray *)firstRectForCharactersFrom:(int)from length:(int)length
+{
+ NSObject <NSTextInput> *textInput = [self textInput];
+
+ if (textInput) {
+ NSRect rect = [textInput firstRectForCharacterRange:NSMakeRange(from, length)];
+ if (rect.origin.x || rect.origin.y || rect.size.width || rect.size.height) {
+ rect.origin = [[webView window] convertScreenToBase:rect.origin];
+ rect = [webView convertRect:rect fromView:nil];
+ }
+ return [NSArray arrayWithObjects:
+ [NSNumber numberWithFloat:rect.origin.x],
+ [NSNumber numberWithFloat:rect.origin.y],
+ [NSNumber numberWithFloat:rect.size.width],
+ [NSNumber numberWithFloat:rect.size.height],
+ nil];
+ }
+
+ return nil;
+}
+
+- (NSInteger)characterIndexForPointX:(float)x Y:(float)y
+{
+ NSObject <NSTextInput> *textInput = [self textInput];
+
+ if (textInput) {
+ NSPoint point = NSMakePoint(x, y);
+ point = [webView convertPoint:point toView:nil];
+ point = [[webView window] convertBaseToScreen:point];
+ NSInteger index = [textInput characterIndexForPoint:point];
+ if (index == NSNotFound)
+ return -1;
+
+ return index;
+ }
+
+ return 0;
+}
+
+- (NSArray *)validAttributesForMarkedText
+{
+ NSObject <NSTextInput> *textInput = [self textInput];
+
+ if (textInput)
+ return [textInput validAttributesForMarkedText];
+
+ return nil;
+}
+
+- (NSMutableAttributedString *)attributedStringWithString:(NSString *)aString
+{
+ return [[[NSMutableAttributedString alloc] initWithString:aString] autorelease];
+}
+
+- (void)setInputMethodHandler:(WebScriptObject *)handler
+{
+ if (inputMethodHandler == handler)
+ return;
+ [handler retain];
+ [inputMethodHandler release];
+ inputMethodHandler = handler;
+}
+
+- (BOOL)interpretKeyEvents:(NSArray *)eventArray withSender:(WebHTMLView *)sender
+{
+ if (!inputMethodHandler)
+ return NO;
+
+ inputMethodView = sender;
+
+ NSEvent *event = [eventArray objectAtIndex:0];
+ unsigned modifierFlags = [event modifierFlags];
+ NSMutableArray *modifiers = [[NSMutableArray alloc] init];
+ if (modifierFlags & NSAlphaShiftKeyMask)
+ [modifiers addObject:@"NSAlphaShiftKeyMask"];
+ if (modifierFlags & NSShiftKeyMask)
+ [modifiers addObject:@"NSShiftKeyMask"];
+ if (modifierFlags & NSControlKeyMask)
+ [modifiers addObject:@"NSControlKeyMask"];
+ if (modifierFlags & NSAlternateKeyMask)
+ [modifiers addObject:@"NSAlternateKeyMask"];
+ if (modifierFlags & NSCommandKeyMask)
+ [modifiers addObject:@"NSCommandKeyMask"];
+ if (modifierFlags & NSNumericPadKeyMask)
+ [modifiers addObject:@"NSNumericPadKeyMask"];
+ if (modifierFlags & NSHelpKeyMask)
+ [modifiers addObject:@"NSHelpKeyMask"];
+ if (modifierFlags & NSFunctionKeyMask)
+ [modifiers addObject:@"NSFunctionKeyMask"];
+
+ WebScriptObject* eventParam = [inputMethodHandler evaluateWebScript:@"new Object();"];
+ [eventParam setValue:[event characters] forKey:@"characters"];
+ [eventParam setValue:[event charactersIgnoringModifiers] forKey:@"charactersIgnoringModifiers"];
+ [eventParam setValue:[NSNumber numberWithBool:[event isARepeat]] forKey:@"isARepeat"];
+ [eventParam setValue:[NSNumber numberWithUnsignedShort:[event keyCode]] forKey:@"keyCode"];
+ [eventParam setValue:modifiers forKey:@"modifierFlags"];
+
+ [modifiers release];
+
+ id result = [inputMethodHandler callWebScriptMethod:@"call" withArguments:[NSArray arrayWithObjects:inputMethodHandler, eventParam, nil]];
+ if (![result respondsToSelector:@selector(boolValue)] || ![result boolValue])
+ [sender doCommandBySelector:@selector(noop:)]; // AppKit sends noop: if the ime does not handle an event
+
+ inputMethodView = nil;
+ return YES;
+}
+
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/UIDelegate.h b/WebKitTools/DumpRenderTree/mac/UIDelegate.h
new file mode 100644
index 0000000..da472d6
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/UIDelegate.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2006 Apple Computer, 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+@interface UIDelegate : NSObject {
+
+@private
+ NSRect m_frame;
+}
+
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/UIDelegate.mm b/WebKitTools/DumpRenderTree/mac/UIDelegate.mm
new file mode 100644
index 0000000..550892f
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/UIDelegate.mm
@@ -0,0 +1,163 @@
+/*
+ * Copyright (C) 2006. 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "DumpRenderTree.h"
+#import "UIDelegate.h"
+
+#import "DumpRenderTreeDraggingInfo.h"
+#import "EventSendingController.h"
+#import "LayoutTestController.h"
+#import <WebKit/WebFramePrivate.h>
+#import <WebKit/WebHTMLViewPrivate.h>
+#import <WebKit/WebView.h>
+#import <WebKit/WebSecurityOriginPrivate.h>
+#import <wtf/Assertions.h>
+
+DumpRenderTreeDraggingInfo *draggingInfo = nil;
+
+@implementation UIDelegate
+
+- (void)webView:(WebView *)sender setFrame:(NSRect)frame
+{
+ m_frame = frame;
+}
+
+- (NSRect)webViewFrame:(WebView *)sender
+{
+ return m_frame;
+}
+
+- (void)webView:(WebView *)sender addMessageToConsole:(NSDictionary *)dictionary
+{
+ NSString *message = [dictionary objectForKey:@"message"];
+ NSNumber *lineNumber = [dictionary objectForKey:@"lineNumber"];
+
+ NSRange range = [message rangeOfString:@"file://"];
+ if (range.location != NSNotFound)
+ message = [[message substringToIndex:range.location] stringByAppendingString:[[message substringFromIndex:NSMaxRange(range)] lastPathComponent]];
+
+ printf ("CONSOLE MESSAGE: line %d: %s\n", [lineNumber intValue], [message UTF8String]);
+}
+
+- (void)webView:(WebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame
+{
+ if (!done)
+ printf("ALERT: %s\n", [message UTF8String]);
+}
+
+- (BOOL)webView:(WebView *)sender runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame
+{
+ if (!done)
+ printf("CONFIRM: %s\n", [message UTF8String]);
+ return YES;
+}
+
+- (NSString *)webView:(WebView *)sender runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText initiatedByFrame:(WebFrame *)frame
+{
+ if (!done)
+ printf("PROMPT: %s, default text: %s\n", [prompt UTF8String], [defaultText UTF8String]);
+ return defaultText;
+}
+
+- (BOOL)webView:(WebView *)c runBeforeUnloadConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame
+{
+ if (!done)
+ printf("CONFIRM NAVIGATION: %s\n", [message UTF8String]);
+ return YES;
+}
+
+
+- (void)webView:(WebView *)sender dragImage:(NSImage *)anImage at:(NSPoint)viewLocation offset:(NSSize)initialOffset event:(NSEvent *)event pasteboard:(NSPasteboard *)pboard source:(id)sourceObj slideBack:(BOOL)slideFlag forView:(NSView *)view
+{
+ assert(!draggingInfo);
+ if (gLayoutTestController->addFileToPasteboardOnDrag()) {
+ [pboard declareTypes:[NSArray arrayWithObject:NSFilenamesPboardType] owner:nil];
+ [pboard setPropertyList:[NSArray arrayWithObject:@"DRTFakeFile"] forType:NSFilenamesPboardType];
+ }
+ draggingInfo = [[DumpRenderTreeDraggingInfo alloc] initWithImage:anImage offset:initialOffset pasteboard:pboard source:sourceObj];
+ [EventSendingController replaySavedEvents];
+}
+
+- (void)webViewFocus:(WebView *)webView
+{
+ gLayoutTestController->setWindowIsKey(true);
+}
+
+- (void)webViewUnfocus:(WebView *)webView
+{
+ gLayoutTestController->setWindowIsKey(false);
+}
+
+- (WebView *)webView:(WebView *)sender createWebViewWithRequest:(NSURLRequest *)request
+{
+ if (!gLayoutTestController->canOpenWindows())
+ return nil;
+
+ // Make sure that waitUntilDone has been called.
+ ASSERT(gLayoutTestController->waitToDump());
+
+ WebView *webView = createWebViewAndOffscreenWindow();
+
+ return [webView autorelease];
+}
+
+- (void)webViewClose:(WebView *)sender
+{
+ NSWindow* window = [sender window];
+
+ if (gLayoutTestController->callCloseOnWebViews())
+ [sender close];
+
+ [window close];
+}
+
+- (void)webView:(WebView *)sender frame:(WebFrame *)frame exceededDatabaseQuotaForSecurityOrigin:(WebSecurityOrigin *)origin database:(NSString *)databaseIdentifier
+{
+ if (!done && gLayoutTestController->dumpDatabaseCallbacks())
+ printf("UI DELEGATE DATABASE CALLBACK: exceededDatabaseQuotaForSecurityOrigin:{%s, %s, %i} database:%s\n", [[origin protocol] UTF8String], [[origin host] UTF8String],
+ [origin port], [databaseIdentifier UTF8String]);
+
+ static const unsigned long long defaultQuota = 5 * 1024 * 1024;
+ [origin setQuota:defaultQuota];
+}
+
+- (void)webView:(WebView *)sender setStatusText:(NSString *)text
+{
+ if (gLayoutTestController->dumpStatusCallbacks())
+ printf("UI DELEGATE STATUS CALLBACK: setStatusText:%s\n", [text UTF8String]);
+}
+
+- (void)dealloc
+{
+ [draggingInfo release];
+ draggingInfo = nil;
+
+ [super dealloc];
+}
+
+@end
diff --git a/WebKitTools/DumpRenderTree/mac/WorkQueueItemMac.mm b/WebKitTools/DumpRenderTree/mac/WorkQueueItemMac.mm
new file mode 100644
index 0000000..3a7b0e2
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/mac/WorkQueueItemMac.mm
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "DumpRenderTree.h"
+#import "WorkQueueItem.h"
+
+#import <JavaScriptCore/JSStringRef.h>
+#import <JavaScriptCore/JSStringRefCF.h>
+#import <WebKit/WebBackForwardList.h>
+#import <WebKit/WebFrame.h>
+#import <WebKit/WebScriptObject.h>
+#import <WebKit/WebView.h>
+#import <wtf/RetainPtr.h>
+
+void LoadItem::invoke() const
+{
+ RetainPtr<CFStringRef> urlCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, m_url.get()));
+ NSString *urlNS = (NSString *)urlCF.get();
+ RetainPtr<CFStringRef> targetCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, m_target.get()));
+ NSString *targetNS = (NSString *)targetCF.get();
+
+ WebFrame *targetFrame;
+ if (targetNS && [targetNS length])
+ targetFrame = [mainFrame findFrameNamed:targetNS];
+ else
+ targetFrame = mainFrame;
+ [targetFrame loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlNS]]];
+}
+
+void ReloadItem::invoke() const
+{
+ [[mainFrame webView] reload:nil];
+}
+
+void ScriptItem::invoke() const
+{
+ RetainPtr<CFStringRef> scriptCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, m_script.get()));
+ NSString *scriptNS = (NSString *)scriptCF.get();
+ [[mainFrame webView] stringByEvaluatingJavaScriptFromString:scriptNS];
+}
+
+void BackForwardItem::invoke() const
+{
+ if (m_howFar == 1)
+ [[mainFrame webView] goForward];
+ else if (m_howFar == -1)
+ [[mainFrame webView] goBack];
+ else {
+ WebBackForwardList *bfList = [[mainFrame webView] backForwardList];
+ [[mainFrame webView] goToBackForwardItem:[bfList itemAtIndex:m_howFar]];
+ }
+}
diff --git a/WebKitTools/DumpRenderTree/pthreads/JavaScriptThreadingPthreads.cpp b/WebKitTools/DumpRenderTree/pthreads/JavaScriptThreadingPthreads.cpp
new file mode 100644
index 0000000..3ac257d
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/pthreads/JavaScriptThreadingPthreads.cpp
@@ -0,0 +1,137 @@
+/*
+ * Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved.
+ * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
+ * (C) 2007 Eric Seidel <eric@webkit.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "JavaScriptThreading.h"
+
+#include <CoreFoundation/CoreFoundation.h>
+#include <JavaScriptCore/JavaScriptCore.h>
+#include <pthread.h>
+#include <wtf/Assertions.h>
+#include <wtf/HashSet.h>
+
+static pthread_mutex_t javaScriptThreadsMutex = PTHREAD_MUTEX_INITIALIZER;
+static bool javaScriptThreadsShouldTerminate;
+
+static const int javaScriptThreadsCount = 4;
+
+typedef HashSet<pthread_t> ThreadSet;
+
+static ThreadSet* javaScriptThreads()
+{
+ ASSERT(pthread_mutex_trylock(&javaScriptThreadsMutex) == EBUSY);
+ static ThreadSet staticJavaScriptThreads;
+ return &staticJavaScriptThreads;
+}
+
+// Loops forever, running a script and randomly respawning, until
+// javaScriptThreadsShouldTerminate becomes true.
+void* runJavaScriptThread(void* arg)
+{
+ const char* const script =
+ "var array = [];"
+ "for (var i = 0; i < 10; i++) {"
+ " array.push(String(i));"
+ "}";
+
+ while (1) {
+ JSGlobalContextRef ctx = JSGlobalContextCreate(0);
+ JSStringRef scriptRef = JSStringCreateWithUTF8CString(script);
+
+ JSValueRef exception = 0;
+ JSEvaluateScript(ctx, scriptRef, 0, 0, 1, &exception);
+ ASSERT(!exception);
+
+ JSGarbageCollect(ctx);
+ JSGlobalContextRelease(ctx);
+ JSStringRelease(scriptRef);
+
+ JSGarbageCollect(0);
+
+ pthread_mutex_lock(&javaScriptThreadsMutex);
+
+ // Check for cancellation.
+ if (javaScriptThreadsShouldTerminate) {
+ javaScriptThreads()->remove(pthread_self());
+ pthread_mutex_unlock(&javaScriptThreadsMutex);
+ return 0;
+ }
+
+ // Respawn probabilistically.
+ if (random() % 5 == 0) {
+ pthread_t pthread;
+ pthread_create(&pthread, 0, &runJavaScriptThread, 0);
+ pthread_detach(pthread);
+
+ javaScriptThreads()->remove(pthread_self());
+ javaScriptThreads()->add(pthread);
+
+ pthread_mutex_unlock(&javaScriptThreadsMutex);
+ return 0;
+ }
+
+ pthread_mutex_unlock(&javaScriptThreadsMutex);
+ }
+}
+
+void startJavaScriptThreads()
+{
+ pthread_mutex_lock(&javaScriptThreadsMutex);
+
+ for (int i = 0; i < javaScriptThreadsCount; i++) {
+ pthread_t pthread;
+ pthread_create(&pthread, 0, &runJavaScriptThread, 0);
+ pthread_detach(pthread);
+ javaScriptThreads()->add(pthread);
+ }
+
+ pthread_mutex_unlock(&javaScriptThreadsMutex);
+}
+
+void stopJavaScriptThreads()
+{
+ pthread_mutex_lock(&javaScriptThreadsMutex);
+
+ javaScriptThreadsShouldTerminate = true;
+
+ ASSERT(javaScriptThreads()->size() == javaScriptThreadsCount);
+
+ pthread_mutex_unlock(&javaScriptThreadsMutex);
+
+ while (true) {
+ pthread_mutex_lock(&javaScriptThreadsMutex);
+ int threadCount = javaScriptThreads()->size();
+ pthread_mutex_unlock(&javaScriptThreadsMutex);
+
+ if (!threadCount)
+ break;
+
+ usleep(1000);
+ }
+}
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp
new file mode 100644
index 0000000..78d535a
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp
@@ -0,0 +1,359 @@
+/*
+ * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "DumpRenderTree.h"
+#include "jsobjects.h"
+#include "testplugin.h"
+
+#include <QDir>
+#include <QFile>
+#include <QTimer>
+#include <QBoxLayout>
+#include <QScrollArea>
+#include <QApplication>
+#include <QUrl>
+#include <QFocusEvent>
+
+#include <qwebpage.h>
+#include <qwebframe.h>
+#include <qwebview.h>
+#include <qwebsettings.h>
+
+#include <unistd.h>
+#include <qdebug.h>
+
+extern void qt_drt_run(bool b);
+extern void qt_dump_set_accepts_editing(bool b);
+extern void qt_dump_frame_loader(bool b);
+
+
+namespace WebCore {
+
+// Choose some default values.
+const unsigned int maxViewWidth = 800;
+const unsigned int maxViewHeight = 600;
+
+class WebPage : public QWebPage {
+ Q_OBJECT
+public:
+ WebPage(QWidget *parent, DumpRenderTree *drt);
+
+ QWebPage *createWindow(QWebPage::WebWindowType);
+
+ void javaScriptAlert(QWebFrame *frame, const QString& message);
+ void javaScriptConsoleMessage(const QString& message, int lineNumber, const QString& sourceID);
+ bool javaScriptConfirm(QWebFrame *frame, const QString& msg);
+ bool javaScriptPrompt(QWebFrame *frame, const QString& msg, const QString& defaultValue, QString* result);
+
+private slots:
+ void setViewGeometry(const QRect &r)
+ {
+ QWidget *v = view();
+ if (v)
+ v->setGeometry(r);
+ }
+private:
+ DumpRenderTree *m_drt;
+};
+
+WebPage::WebPage(QWidget *parent, DumpRenderTree *drt)
+ : QWebPage(parent), m_drt(drt)
+{
+ settings()->setFontSize(QWebSettings::MinimumFontSize, 5);
+ settings()->setFontSize(QWebSettings::MinimumLogicalFontSize, 5);
+ settings()->setAttribute(QWebSettings::JavascriptCanOpenWindows, true);
+ settings()->setAttribute(QWebSettings::JavascriptCanAccessClipboard, true);
+ settings()->setAttribute(QWebSettings::LinksIncludedInFocusChain, false);
+ connect(this, SIGNAL(geometryChangeRequested(const QRect &)),
+ this, SLOT(setViewGeometry(const QRect & )));
+
+ setPluginFactory(new TestPlugin(this));
+}
+
+QWebPage *WebPage::createWindow(QWebPage::WebWindowType)
+{
+ return m_drt->createWindow();
+}
+
+void WebPage::javaScriptAlert(QWebFrame*, const QString& message)
+{
+ fprintf(stdout, "ALERT: %s\n", message.toUtf8().constData());
+}
+
+void WebPage::javaScriptConsoleMessage(const QString& message, int lineNumber, const QString&)
+{
+ fprintf (stdout, "CONSOLE MESSAGE: line %d: %s\n", lineNumber, message.toUtf8().constData());
+}
+
+bool WebPage::javaScriptConfirm(QWebFrame*, const QString& msg)
+{
+ fprintf(stdout, "CONFIRM: %s\n", msg.toUtf8().constData());
+ return true;
+}
+
+bool WebPage::javaScriptPrompt(QWebFrame*, const QString& msg, const QString& defaultValue, QString* result)
+{
+ fprintf(stdout, "PROMPT: %s, default text: %s\n", msg.toUtf8().constData(), defaultValue.toUtf8().constData());
+ *result = defaultValue;
+ return true;
+}
+
+DumpRenderTree::DumpRenderTree()
+ : m_stdin(0)
+ , m_notifier(0)
+{
+ m_controller = new LayoutTestController(this);
+ connect(m_controller, SIGNAL(done()), this, SLOT(dump()));
+
+ QWebView *view = new QWebView(0);
+ view->resize(QSize(maxViewWidth, maxViewHeight));
+ m_page = new WebPage(view, this);
+ view->setPage(m_page);
+ connect(m_page, SIGNAL(frameCreated(QWebFrame *)), this, SLOT(connectFrame(QWebFrame *)));
+ connectFrame(m_page->mainFrame());
+
+ connect(m_page, SIGNAL(loadFinished(bool)), m_controller, SLOT(maybeDump(bool)));
+
+ m_page->mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
+ m_page->mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
+ connect(m_page->mainFrame(), SIGNAL(titleChanged(const QString&)),
+ SLOT(titleChanged(const QString&)));
+
+ m_eventSender = new EventSender(m_page);
+ m_textInputController = new TextInputController(m_page);
+
+ QObject::connect(this, SIGNAL(quit()), qApp, SLOT(quit()), Qt::QueuedConnection);
+ qt_drt_run(true);
+ QFocusEvent event(QEvent::FocusIn, Qt::ActiveWindowFocusReason);
+ QApplication::sendEvent(view, &event);
+}
+
+DumpRenderTree::~DumpRenderTree()
+{
+ delete m_page;
+
+ delete m_stdin;
+ delete m_notifier;
+}
+
+void DumpRenderTree::open()
+{
+ if (!m_stdin) {
+ m_stdin = new QFile;
+ m_stdin->open(stdin, QFile::ReadOnly);
+ }
+
+ if (!m_notifier) {
+ m_notifier = new QSocketNotifier(STDIN_FILENO, QSocketNotifier::Read);
+ connect(m_notifier, SIGNAL(activated(int)), this, SLOT(readStdin(int)));
+ }
+}
+
+void DumpRenderTree::open(const QUrl& url)
+{
+ // W3C SVG tests expect to be 480x360
+ bool isW3CTest = url.toString().contains("svg/W3C-SVG-1.1");
+ int width = isW3CTest ? 480 : maxViewWidth;
+ int height = isW3CTest ? 360 : maxViewHeight;
+ m_page->view()->resize(QSize(width, height));
+ m_page->setViewportSize(QSize(width, height));
+
+ // Reset so that any current loads are stopped
+ m_page->blockSignals(true);
+ m_page->triggerAction(QWebPage::Stop);
+ m_page->blockSignals(false);
+
+ resetJSObjects();
+
+ qt_dump_frame_loader(url.toString().contains("loading/"));
+ m_page->mainFrame()->load(url);
+}
+
+void DumpRenderTree::readStdin(int /* socket */)
+{
+ // Read incoming data from stdin...
+ QByteArray line = m_stdin->readLine();
+ if (line.endsWith('\n'))
+ line.truncate(line.size()-1);
+ //fprintf(stderr, "\n opening %s\n", line.constData());
+ if (line.isEmpty())
+ quit();
+
+ if (line.startsWith("http:") || line.startsWith("https:"))
+ open(QUrl(line));
+ else {
+ QFileInfo fi(line);
+ open(QUrl::fromLocalFile(fi.absoluteFilePath()));
+ }
+
+ fflush(stdout);
+}
+
+void DumpRenderTree::resetJSObjects()
+{
+ m_controller->reset();
+ foreach(QWidget *widget, windows)
+ delete widget;
+ windows.clear();
+}
+
+void DumpRenderTree::initJSObjects()
+{
+ QWebFrame *frame = qobject_cast<QWebFrame*>(sender());
+ Q_ASSERT(frame);
+ frame->addToJavaScriptWindowObject(QLatin1String("layoutTestController"), m_controller);
+ frame->addToJavaScriptWindowObject(QLatin1String("eventSender"), m_eventSender);
+ frame->addToJavaScriptWindowObject(QLatin1String("textInputController"), m_textInputController);
+}
+
+
+QString DumpRenderTree::dumpFramesAsText(QWebFrame* frame)
+{
+ if (!frame)
+ return QString();
+
+ QString result;
+ QWebFrame *parent = qobject_cast<QWebFrame *>(frame->parent());
+ if (parent) {
+ result.append(QLatin1String("\n--------\nFrame: '"));
+ result.append(frame->frameName());
+ result.append(QLatin1String("'\n--------\n"));
+ }
+
+ result.append(frame->toPlainText());
+ result.append(QLatin1String("\n"));
+
+ if (m_controller->shouldDumpChildrenAsText()) {
+ QList<QWebFrame *> children = frame->childFrames();
+ for (int i = 0; i < children.size(); ++i)
+ result += dumpFramesAsText(children.at(i));
+ }
+
+ return result;
+}
+
+QString DumpRenderTree::dumpBackForwardList()
+{
+ QString result;
+ result.append(QLatin1String("\n============== Back Forward List ==============\n"));
+ result.append(QLatin1String("FIXME: Unimplemented!\n"));
+ result.append(QLatin1String("===============================================\n"));
+ return result;
+}
+
+void DumpRenderTree::dump()
+{
+ QWebFrame *frame = m_page->mainFrame();
+
+ //fprintf(stderr, " Dumping\n");
+ if (!m_notifier) {
+ // Dump markup in single file mode...
+ QString markup = frame->toHtml();
+ fprintf(stdout, "Source:\n\n%s\n", markup.toUtf8().constData());
+ }
+
+ // Dump render text...
+ QString renderDump;
+ if (m_controller->shouldDumpAsText()) {
+ renderDump = dumpFramesAsText(frame);
+ } else {
+ renderDump = frame->renderTreeDump();
+ }
+
+ if (m_controller->shouldDumpBackForwardList()) {
+ renderDump.append(dumpBackForwardList());
+ }
+
+ if (renderDump.isEmpty()) {
+ printf("ERROR: nil result from %s", m_controller->shouldDumpAsText() ? "[documentElement innerText]" : "[frame renderTreeAsExternalRepresentation]");
+ } else {
+ fprintf(stdout, "%s", renderDump.toUtf8().constData());
+ }
+
+ // signal end of text block
+ fprintf(stdout, "#EOF\n");
+
+ // Since pixel tests are currently unsupported by Qt's DRT,
+ // just signal an empty pixel test block to run-webkit-tests
+ fprintf(stdout, "#EOF\n");
+
+ fflush(stdout);
+
+ fprintf(stderr, "#EOF\n");
+
+ fflush(stderr);
+
+ if (!m_notifier) {
+ // Exit now in single file mode...
+ quit();
+ }
+}
+
+void DumpRenderTree::titleChanged(const QString &s)
+{
+ if (m_controller->shouldDumpTitleChanges())
+ printf("TITLE CHANGED: %s\n", s.toUtf8().data());
+}
+
+void DumpRenderTree::connectFrame(QWebFrame *frame)
+{
+ connect(frame, SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(initJSObjects()));
+ connect(frame, SIGNAL(provisionalLoad()),
+ layoutTestController(), SLOT(provisionalLoad()));
+}
+
+QWebPage *DumpRenderTree::createWindow()
+{
+ if (!m_controller->canOpenWindows())
+ return 0;
+ QWidget *container = new QWidget(0);
+ container->resize(0, 0);
+ container->move(-1, -1);
+ container->hide();
+ QWebPage *page = new WebPage(container, this);
+ connect(m_page, SIGNAL(frameCreated(QWebFrame *)), this, SLOT(connectFrame(QWebFrame *)));
+ windows.append(container);
+ return page;
+}
+
+int DumpRenderTree::windowCount() const
+{
+ int count = 0;
+ foreach(QWidget *w, windows) {
+ if (w->children().count())
+ ++count;
+ }
+ return count + 1;
+}
+
+}
+
+#include "DumpRenderTree.moc"
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.h b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.h
new file mode 100644
index 0000000..170ea6d
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.h
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
+ * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DUMPRENDERTREE_H
+#define DUMPRENDERTREE_H
+
+#include <QList>
+#include <QObject>
+#include <QTextStream>
+#include <QSocketNotifier>
+
+QT_BEGIN_NAMESPACE
+class QUrl;
+class QFile;
+QT_END_NAMESPACE
+class QWebPage;
+class QWebFrame;
+
+class LayoutTestController;
+class EventSender;
+class TextInputController;
+
+namespace WebCore {
+
+class DumpRenderTree : public QObject {
+Q_OBJECT
+
+public:
+ DumpRenderTree();
+ virtual ~DumpRenderTree();
+
+ // Initialize in multi-file mode, used by run-webkit-tests.
+ void open();
+
+ // Initialize in single-file mode.
+ void open(const QUrl& url);
+
+ void resetJSObjects();
+
+ LayoutTestController *layoutTestController() const { return m_controller; }
+ EventSender *eventSender() const { return m_eventSender; }
+ TextInputController *textInputController() const { return m_textInputController; }
+
+ QWebPage *createWindow();
+ int windowCount() const;
+
+ QWebPage *webPage() const { return m_page; }
+
+public Q_SLOTS:
+ void initJSObjects();
+ void readStdin(int);
+ void dump();
+ void titleChanged(const QString &s);
+ void connectFrame(QWebFrame *frame);
+
+Q_SIGNALS:
+ void quit();
+
+private:
+ QString dumpFramesAsText(QWebFrame* frame);
+ QString dumpBackForwardList();
+ LayoutTestController *m_controller;
+
+ QWebPage *m_page;
+
+ EventSender *m_eventSender;
+ TextInputController *m_textInputController;
+
+ QFile *m_stdin;
+ QSocketNotifier* m_notifier;
+
+ QList<QWidget *> windows;
+};
+
+}
+
+#endif
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro
new file mode 100644
index 0000000..4a4e790
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro
@@ -0,0 +1,22 @@
+TARGET = DumpRenderTree
+CONFIG -= app_bundle
+
+include(../../../WebKit.pri)
+INCLUDEPATH += /usr/include/freetype2
+INCLUDEPATH += ../../../JavaScriptCore
+DESTDIR = ../../../bin
+
+
+QT = core gui
+macx: QT += xml network
+
+HEADERS = WorkQueue.h WorkQueueItem.h DumpRenderTree.h jsobjects.h testplugin.h
+SOURCES = WorkQueue.cpp DumpRenderTree.cpp main.cpp jsobjects.cpp testplugin.cpp
+
+unix:!mac {
+ QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
+}
+
+qt-port:lessThan(QT_MINOR_VERSION, 4) {
+ DEFINES += QT_BEGIN_NAMESPACE="" QT_END_NAMESPACE=""
+}
diff --git a/WebKitTools/DumpRenderTree/qt/WorkQueue.cpp b/WebKitTools/DumpRenderTree/qt/WorkQueue.cpp
new file mode 100644
index 0000000..8c6d48c
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/qt/WorkQueue.cpp
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WorkQueue.h"
+
+#include "WorkQueueItem.h"
+#include <wtf/Assertions.h>
+
+static const unsigned queueLength = 1024;
+
+static WorkQueueItem* theQueue[queueLength];
+static unsigned startOfQueue;
+static unsigned endOfQueue;
+
+WorkQueue* WorkQueue::shared()
+{
+ static WorkQueue* sharedInstance = new WorkQueue;
+ return sharedInstance;
+}
+
+WorkQueue::WorkQueue()
+ : m_frozen(false)
+{
+}
+
+void WorkQueue::queue(WorkQueueItem* item)
+{
+ ASSERT(endOfQueue < queueLength);
+ ASSERT(endOfQueue >= startOfQueue);
+
+ if (m_frozen) {
+ delete item;
+ return;
+ }
+
+ theQueue[endOfQueue++] = item;
+}
+
+WorkQueueItem* WorkQueue::dequeue()
+{
+ ASSERT(endOfQueue >= startOfQueue);
+
+ if (startOfQueue == endOfQueue)
+ return 0;
+
+ return theQueue[startOfQueue++];
+}
+
+unsigned WorkQueue::count()
+{
+ return endOfQueue - startOfQueue;
+}
+
+void WorkQueue::clear()
+{
+ for (unsigned i = startOfQueue; i < endOfQueue; ++i) {
+ delete theQueue[i];
+ theQueue[i] = 0;
+ }
+
+ startOfQueue = 0;
+ endOfQueue = 0;
+}
diff --git a/WebKitTools/DumpRenderTree/qt/WorkQueue.h b/WebKitTools/DumpRenderTree/qt/WorkQueue.h
new file mode 100644
index 0000000..64c775a
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/qt/WorkQueue.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WorkQueue_h
+#define WorkQueue_h
+
+class WorkQueueItem;
+
+class WorkQueue {
+public:
+ static WorkQueue* shared();
+
+ void queue(WorkQueueItem*);
+ WorkQueueItem* dequeue();
+ void clear();
+ unsigned count();
+
+ void setFrozen(bool b) { m_frozen = b; }
+
+private:
+ WorkQueue();
+
+ bool m_frozen;
+};
+
+#endif // !defined(WorkQueue_h)
diff --git a/WebKitTools/DumpRenderTree/qt/WorkQueueItem.h b/WebKitTools/DumpRenderTree/qt/WorkQueueItem.h
new file mode 100644
index 0000000..35aa598
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/qt/WorkQueueItem.h
@@ -0,0 +1,121 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WorkQueueItem_h
+#define WorkQueueItem_h
+
+#include <qstring.h>
+#include <qpointer.h>
+#include <qwebpage.h>
+
+class WorkQueueItem {
+public:
+ WorkQueueItem(QWebPage *page) : m_webPage(page) {}
+ virtual ~WorkQueueItem() { }
+ virtual void invoke() const = 0;
+
+protected:
+ QPointer<QWebPage> m_webPage;
+};
+
+class LoadItem : public WorkQueueItem {
+public:
+ LoadItem(const QString &url, const QString &target, QWebPage *page)
+ : WorkQueueItem(page)
+ , m_url(url)
+ , m_target(target)
+ {
+ }
+
+ QString url() const { return m_url; }
+ QString target() const { return m_target; }
+
+ virtual void invoke() const;
+
+private:
+ QString m_url;
+ QString m_target;
+};
+
+class ReloadItem : public WorkQueueItem {
+public:
+ ReloadItem(QWebPage *page)
+ : WorkQueueItem(page)
+ {
+ }
+ virtual void invoke() const;
+};
+
+class ScriptItem : public WorkQueueItem {
+public:
+ ScriptItem(const QString &script, QWebPage *page)
+ : WorkQueueItem(page)
+ , m_script(script)
+ {
+ }
+
+ QString script() const { return m_script; }
+
+ virtual void invoke() const;
+
+private:
+ QString m_script;
+};
+
+class BackForwardItem : public WorkQueueItem {
+public:
+ virtual void invoke() const;
+
+protected:
+ BackForwardItem(int howFar, QWebPage *page)
+ : WorkQueueItem(page)
+ , m_howFar(howFar)
+ {
+ }
+
+ int m_howFar;
+};
+
+class BackItem : public BackForwardItem {
+public:
+ BackItem(unsigned howFar, QWebPage *page)
+ : BackForwardItem(-howFar, page)
+ {
+ }
+};
+
+class ForwardItem : public BackForwardItem {
+public:
+ ForwardItem(unsigned howFar, QWebPage *page)
+ : BackForwardItem(howFar, page)
+ {
+ }
+};
+
+#endif // !defined(WorkQueueItem_h)
diff --git a/WebKitTools/DumpRenderTree/qt/fonts.conf b/WebKitTools/DumpRenderTree/qt/fonts.conf
new file mode 100644
index 0000000..3540c47
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/qt/fonts.conf
@@ -0,0 +1,258 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<fontconfig>
+
+<!--
+ Accept deprecated 'mono' alias, replacing it with 'monospace'
+-->
+ <match target="pattern">
+ <test qual="any" name="family">
+ <string>mono</string>
+ </test>
+ <edit name="family" mode="assign">
+ <string>monospace</string>
+ </edit>
+ </match>
+
+<!--
+ Accept alternate 'sans serif' spelling, replacing it with 'sans-serif'
+-->
+ <match target="pattern">
+ <test qual="any" name="family">
+ <string>sans serif</string>
+ </test>
+ <edit name="family" mode="assign">
+ <string>sans-serif</string>
+ </edit>
+ </match>
+
+<!--
+ Accept deprecated 'sans' alias, replacing it with 'sans-serif'
+-->
+ <match target="pattern">
+ <test qual="any" name="family">
+ <string>sans</string>
+ </test>
+ <edit name="family" mode="assign">
+ <string>sans-serif</string>
+ </edit>
+ </match>
+
+
+ <config>
+<!--
+ These are the default Unicode chars that are expected to be blank
+ in fonts. All other blank chars are assumed to be broken and
+ won't appear in the resulting charsets
+ -->
+ <blank>
+ <int>0x0020</int> <!-- SPACE -->
+ <int>0x00A0</int> <!-- NO-BREAK SPACE -->
+ <int>0x00AD</int> <!-- SOFT HYPHEN -->
+ <int>0x034F</int> <!-- COMBINING GRAPHEME JOINER -->
+ <int>0x0600</int> <!-- ARABIC NUMBER SIGN -->
+ <int>0x0601</int> <!-- ARABIC SIGN SANAH -->
+ <int>0x0602</int> <!-- ARABIC FOOTNOTE MARKER -->
+ <int>0x0603</int> <!-- ARABIC SIGN SAFHA -->
+ <int>0x06DD</int> <!-- ARABIC END OF AYAH -->
+ <int>0x070F</int> <!-- SYRIAC ABBREVIATION MARK -->
+ <int>0x115F</int> <!-- HANGUL CHOSEONG FILLER -->
+ <int>0x1160</int> <!-- HANGUL JUNGSEONG FILLER -->
+ <int>0x1680</int> <!-- OGHAM SPACE MARK -->
+ <int>0x17B4</int> <!-- KHMER VOWEL INHERENT AQ -->
+ <int>0x17B5</int> <!-- KHMER VOWEL INHERENT AA -->
+ <int>0x180E</int> <!-- MONGOLIAN VOWEL SEPARATOR -->
+ <int>0x2000</int> <!-- EN QUAD -->
+ <int>0x2001</int> <!-- EM QUAD -->
+ <int>0x2002</int> <!-- EN SPACE -->
+ <int>0x2003</int> <!-- EM SPACE -->
+ <int>0x2004</int> <!-- THREE-PER-EM SPACE -->
+ <int>0x2005</int> <!-- FOUR-PER-EM SPACE -->
+ <int>0x2006</int> <!-- SIX-PER-EM SPACE -->
+ <int>0x2007</int> <!-- FIGURE SPACE -->
+ <int>0x2008</int> <!-- PUNCTUATION SPACE -->
+ <int>0x2009</int> <!-- THIN SPACE -->
+ <int>0x200A</int> <!-- HAIR SPACE -->
+ <int>0x200B</int> <!-- ZERO WIDTH SPACE -->
+ <int>0x200C</int> <!-- ZERO WIDTH NON-JOINER -->
+ <int>0x200D</int> <!-- ZERO WIDTH JOINER -->
+ <int>0x200E</int> <!-- LEFT-TO-RIGHT MARK -->
+ <int>0x200F</int> <!-- RIGHT-TO-LEFT MARK -->
+ <int>0x2028</int> <!-- LINE SEPARATOR -->
+ <int>0x2029</int> <!-- PARAGRAPH SEPARATOR -->
+ <int>0x202A</int> <!-- LEFT-TO-RIGHT EMBEDDING -->
+ <int>0x202B</int> <!-- RIGHT-TO-LEFT EMBEDDING -->
+ <int>0x202C</int> <!-- POP DIRECTIONAL FORMATTING -->
+ <int>0x202D</int> <!-- LEFT-TO-RIGHT OVERRIDE -->
+ <int>0x202E</int> <!-- RIGHT-TO-LEFT OVERRIDE -->
+ <int>0x202F</int> <!-- NARROW NO-BREAK SPACE -->
+ <int>0x205F</int> <!-- MEDIUM MATHEMATICAL SPACE -->
+ <int>0x2060</int> <!-- WORD JOINER -->
+ <int>0x2061</int> <!-- FUNCTION APPLICATION -->
+ <int>0x2062</int> <!-- INVISIBLE TIMES -->
+ <int>0x2063</int> <!-- INVISIBLE SEPARATOR -->
+ <int>0x206A</int> <!-- INHIBIT SYMMETRIC SWAPPING -->
+ <int>0x206B</int> <!-- ACTIVATE SYMMETRIC SWAPPING -->
+ <int>0x206C</int> <!-- INHIBIT ARABIC FORM SHAPING -->
+ <int>0x206D</int> <!-- ACTIVATE ARABIC FORM SHAPING -->
+ <int>0x206E</int> <!-- NATIONAL DIGIT SHAPES -->
+ <int>0x206F</int> <!-- NOMINAL DIGIT SHAPES -->
+ <int>0x3000</int> <!-- IDEOGRAPHIC SPACE -->
+ <int>0x3164</int> <!-- HANGUL FILLER -->
+ <int>0xFEFF</int> <!-- ZERO WIDTH NO-BREAK SPACE -->
+ <int>0xFFA0</int> <!-- HALFWIDTH HANGUL FILLER -->
+ <int>0xFFF9</int> <!-- INTERLINEAR ANNOTATION ANCHOR -->
+ <int>0xFFFA</int> <!-- INTERLINEAR ANNOTATION SEPARATOR -->
+ <int>0xFFFB</int> <!-- INTERLINEAR ANNOTATION TERMINATOR -->
+ </blank>
+<!--
+ Rescan configuration every 30 seconds when FcFontSetList is called
+ -->
+ <rescan>
+ <int>30</int>
+ </rescan>
+ </config>
+
+<!--
+ URW provides metric and shape compatible fonts for these 10 Adobe families.
+
+ However, these fonts are quite ugly and do not render well on-screen,
+ so we avoid matching them if the application said `anymetrics'; in that
+ case, a more generic font with different metrics but better appearance
+ will be used.
+ -->
+ <match target="pattern">
+ <test name="family">
+ <string>Avant Garde</string>
+ </test>
+ <test name="anymetrics" qual="all" compare="not_eq">
+ <bool>true</bool>
+ </test>
+ <edit name="family" mode="append">
+ <string>URW Gothic L</string>
+ </edit>
+ </match>
+ <match target="pattern">
+ <test name="family">
+ <string>Bookman</string>
+ </test>
+ <test name="anymetrics" qual="all" compare="not_eq">
+ <bool>true</bool>
+ </test>
+ <edit name="family" mode="append">
+ <string>URW Bookman L</string>
+ </edit>
+ </match>
+ <match target="pattern">
+ <test name="family">
+ <string>Courier</string>
+ </test>
+ <test name="anymetrics" qual="all" compare="not_eq">
+ <bool>true</bool>
+ </test>
+ <edit name="family" mode="append">
+ <string>Nimbus Mono L</string>
+ </edit>
+ </match>
+ <match target="pattern">
+ <test name="family">
+ <string>Helvetica</string>
+ </test>
+ <test name="anymetrics" qual="all" compare="not_eq">
+ <bool>true</bool>
+ </test>
+ <edit name="family" mode="append">
+ <string>Nimbus Sans L</string>
+ </edit>
+ </match>
+ <match target="pattern">
+ <test name="family">
+ <string>New Century Schoolbook</string>
+ </test>
+ <test name="anymetrics" qual="all" compare="not_eq">
+ <bool>true</bool>
+ </test>
+ <edit name="family" mode="append">
+ <string>Century Schoolbook L</string>
+ </edit>
+ </match>
+ <match target="pattern">
+ <test name="family">
+ <string>Palatino</string>
+ </test>
+ <test name="anymetrics" qual="all" compare="not_eq">
+ <bool>true</bool>
+ </test>
+ <edit name="family" mode="append">
+ <string>URW Palladio L</string>
+ </edit>
+ </match>
+ <match target="pattern">
+ <test name="family">
+ <string>Times</string>
+ </test>
+ <test name="anymetrics" qual="all" compare="not_eq">
+ <bool>true</bool>
+ </test>
+ <edit name="family" mode="append">
+ <string>Nimbus Roman No9 L</string>
+ </edit>
+ </match>
+ <match target="pattern">
+ <test name="family">
+ <string>Zapf Chancery</string>
+ </test>
+ <test name="anymetrics" qual="all" compare="not_eq">
+ <bool>true</bool>
+ </test>
+ <edit name="family" mode="append">
+ <string>URW Chancery L</string>
+ </edit>
+ </match>
+ <match target="pattern">
+ <test name="family">
+ <string>Zapf Dingbats</string>
+ </test>
+ <test name="anymetrics" qual="all" compare="not_eq">
+ <bool>true</bool>
+ </test>
+ <edit name="family" mode="append">
+ <string>Dingbats</string>
+ </edit>
+ </match>
+ <match target="pattern">
+ <test name="family">
+ <string>Symbol</string>
+ </test>
+ <test name="anymetrics" qual="all" compare="not_eq">
+ <bool>true</bool>
+ </test>
+ <edit name="family" mode="append" binding="same">
+ <string>Standard Symbols L</string>
+ </edit>
+ </match>
+
+<!--
+ Serif faces
+ -->
+ <alias>
+ <family>Nimbus Roman No9 L</family>
+ <default><family>serif</family></default>
+ </alias>
+<!--
+ Sans-serif faces
+ -->
+ <alias>
+ <family>Nimbus Sans L</family>
+ <default><family>sans-serif</family></default>
+ </alias>
+<!--
+ Monospace faces
+ -->
+ <alias>
+ <family>Nimbus Mono L</family>
+ <default><family>monospace</family></default>
+ </alias>
+
+
+</fontconfig>
diff --git a/WebKitTools/DumpRenderTree/qt/fonts/AHEM____.TTF b/WebKitTools/DumpRenderTree/qt/fonts/AHEM____.TTF
new file mode 100644
index 0000000..ac81cb0
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/qt/fonts/AHEM____.TTF
Binary files differ
diff --git a/WebKitTools/DumpRenderTree/qt/jsobjects.cpp b/WebKitTools/DumpRenderTree/qt/jsobjects.cpp
new file mode 100644
index 0000000..2b0f174
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/qt/jsobjects.cpp
@@ -0,0 +1,520 @@
+/*
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <jsobjects.h>
+#include <qwebpage.h>
+#include <qwebhistory.h>
+#include <qwebframe.h>
+#include <qevent.h>
+#include <qapplication.h>
+#include <qevent.h>
+#include <qtimer.h>
+
+#include "DumpRenderTree.h"
+#include "WorkQueueItem.h"
+#include "WorkQueue.h"
+extern void qt_dump_editing_callbacks(bool b);
+extern void qt_dump_resource_load_callbacks(bool b);
+extern void qt_drt_setJavaScriptProfilingEnabled(QWebFrame*, bool enabled);
+extern bool qt_drt_pauseAnimation(QWebFrame*, const QString &name, double time, const QString &elementId);
+extern bool qt_drt_pauseTransitionOfProperty(QWebFrame*, const QString &name, double time, const QString &elementId);
+extern int qt_drt_numberOfActiveAnimations(QWebFrame*);
+
+QWebFrame *findFrameNamed(const QString &frameName, QWebFrame *frame)
+{
+ if (frame->frameName() == frameName)
+ return frame;
+
+ foreach (QWebFrame *childFrame, frame->childFrames())
+ if (QWebFrame *f = findFrameNamed(frameName, childFrame))
+ return f;
+
+ return 0;
+}
+
+void LoadItem::invoke() const
+{
+ //qDebug() << ">>>LoadItem::invoke";
+ Q_ASSERT(m_webPage);
+
+ QWebFrame *frame = 0;
+ const QString t = target();
+ if (t.isEmpty())
+ frame = m_webPage->mainFrame();
+ else
+ frame = findFrameNamed(t, m_webPage->mainFrame());
+
+ if (!frame)
+ return;
+
+ frame->load(url());
+}
+
+void ReloadItem::invoke() const
+{
+ //qDebug() << ">>>ReloadItem::invoke";
+ Q_ASSERT(m_webPage);
+ m_webPage->triggerAction(QWebPage::Reload);
+}
+
+void ScriptItem::invoke() const
+{
+ //qDebug() << ">>>ScriptItem::invoke";
+ Q_ASSERT(m_webPage);
+ m_webPage->mainFrame()->evaluateJavaScript(script());
+}
+
+void BackForwardItem::invoke() const
+{
+ //qDebug() << ">>>BackForwardItem::invoke";
+ Q_ASSERT(m_webPage);
+ if (m_howFar > 0) {
+ for (int i = 0; i != m_howFar; ++i)
+ m_webPage->triggerAction(QWebPage::Forward);
+ } else {
+ for (int i = 0; i != m_howFar; --i)
+ m_webPage->triggerAction(QWebPage::Back);
+ }
+}
+
+LayoutTestController::LayoutTestController(WebCore::DumpRenderTree *drt)
+ : QObject()
+ , m_drt(drt)
+{
+ m_timeoutTimer = 0;
+ reset();
+}
+
+void LayoutTestController::reset()
+{
+ m_isLoading = true;
+ m_textDump = false;
+ m_dumpBackForwardList = false;
+ m_dumpChildrenAsText = false;
+ m_canOpenWindows = false;
+ m_waitForDone = false;
+ m_dumpTitleChanges = false;
+ if (m_timeoutTimer) {
+ killTimer(m_timeoutTimer);
+ m_timeoutTimer = 0;
+ }
+ m_topLoadingFrame = 0;
+ qt_dump_editing_callbacks(false);
+ qt_dump_resource_load_callbacks(false);
+}
+
+void LayoutTestController::processWork()
+{
+ qDebug() << ">>>processWork";
+
+ // quit doing work once a load is in progress
+ while (WorkQueue::shared()->count() > 0 && !m_topLoadingFrame) {
+ WorkQueueItem* item = WorkQueue::shared()->dequeue();
+ Q_ASSERT(item);
+ item->invoke();
+ delete item;
+ }
+
+ // if we didn't start a new load, then we finished all the commands, so we're ready to dump state
+ if (!m_topLoadingFrame && !shouldWaitUntilDone()) {
+ emit done();
+ m_isLoading = false;
+ }
+}
+
+void LayoutTestController::maybeDump(bool)
+{
+ m_topLoadingFrame = 0;
+ WorkQueue::shared()->setFrozen(true); // first complete load freezes the queue for the rest of this test
+
+ if (!shouldWaitUntilDone()) {
+ if (WorkQueue::shared()->count())
+ QTimer::singleShot(0, this, SLOT(processWork()));
+ else {
+ emit done();
+ m_isLoading = false;
+ }
+ }
+}
+
+void LayoutTestController::waitUntilDone()
+{
+ //qDebug() << ">>>>waitForDone";
+ m_waitForDone = true;
+ m_timeoutTimer = startTimer(11000);
+}
+
+void LayoutTestController::notifyDone()
+{
+ //qDebug() << ">>>>notifyDone";
+ if (!m_timeoutTimer)
+ return;
+ killTimer(m_timeoutTimer);
+ m_timeoutTimer = 0;
+ emit done();
+ m_isLoading = false;
+}
+
+int LayoutTestController::windowCount()
+{
+ return m_drt->windowCount();
+}
+
+void LayoutTestController::clearBackForwardList()
+{
+ m_drt->webPage()->history()->clear();
+}
+
+void LayoutTestController::dumpEditingCallbacks()
+{
+ qDebug() << ">>>dumpEditingCallbacks";
+ qt_dump_editing_callbacks(true);
+}
+
+void LayoutTestController::dumpResourceLoadCallbacks()
+{
+ qt_dump_resource_load_callbacks(true);
+}
+
+void LayoutTestController::queueBackNavigation(int howFarBackward)
+{
+ //qDebug() << ">>>queueBackNavigation" << howFarBackward;
+ WorkQueue::shared()->queue(new BackItem(howFarBackward, m_drt->webPage()));
+}
+
+void LayoutTestController::queueForwardNavigation(int howFarForward)
+{
+ //qDebug() << ">>>queueForwardNavigation" << howFarForward;
+ WorkQueue::shared()->queue(new ForwardItem(howFarForward, m_drt->webPage()));
+}
+
+void LayoutTestController::queueLoad(const QString &url, const QString &target)
+{
+ //qDebug() << ">>>queueLoad" << url << target;
+ QUrl mainResourceUrl = m_drt->webPage()->mainFrame()->url();
+ QString absoluteUrl = mainResourceUrl.resolved(QUrl(url)).toEncoded();
+ WorkQueue::shared()->queue(new LoadItem(absoluteUrl, target, m_drt->webPage()));
+}
+
+void LayoutTestController::queueReload()
+{
+ //qDebug() << ">>>queueReload";
+ WorkQueue::shared()->queue(new ReloadItem(m_drt->webPage()));
+}
+
+void LayoutTestController::queueScript(const QString &url)
+{
+ //qDebug() << ">>>queueScript" << url;
+ WorkQueue::shared()->queue(new ScriptItem(url, m_drt->webPage()));
+}
+
+void LayoutTestController::provisionalLoad()
+{
+ QWebFrame *frame = qobject_cast<QWebFrame*>(sender());
+ if (!m_topLoadingFrame && m_isLoading)
+ m_topLoadingFrame = frame;
+}
+
+void LayoutTestController::timerEvent(QTimerEvent *)
+{
+ qDebug() << ">>>>>>>>>>>>> timeout";
+ notifyDone();
+}
+
+QString LayoutTestController::encodeHostName(const QString &host)
+{
+ QString encoded = QString::fromLatin1(QUrl::toAce(host + QLatin1String(".no")));
+ encoded.truncate(encoded.length() - 3); // strip .no
+ return encoded;
+}
+
+QString LayoutTestController::decodeHostName(const QString &host)
+{
+ QString decoded = QUrl::fromAce(host.toLatin1() + QByteArray(".no"));
+ decoded.truncate(decoded.length() - 3);
+ return decoded;
+}
+
+void LayoutTestController::setJavaScriptProfilingEnabled(bool enable)
+{
+ m_topLoadingFrame->page()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
+ qt_drt_setJavaScriptProfilingEnabled(m_topLoadingFrame, enable);
+}
+
+void LayoutTestController::setFixedLayoutSize(int width, int height)
+{
+ m_topLoadingFrame->page()->setFixedLayoutSize(QSize(width, height));
+}
+
+
+void LayoutTestController::setUseFixedLayout(bool enable)
+{
+ m_topLoadingFrame->page()->setUseFixedLayout(enable);
+}
+
+bool LayoutTestController::pauseAnimationAtTimeOnElementWithId(const QString &animationName,
+ double time,
+ const QString &elementId)
+{
+ QWebFrame *frame = m_drt->webPage()->mainFrame();
+ Q_ASSERT(frame);
+ return qt_drt_pauseAnimation(frame, animationName, time, elementId);
+}
+
+bool LayoutTestController::pauseTransitionAtTimeOnElementWithId(const QString &propertyName,
+ double time,
+ const QString &elementId)
+{
+ QWebFrame *frame = m_drt->webPage()->mainFrame();
+ Q_ASSERT(frame);
+ return qt_drt_pauseTransitionOfProperty(frame, propertyName, time, elementId);
+}
+
+unsigned LayoutTestController::numberOfActiveAnimations() const
+{
+ QWebFrame *frame = m_drt->webPage()->mainFrame();
+ Q_ASSERT(frame);
+ return qt_drt_numberOfActiveAnimations(frame);
+}
+
+EventSender::EventSender(QWebPage *parent)
+ : QObject(parent)
+{
+ m_page = parent;
+}
+
+void EventSender::mouseDown()
+{
+// qDebug() << "EventSender::mouseDown" << frame;
+ QMouseEvent event(QEvent::MouseButtonPress, m_mousePos, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
+ QApplication::sendEvent(m_page, &event);
+}
+
+void EventSender::mouseUp()
+{
+// qDebug() << "EventSender::mouseUp" << frame;
+ QMouseEvent event(QEvent::MouseButtonRelease, m_mousePos, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
+ QApplication::sendEvent(m_page, &event);
+}
+
+void EventSender::mouseMoveTo(int x, int y)
+{
+// qDebug() << "EventSender::mouseMoveTo" << x << y;
+ m_mousePos = QPoint(x, y);
+ QMouseEvent event(QEvent::MouseMove, m_mousePos, Qt::NoButton, Qt::NoButton, Qt::NoModifier);
+ QApplication::sendEvent(m_page, &event);
+}
+
+void EventSender::leapForward(int ms)
+{
+ m_timeLeap += ms;
+ qDebug() << "EventSender::leapForward" << ms;
+}
+
+void EventSender::keyDown(const QString &string, const QStringList &modifiers)
+{
+ QString s = string;
+ Qt::KeyboardModifiers modifs = 0;
+ for (int i = 0; i < modifiers.size(); ++i) {
+ const QString &m = modifiers.at(i);
+ if (m == "ctrlKey")
+ modifs |= Qt::ControlModifier;
+ else if (m == "shiftKey")
+ modifs |= Qt::ShiftModifier;
+ else if (m == "altKey")
+ modifs |= Qt::AltModifier;
+ else if (m == "metaKey")
+ modifs |= Qt::MetaModifier;
+ }
+ int code = 0;
+ if (string.length() == 1) {
+ code = string.unicode()->unicode();
+ qDebug() << ">>>>>>>>> keyDown" << code << (char)code;
+ // map special keycodes used by the tests to something that works for Qt/X11
+ if (code == '\t') {
+ code = Qt::Key_Tab;
+ if (modifs == Qt::ShiftModifier)
+ code = Qt::Key_Backtab;
+ s = QString();
+ } else if (code == 127) {
+ code = Qt::Key_Backspace;
+ if (modifs == Qt::AltModifier)
+ modifs = Qt::ControlModifier;
+ s = QString();
+ } else if (code == 'o' && modifs == Qt::ControlModifier) {
+ s = QLatin1String("\n");
+ code = '\n';
+ modifs = 0;
+ } else if (code == 'y' && modifs == Qt::ControlModifier) {
+ s = QLatin1String("c");
+ code = 'c';
+ } else if (code == 'k' && modifs == Qt::ControlModifier) {
+ s = QLatin1String("x");
+ code = 'x';
+ } else if (code == 'a' && modifs == Qt::ControlModifier) {
+ s = QString();
+ code = Qt::Key_Home;
+ modifs = 0;
+ } else if (code == 0xf702) {
+ s = QString();
+ code = Qt::Key_Left;
+ if (modifs & Qt::MetaModifier) {
+ code = Qt::Key_Home;
+ modifs &= ~Qt::MetaModifier;
+ }
+ } else if (code == 0xf703) {
+ s = QString();
+ code = Qt::Key_Right;
+ if (modifs & Qt::MetaModifier) {
+ code = Qt::Key_End;
+ modifs &= ~Qt::MetaModifier;
+ }
+ } else if (code == 'a' && modifs == Qt::ControlModifier) {
+ s = QString();
+ code = Qt::Key_Home;
+ modifs = 0;
+ } else {
+ code = string.unicode()->toUpper().unicode();
+ }
+ }
+ QKeyEvent event(QEvent::KeyPress, code, modifs, s);
+ QApplication::sendEvent(m_page, &event);
+}
+
+QWebFrame *EventSender::frameUnderMouse() const
+{
+ QWebFrame *frame = m_page->mainFrame();
+
+redo:
+ QList<QWebFrame*> children = frame->childFrames();
+ for (int i = 0; i < children.size(); ++i) {
+ if (children.at(i)->geometry().contains(m_mousePos)) {
+ frame = children.at(i);
+ goto redo;
+ }
+ }
+ if (frame->geometry().contains(m_mousePos))
+ return frame;
+ return 0;
+}
+
+
+TextInputController::TextInputController(QWebPage *parent)
+ : QObject(parent)
+{
+}
+
+void TextInputController::doCommand(const QString &command)
+{
+ Qt::KeyboardModifiers modifiers = Qt::NoModifier;
+ int keycode = 0;
+ if (command == "moveBackwardAndModifySelection:") {
+ modifiers |= Qt::ShiftModifier;
+ keycode = Qt::Key_Left;
+ } else if(command =="moveDown:") {
+ keycode = Qt::Key_Down;
+ } else if(command =="moveDownAndModifySelection:") {
+ modifiers |= Qt::ShiftModifier;
+ keycode = Qt::Key_Down;
+ } else if(command =="moveForward:") {
+ keycode = Qt::Key_Right;
+ } else if(command =="moveForwardAndModifySelection:") {
+ modifiers |= Qt::ShiftModifier;
+ keycode = Qt::Key_Right;
+ } else if(command =="moveLeft:") {
+ keycode = Qt::Key_Left;
+ } else if(command =="moveLeftAndModifySelection:") {
+ modifiers |= Qt::ShiftModifier;
+ keycode = Qt::Key_Left;
+ } else if(command =="moveRight:") {
+ keycode = Qt::Key_Right;
+ } else if(command =="moveRightAndModifySelection:") {
+ modifiers |= Qt::ShiftModifier;
+ keycode = Qt::Key_Right;
+ } else if(command =="moveToBeginningOfDocument:") {
+ modifiers |= Qt::ControlModifier;
+ keycode = Qt::Key_Home;
+ } else if(command =="moveToBeginningOfLine:") {
+ keycode = Qt::Key_Home;
+// } else if(command =="moveToBeginningOfParagraph:") {
+ } else if(command =="moveToEndOfDocument:") {
+ modifiers |= Qt::ControlModifier;
+ keycode = Qt::Key_End;
+ } else if(command =="moveToEndOfLine:") {
+ keycode = Qt::Key_End;
+// } else if(command =="moveToEndOfParagraph:") {
+ } else if(command =="moveUp:") {
+ keycode = Qt::Key_Up;
+ } else if(command =="moveUpAndModifySelection:") {
+ modifiers |= Qt::ShiftModifier;
+ keycode = Qt::Key_Up;
+ } else if(command =="moveWordBackward:") {
+ modifiers |= Qt::ControlModifier;
+ keycode = Qt::Key_Up;
+ } else if(command =="moveWordBackwardAndModifySelection:") {
+ modifiers |= Qt::ShiftModifier;
+ modifiers |= Qt::ControlModifier;
+ keycode = Qt::Key_Left;
+ } else if(command =="moveWordForward:") {
+ modifiers |= Qt::ControlModifier;
+ keycode = Qt::Key_Right;
+ } else if(command =="moveWordForwardAndModifySelection:") {
+ modifiers |= Qt::ControlModifier;
+ modifiers |= Qt::ShiftModifier;
+ keycode = Qt::Key_Right;
+ } else if(command =="moveWordLeft:") {
+ modifiers |= Qt::ControlModifier;
+ keycode = Qt::Key_Left;
+ } else if(command =="moveWordRight:") {
+ modifiers |= Qt::ControlModifier;
+ keycode = Qt::Key_Left;
+ } else if(command =="moveWordRightAndModifySelection:") {
+ modifiers |= Qt::ShiftModifier;
+ modifiers |= Qt::ControlModifier;
+ keycode = Qt::Key_Right;
+ } else if(command =="moveWordLeftAndModifySelection:") {
+ modifiers |= Qt::ShiftModifier;
+ modifiers |= Qt::ControlModifier;
+ keycode = Qt::Key_Left;
+ } else if(command =="pageDown:") {
+ keycode = Qt::Key_PageDown;
+ } else if(command =="pageUp:") {
+ keycode = Qt::Key_PageUp;
+ } else if(command == "deleteWordBackward:") {
+ modifiers |= Qt::ControlModifier;
+ keycode = Qt::Key_Backspace;
+ } else if(command == "deleteBackward:") {
+ keycode = Qt::Key_Backspace;
+ } else if(command == "deleteForward:") {
+ keycode = Qt::Key_Delete;
+ }
+ QKeyEvent event(QEvent::KeyPress, keycode, modifiers);
+ QApplication::sendEvent(parent(), &event);
+ QKeyEvent event2(QEvent::KeyRelease, keycode, modifiers);
+ QApplication::sendEvent(parent(), &event2);
+}
diff --git a/WebKitTools/DumpRenderTree/qt/jsobjects.h b/WebKitTools/DumpRenderTree/qt/jsobjects.h
new file mode 100644
index 0000000..b136e8d
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/qt/jsobjects.h
@@ -0,0 +1,159 @@
+/*
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef JSOBJECTS_H
+#define JSOBJECTS_H
+
+#include <qobject.h>
+#include <qdebug.h>
+#include <qpoint.h>
+#include <qstringlist.h>
+#include <qsize.h>
+
+class QWebFrame;
+namespace WebCore {
+ class DumpRenderTree;
+}
+class LayoutTestController : public QObject
+{
+ Q_OBJECT
+public:
+ LayoutTestController(WebCore::DumpRenderTree *drt);
+
+ bool isLoading() const { return m_isLoading; }
+ void setLoading(bool loading) { m_isLoading = loading; }
+
+ bool shouldDumpAsText() const { return m_textDump; }
+ bool shouldDumpBackForwardList() const { return m_dumpBackForwardList; }
+ bool shouldDumpChildrenAsText() const { return m_dumpChildrenAsText; }
+ bool shouldWaitUntilDone() const { return m_waitForDone; }
+ bool canOpenWindows() const { return m_canOpenWindows; }
+ bool shouldDumpTitleChanges() const { return m_dumpTitleChanges; }
+
+ void reset();
+
+protected:
+ void timerEvent(QTimerEvent *);
+
+signals:
+ void done();
+
+public slots:
+ void maybeDump(bool ok);
+ void dumpAsText() { m_textDump = true; }
+ void dumpChildFramesAsText() { m_dumpChildrenAsText = true; }
+ void setCanOpenWindows() { m_canOpenWindows = true; }
+ void waitUntilDone();
+ void notifyDone();
+ void dumpBackForwardList() { m_dumpBackForwardList = true; }
+ void dumpEditingCallbacks();
+ void dumpResourceLoadCallbacks();
+ void queueBackNavigation(int howFarBackward);
+ void queueForwardNavigation(int howFarForward);
+ void queueLoad(const QString &url, const QString &target = QString());
+ void queueReload();
+ void queueScript(const QString &url);
+ void provisionalLoad();
+ void setCloseRemainingWindowsWhenComplete(bool=false) {}
+ int windowCount();
+ void display() {}
+ void clearBackForwardList();
+ void dumpTitleChanges() { m_dumpTitleChanges = true; }
+ QString encodeHostName(const QString &host);
+ QString decodeHostName(const QString &host);
+ void dumpSelectionRect() const {}
+ void setJavaScriptProfilingEnabled(bool enable);
+ void setFixedLayoutSize(int width, int height);
+ void setUseFixedLayout(bool enable);
+
+ bool pauseAnimationAtTimeOnElementWithId(const QString &animationName, double time, const QString &elementId);
+ bool pauseTransitionAtTimeOnElementWithId(const QString &propertyName, double time, const QString &elementId);
+ unsigned numberOfActiveAnimations() const;
+
+private slots:
+ void processWork();
+
+private:
+ bool m_isLoading;
+ bool m_textDump;
+ bool m_dumpBackForwardList;
+ bool m_dumpChildrenAsText;
+ bool m_canOpenWindows;
+ bool m_waitForDone;
+ bool m_dumpTitleChanges;
+ int m_timeoutTimer;
+ QWebFrame *m_topLoadingFrame;
+ WebCore::DumpRenderTree *m_drt;
+};
+
+class QWebPage;
+class QWebFrame;
+
+class EventSender : public QObject
+{
+ Q_OBJECT
+public:
+ EventSender(QWebPage *parent);
+
+public slots:
+ void mouseDown();
+ void mouseUp();
+ void mouseMoveTo(int x, int y);
+ void leapForward(int ms);
+ void keyDown(const QString &string, const QStringList &modifiers=QStringList());
+ void clearKillRing() {}
+
+private:
+ QPoint m_mousePos;
+ QWebPage *m_page;
+ int m_timeLeap;
+ QWebFrame *frameUnderMouse() const;
+};
+
+class TextInputController : public QObject
+{
+ Q_OBJECT
+public:
+ TextInputController(QWebPage *parent);
+
+public slots:
+ void doCommand(const QString &command);
+// void setMarkedText(const QString &str, int from, int length);
+// bool hasMarkedText();
+// void unmarkText();
+// QList<int> markedRange();
+// QList<int> selectedRange();
+// void validAttributesForMarkedText();
+// void inserText(const QString &);
+// void firstRectForCharacterRange();
+// void characterIndexForPoint(int, int);
+// void substringFromRange(int, int);
+// void conversationIdentifier();
+};
+
+#endif
diff --git a/WebKitTools/DumpRenderTree/qt/main.cpp b/WebKitTools/DumpRenderTree/qt/main.cpp
new file mode 100644
index 0000000..1674764
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/qt/main.cpp
@@ -0,0 +1,174 @@
+/*
+ * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "DumpRenderTree.h"
+
+#include <qstringlist.h>
+#include <qapplication.h>
+#include <qurl.h>
+#include <qdir.h>
+#include <qdebug.h>
+#include <qfont.h>
+
+#ifdef Q_WS_X11
+#include <qx11info_x11.h>
+#include <fontconfig/fontconfig.h>
+#endif
+
+#include <limits.h>
+#include <signal.h>
+
+#if defined(__GLIBC__)
+#include <execinfo.h>
+#endif
+
+void messageHandler(QtMsgType type, const char *message)
+{
+ if (type == QtCriticalMsg) {
+ fprintf(stderr, "%s\n", message);
+ return;
+ }
+ // do nothing
+}
+
+QString get_backtrace() {
+ QString s;
+
+#if defined(__GLIBC__)
+ void* array[256];
+ size_t size; /* number of stack frames */
+
+ size = backtrace(array, 256);
+
+ if (!size)
+ return s;
+
+ char** strings = backtrace_symbols(array, size);
+ for (int i = 0; i < int(size); ++i) {
+ s += QString::number(i) +
+ QLatin1String(": ") +
+ QLatin1String(strings[i]) + QLatin1String("\n");
+ }
+
+ if (strings)
+ free (strings);
+#endif
+
+ return s;
+}
+
+static void crashHandler(int sig)
+{
+ fprintf(stderr, "%s\n", strsignal(sig));
+ fprintf(stderr, "%s\n", get_backtrace().toLatin1().constData());
+ exit(128 + sig);
+}
+
+int main(int argc, char* argv[])
+{
+#ifdef Q_WS_X11
+ FcInit();
+ FcConfig *config = FcConfigCreate();
+ QByteArray fontDir = getenv("WEBKIT_TESTFONTS");
+ if (fontDir.isEmpty() || !QDir(fontDir).exists()) {
+ fprintf(stderr,
+ "\n\n"
+ "--------------------------------------------------------------------\n"
+ "WEBKIT_TESTFONTS environment variable is not set correctly.\n"
+ "This variable has to point to the directory containing the fonts\n"
+ "you can checkout from svn://labs.trolltech.com/svn/webkit/testfonts\n"
+ "--------------------------------------------------------------------\n"
+);
+ exit(1);
+ }
+ char currentPath[PATH_MAX+1];
+ getcwd(currentPath, PATH_MAX);
+ QByteArray configFile = currentPath;
+ configFile += "/WebKitTools/DumpRenderTree/qt/fonts.conf";
+ if (!FcConfigParseAndLoad (config, (FcChar8*) configFile.data(), true))
+ qFatal("Couldn't load font configuration file");
+ if (!FcConfigAppFontAddDir (config, (FcChar8*) fontDir.data()))
+ qFatal("Couldn't add font dir!");
+ FcConfigSetCurrent(config);
+#endif
+ QApplication app(argc, argv);
+#ifdef Q_WS_X11
+ QX11Info::setAppDpiY(0, 96);
+ QX11Info::setAppDpiX(0, 96);
+#endif
+
+ QFont f("Sans Serif");
+ f.setPointSize(9);
+ f.setWeight(QFont::Normal);
+ f.setStyle(QFont::StyleNormal);
+ app.setFont(f);
+ app.setStyle(QLatin1String("Plastique"));
+
+
+ signal(SIGILL, crashHandler); /* 4: illegal instruction (not reset when caught) */
+ signal(SIGTRAP, crashHandler); /* 5: trace trap (not reset when caught) */
+ signal(SIGFPE, crashHandler); /* 8: floating point exception */
+ signal(SIGBUS, crashHandler); /* 10: bus error */
+ signal(SIGSEGV, crashHandler); /* 11: segmentation violation */
+ signal(SIGSYS, crashHandler); /* 12: bad argument to system call */
+ signal(SIGPIPE, crashHandler); /* 13: write on a pipe with no reader */
+ signal(SIGXCPU, crashHandler); /* 24: exceeded CPU time limit */
+ signal(SIGXFSZ, crashHandler); /* 25: exceeded file size limit */
+
+ QStringList args = app.arguments();
+ if (args.count() < 2) {
+ qDebug() << "Usage: DumpRenderTree [-v] filename";
+ exit(0);
+ }
+
+ // supress debug output from Qt if not started with -v
+ if (!args.contains(QLatin1String("-v")))
+ qInstallMsgHandler(messageHandler);
+
+ WebCore::DumpRenderTree dumper;
+
+ if (args.last() == QLatin1String("-")) {
+ dumper.open();
+ } else {
+ if (!args.last().startsWith("/")
+ && !args.last().startsWith("file:")
+ && !args.last().startsWith("http:")
+ && !args.last().startsWith("https:")) {
+ QString path = QDir::currentPath();
+ if (!path.endsWith('/'))
+ path.append('/');
+ args.last().prepend(path);
+ }
+ dumper.open(QUrl(args.last()));
+ }
+ return app.exec();
+#ifdef Q_WS_X11
+ FcConfigSetCurrent(0);
+#endif
+}
diff --git a/WebKitTools/DumpRenderTree/qt/testplugin.cpp b/WebKitTools/DumpRenderTree/qt/testplugin.cpp
new file mode 100644
index 0000000..d5b8bc7
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/qt/testplugin.cpp
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "testplugin.h"
+
+TestPlugin::TestPlugin(QObject *parent)
+ : QWebPluginFactory(parent)
+{
+}
+
+TestPlugin::~TestPlugin()
+{
+}
+
+QList<QWebPluginFactory::Plugin> TestPlugin::plugins() const
+{
+ QWebPluginFactory::Plugin plugin;
+
+ plugin.name = "testplugin";
+ plugin.description = "testdescription";
+ MimeType mimeType;
+ mimeType.name = "testtype";
+ mimeType.fileExtensions.append("testsuffixes");
+ plugin.mimeTypes.append(mimeType);
+
+ plugin.name = "testplugin2";
+ plugin.description = "testdescription2";
+ mimeType.name = "testtype2";
+ mimeType.fileExtensions.append("testsuffixes2");
+ mimeType.fileExtensions.append("testsuffixes3");
+ plugin.mimeTypes.append(mimeType);
+
+ return QList<QWebPluginFactory::Plugin>() << plugin;
+}
+
+QObject *TestPlugin::create(const QString&,
+ const QUrl&,
+ const QStringList&,
+ const QStringList&) const
+{
+ return 0;
+}
+
diff --git a/WebKitTools/DumpRenderTree/qt/testplugin.h b/WebKitTools/DumpRenderTree/qt/testplugin.h
new file mode 100644
index 0000000..3d8a28c
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/qt/testplugin.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <qwebpluginfactory.h>
+
+
+class TestPlugin : public QWebPluginFactory
+{
+public:
+ explicit TestPlugin(QObject *parent = 0);
+ virtual ~TestPlugin();
+
+ virtual QList<Plugin> plugins() const;
+
+ virtual QObject *create(const QString &mimeType,
+ const QUrl &url,
+ const QStringList &argumentNames,
+ const QStringList &argumentValues) const;
+
+};
+
diff --git a/WebKitTools/DumpRenderTree/win/AccessibilityControllerWin.cpp b/WebKitTools/DumpRenderTree/win/AccessibilityControllerWin.cpp
new file mode 100644
index 0000000..b6e45f2
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/AccessibilityControllerWin.cpp
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2008 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. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "AccessibilityController.h"
+
+#include "AccessibilityUIElement.h"
+#include "DumpRenderTree.h"
+#include <JavaScriptCore/Assertions.h>
+#include <WebCore/COMPtr.h>
+#include <WebKit/WebKit.h>
+#include <oleacc.h>
+
+AccessibilityController::AccessibilityController()
+{
+}
+
+AccessibilityController::~AccessibilityController()
+{
+}
+
+AccessibilityUIElement AccessibilityController::focusedElement()
+{
+ COMPtr<IAccessible> rootAccessible = rootElement().platformUIElement();
+
+ VARIANT vFocus;
+ if (FAILED(rootAccessible->get_accFocus(&vFocus)))
+ return 0;
+
+ if (V_VT(&vFocus) == VT_I4) {
+ ASSERT(V_I4(&vFocus) == CHILDID_SELF);
+ // The root accessible object is the focused object.
+ return rootAccessible;
+ }
+
+ ASSERT(V_VT(&vFocus) == VT_DISPATCH);
+ // We have an IDispatch; query for IAccessible.
+ return COMPtr<IAccessible>(Query, V_DISPATCH(&vFocus));
+}
+
+AccessibilityUIElement AccessibilityController::rootElement()
+{
+ COMPtr<IWebView> view;
+ if (FAILED(frame->webView(&view)))
+ return 0;
+
+ COMPtr<IWebViewPrivate> viewPrivate(Query, view);
+ if (!viewPrivate)
+ return 0;
+
+ HWND webViewWindow;
+ if (FAILED(viewPrivate->viewWindow((OLE_HANDLE*)&webViewWindow)))
+ return 0;
+
+ // Get the root accessible object by querying for the accessible object for the
+ // WebView's window.
+ COMPtr<IAccessible> rootAccessible;
+ if (FAILED(AccessibleObjectFromWindow(webViewWindow, static_cast<DWORD>(OBJID_CLIENT), __uuidof(IAccessible), reinterpret_cast<void**>(&rootAccessible))))
+ return 0;
+
+ return rootAccessible;
+}
diff --git a/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp b/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
new file mode 100644
index 0000000..952ce5d
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
@@ -0,0 +1,293 @@
+/*
+ * Copyright (C) 2008 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. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "AccessibilityUIElement.h"
+
+#include <JavaScriptCore/JSStringRef.h>
+#include <tchar.h>
+#include <string>
+
+using std::wstring;
+
+AccessibilityUIElement::AccessibilityUIElement(PlatformUIElement element)
+ : m_element(element)
+{
+}
+
+AccessibilityUIElement::AccessibilityUIElement(const AccessibilityUIElement& other)
+ : m_element(other.m_element)
+{
+}
+
+AccessibilityUIElement::~AccessibilityUIElement()
+{
+}
+
+void AccessibilityUIElement::getLinkedUIElements(Vector<AccessibilityUIElement>&)
+{
+}
+
+void AccessibilityUIElement::getDocumentLinks(Vector<AccessibilityUIElement>&)
+{
+}
+
+void AccessibilityUIElement::getChildren(Vector<AccessibilityUIElement>& children)
+{
+ long childCount;
+ if (FAILED(m_element->get_accChildCount(&childCount)))
+ return;
+ for (long i = 0; i < childCount; ++i)
+ children.append(getChildAtIndex(i));
+}
+
+void AccessibilityUIElement::getChildrenWithRange(Vector<AccessibilityUIElement>& elementVector, unsigned location, unsigned length)
+{
+ long childCount;
+ unsigned appendedCount = 0;
+ if (FAILED(m_element->get_accChildCount(&childCount)))
+ return;
+ for (long i = location; i < childCount && appendedCount < length; ++i, ++appendedCount)
+ elementVector.append(getChildAtIndex(i));
+}
+
+AccessibilityUIElement AccessibilityUIElement::getChildAtIndex(unsigned index)
+{
+ COMPtr<IDispatch> child;
+ VARIANT vChild;
+ ::VariantInit(&vChild);
+ V_VT(&vChild) = VT_I4;
+ // In MSAA, index 0 is the object itself.
+ V_I4(&vChild) = index + 1;
+ if (FAILED(m_element->get_accChild(vChild, &child)))
+ return 0;
+ return COMPtr<IAccessible>(Query, child);
+}
+
+JSStringRef AccessibilityUIElement::allAttributes()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfLinkedUIElements()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfDocumentLinks()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+AccessibilityUIElement AccessibilityUIElement::titleUIElement()
+{
+ return 0;
+}
+
+AccessibilityUIElement AccessibilityUIElement::parentElement()
+{
+ return 0;
+}
+
+JSStringRef AccessibilityUIElement::attributesOfChildren()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::parameterizedAttributeNames()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+static VARIANT& self()
+{
+ static VARIANT vSelf;
+ static bool haveInitialized;
+
+ if (!haveInitialized) {
+ ::VariantInit(&vSelf);
+ V_VT(&vSelf) = VT_I4;
+ V_I4(&vSelf) = CHILDID_SELF;
+ }
+ return vSelf;
+}
+
+JSStringRef AccessibilityUIElement::role()
+{
+ VARIANT vRole;
+ if (FAILED(m_element->get_accRole(self(), &vRole)))
+ return JSStringCreateWithCharacters(0, 0);
+ ASSERT(V_VT(&vRole) == VT_I4);
+ TCHAR roleText[64] = {0};
+ ::GetRoleText(V_I4(&vRole), roleText, ARRAYSIZE(roleText));
+ return JSStringCreateWithCharacters(roleText, _tcslen(roleText));
+}
+
+JSStringRef AccessibilityUIElement::title()
+{
+ BSTR titleBSTR;
+ if (FAILED(m_element->get_accName(self(), &titleBSTR)) || !titleBSTR)
+ return JSStringCreateWithCharacters(0, 0);
+ wstring title(titleBSTR, SysStringLen(titleBSTR));
+ ::SysFreeString(titleBSTR);
+ return JSStringCreateWithCharacters(title.data(), title.length());
+}
+
+JSStringRef AccessibilityUIElement::description()
+{
+ BSTR descriptionBSTR;
+ if (FAILED(m_element->get_accName(self(), &descriptionBSTR)) || !descriptionBSTR)
+ return JSStringCreateWithCharacters(0, 0);
+ wstring description(descriptionBSTR, SysStringLen(descriptionBSTR));
+ ::SysFreeString(descriptionBSTR);
+ return JSStringCreateWithCharacters(description.data(), description.length());
+}
+
+double AccessibilityUIElement::width()
+{
+ long x, y, width, height;
+ if (FAILED(m_element->accLocation(&x, &y, &width, &height, self())))
+ return 0;
+ return width;
+}
+
+double AccessibilityUIElement::height()
+{
+ long x, y, width, height;
+ if (FAILED(m_element->accLocation(&x, &y, &width, &height, self())))
+ return 0;
+ return height;
+}
+
+double AccessibilityUIElement::intValue()
+{
+ BSTR valueBSTR;
+ if (FAILED(m_element->get_accValue(self(), &valueBSTR)) || !valueBSTR)
+ return 0;
+ wstring value(valueBSTR, SysStringLen(valueBSTR));
+ ::SysFreeString(valueBSTR);
+ TCHAR* ignored;
+ return _tcstod(value.data(), &ignored);
+}
+
+double AccessibilityUIElement::minValue()
+{
+ return 0;
+}
+
+double AccessibilityUIElement::maxValue()
+{
+ return 0;
+}
+
+bool AccessibilityUIElement::supportsPressAction()
+{
+ return false;
+}
+
+int AccessibilityUIElement::insertionPointLineNumber()
+{
+ return 0;
+}
+
+JSStringRef AccessibilityUIElement::attributesOfColumnHeaders()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfRowHeaders()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfColumns()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfRows()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfVisibleCells()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfHeader()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+int AccessibilityUIElement::indexInTable()
+{
+ return 0;
+}
+
+JSStringRef AccessibilityUIElement::rowIndexRange()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::columnIndexRange()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+int AccessibilityUIElement::lineForIndex(int)
+{
+ return 0;
+}
+
+JSStringRef AccessibilityUIElement::boundsForRange(unsigned location, unsigned length)
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+AccessibilityUIElement AccessibilityUIElement::cellForColumnAndRow(unsigned column, unsigned row)
+{
+ return 0;
+}
+
+JSStringRef AccessibilityUIElement::selectedTextRange()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+void AccessibilityUIElement::setSelectedTextRange(unsigned location, unsigned length)
+{
+}
+
+JSStringRef AccessibilityUIElement::attributeValue(JSStringRef attribute)
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+bool AccessibilityUIElement::isAttributeSettable(JSStringRef attribute)
+{
+ return false;
+}
+
diff --git a/WebKitTools/DumpRenderTree/win/DraggingInfo.h b/WebKitTools/DumpRenderTree/win/DraggingInfo.h
new file mode 100644
index 0000000..2ead457
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/DraggingInfo.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DraggingInfo_h
+#define DraggingInfo_h
+
+#include <objidl.h>
+
+class DraggingInfo {
+public:
+ DraggingInfo(IDataObject* object, IDropSource* source)
+ : m_object(object)
+ , m_source(source)
+ {
+ m_object->AddRef();
+ m_source->AddRef();
+ }
+
+ ~DraggingInfo()
+ {
+ if (m_object)
+ m_object->Release();
+ m_object = 0;
+ if (m_source)
+ m_source->Release();
+ m_source = 0;
+ }
+
+ IDataObject* dataObject() const { return m_object; }
+ IDropSource* dropSource() const { return m_source; }
+
+private:
+ IDataObject* m_object;
+ IDropSource* m_source;
+};
+
+#endif // !defined(DraggingInfo_h)
diff --git a/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp
new file mode 100644
index 0000000..28a0336
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp
@@ -0,0 +1,1140 @@
+/*
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "DumpRenderTree.h"
+
+#include "EditingDelegate.h"
+#include "FrameLoadDelegate.h"
+#include "LayoutTestController.h"
+#include "PixelDumpSupport.h"
+#include "PolicyDelegate.h"
+#include "ResourceLoadDelegate.h"
+#include "UIDelegate.h"
+#include "WorkQueueItem.h"
+#include "WorkQueue.h"
+
+#include <fcntl.h>
+#include <io.h>
+#include <math.h>
+#include <pthread.h>
+#include <shlwapi.h>
+#include <stdio.h>
+#include <string.h>
+#include <tchar.h>
+#include <wtf/RetainPtr.h>
+#include <wtf/Vector.h>
+#include <windows.h>
+#include <CFNetwork/CFURLCachePriv.h>
+#include <CoreFoundation/CoreFoundation.h>
+#include <JavaScriptCore/JavaScriptCore.h>
+#include <WebKit/ForEachCoClass.h>
+#include <WebKit/WebKit.h>
+
+using namespace std;
+
+#ifndef NDEBUG
+const LPWSTR TestPluginDir = L"TestNetscapePlugin_Debug";
+#else
+const LPWSTR TestPluginDir = L"TestNetscapePlugin";
+#endif
+
+static LPCWSTR fontsEnvironmentVariable = L"WEBKIT_TESTFONTS";
+#define USE_MAC_FONTS
+
+const LPCWSTR kDumpRenderTreeClassName = L"DumpRenderTreeWindow";
+
+static bool dumpTree = true;
+static bool dumpPixels;
+static bool dumpAllPixels;
+static bool printSeparators;
+static bool leakChecking = false;
+static bool threaded = false;
+static bool forceComplexText = false;
+static RetainPtr<CFStringRef> persistentUserStyleSheetLocation;
+
+volatile bool done;
+// This is the topmost frame that is loading, during a given load, or nil when no load is
+// in progress. Usually this is the same as the main frame, but not always. In the case
+// where a frameset is loaded, and then new content is loaded into one of the child frames,
+// that child frame is the "topmost frame that is loading".
+IWebFrame* topLoadingFrame; // !nil iff a load is in progress
+static COMPtr<IWebHistoryItem> prevTestBFItem; // current b/f item at the end of the previous test
+PolicyDelegate* policyDelegate;
+COMPtr<FrameLoadDelegate> sharedFrameLoadDelegate;
+COMPtr<UIDelegate> sharedUIDelegate;
+COMPtr<EditingDelegate> sharedEditingDelegate;
+COMPtr<ResourceLoadDelegate> sharedResourceLoadDelegate;
+
+IWebFrame* frame;
+HWND webViewWindow;
+
+LayoutTestController* gLayoutTestController = 0;
+
+UINT_PTR waitToDumpWatchdog = 0;
+
+const unsigned maxViewWidth = 800;
+const unsigned maxViewHeight = 600;
+
+void setPersistentUserStyleSheetLocation(CFStringRef url)
+{
+ persistentUserStyleSheetLocation = url;
+}
+
+wstring urlSuitableForTestResult(const wstring& url)
+{
+ if (!url.c_str() || url.find(L"file://") == wstring::npos)
+ return url;
+
+ return PathFindFileNameW(url.c_str());
+}
+
+static LRESULT CALLBACK DumpRenderTreeWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ switch (msg) {
+ case WM_DESTROY:
+ for (unsigned i = openWindows().size() - 1; i >= 0; --i) {
+ if (openWindows()[i] == hWnd) {
+ openWindows().remove(i);
+ windowToWebViewMap().remove(hWnd);
+ break;
+ }
+ }
+ return 0;
+ break;
+ default:
+ return DefWindowProc(hWnd, msg, wParam, lParam);
+ }
+}
+
+static const wstring& exePath()
+{
+ static wstring path;
+ static bool initialized;
+
+ if (initialized)
+ return path;
+ initialized = true;
+
+ TCHAR buffer[MAX_PATH];
+ GetModuleFileName(GetModuleHandle(0), buffer, ARRAYSIZE(buffer));
+ path = buffer;
+ int lastSlash = path.rfind('\\');
+ if (lastSlash != -1 && lastSlash + 1 < path.length())
+ path = path.substr(0, lastSlash + 1);
+
+ return path;
+}
+
+static const wstring& fontsPath()
+{
+ static wstring path;
+ static bool initialized;
+
+ if (initialized)
+ return path;
+ initialized = true;
+
+ DWORD size = GetEnvironmentVariable(fontsEnvironmentVariable, 0, 0);
+ Vector<TCHAR> buffer(size);
+ if (GetEnvironmentVariable(fontsEnvironmentVariable, buffer.data(), buffer.size())) {
+ path = buffer.data();
+ if (path[path.length() - 1] != '\\')
+ path.append(L"\\");
+ return path;
+ }
+
+ path = exePath() + TEXT("DumpRenderTree.resources\\");
+ return path;
+}
+
+#ifdef DEBUG_WEBKIT_HAS_SUFFIX
+#define WEBKITDLL TEXT("WebKit_debug.dll")
+#else
+#define WEBKITDLL TEXT("WebKit.dll")
+#endif
+
+static void initialize()
+{
+ if (HMODULE webKitModule = LoadLibrary(WEBKITDLL))
+ if (FARPROC dllRegisterServer = GetProcAddress(webKitModule, "DllRegisterServer"))
+ dllRegisterServer();
+
+ // Init COM
+ OleInitialize(0);
+
+ static LPCTSTR fontsToInstall[] = {
+ TEXT("AHEM____.ttf"),
+ TEXT("Apple Chancery.ttf"),
+ TEXT("Courier Bold.ttf"),
+ TEXT("Courier.ttf"),
+ TEXT("Helvetica Bold Oblique.ttf"),
+ TEXT("Helvetica Bold.ttf"),
+ TEXT("Helvetica Oblique.ttf"),
+ TEXT("Helvetica.ttf"),
+ TEXT("Helvetica Neue Bold Italic.ttf"),
+ TEXT("Helvetica Neue Bold.ttf"),
+ TEXT("Helvetica Neue Condensed Black.ttf"),
+ TEXT("Helvetica Neue Condensed Bold.ttf"),
+ TEXT("Helvetica Neue Italic.ttf"),
+ TEXT("Helvetica Neue Light Italic.ttf"),
+ TEXT("Helvetica Neue Light.ttf"),
+ TEXT("Helvetica Neue UltraLight Italic.ttf"),
+ TEXT("Helvetica Neue UltraLight.ttf"),
+ TEXT("Helvetica Neue.ttf"),
+ TEXT("Lucida Grande.ttf"),
+ TEXT("Lucida Grande Bold.ttf"),
+ TEXT("Monaco.ttf"),
+ TEXT("Papyrus.ttf"),
+ TEXT("Times Bold Italic.ttf"),
+ TEXT("Times Bold.ttf"),
+ TEXT("Times Italic.ttf"),
+ TEXT("Times Roman.ttf"),
+ TEXT("WebKit Layout Tests.ttf"),
+ TEXT("WebKitWeightWatcher100.ttf"),
+ TEXT("WebKitWeightWatcher200.ttf"),
+ TEXT("WebKitWeightWatcher300.ttf"),
+ TEXT("WebKitWeightWatcher400.ttf"),
+ TEXT("WebKitWeightWatcher500.ttf"),
+ TEXT("WebKitWeightWatcher600.ttf"),
+ TEXT("WebKitWeightWatcher700.ttf"),
+ TEXT("WebKitWeightWatcher800.ttf"),
+ TEXT("WebKitWeightWatcher900.ttf")
+ };
+
+ wstring resourcesPath = fontsPath();
+
+ COMPtr<IWebTextRenderer> textRenderer;
+ if (SUCCEEDED(CoCreateInstance(CLSID_WebTextRenderer, 0, CLSCTX_ALL, IID_IWebTextRenderer, (void**)&textRenderer)))
+ for (int i = 0; i < ARRAYSIZE(fontsToInstall); ++i)
+ textRenderer->registerPrivateFont(wstring(resourcesPath + fontsToInstall[i]).c_str());
+
+ // Register a host window
+ WNDCLASSEX wcex;
+
+ wcex.cbSize = sizeof(WNDCLASSEX);
+
+ wcex.style = CS_HREDRAW | CS_VREDRAW;
+ wcex.lpfnWndProc = DumpRenderTreeWndProc;
+ wcex.cbClsExtra = 0;
+ wcex.cbWndExtra = 0;
+ wcex.hInstance = GetModuleHandle(0);
+ wcex.hIcon = 0;
+ wcex.hCursor = LoadCursor(0, IDC_ARROW);
+ wcex.hbrBackground = 0;
+ wcex.lpszMenuName = 0;
+ wcex.lpszClassName = kDumpRenderTreeClassName;
+ wcex.hIconSm = 0;
+
+ RegisterClassEx(&wcex);
+}
+
+void displayWebView()
+{
+ ::InvalidateRect(webViewWindow, 0, TRUE);
+ ::UpdateWindow(webViewWindow);
+}
+
+void dumpFrameScrollPosition(IWebFrame* frame)
+{
+ if (!frame)
+ return;
+
+ COMPtr<IWebFramePrivate> framePrivate;
+ if (FAILED(frame->QueryInterface(&framePrivate)))
+ return;
+
+ SIZE scrollPosition;
+ if (FAILED(framePrivate->scrollOffset(&scrollPosition)))
+ return;
+
+ if (abs(scrollPosition.cx) > 0.00000001 || abs(scrollPosition.cy) > 0.00000001) {
+ COMPtr<IWebFrame> parent;
+ if (FAILED(frame->parentFrame(&parent)))
+ return;
+ if (parent) {
+ BSTR name;
+ if (FAILED(frame->name(&name)))
+ return;
+ printf("frame '%S' ", name ? name : L"");
+ SysFreeString(name);
+ }
+ printf("scrolled to %.f,%.f\n", (double)scrollPosition.cx, (double)scrollPosition.cy);
+ }
+
+ if (::gLayoutTestController->dumpChildFrameScrollPositions()) {
+ COMPtr<IEnumVARIANT> enumKids;
+ if (FAILED(frame->childFrames(&enumKids)))
+ return;
+ VARIANT var;
+ VariantInit(&var);
+ while (enumKids->Next(1, &var, 0) == S_OK) {
+ ASSERT(V_VT(&var) == VT_UNKNOWN);
+ COMPtr<IWebFrame> framePtr;
+ V_UNKNOWN(&var)->QueryInterface(IID_IWebFrame, (void**)&framePtr);
+ dumpFrameScrollPosition(framePtr.get());
+ VariantClear(&var);
+ }
+ }
+}
+
+static wstring dumpFramesAsText(IWebFrame* frame)
+{
+ if (!frame)
+ return L"";
+
+ COMPtr<IDOMDocument> document;
+ if (FAILED(frame->DOMDocument(&document)))
+ return L"";
+
+ COMPtr<IDOMElement> documentElement;
+ if (FAILED(document->documentElement(&documentElement)))
+ return L"";
+
+ wstring result;
+
+ // Add header for all but the main frame.
+ COMPtr<IWebFrame> parent;
+ if (FAILED(frame->parentFrame(&parent)))
+ return L"";
+ if (parent) {
+ BSTR name = L"";
+ if (FAILED(frame->name(&name)))
+ return L"";
+
+ result.append(L"\n--------\nFrame: '");
+ result.append(name ? name : L"", SysStringLen(name));
+ result.append(L"'\n--------\n");
+
+ SysFreeString(name);
+ }
+
+ BSTR innerText = 0;
+ COMPtr<IDOMElementPrivate> docPrivate;
+ if (SUCCEEDED(documentElement->QueryInterface(&docPrivate)))
+ docPrivate->innerText(&innerText);
+
+ result.append(innerText ? innerText : L"", SysStringLen(innerText));
+ result.append(L"\n");
+
+ SysFreeString(innerText);
+
+ if (::gLayoutTestController->dumpChildFramesAsText()) {
+ COMPtr<IEnumVARIANT> enumKids;
+ if (FAILED(frame->childFrames(&enumKids)))
+ return L"";
+ VARIANT var;
+ VariantInit(&var);
+ while (enumKids->Next(1, &var, 0) == S_OK) {
+ ASSERT(V_VT(&var) == VT_UNKNOWN);
+ COMPtr<IWebFrame> framePtr;
+ V_UNKNOWN(&var)->QueryInterface(IID_IWebFrame, (void**)&framePtr);
+ result.append(dumpFramesAsText(framePtr.get()));
+ VariantClear(&var);
+ }
+ }
+
+ return result;
+}
+
+static int compareHistoryItems(const void* item1, const void* item2)
+{
+ COMPtr<IWebHistoryItemPrivate> itemA;
+ if (FAILED((*(COMPtr<IUnknown>*)item1)->QueryInterface(&itemA)))
+ return 0;
+
+ COMPtr<IWebHistoryItemPrivate> itemB;
+ if (FAILED((*(COMPtr<IUnknown>*)item2)->QueryInterface(&itemB)))
+ return 0;
+
+ BSTR targetA;
+ if (FAILED(itemA->target(&targetA)))
+ return 0;
+
+ BSTR targetB;
+ if (FAILED(itemB->target(&targetB))) {
+ SysFreeString(targetA);
+ return 0;
+ }
+
+ int result = wcsicmp(wstring(targetA, SysStringLen(targetA)).c_str(), wstring(targetB, SysStringLen(targetB)).c_str());
+ SysFreeString(targetA);
+ SysFreeString(targetB);
+ return result;
+}
+
+static void dumpHistoryItem(IWebHistoryItem* item, int indent, bool current)
+{
+ assert(item);
+
+ int start = 0;
+ if (current) {
+ printf("curr->");
+ start = 6;
+ }
+ for (int i = start; i < indent; i++)
+ putchar(' ');
+
+ BSTR url;
+ if (FAILED(item->URLString(&url)))
+ return;
+ printf("%S", url ? url : L"");
+ SysFreeString(url);
+
+ COMPtr<IWebHistoryItemPrivate> itemPrivate;
+ if (FAILED(item->QueryInterface(&itemPrivate)))
+ return;
+
+ BSTR target;
+ if (FAILED(itemPrivate->target(&target)))
+ return;
+ if (SysStringLen(target))
+ printf(" (in frame \"%S\")", target);
+ SysFreeString(target);
+ BOOL isTargetItem = FALSE;
+ if (FAILED(itemPrivate->isTargetItem(&isTargetItem)))
+ return;
+ if (isTargetItem)
+ printf(" **nav target**");
+ putchar('\n');
+
+ unsigned kidsCount;
+ SAFEARRAY* arrPtr;
+ if (FAILED(itemPrivate->children(&kidsCount, &arrPtr)) || !kidsCount)
+ return;
+
+ Vector<COMPtr<IUnknown> > kidsVector;
+
+ LONG lowerBound;
+ if (FAILED(::SafeArrayGetLBound(arrPtr, 1, &lowerBound)))
+ goto exit;
+
+ LONG upperBound;
+ if (FAILED(::SafeArrayGetUBound(arrPtr, 1, &upperBound)))
+ goto exit;
+
+ LONG length = upperBound - lowerBound + 1;
+ if (!length)
+ goto exit;
+ ASSERT(length == kidsCount);
+
+ IUnknown** safeArrayData;
+ if (FAILED(::SafeArrayAccessData(arrPtr, (void**)&safeArrayData)))
+ goto exit;
+
+ for (int i = 0; i < length; ++i)
+ kidsVector.append(safeArrayData[i]);
+ ::SafeArrayUnaccessData(arrPtr);
+
+ // must sort to eliminate arbitrary result ordering which defeats reproducible testing
+ qsort(kidsVector.data(), kidsCount, sizeof(kidsVector[0]), compareHistoryItems);
+
+ for (unsigned i = 0; i < kidsCount; ++i) {
+ COMPtr<IWebHistoryItem> item;
+ kidsVector[i]->QueryInterface(&item);
+ dumpHistoryItem(item.get(), indent + 4, false);
+ }
+
+exit:
+ if (arrPtr && SUCCEEDED(::SafeArrayUnlock(arrPtr)))
+ ::SafeArrayDestroy(arrPtr);
+}
+
+static void dumpBackForwardList(IWebView* webView)
+{
+ ASSERT(webView);
+
+ printf("\n============== Back Forward List ==============\n");
+
+ COMPtr<IWebBackForwardList> bfList;
+ if (FAILED(webView->backForwardList(&bfList)))
+ return;
+
+ // Print out all items in the list after prevTestBFItem, which was from the previous test
+ // Gather items from the end of the list, the print them out from oldest to newest
+
+ Vector<COMPtr<IUnknown> > itemsToPrint;
+
+ int forwardListCount;
+ if (FAILED(bfList->forwardListCount(&forwardListCount)))
+ return;
+
+ for (int i = forwardListCount; i > 0; --i) {
+ COMPtr<IWebHistoryItem> item;
+ if (FAILED(bfList->itemAtIndex(i, &item)))
+ return;
+ // something is wrong if the item from the last test is in the forward part of the b/f list
+ assert(item != prevTestBFItem);
+ COMPtr<IUnknown> itemUnknown;
+ item->QueryInterface(&itemUnknown);
+ itemsToPrint.append(itemUnknown);
+ }
+
+ COMPtr<IWebHistoryItem> currentItem;
+ if (FAILED(bfList->currentItem(&currentItem)))
+ return;
+
+ assert(currentItem != prevTestBFItem);
+ COMPtr<IUnknown> currentItemUnknown;
+ currentItem->QueryInterface(&currentItemUnknown);
+ itemsToPrint.append(currentItemUnknown);
+ int currentItemIndex = itemsToPrint.size() - 1;
+
+ int backListCount;
+ if (FAILED(bfList->backListCount(&backListCount)))
+ return;
+
+ for (int i = -1; i >= -backListCount; --i) {
+ COMPtr<IWebHistoryItem> item;
+ if (FAILED(bfList->itemAtIndex(i, &item)))
+ return;
+ if (item == prevTestBFItem)
+ break;
+ COMPtr<IUnknown> itemUnknown;
+ item->QueryInterface(&itemUnknown);
+ itemsToPrint.append(itemUnknown);
+ }
+
+ for (int i = itemsToPrint.size() - 1; i >= 0; --i) {
+ COMPtr<IWebHistoryItem> historyItemToPrint;
+ itemsToPrint[i]->QueryInterface(&historyItemToPrint);
+ dumpHistoryItem(historyItemToPrint.get(), 8, i == currentItemIndex);
+ }
+
+ printf("===============================================\n");
+}
+
+static void dumpBackForwardListForAllWindows()
+{
+ unsigned count = openWindows().size();
+ for (unsigned i = 0; i < count; i++) {
+ HWND window = openWindows()[i];
+ IWebView* webView = windowToWebViewMap().get(window).get();
+ dumpBackForwardList(webView);
+ }
+}
+
+static void invalidateAnyPreviousWaitToDumpWatchdog()
+{
+ if (!waitToDumpWatchdog)
+ return;
+
+ KillTimer(0, waitToDumpWatchdog);
+ waitToDumpWatchdog = 0;
+}
+
+void dump()
+{
+ invalidateAnyPreviousWaitToDumpWatchdog();
+
+ COMPtr<IWebDataSource> dataSource;
+ if (SUCCEEDED(frame->dataSource(&dataSource))) {
+ COMPtr<IWebURLResponse> response;
+ if (SUCCEEDED(dataSource->response(&response)) && response) {
+ BSTR mimeType;
+ if (SUCCEEDED(response->MIMEType(&mimeType)))
+ ::gLayoutTestController->setDumpAsText(::gLayoutTestController->dumpAsText() | !_tcscmp(mimeType, TEXT("text/plain")));
+ SysFreeString(mimeType);
+ }
+ }
+
+ BSTR resultString = 0;
+
+ if (dumpTree) {
+ if (::gLayoutTestController->dumpAsText()) {
+ ::InvalidateRect(webViewWindow, 0, TRUE);
+ ::SendMessage(webViewWindow, WM_PAINT, 0, 0);
+ wstring result = dumpFramesAsText(frame);
+ resultString = SysAllocStringLen(result.data(), result.size());
+ } else {
+ bool isSVGW3CTest = (gLayoutTestController->testPathOrURL().find("svg\\W3C-SVG-1.1") != string::npos);
+ unsigned width;
+ unsigned height;
+ if (isSVGW3CTest) {
+ width = 480;
+ height = 360;
+ } else {
+ width = maxViewWidth;
+ height = maxViewHeight;
+ }
+
+ ::SetWindowPos(webViewWindow, 0, 0, 0, width, height, SWP_NOMOVE);
+ ::InvalidateRect(webViewWindow, 0, TRUE);
+ ::SendMessage(webViewWindow, WM_PAINT, 0, 0);
+
+ COMPtr<IWebFramePrivate> framePrivate;
+ if (FAILED(frame->QueryInterface(&framePrivate)))
+ goto fail;
+ framePrivate->renderTreeAsExternalRepresentation(&resultString);
+ }
+
+ if (!resultString)
+ printf("ERROR: nil result from %s", ::gLayoutTestController->dumpAsText() ? "IDOMElement::innerText" : "IFrameViewPrivate::renderTreeAsExternalRepresentation");
+ else {
+ unsigned stringLength = SysStringLen(resultString);
+ int bufferSize = ::WideCharToMultiByte(CP_UTF8, 0, resultString, stringLength, 0, 0, 0, 0);
+ char* buffer = (char*)malloc(bufferSize + 1);
+ ::WideCharToMultiByte(CP_UTF8, 0, resultString, stringLength, buffer, bufferSize + 1, 0, 0);
+ fwrite(buffer, 1, bufferSize, stdout);
+ free(buffer);
+ if (!::gLayoutTestController->dumpAsText())
+ dumpFrameScrollPosition(frame);
+ }
+ if (::gLayoutTestController->dumpBackForwardList())
+ dumpBackForwardListForAllWindows();
+ }
+
+ if (printSeparators) {
+ puts("#EOF"); // terminate the content block
+ fputs("#EOF\n", stderr);
+ fflush(stdout);
+ fflush(stderr);
+ }
+
+ if (dumpPixels) {
+ if (!gLayoutTestController->dumpAsText() && !gLayoutTestController->dumpDOMAsWebArchive() && !gLayoutTestController->dumpSourceAsWebArchive())
+ dumpWebViewAsPixelsAndCompareWithExpected(gLayoutTestController->expectedPixelHash());
+ }
+
+ printf("#EOF\n"); // terminate the (possibly empty) pixels block
+ fflush(stdout);
+
+fail:
+ SysFreeString(resultString);
+ // This will exit from our message loop
+ PostQuitMessage(0);
+ done = true;
+}
+
+static bool shouldLogFrameLoadDelegates(const char* pathOrURL)
+{
+ return strstr(pathOrURL, "loading/");
+}
+
+static void resetWebViewToConsistentStateBeforeTesting()
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ webView->setPolicyDelegate(0);
+
+ COMPtr<IWebIBActions> webIBActions(Query, webView);
+ if (webIBActions) {
+ webIBActions->makeTextStandardSize(0);
+ webIBActions->resetPageZoom(0);
+ }
+
+ COMPtr<IWebPreferences> preferences;
+ if (SUCCEEDED(webView->preferences(&preferences))) {
+ preferences->setPrivateBrowsingEnabled(FALSE);
+ preferences->setJavaScriptCanOpenWindowsAutomatically(TRUE);
+
+ if (persistentUserStyleSheetLocation) {
+ Vector<wchar_t> urlCharacters(CFStringGetLength(persistentUserStyleSheetLocation.get()));
+ CFStringGetCharacters(persistentUserStyleSheetLocation.get(), CFRangeMake(0, CFStringGetLength(persistentUserStyleSheetLocation.get())), (UniChar *)urlCharacters.data());
+ BSTR url = SysAllocStringLen(urlCharacters.data(), urlCharacters.size());
+ preferences->setUserStyleSheetLocation(url);
+ SysFreeString(url);
+ preferences->setUserStyleSheetEnabled(TRUE);
+ } else
+ preferences->setUserStyleSheetEnabled(FALSE);
+
+ COMPtr<IWebPreferencesPrivate> prefsPrivate(Query, preferences);
+ if (prefsPrivate) {
+ prefsPrivate->setAuthorAndUserStylesEnabled(TRUE);
+ prefsPrivate->setDeveloperExtrasEnabled(FALSE);
+ }
+ }
+
+ COMPtr<IWebViewEditing> viewEditing;
+ if (SUCCEEDED(webView->QueryInterface(&viewEditing)))
+ viewEditing->setSmartInsertDeleteEnabled(TRUE);
+
+ COMPtr<IWebViewPrivate> webViewPrivate(Query, webView);
+ if (!webViewPrivate)
+ return;
+
+ COMPtr<IWebInspector> inspector;
+ if (SUCCEEDED(webViewPrivate->inspector(&inspector)))
+ inspector->setJavaScriptProfilingEnabled(FALSE);
+
+ HWND viewWindow;
+ if (SUCCEEDED(webViewPrivate->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewWindow))) && viewWindow)
+ SetFocus(viewWindow);
+
+ webViewPrivate->clearMainFrameName();
+}
+
+static void runTest(const string& testPathOrURL)
+{
+ static BSTR methodBStr = SysAllocString(TEXT("GET"));
+
+ // Look for "'" as a separator between the path or URL, and the pixel dump hash that follows.
+ string pathOrURL(testPathOrURL);
+ string expectedPixelHash;
+
+ size_t separatorPos = pathOrURL.find("'");
+ if (separatorPos != string::npos) {
+ pathOrURL = string(testPathOrURL, 0, separatorPos);
+ expectedPixelHash = string(testPathOrURL, separatorPos + 1);
+ }
+
+ BSTR urlBStr;
+
+ CFStringRef str = CFStringCreateWithCString(0, pathOrURL.c_str(), kCFStringEncodingWindowsLatin1);
+ CFURLRef url = CFURLCreateWithString(0, str, 0);
+
+ if (!url)
+ url = CFURLCreateWithFileSystemPath(0, str, kCFURLWindowsPathStyle, false);
+
+ CFRelease(str);
+
+ str = CFURLGetString(url);
+
+ CFIndex length = CFStringGetLength(str);
+ UniChar* buffer = new UniChar[length];
+
+ CFStringGetCharacters(str, CFRangeMake(0, length), buffer);
+ urlBStr = SysAllocStringLen((OLECHAR*)buffer, length);
+ delete[] buffer;
+
+ CFRelease(url);
+
+ ::gLayoutTestController = new LayoutTestController(pathOrURL, expectedPixelHash);
+ done = false;
+ topLoadingFrame = 0;
+
+ gLayoutTestController->setIconDatabaseEnabled(false);
+
+ if (shouldLogFrameLoadDelegates(pathOrURL.c_str()))
+ gLayoutTestController->setDumpFrameLoadCallbacks(true);
+
+ COMPtr<IWebHistory> history(Create, CLSID_WebHistory);
+ if (history)
+ history->setOptionalSharedHistory(0);
+
+ resetWebViewToConsistentStateBeforeTesting();
+ sharedUIDelegate->resetUndoManager();
+
+ prevTestBFItem = 0;
+ COMPtr<IWebView> webView;
+ if (SUCCEEDED(frame->webView(&webView))) {
+ COMPtr<IWebBackForwardList> bfList;
+ if (SUCCEEDED(webView->backForwardList(&bfList)))
+ bfList->currentItem(&prevTestBFItem);
+ }
+
+ WorkQueue::shared()->clear();
+ WorkQueue::shared()->setFrozen(false);
+
+ HWND hostWindow;
+ webView->hostWindow(reinterpret_cast<OLE_HANDLE*>(&hostWindow));
+
+ COMPtr<IWebMutableURLRequest> request;
+ HRESULT hr = CoCreateInstance(CLSID_WebMutableURLRequest, 0, CLSCTX_ALL, IID_IWebMutableURLRequest, (void**)&request);
+ if (FAILED(hr))
+ goto exit;
+
+ request->initWithURL(urlBStr, WebURLRequestUseProtocolCachePolicy, 60);
+
+ request->setHTTPMethod(methodBStr);
+ frame->loadRequest(request.get());
+
+ MSG msg;
+ while (GetMessage(&msg, 0, 0, 0)) {
+ // We get spurious WM_MOUSELEAVE events which make event handling machinery think that mouse button
+ // is released during dragging (see e.g. fast\dynamic\layer-hit-test-crash.html).
+ // Mouse can never leave WebView during normal DumpRenderTree operation, so we just ignore all such events.
+ if (msg.message == WM_MOUSELEAVE)
+ continue;
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+
+ frame->stopLoading();
+
+ if (::gLayoutTestController->closeRemainingWindowsWhenComplete()) {
+ Vector<HWND> windows = openWindows();
+ unsigned size = windows.size();
+ for (unsigned i = 0; i < size; i++) {
+ HWND window = windows[i];
+
+ // Don't try to close the main window
+ if (window == hostWindow)
+ continue;
+
+ DestroyWindow(window);
+ }
+ }
+
+exit:
+ SysFreeString(urlBStr);
+ ::gLayoutTestController->deref();
+ ::gLayoutTestController = 0;
+
+ return;
+}
+
+static void initializePreferences(IWebPreferences* preferences)
+{
+#ifdef USE_MAC_FONTS
+ BSTR standardFamily = SysAllocString(TEXT("Times"));
+ BSTR fixedFamily = SysAllocString(TEXT("Courier"));
+ BSTR sansSerifFamily = SysAllocString(TEXT("Helvetica"));
+ BSTR cursiveFamily = SysAllocString(TEXT("Apple Chancery"));
+ BSTR fantasyFamily = SysAllocString(TEXT("Papyrus"));
+#else
+ BSTR standardFamily = SysAllocString(TEXT("Times New Roman"));
+ BSTR fixedFamily = SysAllocString(TEXT("Courier New"));
+ BSTR sansSerifFamily = SysAllocString(TEXT("Arial"));
+ BSTR cursiveFamily = SysAllocString(TEXT("Comic Sans MS")); // Not actually cursive, but it's what IE and Firefox use.
+ BSTR fantasyFamily = SysAllocString(TEXT("Times New Roman"));
+#endif
+
+ preferences->setStandardFontFamily(standardFamily);
+ preferences->setFixedFontFamily(fixedFamily);
+ preferences->setSerifFontFamily(standardFamily);
+ preferences->setSansSerifFontFamily(sansSerifFamily);
+ preferences->setCursiveFontFamily(cursiveFamily);
+ preferences->setFantasyFontFamily(fantasyFamily);
+
+ preferences->setAutosaves(FALSE);
+ preferences->setJavaEnabled(FALSE);
+ preferences->setPlugInsEnabled(TRUE);
+ preferences->setDOMPasteAllowed(TRUE);
+ preferences->setEditableLinkBehavior(WebKitEditableLinkOnlyLiveWithShiftKey);
+ preferences->setFontSmoothing(FontSmoothingTypeStandard);
+ preferences->setUsesPageCache(FALSE);
+
+ SysFreeString(standardFamily);
+ SysFreeString(fixedFamily);
+ SysFreeString(sansSerifFamily);
+ SysFreeString(cursiveFamily);
+ SysFreeString(fantasyFamily);
+}
+
+static Boolean pthreadEqualCallback(const void* value1, const void* value2)
+{
+ return (Boolean)pthread_equal(*(pthread_t*)value1, *(pthread_t*)value2);
+}
+
+static CFDictionaryKeyCallBacks pthreadKeyCallbacks = { 0, 0, 0, 0, pthreadEqualCallback, 0 };
+
+static pthread_mutex_t javaScriptThreadsMutex = PTHREAD_MUTEX_INITIALIZER;
+static bool javaScriptThreadsShouldTerminate;
+
+static const int javaScriptThreadsCount = 4;
+static CFMutableDictionaryRef javaScriptThreads()
+{
+ assert(pthread_mutex_trylock(&javaScriptThreadsMutex) == EBUSY);
+ static CFMutableDictionaryRef staticJavaScriptThreads;
+ if (!staticJavaScriptThreads)
+ staticJavaScriptThreads = CFDictionaryCreateMutable(0, 0, &pthreadKeyCallbacks, 0);
+ return staticJavaScriptThreads;
+}
+
+// Loops forever, running a script and randomly respawning, until
+// javaScriptThreadsShouldTerminate becomes true.
+void* runJavaScriptThread(void* arg)
+{
+ const char* const script =
+ " \
+ var array = []; \
+ for (var i = 0; i < 10; i++) { \
+ array.push(String(i)); \
+ } \
+ ";
+
+ while (true) {
+ JSGlobalContextRef ctx = JSGlobalContextCreate(0);
+ JSStringRef scriptRef = JSStringCreateWithUTF8CString(script);
+
+ JSValueRef exception = 0;
+ JSEvaluateScript(ctx, scriptRef, 0, 0, 1, &exception);
+ assert(!exception);
+
+ JSGlobalContextRelease(ctx);
+ JSStringRelease(scriptRef);
+
+ JSGarbageCollect(ctx);
+
+ pthread_mutex_lock(&javaScriptThreadsMutex);
+
+ // Check for cancellation.
+ if (javaScriptThreadsShouldTerminate) {
+ pthread_mutex_unlock(&javaScriptThreadsMutex);
+ return 0;
+ }
+
+ // Respawn probabilistically.
+ if (rand() % 5 == 0) {
+ pthread_t pthread;
+ pthread_create(&pthread, 0, &runJavaScriptThread, 0);
+ pthread_detach(pthread);
+
+ pthread_t self = pthread_self();
+ CFDictionaryRemoveValue(javaScriptThreads(), self.p);
+ CFDictionaryAddValue(javaScriptThreads(), pthread.p, 0);
+
+ pthread_mutex_unlock(&javaScriptThreadsMutex);
+ return 0;
+ }
+
+ pthread_mutex_unlock(&javaScriptThreadsMutex);
+ }
+}
+
+static void startJavaScriptThreads(void)
+{
+ pthread_mutex_lock(&javaScriptThreadsMutex);
+
+ for (int i = 0; i < javaScriptThreadsCount; i++) {
+ pthread_t pthread;
+ pthread_create(&pthread, 0, &runJavaScriptThread, 0);
+ pthread_detach(pthread);
+ CFDictionaryAddValue(javaScriptThreads(), pthread.p, 0);
+ }
+
+ pthread_mutex_unlock(&javaScriptThreadsMutex);
+}
+
+static void stopJavaScriptThreads(void)
+{
+ pthread_mutex_lock(&javaScriptThreadsMutex);
+
+ javaScriptThreadsShouldTerminate = true;
+
+ pthread_t* pthreads[javaScriptThreadsCount] = {0};
+ int threadDictCount = CFDictionaryGetCount(javaScriptThreads());
+ assert(threadDictCount == javaScriptThreadsCount);
+ CFDictionaryGetKeysAndValues(javaScriptThreads(), (const void**)pthreads, 0);
+
+ pthread_mutex_unlock(&javaScriptThreadsMutex);
+
+ for (int i = 0; i < javaScriptThreadsCount; i++) {
+ pthread_t* pthread = pthreads[i];
+ pthread_join(*pthread, 0);
+ free(pthread);
+ }
+}
+
+Vector<HWND>& openWindows()
+{
+ static Vector<HWND> vector;
+ return vector;
+}
+
+WindowToWebViewMap& windowToWebViewMap()
+{
+ static WindowToWebViewMap map;
+ return map;
+}
+
+IWebView* createWebViewAndOffscreenWindow(HWND* webViewWindow)
+{
+ HWND hostWindow = CreateWindowEx(WS_EX_TOOLWINDOW, kDumpRenderTreeClassName, TEXT("DumpRenderTree"), WS_POPUP,
+ -maxViewWidth, -maxViewHeight, maxViewWidth, maxViewHeight, 0, 0, GetModuleHandle(0), 0);
+
+ IWebView* webView;
+
+ HRESULT hr = CoCreateInstance(CLSID_WebView, 0, CLSCTX_ALL, IID_IWebView, (void**)&webView);
+ if (FAILED(hr)) {
+ fprintf(stderr, "Failed to create CLSID_WebView instance, error 0x%x\n", hr);
+ return 0;
+ }
+
+ if (FAILED(webView->setHostWindow((OLE_HANDLE)(ULONG64)hostWindow)))
+ return 0;
+
+ RECT clientRect;
+ clientRect.bottom = clientRect.left = clientRect.top = clientRect.right = 0;
+ BSTR groupName = SysAllocString(L"org.webkit.DumpRenderTree");
+ bool failed = FAILED(webView->initWithFrame(clientRect, 0, groupName));
+ SysFreeString(groupName);
+ if (failed)
+ return 0;
+
+ COMPtr<IWebViewPrivate> viewPrivate;
+ if (FAILED(webView->QueryInterface(&viewPrivate)))
+ return 0;
+
+ viewPrivate->setShouldApplyMacFontAscentHack(TRUE);
+ viewPrivate->setAlwaysUsesComplexTextCodePath(forceComplexText);
+
+ BSTR pluginPath = SysAllocStringLen(0, exePath().length() + _tcslen(TestPluginDir));
+ _tcscpy(pluginPath, exePath().c_str());
+ _tcscat(pluginPath, TestPluginDir);
+ failed = FAILED(viewPrivate->addAdditionalPluginDirectory(pluginPath));
+ SysFreeString(pluginPath);
+ if (failed)
+ return 0;
+
+ HWND viewWindow;
+ if (FAILED(viewPrivate->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewWindow))))
+ return 0;
+ if (webViewWindow)
+ *webViewWindow = viewWindow;
+
+ SetWindowPos(viewWindow, 0, 0, 0, maxViewWidth, maxViewHeight, 0);
+ ShowWindow(hostWindow, SW_SHOW);
+
+ if (FAILED(webView->setFrameLoadDelegate(sharedFrameLoadDelegate.get())))
+ return 0;
+
+ if (FAILED(viewPrivate->setFrameLoadDelegatePrivate(sharedFrameLoadDelegate.get())))
+ return 0;
+
+ if (FAILED(webView->setUIDelegate(sharedUIDelegate.get())))
+ return 0;
+
+ COMPtr<IWebViewEditing> viewEditing;
+ if (FAILED(webView->QueryInterface(&viewEditing)))
+ return 0;
+
+ if (FAILED(viewEditing->setEditingDelegate(sharedEditingDelegate.get())))
+ return 0;
+
+ if (FAILED(webView->setResourceLoadDelegate(sharedResourceLoadDelegate.get())))
+ return 0;
+
+ COMPtr<IWebPreferences> preferences;
+ if (FAILED(webView->preferences(&preferences)))
+ return 0;
+
+ initializePreferences(preferences.get());
+
+ openWindows().append(hostWindow);
+ windowToWebViewMap().set(hostWindow, webView);
+ return webView;
+}
+
+int main(int argc, char* argv[])
+{
+ leakChecking = false;
+
+ _setmode(1, _O_BINARY);
+ _setmode(2, _O_BINARY);
+
+ initialize();
+
+ Vector<const char*> tests;
+
+ for (int i = 1; i < argc; ++i) {
+ if (!stricmp(argv[i], "--threaded")) {
+ threaded = true;
+ continue;
+ }
+
+ if (!stricmp(argv[i], "--dump-all-pixels")) {
+ dumpAllPixels = true;
+ continue;
+ }
+
+ if (!stricmp(argv[i], "--pixel-tests")) {
+ dumpPixels = true;
+ continue;
+ }
+
+ if (!stricmp(argv[i], "--complex-text")) {
+ forceComplexText = true;
+ continue;
+ }
+
+ tests.append(argv[i]);
+ }
+
+ policyDelegate = new PolicyDelegate();
+ sharedFrameLoadDelegate.adoptRef(new FrameLoadDelegate);
+ sharedUIDelegate.adoptRef(new UIDelegate);
+ sharedEditingDelegate.adoptRef(new EditingDelegate);
+ sharedResourceLoadDelegate.adoptRef(new ResourceLoadDelegate);
+
+ COMPtr<IWebView> webView(AdoptCOM, createWebViewAndOffscreenWindow(&webViewWindow));
+ if (!webView)
+ return -1;
+
+ COMPtr<IWebIconDatabase> iconDatabase;
+ COMPtr<IWebIconDatabase> tmpIconDatabase;
+ if (FAILED(CoCreateInstance(CLSID_WebIconDatabase, 0, CLSCTX_ALL, IID_IWebIconDatabase, (void**)&tmpIconDatabase)))
+ return -1;
+ if (FAILED(tmpIconDatabase->sharedIconDatabase(&iconDatabase)))
+ return -1;
+
+ if (FAILED(webView->mainFrame(&frame)))
+ return -1;
+
+ CFURLCacheRemoveAllCachedResponses(CFURLCacheSharedURLCache());
+
+#ifdef _DEBUG
+ _CrtMemState entryToMainMemCheckpoint;
+ if (leakChecking)
+ _CrtMemCheckpoint(&entryToMainMemCheckpoint);
+#endif
+
+ if (threaded)
+ startJavaScriptThreads();
+
+ if (tests.size() == 1 && !strcmp(tests[0], "-")) {
+ char filenameBuffer[2048];
+ printSeparators = true;
+ while (fgets(filenameBuffer, sizeof(filenameBuffer), stdin)) {
+ char* newLineCharacter = strchr(filenameBuffer, '\n');
+ if (newLineCharacter)
+ *newLineCharacter = '\0';
+
+ if (strlen(filenameBuffer) == 0)
+ continue;
+
+ runTest(filenameBuffer);
+ }
+ } else {
+ printSeparators = tests.size() > 1;
+ for (int i = 0; i < tests.size(); i++)
+ runTest(tests[i]);
+ }
+
+ if (threaded)
+ stopJavaScriptThreads();
+
+ delete policyDelegate;
+ frame->Release();
+
+#ifdef _DEBUG
+ if (leakChecking) {
+ // dump leaks to stderr
+ _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
+ _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
+ _CrtMemDumpAllObjectsSince(&entryToMainMemCheckpoint);
+ }
+#endif
+
+ shutDownWebKit();
+
+ return 0;
+}
diff --git a/WebKitTools/DumpRenderTree/win/DumpRenderTree.vcproj b/WebKitTools/DumpRenderTree/win/DumpRenderTree.vcproj
new file mode 100644
index 0000000..e094bde
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/DumpRenderTree.vcproj
@@ -0,0 +1,411 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="DumpRenderTree"
+ ProjectGUID="{6567DFD4-D6DE-4CD5-825D-17E353D160E1}"
+ RootNamespace="DumpRenderTree"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\DumpRenderTree&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\DumpRenderTree\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\DumpRenderTree\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\DumpRenderTree\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ PreprocessorDefinitions="_CONSOLE"
+ DisableSpecificWarnings="4146"
+ ForcedIncludeFiles="DumpRenderTreePrefix.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WebKitGUID$(WebKitConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib WTF$(WebKitConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib gdi32.lib ole32.lib oleaut32.lib user32.lib shlwapi.lib oleacc.lib"
+ AdditionalLibraryDirectories=""
+ DelayLoadDLLs=""
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ TypeLibraryFile="$(WebKitOutputDir)\lib\WebKit.tlb"
+ ComponentFileName="WebKit$(WebKitDLLConfigSuffix)"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;if &quot;$(ARCHIVE_BUILD)&quot;==&quot;&quot; (if not &quot;$(PRODUCTION)&quot;==&quot;&quot; exit /b)&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll&quot; exit /b&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CFNetwork$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CFNetwork$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CFNetwork.resources&quot; &quot;$(WebKitOutputDir)\bin\CFNetwork.resources&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CoreFoundation.resources&quot; &quot;$(WebKitOutputDir)\bin\CoreFoundation.resources&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CharacterSets&quot; &quot;$(WebKitOutputDir)\bin\CharacterSets&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\dnssd.dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt40.dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuin40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuin40$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuuc40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuuc40$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\libxml2$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\libxslt$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\pthreadVC2$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\pthreadVC2$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\SQLite3$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\SQLite3$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\zlib1$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\zlib1$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\DumpRenderTree&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\DumpRenderTree\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\DumpRenderTree\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\DumpRenderTree\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ PreprocessorDefinitions="_CONSOLE"
+ DisableSpecificWarnings="4146"
+ ForcedIncludeFiles="DumpRenderTreePrefix.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WebKitGUID$(WebKitConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib WTF$(WebKitConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib gdi32.lib ole32.lib oleaut32.lib user32.lib shlwapi.lib oleacc.lib"
+ AdditionalLibraryDirectories=""
+ DelayLoadDLLs=""
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ TypeLibraryFile="$(WebKitOutputDir)\lib\WebKit.tlb"
+ ComponentFileName="WebKit$(WebKitDLLConfigSuffix)"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;if &quot;$(ARCHIVE_BUILD)&quot;==&quot;&quot; (if not &quot;$(PRODUCTION)&quot;==&quot;&quot; exit /b)&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll&quot; exit /b&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CFNetwork$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CFNetwork$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CFNetwork.resources&quot; &quot;$(WebKitOutputDir)\bin\CFNetwork.resources&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CoreFoundation.resources&quot; &quot;$(WebKitOutputDir)\bin\CoreFoundation.resources&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CharacterSets&quot; &quot;$(WebKitOutputDir)\bin\CharacterSets&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\dnssd.dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt40.dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuin40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuin40$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuuc40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuuc40$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\libxml2$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\libxslt$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\pthreadVC2$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\pthreadVC2$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\SQLite3$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\SQLite3$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\zlib1$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\zlib1$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;"
+ />
+ </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"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\DumpRenderTree&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\DumpRenderTree\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\DumpRenderTree\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\DumpRenderTree\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\DumpRenderTree\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ PreprocessorDefinitions="_CONSOLE;DEBUG_WEBKIT_HAS_SUFFIX"
+ DisableSpecificWarnings="4146"
+ ForcedIncludeFiles="DumpRenderTreePrefix.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="WebKitGUID$(WebKitConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib WTF$(WebKitConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib gdi32.lib ole32.lib oleaut32.lib user32.lib shlwapi.lib oleacc.lib"
+ AdditionalLibraryDirectories=""
+ DelayLoadDLLs=""
+ SubSystem="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ TypeLibraryFile="$(WebKitOutputDir)\lib\WebKit.tlb"
+ ComponentFileName="WebKit$(WebKitDLLConfigSuffix)"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;if &quot;$(ARCHIVE_BUILD)&quot;==&quot;&quot; (if not &quot;$(PRODUCTION)&quot;==&quot;&quot; exit /b)&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll&quot; exit /b&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CFNetwork$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CFNetwork$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CFNetwork.resources&quot; &quot;$(WebKitOutputDir)\bin\CFNetwork.resources&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CoreFoundation.resources&quot; &quot;$(WebKitOutputDir)\bin\CoreFoundation.resources&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CharacterSets&quot; &quot;$(WebKitOutputDir)\bin\CharacterSets&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\dnssd.dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt40.dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuin40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuin40$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuuc40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuuc40$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\libxml2$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\libxslt$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\pthreadVC2$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\pthreadVC2$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\SQLite3$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\SQLite3$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\zlib1$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\zlib1$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Controllers"
+ >
+ <File
+ RelativePath="..\AccessibilityController.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\AccessibilityController.h"
+ >
+ </File>
+ <File
+ RelativePath=".\AccessibilityControllerWin.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\EventSender.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\EventSender.h"
+ >
+ </File>
+ <File
+ RelativePath="..\GCController.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\GCController.h"
+ >
+ </File>
+ <File
+ RelativePath=".\GCControllerWin.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\LayoutTestController.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\LayoutTestController.h"
+ >
+ </File>
+ <File
+ RelativePath=".\LayoutTestControllerWin.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Delegates"
+ >
+ <File
+ RelativePath=".\EditingDelegate.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\EditingDelegate.h"
+ >
+ </File>
+ <File
+ RelativePath=".\FrameLoadDelegate.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\FrameLoadDelegate.h"
+ >
+ </File>
+ <File
+ RelativePath=".\PolicyDelegate.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\PolicyDelegate.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ResourceLoadDelegate.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\ResourceLoadDelegate.h"
+ >
+ </File>
+ <File
+ RelativePath=".\UIDelegate.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\UIDelegate.h"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath="..\AccessibilityUIElement.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\AccessibilityUIElement.h"
+ >
+ </File>
+ <File
+ RelativePath=".\AccessibilityUIElementWin.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\DraggingInfo.h"
+ >
+ </File>
+ <File
+ RelativePath=".\DumpRenderTree.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\DumpRenderTree.h"
+ >
+ </File>
+ <File
+ RelativePath="..\DumpRenderTreePrefix.h"
+ >
+ </File>
+ <File
+ RelativePath=".\DumpRenderTreeWin.h"
+ >
+ </File>
+ <File
+ RelativePath=".\MD5.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\MD5.h"
+ >
+ </File>
+ <File
+ RelativePath=".\PixelDumpSupport.h"
+ >
+ </File>
+ <File
+ RelativePath="..\cg\PixelDumpSupportCG.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\cg\PixelDumpSupportCG.h"
+ >
+ </File>
+ <File
+ RelativePath=".\PixelDumpSupportWin.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\WorkQueue.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\WorkQueue.h"
+ >
+ </File>
+ <File
+ RelativePath="..\WorkQueueItem.h"
+ >
+ </File>
+ <File
+ RelativePath=".\WorkQueueItemWin.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h b/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h
new file mode 100644
index 0000000..bf9b123
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2006, 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DumpRenderTreeWin_h
+#define DumpRenderTreeWin_h
+
+struct IWebFrame;
+struct IWebView;
+struct PolicyDelegate;
+typedef const struct __CFString* CFStringRef;
+typedef struct HWND__* HWND;
+
+extern IWebFrame* topLoadingFrame;
+extern IWebFrame* frame;
+extern PolicyDelegate* policyDelegate;
+
+extern HWND webViewWindow;
+
+#include <WebCore/COMPtr.h>
+#include <string>
+#include <wtf/HashMap.h>
+#include <wtf/Vector.h>
+
+std::wstring urlSuitableForTestResult(const std::wstring& url);
+IWebView* createWebViewAndOffscreenWindow(HWND* webViewWindow = 0);
+Vector<HWND>& openWindows();
+typedef HashMap<HWND, COMPtr<IWebView> > WindowToWebViewMap;
+WindowToWebViewMap& windowToWebViewMap();
+
+void setPersistentUserStyleSheetLocation(CFStringRef);
+
+extern UINT_PTR waitToDumpWatchdog;
+
+#endif // DumpRenderTreeWin_h
diff --git a/WebKitTools/DumpRenderTree/win/EditingDelegate.cpp b/WebKitTools/DumpRenderTree/win/EditingDelegate.cpp
new file mode 100644
index 0000000..32c02bd
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/EditingDelegate.cpp
@@ -0,0 +1,355 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "EditingDelegate.h"
+
+#include "DumpRenderTree.h"
+#include "LayoutTestController.h"
+#include <WebCore/COMPtr.h>
+#include <wtf/Platform.h>
+#include <JavaScriptCore/Assertions.h>
+#include <string>
+#include <tchar.h>
+
+using std::wstring;
+
+EditingDelegate::EditingDelegate()
+ : m_refCount(1)
+ , m_acceptsEditing(true)
+{
+}
+
+// IUnknown
+HRESULT STDMETHODCALLTYPE EditingDelegate::QueryInterface(REFIID riid, void** ppvObject)
+{
+ *ppvObject = 0;
+ if (IsEqualGUID(riid, IID_IUnknown))
+ *ppvObject = static_cast<IWebEditingDelegate*>(this);
+ else if (IsEqualGUID(riid, IID_IWebEditingDelegate))
+ *ppvObject = static_cast<IWebEditingDelegate*>(this);
+ else
+ return E_NOINTERFACE;
+
+ AddRef();
+ return S_OK;
+}
+
+ULONG STDMETHODCALLTYPE EditingDelegate::AddRef(void)
+{
+ return ++m_refCount;
+}
+
+ULONG STDMETHODCALLTYPE EditingDelegate::Release(void)
+{
+ ULONG newRef = --m_refCount;
+ if (!newRef)
+ delete this;
+
+ return newRef;
+}
+
+static wstring dumpPath(IDOMNode* node)
+{
+ ASSERT(node);
+
+ wstring result;
+
+ BSTR name;
+ if (FAILED(node->nodeName(&name)))
+ return result;
+ result.assign(name, SysStringLen(name));
+ SysFreeString(name);
+
+ COMPtr<IDOMNode> parent;
+ if (SUCCEEDED(node->parentNode(&parent)))
+ result += TEXT(" > ") + dumpPath(parent.get());
+
+ return result;
+}
+
+static wstring dump(IDOMRange* range)
+{
+ ASSERT(range);
+
+ int startOffset;
+ if (FAILED(range->startOffset(&startOffset)))
+ return 0;
+
+ int endOffset;
+ if (FAILED(range->endOffset(&endOffset)))
+ return 0;
+
+ COMPtr<IDOMNode> startContainer;
+ if (FAILED(range->startContainer(&startContainer)))
+ return 0;
+
+ COMPtr<IDOMNode> endContainer;
+ if (FAILED(range->endContainer(&endContainer)))
+ return 0;
+
+ wchar_t buffer[1024];
+ _snwprintf(buffer, ARRAYSIZE(buffer), L"range from %ld of %s to %ld of %s", startOffset, dumpPath(startContainer.get()), endOffset, dumpPath(endContainer.get()));
+ return buffer;
+}
+
+HRESULT STDMETHODCALLTYPE EditingDelegate::shouldBeginEditingInDOMRange(
+ /* [in] */ IWebView* webView,
+ /* [in] */ IDOMRange* range,
+ /* [retval][out] */ BOOL* result)
+{
+ if (!result) {
+ ASSERT_NOT_REACHED();
+ return E_POINTER;
+ }
+
+ if (::gLayoutTestController->dumpEditingCallbacks() && !done)
+ _tprintf(TEXT("EDITING DELEGATE: shouldBeginEditingInDOMRange:%s\n"), dump(range));
+
+ *result = m_acceptsEditing;
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE EditingDelegate::shouldEndEditingInDOMRange(
+ /* [in] */ IWebView* webView,
+ /* [in] */ IDOMRange* range,
+ /* [retval][out] */ BOOL* result)
+{
+ if (!result) {
+ ASSERT_NOT_REACHED();
+ return E_POINTER;
+ }
+
+ if (::gLayoutTestController->dumpEditingCallbacks() && !done)
+ _tprintf(TEXT("EDITING DELEGATE: shouldEndEditingInDOMRange:%s\n"), dump(range));
+
+ *result = m_acceptsEditing;
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE EditingDelegate::shouldInsertNode(
+ /* [in] */ IWebView* webView,
+ /* [in] */ IDOMNode* node,
+ /* [in] */ IDOMRange* range,
+ /* [in] */ WebViewInsertAction action)
+{
+ static LPCTSTR insertactionstring[] = {
+ TEXT("WebViewInsertActionTyped"),
+ TEXT("WebViewInsertActionPasted"),
+ TEXT("WebViewInsertActionDropped"),
+ };
+
+ if (::gLayoutTestController->dumpEditingCallbacks() && !done)
+ _tprintf(TEXT("EDITING DELEGATE: shouldInsertNode:%s replacingDOMRange:%s givenAction:%s\n"), dumpPath(node), dump(range), insertactionstring[action]);
+
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE EditingDelegate::shouldInsertText(
+ /* [in] */ IWebView* webView,
+ /* [in] */ BSTR text,
+ /* [in] */ IDOMRange* range,
+ /* [in] */ WebViewInsertAction action,
+ /* [retval][out] */ BOOL* result)
+{
+ if (!result) {
+ ASSERT_NOT_REACHED();
+ return E_POINTER;
+ }
+
+ static LPCTSTR insertactionstring[] = {
+ TEXT("WebViewInsertActionTyped"),
+ TEXT("WebViewInsertActionPasted"),
+ TEXT("WebViewInsertActionDropped"),
+ };
+
+ if (::gLayoutTestController->dumpEditingCallbacks() && !done)
+ _tprintf(TEXT("EDITING DELEGATE: shouldInsertText:%s replacingDOMRange:%s givenAction:%s\n"), text ? text : TEXT(""), dump(range), insertactionstring[action]);
+
+ *result = m_acceptsEditing;
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE EditingDelegate::shouldDeleteDOMRange(
+ /* [in] */ IWebView* webView,
+ /* [in] */ IDOMRange* range,
+ /* [retval][out] */ BOOL* result)
+{
+ if (!result) {
+ ASSERT_NOT_REACHED();
+ return E_POINTER;
+ }
+
+ if (::gLayoutTestController->dumpEditingCallbacks() && !done)
+ _tprintf(TEXT("EDITING DELEGATE: shouldDeleteDOMRange:%s\n"), dump(range));
+
+ *result = m_acceptsEditing;
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE EditingDelegate::shouldChangeSelectedDOMRange(
+ /* [in] */ IWebView* webView,
+ /* [in] */ IDOMRange* currentRange,
+ /* [in] */ IDOMRange* proposedRange,
+ /* [in] */ WebSelectionAffinity selectionAffinity,
+ /* [in] */ BOOL stillSelecting,
+ /* [retval][out] */ BOOL* result)
+{
+ if (!result) {
+ ASSERT_NOT_REACHED();
+ return E_POINTER;
+ }
+
+ static LPCTSTR affinitystring[] = {
+ TEXT("NSSelectionAffinityUpstream"),
+ TEXT("NSSelectionAffinityDownstream")
+ };
+ static LPCTSTR boolstring[] = {
+ TEXT("FALSE"),
+ TEXT("TRUE")
+ };
+
+ if (::gLayoutTestController->dumpEditingCallbacks() && !done)
+ _tprintf(TEXT("EDITING DELEGATE: shouldChangeSelectedDOMRange:%s toDOMRange:%s affinity:%s stillSelecting:%s\n"), dump(currentRange), dump(proposedRange), affinitystring[selectionAffinity], boolstring[stillSelecting]);
+
+ *result = m_acceptsEditing;
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE EditingDelegate::shouldApplyStyle(
+ /* [in] */ IWebView* webView,
+ /* [in] */ IDOMCSSStyleDeclaration* style,
+ /* [in] */ IDOMRange* range,
+ /* [retval][out] */ BOOL* result)
+{
+ if (!result) {
+ ASSERT_NOT_REACHED();
+ return E_POINTER;
+ }
+
+ if (::gLayoutTestController->dumpEditingCallbacks() && !done)
+ _tprintf(TEXT("EDITING DELEGATE: shouldApplyStyle:%s toElementsInDOMRange:%s\n"), TEXT("'style description'")/*[[style description] UTF8String]*/, dump(range));
+
+ *result = m_acceptsEditing;
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE EditingDelegate::shouldChangeTypingStyle(
+ /* [in] */ IWebView* webView,
+ /* [in] */ IDOMCSSStyleDeclaration* currentStyle,
+ /* [in] */ IDOMCSSStyleDeclaration* proposedStyle,
+ /* [retval][out] */ BOOL* result)
+{
+ if (!result) {
+ ASSERT_NOT_REACHED();
+ return E_POINTER;
+ }
+
+ if (::gLayoutTestController->dumpEditingCallbacks() && !done)
+ _tprintf(TEXT("EDITING DELEGATE: shouldChangeTypingStyle:%s toStyle:%s\n"), TEXT("'currentStyle description'"), TEXT("'proposedStyle description'"));
+
+ *result = m_acceptsEditing;
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE EditingDelegate::doPlatformCommand(
+ /* [in] */ IWebView *webView,
+ /* [in] */ BSTR command,
+ /* [retval][out] */ BOOL *result)
+{
+ if (!result) {
+ ASSERT_NOT_REACHED();
+ return E_POINTER;
+ }
+
+ if (::gLayoutTestController->dumpEditingCallbacks() && !done)
+ _tprintf(TEXT("EDITING DELEGATE: doPlatformCommand:%s\n"), command ? command : TEXT(""));
+
+ *result = m_acceptsEditing;
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE EditingDelegate::webViewDidBeginEditing(
+ /* [in] */ IWebNotification* notification)
+{
+ if (::gLayoutTestController->dumpEditingCallbacks() && !done) {
+ BSTR name;
+ notification->name(&name);
+ _tprintf(TEXT("EDITING DELEGATE: webViewDidBeginEditing:%s\n"), name ? name : TEXT(""));
+ SysFreeString(name);
+ }
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE EditingDelegate::webViewDidChange(
+ /* [in] */ IWebNotification *notification)
+{
+ if (::gLayoutTestController->dumpEditingCallbacks() && !done) {
+ BSTR name;
+ notification->name(&name);
+ _tprintf(TEXT("EDITING DELEGATE: webViewDidBeginEditing:%s\n"), name ? name : TEXT(""));
+ SysFreeString(name);
+ }
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE EditingDelegate::webViewDidEndEditing(
+ /* [in] */ IWebNotification *notification)
+{
+ if (::gLayoutTestController->dumpEditingCallbacks() && !done) {
+ BSTR name;
+ notification->name(&name);
+ _tprintf(TEXT("EDITING DELEGATE: webViewDidEndEditing:%s\n"), name ? name : TEXT(""));
+ SysFreeString(name);
+ }
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE EditingDelegate::webViewDidChangeTypingStyle(
+ /* [in] */ IWebNotification *notification)
+{
+ if (::gLayoutTestController->dumpEditingCallbacks() && !done) {
+ BSTR name;
+ notification->name(&name);
+ _tprintf(TEXT("EDITING DELEGATE: webViewDidChangeTypingStyle:%s\n"), name ? name : TEXT(""));
+ SysFreeString(name);
+ }
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE EditingDelegate::webViewDidChangeSelection(
+ /* [in] */ IWebNotification *notification)
+{
+ if (::gLayoutTestController->dumpEditingCallbacks() && !done) {
+ BSTR name;
+ notification->name(&name);
+ _tprintf(TEXT("EDITING DELEGATE: webViewDidChangeSelection:%s\n"), name ? name : TEXT(""));
+ SysFreeString(name);
+ }
+ return S_OK;
+}
diff --git a/WebKitTools/DumpRenderTree/win/EditingDelegate.h b/WebKitTools/DumpRenderTree/win/EditingDelegate.h
new file mode 100644
index 0000000..6dba675
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/EditingDelegate.h
@@ -0,0 +1,176 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef EditingDelegate_h
+#define EditingDelegate_h
+
+#include <WebKit/WebKit.h>
+
+class __declspec(uuid("265DCD4B-79C3-44a2-84BC-511C3EDABD6F")) EditingDelegate : public IWebEditingDelegate {
+public:
+ EditingDelegate();
+
+ void setAcceptsEditing(bool b) { m_acceptsEditing = b; }
+
+ // IUnknown
+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
+ virtual ULONG STDMETHODCALLTYPE AddRef(void);
+ virtual ULONG STDMETHODCALLTYPE Release(void);
+
+ // IWebEditingDelegate
+ virtual HRESULT STDMETHODCALLTYPE shouldBeginEditingInDOMRange(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IDOMRange *range,
+ /* [retval][out] */ BOOL *result);
+
+ virtual HRESULT STDMETHODCALLTYPE shouldEndEditingInDOMRange(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IDOMRange *range,
+ /* [retval][out] */ BOOL *result);
+
+ virtual HRESULT STDMETHODCALLTYPE shouldInsertNode(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IDOMNode *node,
+ /* [in] */ IDOMRange *range,
+ /* [in] */ WebViewInsertAction action);
+
+ virtual HRESULT STDMETHODCALLTYPE shouldInsertText(
+ /* [in] */ IWebView *webView,
+ /* [in] */ BSTR text,
+ /* [in] */ IDOMRange *range,
+ /* [in] */ WebViewInsertAction action,
+ /* [retval][out] */ BOOL *result);
+
+ virtual HRESULT STDMETHODCALLTYPE shouldDeleteDOMRange(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IDOMRange *range,
+ /* [retval][out] */ BOOL *result);
+
+ virtual HRESULT STDMETHODCALLTYPE shouldChangeSelectedDOMRange(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IDOMRange *currentRange,
+ /* [in] */ IDOMRange *proposedRange,
+ /* [in] */ WebSelectionAffinity selectionAffinity,
+ /* [in] */ BOOL stillSelecting,
+ /* [retval][out] */ BOOL *result);
+
+ virtual HRESULT STDMETHODCALLTYPE shouldApplyStyle(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IDOMCSSStyleDeclaration *style,
+ /* [in] */ IDOMRange *range,
+ /* [retval][out] */ BOOL *result);
+
+ virtual HRESULT STDMETHODCALLTYPE shouldChangeTypingStyle(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IDOMCSSStyleDeclaration *currentStyle,
+ /* [in] */ IDOMCSSStyleDeclaration *proposedStyle,
+ /* [retval][out] */ BOOL *result);
+
+ virtual HRESULT STDMETHODCALLTYPE doPlatformCommand(
+ /* [in] */ IWebView *webView,
+ /* [in] */ BSTR command,
+ /* [retval][out] */ BOOL *result);
+
+ virtual HRESULT STDMETHODCALLTYPE webViewDidBeginEditing(
+ /* [in] */ IWebNotification *notification);
+
+ virtual HRESULT STDMETHODCALLTYPE webViewDidChange(
+ /* [in] */ IWebNotification *notification);
+
+ virtual HRESULT STDMETHODCALLTYPE webViewDidEndEditing(
+ /* [in] */ IWebNotification *notification);
+
+ virtual HRESULT STDMETHODCALLTYPE webViewDidChangeTypingStyle(
+ /* [in] */ IWebNotification *notification);
+
+ virtual HRESULT STDMETHODCALLTYPE webViewDidChangeSelection(
+ /* [in] */ IWebNotification *notification);
+
+ virtual HRESULT STDMETHODCALLTYPE undoManagerForWebView(
+ /* [in] */ IWebView *webView,
+ /* [retval][out] */ IWebUndoManager **undoManager) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE ignoreWordInSpellDocument(
+ /* [in] */ IWebView *view,
+ /* [in] */ BSTR word) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE learnWord(
+ /* [in] */ BSTR word) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE checkSpellingOfString(
+ /* [in] */ IWebView *view,
+ /* [in] */ LPCTSTR text,
+ /* [in] */ int length,
+ /* [out] */ int *misspellingLocation,
+ /* [out] */ int *misspellingLength) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE checkGrammarOfString(
+ /* [in] */ IWebView *view,
+ /* [in] */ LPCTSTR text,
+ /* [in] */ int length,
+ /* [out] */ IEnumWebGrammarDetails **grammarDetails,
+ /* [out] */ int *badGrammarLocation,
+ /* [out] */ int *badGrammarLength) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE updateSpellingUIWithGrammarString(
+ /* [in] */ BSTR string,
+ /* [in] */ int location,
+ /* [in] */ int length,
+ /* [in] */ BSTR userDescription,
+ /* [in] */ BSTR *guesses,
+ /* [in] */ int guessesCount) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE updateSpellingUIWithMisspelledWord(
+ /* [in] */ BSTR word) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE showSpellingUI(
+ /* [in] */ BOOL show) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE spellingUIIsShowing(
+ /* [retval][out] */ BOOL *result) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE guessesForWord(
+ /* [in] */ BSTR word,
+ /* [retval][out] */ IEnumSpellingGuesses **guesses) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE closeSpellDocument(
+ /* [in] */ IWebView *view) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE sharedSpellCheckerExists(
+ /* [retval][out] */ BOOL *exists) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE preflightChosenSpellServer( void) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE updateGrammar( void) { return E_NOTIMPL; }
+
+private:
+ bool m_acceptsEditing;
+ ULONG m_refCount;
+};
+
+#endif // !defined(EditingDelegate_h)
diff --git a/WebKitTools/DumpRenderTree/win/EventSender.cpp b/WebKitTools/DumpRenderTree/win/EventSender.cpp
new file mode 100644
index 0000000..efecc03
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/EventSender.cpp
@@ -0,0 +1,597 @@
+/*
+ * Copyright (C) 2007, 2008 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "EventSender.h"
+
+#include "DraggingInfo.h"
+#include "DumpRenderTree.h"
+
+#include <WebCore/COMPtr.h>
+#include <wtf/ASCIICType.h>
+#include <wtf/Platform.h>
+#include <JavaScriptCore/JavaScriptCore.h>
+#include <JavaScriptCore/Assertions.h>
+#include <WebKit/WebKit.h>
+#include <windows.h>
+
+#define WM_DRT_SEND_QUEUED_EVENT (WM_APP+1)
+
+static bool down;
+static bool dragMode = true;
+static bool replayingSavedEvents;
+static int timeOffset;
+static POINT lastMousePosition;
+
+struct DelayedMessage {
+ MSG msg;
+ unsigned delay;
+};
+
+static DelayedMessage msgQueue[1024];
+static unsigned endOfQueue;
+static unsigned startOfQueue;
+
+static bool didDragEnter;
+DraggingInfo* draggingInfo = 0;
+
+static JSValueRef getDragModeCallback(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
+{
+ return JSValueMakeBoolean(context, dragMode);
+}
+
+static bool setDragModeCallback(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
+{
+ dragMode = JSValueToBoolean(context, value);
+ return true;
+}
+
+static JSValueRef getConstantCallback(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
+{
+ if (JSStringIsEqualToUTF8CString(propertyName, "WM_KEYDOWN"))
+ return JSValueMakeNumber(context, WM_KEYDOWN);
+ if (JSStringIsEqualToUTF8CString(propertyName, "WM_KEYUP"))
+ return JSValueMakeNumber(context, WM_KEYUP);
+ if (JSStringIsEqualToUTF8CString(propertyName, "WM_CHAR"))
+ return JSValueMakeNumber(context, WM_CHAR);
+ if (JSStringIsEqualToUTF8CString(propertyName, "WM_DEADCHAR"))
+ return JSValueMakeNumber(context, WM_DEADCHAR);
+ if (JSStringIsEqualToUTF8CString(propertyName, "WM_SYSKEYDOWN"))
+ return JSValueMakeNumber(context, WM_SYSKEYDOWN);
+ if (JSStringIsEqualToUTF8CString(propertyName, "WM_SYSKEYUP"))
+ return JSValueMakeNumber(context, WM_SYSKEYUP);
+ if (JSStringIsEqualToUTF8CString(propertyName, "WM_SYSCHAR"))
+ return JSValueMakeNumber(context, WM_SYSCHAR);
+ if (JSStringIsEqualToUTF8CString(propertyName, "WM_SYSDEADCHAR"))
+ return JSValueMakeNumber(context, WM_SYSDEADCHAR);
+ ASSERT_NOT_REACHED();
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef leapForwardCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ if (argumentCount > 0) {
+ msgQueue[endOfQueue].delay = JSValueToNumber(context, arguments[0], exception);
+ ASSERT(!exception || !*exception);
+ }
+
+ return JSValueMakeUndefined(context);
+}
+
+static DWORD currentEventTime()
+{
+ return ::GetTickCount() + timeOffset;
+}
+
+static MSG makeMsg(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ MSG result = {0};
+ result.hwnd = hwnd;
+ result.message = message;
+ result.wParam = wParam;
+ result.lParam = lParam;
+ result.time = currentEventTime();
+ result.pt = lastMousePosition;
+
+ return result;
+}
+
+static LRESULT dispatchMessage(const MSG* msg)
+{
+ ASSERT(msg);
+ ::TranslateMessage(msg);
+ return ::DispatchMessage(msg);
+}
+
+static JSValueRef contextClickCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ COMPtr<IWebFramePrivate> framePrivate;
+ if (SUCCEEDED(frame->QueryInterface(&framePrivate)))
+ framePrivate->layout();
+
+ down = true;
+ MSG msg = makeMsg(webViewWindow, WM_RBUTTONDOWN, 0, MAKELPARAM(lastMousePosition.x, lastMousePosition.y));
+ dispatchMessage(&msg);
+ down = false;
+ msg = makeMsg(webViewWindow, WM_RBUTTONUP, 0, MAKELPARAM(lastMousePosition.x, lastMousePosition.y));
+ dispatchMessage(&msg);
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef mouseDownCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ COMPtr<IWebFramePrivate> framePrivate;
+ if (SUCCEEDED(frame->QueryInterface(&framePrivate)))
+ framePrivate->layout();
+
+ down = true;
+ MSG msg = makeMsg(webViewWindow, WM_LBUTTONDOWN, 0, MAKELPARAM(lastMousePosition.x, lastMousePosition.y));
+ if (!msgQueue[endOfQueue].delay)
+ dispatchMessage(&msg);
+ else {
+ // replaySavedEvents has the required logic to make leapForward delays work
+ msgQueue[endOfQueue++].msg = msg;
+ replaySavedEvents();
+ }
+
+ return JSValueMakeUndefined(context);
+}
+
+static inline POINTL pointl(const POINT& point)
+{
+ POINTL result;
+ result.x = point.x;
+ result.y = point.y;
+ return result;
+}
+
+static void doMouseUp(MSG msg)
+{
+ COMPtr<IWebFramePrivate> framePrivate;
+ if (SUCCEEDED(frame->QueryInterface(&framePrivate)))
+ framePrivate->layout();
+
+ dispatchMessage(&msg);
+ down = false;
+
+ if (draggingInfo) {
+ COMPtr<IWebView> webView;
+ COMPtr<IDropTarget> webViewDropTarget;
+ if (SUCCEEDED(frame->webView(&webView)) && SUCCEEDED(webView->QueryInterface(IID_IDropTarget, (void**)&webViewDropTarget))) {
+ POINT screenPoint = msg.pt;
+ DWORD effect = 0;
+ ::ClientToScreen(webViewWindow, &screenPoint);
+ if (!didDragEnter) {
+ webViewDropTarget->DragEnter(draggingInfo->dataObject(), 0, pointl(screenPoint), &effect);
+ didDragEnter = true;
+ }
+ HRESULT hr = draggingInfo->dropSource()->QueryContinueDrag(0, 0);
+ webViewDropTarget->DragOver(0, pointl(screenPoint), &effect);
+ if (hr == DRAGDROP_S_DROP && effect != DROPEFFECT_NONE) {
+ DWORD effect = 0;
+ webViewDropTarget->Drop(draggingInfo->dataObject(), 0, pointl(screenPoint), &effect);
+ } else
+ webViewDropTarget->DragLeave();
+
+ delete draggingInfo;
+ draggingInfo = 0;
+ }
+ }
+}
+
+static JSValueRef mouseUpCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ MSG msg = makeMsg(webViewWindow, WM_LBUTTONUP, 0, MAKELPARAM(lastMousePosition.x, lastMousePosition.y));
+
+ if ((dragMode && !replayingSavedEvents) || msgQueue[endOfQueue].delay) {
+ msgQueue[endOfQueue++].msg = msg;
+ replaySavedEvents();
+ } else
+ doMouseUp(msg);
+
+ return JSValueMakeUndefined(context);
+}
+
+static void doMouseMove(MSG msg)
+{
+ COMPtr<IWebFramePrivate> framePrivate;
+ if (SUCCEEDED(frame->QueryInterface(&framePrivate)))
+ framePrivate->layout();
+
+ dispatchMessage(&msg);
+
+ if (down && draggingInfo) {
+ POINT screenPoint = msg.pt;
+ ::ClientToScreen(webViewWindow, &screenPoint);
+
+ IWebView* webView;
+ COMPtr<IDropTarget> webViewDropTarget;
+ if (SUCCEEDED(frame->webView(&webView)) && SUCCEEDED(webView->QueryInterface(IID_IDropTarget, (void**)&webViewDropTarget))) {
+ DWORD effect = 0;
+ if (didDragEnter)
+ webViewDropTarget->DragOver(MK_LBUTTON, pointl(screenPoint), &effect);
+ else {
+ webViewDropTarget->DragEnter(draggingInfo->dataObject(), 0, pointl(screenPoint), &effect);
+ didDragEnter = true;
+ }
+ draggingInfo->dropSource()->GiveFeedback(effect);
+ }
+ }
+}
+
+static JSValueRef mouseMoveToCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ if (argumentCount < 2)
+ return JSValueMakeUndefined(context);
+
+ lastMousePosition.x = (int)JSValueToNumber(context, arguments[0], exception);
+ ASSERT(!exception || !*exception);
+ lastMousePosition.y = (int)JSValueToNumber(context, arguments[1], exception);
+ ASSERT(!exception || !*exception);
+
+ MSG msg = makeMsg(webViewWindow, WM_MOUSEMOVE, down ? MK_LBUTTON : 0, MAKELPARAM(lastMousePosition.x, lastMousePosition.y));
+
+ if (dragMode && down && !replayingSavedEvents) {
+ msgQueue[endOfQueue++].msg = msg;
+ return JSValueMakeUndefined(context);
+ }
+
+ doMouseMove(msg);
+
+ return JSValueMakeUndefined(context);
+}
+
+void replaySavedEvents()
+{
+ replayingSavedEvents = true;
+
+ MSG msg = { 0 };
+
+ while (startOfQueue < endOfQueue && !msgQueue[startOfQueue].delay) {
+ msg = msgQueue[startOfQueue++].msg;
+ switch (msg.message) {
+ case WM_LBUTTONUP:
+ doMouseUp(msg);
+ break;
+ case WM_MOUSEMOVE:
+ doMouseMove(msg);
+ break;
+ case WM_LBUTTONDOWN:
+ dispatchMessage(&msg);
+ break;
+ default:
+ // Not reached
+ break;
+ }
+ }
+
+ int numQueuedMessages = endOfQueue - startOfQueue;
+ if (!numQueuedMessages) {
+ startOfQueue = 0;
+ endOfQueue = 0;
+ replayingSavedEvents = false;
+ ASSERT(!down);
+ return;
+ }
+
+ if (msgQueue[startOfQueue].delay) {
+ ::Sleep(msgQueue[startOfQueue].delay);
+ msgQueue[startOfQueue].delay = 0;
+ }
+
+ ::PostMessage(webViewWindow, WM_DRT_SEND_QUEUED_EVENT, 0, 0);
+ while (::GetMessage(&msg, webViewWindow, 0, 0)) {
+ // FIXME: Why do we get a WM_MOUSELEAVE? it breaks tests
+ if (msg.message == WM_MOUSELEAVE)
+ continue;
+ if (msg.message != WM_DRT_SEND_QUEUED_EVENT) {
+ dispatchMessage(&msg);
+ continue;
+ }
+ msg = msgQueue[startOfQueue++].msg;
+ switch (msg.message) {
+ case WM_LBUTTONUP:
+ doMouseUp(msg);
+ break;
+ case WM_MOUSEMOVE:
+ doMouseMove(msg);
+ break;
+ case WM_LBUTTONDOWN:
+ dispatchMessage(&msg);
+ break;
+ default:
+ // Not reached
+ break;
+ }
+ if (startOfQueue >= endOfQueue)
+ break;
+ ::Sleep(msgQueue[startOfQueue].delay);
+ msgQueue[startOfQueue].delay = 0;
+ ::PostMessage(webViewWindow, WM_DRT_SEND_QUEUED_EVENT, 0, 0);
+ }
+ startOfQueue = 0;
+ endOfQueue = 0;
+
+ replayingSavedEvents = false;
+}
+
+static JSValueRef keyDownCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ static const JSStringRef lengthProperty = JSStringCreateWithUTF8CString("length");
+
+ COMPtr<IWebFramePrivate> framePrivate;
+ if (SUCCEEDED(frame->QueryInterface(&framePrivate)))
+ framePrivate->layout();
+
+ JSStringRef character = JSValueToStringCopy(context, arguments[0], exception);
+ ASSERT(!*exception);
+ int virtualKeyCode;
+ int charCode = 0;
+ int keyData = 1;
+ bool needsShiftKeyModifier = false;
+ if (JSStringIsEqualToUTF8CString(character, "leftArrow")) {
+ virtualKeyCode = VK_LEFT;
+ keyData += KF_EXTENDED << 16; // In this case, extended means "not keypad".
+ } else if (JSStringIsEqualToUTF8CString(character, "rightArrow")) {
+ virtualKeyCode = VK_RIGHT;
+ keyData += KF_EXTENDED << 16;
+ } else if (JSStringIsEqualToUTF8CString(character, "upArrow")) {
+ virtualKeyCode = VK_UP;
+ keyData += KF_EXTENDED << 16;
+ } else if (JSStringIsEqualToUTF8CString(character, "downArrow")) {
+ virtualKeyCode = VK_DOWN;
+ keyData += KF_EXTENDED << 16;
+ } else if (JSStringIsEqualToUTF8CString(character, "pageUp"))
+ virtualKeyCode = VK_PRIOR;
+ else if (JSStringIsEqualToUTF8CString(character, "pageDown"))
+ virtualKeyCode = VK_NEXT;
+ else if (JSStringIsEqualToUTF8CString(character, "home"))
+ virtualKeyCode = VK_HOME;
+ else if (JSStringIsEqualToUTF8CString(character, "end"))
+ virtualKeyCode = VK_END;
+ else if (JSStringIsEqualToUTF8CString(character, "delete"))
+ virtualKeyCode = VK_BACK;
+ else {
+ charCode = JSStringGetCharactersPtr(character)[0];
+ virtualKeyCode = LOBYTE(VkKeyScan(charCode));
+ if (WTF::isASCIIUpper(charCode))
+ needsShiftKeyModifier = true;
+ }
+ JSStringRelease(character);
+
+ BYTE keyState[256];
+ if (argumentCount > 1 || needsShiftKeyModifier) {
+ ::GetKeyboardState(keyState);
+
+ BYTE newKeyState[256];
+ memcpy(newKeyState, keyState, sizeof(keyState));
+
+ if (needsShiftKeyModifier)
+ newKeyState[VK_SHIFT] = 0x80;
+
+ if (argumentCount > 1) {
+ JSObjectRef modifiersArray = JSValueToObject(context, arguments[1], exception);
+ if (modifiersArray) {
+ int modifiersCount = JSValueToNumber(context, JSObjectGetProperty(context, modifiersArray, lengthProperty, 0), 0);
+ for (int i = 0; i < modifiersCount; ++i) {
+ JSValueRef value = JSObjectGetPropertyAtIndex(context, modifiersArray, i, 0);
+ JSStringRef string = JSValueToStringCopy(context, value, 0);
+ if (JSStringIsEqualToUTF8CString(string, "ctrlKey"))
+ newKeyState[VK_CONTROL] = 0x80;
+ else if (JSStringIsEqualToUTF8CString(string, "shiftKey"))
+ newKeyState[VK_SHIFT] = 0x80;
+ else if (JSStringIsEqualToUTF8CString(string, "altKey"))
+ newKeyState[VK_MENU] = 0x80;
+
+ JSStringRelease(string);
+ }
+ }
+ }
+
+ ::SetKeyboardState(newKeyState);
+ }
+
+ MSG msg = makeMsg(webViewWindow, (::GetKeyState(VK_MENU) & 0x8000) ? WM_SYSKEYDOWN : WM_KEYDOWN, virtualKeyCode, keyData);
+ if (virtualKeyCode != 255)
+ dispatchMessage(&msg);
+ else {
+ // For characters that do not exist in the active keyboard layout,
+ // ::Translate will not work, so we post an WM_CHAR event ourselves.
+ ::PostMessage(webViewWindow, WM_CHAR, charCode, 0);
+ }
+
+ // Tests expect that all messages are processed by the time keyDown() returns.
+ if (::PeekMessage(&msg, webViewWindow, WM_CHAR, WM_CHAR, PM_REMOVE) || ::PeekMessage(&msg, webViewWindow, WM_SYSCHAR, WM_SYSCHAR, PM_REMOVE))
+ ::DispatchMessage(&msg);
+
+ MSG msgUp = makeMsg(webViewWindow, (::GetKeyState(VK_MENU) & 0x8000) ? WM_SYSKEYUP : WM_KEYUP, virtualKeyCode, keyData);
+ ::DispatchMessage(&msgUp);
+
+ if (argumentCount > 1 || needsShiftKeyModifier)
+ ::SetKeyboardState(keyState);
+
+ return JSValueMakeUndefined(context);
+}
+
+// eventSender.dispatchMessage(message, wParam, lParam, time = currentEventTime(), x = lastMousePosition.x, y = lastMousePosition.y)
+static JSValueRef dispatchMessageCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ if (argumentCount < 3)
+ return JSValueMakeUndefined(context);
+
+ COMPtr<IWebFramePrivate> framePrivate;
+ if (SUCCEEDED(frame->QueryInterface(&framePrivate)))
+ framePrivate->layout();
+
+ MSG msg = {};
+ msg.hwnd = webViewWindow;
+ msg.message = JSValueToNumber(context, arguments[0], exception);
+ ASSERT(!*exception);
+ msg.wParam = JSValueToNumber(context, arguments[1], exception);
+ ASSERT(!*exception);
+ msg.lParam = static_cast<ULONG_PTR>(JSValueToNumber(context, arguments[2], exception));
+ ASSERT(!*exception);
+ if (argumentCount >= 4) {
+ msg.time = JSValueToNumber(context, arguments[3], exception);
+ ASSERT(!*exception);
+ }
+ if (!msg.time)
+ msg.time = currentEventTime();
+ if (argumentCount >= 6) {
+ msg.pt.x = JSValueToNumber(context, arguments[4], exception);
+ ASSERT(!*exception);
+ msg.pt.y = JSValueToNumber(context, arguments[5], exception);
+ ASSERT(!*exception);
+ } else
+ msg.pt = lastMousePosition;
+
+ ::DispatchMessage(&msg);
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef textZoomInCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return JSValueMakeUndefined(context);
+
+ COMPtr<IWebIBActions> webIBActions(Query, webView);
+ if (!webIBActions)
+ return JSValueMakeUndefined(context);
+
+ webIBActions->makeTextLarger(0);
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef textZoomOutCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return JSValueMakeUndefined(context);
+
+ COMPtr<IWebIBActions> webIBActions(Query, webView);
+ if (!webIBActions)
+ return JSValueMakeUndefined(context);
+
+ webIBActions->makeTextSmaller(0);
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef zoomPageInCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return JSValueMakeUndefined(context);
+
+ COMPtr<IWebIBActions> webIBActions(Query, webView);
+ if (!webIBActions)
+ return JSValueMakeUndefined(context);
+
+ webIBActions->zoomPageIn(0);
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef zoomPageOutCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return JSValueMakeUndefined(context);
+
+ COMPtr<IWebIBActions> webIBActions(Query, webView);
+ if (!webIBActions)
+ return JSValueMakeUndefined(context);
+
+ webIBActions->zoomPageOut(0);
+ return JSValueMakeUndefined(context);
+}
+
+static JSStaticFunction staticFunctions[] = {
+ { "contextClick", contextClickCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "mouseDown", mouseDownCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "mouseUp", mouseUpCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "mouseMoveTo", mouseMoveToCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "leapForward", leapForwardCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "keyDown", keyDownCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "dispatchMessage", dispatchMessageCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "textZoomIn", textZoomInCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "textZoomOut", textZoomOutCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "zoomPageIn", zoomPageInCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "zoomPageOut", zoomPageOutCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { 0, 0, 0 }
+};
+
+static JSStaticValue staticValues[] = {
+ { "dragMode", getDragModeCallback, setDragModeCallback, kJSPropertyAttributeNone },
+ { "WM_KEYDOWN", getConstantCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeNone },
+ { "WM_KEYUP", getConstantCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeNone },
+ { "WM_CHAR", getConstantCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeNone },
+ { "WM_DEADCHAR", getConstantCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeNone },
+ { "WM_SYSKEYDOWN", getConstantCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeNone },
+ { "WM_SYSKEYUP", getConstantCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeNone },
+ { "WM_SYSCHAR", getConstantCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeNone },
+ { "WM_SYSDEADCHAR", getConstantCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeNone },
+ { 0, 0, 0, 0 }
+};
+
+static JSClassRef getClass(JSContextRef context)
+{
+ static JSClassRef eventSenderClass = 0;
+
+ if (!eventSenderClass) {
+ JSClassDefinition classDefinition = {0};
+ classDefinition.staticFunctions = staticFunctions;
+ classDefinition.staticValues = staticValues;
+
+ eventSenderClass = JSClassCreate(&classDefinition);
+ }
+
+ return eventSenderClass;
+}
+
+JSObjectRef makeEventSender(JSContextRef context)
+{
+ down = false;
+ dragMode = true;
+ replayingSavedEvents = false;
+ timeOffset = 0;
+ lastMousePosition.x = 0;
+ lastMousePosition.y = 0;
+
+ endOfQueue = 0;
+ startOfQueue = 0;
+
+ didDragEnter = false;
+ draggingInfo = 0;
+
+ return JSObjectMake(context, getClass(context), 0);
+}
diff --git a/WebKitTools/DumpRenderTree/win/EventSender.h b/WebKitTools/DumpRenderTree/win/EventSender.h
new file mode 100644
index 0000000..9ae0aec
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/EventSender.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef EventSender_h
+#define EventSender_h
+
+class DraggingInfo;
+
+typedef const struct OpaqueJSContext* JSContextRef;
+typedef struct OpaqueJSValue* JSObjectRef;
+
+JSObjectRef makeEventSender(JSContextRef context);
+void replaySavedEvents();
+
+extern DraggingInfo* draggingInfo;
+
+#endif
diff --git a/WebKitTools/DumpRenderTree/win/FrameLoadDelegate.cpp b/WebKitTools/DumpRenderTree/win/FrameLoadDelegate.cpp
new file mode 100644
index 0000000..b18b961
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/FrameLoadDelegate.cpp
@@ -0,0 +1,314 @@
+/*
+ * Copyright (C) 2005, 2006, 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "FrameLoadDelegate.h"
+
+#include "AccessibilityController.h"
+#include "DumpRenderTree.h"
+#include "EventSender.h"
+#include "GCController.h"
+#include "LayoutTestController.h"
+#include "WorkQueueItem.h"
+#include "WorkQueue.h"
+#include <WebCore/COMPtr.h>
+#include <JavaScriptCore/Assertions.h>
+#include <JavaScriptCore/JavaScriptCore.h>
+#include <WebKit/WebKit.h>
+#include <wtf/Vector.h>
+#include <stdio.h>
+#include <string>
+
+using std::string;
+
+static FrameLoadDelegate* g_delegateWaitingOnTimer;
+
+string BSTRtoString(BSTR bstr)
+{
+ int result = WideCharToMultiByte(CP_UTF8, 0, bstr, SysStringLen(bstr) + 1, 0, 0, 0, 0);
+ Vector<char> utf8Vector(result);
+ result = WideCharToMultiByte(CP_UTF8, 0, bstr, SysStringLen(bstr) + 1, utf8Vector.data(), result, 0, 0);
+ if (!result)
+ return string();
+
+ return string(utf8Vector.data(), utf8Vector.size() - 1);
+}
+
+string descriptionSuitableForTestResult(IWebFrame* webFrame)
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(webFrame->webView(&webView)))
+ return string();
+
+ COMPtr<IWebFrame> mainFrame;
+ if (FAILED(webView->mainFrame(&mainFrame)))
+ return string();
+
+ BSTR frameNameBSTR;
+ if (FAILED(webFrame->name(&frameNameBSTR)) || BSTRtoString(frameNameBSTR).empty() )
+ return (webFrame == mainFrame) ? "main frame" : string();
+
+ string frameName = (webFrame == mainFrame) ? "main frame" : "frame";
+ frameName += " \"" + BSTRtoString(frameNameBSTR) + "\"";
+
+ SysFreeString(frameNameBSTR);
+
+ return frameName;
+}
+
+FrameLoadDelegate::FrameLoadDelegate()
+ : m_refCount(1)
+ , m_gcController(new GCController)
+ , m_accessibilityController(new AccessibilityController)
+{
+}
+
+FrameLoadDelegate::~FrameLoadDelegate()
+{
+}
+
+HRESULT STDMETHODCALLTYPE FrameLoadDelegate::QueryInterface(REFIID riid, void** ppvObject)
+{
+ *ppvObject = 0;
+ if (IsEqualGUID(riid, IID_IUnknown))
+ *ppvObject = static_cast<IWebFrameLoadDelegate*>(this);
+ else if (IsEqualGUID(riid, IID_IWebFrameLoadDelegate))
+ *ppvObject = static_cast<IWebFrameLoadDelegate*>(this);
+ else if (IsEqualGUID(riid, IID_IWebFrameLoadDelegate2))
+ *ppvObject = static_cast<IWebFrameLoadDelegate*>(this);
+ else if (IsEqualGUID(riid, IID_IWebFrameLoadDelegatePrivate))
+ *ppvObject = static_cast<IWebFrameLoadDelegatePrivate*>(this);
+ else
+ return E_NOINTERFACE;
+
+ AddRef();
+ return S_OK;
+}
+
+ULONG STDMETHODCALLTYPE FrameLoadDelegate::AddRef(void)
+{
+ return ++m_refCount;
+}
+
+ULONG STDMETHODCALLTYPE FrameLoadDelegate::Release(void)
+{
+ ULONG newRef = --m_refCount;
+ if (!newRef)
+ delete(this);
+
+ return newRef;
+}
+
+
+HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didStartProvisionalLoadForFrame(
+ /* [in] */ IWebView* webView,
+ /* [in] */ IWebFrame* frame)
+{
+ if (!done && gLayoutTestController->dumpFrameLoadCallbacks())
+ printf("%s - didStartProvisionalLoadForFrame\n",
+ descriptionSuitableForTestResult(frame).c_str());
+
+ // Make sure we only set this once per test. If it gets cleared, and then set again, we might
+ // end up doing two dumps for one test.
+ if (!topLoadingFrame && !done)
+ topLoadingFrame = frame;
+
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didFailProvisionalLoadWithError(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebError *error,
+ /* [in] */ IWebFrame *frame)
+{
+ if (!done && gLayoutTestController->dumpFrameLoadCallbacks())
+ printf("%s - didFailProvisionalLoadWithError\n",
+ descriptionSuitableForTestResult(frame).c_str());
+
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didCommitLoadForFrame(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebFrame *frame)
+{
+ COMPtr<IWebViewPrivate> webViewPrivate;
+ HRESULT hr = webView->QueryInterface(&webViewPrivate);
+ if (FAILED(hr))
+ return hr;
+ webViewPrivate->updateFocusedAndActiveState();
+
+ if (!done && gLayoutTestController->dumpFrameLoadCallbacks())
+ printf("%s - didCommitLoadForFrame\n",
+ descriptionSuitableForTestResult(frame).c_str());
+
+
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didReceiveTitle(
+ /* [in] */ IWebView *webView,
+ /* [in] */ BSTR title,
+ /* [in] */ IWebFrame *frame)
+{
+ if (::gLayoutTestController->dumpTitleChanges() && !done)
+ printf("TITLE CHANGED: %S\n", title ? title : L"");
+ return S_OK;
+}
+
+void FrameLoadDelegate::processWork()
+{
+ // quit doing work once a load is in progress
+ while (!topLoadingFrame && WorkQueue::shared()->count()) {
+ WorkQueueItem* item = WorkQueue::shared()->dequeue();
+ ASSERT(item);
+ item->invoke();
+ }
+
+ // if we didn't start a new load, then we finished all the commands, so we're ready to dump state
+ if (!topLoadingFrame && !::gLayoutTestController->waitToDump())
+ dump();
+}
+
+static void CALLBACK processWorkTimer(HWND, UINT, UINT_PTR id, DWORD)
+{
+ ::KillTimer(0, id);
+ FrameLoadDelegate* d = g_delegateWaitingOnTimer;
+ g_delegateWaitingOnTimer = 0;
+ d->processWork();
+}
+
+void FrameLoadDelegate::locationChangeDone(IWebError*, IWebFrame* frame)
+{
+ if (frame != topLoadingFrame)
+ return;
+
+ topLoadingFrame = 0;
+ WorkQueue::shared()->setFrozen(true);
+
+ if (::gLayoutTestController->waitToDump())
+ return;
+
+ if (WorkQueue::shared()->count()) {
+ ASSERT(!g_delegateWaitingOnTimer);
+ g_delegateWaitingOnTimer = this;
+ ::SetTimer(0, 0, 0, processWorkTimer);
+ return;
+ }
+
+ dump();
+}
+
+HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didFinishLoadForFrame(
+ /* [in] */ IWebView* webView,
+ /* [in] */ IWebFrame* frame)
+{
+ if (!done && gLayoutTestController->dumpFrameLoadCallbacks())
+ printf("%s - didFinishLoadForFrame\n",
+ descriptionSuitableForTestResult(frame).c_str());
+
+ locationChangeDone(0, frame);
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didFailLoadWithError(
+ /* [in] */ IWebView* webView,
+ /* [in] */ IWebError* error,
+ /* [in] */ IWebFrame* forFrame)
+{
+ locationChangeDone(error, forFrame);
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE FrameLoadDelegate::willCloseFrame(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebFrame *frame)
+{
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didClearWindowObject(
+ /* [in] */ IWebView*webView,
+ /* [in] */ JSContextRef context,
+ /* [in] */ JSObjectRef windowObject,
+ /* [in] */ IWebFrame* frame)
+{
+ JSValueRef exception = 0;
+
+ ::gLayoutTestController->makeWindowObject(context, windowObject, &exception);
+ ASSERT(!exception);
+
+ m_gcController->makeWindowObject(context, windowObject, &exception);
+ ASSERT(!exception);
+
+ m_accessibilityController->makeWindowObject(context, windowObject, &exception);
+ ASSERT(!exception);
+
+ JSStringRef eventSenderStr = JSStringCreateWithUTF8CString("eventSender");
+ JSValueRef eventSender = makeEventSender(context);
+ JSObjectSetProperty(context, windowObject, eventSenderStr, eventSender, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, 0);
+ JSStringRelease(eventSenderStr);
+
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didFinishDocumentLoadForFrame(
+ /* [in] */ IWebView *sender,
+ /* [in] */ IWebFrame *frame)
+{
+ if (!done && gLayoutTestController->dumpFrameLoadCallbacks())
+ printf("%s - didFinishDocumentLoadForFrame\n",
+ descriptionSuitableForTestResult(frame).c_str());
+ if (!done) {
+ COMPtr<IWebFramePrivate> webFramePrivate;
+ HRESULT hr = frame->QueryInterface(&webFramePrivate);
+ if (FAILED(hr))
+ return hr;
+ unsigned pendingFrameUnloadEvents;
+ hr = webFramePrivate->pendingFrameUnloadEventCount(&pendingFrameUnloadEvents);
+ if (FAILED(hr))
+ return hr;
+ if (pendingFrameUnloadEvents)
+ printf("%s - has %u onunload handler(s)\n",
+ descriptionSuitableForTestResult(frame).c_str(), pendingFrameUnloadEvents);
+ }
+
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didHandleOnloadEventsForFrame(
+ /* [in] */ IWebView *sender,
+ /* [in] */ IWebFrame *frame)
+{
+ if (!done && gLayoutTestController->dumpFrameLoadCallbacks())
+ printf("%s - didHandleOnloadEventsForFrame\n",
+ descriptionSuitableForTestResult(frame).c_str());
+
+ return S_OK;
+}
+
diff --git a/WebKitTools/DumpRenderTree/win/FrameLoadDelegate.h b/WebKitTools/DumpRenderTree/win/FrameLoadDelegate.h
new file mode 100644
index 0000000..1a134fc
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/FrameLoadDelegate.h
@@ -0,0 +1,139 @@
+/*
+ * Copyright (C) 2005, 2006, 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef FrameLoadDelegate_h
+#define FrameLoadDelegate_h
+
+#include <WebKit/WebKit.h>
+#include <wtf/OwnPtr.h>
+
+class AccessibilityController;
+class GCController;
+
+class FrameLoadDelegate : public IWebFrameLoadDelegate2, public IWebFrameLoadDelegatePrivate {
+public:
+ FrameLoadDelegate();
+ virtual ~FrameLoadDelegate();
+
+ void processWork();
+
+ // IUnknown
+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
+ virtual ULONG STDMETHODCALLTYPE AddRef(void);
+ virtual ULONG STDMETHODCALLTYPE Release(void);
+
+ // IWebFrameLoadDelegate
+ virtual HRESULT STDMETHODCALLTYPE didStartProvisionalLoadForFrame(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebFrame *frame);
+
+ virtual HRESULT STDMETHODCALLTYPE didReceiveServerRedirectForProvisionalLoadForFrame(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebFrame *frame) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE didFailProvisionalLoadWithError(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebError *error,
+ /* [in] */ IWebFrame *frame);
+
+ virtual HRESULT STDMETHODCALLTYPE didCommitLoadForFrame(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebFrame *frame);
+
+ virtual HRESULT STDMETHODCALLTYPE didReceiveTitle(
+ /* [in] */ IWebView *webView,
+ /* [in] */ BSTR title,
+ /* [in] */ IWebFrame *frame);
+
+ virtual HRESULT STDMETHODCALLTYPE didReceiveIcon(
+ /* [in] */ IWebView *webView,
+ /* [in] */ OLE_HANDLE image,
+ /* [in] */ IWebFrame *frame) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE didFinishLoadForFrame(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebFrame *frame);
+
+ virtual HRESULT STDMETHODCALLTYPE didFailLoadWithError(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebError *error,
+ /* [in] */ IWebFrame *forFrame);
+
+ virtual HRESULT STDMETHODCALLTYPE didChangeLocationWithinPageForFrame(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebFrame *frame) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE willPerformClientRedirectToURL(
+ /* [in] */ IWebView *webView,
+ /* [in] */ BSTR url,
+ /* [in] */ double delaySeconds,
+ /* [in] */ DATE fireDate,
+ /* [in] */ IWebFrame *frame) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE didCancelClientRedirectForFrame(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebFrame *frame) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE willCloseFrame(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebFrame *frame);
+
+ virtual HRESULT STDMETHODCALLTYPE windowScriptObjectAvailable(
+ /* [in] */ IWebView *sender,
+ /* [in] */ JSContextRef context,
+ /* [in] */ JSObjectRef windowObject) { return E_NOTIMPL; }
+
+ // IWebFrameLoadDelegatePrivate
+ virtual HRESULT STDMETHODCALLTYPE didFinishDocumentLoadForFrame(
+ /* [in] */ IWebView *sender,
+ /* [in] */ IWebFrame *frame);
+
+ virtual HRESULT STDMETHODCALLTYPE didFirstLayoutInFrame(
+ /* [in] */ IWebView *sender,
+ /* [in] */ IWebFrame *frame) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE didHandleOnloadEventsForFrame(
+ /* [in] */ IWebView *sender,
+ /* [in] */ IWebFrame *frame);
+
+ // IWebFrameLoadDelegate2
+ virtual /* [local] */ HRESULT STDMETHODCALLTYPE didClearWindowObject(
+ /* [in] */ IWebView* webView,
+ /* [in] */ JSContextRef context,
+ /* [in] */ JSObjectRef windowObject,
+ /* [in] */ IWebFrame* frame);
+
+protected:
+ void locationChangeDone(IWebError*, IWebFrame*);
+
+ ULONG m_refCount;
+ OwnPtr<GCController> m_gcController;
+ OwnPtr<AccessibilityController> m_accessibilityController;
+};
+
+#endif // FrameLoadDelegate_h
diff --git a/WebKitTools/DumpRenderTree/win/GCControllerWin.cpp b/WebKitTools/DumpRenderTree/win/GCControllerWin.cpp
new file mode 100644
index 0000000..547aabc
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/GCControllerWin.cpp
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "GCController.h"
+
+#include "DumpRenderTree.h"
+#include <WebCore/COMPtr.h>
+#include <WebKit/WebKit.h>
+
+void GCController::collect() const
+{
+ COMPtr<IWebJavaScriptCollector> collector;
+ if (FAILED(::CoCreateInstance(CLSID_WebJavaScriptCollector, 0, CLSCTX_ALL, IID_IWebJavaScriptCollector, (void**)&collector)))
+ return;
+ collector->collect();
+}
+
+void GCController::collectOnAlternateThread(bool waitUntilDone) const
+{
+ COMPtr<IWebJavaScriptCollector> collector;
+ if (FAILED(::CoCreateInstance(CLSID_WebJavaScriptCollector, 0, CLSCTX_ALL, IID_IWebJavaScriptCollector, (void**)&collector)))
+ return;
+ collector->collectOnAlternateThread(waitUntilDone ? TRUE : FALSE);
+}
+
+size_t GCController::getJSObjectCount() const
+{
+ COMPtr<IWebJavaScriptCollector> collector;
+ if (FAILED(::CoCreateInstance(CLSID_WebJavaScriptCollector, 0, CLSCTX_ALL, IID_IWebJavaScriptCollector, (void**)&collector)))
+ return 0;
+ UINT objects = 0;
+ collector->objectCount(&objects);
+ return objects;
+}
diff --git a/WebKitTools/DumpRenderTree/win/ImageDiff.vcproj b/WebKitTools/DumpRenderTree/win/ImageDiff.vcproj
new file mode 100644
index 0000000..c045026
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/ImageDiff.vcproj
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="ImageDiff"
+ ProjectGUID="{59CC0547-70AC-499C-9B19-EC01C6F61137}"
+ RootNamespace="ImageDiff"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
+ AdditionalLibraryDirectories=""
+ SubSystem="1"
+ />
+ <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="if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;&#x0D;&#x0A;if &quot;$(ARCHIVE_BUILD)&quot;==&quot;&quot; (if not &quot;$(PRODUCTION)&quot;==&quot;&quot; exit /b)&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll&quot; exit /b&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CoreFoundation.resources&quot; &quot;$(WebKitOutputDir)\bin\CoreFoundation.resources&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CharacterSets&quot; &quot;$(WebKitOutputDir)\bin\CharacterSets&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt38.dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt38$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuin38$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuin38$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuuc38$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuuc38$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\zlib1$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\zlib1$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
+ AdditionalLibraryDirectories=""
+ SubSystem="1"
+ />
+ <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="if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;&#x0D;&#x0A;if &quot;$(ARCHIVE_BUILD)&quot;==&quot;&quot; (if not &quot;$(PRODUCTION)&quot;==&quot;&quot; exit /b)&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll&quot; exit /b&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CoreFoundation.resources&quot; &quot;$(WebKitOutputDir)\bin\CoreFoundation.resources&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CharacterSets&quot; &quot;$(WebKitOutputDir)\bin\CharacterSets&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt38.dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt38$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuin38$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuin38$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuuc38$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuuc38$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\zlib1$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\zlib1$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;"
+ />
+ </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"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
+ AdditionalLibraryDirectories=""
+ SubSystem="1"
+ />
+ <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="if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;&#x0D;&#x0A;if &quot;$(ARCHIVE_BUILD)&quot;==&quot;&quot; (if not &quot;$(PRODUCTION)&quot;==&quot;&quot; exit /b)&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll&quot; exit /b&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CoreFoundation.resources&quot; &quot;$(WebKitOutputDir)\bin\CoreFoundation.resources&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CharacterSets&quot; &quot;$(WebKitOutputDir)\bin\CharacterSets&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt38.dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt38$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuin38$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuin38$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuuc38$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuuc38$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\zlib1$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\zlib1$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="..\cg\ImageDiffCG.cpp"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp b/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
new file mode 100644
index 0000000..ec5139b
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
@@ -0,0 +1,745 @@
+/*
+ * Copyright (C) 2006, 2007, 2008, 2009 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "LayoutTestController.h"
+
+#include "DumpRenderTree.h"
+#include "EditingDelegate.h"
+#include "PolicyDelegate.h"
+#include "WorkQueue.h"
+#include "WorkQueueItem.h"
+#include <WebCore/COMPtr.h>
+#include <wtf/Platform.h>
+#include <wtf/RetainPtr.h>
+#include <wtf/Vector.h>
+#include <JavaScriptCore/Assertions.h>
+#include <JavaScriptCore/JavaScriptCore.h>
+#include <JavaScriptCore/JSRetainPtr.h>
+#include <JavaScriptCore/JSStringRefBSTR.h>
+#include <WebKit/WebKit.h>
+#include <string>
+#include <CoreFoundation/CoreFoundation.h>
+#include <shlwapi.h>
+#include <shlguid.h>
+#include <shobjidl.h>
+
+using std::string;
+using std::wstring;
+
+static bool resolveCygwinPath(const wstring& cygwinPath, wstring& windowsPath);
+
+LayoutTestController::~LayoutTestController()
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ // reset webview-related states back to default values in preparation for next test
+
+ COMPtr<IWebViewPrivate> viewPrivate;
+ if (SUCCEEDED(webView->QueryInterface(&viewPrivate)))
+ viewPrivate->setTabKeyCyclesThroughElements(TRUE);
+
+ COMPtr<IWebViewEditing> viewEditing;
+ if (FAILED(webView->QueryInterface(&viewEditing)))
+ return;
+ COMPtr<IWebEditingDelegate> delegate;
+ if (FAILED(viewEditing->editingDelegate(&delegate)))
+ return;
+ COMPtr<EditingDelegate> editingDelegate(Query, viewEditing.get());
+ if (editingDelegate)
+ editingDelegate->setAcceptsEditing(TRUE);
+}
+
+void LayoutTestController::addDisallowedURL(JSStringRef url)
+{
+ // FIXME: Implement!
+}
+
+void LayoutTestController::clearBackForwardList()
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ COMPtr<IWebBackForwardList> backForwardList;
+ if (FAILED(webView->backForwardList(&backForwardList)))
+ return;
+
+ COMPtr<IWebHistoryItem> item;
+ if (FAILED(backForwardList->currentItem(&item)))
+ return;
+
+ // We clear the history by setting the back/forward list's capacity to 0
+ // then restoring it back and adding back the current item.
+ int capacity;
+ if (FAILED(backForwardList->capacity(&capacity)))
+ return;
+
+ backForwardList->setCapacity(0);
+ backForwardList->setCapacity(capacity);
+ backForwardList->addItem(item.get());
+ backForwardList->goToItem(item.get());
+}
+
+JSStringRef LayoutTestController::copyDecodedHostName(JSStringRef name)
+{
+ // FIXME: Implement!
+ return 0;
+}
+
+JSStringRef LayoutTestController::copyEncodedHostName(JSStringRef name)
+{
+ // FIXME: Implement!
+ return 0;
+}
+
+void LayoutTestController::display()
+{
+ displayWebView();
+}
+
+void LayoutTestController::keepWebHistory()
+{
+ COMPtr<IWebHistory> history(Create, CLSID_WebHistory);
+ if (!history)
+ return;
+
+ COMPtr<IWebHistory> sharedHistory(Create, CLSID_WebHistory);
+ if (!sharedHistory)
+ return;
+
+ history->setOptionalSharedHistory(sharedHistory.get());
+}
+
+size_t LayoutTestController::webHistoryItemCount()
+{
+ COMPtr<IWebHistory> history(Create, CLSID_WebHistory);
+ if (!history)
+ return 0;
+
+ COMPtr<IWebHistory> sharedHistory;
+ if (FAILED(history->optionalSharedHistory(&sharedHistory)) || !sharedHistory)
+ return 0;
+
+ COMPtr<IWebHistoryPrivate> sharedHistoryPrivate;
+ if (FAILED(sharedHistory->QueryInterface(&sharedHistoryPrivate)))
+ return 0;
+
+ int count;
+ if (FAILED(sharedHistoryPrivate->allItems(&count, 0)))
+ return 0;
+
+ return count;
+}
+
+void LayoutTestController::notifyDone()
+{
+ // Same as on mac. This can be shared.
+ if (m_waitToDump && !topLoadingFrame && !WorkQueue::shared()->count())
+ dump();
+ m_waitToDump = false;
+}
+
+JSStringRef LayoutTestController::pathToLocalResource(JSContextRef context, JSStringRef url)
+{
+ wstring input(JSStringGetCharactersPtr(url), JSStringGetLength(url));
+
+ wstring localPath;
+ if (!resolveCygwinPath(input, localPath)) {
+ printf("ERROR: Failed to resolve Cygwin path %S\n", input.c_str());
+ return 0;
+ }
+
+ return JSStringCreateWithCharacters(localPath.c_str(), localPath.length());
+}
+
+void LayoutTestController::queueBackNavigation(int howFarBack)
+{
+ // Same as on mac. This can be shared.
+ WorkQueue::shared()->queue(new BackItem(howFarBack));
+}
+
+void LayoutTestController::queueForwardNavigation(int howFarForward)
+{
+ // Same as on mac. This can be shared.
+ WorkQueue::shared()->queue(new ForwardItem(howFarForward));
+}
+
+static wstring jsStringRefToWString(JSStringRef jsStr)
+{
+ size_t length = JSStringGetLength(jsStr);
+ Vector<WCHAR> buffer(length + 1);
+ memcpy(buffer.data(), JSStringGetCharactersPtr(jsStr), length * sizeof(WCHAR));
+ buffer[length] = '\0';
+
+ return buffer.data();
+}
+
+void LayoutTestController::queueLoad(JSStringRef url, JSStringRef target)
+{
+ COMPtr<IWebDataSource> dataSource;
+ if (FAILED(frame->dataSource(&dataSource)))
+ return;
+
+ COMPtr<IWebURLResponse> response;
+ if (FAILED(dataSource->response(&response)) || !response)
+ return;
+
+ BSTR responseURLBSTR;
+ if (FAILED(response->URL(&responseURLBSTR)))
+ return;
+ wstring responseURL(responseURLBSTR, SysStringLen(responseURLBSTR));
+ SysFreeString(responseURLBSTR);
+
+ // FIXME: We should do real relative URL resolution here.
+ int lastSlash = responseURL.rfind('/');
+ if (lastSlash != -1)
+ responseURL = responseURL.substr(0, lastSlash);
+
+ wstring wURL = jsStringRefToWString(url);
+ wstring wAbsoluteURL = responseURL + TEXT("/") + wURL;
+ JSRetainPtr<JSStringRef> jsAbsoluteURL(Adopt, JSStringCreateWithCharacters(wAbsoluteURL.data(), wAbsoluteURL.length()));
+
+ WorkQueue::shared()->queue(new LoadItem(jsAbsoluteURL.get(), target));
+}
+
+void LayoutTestController::queueReload()
+{
+ WorkQueue::shared()->queue(new ReloadItem);
+}
+
+void LayoutTestController::queueScript(JSStringRef script)
+{
+ WorkQueue::shared()->queue(new ScriptItem(script));
+}
+
+void LayoutTestController::setAcceptsEditing(bool acceptsEditing)
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ COMPtr<IWebViewEditing> viewEditing;
+ if (FAILED(webView->QueryInterface(&viewEditing)))
+ return;
+
+ COMPtr<IWebEditingDelegate> delegate;
+ if (FAILED(viewEditing->editingDelegate(&delegate)))
+ return;
+
+ EditingDelegate* editingDelegate = (EditingDelegate*)(IWebEditingDelegate*)delegate.get();
+ editingDelegate->setAcceptsEditing(acceptsEditing);
+}
+
+void LayoutTestController::setAuthorAndUserStylesEnabled(bool flag)
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ COMPtr<IWebPreferences> preferences;
+ if (FAILED(webView->preferences(&preferences)))
+ return;
+
+ COMPtr<IWebPreferencesPrivate> prefsPrivate(Query, preferences);
+ if (!prefsPrivate)
+ return;
+
+ prefsPrivate->setAuthorAndUserStylesEnabled(flag);
+}
+
+void LayoutTestController::setCustomPolicyDelegate(bool setDelegate, bool permissive)
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ if (setDelegate) {
+ policyDelegate->setPermissive(permissive);
+ webView->setPolicyDelegate(policyDelegate);
+ } else
+ webView->setPolicyDelegate(NULL);
+}
+
+void LayoutTestController::setIconDatabaseEnabled(bool iconDatabaseEnabled)
+{
+ // See also <rdar://problem/6480108>
+ COMPtr<IWebIconDatabase> iconDatabase;
+ COMPtr<IWebIconDatabase> tmpIconDatabase;
+ if (FAILED(CoCreateInstance(CLSID_WebIconDatabase, 0, CLSCTX_ALL, IID_IWebIconDatabase, (void**)&tmpIconDatabase)))
+ return;
+ if (FAILED(tmpIconDatabase->sharedIconDatabase(&iconDatabase)))
+ return;
+
+ iconDatabase->setEnabled(iconDatabaseEnabled);
+}
+
+void LayoutTestController::setMainFrameIsFirstResponder(bool flag)
+{
+ // FIXME: Implement!
+}
+
+void LayoutTestController::setPrivateBrowsingEnabled(bool privateBrowsingEnabled)
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ COMPtr<IWebPreferences> preferences;
+ if (FAILED(webView->preferences(&preferences)))
+ return;
+
+ preferences->setPrivateBrowsingEnabled(privateBrowsingEnabled);
+}
+
+void LayoutTestController::setPopupBlockingEnabled(bool privateBrowsingEnabled)
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ COMPtr<IWebPreferences> preferences;
+ if (FAILED(webView->preferences(&preferences)))
+ return;
+
+ preferences->setJavaScriptCanOpenWindowsAutomatically(!privateBrowsingEnabled);
+}
+
+void LayoutTestController::setTabKeyCyclesThroughElements(bool shouldCycle)
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ COMPtr<IWebViewPrivate> viewPrivate;
+ if (FAILED(webView->QueryInterface(&viewPrivate)))
+ return;
+
+ viewPrivate->setTabKeyCyclesThroughElements(shouldCycle ? TRUE : FALSE);
+}
+
+void LayoutTestController::setUseDashboardCompatibilityMode(bool flag)
+{
+ // FIXME: Implement!
+}
+
+void LayoutTestController::setUserStyleSheetEnabled(bool flag)
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ COMPtr<IWebPreferences> preferences;
+ if (FAILED(webView->preferences(&preferences)))
+ return;
+
+ preferences->setUserStyleSheetEnabled(flag);
+}
+
+bool appendComponentToPath(wstring& path, const wstring& component)
+{
+ WCHAR buffer[MAX_PATH];
+
+ if (path.size() + 1 > MAX_PATH)
+ return false;
+
+ memcpy(buffer, path.data(), path.size() * sizeof(WCHAR));
+ buffer[path.size()] = '\0';
+
+ if (!PathAppendW(buffer, component.c_str()))
+ return false;
+
+ path = wstring(buffer);
+ return true;
+}
+
+static bool followShortcuts(wstring& path)
+{
+ if (PathFileExists(path.c_str()))
+ return true;
+
+ // Do we have a shortcut?
+ wstring linkPath = path;
+ linkPath.append(TEXT(".lnk"));
+ if (!PathFileExists(linkPath.c_str()))
+ return true;
+
+ // We have a shortcut, find its target.
+ COMPtr<IShellLink> shortcut(Create, CLSID_ShellLink);
+ if (!shortcut)
+ return false;
+ COMPtr<IPersistFile> persistFile(Query, shortcut);
+ if (!shortcut)
+ return false;
+ if (FAILED(persistFile->Load(linkPath.c_str(), STGM_READ)))
+ return false;
+ if (FAILED(shortcut->Resolve(0, 0)))
+ return false;
+ WCHAR targetPath[MAX_PATH];
+ DWORD targetPathLen = _countof(targetPath);
+ if (FAILED(shortcut->GetPath(targetPath, targetPathLen, 0, 0)))
+ return false;
+ if (!PathFileExists(targetPath))
+ return false;
+ // Use the target path as the result path instead.
+ path = wstring(targetPath);
+
+ return true;
+}
+
+static bool resolveCygwinPath(const wstring& cygwinPath, wstring& windowsPath)
+{
+ wstring fileProtocol = L"file://";
+ bool isFileProtocol = cygwinPath.find(fileProtocol) != string::npos;
+ if (cygwinPath[isFileProtocol ? 7 : 0] != '/') // ensure path is absolute
+ return false;
+
+ // Get the Root path.
+ WCHAR rootPath[MAX_PATH];
+ DWORD rootPathSize = _countof(rootPath);
+ DWORD keyType;
+ DWORD result = ::SHGetValueW(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Cygnus Solutions\\Cygwin\\mounts v2\\/"), TEXT("native"), &keyType, &rootPath, &rootPathSize);
+
+ if (result != ERROR_SUCCESS || keyType != REG_SZ)
+ return false;
+
+ windowsPath = wstring(rootPath, rootPathSize);
+
+ int oldPos = isFileProtocol ? 8 : 1;
+ while (1) {
+ int newPos = cygwinPath.find('/', oldPos);
+
+ if (newPos == -1) {
+ wstring pathComponent = cygwinPath.substr(oldPos);
+
+ if (!appendComponentToPath(windowsPath, pathComponent))
+ return false;
+
+ if (!followShortcuts(windowsPath))
+ return false;
+
+ break;
+ }
+
+ wstring pathComponent = cygwinPath.substr(oldPos, newPos - oldPos);
+ if (!appendComponentToPath(windowsPath, pathComponent))
+ return false;
+
+ if (!followShortcuts(windowsPath))
+ return false;
+
+ oldPos = newPos + 1;
+ }
+
+ if (isFileProtocol)
+ windowsPath = fileProtocol + windowsPath;
+
+ return true;
+}
+
+static wstring cfStringRefToWString(CFStringRef cfStr)
+{
+ Vector<wchar_t> v(CFStringGetLength(cfStr));
+ CFStringGetCharacters(cfStr, CFRangeMake(0, CFStringGetLength(cfStr)), (UniChar *)v.data());
+
+ return wstring(v.data(), v.size());
+}
+
+void LayoutTestController::setUserStyleSheetLocation(JSStringRef jsURL)
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ COMPtr<IWebPreferences> preferences;
+ if (FAILED(webView->preferences(&preferences)))
+ return;
+
+ RetainPtr<CFStringRef> urlString(AdoptCF, JSStringCopyCFString(0, jsURL));
+ RetainPtr<CFURLRef> url(AdoptCF, CFURLCreateWithString(0, urlString.get(), 0));
+ if (!url)
+ return;
+
+ // Now copy the file system path, POSIX style.
+ RetainPtr<CFStringRef> pathCF(AdoptCF, CFURLCopyFileSystemPath(url.get(), kCFURLPOSIXPathStyle));
+ if (!pathCF)
+ return;
+
+ wstring path = cfStringRefToWString(pathCF.get());
+
+ wstring resultPath;
+ if (!resolveCygwinPath(path, resultPath))
+ return;
+
+ // The path has been resolved, now convert it back to a CFURL.
+ int result = WideCharToMultiByte(CP_UTF8, 0, resultPath.c_str(), resultPath.size() + 1, 0, 0, 0, 0);
+ Vector<char> utf8Vector(result);
+ result = WideCharToMultiByte(CP_UTF8, 0, resultPath.c_str(), resultPath.size() + 1, utf8Vector.data(), result, 0, 0);
+ if (!result)
+ return;
+
+ url = CFURLCreateFromFileSystemRepresentation(0, (const UInt8*)utf8Vector.data(), utf8Vector.size() - 1, false);
+ if (!url)
+ return;
+
+ resultPath = cfStringRefToWString(CFURLGetString(url.get()));
+
+ BSTR resultPathBSTR = SysAllocStringLen(resultPath.data(), resultPath.size());
+ preferences->setUserStyleSheetLocation(resultPathBSTR);
+ SysFreeString(resultPathBSTR);
+}
+
+void LayoutTestController::setPersistentUserStyleSheetLocation(JSStringRef jsURL)
+{
+ RetainPtr<CFStringRef> urlString(AdoptCF, JSStringCopyCFString(0, jsURL));
+ ::setPersistentUserStyleSheetLocation(urlString.get());
+}
+
+void LayoutTestController::clearPersistentUserStyleSheet()
+{
+ ::setPersistentUserStyleSheetLocation(0);
+}
+
+void LayoutTestController::setWindowIsKey(bool flag)
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ COMPtr<IWebViewPrivate> viewPrivate;
+ if (FAILED(webView->QueryInterface(&viewPrivate)))
+ return;
+
+ HWND webViewWindow;
+ if (FAILED(viewPrivate->viewWindow((OLE_HANDLE*)&webViewWindow)))
+ return;
+
+ ::SendMessage(webViewWindow, flag ? WM_SETFOCUS : WM_KILLFOCUS, (WPARAM)::GetDesktopWindow(), 0);
+}
+
+void LayoutTestController::setSmartInsertDeleteEnabled(bool flag)
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ COMPtr<IWebViewEditing> viewEditing;
+ if (FAILED(webView->QueryInterface(&viewEditing)))
+ return;
+
+ viewEditing->setSmartInsertDeleteEnabled(flag ? TRUE : FALSE);
+}
+
+void LayoutTestController::setJavaScriptProfilingEnabled(bool flag)
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ COMPtr<IWebViewPrivate> viewPrivate;
+ if (FAILED(webView->QueryInterface(&viewPrivate)))
+ return;
+
+ COMPtr<IWebPreferences> preferences;
+ if (FAILED(webView->preferences(&preferences)))
+ return;
+
+ COMPtr<IWebPreferencesPrivate> prefsPrivate(Query, preferences);
+ if (!prefsPrivate)
+ return;
+
+ COMPtr<IWebInspector> inspector;
+ if (FAILED(viewPrivate->inspector(&inspector)))
+ return;
+
+ prefsPrivate->setDeveloperExtrasEnabled(flag);
+ inspector->setJavaScriptProfilingEnabled(flag);
+}
+
+void LayoutTestController::setSelectTrailingWhitespaceEnabled(bool flag)
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ COMPtr<IWebViewEditing> viewEditing;
+ if (FAILED(webView->QueryInterface(&viewEditing)))
+ return;
+
+ viewEditing->setSelectTrailingWhitespaceEnabled(flag ? TRUE : FALSE);
+}
+
+static const CFTimeInterval waitToDumpWatchdogInterval = 10.0;
+
+static void CALLBACK waitUntilDoneWatchdogFired(HWND, UINT, UINT_PTR, DWORD)
+{
+ const char* message = "FAIL: Timed out waiting for notifyDone to be called\n";
+ fprintf(stderr, message);
+ fprintf(stdout, message);
+ dump();
+}
+
+void LayoutTestController::setWaitToDump(bool waitUntilDone)
+{
+ m_waitToDump = waitUntilDone;
+ if (m_waitToDump && !waitToDumpWatchdog)
+ waitToDumpWatchdog = SetTimer(0, 0, waitToDumpWatchdogInterval * 1000, waitUntilDoneWatchdogFired);
+}
+
+int LayoutTestController::windowCount()
+{
+ return openWindows().size();
+}
+
+bool LayoutTestController::elementDoesAutoCompleteForElementWithId(JSStringRef id)
+{
+ COMPtr<IDOMDocument> document;
+ if (FAILED(frame->DOMDocument(&document)))
+ return false;
+
+ wstring idWstring = jsStringRefToWString(id);
+ BSTR idBSTR = SysAllocStringLen((OLECHAR*)idWstring.c_str(), idWstring.length());
+ COMPtr<IDOMElement> element;
+ HRESULT result = document->getElementById(idBSTR, &element);
+ SysFreeString(idBSTR);
+
+ if (FAILED(result))
+ return false;
+
+ COMPtr<IWebFramePrivate> framePrivate(Query, frame);
+ if (!framePrivate)
+ return false;
+
+ BOOL autoCompletes;
+ if (FAILED(framePrivate->elementDoesAutoComplete(element.get(), &autoCompletes)))
+ return false;
+
+ return autoCompletes;
+}
+
+void LayoutTestController::execCommand(JSStringRef name, JSStringRef value)
+{
+ wstring wName = jsStringRefToWString(name);
+ wstring wValue = jsStringRefToWString(value);
+
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ COMPtr<IWebViewPrivate> viewPrivate;
+ if (FAILED(webView->QueryInterface(&viewPrivate)))
+ return;
+
+ BSTR nameBSTR = SysAllocStringLen((OLECHAR*)wName.c_str(), wName.length());
+ BSTR valueBSTR = SysAllocStringLen((OLECHAR*)wValue.c_str(), wValue.length());
+ viewPrivate->executeCoreCommandByName(nameBSTR, valueBSTR);
+
+ SysFreeString(nameBSTR);
+ SysFreeString(valueBSTR);
+}
+
+bool LayoutTestController::isCommandEnabled(JSStringRef /*name*/)
+{
+ printf("ERROR: LayoutTestController::isCommandEnabled() not implemented\n");
+ return false;
+}
+
+void LayoutTestController::clearAllDatabases()
+{
+ printf("ERROR: LayoutTestController::clearAllDatabases() not implemented\n");
+}
+
+void LayoutTestController::setDatabaseQuota(unsigned long long quota)
+{
+ printf("ERROR: LayoutTestController::setDatabaseQuota() not implemented\n");
+}
+
+bool LayoutTestController::pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId)
+{
+ COMPtr<IDOMDocument> document;
+ if (FAILED(frame->DOMDocument(&document)))
+ return false;
+
+ BSTR idBSTR = JSStringCopyBSTR(elementId);
+ COMPtr<IDOMElement> element;
+ HRESULT hr = document->getElementById(idBSTR, &element);
+ SysFreeString(idBSTR);
+ if (FAILED(hr))
+ return false;
+
+ COMPtr<IWebFramePrivate> framePrivate(Query, frame);
+ if (!framePrivate)
+ return false;
+
+ BSTR nameBSTR = JSStringCopyBSTR(animationName);
+ BOOL wasRunning = FALSE;
+ hr = framePrivate->pauseAnimation(nameBSTR, element.get(), time, &wasRunning);
+ SysFreeString(nameBSTR);
+
+ return SUCCEEDED(hr) && wasRunning;
+}
+
+bool LayoutTestController::pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId)
+{
+ COMPtr<IDOMDocument> document;
+ if (FAILED(frame->DOMDocument(&document)))
+ return false;
+
+ BSTR idBSTR = JSStringCopyBSTR(elementId);
+ COMPtr<IDOMElement> element;
+ HRESULT hr = document->getElementById(idBSTR, &element);
+ SysFreeString(idBSTR);
+ if (FAILED(hr))
+ return false;
+
+ COMPtr<IWebFramePrivate> framePrivate(Query, frame);
+ if (!framePrivate)
+ return false;
+
+ BSTR nameBSTR = JSStringCopyBSTR(propertyName);
+ BOOL wasRunning = FALSE;
+ hr = framePrivate->pauseTransition(nameBSTR, element.get(), time, &wasRunning);
+ SysFreeString(nameBSTR);
+
+ return SUCCEEDED(hr) && wasRunning;
+}
+
+unsigned LayoutTestController::numberOfActiveAnimations() const
+{
+ COMPtr<IWebFramePrivate> framePrivate(Query, frame);
+ if (!framePrivate)
+ return 0;
+
+ UINT number = 0;
+ if (FAILED(framePrivate->numberOfActiveAnimations(&number)))
+ return 0;
+
+ return number;
+}
diff --git a/WebKitTools/DumpRenderTree/win/MD5.cpp b/WebKitTools/DumpRenderTree/win/MD5.cpp
new file mode 100644
index 0000000..1bfc9c7
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/MD5.cpp
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "MD5.h"
+
+#include <windows.h>
+
+typedef void (WINAPI*initPtr)(MD5_CTX*);
+typedef void (WINAPI*updatePtr)(MD5_CTX*, unsigned char*, unsigned);
+typedef void (WINAPI*finalPtr)(MD5_CTX*);
+
+static HMODULE cryptDLL()
+{
+ static HMODULE module = LoadLibraryW(L"Cryptdll.dll");
+ return module;
+}
+
+static initPtr init()
+{
+ static initPtr ptr = reinterpret_cast<initPtr>(GetProcAddress(cryptDLL(), "MD5Init"));
+ return ptr;
+}
+
+static updatePtr update()
+{
+ static updatePtr ptr = reinterpret_cast<updatePtr>(GetProcAddress(cryptDLL(), "MD5Update"));
+ return ptr;
+}
+
+static finalPtr final()
+{
+ static finalPtr ptr = reinterpret_cast<finalPtr>(GetProcAddress(cryptDLL(), "MD5Final"));
+ return ptr;
+}
+
+void MD5_Init(MD5_CTX* context)
+{
+ init()(context);
+}
+
+void MD5_Update(MD5_CTX* context, unsigned char* input, unsigned length)
+{
+ update()(context, input, length);
+}
+
+void MD5_Final(unsigned char hash[16], MD5_CTX* context)
+{
+ final()(context);
+
+ for (int i = 0; i < 16; ++i)
+ hash[i] = context->digest[i];
+}
diff --git a/WebKitTools/DumpRenderTree/win/MD5.h b/WebKitTools/DumpRenderTree/win/MD5.h
new file mode 100644
index 0000000..326e21d
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/MD5.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef MD5_h
+#define MD5_h
+
+typedef unsigned long ULONG;
+
+struct MD5_CTX {
+ ULONG i[2];
+ ULONG buf[4];
+ unsigned char in[64];
+ unsigned char digest[16];
+};
+
+void MD5_Init(MD5_CTX*);
+void MD5_Update(MD5_CTX*, unsigned char* input, unsigned length);
+void MD5_Final(unsigned char hash[16], MD5_CTX*);
+
+#endif // MD5_h
diff --git a/WebKitTools/DumpRenderTree/win/PixelDumpSupportWin.cpp b/WebKitTools/DumpRenderTree/win/PixelDumpSupportWin.cpp
new file mode 100644
index 0000000..3c1cf95
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/PixelDumpSupportWin.cpp
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "PixelDumpSupportCG.h"
+
+#include "DumpRenderTree.h"
+#include <CoreGraphics/CGBitmapContext.h>
+#include <wtf/Assertions.h>
+#include <wtf/RetainPtr.h>
+
+PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool onscreen, bool incrementalRepaint, bool sweepHorizontally, bool drawSelectionRect)
+{
+ RECT frame;
+ if (!GetWindowRect(webViewWindow, &frame))
+ return 0;
+
+ BITMAPINFO bmp = {0};
+ bmp.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
+ bmp.bmiHeader.biWidth = frame.right - frame.left;
+ bmp.bmiHeader.biHeight = -(frame.bottom - frame.top);
+ bmp.bmiHeader.biPlanes = 1;
+ bmp.bmiHeader.biBitCount = 32;
+ bmp.bmiHeader.biCompression = BI_RGB;
+
+ void* bits = 0;
+ HBITMAP bitmap = CreateDIBSection(0, &bmp, DIB_RGB_COLORS, &bits, 0, 0);
+
+ HDC memoryDC = CreateCompatibleDC(0);
+ SelectObject(memoryDC, bitmap);
+ SendMessage(webViewWindow, WM_PRINTCLIENT, reinterpret_cast<WPARAM>(memoryDC), PRF_CLIENT | PRF_CHILDREN | PRF_OWNED);
+ DeleteDC(memoryDC);
+
+ BITMAP info = {0};
+ GetObject(bitmap, sizeof(info), &info);
+ ASSERT(info.bmBitsPixel == 32);
+
+ RetainPtr<CGColorSpaceRef> colorSpace(AdoptCF, CGColorSpaceCreateDeviceRGB());
+ CGContextRef context = CGBitmapContextCreate(info.bmBits, info.bmWidth, info.bmHeight, 8,
+ info.bmWidthBytes, colorSpace.get(), kCGBitmapByteOrder32Little | kCGImageAlphaPremultipliedFirst);
+
+ return BitmapContext::createByAdoptingBitmapAndContext(bitmap, context);
+}
diff --git a/WebKitTools/DumpRenderTree/win/PolicyDelegate.cpp b/WebKitTools/DumpRenderTree/win/PolicyDelegate.cpp
new file mode 100644
index 0000000..4b6ab10
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/PolicyDelegate.cpp
@@ -0,0 +1,124 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "PolicyDelegate.h"
+
+#include "DumpRenderTree.h"
+
+#include <string>
+
+using std::wstring;
+
+PolicyDelegate::PolicyDelegate()
+ : m_refCount(1)
+ , m_permissiveDelegate(false)
+{
+}
+
+// IUnknown
+HRESULT STDMETHODCALLTYPE PolicyDelegate::QueryInterface(REFIID riid, void** ppvObject)
+{
+ *ppvObject = 0;
+ if (IsEqualGUID(riid, IID_IUnknown))
+ *ppvObject = static_cast<IWebPolicyDelegate*>(this);
+ else if (IsEqualGUID(riid, IID_IWebPolicyDelegate))
+ *ppvObject = static_cast<IWebPolicyDelegate*>(this);
+ else
+ return E_NOINTERFACE;
+
+ AddRef();
+ return S_OK;
+}
+
+ULONG STDMETHODCALLTYPE PolicyDelegate::AddRef(void)
+{
+ return ++m_refCount;
+}
+
+ULONG STDMETHODCALLTYPE PolicyDelegate::Release(void)
+{
+ ULONG newRef = --m_refCount;
+ if (!newRef)
+ delete this;
+
+ return newRef;
+}
+
+HRESULT STDMETHODCALLTYPE PolicyDelegate::decidePolicyForNavigationAction(
+ /*[in]*/ IWebView* /*webView*/,
+ /*[in]*/ IPropertyBag* actionInformation,
+ /*[in]*/ IWebURLRequest* request,
+ /*[in]*/ IWebFrame* frame,
+ /*[in]*/ IWebPolicyDecisionListener* listener)
+{
+ BSTR url;
+ request->URL(&url);
+
+ int navType = 0;
+ VARIANT var;
+ if (SUCCEEDED(actionInformation->Read(WebActionNavigationTypeKey, &var, 0))) {
+ V_VT(&var) = VT_I4;
+ navType = V_I4(&var);
+ }
+
+ const char* typeDescription;
+ switch (navType) {
+ case WebNavigationTypeLinkClicked:
+ typeDescription = "link clicked";
+ break;
+ case WebNavigationTypeFormSubmitted:
+ typeDescription = "form submitted";
+ break;
+ case WebNavigationTypeBackForward:
+ typeDescription = "back/forward";
+ break;
+ case WebNavigationTypeReload:
+ typeDescription = "reload";
+ break;
+ case WebNavigationTypeFormResubmitted:
+ typeDescription = "form resubmitted";
+ break;
+ case WebNavigationTypeOther:
+ typeDescription = "other";
+ break;
+ default:
+ typeDescription = "illegal value";
+ }
+
+ printf("Policy delegate: attempt to load %S with navigation type '%s'\n", url ? url : TEXT(""), typeDescription);
+
+ SysFreeString(url);
+
+ if (m_permissiveDelegate)
+ listener->use();
+ else
+ listener->ignore();
+
+ return S_OK;
+}
diff --git a/WebKitTools/DumpRenderTree/win/PolicyDelegate.h b/WebKitTools/DumpRenderTree/win/PolicyDelegate.h
new file mode 100644
index 0000000..29574ee
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/PolicyDelegate.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PolicyDelegate_h
+#define PolicyDelegate_h
+
+#include <WebKit/WebKit.h>
+
+class PolicyDelegate : public IWebPolicyDelegate {
+public:
+ PolicyDelegate();
+
+ // IUnknown
+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
+ virtual ULONG STDMETHODCALLTYPE AddRef(void);
+ virtual ULONG STDMETHODCALLTYPE Release(void);
+
+ // IWebPolicyDelegate
+ virtual HRESULT STDMETHODCALLTYPE decidePolicyForNavigationAction(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IPropertyBag *actionInformation,
+ /* [in] */ IWebURLRequest *request,
+ /* [in] */ IWebFrame *frame,
+ /* [in] */ IWebPolicyDecisionListener *listener);
+
+ virtual HRESULT STDMETHODCALLTYPE decidePolicyForNewWindowAction(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IPropertyBag *actionInformation,
+ /* [in] */ IWebURLRequest *request,
+ /* [in] */ BSTR frameName,
+ /* [in] */ IWebPolicyDecisionListener *listener){ return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE decidePolicyForMIMEType(
+ /* [in] */ IWebView *webView,
+ /* [in] */ BSTR type,
+ /* [in] */ IWebURLRequest *request,
+ /* [in] */ IWebFrame *frame,
+ /* [in] */ IWebPolicyDecisionListener *listener){ return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE unableToImplementPolicyWithError(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebError *error,
+ /* [in] */ IWebFrame *frame){ return E_NOTIMPL; }
+
+ // PolicyDelegate
+ void setPermissive(bool permissive) { m_permissiveDelegate = permissive; }
+
+private:
+ ULONG m_refCount;
+ bool m_permissiveDelegate;
+};
+
+#endif // PolicyDelegate_h
diff --git a/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp b/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp
new file mode 100644
index 0000000..9c89614
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp
@@ -0,0 +1,264 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "ResourceLoadDelegate.h"
+
+#include "DumpRenderTree.h"
+#include "LayoutTestController.h"
+#include <wtf/HashMap.h>
+#include <wtf/Vector.h>
+#include <sstream>
+
+using std::wstring;
+using std::wiostream;
+
+static inline wstring wstringFromBSTR(BSTR str)
+{
+ return wstring(str, ::SysStringLen(str));
+}
+
+wstring wstringFromInt(int i)
+{
+ std::wostringstream ss;
+ ss << i;
+ return ss.str();
+}
+
+typedef HashMap<unsigned long, wstring> IdentifierMap;
+
+IdentifierMap& urlMap()
+{
+ static IdentifierMap urlMap;
+
+ return urlMap;
+}
+
+static wstring descriptionSuitableForTestResult(unsigned long identifier)
+{
+ IdentifierMap::iterator it = urlMap().find(identifier);
+
+ if (it == urlMap().end())
+ return L"<unknown>";
+
+ return urlSuitableForTestResult(it->second);
+}
+
+static wstring descriptionSuitableForTestResult(IWebURLRequest* request)
+{
+ if (!request)
+ return L"(null)";
+
+ BSTR urlBSTR;
+ if (FAILED(request->URL(&urlBSTR)))
+ return wstring();
+
+ wstring url = urlSuitableForTestResult(wstringFromBSTR(urlBSTR));
+ ::SysFreeString(urlBSTR);
+
+ BSTR mainDocumentURLBSTR;
+ if (FAILED(request->mainDocumentURL(&mainDocumentURLBSTR)))
+ return wstring();
+
+ wstring mainDocumentURL = urlSuitableForTestResult(wstringFromBSTR(mainDocumentURLBSTR));
+ ::SysFreeString(mainDocumentURLBSTR);
+
+ return L"<NSURLRequest URL " + url + L", main document URL " + mainDocumentURL + L">";
+}
+
+static wstring descriptionSuitableForTestResult(IWebURLResponse* response)
+{
+ if (!response)
+ return L"(null)";
+
+ BSTR urlBSTR;
+ if (FAILED(response->URL(&urlBSTR)))
+ return wstring();
+
+ wstring url = urlSuitableForTestResult(wstringFromBSTR(urlBSTR));
+ ::SysFreeString(urlBSTR);
+
+ return L"<NSURLResponse " + url + L">";
+}
+
+static wstring descriptionSuitableForTestResult(IWebError* error, unsigned long identifier)
+{
+ wstring result = L"<NSError ";
+
+ BSTR domainSTR;
+ if (FAILED(error->domain(&domainSTR)))
+ return wstring();
+
+ wstring domain = wstringFromBSTR(domainSTR);
+ ::SysFreeString(domainSTR);
+
+ int code;
+ if (FAILED(error->code(&code)))
+ return wstring();
+
+ if (domain == L"CFURLErrorDomain") {
+ domain = L"NSURLErrorDomain";
+
+ // Convert kCFURLErrorUnknown to NSURLErrorUnknown
+ if (code == -998)
+ code = -1;
+ } else if (domain == L"kCFErrorDomainWinSock") {
+ domain = L"NSURLErrorDomain";
+
+ // Convert the winsock error code to an NSURLError code.
+ if (code == WSAEADDRNOTAVAIL)
+ code = -1004; // NSURLErrorCannotConnectToHose;
+ }
+
+ result += L"domain " + domain;
+ result += L", code " + wstringFromInt(code);
+
+ BSTR failingURLSTR;
+ if (FAILED(error->failingURL(&failingURLSTR)))
+ return wstring();
+
+ wstring failingURL;
+
+ // If the error doesn't have a failing URL, we fake one by using the URL the resource had
+ // at creation time. This seems to work fine for now.
+ // See <rdar://problem/5064234> CFErrors should have failingURL key.
+ if (failingURLSTR)
+ failingURL = wstringFromBSTR(failingURLSTR);
+ else
+ failingURL = descriptionSuitableForTestResult(identifier);
+
+ ::SysFreeString(failingURLSTR);
+
+ result += L", failing URL \"" + urlSuitableForTestResult(failingURL) + L"\">";
+
+ return result;
+}
+
+ResourceLoadDelegate::ResourceLoadDelegate()
+ : m_refCount(1)
+{
+}
+
+ResourceLoadDelegate::~ResourceLoadDelegate()
+{
+}
+
+HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::QueryInterface(REFIID riid, void** ppvObject)
+{
+ *ppvObject = 0;
+ if (IsEqualGUID(riid, IID_IUnknown))
+ *ppvObject = static_cast<IWebResourceLoadDelegate*>(this);
+ else if (IsEqualGUID(riid, IID_IWebResourceLoadDelegate))
+ *ppvObject = static_cast<IWebResourceLoadDelegate*>(this);
+ else
+ return E_NOINTERFACE;
+
+ AddRef();
+ return S_OK;
+}
+
+ULONG STDMETHODCALLTYPE ResourceLoadDelegate::AddRef(void)
+{
+ return ++m_refCount;
+}
+
+ULONG STDMETHODCALLTYPE ResourceLoadDelegate::Release(void)
+{
+ ULONG newRef = --m_refCount;
+ if (!newRef)
+ delete(this);
+
+ return newRef;
+}
+
+HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::identifierForInitialRequest(
+ /* [in] */ IWebView* webView,
+ /* [in] */ IWebURLRequest* request,
+ /* [in] */ IWebDataSource* dataSource,
+ /* [in] */ unsigned long identifier)
+{
+ if (!done && gLayoutTestController->dumpResourceLoadCallbacks()) {
+ BSTR urlStr;
+ if (FAILED(request->URL(&urlStr)))
+ return E_FAIL;
+
+ urlMap().set(identifier, wstringFromBSTR(urlStr));
+ }
+
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::willSendRequest(
+ /* [in] */ IWebView* webView,
+ /* [in] */ unsigned long identifier,
+ /* [in] */ IWebURLRequest* request,
+ /* [in] */ IWebURLResponse* redirectResponse,
+ /* [in] */ IWebDataSource* dataSource,
+ /* [retval][out] */ IWebURLRequest **newRequest)
+{
+ if (!done && gLayoutTestController->dumpResourceLoadCallbacks()) {
+ printf("%S - willSendRequest %S redirectResponse %S\n",
+ descriptionSuitableForTestResult(identifier).c_str(),
+ descriptionSuitableForTestResult(request).c_str(),
+ descriptionSuitableForTestResult(redirectResponse).c_str());
+ }
+
+ request->AddRef();
+ *newRequest = request;
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::didFinishLoadingFromDataSource(
+ /* [in] */ IWebView* webView,
+ /* [in] */ unsigned long identifier,
+ /* [in] */ IWebDataSource* dataSource)
+{
+ if (!done && gLayoutTestController->dumpResourceLoadCallbacks()) {
+ printf("%S - didFinishLoading\n",
+ descriptionSuitableForTestResult(identifier).c_str()),
+ urlMap().remove(identifier);
+ }
+
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::didFailLoadingWithError(
+ /* [in] */ IWebView* webView,
+ /* [in] */ unsigned long identifier,
+ /* [in] */ IWebError* error,
+ /* [in] */ IWebDataSource* dataSource)
+{
+ if (!done && gLayoutTestController->dumpResourceLoadCallbacks()) {
+ printf("%S - didFailLoadingWithError: %S\n",
+ descriptionSuitableForTestResult(identifier).c_str(),
+ descriptionSuitableForTestResult(error, identifier).c_str());
+ urlMap().remove(identifier);
+ }
+
+ return S_OK;
+}
diff --git a/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.h b/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.h
new file mode 100644
index 0000000..e259adc
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.h
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ResourceLoadDelegate_h
+#define ResourceLoadDelegate_h
+
+#include <WebKit/WebKit.h>
+
+class ResourceLoadDelegate : public IWebResourceLoadDelegate {
+public:
+ ResourceLoadDelegate();
+ virtual ~ResourceLoadDelegate();
+
+ // IUnknown
+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
+ virtual ULONG STDMETHODCALLTYPE AddRef(void);
+ virtual ULONG STDMETHODCALLTYPE Release(void);
+
+ // IWebResourceLoadDelegate
+ virtual HRESULT STDMETHODCALLTYPE identifierForInitialRequest(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebURLRequest *request,
+ /* [in] */ IWebDataSource *dataSource,
+ /* [in] */ unsigned long identifier);
+
+ virtual HRESULT STDMETHODCALLTYPE willSendRequest(
+ /* [in] */ IWebView *webView,
+ /* [in] */ unsigned long identifier,
+ /* [in] */ IWebURLRequest *request,
+ /* [in] */ IWebURLResponse *redirectResponse,
+ /* [in] */ IWebDataSource *dataSource,
+ /* [retval][out] */ IWebURLRequest **newRequest);
+
+ virtual HRESULT STDMETHODCALLTYPE didReceiveAuthenticationChallenge(
+ /* [in] */ IWebView *webView,
+ /* [in] */ unsigned long identifier,
+ /* [in] */ IWebURLAuthenticationChallenge *challenge,
+ /* [in] */ IWebDataSource *dataSource) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE didCancelAuthenticationChallenge(
+ /* [in] */ IWebView *webView,
+ /* [in] */ unsigned long identifier,
+ /* [in] */ IWebURLAuthenticationChallenge *challenge,
+ /* [in] */ IWebDataSource *dataSource) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE didReceiveResponse(
+ /* [in] */ IWebView *webView,
+ /* [in] */ unsigned long identifier,
+ /* [in] */ IWebURLResponse *response,
+ /* [in] */ IWebDataSource *dataSource) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE didReceiveContentLength(
+ /* [in] */ IWebView *webView,
+ /* [in] */ unsigned long identifier,
+ /* [in] */ UINT length,
+ /* [in] */ IWebDataSource *dataSource) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE didFinishLoadingFromDataSource(
+ /* [in] */ IWebView *webView,
+ /* [in] */ unsigned long identifier,
+ /* [in] */ IWebDataSource *dataSource);
+
+ virtual HRESULT STDMETHODCALLTYPE didFailLoadingWithError(
+ /* [in] */ IWebView *webView,
+ /* [in] */ unsigned long identifier,
+ /* [in] */ IWebError *error,
+ /* [in] */ IWebDataSource *dataSource);
+
+ virtual HRESULT STDMETHODCALLTYPE plugInFailedWithError(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebError *error,
+ /* [in] */ IWebDataSource *dataSource) { return E_NOTIMPL; }
+
+protected:
+ ULONG m_refCount;
+};
+
+#endif // ResourceLoadDelegate_h
diff --git a/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.def b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.def
new file mode 100644
index 0000000..92cdb12
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.def
@@ -0,0 +1,6 @@
+LIBRARY "TestNetscapePlugin"
+
+EXPORTS
+ NP_GetEntryPoints @1
+ NP_Initialize @2
+ NP_Shutdown @3
diff --git a/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.rc b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.rc
new file mode 100644
index 0000000..cccc69c
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.rc
@@ -0,0 +1,101 @@
+// 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
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904e4"
+ BEGIN
+ VALUE "CompanyName", "Apple Inc."
+ VALUE "FileDescription", "TestNetscapePlugIn"
+ VALUE "FileOpenName", "test netscape content"
+ VALUE "LegalCopyright", "Copyright Apple Inc. 2007-2009"
+ VALUE "MIMEType", "application/x-webkit-test-netscape"
+ VALUE "OriginalFilename", "npTestNetscapePlugin.dll"
+ VALUE "ProductName", "TestNetscapePlugIn"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1252
+ END
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj
new file mode 100644
index 0000000..eced57e
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj
@@ -0,0 +1,263 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="TestNetscapePlugin"
+ ProjectGUID="{C0737398-3565-439E-A2B8-AB2BE4D5430C}"
+ RootNamespace="TestNetscapePlugin"
+ 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"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(ProjectDir)..\..\TestNetscapePlugin.subproj&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ PreprocessorDefinitions="_USRDLL;TESTNETSCAPEPLUGIN_EXPORTS;snprintf=_snprintf"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories=""
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\$(ProjectName)$(WebKitConfigSuffix)\np$(ProjectName)$(WebKitConfigSuffix).dll"
+ ModuleDefinitionFile="TestNetscapePlugin.def"
+ />
+ <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="if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(ProjectDir)..\..\TestNetscapePlugin.subproj&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ PreprocessorDefinitions="_USRDLL;TESTNETSCAPEPLUGIN_EXPORTS;snprintf=_snprintf"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories=""
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\$(ProjectName)$(WebKitConfigSuffix)\np$(ProjectName)$(WebKitConfigSuffix).dll"
+ ModuleDefinitionFile="TestNetscapePlugin.def"
+ />
+ <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="if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug_Internal|Win32"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(ProjectDir)..\..\TestNetscapePlugin.subproj&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;"
+ PreprocessorDefinitions="_USRDLL;TESTNETSCAPEPLUGIN_EXPORTS;snprintf=_snprintf"
+ RuntimeLibrary="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories=""
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\$(ProjectName)$(WebKitConfigSuffix)\np$(ProjectName)$(WebKitConfigSuffix).dll"
+ ModuleDefinitionFile="TestNetscapePlugin.def"
+ />
+ <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="if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\main.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\TestNetscapePlugIn.subproj\PluginObject.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\TestNetscapePlugIn.subproj\PluginObject.h"
+ >
+ </File>
+ <File
+ RelativePath=".\resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\TestNetscapePlugin.def"
+ >
+ </File>
+ <File
+ RelativePath=".\TestNetscapePlugin.rc"
+ >
+ </File>
+ <File
+ RelativePath="..\..\TestNetscapePlugIn.subproj\TestObject.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\TestNetscapePlugIn.subproj\TestObject.h"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.c b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.c
new file mode 100644
index 0000000..829a32c
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.c
@@ -0,0 +1,183 @@
+/*
+ * Copyright (C) 2007 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. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "PluginObject.h"
+
+#include <stdio.h>
+
+extern "C"
+NPError __stdcall NP_Initialize(NPNetscapeFuncs* browserFuncs)
+{
+ browser = browserFuncs;
+ return NPERR_NO_ERROR;
+}
+
+extern "C"
+NPError __stdcall NP_GetEntryPoints(NPPluginFuncs* pluginFuncs)
+{
+ pluginFuncs->version = 11;
+ pluginFuncs->size = sizeof(pluginFuncs);
+ pluginFuncs->newp = NPP_New;
+ pluginFuncs->destroy = NPP_Destroy;
+ pluginFuncs->setwindow = NPP_SetWindow;
+ pluginFuncs->newstream = NPP_NewStream;
+ pluginFuncs->destroystream = NPP_DestroyStream;
+ pluginFuncs->asfile = NPP_StreamAsFile;
+ pluginFuncs->writeready = NPP_WriteReady;
+ pluginFuncs->write = (NPP_WriteProcPtr)NPP_Write;
+ pluginFuncs->print = NPP_Print;
+ pluginFuncs->event = NPP_HandleEvent;
+ pluginFuncs->urlnotify = NPP_URLNotify;
+ pluginFuncs->getvalue = NPP_GetValue;
+ pluginFuncs->setvalue = NPP_SetValue;
+
+ return NPERR_NO_ERROR;
+}
+
+
+extern "C"
+NPError __stdcall NP_Shutdown()
+{
+ return NPERR_NO_ERROR;
+}
+
+
+NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char *argn[], char *argv[], NPSavedData *saved)
+{
+ if (browser->version >= 14) {
+ PluginObject* obj = (PluginObject*)browser->createobject(instance, getPluginClass());
+
+ obj->onStreamLoad = NULL;
+
+ for (int16 i = 0; i < argc; i++) {
+ if (_stricmp(argn[i], "onstreamload") == 0 && !obj->onStreamLoad)
+ obj->onStreamLoad = _strdup(argv[i]);
+ }
+
+ instance->pdata = obj;
+ }
+
+ return NPERR_NO_ERROR;
+}
+
+NPError NPP_Destroy(NPP instance, NPSavedData **save)
+{
+ PluginObject *obj = (PluginObject*)instance->pdata;
+ if (obj) {
+ if (obj->onStreamLoad)
+ free(obj->onStreamLoad);
+
+ if (obj->logDestroy)
+ printf("PLUGIN: NPP_Destroy\n");
+
+ browser->releaseobject(&obj->header);
+ }
+ return NPERR_NO_ERROR;
+}
+
+NPError NPP_SetWindow(NPP instance, NPWindow *window)
+{
+ return NPERR_NO_ERROR;
+}
+
+NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream, NPBool seekable, uint16 *stype)
+{
+ PluginObject* obj = (PluginObject*)instance->pdata;
+ obj->stream = stream;
+ *stype = NP_ASFILEONLY;
+
+ if (obj->onStreamLoad) {
+ NPObject *windowScriptObject;
+ browser->getvalue(obj->npp, NPNVWindowNPObject, &windowScriptObject);
+
+ NPString script;
+ script.UTF8Characters = obj->onStreamLoad;
+ script.UTF8Length = strlen(obj->onStreamLoad);
+
+ NPVariant browserResult;
+ browser->evaluate(obj->npp, windowScriptObject, &script, &browserResult);
+ browser->releasevariantvalue(&browserResult);
+ }
+
+ return NPERR_NO_ERROR;
+}
+
+NPError NPP_DestroyStream(NPP instance, NPStream *stream, NPReason reason)
+{
+ return NPERR_NO_ERROR;
+}
+
+int32 NPP_WriteReady(NPP instance, NPStream *stream)
+{
+ return 0;
+}
+
+int32 NPP_Write(NPP instance, NPStream *stream, int32 offset, int32 len, void *buffer)
+{
+ return 0;
+}
+
+void NPP_StreamAsFile(NPP instance, NPStream *stream, const char *fname)
+{
+}
+
+void NPP_Print(NPP instance, NPPrint *platformPrint)
+{
+}
+
+int16 NPP_HandleEvent(NPP instance, void *event)
+{
+ PluginObject *obj = (PluginObject*)instance->pdata;
+ if (!obj->eventLogging)
+ return 0;
+
+ // FIXME: Implement this
+ return 0;
+}
+
+void NPP_URLNotify(NPP instance, const char *url, NPReason reason, void *notifyData)
+{
+ PluginObject *obj = (PluginObject*)instance->pdata;
+
+ handleCallback(obj, url, reason, notifyData);
+}
+
+NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value)
+{
+ if (variable == NPPVpluginScriptableNPObject) {
+ void **v = (void **)value;
+ PluginObject *obj = (PluginObject*)instance->pdata;
+ // Return value is expected to be retained
+ browser->retainobject((NPObject *)obj);
+ *v = obj;
+ return NPERR_NO_ERROR;
+ }
+ return NPERR_GENERIC_ERROR;
+}
+
+NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value)
+{
+ return NPERR_GENERIC_ERROR;
+}
diff --git a/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.cpp b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.cpp
new file mode 100644
index 0000000..ab54872
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.cpp
@@ -0,0 +1,215 @@
+/*
+ IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in
+ consideration of your agreement to the following terms, and your use, installation,
+ modification or redistribution of this Apple software constitutes acceptance of these
+ terms. If you do not agree with these terms, please do not use, install, modify or
+ redistribute this Apple software.
+
+ In consideration of your agreement to abide by the following terms, and subject to these
+ terms, Apple grants you a personal, non-exclusive license, under AppleÕs copyrights in
+ this original Apple software (the "Apple Software"), to use, reproduce, modify and
+ redistribute the Apple Software, with or without modifications, in source and/or binary
+ forms; provided that if you redistribute the Apple Software in its entirety and without
+ modifications, you must retain this notice and the following text and disclaimers in all
+ such redistributions of the Apple Software. Neither the name, trademarks, service marks
+ or logos of Apple Computer, Inc. may be used to endorse or promote products derived from
+ the Apple Software without specific prior written permission from Apple. Except as expressly
+ stated in this notice, no other rights or licenses, express or implied, are granted by Apple
+ herein, including but not limited to any patent rights that may be infringed by your
+ derivative works or by other works in which the Apple Software may be incorporated.
+
+ The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES,
+ EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
+ USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+ IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
+ REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND
+ WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR
+ OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "PluginObject.h"
+
+#include <stdio.h>
+
+extern "C"
+NPError __stdcall NP_Initialize(NPNetscapeFuncs* browserFuncs)
+{
+ browser = browserFuncs;
+ return NPERR_NO_ERROR;
+}
+
+extern "C"
+NPError __stdcall NP_GetEntryPoints(NPPluginFuncs* pluginFuncs)
+{
+ pluginFuncs->version = 11;
+ pluginFuncs->size = sizeof(pluginFuncs);
+ pluginFuncs->newp = NPP_New;
+ pluginFuncs->destroy = NPP_Destroy;
+ pluginFuncs->setwindow = NPP_SetWindow;
+ pluginFuncs->newstream = NPP_NewStream;
+ pluginFuncs->destroystream = NPP_DestroyStream;
+ pluginFuncs->asfile = NPP_StreamAsFile;
+ pluginFuncs->writeready = NPP_WriteReady;
+ pluginFuncs->write = (NPP_WriteProcPtr)NPP_Write;
+ pluginFuncs->print = NPP_Print;
+ pluginFuncs->event = NPP_HandleEvent;
+ pluginFuncs->urlnotify = NPP_URLNotify;
+ pluginFuncs->getvalue = NPP_GetValue;
+ pluginFuncs->setvalue = NPP_SetValue;
+
+ return NPERR_NO_ERROR;
+}
+
+
+extern "C"
+NPError __stdcall NP_Shutdown()
+{
+ return NPERR_NO_ERROR;
+}
+
+
+NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char *argn[], char *argv[], NPSavedData *saved)
+{
+ if (browser->version >= 14) {
+ PluginObject* obj = (PluginObject*)browser->createobject(instance, getPluginClass());
+
+ for (int16 i = 0; i < argc; i++) {
+ if (_stricmp(argn[i], "onstreamload") == 0 && !obj->onStreamLoad)
+ obj->onStreamLoad = _strdup(argv[i]);
+ else if (_stricmp(argn[i], "onStreamDestroy") == 0 && !obj->onStreamDestroy)
+ obj->onStreamDestroy = _strdup(argv[i]);
+ else if (_stricmp(argn[i], "onURLNotify") == 0 && !obj->onURLNotify)
+ obj->onURLNotify = _strdup(argv[i]);
+ }
+
+ instance->pdata = obj;
+ }
+
+ return NPERR_NO_ERROR;
+}
+
+NPError NPP_Destroy(NPP instance, NPSavedData **save)
+{
+ PluginObject *obj = (PluginObject*)instance->pdata;
+ if (obj) {
+ if (obj->onStreamLoad)
+ free(obj->onStreamLoad);
+
+ if (obj->onURLNotify)
+ free(obj->onURLNotify);
+
+ if (obj->onStreamDestroy)
+ free(obj->onStreamDestroy);
+
+ if (obj->logDestroy)
+ printf("PLUGIN: NPP_Destroy\n");
+
+ browser->releaseobject(&obj->header);
+ }
+ return NPERR_NO_ERROR;
+}
+
+NPError NPP_SetWindow(NPP instance, NPWindow *window)
+{
+ return NPERR_NO_ERROR;
+}
+
+static void executeScript(const PluginObject* obj, const char* script)
+{
+ NPObject *windowScriptObject;
+ browser->getvalue(obj->npp, NPNVWindowNPObject, &windowScriptObject);
+
+ NPString npScript;
+ npScript.UTF8Characters = script;
+ npScript.UTF8Length = strlen(script);
+
+ NPVariant browserResult;
+ browser->evaluate(obj->npp, windowScriptObject, &npScript, &browserResult);
+ browser->releasevariantvalue(&browserResult);
+}
+
+NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream, NPBool seekable, uint16 *stype)
+{
+ PluginObject* obj = (PluginObject*)instance->pdata;
+
+ if (obj->returnErrorFromNewStream)
+ return NPERR_GENERIC_ERROR;
+
+ obj->stream = stream;
+ *stype = NP_ASFILEONLY;
+
+ if (obj->onStreamLoad)
+ executeScript(obj, obj->onStreamLoad);
+
+ return NPERR_NO_ERROR;
+}
+
+NPError NPP_DestroyStream(NPP instance, NPStream *stream, NPReason reason)
+{
+ PluginObject* obj = (PluginObject*)instance->pdata;
+
+ if (obj->onStreamDestroy)
+ executeScript(obj, obj->onStreamDestroy);
+
+ return NPERR_NO_ERROR;
+}
+
+int32 NPP_WriteReady(NPP instance, NPStream *stream)
+{
+ return 0;
+}
+
+int32 NPP_Write(NPP instance, NPStream *stream, int32 offset, int32 len, void *buffer)
+{
+ return 0;
+}
+
+void NPP_StreamAsFile(NPP instance, NPStream *stream, const char *fname)
+{
+}
+
+void NPP_Print(NPP instance, NPPrint *platformPrint)
+{
+}
+
+int16 NPP_HandleEvent(NPP instance, void *event)
+{
+ PluginObject *obj = (PluginObject*)instance->pdata;
+ if (!obj->eventLogging)
+ return 0;
+
+ // FIXME: Implement this
+ return 0;
+}
+
+void NPP_URLNotify(NPP instance, const char *url, NPReason reason, void *notifyData)
+{
+ PluginObject *obj = (PluginObject*)instance->pdata;
+
+ if (obj->onURLNotify)
+ executeScript(obj, obj->onURLNotify);
+
+ handleCallback(obj, url, reason, notifyData);
+}
+
+NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value)
+{
+ if (variable == NPPVpluginScriptableNPObject) {
+ void **v = (void **)value;
+ PluginObject *obj = (PluginObject*)instance->pdata;
+ // Return value is expected to be retained
+ browser->retainobject((NPObject *)obj);
+ *v = obj;
+ return NPERR_NO_ERROR;
+ }
+ return NPERR_GENERIC_ERROR;
+}
+
+NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value)
+{
+ return NPERR_GENERIC_ERROR;
+}
diff --git a/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/resource.h b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/resource.h
new file mode 100644
index 0000000..b0ce340
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/TestNetscapePlugin/resource.h
@@ -0,0 +1,14 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by TestNetscapePlugin.rc
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 101
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1001
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/WebKitTools/DumpRenderTree/win/UIDelegate.cpp b/WebKitTools/DumpRenderTree/win/UIDelegate.cpp
new file mode 100755
index 0000000..a2532a5
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/UIDelegate.cpp
@@ -0,0 +1,444 @@
+/*
+ * Copyright (C) 2005, 2006, 2007, 2008 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "UIDelegate.h"
+
+#include "DumpRenderTree.h"
+#include "DraggingInfo.h"
+#include "EventSender.h"
+#include "LayoutTestController.h"
+
+#include <WebCore/COMPtr.h>
+#include <wtf/Platform.h>
+#include <wtf/Vector.h>
+#include <JavaScriptCore/Assertions.h>
+#include <JavaScriptCore/JavaScriptCore.h>
+#include <WebKit/WebKit.h>
+#include <stdio.h>
+
+using std::wstring;
+
+class DRTUndoObject {
+public:
+ DRTUndoObject(IWebUndoTarget* target, BSTR actionName, IUnknown* obj)
+ : m_target(target)
+ , m_actionName(SysAllocString(actionName))
+ , m_obj(obj)
+ {
+ }
+
+ ~DRTUndoObject()
+ {
+ SysFreeString(m_actionName);
+ }
+
+ void invoke()
+ {
+ m_target->invoke(m_actionName, m_obj.get());
+ }
+
+private:
+ IWebUndoTarget* m_target;
+ BSTR m_actionName;
+ COMPtr<IUnknown> m_obj;
+};
+
+class DRTUndoStack {
+public:
+ ~DRTUndoStack() { deleteAllValues(m_undoVector); }
+
+ bool isEmpty() const { return m_undoVector.isEmpty(); }
+ void clear() { deleteAllValues(m_undoVector); m_undoVector.clear(); }
+
+ void push(DRTUndoObject* undoObject) { m_undoVector.append(undoObject); }
+ DRTUndoObject* pop() { DRTUndoObject* top = m_undoVector.last(); m_undoVector.removeLast(); return top; }
+
+private:
+ Vector<DRTUndoObject*> m_undoVector;
+};
+
+class DRTUndoManager {
+public:
+ DRTUndoManager();
+
+ void removeAllActions();
+ void registerUndoWithTarget(IWebUndoTarget* target, BSTR actionName, IUnknown* obj);
+ void redo();
+ void undo();
+ bool canRedo() { return !m_redoStack->isEmpty(); }
+ bool canUndo() { return !m_undoStack->isEmpty(); }
+
+private:
+ OwnPtr<DRTUndoStack> m_redoStack;
+ OwnPtr<DRTUndoStack> m_undoStack;
+ bool m_isRedoing;
+ bool m_isUndoing;
+};
+
+DRTUndoManager::DRTUndoManager()
+ : m_redoStack(new DRTUndoStack)
+ , m_undoStack(new DRTUndoStack)
+ , m_isRedoing(false)
+ , m_isUndoing(false)
+{
+}
+
+void DRTUndoManager::removeAllActions()
+{
+ m_redoStack->clear();
+ m_undoStack->clear();
+}
+
+void DRTUndoManager::registerUndoWithTarget(IWebUndoTarget* target, BSTR actionName, IUnknown* obj)
+{
+ if (!m_isUndoing && !m_isRedoing)
+ m_redoStack->clear();
+
+ DRTUndoStack* stack = m_isUndoing ? m_redoStack.get() : m_undoStack.get();
+ stack->push(new DRTUndoObject(target, actionName, obj));
+}
+
+void DRTUndoManager::redo()
+{
+ if (!canRedo())
+ return;
+
+ m_isRedoing = true;
+
+ DRTUndoObject* redoObject = m_redoStack->pop();
+ redoObject->invoke();
+ delete redoObject;
+
+ m_isRedoing = false;
+}
+
+void DRTUndoManager::undo()
+{
+ if (!canUndo())
+ return;
+
+ m_isUndoing = true;
+
+ DRTUndoObject* undoObject = m_undoStack->pop();
+ undoObject->invoke();
+ delete undoObject;
+
+ m_isUndoing = false;
+}
+
+UIDelegate::UIDelegate()
+ : m_refCount(1)
+ , m_undoManager(new DRTUndoManager)
+{
+ m_frame.bottom = 0;
+ m_frame.top = 0;
+ m_frame.left = 0;
+ m_frame.right = 0;
+}
+
+void UIDelegate::resetUndoManager()
+{
+ m_undoManager.set(new DRTUndoManager);
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::QueryInterface(REFIID riid, void** ppvObject)
+{
+ *ppvObject = 0;
+ if (IsEqualGUID(riid, IID_IUnknown))
+ *ppvObject = static_cast<IWebUIDelegate*>(this);
+ else if (IsEqualGUID(riid, IID_IWebUIDelegate))
+ *ppvObject = static_cast<IWebUIDelegate*>(this);
+ else if (IsEqualGUID(riid, IID_IWebUIDelegatePrivate))
+ *ppvObject = static_cast<IWebUIDelegatePrivate*>(this);
+ else if (IsEqualGUID(riid, IID_IWebUIDelegatePrivate2))
+ *ppvObject = static_cast<IWebUIDelegatePrivate2*>(this);
+ else if (IsEqualGUID(riid, IID_IWebUIDelegatePrivate3))
+ *ppvObject = static_cast<IWebUIDelegatePrivate3*>(this);
+ else
+ return E_NOINTERFACE;
+
+ AddRef();
+ return S_OK;
+}
+
+ULONG STDMETHODCALLTYPE UIDelegate::AddRef()
+{
+ return ++m_refCount;
+}
+
+ULONG STDMETHODCALLTYPE UIDelegate::Release()
+{
+ ULONG newRef = --m_refCount;
+ if (!newRef)
+ delete(this);
+
+ return newRef;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::hasCustomMenuImplementation(
+ /* [retval][out] */ BOOL *hasCustomMenus)
+{
+ *hasCustomMenus = TRUE;
+
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::trackCustomPopupMenu(
+ /* [in] */ IWebView *sender,
+ /* [in] */ OLE_HANDLE menu,
+ /* [in] */ LPPOINT point)
+{
+ // Do nothing
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::registerUndoWithTarget(
+ /* [in] */ IWebUndoTarget* target,
+ /* [in] */ BSTR actionName,
+ /* [in] */ IUnknown* actionArg)
+{
+ m_undoManager->registerUndoWithTarget(target, actionName, actionArg);
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::removeAllActionsWithTarget(
+ /* [in] */ IWebUndoTarget*)
+{
+ m_undoManager->removeAllActions();
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::setActionTitle(
+ /* [in] */ BSTR actionTitle)
+{
+ // It is not neccessary to implement this for DRT because there is
+ // menu to write out the title to.
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::undo()
+{
+ m_undoManager->undo();
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::redo()
+{
+ m_undoManager->redo();
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::canUndo(
+ /* [retval][out] */ BOOL* result)
+{
+ if (!result)
+ return E_POINTER;
+
+ *result = m_undoManager->canUndo();
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::canRedo(
+ /* [retval][out] */ BOOL* result)
+{
+ if (!result)
+ return E_POINTER;
+
+ *result = m_undoManager->canRedo();
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::setFrame(
+ /* [in] */ IWebView* /*sender*/,
+ /* [in] */ RECT* frame)
+{
+ m_frame = *frame;
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::webViewFrame(
+ /* [in] */ IWebView* /*sender*/,
+ /* [retval][out] */ RECT* frame)
+{
+ *frame = m_frame;
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::runJavaScriptAlertPanelWithMessage(
+ /* [in] */ IWebView* /*sender*/,
+ /* [in] */ BSTR message)
+{
+ printf("ALERT: %S\n", message ? message : L"");
+
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::runJavaScriptConfirmPanelWithMessage(
+ /* [in] */ IWebView* sender,
+ /* [in] */ BSTR message,
+ /* [retval][out] */ BOOL* result)
+{
+ printf("CONFIRM: %S\n", message ? message : L"");
+ *result = TRUE;
+
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::runJavaScriptTextInputPanelWithPrompt(
+ /* [in] */ IWebView *sender,
+ /* [in] */ BSTR message,
+ /* [in] */ BSTR defaultText,
+ /* [retval][out] */ BSTR *result)
+{
+ printf("PROMPT: %S, default text: %S\n", message ? message : L"", defaultText ? defaultText : L"");
+ *result = SysAllocString(defaultText);
+
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::runBeforeUnloadConfirmPanelWithMessage(
+ /* [in] */ IWebView* /*sender*/,
+ /* [in] */ BSTR /*message*/,
+ /* [in] */ IWebFrame* /*initiatedByFrame*/,
+ /* [retval][out] */ BOOL* result)
+{
+ if (!result)
+ return E_POINTER;
+ *result = TRUE;
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::webViewAddMessageToConsole(
+ /* [in] */ IWebView* sender,
+ /* [in] */ BSTR message,
+ /* [in] */ int lineNumber,
+ /* [in] */ BSTR url,
+ /* [in] */ BOOL isError)
+{
+ wstring newMessage;
+ if (message) {
+ newMessage = message;
+ size_t fileProtocol = newMessage.find(L"file://");
+ if (fileProtocol != wstring::npos)
+ newMessage = newMessage.substr(0, fileProtocol) + urlSuitableForTestResult(newMessage.substr(fileProtocol));
+ }
+
+ printf("CONSOLE MESSAGE: line %d: %S\n", lineNumber, newMessage.c_str());
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::doDragDrop(
+ /* [in] */ IWebView* sender,
+ /* [in] */ IDataObject* object,
+ /* [in] */ IDropSource* source,
+ /* [in] */ DWORD okEffect,
+ /* [retval][out] */ DWORD* performedEffect)
+{
+ if (!performedEffect)
+ return E_POINTER;
+
+ *performedEffect = 0;
+
+ draggingInfo = new DraggingInfo(object, source);
+ replaySavedEvents();
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::webViewGetDlgCode(
+ /* [in] */ IWebView* /*sender*/,
+ /* [in] */ UINT /*keyCode*/,
+ /* [retval][out] */ LONG_PTR *code)
+{
+ if (!code)
+ return E_POINTER;
+ *code = 0;
+ return E_NOTIMPL;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::createWebViewWithRequest(
+ /* [in] */ IWebView *sender,
+ /* [in] */ IWebURLRequest *request,
+ /* [retval][out] */ IWebView **newWebView)
+{
+ if (!::gLayoutTestController->canOpenWindows())
+ return E_FAIL;
+ *newWebView = createWebViewAndOffscreenWindow();
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::webViewClose(
+ /* [in] */ IWebView *sender)
+{
+ HWND hostWindow;
+ sender->hostWindow(reinterpret_cast<OLE_HANDLE*>(&hostWindow));
+ DestroyWindow(hostWindow);
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::webViewFocus(
+ /* [in] */ IWebView *sender)
+{
+ HWND hostWindow;
+ sender->hostWindow(reinterpret_cast<OLE_HANDLE*>(&hostWindow));
+ SetForegroundWindow(hostWindow);
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::webViewUnfocus(
+ /* [in] */ IWebView *sender)
+{
+ SetForegroundWindow(GetDesktopWindow());
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::webViewPainted(
+ /* [in] */ IWebView *sender)
+{
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::exceededDatabaseQuota(
+ /* [in] */ IWebView *sender,
+ /* [in] */ IWebFrame *frame,
+ /* [in] */ IWebSecurityOrigin *origin,
+ /* [in] */ BSTR databaseIdentifier)
+{
+ static const unsigned long long defaultQuota = 5 * 1024 * 1024;
+ origin->setQuota(defaultQuota);
+
+ return S_OK;
+}
+
+
+HRESULT STDMETHODCALLTYPE UIDelegate::setStatusText(IWebView*, BSTR text)
+{
+ if (gLayoutTestController->dumpStatusCallbacks())
+ printf("UI DELEGATE STATUS CALLBACK: setStatusText:%S\n", text ? text : L"");
+ return S_OK;
+}
diff --git a/WebKitTools/DumpRenderTree/win/UIDelegate.h b/WebKitTools/DumpRenderTree/win/UIDelegate.h
new file mode 100755
index 0000000..2113957
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/UIDelegate.h
@@ -0,0 +1,321 @@
+/*
+ * Copyright (C) 2005, 2006, 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef UIDelegate_h
+#define UIDelegate_h
+
+#include <WebKit/WebKit.h>
+#include <wtf/OwnPtr.h>
+#include <windef.h>
+
+class DRTUndoManager;
+
+class UIDelegate : public IWebUIDelegate, IWebUIDelegatePrivate3 {
+public:
+ UIDelegate();
+
+ void resetUndoManager();
+
+ // IUnknown
+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
+ virtual ULONG STDMETHODCALLTYPE AddRef(void);
+ virtual ULONG STDMETHODCALLTYPE Release(void);
+
+ // IWebUIDelegate
+ virtual HRESULT STDMETHODCALLTYPE createWebViewWithRequest(
+ /* [in] */ IWebView *sender,
+ /* [in] */ IWebURLRequest *request,
+ /* [retval][out] */ IWebView **newWebView);
+
+ virtual HRESULT STDMETHODCALLTYPE webViewShow(
+ /* [in] */ IWebView *sender) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE webViewClose(
+ /* [in] */ IWebView *sender);
+
+ virtual HRESULT STDMETHODCALLTYPE webViewFocus(
+ /* [in] */ IWebView *sender);
+
+ virtual HRESULT STDMETHODCALLTYPE webViewUnfocus(
+ /* [in] */ IWebView *sender);
+
+ virtual HRESULT STDMETHODCALLTYPE webViewFirstResponder(
+ /* [in] */ IWebView *sender,
+ /* [retval][out] */ OLE_HANDLE *responder) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE makeFirstResponder(
+ /* [in] */ IWebView *sender,
+ /* [in] */ OLE_HANDLE responder) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE setStatusText(
+ /* [in] */ IWebView *sender,
+ /* [in] */ BSTR text);
+
+ virtual HRESULT STDMETHODCALLTYPE webViewStatusText(
+ /* [in] */ IWebView *sender,
+ /* [retval][out] */ BSTR *text) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE webViewAreToolbarsVisible(
+ /* [in] */ IWebView *sender,
+ /* [retval][out] */ BOOL *visible) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE setToolbarsVisible(
+ /* [in] */ IWebView *sender,
+ /* [in] */ BOOL visible) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE webViewIsStatusBarVisible(
+ /* [in] */ IWebView *sender,
+ /* [retval][out] */ BOOL *visible) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE setStatusBarVisible(
+ /* [in] */ IWebView *sender,
+ /* [in] */ BOOL visible) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE webViewIsResizable(
+ /* [in] */ IWebView *sender,
+ /* [retval][out] */ BOOL *resizable) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE setResizable(
+ /* [in] */ IWebView *sender,
+ /* [in] */ BOOL resizable) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE setFrame(
+ /* [in] */ IWebView *sender,
+ /* [in] */ RECT *frame);
+
+ virtual HRESULT STDMETHODCALLTYPE webViewFrame(
+ /* [in] */ IWebView *sender,
+ /* [retval][out] */ RECT *frame);
+
+ virtual HRESULT STDMETHODCALLTYPE setContentRect(
+ /* [in] */ IWebView *sender,
+ /* [in] */ RECT *contentRect) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE webViewContentRect(
+ /* [in] */ IWebView *sender,
+ /* [retval][out] */ RECT *contentRect) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE runJavaScriptAlertPanelWithMessage(
+ /* [in] */ IWebView *sender,
+ /* [in] */ BSTR message);
+
+ virtual HRESULT STDMETHODCALLTYPE runJavaScriptConfirmPanelWithMessage(
+ /* [in] */ IWebView *sender,
+ /* [in] */ BSTR message,
+ /* [retval][out] */ BOOL *result);
+
+ virtual HRESULT STDMETHODCALLTYPE runJavaScriptTextInputPanelWithPrompt(
+ /* [in] */ IWebView *sender,
+ /* [in] */ BSTR message,
+ /* [in] */ BSTR defaultText,
+ /* [retval][out] */ BSTR *result);
+
+ virtual HRESULT STDMETHODCALLTYPE runBeforeUnloadConfirmPanelWithMessage(
+ /* [in] */ IWebView *sender,
+ /* [in] */ BSTR message,
+ /* [in] */ IWebFrame *initiatedByFrame,
+ /* [retval][out] */ BOOL *result);
+
+ virtual HRESULT STDMETHODCALLTYPE runOpenPanelForFileButtonWithResultListener(
+ /* [in] */ IWebView *sender,
+ /* [in] */ IWebOpenPanelResultListener *resultListener) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE mouseDidMoveOverElement(
+ /* [in] */ IWebView *sender,
+ /* [in] */ IPropertyBag *elementInformation,
+ /* [in] */ UINT modifierFlags) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE contextMenuItemsForElement(
+ /* [in] */ IWebView *sender,
+ /* [in] */ IPropertyBag *element,
+ /* [in] */ OLE_HANDLE defaultItems,
+ /* [retval][out] */ OLE_HANDLE *resultMenu) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE validateUserInterfaceItem(
+ /* [in] */ IWebView *webView,
+ /* [in] */ UINT itemCommandID,
+ /* [in] */ BOOL defaultValidation,
+ /* [retval][out] */ BOOL *isValid) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE shouldPerformAction(
+ /* [in] */ IWebView *webView,
+ /* [in] */ UINT itemCommandID,
+ /* [in] */ UINT sender) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE dragDestinationActionMaskForDraggingInfo(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IDataObject *draggingInfo,
+ /* [retval][out] */ WebDragDestinationAction *action) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE willPerformDragDestinationAction(
+ /* [in] */ IWebView *webView,
+ /* [in] */ WebDragDestinationAction action,
+ /* [in] */ IDataObject *draggingInfo) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE dragSourceActionMaskForPoint(
+ /* [in] */ IWebView *webView,
+ /* [in] */ LPPOINT point,
+ /* [retval][out] */ WebDragSourceAction *action) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE willPerformDragSourceAction(
+ /* [in] */ IWebView *webView,
+ /* [in] */ WebDragSourceAction action,
+ /* [in] */ LPPOINT point,
+ /* [in] */ IDataObject *pasteboard) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE contextMenuItemSelected(
+ /* [in] */ IWebView *sender,
+ /* [in] */ void *item,
+ /* [in] */ IPropertyBag *element) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE hasCustomMenuImplementation(
+ /* [retval][out] */ BOOL *hasCustomMenus);
+
+ virtual HRESULT STDMETHODCALLTYPE trackCustomPopupMenu(
+ /* [in] */ IWebView *sender,
+ /* [in] */ OLE_HANDLE menu,
+ /* [in] */ LPPOINT point);
+
+ virtual HRESULT STDMETHODCALLTYPE measureCustomMenuItem(
+ /* [in] */ IWebView *sender,
+ /* [in] */ void *measureItem) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE drawCustomMenuItem(
+ /* [in] */ IWebView *sender,
+ /* [in] */ void *drawItem) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE addCustomMenuDrawingData(
+ /* [in] */ IWebView *sender,
+ /* [in] */ OLE_HANDLE menu) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE cleanUpCustomMenuDrawingData(
+ /* [in] */ IWebView *sender,
+ /* [in] */ OLE_HANDLE menu) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE canTakeFocus(
+ /* [in] */ IWebView *sender,
+ /* [in] */ BOOL forward,
+ /* [out] */ BOOL *result) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE takeFocus(
+ /* [in] */ IWebView *sender,
+ /* [in] */ BOOL forward) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE registerUndoWithTarget(
+ /* [in] */ IWebUndoTarget *target,
+ /* [in] */ BSTR actionName,
+ /* [in] */ IUnknown *actionArg);
+
+ virtual HRESULT STDMETHODCALLTYPE removeAllActionsWithTarget(
+ /* [in] */ IWebUndoTarget *target);
+
+ virtual HRESULT STDMETHODCALLTYPE setActionTitle(
+ /* [in] */ BSTR actionTitle);
+
+ virtual HRESULT STDMETHODCALLTYPE undo();
+
+ virtual HRESULT STDMETHODCALLTYPE redo();
+
+ virtual HRESULT STDMETHODCALLTYPE canUndo(
+ /* [retval][out] */ BOOL *result);
+
+ virtual HRESULT STDMETHODCALLTYPE canRedo(
+ /* [retval][out] */ BOOL *result);
+
+protected:
+ // IWebUIDelegatePrivate
+
+ virtual HRESULT STDMETHODCALLTYPE webViewResizerRect(
+ /* [in] */ IWebView *sender,
+ /* [retval][out] */ RECT *rect) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE webViewSendResizeMessage(
+ /* [in] */ UINT uMsg,
+ /* [in] */ WPARAM wParam,
+ /* [in] */ LPARAM lParam) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE webViewDrawResizer(
+ /* [in] */ IWebView *sender,
+ /* [in] */ HDC dc,
+ /* [in] */ BOOL overlapsContent,
+ /* [in] */ RECT *rect) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE webViewScrolled(
+ /* [in] */ IWebView *sender) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE webViewAddMessageToConsole(
+ /* [in] */ IWebView *sender,
+ /* [in] */ BSTR message,
+ /* [in] */ int lineNumber,
+ /* [in] */ BSTR url,
+ /* [in] */ BOOL isError);
+
+ virtual HRESULT STDMETHODCALLTYPE webViewShouldInterruptJavaScript(
+ /* [in] */ IWebView *sender,
+ /* [retval][out] */ BOOL *result) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE webViewReceivedFocus(
+ /* [in] */ IWebView *sender) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE webViewLostFocus(
+ /* [in] */ IWebView *sender,
+ /* [in] */ OLE_HANDLE loseFocusTo) { return E_NOTIMPL; }
+
+ virtual HRESULT STDMETHODCALLTYPE doDragDrop(
+ /* [in] */ IWebView *sender,
+ /* [in] */ IDataObject *dataObject,
+ /* [in] */ IDropSource *dropSource,
+ /* [in] */ DWORD okEffect,
+ /* [retval][out] */ DWORD *performedEffect);
+
+ virtual HRESULT STDMETHODCALLTYPE webViewGetDlgCode(
+ /* [in] */ IWebView *sender,
+ /* [in] */ UINT keyCode,
+ /* [retval][out] */ LONG_PTR *code);
+
+ // IWebUIDelegatePrivate2
+
+ virtual HRESULT STDMETHODCALLTYPE webViewPainted(
+ /* [in] */ IWebView *sender);
+
+ // IWebUIDelegatePrivate3
+
+ virtual HRESULT STDMETHODCALLTYPE exceededDatabaseQuota(
+ /* [in] */ IWebView *sender,
+ /* [in] */ IWebFrame *frame,
+ /* [in] */ IWebSecurityOrigin *origin,
+ /* [in] */ BSTR databaseIdentifier);
+
+ ULONG m_refCount;
+
+private:
+ RECT m_frame;
+ OwnPtr<DRTUndoManager> m_undoManager;
+};
+
+#endif
diff --git a/WebKitTools/DumpRenderTree/win/WorkQueueItemWin.cpp b/WebKitTools/DumpRenderTree/win/WorkQueueItemWin.cpp
new file mode 100644
index 0000000..a489498
--- /dev/null
+++ b/WebKitTools/DumpRenderTree/win/WorkQueueItemWin.cpp
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WorkQueueItem.h"
+
+#include "DumpRenderTree.h"
+#include <WebCore/COMPtr.h>
+#include <WebKit/WebKit.h>
+#include <JavaScriptCore/JSStringRef.h>
+#include <JavaScriptCore/JSStringRefCF.h>
+#include <JavaScriptCore/RetainPtr.h>
+#include <wtf/Vector.h>
+#include <string>
+
+using std::wstring;
+
+static wstring jsStringRefToWString(JSStringRef jsStr)
+{
+ size_t length = JSStringGetLength(jsStr);
+ Vector<WCHAR> buffer(length + 1);
+ memcpy(buffer.data(), JSStringGetCharactersPtr(jsStr), length * sizeof(WCHAR));
+ buffer[length] = '\0';
+
+ return buffer.data();
+}
+
+void LoadItem::invoke() const
+{
+ wstring targetString = jsStringRefToWString(target());
+
+ COMPtr<IWebFrame> targetFrame;
+ if (targetString.empty())
+ targetFrame = frame;
+ else {
+ BSTR targetBSTR = SysAllocString(targetString.c_str());
+ bool failed = FAILED(frame->findFrameNamed(targetBSTR, &targetFrame));
+ SysFreeString(targetBSTR);
+ if (failed)
+ return;
+ }
+
+ COMPtr<IWebURLRequest> request;
+ if (FAILED(CoCreateInstance(CLSID_WebURLRequest, 0, CLSCTX_ALL, IID_IWebURLRequest, (void**)&request)))
+ return;
+
+ wstring urlString = jsStringRefToWString(url());
+ BSTR urlBSTR = SysAllocString(urlString.c_str());
+ bool failed = FAILED(request->initWithURL(urlBSTR, WebURLRequestUseProtocolCachePolicy, 60));
+ SysFreeString(urlBSTR);
+ if (failed)
+ return;
+
+ targetFrame->loadRequest(request.get());
+}
+
+void ReloadItem::invoke() const
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ COMPtr<IWebIBActions> webActions;
+ if (SUCCEEDED(webView->QueryInterface(&webActions)))
+ webActions->reload(0);
+}
+
+void ScriptItem::invoke() const
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ wstring scriptString = jsStringRefToWString(script());
+
+ BSTR result;
+ BSTR scriptBSTR = SysAllocString(scriptString.c_str());
+ webView->stringByEvaluatingJavaScriptFromString(scriptBSTR, &result);
+ SysFreeString(result);
+ SysFreeString(scriptBSTR);
+}
+
+void BackForwardItem::invoke() const
+{
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ BOOL result;
+ if (m_howFar == 1) {
+ webView->goForward(&result);
+ return;
+ }
+
+ if (m_howFar == -1) {
+ webView->goBack(&result);
+ return;
+ }
+
+ COMPtr<IWebBackForwardList> bfList;
+ if (FAILED(webView->backForwardList(&bfList)))
+ return;
+
+ COMPtr<IWebHistoryItem> item;
+ if (FAILED(bfList->itemAtIndex(m_howFar, &item)))
+ return;
+
+ webView->goToBackForwardItem(item.get(), &result);
+}
diff --git a/WebKitTools/FindSafari/FindSafari.cpp b/WebKitTools/FindSafari/FindSafari.cpp
new file mode 100644
index 0000000..616323b
--- /dev/null
+++ b/WebKitTools/FindSafari/FindSafari.cpp
@@ -0,0 +1,276 @@
+/*
+ * Copyright (C) 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "resource.h"
+
+#include <shlwapi.h>
+#include <stdio.h>
+#include <tchar.h>
+#include <windows.h>
+
+#define LOG(header, ...) \
+ do { \
+ _ftprintf(stderr, header); \
+ _ftprintf(stderr, __VA_ARGS__); \
+ } while (0)
+#define LOG_WARNING(...) LOG(TEXT("WARNING: "), __VA_ARGS__)
+#define LOG_ERROR(...) LOG(TEXT("ERROR: "), __VA_ARGS__)
+
+static TCHAR* getStringValue(HKEY key, LPCTSTR valueName)
+{
+ DWORD type = 0;
+ DWORD bufferSize = 0;
+ if (RegQueryValueEx(key, valueName, 0, &type, 0, &bufferSize) != ERROR_SUCCESS || type != REG_SZ)
+ return 0;
+
+ TCHAR* buffer = (TCHAR*)malloc(bufferSize);
+ if (RegQueryValueEx(key, 0, 0, &type, reinterpret_cast<LPBYTE>(buffer), &bufferSize) != ERROR_SUCCESS) {
+ free(buffer);
+ return 0;
+ }
+
+ return buffer;
+}
+
+static LPOLESTR getWebViewCLSID()
+{
+ LPCTSTR webViewProgID = TEXT("WebKit.WebView");
+
+ CLSID clsid = CLSID_NULL;
+ HRESULT hr = CLSIDFromProgID(webViewProgID, &clsid);
+ if (FAILED(hr)) {
+ LOG_WARNING(TEXT("Failed to get CLSID for %s\n"), webViewProgID);
+ return 0;
+ }
+
+ LPOLESTR clsidString = 0;
+ if (FAILED(StringFromCLSID(clsid, &clsidString))) {
+ LOG_WARNING(TEXT("Failed to get string representation of CLSID for WebView\n"));
+ return 0;
+ }
+
+ return clsidString;
+}
+
+static TCHAR* getInstalledWebKitDirectory()
+{
+ LPCTSTR keyPrefix = TEXT("SOFTWARE\\Classes\\CLSID\\");
+ LPCTSTR keySuffix = TEXT("\\InprocServer32");
+
+ LPOLESTR clsid = getWebViewCLSID();
+ if (!clsid)
+ return 0;
+
+ size_t keyBufferLength = _tcslen(keyPrefix) + _tcslen(clsid) + _tcslen(keySuffix) + 1;
+ TCHAR* keyString = (TCHAR*)malloc(keyBufferLength * sizeof(TCHAR));
+
+ int ret = _sntprintf_s(keyString, keyBufferLength, keyBufferLength - 1, TEXT("%s%s%s"), keyPrefix, clsid, keySuffix);
+ CoTaskMemFree(clsid);
+ if (ret == -1) {
+ LOG_WARNING(TEXT("Failed to construct InprocServer32 key\n"));
+ return 0;
+ }
+
+ HKEY serverKey = 0;
+ LONG error = RegOpenKeyEx(HKEY_LOCAL_MACHINE, keyString, 0, KEY_READ, &serverKey);
+ free(keyString);
+ if (error != ERROR_SUCCESS) {
+ LOG_WARNING(TEXT("Failed to open registry key %s\n"), keyString);
+ return 0;
+ }
+
+ TCHAR* webKitPath = getStringValue(serverKey, 0);
+ RegCloseKey(serverKey);
+ if (!webKitPath) {
+ LOG_WARNING(TEXT("Couldn't retrieve value for registry key %s\n"), keyString);
+ return 0;
+ }
+
+ TCHAR* startOfFileName = PathFindFileName(webKitPath);
+ if (startOfFileName == webKitPath) {
+ LOG_WARNING(TEXT("Couldn't find filename from path %s\n"), webKitPath);
+ free(webKitPath);
+ return 0;
+ }
+
+ *startOfFileName = '\0';
+ return webKitPath;
+}
+
+static char* copyManifest(HMODULE module, LPCTSTR id)
+{
+ HRSRC resHandle = FindResource(module, id, MAKEINTRESOURCE(RT_MANIFEST));
+ if (!resHandle)
+ return 0;
+ DWORD manifestSize = SizeofResource(module, resHandle);
+ if (!manifestSize)
+ return 0;
+ HGLOBAL resData = LoadResource(module, resHandle);
+ if (!resData)
+ return 0;
+ void* data = LockResource(resData);
+ if (!data)
+ return 0;
+
+ char* dataCopy = static_cast<char*>(malloc(manifestSize + 1));
+ if (!dataCopy)
+ return 0;
+ memcpy(dataCopy, data, manifestSize);
+ dataCopy[manifestSize] = 0;
+ return dataCopy;
+}
+
+static void replaceManifest()
+{
+ TCHAR safariPath[MAX_PATH];
+ ::ExpandEnvironmentStrings(TEXT("%TMP%\\WebKitNightly\\Safari.exe"), safariPath, ARRAYSIZE(safariPath));
+
+ // get the existing manifest out of Safari.exe
+ HMODULE safariModule = LoadLibraryEx(safariPath, 0, LOAD_LIBRARY_AS_DATAFILE);
+ if (!safariModule)
+ return;
+ char* safariManifest = copyManifest(safariModule, MAKEINTRESOURCE(1));
+ FreeLibrary(safariModule);
+ if (!safariManifest)
+ return;
+
+ // see if the existing Safari manifest contains registry free COM info
+ // (we only need to update if it is not registry free COM-aware)
+ bool needsUpdate = !strstr(safariManifest, "<comClass");
+ free(safariManifest);
+ if (!needsUpdate)
+ return;
+
+ // replace the manifest with the extra manifest stashed in FindSafar.exe (ID 100)
+ char* replacementManifest = copyManifest(0, MAKEINTRESOURCE(IDR_SAFARI_MANIFEST));
+ if (!replacementManifest)
+ return;
+ if (HANDLE h = BeginUpdateResource(safariPath, FALSE)) {
+ UpdateResource(h, MAKEINTRESOURCE(RT_MANIFEST), MAKEINTRESOURCE(1), MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), replacementManifest, strlen(replacementManifest));
+ EndUpdateResource(h, FALSE);
+ }
+
+ free(replacementManifest);
+}
+
+int _tmain(int argc, TCHAR* argv[])
+{
+ TCHAR* path = getInstalledWebKitDirectory();
+ if (!path) {
+ LOG_ERROR(TEXT("Couldn't determine installed Safari path\n"));
+ return 1;
+ }
+
+ bool printLauncher = false;
+ bool printEnvironment = false;
+ bool debugger = false;
+ bool updateManifest = false;
+
+ for (int i = 1; i < argc; ++i) {
+ if (!_tcscmp(argv[i], TEXT("/printSafariLauncher"))) {
+ printLauncher = true;
+ continue;
+ }
+ if (!_tcscmp(argv[i], TEXT("/printSafariEnvironment"))) {
+ printEnvironment = true;
+ continue;
+ }
+ if (!_tcscmp(argv[i], TEXT("/debugger"))) {
+ debugger = true;
+ continue;
+ }
+
+ if (!_tcscmp(argv[i], TEXT("/updateManifest"))) {
+ updateManifest = true;
+ continue;
+ }
+ }
+
+ if (updateManifest) {
+ replaceManifest();
+ return 0;
+ }
+
+ // printLauncher is inclusive of printEnvironment, so do not
+ // leave both enabled:
+ if (printLauncher && printEnvironment)
+ printEnvironment = false;
+
+ if (!printLauncher && !printEnvironment) {
+ _tprintf(TEXT("%s\n"), path);
+ free(path);
+ return 0;
+ }
+
+ LPCTSTR lines[] = {
+ TEXT("@echo off"),
+ TEXT("del /s /q \"%%TMP%%\\WebKitNightly\""),
+ TEXT("mkdir 2>NUL \"%%TMP%%\\WebKitNightly\\Safari.resources\""),
+ TEXT("mkdir 2>NUL \"%%TMP%%\\WebKitNightly\\WebKit.resources\""),
+ TEXT("xcopy /y /i /d \"%sSafari.exe\" \"%%TMP%%\\WebKitNightly\""),
+ TEXT("xcopy /y /i /d /e \"%sSafari.resources\" \"%%TMP%%\\WebKitNightly\\Safari.resources\""),
+ TEXT("xcopy /y /i /d /e \"%splugins\" \"%%TMP%%\\WebKitNightly\\plugins\""),
+ TEXT("xcopy /y /i /d WebKit.dll \"%%TMP%%\\WebKitNightly\""),
+ TEXT("xcopy /y /i /d WebKit.pdb \"%%TMP%%\\WebKitNightly\""),
+ TEXT("xcopy /y /i /d /e WebKit.resources \"%%TMP%%\\WebKitNightly\\WebKit.resources\""),
+ TEXT("FindSafari.exe /updateManifest"),
+ TEXT("set PATH=%%CD%%;%s;%%PATH%%"),
+ };
+
+ LPCTSTR command = TEXT("\"%TMP%\\WebKitNightly\\Safari.exe\"");
+
+ LPCTSTR launchLines[] = {
+ TEXT("%s"),
+ };
+
+ LPCTSTR debuggerLines[] = {
+ TEXT("if exist \"%%DevEnvDir%%\\VCExpress.exe\" ("),
+ TEXT("\"%%DevEnvDir%%\\VCExpress.exe\" /debugExe %s"),
+ TEXT(") else ("),
+ TEXT("\"%%DevEnvDir%%\\devenv.exe\" /debugExe %s"),
+ TEXT(")"),
+ };
+
+ for (int i = 0; i < ARRAYSIZE(lines); ++i) {
+ _tprintf(lines[i], path);
+ _tprintf(TEXT("\n"));
+ }
+
+ LPCTSTR* endLines = debugger ? debuggerLines : launchLines;
+
+ // Don't print launch command if we just want the environment set up...
+ if (!printEnvironment) {
+ for (unsigned i = 0; i < (debugger ? ARRAYSIZE(debuggerLines) : ARRAYSIZE(launchLines)); ++i) {
+ _tprintf(endLines[i], command);
+ _tprintf(TEXT("\n"));
+ }
+ }
+
+ free(path);
+ return 0;
+}
diff --git a/WebKitTools/FindSafari/FindSafari.rc b/WebKitTools/FindSafari/FindSafari.rc
new file mode 100644
index 0000000..20c2da2
--- /dev/null
+++ b/WebKitTools/FindSafari/FindSafari.rc
@@ -0,0 +1,70 @@
+// 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
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// RT_MANIFEST
+//
+
+IDR_SAFARI_MANIFEST RT_MANIFEST "Safari.exe.manifest"
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/WebKitTools/FindSafari/FindSafari.vcproj b/WebKitTools/FindSafari/FindSafari.vcproj
new file mode 100644
index 0000000..48ea3df
--- /dev/null
+++ b/WebKitTools/FindSafari/FindSafari.vcproj
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="FindSafari"
+ ProjectGUID="{DA31DA52-6675-48D4-89E0-333A7144397C}"
+ RootNamespace="FindSafari"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="shlwapi.lib advapi32.lib ole32.lib"
+ OutputFile="$(OutDir)\$(ProjectName).exe"
+ SubSystem="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\FindSafari.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\resource.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ <File
+ RelativePath=".\FindSafari.rc"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/WebKitTools/FindSafari/Safari.exe.manifest b/WebKitTools/FindSafari/Safari.exe.manifest
new file mode 100644
index 0000000..08c85cf
--- /dev/null
+++ b/WebKitTools/FindSafari/Safari.exe.manifest
@@ -0,0 +1,129 @@
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+ <file name="WebKit" hashalg="SHA1">
+ <comClass progid="OpenSourceWebKit.WebView" clsid="{D6BCA079-F61C-4E1E-B453-32A0477D02E3}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <comClass progid="OpenSourceWebKit.WebIconDatabase" clsid="{66827EC1-3AEF-4241-BAC5-F776B44F030F}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <comClass progid="OpenSourceWebKit.WebMutableURLRequest" clsid="{A062ECC3-BB1B-4694-A569-F59E0AD6BE0C}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <comClass progid="OpenSourceWebKit.WebNotificationCenter" clsid="{BA590766-0A6F-46C7-B96E-743490D94CB7}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <comClass progid="OpenSourceWebKit.WebHistory" clsid="{A4B9B45D-949F-4C8C-9B92-6FBFCC1CAAA2}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <comClass progid="OpenSourceWebKit.CFDictionaryPropertyBag" clsid="{DD653964-4D37-4FB2-9CB6-6A9A97719332}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <comClass progid="OpenSourceWebKit.WebHistoryItem" clsid="{6BE190E9-1725-4E4A-88DB-6A9FE242C9E5}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <comClass progid="OpenSourceWebKit.WebCache" clsid="{F71071FD-A51B-4B69-9EB6-44374405E80C}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <comClass progid="OpenSourceWebKit.WebJavaScriptCollector" clsid="{1820D883-42FE-4B78-88C8-5456BB19D224}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <comClass progid="OpenSourceWebKit.WebPreferences" clsid="{67B89F90-F778-438B-ABBF-34D1ACBF8651}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <comClass progid="OpenSourceWebKit.WebKitStatistics" clsid="{E93AA8D7-F362-4A4A-A95D-325906BEB5F0}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <comClass progid="OpenSourceWebKit.WebError" clsid="{6C6AF3F9-36B4-4BF7-8BDE-74DCD4AD75A4}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <comClass progid="OpenSourceWebKit.WebURLCredential" clsid="{7433F53B-7FE9-484A-9432-72909457A646}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <comClass progid="OpenSourceWebKit.WebDownload" clsid="{C0F98BD9-3B1C-413D-904A-E2D1453EAF1F}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <comClass progid="OpenSourceWebKit.WebURLRequest" clsid="{2FB5499A-BB5D-4469-8517-789FEC8FD9BA}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <comClass progid="OpenSourceWebKit.WebURLProtectionSpace" clsid="{F366A6E8-E43C-4FD4-AAB0-8E6E79C73E6E}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <comClass progid="OpenSourceWebKit.WebScrollBar" clsid="{24A53AD5-AA9F-44E6-AA22-2C7C250B661A}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <comClass progid="OpenSourceWebKit.WebScriptDebugServer" clsid="{715636C4-59E7-4B85-BBC5-B555888787D7}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <comClass progid="OpenSourceWebKit.WebURLResponse" clsid="{AB201196-8DD2-4D45-AEBD-029B6A37AA27}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <comClass progid="OpenSourceWebKit.WebTextRenderer" clsid="{24040CD6-AFF4-4A51-9C8B-71539580EE76}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <comClass progid="OpenSourceWebKit.WebDatabaseManager" clsid="{C2A1BFC2-1E7C-49FE-8592-D0C7FB440BC0}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <comClass progid="OpenSourceWebKit.WebArchive" clsid="{1B63D781-9BC4-4A04-899F-C4B05BBD3BE5}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <comClass progid="OpenSourceWebKit.WebCoreStatistics" clsid="{96B93356-9D61-4B3F-A6CF-A78283AC9649}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <comClass progid="OpenSourceWebKit.WebCookieManager" clsid="{3F35F332-BB2B-49B3-AEDD-27B317687E07}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}"></comClass>
+ <typelib tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" version="528.0" helpdir="" flags="HASDISKIMAGE"></typelib>
+ </file>
+ <comInterfaceExternalProxyStub name="IWebView" iid="{174BBEFD-058E-49C7-91DF-6F110AA4AC28}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebUIDelegate" iid="{2452A889-A74A-4FBC-9617-326A0A953630}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebURLRequest" iid="{F4B85F1D-F3B2-493D-B786-0930E804A3BA}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebFrame" iid="{B4B22EF7-DD43-4D01-A992-99C4A8B1F845}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebFrameView" iid="{E23E1B15-78F6-4E89-AD2E-49992A040A35}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebDocumentView" iid="{0A6397A7-90FE-49A0-B9C1-44693DD779F7}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebDataSource" iid="{5221A975-AE09-4A7B-A4DF-E3B1B5F38A21}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebDocumentRepresentation" iid="{3C9F6251-CFD8-447A-B429-6B6AE627436C}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebError" iid="{89E3B189-0B60-4D6B-A87A-3F1172CB5538}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebMutableURLRequest" iid="{C4042773-371F-427E-AFA9-9D4B358A0D93}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebURLResponse" iid="{9814930B-E037-4477-8DF1-4D898B648995}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebArchive" iid="{F07D5252-F66E-4A4D-B9DC-33BD11DCC138}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebResource" iid="{09567E0E-7859-494A-B0E4-92C13CFE5574}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMNode" iid="{3EEA3E20-72DA-4BE7-954F-79B5A14AD726}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMObject" iid="{A27FA225-F34E-425D-88EB-A35BD105A527}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebScriptObject" iid="{7022340A-649C-43FC-9214-85CA7D3BE3C7}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMNodeList" iid="{10A05A96-CBD9-4493-83AD-FAFB952615CE}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMNamedNodeMap" iid="{E6CBF396-C9F9-431B-A8D6-BCB525067E9F}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMDocument" iid="{A83C2C44-0BAC-45C7-8E17-6A49975D5CCA}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMDocumentType" iid="{17FCE6EA-4164-4BD4-9DBF-0395FBF37FD3}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMImplementation" iid="{6E48C25D-E542-4D1A-BC73-ACDC21E39C56}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMElement" iid="{E053A35B-7775-4859-80EA-C35D02D145A2}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMAttr" iid="{B587E098-8206-4B5A-A7DB-422F218571A0}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMDocumentFragment" iid="{09D35665-8396-4868-949E-8AA2407A6E10}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMText" iid="{74638F45-1AA0-4DB5-958C-82066E00BD2B}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMCharacterData" iid="{F4DED047-FE61-461A-BDBD-BB87F79DB713}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMComment" iid="{118002E8-847F-4B1A-968C-B25A6AC7B128}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMCDATASection" iid="{31B506C1-45A3-4D72-815A-311B0A897E58}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMProcessingInstruction" iid="{D99D2F48-ABF3-426A-9339-54681E1AFCA9}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMEntityReference" iid="{0593CE45-15B2-44AF-BBD0-5A1654F8240E}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMHTMLElement" iid="{EBD5F41D-FF65-41D8-97C9-FCE3A3D4CC3E}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebOpenPanelResultListener" iid="{634198C7-9DFC-4ABA-9E8C-90AEEA7A4144}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebUndoTarget" iid="{BF7F516E-E75D-4E3A-83E2-8F694D83C72D}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebResourceLoadDelegate" iid="{AF3289AA-90DB-4CA4-A112-A1E5F0517953}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebURLAuthenticationChallenge" iid="{5382DABA-C3C3-40C5-AA40-04079F11A844}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebURLAuthenticationChallengeSender" iid="{9360D6FB-186C-4FF7-AE57-D1B973DA0D1C}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebURLCredential" iid="{A1E9D765-FACE-4189-BBE3-AED7EBF65EBD}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebURLProtectionSpace" iid="{71D2622A-3FF2-404B-BD45-C60659C901AF}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebDownloadDelegate" iid="{16A32AE6-C862-40CD-9225-2CAF823F40F9}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebDownload" iid="{65EFE83B-A9E4-4516-8F3B-BAA25DA90FFD}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebFrameLoadDelegate" iid="{4CD809C2-73A5-44EE-B0D7-D1863DFE9F57}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebPolicyDelegate" iid="{9B0BAE6C-A496-4000-9E22-2E89F0747401}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebPolicyDecisionListener" iid="{DFCDE523-FD96-4F95-958B-151540FE122A}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebBackForwardList" iid="{C278A16D-B502-4131-B551-DCE3F4ED2B36}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebHistoryItem" iid="{1E2970AE-72B7-4500-A7A0-12B0FFEB91FC}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebPreferences" iid="{0930D594-A5A3-46E1-858E-AB17A13CD28E}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebIBActions" iid="{8F0E3A30-B924-44F8-990A-1AE61ED6C632}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebViewCSS" iid="{ADF68A8C-336F-405C-A053-3D11A9D5B092}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMCSSStyleDeclaration" iid="{DBBE9A6B-D505-4647-B4AB-40A7CF3EE63E}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMCSSValue" iid="{51D29553-2AF7-4F52-AFE6-3C59196A8BAA}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMCSSRule" iid="{05947A31-9E1C-4C98-8608-6688959D6542}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMCSSStyleSheet" iid="{14B1C213-1458-48A1-AD8F-54BFE64F9ECF}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMCSSRuleList" iid="{D45DA43D-5EDB-4315-A097-3ED3FA089193}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebViewEditing" iid="{07BDAC9A-19A1-4086-864D-BAD9E0F00D5C}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMRange" iid="{2F33E42C-0B39-48B3-B7B6-E910CDB325AD}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebUndoManager" iid="{D25D748C-6C1E-478D-9832-FDA26E8F7EE4}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebInvocation" iid="{67B067BE-4DE6-45C2-AD39-A91DFA84FF4E}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebMethodSignature" iid="{431DD6B2-56BF-4F48-943B-78CCEAC418E4}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebEditingDelegate" iid="{2C75A1E3-EE9D-45C8-A385-19DE68AC5675}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebNotification" iid="{93598207-3E34-49EC-97EC-EFA9A1E16335}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IEnumWebGrammarDetails" iid="{FABCC69A-5917-4242-A19A-42E8B62227A7}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebGrammarDetail" iid="{8B95C1B3-E1B3-4F97-80D6-2240417E3E0C}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IEnumSpellingGuesses" iid="{B0F960E7-FB81-447F-A958-E02DA02ADBB7}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebViewUndoableEditing" iid="{639E7121-13C8-4A12-BC18-6E1F3D68F3C3}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebViewEditingActions" iid="{7E066C42-8E81-4778-888D-D6CC93E27D4C}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebNotificationObserver" iid="{1BA491C4-58A7-4091-9F56-9AED118DB4C1}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebViewPrivate" iid="{44914369-DEB5-4FCF-A6A3-30C02E73154F}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebFormDelegate" iid="{4CBEC1BD-ABC3-4BDB-8E5E-4D3BCF9E8C1E}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMHTMLInputElement" iid="{80C40AC5-1755-4894-812F-479269C262A2}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IDOMHTMLTextAreaElement" iid="{298B02B7-3EB5-4BA4-AD3F-7FA53241AADE}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebFormSubmissionListener" iid="{1911D650-035E-4204-8746-ABECF77A4C9B}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebFrameLoadDelegatePrivate" iid="{32DC2531-948D-400E-A82F-FE6668B61A0B}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IEnumTextMatches" iid="{C0CDE63A-5ED1-453F-B937-93B1A61AD3B3}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebInspector" iid="{68159FF1-9037-45EC-9992-B2E455CF39F3}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebIconDatabase" iid="{E93F2616-2560-47D9-BD4D-6E2F1E1D3174}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebNotificationCenter" iid="{1E411ABE-DAA0-4A83-BCCA-D94E0704F193}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebHistory" iid="{F34E4B1A-361D-4B9F-9A3F-D869DCD97F9A}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebCache" iid="{0673E6F5-AE63-4871-AAC6-6A1E0E6A99AB}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebJavaScriptCollector" iid="{E6A1D169-F44A-4D11-B55B-F0A406F47612}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebKitStatistics" iid="{955C1042-BCF7-4F51-8AE7-66C2D0D47C44}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebScrollBarPrivate" iid="{6C585B08-2E4F-4594-9B90-0425E3A33FD0}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebScrollBarDelegatePrivate" iid="{2E8D56AF-3BF5-4E17-BDA6-01692ACBE3D5}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebScriptDebugServer" iid="{E24111D6-3668-4C8B-B921-D644524945F8}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebScriptDebugListener" iid="{09612B56-BE17-4867-A441-1C5C4E0F5302}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebScriptCallFrame" iid="{029D0676-162A-4140-8917-9574E09F66EB}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebTextRenderer" iid="{5B26ABBB-C27A-4527-A313-CB733E2CD257}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebDatabaseManager" iid="{5724F010-A77B-4A42-8F89-A5095B61D469}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebSecurityOrigin" iid="{304D4462-A921-4E85-BC11-BCE1462B159D}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebCoreStatistics" iid="{9607001D-6EEF-4C2C-AD22-94E9DA587973}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+ <comInterfaceExternalProxyStub name="IWebCookieManager" iid="{7053FE94-3623-444F-A298-209A90879A8C}" tlbid="{2A748656-625D-4207-B29F-40C95BFEB3A9}" proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
+</assembly> \ No newline at end of file
diff --git a/WebKitTools/FindSafari/resource.h b/WebKitTools/FindSafari/resource.h
new file mode 100644
index 0000000..91d1053
--- /dev/null
+++ b/WebKitTools/FindSafari/resource.h
@@ -0,0 +1,16 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by FindSafari.rc
+//
+#define IDR_SAFARI_MANIFEST 100
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 103
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1001
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/WebKitTools/GNUmakefile.am b/WebKitTools/GNUmakefile.am
new file mode 100644
index 0000000..7e98e73
--- /dev/null
+++ b/WebKitTools/GNUmakefile.am
@@ -0,0 +1,121 @@
+noinst_PROGRAMS += \
+ Programs/GtkLauncher \
+ Programs/DumpRenderTree
+
+# GtkLauncher
+Programs_GtkLauncher_CPPFLAGS = \
+ -I$(srcdir)/WebKit/gtk \
+ -I$(top_builddir)/WebKit/gtk \
+ $(global_cppflags) \
+ $(javascriptcore_cppflags)
+
+Programs_GtkLauncher_SOURCES = \
+ WebKitTools/GtkLauncher/main.c
+
+Programs_GtkLauncher_CFLAGS = \
+ -ansi \
+ -fno-strict-aliasing \
+ -O2 \
+ $(global_cflags) \
+ $(GTK_CFLAGS) \
+ $(LIBSOUP_CFLAGS)
+
+Programs_GtkLauncher_LDADD = \
+ libwebkit-1.0.la \
+ $(GTK_LIBS)
+
+# DumpRenderTree
+dumprendertree_cppflags := \
+ -I$(srcdir)/WebKitTools/DumpRenderTree \
+ -I$(srcdir)/WebKitTools/DumpRenderTree/gtk \
+ -I$(srcdir)/WebKit/gtk \
+ -I$(top_builddir)/WebKit/gtk \
+ $(global_cppflags) \
+ $(javascriptcore_cppflags)
+
+Programs_DumpRenderTree_CPPFLAGS = $(dumprendertree_cppflags)
+
+Programs_DumpRenderTree_SOURCES = \
+ WebKitTools/DumpRenderTree/AccessibilityController.h \
+ WebKitTools/DumpRenderTree/AccessibilityUIElement.h \
+ WebKitTools/DumpRenderTree/DumpRenderTree.h \
+ WebKitTools/DumpRenderTree/DumpRenderTreePrefix.h \
+ WebKitTools/DumpRenderTree/GCController.cpp \
+ WebKitTools/DumpRenderTree/GCController.h \
+ WebKitTools/DumpRenderTree/JavaScriptThreading.h \
+ WebKitTools/DumpRenderTree/LayoutTestController.cpp \
+ WebKitTools/DumpRenderTree/LayoutTestController.h \
+ WebKitTools/DumpRenderTree/PixelDumpSupport.h \
+ WebKitTools/DumpRenderTree/WorkQueue.cpp \
+ WebKitTools/DumpRenderTree/WorkQueue.h \
+ WebKitTools/DumpRenderTree/WorkQueueItem.h \
+ WebKitTools/DumpRenderTree/config.h \
+ WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp \
+ WebKitTools/DumpRenderTree/gtk/DumpRenderTreeGtk.h \
+ WebKitTools/DumpRenderTree/gtk/GCControllerGtk.cpp \
+ WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp \
+ WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp
+
+Programs_DumpRenderTree_CXXFLAGS = \
+ $(global_cxxflags) \
+ $(Programs_DumpRenderTree_CFLAGS)
+
+Programs_DumpRenderTree_CFLAGS = \
+ -fno-strict-aliasing \
+ -O2 \
+ $(global_cflags) \
+ $(GLOBALDEPS_CFLAGS) \
+ $(CAIRO_CFLAGS) \
+ $(GTK_CFLAGS) \
+ $(LIBSOUP_CFLAGS)
+
+Programs_DumpRenderTree_LDADD = \
+ libwebkit-1.0.la \
+ $(GLOBALDEPS_LIBS) \
+ $(CAIRO_LIBS) \
+ $(GTK_LIBS)
+
+# clean target
+CLEANFILES += \
+ Programs/GtkLauncher \
+ Programs/DumpRenderTree
+
+
+if TARGET_X11
+
+# Build TestNetscapePlugin only for X11
+# since we don't support plugins for non-X11 builds at the moment.
+noinst_LTLIBRARIES += \
+ TestNetscapePlugin/libtestnetscapeplugin.la
+
+dumprendertree_cppflags += \
+ -DTEST_PLUGIN_DIR=\"${shell pwd}/${top_builddir}/TestNetscapePlugin/.libs\"
+
+TestNetscapePlugin_libtestnetscapeplugin_la_CPPFLAGS = \
+ -I$(srcdir)/WebKitTools/DumpRenderTree \
+ -I$(srcdir)/WebKitTools/DumpRenderTree/gtk/TestNetscapePlugin/ForwardingHeaders \
+ -I$(srcdir)/WebCore \
+ -I$(srcdir)/WebCore/bridge \
+ -I$(srcdir)/WebCore/plugins \
+ -I$(srcdir)/WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj \
+ $(global_cppflags) \
+ $(javascriptcore_cppflags)
+
+TestNetscapePlugin_libtestnetscapeplugin_la_SOURCES = \
+ WebKitTools/DumpRenderTree/gtk/TestNetscapePlugin/ForwardingHeaders/WebKit/npapi.h \
+ WebKitTools/DumpRenderTree/gtk/TestNetscapePlugin/ForwardingHeaders/WebKit/npfunctions.h \
+ WebKitTools/DumpRenderTree/gtk/TestNetscapePlugin/ForwardingHeaders/WebKit/npruntime.h \
+ WebKitTools/DumpRenderTree/gtk/TestNetscapePlugin/TestNetscapePlugin.cpp \
+ WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp \
+ WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h \
+ WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.cpp \
+ WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.h
+
+TestNetscapePlugin_libtestnetscapeplugin_la_LDFLAGS = \
+ -rpath ${shell pwd}/$(top_builddir)/TestNetscapePlugin/.libs \
+ $(no_undefined) \
+ -avoid-version \
+ -module
+
+CLEANFILES += TestNetscapePlugin/libtestnetscapeplugin.la
+endif
diff --git a/WebKitTools/GtkLauncher/main.c b/WebKitTools/GtkLauncher/main.c
new file mode 100644
index 0000000..0c8c785
--- /dev/null
+++ b/WebKitTools/GtkLauncher/main.c
@@ -0,0 +1,205 @@
+/*
+ * Copyright (C) 2006, 2007 Apple Inc.
+ * Copyright (C) 2007 Alp Toker <alp@atoker.com>
+ *
+ * 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 COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <gtk/gtk.h>
+#include <webkit/webkit.h>
+
+static GtkWidget* main_window;
+static GtkWidget* uri_entry;
+static GtkStatusbar* main_statusbar;
+static WebKitWebView* web_view;
+static gchar* main_title;
+static gint load_progress;
+static guint status_context_id;
+
+static void
+activate_uri_entry_cb (GtkWidget* entry, gpointer data)
+{
+ const gchar* uri = gtk_entry_get_text (GTK_ENTRY (entry));
+ g_assert (uri);
+ webkit_web_view_load_uri (web_view, uri);
+}
+
+static void
+update_title (GtkWindow* window)
+{
+ GString* string = g_string_new (main_title);
+ g_string_append (string, " - WebKit Launcher");
+ if (load_progress < 100)
+ g_string_append_printf (string, " (%d%%)", load_progress);
+ gchar* title = g_string_free (string, FALSE);
+ gtk_window_set_title (window, title);
+ g_free (title);
+}
+
+static void
+link_hover_cb (WebKitWebView* page, const gchar* title, const gchar* link, gpointer data)
+{
+ /* underflow is allowed */
+ gtk_statusbar_pop (main_statusbar, status_context_id);
+ if (link)
+ gtk_statusbar_push (main_statusbar, status_context_id, link);
+}
+
+static void
+title_change_cb (WebKitWebView* web_view, WebKitWebFrame* web_frame, const gchar* title, gpointer data)
+{
+ if (main_title)
+ g_free (main_title);
+ main_title = g_strdup (title);
+ update_title (GTK_WINDOW (main_window));
+}
+
+static void
+progress_change_cb (WebKitWebView* page, gint progress, gpointer data)
+{
+ load_progress = progress;
+ update_title (GTK_WINDOW (main_window));
+}
+
+static void
+load_commit_cb (WebKitWebView* page, WebKitWebFrame* frame, gpointer data)
+{
+ const gchar* uri = webkit_web_frame_get_uri(frame);
+ if (uri)
+ gtk_entry_set_text (GTK_ENTRY (uri_entry), uri);
+}
+
+static void
+destroy_cb (GtkWidget* widget, gpointer data)
+{
+ gtk_main_quit ();
+}
+
+static void
+go_back_cb (GtkWidget* widget, gpointer data)
+{
+ webkit_web_view_go_back (web_view);
+}
+
+static void
+go_forward_cb (GtkWidget* widget, gpointer data)
+{
+ webkit_web_view_go_forward (web_view);
+}
+
+static GtkWidget*
+create_browser ()
+{
+ GtkWidget* scrolled_window = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+
+ web_view = WEBKIT_WEB_VIEW (webkit_web_view_new ());
+ gtk_container_add (GTK_CONTAINER (scrolled_window), GTK_WIDGET (web_view));
+
+ g_signal_connect (G_OBJECT (web_view), "title-changed", G_CALLBACK (title_change_cb), web_view);
+ g_signal_connect (G_OBJECT (web_view), "load-progress-changed", G_CALLBACK (progress_change_cb), web_view);
+ g_signal_connect (G_OBJECT (web_view), "load-committed", G_CALLBACK (load_commit_cb), web_view);
+ g_signal_connect (G_OBJECT (web_view), "hovering-over-link", G_CALLBACK (link_hover_cb), web_view);
+
+ return scrolled_window;
+}
+
+static GtkWidget*
+create_statusbar ()
+{
+ main_statusbar = GTK_STATUSBAR (gtk_statusbar_new ());
+ status_context_id = gtk_statusbar_get_context_id (main_statusbar, "Link Hover");
+
+ return (GtkWidget*)main_statusbar;
+}
+
+static GtkWidget*
+create_toolbar ()
+{
+ GtkWidget* toolbar = gtk_toolbar_new ();
+
+ gtk_toolbar_set_orientation (GTK_TOOLBAR (toolbar), GTK_ORIENTATION_HORIZONTAL);
+ gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_BOTH_HORIZ);
+
+ GtkToolItem* item;
+
+ /* the back button */
+ item = gtk_tool_button_new_from_stock (GTK_STOCK_GO_BACK);
+ g_signal_connect (G_OBJECT (item), "clicked", G_CALLBACK (go_back_cb), NULL);
+ gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
+
+ /* The forward button */
+ item = gtk_tool_button_new_from_stock (GTK_STOCK_GO_FORWARD);
+ g_signal_connect (G_OBJECT (item), "clicked", G_CALLBACK (go_forward_cb), NULL);
+ gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
+
+ /* The URL entry */
+ item = gtk_tool_item_new ();
+ gtk_tool_item_set_expand (item, TRUE);
+ uri_entry = gtk_entry_new ();
+ gtk_container_add (GTK_CONTAINER (item), uri_entry);
+ g_signal_connect (G_OBJECT (uri_entry), "activate", G_CALLBACK (activate_uri_entry_cb), NULL);
+ gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
+
+ /* The go button */
+ item = gtk_tool_button_new_from_stock (GTK_STOCK_OK);
+ g_signal_connect_swapped (G_OBJECT (item), "clicked", G_CALLBACK (activate_uri_entry_cb), (gpointer)uri_entry);
+ gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
+
+ return toolbar;
+}
+
+static GtkWidget*
+create_window ()
+{
+ GtkWidget* window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_default_size (GTK_WINDOW (window), 800, 600);
+ gtk_widget_set_name (window, "GtkLauncher");
+ g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (destroy_cb), NULL);
+
+ return window;
+}
+
+int
+main (int argc, char* argv[])
+{
+ gtk_init (&argc, &argv);
+ if (!g_thread_supported ())
+ g_thread_init (NULL);
+
+ GtkWidget* vbox = gtk_vbox_new (FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), create_toolbar (), FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), create_browser (), TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), create_statusbar (), FALSE, FALSE, 0);
+
+ main_window = create_window ();
+ gtk_container_add (GTK_CONTAINER (main_window), vbox);
+
+ gchar* uri = (gchar*) (argc > 1 ? argv[1] : "http://www.google.com/");
+ webkit_web_view_load_uri (web_view, uri);
+
+ gtk_widget_grab_focus (GTK_WIDGET (web_view));
+ gtk_widget_show_all (main_window);
+ gtk_main ();
+
+ return 0;
+}
diff --git a/WebKitTools/GtkLauncher/simple.svg b/WebKitTools/GtkLauncher/simple.svg
new file mode 100644
index 0000000..30b13ac
--- /dev/null
+++ b/WebKitTools/GtkLauncher/simple.svg
@@ -0,0 +1,15 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
+"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg width="5cm" height="4cm"
+xmlns="http://www.w3.org/2000/svg">
+<desc>Four separate rectangles
+</desc>
+<rect x="0.5cm" y="0.5cm" width="2cm" height="1cm"/>
+<rect x="0.5cm" y="2cm" width="1cm" height="1.5cm"/>
+<rect x="3cm" y="0.5cm" width="1.5cm" height="2cm"/>
+<rect x="3.5cm" y="3cm" width="1cm" height="0.5cm"/>
+<!-- Show outline of canvas using 'rect' element -->
+<rect x=".01cm" y=".01cm" width="4.98cm" height="3.98cm"
+fill="none" stroke="blue" stroke-width=".02cm" />
+</svg>
diff --git a/WebKitTools/GtkLauncher/text.html b/WebKitTools/GtkLauncher/text.html
new file mode 100644
index 0000000..607df72
--- /dev/null
+++ b/WebKitTools/GtkLauncher/text.html
@@ -0,0 +1,9 @@
+<html>
+<head>
+<title>Hello World</title>
+<body bgcolor=#00ffff text=#000000>
+<p>
+Hello world
+</p>
+</body>
+</html>
diff --git a/WebKitTools/MIDLWrapper/MIDLWrapper.cpp b/WebKitTools/MIDLWrapper/MIDLWrapper.cpp
new file mode 100644
index 0000000..2132af8
--- /dev/null
+++ b/WebKitTools/MIDLWrapper/MIDLWrapper.cpp
@@ -0,0 +1,86 @@
+// MIDLWrapper.cpp : Just calls the built-in midl.exe with the given arguments.
+
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+#include <process.h>
+#include <stdio.h>
+#include <string>
+#include <windows.h>
+
+using namespace std;
+
+int wmain(int argc, wchar_t* argv[], wchar_t* envp[])
+{
+#ifndef NDEBUG
+ fwprintf(stderr, L"######### im in ur IDE, compiling ur c0des ########\n");
+#endif
+
+ int pathIndex = -1;
+ for (int i = 0; envp[i]; ++i)
+ if (!wcsncmp(envp[i], L"PATH=", 5)) {
+ pathIndex = i;
+ break;
+ }
+
+ if (pathIndex == -1) {
+ fwprintf(stderr, L"Couldn't find PATH environment variable!\n");
+ return -1;
+ }
+
+ wchar_t* vcbin = wcsstr(envp[pathIndex], L"WebKitTools\\vcbin");
+ if (!vcbin) {
+ fwprintf(stderr, L"Couldn't find WebKitTools\\vcbin in PATH!\n");
+ return -1;
+ }
+
+ wchar_t saved = *vcbin;
+ *vcbin = 0;
+
+ wchar_t* afterLeadingSemiColon = wcsrchr(envp[pathIndex], ';');
+ if (!afterLeadingSemiColon)
+ afterLeadingSemiColon = envp[pathIndex] + 5; // +5 for the length of "PATH="
+ else
+ afterLeadingSemiColon++;
+
+ *vcbin = saved;
+
+ size_t pathLength = wcslen(envp[pathIndex]);
+
+ wchar_t* trailingSemiColon = wcschr(vcbin, ';');
+ if (!trailingSemiColon)
+ trailingSemiColon = envp[pathIndex] + pathLength;
+
+ int vcbinLength = trailingSemiColon - afterLeadingSemiColon;
+
+ size_t newPathLength = pathLength - vcbinLength;
+
+ wchar_t* newPath = new wchar_t[newPathLength + 1];
+
+ // Copy everything before the vcbin path...
+ wchar_t* d = newPath;
+ wchar_t* s = envp[pathIndex];
+ while (s < afterLeadingSemiColon)
+ *d++ = *s++;
+
+ // Copy everything after the vcbin path...
+ s = trailingSemiColon;
+ while (*d++ = *s++);
+
+ envp[pathIndex] = newPath;
+
+#ifndef NDEBUG
+ fwprintf(stderr, L"New path: %s\n", envp[pathIndex]);
+#endif
+
+ wchar_t** newArgv = new wchar_t*[argc + 1];
+ for (int i = 0; i < argc; ++i) {
+ size_t length = wcslen(argv[i]);
+ newArgv[i] = new wchar_t[length + 3];
+ *newArgv[i] = '\"';
+ wcscpy_s(newArgv[i] + 1, length + 2, argv[i]);
+ *(newArgv[i] + 1 + length) = '\"';
+ *(newArgv[i] + 2 + length) = 0;
+ }
+ newArgv[argc] = 0;
+
+ return _wspawnvpe(_P_WAIT, L"midl", newArgv, envp);
+}
diff --git a/WebKitTools/MIDLWrapper/MIDLWrapper.sln b/WebKitTools/MIDLWrapper/MIDLWrapper.sln
new file mode 100644
index 0000000..b066df5
--- /dev/null
+++ b/WebKitTools/MIDLWrapper/MIDLWrapper.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MIDLWrapper", "MIDLWrapper.vcproj", "{CBE6BA0B-1A76-4936-BF54-7EB84E1B0F21}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {CBE6BA0B-1A76-4936-BF54-7EB84E1B0F21}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CBE6BA0B-1A76-4936-BF54-7EB84E1B0F21}.Debug|Win32.Build.0 = Debug|Win32
+ {CBE6BA0B-1A76-4936-BF54-7EB84E1B0F21}.Release|Win32.ActiveCfg = Release|Win32
+ {CBE6BA0B-1A76-4936-BF54-7EB84E1B0F21}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/WebKitTools/MIDLWrapper/MIDLWrapper.vcproj b/WebKitTools/MIDLWrapper/MIDLWrapper.vcproj
new file mode 100644
index 0000000..471813d
--- /dev/null
+++ b/WebKitTools/MIDLWrapper/MIDLWrapper.vcproj
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="MIDLWrapper"
+ ProjectGUID="{CBE6BA0B-1A76-4936-BF54-7EB84E1B0F21}"
+ RootNamespace="MIDLWrapper"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="..\vcbin"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\midl.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="..\vcbin"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\midl.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\MIDLWrapper.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/WebKitTools/Makefile b/WebKitTools/Makefile
new file mode 100644
index 0000000..92f5b25
--- /dev/null
+++ b/WebKitTools/Makefile
@@ -0,0 +1,17 @@
+MODULES = DumpRenderTree
+
+all:
+ @for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
+ if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
+
+debug d development dev develop:
+ @for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
+ if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
+
+release r deployment dep deploy:
+ @for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
+ if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
+
+clean:
+ @for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
+ if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
diff --git a/WebKitTools/Scripts/SpacingHeuristics.pm b/WebKitTools/Scripts/SpacingHeuristics.pm
new file mode 100644
index 0000000..7de0172
--- /dev/null
+++ b/WebKitTools/Scripts/SpacingHeuristics.pm
@@ -0,0 +1,101 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2006 Apple Computer, 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Used for helping remove extra blank lines from files when processing.
+# see split-class for an example usage (or other scripts in bugzilla)
+
+BEGIN {
+ use Exporter ();
+ our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
+ $VERSION = 1.00;
+ @ISA = qw(Exporter);
+ @EXPORT = qw(&resetSpacingHeuristics &isOnlyWhiteSpace &applySpacingHeuristicsAndPrint &setPreviousAllowedLine &setPreviousAllowedLine &printPendingEmptyLines &ignoringLine);
+ %EXPORT_TAGS = ();
+ @EXPORT_OK = ();
+}
+
+our @EXPORT_OK;
+
+my $justFoundEmptyLine = 0;
+my $previousLineWasDisallowed = 0;
+my $previousAllowedLine = "";
+my $pendingEmptyLines = "";
+
+sub resetSpacingHeuristics
+{
+ $justFoundEmptyLine = 0;
+ $previousLineWasDisallowed = 0;
+ $previousAllowedLine = "";
+ $pendingEmptyLines = "";
+}
+
+sub isOnlyWhiteSpace
+{
+ my $line = shift;
+ my $isOnlyWhiteSpace = ($line =~ m/^\s+$/);
+ $pendingEmptyLines .= $line if ($isOnlyWhiteSpace);
+ return $isOnlyWhiteSpace;
+}
+
+sub applySpacingHeuristicsAndPrint
+{
+ my ($out, $line) = @_;
+
+ printPendingEmptyLines($out, $line);
+ $previousLineWasDisallowed = 0;
+ print $out $line;
+}
+
+sub setPreviousAllowedLine
+{
+ my $line = shift;
+ $previousAllowedLine = $line;
+}
+
+sub printPendingEmptyLines
+{
+ my $out = shift;
+ my $line = shift;
+ if ($previousLineWasDisallowed) {
+ if (!($pendingEmptyLines eq "") && !($previousAllowedLine =~ m/{\s*$/) && !($line =~ m/^\s*}/)) {
+ $pendingEmptyLines = "\n";
+ } else {
+ $pendingEmptyLines = "";
+ }
+ }
+ print $out $pendingEmptyLines;
+ $pendingEmptyLines = "";
+}
+
+sub ignoringLine
+{
+ # my $line = shift; # ignoring input argument
+ $previousLineWasDisallowed = 1;
+}
+
+1; \ No newline at end of file
diff --git a/WebKitTools/Scripts/VCSUtils.pm b/WebKitTools/Scripts/VCSUtils.pm
new file mode 100644
index 0000000..5e92821
--- /dev/null
+++ b/WebKitTools/Scripts/VCSUtils.pm
@@ -0,0 +1,135 @@
+# Copyright (C) 2007 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Module to share code to work with various version control systems.
+
+use strict;
+use warnings;
+use File::Spec;
+use webkitdirs;
+
+BEGIN {
+ use Exporter ();
+ our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
+ $VERSION = 1.00;
+ @ISA = qw(Exporter);
+ @EXPORT = qw(&isGitDirectory &isGit &isSVNDirectory &isSVN &makeFilePathRelative);
+ %EXPORT_TAGS = ( );
+ @EXPORT_OK = ();
+}
+
+our @EXPORT_OK;
+
+my $isGit;
+my $isSVN;
+my $gitBranch;
+my $isGitBranchBuild;
+
+sub isGitDirectory($)
+{
+ my ($dir) = @_;
+ return system("cd $dir && git rev-parse > /dev/null 2>&1") == 0;
+}
+
+sub isGit()
+{
+ return $isGit if defined $isGit;
+
+ $isGit = isGitDirectory(".");
+ return $isGit;
+}
+
+sub gitBranch()
+{
+ unless (defined $gitBranch) {
+ chomp($gitBranch = `git symbolic-ref -q HEAD`);
+ $gitBranch = "" if exitStatus($?);
+ $gitBranch =~ s#^refs/heads/##;
+ $gitBranch = "" if $gitBranch eq "master";
+ }
+
+ return $gitBranch;
+}
+
+sub isGitBranchBuild()
+{
+ my $branch = gitBranch();
+ chomp(my $override = `git config --bool branch.$branch.webKitBranchBuild`);
+ return 1 if $override eq "true";
+ return 0 if $override eq "false";
+
+ unless (defined $isGitBranchBuild) {
+ chomp(my $gitBranchBuild = `git config --bool core.webKitBranchBuild`);
+ $isGitBranchBuild = $gitBranchBuild eq "true";
+ }
+
+ return $isGitBranchBuild;
+}
+
+sub isSVNDirectory($)
+{
+ my ($dir) = @_;
+
+ return -d File::Spec->catdir($dir, ".svn");
+}
+
+sub isSVN()
+{
+ return $isSVN if defined $isSVN;
+
+ $isSVN = isSVNDirectory(".");
+ return $isSVN;
+}
+
+sub svnRevisionForDirectory($)
+{
+ my ($dir) = @_;
+ my $revision;
+
+ if (isSVNDirectory($dir)) {
+ my $svnInfo = `LC_ALL=C svn info $dir | grep Revision:`;
+ ($revision) = ($svnInfo =~ m/Revision: (\d+).*/g);
+ } elsif (isGitDirectory($dir)) {
+ my $gitLog = `cd $dir && LC_ALL=C git log --grep='git-svn-id: ' -n 1 | grep git-svn-id:`;
+ ($revision) = ($gitLog =~ m/ +git-svn-id: .+@(\d+) /g);
+ }
+ die "Unable to determine current SVN revision in $dir" unless (defined $revision);
+ return $revision;
+}
+
+my $gitRoot;
+sub makeFilePathRelative($)
+{
+ my ($path) = @_;
+ return $path unless isGit();
+
+ unless (defined $gitRoot) {
+ chomp($gitRoot = `git rev-parse --show-cdup`);
+ }
+ return $gitRoot . $path;
+}
+
+1;
diff --git a/WebKitTools/Scripts/bisect-builds b/WebKitTools/Scripts/bisect-builds
new file mode 100755
index 0000000..45fdcc4
--- /dev/null
+++ b/WebKitTools/Scripts/bisect-builds
@@ -0,0 +1,431 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2007, 2008 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# This script attempts to find the point at which a regression (or progression)
+# of behavior occurred by searching WebKit nightly builds.
+
+# To override the location where the nightly builds are downloaded or the path
+# to the Safari web browser, create a ~/.bisect-buildsrc file with one or more of
+# the following lines (use "~/" to specify a path from your home directory):
+#
+# $branch = "branch-name";
+# $nightlyDownloadDirectory = "~/path/to/nightly/downloads";
+# $safariPath = "/path/to/Safari.app";
+
+use strict;
+
+use File::Basename;
+use File::Path;
+use File::Spec;
+use File::Temp qw(tempfile);
+use Getopt::Long;
+use Time::HiRes qw(usleep);
+
+sub createTempFile($);
+sub downloadNightly($$$);
+sub findMacOSXVersion();
+sub findNearestNightlyIndex(\@$$);
+sub findSafariVersion($);
+sub loadSettings();
+sub makeNightlyList($$$$);
+sub max($$) { return $_[0] > $_[1] ? $_[0] : $_[1]; }
+sub mountAndRunNightly($$$$);
+sub parseRevisions($$;$);
+sub printStatus($$$);
+sub promptForTest($);
+
+loadSettings();
+
+my %validBranches = map { $_ => 1 } qw(feature-branch trunk);
+my $branch = $Settings::branch;
+my $nightlyDownloadDirectory = $Settings::nightlyDownloadDirectory;
+my $safariPath = $Settings::safariPath;
+
+my @nightlies;
+
+my $isProgression;
+my $localOnly;
+my @revisions;
+my $sanityCheck;
+my $showHelp;
+my $testURL;
+
+# Fix up -r switches in @ARGV
+@ARGV = map { /^(-r)(.+)$/ ? ($1, $2) : $_ } @ARGV;
+
+my $result = GetOptions(
+ "b|branch=s" => \$branch,
+ "d|download-directory=s" => \$nightlyDownloadDirectory,
+ "h|help" => \$showHelp,
+ "l|local!" => \$localOnly,
+ "p|progression!" => \$isProgression,
+ "r|revisions=s" => \&parseRevisions,
+ "safari-path=s" => \$safariPath,
+ "s|sanity-check!" => \$sanityCheck,
+);
+$testURL = shift @ARGV;
+
+$branch = "feature-branch" if $branch eq "feature";
+if (!exists $validBranches{$branch}) {
+ print STDERR "ERROR: Invalid branch '$branch'\n";
+ $showHelp = 1;
+}
+
+if (!$result || $showHelp || scalar(@ARGV) > 0) {
+ print STDERR "Search WebKit nightly builds for changes in behavior.\n";
+ print STDERR "Usage: " . basename($0) . " [options] [url]\n";
+ print STDERR <<END;
+ [-b|--branch name] name of the nightly build branch (default: trunk)
+ [-d|--download-directory dir] nightly build download directory (default: ~/Library/Caches/WebKit-Nightlies)
+ [-h|--help] show this help message
+ [-l|--local] only use local (already downloaded) nightlies
+ [-p|--progression] searching for a progression, not a regression
+ [-r|--revision M[:N]] specify starting (and optional ending) revisions to search
+ [--safari-path path] path to Safari application bundle (default: /Applications/Safari.app)
+ [-s|--sanity-check] verify both starting and ending revisions before bisecting
+END
+ exit 1;
+}
+
+my $nightlyWebSite = "http://nightly.webkit.org";
+my $nightlyBuildsURLBase = $nightlyWebSite . File::Spec->catdir("/builds", $branch, "mac");
+my $nightlyFilesURLBase = $nightlyWebSite . File::Spec->catdir("/files", $branch, "mac");
+
+$nightlyDownloadDirectory = glob($nightlyDownloadDirectory) if $nightlyDownloadDirectory =~ /^~/;
+$safariPath = glob($safariPath) if $safariPath =~ /^~/;
+$safariPath = File::Spec->catdir($safariPath, "Contents/MacOS/Safari") if $safariPath =~ m#\.app/*#;
+
+$nightlyDownloadDirectory = File::Spec->catdir($nightlyDownloadDirectory, $branch);
+if (! -d $nightlyDownloadDirectory) {
+ mkpath($nightlyDownloadDirectory, 0, 0755) || die "Could not create $nightlyDownloadDirectory: $!";
+}
+
+@nightlies = makeNightlyList($localOnly, $nightlyDownloadDirectory, findMacOSXVersion(), findSafariVersion($safariPath));
+
+my $startIndex = $revisions[0] ? findNearestNightlyIndex(@nightlies, $revisions[0], 'ceil') : 0;
+my $endIndex = $revisions[1] ? findNearestNightlyIndex(@nightlies, $revisions[1], 'floor') : $#nightlies;
+
+my $tempFile = createTempFile($testURL);
+
+if ($sanityCheck) {
+ my $didReproduceBug;
+
+ do {
+ printf "\nChecking starting revision r%s...\n",
+ $nightlies[$startIndex]->{rev};
+ downloadNightly($nightlies[$startIndex]->{file}, $nightlyFilesURLBase, $nightlyDownloadDirectory);
+ mountAndRunNightly($nightlies[$startIndex]->{file}, $nightlyDownloadDirectory, $safariPath, $tempFile);
+ $didReproduceBug = promptForTest($nightlies[$startIndex]->{rev});
+ $startIndex-- if $didReproduceBug < 0;
+ } while ($didReproduceBug < 0);
+ die "ERROR: Bug reproduced in starting revision! Do you need to test an earlier revision or for a progression?"
+ if $didReproduceBug && !$isProgression;
+ die "ERROR: Bug not reproduced in starting revision! Do you need to test an earlier revision or for a regression?"
+ if !$didReproduceBug && $isProgression;
+
+ do {
+ printf "\nChecking ending revision r%s...\n",
+ $nightlies[$endIndex]->{rev};
+ downloadNightly($nightlies[$endIndex]->{file}, $nightlyFilesURLBase, $nightlyDownloadDirectory);
+ mountAndRunNightly($nightlies[$endIndex]->{file}, $nightlyDownloadDirectory, $safariPath, $tempFile);
+ $didReproduceBug = promptForTest($nightlies[$endIndex]->{rev});
+ $endIndex++ if $didReproduceBug < 0;
+ } while ($didReproduceBug < 0);
+ die "ERROR: Bug NOT reproduced in ending revision! Do you need to test a later revision or for a progression?"
+ if !$didReproduceBug && !$isProgression;
+ die "ERROR: Bug reproduced in ending revision! Do you need to test a later revision or for a regression?"
+ if $didReproduceBug && $isProgression;
+}
+
+printStatus($nightlies[$startIndex]->{rev}, $nightlies[$endIndex]->{rev}, $isProgression);
+
+my %brokenRevisions = ();
+while (abs($endIndex - $startIndex) > 1) {
+ my $index = $startIndex + int(($endIndex - $startIndex) / 2);
+
+ my $didReproduceBug;
+ do {
+ if (exists $nightlies[$index]) {
+ my $buildsLeft = max(max(0, $endIndex - $index - 1), max(0, $index - $startIndex - 1));
+ my $plural = $buildsLeft == 1 ? "" : "s";
+ printf "\nChecking revision r%s (%d build%s left to test after this)...\n", $nightlies[$index]->{rev}, $buildsLeft, $plural;
+ downloadNightly($nightlies[$index]->{file}, $nightlyFilesURLBase, $nightlyDownloadDirectory);
+ mountAndRunNightly($nightlies[$index]->{file}, $nightlyDownloadDirectory, $safariPath, $tempFile);
+ $didReproduceBug = promptForTest($nightlies[$index]->{rev});
+ }
+ if ($didReproduceBug < 0) {
+ $brokenRevisions{$nightlies[$index]->{rev}} = $nightlies[$index]->{file};
+ delete $nightlies[$index];
+ $endIndex--;
+ $index = $startIndex + int(($endIndex - $startIndex) / 2);
+ }
+ } while ($didReproduceBug < 0);
+
+ if ($didReproduceBug && !$isProgression || !$didReproduceBug && $isProgression) {
+ $endIndex = $index;
+ } else {
+ $startIndex = $index;
+ }
+
+ print "\nBroken revisions skipped: r" . join(", r", keys %brokenRevisions) . "\n"
+ if scalar keys %brokenRevisions > 0;
+ printStatus($nightlies[$startIndex]->{rev}, $nightlies[$endIndex]->{rev}, $isProgression);
+}
+
+unlink $tempFile if $tempFile;
+
+exit 0;
+
+sub createTempFile($)
+{
+ my ($url) = @_;
+
+ return undef if !$url;
+
+ my ($fh, $tempFile) = tempfile(
+ basename($0) . "-XXXXXXXX",
+ DIR => ($ENV{'TMPDIR'} || "/tmp"),
+ SUFFIX => ".html",
+ UNLINK => 0,
+ );
+ print $fh "<meta http-equiv=\"refresh\" content=\"0; $url\">\n";
+ close($fh);
+
+ return $tempFile;
+}
+
+sub downloadNightly($$$)
+{
+ my ($filename, $urlBase, $directory) = @_;
+ my $path = File::Spec->catfile($directory, $filename);
+ if (! -f $path) {
+ print "Downloading $filename to $directory...\n";
+ `curl -# -o '$path' '$urlBase/$filename'`;
+ }
+}
+
+sub findMacOSXVersion()
+{
+ my $version;
+ open(SW_VERS, "-|", "/usr/bin/sw_vers") || die;
+ while (<SW_VERS>) {
+ $version = $1 if /^ProductVersion:\s+([^\s]+)/;
+ }
+ close(SW_VERS);
+ return $version;
+}
+
+sub findNearestNightlyIndex(\@$$)
+{
+ my ($nightlies, $revision, $round) = @_;
+
+ my $lowIndex = 0;
+ my $highIndex = $#{$nightlies};
+
+ return $highIndex if uc($revision) eq 'HEAD' || $revision >= $nightlies->[$highIndex]->{rev};
+ return $lowIndex if $revision <= $nightlies->[$lowIndex]->{rev};
+
+ while (abs($highIndex - $lowIndex) > 1) {
+ my $index = $lowIndex + int(($highIndex - $lowIndex) / 2);
+ if ($revision < $nightlies->[$index]->{rev}) {
+ $highIndex = $index;
+ } elsif ($revision > $nightlies->[$index]->{rev}) {
+ $lowIndex = $index;
+ } else {
+ return $index;
+ }
+ }
+
+ return ($round eq "floor") ? $lowIndex : $highIndex;
+}
+
+sub findSafariVersion($)
+{
+ my ($path) = @_;
+ my $versionPlist = File::Spec->catdir(dirname(dirname($path)), "version.plist");
+ my $version;
+ open(PLIST, "< $versionPlist") || die;
+ while (<PLIST>) {
+ if (m#^\s*<key>CFBundleShortVersionString</key>#) {
+ $version = <PLIST>;
+ $version =~ s#^\s*<string>(.+)</string>\s*[\r\n]*#$1#;
+ }
+ }
+ close(PLIST);
+ return $version;
+}
+
+sub loadSettings()
+{
+ package Settings;
+
+ our $branch = "trunk";
+ our $nightlyDownloadDirectory = File::Spec->catdir($ENV{HOME}, "Library/Caches/WebKit-Nightlies");
+ our $safariPath = "/Applications/Safari.app";
+
+ my $rcfile = File::Spec->catdir($ENV{HOME}, ".bisect-buildsrc");
+ return if !-f $rcfile;
+
+ my $result = do $rcfile;
+ die "Could not parse $rcfile: $@" if $@;
+}
+
+sub makeNightlyList($$$$)
+{
+ my ($useLocalFiles, $localDirectory, $macOSXVersion, $safariVersion) = @_;
+ my @files;
+
+ if ($useLocalFiles) {
+ opendir(DIR, $localDirectory) || die "$!";
+ foreach my $file (readdir(DIR)) {
+ if ($file =~ /^WebKit-SVN-r([0-9]+)\.dmg$/) {
+ push(@files, +{ rev => $1, file => $file });
+ }
+ }
+ closedir(DIR);
+ } else {
+ open(NIGHTLIES, "curl -s $nightlyBuildsURLBase/all |") || die;
+
+ while (my $line = <NIGHTLIES>) {
+ chomp $line;
+ my ($revision, $timestamp, $url) = split(/,/, $line);
+ my $nightly = basename($url);
+ push(@files, +{ rev => $revision, file => $nightly });
+ }
+ close(NIGHTLIES);
+ }
+
+ if (eval "v$macOSXVersion" ge v10.5) {
+ if ($safariVersion eq "4 Public Beta") {
+ @files = grep { $_->{rev} >= 39682 } @files;
+ } elsif (eval "v$safariVersion" ge v3.2) {
+ @files = grep { $_->{rev} >= 37348 } @files;
+ } elsif (eval "v$safariVersion" ge v3.1) {
+ @files = grep { $_->{rev} >= 29711 } @files;
+ } elsif (eval "v$safariVersion" ge v3.0) {
+ @files = grep { $_->{rev} >= 25124 } @files;
+ } elsif (eval "v$safariVersion" ge v2.0) {
+ @files = grep { $_->{rev} >= 19594 } @files;
+ } else {
+ die "Requires Safari 2.0 or newer";
+ }
+ } elsif (eval "v$macOSXVersion" ge v10.4) {
+ if ($safariVersion eq "4 Public Beta") {
+ @files = grep { $_->{rev} >= 39682 } @files;
+ } elsif (eval "v$safariVersion" ge v3.2) {
+ @files = grep { $_->{rev} >= 37348 } @files;
+ } elsif (eval "v$safariVersion" ge v3.1) {
+ @files = grep { $_->{rev} >= 29711 } @files;
+ } elsif (eval "v$safariVersion" ge v3.0) {
+ @files = grep { $_->{rev} >= 19992 } @files;
+ } elsif (eval "v$safariVersion" ge v2.0) {
+ @files = grep { $_->{rev} >= 11976 } @files;
+ } else {
+ die "Requires Safari 2.0 or newer";
+ }
+ } else {
+ die "Requires Mac OS X 10.4 (Tiger) or 10.5 (Leopard)";
+ }
+
+ my $nightlycmp = sub { return $a->{rev} <=> $b->{rev}; };
+
+ return sort $nightlycmp @files;
+}
+
+sub mountAndRunNightly($$$$)
+{
+ my ($filename, $directory, $safari, $tempFile) = @_;
+ my $mountPath = "/Volumes/WebKit";
+ my $webkitApp = File::Spec->catfile($mountPath, "WebKit.app");
+ my $diskImage = File::Spec->catfile($directory, $filename);
+
+ my $i = 0;
+ while (-e $mountPath) {
+ $i++;
+ usleep 100 if $i > 1;
+ `hdiutil detach '$mountPath' 2> /dev/null`;
+ die "Could not unmount $diskImage at $mountPath" if $i > 100;
+ }
+ die "Can't mount $diskImage: $mountPath already exists!" if -e $mountPath;
+
+ print "Mounting disk image and running WebKit...\n";
+ `hdiutil attach '$diskImage'`;
+ $i = 0;
+ while (! -e $webkitApp) {
+ usleep 100;
+ $i++;
+ die "Could not mount $diskImage at $mountPath" if $i > 100;
+ }
+
+ my $frameworkPath;
+ if (-d "/Volumes/WebKit/WebKit.app/Contents/Frameworks") {
+ my $osXVersion = join('.', (split(/\./, findMacOSXVersion()))[0..1]);
+ $frameworkPath = "/Volumes/WebKit/WebKit.app/Contents/Frameworks/$osXVersion";
+ } else {
+ $frameworkPath = "/Volumes/WebKit/WebKit.app/Contents/Resources";
+ }
+
+ $tempFile ||= "";
+ `DYLD_FRAMEWORK_PATH=$frameworkPath WEBKIT_UNSET_DYLD_FRAMEWORK_PATH=YES $safari $tempFile`;
+
+ `hdiutil detach '$mountPath' 2> /dev/null`;
+}
+
+sub parseRevisions($$;$)
+{
+ my ($optionName, $value, $ignored) = @_;
+
+ if ($value =~ /^r?([0-9]+|HEAD):?$/i) {
+ push(@revisions, $1);
+ die "Too many revision arguments specified" if scalar @revisions > 2;
+ } elsif ($value =~ /^r?([0-9]+):?r?([0-9]+|HEAD)$/i) {
+ $revisions[0] = $1;
+ $revisions[1] = $2;
+ } else {
+ die "Unknown revision '$value': expected 'M' or 'M:N'";
+ }
+}
+
+sub printStatus($$$)
+{
+ my ($startRevision, $endRevision, $isProgression) = @_;
+ printf "\n%s: r%s %s: r%s\n",
+ $isProgression ? "Fails" : "Works", $startRevision,
+ $isProgression ? "Works" : "Fails", $endRevision;
+}
+
+sub promptForTest($)
+{
+ my ($revision) = @_;
+ print "Did the bug reproduce in r$revision (yes/no/broken)? ";
+ my $answer = <STDIN>;
+ return 1 if $answer =~ /^(1|y.*)$/i;
+ return -1 if $answer =~ /^(-1|b.*)$/i; # Broken
+ return 0;
+}
+
diff --git a/WebKitTools/Scripts/build-drawtest b/WebKitTools/Scripts/build-drawtest
new file mode 100755
index 0000000..fa9b7c2
--- /dev/null
+++ b/WebKitTools/Scripts/build-drawtest
@@ -0,0 +1,48 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2005, 2006 Apple Computer, 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Simplified build script for WebKit Open Source Project.
+# Modified copy of build-dumprendertree. Perhaps these could share code.
+
+use strict;
+use FindBin;
+use lib $FindBin::Bin;
+use webkitdirs;
+
+checkRequiredSystemConfig();
+setConfiguration();
+chdirWebKit();
+my @options = XcodeOptions();
+
+# Check to see that all the frameworks are built (w/ SVG support).
+checkFrameworks();
+checkWebCoreSVGSupport(1);
+
+# Build
+chdir "WebKitTools/DrawTest" or die;
+exit system "xcodebuild", "-project", "DrawTest.xcodeproj", @options;
diff --git a/WebKitTools/Scripts/build-dumprendertree b/WebKitTools/Scripts/build-dumprendertree
new file mode 100755
index 0000000..46e86e0
--- /dev/null
+++ b/WebKitTools/Scripts/build-dumprendertree
@@ -0,0 +1,54 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2005 Apple Computer, 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+use strict;
+use FindBin;
+use lib $FindBin::Bin;
+use webkitdirs;
+use POSIX;
+
+checkRequiredSystemConfig();
+setConfiguration();
+chdirWebKit();
+my @options = XcodeOptions();
+
+# Build
+chdir "WebKitTools/DumpRenderTree" or die;
+my $result;
+if (isAppleMacWebKit()) {
+ $result = system "xcodebuild", "-project", "DumpRenderTree.xcodeproj", @options, @ARGV;
+} elsif (isAppleWinWebKit()) {
+ $result = buildVisualStudioProject("DumpRenderTree.sln");
+} elsif (isQt() || isGtk()) {
+ # Qt and Gtk build everything in one shot. No need to build anything here.
+ $result = 0;
+} else {
+ die "Building not defined for this platform!\n";
+}
+exit exitStatus($result);
diff --git a/WebKitTools/Scripts/build-jsc b/WebKitTools/Scripts/build-jsc
new file mode 100755
index 0000000..78ed0d0
--- /dev/null
+++ b/WebKitTools/Scripts/build-jsc
@@ -0,0 +1,78 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
+# Copyright (C) 2007 Eric Seidel <eric@webkit.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+use strict;
+use FindBin;
+use Getopt::Long qw(:config pass_through);
+use lib $FindBin::Bin;
+use webkitdirs;
+use POSIX;
+
+my $coverageSupport = 0;
+my $showHelp = 0;
+
+my $programName = basename($0);
+my $usage = <<EOF;
+Usage: $programName [options] [options to pass to build system]
+ --help Show this help message
+ --[no-]coverage Toggle code coverage support (default: $coverageSupport)
+EOF
+
+GetOptions(
+ 'coverage!' => \$coverageSupport,
+ 'help' => \$showHelp
+);
+
+if ($showHelp) {
+ print STDERR $usage;
+ exit 1;
+}
+
+checkRequiredSystemConfig();
+setConfiguration();
+chdirWebKit();
+my @options = XcodeOptions();
+my @coverageSupportOptions = ($coverageSupport) ? XcodeCoverageSupportOptions() : ();
+
+chdir "JavaScriptCore" or die "Can't find JavaScriptCore directory to build from";
+my $result;
+if (isAppleMacWebKit()) {
+ $result = system "sh", "-c", 'xcodebuild -project JavaScriptCore.xcodeproj "$@" | grep -v setenv && exit ${PIPESTATUS[0]}', "xcodebuild", @options, @ARGV, @coverageSupportOptions;
+} elsif (isAppleWinWebKit()) {
+ $result = buildVisualStudioProject("JavaScriptCore.vcproj/JavaScriptCore.sln");
+} elsif (isChromium()) {
+ $result = buildSconsProject("JavaScriptCore");
+} elsif (isQt() or isGtk() or isWx()) {
+ # Qt and Gtk build everything in one-shot. No need to build anything here.
+ $result = 0;
+} else {
+ die "Building not defined for this platform!\n";
+}
+exit exitStatus($result);
diff --git a/WebKitTools/Scripts/build-webkit b/WebKitTools/Scripts/build-webkit
new file mode 100755
index 0000000..788ace0
--- /dev/null
+++ b/WebKitTools/Scripts/build-webkit
@@ -0,0 +1,333 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2005, 2006 Apple Computer, 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Build script wrapper for the WebKit Open Source Project.
+
+use strict;
+use File::Basename;
+use File::Spec;
+use FindBin;
+use Getopt::Long qw(:config pass_through);
+use lib $FindBin::Bin;
+use webkitdirs;
+use POSIX;
+
+my $originalWorkingDirectory = getcwd();
+
+my $channelMessagingSupport = 0;
+my $databaseSupport = 1;
+my $domStorageSupport = 1;
+my $gnomeKeyringSupport = 0;
+my $iconDatabaseSupport = 1;
+my $offlineWebApplicationSupport = 1;
+my $svgSupport = 1;
+my $svgAnimationSupport = 1;
+my $svgFiltersSupport = 0;
+my $svgForeignObjectSupport = 1;
+my $svgUseSupport = 1;
+my $svgFontsSupport = 1;
+my $svgAsImageSupport = 1;
+my $xpathSupport = 1;
+my $xsltSupport = 1;
+my $wmlSupport = 0;
+my $coverageSupport = 0;
+my $videoSupport = (isAppleWebKit() || isGtk()); # Enable by default for Apple's builds and Gtk+
+my $workersSupport = (isAppleWebKit() || isGtk()); # Enable by default for Apple's builds (mac/win) and Gtk+
+my $geolocationSupport = (isAppleMacWebKit() && !isTiger() && !isLeopard());
+my $showHelp = 0;
+my $clean = 0;
+my $threeDRenderingSupport = 0;
+
+my $programName = basename($0);
+my $usage = <<EOF;
+Usage: $programName [options] [options to pass to build system]
+ --help Show this help message
+ --cairo-win32 Build using Cairo (rather than CoreGraphics) on Windows
+ --chromium Build the Chromium port on Mac/Win/Linux
+ --clean Cleanup the build directory
+ --gtk Build the GTK+ port
+ --[no-]3d-rendering Toggle 3D rendering support (default: $threeDRenderingSupport)
+ --[no-]channel-messaging Toggle MessageChannel and MessagePort support (default: $channelMessagingSupport)
+ --[no-]offline-web-applications Toggle Offline Web Application Support (default : $offlineWebApplicationSupport)
+ --[no-]database Toggle Database Support (default: $databaseSupport)
+ --[no-]dom-storage Toggle DOM Storage Support (default: $domStorageSupport)
+ --[no-]gnomekeyring Toggle GNOME Keyring Support (GTK+ port only) (default: $gnomeKeyringSupport)
+ --[no-]icon-database Toggle Icon database support (default: $iconDatabaseSupport)
+ --[no-]svg Toggle SVG support (default: $svgSupport)
+ --[no-]svg-animation Toggle SVG animation support (default: $svgAnimationSupport, implies SVG Support)
+ --[no-]svg-filters Toggle SVG filters support (default: $svgFiltersSupport, implies SVG Support)
+ --[no-]svg-foreign-object Toggle SVG foreign object support (default: $svgForeignObjectSupport, implies SVG Support)
+ --[no-]svg-fonts Toggle SVG fonts support (default: $svgFontsSupport, implies SVG Support)
+ --[no-]svg-as-image Toggle SVG as Image support (default: $svgAsImageSupport, implies SVG Support)
+ --[no-]svg-use Toggle SVG use element support (default: $svgUseSupport, implies SVG Support)
+ --[no-]xpath Toggle XPath support (default: $xpathSupport)
+ --[no-]xslt Toggle XSLT support (default: $xsltSupport)
+ --[no-]wml Toggle WML support (default: $wmlSupport)
+ --[no-]video Toggle Video support (default: $videoSupport)
+ --[no-]workers Toggle Web Workers support (default: $workersSupport)
+ --[no-]geolocation Toggle Geolocation support (default: $geolocationSupport)
+ --[no-]coverage Toggle code coverage support (default: $coverageSupport)
+EOF
+
+GetOptions(
+ '3d-rendering!' => \$threeDRenderingSupport,
+ 'channel-messaging!' => \$channelMessagingSupport,
+ 'database!' => \$databaseSupport,
+ 'dom-storage!' => \$domStorageSupport,
+ 'gnomekeyring!' => \$gnomeKeyringSupport,
+ 'icon-database!' => \$iconDatabaseSupport,
+ 'offline-web-applications!' => \$offlineWebApplicationSupport,
+ 'svg!' => \$svgSupport,
+ 'svg-animation!' => \$svgAnimationSupport,
+ 'svg-filters!' => \$svgFiltersSupport,
+ 'svg-foreign-object!' => \$svgForeignObjectSupport,
+ 'svg-fonts!' => \$svgFontsSupport,
+ 'svg-as-image!' => \$svgAsImageSupport,
+ 'svg-use!' => \$svgUseSupport,
+ 'xpath!' => \$xpathSupport,
+ 'xslt!' => \$xsltSupport,
+ 'wml!' => \$wmlSupport,
+ 'video!' => \$videoSupport,
+ 'workers!' => \$workersSupport,
+ 'geolocation!' => \$geolocationSupport,
+ 'coverage!' => \$coverageSupport,
+ 'help' => \$showHelp,
+ 'clean' => \$clean);
+
+if ($showHelp) {
+ print STDERR $usage;
+ exit 1;
+}
+
+checkRequiredSystemConfig();
+setConfiguration();
+chdirWebKit();
+
+if (isWx()) {
+ $ENV{"WEBKITOUTPUTDIR"} = productDir();
+
+ my @opts = getWxArgs();
+
+ if ($clean) {
+ push(@opts, "clean");
+ }
+ system "WebKitTools/wx/build-wxwebkit @opts";
+ exit exitStatus($?);
+}
+
+
+my $productDir = productDir();
+my @overrideFeatureDefinesOption = ();
+
+# This needs to be kept sorted, and in sync with FEATURE_DEFINES in JavaScriptCore.xcconfig, WebCore.xcconfig
+# and WebKit.xcconfig to prevent needless rebuilding when using both Xcode and build-webkit.
+
+push @overrideFeatureDefinesOption, "ENABLE_3D_RENDERING" if $threeDRenderingSupport;
+push @overrideFeatureDefinesOption, "ENABLE_CHANNEL_MESSAGING" if $channelMessagingSupport;
+push @overrideFeatureDefinesOption, "ENABLE_DATABASE" if $databaseSupport;
+push @overrideFeatureDefinesOption, "ENABLE_DOM_STORAGE" if $domStorageSupport;
+push @overrideFeatureDefinesOption, "ENABLE_ICONDATABASE" if $iconDatabaseSupport;
+push @overrideFeatureDefinesOption, "ENABLE_OFFLINE_WEB_APPLICATIONS" if $offlineWebApplicationSupport;
+push @overrideFeatureDefinesOption, "ENABLE_SVG" if $svgSupport;
+push @overrideFeatureDefinesOption, "ENABLE_SVG_ANIMATION" if $svgAnimationSupport;
+push @overrideFeatureDefinesOption, "ENABLE_SVG_AS_IMAGE" if $svgAsImageSupport;
+push @overrideFeatureDefinesOption, "ENABLE_SVG_FILTERS" if $svgFiltersSupport;
+push @overrideFeatureDefinesOption, "ENABLE_SVG_FONTS" if $svgFontsSupport;
+push @overrideFeatureDefinesOption, "ENABLE_SVG_FOREIGN_OBJECT" if $svgForeignObjectSupport;
+push @overrideFeatureDefinesOption, "ENABLE_SVG_USE" if $svgUseSupport;
+push @overrideFeatureDefinesOption, "ENABLE_VIDEO" if $videoSupport;
+push @overrideFeatureDefinesOption, "ENABLE_WORKERS" if $workersSupport;
+push @overrideFeatureDefinesOption, "ENABLE_XPATH" if $xpathSupport;
+push @overrideFeatureDefinesOption, "ENABLE_XSLT" if $xsltSupport;
+push @overrideFeatureDefinesOption, "ENABLE_WML" if $wmlSupport;
+push @overrideFeatureDefinesOption, "ENABLE_GEOLOCATION" if $geolocationSupport;
+my $overrideFeatureDefinesString = "FEATURE_DEFINES=" . join(" ", @overrideFeatureDefinesOption);
+
+my @coverageSupportOption = ($coverageSupport) ? XcodeCoverageSupportOptions() : ();
+
+# Check that all the project directories are there.
+my @projects = ("JavaScriptCore", "WebCore", "WebKit");
+# Only Apple builds JavaScriptGlue, and only on the Mac
+push @projects, "JavaScriptGlue" if isAppleMacWebKit();
+
+my @otherDirs = ("WebKitLibraries");
+for my $dir (@projects, @otherDirs) {
+ if (! -d $dir) {
+ die "Error: No $dir directory found. Please do a fresh checkout.\n";
+ }
+}
+
+my @options = ();
+
+# enable autotool options accordingly
+if (isGtk()) {
+ push @options, autotoolsFlag($databaseSupport, "database");
+ push @options, autotoolsFlag($domStorageSupport, "dom-storage");
+ push @options, autotoolsFlag($gnomeKeyringSupport, "gnomekeyring");
+ push @options, autotoolsFlag($iconDatabaseSupport, "icon-database");
+ push @options, autotoolsFlag($offlineWebApplicationSupport, "offline-web-applications");
+ push @options, autotoolsFlag($threeDRenderingSupport, "3D-rendering");
+ push @options, autotoolsFlag($channelMessagingSupport, "channel-messaging");
+ push @options, autotoolsFlag($svgSupport, "svg");
+ push @options, autotoolsFlag($svgAnimationSupport, "svg-animation");
+ push @options, autotoolsFlag($svgFiltersSupport, "svg-filters");
+ push @options, autotoolsFlag($svgForeignObjectSupport, "svg-foreign-object");
+ push @options, autotoolsFlag($svgFontsSupport, "svg-fonts");
+ push @options, autotoolsFlag($svgAsImageSupport, "svg-as-image");
+ push @options, autotoolsFlag($svgUseSupport, "svg-use-element");
+ push @options, autotoolsFlag($xpathSupport, "xpath");
+ push @options, autotoolsFlag($xsltSupport, "xslt");
+ push @options, autotoolsFlag($wmlSupport, "wml");
+ push @options, autotoolsFlag($videoSupport, "video");
+ push @options, autotoolsFlag($workersSupport, "web-workers");
+ push @options, autotoolsFlag($coverageSupport, "coverage");
+}
+
+if (isAppleMacWebKit()) {
+
+ push(@options, XcodeOptions());
+
+ # Copy library and header from WebKitLibraries to a findable place in the product directory.
+ my $srcLib = "WebKitLibraries/libWebKitSystemInterfaceTiger.a";
+ my $lib = "$productDir/libWebKitSystemInterfaceTiger.a";
+ if (!-e $lib || -M $lib > -M $srcLib) {
+ print "Updating $lib\n";
+ system "ditto", $srcLib, $lib;
+ system "ranlib", $lib;
+ }
+
+ $srcLib = "WebKitLibraries/libWebKitSystemInterfaceLeopard.a";
+ $lib = "$productDir/libWebKitSystemInterfaceLeopard.a";
+ if (!-e $lib || -M $lib > -M $srcLib) {
+ print "Updating $lib\n";
+ system "ditto", $srcLib, $lib;
+ system "ranlib", $lib;
+ }
+
+ my $srcHeader = "WebKitLibraries/WebKitSystemInterface.h";
+ my $header = "$productDir/usr/local/include/WebKitSystemInterface.h";
+ if (!-e $header || -M $header > -M $srcHeader) {
+ print "Updating $header\n";
+ system "mkdir", "-p", "$productDir/usr/local/include";
+ system "ditto", $srcHeader, $header;
+ }
+
+ $srcLib = "WebKitLibraries/libWebCoreSQLite3.a";
+ $lib = "$productDir/libWebCoreSQLite3.a";
+ if (!-e $lib || -M $lib > -M $srcLib) {
+ print "Updating $lib\n";
+ system "ditto", $srcLib, $lib;
+ system "ranlib", $lib;
+ }
+
+ my $srcHeaderDir = "WebKitLibraries/WebCoreSQLite3";
+ my $headerDir = "$productDir/WebCoreSQLite3";
+ if (!-e $headerDir || -M $headerDir > -M $srcHeaderDir) {
+ print "Updating $headerDir\n";
+ system "ditto", $srcHeaderDir, $headerDir;
+ }
+}
+
+if (isAppleWinWebKit()) {
+ # Copy WebKitSupportLibrary to the correct location in WebKitLibraries so it can be found.
+ # Will fail if WebKitSupportLibrary.zip is not in source root.
+ (system("perl WebKitTools/Scripts/update-webkit-support-libs") == 0) or die;
+}
+
+# Force re-link of existing libraries if different than expected
+removeLibraryDependingOnSVG("WebCore", $svgSupport);
+
+# Build, and abort if the build fails.
+for my $dir (@projects) {
+ chdir $dir or die;
+ my $result = 0;
+
+ # For Gtk and Qt the WebKit project builds all others
+ if ((isGtk() || isQt()) && $dir ne "WebKit") {
+ chdir ".." or die;
+ next;
+ }
+
+ if (isGtk()) {
+ $result = buildGtkProject($dir, $clean, @options);
+ } elsif (isQt()) {
+ $result = buildQMakeQtProject($dir, $clean, @ARGV);
+ } elsif (isAppleMacWebKit()) {
+ my @xcodeOptions = ();
+ push(@xcodeOptions, @options);
+ push(@xcodeOptions, $overrideFeatureDefinesString);
+ push(@xcodeOptions, @coverageSupportOption);
+ push(@xcodeOptions, @ARGV);
+ $result = buildXCodeProject($dir, $clean, @xcodeOptions);
+ } elsif (isAppleWinWebKit()) {
+ if ($dir eq "WebKit") {
+ $result = buildVisualStudioProject("win/WebKit.vcproj/WebKit.sln", $clean);
+ }
+ } elsif (isChromium()) {
+ $result = buildSconsProject($dir, $clean);
+ }
+
+ if (exitStatus($result)) {
+ if (isAppleWinWebKit()) {
+ print "\n\n===== BUILD FAILED ======\n\n";
+ my $scriptDir = relativeScriptsDir();
+ print "Please ensure you have run $scriptDir/update-webkit to install depenedencies.\n\n";
+ my $baseProductDir = baseProductDir();
+ print "You can view build errors by checking the BuildLog.htm files located at:\n$baseProductDir/obj/<project>/<config>.\n";
+ }
+ exit exitStatus($result);
+ }
+ chdir ".." or die;
+}
+
+# Don't report the "WebKit is now built" message after a clean operation.
+exit if $clean;
+
+# Write out congratulations message.
+
+my $launcherPath = launcherPath();
+my $launcherName = launcherName();
+
+print "\n";
+print "===========================================================\n";
+print " WebKit is now built. To run $launcherName with this newly-built\n";
+print " code, use the \"$launcherPath\" script.\n";
+if ($svgSupport) {
+ print "\n NOTE: WebKit has been built with SVG support enabled.\n";
+ print " $launcherName will have SVG viewing capabilities.\n";
+}
+if ($svgAnimationSupport or $svgFiltersSupport or $svgForeignObjectSupport or $svgFontsSupport or $svgAsImageSupport or $svgUseSupport) {
+ print " Your build supports the following (optional) SVG features: \n";
+ print " * Basic SVG animation.\n" if $svgAnimationSupport;
+ print " * SVG filters.\n" if $svgFiltersSupport;
+ print " * SVG foreign object.\n" if $svgForeignObjectSupport;
+ print " * SVG fonts.\n" if $svgFontsSupport;
+ print " * SVG as image.\n" if $svgAsImageSupport;
+ print " * SVG <use> support.\n" if $svgUseSupport;
+}
+print "===========================================================\n";
diff --git a/WebKitTools/Scripts/check-dom-results b/WebKitTools/Scripts/check-dom-results
new file mode 100755
index 0000000..0b32406
--- /dev/null
+++ b/WebKitTools/Scripts/check-dom-results
@@ -0,0 +1,141 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2005 Apple Computer, 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Script to check status of W3C DOM tests that are part of the WebKit tests.
+
+use strict;
+use FindBin;
+use Cwd;
+use lib $FindBin::Bin;
+use webkitdirs;
+
+chdirWebKit();
+
+my $verbose = $ARGV[0] && $ARGV[0] eq "-v";
+
+my $workingDir = getcwd();
+my $testDirectory = "$workingDir/LayoutTests";
+
+my @suites = ( {"name" => "DOM Level 1 Core (html)", "directory" => "dom/html/level1/core"},
+ {"name" => "DOM Level 2 Core (html)", "directory" => "dom/html/level2/core"},
+ {"name" => "DOM Level 2 Events (html)", "directory" => "dom/html/level2/events"},
+ {"name" => "DOM Level 2 HTML (html)", "directory" => "dom/html/level2/html"},
+ {"name" => "DOM Level 1 Core (xhtml)", "directory" => "dom/xhtml/level1/core"},
+ {"name" => "DOM Level 2 Core (xhtml)", "directory" => "dom/xhtml/level2/core"},
+ {"name" => "DOM Level 2 Events (xhtml)", "directory" => "dom/xhtml/level2/events"},
+ {"name" => "DOM Level 2 HTML (xhtml)", "directory" => "dom/xhtml/level2/html"},
+ {"name" => "DOM Level 3 Core (xhtml)", "directory" => "dom/xhtml/level3/core"},
+ {"name" => "DOM Level 3 XPath (svg)", "directory" => "dom/svg/level3/xpath"});
+
+my $totalCount = 0;
+my $totalSuccesses = 0;
+my $totalDisabled = 0;
+my $totalFailed = 0;
+
+foreach my $suite (@suites) {
+
+ my %suite = %$suite;
+ my $directory = $suite{"directory"};
+ my $name = $suite{"name"};
+ my @results = `find "${testDirectory}/${directory}" -name "*-expected.txt"`;
+ my @disabled = `find "${testDirectory}/${directory}" -name "*-disabled"`;
+
+ my @failures = ();
+ my $count = 0;
+
+ foreach my $result (@results) {
+ $count++;
+ my $success = 0;
+ open RESULT, "<$result";
+ while (<RESULT>) {
+ if (/Success/) {
+ $success = 1;
+ last;
+ }
+ }
+ close RESULT;
+ if (!$success) {
+ push @failures, $result;
+ }
+ }
+
+ my $disabledCount = (scalar @disabled);
+ my $failureCount = (scalar @failures);
+
+ $count += $disabledCount;
+
+ my $successCount = $count - $failureCount - $disabledCount;
+ my $percentage = (sprintf "%.1f", ($successCount * 100.0 / $count));
+
+ if ($percentage == 100) {
+ print "${name}: all ${count} tests succeeded";
+ } else {
+ print "${name}: ${successCount} out of ${count} tests succeeded (${percentage}%)";
+ }
+ print " ($disabledCount disabled)" if $disabledCount;
+ print "\n";
+ if ($verbose) {
+ print "\n";
+ if (@disabled) {
+ print " Disabled:\n";
+
+ foreach my $failure (sort @disabled) {
+ $failure =~ s|.*/||;
+ $failure =~ s|-disabled||;
+ print " ${directory}/${failure}";
+ }
+ }
+ if (@failures) {
+ print " Failed:\n";
+
+ foreach my $failure (sort @failures) {
+ $directory =~ m|^dom/(\w+)|;
+ my $extension = $1;
+ $failure =~ s|.*/||;
+ $failure =~ s|-expected\.txt|.${extension}|;
+ print " ${directory}/${failure}";
+ }
+ }
+
+ print "\n";
+ }
+
+ $totalCount += $count;
+ $totalSuccesses += $successCount;
+ $totalDisabled += $disabledCount;
+ $totalFailed += $failureCount;
+}
+
+
+my $totalPercentage = (sprintf "%.1f", ($totalSuccesses * 100.0 / $totalCount));
+my $totalDisabledPercentage = (sprintf "%.1f", ($totalDisabled * 100.0 / $totalCount));
+my $totalFailedPercentage = (sprintf "%.1f", ($totalFailed * 100.0 / $totalCount));
+
+print "Total: ${totalSuccesses} out of ${totalCount} tests succeeded (${totalPercentage}%)\n";
+print " ${totalDisabled} tests disabled (${totalDisabledPercentage}%)\n";
+print " ${totalFailed} tests failed (${totalFailedPercentage}%)\n";
diff --git a/WebKitTools/Scripts/check-for-exit-time-destructors b/WebKitTools/Scripts/check-for-exit-time-destructors
new file mode 100755
index 0000000..19656b5
--- /dev/null
+++ b/WebKitTools/Scripts/check-for-exit-time-destructors
@@ -0,0 +1,151 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2006, 2007, 2008 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# "check-for-exit-time-destructors" script for WebKit Open Source Project
+
+# Intended to be invoked from an Xcode build step to check if there are
+# any exit-time destructors in a target.
+
+use warnings;
+use strict;
+
+use File::Basename;
+
+sub touch($);
+sub printFunctions($$);
+
+my $arch = $ENV{'CURRENT_ARCH'};
+my $configuration = $ENV{'CONFIGURATION'};
+my $target = $ENV{'TARGET_NAME'};
+my $variant = $ENV{'CURRENT_VARIANT'};
+my $coverageBuild = $ENV{'WEBKIT_COVERAGE_BUILD'};
+my $debugRoot = $ENV{'WEBKIT_DEBUG_ROOT'};
+
+$arch = $ENV{'NATIVE_ARCH'} if !$arch; # for Xcode 2.1, which does not have CURRENT_ARCH
+$variant = "normal" if !$variant; # for Xcode 2.1, which does not have CURRENT_VARIANT
+
+my $executablePath = "$ENV{'TARGET_BUILD_DIR'}/$ENV{'EXECUTABLE_PATH'}";
+
+my $buildTimestampPath = $ENV{'TARGET_TEMP_DIR'} . "/" . basename($0) . ".timestamp";
+my $buildTimestampAge = -M $buildTimestampPath;
+my $scriptAge = -M $0;
+
+my $list = $ENV{"LINK_FILE_LIST_${variant}_${arch}"};
+
+if (!open LIST, $list) {
+ print "Could not open $list\n";
+ exit 1;
+}
+
+my @files = <LIST>;
+chomp @files;
+close LIST;
+
+my $sawError = 0;
+
+for my $file (sort @files) {
+ if (defined $buildTimestampAge && $buildTimestampAge < $scriptAge) {
+ my $fileAge = -M $file;
+ next if defined $fileAge && $fileAge > $buildTimestampAge;
+ }
+ if (!open NM, "(nm '$file' | sed 's/^/STDOUT:/') 2>&1 |") {
+ print "Could not open $file\n";
+ $sawError = 1;
+ next;
+ }
+ my $sawAtExit = 0;
+ while (<NM>) {
+ if (/^STDOUT:/) {
+ $sawAtExit = 1 if /___cxa_atexit/;
+ } else {
+ print STDERR if $_ ne "nm: no name list\n";
+ }
+ }
+ close NM;
+ next unless $sawAtExit;
+
+ my $shortName = $file;
+ $shortName =~ s/.*\///;
+
+ $sawError = 1 if printFunctions($shortName, $file);
+}
+
+if ($sawError and !$coverageBuild) {
+ print "Use DEFINE_STATIC_LOCAL from <wtf/StdLibExtras.h>\n";
+ unlink $executablePath;
+ exit 1;
+}
+
+touch($buildTimestampPath);
+exit 0;
+
+sub touch($)
+{
+ my ($path) = @_;
+ open(TOUCH, ">", $path) or die "$!";
+ close(TOUCH);
+}
+
+sub demangle($)
+{
+ my ($symbol) = @_;
+ if (!open FILT, "c++filt $symbol |") {
+ print "Could not open c++filt\n";
+ return;
+ }
+ my $result = <FILT>;
+ close FILT;
+ chomp $result;
+ return $result;
+}
+
+sub printFunctions($$)
+{
+ my ($shortName, $path) = @_;
+ if (!open OTOOL, "otool -tV '$path' |") {
+ print "Could not open $path\n";
+ return 0;
+ }
+ my %functions;
+ my $currentSymbol = "";
+ while (<OTOOL>) {
+ $currentSymbol = $1 if /^(\w+):$/;
+ next unless $currentSymbol;
+ $functions{demangle($currentSymbol)} = 1 if /___cxa_atexit/;
+ }
+ close OTOOL;
+ my $result = 0;
+ for my $function (sort keys %functions) {
+ if (!$result) {
+ print "$shortName has exit time destructors in it! ($path)\n";
+ $result = 1;
+ }
+ print " $function\n";
+ }
+ return $result;
+}
diff --git a/WebKitTools/Scripts/check-for-global-initializers b/WebKitTools/Scripts/check-for-global-initializers
new file mode 100755
index 0000000..88894be
--- /dev/null
+++ b/WebKitTools/Scripts/check-for-global-initializers
@@ -0,0 +1,135 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2006, 2007, 2008 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# "check-for-global-initializers" script for WebKit Open Source Project
+
+# Intended to be invoked from an Xcode build step to check if there are
+# any global initializers in a target.
+
+use warnings;
+use strict;
+
+use File::Basename;
+
+sub touch($);
+
+my $arch = $ENV{'CURRENT_ARCH'};
+my $configuration = $ENV{'CONFIGURATION'};
+my $target = $ENV{'TARGET_NAME'};
+my $variant = $ENV{'CURRENT_VARIANT'};
+my $coverageBuild = $ENV{'WEBKIT_COVERAGE_BUILD'};
+my $debugRoot = $ENV{'WEBKIT_DEBUG_ROOT'};
+
+$arch = $ENV{'NATIVE_ARCH'} if !$arch; # for Xcode 2.1, which does not have CURRENT_ARCH
+$variant = "normal" if !$variant; # for Xcode 2.1, which does not have CURRENT_VARIANT
+
+my $executablePath = "$ENV{'TARGET_BUILD_DIR'}/$ENV{'EXECUTABLE_PATH'}";
+
+my $buildTimestampPath = $ENV{'TARGET_TEMP_DIR'} . "/" . basename($0) . ".timestamp";
+my $buildTimestampAge = -M $buildTimestampPath;
+my $scriptAge = -M $0;
+
+my $list = $ENV{"LINK_FILE_LIST_${variant}_${arch}"};
+
+if (!open LIST, $list) {
+ print "Could not open $list\n";
+ exit 1;
+}
+
+my @files = <LIST>;
+chomp @files;
+close LIST;
+
+my $sawError = 0;
+
+for my $file (sort @files) {
+ if (defined $buildTimestampAge && $buildTimestampAge < $scriptAge) {
+ my $fileAge = -M $file;
+ next if defined $fileAge && $fileAge > $buildTimestampAge;
+ }
+ if (!open NM, "(nm '$file' | sed 's/^/STDOUT:/') 2>&1 |") {
+ print "Could not open $file\n";
+ $sawError = 1;
+ next;
+ }
+ my $sawGlobal = 0;
+ while (<NM>) {
+ if (/^STDOUT:/) {
+ $sawGlobal = 1 if /__GLOBAL__I/;
+ } else {
+ print STDERR if $_ ne "nm: no name list\n";
+ }
+ }
+ close NM;
+ if ($sawGlobal) {
+ my $shortName = $file;
+ $shortName =~ s/.*\///;
+
+ # Special cases for files that have initializers in debug builds.
+ if ($configuration eq "Debug" or $variant eq "debug" or $debugRoot) {
+ if ($target eq "JavaScriptCore") {
+ next if $shortName eq "AllInOneFile.o";
+ next if $shortName eq "Opcode.o";
+ next if $shortName eq "Structure.o";
+ next if $shortName eq "nodes.o";
+ }
+ if ($target eq "WebCore") {
+ next if $shortName eq "CachedPage.o";
+ next if $shortName eq "CachedResource.o";
+ next if $shortName eq "Frame.o";
+ next if $shortName eq "JSCustomSQLTransactionCallback.o";
+ next if $shortName eq "JSEventListener.o";
+ next if $shortName eq "Node.o";
+ next if $shortName eq "Page.o";
+ next if $shortName eq "Range.o";
+ next if $shortName eq "RenderObject.o";
+ next if $shortName eq "SubresourceLoader.o";
+ next if $shortName eq "SVGElementInstance.o";
+ next if $shortName eq "bidi.o";
+ }
+ }
+
+ print "$shortName has a global initializer in it! ($file)\n";
+ $sawError = 1;
+ }
+}
+
+if ($sawError and !$coverageBuild) {
+ unlink $executablePath;
+ exit 1;
+}
+
+touch($buildTimestampPath);
+exit 0;
+
+sub touch($)
+{
+ my ($path) = @_;
+ open(TOUCH, ">", $path) or die "$!";
+ close(TOUCH);
+}
diff --git a/WebKitTools/Scripts/check-for-weak-vtables b/WebKitTools/Scripts/check-for-weak-vtables
new file mode 100755
index 0000000..d274b01
--- /dev/null
+++ b/WebKitTools/Scripts/check-for-weak-vtables
@@ -0,0 +1,101 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2006, 2007, 2008 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# "check-for-weak-vtables" script for WebKit Open Source Project
+
+# Intended to be invoked from an Xcode build step to check if there are
+# any weak vtables in a target.
+
+use warnings;
+use strict;
+
+use File::Basename;
+
+sub touch($);
+
+my $arch = $ENV{'CURRENT_ARCH'};
+my $configuration = $ENV{'CONFIGURATION'};
+my $target = $ENV{'TARGET_NAME'};
+my $variant = $ENV{'CURRENT_VARIANT'};
+my $coverageBuild = $ENV{'WEBKIT_COVERAGE_BUILD'};
+my $debugRoot = $ENV{'WEBKIT_DEBUG_ROOT'};
+
+$arch = $ENV{'NATIVE_ARCH'} if !$arch; # for Xcode 2.1, which does not have CURRENT_ARCH
+$variant = "normal" if !$variant; # for Xcode 2.1, which does not have CURRENT_VARIANT
+
+my $executablePath = "$ENV{'TARGET_BUILD_DIR'}/$ENV{'EXECUTABLE_PATH'}";
+
+my $buildTimestampPath = $ENV{'TARGET_TEMP_DIR'} . "/" . basename($0) . ".timestamp";
+my $buildTimestampAge = -M $buildTimestampPath;
+my $executablePathAge = -M $executablePath;
+
+my $sawError = 0;
+
+if (!defined $executablePathAge || !defined $buildTimestampAge || $executablePathAge > $buildTimestampAge) {
+ if (!open NM, "(nm -m '$executablePath' | c++filt | sed 's/^/STDOUT:/') 2>&1 |") {
+ print "Could not open $executablePath\n";
+ $sawError = 1;
+ next;
+ }
+ my @weakVTableClasses = ();
+ while (<NM>) {
+ if (/^STDOUT:/) {
+ push @weakVTableClasses, $1 if /weak external vtable for (.*)$/;
+ } else {
+ print STDERR if $_ ne "nm: no name list\n";
+ }
+ }
+ close NM;
+ if (@weakVTableClasses) {
+ my $shortName = $executablePath;
+ $shortName =~ s/.*\///;
+
+ print "$shortName has a weak vtable in it ($executablePath)\n";
+ print "Fix by making sure the first virtual function in each of these classes is not an inline:\n";
+ for my $class (sort @weakVTableClasses) {
+ print " $class\n";
+ }
+ $sawError = 1;
+ }
+}
+
+if ($sawError and !$coverageBuild) {
+ unlink $executablePath;
+ exit 1;
+}
+
+touch($buildTimestampPath);
+
+exit 0;
+
+sub touch($)
+{
+ my ($path) = @_;
+ open(TOUCH, ">", $path) or die "$!";
+ close(TOUCH);
+}
diff --git a/WebKitTools/Scripts/clean-header-guards b/WebKitTools/Scripts/clean-header-guards
new file mode 100755
index 0000000..2bad046
--- /dev/null
+++ b/WebKitTools/Scripts/clean-header-guards
@@ -0,0 +1,53 @@
+#!/usr/bin/ruby
+
+require 'find'
+require 'optparse'
+
+options = {}
+OptionParser.new do |opts|
+ opts.banner = "Usage: clean-header-guards [options]"
+
+ opts.on("--prefix [PREFIX]", "Append a header prefix to all guards") do |prefix|
+ options[:prefix] = prefix
+ end
+end.parse!
+
+IgnoredFilenamePatterns = [
+ # ignore headers which are known not to have guard
+ /WebCorePrefix/,
+ /ForwardingHeaders/,
+ %r|bindings/objc|,
+ /vcproj/, # anything inside a vcproj is in the windows wasteland
+
+ # we don't own any of these headers
+ %r|icu/unicode|,
+ %r|platform/graphics/cairo|,
+ %r|platform/image-decoders|,
+
+ /config.h/ # changing this one sounds scary
+].freeze
+
+IgnoreFileNamesPattern = Regexp.union(*IgnoredFilenamePatterns).freeze
+
+Find::find(".") do |filename|
+ next unless filename =~ /\.h$/
+ next if filename.match(IgnoreFileNamesPattern)
+
+ File.open(filename, "r+") do |file|
+ contents = file.read
+ match_results = contents.match(/#ifndef (\S+)\n#define \1/s)
+ if match_results
+ current_guard = match_results[1]
+ new_guard = File.basename(filename).sub('.', '_')
+ new_guard = options[:prefix] + '_' + new_guard if options[:prefix]
+ contents.gsub!(/#{current_guard}\b/, new_guard)
+ else
+ puts "Ignoring #{filename}, failed to find existing header guards."
+ end
+ tmp_filename = filename + ".tmp"
+ File.open(tmp_filename, "w+") do |new_file|
+ new_file.write(contents)
+ end
+ File.rename tmp_filename, filename
+ end
+end
diff --git a/WebKitTools/Scripts/commit-log-editor b/WebKitTools/Scripts/commit-log-editor
new file mode 100755
index 0000000..939b28c
--- /dev/null
+++ b/WebKitTools/Scripts/commit-log-editor
@@ -0,0 +1,189 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2006, 2007 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Script to put change log comments in as default check-in comment.
+
+use strict;
+use File::Basename;
+use File::Spec;
+use FindBin;
+use lib $FindBin::Bin;
+use VCSUtils;
+use webkitdirs;
+
+my $log = $ARGV[0];
+
+my $baseDir = baseProductDir();
+
+my $editor = $ENV{SVN_LOG_EDITOR};
+if (!$editor) {
+ $editor = $ENV{CVS_LOG_EDITOR};
+}
+if (!$editor) {
+ my $builtEditorApplication = "$baseDir/Release/Commit Log Editor.app/Contents/MacOS/Commit Log Editor";
+ $editor = $builtEditorApplication if -x $builtEditorApplication;
+}
+if (!$editor) {
+ my $builtEditorApplication = "$baseDir/Debug/Commit Log Editor.app/Contents/MacOS/Commit Log Editor";
+ $editor = $builtEditorApplication if -x $builtEditorApplication;
+}
+if (!$editor) {
+ my $installedEditorApplication = "$ENV{HOME}/Applications/Commit Log Editor.app/Contents/MacOS/Commit Log Editor";
+ $editor = $installedEditorApplication if -x $installedEditorApplication;
+}
+if (!$editor) {
+ $editor = $ENV{EDITOR} || "/usr/bin/vi";
+}
+
+my $inChangesToBeCommitted = !isGit();
+my @changeLogs = ();
+my $logContents = "";
+my $existingLog = 0;
+open LOG, $log or die;
+while (<LOG>) {
+ if (isGit()) {
+ if (/^# Changes to be committed:$/) {
+ $inChangesToBeCommitted = 1;
+ } elsif ($inChangesToBeCommitted && /^# \S/) {
+ $inChangesToBeCommitted = 0;
+ }
+ }
+
+ $logContents .= $_;
+ $existingLog = isGit() && !(/^#/ || /^\s*$/) unless $existingLog;
+
+ push @changeLogs, makeFilePathRelative($1) if $inChangesToBeCommitted && (/^M....(.*ChangeLog)$/ || /^#\tmodified: (.*ChangeLog)/) && !/-ChangeLog/;
+}
+close LOG;
+
+# Don't change anything if there's already a log message
+# (as can happen with git-commit --amend)
+exec $editor, @ARGV if $existingLog;
+
+my $topLevel = topLevelSourceDirectory();
+
+my %changeLogSort;
+my %changeLogContents;
+for my $changeLog (@changeLogs) {
+ open CHANGELOG, $changeLog or die "Can't open $changeLog";
+ my $contents = "";
+ my $blankLines = "";
+ while (<CHANGELOG>) {
+ if (/^\S/) {
+ last if $contents;
+ }
+ if (/\S/) {
+ $contents .= $blankLines if $contents;
+ $blankLines = "";
+ $contents .= $_;
+ } else {
+ $blankLines .= $_;
+ }
+ }
+ close CHANGELOG;
+
+ $changeLog = File::Spec->abs2rel(File::Spec->rel2abs($changeLog), $topLevel);
+
+ my $label = dirname($changeLog);
+ $label = "top level" unless length $label;
+
+ my $sortKey = lc $label;
+ if ($label eq "top level") {
+ $sortKey = "";
+ } elsif ($label eq "Tools") {
+ $sortKey = "-, just after top level";
+ } elsif ($label eq "WebBrowser") {
+ $sortKey = lc "WebKit, WebBrowser after";
+ } elsif ($label eq "WebCore") {
+ $sortKey = lc "WebFoundation, WebCore after";
+ } elsif ($label eq "LayoutTests") {
+ $sortKey = lc "~, LayoutTests last";
+ }
+
+ $changeLogSort{$sortKey} = $label;
+ $changeLogContents{$label} = $contents;
+}
+
+my $first = 1;
+open NEWLOG, ">$log.edit" or die;
+for my $sortKey (sort keys %changeLogSort) {
+ my $label = $changeLogSort{$sortKey};
+ if (keys %changeLogSort > 1) {
+ print NEWLOG "\n" if !$first;
+ $first = 0;
+ print NEWLOG "$label:\n\n";
+ }
+ print NEWLOG $changeLogContents{$label};
+}
+print NEWLOG $logContents;
+close NEWLOG;
+
+system $editor, "$log.edit";
+
+open NEWLOG, "$log.edit" or exit;
+my $foundComment = 0;
+while (<NEWLOG>) {
+ $foundComment = 1 if (/\S/ && !/^CVS:/);
+}
+close NEWLOG;
+
+if ($foundComment) {
+ open NEWLOG, "$log.edit" or die;
+ open LOG, ">$log" or die;
+ while (<NEWLOG>) {
+ print LOG;
+ }
+ close LOG;
+ close NEWLOG;
+}
+
+unlink "$log.edit";
+
+sub topLevelSourceDirectory
+{
+ if (isGit()) {
+ chomp(my $gitDir = `git rev-parse --git-dir`);
+ return dirname($gitDir);
+ } elsif (isSVN()) {
+ open(INFO, "-|", qw(svn info)) or die;
+ my ($root, $url);
+ while (my $line = <INFO>) {
+ if ($line =~ /^Repository Root: (.*)$/) {
+ $root = $1;
+ } elsif ($line =~ /^URL: (.*)$/) {
+ $url = $1;
+ }
+ }
+ close(INFO);
+
+ my $path = $url;
+ $path =~ s/^\Q$root\E//;
+ $path =~ s/^\/?(branches\/[^\/]*|trunk)\/?//;
+ return File::Spec->rel2abs(File::Spec->catdir(map { ".." } File::Spec->splitdir($path)));
+ }
+}
diff --git a/WebKitTools/Scripts/compare-timing-files b/WebKitTools/Scripts/compare-timing-files
new file mode 100755
index 0000000..11b470b
--- /dev/null
+++ b/WebKitTools/Scripts/compare-timing-files
@@ -0,0 +1,88 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2006 Apple Computer, 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# This script takes two files that are lists of timings and compares them.
+
+use warnings;
+use strict;
+use Getopt::Long;
+
+my $usage = "compare-timing-files [-c|--count results] oldFile newFile";
+
+my $count = 1;
+GetOptions("c|count=i" => \$count);
+
+my ($file1, $file2) = @ARGV;
+die "$usage\n" unless ($file1 && $file2 && @ARGV == 2);
+
+my ($oldAverage, $oldRange, $oldRangePercent) = parseResults($file1);
+my ($newAverage, $newRange, $newRangePercent) = parseResults($file2);
+
+print "\n===== $file1 =====\n";
+if ($count == 1) {
+ print("fastest run: $oldAverage\n");
+} else {
+ print("average of fastest $count runs: $oldAverage\n");
+ printf("range of fastest $count runs: %.2f%% (%d)\n", $oldRangePercent, $oldRange);
+}
+
+print "\n===== $file2 =====\n";
+if ($count == 1) {
+ print("fastest run: $newAverage\n");
+} else {
+ print("average of fastest $count runs: $newAverage\n");
+ printf("range of fastest $count runs: %.2f%% (%d)\n", $newRangePercent, $newRange);
+}
+
+my $gainOrLoss = $newAverage <= $oldAverage ? "GAIN" : "LOSS";
+my $difference = abs($newAverage - $oldAverage);
+my $differencePercent = $difference / $oldAverage * 100;
+printf("\nperformance %s of %.2f%% (%.1f / %.1f)\n", $gainOrLoss, $differencePercent, $difference, $oldAverage);
+print "\n";
+
+sub parseResults
+{
+ my ($file) = @_;
+
+ open(FILE, $file) or die "Couldn't open file: $file";
+ my @results = <FILE>;
+ close(FILE);
+
+ @results = sort(@results);
+ my $total = 0;
+ for (my $i = 0; $i < $count; $i++) {
+ $results[$i] =~ s/\D*//; # cut out non-digits
+ $total += $results[$i];
+ }
+ my $average = $total / $count;
+ my $range = $results[$count - 1] - $results[0];
+ my $rangePercent = $range / $results[$count - 1] * 100;
+
+ return ($average, $range, $rangePercent);
+}
+
diff --git a/WebKitTools/Scripts/create-exports b/WebKitTools/Scripts/create-exports
new file mode 100755
index 0000000..c645d55
--- /dev/null
+++ b/WebKitTools/Scripts/create-exports
@@ -0,0 +1,5 @@
+#!/usr/bin/perl -w
+
+while (<>) {
+ print "$1\n" if /^\s*\"(.+)\", referenced from:$/;
+}
diff --git a/WebKitTools/Scripts/debug-safari b/WebKitTools/Scripts/debug-safari
new file mode 100755
index 0000000..52e97fe
--- /dev/null
+++ b/WebKitTools/Scripts/debug-safari
@@ -0,0 +1,38 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2007 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Script to run Safari in the platform's debugger for the WebKit Open Source Project.
+
+use strict;
+use FindBin;
+use lib $FindBin::Bin;
+use webkitdirs;
+
+setConfiguration();
+
+exit exitStatus(runSafari(1));
diff --git a/WebKitTools/Scripts/detect-mismatched-virtual-const b/WebKitTools/Scripts/detect-mismatched-virtual-const
new file mode 100755
index 0000000..b345cb2
--- /dev/null
+++ b/WebKitTools/Scripts/detect-mismatched-virtual-const
@@ -0,0 +1,167 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2008 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#
+# This script attempts to find instances of a problem where the signatures
+# of virtual methods fail to match because one is defined 'const', and another
+# is not. For example:
+# virtual void Base::doStuff() const;
+# virtual void Derived::doStuff();
+#
+# The lack of 'const' on the derived class gives it a different signature, and
+# it will therefore not be called when doStuff() is called on a derived object
+# via a base class pointer.
+#
+# Limitations of this script:
+# * It only works on things in the WebCore namespace
+# * Not all templatized methods may be found correctly
+# * It doesn't know anything about inheritance, or if methods are actually virtual
+# * It has lots of false positives (should add a whitelist for known-good signatures,
+# and specific methods)
+# * It's rather slow
+#
+# Added by Simon Fraser <simon.fraser@apple.com>
+#
+# Run the script like this:
+# WebKitTools/Scripts/detect-mismatched-virtual-const WebKitBuild/Debug/WebCore.framework/WebCore
+#
+# Output consists of a series of warnings like this:
+#
+# Both const and non-const versions of bgColor():
+# HTMLDocument::bgColor()
+# HTMLBodyElement::bgColor() const
+# HTMLTableElement::bgColor() const
+# HTMLTableRowElement::bgColor() const
+# HTMLTableCellElement::bgColor() const
+#
+
+use strict;
+no warnings qw /syntax/;
+
+
+my $file = $ARGV[0];
+
+print "Looking for unmatched const methods in $file\n";
+
+if (!open NM, "(nm '$file' | c++filt | sed 's/^/STDOUT:/') 2>&1 |") {
+ die "Could not open $file\n";
+}
+
+my $nestedParens;
+ $nestedParens = qr /
+ [(]
+ [^()]*
+ (?:
+ (??{ $nestedParens })
+ [^()]*
+ )*
+ [)]/x;
+
+my $nestedAngleBrackets;
+ $nestedAngleBrackets = qr /
+ [<]
+ [^<>]*
+ (?:
+ (??{ $nestedAngleBrackets })
+ [^<>]*
+ )*
+ [>]/x;
+
+my $bal;
+ $bal = qr /([^:]+
+ (??{ $nestedAngleBrackets })?
+ (??{ $nestedParens }))
+ ([^()]*)$/x;
+
+my %signature_map = ();
+
+while (<NM>) {
+ my $line = $_;
+ chomp($line);
+ if ($line =~ m/ [tT] WebCore::(.+)$/) {
+ my $method = $1;
+
+ if ($method =~ /$bal/) {
+ my $signature = $1;
+ my $const = $2 eq " const";
+
+ my $class = substr($method, 0, length($method) - length($signature) - ($const ? 6 : 0));
+
+# print "line: $line\nclass: $class\nmethod: $method\nsignature: $signature\nconst: $const\n\n";
+
+ my %method_info = (
+ 'class' => $class,
+ 'const' => $const,
+ 'method' => $method,
+ );
+
+ push @{$signature_map{$signature}}, \%method_info;
+ } else {
+ print "unmatched line $method\n\n"
+ }
+ }
+}
+close NM;
+
+my $sig;
+for $sig (keys %signature_map) {
+ #print "\n$sig\n";
+
+ my @entries = @{$signature_map{$sig}};
+# print "$#entries\n";
+
+ my $num_const = 0;
+ my $num_not_const = 0;
+ my $i;
+ for $i (0 .. $#entries) {
+ my $entry = @entries[$i];
+
+ my $class = $entry->{'class'};
+ my $const = $entry->{'const'};
+
+ if ($const) {
+ $num_const++;
+ } else {
+ $num_not_const++;
+ }
+ }
+
+ if ($#entries > 1 && $num_const > 0 && $num_not_const > 0) {
+ print "Both const and non-const versions of $sig:\n";
+
+ for $i (0 .. $#entries) {
+ my $entry = @entries[$i];
+ my $method = $entry->{'method'};
+ print "\t$method\n";
+ }
+
+ }
+}
+
+
+
diff --git a/WebKitTools/Scripts/do-file-rename b/WebKitTools/Scripts/do-file-rename
new file mode 100755
index 0000000..ac5099e
--- /dev/null
+++ b/WebKitTools/Scripts/do-file-rename
@@ -0,0 +1,115 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2006, 2008 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Script to do file renaming.
+
+use strict;
+use FindBin;
+use lib $FindBin::Bin;
+use webkitdirs;
+use File::Find;
+
+setConfiguration();
+chdirWebKit();
+
+my %words;
+
+# find all files we want to process
+
+my @paths;
+find(\&wanted, "JavaScriptCore");
+find(\&wanted, "JavaScriptGlue");
+find(\&wanted, "WebCore");
+find(\&wanted, "WebKit");
+
+sub wanted
+{
+ my $file = $_;
+
+ if ($file eq "icu") {
+ $File::Find::prune = 1;
+ return;
+ }
+
+ if ($file =~ /^\../) {
+ $File::Find::prune = 1;
+ return;
+ }
+
+ return if $file =~ /^ChangeLog/;
+ return if -d $file;
+
+ push @paths, $File::Find::name;
+}
+
+my %renames = (
+);
+
+my %renamesContemplatedForTheFuture = (
+);
+
+# rename files
+
+my %newFile;
+for my $file (sort @paths) {
+ my $f = $file;
+ $f = "$1$renames{$2}" if $f =~ /^(.*\/)(\w+\.\w+)$/ && $renames{$2};
+ $newFile{$file} = $f if $f ne $file;
+}
+
+for my $file (sort @paths) {
+ if ($newFile{$file}) {
+ my $newFile = $newFile{$file};
+ print "Renaming $file to $newFile\n";
+ system "svn move $file $newFile";
+ }
+}
+
+# change all file contents
+
+for my $file (sort @paths) {
+ $file = $newFile{$file} if $newFile{$file};
+ my $contents;
+ {
+ local $/;
+ open FILE, $file or die;
+ $contents = <FILE>;
+ close FILE;
+ }
+ my $newContents = $contents;
+
+ for my $from (keys %renames) {
+ $newContents =~ s/\b\Q$from\E(?!\w)/$renames{$from}/g; # this " unconfuses Xcode syntax highlighting
+ }
+
+ if ($newContents ne $contents) {
+ open FILE, ">", $file or die;
+ print FILE $newContents;
+ close FILE;
+ }
+}
diff --git a/WebKitTools/Scripts/do-webcore-rename b/WebKitTools/Scripts/do-webcore-rename
new file mode 100755
index 0000000..6a473df
--- /dev/null
+++ b/WebKitTools/Scripts/do-webcore-rename
@@ -0,0 +1,184 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2006, 2007, 2008 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Script to do a rename in JavaScriptCore, WebCore, and WebKit.
+
+use strict;
+use FindBin;
+use lib $FindBin::Bin;
+use webkitdirs;
+use File::Find;
+
+setConfiguration();
+chdirWebKit();
+
+my %words;
+
+# find all files we want to process
+
+my @paths;
+find(\&wanted, "JavaScriptCore");
+find(\&wanted, "JavaScriptGlue");
+find(\&wanted, "WebCore");
+find(\&wanted, "WebKit");
+
+sub wanted
+{
+ my $file = $_;
+
+ if ($file eq "icu") {
+ $File::Find::prune = 1;
+ return;
+ }
+
+ if ($file =~ /^\../) {
+ $File::Find::prune = 1;
+ return;
+ }
+
+ return if $file =~ /^ChangeLog/;
+ return if -d $file;
+
+ push @paths, $File::Find::name;
+}
+
+my %renames = (
+ "JSUnprotectedEventListener" => "JSEventListener",
+ "findJSUnprotectedEventListener" => "findJSEventListener",
+ "findOrCreateJSUnprotectedEventListener" => "findOrCreateJSEventListener",
+ "UnprotectedListenersMap" => "JSListenersMap",
+ "jsUnprotectedEventListeners" => "jsEventListeners",
+ "jsUnprotectedInlineEventListeners" => "jsInlineEventListeners",
+);
+
+my %renamesContemplatedForTheFuture = (
+ "DOMObject" => "JSDOMObject",
+
+ "runtimeObjectGetter" => "pluginElementGetter",
+ "runtimeObjectPropertyGetter" => "pluginElementPropertyGetter",
+ "runtimeObjectCustomGetOwnPropertySlot" => "pluginElementCustomGetOwnPropertySlot",
+ "runtimeObjectCustomPut" => "pluginElementCustomPut",
+ "runtimeObjectImplementsCall" => "pluginElementImplementsCall",
+ "runtimeObjectCallAsFunction" => "pluginElementCallAsFunction",
+
+ "CLONE_CONTENTS" => "Clone",
+ "DELETE_CONTENTS" => "Delete",
+ "EXTRACT_CONTENTS" => "Extract",
+
+ "DateInstance" => "JSDate",
+ "ErrorInstance" => "JSError",
+
+ "KURL" => "URL",
+ "KURLCFNet" => "URLCF",
+ "KURLHash" => "URLHash",
+ "KURLMac" => "URLMac",
+ "KURL_h" => "URL_h",
+
+ "ThreadSafeShared" => "ThreadSafeRefCounted",
+ "TreeShared" => "TreeRefCounted",
+
+ "StringImpl" => "SharedString",
+
+ "RenderView" => "RenderViewport",
+
+ "ObjcFallbackObjectImp" => "ObjCFallbackObject",
+ "RuntimeObjectImp" => "ForeignObject",
+
+ "runtime_array" => "BridgedArray",
+ "runtime_method" => "BridgedFunction",
+ "runtime_object" => "BridgedObject",
+ "objc_runtime" => "ObjCBridge",
+
+ "equalIgnoringCase" => "equalFoldingCase",
+
+ "FTPDirectoryTokenizer" => "FTPDirectoryDocumentBuilder",
+ "HTMLTokenizer" => "HTMLDocumentBuilder",
+ "ImageTokenizer" => "ImageDocumentBuilder",
+ "PluginTokenizer" => "PluginDocumentBuilder",
+ "TextTokenizer" => "TextDocumentBuilder",
+ "Tokenizer" => "DocumentBuilder",
+ "Tokenizer_h" => "DocumentBuilder_h",
+ "XMLTokenizer" => "XMLDocumentBuilder",
+ "isHTMLTokenizer" => "isHTMLDocumentBuilder",
+ "m_tokenizer" => "m_builder",
+ "createTokenizer" => "createBuilder",
+ "tokenizerProcessedData" => "documentBuilderProcessedData",
+
+ "WTF_UNICODE_H" => "Unicode_h",
+ "WTF_UNICODE_ICU_H" => "UnicodeICU_h",
+ "WTF_UNICODE_QT4_H" => "UnicodeQt4_h",
+ "UnicodeIcu" => "UnicodeICU",
+
+ "m_invertibleCTM" => "m_transformIsInvertible",
+
+ "JSValuePtr" => "JSValue",
+ "ProtectedJSValuePtr" => "ProtectedJSValue",
+);
+
+# rename files
+
+my %newFile;
+for my $file (sort @paths) {
+ my $f = $file;
+ $f = "$1$renames{$2}$3" if $f =~ /^(.*\/)(\w+)(\.\w+)$/ && $renames{$2};
+ if ($f ne $file) {
+ $newFile{$file} = $f;
+ }
+}
+
+for my $file (sort @paths) {
+ if ($newFile{$file}) {
+ my $newFile = $newFile{$file};
+ print "Renaming $file to $newFile\n";
+ system "svn move $file $newFile";
+ }
+}
+
+# change all file contents
+
+for my $file (sort @paths) {
+ $file = $newFile{$file} if $newFile{$file};
+ my $contents;
+ {
+ local $/;
+ open FILE, $file or die;
+ $contents = <FILE>;
+ close FILE;
+ }
+ my $newContents = $contents;
+
+ for my $from (keys %renames) {
+ $newContents =~ s/\b$from(?!["\w])/$renames{$from}/g; # this " unconfuses Xcode syntax highlighting
+ }
+
+ if ($newContents ne $contents) {
+ open FILE, ">", $file or die;
+ print FILE $newContents;
+ close FILE;
+ }
+}
diff --git a/WebKitTools/Scripts/extract-localizable-strings b/WebKitTools/Scripts/extract-localizable-strings
new file mode 100755
index 0000000..420624b
--- /dev/null
+++ b/WebKitTools/Scripts/extract-localizable-strings
@@ -0,0 +1,351 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2006, 2007 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# This script is like the genstrings tool (minus most of the options) with these differences.
+#
+# 1) It uses the names UI_STRING and UI_STRING_WITH_KEY for the macros, rather than the macros
+# from NSBundle.h, and doesn't support tables (although they would be easy to add).
+# 2) It supports UTF-8 in key strings (and hence uses "" strings rather than @"" strings;
+# @"" strings only reliably support ASCII since they are decoded based on the system encoding
+# at runtime, so give different results on US and Japanese systems for example).
+# 3) It looks for strings that are not marked for localization, using both macro names that are
+# known to be used for debugging in Intrigue source code and an exceptions file.
+# 4) It finds the files to work on rather than taking them as parameters, and also uses a
+# hardcoded location for both the output file and the exceptions file.
+# It would have been nice to use the project to find the source files, but it's too hard to
+# locate source files after parsing a .pbxproj file.
+
+# The exceptions file has a list of strings in quotes, filenames, and filename/string pairs separated by :.
+
+use strict;
+
+my %isDebugMacro = ( ASSERT_WITH_MESSAGE => 1, LOG_ERROR => 1, ERROR => 1, NSURL_ERROR => 1, FATAL => 1, LOG => 1, LOG_WARNING => 1, UI_STRING_LOCALIZE_LATER => 1, LPCTSTR_UI_STRING_LOCALIZE_LATER => 1, UNLOCALIZED_STRING => 1, UNLOCALIZED_LPCTSTR => 1, dprintf => 1, NSException => 1, NSLog => 1, printf => 1 );
+
+@ARGV >= 1 or die "Usage: extract-localizable-strings <exceptions file> [ directory... ]\nDid you mean to run extract-webkit-localizable-strings instead?\n";
+
+my $exceptionsFile = shift @ARGV;
+-f $exceptionsFile or die "Couldn't find exceptions file $exceptionsFile\n";
+
+my $fileToUpdate = shift @ARGV;
+-f $fileToUpdate or die "Couldn't find file to update $fileToUpdate\n";
+
+my @directories = ();
+my @directoriesToSkip = ();
+if (@ARGV < 1) {
+ push(@directories, ".");
+} else {
+ for my $dir (@ARGV) {
+ if ($dir =~ /^-(.*)$/) {
+ push @directoriesToSkip, $1;
+ } else {
+ push @directories, $dir;
+ }
+ }
+}
+
+my $sawError = 0;
+
+my $localizedCount = 0;
+my $keyCollisionCount = 0;
+my $notLocalizedCount = 0;
+my $NSLocalizeCount = 0;
+
+my %exception;
+my %usedException;
+
+if (open EXCEPTIONS, $exceptionsFile) {
+ while (<EXCEPTIONS>) {
+ chomp;
+ if (/^"([^\\"]|\\.)*"$/ or /^[-_\/\w.]+.(h|m|mm|c|cpp)$/ or /^[-_\/\w.]+.(h|m|mm|c|cpp):"([^\\"]|\\.)*"$/) {
+ if ($exception{$_}) {
+ print "$exceptionsFile:$.:exception for $_ appears twice\n";
+ print "$exceptionsFile:$exception{$_}:first appearance\n";
+ } else {
+ $exception{$_} = $.;
+ }
+ } else {
+ print "$exceptionsFile:$.:syntax error\n";
+ }
+ }
+ close EXCEPTIONS;
+}
+
+my $quotedDirectoriesString = '"' . join('" "', @directories) . '"';
+for my $dir (@directoriesToSkip) {
+ $quotedDirectoriesString .= ' -path "' . $dir . '" -prune';
+}
+
+my @files = ( split "\n", `find $quotedDirectoriesString -name "*.h" -o -name "*.m" -o -name "*.mm" -o -name "*.c" -o -name "*.cpp"` );
+
+for my $file (sort @files) {
+ next if $file =~ /\/WebLocalizableStrings\.h$/;
+ next if $file =~ /\/icu\//;
+
+ $file =~ s-^./--;
+
+ open SOURCE, $file or die "can't open $file\n";
+
+ my $inComment = 0;
+
+ my $expected = "";
+ my $macroLine;
+ my $macro;
+ my $UIString;
+ my $key;
+ my $comment;
+
+ my $string;
+ my $stringLine;
+ my $nestingLevel;
+
+ my $previousToken = "";
+
+ while (<SOURCE>) {
+ chomp;
+
+ # Handle continued multi-line comment.
+ if ($inComment) {
+ next unless s-.*\*/--;
+ $inComment = 0;
+ }
+
+ # Handle all the tokens in the line.
+ while (s-^\s*([#\w]+|/\*|//|[^#\w/'"()\[\],]+|.)--) {
+ my $token = $1;
+
+ if ($token eq "\"") {
+ if ($expected and $expected ne "a quoted string") {
+ print "$file:$.:ERROR:found a quoted string but expected $expected\n";
+ $sawError = 1;
+ $expected = "";
+ }
+ if (s-^(([^\\$token]|\\.)*?)$token--) {
+ if (!defined $string) {
+ $stringLine = $.;
+ $string = $1;
+ } else {
+ $string .= $1;
+ }
+ } else {
+ print "$file:$.:ERROR:mismatched quotes\n";
+ $sawError = 1;
+ $_ = "";
+ }
+ next;
+ }
+
+ if (defined $string) {
+handleString:
+ if ($expected) {
+ if (!defined $UIString) {
+ # FIXME: Validate UTF-8 here?
+ $UIString = $string;
+ $expected = ",";
+ } elsif (($macro =~ /UI_STRING_KEY$/) and !defined $key) {
+ # FIXME: Validate UTF-8 here?
+ $key = $string;
+ $expected = ",";
+ } elsif (!defined $comment) {
+ # FIXME: Validate UTF-8 here?
+ $comment = $string;
+ $expected = ")";
+ }
+ } else {
+ if (defined $nestingLevel) {
+ # In a debug macro, no need to localize.
+ } elsif ($previousToken eq "#include" or $previousToken eq "#import") {
+ # File name, no need to localize.
+ } elsif ($previousToken eq "extern" and $string eq "C") {
+ # extern "C", no need to localize.
+ } elsif ($string eq "") {
+ # Empty string can sometimes be localized, but we need not complain if not.
+ } elsif ($exception{$file}) {
+ $usedException{$file} = 1;
+ } elsif ($exception{"\"$string\""}) {
+ $usedException{"\"$string\""} = 1;
+ } elsif ($exception{"$file:\"$string\""}) {
+ $usedException{"$file:\"$string\""} = 1;
+ } else {
+ print "$file:$stringLine:\"$string\" is not marked for localization\n";
+ $notLocalizedCount++;
+ }
+ }
+ $string = undef;
+ last if !defined $token;
+ }
+
+ $previousToken = $token;
+
+ if ($token =~ /^NSLocalized/ && $token !~ /NSLocalizedDescriptionKey/ && $token !~ /NSLocalizedStringFromTableInBundle/) {
+ print "$file:$.:ERROR:found a use of an NSLocalized macro; not supported\n";
+ $nestingLevel = 0 if !defined $nestingLevel;
+ $sawError = 1;
+ $NSLocalizeCount++;
+ } elsif ($token eq "/*") {
+ if (!s-^.*?\*/--) {
+ $_ = ""; # If the comment doesn't end, discard the result of the line and set flag
+ $inComment = 1;
+ }
+ } elsif ($token eq "//") {
+ $_ = ""; # Discard the rest of the line
+ } elsif ($token eq "'") {
+ if (!s-([^\\]|\\.)'--) { #' <-- that single quote makes the Project Builder editor less confused
+ print "$file:$.:ERROR:mismatched single quote\n";
+ $sawError = 1;
+ $_ = "";
+ }
+ } else {
+ if ($expected and $expected ne $token) {
+ print "$file:$.:ERROR:found $token but expected $expected\n";
+ $sawError = 1;
+ $expected = "";
+ }
+ if ($token =~ /UI_STRING(_KEY)?$/) {
+ $expected = "(";
+ $macro = $token;
+ $UIString = undef;
+ $key = undef;
+ $comment = undef;
+ $macroLine = $.;
+ } elsif ($token eq "(" or $token eq "[") {
+ ++$nestingLevel if defined $nestingLevel;
+ $expected = "a quoted string" if $expected;
+ } elsif ($token eq ",") {
+ $expected = "a quoted string" if $expected;
+ } elsif ($token eq ")" or $token eq "]") {
+ $nestingLevel = undef if defined $nestingLevel && !--$nestingLevel;
+ if ($expected) {
+ $key = $UIString if !defined $key;
+ HandleUIString($UIString, $key, $comment, $file, $macroLine);
+ $macro = "";
+ $expected = "";
+ $localizedCount++;
+ }
+ } elsif ($isDebugMacro{$token}) {
+ $nestingLevel = 0 if !defined $nestingLevel;
+ }
+ }
+ }
+
+ }
+
+ goto handleString if defined $string;
+
+ if ($expected) {
+ print "$file:ERROR:reached end of file but expected $expected\n";
+ $sawError = 1;
+ }
+
+ close SOURCE;
+}
+
+my %stringByKey;
+my %commentByKey;
+my %fileByKey;
+my %lineByKey;
+
+sub HandleUIString
+{
+ my ($string, $key, $comment, $file, $line) = @_;
+
+ my $bad = 0;
+ if (grep { $_ == 0xFFFD } unpack "U*", $string) {
+ print "$file:$line:ERROR:string for translation has illegal UTF-8 -- most likely a problem with the Text Encoding of the source file\n";
+ $bad = 1;
+ }
+ if ($string ne $key && grep { $_ == 0xFFFD } unpack "U*", $key) {
+ print "$file:$line:ERROR:key has illegal UTF-8 -- most likely a problem with the Text Encoding of the source file\n";
+ $bad = 1;
+ }
+ if (grep { $_ == 0xFFFD } unpack "U*", $comment) {
+ print "$file:$line:ERROR:comment for translation has illegal UTF-8 -- most likely a problem with the Text Encoding of the source file\n";
+ $bad = 1;
+ }
+ if ($bad) {
+ $sawError = 1;
+ return;
+ }
+
+ if ($stringByKey{$key} && $stringByKey{$key} ne $string) {
+ print "$file:$line:encountered the same key, \"$key\", twice, with different strings\n";
+ print "$fileByKey{$key}:$lineByKey{$key}:previous occurrence\n";
+ $keyCollisionCount++;
+ return;
+ }
+ if ($commentByKey{$key} && $commentByKey{$key} ne $comment) {
+ print "$file:$line:encountered the same key, \"$key\", twice, with different comments\n";
+ print "$fileByKey{$key}:$lineByKey{$key}:previous occurrence\n";
+ $keyCollisionCount++;
+ return;
+ }
+
+ $fileByKey{$key} = $file;
+ $lineByKey{$key} = $line;
+ $stringByKey{$key} = $string;
+ $commentByKey{$key} = $comment;
+}
+
+print "\n" if $sawError || $notLocalizedCount || $NSLocalizeCount;
+
+my @unusedExceptions = sort grep { !$usedException{$_} } keys %exception;
+if (@unusedExceptions) {
+ for my $unused (@unusedExceptions) {
+ print "$exceptionsFile:$exception{$unused}:exception $unused not used\n";
+ }
+ print "\n";
+}
+
+print "$localizedCount localizable strings\n" if $localizedCount;
+print "$keyCollisionCount key collisions\n" if $keyCollisionCount;
+print "$notLocalizedCount strings not marked for localization\n" if $notLocalizedCount;
+print "$NSLocalizeCount uses of NSLocalize\n" if $NSLocalizeCount;
+print scalar(@unusedExceptions), " unused exceptions\n" if @unusedExceptions;
+
+if ($sawError) {
+ print "\nErrors encountered. Exiting without writing to $fileToUpdate.\n";
+ exit 1;
+}
+
+my $localizedStrings = "";
+
+for my $key (sort keys %commentByKey) {
+ $localizedStrings .= "/* $commentByKey{$key} */\n\"$key\" = \"$stringByKey{$key}\";\n\n";
+}
+
+# Write out the strings file in UTF-16 with a BOM.
+utf8::decode($localizedStrings) if $^V ge chr(5).chr(8);
+my $output = pack "n*", (0xFEFF, unpack "U*", $localizedStrings);
+
+if (-e "$fileToUpdate") {
+ open STRINGS, ">", "$fileToUpdate" or die;
+ print STRINGS $output;
+ close STRINGS;
+} else {
+ print "$fileToUpdate does not exist\n";
+ exit 1;
+}
diff --git a/WebKitTools/Scripts/find-extra-includes b/WebKitTools/Scripts/find-extra-includes
new file mode 100755
index 0000000..4a847ed
--- /dev/null
+++ b/WebKitTools/Scripts/find-extra-includes
@@ -0,0 +1,102 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2005 Apple Computer, 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# "find-extra-includes" script for WebKit Open Source Project
+
+use strict;
+use File::Find;
+
+find(\&wanted, @ARGV ? @ARGV : ".");
+
+my %paths;
+my %includes;
+
+sub wanted
+{
+ my $file = $_;
+
+ if ($file eq "icu") {
+ $File::Find::prune = 1;
+ return;
+ }
+
+ if ($file !~ /^\./ && $file =~ /\.(h|cpp|c|mm|m)$/) {
+ $paths{$file} = $File::Find::name;
+ open FILE, $file or die;
+ while (<FILE>) {
+ if (m-^\s*#\s*(include|import)\s+["<]((\S+/)*)(\S+)[">]-) {
+ my $include = ($2 eq "sys/" ? $2 : "") . $4;
+ $includes{$file}{$include}++;
+ }
+ }
+ close FILE;
+ }
+}
+
+my %totalIncludes;
+
+sub fillOut
+{
+ my ($file) = @_;
+
+ return if defined $totalIncludes{$file};
+
+ for my $include (keys %{ $includes{$file} }) {
+ $totalIncludes{$file}{$include} = 1;
+ fillOut($include);
+ for my $i (keys %{ $totalIncludes{$include} }) {
+ $totalIncludes{$file}{$i} = 1;
+ }
+ }
+}
+
+sub check
+{
+ my ($file) = @_;
+
+ for my $include (keys %{ $includes{$file} }) {
+ fillOut($include);
+ }
+ for my $i1 (sort keys %{ $includes{$file} }) {
+ for my $i2 (keys %{ $includes{$file} }) {
+ next if $i1 eq $i2;
+ if ($totalIncludes{$i2}{$i1}) {
+ my $b1 = $i1;
+ my $b2 = $file;
+ $b1 =~ s/\..+$//;
+ $b2 =~ s/\..+$//;
+ print "$paths{$file} does not need to include $i1, because $i2 does\n" if $b1 ne $b2;
+ last;
+ }
+ }
+ }
+}
+
+for my $file (sort keys %includes) {
+ check($file);
+}
diff --git a/WebKitTools/Scripts/find-included-framework-headers b/WebKitTools/Scripts/find-included-framework-headers
new file mode 100755
index 0000000..3e7aaf6
--- /dev/null
+++ b/WebKitTools/Scripts/find-included-framework-headers
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+FILE_EXTENSIONS_TO_SEARCH="cpp h m mm"
+
+for framework in $*; do
+ echo -e "\n$framework\n=================="
+ for ext in ${FILE_EXTENSIONS_TO_SEARCH}; do
+ find . -name "*.$ext" -exec grep $framework {} ';' | grep '\(include\|import\)' | sed -e 's|.*/\(.*\.h\).*|\1|'
+ done | sort | uniq
+done
diff --git a/WebKitTools/Scripts/gdb-safari b/WebKitTools/Scripts/gdb-safari
new file mode 100755
index 0000000..9776212
--- /dev/null
+++ b/WebKitTools/Scripts/gdb-safari
@@ -0,0 +1,53 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2005 Apple Computer, 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Simplified "run under gdb" script for WebKit Open Source Project.
+
+use strict;
+use File::Temp qw/:mktemp/;
+use FindBin;
+use lib $FindBin::Bin;
+use webkitdirs;
+
+setConfiguration();
+my $productDir = productDir();
+my $safariPath = safariPath();
+
+# Check to see that gdb is in the usual place.
+my $gdbPath = "/usr/bin/gdb";
+die "Can't find gdb executable. Is gdb installed?\n" unless -x $gdbPath;
+
+# Check to see that all the frameworks are built.
+checkFrameworks();
+
+$ENV{DYLD_FRAMEWORK_PATH} = $productDir;
+$ENV{WEBKIT_UNSET_DYLD_FRAMEWORK_PATH} = 'YES';
+
+print "Starting Safari under gdb with DYLD_FRAMEWORK_PATH set to point to built WebKit in $productDir.\n";
+my @architectureFlags = ("-arch", architecture()) if !isTiger();
+exec $gdbPath, @architectureFlags, $safariPath or die;
diff --git a/WebKitTools/Scripts/generate-coverage-data b/WebKitTools/Scripts/generate-coverage-data
new file mode 100755
index 0000000..7ed36aa
--- /dev/null
+++ b/WebKitTools/Scripts/generate-coverage-data
@@ -0,0 +1,71 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved.
+# Copyright (C) 2007 Holger Hans Peter Freyther. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Simple script to build, run and visualize coverage information
+
+use strict;
+use File::Basename;
+use File::Spec;
+use FindBin;
+use Getopt::Long qw(:config pass_through);
+use lib $FindBin::Bin;
+use webkitdirs;
+use POSIX;
+
+# Generate a name for our results
+my $svnVersion = determineCurrentSVNRevision();
+my @timeData = localtime(time);
+my $resultName = $svnVersion . "-" . join('_', @timeData);
+my @otherOptions = ();
+
+# Move to the source directory
+# Delete old gcov files
+# Compile WebKit and run the tests
+# Generate the coverage graph...
+# Upload
+
+$ENV{'WEBKIT_COVERAGE_BUILD'} = 1;
+chdirWebKit();
+
+# Clean-up old files
+print "Cleaning up\n";
+system("if [ -d WebKitBuild ]; then find WebKitBuild -name '*.gcda' -delete; fi;") == 0 or die;
+
+
+print "Building and testing\n";
+system("WebKitTools/Scripts/build-webkit", "--coverage", @ARGV) == 0 or die;
+system "WebKitTools/Scripts/run-webkit-tests", "--no-launch-safari";
+system "WebKitTools/Scripts/run-javascriptcore-tests", "--coverage", @ARGV;
+
+# Collect the data and generate a report
+print "Collecting coverage data\n";
+system("WebKitTools/CodeCoverage/run-generate-coverage-data", $resultName, "WebKitBuild/Coverage") == 0 or die;
+system("WebKitTools/CodeCoverage/regenerate-coverage-display", "WebKitBuild/Coverage", "WebKitBuild/Coverage/html") == 0 or die;
+
+print "Done\n";
diff --git a/WebKitTools/Scripts/generate-qt-inspector-resource b/WebKitTools/Scripts/generate-qt-inspector-resource
new file mode 100755
index 0000000..a65da13
--- /dev/null
+++ b/WebKitTools/Scripts/generate-qt-inspector-resource
@@ -0,0 +1,53 @@
+#!/usr/bin/perl
+#
+# Copyright (C) 2008 Holger Hans Peter Freyther
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Regenerate WebCore/inspector/front-end/WebKit.qrc from the content of WebCore/inspector/front-end/
+
+sub addFiles(@)
+{
+ my @files = @_;
+
+ foreach $file (@files) {
+ $file =~ s,WebCore/inspector/front-end/,,;
+ print WEBKIT_QRC " <file>".$file . "</file>\n";
+ }
+}
+
+# Setup
+open(WEBKIT_QRC, ">WebCore/inspector/front-end/WebKit.qrc") or die;
+print WEBKIT_QRC '<!DOCTYPE RCC><RCC version="1.0">'."\n";
+print WEBKIT_QRC '<qresource prefix="/webkit/inspector">'."\n";
+
+
+# Directory with html and js files and the images
+addFiles(<WebCore/inspector/front-end/*.{*html,js,css,svg}>);
+addFiles(<WebCore/inspector/front-end/Images/*>);
+
+print WEBKIT_QRC "</qresource>\n";
+print WEBKIT_QRC "</RCC>\n";
+close(WEBKIT_QRC);
diff --git a/WebKitTools/Scripts/make-js-test-wrappers b/WebKitTools/Scripts/make-js-test-wrappers
new file mode 100755
index 0000000..9ee8513
--- /dev/null
+++ b/WebKitTools/Scripts/make-js-test-wrappers
@@ -0,0 +1,165 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2006, 2007, 2008 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Script to generate HTML wrappers for JavaScript tests from templates
+
+use strict;
+
+use FindBin;
+use lib $FindBin::Bin;
+
+use File::Basename;
+use File::Find;
+use Getopt::Long;
+use webkitdirs;
+
+sub directoryFilter;
+sub findTemplateFiles(@);
+
+my $showHelp;
+
+my $result = GetOptions(
+ "help" => \$showHelp,
+);
+
+if (!$result || $showHelp) {
+ print STDERR basename($0) . " [-h|--help] [path ...]\n";
+ exit 1;
+}
+
+setConfiguration();
+my $productDir = productDir();
+
+chdirWebKit();
+
+my @templates = findTemplateFiles(@ARGV);
+
+for my $tfile (@templates) {
+
+ my $tpath = $tfile;
+ $tpath =~ s:/resources/TEMPLATE.html$::;
+
+ print "${tpath}\n";
+
+ chdirWebKit();
+ chdir($tpath);
+
+ my @files;
+ my $fileFilter = sub {
+ push @files, $File::Find::name if substr($_, -3) eq ".js";
+ };
+ find({ preprocess => \&directoryFilter, wanted => $fileFilter }, "resources");
+
+ open TEMPLATE, "<resources/TEMPLATE.html";
+ my $template = do { local $/; <TEMPLATE> };
+ close TEMPLATE;
+
+ my $templateNegative = $template;
+ if (-e "resources/TEMPLATE-n.html") {
+ open TEMPLATE, "<resources/TEMPLATE-n.html";
+ $templateNegative = do { local $/; <TEMPLATE> };
+ close TEMPLATE;
+ }
+
+ for my $file (@files) {
+ next if $file =~ /js-test-.*\.js$/;
+ next if $file =~ /standalone-.*\.js$/;
+ next if $file =~ /SVGTestCase\.js/;
+ next if $file =~ /WMLTestCase\.js/;
+
+ next if $file =~ m:resources/bom-in-file-retains-correct-offset\.js$:; # has a custom template
+ next if $file =~ m:resources/NSResolver-exceptions\.js$:;
+ next if $file =~ m:resources/WindowProperties\.js$:;
+ next if $file =~ m:resources/altGlyph-dom\.js$:;
+ next if $file =~ m:resources/attr-case-sensitivity\.js$:;
+ next if $file =~ m:resources/codegen-temporaries-multiple-global-blocks-1\.js$:;
+ next if $file =~ m:resources/codegen-temporaries-multiple-global-blocks-2\.js$:;
+ next if $file =~ m:resources/constructors-cached-navigate\.js$:;
+ next if $file =~ m:resources/frame-loading-via-document-write\.js$:;
+ next if $file =~ m:resources/id-fastpath-almost-strict\.js$:;
+ next if $file =~ m:resources/id-fastpath-strict\.js$:;
+ next if $file =~ m:resources/intersectsNode\.js$:;
+ next if $file =~ m:resources/p-in-scope\.js$:;
+ next if $file =~ m:resources/script-element-gc\.js$:;
+ next if $file =~ m:resources/script-element-gc\.js$:;
+ next if $file =~ m:resources/script3\.js$:;
+ next if $file =~ m:resources/script4\.js$:;
+ next if $file =~ m:resources/script5\.js$:;
+ next if $file =~ m:resources/scripted-random\.js$:;
+ next if $file =~ m:resources/select-options-remove\.js$:;
+ next if $file =~ m:resources/shadow-offset\.js$:;
+ next if $file =~ m:resources/tabindex-focus-blur-all\.js$:;
+ next if $file =~ m:resources/use-instanceRoot-event-bubbling\.js$:;
+ next if $file =~ m:resources/use-instanceRoot-event-listeners\.js$:;
+ next if $file =~ m:resources/wrapper-identity-base\.js$:;
+ next if $file =~ m:resources/xhtml-scripts\.js$:;
+
+ my $html = $file;
+ $html =~ s:resources/(.*)\.js:$1.html:;
+ next if -f "$html-disabled";
+
+ system("grep -q 'successfullyParsed =' $file");
+ if ($? != 0) {
+ `echo "" >> "${file}"`;
+ `echo "var successfullyParsed = true;" >> "${file}"`;
+ }
+
+ print " ${html}\n";
+ open HTML, ">$html";
+ my $output = ($file =~ /-n\.js/) ? $templateNegative : $template;
+ $output =~ s:YOUR_JS_FILE_HERE:$file:;
+ print HTML $output;
+
+ close HTML;
+ }
+}
+
+exit 0;
+
+sub directoryFilter
+{
+ return () if basename($File::Find::dir) eq ".svn";
+ return @_;
+}
+
+sub findTemplateFiles(@) {
+ my @args = @_;
+ my @templateFiles;
+
+ push @args, "LayoutTests" if scalar(@args) == 0;
+
+ my @paths = map { -f $_ ? dirname($_) : $_ } @args;
+
+ my $fileFilter = sub {
+ push @templateFiles, $File::Find::name if $_ eq "TEMPLATE.html";
+ };
+
+ find({ preprocess => \&directoryFilter, wanted => $fileFilter }, @paths);
+
+ return @templateFiles;
+}
diff --git a/WebKitTools/Scripts/num-cpus b/WebKitTools/Scripts/num-cpus
new file mode 100755
index 0000000..c5f28a1
--- /dev/null
+++ b/WebKitTools/Scripts/num-cpus
@@ -0,0 +1,16 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Win32API::Registry 0.21 qw( :ALL );
+
+
+my $key;
+my $i = 0;
+while (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\$i", 0, KEY_READ, $key)) {
+ $i++;
+ RegCloseKey($key);
+}
+
+print "$i\n";
diff --git a/WebKitTools/Scripts/parallelcl b/WebKitTools/Scripts/parallelcl
new file mode 100755
index 0000000..532079f
--- /dev/null
+++ b/WebKitTools/Scripts/parallelcl
@@ -0,0 +1,224 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use File::Basename;
+use File::Spec;
+use File::Temp;
+use POSIX;
+
+sub makeJob(\@$);
+sub forkAndCompileFiles(\@$);
+sub Exec($);
+sub waitForChild(\@);
+sub cleanup(\@);
+
+my $debug = 0;
+
+chomp(my $clexe = `cygpath -u '$ENV{'VS80COMNTOOLS'}/../../VC/bin/cl.exe'`);
+
+if ($debug) {
+ print STDERR "Received " . @ARGV . " arguments:\n";
+ foreach my $arg (@ARGV) {
+ print STDERR "$arg\n";
+ }
+}
+
+my $commandFile;
+foreach my $arg (@ARGV) {
+ if ($arg =~ /^[\/-](E|EP|P)$/) {
+ print STDERR "The invoking process wants preprocessed source, so let's hand off this whole command to the real cl.exe\n" if $debug;
+ Exec("\"$clexe\" \"" . join('" "', @ARGV) . "\"");
+ } elsif ($arg =~ /^@(.*)$/) {
+ chomp($commandFile = `cygpath -u '$1'`);
+ }
+}
+
+die "No command file specified!" unless $commandFile;
+die "Couldn't find $commandFile!" unless -f $commandFile;
+
+my @sources;
+
+open(COMMAND, '<:raw:encoding(UTF16-LE):crlf:utf8', $commandFile) or die "Couldn't open $commandFile!";
+
+# The first line of the command file contains all the options to cl.exe plus the first (possibly quoted) filename
+my $firstLine = <COMMAND>;
+$firstLine =~ s/\r?\n$//;
+
+# To find the start of the first filename, look for either the last space on the line.
+# If the filename is quoted, the last character on the line will be a quote, so look for the quote before that.
+my $firstFileIndex;
+print STDERR "Last character of first line = '" . substr($firstLine, -1, 1) . "'\n" if $debug;
+if (substr($firstLine, -1, 1) eq '"') {
+ print STDERR "First file is quoted\n" if $debug;
+ $firstFileIndex = rindex($firstLine, '"', length($firstLine) - 2);
+} else {
+ print STDERR "First file is NOT quoted\n" if $debug;
+ $firstFileIndex = rindex($firstLine, ' ') + 1;
+}
+
+my $options = substr($firstLine, 0, $firstFileIndex) . join(' ', @ARGV[1 .. $#ARGV]);
+my $possibleFirstFile = substr($firstLine, $firstFileIndex);
+if ($possibleFirstFile =~ /\.(cpp|c)/) {
+ push(@sources, $possibleFirstFile);
+} else {
+ $options .= " $possibleFirstFile";
+}
+
+print STDERR "######## Found options $options ##########\n" if $debug;
+print STDERR "####### Found first source file $sources[0] ########\n" if @sources && $debug;
+
+# The rest of the lines of the command file just contain source files, one per line
+while (my $source = <COMMAND>) {
+ chomp($source);
+ $source =~ s/^\s+//;
+ $source =~ s/\s+$//;
+ push(@sources, $source) if length($source);
+}
+close(COMMAND);
+
+my $numSources = @sources;
+exit unless $numSources > 0;
+
+my $numJobs;
+if ($options =~ s/-j\s*([0-9]+)//) {
+ $numJobs = $1;
+} else {
+ chomp($numJobs = `num-cpus`);
+}
+
+print STDERR "\n\n####### RUNNING AT MOST $numJobs PARALLEL INSTANCES OF cl.exe ###########\n\n";# if $debug;
+
+# Magic determination of job size
+# The hope is that by splitting the source files up into 2*$numJobs pieces, we
+# won't suffer too much if one job finishes much more quickly than another.
+# However, we don't want to split it up too much due to cl.exe overhead, so set
+# the minimum job size to 5.
+my $jobSize = POSIX::ceil($numSources / (2 * $numJobs));
+$jobSize = $jobSize < 5 ? 5 : $jobSize;
+
+print STDERR "######## jobSize = $jobSize ##########\n" if $debug;
+
+# Sort the source files randomly so that we don't end up with big clumps of large files (aka SVG)
+sub fisher_yates_shuffle(\@)
+{
+ my ($array) = @_;
+ for (my $i = @{$array}; --$i; ) {
+ my $j = int(rand($i+1));
+ next if $i == $j;
+ @{$array}[$i,$j] = @{$array}[$j,$i];
+ }
+}
+
+fisher_yates_shuffle(@sources); # permutes @array in place
+
+my @children;
+my @tmpFiles;
+my $status = 0;
+while (@sources) {
+ while (@sources && @children < $numJobs) {
+ my $pid;
+ my $tmpFile;
+ my $job = makeJob(@sources, $jobSize);
+ ($pid, $tmpFile) = forkAndCompileFiles(@{$job}, $options);
+
+ print STDERR "####### Spawned child with PID $pid and tmpFile $tmpFile ##########\n" if $debug;
+ push(@children, $pid);
+ push(@tmpFiles, $tmpFile);
+ }
+
+ $status |= waitForChild(@children);
+}
+
+while (@children) {
+ $status |= waitForChild(@children);
+}
+cleanup(@tmpFiles);
+
+exit WEXITSTATUS($status);
+
+
+sub makeJob(\@$)
+{
+ my ($files, $jobSize) = @_;
+
+ my @job;
+ if (@{$files} > ($jobSize * 1.5)) {
+ @job = splice(@{$files}, -$jobSize);
+ } else {
+ # Compile all the remaining files in this job to avoid having a small job later
+ @job = splice(@{$files});
+ }
+
+ return \@job;
+}
+
+sub forkAndCompileFiles(\@$)
+{
+ print STDERR "######## forkAndCompileFiles()\n" if $debug;
+ my ($files, $options) = @_;
+
+ if ($debug) {
+ foreach my $file (@{$files}) {
+ print STDERR "######## $file\n";
+ }
+ }
+
+ my (undef, $tmpFile) = File::Temp::tempfile('clcommandXXXXX', DIR => File::Spec->tmpdir, OPEN => 0);
+
+ my $pid = fork();
+ die "Fork failed" unless defined($pid);
+
+ unless ($pid) {
+ # Child process
+ open(TMP, '>:raw:encoding(UTF16-LE):crlf:utf8', $tmpFile) or die "Couldn't open $tmpFile";
+ print TMP "$options\n";
+ foreach my $file (@{$files}) {
+ print TMP "$file\n";
+ }
+ close(TMP);
+
+ chomp(my $winTmpFile = `cygpath -m $tmpFile`);
+ Exec "\"$clexe\" \@\"$winTmpFile\"";
+ } else {
+ return ($pid, $tmpFile);
+ }
+}
+
+sub Exec($)
+{
+ my ($command) = @_;
+
+ print STDERR "Exec($command)\n" if $debug;
+
+ exec($command);
+}
+
+sub waitForChild(\@)
+{
+ my ($children) = @_;
+
+ return unless @{$children};
+
+ my $deceased = wait();
+ my $status = $?;
+ print STDERR "######## Child with PID $deceased finished ###########\n" if $debug;
+ for (my $i = 0; $i < @{$children}; $i++) {
+ if ($children->[$i] == $deceased) {
+ splice(@{$children}, $i, 1);
+ last;
+ }
+ }
+
+ return $status;
+}
+
+sub cleanup(\@)
+{
+ my ($tmpFiles) = @_;
+
+ foreach my $file (@{$tmpFiles}) {
+ unlink $file;
+ }
+}
diff --git a/WebKitTools/Scripts/parse-malloc-history b/WebKitTools/Scripts/parse-malloc-history
new file mode 100755
index 0000000..76ca74b
--- /dev/null
+++ b/WebKitTools/Scripts/parse-malloc-history
@@ -0,0 +1,154 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2007 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Parses the callstacks in a file with malloc_history formatted content, sorting
+# based on total number of bytes allocated, and filtering based on command-line
+# parameters.
+
+use Getopt::Long;
+use File::Basename;
+
+use strict;
+use warnings;
+
+sub commify($);
+
+sub main()
+{
+ my $usage =
+ "Usage: " . basename($0) . " [options] malloc_history.txt\n" .
+ " --grep-regexp Include only call stacks that match this regular expression.\n" .
+ " --byte-minimum Include only call stacks with allocation sizes >= this value.\n" .
+ " --merge-regexp Merge all call stacks that match this regular expression.\n" .
+ " --merge-depth Merge all call stacks that match at this stack depth and above.\n";
+
+ my $grepRegexp = "";
+ my $byteMinimum = "";
+ my @mergeRegexps = ();
+ my $mergeDepth = "";
+ my $getOptionsResult = GetOptions(
+ "grep-regexp:s" => \$grepRegexp,
+ "byte-minimum:i" => \$byteMinimum,
+ "merge-regexp:s" => \@mergeRegexps,
+ "merge-depth:i" => \$mergeDepth
+ );
+ my $fileName = $ARGV[0];
+ die $usage if (!$getOptionsResult || !$fileName);
+
+ open FILE, "<$fileName" or die "bad file: $fileName";
+ my @file = <FILE>;
+ close FILE;
+
+ my %callstacks = ();
+ my $byteCountTotal = 0;
+
+ for (my $i = 0; $i < @file; $i++) {
+ my $line = $file[$i];
+ my ($callCount, $byteCount);
+
+ next if $line =~ /^\-/;
+
+ # First try malloc_history format
+ # 6 calls for 664 bytes thread_ffffffff |0x0 | start
+ ($callCount, $byteCount) = ($line =~ /(\d+) calls for (\d+) bytes/);
+
+ # Then try leaks format
+ # Leak: 0x0ac3ca40 size=48
+ # 0x00020001 0x00000001 0x00000000 0x00000000 ................
+ # Call stack: [thread ffffffff]: | 0x0 | start
+ if (!$callCount || !$byteCount) {
+ $callCount = 1;
+ ($byteCount) = ($line =~ /Leak: [x[:xdigit:]]* size=(\d+)/);
+
+ if ($byteCount) {
+ while (!($line =~ "Call stack: ")) {
+ $i++;
+ $line = $file[$i];
+ }
+ }
+ }
+
+ # Then give up
+ next if (!$callCount || !$byteCount);
+
+ $byteCountTotal += $byteCount;
+
+ next if ($grepRegexp && !($line =~ $grepRegexp));
+
+ my $callstackBegin = 0;
+ if ($mergeDepth) {
+ # count stack frames backwards from end of callstack
+ $callstackBegin = length($line);
+ for (my $pipeCount = 0; $pipeCount < $mergeDepth; $pipeCount++) {
+ my $rindexResult = rindex($line, "|", $callstackBegin - 1);
+ last if $rindexResult == -1;
+ $callstackBegin = $rindexResult;
+ }
+ } else {
+ # start at beginning of callstack
+ $callstackBegin = index($line, "|");
+ }
+
+ my $callstack = substr($line, $callstackBegin + 2); # + 2 skips "| "
+ for my $regexp (@mergeRegexps) {
+ if ($callstack =~ $regexp) {
+ $callstack = $regexp . "\n";
+ last;
+ }
+ }
+
+ if (!$callstacks{$callstack}) {
+ $callstacks{$callstack} = {"callCount" => 0, "byteCount" => 0};
+ }
+
+ $callstacks{$callstack}{"callCount"} += $callCount;
+ $callstacks{$callstack}{"byteCount"} += $byteCount;
+ }
+
+ my $byteCountTotalReported = 0;
+ for my $callstack (sort { $callstacks{$b}{"byteCount"} <=> $callstacks{$a}{"byteCount"} } keys %callstacks) {
+ my $callCount = $callstacks{$callstack}{"callCount"};
+ my $byteCount = $callstacks{$callstack}{"byteCount"};
+ last if ($byteMinimum && $byteCount < $byteMinimum);
+
+ $byteCountTotalReported += $byteCount;
+ print commify($callCount) . " calls for " . commify($byteCount) . " bytes: $callstack\n";
+ }
+
+ print "total: " . commify($byteCountTotalReported) . " bytes (" . commify($byteCountTotal - $byteCountTotalReported) . " bytes excluded).\n";
+}
+
+exit(main());
+
+# Copied from perldoc -- please excuse the style
+sub commify($)
+{
+ local $_ = shift;
+ 1 while s/^([-+]?\d+)(\d{3})/$1,$2/;
+ return $_;
+}
diff --git a/WebKitTools/Scripts/pdevenv b/WebKitTools/Scripts/pdevenv
new file mode 100755
index 0000000..1931211
--- /dev/null
+++ b/WebKitTools/Scripts/pdevenv
@@ -0,0 +1,25 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+
+use File::Temp qw/tempfile/;
+use FindBin;
+
+my ($fh, $path) = tempfile(UNLINK => 0, SUFFIX => '.cmd') or die;
+
+chomp(my $vcBin = `cygpath -w "$FindBin::Bin/../vcbin"`);
+
+print $fh "\@echo off\n\n";
+print $fh "call \"\%VS80COMNTOOLS\%\\vsvars32.bat\"\n\n";
+print $fh "set PATH=$vcBin;\%PATH\%\n\n";
+print $fh "IF EXIST \"\%VSINSTALLDIR\%\\Common7\\IDE\\devenv.com\" (devenv.com /useenv " . join(" ", @ARGV) . ") ELSE ";
+print $fh "VCExpress.exe /useenv " . join(" ", @ARGV) . "\n";
+
+close $fh;
+
+chmod 0755, $path;
+
+chomp($path = `cygpath -w -s '$path'`);
+
+exec("cmd /c \"call $path\"");
diff --git a/WebKitTools/Scripts/prepare-ChangeLog b/WebKitTools/Scripts/prepare-ChangeLog
new file mode 100755
index 0000000..3ecf189
--- /dev/null
+++ b/WebKitTools/Scripts/prepare-ChangeLog
@@ -0,0 +1,1445 @@
+#!/usr/bin/perl -w
+# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+
+#
+# Copyright (C) 2000, 2001 Eazel, Inc.
+# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
+#
+# prepare-ChangeLog is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# prepare-ChangeLog is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the Free
+# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+
+# Perl script to create a ChangeLog entry with names of files
+# and functions from a diff.
+#
+# Darin Adler <darin@bentspoon.com>, started 20 April 2000
+# Java support added by Maciej Stachowiak <mjs@eazel.com>
+# Objective-C, C++ and Objective-C++ support added by Maciej Stachowiak <mjs@apple.com>
+# Git support added by Adam Roben <aroben@apple.com>
+
+
+#
+# TODO:
+# List functions that have been removed too.
+# Decide what a good logical order is for the changed files
+# other than a normal text "sort" (top level first?)
+# (group directories?) (.h before .c?)
+# Handle yacc source files too (other languages?).
+# Help merge when there are ChangeLog conflicts or if there's
+# already a partly written ChangeLog entry.
+# Add command line option to put the ChangeLog into a separate
+# file or just spew it out stdout.
+# Add SVN version numbers for commit (can't do that until
+# the changes are checked in, though).
+# Work around diff stupidity where deleting a function that starts
+# with a comment makes diff think that the following function
+# has been changed (if the following function starts with a comment
+# with the same first line, such as /**)
+# Work around diff stupidity where deleting an entire function and
+# the blank lines before it makes diff think you've changed the
+# previous function.
+
+use strict;
+use warnings;
+
+use File::Basename;
+use File::Spec;
+use FindBin;
+use Getopt::Long;
+use lib $FindBin::Bin;
+use POSIX qw(strftime);
+use VCSUtils;
+
+sub changeLogDate($);
+sub firstDirectoryOrCwd();
+sub diffFromToString();
+sub diffCommand(@);
+sub statusCommand(@);
+sub createPatchCommand($);
+sub diffHeaderFormat();
+sub findOriginalFileFromSvn($);
+sub generateFileList(\@\@\%);
+sub gitConfig($);
+sub isModifiedStatus($);
+sub isAddedStatus($);
+sub isConflictStatus($);
+sub statusDescription($$);
+sub extractLineRange($);
+sub canonicalizePath($);
+sub testListForChangeLog(@);
+sub get_function_line_ranges($$);
+sub get_function_line_ranges_for_c($$);
+sub get_function_line_ranges_for_java($$);
+sub get_function_line_ranges_for_javascript($$);
+sub method_decl_to_selector($);
+sub processPaths(\@);
+sub reviewerAndDescriptionForGitCommit($);
+
+# Project time zone for Cupertino, CA, US
+my $changeLogTimeZone = "PST8PDT";
+
+my $gitCommit = 0;
+my $gitReviewer = "";
+my $openChangeLogs = 0;
+my $showHelp = 0;
+my $spewDiff = $ENV{"PREPARE_CHANGELOG_DIFF"};
+my $updateChangeLogs = 1;
+my $parseOptionsResult =
+ GetOptions("diff|d!" => \$spewDiff,
+ "git-commit:s" => \$gitCommit,
+ "git-reviewer:s" => \$gitReviewer,
+ "help|h!" => \$showHelp,
+ "open|o!" => \$openChangeLogs,
+ "update!" => \$updateChangeLogs);
+if (!$parseOptionsResult || $showHelp) {
+ print STDERR basename($0) . " [-d|--diff] [-h|--help] [-o|--open] [--git-commit=<committish>] [--git-reviewer=<name>] [svndir1 [svndir2 ...]]\n";
+ print STDERR " -d|--diff Spew diff to stdout when running\n";
+ print STDERR " --git-commit Populate the ChangeLogs from the specified git commit\n";
+ print STDERR " --git-reviewer When populating the ChangeLogs from a git commit claim that the spcified name reviewed the change.\n";
+ print STDERR " This option is useful when the git commit lacks a Signed-Off-By: line\n";
+ print STDERR " -h|--help Show this help message\n";
+ print STDERR " -o|--open Open ChangeLogs in an editor when done\n";
+ print STDERR " --[no-]update Update ChangeLogs from svn before adding entry (default: update)\n";
+ exit 1;
+}
+
+my %paths = processPaths(@ARGV);
+
+my $isGit = isGitDirectory(firstDirectoryOrCwd());
+my $isSVN = isSVNDirectory(firstDirectoryOrCwd());
+
+$isSVN || $isGit || die "Couldn't determine your version control system.";
+
+# Find the list of modified files
+my @changed_files;
+my $changed_files_string;
+my %changed_line_ranges;
+my %function_lists;
+my @conflict_files;
+
+my $SVN = "svn";
+my $GIT = "git";
+
+my %supportedTestExtensions = map { $_ => 1 } qw(html shtml svg xml xhtml pl php);
+my @addedRegressionTests = ();
+my $didChangeRegressionTests = 0;
+
+generateFileList(@changed_files, @conflict_files, %function_lists);
+
+if (!@changed_files && !@conflict_files && !keys %function_lists) {
+ print STDERR " No changes found.\n";
+ exit 1;
+}
+
+if (@conflict_files) {
+ print STDERR " The following files have conflicts. Run prepare-ChangeLog again after fixing the conflicts:\n";
+ print STDERR join("\n", @conflict_files), "\n";
+ exit 1;
+}
+
+if (@changed_files) {
+ $changed_files_string = "'" . join ("' '", @changed_files) . "'";
+
+ # For each file, build a list of modified lines.
+ # Use line numbers from the "after" side of each diff.
+ print STDERR " Reviewing diff to determine which lines changed.\n";
+ my $file;
+ open DIFF, "-|", diffCommand(@changed_files) or die "The diff failed: $!.\n";
+ while (<DIFF>) {
+ $file = makeFilePathRelative($1) if $_ =~ diffHeaderFormat();
+ if (defined $file) {
+ my ($start, $end) = extractLineRange($_);
+ if ($start >= 0 && $end >= 0) {
+ push @{$changed_line_ranges{$file}}, [ $start, $end ];
+ } elsif (/DO_NOT_COMMIT/) {
+ print STDERR "WARNING: file $file contains the string DO_NOT_COMMIT, line $.\n";
+ }
+ }
+ }
+ close DIFF;
+}
+
+# For each source file, convert line range to function list.
+if (%changed_line_ranges) {
+ print STDERR " Extracting affected function names from source files.\n";
+ foreach my $file (keys %changed_line_ranges) {
+ # Only look for function names in certain source files.
+ next unless $file =~ /\.(c|cpp|m|mm|h|java|js)/;
+
+ # Find all the functions in the file.
+ open SOURCE, $file or next;
+ my @function_ranges = get_function_line_ranges(\*SOURCE, $file);
+ close SOURCE;
+
+ # Find all the modified functions.
+ my @functions;
+ my %saw_function;
+ my @change_ranges = (@{$changed_line_ranges{$file}}, []);
+ my @change_range = (0, 0);
+ FUNCTION: foreach my $function_range_ref (@function_ranges) {
+ my @function_range = @$function_range_ref;
+
+ # Advance to successive change ranges.
+ for (;; @change_range = @{shift @change_ranges}) {
+ last FUNCTION unless @change_range;
+
+ # If past this function, move on to the next one.
+ next FUNCTION if $change_range[0] > $function_range[1];
+
+ # If an overlap with this function range, record the function name.
+ if ($change_range[1] >= $function_range[0]
+ and $change_range[0] <= $function_range[1]) {
+ if (!$saw_function{$function_range[2]}) {
+ $saw_function{$function_range[2]} = 1;
+ push @functions, $function_range[2];
+ }
+ next FUNCTION;
+ }
+ }
+ }
+
+ # Format the list of functions now.
+
+ if (@functions) {
+ $function_lists{$file} = "" if !defined $function_lists{$file};
+ $function_lists{$file} .= "\n (" . join("):\n (", @functions) . "):";
+ }
+ }
+}
+
+# Get some parameters for the ChangeLog we are about to write.
+my $date = changeLogDate($changeLogTimeZone);
+my $name = $ENV{CHANGE_LOG_NAME}
+ || $ENV{REAL_NAME}
+ || gitConfig("user.name")
+ || (split /\s*,\s*/, (getpwuid $<)[6])[0]
+ || "set REAL_NAME environment variable";
+my $email_address = $ENV{CHANGE_LOG_EMAIL_ADDRESS}
+ || $ENV{EMAIL_ADDRESS}
+ || gitConfig("user.email")
+ || "set EMAIL_ADDRESS environment variable";
+
+if ($gitCommit) {
+ $name = `$GIT log --max-count=1 --pretty=\"format:%an\" \"$gitCommit\"`;
+ $email_address = `$GIT log --max-count=1 --pretty=\"format:%ae\" \"$gitCommit\"`;
+}
+
+# Remove trailing parenthesized notes from user name (bit of hack).
+$name =~ s/\(.*?\)\s*$//g;
+
+# Find the change logs.
+my %has_log;
+my %files;
+foreach my $file (sort keys %function_lists) {
+ my $prefix = $file;
+ my $has_log = 0;
+ while ($prefix) {
+ $prefix =~ s-/[^/]+/?$-/- or $prefix = "";
+ $has_log = $has_log{$prefix};
+ if (!defined $has_log) {
+ $has_log = -f "${prefix}ChangeLog";
+ $has_log{$prefix} = $has_log;
+ }
+ last if $has_log;
+ }
+ if (!$has_log) {
+ print STDERR "No ChangeLog found for $file.\n";
+ } else {
+ push @{$files{$prefix}}, $file;
+ }
+}
+
+# Get the latest ChangeLog files from svn.
+my @logs = ();
+foreach my $prefix (sort keys %files) {
+ push @logs, File::Spec->catfile($prefix || ".", "ChangeLog");
+}
+
+if (@logs && $updateChangeLogs && $isSVN) {
+ print STDERR " Running 'svn update' to update ChangeLog files.\n";
+ open ERRORS, "-|", $SVN, "update", @logs
+ or die "The svn update of ChangeLog files failed: $!.\n";
+ my @conflictedChangeLogs;
+ while (my $line = <ERRORS>) {
+ print STDERR " ", $line;
+ push @conflictedChangeLogs, $1 if $line =~ m/^C\s+(.+)\s*$/;
+ }
+ close ERRORS;
+
+ if (@conflictedChangeLogs) {
+ print STDERR " Attempting to merge conflicted ChangeLogs.\n";
+ my $resolveChangeLogsPath = File::Spec->catfile(dirname($0), "resolve-ChangeLogs");
+ open RESOLVE, "-|", $resolveChangeLogsPath, "--no-warnings", @conflictedChangeLogs
+ or die "Could not open resolve-ChangeLogs script: $!.\n";
+ print STDERR " $_" while <RESOLVE>;
+ close RESOLVE;
+ }
+}
+
+# Write out a new ChangeLog file.
+foreach my $prefix (sort keys %files) {
+ my $changeLogPath = File::Spec->catfile($prefix || ".", "ChangeLog");
+ print STDERR " Editing the ${changeLogPath} file.\n";
+ open OLD_CHANGE_LOG, ${changeLogPath} or die "Could not open ${changeLogPath} file: $!.\n";
+ # It's less efficient to read the whole thing into memory than it would be
+ # to read it while we prepend to it later, but I like doing this part first.
+ my @old_change_log = <OLD_CHANGE_LOG>;
+ close OLD_CHANGE_LOG;
+ open CHANGE_LOG, "> ${changeLogPath}" or die "Could not write ${changeLogPath}\n.";
+ print CHANGE_LOG "$date $name <$email_address>\n\n";
+
+ my ($reviewer, $description) = reviewerAndDescriptionForGitCommit($gitCommit) if $gitCommit;
+ $reviewer = "NOBODY (OO" . "PS!)" if !$reviewer;
+
+ print CHANGE_LOG " Reviewed by $reviewer.\n\n";
+ print CHANGE_LOG $description . "\n" if $description;
+
+ if ($prefix =~ m/WebCore/ || `pwd` =~ m/WebCore/) {
+ if ($didChangeRegressionTests) {
+ print CHANGE_LOG testListForChangeLog(sort @addedRegressionTests);
+ } else {
+ print CHANGE_LOG " WARNING: NO TEST CASES ADDED OR CHANGED\n\n";
+ }
+ }
+
+ foreach my $file (sort @{$files{$prefix}}) {
+ my $file_stem = substr $file, length $prefix;
+ print CHANGE_LOG " * $file_stem:$function_lists{$file}\n";
+ }
+ print CHANGE_LOG "\n", @old_change_log;
+ close CHANGE_LOG;
+}
+
+# Write out another diff.
+if ($spewDiff && @changed_files) {
+ print STDERR " Running diff to help you write the ChangeLog entries.\n";
+ local $/ = undef; # local slurp mode
+ open DIFF, "-|", createPatchCommand($changed_files_string) or die "The diff failed: $!.\n";
+ print <DIFF>;
+ close DIFF;
+}
+
+# Open ChangeLogs.
+if ($openChangeLogs && @logs) {
+ print STDERR " Opening the edited ChangeLog files.\n";
+ my $editor = $ENV{"CHANGE_LOG_EDIT_APPLICATION"};
+ if ($editor) {
+ system "open", "-a", $editor, @logs;
+ } else {
+ system "open", "-e", @logs;
+ }
+}
+
+# Done.
+exit;
+
+sub canonicalizePath($)
+{
+ my ($file) = @_;
+
+ # Remove extra slashes and '.' directories in path
+ $file = File::Spec->canonpath($file);
+
+ # Remove '..' directories in path
+ my @dirs = ();
+ foreach my $dir (File::Spec->splitdir($file)) {
+ if ($dir eq '..' && $#dirs >= 0 && $dirs[$#dirs] ne '..') {
+ pop(@dirs);
+ } else {
+ push(@dirs, $dir);
+ }
+ }
+ return ($#dirs >= 0) ? File::Spec->catdir(@dirs) : ".";
+}
+
+sub changeLogDate($)
+{
+ my ($timeZone) = @_;
+ my $savedTimeZone = $ENV{'TZ'};
+ # Set TZ temporarily so that localtime() is in that time zone
+ $ENV{'TZ'} = $timeZone;
+ my $date = strftime("%Y-%m-%d", localtime());
+ if (defined $savedTimeZone) {
+ $ENV{'TZ'} = $savedTimeZone;
+ } else {
+ delete $ENV{'TZ'};
+ }
+ return $date;
+}
+
+sub get_function_line_ranges($$)
+{
+ my ($file_handle, $file_name) = @_;
+
+ if ($file_name =~ /\.(c|cpp|m|mm|h)$/) {
+ return get_function_line_ranges_for_c ($file_handle, $file_name);
+ } elsif ($file_name =~ /\.java$/) {
+ return get_function_line_ranges_for_java ($file_handle, $file_name);
+ } elsif ($file_name =~ /\.js$/) {
+ return get_function_line_ranges_for_javascript ($file_handle, $file_name);
+ }
+ return ();
+}
+
+
+sub method_decl_to_selector($)
+{
+ (my $method_decl) = @_;
+
+ $_ = $method_decl;
+
+ if ((my $comment_stripped) = m-([^/]*)(//|/*).*-) {
+ $_ = $comment_stripped;
+ }
+
+ s/,\s*...//;
+
+ if (/:/) {
+ my @components = split /:/;
+ pop @components if (scalar @components > 1);
+ $_ = (join ':', map {s/.*[^[:word:]]//; scalar $_;} @components) . ':';
+ } else {
+ s/\s*$//;
+ s/.*[^[:word:]]//;
+ }
+
+ return $_;
+}
+
+
+
+# Read a file and get all the line ranges of the things that look like C functions.
+# A function name is the last word before an open parenthesis before the outer
+# level open brace. A function starts at the first character after the last close
+# brace or semicolon before the function name and ends at the close brace.
+# Comment handling is simple-minded but will work for all but pathological cases.
+#
+# Result is a list of triples: [ start_line, end_line, function_name ].
+
+sub get_function_line_ranges_for_c($$)
+{
+ my ($file_handle, $file_name) = @_;
+
+ my @ranges;
+
+ my $in_comment = 0;
+ my $in_macro = 0;
+ my $in_method_declaration = 0;
+ my $in_parentheses = 0;
+ my $in_braces = 0;
+ my $brace_start = 0;
+ my $brace_end = 0;
+ my $skip_til_brace_or_semicolon = 0;
+
+ my $word = "";
+ my $interface_name = "";
+
+ my $potential_method_char = "";
+ my $potential_method_spec = "";
+
+ my $potential_start = 0;
+ my $potential_name = "";
+
+ my $start = 0;
+ my $name = "";
+
+ my $next_word_could_be_namespace = 0;
+ my $potential_namespace = "";
+ my @namespaces;
+
+ while (<$file_handle>) {
+ # Handle continued multi-line comment.
+ if ($in_comment) {
+ next unless s-.*\*/--;
+ $in_comment = 0;
+ }
+
+ # Handle continued macro.
+ if ($in_macro) {
+ $in_macro = 0 unless /\\$/;
+ next;
+ }
+
+ # Handle start of macro (or any preprocessor directive).
+ if (/^\s*\#/) {
+ $in_macro = 1 if /^([^\\]|\\.)*\\$/;
+ next;
+ }
+
+ # Handle comments and quoted text.
+ while (m-(/\*|//|\'|\")-) { # \' and \" keep emacs perl mode happy
+ my $match = $1;
+ if ($match eq "/*") {
+ if (!s-/\*.*?\*/--) {
+ s-/\*.*--;
+ $in_comment = 1;
+ }
+ } elsif ($match eq "//") {
+ s-//.*--;
+ } else { # ' or "
+ if (!s-$match([^\\]|\\.)*?$match--) {
+ warn "mismatched quotes at line $. in $file_name\n";
+ s-$match.*--;
+ }
+ }
+ }
+
+
+ # continued method declaration
+ if ($in_method_declaration) {
+ my $original = $_;
+ my $method_cont = $_;
+
+ chomp $method_cont;
+ $method_cont =~ s/[;\{].*//;
+ $potential_method_spec = "${potential_method_spec} ${method_cont}";
+
+ $_ = $original;
+ if (/;/) {
+ $potential_start = 0;
+ $potential_method_spec = "";
+ $potential_method_char = "";
+ $in_method_declaration = 0;
+ s/^[^;\{]*//;
+ } elsif (/{/) {
+ my $selector = method_decl_to_selector ($potential_method_spec);
+ $potential_name = "${potential_method_char}\[${interface_name} ${selector}\]";
+
+ $potential_method_spec = "";
+ $potential_method_char = "";
+ $in_method_declaration = 0;
+
+ $_ = $original;
+ s/^[^;{]*//;
+ } elsif (/\@end/) {
+ $in_method_declaration = 0;
+ $interface_name = "";
+ $_ = $original;
+ } else {
+ next;
+ }
+ }
+
+
+ # start of method declaration
+ if ((my $method_char, my $method_spec) = m&^([-+])([^0-9;][^;]*);?$&) {
+ my $original = $_;
+
+ if ($interface_name) {
+ chomp $method_spec;
+ $method_spec =~ s/\{.*//;
+
+ $potential_method_char = $method_char;
+ $potential_method_spec = $method_spec;
+ $potential_start = $.;
+ $in_method_declaration = 1;
+ } else {
+ warn "declaring a method but don't have interface on line $. in $file_name\n";
+ }
+ $_ = $original;
+ if (/\{/) {
+ my $selector = method_decl_to_selector ($potential_method_spec);
+ $potential_name = "${potential_method_char}\[${interface_name} ${selector}\]";
+
+ $potential_method_spec = "";
+ $potential_method_char = "";
+ $in_method_declaration = 0;
+ $_ = $original;
+ s/^[^{]*//;
+ } elsif (/\@end/) {
+ $in_method_declaration = 0;
+ $interface_name = "";
+ $_ = $original;
+ } else {
+ next;
+ }
+ }
+
+
+ # Find function, interface and method names.
+ while (m&((?:[[:word:]]+::)*operator(?:[ \t]*\(\)|[^()]*)|[[:word:]:~]+|[(){}:;])|\@(?:implementation|interface|protocol)\s+(\w+)[^{]*&g) {
+ # interface name
+ if ($2) {
+ $interface_name = $2;
+ next;
+ }
+
+ # Open parenthesis.
+ if ($1 eq "(") {
+ $potential_name = $word unless $in_parentheses || $skip_til_brace_or_semicolon;
+ $in_parentheses++;
+ next;
+ }
+
+ # Close parenthesis.
+ if ($1 eq ")") {
+ $in_parentheses--;
+ next;
+ }
+
+ # C++ constructor initializers
+ if ($1 eq ":") {
+ $skip_til_brace_or_semicolon = 1 unless ($in_parentheses || $in_braces);
+ }
+
+ # Open brace.
+ if ($1 eq "{") {
+ $skip_til_brace_or_semicolon = 0;
+
+ if ($potential_namespace) {
+ push @namespaces, $potential_namespace;
+ $potential_namespace = "";
+ next;
+ }
+
+ # Promote potential name to real function name at the
+ # start of the outer level set of braces (function body?).
+ if (!$in_braces and $potential_start) {
+ $start = $potential_start;
+ $name = $potential_name;
+ if (@namespaces && (length($name) < 2 || substr($name,1,1) ne "[")) {
+ $name = join ('::', @namespaces, $name);
+ }
+ }
+
+ $in_method_declaration = 0;
+
+ $brace_start = $. if (!$in_braces);
+ $in_braces++;
+ next;
+ }
+
+ # Close brace.
+ if ($1 eq "}") {
+ if (!$in_braces && @namespaces) {
+ pop @namespaces;
+ next;
+ }
+
+ $in_braces--;
+ $brace_end = $. if (!$in_braces);
+
+ # End of an outer level set of braces.
+ # This could be a function body.
+ if (!$in_braces and $name) {
+ push @ranges, [ $start, $., $name ];
+ $name = "";
+ }
+
+ $potential_start = 0;
+ $potential_name = "";
+ next;
+ }
+
+ # Semicolon.
+ if ($1 eq ";") {
+ $skip_til_brace_or_semicolon = 0;
+ $potential_start = 0;
+ $potential_name = "";
+ $in_method_declaration = 0;
+ next;
+ }
+
+ # Ignore "const" method qualifier.
+ if ($1 eq "const") {
+ next;
+ }
+
+ if ($1 eq "namespace" || $1 eq "class" || $1 eq "struct") {
+ $next_word_could_be_namespace = 1;
+ next;
+ }
+
+ # Word.
+ $word = $1;
+ if (!$skip_til_brace_or_semicolon) {
+ if ($next_word_could_be_namespace) {
+ $potential_namespace = $word;
+ $next_word_could_be_namespace = 0;
+ } elsif ($potential_namespace) {
+ $potential_namespace = "";
+ }
+
+ if (!$in_parentheses) {
+ $potential_start = 0;
+ $potential_name = "";
+ }
+ if (!$potential_start) {
+ $potential_start = $.;
+ $potential_name = "";
+ }
+ }
+ }
+ }
+
+ warn "missing close braces in $file_name (probable start at $brace_start)\n" if ($in_braces > 0);
+ warn "too many close braces in $file_name (probable start at $brace_end)\n" if ($in_braces < 0);
+
+ warn "mismatched parentheses in $file_name\n" if $in_parentheses;
+
+ return @ranges;
+}
+
+
+
+# Read a file and get all the line ranges of the things that look like Java
+# classes, interfaces and methods.
+#
+# A class or interface name is the word that immediately follows
+# `class' or `interface' when followed by an open curly brace and not
+# a semicolon. It can appear at the top level, or inside another class
+# or interface block, but not inside a function block
+#
+# A class or interface starts at the first character after the first close
+# brace or after the function name and ends at the close brace.
+#
+# A function name is the last word before an open parenthesis before
+# an open brace rather than a semicolon. It can appear at top level or
+# inside a class or interface block, but not inside a function block.
+#
+# A function starts at the first character after the first close
+# brace or after the function name and ends at the close brace.
+#
+# Comment handling is simple-minded but will work for all but pathological cases.
+#
+# Result is a list of triples: [ start_line, end_line, function_name ].
+
+sub get_function_line_ranges_for_java($$)
+{
+ my ($file_handle, $file_name) = @_;
+
+ my @current_scopes;
+
+ my @ranges;
+
+ my $in_comment = 0;
+ my $in_macro = 0;
+ my $in_parentheses = 0;
+ my $in_braces = 0;
+ my $in_non_block_braces = 0;
+ my $class_or_interface_just_seen = 0;
+
+ my $word = "";
+
+ my $potential_start = 0;
+ my $potential_name = "";
+ my $potential_name_is_class_or_interface = 0;
+
+ my $start = 0;
+ my $name = "";
+ my $current_name_is_class_or_interface = 0;
+
+ while (<$file_handle>) {
+ # Handle continued multi-line comment.
+ if ($in_comment) {
+ next unless s-.*\*/--;
+ $in_comment = 0;
+ }
+
+ # Handle continued macro.
+ if ($in_macro) {
+ $in_macro = 0 unless /\\$/;
+ next;
+ }
+
+ # Handle start of macro (or any preprocessor directive).
+ if (/^\s*\#/) {
+ $in_macro = 1 if /^([^\\]|\\.)*\\$/;
+ next;
+ }
+
+ # Handle comments and quoted text.
+ while (m-(/\*|//|\'|\")-) { # \' and \" keep emacs perl mode happy
+ my $match = $1;
+ if ($match eq "/*") {
+ if (!s-/\*.*?\*/--) {
+ s-/\*.*--;
+ $in_comment = 1;
+ }
+ } elsif ($match eq "//") {
+ s-//.*--;
+ } else { # ' or "
+ if (!s-$match([^\\]|\\.)*?$match--) {
+ warn "mismatched quotes at line $. in $file_name\n";
+ s-$match.*--;
+ }
+ }
+ }
+
+ # Find function names.
+ while (m-(\w+|[(){};])-g) {
+ # Open parenthesis.
+ if ($1 eq "(") {
+ if (!$in_parentheses) {
+ $potential_name = $word;
+ $potential_name_is_class_or_interface = 0;
+ }
+ $in_parentheses++;
+ next;
+ }
+
+ # Close parenthesis.
+ if ($1 eq ")") {
+ $in_parentheses--;
+ next;
+ }
+
+ # Open brace.
+ if ($1 eq "{") {
+ # Promote potential name to real function name at the
+ # start of the outer level set of braces (function/class/interface body?).
+ if (!$in_non_block_braces
+ and (!$in_braces or $current_name_is_class_or_interface)
+ and $potential_start) {
+ if ($name) {
+ push @ranges, [ $start, ($. - 1),
+ join ('.', @current_scopes) ];
+ }
+
+
+ $current_name_is_class_or_interface = $potential_name_is_class_or_interface;
+
+ $start = $potential_start;
+ $name = $potential_name;
+
+ push (@current_scopes, $name);
+ } else {
+ $in_non_block_braces++;
+ }
+
+ $potential_name = "";
+ $potential_start = 0;
+
+ $in_braces++;
+ next;
+ }
+
+ # Close brace.
+ if ($1 eq "}") {
+ $in_braces--;
+
+ # End of an outer level set of braces.
+ # This could be a function body.
+ if (!$in_non_block_braces) {
+ if ($name) {
+ push @ranges, [ $start, $.,
+ join ('.', @current_scopes) ];
+
+ pop (@current_scopes);
+
+ if (@current_scopes) {
+ $current_name_is_class_or_interface = 1;
+
+ $start = $. + 1;
+ $name = $current_scopes[$#current_scopes-1];
+ } else {
+ $current_name_is_class_or_interface = 0;
+ $start = 0;
+ $name = "";
+ }
+ }
+ } else {
+ $in_non_block_braces-- if $in_non_block_braces;
+ }
+
+ $potential_start = 0;
+ $potential_name = "";
+ next;
+ }
+
+ # Semicolon.
+ if ($1 eq ";") {
+ $potential_start = 0;
+ $potential_name = "";
+ next;
+ }
+
+ if ($1 eq "class" or $1 eq "interface") {
+ $class_or_interface_just_seen = 1;
+ next;
+ }
+
+ # Word.
+ $word = $1;
+ if (!$in_parentheses) {
+ if ($class_or_interface_just_seen) {
+ $potential_name = $word;
+ $potential_start = $.;
+ $class_or_interface_just_seen = 0;
+ $potential_name_is_class_or_interface = 1;
+ next;
+ }
+ }
+ if (!$potential_start) {
+ $potential_start = $.;
+ $potential_name = "";
+ }
+ $class_or_interface_just_seen = 0;
+ }
+ }
+
+ warn "mismatched braces in $file_name\n" if $in_braces;
+ warn "mismatched parentheses in $file_name\n" if $in_parentheses;
+
+ return @ranges;
+}
+
+
+
+# Read a file and get all the line ranges of the things that look like
+# JavaScript functions.
+#
+# A function name is the word that immediately follows `function' when
+# followed by an open curly brace. It can appear at the top level, or
+# inside other functions.
+#
+# An anonymous function name is the identifier chain immediately before
+# an assignment with the equals operator or object notation that has a
+# value starting with `function' followed by an open curly brace.
+#
+# A getter or setter name is the word that immediately follows `get' or
+# `set' when followed by an open curly brace .
+#
+# Comment handling is simple-minded but will work for all but pathological cases.
+#
+# Result is a list of triples: [ start_line, end_line, function_name ].
+
+sub get_function_line_ranges_for_javascript($$)
+{
+ my ($fileHandle, $fileName) = @_;
+
+ my @currentScopes;
+ my @currentIdentifiers;
+ my @currentFunctionNames;
+ my @currentFunctionDepths;
+ my @currentFunctionStartLines;
+
+ my @ranges;
+
+ my $inComment = 0;
+ my $inQuotedText = "";
+ my $parenthesesDepth = 0;
+ my $bracesDepth = 0;
+
+ my $functionJustSeen = 0;
+ my $getterJustSeen = 0;
+ my $setterJustSeen = 0;
+ my $assignmentJustSeen = 0;
+
+ my $word = "";
+
+ while (<$fileHandle>) {
+ # Handle continued multi-line comment.
+ if ($inComment) {
+ next unless s-.*\*/--;
+ $inComment = 0;
+ }
+
+ # Handle continued quoted text.
+ if ($inQuotedText ne "") {
+ next if /\\$/;
+ s-([^\\]|\\.)*?$inQuotedText--;
+ $inQuotedText = "";
+ }
+
+ # Handle comments and quoted text.
+ while (m-(/\*|//|\'|\")-) { # \' and \" keep emacs perl mode happy
+ my $match = $1;
+ if ($match eq '/*') {
+ if (!s-/\*.*?\*/--) {
+ s-/\*.*--;
+ $inComment = 1;
+ }
+ } elsif ($match eq '//') {
+ s-//.*--;
+ } else { # ' or "
+ if (!s-$match([^\\]|\\.)*?$match--) {
+ $inQuotedText = $match if /\\$/;
+ warn "mismatched quotes at line $. in $fileName\n" if $inQuotedText eq "";
+ s-$match.*--;
+ }
+ }
+ }
+
+ # Find function names.
+ while (m-(\w+|[(){}=:;])-g) {
+ # Open parenthesis.
+ if ($1 eq '(') {
+ $parenthesesDepth++;
+ next;
+ }
+
+ # Close parenthesis.
+ if ($1 eq ')') {
+ $parenthesesDepth--;
+ next;
+ }
+
+ # Open brace.
+ if ($1 eq '{') {
+ push(@currentScopes, join(".", @currentIdentifiers));
+ @currentIdentifiers = ();
+
+ $bracesDepth++;
+ next;
+ }
+
+ # Close brace.
+ if ($1 eq '}') {
+ $bracesDepth--;
+
+ if (@currentFunctionDepths and $bracesDepth == $currentFunctionDepths[$#currentFunctionDepths]) {
+ pop(@currentFunctionDepths);
+
+ my $currentFunction = pop(@currentFunctionNames);
+ my $start = pop(@currentFunctionStartLines);
+
+ push(@ranges, [$start, $., $currentFunction]);
+ }
+
+ pop(@currentScopes);
+ @currentIdentifiers = ();
+
+ next;
+ }
+
+ # Semicolon.
+ if ($1 eq ';') {
+ @currentIdentifiers = ();
+ next;
+ }
+
+ # Function.
+ if ($1 eq 'function') {
+ $functionJustSeen = 1;
+
+ if ($assignmentJustSeen) {
+ my $currentFunction = join('.', (@currentScopes, @currentIdentifiers));
+ $currentFunction =~ s/\.{2,}/\./g; # Removes consecutive periods.
+
+ push(@currentFunctionNames, $currentFunction);
+ push(@currentFunctionDepths, $bracesDepth);
+ push(@currentFunctionStartLines, $.);
+ }
+
+ next;
+ }
+
+ # Getter prefix.
+ if ($1 eq 'get') {
+ $getterJustSeen = 1;
+ next;
+ }
+
+ # Setter prefix.
+ if ($1 eq 'set') {
+ $setterJustSeen = 1;
+ next;
+ }
+
+ # Assignment operator.
+ if ($1 eq '=' or $1 eq ':') {
+ $assignmentJustSeen = 1;
+ next;
+ }
+
+ next if $parenthesesDepth;
+
+ # Word.
+ $word = $1;
+ $word = "get $word" if $getterJustSeen;
+ $word = "set $word" if $setterJustSeen;
+
+ if (($functionJustSeen and !$assignmentJustSeen) or $getterJustSeen or $setterJustSeen) {
+ push(@currentIdentifiers, $word);
+
+ my $currentFunction = join('.', (@currentScopes, @currentIdentifiers));
+ $currentFunction =~ s/\.{2,}/\./g; # Removes consecutive periods.
+
+ push(@currentFunctionNames, $currentFunction);
+ push(@currentFunctionDepths, $bracesDepth);
+ push(@currentFunctionStartLines, $.);
+ } elsif ($word ne 'if' and $word ne 'for' and $word ne 'do' and $word ne 'while' and $word ne 'which' and $word ne 'var') {
+ push(@currentIdentifiers, $word);
+ }
+
+ $functionJustSeen = 0;
+ $getterJustSeen = 0;
+ $setterJustSeen = 0;
+ $assignmentJustSeen = 0;
+ }
+ }
+
+ warn "mismatched braces in $fileName\n" if $bracesDepth;
+ warn "mismatched parentheses in $fileName\n" if $parenthesesDepth;
+
+ return @ranges;
+}
+
+
+sub processPaths(\@)
+{
+ my ($paths) = @_;
+ return ("." => 1) if (!@{$paths});
+
+ my %result = ();
+
+ for my $file (@{$paths}) {
+ die "can't handle absolute paths like \"$file\"\n" if File::Spec->file_name_is_absolute($file);
+ die "can't handle empty string path\n" if $file eq "";
+ die "can't handle path with single quote in the name like \"$file\"\n" if $file =~ /'/; # ' (keep Xcode syntax highlighting happy)
+
+ my $untouchedFile = $file;
+
+ $file = canonicalizePath($file);
+
+ die "can't handle paths with .. like \"$untouchedFile\"\n" if $file =~ m|/\.\./|;
+
+ $result{$file} = 1;
+ }
+
+ return ("." => 1) if ($result{"."});
+
+ # Remove any paths that also have a parent listed.
+ for my $path (keys %result) {
+ for (my $parent = dirname($path); $parent ne '.'; $parent = dirname($parent)) {
+ if ($result{$parent}) {
+ delete $result{$path};
+ last;
+ }
+ }
+ }
+
+ return %result;
+}
+
+sub diffFromToString()
+{
+ return "" if $isSVN;
+ return $gitCommit if $gitCommit =~ m/.+\.\..+/;
+ return "\"$gitCommit^\" \"$gitCommit\"" if $gitCommit;
+ return "HEAD" if $isGit;
+}
+
+sub diffCommand(@)
+{
+ my @paths = @_;
+
+ my $pathsString = "'" . join("' '", @paths) . "'";
+
+ my $command;
+ if ($isSVN) {
+ $command = "$SVN diff --diff-cmd diff -x -N $pathsString";
+ } elsif ($isGit) {
+ $command = "$GIT diff --no-ext-diff -U0 " . diffFromToString();
+ $command .= " -- $pathsString" unless $gitCommit;
+ }
+
+ return $command;
+}
+
+sub statusCommand(@)
+{
+ my @files = @_;
+
+ my $filesString = "'" . join ("' '", @files) . "'";
+ my $command;
+ if ($isSVN) {
+ $command = "$SVN stat $filesString";
+ } elsif ($isGit) {
+ $command = "$GIT diff -r --name-status -C -C -M " . diffFromToString();
+ $command .= " -- $filesString" unless $gitCommit;
+ }
+
+ return "$command 2>&1";
+}
+
+sub createPatchCommand($)
+{
+ my ($changedFilesString) = @_;
+
+ my $command;
+ if ($isSVN) {
+ $command = "'$FindBin::Bin/svn-create-patch' $changedFilesString";
+ } elsif ($isGit) {
+ $command = "$GIT diff -C -C -M " . diffFromToString();
+ $command .= " -- $changedFilesString" unless $gitCommit;
+ }
+
+ return $command;
+}
+
+sub diffHeaderFormat()
+{
+ return qr/^Index: (\S+)$/ if $isSVN;
+ return qr/^diff --git a\/.+ b\/(.+)$/ if $isGit;
+}
+
+sub findOriginalFileFromSvn($)
+{
+ my ($file) = @_;
+ my $baseUrl;
+ open INFO, "$SVN info . |" or die;
+ while (<INFO>) {
+ if (/^URL: (.+)/) {
+ $baseUrl = $1;
+ last;
+ }
+ }
+ close INFO;
+ my $sourceFile;
+ open INFO, "$SVN info '$file' |" or die;
+ while (<INFO>) {
+ if (/^Copied From URL: (.+)/) {
+ $sourceFile = File::Spec->abs2rel($1, $baseUrl);
+ last;
+ }
+ }
+ close INFO;
+ return $sourceFile;
+}
+
+sub generateFileList(\@\@\%)
+{
+ my ($changedFiles, $conflictFiles, $functionLists) = @_;
+ print STDERR " Running status to find changed, added, or removed files.\n";
+ open STAT, "-|", statusCommand(keys %paths) or die "The status failed: $!.\n";
+ my $inGitCommitSection = 0;
+ while (<STAT>) {
+ my $status;
+ my $original;
+ my $file;
+
+ if ($isSVN) {
+ if (/^([ACDMR]).{5} (.+)$/) {
+ $status = $1;
+ $file = $2;
+ $original = findOriginalFileFromSvn($file) if substr($_, 3, 1) eq "+";
+ } else {
+ print; # error output from svn stat
+ }
+ } elsif ($isGit) {
+ if (/^([ADM])\t(.+)$/) {
+ $status = $1;
+ $file = $2;
+ } elsif (/^([CR])[0-9]{1,3}\t([^\t]+)\t([^\t\n]+)$/) { # for example: R90% newfile oldfile
+ $status = $1;
+ $original = $2;
+ $file = $3;
+ } else {
+ print; # error output from git diff
+ }
+ }
+
+ next unless $status;
+
+ $file = makeFilePathRelative($file);
+
+ if (isModifiedStatus($status) || isAddedStatus($status)) {
+ my @components = File::Spec->splitdir($file);
+ if ($components[0] eq "LayoutTests") {
+ $didChangeRegressionTests = 1;
+ push @addedRegressionTests, $file
+ if isAddedStatus($status)
+ && $file =~ /\.([a-zA-Z]+)$/
+ && $supportedTestExtensions{lc($1)}
+ && !scalar(grep(/^resources$/i, @components));
+ }
+ push @{$changedFiles}, $file if $components[$#components] ne "ChangeLog";
+ } elsif (isConflictStatus($status)) {
+ push @{$conflictFiles}, $file;
+ }
+ if (basename($file) ne "ChangeLog") {
+ my $description = statusDescription($status, $original);
+ $functionLists->{$file} = $description if defined $description;
+ }
+ }
+ close STAT;
+}
+
+sub gitConfig($)
+{
+ return unless $isGit;
+
+ my ($config) = @_;
+
+ my $result = `$GIT config $config`;
+ if (($? >> 8) != 0) {
+ $result = `$GIT repo-config $config`;
+ }
+ chomp $result;
+ return $result;
+}
+
+sub isModifiedStatus($)
+{
+ my ($status) = @_;
+
+ my %statusCodes = (
+ "M" => 1,
+ );
+
+ return $statusCodes{$status};
+}
+
+sub isAddedStatus($)
+{
+ my ($status) = @_;
+
+ my %statusCodes = (
+ "A" => 1,
+ "C" => $isGit,
+ "R" => 1,
+ );
+
+ return $statusCodes{$status};
+}
+
+sub isConflictStatus($)
+{
+ my ($status) = @_;
+
+ my %svn = (
+ "C" => 1,
+ );
+
+ my %git = (
+ "U" => 1,
+ );
+
+ return 0 if $gitCommit; # an existing commit cannot have conflicts
+ return $svn{$status} if $isSVN;
+ return $git{$status} if $isGit;
+}
+
+sub statusDescription($$)
+{
+ my ($status, $original) = @_;
+
+ my %svn = (
+ "A" => defined $original ? " Copied from \%s." : " Added.",
+ "D" => " Removed.",
+ "M" => "",
+ "R" => defined $original ? " Replaced with \%s." : " Replaced.",
+ );
+
+ my %git = %svn;
+ $git{"A"} = " Added.";
+ $git{"C"} = " Copied from \%s.";
+ $git{"R"} = " Renamed from \%s.";
+
+ return sprintf($svn{$status}, $original) if $isSVN && exists $svn{$status};
+ return sprintf($git{$status}, $original) if $isGit && exists $git{$status};
+ return undef;
+}
+
+sub extractLineRange($)
+{
+ my ($string) = @_;
+
+ my ($start, $end) = (-1, -1);
+
+ if ($isSVN && $string =~ /^\d+(,\d+)?[acd](\d+)(,(\d+))?/) {
+ $start = $2;
+ $end = $4 || $2;
+ } elsif ($isGit && $string =~ /^@@ -\d+(,\d+)? \+(\d+)(,(\d+))? @@/) {
+ $start = $2;
+ $end = defined($4) ? $4 + $2 - 1 : $2;
+ }
+
+ return ($start, $end);
+}
+
+sub firstDirectoryOrCwd()
+{
+ my $dir = ".";
+ my @dirs = keys(%paths);
+
+ $dir = -d $dirs[0] ? $dirs[0] : dirname($dirs[0]) if @dirs;
+
+ return $dir;
+}
+
+sub testListForChangeLog(@)
+{
+ my (@tests) = @_;
+
+ return "" unless @tests;
+
+ my $leadString = " Test" . (@tests == 1 ? "" : "s") . ": ";
+ my $list = $leadString;
+ foreach my $i (0..$#tests) {
+ $list .= " " x length($leadString) if $i;
+ my $test = $tests[$i];
+ $test =~ s/^LayoutTests\///;
+ $list .= "$test\n";
+ }
+ $list .= "\n";
+
+ return $list;
+}
+
+sub reviewerAndDescriptionForGitCommit($)
+{
+ my ($commit) = @_;
+
+ my $description = '';
+ my $reviewer;
+
+ my @args = qw(rev-list --pretty);
+ push @args, '-1' if $commit !~ m/.+\.\..+/;
+ my $gitLog;
+ {
+ local $/ = undef;
+ open(GIT, "-|", $GIT, @args, $commit) || die;
+ $gitLog = <GIT>;
+ close(GIT);
+ }
+
+ my @commitLogs = split(/^[Cc]ommit [a-f0-9]{40}/m, $gitLog);
+ shift @commitLogs; # Remove initial blank commit log
+ my $commitLogCount = 0;
+ foreach my $commitLog (@commitLogs) {
+ $description .= "\n" if $commitLogCount;
+ $commitLogCount++;
+ my $inHeader = 1;
+ my @lines = split(/\n/, $commitLog);
+ shift @lines; # Remove initial blank line
+ foreach my $line (@lines) {
+ if ($inHeader) {
+ if (!$line) {
+ $inHeader = 0;
+ }
+ next;
+ } elsif ($line =~ /[Ss]igned-[Oo]ff-[Bb]y: (.+)/) {
+ if (!$reviewer) {
+ $reviewer = $1;
+ } else {
+ $reviewer .= ", " . $1;
+ }
+ } elsif (length $line == 0) {
+ $description = $description . "\n";
+ } else {
+ $line =~ s/^\s*//;
+ $description = $description . " " . $line . "\n";
+ }
+ }
+ }
+ if (!$reviewer) {
+ $reviewer = $gitReviewer;
+ }
+
+ return ($reviewer, $description);
+}
diff --git a/WebKitTools/Scripts/print-msvc-project-dependencies b/WebKitTools/Scripts/print-msvc-project-dependencies
new file mode 100755
index 0000000..dbc8402
--- /dev/null
+++ b/WebKitTools/Scripts/print-msvc-project-dependencies
@@ -0,0 +1,143 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2008 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. ``AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+use strict;
+use File::Basename;
+
+sub printDependencyTree($);
+
+my $basename = basename($0);
+@ARGV or die "Usage: $basename sln1 [sln2 sln3...]";
+
+foreach my $sln (@ARGV) {
+ printDependencyTree($sln);
+}
+
+exit;
+
+sub printDependencyTree($)
+{
+ my ($sln) = @_;
+
+ unless (-f $sln) {
+ warn "Warning: Can't find $sln; skipping\n";
+ return;
+ }
+
+ unless (open SLN, "<", $sln) {
+ warn "Warning: Can't open $sln; skipping\n";
+ return;
+ }
+
+ my %projectsByUUID = ();
+ my $currentProject;
+
+ my $state = "initial";
+ foreach my $line (<SLN>) {
+ if ($state eq "initial") {
+ if ($line =~ /^Project\([^\)]+\) = "([^"]+)", "[^"]+", "([^"]+)"\r?$/) {
+ my $name = $1;
+ my $uuid = $2;
+ if (exists $projectsByUUID{$uuid}) {
+ warn "Warning: Project $name appears more than once in $sln; using first definition\n";
+ next;
+ }
+ $currentProject = {
+ name => $name,
+ uuid => $uuid,
+ dependencies => {},
+ };
+ $projectsByUUID{$uuid} = $currentProject;
+
+ $state = "inProject";
+ }
+
+ next;
+ }
+
+ if ($state eq "inProject") {
+ defined($currentProject) or die;
+
+ if ($line =~ /^\s*ProjectSection\(ProjectDependencies\) = postProject\r?$/) {
+ $state = "inDependencies";
+ } elsif ($line =~ /^EndProject\r?$/) {
+ $currentProject = undef;
+ $state = "initial";
+ }
+
+ next;
+ }
+
+ if ($state eq "inDependencies") {
+ defined($currentProject) or die;
+
+ if ($line =~ /^\s*({[^}]+}) = ({[^}]+})\r?$/) {
+ my $uuid1 = $1;
+ my $uuid2 = $2;
+ if (exists $currentProject->{dependencies}->{$uuid1}) {
+ warn "Warning: UUID $uuid1 listed more than once as dependency of project ", $currentProject->{name}, "\n";
+ next;
+ }
+
+ $uuid1 eq $uuid2 or warn "Warning: UUIDs in depedency section of project ", $currentProject->{name}, " don't match: $uuid1 $uuid2; using first UUID\n";
+
+ $currentProject->{dependencies}->{$uuid1} = 1;
+ } elsif ($line =~ /^\s*EndProjectSection\r?$/) {
+ $state = "inProject";
+ }
+
+ next;
+ }
+ }
+
+ close SLN or warn "Warning: Can't close $sln\n";
+
+ my %projectsNotDependedUpon = %projectsByUUID;
+ CANDIDATE: foreach my $candidateUUID (keys %projectsByUUID) {
+ foreach my $projectUUID (keys %projectsByUUID) {
+ next if $candidateUUID eq $projectUUID;
+ foreach my $dependencyUUID (keys %{$projectsByUUID{$projectUUID}->{dependencies}}) {
+ if ($candidateUUID eq $dependencyUUID) {
+ delete $projectsNotDependedUpon{$candidateUUID};
+ next CANDIDATE;
+ }
+ }
+ }
+ }
+
+ foreach my $project (values %projectsNotDependedUpon) {
+ printProjectAndDependencies($project, 0, \%projectsByUUID);
+ }
+}
+
+sub printProjectAndDependencies
+{
+ my ($project, $indentLevel, $projectsByUUID) = @_;
+
+ print " " x $indentLevel, $project->{name}, "\n";
+ foreach my $dependencyUUID (keys %{$project->{dependencies}}) {
+ printProjectAndDependencies($projectsByUUID->{$dependencyUUID}, $indentLevel + 1, $projectsByUUID);
+ }
+}
diff --git a/WebKitTools/Scripts/report-include-statistics b/WebKitTools/Scripts/report-include-statistics
new file mode 100755
index 0000000..17152ab
--- /dev/null
+++ b/WebKitTools/Scripts/report-include-statistics
@@ -0,0 +1,114 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2005, 2006 Apple Computer, 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# "report-include-statistics" script for WebKit Open Source Project
+
+use strict;
+use File::Find;
+
+find(\&wanted, @ARGV ? @ARGV : ".");
+
+my %paths;
+my %sources;
+my %includes;
+
+sub wanted
+{
+ my $file = $_;
+
+ if ($file eq "icu") {
+ $File::Find::prune = 1;
+ return;
+ }
+
+ if ($file !~ /^\./ && $file =~ /\.(h|cpp|c|mm|m)$/) {
+ $paths{$file} = $File::Find::name;
+ $sources{$file} = $File::Find::name if $file !~ /\.h/;
+ open FILE, $file or die;
+ while (<FILE>) {
+ if (m-^\s*#\s*(include|import)\s+["<]((\S+/)*)(\S+)[">]-) {
+ my $include = ($2 eq "sys/" ? $2 : "") . $4;
+ $includes{$file}{$include}++;
+ }
+ }
+ close FILE;
+ }
+}
+
+my %totalIncludes;
+
+sub fillOut
+{
+ my ($file) = @_;
+
+ return if defined $totalIncludes{$file};
+
+ for my $include (keys %{ $includes{$file} }) {
+ $totalIncludes{$file}{$include} = 1;
+ fillOut($include);
+ for my $i (keys %{ $totalIncludes{$include} }) {
+ $totalIncludes{$file}{$i} = 1;
+ }
+ }
+}
+
+my %inclusionCounts;
+for my $file (keys %includes) {
+ $inclusionCounts{$file} = 0;
+ fillOut($file);
+}
+
+for my $file (keys %sources) {
+ for my $include (keys %{ $totalIncludes{$file} }) {
+ $inclusionCounts{$include}++;
+ }
+}
+
+for my $file (sort mostincludedcmp keys %includes) {
+ next if !$paths{$file};
+ my $count = $inclusionCounts{$file};
+ my $numIncludes = keys %{ $includes{$file} };
+ my $numTotalIncludes = keys %{ $totalIncludes{$file} };
+ print "$file is included $count times, includes $numIncludes files directly, $numTotalIncludes files total.\n"
+}
+
+# Sort most-included files first.
+sub mostincludedcmp($$)
+{
+ my ($filea, $fileb) = @_;
+
+ my $counta = $inclusionCounts{$filea} || 0;
+ my $countb = $inclusionCounts{$fileb} || 0;
+ return $countb <=> $counta if $counta != $countb;
+
+ my $ta = keys %{ $totalIncludes{$filea} };
+ my $tb = keys %{ $totalIncludes{$fileb} };
+ return $ta <=> $tb if $ta != $tb;
+
+ return $filea cmp $fileb;
+}
diff --git a/WebKitTools/Scripts/resolve-ChangeLogs b/WebKitTools/Scripts/resolve-ChangeLogs
new file mode 100755
index 0000000..306565c
--- /dev/null
+++ b/WebKitTools/Scripts/resolve-ChangeLogs
@@ -0,0 +1,513 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2007, 2008, 2009 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Merge and resolve ChangeLog conflicts for svn and git repositories
+
+use strict;
+
+use FindBin;
+use lib $FindBin::Bin;
+
+use File::Basename;
+use File::Path;
+use File::Spec;
+use Getopt::Long;
+use POSIX;
+use VCSUtils;
+
+sub conflictFiles($);
+sub findChangeLog($);
+sub findUnmergedChangeLogs();
+sub fixChangeLogPatch($);
+sub fixMergedChangeLogs($;@);
+sub fixOneMergedChangeLog($);
+sub mergeChanges($$$);
+sub parseFixMerged($$;$);
+sub removeChangeLogArguments();
+sub resolveChangeLog($);
+sub resolveConflict($);
+sub showStatus($;$);
+sub usageAndExit();
+
+my $isGit = isGit();
+my $isSVN = isSVN();
+
+my $SVN = "svn";
+my $GIT = "git";
+
+my $fixMerged;
+my $printWarnings = 1;
+my $showHelp;
+
+my $getOptionsResult = GetOptions(
+ 'f|fix-merged:s' => \&parseFixMerged,
+ 'h|help' => \$showHelp,
+ 'w|warnings!' => \$printWarnings,
+);
+
+my @changeLogFiles = removeChangeLogArguments();
+
+if (!defined $fixMerged && scalar(@changeLogFiles) == 0) {
+ @changeLogFiles = findUnmergedChangeLogs();
+}
+
+if (scalar(@ARGV) > 0) {
+ print STDERR "ERROR: Files listed on command-line that are not ChangeLogs.\n";
+ undef $getOptionsResult;
+} elsif (!defined $fixMerged && scalar(@changeLogFiles) == 0) {
+ print STDERR "ERROR: No ChangeLog files listed on command-line or found unmerged.\n";
+ undef $getOptionsResult;
+} elsif (defined $fixMerged && !$isGit) {
+ print STDERR "ERROR: --fix-merged may only be used with a git repository\n";
+ undef $getOptionsResult;
+}
+
+sub usageAndExit()
+{
+ print STDERR <<__END__;
+Usage: @{[ basename($0) ]} [options] [path/to/ChangeLog] [path/to/another/ChangeLog ...]
+ -f|--fix-merged [revision-range] fix git-merged ChangeLog entries; if a revision-range
+ is specified, run git filter-branch on the range
+ -h|--help show this help message
+ -w|--[no-]warnings show or suppress warnings (default: show warnings)
+__END__
+ exit 1;
+}
+
+if (!$getOptionsResult || $showHelp) {
+ usageAndExit();
+}
+
+if (defined $fixMerged && length($fixMerged) > 0) {
+ my $commitRange = $fixMerged;
+ $commitRange = $commitRange . "..HEAD" if index($commitRange, "..") < 0;
+ fixMergedChangeLogs($commitRange, @changeLogFiles);
+} elsif (@changeLogFiles) {
+ for my $file (@changeLogFiles) {
+ if (defined $fixMerged) {
+ fixOneMergedChangeLog($file);
+ } else {
+ resolveChangeLog($file);
+ }
+ }
+} else {
+ print STDERR "ERROR: Unknown combination of switches and arguments.\n";
+ usageAndExit();
+}
+
+exit 0;
+
+sub conflictFiles($)
+{
+ my ($file) = @_;
+ my $fileMine;
+ my $fileOlder;
+ my $fileNewer;
+
+ if (-e $file && -e "$file.orig" && -e "$file.rej") {
+ return ("$file.rej", "$file.orig", $file);
+ }
+
+ if ($isSVN) {
+ open STAT, "-|", $SVN, "status", $file || die;
+ my $status = <STAT>;
+ close STAT;
+ if (!$status || $status !~ m/^C\s+/) {
+ print STDERR "WARNING: ${file} is not in a conflicted state.\n" if $printWarnings;
+ return ();
+ }
+
+ $fileMine = "${file}.mine" if -e "${file}.mine";
+
+ my $currentRevision;
+ open INFO, "-|", $SVN, "info", $file || die;
+ while (my $line = <INFO>) {
+ $currentRevision = $1 if $line =~ m/^Revision: ([0-9]+)/;
+ }
+ close INFO;
+ $fileNewer = "${file}.r${currentRevision}" if -e "${file}.r${currentRevision}";
+
+ my @matchingFiles = grep { $_ ne $fileNewer } glob("${file}.r[0-9][0-9]*");
+ if (scalar(@matchingFiles) > 1) {
+ print STDERR "WARNING: Too many conflict files exist for ${file}!\n" if $printWarnings;
+ } else {
+ $fileOlder = shift @matchingFiles;
+ }
+ } elsif ($isGit) {
+ my $gitPrefix = `$GIT rev-parse --show-prefix`;
+ chomp $gitPrefix;
+ open GIT, "-|", $GIT, "ls-files", "--unmerged", $file || die;
+ while (my $line = <GIT>) {
+ my ($mode, $hash, $stage, $fileName) = split(' ', $line);
+ my $outputFile;
+ if ($stage == 1) {
+ $fileOlder = "${file}.BASE.$$";
+ $outputFile = $fileOlder;
+ } elsif ($stage == 2) {
+ $fileNewer = "${file}.LOCAL.$$";
+ $outputFile = $fileNewer;
+ } elsif ($stage == 3) {
+ $fileMine = "${file}.REMOTE.$$";
+ $outputFile = $fileMine;
+ } else {
+ die "Unknown file stage: $stage";
+ }
+ system("$GIT cat-file blob :${stage}:${gitPrefix}${file} > $outputFile");
+ }
+ close GIT;
+ } else {
+ die "Unknown version control system";
+ }
+
+ if (!$fileMine && !$fileOlder && !$fileNewer) {
+ print STDERR "WARNING: ${file} does not need merging.\n" if $printWarnings;
+ } elsif (!$fileMine || !$fileOlder || !$fileNewer) {
+ print STDERR "WARNING: ${file} is missing some conflict files.\n" if $printWarnings;
+ }
+
+ return ($fileMine, $fileOlder, $fileNewer);
+}
+
+sub findChangeLog($)
+{
+ return $_[0] if basename($_[0]) eq "ChangeLog";
+
+ my $file = File::Spec->catfile($_[0], "ChangeLog");
+ return $file if -d $_[0] and -e $file;
+
+ return undef;
+}
+
+sub findUnmergedChangeLogs()
+{
+ my $statCommand = "";
+
+ if ($isSVN) {
+ $statCommand = "$SVN stat | grep '^C'";
+ } elsif ($isGit) {
+ $statCommand = "$GIT diff -r --name-status --diff-filter=U -C -C -M";
+ } else {
+ return ();
+ }
+
+ my @results = ();
+ open STAT, "-|", $statCommand or die "The status failed: $!.\n";
+ while (<STAT>) {
+ if ($isSVN) {
+ if (/^([C]).{5} (.+)$/) {
+ my $file = findChangeLog($2);
+ push @results, $file if $file;
+ } else {
+ print; # error output from svn stat
+ }
+ } elsif ($isGit) {
+ if (/^([U])\t(.+)$/) {
+ my $file = findChangeLog($2);
+ push @results, $file if $file;
+ } else {
+ print; # error output from git diff
+ }
+ }
+ }
+ close STAT;
+
+ return @results;
+}
+
+sub fixChangeLogPatch($)
+{
+ my $patch = shift;
+ my $contextLineCount = 3;
+
+ return $patch if $patch !~ /\n@@ -1,(\d+) \+1,(\d+) @@\n( .*\n)+(\+.*\n)+( .*\n){$contextLineCount}$/m;
+ my ($oldLineCount, $newLineCount) = ($1, $2);
+ return $patch if $oldLineCount <= $contextLineCount;
+
+ # The diff(1) command is greedy when matching lines, so a new ChangeLog entry will
+ # have lines of context at the top of a patch when the existing entry has the same
+ # date and author as the new entry. This nifty loop alters a ChangeLog patch so
+ # that the added lines ("+") in the patch always start at the beginning of the
+ # patch and there are no initial lines of context.
+ my $newPatch;
+ my $lineCountInState = 0;
+ my $oldContentLineCountReduction = $oldLineCount - $contextLineCount;
+ my $newContentLineCountWithoutContext = $newLineCount - $oldLineCount - $oldContentLineCountReduction;
+ my ($stateHeader, $statePreContext, $stateNewChanges, $statePostContext) = (1..4);
+ my $state = $stateHeader;
+ foreach my $line (split(/\n/, $patch)) {
+ $lineCountInState++;
+ if ($state == $stateHeader && $line =~ /^@@ -1,$oldLineCount \+1,$newLineCount @\@$/) {
+ $line = "@@ -1,$contextLineCount +1," . ($newLineCount - $oldContentLineCountReduction) . " @@";
+ $lineCountInState = 0;
+ $state = $statePreContext;
+ } elsif ($state == $statePreContext && substr($line, 0, 1) eq " ") {
+ $line = "+" . substr($line, 1);
+ if ($lineCountInState == $oldContentLineCountReduction) {
+ $lineCountInState = 0;
+ $state = $stateNewChanges;
+ }
+ } elsif ($state == $stateNewChanges && substr($line, 0, 1) eq "+") {
+ # No changes to these lines
+ if ($lineCountInState == $newContentLineCountWithoutContext) {
+ $lineCountInState = 0;
+ $state = $statePostContext;
+ }
+ } elsif ($state == $statePostContext) {
+ if (substr($line, 0, 1) eq "+" && $lineCountInState <= $oldContentLineCountReduction) {
+ $line = " " . substr($line, 1);
+ } elsif ($lineCountInState > $contextLineCount && substr($line, 0, 1) eq " ") {
+ next; # Discard
+ }
+ }
+ $newPatch .= $line . "\n";
+ }
+
+ return $newPatch;
+}
+
+sub fixMergedChangeLogs($;@)
+{
+ my $revisionRange = shift;
+ my @changedFiles = @_;
+
+ if (scalar(@changedFiles) < 1) {
+ # Read in list of files changed in $revisionRange
+ open GIT, "-|", $GIT, "diff", "--name-only", $revisionRange || die;
+ push @changedFiles, <GIT>;
+ close GIT || die;
+ die "No changed files in $revisionRange" if scalar(@changedFiles) < 1;
+ chomp @changedFiles;
+ }
+
+ my @changeLogs = grep { defined $_ } map { findChangeLog($_) } @changedFiles;
+ die "No changed ChangeLog files in $revisionRange" if scalar(@changeLogs) < 1;
+
+ system("$GIT filter-branch --tree-filter 'PREVIOUS_COMMIT=\`$GIT rev-parse \$GIT_COMMIT^\` && MAPPED_PREVIOUS_COMMIT=\`map \$PREVIOUS_COMMIT\` $0 -f \"" . join('" "', @changeLogs) . "\"' $revisionRange");
+
+ # On success, remove the backup refs directory
+ if (WEXITSTATUS($?) == 0) {
+ rmtree(qw(.git/refs/original));
+ }
+}
+
+sub fixOneMergedChangeLog($)
+{
+ my $file = shift;
+ my $patch;
+
+ # Read in patch for incorrectly merged ChangeLog entry
+ {
+ local $/ = undef;
+ open GIT, "-|", $GIT, "diff", ($ENV{GIT_COMMIT} || "HEAD") . "^", $file || die;
+ $patch = <GIT>;
+ close GIT || die;
+ }
+
+ # Always checkout the previous commit's copy of the ChangeLog
+ system($GIT, "checkout", $ENV{MAPPED_PREVIOUS_COMMIT} || "HEAD^", $file);
+
+ # The patch must have 0 or more lines of context, then 1 or more lines
+ # of additions, and then 1 or more lines of context. If not, we skip it.
+ if ($patch =~ /\n@@ -(\d+),(\d+) \+(\d+),(\d+) @@\n( .*\n)*((\+.*\n)+)( .*\n)+$/m) {
+ # Copy the header from the original patch.
+ my $newPatch = substr($patch, 0, index($patch, "@@ -${1},${2} +${3},${4} @@"));
+
+ # Generate a new set of line numbers and patch lengths. Our new
+ # patch will start with the lines for the fixed ChangeLog entry,
+ # then have 3 lines of context from the top of the current file to
+ # make the patch apply cleanly.
+ $newPatch .= "@@ -1,3 +1," . ($4 - $2 + 3) . " @@\n";
+
+ # We assume that top few lines of the ChangeLog entry are actually
+ # at the bottom of the list of added lines (due to the way the patch
+ # algorithm works), so we simply search through the lines until we
+ # find the date line, then move the rest of the lines to the top.
+ my @patchLines = map { $_ . "\n" } split(/\n/, $6);
+ foreach my $i (0 .. $#patchLines) {
+ if ($patchLines[$i] =~ /^\+\d{4}-\d{2}-\d{2} /) {
+ unshift(@patchLines, splice(@patchLines, $i, scalar(@patchLines) - $i));
+ last;
+ }
+ }
+
+ $newPatch .= join("", @patchLines);
+
+ # Add 3 lines of context to the end
+ open FILE, "<", $file || die;
+ for (my $i = 0; $i < 3; $i++) {
+ $newPatch .= " " . <FILE>;
+ }
+ close FILE;
+
+ # Apply the new patch
+ open(PATCH, "| patch -p1 $file > /dev/null") || die;
+ print PATCH $newPatch;
+ close(PATCH) || die;
+
+ # Run "git add" on the fixed ChangeLog file
+ system($GIT, "add", $file);
+
+ showStatus($file, 1);
+ } elsif ($patch) {
+ # Restore the current copy of the ChangeLog file since we can't repatch it
+ system($GIT, "checkout", $ENV{GIT_COMMIT} || "HEAD", $file);
+ print STDERR "WARNING: Last change to ${file} could not be fixed and re-merged.\n" if $printWarnings;
+ }
+}
+
+sub mergeChanges($$$)
+{
+ my ($fileMine, $fileOlder, $fileNewer) = @_;
+
+ my $traditionalReject = $fileMine =~ /\.rej$/ ? 1 : 0;
+
+ local $/ = undef;
+
+ my $patch;
+ if ($traditionalReject) {
+ open(DIFF, "<", $fileMine);
+ $patch = <DIFF>;
+ close(DIFF);
+ rename($fileMine, "$fileMine.save");
+ rename($fileOlder, "$fileOlder.save");
+ } else {
+ open(DIFF, "-|", qw(diff -u), $fileOlder, $fileMine) || die;
+ $patch = <DIFF>;
+ close(DIFF);
+ }
+
+ unlink("${fileNewer}.orig");
+ unlink("${fileNewer}.rej");
+
+ open(PATCH, "| patch --fuzz=3 $fileNewer > /dev/null") || die;
+ print PATCH fixChangeLogPatch($patch);
+ close(PATCH);
+
+ my $result;
+
+ # Refuse to merge the patch if it did not apply cleanly
+ if (-e "${fileNewer}.rej") {
+ unlink("${fileNewer}.rej");
+ unlink($fileNewer);
+ rename("${fileNewer}.orig", $fileNewer);
+ $result = 0;
+ } else {
+ unlink("${fileNewer}.orig");
+ $result = 1;
+ }
+
+ if ($traditionalReject) {
+ rename("$fileMine.save", $fileMine);
+ rename("$fileOlder.save", $fileOlder);
+ }
+
+ return $result;
+}
+
+sub parseFixMerged($$;$)
+{
+ my ($switchName, $key, $value) = @_;
+ if (defined $key) {
+ if (defined findChangeLog($key)) {
+ unshift(@ARGV, $key);
+ $fixMerged = "";
+ } else {
+ $fixMerged = $key;
+ }
+ } else {
+ $fixMerged = "";
+ }
+}
+
+sub removeChangeLogArguments()
+{
+ my @results = ();
+
+ for (my $i = 0; $i < scalar(@ARGV); ) {
+ my $file = findChangeLog($ARGV[$i]);
+ if (defined $file) {
+ splice(@ARGV, $i, 1);
+ push @results, $file;
+ } else {
+ $i++;
+ }
+ }
+
+ return @results;
+}
+
+sub resolveChangeLog($)
+{
+ my ($file) = @_;
+
+ my ($fileMine, $fileOlder, $fileNewer) = conflictFiles($file);
+
+ return unless $fileMine && $fileOlder && $fileNewer;
+
+ if (mergeChanges($fileMine, $fileOlder, $fileNewer)) {
+ if ($file ne $fileNewer) {
+ unlink($file);
+ rename($fileNewer, $file) || die;
+ }
+ unlink($fileMine, $fileOlder);
+ resolveConflict($file);
+ showStatus($file, 1);
+ } else {
+ showStatus($file);
+ print STDERR "WARNING: ${file} could not be merged using fuzz level 3.\n" if $printWarnings;
+ unlink($fileMine, $fileOlder, $fileNewer) if $isGit;
+ }
+}
+
+sub resolveConflict($)
+{
+ my ($file) = @_;
+
+ if ($isSVN) {
+ system($SVN, "resolved", $file);
+ } elsif ($isGit) {
+ system($GIT, "add", $file);
+ } else {
+ die "Unknown version control system";
+ }
+}
+
+sub showStatus($;$)
+{
+ my ($file, $isConflictResolved) = @_;
+
+ if ($isSVN) {
+ system($SVN, "status", $file);
+ } elsif ($isGit) {
+ my @args = qw(--name-status);
+ unshift @args, qw(--cached) if $isConflictResolved;
+ system($GIT, "diff", @args, $file);
+ } else {
+ die "Unknown version control system";
+ }
+}
diff --git a/WebKitTools/Scripts/run-drawtest b/WebKitTools/Scripts/run-drawtest
new file mode 100755
index 0000000..2cd61de
--- /dev/null
+++ b/WebKitTools/Scripts/run-drawtest
@@ -0,0 +1,47 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2005 Apple Computer, 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Simplified "run" script for WebKit Open Source Project.
+
+use strict;
+use FindBin;
+use lib $FindBin::Bin;
+use webkitdirs;
+
+setConfiguration();
+my $productDir = productDir();
+
+# Check to see that all the frameworks are built (w/ SVG support).
+checkFrameworks();
+checkWebCoreSVGSupport(1);
+
+# Set up DYLD_FRAMEWORK_PATH to point to the product directory.
+print "Start DrawTest with DYLD_FRAMEWORK_PATH set to point to built WebKit in $productDir.\n";
+$ENV{DYLD_FRAMEWORK_PATH} = $productDir;
+my $drawtestPath = "$productDir/DrawTest.app/Contents/MacOS/DrawTest";
+exec $drawtestPath or die;
diff --git a/WebKitTools/Scripts/run-iexploder-tests b/WebKitTools/Scripts/run-iexploder-tests
new file mode 100755
index 0000000..f5e8a6c
--- /dev/null
+++ b/WebKitTools/Scripts/run-iexploder-tests
@@ -0,0 +1,172 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# A script to semi-automatically run iExploder tests.
+
+use strict;
+use warnings;
+
+use Cwd;
+use FindBin;
+use Getopt::Long;
+use IPC::Open2;
+
+use lib $FindBin::Bin;
+use webkitdirs;
+
+sub openHTTPDIfNeeded();
+sub closeHTTPD();
+sub runSafariWithIExploder();
+
+# Argument handling
+my $guardMalloc = '';
+my $httpdPort = 8000;
+my $downloadTest;
+
+GetOptions(
+ 'guard-malloc|g' => \$guardMalloc,
+ 'get=s' => \$downloadTest,
+ 'port=i' => \$httpdPort
+);
+
+
+setConfiguration();
+my $productDir = productDir();
+
+chdirWebKit();
+
+checkFrameworks();
+
+my $httpdOpen = 0;
+openHTTPDIfNeeded();
+
+if ($downloadTest) {
+ system "/usr/bin/curl -o ~/Desktop/iexploder$downloadTest.html \"http://127.0.0.1:$httpdPort/iexploder.cgi?lookup=1&test=$downloadTest\"";
+ print "Saved the test as iexploder$downloadTest.html on the desktop\n";
+} else {
+ runSafariWithIExploder();
+ print "Last generated tests:\n";
+ system "grep 'iexploder.cgi' /tmp/WebKit/access_log.txt | tail -n -5 | awk -F'[ =&\\?]' '{if (\$8 == \"lookup\") print \$11; else print \$9}'";
+}
+
+closeHTTPD();
+
+
+sub runSafariWithIExploder()
+{
+ my $redirectTo;
+ if (@ARGV) {
+ $redirectTo = "http://127.0.0.1:$httpdPort/iexploder.cgi?lookup=1&test=$ARGV[0]";
+ } else {
+ $redirectTo = "http://127.0.0.1:$httpdPort/index.html";
+ }
+
+ open REDIRECT_HTML, ">", "/tmp/WebKit/redirect.html" or die;
+ print REDIRECT_HTML "<html>\n";
+ print REDIRECT_HTML " <head>\n";
+ print REDIRECT_HTML " <meta http-equiv=\"refresh\" content=\"1;URL=$redirectTo\" />\n";
+ print REDIRECT_HTML " <script type=\"text/javascript\">\n";
+ print REDIRECT_HTML " document.location = \"$redirectTo\";\n";
+ print REDIRECT_HTML " </script>\n";
+ print REDIRECT_HTML " </head>\n";
+ print REDIRECT_HTML " <body>\n";
+ print REDIRECT_HTML " </body>\n";
+ print REDIRECT_HTML "</html>\n";
+ close REDIRECT_HTML;
+
+ local %ENV;
+ $ENV{DYLD_INSERT_LIBRARIES} = "/usr/lib/libgmalloc.dylib" if $guardMalloc;
+ system "WebKitTools/Scripts/run-safari", "-NSOpen", "/tmp/WebKit/redirect.html";
+}
+
+sub openHTTPDIfNeeded()
+{
+ return if $httpdOpen;
+
+ mkdir "/tmp/WebKit";
+
+ if (-f "/tmp/WebKit/httpd.pid") {
+ my $oldPid = `cat /tmp/WebKit/httpd.pid`;
+ chomp $oldPid;
+ if (0 != kill 0, $oldPid) {
+ print "\nhttpd is already running: pid $oldPid, killing...\n";
+ kill 15, $oldPid;
+
+ my $retryCount = 20;
+ while ((0 != kill 0, $oldPid) && $retryCount) {
+ sleep 1;
+ --$retryCount;
+ }
+
+ die "Timed out waiting for httpd to quit" unless $retryCount;
+ }
+ }
+
+ my $testDirectory = getcwd() . "/LayoutTests";
+ my $iExploderDirectory = getcwd() . "/WebKitTools/iExploder";
+ my $httpdPath = "/usr/sbin/httpd";
+ my $httpdConfig = "$testDirectory/http/conf/httpd.conf";
+ $httpdConfig = "$testDirectory/http/conf/apache2-httpd.conf" if `$httpdPath -v` =~ m|Apache/2|;
+ my $documentRoot = "$iExploderDirectory/htdocs";
+ my $typesConfig = "$testDirectory/http/conf/mime.types";
+ my $sslCertificate = "$testDirectory/http/conf/webkit-httpd.pem";
+ my $listen = "127.0.0.1:$httpdPort";
+
+ open2(\*HTTPDIN, \*HTTPDOUT, $httpdPath,
+ "-f", "$httpdConfig",
+ "-C", "DocumentRoot \"$documentRoot\"",
+ "-C", "Listen $listen",
+ "-c", "TypesConfig \"$typesConfig\"",
+ "-c", "CustomLog \"/tmp/WebKit/access_log.txt\" common",
+ "-c", "ErrorLog \"/tmp/WebKit/error_log.txt\"",
+ "-c", "SSLCertificateFile \"$sslCertificate\"",
+ # Apache wouldn't run CGIs with permissions==700 otherwise
+ "-c", "User \"#$<\"");
+
+ my $retryCount = 20;
+ while (system("/usr/bin/curl -q --silent --stderr - --output /dev/null $listen") && $retryCount) {
+ sleep 1;
+ --$retryCount;
+ }
+
+ die "Timed out waiting for httpd to start" unless $retryCount;
+
+ $httpdOpen = 1;
+}
+
+sub closeHTTPD()
+{
+ return if !$httpdOpen;
+
+ close HTTPDIN;
+ close HTTPDOUT;
+
+ kill 15, `cat /tmp/WebKit/httpd.pid` if -f "/tmp/WebKit/httpd.pid";
+
+ $httpdOpen = 0;
+}
diff --git a/WebKitTools/Scripts/run-javascriptcore-tests b/WebKitTools/Scripts/run-javascriptcore-tests
new file mode 100755
index 0000000..c0cb9a4
--- /dev/null
+++ b/WebKitTools/Scripts/run-javascriptcore-tests
@@ -0,0 +1,184 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
+# Copyright (C) 2007 Eric Seidel <eric@webkit.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Script to run the WebKit Open Source Project JavaScriptCore tests (adapted from Mozilla).
+
+use strict;
+use FindBin;
+use Getopt::Long qw(:config pass_through);
+use lib $FindBin::Bin;
+use webkitdirs;
+use POSIX;
+
+# determine configuration
+setConfiguration();
+my $configuration = configuration();
+
+my $jsDriverArgs = "";
+my $root; # intentionally left undefined
+my $showHelp = 0;
+
+my $programName = basename($0);
+my $usage = <<EOF;
+Usage: $programName [options] [options to pass to build system]
+ --help Show this help message
+ --jsDriver-args= A string of arguments to pass to jsDriver.pl
+ --root= Path to pre-built root containing jsc
+EOF
+
+GetOptions(
+ 'j|jsDriver-args=s' => \$jsDriverArgs,
+ 'root=s' => \$root,
+ 'help' => \$showHelp
+);
+
+# Assume any arguments left over from GetOptions are assumed to be build arguments
+my @buildArgs = @ARGV;
+
+# Arguments passed to --jsDriver-args (if any) are passed to jsDriver.pl
+my @jsArgs = split(" ", $jsDriverArgs);
+
+if ($showHelp) {
+ print STDERR $usage;
+ exit 1;
+}
+
+setConfigurationProductDir(Cwd::abs_path($root)) if (defined($root));
+
+if (!defined($root)){
+ chdirWebKit();
+
+ push(@buildArgs, argumentsForConfiguration());
+
+ print "Running: build-jsc " . join(" ", @buildArgs) . "\n";
+ my $buildResult = system "perl", "WebKitTools/Scripts/build-jsc", @buildArgs;
+ if ($buildResult) {
+ print STDERR "Compiling jsc failed!\n";
+ exit exitStatus($buildResult);
+ }
+}
+
+
+my $productDir = productDir();
+
+$productDir .= "/JavaScriptCore" if isQt();
+$productDir .= "/Programs" if isGtk();
+$ENV{DYLD_FRAMEWORK_PATH} = $productDir;
+setPathForRunningWebKitApp(\%ENV) if isCygwin();
+
+sub jscPath($)
+{
+ my ($productDir) = @_;
+ my $jscName = "jsc";
+ $jscName .= "_debug" if (isCygwin() && ($configuration eq "Debug"));
+ return "$productDir/$jscName";
+}
+
+sub testapiPath($)
+{
+ my ($productDir) = @_;
+ my $jscName = "testapi";
+ $jscName .= "_debug" if (isCygwin() && ($configuration eq "Debug"));
+ return "$productDir/$jscName";
+}
+
+#run api tests
+if (isAppleMacWebKit()) {
+ chdirWebKit();
+ chdir($productDir) or die;
+ my $testapiResult = system testapiPath($productDir);
+ exit exitStatus($testapiResult) if $testapiResult;
+}
+
+# Find JavaScriptCore directory
+chdirWebKit();
+chdir("JavaScriptCore");
+chdir "tests/mozilla" or die;
+printf "Running: jsDriver.pl -e squirrelfish -s %s -f actual.html %s\n", jscPath($productDir), join(" ", @jsArgs);
+my $result = system "perl", "jsDriver.pl", "-e", "squirrelfish", "-s", jscPath($productDir), "-f", "actual.html", @jsArgs;
+exit exitStatus($result) if $result;
+
+my %failures;
+
+open EXPECTED, "expected.html" or die;
+while (<EXPECTED>) {
+ last if /failures reported\.$/;
+}
+while (<EXPECTED>) {
+ chomp;
+ $failures{$_} = 1;
+}
+close EXPECTED;
+
+my %newFailures;
+
+open ACTUAL, "actual.html" or die;
+while (<ACTUAL>) {
+ last if /failures reported\.$/;
+}
+while (<ACTUAL>) {
+ chomp;
+ if ($failures{$_}) {
+ delete $failures{$_};
+ } else {
+ $newFailures{$_} = 1;
+ }
+}
+close ACTUAL;
+
+my $numNewFailures = keys %newFailures;
+if ($numNewFailures) {
+ print "\n** Danger, Will Robinson! Danger! The following failures have been introduced:\n";
+ foreach my $failure (sort keys %newFailures) {
+ print "\t$failure\n";
+ }
+}
+
+my $numOldFailures = keys %failures;
+if ($numOldFailures) {
+ print "\nYou fixed the following test";
+ print "s" if $numOldFailures != 1;
+ print ":\n";
+ foreach my $failure (sort keys %failures) {
+ print "\t$failure\n";
+ }
+}
+
+print "\n";
+
+print "$numNewFailures regression";
+print "s" if $numNewFailures != 1;
+print " found.\n";
+
+print "$numOldFailures test";
+print "s" if $numOldFailures != 1;
+print " fixed.\n";
+
+print "OK.\n" if $numNewFailures == 0;
+exit(1) if $numNewFailures;
diff --git a/WebKitTools/Scripts/run-jsc b/WebKitTools/Scripts/run-jsc
new file mode 100755
index 0000000..20dc5e8
--- /dev/null
+++ b/WebKitTools/Scripts/run-jsc
@@ -0,0 +1,58 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2006 Apple Computer, 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# This script runs a list of scripts through jsc a specified number of times.
+
+use strict;
+use warnings;
+use FindBin;
+use lib $FindBin::Bin;
+use Getopt::Long;
+use webkitdirs;
+
+my $usage = "Usage: run-jsc [--count run_count] [--verbose] shell_file [file2...]";
+
+my $count = 1;
+my $verbose = 0;
+GetOptions("count|c=i" => \$count,
+ "verbose|v" => \$verbose);
+die "$usage\n" if (@ARGV < 1);
+
+my $jsc = productDir() . "/jsc @ARGV";
+$jsc .= " 2> /dev/null" unless $verbose;
+
+my $dyld = productDir();
+
+$ENV{"DYLD_FRAMEWORK_PATH"} = $dyld;
+print STDERR "Running $count time(s): DYLD_FRAMEWORK_PATH=$dyld $jsc\n";
+while ($count--) {
+ if (system("$jsc") != 0) {
+ last;
+ }
+}
+
diff --git a/WebKitTools/Scripts/run-launcher b/WebKitTools/Scripts/run-launcher
new file mode 100755
index 0000000..9680cc2
--- /dev/null
+++ b/WebKitTools/Scripts/run-launcher
@@ -0,0 +1,67 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2007 Apple Computer, Inc. All rights reserved.
+# Copyright (C) 2007 Staikos Computing Services, Inc. <info@staikos.net>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Simplified "run" script for WebKit Open Source Project.
+
+use strict;
+use File::Spec::Functions qw/catdir/;
+use File::Temp qw/tempfile/;
+use FindBin;
+use lib $FindBin::Bin;
+use webkitdirs;
+
+setConfiguration();
+my $productDir = productDir();
+my $launcherPath = productDir();
+my @args = @ARGV;
+
+# Check to see that all the frameworks are built.
+checkFrameworks();
+
+# Set paths according to the build system used
+if (isQt()) {
+ my $libDir = catdir(productDir(), 'lib');
+ $launcherPath = catdir($launcherPath, "bin", "QtLauncher");
+
+ # Set up LD_LIBRARY_PATH to point to the product directory.
+ print "Starting webkit launcher with LD_LIBRARY_PATH set to point to built WebKit in $libDir.\n";
+
+ $ENV{LD_LIBRARY_PATH} = $ENV{LD_LIBRARY_PATH} ? "$libDir:$ENV{LD_LIBRARY_PATH}" : $libDir;
+ $ENV{DYLD_LIBRARY_PATH} = $ENV{DYLD_LIBRARY_PATH} ? "$libDir:$ENV{DYLD_LIBRARY_PATH}" : $libDir;
+} else {
+
+ if (isGtk()) {
+ $launcherPath = catdir($launcherPath, "Programs", "GtkLauncher");
+ }
+
+ print "Starting webkit launcher.\n";
+}
+
+exec $launcherPath, @args or die;
+
diff --git a/WebKitTools/Scripts/run-leaks b/WebKitTools/Scripts/run-leaks
new file mode 100755
index 0000000..d8f89d3
--- /dev/null
+++ b/WebKitTools/Scripts/run-leaks
@@ -0,0 +1,212 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2007 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Script to run the Mac OS X leaks tool with more expressive '-exclude' lists.
+
+use strict;
+use warnings;
+
+use File::Basename;
+use Getopt::Long;
+
+sub runLeaks($);
+sub parseLeaksOutput(\@);
+sub removeMatchingRecords(\@$\@);
+sub reportError($);
+
+sub main()
+{
+ # Read options.
+ my $usage =
+ "Usage: " . basename($0) . " [options] pid | executable name\n" .
+ " --exclude-callstack regexp Exclude leaks whose call stacks match the regular expression 'regexp'.\n" .
+ " --exclude-type regexp Exclude leaks whose data types match the regular expression 'regexp'.\n" .
+ " --help Show this help message.\n";
+
+ my @callStacksToExclude = ();
+ my @typesToExclude = ();
+ my $help = 0;
+
+ my $getOptionsResult = GetOptions(
+ 'exclude-callstack:s' => \@callStacksToExclude,
+ 'exclude-type:s' => \@typesToExclude,
+ 'help' => \$help
+ );
+ my $pidOrExecutableName = $ARGV[0];
+
+ if (!$getOptionsResult || $help) {
+ print STDERR $usage;
+ return 1;
+ }
+
+ if (!$pidOrExecutableName) {
+ reportError("Missing argument: pid | executable.");
+ print STDERR $usage;
+ return 1;
+ }
+
+ # Run leaks tool.
+ my $leaksOutput = runLeaks($pidOrExecutableName);
+ if (!$leaksOutput) {
+ return 1;
+ }
+
+ my $leakList = parseLeaksOutput(@$leaksOutput);
+ if (!$leakList) {
+ return 1;
+ }
+
+ # Filter output.
+ my $leakCount = @$leakList;
+ removeMatchingRecords(@$leakList, "callStack", @callStacksToExclude);
+ removeMatchingRecords(@$leakList, "type", @typesToExclude);
+ my $excludeCount = $leakCount - @$leakList;
+
+ # Dump results.
+ print $leaksOutput->[0];
+ print $leaksOutput->[1];
+ foreach my $leak (@$leakList) {
+ print $leak->{"leaksOutput"};
+ }
+
+ if ($excludeCount) {
+ print "$excludeCount leaks excluded (not printed)\n";
+ }
+
+ return 0;
+}
+
+exit(main());
+
+# Returns the output of the leaks tool in list form.
+sub runLeaks($)
+{
+ my ($pidOrExecutableName) = @_;
+
+ my @leaksOutput = `leaks $pidOrExecutableName`;
+ if (!@leaksOutput) {
+ reportError("Error running leaks tool.");
+ return;
+ }
+
+ return \@leaksOutput;
+}
+
+# Returns a list of hash references with the keys { address, size, type, callStack, leaksOutput }
+sub parseLeaksOutput(\@)
+{
+ my ($leaksOutput) = @_;
+
+ # Format:
+ # Process 00000: 1234 nodes malloced for 1234 KB
+ # Process 00000: XX leaks for XXX total leaked bytes.
+ # Leak: 0x00000000 size=1234 [instance of 'blah']
+ # 0x00000000 0x00000000 0x00000000 0x00000000 a..d.e.e
+ # ...
+ # Call stack: leak_caller() | leak() | malloc
+ #
+ # We treat every line except for Process 00000: and Leak: as optional
+
+ my ($leakCount) = ($leaksOutput->[1] =~ /[[:blank:]]+([0-9]+)[[:blank:]]+leaks?/);
+ if (!defined($leakCount)) {
+ reportError("Could not parse leak count reported by leaks tool.");
+ return;
+ }
+
+ my @leakList = ();
+ for my $line (@$leaksOutput) {
+ next if $line =~ /^Process/;
+ next if $line =~ /^node buffer added/;
+
+ if ($line =~ /^Leak: /) {
+ my ($address) = ($line =~ /Leak: ([[:xdigit:]x]+)/);
+ if (!defined($address)) {
+ reportError("Could not parse Leak address.");
+ return;
+ }
+
+ my ($size) = ($line =~ /size=([[:digit:]]+)/);
+ if (!defined($size)) {
+ reportError("Could not parse Leak size.");
+ return;
+ }
+
+ my ($type) = ($line =~ /'([^']+)'/); #'
+ if (!defined($type)) {
+ $type = ""; # The leaks tool sometimes omits the type.
+ }
+
+ my %leak = (
+ "address" => $address,
+ "size" => $size,
+ "type" => $type,
+ "callStack" => "", # The leaks tool sometimes omits the call stack.
+ "leaksOutput" => $line
+ );
+ push(@leakList, \%leak);
+ } else {
+ $leakList[$#leakList]->{"leaksOutput"} .= $line;
+ if ($line =~ /Call stack:/) {
+ $leakList[$#leakList]->{"callStack"} = $line;
+ }
+ }
+ }
+
+ if (@leakList != $leakCount) {
+ my $parsedLeakCount = @leakList;
+ reportError("Parsed leak count($parsedLeakCount) does not match leak count reported by leaks tool($leakCount).");
+ return;
+ }
+
+ return \@leakList;
+}
+
+sub removeMatchingRecords(\@$\@)
+{
+ my ($recordList, $key, $regexpList) = @_;
+
+ RECORD: for (my $i = 0; $i < @$recordList;) {
+ my $record = $recordList->[$i];
+
+ foreach my $regexp (@$regexpList) {
+ if ($record->{$key} =~ $regexp) {
+ splice(@$recordList, $i, 1);
+ next RECORD;
+ }
+ }
+
+ $i++;
+ }
+}
+
+sub reportError($)
+{
+ my ($errorMessage) = @_;
+
+ print STDERR basename($0) . ": $errorMessage\n";
+}
diff --git a/WebKitTools/Scripts/run-mangleme-tests b/WebKitTools/Scripts/run-mangleme-tests
new file mode 100755
index 0000000..93b7894
--- /dev/null
+++ b/WebKitTools/Scripts/run-mangleme-tests
@@ -0,0 +1,175 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# A script to semi-automatically run mangleme tests.
+
+use strict;
+use warnings;
+
+use Cwd;
+use FindBin;
+use Getopt::Long;
+use IPC::Open2;
+
+use lib $FindBin::Bin;
+use webkitdirs;
+
+sub openHTTPDIfNeeded();
+sub closeHTTPD();
+sub runSafariWithMangleme();
+
+# Argument handling
+my $guardMalloc = '';
+my $httpdPort = 8000;
+my $downloadTest;
+
+GetOptions(
+ 'guard-malloc|g' => \$guardMalloc,
+ 'get=s' => \$downloadTest,
+ 'port=i' => \$httpdPort
+);
+
+
+setConfiguration();
+my $productDir = productDir();
+
+chdirWebKit();
+
+checkFrameworks();
+
+mkdir "WebKitBuild/mangleme";
+(system "/usr/bin/make", "-C", "WebKitTools/mangleme") == 0 or die;
+
+my $httpdOpen = 0;
+openHTTPDIfNeeded();
+
+if ($downloadTest) {
+ system "/usr/bin/curl -o ~/Desktop/mangleme$downloadTest.html http://127.0.0.1:$httpdPort/remangle.cgi?$downloadTest";
+ print "Saved the test as mangleme$downloadTest.html on the desktop\n";
+} else {
+ runSafariWithMangleme();
+ print "Last generated tests:\n";
+ system "grep 'Mangle attempt' /tmp/WebKit/error_log.txt | tail -n -5 | awk ' {print \$4}'";
+}
+
+closeHTTPD();
+
+
+sub runSafariWithMangleme()
+{
+ my $redirectTo;
+ if (@ARGV) {
+ $redirectTo = "http://127.0.0.1:$httpdPort/remangle.cgi?$ARGV[0]";
+ } else {
+ $redirectTo = "http://127.0.0.1:$httpdPort/mangle.cgi";
+ }
+
+ open REDIRECT_HTML, ">", "/tmp/WebKit/redirect.html" or die;
+ print REDIRECT_HTML "<html>\n";
+ print REDIRECT_HTML " <head>\n";
+ print REDIRECT_HTML " <meta http-equiv=\"refresh\" content=\"1;URL=$redirectTo\" />\n";
+ print REDIRECT_HTML " <script type=\"text/javascript\">\n";
+ print REDIRECT_HTML " document.location = \"$redirectTo\";\n";
+ print REDIRECT_HTML " </script>\n";
+ print REDIRECT_HTML " </head>\n";
+ print REDIRECT_HTML " <body>\n";
+ print REDIRECT_HTML " </body>\n";
+ print REDIRECT_HTML "</html>\n";
+ close REDIRECT_HTML;
+
+ local %ENV;
+ $ENV{DYLD_INSERT_LIBRARIES} = "/usr/lib/libgmalloc.dylib" if $guardMalloc;
+ system "WebKitTools/Scripts/run-safari", "-NSOpen", "/tmp/WebKit/redirect.html";
+}
+
+sub openHTTPDIfNeeded()
+{
+ return if $httpdOpen;
+
+ mkdir "/tmp/WebKit";
+
+ if (-f "/tmp/WebKit/httpd.pid") {
+ my $oldPid = `cat /tmp/WebKit/httpd.pid`;
+ chomp $oldPid;
+ if (0 != kill 0, $oldPid) {
+ print "\nhttpd is already running: pid $oldPid, killing...\n";
+ kill 15, $oldPid;
+
+ my $retryCount = 20;
+ while ((0 != kill 0, $oldPid) && $retryCount) {
+ sleep 1;
+ --$retryCount;
+ }
+
+ die "Timed out waiting for httpd to quit" unless $retryCount;
+ }
+ }
+
+ my $testDirectory = getcwd() . "/LayoutTests";
+ my $manglemeDirectory = getcwd() . "/WebKitBuild/mangleme";
+ my $httpdPath = "/usr/sbin/httpd";
+ my $httpdConfig = "$testDirectory/http/conf/httpd.conf";
+ $httpdConfig = "$testDirectory/http/conf/apache2-httpd.conf" if `$httpdPath -v` =~ m|Apache/2|;
+ my $documentRoot = "$manglemeDirectory";
+ my $typesConfig = "$testDirectory/http/conf/mime.types";
+ my $sslCertificate = "$testDirectory/http/conf/webkit-httpd.pem";
+ my $listen = "127.0.0.1:$httpdPort";
+
+ open2(\*HTTPDIN, \*HTTPDOUT, $httpdPath,
+ "-f", "$httpdConfig",
+ "-C", "DocumentRoot \"$documentRoot\"",
+ "-C", "Listen $listen",
+ "-c", "TypesConfig \"$typesConfig\"",
+ "-c", "CustomLog \"/tmp/WebKit/access_log.txt\" common",
+ "-c", "ErrorLog \"/tmp/WebKit/error_log.txt\"",
+ "-c", "SSLCertificateFile \"$sslCertificate\"",
+ # Apache wouldn't run CGIs with permissions==700 otherwise
+ "-c", "User \"#$<\"");
+
+ my $retryCount = 20;
+ while (system("/usr/bin/curl -q --silent --stderr - --output /dev/null $listen") && $retryCount) {
+ sleep 1;
+ --$retryCount;
+ }
+
+ die "Timed out waiting for httpd to start" unless $retryCount;
+
+ $httpdOpen = 1;
+}
+
+sub closeHTTPD()
+{
+ return if !$httpdOpen;
+
+ close HTTPDIN;
+ close HTTPDOUT;
+
+ kill 15, `cat /tmp/WebKit/httpd.pid` if -f "/tmp/WebKit/httpd.pid";
+
+ $httpdOpen = 0;
+}
diff --git a/WebKitTools/Scripts/run-pageloadtest b/WebKitTools/Scripts/run-pageloadtest
new file mode 100755
index 0000000..ad6daa1
--- /dev/null
+++ b/WebKitTools/Scripts/run-pageloadtest
@@ -0,0 +1,92 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2006 Eric Seidel (eric@webkit.org)
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Script to run the WebKit Open Source Project page load tests (PLTs).
+
+# Run all the tests passed in on the command line.
+
+use strict;
+use warnings;
+
+use File::Basename;
+use File::Spec;
+use FindBin;
+use Getopt::Long;
+
+use lib $FindBin::Bin;
+use webkitdirs;
+
+# Argument handling
+my $testName = 'svg';
+my $showHelp = 0;
+
+my $usage =
+ "Usage: " . basename($0) . "[options] testName\n" .
+ " --help Show this help message\n";
+
+my $getOptionsResult = GetOptions('help' => \$showHelp);
+
+if (!$getOptionsResult || $showHelp) {
+ print STDERR $usage;
+ exit 1;
+}
+
+$testName = shift @ARGV if (@ARGV);
+
+my $safariExecutablePath = safariPath();
+my $safariResourcePath = File::Spec->catdir(dirname(dirname($safariExecutablePath)), "Resources");
+
+# Check to see that all the frameworks are built.
+checkFrameworks();
+
+chdirWebKit();
+
+if ($testName eq 'svg') {
+ my $suiteFile = "PageLoadTests/$testName/$testName.pltsuite";
+ my $webkitPath = sourceDir();
+ `cat "$suiteFile" | perl -pe 's|WEBKIT_PATH|$webkitPath|' > $safariResourcePath/$testName.pltsuite`
+}
+
+die "Please copy ${testName}.pltsuite to ${safariResourcePath}/${testName}.pltsuite"
+ if (! -f "${safariResourcePath}/${testName}.pltsuite");
+
+setConfiguration();
+
+my $productDir = productDir();
+
+# Set up DYLD_FRAMEWORK_PATH to point to the product directory.
+print "Starting Safari with DYLD_FRAMEWORK_PATH set to point to built WebKit in $productDir.\n";
+$ENV{DYLD_FRAMEWORK_PATH} = $productDir;
+$ENV{WEBKIT_UNSET_DYLD_FRAMEWORK_PATH} = "YES";
+
+my @testCommands = ('activate');
+# Autovicki would clear history, we skip that here as this is likely an active user account
+@testCommands = (@testCommands, ("run $testName", 'emptyCache', 'wait 30'));
+@testCommands = (@testCommands, (("run $testName", 'wait 10') x 3));
+my $testCommandsString = join('; ', @testCommands);
+exec $safariExecutablePath, '--test-commands', $testCommandsString or die;
diff --git a/WebKitTools/Scripts/run-safari b/WebKitTools/Scripts/run-safari
new file mode 100755
index 0000000..d850a4a
--- /dev/null
+++ b/WebKitTools/Scripts/run-safari
@@ -0,0 +1,41 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2005, 2007 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Simplified "run" script for WebKit Open Source Project.
+
+use strict;
+use FindBin;
+use lib $FindBin::Bin;
+use webkitdirs;
+
+setConfiguration();
+
+# Check to see that all the frameworks are built.
+checkFrameworks();
+
+exit exitStatus(runSafari());
diff --git a/WebKitTools/Scripts/run-sunspider b/WebKitTools/Scripts/run-sunspider
new file mode 100755
index 0000000..2e58418
--- /dev/null
+++ b/WebKitTools/Scripts/run-sunspider
@@ -0,0 +1,131 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2007 Apple Inc. All rights reserved.
+# Copyright (C) 2007 Eric Seidel <eric@webkit.org>
+#
+# 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 COMPUTER, INC. ``AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+use strict;
+use FindBin;
+use Getopt::Long qw(:config pass_through);
+use lib $FindBin::Bin;
+use webkitdirs;
+use POSIX;
+
+# determine configuration, but default to "Release" instead of last-used configuration
+setConfiguration("Release");
+setConfiguration();
+my $configuration = configuration();
+
+my $root;
+my $testRuns = 10; # This number may be different from what sunspider defaults to (that's OK)
+my $runShark = 0;
+my $runShark20 = 0;
+my $runSharkCache = 0;
+my $ubench = 0;
+my $v8 = 0;
+my $setBaseline = 0;
+my $showHelp = 0;
+my $testsPattern;
+
+my $programName = basename($0);
+my $usage = <<EOF;
+Usage: $programName [options] [options to pass to build system]
+ --help Show this help message
+ --set-baseline Set baseline for future comparisons
+ --root Path to root tools build
+ --runs Number of times to run tests (default: $testRuns)
+ --tests Only run tests matching provided pattern
+ --shark Sample with the Mac OS X "Shark" performance testing tool (implies --runs=1)
+ --shark20 Like --shark, but with a 20 microsecond sampling interval
+ --shark-cache Like --shark, but performs a L2 cache-miss sample instead of time sample
+ --ubench Use microbenchmark suite instead of regular tests (to check for core execution regressions)
+ --v8 Use the V8 benchmark suite.
+EOF
+
+GetOptions('root=s' => sub { my ($x, $value) = @_; $root = $value; setConfigurationProductDir(Cwd::abs_path($root)); },
+ 'runs=i' => \$testRuns,
+ 'set-baseline' => \$setBaseline,
+ 'shark' => \$runShark,
+ 'shark20' => \$runShark20,
+ 'shark-cache' => \$runSharkCache,
+ 'ubench' => \$ubench,
+ 'v8' => \$v8,
+ 'tests=s' => \$testsPattern,
+ 'help' => \$showHelp);
+
+if ($showHelp) {
+ print STDERR $usage;
+ exit 1;
+}
+
+sub buildJSC
+{
+ if (!defined($root)){
+ push(@ARGV, "--" . $configuration);
+
+ chdirWebKit();
+ my $buildResult = system "WebKitTools/Scripts/build-jsc", @ARGV;
+ if ($buildResult) {
+ print STDERR "Compiling jsc failed!\n";
+ exit exitStatus($buildResult);
+ }
+ }
+}
+
+sub setupEnvironmentForExecution($)
+{
+ my ($productDir) = @_;
+ print "Starting sunspider with DYLD_FRAMEWORK_PATH set to point to built JavaScriptCore in $productDir.\n";
+ $ENV{DYLD_FRAMEWORK_PATH} = $productDir;
+ # FIXME: Other platforms may wish to augment this method to use LD_LIBRARY_PATH, etc.
+}
+
+sub jscPath($)
+{
+ my ($productDir) = @_;
+ my $jscName = "jsc";
+ $jscName .= "_debug" if (isCygwin() && ($configuration eq "Debug"));
+ return "$productDir/$jscName";
+}
+
+buildJSC();
+
+chdirWebKit();
+chdir("SunSpider");
+
+my $productDir = productDir();
+# FIXME: This hack should be pushed down into productDir()
+$productDir .= "/JavaScriptCore" if (isQt() or isGtk());
+
+setupEnvironmentForExecution($productDir);
+my @args = ("--shell", jscPath($productDir), "--runs", $testRuns);
+# This code could be removed if we chose to pass extra args to sunspider instead of Xcode
+push @args, "--set-baseline" if $setBaseline;
+push @args, "--shark" if $runShark;
+push @args, "--shark20" if $runShark20;
+push @args, "--shark-cache" if $runSharkCache;
+push @args, "--ubench" if $ubench;
+push @args, "--v8" if $v8;
+push @args, "--tests", $testsPattern if $testsPattern;
+
+exec "./sunspider", @args;
diff --git a/WebKitTools/Scripts/run-webkit-app b/WebKitTools/Scripts/run-webkit-app
new file mode 100755
index 0000000..452c44c
--- /dev/null
+++ b/WebKitTools/Scripts/run-webkit-app
@@ -0,0 +1,50 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2005 Apple Computer, 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Simplified "run" script for WebKit Open Source Project.
+
+use strict;
+use FindBin;
+use lib $FindBin::Bin;
+use webkitdirs;
+
+setConfiguration();
+my $productDir = productDir();
+
+die "Did not specify an application to open (e.g. run-webkit-app AppName).\n" unless length($ARGV[0]) > 0;
+
+# Check to see that all the frameworks are built.
+checkFrameworks();
+
+# Set up DYLD_FRAMEWORK_PATH to point to the product directory.
+print "Start $ARGV[0] with DYLD_FRAMEWORK_PATH set to point to built WebKit in $productDir.\n";
+$ENV{DYLD_FRAMEWORK_PATH} = $productDir;
+$ENV{WEBKIT_UNSET_DYLD_FRAMEWORK_PATH} = "YES";
+
+unshift(@ARGV, "-a");
+exec "open", @ARGV;
diff --git a/WebKitTools/Scripts/run-webkit-httpd b/WebKitTools/Scripts/run-webkit-httpd
new file mode 100755
index 0000000..a64eef6
--- /dev/null
+++ b/WebKitTools/Scripts/run-webkit-httpd
@@ -0,0 +1,127 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved.
+# Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Script to run Apache with the same configuration as used in http layout tests.
+
+use strict;
+use warnings;
+
+use Cwd;
+use File::Basename;
+use Getopt::Long;
+use FindBin;
+
+use lib $FindBin::Bin;
+use webkitdirs;
+
+# Argument handling
+my $httpdPort = 8000;
+my $allInterfaces = 0;
+my $showHelp;
+
+my $result = GetOptions(
+ 'all-interfaces|a' => \$allInterfaces,
+ 'help|h' => \$showHelp,
+ 'port=i' => \$httpdPort,
+);
+
+if (!$result || @ARGV || $showHelp) {
+ print "Usage: " . basename($0) . " [options]\n";
+ print " -a|--all-interfaces Bind to all interfaces\n";
+ print " -h|--help Show this help message\n";
+ print " -p|--port NNNN Bind to port NNNN\n";
+ exit 1;
+}
+
+setConfiguration();
+my $productDir = productDir();
+chdirWebKit();
+
+mkdir "/tmp/WebKit";
+
+if (-f "/tmp/WebKit/httpd.pid") {
+ my $oldPid = `cat /tmp/WebKit/httpd.pid`;
+ chomp $oldPid;
+ if (0 != kill 0, $oldPid) {
+ print "\nhttpd is already running: pid $oldPid, killing...\n";
+ kill 15, $oldPid;
+
+ my $retryCount = 20;
+ while ((0 != kill 0, $oldPid) && $retryCount) {
+ sleep 1;
+ --$retryCount;
+ }
+
+ die "Timed out waiting for httpd to quit" unless $retryCount;
+ }
+}
+
+my $testDirectory = getcwd() . "/LayoutTests";
+my $httpdPath = "/usr/sbin/httpd";
+$httpdPath = "/usr/sbin/apache2" if isDebianBased();
+my $httpdConfig = "$testDirectory/http/conf/httpd.conf";
+$httpdConfig = "$testDirectory/http/conf/cygwin-httpd.conf" if isCygwin();
+$httpdConfig = "$testDirectory/http/conf/apache2-httpd.conf" if `$httpdPath -v` =~ m|Apache/2|;
+$httpdConfig = "$testDirectory/http/conf/apache2-debian-httpd.conf" if isDebianBased();
+my $documentRoot = "$testDirectory/http/tests";
+my $typesConfig = "$testDirectory/http/conf/mime.types";
+my $sslCertificate = "$testDirectory/http/conf/webkit-httpd.pem";
+
+my $listen = "127.0.0.1:$httpdPort";
+$listen = "$httpdPort" if ($allInterfaces);
+
+if ($allInterfaces) {
+ print "Starting httpd on port $httpdPort (all interfaces)...\n";
+} else {
+ print "Starting httpd on <http://$listen/>...\n";
+}
+print "Press Ctrl+C to stop it.\n\n";
+
+my @args = (
+ "-f", "$httpdConfig",
+ "-C", "DocumentRoot \"$documentRoot\"",
+ "-C", "Listen $listen",
+ "-c", "TypesConfig \"$typesConfig\"",
+ "-c", "CustomLog |/usr/bin/tee common",
+ "-c", "ErrorLog |/usr/bin/tee",
+ # Apache wouldn't run CGIs with permissions==700 otherwise.
+ "-c", "User \"#$<\"",
+ # Run in single-process mode, do not detach from the controlling terminal.
+ "-X",
+ # Disable Keep-Alive support. Makes testing in multiple browsers easier (no need to wait
+ # for another browser's connection to expire).
+ "-c", "KeepAlive 0"
+);
+
+# FIXME: Enable this on Windows once <rdar://problem/5345985> is fixed
+push(@args, "-c", "SSLCertificateFile \"$sslCertificate\"") unless isCygwin();
+
+system($httpdPath, @args);
+
+unlink "/tmp/WebKit/httpd.pid";
diff --git a/WebKitTools/Scripts/run-webkit-nightly.cmd b/WebKitTools/Scripts/run-webkit-nightly.cmd
new file mode 100755
index 0000000..93037ab
--- /dev/null
+++ b/WebKitTools/Scripts/run-webkit-nightly.cmd
@@ -0,0 +1,10 @@
+@echo off
+set script="%TMP%\run-webkit-nightly2.cmd"
+set vsvars="%VS80COMNTOOLS%\vsvars32.bat"
+if exist %vsvars% (
+ copy %vsvars% "%script%"
+) else (
+ del "%script%"
+)
+FindSafari.exe %1 /printSafariLauncher >> "%script%"
+call %script%
diff --git a/WebKitTools/Scripts/run-webkit-tests b/WebKitTools/Scripts/run-webkit-tests
new file mode 100755
index 0000000..d6dae4e
--- /dev/null
+++ b/WebKitTools/Scripts/run-webkit-tests
@@ -0,0 +1,1895 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+# Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
+# Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com)
+# Copyright (C) 2007 Eric Seidel <eric@webkit.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Script to run the WebKit Open Source Project layout tests.
+
+# Run all the tests passed in on the command line.
+# If no tests are passed, find all the .html, .shtml, .xml, .xhtml, .pl, .php (and svg) files in the test directory.
+
+# Run each text.
+# Compare against the existing file xxx-expected.txt.
+# If there is a mismatch, generate xxx-actual.txt and xxx-diffs.txt.
+
+# At the end, report:
+# the number of tests that got the expected results
+# the number of tests that ran, but did not get the expected results
+# the number of tests that failed to run
+# the number of tests that were run but had no expected results to compare against
+
+use strict;
+use warnings;
+
+use Cwd;
+use Fcntl qw(F_GETFL F_SETFL O_NONBLOCK);
+use File::Basename;
+use File::Copy;
+use File::Find;
+use File::Path;
+use File::Spec;
+use File::Spec::Functions;
+use FindBin;
+use Getopt::Long;
+use IPC::Open2;
+use IPC::Open3;
+use Time::HiRes qw(time usleep);
+
+use List::Util 'shuffle';
+
+use lib $FindBin::Bin;
+use webkitdirs;
+use POSIX;
+
+sub openDumpTool();
+sub closeDumpTool();
+sub dumpToolDidCrash();
+sub closeHTTPD();
+sub countAndPrintLeaks($$$);
+sub fileNameWithNumber($$);
+sub numericcmp($$);
+sub openHTTPDIfNeeded();
+sub pathcmp($$);
+sub processIgnoreTests($$);
+sub slowestcmp($$);
+sub splitpath($);
+sub stripExtension($);
+sub isTextOnlyTest($);
+sub expectedDirectoryForTest($;$;$);
+sub countFinishedTest($$$$);
+sub testCrashedOrTimedOut($$$$$);
+sub sampleDumpTool();
+sub printFailureMessageForTest($$);
+sub toURL($);
+sub toWindowsPath($);
+sub closeCygpaths();
+sub validateSkippedArg($$;$);
+sub htmlForResultsSection(\@$&);
+sub deleteExpectedAndActualResults($);
+sub recordActualResultsAndDiff($$);
+sub buildPlatformResultHierarchy();
+sub buildPlatformTestHierarchy(@);
+sub epiloguesAndPrologues($$);
+sub parseLeaksandPrintUniqueLeaks();
+sub readFromDumpToolWithTimer(*;$);
+sub setFileHandleNonBlocking(*$);
+sub writeToFile($$);
+
+# Argument handling
+my $addPlatformExceptions = 0;
+my $complexText = 0;
+my $guardMalloc = '';
+my $httpdPort = 8000;
+my $httpdSSLPort = 8443;
+my $ignoreTests = '';
+my $launchSafari = 1;
+my $platform;
+my $pixelTests = '';
+my $quiet = '';
+my $report10Slowest = 0;
+my $resetResults = 0;
+my $shouldCheckLeaks = 0;
+my $showHelp = 0;
+my $testsPerDumpTool;
+my $testHTTP = 1;
+my $testMedia = 1;
+my $testResultsDirectory = "/tmp/layout-test-results";
+my $threaded = 0;
+my $tolerance = 0;
+my $treatSkipped = "default";
+my $verbose = 0;
+my $useValgrind = 0;
+my $strictTesting = 0;
+my $generateNewResults = isAppleMacWebKit() ? 1 : 0;
+my $stripEditingCallbacks = isCygwin();
+my $runSample = 1;
+my $root;
+my $reverseTests = 0;
+my $randomizeTests = 0;
+my $mergeDepth;
+my @leaksFilenames;
+
+# Default to --no-http for Qt, Gtk and wx for now.
+$testHTTP = 0 if (isQt() || isGtk() || isWx());
+
+my $expectedTag = "expected";
+my $actualTag = "actual";
+my $diffsTag = "diffs";
+my $errorTag = "stderr";
+
+my @macPlatforms = ("mac-tiger", "mac-leopard", "mac-snowleopard", "mac");
+
+if (isTiger()) {
+ $platform = "mac-tiger";
+ $tolerance = 1.0;
+} elsif (isLeopard()) {
+ $platform = "mac-leopard";
+ $tolerance = 0.1;
+} elsif (isSnowLeopard()) {
+ $platform = "mac-snowleopard";
+ $tolerance = 0.1;
+} elsif (isAppleMacWebKit()) {
+ $platform = "mac";
+} elsif (isQt()) {
+ $platform = "qt";
+} elsif (isGtk()) {
+ $platform = "gtk";
+} elsif (isCygwin()) {
+ $platform = "win";
+}
+
+if (!defined($platform)) {
+ print "WARNING: Your platform is not recognized. Any platform-specific results will be generated in platform/undefined.\n";
+ $platform = "undefined";
+}
+
+my $programName = basename($0);
+my $launchSafariDefault = $launchSafari ? "launch" : "do not launch";
+my $httpDefault = $testHTTP ? "run" : "do not run";
+my $sampleDefault = $runSample ? "run" : "do not run";
+
+# FIXME: "--strict" should be renamed to qt-mac-comparison, or something along those lines.
+my $usage = <<EOF;
+Usage: $programName [options] [testdir|testpath ...]
+ --add-platform-exceptions Put new results for non-platform-specific failing tests into the platform-specific results directory
+ --complex-text Use the complex text code path for all text (Mac OS X and Windows only)
+ -c|--configuration config Set DumpRenderTree build configuration
+ -g|--guard-malloc Enable malloc guard
+ --help Show this help message
+ --[no-]http Run (or do not run) http tests (default: $httpDefault)
+ -i|--ignore-tests Comma-separated list of directories or tests to ignore
+ --[no-]launch-safari Launch (or do not launch) Safari to display test results (default: $launchSafariDefault)
+ -l|--leaks Enable leaks checking
+ --[no-]new-test-results Generate results for new tests
+ -p|--pixel-tests Enable pixel tests
+ --tolerance t Ignore image differences less than this percentage (default: $tolerance)
+ --platform Override the detected platform to use for tests and results (default: $platform)
+ --port Web server port to use with http tests
+ -q|--quiet Less verbose output
+ --reset-results Reset ALL results (including pixel tests if --pixel-tests is set)
+ -o|--results-directory Output results directory (default: $testResultsDirectory)
+ --random Run the tests in a random order
+ --reverse Run the tests in reverse alphabetical order
+ --root Path to root tools build
+ --[no-]sample-on-timeout Run sample on timeout (default: $sampleDefault) (Mac OS X only)
+ -1|--singly Isolate each test case run (implies --verbose)
+ --skipped=[default|ignore|only] Specifies how to treat the Skipped file
+ default: Tests/directories listed in the Skipped file are not tested
+ ignore: The Skipped file is ignored
+ only: Only those tests/directories listed in the Skipped file will be run
+ --slowest Report the 10 slowest tests
+ --strict Do a comparison with the output on Mac (Qt only)
+ --[no-]strip-editing-callbacks Remove editing callbacks from expected results
+ -t|--threaded Run a concurrent JavaScript thead with each test
+ --valgrind Run DumpRenderTree inside valgrind (Qt/Linux only)
+ -v|--verbose More verbose output (overrides --quiet)
+ -m|--merge-leak-depth arg Merges leak callStacks and prints the number of unique leaks beneath a callstack depth of arg. Defaults to 5.
+EOF
+
+setConfiguration();
+
+my $getOptionsResult = GetOptions(
+ 'complex-text' => \$complexText,
+ 'guard-malloc|g' => \$guardMalloc,
+ 'help' => \$showHelp,
+ 'http!' => \$testHTTP,
+ 'ignore-tests|i=s' => \$ignoreTests,
+ 'launch-safari!' => \$launchSafari,
+ 'leaks|l' => \$shouldCheckLeaks,
+ 'pixel-tests|p' => \$pixelTests,
+ 'platform=s' => \$platform,
+ 'port=i' => \$httpdPort,
+ 'quiet|q' => \$quiet,
+ 'reset-results' => \$resetResults,
+ 'new-test-results!' => \$generateNewResults,
+ 'results-directory|o=s' => \$testResultsDirectory,
+ 'singly|1' => sub { $testsPerDumpTool = 1; },
+ 'nthly=i' => \$testsPerDumpTool,
+ 'skipped=s' => \&validateSkippedArg,
+ 'slowest' => \$report10Slowest,
+ 'threaded|t' => \$threaded,
+ 'tolerance=f' => \$tolerance,
+ 'verbose|v' => \$verbose,
+ 'valgrind' => \$useValgrind,
+ 'sample-on-timeout!' => \$runSample,
+ 'strict' => \$strictTesting,
+ 'strip-editing-callbacks!' => \$stripEditingCallbacks,
+ 'random' => \$randomizeTests,
+ 'reverse' => \$reverseTests,
+ 'root=s' => \$root,
+ 'add-platform-exceptions' => \$addPlatformExceptions,
+ 'merge-leak-depth|m:5' => \$mergeDepth,
+);
+
+if (!$getOptionsResult || $showHelp) {
+ print STDERR $usage;
+ exit 1;
+}
+
+my $ignoreSkipped = $treatSkipped eq "ignore";
+my $skippedOnly = $treatSkipped eq "only";
+
+!$skippedOnly || @ARGV == 0 or die "--skipped=only cannot be used when tests are specified on the command line.";
+
+my $configuration = configuration();
+
+$testsPerDumpTool = 1000 if !$testsPerDumpTool;
+
+$verbose = 1 if $testsPerDumpTool == 1;
+
+if ($shouldCheckLeaks && $testsPerDumpTool > 1000) {
+ print STDERR "\nWARNING: Running more than 1000 tests at a time with MallocStackLogging enabled may cause a crash.\n\n";
+}
+
+# Stack logging does not play well with QuickTime on Tiger (rdar://problem/5537157)
+$testMedia = 0 if $shouldCheckLeaks && isTiger();
+
+setConfigurationProductDir(Cwd::abs_path($root)) if (defined($root));
+my $productDir = productDir();
+$productDir .= "/bin" if isQt();
+$productDir .= "/Programs" if isGtk();
+
+chdirWebKit();
+
+if (!defined($root)) {
+ # Push the parameters to build-dumprendertree as an array
+ my @args = argumentsForConfiguration();
+
+ my $buildResult = system "WebKitTools/Scripts/build-dumprendertree", @args;
+ if ($buildResult) {
+ print STDERR "Compiling DumpRenderTree failed!\n";
+ exit exitStatus($buildResult);
+ }
+}
+
+my $dumpToolName = "DumpRenderTree";
+$dumpToolName .= "_debug" if isCygwin() && $configuration ne "Release";
+my $dumpTool = "$productDir/$dumpToolName";
+die "can't find executable $dumpToolName (looked in $productDir)\n" unless -x $dumpTool;
+
+my $imageDiffTool = "$productDir/ImageDiff";
+$imageDiffTool .= "_debug" if isCygwin() && $configuration ne "Release";
+die "can't find executable $imageDiffTool (looked in $productDir)\n" if $pixelTests && !-x $imageDiffTool;
+
+checkFrameworks() unless isCygwin();
+
+my $layoutTestsName = "LayoutTests";
+my $testDirectory = File::Spec->rel2abs($layoutTestsName);
+my $expectedDirectory = $testDirectory;
+my $platformBaseDirectory = catdir($testDirectory, "platform");
+my $platformTestDirectory = catdir($platformBaseDirectory, $platform);
+my @platformResultHierarchy = buildPlatformResultHierarchy();
+my @platformTestHierarchy = buildPlatformTestHierarchy(@platformResultHierarchy);
+
+$expectedDirectory = $ENV{"WebKitExpectedTestResultsDirectory"} if $ENV{"WebKitExpectedTestResultsDirectory"};
+
+my $testResults = catfile($testResultsDirectory, "results.html");
+
+print "Running tests from $testDirectory\n";
+if ($pixelTests) {
+ print "Enabling pixel tests with a tolerance of $tolerance%\n";
+ if (isDarwin()) {
+ print "WARNING: Temporarily changing the main display color profile:\n";
+ print "\tThe colors on your screen will change for the duration of the testing.\n";
+ print "\tThis allows the pixel tests to have consistent color values across all machines.\n";
+
+ if (isPerianInstalled()) {
+ print "WARNING: Perian's QuickTime component is installed and this may affect pixel test results!\n";
+ print "\tYou should avoid generating new pixel results in this environment.\n";
+ print "\tSee https://bugs.webkit.org/show_bug.cgi?id=22615 for details.\n";
+ }
+ }
+}
+
+my @tests = ();
+my %testType = ();
+
+system "ln", "-s", $testDirectory, "/tmp/LayoutTests" unless -x "/tmp/LayoutTests";
+
+my %ignoredFiles = ();
+my %ignoredDirectories = map { $_ => 1 } qw(platform);
+my %ignoredLocalDirectories = map { $_ => 1 } qw(.svn _svn resources);
+my %supportedFileExtensions = map { $_ => 1 } qw(html shtml xml xhtml pl php);
+
+# FIXME: We should fix webkitdirs.pm:hasSVG/WMLSupport() to do the correct feature detection for Cygwin.
+if (checkWebCoreSVGSupport(0)) {
+ $supportedFileExtensions{'svg'} = 1;
+} elsif (isCygwin()) {
+ $supportedFileExtensions{'svg'} = 1;
+} else {
+ $ignoredLocalDirectories{'svg'} = 1;
+}
+
+if (checkWebCoreWMLSupport(0)) {
+ $supportedFileExtensions{'wml'} = 1;
+} else {
+ $ignoredDirectories{'http/tests/wml'} = 1;
+ $ignoredDirectories{'fast/wml'} = 1;
+ $ignoredDirectories{'wml'} = 1;
+}
+
+if (!$testHTTP) {
+ $ignoredDirectories{'http'} = 1;
+}
+
+if (!$testMedia) {
+ $ignoredDirectories{'media'} = 1;
+ $ignoredDirectories{'http/tests/media'} = 1;
+}
+
+if (!checkWebCoreAcceleratedCompositingSupport(0)) {
+ $ignoredDirectories{'compositing'} = 1;
+}
+
+if (!checkWebCore3DRenderingSupport(0)) {
+ $ignoredDirectories{'animations/3d'} = 1;
+ $ignoredDirectories{'transforms/3d'} = 1;
+}
+
+if ($ignoreTests) {
+ processIgnoreTests($ignoreTests, "ignore-tests");
+}
+
+if (!$ignoreSkipped) {
+ foreach my $level (@platformTestHierarchy) {
+ if (open SKIPPED, "<", "$level/Skipped") {
+ if ($verbose && !$skippedOnly) {
+ my ($dir, $name) = splitpath($level);
+ print "Skipped tests in $name:\n";
+ }
+
+ while (<SKIPPED>) {
+ my $skipped = $_;
+ chomp $skipped;
+ $skipped =~ s/^[ \n\r]+//;
+ $skipped =~ s/[ \n\r]+$//;
+ if ($skipped && $skipped !~ /^#/) {
+ if ($skippedOnly) {
+ push(@ARGV, $skipped);
+ } else {
+ if ($verbose) {
+ print " $skipped\n";
+ }
+ processIgnoreTests($skipped, "Skipped");
+ }
+ }
+ }
+ close SKIPPED;
+ }
+ }
+}
+
+
+my $directoryFilter = sub {
+ return () if exists $ignoredLocalDirectories{basename($File::Find::dir)};
+ return () if exists $ignoredDirectories{File::Spec->abs2rel($File::Find::dir, $testDirectory)};
+ return @_;
+};
+
+my $fileFilter = sub {
+ my $filename = $_;
+ if ($filename =~ /\.([^.]+)$/) {
+ if (exists $supportedFileExtensions{$1}) {
+ my $path = File::Spec->abs2rel(catfile($File::Find::dir, $filename), $testDirectory);
+ push @tests, $path if !exists $ignoredFiles{$path};
+ }
+ }
+};
+
+for my $test (@ARGV) {
+ $test =~ s/^($layoutTestsName|$testDirectory)\///;
+ my $fullPath = catfile($testDirectory, $test);
+ if (file_name_is_absolute($test)) {
+ print "can't run test $test outside $testDirectory\n";
+ } elsif (-f $fullPath) {
+ my ($filename, $pathname, $fileExtension) = fileparse($test, qr{\.[^.]+$});
+ if (!exists $supportedFileExtensions{substr($fileExtension, 1)}) {
+ print "test $test does not have a supported extension\n";
+ } elsif ($testHTTP || $pathname !~ /^http\//) {
+ push @tests, $test;
+ }
+ } elsif (-d $fullPath) {
+ find({ preprocess => $directoryFilter, wanted => $fileFilter }, $fullPath);
+
+ for my $level (@platformTestHierarchy) {
+ my $platformPath = catfile($level, $test);
+ find({ preprocess => $directoryFilter, wanted => $fileFilter }, $platformPath) if (-d $platformPath);
+ }
+ } else {
+ print "test $test not found\n";
+ }
+}
+if (!scalar @ARGV) {
+ find({ preprocess => $directoryFilter, wanted => $fileFilter }, $testDirectory);
+
+ for my $level (@platformTestHierarchy) {
+ find({ preprocess => $directoryFilter, wanted => $fileFilter }, $level);
+ }
+}
+
+die "no tests to run\n" if !@tests;
+
+@tests = sort pathcmp @tests;
+
+my %counts;
+my %tests;
+my %imagesPresent;
+my %imageDifferences;
+my %durations;
+my $count = 0;
+my $leaksOutputFileNumber = 1;
+my $totalLeaks = 0;
+
+my @toolArgs = ();
+push @toolArgs, "--pixel-tests" if $pixelTests;
+push @toolArgs, "--threaded" if $threaded;
+push @toolArgs, "--complex-text" if $complexText;
+push @toolArgs, "-";
+
+my @diffToolArgs = ();
+push @diffToolArgs, "--tolerance", $tolerance;
+
+$| = 1;
+
+my $imageDiffToolPID;
+if ($pixelTests) {
+ local %ENV;
+ $ENV{MallocStackLogging} = 1 if $shouldCheckLeaks;
+ $imageDiffToolPID = open2(\*DIFFIN, \*DIFFOUT, $imageDiffTool, @diffToolArgs) or die "unable to open $imageDiffTool\n";
+ $ENV{MallocStackLogging} = 0 if $shouldCheckLeaks;
+}
+
+my $dumpToolPID;
+my $isDumpToolOpen = 0;
+my $dumpToolCrashed = 0;
+
+my $atLineStart = 1;
+my $lastDirectory = "";
+
+my $isHttpdOpen = 0;
+
+sub catch_pipe { $dumpToolCrashed = 1; }
+$SIG{"PIPE"} = "catch_pipe";
+
+print "Testing ", scalar @tests, " test cases.\n";
+my $overallStartTime = time;
+
+my %expectedResultPaths;
+
+# Reverse the tests
+@tests = reverse @tests if $reverseTests;
+
+# Shuffle the array
+@tests = shuffle(@tests) if $randomizeTests;
+
+for my $test (@tests) {
+ next if $test eq 'results.html';
+
+ my $newDumpTool = not $isDumpToolOpen;
+ openDumpTool();
+
+ my $base = stripExtension($test);
+ my $expectedExtension = ".txt";
+
+ my $dir = $base;
+ $dir =~ s|/[^/]+$||;
+
+ if ($newDumpTool || $dir ne $lastDirectory) {
+ foreach my $logue (epiloguesAndPrologues($newDumpTool ? "" : $lastDirectory, $dir)) {
+ if (isCygwin()) {
+ $logue = toWindowsPath($logue);
+ } else {
+ $logue = canonpath($logue);
+ }
+ if ($verbose) {
+ print "running epilogue or prologue $logue\n";
+ }
+ print OUT "$logue\n";
+ # Throw away output from DumpRenderTree.
+ # Once for the test output and once for pixel results (empty)
+ while (<IN>) {
+ last if /#EOF/;
+ }
+ while (<IN>) {
+ last if /#EOF/;
+ }
+ }
+ }
+
+ if ($verbose) {
+ print "running $test -> ";
+ $atLineStart = 0;
+ } elsif (!$quiet) {
+ if ($dir ne $lastDirectory) {
+ print "\n" unless $atLineStart;
+ print "$dir ";
+ }
+ print ".";
+ $atLineStart = 0;
+ }
+
+ $lastDirectory = $dir;
+
+ my $result;
+
+ my $startTime = time if $report10Slowest;
+
+ # Try to read expected hash file for pixel tests
+ my $suffixExpectedHash = "";
+ if ($pixelTests && !$resetResults) {
+ my $expectedPixelDir = expectedDirectoryForTest($base, 0, "png");
+ if (open EXPECTEDHASH, "$expectedPixelDir/$base-$expectedTag.checksum") {
+ my $expectedHash = <EXPECTEDHASH>;
+ chomp($expectedHash);
+ close EXPECTEDHASH;
+
+ # Format expected hash into a suffix string that is appended to the path / URL passed to DRT
+ $suffixExpectedHash = "'$expectedHash";
+ }
+ }
+
+ if ($test !~ /^http\//) {
+ my $testPath = "$testDirectory/$test";
+ if (isCygwin()) {
+ $testPath = toWindowsPath($testPath);
+ } else {
+ $testPath = canonpath($testPath);
+ }
+ print OUT "$testPath$suffixExpectedHash\n";
+ } else {
+ openHTTPDIfNeeded();
+ if ($test !~ /^http\/tests\/local\// && $test !~ /^http\/tests\/ssl\// && $test !~ /^http\/tests\/wml\// && $test !~ /^http\/tests\/media\//) {
+ my $path = canonpath($test);
+ $path =~ s/^http\/tests\///;
+ print OUT "http://127.0.0.1:$httpdPort/$path$suffixExpectedHash\n";
+ } elsif ($test =~ /^http\/tests\/ssl\//) {
+ my $path = canonpath($test);
+ $path =~ s/^http\/tests\///;
+ print OUT "https://127.0.0.1:$httpdSSLPort/$path$suffixExpectedHash\n";
+ } else {
+ my $testPath = "$testDirectory/$test";
+ if (isCygwin()) {
+ $testPath = toWindowsPath($testPath);
+ } else {
+ $testPath = canonpath($testPath);
+ }
+ print OUT "$testPath$suffixExpectedHash\n";
+ }
+ }
+
+ # DumpRenderTree is expected to dump two "blocks" to stdout for each test.
+ # Each block is terminated by a #EOF on a line by itself.
+ # The first block is the output of the test (in text, RenderTree or other formats).
+ # The second block is for optional pixel data in PNG format, and may be empty if
+ # pixel tests are not being run, or the test does not dump pixels (e.g. text tests).
+
+ my $actualRead = readFromDumpToolWithTimer(IN);
+ my $errorRead = readFromDumpToolWithTimer(ERROR, $actualRead->{status} eq "timedOut");
+
+ my $actual = $actualRead->{output};
+ my $error = $errorRead->{output};
+
+ $expectedExtension = $actualRead->{extension};
+ my $expectedFileName = "$base-$expectedTag.$expectedExtension";
+
+ my $isText = isTextOnlyTest($actual);
+
+ my $expectedDir = expectedDirectoryForTest($base, $isText, $expectedExtension);
+ $expectedResultPaths{$base} = "$expectedDir/$expectedFileName";
+
+ unless ($actualRead->{status} eq "success" && $errorRead->{status} eq "success") {
+ my $crashed = $actualRead->{status} eq "crashed" || $errorRead->{status} eq "crashed";
+ testCrashedOrTimedOut($test, $base, $crashed, $actual, $error);
+ countFinishedTest($test, $base, $crashed ? "crash" : "timedout", 0);
+ next;
+ }
+
+ $durations{$test} = time - $startTime if $report10Slowest;
+
+ my $expected;
+
+ if (!$resetResults && open EXPECTED, "<", "$expectedDir/$expectedFileName") {
+ $expected = "";
+ while (<EXPECTED>) {
+ next if $stripEditingCallbacks && $_ =~ /^EDITING DELEGATE:/;
+ $expected .= $_;
+ }
+ close EXPECTED;
+ }
+ my $expectedMac;
+ if (!isAppleMacWebKit() && $strictTesting && !$isText) {
+ if (!$resetResults && open EXPECTED, "<", "$testDirectory/platform/mac/$expectedFileName") {
+ $expectedMac = "";
+ while (<EXPECTED>) {
+ $expectedMac .= $_;
+ }
+ close EXPECTED;
+ }
+ }
+
+ if ($shouldCheckLeaks && $testsPerDumpTool == 1) {
+ print " $test -> ";
+ }
+
+ my $actualPNG = "";
+ my $diffPNG = "";
+ my $diffPercentage = "";
+ my $diffResult = "passed";
+
+ my $actualHash = "";
+ my $expectedHash = "";
+ my $actualPNGSize = 0;
+
+ while (<IN>) {
+ last if /#EOF/;
+ if (/ActualHash: ([a-f0-9]{32})/) {
+ $actualHash = $1;
+ } elsif (/ExpectedHash: ([a-f0-9]{32})/) {
+ $expectedHash = $1;
+ } elsif (/Content-Length: (\d+)\s*/) {
+ $actualPNGSize = $1;
+ read(IN, $actualPNG, $actualPNGSize);
+ }
+ }
+
+ if ($verbose && $pixelTests && !$resetResults && $actualPNGSize) {
+ if ($actualHash eq "" && $expectedHash eq "") {
+ printFailureMessageForTest($test, "WARNING: actual & expected pixel hashes are missing!");
+ } elsif ($actualHash eq "") {
+ printFailureMessageForTest($test, "WARNING: actual pixel hash is missing!");
+ } elsif ($expectedHash eq "") {
+ printFailureMessageForTest($test, "WARNING: expected pixel hash is missing!");
+ }
+ }
+
+ if ($actualPNGSize > 0) {
+ my $expectedPixelDir = expectedDirectoryForTest($base, 0, "png");
+
+ if (!$resetResults && ($expectedHash ne $actualHash || ($actualHash eq "" && $expectedHash eq ""))) {
+ if (-f "$expectedPixelDir/$base-$expectedTag.png") {
+ my $expectedPNGSize = -s "$expectedPixelDir/$base-$expectedTag.png";
+ my $expectedPNG = "";
+ open EXPECTEDPNG, "$expectedPixelDir/$base-$expectedTag.png";
+ read(EXPECTEDPNG, $expectedPNG, $expectedPNGSize);
+
+ print DIFFOUT "Content-Length: $actualPNGSize\n";
+ print DIFFOUT $actualPNG;
+
+ print DIFFOUT "Content-Length: $expectedPNGSize\n";
+ print DIFFOUT $expectedPNG;
+
+ while (<DIFFIN>) {
+ last if /^error/ || /^diff:/;
+ if (/Content-Length: (\d+)\s*/) {
+ read(DIFFIN, $diffPNG, $1);
+ }
+ }
+
+ if (/^diff: (.+)% (passed|failed)/) {
+ $diffPercentage = $1;
+ $imageDifferences{$base} = $diffPercentage;
+ $diffResult = $2;
+ }
+
+ if ($diffPercentage == 0) {
+ printFailureMessageForTest($test, "pixel hash failed (but pixel test still passes)");
+ }
+ } elsif ($verbose) {
+ printFailureMessageForTest($test, "WARNING: expected image is missing!");
+ }
+ }
+
+ if ($resetResults || !-f "$expectedPixelDir/$base-$expectedTag.png") {
+ mkpath catfile($expectedPixelDir, dirname($base)) if $testDirectory ne $expectedPixelDir;
+ writeToFile("$expectedPixelDir/$base-$expectedTag.png", $actualPNG);
+ }
+
+ if ($actualHash ne "" && ($resetResults || !-f "$expectedPixelDir/$base-$expectedTag.checksum")) {
+ writeToFile("$expectedPixelDir/$base-$expectedTag.checksum", $actualHash);
+ }
+ }
+
+ if (!isAppleMacWebKit() && $strictTesting && !$isText) {
+ if (defined $expectedMac) {
+ my $simplified_actual;
+ $simplified_actual = $actual;
+ $simplified_actual =~ s/at \(-?[0-9]+,-?[0-9]+\) *//g;
+ $simplified_actual =~ s/size -?[0-9]+x-?[0-9]+ *//g;
+ $simplified_actual =~ s/text run width -?[0-9]+: //g;
+ $simplified_actual =~ s/text run width -?[0-9]+ [a-zA-Z ]+: //g;
+ $simplified_actual =~ s/RenderButton {BUTTON} .*/RenderButton {BUTTON}/g;
+ $simplified_actual =~ s/RenderImage {INPUT} .*/RenderImage {INPUT}/g;
+ $simplified_actual =~ s/RenderBlock {INPUT} .*/RenderBlock {INPUT}/g;
+ $simplified_actual =~ s/RenderTextControl {INPUT} .*/RenderTextControl {INPUT}/g;
+ $simplified_actual =~ s/\([0-9]+px/px/g;
+ $simplified_actual =~ s/ *" *\n +" */ /g;
+ $simplified_actual =~ s/" +$/"/g;
+
+ $simplified_actual =~ s/- /-/g;
+ $simplified_actual =~ s/\n( *)"\s+/\n$1"/g;
+ $simplified_actual =~ s/\s+"\n/"\n/g;
+
+ $expectedMac =~ s/at \(-?[0-9]+,-?[0-9]+\) *//g;
+ $expectedMac =~ s/size -?[0-9]+x-?[0-9]+ *//g;
+ $expectedMac =~ s/text run width -?[0-9]+: //g;
+ $expectedMac =~ s/text run width -?[0-9]+ [a-zA-Z ]+: //g;
+ $expectedMac =~ s/RenderButton {BUTTON} .*/RenderButton {BUTTON}/g;
+ $expectedMac =~ s/RenderImage {INPUT} .*/RenderImage {INPUT}/g;
+ $expectedMac =~ s/RenderBlock {INPUT} .*/RenderBlock {INPUT}/g;
+ $expectedMac =~ s/RenderTextControl {INPUT} .*/RenderTextControl {INPUT}/g;
+ $expectedMac =~ s/\([0-9]+px/px/g;
+ $expectedMac =~ s/ *" *\n +" */ /g;
+ $expectedMac =~ s/" +$/"/g;
+
+ $expectedMac =~ s/- /-/g;
+ $expectedMac =~ s/\n( *)"\s+/\n$1"/g;
+ $expectedMac =~ s/\s+"\n/"\n/g;
+
+ if ($simplified_actual ne $expectedMac) {
+ writeToFile("/tmp/actual.txt", $simplified_actual);
+ writeToFile("/tmp/expected.txt", $expectedMac);
+ system "diff -u \"/tmp/expected.txt\" \"/tmp/actual.txt\" > \"/tmp/simplified.diff\"";
+
+ $diffResult = "failed";
+ if ($verbose) {
+ print "\n";
+ system "cat /tmp/simplified.diff";
+ print "failed!!!!!";
+ }
+ }
+ }
+ }
+
+ if (dumpToolDidCrash()) {
+ $result = "crash";
+ testCrashedOrTimedOut($test, $base, 1, $actual, $error);
+ } elsif (!defined $expected) {
+ if ($verbose) {
+ print "new " . ($resetResults ? "result" : "test") ."\n";
+ $atLineStart = 1;
+ }
+ $result = "new";
+
+ if ($generateNewResults || $resetResults) {
+ mkpath catfile($expectedDir, dirname($base)) if $testDirectory ne $expectedDir;
+ writeToFile("$expectedDir/$expectedFileName", $actual);
+ }
+ deleteExpectedAndActualResults($base);
+ if ($generateNewResults && !$resetResults) {
+ # Always print the file name for new tests, as they will probably need some manual inspection.
+ # in verbose mode we already printed the test case, so no need to do it again.
+ unless ($verbose) {
+ print "\n" unless $atLineStart;
+ print "$test -> ";
+ }
+ my $resultsDir = catdir($expectedDir, dirname($base));
+ print "new (results generated in $resultsDir)\n";
+ $atLineStart = 1;
+ }
+ } elsif ($actual eq $expected && $diffResult eq "passed") {
+ if ($verbose) {
+ print "succeeded\n";
+ $atLineStart = 1;
+ }
+ $result = "match";
+ deleteExpectedAndActualResults($base);
+ } else {
+ $result = "mismatch";
+
+ my $message = $actual eq $expected ? "pixel test failed" : "failed";
+
+ if ($actual ne $expected && $addPlatformExceptions) {
+ my $testBase = catfile($testDirectory, $base);
+ my $expectedBase = catfile($expectedDir, $base);
+ my $testIsMaximallyPlatformSpecific = $testBase =~ m|^\Q$platformTestDirectory\E/|;
+ my $expectedResultIsMaximallyPlatformSpecific = $expectedBase =~ m|^\Q$platformTestDirectory\E/|;
+ if (!$testIsMaximallyPlatformSpecific && !$expectedResultIsMaximallyPlatformSpecific) {
+ mkpath catfile($platformTestDirectory, dirname($base));
+ my $expectedFile = catfile($platformTestDirectory, "$expectedFileName");
+ writeToFile("$expectedFile", $actual);
+ $message .= " (results generated in $platformTestDirectory)";
+ }
+ }
+
+ printFailureMessageForTest($test, $message);
+
+ my $dir = "$testResultsDirectory/$base";
+ $dir =~ s|/([^/]+)$|| or die "Failed to find test name from base\n";
+ my $testName = $1;
+ mkpath $dir;
+
+ deleteExpectedAndActualResults($base);
+ recordActualResultsAndDiff($base, $actual);
+
+ if ($pixelTests && $diffPNG && $diffPNG ne "") {
+ $imagesPresent{$base} = 1;
+
+ writeToFile("$testResultsDirectory/$base-$actualTag.png", $actualPNG);
+ writeToFile("$testResultsDirectory/$base-$diffsTag.png", $diffPNG);
+
+ my $expectedPixelDir = expectedDirectoryForTest($base, 0, "png");
+ copy("$expectedPixelDir/$base-$expectedTag.png", "$testResultsDirectory/$base-$expectedTag.png");
+
+ open DIFFHTML, ">$testResultsDirectory/$base-$diffsTag.html" or die;
+ print DIFFHTML "<html>\n";
+ print DIFFHTML "<head>\n";
+ print DIFFHTML "<title>$base Image Compare</title>\n";
+ print DIFFHTML "<script language=\"Javascript\" type=\"text/javascript\">\n";
+ print DIFFHTML "var currentImage = 0;\n";
+ print DIFFHTML "var imageNames = new Array(\"Actual\", \"Expected\");\n";
+ print DIFFHTML "var imagePaths = new Array(\"$testName-$actualTag.png\", \"$testName-$expectedTag.png\");\n";
+ if (-f "$testDirectory/$base-w3c.png") {
+ copy("$testDirectory/$base-w3c.png", "$testResultsDirectory/$base-w3c.png");
+ print DIFFHTML "imageNames.push(\"W3C\");\n";
+ print DIFFHTML "imagePaths.push(\"$testName-w3c.png\");\n";
+ }
+ print DIFFHTML "function animateImage() {\n";
+ print DIFFHTML " var image = document.getElementById(\"animatedImage\");\n";
+ print DIFFHTML " var imageText = document.getElementById(\"imageText\");\n";
+ print DIFFHTML " image.src = imagePaths[currentImage];\n";
+ print DIFFHTML " imageText.innerHTML = imageNames[currentImage] + \" Image\";\n";
+ print DIFFHTML " currentImage = (currentImage + 1) % imageNames.length;\n";
+ print DIFFHTML " setTimeout('animateImage()',2000);\n";
+ print DIFFHTML "}\n";
+ print DIFFHTML "</script>\n";
+ print DIFFHTML "</head>\n";
+ print DIFFHTML "<body onLoad=\"animateImage();\">\n";
+ print DIFFHTML "<table>\n";
+ if ($diffPercentage) {
+ print DIFFHTML "<tr>\n";
+ print DIFFHTML "<td>Difference between images: <a href=\"$testName-$diffsTag.png\">$diffPercentage%</a></td>\n";
+ print DIFFHTML "</tr>\n";
+ }
+ print DIFFHTML "<tr>\n";
+ print DIFFHTML "<td><a href=\"" . toURL("$testDirectory/$test") . "\">test file</a></td>\n";
+ print DIFFHTML "</tr>\n";
+ print DIFFHTML "<tr>\n";
+ print DIFFHTML "<td id=\"imageText\" style=\"text-weight: bold;\">Actual Image</td>\n";
+ print DIFFHTML "</tr>\n";
+ print DIFFHTML "<tr>\n";
+ print DIFFHTML "<td><img src=\"$testName-$actualTag.png\" id=\"animatedImage\"></td>\n";
+ print DIFFHTML "</tr>\n";
+ print DIFFHTML "</table>\n";
+ print DIFFHTML "</body>\n";
+ print DIFFHTML "</html>\n";
+ }
+ }
+
+ if ($error) {
+ my $dir = "$testResultsDirectory/$base";
+ $dir =~ s|/([^/]+)$|| or die "Failed to find test name from base\n";
+ mkpath $dir;
+
+ writeToFile("$testResultsDirectory/$base-$errorTag.txt", $error);
+
+ $counts{error}++;
+ push @{$tests{error}}, $test;
+ }
+
+ countFinishedTest($test, $base, $result, $isText);
+}
+printf "\n%0.2fs total testing time\n", (time - $overallStartTime) . "";
+
+!$isDumpToolOpen || die "Failed to close $dumpToolName.\n";
+
+closeHTTPD();
+
+# Because multiple instances of this script are running concurrently we cannot
+# safely delete this symlink.
+# system "rm /tmp/LayoutTests";
+
+# FIXME: Do we really want to check the image-comparison tool for leaks every time?
+if ($shouldCheckLeaks && $pixelTests) {
+ $totalLeaks += countAndPrintLeaks("ImageDiff", $imageDiffToolPID, "$testResultsDirectory/ImageDiff-leaks.txt");
+}
+
+if ($totalLeaks) {
+ if ($mergeDepth) {
+ parseLeaksandPrintUniqueLeaks();
+ }
+ else {
+ print "\nWARNING: $totalLeaks total leaks found!\n";
+ print "See above for individual leaks results.\n" if ($leaksOutputFileNumber > 2);
+ }
+}
+
+close IN;
+close OUT;
+close ERROR;
+
+if ($report10Slowest) {
+ print "\n\nThe 10 slowest tests:\n\n";
+ my $count = 0;
+ for my $test (sort slowestcmp keys %durations) {
+ printf "%0.2f secs: %s\n", $durations{$test}, $test;
+ last if ++$count == 10;
+ }
+}
+
+print "\n";
+
+if ($skippedOnly && $counts{"match"}) {
+ print "The following tests are in the Skipped file (" . File::Spec->abs2rel("$platformTestDirectory/Skipped", $testDirectory) . "), but succeeded:\n";
+ foreach my $test (@{$tests{"match"}}) {
+ print " $test\n";
+ }
+}
+
+if ($resetResults || ($counts{match} && $counts{match} == $count)) {
+ print "all $count test cases succeeded\n";
+ unlink $testResults;
+ exit;
+}
+
+
+my %text = (
+ match => "succeeded",
+ mismatch => "had incorrect layout",
+ new => "were new",
+ timedout => "timed out",
+ crash => "crashed",
+ error => "had stderr output"
+);
+
+for my $type ("match", "mismatch", "new", "timedout", "crash", "error") {
+ my $c = $counts{$type};
+ if ($c) {
+ my $t = $text{$type};
+ my $message;
+ if ($c == 1) {
+ $t =~ s/were/was/;
+ $message = sprintf "1 test case (%d%%) %s\n", 1 * 100 / $count, $t;
+ } else {
+ $message = sprintf "%d test cases (%d%%) %s\n", $c, $c * 100 / $count, $t;
+ }
+ $message =~ s-\(0%\)-(<1%)-;
+ print $message;
+ }
+}
+
+mkpath $testResultsDirectory;
+
+open HTML, ">", $testResults or die;
+print HTML "<html>\n";
+print HTML "<head>\n";
+print HTML "<title>Layout Test Results</title>\n";
+print HTML "</head>\n";
+print HTML "<body>\n";
+
+print HTML htmlForResultsSection(@{$tests{mismatch}}, "Tests where results did not match expected results", \&linksForMismatchTest);
+print HTML htmlForResultsSection(@{$tests{timedout}}, "Tests that timed out", \&linksForErrorTest);
+print HTML htmlForResultsSection(@{$tests{crash}}, "Tests that caused the DumpRenderTree tool to crash", \&linksForErrorTest);
+print HTML htmlForResultsSection(@{$tests{error}}, "Tests that had stderr output", \&linksForErrorTest);
+print HTML htmlForResultsSection(@{$tests{new}}, "Tests that had no expected results (probably new)", \&linksForNewTest);
+
+print HTML "</body>\n";
+print HTML "</html>\n";
+close HTML;
+
+my @configurationArgs = argumentsForConfiguration();
+
+if (isQt() || isGtk()) {
+ system "WebKitTools/Scripts/run-launcher", @configurationArgs, "file://".$testResults if $launchSafari;
+} elsif (isCygwin()) {
+ system "cygstart", $testResults if $launchSafari;
+} else {
+ system "WebKitTools/Scripts/run-safari", @configurationArgs, "-NSOpen", $testResults if $launchSafari;
+}
+
+closeCygpaths() if isCygwin();
+
+exit 1;
+
+sub countAndPrintLeaks($$$)
+{
+ my ($dumpToolName, $dumpToolPID, $leaksFilePath) = @_;
+
+ print "\n" unless $atLineStart;
+ $atLineStart = 1;
+
+ # We are excluding the following reported leaks so they don't get in our way when looking for WebKit leaks:
+ # This allows us ignore known leaks and only be alerted when new leaks occur. Some leaks are in the old
+ # versions of the system frameworks that are being used by the leaks bots. Even though a leak has been
+ # fixed, it will be listed here until the bot has been updated with the newer frameworks.
+
+ my @typesToExclude = (
+ );
+
+ my @callStacksToExclude = (
+ "Flash_EnforceLocalSecurity" # leaks in Flash plug-in code, rdar://problem/4449747
+ );
+
+ if (isTiger()) {
+ # Leak list for the version of Tiger used on the build bot.
+ push @callStacksToExclude, (
+ "CFRunLoopRunSpecific \\| malloc_zone_malloc", "CFRunLoopRunSpecific \\| CFAllocatorAllocate ", # leak in CFRunLoopRunSpecific, rdar://problem/4670839
+ "CGImageSourceGetPropertiesAtIndex", # leak in ImageIO, rdar://problem/4628809
+ "FOGetCoveredUnicodeChars", # leak in ATS, rdar://problem/3943604
+ "GetLineDirectionPreference", "InitUnicodeUtilities", # leaks tool falsely reporting leak in CFNotificationCenterAddObserver, rdar://problem/4964790
+ "ICCFPrefWrapper::GetPrefDictionary", # leaks in Internet Config. code, rdar://problem/4449794
+ "NSHTTPURLProtocol setResponseHeader:", # leak in multipart/mixed-replace handling in Foundation, no Radar, but fixed in Leopard
+ "NSURLCache cachedResponseForRequest", # leak in CFURL cache, rdar://problem/4768430
+ "PCFragPrepareClosureFromFile", # leak in Code Fragment Manager, rdar://problem/3426998
+ "WebCore::Selection::toRange", # bug in 'leaks', rdar://problem/4967949
+ "WebCore::SubresourceLoader::create", # bug in 'leaks', rdar://problem/4985806
+ "_CFPreferencesDomainDeepCopyDictionary", # leak in CFPreferences, rdar://problem/4220786
+ "_objc_msgForward", # leak in NSSpellChecker, rdar://problem/4965278
+ "gldGetString", # leak in OpenGL, rdar://problem/5013699
+ "_setDefaultUserInfoFromURL", # leak in NSHTTPAuthenticator, rdar://problem/5546453
+ "SSLHandshake", # leak in SSL, rdar://problem/5546440
+ "SecCertificateCreateFromData", # leak in SSL code, rdar://problem/4464397
+ );
+ push @typesToExclude, (
+ "THRD", # bug in 'leaks', rdar://problem/3387783
+ "DRHT", # ditto (endian little hate i)
+ );
+ }
+
+ if (isLeopard()) {
+ # Leak list for the version of Leopard used on the build bot.
+ push @callStacksToExclude, (
+ "CFHTTPMessageAppendBytes", # leak in CFNetwork, rdar://problem/5435912
+ "sendDidReceiveDataCallback", # leak in CFNetwork, rdar://problem/5441619
+ "_CFHTTPReadStreamReadMark", # leak in CFNetwork, rdar://problem/5441468
+ "httpProtocolStart", # leak in CFNetwork, rdar://problem/5468837
+ "_CFURLConnectionSendCallbacks", # leak in CFNetwork, rdar://problem/5441600
+ "DispatchQTMsg", # leak in QuickTime, PPC only, rdar://problem/5667132
+ "QTMovieContentView createVisualContext", # leak in QuickTime, PPC only, rdar://problem/5667132
+ "_CopyArchitecturesForJVMVersion", # leak in Java, rdar://problem/5910823
+ );
+ }
+
+ my $leaksTool = sourceDir() . "/WebKitTools/Scripts/run-leaks";
+ my $excludeString = "--exclude-callstack '" . (join "' --exclude-callstack '", @callStacksToExclude) . "'";
+ $excludeString .= " --exclude-type '" . (join "' --exclude-type '", @typesToExclude) . "'" if @typesToExclude;
+
+ print " ? checking for leaks in $dumpToolName\n";
+ my $leaksOutput = `$leaksTool $excludeString $dumpToolPID`;
+ my ($count, $bytes) = $leaksOutput =~ /Process $dumpToolPID: (\d+) leaks? for (\d+) total/;
+ my ($excluded) = $leaksOutput =~ /(\d+) leaks? excluded/;
+
+ my $adjustedCount = $count;
+ $adjustedCount -= $excluded if $excluded;
+
+ if (!$adjustedCount) {
+ print " - no leaks found\n";
+ unlink $leaksFilePath;
+ return 0;
+ } else {
+ my $dir = $leaksFilePath;
+ $dir =~ s|/[^/]+$|| or die;
+ mkpath $dir;
+
+ if ($excluded) {
+ print " + $adjustedCount leaks ($bytes bytes including $excluded excluded leaks) were found, details in $leaksFilePath\n";
+ } else {
+ print " + $count leaks ($bytes bytes) were found, details in $leaksFilePath\n";
+ }
+
+ writeToFile($leaksFilePath, $leaksOutput);
+
+ push( @leaksFilenames, $leaksFilePath );
+ }
+
+ return $adjustedCount;
+}
+
+sub writeToFile($$)
+{
+ my ($filePath, $contents) = @_;
+ open NEWFILE, ">", "$filePath" or die "could not create $filePath\n";
+ print NEWFILE $contents;
+ close NEWFILE;
+}
+
+# Break up a path into the directory (with slash) and base name.
+sub splitpath($)
+{
+ my ($path) = @_;
+
+ my $pathSeparator = "/";
+ my $dirname = dirname($path) . $pathSeparator;
+ $dirname = "" if $dirname eq "." . $pathSeparator;
+
+ return ($dirname, basename($path));
+}
+
+# Sort first by directory, then by file, so all paths in one directory are grouped
+# rather than being interspersed with items from subdirectories.
+# Use numericcmp to sort directory and filenames to make order logical.
+sub pathcmp($$)
+{
+ my ($patha, $pathb) = @_;
+
+ my ($dira, $namea) = splitpath($patha);
+ my ($dirb, $nameb) = splitpath($pathb);
+
+ return numericcmp($dira, $dirb) if $dira ne $dirb;
+ return numericcmp($namea, $nameb);
+}
+
+# Sort numeric parts of strings as numbers, other parts as strings.
+# Makes 1.33 come after 1.3, which is cool.
+sub numericcmp($$)
+{
+ my ($aa, $bb) = @_;
+
+ my @a = split /(\d+)/, $aa;
+ my @b = split /(\d+)/, $bb;
+
+ # Compare one chunk at a time.
+ # Each chunk is either all numeric digits, or all not numeric digits.
+ while (@a && @b) {
+ my $a = shift @a;
+ my $b = shift @b;
+
+ # Use numeric comparison if chunks are non-equal numbers.
+ return $a <=> $b if $a =~ /^\d/ && $b =~ /^\d/ && $a != $b;
+
+ # Use string comparison if chunks are any other kind of non-equal string.
+ return $a cmp $b if $a ne $b;
+ }
+
+ # One of the two is now empty; compare lengths for result in this case.
+ return @a <=> @b;
+}
+
+# Sort slowest tests first.
+sub slowestcmp($$)
+{
+ my ($testa, $testb) = @_;
+
+ my $dura = $durations{$testa};
+ my $durb = $durations{$testb};
+ return $durb <=> $dura if $dura != $durb;
+ return pathcmp($testa, $testb);
+}
+
+sub openDumpTool()
+{
+ return if $isDumpToolOpen;
+
+ # Save some requires variables for the linux environment...
+ my $homeDir = $ENV{'HOME'};
+ my $libraryPath = $ENV{'LD_LIBRARY_PATH'};
+ my $dyldLibraryPath = $ENV{'DYLD_LIBRARY_PATH'};
+ my $dbusAddress = $ENV{'DBUS_SESSION_BUS_ADDRESS'};
+ my $display = $ENV{'DISPLAY'};
+ my $testfonts = $ENV{'WEBKIT_TESTFONTS'};
+
+ my $homeDrive = $ENV{'HOMEDRIVE'};
+ my $homePath = $ENV{'HOMEPATH'};
+
+ local %ENV;
+ if (isQt() || isGtk()) {
+ if (defined $display) {
+ $ENV{DISPLAY} = $display;
+ } else {
+ $ENV{DISPLAY} = ":1";
+ }
+ $ENV{'WEBKIT_TESTFONTS'} = $testfonts if defined($testfonts);
+ $ENV{HOME} = $homeDir;
+ if (defined $libraryPath) {
+ $ENV{LD_LIBRARY_PATH} = $libraryPath;
+ }
+ if (defined $dyldLibraryPath) {
+ $ENV{DYLD_LIBRARY_PATH} = $dyldLibraryPath;
+ }
+ if (defined $dbusAddress) {
+ $ENV{DBUS_SESSION_BUS_ADDRESS} = $dbusAddress;
+ }
+ }
+ $ENV{DYLD_FRAMEWORK_PATH} = $productDir;
+ $ENV{XML_CATALOG_FILES} = ""; # work around missing /etc/catalog <rdar://problem/4292995>
+ $ENV{DYLD_INSERT_LIBRARIES} = "/usr/lib/libgmalloc.dylib" if $guardMalloc;
+
+ if (isCygwin()) {
+ $ENV{HOMEDRIVE} = $homeDrive;
+ $ENV{HOMEPATH} = $homePath;
+ if ($testfonts) {
+ $ENV{WEBKIT_TESTFONTS} = $testfonts;
+ }
+ setPathForRunningWebKitApp(\%ENV) if isCygwin();
+ }
+
+ my @args = ($dumpTool, @toolArgs);
+
+ if ($useValgrind) {
+ unshift @args, "valgrind";
+ }
+
+ $ENV{MallocStackLogging} = 1 if $shouldCheckLeaks;
+ $dumpToolPID = open3(\*OUT, \*IN, \*ERROR, @args) or die "Failed to start tool: $dumpTool\n";
+ $ENV{MallocStackLogging} = 0 if $shouldCheckLeaks;
+ $isDumpToolOpen = 1;
+ $dumpToolCrashed = 0;
+}
+
+sub closeDumpTool()
+{
+ return if !$isDumpToolOpen;
+
+ close IN;
+ close OUT;
+ waitpid $dumpToolPID, 0;
+
+ # check for WebCore counter leaks.
+ if ($shouldCheckLeaks) {
+ while (<ERROR>) {
+ print;
+ }
+ }
+ close ERROR;
+ $isDumpToolOpen = 0;
+}
+
+sub dumpToolDidCrash()
+{
+ return 1 if $dumpToolCrashed;
+ return 0 unless $isDumpToolOpen;
+
+ my $pid = waitpid(-1, WNOHANG);
+ return 1 if ($pid == $dumpToolPID);
+
+ # On Mac OS X, crashing may be significantly delayed by crash reporter.
+ return 0 unless isAppleMacWebKit();
+
+ my $tryingToExit = 0;
+ open PS, "ps -o state -p $dumpToolPID |";
+ <PS>; # skip header
+ $tryingToExit = 1 if <PS> =~ /E/;
+ close PS;
+ return $tryingToExit;
+}
+
+sub openHTTPDIfNeeded()
+{
+ return if $isHttpdOpen;
+
+ mkdir "/tmp/WebKit";
+
+ if (-f "/tmp/WebKit/httpd.pid") {
+ my $oldPid = `cat /tmp/WebKit/httpd.pid`;
+ chomp $oldPid;
+ if (0 != kill 0, $oldPid) {
+ print "\nhttpd is already running: pid $oldPid, killing...\n";
+ kill 15, $oldPid;
+
+ my $retryCount = 20;
+ while ((0 != kill 0, $oldPid) && $retryCount) {
+ sleep 1;
+ --$retryCount;
+ }
+
+ die "Timed out waiting for httpd to quit" unless $retryCount;
+ }
+ }
+
+ my $httpdPath = "/usr/sbin/httpd";
+ my $httpdConfig;
+ if (isCygwin()) {
+ my $windowsConfDirectory = "$testDirectory/http/conf/";
+ unless (-x "/usr/lib/apache/libphp4.dll") {
+ copy("$windowsConfDirectory/libphp4.dll", "/usr/lib/apache/libphp4.dll");
+ chmod(0755, "/usr/lib/apache/libphp4.dll");
+ }
+ $httpdConfig = "$windowsConfDirectory/cygwin-httpd.conf";
+ } elsif (isDebianBased()) {
+ $httpdPath = "/usr/sbin/apache2";
+ $httpdConfig = "$testDirectory/http/conf/apache2-debian-httpd.conf";
+ } else {
+ $httpdConfig = "$testDirectory/http/conf/httpd.conf";
+ $httpdConfig = "$testDirectory/http/conf/apache2-httpd.conf" if `$httpdPath -v` =~ m|Apache/2|;
+ }
+ my $documentRoot = "$testDirectory/http/tests";
+ my $typesConfig = "$testDirectory/http/conf/mime.types";
+ my $listen = "127.0.0.1:$httpdPort";
+ my $absTestResultsDirectory = File::Spec->rel2abs(glob $testResultsDirectory);
+ my $sslCertificate = "$testDirectory/http/conf/webkit-httpd.pem";
+
+ mkpath $absTestResultsDirectory;
+
+ my @args = (
+ "-f", "$httpdConfig",
+ "-C", "DocumentRoot \"$documentRoot\"",
+ "-C", "Listen $listen",
+ "-c", "TypesConfig \"$typesConfig\"",
+ "-c", "CustomLog \"$absTestResultsDirectory/access_log.txt\" common",
+ "-c", "ErrorLog \"$absTestResultsDirectory/error_log.txt\"",
+ # Apache wouldn't run CGIs with permissions==700 otherwise
+ "-c", "User \"#$<\""
+ );
+
+ # FIXME: Enable this on Windows once <rdar://problem/5345985> is fixed
+ # The version of Apache we use with Cygwin does not support SSL
+ push(@args, "-c", "SSLCertificateFile \"$sslCertificate\"") unless isCygwin();
+
+ open2(\*HTTPDIN, \*HTTPDOUT, $httpdPath, @args);
+
+ my $retryCount = 20;
+ while (system("/usr/bin/curl -q --silent --stderr - --output /dev/null $listen") && $retryCount) {
+ sleep 1;
+ --$retryCount;
+ }
+
+ die "Timed out waiting for httpd to start" unless $retryCount;
+
+ $isHttpdOpen = 1;
+}
+
+sub closeHTTPD()
+{
+ return if !$isHttpdOpen;
+
+ close HTTPDIN;
+ close HTTPDOUT;
+
+ kill 15, `cat /tmp/WebKit/httpd.pid` if -f "/tmp/WebKit/httpd.pid";
+
+ $isHttpdOpen = 0;
+}
+
+sub fileNameWithNumber($$)
+{
+ my ($base, $number) = @_;
+ return "$base$number" if ($number > 1);
+ return $base;
+}
+
+sub processIgnoreTests($$) {
+ my @ignoreList = split(/\s*,\s*/, shift);
+ my $listName = shift;
+
+ my $disabledSuffix = "-disabled";
+
+ my $addIgnoredDirectories = sub {
+ return () if exists $ignoredLocalDirectories{basename($File::Find::dir)};
+ $ignoredDirectories{File::Spec->abs2rel($File::Find::dir, $testDirectory)} = 1;
+ return @_;
+ };
+ foreach my $item (@ignoreList) {
+ my $path = catfile($testDirectory, $item);
+ if (-d $path) {
+ $ignoredDirectories{$item} = 1;
+ find({ preprocess => $addIgnoredDirectories, wanted => sub {} }, $path);
+ }
+ elsif (-f $path) {
+ $ignoredFiles{$item} = 1;
+ } elsif (-f $path . $disabledSuffix) {
+ # The test is disabled, so do nothing.
+ } else {
+ print "$listName list contained '$item', but no file of that name could be found\n";
+ }
+ }
+}
+
+sub stripExtension($)
+{
+ my ($test) = @_;
+
+ $test =~ s/\.[a-zA-Z]+$//;
+ return $test;
+}
+
+sub isTextOnlyTest($)
+{
+ my ($actual) = @_;
+ my $isText;
+ if ($actual =~ /^layer at/ms) {
+ $isText = 0;
+ } else {
+ $isText = 1;
+ }
+ return $isText;
+}
+
+sub expectedDirectoryForTest($;$;$)
+{
+ my ($base, $isText, $expectedExtension) = @_;
+
+ my @directories = @platformResultHierarchy;
+ push @directories, map { catdir($platformBaseDirectory, $_) } qw(mac-snowleopard mac) if isCygwin();
+ push @directories, $expectedDirectory;
+
+ # If we already have expected results, just return their location.
+ foreach my $directory (@directories) {
+ return $directory if (-f "$directory/$base-$expectedTag.$expectedExtension");
+ }
+
+ # For cross-platform tests, text-only results should go in the cross-platform directory,
+ # while render tree dumps should go in the least-specific platform directory.
+ return $isText ? $expectedDirectory : $platformResultHierarchy[$#platformResultHierarchy];
+}
+
+sub countFinishedTest($$$$) {
+ my ($test, $base, $result, $isText) = @_;
+
+ if (($count + 1) % $testsPerDumpTool == 0 || $count == $#tests) {
+ if ($shouldCheckLeaks) {
+ my $fileName;
+ if ($testsPerDumpTool == 1) {
+ $fileName = "$testResultsDirectory/$base-leaks.txt";
+ } else {
+ $fileName = "$testResultsDirectory/" . fileNameWithNumber($dumpToolName, $leaksOutputFileNumber) . "-leaks.txt";
+ }
+ my $leakCount = countAndPrintLeaks($dumpToolName, $dumpToolPID, $fileName);
+ $totalLeaks += $leakCount;
+ $leaksOutputFileNumber++ if ($leakCount);
+ }
+
+ closeDumpTool();
+ }
+
+ $count++;
+ $counts{$result}++;
+ push @{$tests{$result}}, $test;
+ $testType{$test} = $isText;
+}
+
+sub testCrashedOrTimedOut($$$$$)
+{
+ my ($test, $base, $didCrash, $actual, $error) = @_;
+
+ printFailureMessageForTest($test, $didCrash ? "crashed" : "timed out");
+
+ sampleDumpTool() unless $didCrash;
+
+ my $dir = "$testResultsDirectory/$base";
+ $dir =~ s|/([^/]+)$|| or die "Failed to find test name from base\n";
+ mkpath $dir;
+
+ deleteExpectedAndActualResults($base);
+
+ if (defined($error) && length($error)) {
+ writeToFile("$testResultsDirectory/$base-$errorTag.txt", $error);
+ }
+
+ recordActualResultsAndDiff($base, $actual);
+
+ kill 9, $dumpToolPID unless $didCrash;
+
+ closeDumpTool();
+}
+
+sub printFailureMessageForTest($$)
+{
+ my ($test, $description) = @_;
+
+ unless ($verbose) {
+ print "\n" unless $atLineStart;
+ print "$test -> ";
+ }
+ print "$description\n";
+ $atLineStart = 1;
+}
+
+my %cygpaths = ();
+
+sub openCygpathIfNeeded($)
+{
+ my ($options) = @_;
+
+ return unless isCygwin();
+ return $cygpaths{$options} if $cygpaths{$options} && $cygpaths{$options}->{"open"};
+
+ local (*CYGPATHIN, *CYGPATHOUT);
+ my $pid = open2(\*CYGPATHIN, \*CYGPATHOUT, "cygpath -f - $options");
+ my $cygpath = {
+ "pid" => $pid,
+ "in" => *CYGPATHIN,
+ "out" => *CYGPATHOUT,
+ "open" => 1
+ };
+
+ $cygpaths{$options} = $cygpath;
+
+ return $cygpath;
+}
+
+sub closeCygpaths()
+{
+ return unless isCygwin();
+
+ foreach my $cygpath (values(%cygpaths)) {
+ close $cygpath->{"in"};
+ close $cygpath->{"out"};
+ waitpid($cygpath->{"pid"}, 0);
+ $cygpath->{"open"} = 0;
+
+ }
+}
+
+sub convertPathUsingCygpath($$)
+{
+ my ($path, $options) = @_;
+
+ my $cygpath = openCygpathIfNeeded($options);
+ local *inFH = $cygpath->{"in"};
+ local *outFH = $cygpath->{"out"};
+ print outFH $path . "\n";
+ chomp(my $convertedPath = <inFH>);
+ return $convertedPath;
+}
+
+sub toWindowsPath($)
+{
+ my ($path) = @_;
+ return unless isCygwin();
+
+ return convertPathUsingCygpath($path, "-w");
+}
+
+sub toURL($)
+{
+ my ($path) = @_;
+ return $path unless isCygwin();
+
+ return "file:///" . convertPathUsingCygpath($path, "-m");
+}
+
+sub validateSkippedArg($$;$)
+{
+ my ($option, $value, $value2) = @_;
+ my %validSkippedValues = map { $_ => 1 } qw(default ignore only);
+ $value = lc($value);
+ die "Invalid argument '" . $value . "' for option $option" unless $validSkippedValues{$value};
+ $treatSkipped = $value;
+}
+
+sub htmlForResultsSection(\@$&)
+{
+ my ($tests, $description, $linkGetter) = @_;
+
+ my @html = ();
+ return join("\n", @html) unless @{$tests};
+
+ push @html, "<p>$description:</p>";
+ push @html, "<table>";
+ foreach my $test (@{$tests}) {
+ push @html, "<tr>";
+ push @html, "<td><a href=\"" . toURL("$testDirectory/$test") . "\">$test</a></td>";
+ foreach my $link (@{&{$linkGetter}($test)}) {
+ push @html, "<td><a href=\"$link->{href}\">$link->{text}</a></td>";
+ }
+ push @html, "</tr>";
+ }
+ push @html, "</table>";
+
+ return join("\n", @html);
+}
+
+sub linksForExpectedAndActualResults($)
+{
+ my ($base) = @_;
+
+ my @links = ();
+
+ return \@links unless -s "$testResultsDirectory/$base-$diffsTag.txt";
+
+ my $expectedResultPath = $expectedResultPaths{$base};
+ my ($expectedResultFileName, $expectedResultsDirectory, $expectedResultExtension) = fileparse($expectedResultPath, qr{\.[^.]+$});
+
+ push @links, { href => "$base-$expectedTag$expectedResultExtension", text => "expected" };
+ push @links, { href => "$base-$actualTag$expectedResultExtension", text => "actual" };
+ push @links, { href => "$base-$diffsTag.txt", text => "diffs" };
+
+ return \@links;
+}
+
+sub linksForMismatchTest
+{
+ my ($test) = @_;
+
+ my @links = ();
+
+ my $base = stripExtension($test);
+
+ push @links, @{linksForExpectedAndActualResults($base)};
+ return \@links unless $pixelTests && $imagesPresent{$base};
+
+ push @links, { href => "$base-$expectedTag.png", text => "expected image" };
+ push @links, { href => "$base-$diffsTag.html", text => "image diffs" };
+ push @links, { href => "$base-$diffsTag.png", text => "$imageDifferences{$base}%" };
+
+ return \@links;
+}
+
+sub linksForErrorTest
+{
+ my ($test) = @_;
+
+ my @links = ();
+
+ my $base = stripExtension($test);
+
+ push @links, @{linksForExpectedAndActualResults($base)};
+ push @links, { href => "$base-$errorTag.txt", text => "stderr" };
+
+ return \@links;
+}
+
+sub linksForNewTest
+{
+ my ($test) = @_;
+
+ my @links = ();
+
+ my $base = stripExtension($test);
+ my $expectedResultPath = $expectedResultPaths{$base};
+ my $expectedResultPathMinusExtension = stripExtension($expectedResultPath);
+
+ push @links, { href => toURL($expectedResultPath), text => "results" };
+ if ($pixelTests && -f "$expectedResultPathMinusExtension.png") {
+ push @links, { href => toURL("$expectedResultPathMinusExtension.png"), text => "image" };
+ }
+
+ return \@links;
+}
+
+sub deleteExpectedAndActualResults($)
+{
+ my ($base) = @_;
+
+ unlink "$testResultsDirectory/$base-$actualTag.txt";
+ unlink "$testResultsDirectory/$base-$diffsTag.txt";
+ unlink "$testResultsDirectory/$base-$errorTag.txt";
+}
+
+sub recordActualResultsAndDiff($$)
+{
+ my ($base, $actualResults) = @_;
+
+ return unless defined($actualResults) && length($actualResults);
+
+ my $expectedResultPath = $expectedResultPaths{$base};
+ my ($expectedResultFileNameMinusExtension, $expectedResultDirectoryPath, $expectedResultExtension) = fileparse($expectedResultPath, qr{\.[^.]+$});
+ my $actualResultsPath = "$testResultsDirectory/$base-$actualTag$expectedResultExtension";
+ my $copiedExpectedResultsPath = "$testResultsDirectory/$base-$expectedTag$expectedResultExtension";
+ writeToFile("$actualResultsPath", $actualResults);
+ copy("$expectedResultPath", "$copiedExpectedResultsPath");
+
+ system "diff -u \"$copiedExpectedResultsPath\" \"$actualResultsPath\" > \"$testResultsDirectory/$base-$diffsTag.txt\"";
+}
+
+sub buildPlatformResultHierarchy()
+{
+ mkpath($platformTestDirectory) if ($platform eq "undefined" && !-d "$platformTestDirectory");
+
+ my @platforms;
+ if ($platform =~ /^mac-/) {
+ my $i;
+ for ($i = 0; $i < @macPlatforms; $i++) {
+ last if $macPlatforms[$i] eq $platform;
+ }
+ for (; $i < @macPlatforms; $i++) {
+ push @platforms, $macPlatforms[$i];
+ }
+ } else {
+ @platforms = $platform;
+ }
+
+ my @hierarchy;
+ for (my $i = 0; $i < @platforms; $i++) {
+ my $scoped = catdir($platformBaseDirectory, $platforms[$i]);
+ push(@hierarchy, $scoped) if (-d $scoped);
+ }
+
+ return @hierarchy;
+}
+
+sub buildPlatformTestHierarchy(@)
+{
+ my (@platformHierarchy) = @_;
+ return @platformHierarchy if (@platformHierarchy < 2);
+
+ return ($platformHierarchy[0], $platformHierarchy[$#platformHierarchy]);
+}
+
+sub epiloguesAndPrologues($$) {
+ my ($lastDirectory, $directory) = @_;
+ my @lastComponents = split('/', $lastDirectory);
+ my @components = split('/', $directory);
+
+ while (@lastComponents) {
+ if (!defined($components[0]) || $lastComponents[0] ne $components[0]) {
+ last;
+ }
+ shift @components;
+ shift @lastComponents;
+ }
+
+ my @result;
+ my $leaving = $lastDirectory;
+ foreach (@lastComponents) {
+ my $epilogue = $leaving . "/resources/run-webkit-tests-epilogue.html";
+ foreach (@platformResultHierarchy) {
+ push @result, catdir($_, $epilogue) if (stat(catdir($_, $epilogue)));
+ }
+ push @result, catdir($testDirectory, $epilogue) if (stat(catdir($testDirectory, $epilogue)));
+ $leaving =~ s|(^\|/)[^/]+$||;
+ }
+
+ my $entering = $leaving;
+ foreach (@components) {
+ $entering .= '/' . $_;
+ my $prologue = $entering . "/resources/run-webkit-tests-prologue.html";
+ push @result, catdir($testDirectory, $prologue) if (stat(catdir($testDirectory, $prologue)));
+ foreach (reverse @platformResultHierarchy) {
+ push @result, catdir($_, $prologue) if (stat(catdir($_, $prologue)));
+ }
+ }
+ return @result;
+}
+
+sub parseLeaksandPrintUniqueLeaks() {
+ return unless @leaksFilenames;
+
+ my $mergedFilenames = join " ", @leaksFilenames;
+ my $parseMallocHistoryTool = sourceDir() . "/WebKitTools/Scripts/parse-malloc-history";
+
+ open MERGED_LEAKS, "cat $mergedFilenames | $parseMallocHistoryTool --merge-depth $mergeDepth - |" ;
+ my @leakLines = <MERGED_LEAKS>;
+ close MERGED_LEAKS;
+
+ my $uniqueLeakCount = 0;
+ my $totalBytes;
+ foreach my $line (@leakLines) {
+ ++$uniqueLeakCount if ($line =~ /^(\d*)\scalls/);
+ $totalBytes = $1 if $line =~ /^total\:\s(.*)\s\(/;
+ }
+
+ print "\nWARNING: $totalLeaks total leaks found for a total of $totalBytes!\n";
+ print "WARNING: $uniqueLeakCount unique leaks found!\n";
+ print "See above for individual leaks results.\n" if ($leaksOutputFileNumber > 2);
+
+}
+
+sub extensionForMimeType($)
+{
+ my ($mimeType) = @_;
+
+ if ($mimeType eq "application/x-webarchive") {
+ return "webarchive";
+ } elsif ($mimeType eq "application/pdf") {
+ return "pdf";
+ }
+ return "txt";
+}
+
+# Read up to the first #EOF (the content block of the test), or until detecting crashes or timeouts.
+sub readFromDumpToolWithTimer(*;$)
+{
+ my ($fh, $dontWaitForTimeOut) = @_;
+
+ setFileHandleNonBlocking($fh, 1);
+
+ my $maximumSecondsWithoutOutput = 15;
+ $maximumSecondsWithoutOutput *= 10 if $guardMalloc;
+ my $microsecondsToWaitBeforeReadingAgain = 1000;
+
+ my $timeOfLastSuccessfulRead = time;
+
+ my @output = ();
+ my $status = "success";
+ my $mimeType = "text/plain";
+ # We don't have a very good way to know when the "headers" stop
+ # and the content starts, so we use this as a hack:
+ my $haveSeenContentType = 0;
+
+ while (1) {
+ if (time - $timeOfLastSuccessfulRead > $maximumSecondsWithoutOutput) {
+ $status = dumpToolDidCrash() ? "crashed" : "timedOut";
+ last;
+ }
+
+ my $line = readline($fh);
+ if (!defined($line)) {
+ if ($! != EAGAIN) {
+ $status = "crashed";
+ last;
+ }
+
+ if ($dontWaitForTimeOut) {
+ last;
+ }
+
+ # No data ready
+ usleep($microsecondsToWaitBeforeReadingAgain);
+ next;
+ }
+
+ $timeOfLastSuccessfulRead = time;
+
+ if (!$haveSeenContentType && $line =~ /^Content-Type: (\S+)$/) {
+ $mimeType = $1;
+ $haveSeenContentType = 1;
+ next;
+ }
+ last if ($line =~ /#EOF/);
+
+ push @output, $line;
+ }
+
+ setFileHandleNonBlocking($fh, 0);
+ return {
+ output => join("", @output),
+ status => $status,
+ mimeType => $mimeType,
+ extension => extensionForMimeType($mimeType)
+ };
+}
+
+sub setFileHandleNonBlocking(*$)
+{
+ my ($fh, $nonBlocking) = @_;
+
+ my $flags = fcntl($fh, F_GETFL, 0) or die "Couldn't get filehandle flags";
+
+ if ($nonBlocking) {
+ $flags |= O_NONBLOCK;
+ } else {
+ $flags &= ~O_NONBLOCK;
+ }
+
+ fcntl($fh, F_SETFL, $flags) or die "Couldn't set filehandle flags";
+
+ return 1;
+}
+
+sub sampleDumpTool()
+{
+ return unless isAppleMacWebKit();
+ return unless $runSample;
+
+ my $outputDirectory = "$ENV{HOME}/Library/Logs/DumpRenderTree";
+ -d $outputDirectory or mkdir $outputDirectory;
+
+ my $outputFile = "$outputDirectory/HangReport.txt";
+ system "/usr/bin/sample", $dumpToolPID, qw(10 10 -file), $outputFile;
+}
diff --git a/WebKitTools/Scripts/set-webkit-configuration b/WebKitTools/Scripts/set-webkit-configuration
new file mode 100755
index 0000000..4992256
--- /dev/null
+++ b/WebKitTools/Scripts/set-webkit-configuration
@@ -0,0 +1,79 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2005 Apple Computer, 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+use strict;
+use FindBin;
+use lib $FindBin::Bin;
+use webkitdirs;
+
+my $programName = basename($0);
+my $usage = <<EOF;
+Usage: $programName [options]
+ --32-bit Set the default architecture to 32-bit
+ --64-bit Set the default architecture to 64-bit
+ --debug Set the default configuration to debug
+ --release Set the default configuration to release
+EOF
+
+my $configuration = passedConfiguration();
+my $architecture = passedArchitecture();
+
+if (!$architecture) {
+ # Handle --64-bit explicitly here, as we don't want our other scripts to accept it
+ for my $i (0 .. $#ARGV) {
+ my $opt = $ARGV[$i];
+ if ($opt =~ /^--64-bit$/i) {
+ splice(@ARGV, $i, 1);
+ $architecture = 'x86_64';
+ }
+ }
+}
+
+if (!$configuration && !$architecture) {
+ print STDERR $usage;
+ exit 1;
+}
+
+my $baseProductDir = baseProductDir();
+system "mkdir", "-p", "$baseProductDir";
+
+if ($configuration) {
+ open CONFIGURATION, ">", "$baseProductDir/Configuration" or die;
+ print CONFIGURATION $configuration;
+ close CONFIGURATION;
+}
+
+if ($architecture) {
+ if ($architecture ne "x86_64") {
+ open ARCHITECTURE, ">", "$baseProductDir/Architecture" or die;
+ print ARCHITECTURE $architecture;
+ close ARCHITECTURE;
+ } else {
+ unlink "$baseProductDir/Architecture";
+ }
+}
diff --git a/WebKitTools/Scripts/sort-Xcode-project-file b/WebKitTools/Scripts/sort-Xcode-project-file
new file mode 100755
index 0000000..52a3df1
--- /dev/null
+++ b/WebKitTools/Scripts/sort-Xcode-project-file
@@ -0,0 +1,167 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2007, 2008 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Script to sort "children" and "files" sections in Xcode project.pbxproj files
+
+use strict;
+
+use File::Basename;
+use File::Temp qw(tempfile);
+use Getopt::Long;
+
+sub sortChildrenByFileName($$);
+sub sortFilesByFileName($$);
+
+# Files (or products) without extensions
+my %isFile = map { $_ => 1 } qw(
+ create_hash_table
+ jsc
+ minidom
+ testapi
+ testjsglue
+);
+
+my $printWarnings = 1;
+my $showHelp;
+
+my $getOptionsResult = GetOptions(
+ 'h|help' => \$showHelp,
+ 'w|warnings!' => \$printWarnings,
+);
+
+if (scalar(@ARGV) == 0) {
+ print STDERR "ERROR: No Xcode project files (project.pbxproj) listed on command-line.\n";
+ undef $getOptionsResult;
+}
+
+if (!$getOptionsResult || $showHelp) {
+ print STDERR <<__END__;
+Usage: @{[ basename($0) ]} [options] path/to/project.pbxproj [path/to/project.pbxproj ...]
+ -h|--help show this help message
+ -w|--[no-]warnings show or suppress warnings (default: show warnings)
+__END__
+ exit 1;
+}
+
+for my $projectFile (@ARGV) {
+ if (basename($projectFile) ne "project.pbxproj") {
+ print STDERR "WARNING: Not an Xcode project file: $projectFile\n" if $printWarnings;
+ next;
+ }
+
+ # Grab the mainGroup for the project file
+ my $mainGroup = "";
+ open(IN, "< $projectFile") || die "Could not open $projectFile: $!";
+ while (my $line = <IN>) {
+ $mainGroup = $2 if $line =~ m#^(\s*)mainGroup = ([0-9A-F]{24} /\* .+ \*/);$#;
+ }
+ close(IN);
+
+ my ($OUT, $tempFileName) = tempfile(
+ basename($projectFile) . "-XXXXXXXX",
+ DIR => dirname($projectFile),
+ UNLINK => 0,
+ );
+
+ # Clean up temp file in case of die()
+ $SIG{__DIE__} = sub {
+ close(IN);
+ close($OUT);
+ unlink($tempFileName);
+ };
+
+ my @lastTwo = ();
+ open(IN, "< $projectFile") || die "Could not open $projectFile: $!";
+ while (my $line = <IN>) {
+ if ($line =~ /^(\s*)files = \(\s*$/) {
+ print $OUT $line;
+ my $endMarker = $1 . ");";
+ my @files;
+ while (my $fileLine = <IN>) {
+ if ($fileLine =~ /^\Q$endMarker\E\s*$/) {
+ $endMarker = $fileLine;
+ last;
+ }
+ push @files, $fileLine;
+ }
+ print $OUT sort sortFilesByFileName @files;
+ print $OUT $endMarker;
+ } elsif ($line =~ /^(\s*)children = \(\s*$/) {
+ print $OUT $line;
+ my $endMarker = $1 . ");";
+ my @children;
+ while (my $childLine = <IN>) {
+ if ($childLine =~ /^\Q$endMarker\E\s*$/) {
+ $endMarker = $childLine;
+ last;
+ }
+ push @children, $childLine;
+ }
+ if ($lastTwo[0] =~ m#^\s+\Q$mainGroup\E = \{$#) {
+ # Don't sort mainGroup
+ print $OUT @children;
+ } else {
+ print $OUT sort sortChildrenByFileName @children;
+ }
+ print $OUT $endMarker;
+ } else {
+ print $OUT $line;
+ }
+
+ push @lastTwo, $line;
+ shift @lastTwo if scalar(@lastTwo) > 2;
+ }
+ close(IN);
+ close($OUT);
+
+ unlink($projectFile) || die "Could not delete $projectFile: $!";
+ rename($tempFileName, $projectFile) || die "Could not rename $tempFileName to $projectFile: $!";
+}
+
+exit 0;
+
+sub sortChildrenByFileName($$)
+{
+ my ($a, $b) = @_;
+ my $aFileName = $1 if $a =~ /^\s*[A-Z0-9]{24} \/\* (.+) \*\/,$/;
+ my $bFileName = $1 if $b =~ /^\s*[A-Z0-9]{24} \/\* (.+) \*\/,$/;
+ my $aSuffix = $1 if $aFileName =~ m/\.([^.]+)$/;
+ my $bSuffix = $1 if $bFileName =~ m/\.([^.]+)$/;
+ if ((!$aSuffix && !$isFile{$aFileName} && $bSuffix) || ($aSuffix && !$bSuffix && !$isFile{$bFileName})) {
+ return !$aSuffix ? -1 : 1;
+ }
+ return $aFileName cmp $bFileName;
+}
+
+sub sortFilesByFileName($$)
+{
+ my ($a, $b) = @_;
+ my $aFileName = $1 if $a =~ /^\s*[A-Z0-9]{24} \/\* (.+) in /;
+ my $bFileName = $1 if $b =~ /^\s*[A-Z0-9]{24} \/\* (.+) in /;
+ return $aFileName cmp $bFileName;
+}
diff --git a/WebKitTools/Scripts/split-file-by-class b/WebKitTools/Scripts/split-file-by-class
new file mode 100755
index 0000000..b6aeb68
--- /dev/null
+++ b/WebKitTools/Scripts/split-file-by-class
@@ -0,0 +1,159 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2006 Apple Computer, 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Used for splitting a single file into multiple class files
+# Usage: split-class <header file>
+
+use strict;
+use File::Copy;
+use FindBin;
+use lib $FindBin::Bin;
+use SpacingHeuristics;
+
+
+for my $filename (@ARGV) {
+
+ $filename =~ m/^(\w+)\.h$/ or die "Command line args must be .h files.\n";
+ my $basename = $1;
+
+ open(OLDFILE, "<", $filename) or die "File does not exist: $filename\n";
+ print "Splitting class $filename.{h,cpp}:\n";
+
+ my $currentClassName = "";
+ my $classIndent = "";
+ my $fileContent = "";
+ my %classDefs = ();
+ while (my $line = <OLDFILE>) {
+ if ($currentClassName) {
+ $classDefs{$currentClassName} .= $line;
+ if ($line =~ /^$classIndent};\s*$/) {
+ $currentClassName = "";
+ }
+ } else {
+ if ($line =~ /^(\s*)class\s+(\w+)\s+[^;]*$/) {
+ $classIndent = $1;
+ $currentClassName = $2;
+ $classDefs{$currentClassName} .= $line;
+ $fileContent .= "###CLASS###$currentClassName\n";
+ } else {
+ $fileContent .= $line;
+ }
+ }
+ }
+ close(OLDFILE);
+
+ if (scalar(keys(%classDefs)) == 1) { # degenerate case
+ my ($classname) = keys(%classDefs);
+ if (!($classname eq $basename)) {
+ print "Skipping $filename, already correctly named.\n";
+ } else {
+ print "$filename only includes one class, renaming to $classname.h\n";
+ system("svn rm --force $classname.h") if (-r "$classname.h");
+ system "svn mv $basename.h $classname.h";
+ }
+ } else {
+ while (my ($classname, $classDef) = each(%classDefs)) {
+ if (($classname eq $basename)) {
+ print "Skipping $filename, already correctly named.\n";
+ } else {
+ print "Using SVN to copy $basename.{h,cpp} to $classname.{h,cpp}\n";
+
+ system("svn rm --force $classname.h") if (-r "$classname.h");
+ system "svn cp $basename.h $classname.h";
+
+ system("svn rm --force $classname.cpp") if (-r "$classname.cpp");
+ system "svn cp $basename.cpp $classname.cpp";
+ }
+
+ print "Fixing $classname.h as much as possible.\n";
+ open(NEWHEADER, ">", "$classname.h") or die "File does not exist: $filename\n";
+ my @lines = split("\n", $fileContent);
+ foreach my $line (@lines) {
+ if ($line =~ /^###CLASS###(\w+)/) {
+ if ($1 eq $classname) {
+ print NEWHEADER $classDef . "\n";
+ }
+ } else {
+ print NEWHEADER $line . "\n";
+ }
+ }
+ close(NEWHEADER);
+
+ print "Fixing $classname.cpp as much as possible.\n";
+ copy("$classname.cpp", "$classname.cpp.original");
+ open(OLDCPP, "<", "$classname.cpp.original") or die "Failed to copy file for reading: $filename\n";
+ open(NEWCPP, ">", "$classname.cpp") or die "File does not exist: $filename\n";
+ my $insideMemberFunction = 0;
+ my $shouldPrintMemberFunction = 0;
+ resetSpacingHeuristics();
+ while (my $line = <OLDCPP>) {
+ if ($insideMemberFunction) {
+ if ($shouldPrintMemberFunction) {
+ print NEWCPP $line;
+ #setPreviousAllowedLine($line);
+ } else {
+ ignoringLine($line);
+ }
+ if ($line =~ /^}\s*$/) {
+ $insideMemberFunction = 0;
+ }
+ } elsif ($line =~ /$filename/) {
+ print NEWCPP "#include \"config.h\"\n";
+ print NEWCPP "#include \"$classname.h\"\n";
+ } elsif ($line =~ /#include/ || $line =~ /#import/) {
+ next; # skip includes, they're generally wrong or unecessary anyway.
+ } else {
+ $line =~ s/DOM:://;
+ $line =~ s/khtml:://;
+ $line =~ s/namespace DOM/namespace WebCore/;
+ $line =~ s/namespace khtml/namespace WebCore/;
+
+ if ($line =~ /^(.*?\s+)?(\*|&)?(\w+)::(~)?\w+\s*\(/) {
+ $insideMemberFunction = 1;
+ $shouldPrintMemberFunction = ($classname eq $3);
+ if ($shouldPrintMemberFunction) {
+ printPendingEmptyLines(*NEWCPP, $line);
+ print NEWCPP $line;
+ }
+ } else {
+ next if isOnlyWhiteSpace($line);
+ next if ($line =~ m/------------/);
+ printPendingEmptyLines(*NEWCPP, $line);
+ applySpacingHeuristicsAndPrint(*NEWCPP, $line);
+ }
+ }
+ }
+ close(NEWCPP);
+ close(OLDCPP);
+ unlink("$classname.cpp.original");
+ }
+ }
+
+ print "Opening new files...\n";
+ system("open " . join(".* ", keys(%classDefs)) . ".*");
+} \ No newline at end of file
diff --git a/WebKitTools/Scripts/sunspider-compare-results b/WebKitTools/Scripts/sunspider-compare-results
new file mode 100755
index 0000000..ec0863a
--- /dev/null
+++ b/WebKitTools/Scripts/sunspider-compare-results
@@ -0,0 +1,101 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2007 Apple Inc. All rights reserved.
+# Copyright (C) 2007 Eric Seidel <eric@webkit.org>
+#
+# 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 COMPUTER, INC. ``AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+use strict;
+use File::Spec;
+use FindBin;
+use Getopt::Long qw(:config pass_through);
+use lib $FindBin::Bin;
+use webkitdirs;
+use POSIX;
+
+# determine configuration, but default to "Release" instead of last-used configuration to match run-sunspider
+setConfiguration("Release");
+setConfiguration();
+my $configuration = configuration();
+
+my $root;
+my $showHelp = 0;
+
+my $programName = basename($0);
+my $usage = <<EOF;
+Usage: $programName [options] FILE FILE
+ --help Show this help message
+ --root Path to root tools build
+EOF
+
+GetOptions('root=s' => sub { my ($argName, $value); setConfigurationProductDir(Cwd::abs_path($value)); },
+ 'help' => \$showHelp);
+
+if ($showHelp) {
+ print STDERR $usage;
+ exit 1;
+}
+
+@ARGV = map { File::Spec->rel2abs($_) } @ARGV;
+
+sub buildJSC
+{
+ if (!defined($root)){
+ chdirWebKit();
+ my $buildResult = system "WebKitTools/Scripts/build-jsc", "--" . $configuration;
+ if ($buildResult) {
+ print STDERR "Compiling jsc failed!\n";
+ exit WEXITSTATUS($buildResult);
+ }
+ }
+}
+
+sub setupEnvironmentForExecution($)
+{
+ my ($productDir) = @_;
+ print "Starting sunspider-compare-results with DYLD_FRAMEWORK_PATH set to point to built JavaScriptCore in $productDir.\n";
+ $ENV{DYLD_FRAMEWORK_PATH} = $productDir;
+ # FIXME: Other platforms may wish to augment this method to use LD_LIBRARY_PATH, etc.
+}
+
+sub jscPath($)
+{
+ my ($productDir) = @_;
+ my $jscName = "jsc";
+ $jscName .= "_debug" if (isCygwin() && ($configuration eq "Debug"));
+ return "$productDir/$jscName";
+}
+
+buildJSC();
+
+chdirWebKit();
+chdir("SunSpider");
+
+my $productDir = productDir();
+# FIXME: This hack should be pushed down into productDir()
+$productDir .= "/JavaScriptCore" if (isQt() or isGtk());
+
+setupEnvironmentForExecution($productDir);
+my @args = ("--shell", jscPath($productDir));
+# This code could be removed if we chose to pass extra args to sunspider instead of Xcode
+
+exec "./sunspider-compare-results", @args, @ARGV;
diff --git a/WebKitTools/Scripts/svn-apply b/WebKitTools/Scripts/svn-apply
new file mode 100755
index 0000000..009bdd0
--- /dev/null
+++ b/WebKitTools/Scripts/svn-apply
@@ -0,0 +1,443 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2005, 2006, 2007 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# "patch" script for WebKit Open Source Project, used to apply patches.
+
+# Differences from invoking "patch -p0":
+#
+# Handles added files (does a svn add with logic to handle local changes).
+# Handles added directories (does a svn add).
+# Handles removed files (does a svn rm with logic to handle local changes).
+# Handles removed directories--those with no more files or directories left in them
+# (does a svn rm).
+# Has mode where it will roll back to svn version numbers in the patch file so svn
+# can do a 3-way merge.
+# Paths from Index: lines are used rather than the paths on the patch lines, which
+# makes patches generated by "cvs diff" work (increasingly unimportant since we
+# use Subversion now).
+# ChangeLog patches use --fuzz=3 to prevent rejects, and the entry date is set in
+# the patch to today's date using $changeLogTimeZone.
+# Handles binary files (requires patches made by svn-create-patch).
+# Handles copied and moved files (requires patches made by svn-create-patch).
+# Handles git-diff patches (without binary changes) created at the top-level directory
+#
+# Missing features:
+#
+# Handle property changes.
+# Handle copied and moved directories (would require patches made by svn-create-patch).
+# When doing a removal, check that old file matches what's being removed.
+# Notice a patch that's being applied at the "wrong level" and make it work anyway.
+# Do a dry run on the whole patch and don't do anything if part of the patch is
+# going to fail (probably too strict unless we exclude ChangeLog).
+# Handle git-diff patches with binary changes
+
+use strict;
+use warnings;
+
+use Cwd;
+use Digest::MD5;
+use File::Basename;
+use File::Spec;
+use Getopt::Long;
+use MIME::Base64;
+use POSIX qw(strftime);
+
+sub addDirectoriesIfNeeded($);
+sub applyPatch($$;$);
+sub checksum($);
+sub fixChangeLogPatch($);
+sub gitdiff2svndiff($);
+sub handleBinaryChange($$);
+sub isDirectoryEmptyForRemoval($);
+sub patch($);
+sub removeDirectoriesIfNeeded();
+sub setChangeLogDateAndReviewer($$);
+sub svnStatus($);
+
+# Project time zone for Cupertino, CA, US
+my $changeLogTimeZone = "PST8PDT";
+
+my $merge = 0;
+my $showHelp = 0;
+my $reviewer;
+if (!GetOptions("merge!" => \$merge, "help!" => \$showHelp, "reviewer=s" => \$reviewer) || $showHelp) {
+ print STDERR basename($0) . " [-h|--help] [-m|--merge] [-r|--reviewer name] patch1 [patch2 ...]\n";
+ exit 1;
+}
+
+my %removeDirectoryIgnoreList = (
+ '.' => 1,
+ '..' => 1,
+ '.svn' => 1,
+ '_svn' => 1,
+);
+
+my %checkedDirectories;
+my %copiedFiles;
+my @patches;
+my %versions;
+
+my $copiedFromPath;
+my $filter;
+my $indexPath;
+my $patch;
+while (<>) {
+ s/([\n\r]+)$//mg;
+ my $eol = $1;
+ if (!defined($indexPath) && m#^diff --git a/#) {
+ $filter = \&gitdiff2svndiff;
+ }
+ $_ = &$filter($_) if $filter;
+ if (/^Index: (.+)/) {
+ $indexPath = $1;
+ if ($patch) {
+ if (!$copiedFromPath) {
+ push @patches, $patch;
+ }
+ $copiedFromPath = "";
+ $patch = "";
+ }
+ }
+ if ($indexPath) {
+ # Fix paths on diff, ---, and +++ lines to match preceding Index: line.
+ s/\S+$/$indexPath/ if /^diff/;
+ s/^--- \S+/--- $indexPath/;
+ if (/^--- .+\(from (\S+):(\d+)\)$/) {
+ $copiedFromPath = $1;
+ $copiedFiles{$indexPath} = $copiedFromPath;
+ $versions{$copiedFromPath} = $2 if ($2 != 0);
+ }
+ elsif (/^--- .+\(revision (\d+)\)$/) {
+ $versions{$indexPath} = $1 if ($1 != 0);
+ }
+ if (s/^\+\+\+ \S+/+++ $indexPath/) {
+ $indexPath = "";
+ }
+ }
+ $patch .= $_;
+ $patch .= $eol;
+}
+
+if ($patch && !$copiedFromPath) {
+ push @patches, $patch;
+}
+
+if ($merge) {
+ for my $file (sort keys %versions) {
+ print "Getting version $versions{$file} of $file\n";
+ system "svn", "update", "-r", $versions{$file}, $file;
+ }
+}
+
+# Handle copied and moved files first since moved files may have their source deleted before the move.
+for my $file (keys %copiedFiles) {
+ addDirectoriesIfNeeded(dirname($file));
+ system "svn", "copy", $copiedFiles{$file}, $file;
+}
+
+for $patch (@patches) {
+ patch($patch);
+}
+
+removeDirectoriesIfNeeded();
+
+exit 0;
+
+sub addDirectoriesIfNeeded($)
+{
+ my ($path) = @_;
+ my @dirs = File::Spec->splitdir($path);
+ my $dir = ".";
+ while (scalar @dirs) {
+ $dir = File::Spec->catdir($dir, shift @dirs);
+ next if exists $checkedDirectories{$dir};
+ if (! -e $dir) {
+ mkdir $dir or die "Failed to create required directory '$dir' for path '$path'\n";
+ system "svn", "add", $dir;
+ $checkedDirectories{$dir} = 1;
+ }
+ elsif (-d $dir) {
+ my $svnOutput = svnStatus($dir);
+ if ($svnOutput && $svnOutput =~ m#\?\s+$dir\n#) {
+ system "svn", "add", $dir;
+ }
+ $checkedDirectories{$dir} = 1;
+ }
+ else {
+ die "'$dir' is not a directory";
+ }
+ }
+}
+
+sub applyPatch($$;$)
+{
+ my ($patch, $fullPath, $options) = @_;
+ $options = [] if (! $options);
+ my $command = "patch " . join(" ", "-p0", @{$options});
+ open PATCH, "| $command" or die "Failed to patch $fullPath\n";
+ print PATCH $patch;
+ close PATCH;
+}
+
+sub checksum($)
+{
+ my $file = shift;
+ open(FILE, $file) or die "Can't open '$file': $!";
+ binmode(FILE);
+ my $checksum = Digest::MD5->new->addfile(*FILE)->hexdigest();
+ close(FILE);
+ return $checksum;
+}
+
+sub fixChangeLogPatch($)
+{
+ my $patch = shift;
+ my $contextLineCount = 3;
+
+ return $patch if $patch !~ /\n@@ -1,(\d+) \+1,(\d+) @@\n( .*\n)+(\+.*\n)+( .*\n){$contextLineCount}$/m;
+ my ($oldLineCount, $newLineCount) = ($1, $2);
+ return $patch if $oldLineCount <= $contextLineCount;
+
+ # The diff(1) command is greedy when matching lines, so a new ChangeLog entry will
+ # have lines of context at the top of a patch when the existing entry has the same
+ # date and author as the new entry. This nifty loop alters a ChangeLog patch so
+ # that the added lines ("+") in the patch always start at the beginning of the
+ # patch and there are no initial lines of context.
+ my $newPatch;
+ my $lineCountInState = 0;
+ my $oldContentLineCountReduction = $oldLineCount - $contextLineCount;
+ my $newContentLineCountWithoutContext = $newLineCount - $oldLineCount - $oldContentLineCountReduction;
+ my ($stateHeader, $statePreContext, $stateNewChanges, $statePostContext) = (1..4);
+ my $state = $stateHeader;
+ foreach my $line (split(/\n/, $patch)) {
+ $lineCountInState++;
+ if ($state == $stateHeader && $line =~ /^@@ -1,$oldLineCount \+1,$newLineCount @\@$/) {
+ $line = "@@ -1,$contextLineCount +1," . ($newLineCount - $oldContentLineCountReduction) . " @@";
+ $lineCountInState = 0;
+ $state = $statePreContext;
+ } elsif ($state == $statePreContext && substr($line, 0, 1) eq " ") {
+ $line = "+" . substr($line, 1);
+ if ($lineCountInState == $oldContentLineCountReduction) {
+ $lineCountInState = 0;
+ $state = $stateNewChanges;
+ }
+ } elsif ($state == $stateNewChanges && substr($line, 0, 1) eq "+") {
+ # No changes to these lines
+ if ($lineCountInState == $newContentLineCountWithoutContext) {
+ $lineCountInState = 0;
+ $state = $statePostContext;
+ }
+ } elsif ($state == $statePostContext) {
+ if (substr($line, 0, 1) eq "+" && $lineCountInState <= $oldContentLineCountReduction) {
+ $line = " " . substr($line, 1);
+ } elsif ($lineCountInState > $contextLineCount && substr($line, 0, 1) eq " ") {
+ next; # Discard
+ }
+ }
+ $newPatch .= $line . "\n";
+ }
+
+ return $newPatch;
+}
+
+sub gitdiff2svndiff($)
+{
+ $_ = shift @_;
+ if (m#^diff --git a/(.+) b/(.+)#) {
+ return "Index: $1";
+ } elsif (m/^new file.*/) {
+ return "";
+ } elsif (m#^index [0-9a-f]{7}\.\.[0-9a-f]{7} [0-9]{6}#) {
+ return "===================================================================";
+ } elsif (m#^--- a/(.+)#) {
+ return "--- $1";
+ } elsif (m#^\+\+\+ b/(.+)#) {
+ return "+++ $1";
+ }
+ return $_;
+}
+
+sub handleBinaryChange($$)
+{
+ my ($fullPath, $contents) = @_;
+ if ($contents =~ m#((\n[A-Za-z0-9+/]{76})+\n[A-Za-z0-9+/=]{4,76}\n)#) {
+ # Addition or Modification
+ open FILE, ">", $fullPath or die;
+ print FILE decode_base64($1);
+ close FILE;
+ my $svnOutput = svnStatus($fullPath);
+ if ($svnOutput && substr($svnOutput, 0, 1) eq "?") {
+ # Addition
+ system "svn", "add", $fullPath;
+ } else {
+ # Modification
+ print $svnOutput if $svnOutput;
+ }
+ } else {
+ # Deletion
+ system "svn", "rm", $fullPath;
+ }
+}
+
+sub isDirectoryEmptyForRemoval($)
+{
+ my ($dir) = @_;
+ my $directoryIsEmpty = 1;
+ opendir DIR, $dir or die "Could not open '$dir' to list files: $?";
+ for (my $item = readdir DIR; $item && $directoryIsEmpty; $item = readdir DIR) {
+ next if exists $removeDirectoryIgnoreList{$item};
+ if (! -d File::Spec->catdir($dir, $item)) {
+ $directoryIsEmpty = 0;
+ } else {
+ my $svnOutput = svnStatus(File::Spec->catdir($dir, $item));
+ next if $svnOutput && substr($svnOutput, 0, 1) eq "D";
+ $directoryIsEmpty = 0;
+ }
+ }
+ closedir DIR;
+ return $directoryIsEmpty;
+}
+
+sub patch($)
+{
+ my ($patch) = @_;
+ return if !$patch;
+
+ unless ($patch =~ m|^Index: ([^\n]+)|) {
+ my $separator = '-' x 67;
+ warn "Failed to find 'Index:' in:\n$separator\n$patch\n$separator\n";
+ return;
+ }
+ my $fullPath = $1;
+
+ my $deletion = 0;
+ my $addition = 0;
+ my $isBinary = 0;
+
+ $addition = 1 if ($patch =~ /\n--- .+\(revision 0\)\n/ || $patch =~ /\n@@ -0,0 .* @@/);
+ $deletion = 1 if $patch =~ /\n@@ .* \+0,0 @@/;
+ $isBinary = 1 if $patch =~ /\nCannot display: file marked as a binary type\./;
+
+ if (!$addition && !$deletion && !$isBinary) {
+ # Standard patch, patch tool can handle this.
+ if (basename($fullPath) eq "ChangeLog") {
+ my $changeLogDotOrigExisted = -f "${fullPath}.orig";
+ applyPatch(setChangeLogDateAndReviewer(fixChangeLogPatch($patch), $reviewer), $fullPath, ["--fuzz=3"]);
+ unlink("${fullPath}.orig") if (! $changeLogDotOrigExisted);
+ } else {
+ applyPatch($patch, $fullPath);
+ }
+ } else {
+ # Either a deletion, an addition or a binary change.
+
+ addDirectoriesIfNeeded(dirname($fullPath));
+
+ if ($isBinary) {
+ # Binary change
+ handleBinaryChange($fullPath, $patch);
+ } elsif ($deletion) {
+ # Deletion
+ applyPatch($patch, $fullPath, ["--force"]);
+ system "svn", "rm", "--force", $fullPath;
+ } else {
+ # Addition
+ rename($fullPath, "$fullPath.orig") if -e $fullPath;
+ applyPatch($patch, $fullPath);
+ unlink("$fullPath.orig") if -e "$fullPath.orig" && checksum($fullPath) eq checksum("$fullPath.orig");
+ system "svn", "add", $fullPath;
+ system "svn", "stat", "$fullPath.orig" if -e "$fullPath.orig";
+ }
+ }
+}
+
+sub removeDirectoriesIfNeeded()
+{
+ foreach my $dir (reverse sort keys %checkedDirectories) {
+ if (isDirectoryEmptyForRemoval($dir)) {
+ my $svnOutput;
+ open SVN, "svn rm '$dir' |" or die;
+ # Only save the last line since Subversion lists all changed statuses below $dir
+ while (<SVN>) {
+ $svnOutput = $_;
+ }
+ close SVN;
+ print $svnOutput if $svnOutput;
+ }
+ }
+}
+
+sub setChangeLogDateAndReviewer($$)
+{
+ my $patch = shift;
+ my $reviewer = shift;
+ my $savedTimeZone = $ENV{'TZ'};
+ # Set TZ temporarily so that localtime() is in that time zone
+ $ENV{'TZ'} = $changeLogTimeZone;
+ my $newDate = strftime("%Y-%m-%d", localtime());
+ if (defined $savedTimeZone) {
+ $ENV{'TZ'} = $savedTimeZone;
+ } else {
+ delete $ENV{'TZ'};
+ }
+ $patch =~ s/(\n\+)\d{4}-[^-]{2}-[^-]{2}( )/$1$newDate$2/;
+ if (defined($reviewer)) {
+ $patch =~ s/NOBODY \(OOPS!\)/$reviewer/;
+ }
+ return $patch;
+}
+
+sub svnStatus($)
+{
+ my ($fullPath) = @_;
+ my $svnStatus;
+ open SVN, "svn status --non-interactive --non-recursive '$fullPath' |" or die;
+ if (-d $fullPath) {
+ # When running "svn stat" on a directory, we can't assume that only one
+ # status will be returned (since any files with a status below the
+ # directory will be returned), and we can't assume that the directory will
+ # be first (since any files with unknown status will be listed first).
+ my $normalizedFullPath = File::Spec->catdir(File::Spec->splitdir($fullPath));
+ while (<SVN>) {
+ chomp;
+ my $normalizedStatPath = File::Spec->catdir(File::Spec->splitdir(substr($_, 7)));
+ if ($normalizedFullPath eq $normalizedStatPath) {
+ $svnStatus = $_;
+ last;
+ }
+ }
+ # Read the rest of the svn command output to avoid a broken pipe warning.
+ local $/ = undef;
+ <SVN>;
+ }
+ else {
+ # Files will have only one status returned.
+ $svnStatus = <SVN>;
+ }
+ close SVN;
+ return $svnStatus;
+}
diff --git a/WebKitTools/Scripts/svn-create-patch b/WebKitTools/Scripts/svn-create-patch
new file mode 100755
index 0000000..365737a
--- /dev/null
+++ b/WebKitTools/Scripts/svn-create-patch
@@ -0,0 +1,442 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2005, 2006 Apple Computer, 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Extended "svn diff" script for WebKit Open Source Project, used to make patches.
+
+# Differences from standard "svn diff":
+#
+# Uses the real diff, not svn's built-in diff.
+# Always passes "-p" to diff so it will try to include function names.
+# Handles binary files (encoded as a base64 chunk of text).
+# Sorts the diffs alphabetically by text files, then binary files.
+# Handles copied and moved files.
+#
+# Missing features:
+#
+# Handle copied and moved directories.
+
+use strict;
+use warnings;
+
+use Config;
+use Cwd;
+use File::Basename;
+use File::Spec;
+use File::stat;
+use Getopt::Long;
+use MIME::Base64;
+use POSIX qw(:errno_h);
+use Time::gmtime;
+
+sub binarycmp($$);
+sub canonicalizePath($);
+sub findBaseUrl($);
+sub findMimeType($;$);
+sub findModificationType($);
+sub findSourceFileAndRevision($);
+sub fixChangeLogPatch($);
+sub generateDiff($);
+sub generateFileList($\%);
+sub isBinaryMimeType($);
+sub manufacturePatchForAdditionWithHistory($);
+sub numericcmp($$);
+sub outputBinaryContent($);
+sub patchpathcmp($$);
+sub pathcmp($$);
+sub processPaths(\@);
+sub splitpath($);
+sub testfilecmp($$);
+
+$ENV{'LC_ALL'} = 'C';
+
+my $showHelp;
+
+my $result = GetOptions(
+ "help" => \$showHelp,
+);
+if (!$result || $showHelp) {
+ print STDERR basename($0) . " [-h|--help] [svndir1 [svndir2 ...]]\n";
+ exit 1;
+}
+
+# Sort the diffs for easier reviewing.
+my %paths = processPaths(@ARGV);
+
+# Generate a list of files requiring diffs.
+my %diffFiles;
+for my $path (keys %paths) {
+ generateFileList($path, %diffFiles);
+}
+
+# Generate the diffs, in a order chosen for easy reviewing.
+for my $path (sort patchpathcmp values %diffFiles) {
+ generateDiff($path);
+}
+
+exit 0;
+
+# Overall sort, considering multiple criteria.
+sub patchpathcmp($$)
+{
+ my ($a, $b) = @_;
+
+ # All binary files come after all non-binary files.
+ my $result = binarycmp($a, $b);
+ return $result if $result;
+
+ # All test files come after all non-test files.
+ $result = testfilecmp($a, $b);
+ return $result if $result;
+
+ # Final sort is a "smart" sort by directory and file name.
+ return pathcmp($a, $b);
+}
+
+# Sort so text files appear before binary files.
+sub binarycmp($$)
+{
+ my ($fileDataA, $fileDataB) = @_;
+ return $fileDataA->{isBinary} <=> $fileDataB->{isBinary};
+}
+
+sub canonicalizePath($)
+{
+ my ($file) = @_;
+
+ # Remove extra slashes and '.' directories in path
+ $file = File::Spec->canonpath($file);
+
+ # Remove '..' directories in path
+ my @dirs = ();
+ foreach my $dir (File::Spec->splitdir($file)) {
+ if ($dir eq '..' && $#dirs >= 0 && $dirs[$#dirs] ne '..') {
+ pop(@dirs);
+ } else {
+ push(@dirs, $dir);
+ }
+ }
+ return ($#dirs >= 0) ? File::Spec->catdir(@dirs) : ".";
+}
+
+sub findBaseUrl($)
+{
+ my ($infoPath) = @_;
+ my $baseUrl;
+ open INFO, "svn info '$infoPath' |" or die;
+ while (<INFO>) {
+ if (/^URL: (.+)/) {
+ $baseUrl = $1;
+ last;
+ }
+ }
+ close INFO;
+ return $baseUrl;
+}
+
+sub findMimeType($;$)
+{
+ my ($file, $revision) = @_;
+ my $args = $revision ? "--revision $revision" : "";
+ open PROPGET, "svn propget svn:mime-type $args '$file' |" or die;
+ my $mimeType = <PROPGET>;
+ close PROPGET;
+ chomp $mimeType if $mimeType;
+ return $mimeType;
+}
+
+sub findModificationType($)
+{
+ my ($stat) = @_;
+ my $fileStat = substr($stat, 0, 1);
+ my $propertyStat = substr($stat, 1, 1);
+ if ($fileStat eq "A") {
+ my $additionWithHistory = substr($stat, 3, 1);
+ return $additionWithHistory eq "+" ? "additionWithHistory" : "addition";
+ }
+ return "modification" if ($fileStat eq "M" || $propertyStat eq "M");
+ return "deletion" if ($fileStat eq "D");
+ return undef;
+}
+
+sub findSourceFileAndRevision($)
+{
+ my ($file) = @_;
+ my $baseUrl = findBaseUrl(".");
+ my $sourceFile;
+ my $sourceRevision;
+ open INFO, "svn info '$file' |" or die;
+ while (<INFO>) {
+ if (/^Copied From URL: (.+)/) {
+ $sourceFile = File::Spec->abs2rel($1, $baseUrl);
+ } elsif (/^Copied From Rev: ([0-9]+)/) {
+ $sourceRevision = $1;
+ }
+ }
+ close INFO;
+ return ($sourceFile, $sourceRevision);
+}
+
+sub fixChangeLogPatch($)
+{
+ my $patch = shift;
+ my $contextLineCount = 3;
+
+ return $patch if $patch !~ /\n@@ -1,(\d+) \+1,(\d+) @@\n( .*\n)+(\+.*\n)+( .*\n){$contextLineCount}$/m;
+ my ($oldLineCount, $newLineCount) = ($1, $2);
+ return $patch if $oldLineCount <= $contextLineCount;
+
+ # The diff(1) command is greedy when matching lines, so a new ChangeLog entry will
+ # have lines of context at the top of a patch when the existing entry has the same
+ # date and author as the new entry. This nifty loop alters a ChangeLog patch so
+ # that the added lines ("+") in the patch always start at the beginning of the
+ # patch and there are no initial lines of context.
+ my $newPatch;
+ my $lineCountInState = 0;
+ my $oldContentLineCountReduction = $oldLineCount - $contextLineCount;
+ my $newContentLineCountWithoutContext = $newLineCount - $oldLineCount - $oldContentLineCountReduction;
+ my ($stateHeader, $statePreContext, $stateNewChanges, $statePostContext) = (1..4);
+ my $state = $stateHeader;
+ foreach my $line (split(/\n/, $patch)) {
+ $lineCountInState++;
+ if ($state == $stateHeader && $line =~ /^@@ -1,$oldLineCount \+1,$newLineCount @\@$/) {
+ $line = "@@ -1,$contextLineCount +1," . ($newLineCount - $oldContentLineCountReduction) . " @@";
+ $lineCountInState = 0;
+ $state = $statePreContext;
+ } elsif ($state == $statePreContext && substr($line, 0, 1) eq " ") {
+ $line = "+" . substr($line, 1);
+ if ($lineCountInState == $oldContentLineCountReduction) {
+ $lineCountInState = 0;
+ $state = $stateNewChanges;
+ }
+ } elsif ($state == $stateNewChanges && substr($line, 0, 1) eq "+") {
+ # No changes to these lines
+ if ($lineCountInState == $newContentLineCountWithoutContext) {
+ $lineCountInState = 0;
+ $state = $statePostContext;
+ }
+ } elsif ($state == $statePostContext) {
+ if (substr($line, 0, 1) eq "+" && $lineCountInState <= $oldContentLineCountReduction) {
+ $line = " " . substr($line, 1);
+ } elsif ($lineCountInState > $contextLineCount && substr($line, 0, 1) eq " ") {
+ next; # Discard
+ }
+ }
+ $newPatch .= $line . "\n";
+ }
+
+ return $newPatch;
+}
+
+sub generateDiff($)
+{
+ my ($fileData) = @_;
+ my $file = $fileData->{path};
+ my $patch;
+ if ($fileData->{modificationType} eq "additionWithHistory") {
+ manufacturePatchForAdditionWithHistory($fileData);
+ }
+ open DIFF, "svn diff --diff-cmd diff -x -uaNp '$file' |" or die;
+ while (<DIFF>) {
+ $patch .= $_;
+ }
+ close DIFF;
+ $patch = fixChangeLogPatch($patch) if basename($file) eq "ChangeLog";
+ print $patch if $patch;
+ if ($fileData->{isBinary}) {
+ print "\n" if ($patch && $patch =~ m/\n\S+$/m);
+ outputBinaryContent($file);
+ }
+}
+
+sub generateFileList($\%)
+{
+ my ($statPath, $diffFiles) = @_;
+ my %testDirectories = map { $_ => 1 } qw(LayoutTests);
+ open STAT, "svn stat '$statPath' |" or die;
+ while (my $line = <STAT>) {
+ chomp $line;
+ my $stat = substr($line, 0, 7);
+ my $path = substr($line, 7);
+ next if -d $path;
+ my $modificationType = findModificationType($stat);
+ if ($modificationType) {
+ $diffFiles->{$path}->{path} = $path;
+ $diffFiles->{$path}->{modificationType} = $modificationType;
+ $diffFiles->{$path}->{isBinary} = isBinaryMimeType($path);
+ $diffFiles->{$path}->{isTestFile} = exists $testDirectories{(File::Spec->splitdir($path))[0]} ? 1 : 0;
+ if ($modificationType eq "additionWithHistory") {
+ my ($sourceFile, $sourceRevision) = findSourceFileAndRevision($path);
+ $diffFiles->{$path}->{sourceFile} = $sourceFile;
+ $diffFiles->{$path}->{sourceRevision} = $sourceRevision;
+ }
+ } else {
+ print STDERR $line, "\n";
+ }
+ }
+ close STAT;
+}
+
+sub isBinaryMimeType($)
+{
+ my ($file) = @_;
+ my $mimeType = findMimeType($file);
+ return 0 if (!$mimeType || substr($mimeType, 0, 5) eq "text/");
+ return 1;
+}
+
+sub manufacturePatchForAdditionWithHistory($)
+{
+ my ($fileData) = @_;
+ my $file = $fileData->{path};
+ print "Index: ${file}\n";
+ print "=" x 67, "\n";
+ my $sourceFile = $fileData->{sourceFile};
+ my $sourceRevision = $fileData->{sourceRevision};
+ print "--- ${file}\t(revision ${sourceRevision})\t(from ${sourceFile}:${sourceRevision})\n";
+ print "+++ ${file}\t(working copy)\n";
+ if ($fileData->{isBinary}) {
+ print "\nCannot display: file marked as a binary type.\n";
+ my $mimeType = findMimeType($file, $sourceRevision);
+ print "svn:mime-type = ${mimeType}\n\n";
+ } else {
+ print `svn cat ${sourceFile} | diff -u /dev/null - | tail -n +3`;
+ }
+}
+
+# Sort numeric parts of strings as numbers, other parts as strings.
+# Makes 1.33 come after 1.3, which is cool.
+sub numericcmp($$)
+{
+ my ($aa, $bb) = @_;
+
+ my @a = split /(\d+)/, $aa;
+ my @b = split /(\d+)/, $bb;
+
+ # Compare one chunk at a time.
+ # Each chunk is either all numeric digits, or all not numeric digits.
+ while (@a && @b) {
+ my $a = shift @a;
+ my $b = shift @b;
+
+ # Use numeric comparison if chunks are non-equal numbers.
+ return $a <=> $b if $a =~ /^\d/ && $b =~ /^\d/ && $a != $b;
+
+ # Use string comparison if chunks are any other kind of non-equal string.
+ return $a cmp $b if $a ne $b;
+ }
+
+ # One of the two is now empty; compare lengths for result in this case.
+ return @a <=> @b;
+}
+
+sub outputBinaryContent($)
+{
+ my ($path) = @_;
+ # Deletion
+ return if (! -e $path);
+ # Addition or Modification
+ my $buffer;
+ open BINARY, $path or die;
+ while (read(BINARY, $buffer, 60*57)) {
+ print encode_base64($buffer);
+ }
+ close BINARY;
+ print "\n";
+}
+
+# Sort first by directory, then by file, so all paths in one directory are grouped
+# rather than being interspersed with items from subdirectories.
+# Use numericcmp to sort directory and filenames to make order logical.
+# Also include a special case for ChangeLog, which comes first in any directory.
+sub pathcmp($$)
+{
+ my ($fileDataA, $fileDataB) = @_;
+
+ my ($dira, $namea) = splitpath($fileDataA->{path});
+ my ($dirb, $nameb) = splitpath($fileDataB->{path});
+
+ return numericcmp($dira, $dirb) if $dira ne $dirb;
+ return -1 if $namea eq "ChangeLog" && $nameb ne "ChangeLog";
+ return +1 if $namea ne "ChangeLog" && $nameb eq "ChangeLog";
+ return numericcmp($namea, $nameb);
+}
+
+sub processPaths(\@)
+{
+ my ($paths) = @_;
+ return ("." => 1) if (!@{$paths});
+
+ my %result = ();
+
+ for my $file (@{$paths}) {
+ die "can't handle absolute paths like \"$file\"\n" if File::Spec->file_name_is_absolute($file);
+ die "can't handle empty string path\n" if $file eq "";
+ die "can't handle path with single quote in the name like \"$file\"\n" if $file =~ /'/; # ' (keep Xcode syntax highlighting happy)
+
+ my $untouchedFile = $file;
+
+ $file = canonicalizePath($file);
+
+ die "can't handle paths with .. like \"$untouchedFile\"\n" if $file =~ m|/\.\./|;
+
+ $result{$file} = 1;
+ }
+
+ return ("." => 1) if ($result{"."});
+
+ # Remove any paths that also have a parent listed.
+ for my $path (keys %result) {
+ for (my $parent = dirname($path); $parent ne '.'; $parent = dirname($parent)) {
+ if ($result{$parent}) {
+ delete $result{$path};
+ last;
+ }
+ }
+ }
+
+ return %result;
+}
+
+# Break up a path into the directory (with slash) and base name.
+sub splitpath($)
+{
+ my ($path) = @_;
+
+ my $pathSeparator = "/";
+ my $dirname = dirname($path) . $pathSeparator;
+ $dirname = "" if $dirname eq "." . $pathSeparator;
+
+ return ($dirname, basename($path));
+}
+
+# Sort so source code files appear before test files.
+sub testfilecmp($$)
+{
+ my ($fileDataA, $fileDataB) = @_;
+ return $fileDataA->{isTestFile} <=> $fileDataB->{isTestFile};
+}
diff --git a/WebKitTools/Scripts/svn-unapply b/WebKitTools/Scripts/svn-unapply
new file mode 100755
index 0000000..35111ce
--- /dev/null
+++ b/WebKitTools/Scripts/svn-unapply
@@ -0,0 +1,374 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2005, 2006, 2007 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# "unpatch" script for WebKit Open Source Project, used to remove patches.
+
+# Differences from invoking "patch -p0 -R":
+#
+# Handles added files (does a svn revert with additional logic to handle local changes).
+# Handles added directories (does a svn revert and a rmdir).
+# Handles removed files (does a svn revert with additional logic to handle local changes).
+# Handles removed directories (does a svn revert).
+# Paths from Index: lines are used rather than the paths on the patch lines, which
+# makes patches generated by "cvs diff" work (increasingly unimportant since we
+# use Subversion now).
+# ChangeLog patches use --fuzz=3 to prevent rejects, and the entry date is reset in
+# the patch before it is applied (svn-apply sets it when applying a patch).
+# Handles binary files (requires patches made by svn-create-patch).
+# Handles copied and moved files (requires patches made by svn-create-patch).
+# Handles git-diff patches (without binary changes) created at the top-level directory
+#
+# Missing features:
+#
+# Handle property changes.
+# Handle copied and moved directories (would require patches made by svn-create-patch).
+# Use version numbers in the patch file and do a 3-way merge.
+# When reversing an addition, check that the file matches what's being removed.
+# Notice a patch that's being unapplied at the "wrong level" and make it work anyway.
+# Do a dry run on the whole patch and don't do anything if part of the patch is
+# going to fail (probably too strict unless we exclude ChangeLog).
+# Handle git-diff patches with binary changes
+
+use strict;
+use warnings;
+
+use Cwd;
+use Digest::MD5;
+use Fcntl qw(:DEFAULT :seek);
+use File::Basename;
+use File::Spec;
+use File::Temp qw(tempfile);
+use Getopt::Long;
+
+sub checksum($);
+sub fixChangeLogPatch($);
+sub gitdiff2svndiff($);
+sub patch($);
+sub revertDirectories();
+sub svnStatus($);
+sub unapplyPatch($$;$);
+sub unsetChangeLogDate($$);
+
+my $showHelp = 0;
+if (!GetOptions("help!" => \$showHelp) || $showHelp) {
+ print STDERR basename($0) . " [-h|--help] patch1 [patch2 ...]\n";
+ exit 1;
+}
+
+my @copiedFiles;
+my %directoriesToCheck;
+
+my $copiedFromPath;
+my $filter;
+my $indexPath;
+my $patch;
+while (<>) {
+ s/([\n\r]+)$//mg;
+ my $eol = $1;
+ if (!defined($indexPath) && m#^diff --git a/#) {
+ $filter = \&gitdiff2svndiff;
+ }
+ $_ = &$filter($_) if $filter;
+ if (/^Index: (.*)/) {
+ $indexPath = $1;
+ if ($patch) {
+ if ($copiedFromPath) {
+ push @copiedFiles, $patch;
+ } else {
+ patch($patch);
+ }
+ $copiedFromPath = "";
+ $patch = "";
+ }
+ }
+ if ($indexPath) {
+ # Fix paths on diff, ---, and +++ lines to match preceding Index: line.
+ s/^--- \S+/--- $indexPath/;
+ if (/^--- .+\(from (\S+):\d+\)$/) {
+ $copiedFromPath = $1;
+ }
+ if (s/^\+\+\+ \S+/+++ $indexPath/) {
+ $indexPath = "";
+ }
+ }
+ $patch .= $_;
+ $patch .= $eol;
+}
+
+if ($patch) {
+ if ($copiedFromPath) {
+ push @copiedFiles, $patch;
+ } else {
+ patch($patch);
+ }
+}
+
+# Handle copied and moved files last since they may have had post-copy changes that have now been unapplied
+for $patch (@copiedFiles) {
+ patch($patch);
+}
+
+revertDirectories();
+
+exit 0;
+
+sub checksum($)
+{
+ my $file = shift;
+ open(FILE, $file) or die "Can't open '$file': $!";
+ binmode(FILE);
+ my $checksum = Digest::MD5->new->addfile(*FILE)->hexdigest();
+ close(FILE);
+ return $checksum;
+}
+
+sub fixChangeLogPatch($)
+{
+ my $patch = shift;
+ my $contextLineCount = 3;
+
+ return $patch if $patch !~ /\n@@ -1,(\d+) \+1,(\d+) @@\n( .*\n)+(\+.*\n)+( .*\n){$contextLineCount}$/m;
+ my ($oldLineCount, $newLineCount) = ($1, $2);
+ return $patch if $oldLineCount <= $contextLineCount;
+
+ # The diff(1) command is greedy when matching lines, so a new ChangeLog entry will
+ # have lines of context at the top of a patch when the existing entry has the same
+ # date and author as the new entry. This nifty loop alters a ChangeLog patch so
+ # that the added lines ("+") in the patch always start at the beginning of the
+ # patch and there are no initial lines of context.
+ my $newPatch;
+ my $lineCountInState = 0;
+ my $oldContentLineCountReduction = $oldLineCount - $contextLineCount;
+ my $newContentLineCountWithoutContext = $newLineCount - $oldLineCount - $oldContentLineCountReduction;
+ my ($stateHeader, $statePreContext, $stateNewChanges, $statePostContext) = (1..4);
+ my $state = $stateHeader;
+ foreach my $line (split(/\n/, $patch)) {
+ $lineCountInState++;
+ if ($state == $stateHeader && $line =~ /^@@ -1,$oldLineCount \+1,$newLineCount @\@$/) {
+ $line = "@@ -1,$contextLineCount +1," . ($newLineCount - $oldContentLineCountReduction) . " @@";
+ $lineCountInState = 0;
+ $state = $statePreContext;
+ } elsif ($state == $statePreContext && substr($line, 0, 1) eq " ") {
+ $line = "+" . substr($line, 1);
+ if ($lineCountInState == $oldContentLineCountReduction) {
+ $lineCountInState = 0;
+ $state = $stateNewChanges;
+ }
+ } elsif ($state == $stateNewChanges && substr($line, 0, 1) eq "+") {
+ # No changes to these lines
+ if ($lineCountInState == $newContentLineCountWithoutContext) {
+ $lineCountInState = 0;
+ $state = $statePostContext;
+ }
+ } elsif ($state == $statePostContext) {
+ if (substr($line, 0, 1) eq "+" && $lineCountInState <= $oldContentLineCountReduction) {
+ $line = " " . substr($line, 1);
+ } elsif ($lineCountInState > $contextLineCount && substr($line, 0, 1) eq " ") {
+ next; # Discard
+ }
+ }
+ $newPatch .= $line . "\n";
+ }
+
+ return $newPatch;
+}
+
+sub gitdiff2svndiff($)
+{
+ $_ = shift @_;
+ if (m#^diff --git a/(.+) b/(.+)#) {
+ return "Index: $1";
+ } elsif (m/^new file.*/) {
+ return "";
+ } elsif (m#^index [0-9a-f]{7}\.\.[0-9a-f]{7} [0-9]{6}#) {
+ return "===================================================================";
+ } elsif (m#^--- a/(.+)#) {
+ return "--- $1";
+ } elsif (m#^\+\+\+ b/(.+)#) {
+ return "+++ $1";
+ }
+ return $_;
+}
+
+sub patch($)
+{
+ my ($patch) = @_;
+ return if !$patch;
+
+ unless ($patch =~ m|^Index: ([^\n]+)|) {
+ my $separator = '-' x 67;
+ warn "Failed to find 'Index:' in:\n$separator\n$patch\n$separator\n";
+ return;
+ }
+ my $fullPath = $1;
+ $directoriesToCheck{dirname($fullPath)} = 1;
+
+ my $deletion = 0;
+ my $addition = 0;
+ my $isBinary = 0;
+
+ $addition = 1 if ($patch =~ /\n--- .+\(revision 0\)\n/ || $patch =~ /\n@@ -0,0 .* @@/);
+ $deletion = 1 if $patch =~ /\n@@ .* \+0,0 @@/;
+ $isBinary = 1 if $patch =~ /\nCannot display: file marked as a binary type\./;
+
+ if (!$addition && !$deletion && !$isBinary) {
+ # Standard patch, patch tool can handle this.
+ if (basename($fullPath) eq "ChangeLog") {
+ my $changeLogDotOrigExisted = -f "${fullPath}.orig";
+ unapplyPatch(unsetChangeLogDate($fullPath, fixChangeLogPatch($patch)), $fullPath, ["--fuzz=3"]);
+ unlink("${fullPath}.orig") if (! $changeLogDotOrigExisted);
+ } else {
+ unapplyPatch($patch, $fullPath);
+ }
+ } else {
+ # Either a deletion, an addition or a binary change.
+
+ if ($isBinary) {
+ # Reverse binary change
+ unlink($fullPath) if (-e $fullPath);
+ system "svn", "revert", $fullPath;
+ } elsif ($deletion) {
+ # Reverse deletion
+ rename($fullPath, "$fullPath.orig") if -e $fullPath;
+
+ unapplyPatch($patch, $fullPath);
+
+ # If we don't ask for the filehandle here, we always get a warning.
+ my ($fh, $tempPath) = tempfile(basename($fullPath) . "-XXXXXXXX",
+ DIR => dirname($fullPath), UNLINK => 1);
+ close($fh);
+
+ # Keep the version from the patch in case it's different from svn.
+ rename($fullPath, $tempPath);
+ system "svn", "revert", $fullPath;
+ rename($tempPath, $fullPath);
+
+ # This works around a bug in the svn client.
+ # [Issue 1960] file modifications get lost due to FAT 2s time resolution
+ # http://subversion.tigris.org/issues/show_bug.cgi?id=1960
+ system "touch", $fullPath;
+
+ # Remove $fullPath.orig if it is the same as $fullPath
+ unlink("$fullPath.orig") if -e "$fullPath.orig" && checksum($fullPath) eq checksum("$fullPath.orig");
+
+ # Show status if the file is modifed
+ system "svn", "stat", $fullPath;
+ } else {
+ # Reverse addition
+ unapplyPatch($patch, $fullPath, ["--force"]);
+ unlink($fullPath) if -z $fullPath;
+ system "svn", "revert", $fullPath;
+ }
+ }
+}
+
+sub revertDirectories()
+{
+ my %checkedDirectories;
+ foreach my $path (reverse sort keys %directoriesToCheck) {
+ my @dirs = File::Spec->splitdir($path);
+ while (scalar @dirs) {
+ my $dir = File::Spec->catdir(@dirs);
+ pop(@dirs);
+ next if (exists $checkedDirectories{$dir});
+ if (-d $dir) {
+ my $svnOutput = svnStatus($dir);
+ if ($svnOutput && $svnOutput =~ m#A\s+$dir\n#) {
+ system "svn", "revert", $dir;
+ rmdir $dir;
+ }
+ elsif ($svnOutput && $svnOutput =~ m#D\s+$dir\n#) {
+ system "svn", "revert", $dir;
+ }
+ else {
+ # Modification
+ print $svnOutput if $svnOutput;
+ }
+ $checkedDirectories{$dir} = 1;
+ }
+ else {
+ die "'$dir' is not a directory";
+ }
+ }
+ }
+}
+
+sub svnStatus($)
+{
+ my ($fullPath) = @_;
+ my $svnStatus;
+ open SVN, "svn status --non-interactive --non-recursive '$fullPath' |" or die;
+ if (-d $fullPath) {
+ # When running "svn stat" on a directory, we can't assume that only one
+ # status will be returned (since any files with a status below the
+ # directory will be returned), and we can't assume that the directory will
+ # be first (since any files with unknown status will be listed first).
+ my $normalizedFullPath = File::Spec->catdir(File::Spec->splitdir($fullPath));
+ while (<SVN>) {
+ chomp;
+ my $normalizedStatPath = File::Spec->catdir(File::Spec->splitdir(substr($_, 7)));
+ if ($normalizedFullPath eq $normalizedStatPath) {
+ $svnStatus = $_;
+ last;
+ }
+ }
+ # Read the rest of the svn command output to avoid a broken pipe warning.
+ local $/ = undef;
+ <SVN>;
+ }
+ else {
+ # Files will have only one status returned.
+ $svnStatus = <SVN>;
+ }
+ close SVN;
+ return $svnStatus;
+}
+
+sub unapplyPatch($$;$)
+{
+ my ($patch, $fullPath, $options) = @_;
+ $options = [] if (! $options);
+ my $command = "patch " . join(" ", "-p0", "-R", @{$options});
+ open PATCH, "| $command" or die "Failed to patch $fullPath: $!";
+ print PATCH $patch;
+ close PATCH;
+}
+
+sub unsetChangeLogDate($$)
+{
+ my $fullPath = shift;
+ my $patch = shift;
+ my $newDate;
+ sysopen(CHANGELOG, $fullPath, O_RDONLY) or die "Failed to open $fullPath: $!";
+ sysseek(CHANGELOG, 0, SEEK_SET);
+ my $byteCount = sysread(CHANGELOG, $newDate, 10);
+ die "Failed reading $fullPath: $!" if !$byteCount || $byteCount != 10;
+ close(CHANGELOG);
+ $patch =~ s/(\n\+)\d{4}-[^-]{2}-[^-]{2}( )/$1$newDate$2/;
+ return $patch;
+}
diff --git a/WebKitTools/Scripts/update-iexploder-cssproperties b/WebKitTools/Scripts/update-iexploder-cssproperties
new file mode 100755
index 0000000..b7ae6cb
--- /dev/null
+++ b/WebKitTools/Scripts/update-iexploder-cssproperties
@@ -0,0 +1,112 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2007 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.
+# 3. Neither the name of Apple Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# This script updates WebKitTools/iExploder/htdocs/cssproperties.in based on
+# WebCore/css/CSSPropertyNames.in.
+
+use warnings;
+use strict;
+
+use FindBin;
+use lib $FindBin::Bin;
+use webkitdirs;
+
+use File::Spec;
+
+sub generateSectionFromCSSPropertyNamesFile();
+sub readiExploderFile();
+sub svnRevision($);
+sub writeiExploderFile();
+
+my $iExploderFile = File::Spec->catfile(sourceDir(), split("/", "WebKitTools/iExploder/htdocs/cssproperties.in"));
+my $cssPropertyNamesFile = File::Spec->catfile(sourceDir(), split("/", "WebCore/css/CSSPropertyNames.in"));
+
+my @sections = readiExploderFile();
+$sections[0] = generateSectionFromCSSPropertyNamesFile();
+writeiExploderFile();
+
+print `svn stat $iExploderFile`;
+print "Successfully updated!\n";
+
+exit 0;
+
+sub generateSectionFromCSSPropertyNamesFile()
+{
+ my $revision = svnRevision($cssPropertyNamesFile);
+ my $path = File::Spec->abs2rel($cssPropertyNamesFile, sourceDir());
+ my $result = "# From WebKit svn r" . $revision . " (" . $path . ")\n";
+
+ my @properties = ();
+
+ open(IN, $cssPropertyNamesFile) || die "$!";
+ while (my $l = <IN>) {
+ chomp $l;
+ next if $l =~ m/^\s*#/ || $l =~ m/^\s*$/;
+ push(@properties, $l);
+ }
+ close(IN);
+
+ $result .= join("\n", sort { $a cmp $b } @properties) . "\n\n";
+
+ return $result;
+}
+
+sub readiExploderFile()
+{
+ my @sections = ();
+ local $/ = "\n\n";
+
+ open(IN, $iExploderFile) || die "$!";
+ @sections = <IN>;
+ close(IN);
+
+ return @sections;
+}
+
+sub svnRevision($)
+{
+ my ($file) = @_;
+ my $revision = "";
+
+ open INFO, "svn info '$file' |" or die;
+ while (<INFO>) {
+ if (/^Revision: (.+)/) {
+ $revision = $1;
+ }
+ }
+ close INFO;
+
+ return $revision ? $revision : "UNKNOWN";
+}
+
+sub writeiExploderFile()
+{
+ open(OUT, "> $iExploderFile") || die "$!";
+ print OUT join("", @sections);
+ close(OUT);
+}
diff --git a/WebKitTools/Scripts/update-javascriptcore-test-results b/WebKitTools/Scripts/update-javascriptcore-test-results
new file mode 100755
index 0000000..dd8b9b6
--- /dev/null
+++ b/WebKitTools/Scripts/update-javascriptcore-test-results
@@ -0,0 +1,73 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2005, 2007 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+use strict;
+use FindBin;
+use Getopt::Long;
+use lib $FindBin::Bin;
+use webkitdirs;
+
+chdirWebKit();
+chdir "JavaScriptCore/tests/mozilla" or die;
+
+my $force = 0;
+GetOptions('force' => \$force);
+
+open EXPECTED, "expected.html" or die;
+while (<EXPECTED>) {
+ last if /failures reported\.$/;
+}
+my %expected;
+while (<EXPECTED>) {
+ chomp;
+ $expected{$_} = 1;
+}
+close EXPECTED;
+
+open ACTUAL, "actual.html" or die;
+my $actual;
+while (<ACTUAL>) {
+ $actual .= $_;
+ last if /failures reported\.$/;
+}
+my $failed = 0;
+while (<ACTUAL>) {
+ $actual .= $_;
+ chomp;
+ if (!$expected{$_}) {
+ $failed = 1;
+ print "failure not expected: $_\n";
+ }
+}
+close ACTUAL;
+
+die "won't update, failures introduced\n" if $failed && !$force;
+
+open EXPECTED, ">expected.html";
+print EXPECTED $actual;
+close EXPECTED;
diff --git a/WebKitTools/Scripts/update-sources-list.py b/WebKitTools/Scripts/update-sources-list.py
new file mode 100644
index 0000000..e565059
--- /dev/null
+++ b/WebKitTools/Scripts/update-sources-list.py
@@ -0,0 +1,93 @@
+#!/usr/bin/python
+
+# Copyright (C) 2007 Kevin Ollivier 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 COMPUTER, INC. ``AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Make sure any port-independent files added to the Bakefile are
+# added to GTK, QT, etc. so that file updates can happen in one place.
+
+import os, sys
+from xml.dom import minidom
+
+scriptDir = os.path.abspath(sys.path[0])
+wkroot = os.path.abspath(os.path.join(scriptDir, "../.."))
+
+def getWebCoreFilesDict():
+ """
+ This method parses the WebCoreSources.bkl file, which has a list of all sources not specific
+ to any port, and returns the result as a dictionary with items of the form
+ (groupName, groupFiles).
+ """
+ sources = {}
+ sources_prefix = "WEBCORE_"
+ filepath = os.path.join(wkroot, "WebCore/WebCoreSources.bkl")
+ assert(os.path.exists(filepath))
+
+ doc = minidom.parse(filepath)
+ for sourceGroup in doc.getElementsByTagName("set"):
+ groupName = ""
+ if sourceGroup.attributes.has_key("var"):
+ groupName = sourceGroup.attributes["var"].value
+ groupName = groupName.replace(sources_prefix, "")
+
+ sourcesList = []
+ for node in sourceGroup.childNodes:
+ if node.nodeType == node.TEXT_NODE:
+ sourcesText = node.nodeValue.strip()
+ sourcesList = sourcesText.split("\n")
+
+ assert(groupName != "")
+ assert(sourcesList != [])
+
+ sources[groupName] = sourcesList
+
+ return sources
+
+def generateWebCoreSourcesGTKAndQT(sources):
+ """
+ Convert the dictionary obtained from getWebCoreFilesDict() into a Unix makefile syntax,
+ which IIUC is suitable for both GTK and QT build systems. To take advantage of this,
+ QT and GTK would have to include the file "WebCore/sources.inc" into their makefiles.
+ """
+ makefileString = ""
+
+ for key in sources.keys():
+ makefileString += key + "+="
+ for source in sources[key]:
+ makefileString += " \\\n\t\t" + source.strip()
+
+ makefileString += "\n\n"
+
+ makefileString += "BASE_SOURCES +="
+ for key in sources.keys():
+ makefileString += " \\\n\t\t" + key
+
+ outfile = os.path.join(wkroot, "WebCore/sources.inc")
+ sourcefile = open(outfile, "w")
+ sourcefile.write(makefileString)
+ sourcefile.close()
+
+sources = getWebCoreFilesDict()
+generateWebCoreSourcesGTKAndQT(sources)
+
+# Coming soon - MSVC and hopefully XCode support!
diff --git a/WebKitTools/Scripts/update-webkit b/WebKitTools/Scripts/update-webkit
new file mode 100755
index 0000000..c236934
--- /dev/null
+++ b/WebKitTools/Scripts/update-webkit
@@ -0,0 +1,92 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2005, 2006, 2007, 2008 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Update script for WebKit Open Source Project.
+
+use strict;
+use FindBin;
+use lib $FindBin::Bin;
+use File::Basename;
+use File::Spec;
+use Getopt::Long;
+use webkitdirs;
+
+sub runSvnUpdate();
+
+# Handle options
+my $quiet = '';
+my $showHelp;
+
+my $getOptionsResult = GetOptions(
+ 'h|help' => \$showHelp,
+ 'q|quiet' => \$quiet,
+);
+
+if (!$getOptionsResult || $showHelp) {
+ print STDERR <<__END__;
+Usage: @{[ basename($0) ]} [options]
+ -h|--help show the help message
+ -q|--quiet pass -q to svn update for quiet updates
+__END__
+ exit 1;
+}
+
+my @svnOptions = ();
+push @svnOptions, '-q' if $quiet;
+
+chdirWebKit();
+print "Updating OpenSource\n" unless $quiet;
+runSvnUpdate();
+
+if (-d "../Internal") {
+ chdir("../Internal");
+ print "Updating Internal\n" unless $quiet;
+ runSvnUpdate();
+} elsif (isAppleWinWebKit()) {
+ system("perl", "WebKitTools/Scripts/update-webkit-auxiliary-libs") == 0 or die;
+}
+
+exit 0;
+
+sub runSvnUpdate()
+{
+ open UPDATE, "-|", "svn", "update", @svnOptions or die;
+ my @conflictedChangeLogs;
+ while (my $line = <UPDATE>) {
+ print $line;
+ push @conflictedChangeLogs, $1 if $line =~ m/^C\s+(.+)\s*$/ && basename($1) eq "ChangeLog";
+ }
+ close UPDATE or die;
+
+ if (@conflictedChangeLogs) {
+ print "Attempting to merge conflicted ChangeLogs.\n";
+ my $resolveChangeLogsPath = File::Spec->catfile(dirname($0), "resolve-ChangeLogs");
+ (system($resolveChangeLogsPath, "--no-warnings", @conflictedChangeLogs) == 0)
+ or die "Could not open resolve-ChangeLogs script: $!.\n";
+ }
+}
diff --git a/WebKitTools/Scripts/update-webkit-auxiliary-libs b/WebKitTools/Scripts/update-webkit-auxiliary-libs
new file mode 100755
index 0000000..1d6943c
--- /dev/null
+++ b/WebKitTools/Scripts/update-webkit-auxiliary-libs
@@ -0,0 +1,121 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2005, 2006, 2007 Apple Computer, 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Updates a development environment to the new WebKitAuxiliaryLibrary
+
+use strict;
+use warnings;
+
+use HTTP::Date qw(str2time);
+use File::Find;
+use File::Temp;
+use File::Spec;
+use FindBin;
+use lib $FindBin::Bin;
+use webkitdirs;
+
+sub lastModifiedToUnixTime($);
+
+# Time in seconds that the new zip file must be newer than the old for us to
+# consider them to be different. If the difference in modification time is less
+# than this threshold, we assume that the files are the same. We need this
+# because the zip file is served from a set of mirrors with slightly different
+# Last-Modified times.
+my $newnessThreshold = 30;
+
+my $sourceDir = sourceDir();
+my $file = "WebKitAuxiliaryLibrary";
+my $zipFile = "$file.zip";
+my $auxiliaryLibsURL = "http://developer.apple.com/opensource/internet/$zipFile";
+my $webkitLibrariesDir = toUnixPath($ENV{'WEBKITLIBRARIESDIR'}) || "$sourceDir/WebKitLibraries/win";
+my $tmpDir = File::Spec->rel2abs(File::Temp::tempdir("webkitlibsXXXXXXX", TMPDIR => 1, CLEANUP => 1));
+
+print "Checking Last-Modified date of $zipFile...\n";
+
+my $result = system "curl -s -I $auxiliaryLibsURL | grep Last-Modified > \"$tmpDir/$file.headers\"";
+print STDERR "Couldn't check Last-Modified date of new $zipFile.\n" if $result;
+
+if (!$result && open NEW, "$tmpDir/$file.headers") {
+ my $new = lastModifiedToUnixTime(<NEW>);
+ close NEW;
+
+ if (defined $new && open OLD, "$webkitLibrariesDir/$file.headers") {
+ my $old = lastModifiedToUnixTime(<OLD>);
+ close OLD;
+ if (defined $old && abs($new - $old) < $newnessThreshold) {
+ print "Current $file is up to date\n";
+ exit 0;
+ }
+ }
+}
+
+print "Downloading $zipFile...\n\n";
+$result = system "curl -o \"$tmpDir/$zipFile\" $auxiliaryLibsURL";
+die "Couldn't download $zipFile!" if $result;
+
+$result = system "unzip", "-q", "-d", $tmpDir, "$tmpDir/$zipFile";
+die "Couldn't unzip $zipFile." if $result;
+
+print "\nInstalling $file...\n";
+
+sub wanted
+{
+ my $relativeName = File::Spec->abs2rel($File::Find::name, "$tmpDir/$file/win");
+ my $destination = "$webkitLibrariesDir/$relativeName";
+
+ if (-d $_) {
+ mkdir $destination;
+ return;
+ }
+
+ system "cp", $_, $destination;
+}
+
+File::Find::find(\&wanted, "$tmpDir/$file");
+
+$result = system "mv", "$tmpDir/$file.headers", $webkitLibrariesDir;
+print STDERR "Couldn't move $file.headers to $webkitLibrariesDir" . ".\n" if $result;
+
+print "The $file has been sucessfully installed in\n $webkitLibrariesDir\n";
+exit;
+
+sub toUnixPath
+{
+ my $path = shift;
+ return unless $path;
+ chomp($path = `cygpath -u '$path'`);
+ return $path;
+}
+
+sub lastModifiedToUnixTime($)
+{
+ my ($str) = @_;
+
+ $str =~ /^Last-Modified: (.*)$/ or return;
+ return str2time($1);
+}
diff --git a/WebKitTools/Scripts/update-webkit-localizable-strings b/WebKitTools/Scripts/update-webkit-localizable-strings
new file mode 100755
index 0000000..350bf21
--- /dev/null
+++ b/WebKitTools/Scripts/update-webkit-localizable-strings
@@ -0,0 +1,46 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2006, 2007 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+use strict;
+use warnings;
+
+use File::Basename;
+use FindBin;
+use lib $FindBin::Bin;
+use webkitdirs;
+
+my @directoriesToScan = ("WebKit/mac", "WebKit/win");
+my $fileToUpdate = "WebKit/English.lproj/Localizable.strings";
+my $exceptionsFile = "WebKit/StringsNotToBeLocalized.txt";
+
+@ARGV == 0 or die "Usage: " . basename($0) . "\n";
+
+chdirWebKit();
+
+system "sort -u $exceptionsFile -o $exceptionsFile";
+exec "extract-localizable-strings", $exceptionsFile, $fileToUpdate, @directoriesToScan;
diff --git a/WebKitTools/Scripts/update-webkit-support-libs b/WebKitTools/Scripts/update-webkit-support-libs
new file mode 100755
index 0000000..c4555f3
--- /dev/null
+++ b/WebKitTools/Scripts/update-webkit-support-libs
@@ -0,0 +1,133 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2005, 2006, 2007 Apple Computer, 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Updates a development environment to the new WebKitSupportLibrary
+
+use strict;
+use warnings;
+
+use File::Find;
+use File::Temp;
+use File::Spec;
+use FindBin;
+use lib $FindBin::Bin;
+use webkitdirs;
+
+my $expectedMD5 = "a1341aadbcce1ef26dad2b2895457314";
+
+my $sourceDir = sourceDir();
+my $file = "WebKitSupportLibrary";
+my $zipFile = "$file.zip";
+my $zipDirectory = toUnixPath($ENV{'WEBKITSUPPORTLIBRARIESZIPDIR'}) || $sourceDir;
+my $pathToZip = File::Spec->catfile($zipDirectory, $zipFile);
+my $webkitLibrariesDir = toUnixPath($ENV{'WEBKITLIBRARIESDIR'}) || "$sourceDir/WebKitLibraries/win";
+my $tmpDir = File::Spec->rel2abs(File::Temp::tempdir("webkitlibsXXXXXXX", TMPDIR => 1, CLEANUP => 1));
+
+# Make sure the file zipfile exists and matches the expected MD5 before doing anything.
+
+-f $pathToZip or dieAndInstructToDownload("$zipFile could not be find in your root source directory.");
+
+`md5sum "$pathToZip"` =~ /^([0-9a-fA-F]{32}).*/ or die "Error running md5sum on \"$pathToZip\"";
+my $actualMD5 = $1;
+$actualMD5 eq $expectedMD5 or dieAndInstructToDownload("$zipFile is out of date.");
+
+print "Checking mod-date of $zipFile...\n";
+open MOD, ">$tmpDir/$file.modified" or die "Couldn't open $tmpDir/$file.modified for writing";
+print MOD (stat $pathToZip)[9] . "\n";
+close MOD;
+
+if (open NEW, "$tmpDir/$file.modified") {
+ my $new = <NEW>;
+ close NEW;
+
+ if (open OLD, "$webkitLibrariesDir/$file.modified") {
+ my $old = <OLD>;
+ close OLD;
+ if ($old eq $new) {
+ print "Current $file is up to date\n";
+ exit 0;
+ }
+ }
+}
+
+my $result = system "unzip", "-q", "-d", $tmpDir, $pathToZip;
+die "Couldn't unzip $zipFile." if $result;
+
+print "\nInstalling $file...\n";
+
+sub wanted
+{
+ my $relativeName = File::Spec->abs2rel($File::Find::name, "$tmpDir/$file/win");
+ my $destination = "$webkitLibrariesDir/$relativeName";
+
+ if (-d $_) {
+ mkdir $destination;
+ return;
+ }
+
+ system "cp", $_, $destination;
+}
+
+File::Find::find(\&wanted, "$tmpDir/$file");
+
+$result = system "mv", "$tmpDir/$file.modified", $webkitLibrariesDir;
+print STDERR "Couldn't move $file.modified to $webkitLibrariesDir" . ".\n" if $result;
+
+print "The $file has been sucessfully installed in\n $webkitLibrariesDir\n";
+exit;
+
+sub toUnixPath
+{
+ my $path = shift;
+ return unless $path;
+ chomp($path = `cygpath -u '$path'`);
+ return $path;
+}
+
+sub dieAndInstructToDownload
+{
+ my $message = shift;
+
+ die <<EOF;
+
+===============================================================================
+$message
+Please download $zipFile from:
+
+ http://developer.apple.com/opensource/internet/webkit_sptlib_agree.html
+
+and place it in:
+
+ $sourceDir
+
+Then run build-webkit again.
+===============================================================================
+
+EOF
+
+}
diff --git a/WebKitTools/Scripts/webkitdirs.pm b/WebKitTools/Scripts/webkitdirs.pm
new file mode 100644
index 0000000..f9f05d3
--- /dev/null
+++ b/WebKitTools/Scripts/webkitdirs.pm
@@ -0,0 +1,1249 @@
+# Copyright (C) 2005, 2006, 2007 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Module to share code to get to WebKit directories.
+
+use strict;
+use warnings;
+use FindBin;
+use File::Basename;
+use POSIX;
+use VCSUtils;
+
+BEGIN {
+ use Exporter ();
+ our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
+ $VERSION = 1.00;
+ @ISA = qw(Exporter);
+ @EXPORT = qw(&chdirWebKit &baseProductDir &productDir &XcodeOptions &XcodeOptionString &XcodeOptionStringNoConfig &passedConfiguration &setConfiguration &safariPath &checkFrameworks &currentSVNRevision);
+ %EXPORT_TAGS = ( );
+ @EXPORT_OK = ();
+}
+
+our @EXPORT_OK;
+
+my $architecture;
+my $baseProductDir;
+my @baseProductDirOption;
+my $configuration;
+my $configurationForVisualStudio;
+my $configurationProductDir;
+my $sourceDir;
+my $currentSVNRevision;
+my $osXVersion;
+my $isQt;
+my $isGtk;
+my $isWx;
+my @wxArgs;
+my $isChromium;
+
+# Variables for Win32 support
+my $vcBuildPath;
+my $windowsTmpPath;
+
+sub determineSourceDir
+{
+ return if $sourceDir;
+ $sourceDir = $FindBin::Bin;
+ $sourceDir =~ s|/+$||; # Remove trailing '/' as we would die later
+
+ # walks up path checking each directory to see if it is the main WebKit project dir,
+ # defined by containing JavaScriptCore, WebCore, and WebKit
+ until ((-d "$sourceDir/JavaScriptCore" && -d "$sourceDir/WebCore" && -d "$sourceDir/WebKit") || (-d "$sourceDir/Internal" && -d "$sourceDir/OpenSource"))
+ {
+ if ($sourceDir !~ s|/[^/]+$||) {
+ die "Could not find top level webkit directory above source directory using FindBin.\n";
+ }
+ }
+
+ $sourceDir = "$sourceDir/OpenSource" if -d "$sourceDir/OpenSource";
+}
+
+# used for scripts which are stored in a non-standard location
+sub setSourceDir($)
+{
+ ($sourceDir) = @_;
+}
+
+sub determineBaseProductDir
+{
+ return if defined $baseProductDir;
+ determineSourceDir();
+ if (isAppleMacWebKit()) {
+ open PRODUCT, "defaults read com.apple.Xcode PBXApplicationwideBuildSettings 2> /dev/null |" or die;
+ $baseProductDir = join '', <PRODUCT>;
+ close PRODUCT;
+
+ $baseProductDir = $1 if $baseProductDir =~ /SYMROOT\s*=\s*\"(.*?)\";/s;
+ undef $baseProductDir unless $baseProductDir =~ /^\//;
+
+ if (!defined($baseProductDir)) {
+ open PRODUCT, "defaults read com.apple.Xcode PBXProductDirectory 2> /dev/null |" or die;
+ $baseProductDir = <PRODUCT>;
+ close PRODUCT;
+ if ($baseProductDir) {
+ chomp $baseProductDir;
+ undef $baseProductDir unless $baseProductDir =~ /^\//;
+ }
+ }
+ } else {
+ $baseProductDir = $ENV{"WEBKITOUTPUTDIR"};
+ if (isAppleWinWebKit() && $baseProductDir) {
+ my $unixBuildPath = `cygpath --unix \"$baseProductDir\"`;
+ chomp $unixBuildPath;
+ $baseProductDir = $unixBuildPath;
+ }
+ }
+
+ if ($baseProductDir && isAppleMacWebKit()) {
+ $baseProductDir =~ s|^\Q$(SRCROOT)/..\E$|$sourceDir|;
+ $baseProductDir =~ s|^\Q$(SRCROOT)/../|$sourceDir/|;
+ $baseProductDir =~ s|^~/|$ENV{HOME}/|;
+ die "Can't handle Xcode product directory with a ~ in it.\n" if $baseProductDir =~ /~/;
+ die "Can't handle Xcode product directory with a variable in it.\n" if $baseProductDir =~ /\$/;
+ @baseProductDirOption = ();
+ }
+
+ if (!defined($baseProductDir)) {
+ $baseProductDir = "$sourceDir/WebKitBuild";
+
+ if (isGit() && isGitBranchBuild()) {
+ my $branch = gitBranch();
+ $baseProductDir = "$baseProductDir/$branch";
+ }
+
+ @baseProductDirOption = ("SYMROOT=$baseProductDir", "OBJROOT=$baseProductDir") if (isAppleMacWebKit());
+ if (isCygwin()) {
+ my $dosBuildPath = `cygpath --windows \"$baseProductDir\"`;
+ chomp $dosBuildPath;
+ $ENV{"WEBKITOUTPUTDIR"} = $dosBuildPath;
+ }
+ }
+}
+
+sub setBaseProductDir($)
+{
+ ($baseProductDir) = @_;
+}
+
+sub determineConfiguration
+{
+ return if defined $configuration;
+ determineBaseProductDir();
+ if (open CONFIGURATION, "$baseProductDir/Configuration") {
+ $configuration = <CONFIGURATION>;
+ close CONFIGURATION;
+ }
+ if ($configuration) {
+ chomp $configuration;
+ # compatibility for people who have old Configuration files
+ $configuration = "Release" if $configuration eq "Deployment";
+ $configuration = "Debug" if $configuration eq "Development";
+ } else {
+ $configuration = "Release";
+ }
+}
+
+sub determineArchitecture
+{
+ return if defined $architecture;
+ # make sure $architecture is defined for non-apple-mac builds
+ $architecture = "";
+ return unless isAppleMacWebKit();
+
+ determineBaseProductDir();
+ if (open ARCHITECTURE, "$baseProductDir/Architecture") {
+ $architecture = <ARCHITECTURE>;
+ close ARCHITECTURE;
+ }
+ if ($architecture) {
+ chomp $architecture;
+ } else {
+ if (isTiger() or isLeopard()) {
+ $architecture = `arch`;
+ } else {
+ my $supports64Bit = `sysctl -n hw.optional.x86_64`;
+ chomp $supports64Bit;
+ $architecture = $supports64Bit ? 'x86_64' : `arch`;
+ }
+ chomp $architecture;
+ }
+}
+
+sub argumentsForConfiguration()
+{
+ determineConfiguration();
+ determineArchitecture();
+
+ my @args = ();
+ push(@args, '--debug') if $configuration eq "Debug";
+ push(@args, '--release') if $configuration eq "Release";
+ push(@args, '--32-bit') if $architecture ne "x86_64";
+ push(@args, '--qt') if isQt();
+ push(@args, '--gtk') if isGtk();
+ push(@args, '--wx') if isWx();
+ push(@args, '--chromium') if isChromium();
+ return @args;
+}
+
+sub determineConfigurationForVisualStudio
+{
+ return if defined $configurationForVisualStudio;
+ determineConfiguration();
+ $configurationForVisualStudio = $configuration;
+ return unless $configuration eq "Debug";
+ setupCygwinEnv();
+ chomp(my $dir = `cygpath -ua '$ENV{WEBKITLIBRARIESDIR}'`);
+ $configurationForVisualStudio = "Debug_Internal" if -f "$dir/bin/CoreFoundation_debug.dll";
+}
+
+sub determineConfigurationProductDir
+{
+ return if defined $configurationProductDir;
+ determineBaseProductDir();
+ determineConfiguration();
+ if (isAppleWinWebKit() && !isWx()) {
+ $configurationProductDir = "$baseProductDir/bin";
+ } else {
+ $configurationProductDir = "$baseProductDir/$configuration";
+ }
+}
+
+sub setConfigurationProductDir($)
+{
+ ($configurationProductDir) = @_;
+}
+
+sub determineCurrentSVNRevision
+{
+ return if defined $currentSVNRevision;
+ determineSourceDir();
+ $currentSVNRevision = svnRevisionForDirectory($sourceDir);
+ return $currentSVNRevision;
+}
+
+
+sub chdirWebKit
+{
+ determineSourceDir();
+ chdir $sourceDir or die;
+}
+
+sub baseProductDir
+{
+ determineBaseProductDir();
+ return $baseProductDir;
+}
+
+sub sourceDir
+{
+ determineSourceDir();
+ return $sourceDir;
+}
+
+sub productDir
+{
+ determineConfigurationProductDir();
+ return $configurationProductDir;
+}
+
+sub configuration()
+{
+ determineConfiguration();
+ return $configuration;
+}
+
+sub configurationForVisualStudio()
+{
+ determineConfigurationForVisualStudio();
+ return $configurationForVisualStudio;
+}
+
+sub currentSVNRevision
+{
+ determineCurrentSVNRevision();
+ return $currentSVNRevision;
+}
+
+sub XcodeOptions
+{
+ determineBaseProductDir();
+ determineConfiguration();
+ determineArchitecture();
+ return (@baseProductDirOption, "-configuration", $configuration, "ARCHS=$architecture");
+}
+
+sub XcodeOptionString
+{
+ return join " ", XcodeOptions();
+}
+
+sub XcodeOptionStringNoConfig
+{
+ return join " ", @baseProductDirOption;
+}
+
+sub XcodeCoverageSupportOptions()
+{
+ my @coverageSupportOptions = ();
+ push @coverageSupportOptions, "GCC_GENERATE_TEST_COVERAGE_FILES=YES";
+ push @coverageSupportOptions, "GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES";
+ push @coverageSupportOptions, "EXTRA_LINK= \$(EXTRA_LINK) -ftest-coverage -fprofile-arcs";
+ push @coverageSupportOptions, "OTHER_CFLAGS= \$(OTHER_CFLAGS) -MD";
+ push @coverageSupportOptions, "OTHER_LDFLAGS=\$(OTHER_LDFLAGS) -ftest-coverage -fprofile-arcs -framework AppKit";
+ return @coverageSupportOptions;
+}
+
+my $passedConfiguration;
+my $searchedForPassedConfiguration;
+sub determinePassedConfiguration
+{
+ return if $searchedForPassedConfiguration;
+ $searchedForPassedConfiguration = 1;
+
+ my $isWinCairo = checkForArgumentAndRemoveFromARGV("--cairo-win32");
+
+ for my $i (0 .. $#ARGV) {
+ my $opt = $ARGV[$i];
+ if ($opt =~ /^--debug$/i || $opt =~ /^--devel/i) {
+ splice(@ARGV, $i, 1);
+ $passedConfiguration = "Debug";
+ $passedConfiguration .= "_Cairo" if ($isWinCairo && isCygwin());
+ return;
+ }
+ if ($opt =~ /^--release$/i || $opt =~ /^--deploy/i) {
+ splice(@ARGV, $i, 1);
+ $passedConfiguration = "Release";
+ $passedConfiguration .= "_Cairo" if ($isWinCairo && isCygwin());
+ return;
+ }
+ if ($opt =~ /^--profil(e|ing)$/i) {
+ splice(@ARGV, $i, 1);
+ $passedConfiguration = "Profiling";
+ $passedConfiguration .= "_Cairo" if ($isWinCairo && isCygwin());
+ return;
+ }
+ }
+ $passedConfiguration = undef;
+}
+
+sub passedConfiguration
+{
+ determinePassedConfiguration();
+ return $passedConfiguration;
+}
+
+sub setConfiguration
+{
+ setArchitecture();
+
+ if (my $config = shift @_) {
+ $configuration = $config;
+ return;
+ }
+
+ determinePassedConfiguration();
+ $configuration = $passedConfiguration if $passedConfiguration;
+}
+
+
+my $passedArchitecture;
+my $searchedForPassedArchitecture;
+sub determinePassedArchitecture
+{
+ return if $searchedForPassedArchitecture;
+ $searchedForPassedArchitecture = 1;
+
+ for my $i (0 .. $#ARGV) {
+ my $opt = $ARGV[$i];
+ if ($opt =~ /^--32-bit$/i) {
+ splice(@ARGV, $i, 1);
+ if (isAppleMacWebKit()) {
+ $passedArchitecture = `arch`;
+ chomp $passedArchitecture;
+ }
+ return;
+ }
+ }
+ $passedArchitecture = undef;
+}
+
+sub passedArchitecture
+{
+ determinePassedArchitecture();
+ return $passedArchitecture;
+}
+
+sub architecture()
+{
+ determineArchitecture();
+ return $architecture;
+}
+
+sub setArchitecture
+{
+ if (my $arch = shift @_) {
+ $architecture = $arch;
+ return;
+ }
+
+ determinePassedArchitecture();
+ $architecture = $passedArchitecture if $passedArchitecture;
+}
+
+
+sub safariPathFromSafariBundle
+{
+ my ($safariBundle) = @_;
+
+ return "$safariBundle/Contents/MacOS/Safari" if isAppleMacWebKit();
+ return $safariBundle if isAppleWinWebKit();
+}
+
+sub installedSafariPath
+{
+ my $safariBundle;
+
+ if (isAppleMacWebKit()) {
+ $safariBundle = "/Applications/Safari.app";
+ } elsif (isAppleWinWebKit()) {
+ $safariBundle = `"$configurationProductDir/FindSafari.exe"`;
+ $safariBundle =~ s/[\r\n]+$//;
+ $safariBundle = `cygpath -u '$safariBundle'`;
+ $safariBundle =~ s/[\r\n]+$//;
+ $safariBundle .= "Safari.exe";
+ }
+
+ return safariPathFromSafariBundle($safariBundle);
+}
+
+# Locate Safari.
+sub safariPath
+{
+ # Use WEBKIT_SAFARI environment variable if present.
+ my $safariBundle = $ENV{WEBKIT_SAFARI};
+ if (!$safariBundle) {
+ determineConfigurationProductDir();
+ # Use Safari.app in product directory if present (good for Safari development team).
+ if (isAppleMacWebKit() && -d "$configurationProductDir/Safari.app") {
+ $safariBundle = "$configurationProductDir/Safari.app";
+ } elsif (isAppleWinWebKit() && -x "$configurationProductDir/bin/Safari.exe") {
+ $safariBundle = "$configurationProductDir/bin/Safari.exe";
+ } else {
+ return installedSafariPath();
+ }
+ }
+ my $safariPath = safariPathFromSafariBundle($safariBundle);
+ die "Can't find executable at $safariPath.\n" if isAppleMacWebKit() && !-x $safariPath;
+ return $safariPath;
+}
+
+sub builtDylibPathForName
+{
+ my $libraryName = shift;
+ determineConfigurationProductDir();
+ if (isQt() or isChromium()) {
+ return "$configurationProductDir/$libraryName";
+ }
+ if (isGtk()) {
+ return "$configurationProductDir/$libraryName/../.libs/libwebkit-1.0.so";
+ }
+ if (isAppleMacWebKit()) {
+ return "$configurationProductDir/$libraryName.framework/Versions/A/$libraryName";
+ }
+ if (isAppleWinWebKit()) {
+ if ($libraryName eq "JavaScriptCore") {
+ return "$baseProductDir/lib/$libraryName.lib";
+ } else {
+ return "$baseProductDir/$libraryName.intermediate/$configuration/$libraryName.intermediate/$libraryName.lib";
+ }
+ }
+
+ die "Unsupported platform, can't determine built library locations.";
+}
+
+# Check to see that all the frameworks are built.
+sub checkFrameworks
+{
+ return if isCygwin();
+ my @frameworks = ("JavaScriptCore", "WebCore");
+ push(@frameworks, "WebKit") if isAppleMacWebKit();
+ for my $framework (@frameworks) {
+ my $path = builtDylibPathForName($framework);
+ die "Can't find built framework at \"$path\".\n" unless -x $path;
+ }
+}
+
+sub hasSVGSupport
+{
+ return 0 if isCygwin();
+
+ my $path = shift;
+
+ if (isQt()) {
+ return 1;
+ }
+
+ my $hasSVGSupport = 0;
+ if (-e $path) {
+ open NM, "-|", "nm", $path or die;
+ while (<NM>) {
+ $hasSVGSupport = 1 if /SVGElement/;
+ }
+ close NM;
+ }
+ return $hasSVGSupport;
+}
+
+sub removeLibraryDependingOnSVG
+{
+ my $frameworkName = shift;
+ my $shouldHaveSVG = shift;
+
+ my $path = builtDylibPathForName($frameworkName);
+ return unless -x $path;
+
+ my $hasSVG = hasSVGSupport($path);
+ system "rm -f $path" if ($shouldHaveSVG xor $hasSVG);
+}
+
+sub checkWebCoreSVGSupport
+{
+ my $required = shift;
+ my $framework = "WebCore";
+ my $path = builtDylibPathForName($framework);
+ my $hasSVG = hasSVGSupport($path);
+ if ($required && !$hasSVG) {
+ die "$framework at \"$path\" does not include SVG Support, please run build-webkit --svg\n";
+ }
+ return $hasSVG;
+}
+
+sub hasAcceleratedCompositingSupport
+{
+ return 0 if isCygwin() || isQt();
+
+ my $path = shift;
+
+ my $useAcceleratedCompositing = 0;
+ if (-e $path) {
+ open NM, "-|", "nm", $path or die;
+ while (<NM>) {
+ $useAcceleratedCompositing = 1 if /GraphicsLayer/;
+ }
+ close NM;
+ }
+ return $useAcceleratedCompositing;
+}
+
+sub checkWebCoreAcceleratedCompositingSupport
+{
+ my $required = shift;
+ my $framework = "WebCore";
+ my $path = builtDylibPathForName($framework);
+ my $hasAcceleratedCompositing = hasAcceleratedCompositingSupport($path);
+ if ($required && !$hasAcceleratedCompositing) {
+ die "$framework at \"$path\" does not use accelerated compositing\n";
+ }
+ return $hasAcceleratedCompositing;
+}
+
+sub has3DRenderingSupport
+{
+ return 0 if isCygwin() || isQt();
+
+ my $path = shift;
+
+ my $has3DRenderingSupport = 0;
+ if (-e $path) {
+ open NM, "-|", "nm", $path or die;
+ while (<NM>) {
+ $has3DRenderingSupport = 1 if /WebCoreHas3DRendering/;
+ }
+ close NM;
+ }
+ return $has3DRenderingSupport;
+}
+
+sub checkWebCore3DRenderingSupport
+{
+ my $required = shift;
+ my $framework = "WebCore";
+ my $path = builtDylibPathForName($framework);
+ my $has3DRendering = has3DRenderingSupport($path);
+ if ($required && !$has3DRendering) {
+ die "$framework at \"$path\" does not include 3D rendering Support, please run build-webkit --3d-rendering\n";
+ }
+ return $has3DRendering;
+}
+
+sub hasWMLSupport
+{
+ return 0 if isCygwin();
+
+ my $path = shift;
+
+ if (isQt()) {
+ # FIXME: Check built library for WML support, just like Gtk does it below.
+ return 0;
+ }
+
+ my $hasWMLSupport = 0;
+ if (-e $path) {
+ open NM, "-|", "nm", $path or die;
+ while (<NM>) {
+ $hasWMLSupport = 1 if /WMLElement/;
+ }
+ close NM;
+ }
+ return $hasWMLSupport;
+}
+
+sub removeLibraryDependingOnWML
+{
+ my $frameworkName = shift;
+ my $shouldHaveWML = shift;
+
+ my $path = builtDylibPathForName($frameworkName);
+ return unless -x $path;
+
+ my $hasWML = hasWMLSupport($path);
+ system "rm -f $path" if ($shouldHaveWML xor $hasWML);
+}
+
+sub checkWebCoreWMLSupport
+{
+ my $required = shift;
+ my $framework = "WebCore";
+ my $path = builtDylibPathForName($framework);
+ my $hasWML = hasWMLSupport($path);
+ if ($required && !$hasWML) {
+ die "$framework at \"$path\" does not include WML Support, please run build-webkit --wml\n";
+ }
+ return $hasWML;
+}
+
+sub isQt()
+{
+ determineIsQt();
+ return $isQt;
+}
+
+sub checkForArgumentAndRemoveFromARGV
+{
+ my $argToCheck = shift;
+ foreach my $opt (@ARGV) {
+ if ($opt =~ /^$argToCheck$/i ) {
+ @ARGV = grep(!/^$argToCheck$/i, @ARGV);
+ return 1;
+ }
+ }
+ return 0;
+}
+
+sub determineIsQt()
+{
+ return if defined($isQt);
+
+ # Allow override in case QTDIR is not set.
+ if (checkForArgumentAndRemoveFromARGV("--qt")) {
+ $isQt = 1;
+ return;
+ }
+
+ # The presence of QTDIR only means Qt if --gtk is not on the command-line
+ if (isGtk()) {
+ $isQt = 0;
+ return;
+ }
+
+ $isQt = defined($ENV{'QTDIR'});
+}
+
+sub isGtk()
+{
+ determineIsGtk();
+ return $isGtk;
+}
+
+sub determineIsGtk()
+{
+ return if defined($isGtk);
+ $isGtk = checkForArgumentAndRemoveFromARGV("--gtk");
+}
+
+sub isWx()
+{
+ determineIsWx();
+ return $isWx;
+}
+
+sub determineIsWx()
+{
+ return if defined($isWx);
+ $isWx = checkForArgumentAndRemoveFromARGV("--wx");
+}
+
+sub getWxArgs()
+{
+ if (!@wxArgs) {
+ @wxArgs = ("");
+ my $rawWxArgs = "";
+ foreach my $opt (@ARGV) {
+ if ($opt =~ /^--wx-args/i ) {
+ @ARGV = grep(!/^--wx-args/i, @ARGV);
+ $rawWxArgs = $opt;
+ $rawWxArgs =~ s/--wx-args=//i;
+ }
+ }
+ @wxArgs = split(/,/, $rawWxArgs);
+ }
+ return @wxArgs;
+}
+
+# Determine if this is debian, ubuntu, linspire, or something similar.
+sub isDebianBased()
+{
+ return -e "/etc/debian_version";
+}
+
+sub isChromium()
+{
+ determineIsChromium();
+ return $isChromium;
+}
+
+sub determineIsChromium()
+{
+ return if defined($isChromium);
+ $isChromium = checkForArgumentAndRemoveFromARGV("--chromium");
+}
+
+sub isCygwin()
+{
+ return ($^O eq "cygwin") || 0;
+}
+
+sub isDarwin()
+{
+ return ($^O eq "darwin") || 0;
+}
+
+sub isAppleWebKit()
+{
+ return !(isQt() or isGtk() or isWx() or isChromium());
+}
+
+sub isAppleMacWebKit()
+{
+ return isAppleWebKit() && isDarwin();
+}
+
+sub isAppleWinWebKit()
+{
+ return isAppleWebKit() && isCygwin();
+}
+
+sub isPerianInstalled()
+{
+ if (!isAppleWebKit()) {
+ return 0;
+ }
+
+ if (-d "/Library/QuickTime/Perian.component") {
+ return 1;
+ }
+
+ if (-d "$ENV{HOME}/Library/QuickTime/Perian.component") {
+ return 1;
+ }
+
+ return 0;
+}
+
+sub determineOSXVersion()
+{
+ return if $osXVersion;
+
+ if (!isDarwin()) {
+ $osXVersion = -1;
+ return;
+ }
+
+ my $version = `sw_vers -productVersion`;
+ my @splitVersion = split(/\./, $version);
+ @splitVersion >= 2 or die "Invalid version $version";
+ $osXVersion = {
+ "major" => $splitVersion[0],
+ "minor" => $splitVersion[1],
+ "subminor" => (defined($splitVersion[2]) ? $splitVersion[2] : 0),
+ };
+}
+
+sub osXVersion()
+{
+ determineOSXVersion();
+ return $osXVersion;
+}
+
+sub isTiger()
+{
+ return isDarwin() && osXVersion()->{"minor"} == 4;
+}
+
+sub isLeopard()
+{
+ return isDarwin() && osXVersion()->{"minor"} == 5;
+}
+
+sub isSnowLeopard()
+{
+ return isDarwin() && osXVersion()->{"minor"} == 6;
+}
+
+sub relativeScriptsDir()
+{
+ my $scriptDir = File::Spec->catpath("", File::Spec->abs2rel(dirname($0), getcwd()), "");
+ if ($scriptDir eq "") {
+ $scriptDir = ".";
+ }
+ return $scriptDir;
+}
+
+sub launcherPath()
+{
+ my $relativeScriptsPath = relativeScriptsDir();
+ if (isGtk() || isQt()) {
+ return "$relativeScriptsPath/run-launcher";
+ } elsif (isAppleWebKit()) {
+ return "$relativeScriptsPath/run-safari";
+ }
+}
+
+sub launcherName()
+{
+ if (isGtk()) {
+ return "GtkLauncher";
+ } elsif (isQt()) {
+ return "QtLauncher";
+ } elsif (isAppleWebKit()) {
+ return "Safari";
+ }
+}
+
+sub checkRequiredSystemConfig
+{
+ if (isDarwin()) {
+ chomp(my $productVersion = `sw_vers -productVersion`);
+ if ($productVersion lt "10.4") {
+ print "*************************************************************\n";
+ print "Mac OS X Version 10.4.0 or later is required to build WebKit.\n";
+ print "You have " . $productVersion . ", thus the build will most likely fail.\n";
+ print "*************************************************************\n";
+ }
+ my $xcodeVersion = `xcodebuild -version`;
+ if ($xcodeVersion !~ /DevToolsCore-(\d+)/ || $1 < 747) {
+ print "*************************************************************\n";
+ print "Xcode Version 2.3 or later is required to build WebKit.\n";
+ print "You have an earlier version of Xcode, thus the build will\n";
+ print "most likely fail. The latest Xcode is available from the web:\n";
+ print "http://developer.apple.com/tools/xcode\n";
+ print "*************************************************************\n";
+ }
+ } elsif (isGtk() or isQt() or isWx()) {
+ my @cmds = qw(flex bison gperf);
+ my @missing = ();
+ foreach my $cmd (@cmds) {
+ if (not `$cmd --version`) {
+ push @missing, $cmd;
+ }
+ }
+ if (@missing) {
+ my $list = join ", ", @missing;
+ die "ERROR: $list missing but required to build WebKit.\n";
+ }
+ }
+ # Win32 and other platforms may want to check for minimum config
+}
+
+sub setupCygwinEnv()
+{
+ return if !isCygwin();
+ return if $vcBuildPath;
+
+ my $programFilesPath = `cygpath "$ENV{'PROGRAMFILES'}"`;
+ chomp $programFilesPath;
+ $vcBuildPath = "$programFilesPath/Microsoft Visual Studio 8/Common7/IDE/devenv.com";
+ if (! -e $vcBuildPath) {
+ # VC++ not found, try VC++ Express
+ my $vsInstallDir;
+ if ($ENV{'VSINSTALLDIR'}) {
+ $vsInstallDir = $ENV{'VSINSTALLDIR'};
+ } else {
+ $programFilesPath = $ENV{'PROGRAMFILES'} || "C:\\Program Files";
+ $vsInstallDir = "$programFilesPath/Microsoft Visual Studio 8";
+ }
+ $vsInstallDir = `cygpath "$vsInstallDir"`;
+ chomp $vsInstallDir;
+ $vcBuildPath = "$vsInstallDir/Common7/IDE/VCExpress.exe";
+ if (! -e $vcBuildPath) {
+ print "*************************************************************\n";
+ print "Cannot find '$vcBuildPath'\n";
+ print "Please execute the file 'vcvars32.bat' from\n";
+ print "'$programFilesPath\\Microsoft Visual Studio 8\\VC\\bin\\'\n";
+ print "to setup the necessary environment variables.\n";
+ print "*************************************************************\n";
+ die;
+ }
+ }
+
+ my $qtSDKPath = "$programFilesPath/QuickTime SDK";
+ if (0 && ! -e $qtSDKPath) {
+ print "*************************************************************\n";
+ print "Cannot find '$qtSDKPath'\n";
+ print "Please download the QuickTime SDK for Windows from\n";
+ print "http://developer.apple.com/quicktime/download/\n";
+ print "*************************************************************\n";
+ die;
+ }
+
+ chomp($ENV{'WEBKITLIBRARIESDIR'} = `cygpath -wa "$sourceDir/WebKitLibraries/win"`) unless $ENV{'WEBKITLIBRARIESDIR'};
+
+ $windowsTmpPath = `cygpath -w /tmp`;
+ chomp $windowsTmpPath;
+ print "Building results into: ", baseProductDir(), "\n";
+ print "WEBKITOUTPUTDIR is set to: ", $ENV{"WEBKITOUTPUTDIR"}, "\n";
+ print "WEBKITLIBRARIESDIR is set to: ", $ENV{"WEBKITLIBRARIESDIR"}, "\n";
+}
+
+sub buildXCodeProject($$@)
+{
+ my ($project, $clean, @extraOptions) = @_;
+
+ if ($clean) {
+ push(@extraOptions, "-alltargets");
+ push(@extraOptions, "clean");
+ }
+
+ return system "xcodebuild", "-project", "$project.xcodeproj", @extraOptions;
+}
+
+sub buildVisualStudioProject
+{
+ my ($project, $clean) = @_;
+ setupCygwinEnv();
+
+ my $config = configurationForVisualStudio();
+
+ chomp(my $winProjectPath = `cygpath -w "$project"`);
+
+ my $command = "/build";
+ if ($clean) {
+ $command = "/clean";
+ }
+
+ print "$vcBuildPath $winProjectPath /build $config\n";
+ return system $vcBuildPath, $winProjectPath, $command, $config;
+}
+
+sub buildSconsProject
+{
+ my ($project, $shouldClean) = @_;
+ print "Building from $project/$project.scons\n";
+
+ my $sconsCommand = "scons";
+ if (isCygwin()) {
+ # HACK: Launch scons with Win32 python instead of CYGWIN python
+ # Scons + MSVC only works under Win32 python
+ # http://scons.tigris.org/issues/show_bug.cgi?id=2266
+ $sconsCommand = "cmd /c 'C:\\Python26\\Scripts\\scons'";
+ }
+ if ($shouldClean) {
+ return system $sconsCommand, "--clean";
+ }
+ return system $sconsCommand;
+}
+
+sub retrieveQMakespecVar
+{
+ my $mkspec = $_[0];
+ my $varname = $_[1];
+
+ my $compiler = "unknown";
+ #print "retrieveMakespecVar " . $mkspec . ", " . $varname . "\n";
+
+ local *SPEC;
+ open SPEC, "<$mkspec" or return "make";
+ while (<SPEC>) {
+ if ($_ =~ /\s*include\((.+)\)/) {
+ # open the included mkspec
+ my $oldcwd = getcwd();
+ (my $volume, my $directories, my $file) = File::Spec->splitpath($mkspec);
+ chdir "$volume$directories";
+ $compiler = retrieveQMakespecVar($1, $varname);
+ chdir $oldcwd;
+ } elsif ($_ =~ /$varname\s*=\s*([^\s]+)/) {
+ $compiler = $1;
+ last;
+ }
+ }
+ close SPEC;
+ return $compiler;
+}
+
+sub qtMakeCommand($)
+{
+ my ($qmakebin) = @_;
+ chomp(my $mkspec = `$qmakebin -query QMAKE_MKSPECS`);
+ $mkspec .= "/default";
+ my $compiler = retrieveQMakespecVar("$mkspec/qmake.conf", "QMAKE_CC");
+
+ #print "default spec: " . $mkspec . "\n";
+ #print "compiler found: " . $compiler . "\n";
+
+ if ($compiler eq "cl") {
+ return "nmake";
+ }
+
+ return "make";
+}
+
+sub autotoolsFlag($$)
+{
+ my ($flag, $feature) = @_;
+ my $prefix = $flag ? "--enable" : "--disable";
+
+ return $prefix . '-' . $feature;
+}
+
+sub buildAutotoolsProject($@)
+{
+ my ($clean, @buildArgs) = @_;
+
+ my $make = 'make';
+ my $dir = productDir();
+ my $config = passedConfiguration() || configuration();
+ my $prefix = $ENV{"WebKitInstallationPrefix"};
+
+ push @buildArgs, "--prefix=" . $prefix if defined($prefix);
+
+ # check if configuration is Debug
+ if ($config =~ m/debug/i) {
+ push @buildArgs, "--enable-debug";
+ } else {
+ push @buildArgs, "--disable-debug";
+ }
+
+ # Use rm to clean the build directory since distclean may miss files
+ if ($clean && -d $dir) {
+ system "rm", "-rf", "$dir";
+ }
+
+ if (! -d $dir) {
+ system "mkdir", "-p", "$dir";
+ if (! -d $dir) {
+ die "Failed to create build directory " . $dir;
+ }
+ }
+
+ chdir $dir or die "Failed to cd into " . $dir . "\n";
+
+ my $result;
+ if ($clean) {
+ #$result = system $make, "distclean";
+ return 0;
+ }
+
+ print "Calling configure in " . $dir . "\n\n";
+ print "Installation directory: $prefix\n" if(defined($prefix));
+
+ # Make the path relative since it will appear in all -I compiler flags.
+ # Long argument lists cause bizarre slowdowns in libtool.
+ my $relSourceDir = File::Spec->abs2rel($sourceDir);
+ $relSourceDir = "." if !$relSourceDir;
+
+ $result = system "$relSourceDir/autogen.sh", @buildArgs;
+ if ($result ne 0) {
+ die "Failed to setup build environment using 'autotools'!\n";
+ }
+
+ my $makeArgs = $ENV{"WebKitMakeArguments"} || "";
+
+ $result = system "$make $makeArgs";
+ if ($result ne 0) {
+ die "\nFailed to build WebKit using '$make'!\n";
+ }
+
+ chdir ".." or die;
+ return $result;
+}
+
+sub buildQMakeProject($@)
+{
+ my ($clean, @buildParams) = @_;
+
+ my @buildArgs = ("-r");
+
+ push @buildArgs, "DEFINES+=QT_SHARED";
+
+ my $qmakebin = "qmake"; # Allow override of the qmake binary from $PATH
+ my $makeargs = "";
+ for my $i (0 .. $#buildParams) {
+ my $opt = $buildParams[$i];
+ if ($opt =~ /^--qmake=(.*)/i ) {
+ $qmakebin = $1;
+ } elsif ($opt =~ /^--qmakearg=(.*)/i ) {
+ push @buildArgs, $1;
+ } elsif ($opt =~ /^--makeargs=(.*)/i ) {
+ $makeargs = $1;
+ } else {
+ push @buildArgs, $opt;
+ }
+ }
+
+ my $make = qtMakeCommand($qmakebin);
+ my $config = configuration();
+ my $prefix = $ENV{"WebKitInstallationPrefix"};
+
+ push @buildArgs, "OUTPUT_DIR=" . baseProductDir() . "/$config";
+ push @buildArgs, sourceDir() . "/WebKit.pro";
+ if ($config =~ m/debug/i) {
+ push @buildArgs, "CONFIG-=release";
+ push @buildArgs, "CONFIG+=debug";
+ } else {
+ push @buildArgs, "CONFIG+=release";
+ push @buildArgs, "CONFIG-=debug";
+ }
+
+ my $dir = baseProductDir();
+ if (! -d $dir) {
+ system "mkdir", "-p", "$dir";
+ if (! -d $dir) {
+ die "Failed to create product directory " . $dir;
+ }
+ }
+ $dir = $dir . "/$config";
+ if (! -d $dir) {
+ system "mkdir", "-p", "$dir";
+ if (! -d $dir) {
+ die "Failed to create build directory " . $dir;
+ }
+ }
+
+ chdir $dir or die "Failed to cd into " . $dir . "\n";
+
+ print "Calling '$qmakebin @buildArgs' in " . $dir . "\n\n";
+ print "Installation directory: $prefix\n" if(defined($prefix));
+
+ my $result = system $qmakebin, @buildArgs;
+ if ($result ne 0) {
+ die "Failed to setup build environment using $qmakebin!\n";
+ }
+
+ if ($clean) {
+ $result = system "$make $makeargs distclean";
+ } else {
+ $result = system "$make $makeargs";
+ }
+
+ chdir ".." or die;
+ return $result;
+}
+
+sub buildQMakeQtProject($$@)
+{
+ my ($project, $clean, @buildArgs) = @_;
+
+ push @buildArgs, "CONFIG+=qt-port";
+
+ return buildQMakeProject($clean, @buildArgs);
+}
+
+sub buildGtkProject($$@)
+{
+ my ($project, $clean, @buildArgs) = @_;
+
+ if ($project ne "WebKit") {
+ die "The Gtk port builds JavaScriptCore, WebCore and WebKit in one shot! Only call it for 'WebKit'.\n";
+ }
+
+ return buildAutotoolsProject($clean, @buildArgs);
+}
+
+sub setPathForRunningWebKitApp
+{
+ my ($env) = @_;
+
+ return unless isAppleWinWebKit();
+
+ $env->{PATH} = join(':', productDir(), dirname(installedSafariPath()), $env->{PATH} || "");
+}
+
+sub exitStatus($)
+{
+ my ($returnvalue) = @_;
+ if ($^O eq "MSWin32") {
+ return $returnvalue >> 8;
+ }
+ return WEXITSTATUS($returnvalue);
+}
+
+sub runSafari
+{
+ my ($debugger) = @_;
+
+ if (isAppleMacWebKit()) {
+ return system "$FindBin::Bin/gdb-safari", @ARGV if $debugger;
+
+ my $productDir = productDir();
+ print "Starting Safari with DYLD_FRAMEWORK_PATH set to point to built WebKit in $productDir.\n";
+ $ENV{DYLD_FRAMEWORK_PATH} = $productDir;
+ $ENV{WEBKIT_UNSET_DYLD_FRAMEWORK_PATH} = "YES";
+ if (architecture()) {
+ return system "arch", "-" . architecture(), safariPath(), @ARGV;
+ } else {
+ return system safariPath(), @ARGV;
+ }
+ }
+
+ if (isAppleWinWebKit()) {
+ my $script = "run-webkit-nightly.cmd";
+ my $result = system "cp", "$FindBin::Bin/$script", productDir();
+ return $result if $result;
+
+ my $cwd = getcwd();
+ chdir productDir();
+
+ my $debuggerFlag = $debugger ? "/debugger" : "";
+ $result = system "cmd", "/c", "call $script $debuggerFlag";
+ chdir $cwd;
+ return $result;
+ }
+
+ return 1;
+}
+
+1;
diff --git a/WebKitTools/Scripts/wkstyle b/WebKitTools/Scripts/wkstyle
new file mode 100755
index 0000000..4b3447f
--- /dev/null
+++ b/WebKitTools/Scripts/wkstyle
@@ -0,0 +1,89 @@
+
+# Copyright (C) 2006 Michael Emmel<mike.emmel@gmail.com> All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cmdcpp="astyle \
+--unpad=paren \
+--style=linux \
+--brackets=linux \
+--indent=spaces=4 \
+--indent-switches \
+--convert-tabs"
+
+cmdh="astyle \
+--unpad=paren \
+--style=linux \
+--brackets=break \
+--indent=spaces=4 \
+--convert-tabs"
+
+#astyle does not support unpadding so we use sed
+for i in $@
+do
+echo $i
+
+ext=`echo $i|awk -F . '{print $NF}'`
+
+cmd=$cmdcpp
+
+if [ $ext == "h" ] ; then
+ cmd=$cmdh
+fi
+
+$cmd $i
+
+#first print the changes we are making
+sed -n -e '
+/( .*/p
+s/( /(/gp
+/*. )/p
+s/ )/)/gp
+#supress printing this
+#/^namespace WebCore/{
+#N
+#s/\n{/ {/p
+#}
+' $i
+
+#do it for real
+sed -e '
+#unpad leading spaces
+s/( /(/g
+#unpad traling spaces
+s/ )/)/g
+#fixup the namspec decl
+/^namespace WebCore/{
+N
+s/\n{/ {/
+}
+#fixup extra tab in constructor initalizer
+/^ \+,/{s/^ //}
+/^ \+:/{s/^ //}
+' $i > $i.sed
+mv $i.sed $i
+done
+
+
diff --git a/WebKitTools/WebKitLauncher/Info.plist b/WebKitTools/WebKitLauncher/Info.plist
new file mode 100644
index 0000000..f7038bd
--- /dev/null
+++ b/WebKitTools/WebKitLauncher/Info.plist
@@ -0,0 +1,476 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>css</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>document.icns</string>
+ <key>CFBundleTypeMIMETypes</key>
+ <array>
+ <string>text/css</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>CSS style sheet</string>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>NSDocumentClass</key>
+ <string>BrowserDocument</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>pdf</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>document.icns</string>
+ <key>CFBundleTypeMIMETypes</key>
+ <array>
+ <string>application/pdf</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>PDF document</string>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>NSDocumentClass</key>
+ <string>BrowserDocument</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>webarchive</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>webarchive.icns</string>
+ <key>CFBundleTypeMIMETypes</key>
+ <array>
+ <string>application/x-webarchive</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>Web archive</string>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>NSDocumentClass</key>
+ <string>BrowserDocument</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>syndarticle</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>document.icns</string>
+ <key>CFBundleTypeName</key>
+ <string>RSS article</string>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>NSDocumentClass</key>
+ <string>BrowserDocument</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>webbookmark</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>document.icns</string>
+ <key>CFBundleTypeName</key>
+ <string>Safari bookmark</string>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>NSDocumentClass</key>
+ <string>BrowserDocument</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>webloc</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>document.icns</string>
+ <key>CFBundleTypeName</key>
+ <string>Web internet location</string>
+ <key>CFBundleTypeOSTypes</key>
+ <array>
+ <string>ilht</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>NSDocumentClass</key>
+ <string>BrowserDocument</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>download</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>download10.icns</string>
+ <key>CFBundleTypeName</key>
+ <string>Safari download</string>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ <key>LSTypeIsPackage</key>
+ <true/>
+ <key>NSDocumentClass</key>
+ <string>BrowserDocument</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>gif</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>document.icns</string>
+ <key>CFBundleTypeMIMETypes</key>
+ <array>
+ <string>image/gif</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>GIF image</string>
+ <key>CFBundleTypeOSTypes</key>
+ <array>
+ <string>GIFf</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>NSDocumentClass</key>
+ <string>BrowserDocument</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>html</string>
+ <string>htm</string>
+ <string>shtml</string>
+ <string>jhtml</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>document.icns</string>
+ <key>CFBundleTypeMIMETypes</key>
+ <array>
+ <string>text/html</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>HTML document</string>
+ <key>CFBundleTypeOSTypes</key>
+ <array>
+ <string>HTML</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>NSDocumentClass</key>
+ <string>BrowserDocument</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>js</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>document.icns</string>
+ <key>CFBundleTypeMIMETypes</key>
+ <array>
+ <string>application/x-javascript</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>JavaScript script</string>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>NSDocumentClass</key>
+ <string>BrowserDocument</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>jpg</string>
+ <string>jpeg</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>document.icns</string>
+ <key>CFBundleTypeMIMETypes</key>
+ <array>
+ <string>image/jpeg</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>JPEG image</string>
+ <key>CFBundleTypeOSTypes</key>
+ <array>
+ <string>JPEG</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>NSDocumentClass</key>
+ <string>BrowserDocument</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>jp2</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>document.icns</string>
+ <key>CFBundleTypeMIMETypes</key>
+ <array>
+ <string>image/jp2</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>JPEG 2000 image</string>
+ <key>CFBundleTypeOSTypes</key>
+ <array>
+ <string>jp2 </string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>NSDocumentClass</key>
+ <string>BrowserDocument</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>txt</string>
+ <string>text</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>document.icns</string>
+ <key>CFBundleTypeMIMETypes</key>
+ <array>
+ <string>text/plain</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>Plain text document</string>
+ <key>CFBundleTypeOSTypes</key>
+ <array>
+ <string>TEXT</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>NSDocumentClass</key>
+ <string>BrowserDocument</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>png</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>document.icns</string>
+ <key>CFBundleTypeMIMETypes</key>
+ <array>
+ <string>image/png</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>PNG image</string>
+ <key>CFBundleTypeOSTypes</key>
+ <array>
+ <string>PNGf</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>NSDocumentClass</key>
+ <string>BrowserDocument</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>rtf</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>document.icns</string>
+ <key>CFBundleTypeMIMETypes</key>
+ <array>
+ <string>application/rtf</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>Rich Text Format (RTF) document</string>
+ <key>CFBundleTypeOSTypes</key>
+ <array>
+ <string>RTF </string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>NSDocumentClass</key>
+ <string>BrowserDocument</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>tiff</string>
+ <string>tif</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>document.icns</string>
+ <key>CFBundleTypeMIMETypes</key>
+ <array>
+ <string>image/tiff</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>TIFF image</string>
+ <key>CFBundleTypeOSTypes</key>
+ <array>
+ <string>TIFF</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>NSDocumentClass</key>
+ <string>BrowserDocument</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>url</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>document.icns</string>
+ <key>CFBundleTypeName</key>
+ <string>Web site location</string>
+ <key>CFBundleTypeOSTypes</key>
+ <array>
+ <string>LINK</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>NSDocumentClass</key>
+ <string>BrowserDocument</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>ico</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>document.icns</string>
+ <key>CFBundleTypeMIMETypes</key>
+ <array>
+ <string>image/x-icon</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>Windows icon image</string>
+ <key>CFBundleTypeOSTypes</key>
+ <array>
+ <string>ICO </string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>NSDocumentClass</key>
+ <string>BrowserDocument</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>xhtml</string>
+ <string>xhtm</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>document.icns</string>
+ <key>CFBundleTypeMIMETypes</key>
+ <array>
+ <string>application/xhtml+xml</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>XHTML document</string>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>NSDocumentClass</key>
+ <string>BrowserDocument</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>xml</string>
+ <string>xbl</string>
+ <string>xsl</string>
+ <string>xslt</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>document.icns</string>
+ <key>CFBundleTypeMIMETypes</key>
+ <array>
+ <string>application/xml</string>
+ <string>text/xml</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>XML document</string>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>NSDocumentClass</key>
+ <string>BrowserDocument</string>
+ </dict>
+ </array>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleGetInfoString</key>
+ <string>rVERSION, Copyright 2005-2009 Apple Inc.</string>
+ <key>CFBundleIconFile</key>
+ <string>webkit.icns</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.webkit.nightly.WebKit</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>wbkt</string>
+ <key>CFBundleVersion</key>
+ <string>VERSION</string>
+ <key>CFBundleShortVersionString</key>
+ <string>rVERSION</string>
+ <key>NSPrincipalClass</key>
+ <string>BrowserApplication</string>
+
+ <key>CFBundleHelpBookFolder</key>
+ <string>SafariHelp</string>
+ <key>CFBundleHelpBookName</key>
+ <string>Safari Help</string>
+ <key>CFBundleURLTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleURLName</key>
+ <string>Web site URL</string>
+ <key>CFBundleURLSchemes</key>
+ <array>
+ <string>http</string>
+ <string>https</string>
+ </array>
+ </dict>
+ <dict>
+ <key>CFBundleURLName</key>
+ <string>local file URL</string>
+ <key>CFBundleURLSchemes</key>
+ <array>
+ <string>file</string>
+ </array>
+ </dict>
+ </array>
+ <key>NSAppleScriptEnabled</key>
+ <string>Yes</string>
+ <key>UTExportedTypeDeclarations</key>
+ <array>
+ <dict>
+ <key>UTTypeConformsTo</key>
+ <string>public.data</string>
+ <key>UTTypeDescription</key>
+ <string>Safari bookmark</string>
+ <key>UTTypeIdentifier</key>
+ <string>com.apple.safari.bookmark</string>
+ <key>UTTypeTagSpecification</key>
+ <dict>
+ <key>public.filename-extension</key>
+ <array>
+ <string>webbookmark</string>
+ </array>
+ </dict>
+ </dict>
+ </array>
+
+</dict>
+</plist>
diff --git a/WebKitTools/WebKitLauncher/VERSION b/WebKitTools/WebKitLauncher/VERSION
new file mode 100644
index 0000000..fd85e30
--- /dev/null
+++ b/WebKitTools/WebKitLauncher/VERSION
@@ -0,0 +1 @@
+VERSION
diff --git a/WebKitTools/WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj b/WebKitTools/WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..2ceb067
--- /dev/null
+++ b/WebKitTools/WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj
@@ -0,0 +1,358 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 42;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 5D41141C0A50A9DE00C84CF0 /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 5D41141B0A50A9DE00C84CF0 /* VERSION */; };
+ 5D4DF982097F89FB0083D5E5 /* start.html in Resources */ = {isa = PBXBuildFile; fileRef = 5D4DF981097F89FB0083D5E5 /* start.html */; };
+ 5D650F3609DB8B370075E9A8 /* WebKitNightlyEnabler.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D650F3509DB8B370075E9A8 /* WebKitNightlyEnabler.m */; };
+ 5D650F3A09DB8B410075E9A8 /* WebKitNightlyEnabler.dylib in Resources */ = {isa = PBXBuildFile; fileRef = 5D650F3409DB8B280075E9A8 /* WebKitNightlyEnabler.dylib */; };
+ 5D877FCD0A5795F200D0C67B /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
+ 5DB70525097B94CD009875EC /* webkit.icns in Resources */ = {isa = PBXBuildFile; fileRef = 5DB70524097B94CD009875EC /* webkit.icns */; };
+ 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
+ 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 5D650F4409DB8B830075E9A8 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 5D650F3309DB8B280075E9A8;
+ remoteInfo = WebKitNightlyEnabler;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+ 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
+ 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; 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>"; };
+ 5D41141B0A50A9DE00C84CF0 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
+ 5D4DF981097F89FB0083D5E5 /* start.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = start.html; sourceTree = "<group>"; };
+ 5D650F3409DB8B280075E9A8 /* WebKitNightlyEnabler.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = WebKitNightlyEnabler.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+ 5D650F3509DB8B370075E9A8 /* WebKitNightlyEnabler.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = WebKitNightlyEnabler.m; sourceTree = "<group>"; };
+ 5D650F7509DB8CB40075E9A8 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
+ 5DB70524097B94CD009875EC /* webkit.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = webkit.icns; sourceTree = "<group>"; };
+ 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
+ 8D1107320486CEB800E47090 /* WebKit.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WebKit.app; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 5D650F3209DB8B280075E9A8 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 5D877FCD0A5795F200D0C67B /* Cocoa.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 8D11072E0486CEB800E47090 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 080E96DDFE201D6D7F000001 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ );
+ name = Classes;
+ sourceTree = "<group>";
+ };
+ 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
+ );
+ name = "Linked Frameworks";
+ sourceTree = "<group>";
+ };
+ 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 29B97324FDCFA39411CA2CEA /* AppKit.framework */,
+ 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
+ 5D650F7509DB8CB40075E9A8 /* CoreFoundation.framework */,
+ 29B97325FDCFA39411CA2CEA /* Foundation.framework */,
+ );
+ name = "Other Frameworks";
+ sourceTree = "<group>";
+ };
+ 19C28FACFE9D520D11CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 8D1107320486CEB800E47090 /* WebKit.app */,
+ 5D650F3409DB8B280075E9A8 /* WebKitNightlyEnabler.dylib */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 29B97314FDCFA39411CA2CEA /* WebKit */ = {
+ isa = PBXGroup;
+ children = (
+ 080E96DDFE201D6D7F000001 /* Classes */,
+ 29B97315FDCFA39411CA2CEA /* Other Sources */,
+ 29B97317FDCFA39411CA2CEA /* Resources */,
+ 29B97323FDCFA39411CA2CEA /* Frameworks */,
+ 19C28FACFE9D520D11CA2CBB /* Products */,
+ );
+ name = WebKit;
+ sourceTree = "<group>";
+ };
+ 29B97315FDCFA39411CA2CEA /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ 5D650F3509DB8B370075E9A8 /* WebKitNightlyEnabler.m */,
+ 29B97316FDCFA39411CA2CEA /* main.m */,
+ );
+ name = "Other Sources";
+ sourceTree = "<group>";
+ };
+ 29B97317FDCFA39411CA2CEA /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 5D41141B0A50A9DE00C84CF0 /* VERSION */,
+ 8D1107310486CEB800E47090 /* Info.plist */,
+ 5D4DF981097F89FB0083D5E5 /* start.html */,
+ 5DB70524097B94CD009875EC /* webkit.icns */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
+ 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ 5D650F3009DB8B280075E9A8 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ 5D650F3309DB8B280075E9A8 /* WebKitNightlyEnabler */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 5D650F3709DB8B370075E9A8 /* Build configuration list for PBXNativeTarget "WebKitNightlyEnabler" */;
+ buildPhases = (
+ 5D650F3009DB8B280075E9A8 /* Headers */,
+ 5D650F3109DB8B280075E9A8 /* Sources */,
+ 5D650F3209DB8B280075E9A8 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = WebKitNightlyEnabler;
+ productName = WebKitNightlyEnabler;
+ productReference = 5D650F3409DB8B280075E9A8 /* WebKitNightlyEnabler.dylib */;
+ productType = "com.apple.product-type.library.dynamic";
+ };
+ 8D1107260486CEB800E47090 /* WebKit */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "WebKit" */;
+ buildPhases = (
+ 8D1107290486CEB800E47090 /* Resources */,
+ 8D11072C0486CEB800E47090 /* Sources */,
+ 8D11072E0486CEB800E47090 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 5D650F4509DB8B830075E9A8 /* PBXTargetDependency */,
+ );
+ name = WebKit;
+ productInstallPath = "$(HOME)/Applications";
+ productName = WebKit;
+ productReference = 8D1107320486CEB800E47090 /* WebKit.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 29B97313FDCFA39411CA2CEA /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "WebKitLauncher" */;
+ compatibilityVersion = "Xcode 2.4";
+ hasScannedForEncodings = 1;
+ mainGroup = 29B97314FDCFA39411CA2CEA /* WebKit */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 8D1107260486CEB800E47090 /* WebKit */,
+ 5D650F3309DB8B280075E9A8 /* WebKitNightlyEnabler */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 8D1107290486CEB800E47090 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 5D41141C0A50A9DE00C84CF0 /* VERSION in Resources */,
+ 5D650F3A09DB8B410075E9A8 /* WebKitNightlyEnabler.dylib in Resources */,
+ 5D4DF982097F89FB0083D5E5 /* start.html in Resources */,
+ 5DB70525097B94CD009875EC /* webkit.icns in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 5D650F3109DB8B280075E9A8 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 5D650F3609DB8B370075E9A8 /* WebKitNightlyEnabler.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 8D11072C0486CEB800E47090 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D11072D0486CEB800E47090 /* main.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 5D650F4509DB8B830075E9A8 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 5D650F3309DB8B280075E9A8 /* WebKitNightlyEnabler */;
+ targetProxy = 5D650F4409DB8B830075E9A8 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+ 5D650F3809DB8B370075E9A8 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
+ PRODUCT_NAME = WebKitNightlyEnabler;
+ SDKROOT_ppc = /Developer/SDKs/MacOSX10.4u.sdk;
+ };
+ name = Debug;
+ };
+ 5D650F3909DB8B370075E9A8 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
+ PRODUCT_NAME = WebKitNightlyEnabler;
+ SDKROOT_ppc = /Developer/SDKs/MacOSX10.4u.sdk;
+ };
+ name = Release;
+ };
+ C01FCF4B08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DEBUGGING_SYMBOLS = full;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "$(HOME)/Applications";
+ PRODUCT_NAME = WebKit;
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ C01FCF4C08A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DEAD_CODE_STRIPPING = YES;
+ DEPLOYMENT_POSTPROCESSING = YES;
+ GCC_DEBUGGING_SYMBOLS = full;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ INFOPLIST_FILE = Info.plist;
+ PRODUCT_NAME = WebKit;
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+ C01FCF4F08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.2;
+ MACOSX_DEPLOYMENT_TARGET_i386 = 10.4;
+ MACOSX_DEPLOYMENT_TARGET_ppc = 10.2;
+ PREBINDING = NO;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ };
+ name = Debug;
+ };
+ C01FCF5008A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET_i386 = 10.4;
+ MACOSX_DEPLOYMENT_TARGET_ppc = 10.2;
+ PREBINDING = NO;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 5D650F3709DB8B370075E9A8 /* Build configuration list for PBXNativeTarget "WebKitNightlyEnabler" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 5D650F3809DB8B370075E9A8 /* Debug */,
+ 5D650F3909DB8B370075E9A8 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "WebKit" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4B08A954540054247B /* Debug */,
+ C01FCF4C08A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C01FCF4E08A954540054247B /* Build configuration list for PBXProject "WebKitLauncher" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4F08A954540054247B /* Debug */,
+ C01FCF5008A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
diff --git a/WebKitTools/WebKitLauncher/WebKitNightlyEnabler.m b/WebKitTools/WebKitLauncher/WebKitNightlyEnabler.m
new file mode 100644
index 0000000..8c6eb84
--- /dev/null
+++ b/WebKitTools/WebKitLauncher/WebKitNightlyEnabler.m
@@ -0,0 +1,165 @@
+/*
+ * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2006 Graham Dennis. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+static void enableWebKitNightlyBehaviour() __attribute__ ((constructor));
+
+static NSString *WKNERunState = @"WKNERunState";
+static NSString *WKNEShouldMonitorShutdowns = @"WKNEShouldMonitorShutdowns";
+
+typedef enum {
+ RunStateShutDown,
+ RunStateInitializing,
+ RunStateRunning
+} WKNERunStates;
+
+static bool extensionBundlesWereLoaded = NO;
+static NSSet *extensionPaths = nil;
+
+static void myBundleDidLoad(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo)
+{
+ // Break out early if we have already detected an extension
+ if (extensionBundlesWereLoaded)
+ return;
+
+ NSBundle *bundle = (NSBundle *)object;
+ NSString *bundlePath = [[bundle bundlePath] stringByAbbreviatingWithTildeInPath];
+ NSString *bundleFileName = [bundlePath lastPathComponent];
+
+ // Explicitly ignore SIMBL.bundle, as its only purpose is to load extensions
+ // on a per-application basis. It's presence indicates a user has application
+ // extensions, but not that any will be loaded into Safari
+ if ([bundleFileName isEqualToString:@"SIMBL.bundle"])
+ return;
+
+ // If the bundle lives inside a known extension path, flag it as an extension
+ NSEnumerator *e = [extensionPaths objectEnumerator];
+ NSString *path = nil;
+ while (path = [e nextObject]) {
+ if ([bundlePath length] < [path length])
+ continue;
+
+ if ([[bundlePath substringToIndex:[path length]] isEqualToString:path]) {
+ extensionBundlesWereLoaded = YES;
+ break;
+ }
+ }
+}
+
+static void myApplicationWillFinishLaunching(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo)
+{
+ CFNotificationCenterRemoveObserver(CFNotificationCenterGetLocalCenter(), &myApplicationWillFinishLaunching, NULL, NULL);
+ CFNotificationCenterRemoveObserver(CFNotificationCenterGetLocalCenter(), &myBundleDidLoad, NULL, NULL);
+ [extensionPaths release];
+ extensionPaths = nil;
+
+ NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
+ [userDefaults setInteger:RunStateRunning forKey:WKNERunState];
+ [userDefaults synchronize];
+
+ if (extensionBundlesWereLoaded)
+ NSRunInformationalAlertPanel(@"Safari extensions detected",
+ @"Safari extensions were detected on your system. Extensions are incompatible with nightly builds of WebKit, and may cause crashes or incorrect behavior. Please disable them if you experience such behavior.", @"Continue",
+ nil, nil);
+}
+
+static void myApplicationWillTerminate(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo)
+{
+ NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
+ [userDefaults setInteger:RunStateShutDown forKey:WKNERunState];
+ [userDefaults synchronize];
+}
+
+extern char **_CFGetProcessPath() __attribute__((weak));
+
+static void poseAsWebKitApp()
+{
+ char *webKitAppPath = getenv("WebKitAppPath");
+ if (!webKitAppPath || !_CFGetProcessPath)
+ return;
+
+ // Set up the main bundle early so it points at Safari.app
+ CFBundleGetMainBundle();
+
+ // Fiddle with CoreFoundation to have it pick up the executable path as being within WebKit.app
+ char **processPath = _CFGetProcessPath();
+ *processPath = NULL;
+ setenv("CFProcessPath", webKitAppPath, 1);
+ _CFGetProcessPath();
+
+ // Clean up
+ unsetenv("CFProcessPath");
+ unsetenv("WebKitAppPath");
+}
+
+static void enableWebKitNightlyBehaviour()
+{
+ unsetenv("DYLD_INSERT_LIBRARIES");
+ poseAsWebKitApp();
+
+ extensionPaths = [[NSSet alloc] initWithObjects:@"~/Library/InputManagers/", @"/Library/InputManagers/",
+ @"~/Library/Application Support/SIMBL/Plugins/", @"/Library/Application Support/SIMBL/Plugins/",
+ @"~/Library/Application Enhancers/", @"/Library/Application Enhancers/",
+ nil];
+
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
+ NSDictionary *defaultPrefs = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:RunStateShutDown], WKNERunState,
+ [NSNumber numberWithBool:YES], WKNEShouldMonitorShutdowns, nil];
+ [userDefaults registerDefaults:defaultPrefs];
+ if ([userDefaults boolForKey:WKNEShouldMonitorShutdowns]) {
+ WKNERunStates savedState = (WKNERunStates)[userDefaults integerForKey:WKNERunState];
+ if (savedState == RunStateInitializing) {
+ // Use CoreFoundation here as AppKit hasn't been initialized at this stage of Safari's lifetime
+ CFOptionFlags responseFlags;
+ CFUserNotificationDisplayAlert(0, kCFUserNotificationCautionAlertLevel,
+ NULL, NULL, NULL,
+ CFSTR("WebKit failed to open correctly"),
+ CFSTR("WebKit failed to open correctly on your previous attempt. Please disable any Safari extensions that you may have installed. If the problem continues to occur, please file a bug report at http://webkit.org/quality/reporting.html"),
+ CFSTR("Continue"), NULL, NULL, &responseFlags);
+ }
+ else if (savedState == RunStateRunning) {
+ NSLog(@"WebKit failed to shut down cleanly. Checking for Safari extensions.");
+ CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), &myBundleDidLoad,
+ myBundleDidLoad, (CFStringRef) NSBundleDidLoadNotification,
+ NULL, CFNotificationSuspensionBehaviorDeliverImmediately);
+ }
+ }
+ [userDefaults setInteger:RunStateInitializing forKey:WKNERunState];
+ [userDefaults synchronize];
+
+ CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), &myApplicationWillFinishLaunching,
+ myApplicationWillFinishLaunching, (CFStringRef) NSApplicationWillFinishLaunchingNotification,
+ NULL, CFNotificationSuspensionBehaviorDeliverImmediately);
+ CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), &myApplicationWillTerminate,
+ myApplicationWillTerminate, (CFStringRef) NSApplicationWillTerminateNotification,
+ NULL, CFNotificationSuspensionBehaviorDeliverImmediately);
+ [pool release];
+}
diff --git a/WebKitTools/WebKitLauncher/main.m b/WebKitTools/WebKitLauncher/main.m
new file mode 100644
index 0000000..7d13994
--- /dev/null
+++ b/WebKitTools/WebKitLauncher/main.m
@@ -0,0 +1,164 @@
+/*
+ * Copyright (C) 2006, 2007 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+#import <CoreFoundation/CoreFoundation.h>
+
+void displayErrorAndQuit(NSString *title, NSString *message)
+{
+ NSApplicationLoad();
+ NSRunCriticalAlertPanel(title, message, @"Quit", nil, nil);
+ exit(0);
+}
+
+void checkMacOSXVersion()
+{
+ long versionNumber = 0;
+ OSErr error = Gestalt(gestaltSystemVersion, &versionNumber);
+ if (error != noErr || versionNumber < 0x1040)
+ displayErrorAndQuit(@"Mac OS X 10.4 is Required", @"Nightly builds of WebKit require Mac OS X 10.4 or newer.");
+}
+
+int getLastVersionShown()
+{
+ [[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWithObject:@"-1" forKey:@"StartPageShownInVersion"]];
+ return [[NSUserDefaults standardUserDefaults] integerForKey:@"StartPageShownInVersion"];
+}
+
+void saveLastVersionShown(int lastVersion)
+{
+ [[NSUserDefaults standardUserDefaults] setInteger:lastVersion forKey:@"StartPageShownInVersion"];
+ [[NSUserDefaults standardUserDefaults] synchronize];
+}
+
+NSString *getPathForStartPage()
+{
+ return [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"start.html"];
+}
+
+int getShowStartPageVersion()
+{
+ return getCurrentVersion() + 1;
+}
+
+int getCurrentVersion()
+{
+ return [[[[NSBundle mainBundle] infoDictionary] valueForKey:(NSString *)kCFBundleVersionKey] intValue];
+}
+
+BOOL startPageDisabled()
+{
+ return [[NSUserDefaults standardUserDefaults] boolForKey:@"StartPageDisabled"];
+}
+
+void addStartPageToArgumentsIfNeeded(NSMutableArray *arguments)
+{
+ if (startPageDisabled())
+ return;
+
+ if (getLastVersionShown() < getShowStartPageVersion()) {
+ saveLastVersionShown(getCurrentVersion());
+ NSString *startPagePath = getPathForStartPage();
+ if (startPagePath)
+ [arguments addObject:startPagePath];
+ }
+}
+
+static void myExecve(NSString *executable, NSArray *args, NSDictionary *environment)
+{
+ char **argv = (char **)calloc(sizeof(char *), [args count] + 1);
+ char **env = (char **)calloc(sizeof(char *), [environment count] + 1);
+
+ NSEnumerator *e = [args objectEnumerator];
+ NSString *s;
+ int i = 0;
+ while (s = [e nextObject])
+ argv[i++] = (char *) [s UTF8String];
+
+ e = [environment keyEnumerator];
+ i = 0;
+ while (s = [e nextObject])
+ env[i++] = (char *) [[NSString stringWithFormat:@"%@=%@", s, [environment objectForKey:s]] UTF8String];
+
+ execve([executable fileSystemRepresentation], argv, env);
+}
+
+NSBundle *locateSafariBundle()
+{
+ NSArray *applicationDirectories = NSSearchPathForDirectoriesInDomains(NSApplicationDirectory, NSAllDomainsMask, YES);
+ NSEnumerator *e = [applicationDirectories objectEnumerator];
+ NSString *applicationDirectory;
+ while (applicationDirectory = [e nextObject]) {
+ NSString *possibleSafariPath = [applicationDirectory stringByAppendingPathComponent:@"Safari.app"];
+ NSBundle *possibleSafariBundle = [NSBundle bundleWithPath:possibleSafariPath];
+ if ([[possibleSafariBundle bundleIdentifier] isEqualToString:@"com.apple.Safari"])
+ return possibleSafariBundle;
+ }
+
+ CFURLRef safariURL = nil;
+ OSStatus err = LSFindApplicationForInfo(kLSUnknownCreator, CFSTR("com.apple.Safari"), nil, nil, &safariURL);
+ if (err != noErr)
+ displayErrorAndQuit(@"Unable to locate Safari", @"Nightly builds of WebKit require Safari to run. Please check that it is available and then try again.");
+
+ NSBundle *safariBundle = [NSBundle bundleWithPath:[(NSURL *)safariURL path]];
+ CFRelease(safariURL);
+ return safariBundle;
+}
+
+int main(int argc, char *argv[])
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ checkMacOSXVersion();
+
+ NSBundle *safariBundle = locateSafariBundle();
+ NSString *executablePath = [safariBundle executablePath];
+ NSString *frameworkPath = [[NSBundle mainBundle] resourcePath];
+ NSString *pathToEnablerLib = [[NSBundle mainBundle] pathForResource:@"WebKitNightlyEnabler" ofType:@"dylib"];
+
+ if ([frameworkPath rangeOfString:@":"].location != NSNotFound ||
+ [pathToEnablerLib rangeOfString:@":"].location != NSNotFound)
+ displayErrorAndQuit(@"Unable to launch Safari",
+ @"WebKit is located at a path containing an unsupported character. Please move WebKit to a different location and try again.");
+
+ NSMutableArray *arguments = [NSMutableArray arrayWithObjects:executablePath, @"-WebKitDeveloperExtras", @"YES", @"-WebKitScriptDebuggerEnabled", @"YES", nil];
+ NSMutableDictionary *environment = [NSDictionary dictionaryWithObjectsAndKeys:frameworkPath, @"DYLD_FRAMEWORK_PATH", @"YES", @"WEBKIT_UNSET_DYLD_FRAMEWORK_PATH",
+ pathToEnablerLib, @"DYLD_INSERT_LIBRARIES", [[NSBundle mainBundle] executablePath], @"WebKitAppPath", nil];
+ addStartPageToArgumentsIfNeeded(arguments);
+
+ while (*++argv)
+ [arguments addObject:[NSString stringWithUTF8String:*argv]];
+
+ myExecve(executablePath, arguments, environment);
+
+ char *error = strerror(errno);
+ NSString *errorMessage = [NSString stringWithFormat:@"Launching Safari at %@ failed with the error '%s' (%d)", [safariBundle bundlePath], error, errno];
+ displayErrorAndQuit(@"Unable to launch Safari", errorMessage);
+
+ [pool release];
+ return 0;
+}
diff --git a/WebKitTools/WebKitLauncher/start.html b/WebKitTools/WebKitLauncher/start.html
new file mode 100644
index 0000000..2c94e79
--- /dev/null
+++ b/WebKitTools/WebKitLauncher/start.html
@@ -0,0 +1,33 @@
+<html>
+ <head>
+ <title>Loading WebKit...</title>
+ <meta http-equiv="refresh" content="1;URL=http://nightly.webkit.org/start/" />
+ <script type="text/javascript">
+ function getWebKitRevision()
+ {
+ var request = new XMLHttpRequest();
+ request.open("GET", "VERSION", false);
+ request.send();
+ var revision = parseInt(request.responseText);
+ if (isNaN(revision))
+ return "";
+
+ return revision;
+ }
+
+ function getWebKitBranch()
+ {
+ var request = new XMLHttpRequest();
+ request.open("GET", "BRANCH", false);
+ request.send();
+ return (request.responseText || "trunk").replace(/\s/g, '')
+ }
+
+ var revision = getWebKitRevision();
+ var branch = getWebKitBranch();
+ document.location = "http://nightly.webkit.org/start/" + branch + "/" + revision;
+ </script>
+ </head>
+ <body>
+ </body>
+</html>
diff --git a/WebKitTools/WebKitLauncher/webkit.icns b/WebKitTools/WebKitLauncher/webkit.icns
new file mode 100644
index 0000000..bf629bf
--- /dev/null
+++ b/WebKitTools/WebKitLauncher/webkit.icns
Binary files differ
diff --git a/WebKitTools/WinLauncher/WinLauncher.cpp b/WebKitTools/WinLauncher/WinLauncher.cpp
new file mode 100644
index 0000000..035077d
--- /dev/null
+++ b/WebKitTools/WinLauncher/WinLauncher.cpp
@@ -0,0 +1,409 @@
+/*
+ * Copyright (C) 2006, 2008 Apple Computer, 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 COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "stdafx.h"
+#include "WinLauncher.h"
+#include "WebKit.h"
+
+#include <commctrl.h>
+#include <objbase.h>
+#include <shlwapi.h>
+#include <wininet.h>
+
+#define MAX_LOADSTRING 100
+#define URLBAR_HEIGHT 24
+
+// Global Variables:
+HINSTANCE hInst; // current instance
+HWND hMainWnd;
+HWND hURLBarWnd;
+long DefEditProc;
+IWebView* gWebView = 0;
+HWND gViewWindow = 0;
+WinLauncherWebHost* gWebHost = 0;
+TCHAR szTitle[MAX_LOADSTRING]; // The title bar text
+TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name
+
+// Forward declarations of functions included in this code module:
+ATOM MyRegisterClass(HINSTANCE hInstance);
+BOOL InitInstance(HINSTANCE, int);
+LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
+INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM);
+LRESULT CALLBACK MyEditProc(HWND, UINT, WPARAM, LPARAM);
+
+static void loadURL(BSTR urlBStr);
+
+HRESULT WinLauncherWebHost::updateAddressBar(IWebView* webView)
+{
+ IWebFrame* mainFrame = 0;
+ IWebDataSource* dataSource = 0;
+ IWebMutableURLRequest* request = 0;
+ BSTR frameURL = 0;
+
+ HRESULT hr = S_OK;
+
+ hr = webView->mainFrame(&mainFrame);
+ if (FAILED(hr))
+ goto exit;
+
+ hr = mainFrame->dataSource(&dataSource);
+ if (FAILED(hr) || !dataSource)
+ hr = mainFrame->provisionalDataSource(&dataSource);
+ if (FAILED(hr) || !dataSource)
+ goto exit;
+
+ hr = dataSource->request(&request);
+ if (FAILED(hr) || !request)
+ goto exit;
+
+ hr = request->mainDocumentURL(&frameURL);
+ if (FAILED(hr))
+ goto exit;
+
+ SendMessage(hURLBarWnd, (UINT)WM_SETTEXT, 0, (LPARAM)frameURL);
+
+exit:
+ if (mainFrame)
+ mainFrame->Release();
+ if (dataSource)
+ dataSource->Release();
+ if (request)
+ request->Release();
+ SysFreeString(frameURL);
+ return 0;
+}
+
+HRESULT STDMETHODCALLTYPE WinLauncherWebHost::QueryInterface(REFIID riid, void** ppvObject)
+{
+ *ppvObject = 0;
+ if (IsEqualGUID(riid, IID_IUnknown))
+ *ppvObject = static_cast<IWebFrameLoadDelegate*>(this);
+ else if (IsEqualGUID(riid, IID_IWebFrameLoadDelegate))
+ *ppvObject = static_cast<IWebFrameLoadDelegate*>(this);
+ else
+ return E_NOINTERFACE;
+
+ AddRef();
+ return S_OK;
+}
+
+ULONG STDMETHODCALLTYPE WinLauncherWebHost::AddRef(void)
+{
+ return ++m_refCount;
+}
+
+ULONG STDMETHODCALLTYPE WinLauncherWebHost::Release(void)
+{
+ ULONG newRef = --m_refCount;
+ if (!newRef)
+ delete(this);
+
+ return newRef;
+}
+
+static void resizeSubViews()
+{
+ RECT rcClient;
+ GetClientRect(hMainWnd, &rcClient);
+ MoveWindow(hURLBarWnd, 0, 0, rcClient.right, URLBAR_HEIGHT, TRUE);
+ MoveWindow(gViewWindow, 0, URLBAR_HEIGHT, rcClient.right, rcClient.bottom - URLBAR_HEIGHT, TRUE);
+}
+
+int APIENTRY _tWinMain(HINSTANCE hInstance,
+ HINSTANCE hPrevInstance,
+ LPTSTR lpCmdLine,
+ int nCmdShow)
+{
+#ifdef _CRTDBG_MAP_ALLOC
+ _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
+ _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
+#endif
+
+ UNREFERENCED_PARAMETER(hPrevInstance);
+ UNREFERENCED_PARAMETER(lpCmdLine);
+
+ // TODO: Place code here.
+ MSG msg;
+ HACCEL hAccelTable;
+
+ INITCOMMONCONTROLSEX InitCtrlEx;
+
+ InitCtrlEx.dwSize = sizeof(INITCOMMONCONTROLSEX);
+ InitCtrlEx.dwICC = 0x00004000; //ICC_STANDARD_CLASSES;
+ InitCommonControlsEx(&InitCtrlEx);
+
+ // Initialize global strings
+ LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
+ LoadString(hInstance, IDC_WINLAUNCHER, szWindowClass, MAX_LOADSTRING);
+ MyRegisterClass(hInstance);
+
+ // Perform application initialization:
+ if (!InitInstance (hInstance, nCmdShow))
+ return FALSE;
+
+ // Init COM
+ OleInitialize(NULL);
+
+ hURLBarWnd = CreateWindow(L"EDIT", 0,
+ WS_CHILD | WS_VISIBLE | WS_BORDER | ES_LEFT | ES_AUTOVSCROLL,
+ 0, 0, 0, 0,
+ hMainWnd,
+ 0,
+ hInstance, 0);
+
+ DefEditProc = GetWindowLong(hURLBarWnd, GWL_WNDPROC);
+ SetWindowLong(hURLBarWnd, GWL_WNDPROC,(long)MyEditProc);
+ SetFocus(hURLBarWnd);
+
+ HRESULT hr = CoCreateInstance(CLSID_WebView, 0, CLSCTX_ALL, IID_IWebView, (void**)&gWebView);
+ if (FAILED(hr))
+ goto exit;
+
+ gWebHost = new WinLauncherWebHost();
+ gWebHost->AddRef();
+ hr = gWebView->setFrameLoadDelegate(gWebHost);
+ if (FAILED(hr))
+ goto exit;
+
+ hr = gWebView->setHostWindow((OLE_HANDLE) hMainWnd);
+ if (FAILED(hr))
+ goto exit;
+
+ RECT clientRect;
+ GetClientRect(hMainWnd, &clientRect);
+ hr = gWebView->initWithFrame(clientRect, 0, 0);
+ if (FAILED(hr))
+ goto exit;
+
+ IWebFrame* frame;
+ hr = gWebView->mainFrame(&frame);
+ if (FAILED(hr))
+ goto exit;
+ static BSTR defaultHTML = 0;
+ if (!defaultHTML)
+ defaultHTML = SysAllocString(TEXT("<p style=\"background-color: #00FF00\">Testing</p><img src=\"http://webkit.org/images/icon-gold.png\" alt=\"Face\"><div style=\"border: solid blue\" contenteditable=\"true\">div with blue border</div><ul><li>foo<li>bar<li>baz</ul>"));
+ frame->loadHTMLString(defaultHTML, 0);
+ frame->Release();
+
+ IWebViewPrivate* viewExt;
+ hr = gWebView->QueryInterface(IID_IWebViewPrivate, (void**)&viewExt);
+ if (FAILED(hr))
+ goto exit;
+ hr = viewExt->viewWindow((OLE_HANDLE*) &gViewWindow);
+ viewExt->Release();
+ if (FAILED(hr) || !gViewWindow)
+ goto exit;
+
+ resizeSubViews();
+
+ ShowWindow(gViewWindow, nCmdShow);
+ UpdateWindow(gViewWindow);
+
+ hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_WINLAUNCHER));
+
+ // Main message loop:
+ while (GetMessage(&msg, NULL, 0, 0)) {
+ if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+ }
+
+exit:
+ gWebView->Release();
+ shutDownWebKit();
+#ifdef _CRTDBG_MAP_ALLOC
+ _CrtDumpMemoryLeaks();
+#endif
+
+ // Shut down COM.
+ OleUninitialize();
+
+ return (int) msg.wParam;
+}
+
+ATOM MyRegisterClass(HINSTANCE hInstance)
+{
+ WNDCLASSEX wcex;
+
+ wcex.cbSize = sizeof(WNDCLASSEX);
+
+ wcex.style = CS_HREDRAW | CS_VREDRAW;
+ wcex.lpfnWndProc = WndProc;
+ wcex.cbClsExtra = 0;
+ wcex.cbWndExtra = 0;
+ wcex.hInstance = hInstance;
+ wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_WINLAUNCHER));
+ wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wcex.hbrBackground = 0;
+ wcex.lpszMenuName = MAKEINTRESOURCE(IDC_WINLAUNCHER);
+ wcex.lpszClassName = szWindowClass;
+ wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));
+
+ return RegisterClassEx(&wcex);
+}
+
+BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
+{
+ hInst = hInstance; // Store instance handle in our global variable
+
+ hMainWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
+ CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
+
+ if (!hMainWnd)
+ return FALSE;
+
+ ShowWindow(hMainWnd, nCmdShow);
+ UpdateWindow(hMainWnd);
+
+ return TRUE;
+}
+
+LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ int wmId, wmEvent;
+ PAINTSTRUCT ps;
+ HDC hdc;
+
+ switch (message) {
+ case WM_COMMAND:
+ wmId = LOWORD(wParam);
+ wmEvent = HIWORD(wParam);
+ // Parse the menu selections:
+ switch (wmId) {
+ case IDM_ABOUT:
+ DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
+ break;
+ case IDM_EXIT:
+ DestroyWindow(hWnd);
+ break;
+ default:
+ return DefWindowProc(hWnd, message, wParam, lParam);
+ }
+ break;
+ case WM_DESTROY:
+ PostQuitMessage(0);
+ break;
+ case WM_SIZE:
+ if (!gWebView)
+ break;
+ resizeSubViews();
+ break;
+ default:
+ return DefWindowProc(hWnd, message, wParam, lParam);
+ }
+ return 0;
+}
+
+
+#define MAX_URL_LENGTH 1024
+
+LRESULT CALLBACK MyEditProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ switch (message) {
+ case WM_CHAR:
+ if( wParam == 13 ) { // Enter Key
+ wchar_t strPtr[MAX_URL_LENGTH];
+ *((LPWORD)strPtr) = MAX_URL_LENGTH;
+ int strLen = SendMessage(hDlg, EM_GETLINE, 0, (LPARAM)strPtr);
+
+ BSTR bstr = SysAllocStringLen(strPtr, strLen);
+ loadURL(bstr);
+ SysFreeString(bstr);
+
+ return 0;
+ } else
+ return (LRESULT)CallWindowProc((WNDPROC)DefEditProc,hDlg,message,wParam,lParam);
+ break;
+ default:
+ return (LRESULT)CallWindowProc((WNDPROC)DefEditProc,hDlg,message,wParam,lParam);
+ break;
+ }
+ return 0;
+}
+
+
+// Message handler for about box.
+INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ UNREFERENCED_PARAMETER(lParam);
+ switch (message) {
+ case WM_INITDIALOG:
+ return (INT_PTR)TRUE;
+
+ case WM_COMMAND:
+ if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) {
+ EndDialog(hDlg, LOWORD(wParam));
+ return (INT_PTR)TRUE;
+ }
+ break;
+ }
+ return (INT_PTR)FALSE;
+}
+
+static void loadURL(BSTR urlBStr)
+{
+ IWebFrame* frame = 0;
+ IWebMutableURLRequest* request = 0;
+ static BSTR methodBStr = 0;
+
+ if (!methodBStr)
+ methodBStr = SysAllocString(TEXT("GET"));
+
+ if (urlBStr && urlBStr[0] && (PathFileExists(urlBStr) || PathIsUNC(urlBStr))) {
+ TCHAR fileURL[INTERNET_MAX_URL_LENGTH];
+ DWORD fileURLLength = sizeof(fileURL)/sizeof(fileURL[0]);
+ if (SUCCEEDED(UrlCreateFromPath(urlBStr, fileURL, &fileURLLength, 0)))
+ urlBStr = fileURL;
+ }
+
+ HRESULT hr = gWebView->mainFrame(&frame);
+ if (FAILED(hr))
+ goto exit;
+
+ hr = CoCreateInstance(CLSID_WebMutableURLRequest, 0, CLSCTX_ALL, IID_IWebMutableURLRequest, (void**)&request);
+ if (FAILED(hr))
+ goto exit;
+
+ hr = request->initWithURL(urlBStr, WebURLRequestUseProtocolCachePolicy, 60);
+ if (FAILED(hr))
+ goto exit;
+
+ hr = request->setHTTPMethod(methodBStr);
+ if (FAILED(hr))
+ goto exit;
+
+ hr = frame->loadRequest(request);
+ if (FAILED(hr))
+ goto exit;
+
+ SetFocus(gViewWindow);
+
+exit:
+ if (frame)
+ frame->Release();
+ if (request)
+ request->Release();
+}
diff --git a/WebKitTools/WinLauncher/WinLauncher.h b/WebKitTools/WinLauncher/WinLauncher.h
new file mode 100644
index 0000000..1f57bff
--- /dev/null
+++ b/WebKitTools/WinLauncher/WinLauncher.h
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2006 Apple Computer, 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 COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "resource.h"
+#include "WebKit.h"
+
+class WinLauncherWebHost : public IWebFrameLoadDelegate
+{
+public:
+ WinLauncherWebHost() : m_refCount(1) {}
+
+ // IUnknown
+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
+ virtual ULONG STDMETHODCALLTYPE AddRef(void);
+ virtual ULONG STDMETHODCALLTYPE Release(void);
+
+ // IWebFrameLoadDelegate
+ virtual HRESULT STDMETHODCALLTYPE didStartProvisionalLoadForFrame(
+ /* [in] */ IWebView* webView,
+ /* [in] */ IWebFrame* /*frame*/) { return S_OK; }
+
+ virtual HRESULT STDMETHODCALLTYPE didReceiveServerRedirectForProvisionalLoadForFrame(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebFrame *frame) { return S_OK; }
+
+ virtual HRESULT STDMETHODCALLTYPE didFailProvisionalLoadWithError(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebError *error,
+ /* [in] */ IWebFrame *frame) { return S_OK; }
+
+ virtual HRESULT STDMETHODCALLTYPE didCommitLoadForFrame(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebFrame *frame) { return updateAddressBar(webView); }
+
+ virtual HRESULT STDMETHODCALLTYPE didReceiveTitle(
+ /* [in] */ IWebView *webView,
+ /* [in] */ BSTR title,
+ /* [in] */ IWebFrame *frame) { return S_OK; }
+
+ virtual HRESULT STDMETHODCALLTYPE didReceiveIcon(
+ /* [in] */ IWebView *webView,
+ /* [in] */ OLE_HANDLE hBitmap,
+ /* [in] */ IWebFrame *frame) { return S_OK; }
+
+ virtual HRESULT STDMETHODCALLTYPE didFinishLoadForFrame(
+ /* [in] */ IWebView* webView,
+ /* [in] */ IWebFrame* /*frame*/) { return S_OK; }
+
+ virtual HRESULT STDMETHODCALLTYPE didFailLoadWithError(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebError *error,
+ /* [in] */ IWebFrame *forFrame) { return S_OK; }
+
+ virtual HRESULT STDMETHODCALLTYPE didChangeLocationWithinPageForFrame(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebFrame *frame) { return S_OK; }
+
+ virtual HRESULT STDMETHODCALLTYPE willPerformClientRedirectToURL(
+ /* [in] */ IWebView *webView,
+ /* [in] */ BSTR url,
+ /* [in] */ double delaySeconds,
+ /* [in] */ DATE fireDate,
+ /* [in] */ IWebFrame *frame) { return S_OK; }
+
+ virtual HRESULT STDMETHODCALLTYPE didCancelClientRedirectForFrame(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebFrame *frame) { return S_OK; }
+
+ virtual HRESULT STDMETHODCALLTYPE willCloseFrame(
+ /* [in] */ IWebView *webView,
+ /* [in] */ IWebFrame *frame) { return S_OK; }
+
+ virtual /* [local] */ HRESULT STDMETHODCALLTYPE windowScriptObjectAvailable(
+ /* [in] */ IWebView *webView,
+ /* [in] */ JSContextRef context,
+ /* [in] */ JSObjectRef windowScriptObject) { return S_OK; }
+
+ // WinLauncherWebHost
+
+protected:
+ HRESULT updateAddressBar(IWebView* webView);
+
+protected:
+ ULONG m_refCount;
+};
diff --git a/WebKitTools/WinLauncher/WinLauncher.ico b/WebKitTools/WinLauncher/WinLauncher.ico
new file mode 100644
index 0000000..d551aa3
--- /dev/null
+++ b/WebKitTools/WinLauncher/WinLauncher.ico
Binary files differ
diff --git a/WebKitTools/WinLauncher/WinLauncher.rc b/WebKitTools/WinLauncher/WinLauncher.rc
new file mode 100644
index 0000000..f4b2cd4
--- /dev/null
+++ b/WebKitTools/WinLauncher/WinLauncher.rc
@@ -0,0 +1,136 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#define APSTUDIO_HIDDEN_SYMBOLS
+#include "windows.h"
+#undef APSTUDIO_HIDDEN_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_WINLAUNCHER ICON "WinLauncher.ico"
+IDI_SMALL ICON "small.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Menu
+//
+
+IDC_WINLAUNCHER MENU
+BEGIN
+ POPUP "&File"
+ BEGIN
+ MENUITEM "E&xit", IDM_EXIT
+ END
+ POPUP "&Help"
+ BEGIN
+ MENUITEM "&About ...", IDM_ABOUT
+ END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Accelerator
+//
+
+IDC_WINLAUNCHER ACCELERATORS
+BEGIN
+ "?", IDM_ABOUT, ASCII, ALT
+ "/", IDM_ABOUT, ASCII, ALT
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_ABOUTBOX DIALOGEX 22, 17, 230, 75
+STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "About"
+FONT 8, "System", 0, 0, 0x0
+BEGIN
+ ICON IDI_WINLAUNCHER,IDC_MYICON,14,9,20,20
+ LTEXT "WinLauncher Version 1.1",IDC_STATIC,49,10,119,8,SS_NOPREFIX
+ LTEXT "Copyright (C) 2008",IDC_STATIC,49,20,119,8
+ DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUP
+END
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
+ "#include ""windows.h""\r\n"
+ "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE
+BEGIN
+ IDS_APP_TITLE "WinLauncher"
+ IDC_WINLAUNCHER "WINLAUNCHER"
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/WebKitTools/WinLauncher/WinLauncher.vcproj b/WebKitTools/WinLauncher/WinLauncher.vcproj
new file mode 100644
index 0000000..d1002ea
--- /dev/null
+++ b/WebKitTools/WinLauncher/WinLauncher.vcproj
@@ -0,0 +1,343 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="WinLauncher"
+ ProjectGUID="{114FCA11-216B-4C8C-957E-30A75AE80443}"
+ RootNamespace="WinLauncher"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include\WebKit&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)&quot;;&quot;$(IntDir)\Include&quot;;&quot;$(WebKitOutputDir)\obj\WebKit\DerivedSources&quot;"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE"
+ MinimalRebuild="true"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ RuntimeTypeInfo="false"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="false"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkLibraryDependencies="false"
+ AdditionalDependencies="comctl32.lib shlwapi.lib user32.lib ole32.lib oleaut32.lib WebKitGUID$(WebKitConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="&quot;$(WebKitOutputDir)\lib&quot;;&quot;$(ProjectDir)\..\..\..\&quot;"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ TypeLibraryFile="$(WebKitOutputDir)\lib\WebKit.tlb"
+ ComponentFileName="WebKit$(WebKitDLLConfigSuffix)"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include\WebKit&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\icu&quot;;&quot;$(WebKitLibrariesDir)\Include\icu&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitOutputDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)&quot;;&quot;$(IntDir)\include&quot;;&quot;$(WebKitOutputDir)\obj\WebKit\DerivedSources&quot;"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_WIN32_WINNT=0x501"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ RuntimeTypeInfo="false"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="false"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkLibraryDependencies="false"
+ AdditionalOptions="&#x0D;&#x0A;"
+ AdditionalDependencies="comctl32.lib shlwapi.lib user32.lib ole32.lib oleaut32.lib WebKitGUID$(WebKitConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="&quot;$(WebKitOutputDir)\lib&quot;;&quot;$(ProjectDir)\..\..\..\&quot;"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ TypeLibraryFile="$(WebKitOutputDir)\lib\WebKit.tlb"
+ ComponentFileName="WebKit$(WebKitDLLConfigSuffix)"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </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"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include\WebKit&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)&quot;;&quot;$(IntDir)\Include&quot;;&quot;$(WebKitOutputDir)\obj\WebKit\DerivedSources&quot;"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE"
+ MinimalRebuild="true"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ RuntimeTypeInfo="false"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="false"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkLibraryDependencies="false"
+ AdditionalDependencies="comctl32.lib shlwapi.lib user32.lib ole32.lib oleaut32.lib WebKitGUID$(WebKitConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="&quot;$(WebKitOutputDir)\lib&quot;;&quot;$(ProjectDir)\..\..\..\&quot;"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ TypeLibraryFile="$(WebKitOutputDir)\lib\WebKit.tlb"
+ ComponentFileName="WebKit$(WebKitDLLConfigSuffix)"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\stdafx.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Internal|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\WinLauncher.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\Resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\WinLauncher.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ <File
+ RelativePath=".\small.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\WinLauncher.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\WinLauncher.rc"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/WebKitTools/WinLauncher/resource.h b/WebKitTools/WinLauncher/resource.h
new file mode 100644
index 0000000..6a21684
--- /dev/null
+++ b/WebKitTools/WinLauncher/resource.h
@@ -0,0 +1,27 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by WinLauncher.rc
+//
+#define IDC_MYICON 2
+#define IDD_WINLAUNCHER_DIALOG 102
+#define IDS_APP_TITLE 103
+#define IDD_ABOUTBOX 103
+#define IDM_ABOUT 104
+#define IDM_EXIT 105
+#define IDI_WINLAUNCHER 107
+#define IDI_SMALL 108
+#define IDC_WINLAUNCHER 109
+#define IDR_MAINFRAME 128
+#define IDC_STATIC -1
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NO_MFC 1
+#define _APS_NEXT_RESOURCE_VALUE 129
+#define _APS_NEXT_COMMAND_VALUE 32771
+#define _APS_NEXT_CONTROL_VALUE 1000
+#define _APS_NEXT_SYMED_VALUE 110
+#endif
+#endif
diff --git a/WebKitTools/WinLauncher/small.ico b/WebKitTools/WinLauncher/small.ico
new file mode 100644
index 0000000..d551aa3
--- /dev/null
+++ b/WebKitTools/WinLauncher/small.ico
Binary files differ
diff --git a/WebKitTools/WinLauncher/stdafx.cpp b/WebKitTools/WinLauncher/stdafx.cpp
new file mode 100644
index 0000000..541dcb1
--- /dev/null
+++ b/WebKitTools/WinLauncher/stdafx.cpp
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2006 Apple Computer, 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 COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// stdafx.cpp : source file that includes just the standard includes
+// Spinneret.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+// TODO: reference any additional headers you need in STDAFX.H
+// and not in this file
diff --git a/WebKitTools/WinLauncher/stdafx.h b/WebKitTools/WinLauncher/stdafx.h
new file mode 100644
index 0000000..86f76cc
--- /dev/null
+++ b/WebKitTools/WinLauncher/stdafx.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2006 Apple Computer, 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 COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#pragma once
+
+// Modify the following defines if you have to target a platform prior to the ones specified below.
+// Refer to MSDN for the latest info on corresponding values for different platforms.
+#ifndef WINVER // Allow use of features specific to Windows XP or later.
+#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
+#endif
+
+#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
+#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
+#endif
+
+#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
+#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
+#endif
+
+#ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later.
+#define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE.
+#endif
+
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+// Windows Header Files:
+#include <windows.h>
+
+// C RunTime Header Files
+#include <stdlib.h>
+#include <malloc.h>
+#include <memory.h>
+#include <tchar.h>
+
+#if 0
+// Visual Studio Leak Detection
+// <http://msdn2.microsoft.com/en-US/library/e5ewb1h3.aspx>
+#if defined(_MSC_VER) && defined(_DEBUG)
+#define _CRTDBG_MAP_ALLOC
+#include <stdlib.h>
+#include <crtdbg.h>
+#endif
+#endif
diff --git a/WebKitTools/iExploder/CHANGELOG.txt b/WebKitTools/iExploder/CHANGELOG.txt
new file mode 100644
index 0000000..a9d5060
--- /dev/null
+++ b/WebKitTools/iExploder/CHANGELOG.txt
@@ -0,0 +1,328 @@
+------------------------------------------------------------------------
+r618 | thomas | 2006-04-21 09:55:51 -0400 (Fri, 21 Apr 2006) | 1 line
+Changed paths:
+ M /iexploder/README.txt
+ M /iexploder/htdocs/iexploder.cgi
+ M /iexploder/htdocs/iexploder.rb
+ M /iexploder/htdocs/webserver.rb
+
+1.3.2.. minor adjustment to title and where gets set
+------------------------------------------------------------------------
+r617 | thomas | 2006-04-19 17:14:26 -0400 (Wed, 19 Apr 2006) | 1 line
+Changed paths:
+ A /iexploder/testcases/safari/2500_163-Safari-2.0.3_Mac_OS_X-Crash.html
+
+Add h4+pre+cite+nolayer+code crash for Safari 2.0.3
+------------------------------------------------------------------------
+r616 | thomas | 2006-04-19 17:01:48 -0400 (Wed, 19 Apr 2006) | 1 line
+Changed paths:
+ A /iexploder/tools/showtest.rb
+
+showtest.rb: easily download a testcase
+------------------------------------------------------------------------
+r615 | thomas | 2006-04-19 16:07:13 -0400 (Wed, 19 Apr 2006) | 1 line
+Changed paths:
+ M /iexploder/htdocs/iexploder.rb
+
+Remove stopping debug message
+------------------------------------------------------------------------
+r614 | thomas | 2006-04-19 16:02:48 -0400 (Wed, 19 Apr 2006) | 1 line
+Changed paths:
+ M /iexploder/README.txt
+ M /iexploder/htdocs/iexploder.rb
+
+New subtest algorithm: double the tag count each iteration
+------------------------------------------------------------------------
+r613 | thomas | 2006-04-19 15:05:30 -0400 (Wed, 19 Apr 2006) | 1 line
+Changed paths:
+ M /iexploder/htdocs/cssproperties.in
+
+remove IE dupes: text-overflow and word-wrap
+------------------------------------------------------------------------
+r612 | thomas | 2006-04-19 12:48:07 -0400 (Wed, 19 Apr 2006) | 1 line
+Changed paths:
+ M /iexploder/README.txt
+ M /iexploder/htdocs/config.rb
+ M /iexploder/htdocs/iexploder.rb
+
+Add some benchmark/performance info.. set MAX_TAGS default to 96
+------------------------------------------------------------------------
+r611 | thomas | 2006-04-19 10:22:33 -0400 (Wed, 19 Apr 2006) | 1 line
+Changed paths:
+ M /iexploder/htdocs/iexploder.cgi
+ M /iexploder/htdocs/iexploder.rb
+ M /iexploder/htdocs/webserver.rb
+
+Add stop parameter, fix port assignment issue, fix indentation
+------------------------------------------------------------------------
+r610 | thomas | 2006-04-19 10:22:06 -0400 (Wed, 19 Apr 2006) | 1 line
+Changed paths:
+ M /iexploder/README.txt
+
+1.3.0
+------------------------------------------------------------------------
+r609 | thomas | 2006-04-18 22:46:35 -0400 (Tue, 18 Apr 2006) | 1 line
+Changed paths:
+ A /iexploder/testcases/safari/16170_44-Safari-Nightly-420+-2006-r13911-2006-04-18.html
+
+applet+param Hashmap crash in Safari
+------------------------------------------------------------------------
+r608 | thomas | 2006-04-18 22:07:45 -0400 (Tue, 18 Apr 2006) | 1 line
+Changed paths:
+ M /iexploder/htdocs/iexploder.cgi
+ M /iexploder/htdocs/webserver.rb
+
+1.3.0
+------------------------------------------------------------------------
+r607 | thomas | 2006-04-18 22:05:47 -0400 (Tue, 18 Apr 2006) | 1 line
+Changed paths:
+ M /iexploder/README.txt
+ M /iexploder/htdocs/webserver.rb
+ M /iexploder/tools/osx_last_crash.rb
+
+commit osx_last_crash minutes->days change, document that you can pass a new port number to the webserver.rb program
+------------------------------------------------------------------------
+r606 | thomas | 2006-04-18 22:02:16 -0400 (Tue, 18 Apr 2006) | 1 line
+Changed paths:
+ A /iexploder/testcases/safari/2969_421-Safari-2.0.3_Mac_OS_X-Crash.html
+ A /iexploder/testcases/safari/5763_181-Safari-Nightly-420+-2006-r13911-2006-04-18.html
+
+Add more Safari crashes to the testcases list
+------------------------------------------------------------------------
+r605 | thomas | 2006-04-18 19:05:46 -0400 (Tue, 18 Apr 2006) | 1 line
+Changed paths:
+ M /iexploder/README.txt
+ M /iexploder/htdocs/config.rb
+ M /iexploder/htdocs/iexploder.cgi
+ M /iexploder/htdocs/iexploder.rb
+ M /iexploder/htdocs/webserver.rb
+
+Greatly improve subtests. Not only do we iterate around each tag, but we steadily increase the amount of tags we input as well
+------------------------------------------------------------------------
+r604 | thomas | 2006-04-18 17:04:17 -0400 (Tue, 18 Apr 2006) | 1 line
+Changed paths:
+ M /iexploder/README.txt
+ M /iexploder/htdocs/config.rb
+
+1.3b1.. also, raise max tags to 48 now that we have fixed subtest bugs
+------------------------------------------------------------------------
+r603 | thomas | 2006-04-18 16:59:20 -0400 (Tue, 18 Apr 2006) | 1 line
+Changed paths:
+ M /iexploder/htdocs/iexploder.cgi
+ M /iexploder/htdocs/iexploder.rb
+ A /iexploder/htdocs/webserver.rb
+
+New Webrick based option for standalone hosting
+------------------------------------------------------------------------
+r602 | thomas | 2006-04-18 16:18:35 -0400 (Tue, 18 Apr 2006) | 1 line
+Changed paths:
+ A /iexploder/htdocs/config.rb
+ M /iexploder/htdocs/cssproperties.in
+ M /iexploder/htdocs/iexploder.cgi
+ A /iexploder/htdocs/iexploder.rb
+
+Split iexploder.cgi into iexploder.rb and config.rb
+------------------------------------------------------------------------
+r601 | thomas | 2006-04-18 13:36:25 -0400 (Tue, 18 Apr 2006) | 1 line
+Changed paths:
+ M /iexploder/htdocs/cssvalues.in
+
+Add items from WebKit/WebCore/css/CSSValueKeywords.in
+------------------------------------------------------------------------
+r600 | thomas | 2006-04-18 13:32:45 -0400 (Tue, 18 Apr 2006) | 1 line
+Changed paths:
+ A /iexploder/testcases/opera/4750_Opera_8.5.4_Mac_OS_X-Crash.html
+
+Add odd new crash from Opera 8.5.4 for Mac
+------------------------------------------------------------------------
+r599 | thomas | 2006-04-18 13:10:15 -0400 (Tue, 18 Apr 2006) | 1 line
+Changed paths:
+ A /iexploder/testcases/safari/7483_Safari-Nightly-420+-2006-r13911-2006-04-18.html
+
+Add new Safari test case
+------------------------------------------------------------------------
+r598 | thomas | 2006-04-18 12:25:39 -0400 (Tue, 18 Apr 2006) | 1 line
+Changed paths:
+ M /iexploder/LICENSE.txt
+ M /iexploder/README.txt
+ M /iexploder/htdocs/htmlattrs.in
+ M /iexploder/htdocs/htmltags.in
+ M /iexploder/htdocs/iexploder.cgi
+
+iExploder 1.3: sync with modern rendering kits
+------------------------------------------------------------------------
+r597 | thomas | 2006-04-18 12:25:18 -0400 (Tue, 18 Apr 2006) | 1 line
+Changed paths:
+ A /iexploder/testcases/firefox/354_1-Firefox-1.5.0.1_Solaris-Crash.html
+ A /iexploder/testcases/firefox/44_9-Firefox-1.5.0.1_Solaris-Crash.html
+ A /iexploder/testcases/internet_explorer/8386_11-Internet-Explorer-6.0_WinXP-DoS.html (from /iexploder/testcases/safari/8386_11-Internet-Explorer-6.0_WinXP-DoS.html:596)
+ A /iexploder/testcases/safari/218-Safari-2.0.3_Mac_OS_X-Crash.html
+ D /iexploder/testcases/safari/8386_11-Internet-Explorer-6.0_WinXP-DoS.html
+
+New testcases
+------------------------------------------------------------------------
+r596 | thomas | 2006-04-18 12:23:48 -0400 (Tue, 18 Apr 2006) | 1 line
+Changed paths:
+ D /iexploder/testcases/119_4-Safari-Nightly-420+-2005-10-21-Crash.html
+ D /iexploder/testcases/165367_15-FireFox-1.4.1-Crash.html
+ D /iexploder/testcases/2009-iCab-3.0.1-Mac_OS_X-Crash.html
+ D /iexploder/testcases/2289-iCab-3.0.1-Crash.html
+ D /iexploder/testcases/25057-OmniWeb-5.1.1-Crash.html
+ D /iexploder/testcases/2624-Opera-8.5-Mac_OS_X-Crash.html
+ D /iexploder/testcases/502701_7-FireFox-1.4.1-Crash.html
+ D /iexploder/testcases/60253-OmniWeb-5.1.1-Crash.html
+ D /iexploder/testcases/6134_19-Safari-2.0.1-412.5-Crash.html
+ D /iexploder/testcases/8386_11-Internet-Explorer-6.0_WinXP-DoS.html
+ A /iexploder/testcases/firefox
+ A /iexploder/testcases/firefox/165367_15-Firefox-1.4.1-Crash.html (from /iexploder/testcases/165367_15-FireFox-1.4.1-Crash.html:595)
+ A /iexploder/testcases/firefox/502701_7-Firefox-1.4.1-Crash.html (from /iexploder/testcases/502701_7-FireFox-1.4.1-Crash.html:595)
+ A /iexploder/testcases/icab
+ A /iexploder/testcases/icab/2009-iCab-3.0.1-Mac_OS_X-Crash.html (from /iexploder/testcases/2009-iCab-3.0.1-Mac_OS_X-Crash.html:595)
+ A /iexploder/testcases/icab/2289-iCab-3.0.1-Crash.html (from /iexploder/testcases/2289-iCab-3.0.1-Crash.html:595)
+ A /iexploder/testcases/internet_explorer
+ A /iexploder/testcases/omniweb
+ A /iexploder/testcases/omniweb/25057-OmniWeb-5.1.1-Crash.html (from /iexploder/testcases/25057-OmniWeb-5.1.1-Crash.html:595)
+ A /iexploder/testcases/omniweb/60253-OmniWeb-5.1.1-Crash.html (from /iexploder/testcases/60253-OmniWeb-5.1.1-Crash.html:595)
+ A /iexploder/testcases/opera
+ A /iexploder/testcases/opera/2624-Opera-8.5-Mac_OS_X-Crash.html (from /iexploder/testcases/2624-Opera-8.5-Mac_OS_X-Crash.html:595)
+ A /iexploder/testcases/safari
+ A /iexploder/testcases/safari/119_4-Safari-Nightly-420+-2005-10-21-Crash.html (from /iexploder/testcases/119_4-Safari-Nightly-420+-2005-10-21-Crash.html:595)
+ A /iexploder/testcases/safari/6134_19-Safari-2.0.1-412.5-Crash.html (from /iexploder/testcases/6134_19-Safari-2.0.1-412.5-Crash.html:595)
+ A /iexploder/testcases/safari/8386_11-Internet-Explorer-6.0_WinXP-DoS.html (from /iexploder/testcases/8386_11-Internet-Explorer-6.0_WinXP-DoS.html:595)
+
+Reshuffle testcases
+------------------------------------------------------------------------
+r521 | thomas | 2005-11-03 22:01:43 -0500 (Thu, 03 Nov 2005) | 1 line
+Changed paths:
+ A /iexploder/testcases/2289-iCab-3.0.1-Crash.html
+ A /iexploder/testcases/60253-OmniWeb-5.1.1-Crash.html
+
+add some test cases
+------------------------------------------------------------------------
+r520 | thomas | 2005-11-03 22:01:19 -0500 (Thu, 03 Nov 2005) | 1 line
+Changed paths:
+ M /iexploder/htdocs/iexploder.cgi
+
+Add some cute tabs
+------------------------------------------------------------------------
+r508 | thomas | 2005-10-21 15:34:38 -0400 (Fri, 21 Oct 2005) | 1 line
+Changed paths:
+ A /iexploder/testcases/165367_15-FireFox-1.4.1-Crash.html (from /iexploder/testcases/165367_15-FireFox-1.4.1-Mac_OS_X-Crash.html:505)
+ D /iexploder/testcases/165367_15-FireFox-1.4.1-Mac_OS_X-Crash.html
+
+Crash is not OSX specific
+------------------------------------------------------------------------
+r507 | thomas | 2005-10-21 14:59:41 -0400 (Fri, 21 Oct 2005) | 1 line
+Changed paths:
+ M /iexploder/README.txt
+
+Mention the fact that testcases may not be portable across installations
+------------------------------------------------------------------------
+r506 | thomas | 2005-10-21 14:45:48 -0400 (Fri, 21 Oct 2005) | 1 line
+Changed paths:
+ M /iexploder/htdocs/index.html
+
+Fix lookup html code
+------------------------------------------------------------------------
+r505 | thomas | 2005-10-21 14:22:10 -0400 (Fri, 21 Oct 2005) | 1 line
+Changed paths:
+ A /iexploder/testcases/165367_15-FireFox-1.4.1-Mac_OS_X-Crash.html
+
+QuickDraw crash for Mac OS X
+------------------------------------------------------------------------
+r504 | thomas | 2005-10-21 14:14:34 -0400 (Fri, 21 Oct 2005) | 1 line
+Changed paths:
+ A /iexploder/testcases/25057-OmniWeb-5.1.1-Crash.html
+
+New crash
+------------------------------------------------------------------------
+r503 | thomas | 2005-10-21 14:06:45 -0400 (Fri, 21 Oct 2005) | 1 line
+Changed paths:
+ A /iexploder/testcases/8386_11-Internet-Explorer-6.0_WinXP-DoS.html
+
+IE DoS
+------------------------------------------------------------------------
+r502 | thomas | 2005-10-21 13:24:02 -0400 (Fri, 21 Oct 2005) | 1 line
+Changed paths:
+ M /iexploder/README.txt
+ M /iexploder/htdocs/cssvalues.in
+ M /iexploder/htdocs/iexploder.cgi
+ M /iexploder/htdocs/index.html
+ D /iexploder/testcases/100482.html
+ D /iexploder/testcases/103399-nscssvaluelist.html
+ A /iexploder/testcases/119_4-Safari-Nightly-420+-2005-10-21-Crash.html
+ A /iexploder/testcases/2009-iCab-3.0.1-Mac_OS_X-Crash.html
+ A /iexploder/testcases/2624-Opera-8.5-Mac_OS_X-Crash.html
+ A /iexploder/testcases/502701_7-FireFox-1.4.1-Crash.html
+ A /iexploder/testcases/6134_19-Safari-2.0.1-412.5-Crash.html
+ D /iexploder/testcases/firefox-caption-iframe-table-47179.html
+ D /iexploder/testcases/firefox-caption-marquee-27473.html
+ D /iexploder/testcases/firefox-caption-marquee-66937.html
+ D /iexploder/testcases/firefox-isindex-18149.html
+ D /iexploder/testcases/firefox-visibility-caption-111895.html
+
+1.2 Update, mostly documentation and test cases
+------------------------------------------------------------------------
+r501 | thomas | 2005-10-21 11:41:39 -0400 (Fri, 21 Oct 2005) | 1 line
+Changed paths:
+ M /iexploder/tools/osx_last_crash.rb
+
+back to days, filter out synergy
+------------------------------------------------------------------------
+r500 | thomas | 2005-10-21 11:25:28 -0400 (Fri, 21 Oct 2005) | 1 line
+Changed paths:
+ M /iexploder/htdocs/cssvalues.in
+ M /iexploder/htdocs/iexploder.cgi
+ M /iexploder/tools/lasthit.rb
+
+1.2: We now use javascript reloads after 1 second in case the meta breaks (IE)
+------------------------------------------------------------------------
+r499 | thomas | 2005-10-21 08:51:07 -0400 (Fri, 21 Oct 2005) | 1 line
+Changed paths:
+ M /iexploder/htdocs/iexploder.cgi
+
+1.1: Fix up our subtest model
+------------------------------------------------------------------------
+r498 | thomas | 2005-10-20 21:55:59 -0400 (Thu, 20 Oct 2005) | 1 line
+Changed paths:
+ M /iexploder/htdocs/iexploder.cgi
+
+Support for subtests, and compatibility with mod_ruby
+------------------------------------------------------------------------
+r497 | thomas | 2005-10-20 20:48:59 -0400 (Thu, 20 Oct 2005) | 1 line
+Changed paths:
+ M /iexploder/htdocs/cssproperties.in
+ M /iexploder/htdocs/cssvalues.in
+ M /iexploder/htdocs/htmlattrs.in
+ M /iexploder/htdocs/htmlvalues.in
+ M /iexploder/htdocs/iexploder.cgi
+
+update to v1.0
+------------------------------------------------------------------------
+r455 | tstrombe | 2005-02-28 08:13:25 -0500 (Mon, 28 Feb 2005) | 1 line
+Changed paths:
+ A /iexploder
+ A /iexploder/LICENSE.txt
+ A /iexploder/README.txt
+ A /iexploder/htdocs
+ A /iexploder/htdocs/cssproperties.in
+ A /iexploder/htdocs/cssvalues.in
+ A /iexploder/htdocs/htmlattrs.in
+ A /iexploder/htdocs/htmltags.in
+ A /iexploder/htdocs/htmlvalues.in
+ A /iexploder/htdocs/iexploder.cgi
+ A /iexploder/htdocs/index.html
+ A /iexploder/testcases
+ A /iexploder/testcases/100482.html
+ A /iexploder/testcases/103399-nscssvaluelist.html
+ A /iexploder/testcases/firefox-caption-iframe-table-47179.html
+ A /iexploder/testcases/firefox-caption-marquee-27473.html
+ A /iexploder/testcases/firefox-caption-marquee-66937.html
+ A /iexploder/testcases/firefox-isindex-18149.html
+ A /iexploder/testcases/firefox-visibility-caption-111895.html
+ A /iexploder/tools
+ A /iexploder/tools/lasthit.rb
+ A /iexploder/tools/osx_last_crash.rb
+
+iexploder software
+------------------------------------------------------------------------
diff --git a/WebKitTools/iExploder/LICENSE.txt b/WebKitTools/iExploder/LICENSE.txt
new file mode 100644
index 0000000..5199718
--- /dev/null
+++ b/WebKitTools/iExploder/LICENSE.txt
@@ -0,0 +1,20 @@
+#
+# Copyright (c) 2005 Thomas Stromberg <thomas%stromberg.org>
+#
+# This software is provided 'as-is', without any express or implied warranty.
+# In no event will the authors be held liable for any damages arising from the
+# use of this software.
+#
+# Permission is granted to anyone to use this software for any purpose,
+# including commercial applications, and to alter it and redistribute it
+# freely, subject to the following restrictions:
+#
+# 1. The origin of this software must not be misrepresented; you must not
+# claim that you wrote the original software. If you use this software in a
+# product, an acknowledgment in the product documentation would be appreciated
+# but is not required.
+#
+# 2. Altered source versions must be plainly marked as such, and must not be
+# misrepresented as being the original software.
+#
+# 3. This notice may not be removed or altered from any source distribution.
diff --git a/WebKitTools/iExploder/README.txt b/WebKitTools/iExploder/README.txt
new file mode 100644
index 0000000..a941697
--- /dev/null
+++ b/WebKitTools/iExploder/README.txt
@@ -0,0 +1,149 @@
+iExploder 1.3.2
+===============
+
+Welcome to iExploder. a highly inefficient, but fairly effective web
+browser tester. The code still has a lot of work to be done, but it's
+definitely usable. Here are some notable features:
+
+* Tests all common HTML and CSS tags and attributes, as parsed from
+the KHTML, WebKit and Mozilla source trees, as well as tags for
+Internet Explorer from MSDN. This also includes a few Javascript hooks.
+* Numeric, and String overflow and formatting tests
+* Sequential and Randomized Test Case Generation
+* Test Case Lookups
+* Subtest generation
+
+
+Installation (Standalone)
+-------------------------
+Make sure you have Ruby installed (comes with Mac OS X, most Linux
+distributions). See http://www.ruby-lang.org/ if you do not.
+
+If you do not already have a webserver setup, you can use the server
+built into iexploder. Simply go into the htdocs directory and type:
+
+% ruby webserver.rb
+
+A webserver will then start on port 2000 with the iexploder form. If
+port 2000 is not preferable, you can pass it another port on the command
+line:
+
+% ruby webserver.rb 2001
+
+Please note that lasthit.rb does not currently work with the logs output
+from this method. I recommend using a seperate instance/port number
+for each browser you test simultaneous using this method.
+
+
+Installation (External Webserver)
+---------------------------------
+If you wish to use an external webserver (required for lasthit.rb use),
+you may do so. IExploder has been tested with apache.
+
+Copy the contents of the htdocs/ folder to any directory served
+by your webserver. Make sure that directory can execute CGI scripts. If
+performance seems to be low, please try using mod_ruby.
+
+
+FAQ:
+----
+1) Are the tests always the same?
+
+ The test cases should always be the same on a single installation, but not
+necessarily on different installations of iExploder. Random generator seeds
+may differ between operating systems and platforms. If you alter the tag and
+property counts in config.rb, it will change the test cases as well.
+
+
+2) How do I look up the last successful test for a client?
+
+Use tools/lasthit.rb. When I get a crash, I usually do something like:
+
+ % tail -15000 /var/log/apache2/access_log | ./lasthit.rb
+
+Letting you know how many tests and what the last test id was for each
+client tested. You can then try to repeat the test, or go through the
+subtests to see if you can repeat the crash.
+
+
+3) How do subtests work?
+
+If you see a crash on a particular test, and would like to determine the exact
+line that is crashing it, you can use subtests. To do so, go back to the test
+submission form, and start the test from the number that a crash was indicated
+on. Instead of leaving the "subtest" field blank, set it to 1. This will rotate
+through each subtest for a particular test.
+
+Each subtest will rotate through a tag offset and a number of tags to
+garble, which should help you isolate the instance. The number of tags
+used doubles each cycle. Here is an idea of how many subtests to expect
+based on your $HTML_MAX_TAGS settings:
+
+tags subtests
+----------------
+32 138
+48 236
+64 332
+96 558
+128 782
+
+Most of the time you will be able to replicate a crash within the first
+$HTML_MAX_TAGS subtests, but sometimes crashes are due to a combination
+of corrupted tags.
+
+
+4) How come I can't seem to repeat the crash?
+
+ Many browser crashes are race conditions that are not easy to repeat. Some
+crashes only happen when going from test 4 -> test 5 -> test 6. If you can't
+repeat the crash through subtests or a lookup of the failing test, try going
+back a few tests.
+
+That said, some crashes are due to race conditions that are very difficult
+to replicate.
+
+
+5) Why did you write this?
+
+ I wanted to make sure that FireFox had as many bugs fixed in it as possible
+before the 1.0 release. After 1.0 came out, I kept improving it.
+
+
+6) Why does Internet Explorer run the tests so slowly?
+
+ <META> refresh tags are very fragile in Internet Explorer, and can be easily
+be rendered useless by other tags on the page. If this happens, a javascript
+refresh will execute after a 1 second delay.
+
+
+
+7) How do I change the number of tags iExploder tests per page?
+
+See config.rb. I personally recommend 32-128 HTML tags per page. While this
+seems to be a lot to go through when designing a test case, that's why the
+subtest engine was made. Different web browsers will have different
+performance characteristics when it comes to the number of tags per page.
+
+Here are the results with Firefox 2.0b1 (Bon Echo) and the iExploder
+built-in webserver running tests 1-250.
+
+tags seconds pages/second tags/second
+-----------------------------------------
+32 60 4.0 131
+48 85 2.9 141
+64 95 2.6 168
+96 120 2.1 200 *DEFAULT*
+128 140 1.8 228
+196 228 1.1 210
+256 308 0.8 207
+
+If you find pages/second to be more important than tags/second, I would
+change $HTML_MAX_TAGS to 32. Do keep in mind that large tag counts mean
+longer subtest generation periods.
+
+
+8) What other performance enhancements can I make?
+
+* Before using iExploder, reset your browser history
+* Minimize your browser while iExploder is running
+* If using Apache, make use of mod_ruby
diff --git a/WebKitTools/iExploder/htdocs/config.rb b/WebKitTools/iExploder/htdocs/config.rb
new file mode 100644
index 0000000..d9e7e1b
--- /dev/null
+++ b/WebKitTools/iExploder/htdocs/config.rb
@@ -0,0 +1,6 @@
+# Configuration for iExploder.. not generally tuned.
+
+$HTML_MAX_TAGS = 96;
+$HTML_MAX_ATTRS = 4;
+$CSS_MAX_PROPS = 5;
+
diff --git a/WebKitTools/iExploder/htdocs/cssproperties.in b/WebKitTools/iExploder/htdocs/cssproperties.in
new file mode 100644
index 0000000..2eb9e7a
--- /dev/null
+++ b/WebKitTools/iExploder/htdocs/cssproperties.in
@@ -0,0 +1,348 @@
+# From WebKit svn r24249 (WebCore/css/CSSPropertyNames.in)
+-webkit-appearance
+-webkit-background-clip
+-webkit-background-composite
+-webkit-background-origin
+-webkit-background-size
+-webkit-binding
+-webkit-border-bottom-left-radius
+-webkit-border-bottom-right-radius
+-webkit-border-fit
+-webkit-border-horizontal-spacing
+-webkit-border-image
+-webkit-border-radius
+-webkit-border-top-left-radius
+-webkit-border-top-right-radius
+-webkit-border-vertical-spacing
+-webkit-box-align
+-webkit-box-direction
+-webkit-box-flex
+-webkit-box-flex-group
+-webkit-box-lines
+-webkit-box-ordinal-group
+-webkit-box-orient
+-webkit-box-pack
+-webkit-box-shadow
+-webkit-box-sizing
+-webkit-column-break-after
+-webkit-column-break-before
+-webkit-column-break-inside
+-webkit-column-count
+-webkit-column-gap
+-webkit-column-rule
+-webkit-column-rule-color
+-webkit-column-rule-style
+-webkit-column-rule-width
+-webkit-column-width
+-webkit-columns
+-webkit-dashboard-region
+-webkit-font-size-delta
+-webkit-highlight
+-webkit-line-break
+-webkit-line-clamp
+-webkit-margin-bottom-collapse
+-webkit-margin-collapse
+-webkit-margin-start
+-webkit-margin-top-collapse
+-webkit-marquee
+-webkit-marquee-direction
+-webkit-marquee-increment
+-webkit-marquee-repetition
+-webkit-marquee-speed
+-webkit-marquee-style
+-webkit-match-nearest-mail-blockquote-color
+-webkit-nbsp-mode
+-webkit-padding-start
+-webkit-rtl-ordering
+-webkit-text-decorations-in-effect
+-webkit-text-fill-color
+-webkit-text-security
+-webkit-text-size-adjust
+-webkit-text-stroke
+-webkit-text-stroke-color
+-webkit-text-stroke-width
+-webkit-user-drag
+-webkit-user-modify
+-webkit-user-select
+background
+background-attachment
+background-color
+background-image
+background-position
+background-position-x
+background-position-y
+background-repeat
+border
+border-bottom
+border-bottom-color
+border-bottom-style
+border-bottom-width
+border-collapse
+border-color
+border-left
+border-left-color
+border-left-style
+border-left-width
+border-right
+border-right-color
+border-right-style
+border-right-width
+border-spacing
+border-style
+border-top
+border-top-color
+border-top-style
+border-top-width
+border-width
+bottom
+caption-side
+clear
+clip
+color
+content
+counter-increment
+counter-reset
+cursor
+direction
+display
+empty-cells
+float
+font
+font-family
+font-size
+font-stretch
+font-style
+font-variant
+font-weight
+height
+left
+letter-spacing
+line-height
+list-style
+list-style-image
+list-style-position
+list-style-type
+margin
+margin-bottom
+margin-left
+margin-right
+margin-top
+max-height
+max-width
+min-height
+min-width
+opacity
+orphans
+outline
+outline-color
+outline-offset
+outline-style
+outline-width
+overflow
+overflow-x
+overflow-y
+padding
+padding-bottom
+padding-left
+padding-right
+padding-top
+page
+page-break-after
+page-break-before
+page-break-inside
+position
+quotes
+resize
+right
+scrollbar-3dlight-color
+scrollbar-arrow-color
+scrollbar-darkshadow-color
+scrollbar-face-color
+scrollbar-highlight-color
+scrollbar-shadow-color
+scrollbar-track-color
+size
+table-layout
+text-align
+text-decoration
+text-indent
+text-line-through
+text-line-through-color
+text-line-through-mode
+text-line-through-style
+text-line-through-width
+text-overflow
+text-overline
+text-overline-color
+text-overline-mode
+text-overline-style
+text-overline-width
+text-shadow
+text-transform
+text-underline
+text-underline-color
+text-underline-mode
+text-underline-style
+text-underline-width
+top
+unicode-bidi
+vertical-align
+visibility
+white-space
+widows
+width
+word-break
+word-spacing
+word-wrap
+z-index
+
+# CSS3 properties - http://www.css3.info/preview/
+background-clip
+background-origin
+border-image
+border-radius
+box-shadow
+box-sizing
+column-count
+column-gap
+column-min-width
+column-rule
+column-rule-color
+column-rule-style
+column-rule-width
+column-space-distribution
+column-span
+column-width
+column-width-policy
+
+# All of the following are from khtml's cssproperties.in as of 19oct2004, but are no longer in WebKit
+-khtml-border-horizontal-spacing
+-khtml-border-vertical-spacing
+-khtml-flow-mode
+-khtml-marquee
+-khtml-marquee-direction
+-khtml-marquee-increment
+-khtml-marquee-repetition
+-khtml-marquee-speed
+-khtml-marquee-style
+-khtml-text-decoration-color
+-khtml-user-input
+scrollbar-base-color
+
+# Internet Explorer 6.0 - http://msdn.microsoft.com/workshop/author/css/reference/attributes.asp
+filter:progid:
+filter:
+ime-mode
+layout-flow
+layout-grid
+layout-grid-char
+layout-grid-line
+layout-grid-mode
+layout-grid-type
+line-break
+overflow-x
+overflow-y
+pagebreakafter
+pagebreakbefore
+ruby-align
+ruby-overhang
+ruby-position
+text-autospace
+text-justify
+text-kashida-space
+text-underline-position
+word-break
+writing-mode
+zoom
+
+# from http://msdn.microsoft.com/library/default.asp?url=/workshop/author/filter/reference/reference.asp
+filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(
+filter:progid:DXImageTransform.Microsoft.Blur(
+filter:progid:DXImageTransform.Microsoft.MotionBlur(
+filter:progid:DXImageTransform.Microsoft.Gradient(
+filter:progid:DXImageTransform.Microsoft.Pixelate(
+
+# From Mozilla Firefox CVS on 2006-04-15 (layout/style/nsCSSPropList.h)
+# grep "^CSS_PROP" nsCSSPropList.h | grep -v "_SVG" |cut -d, -f1 | cut -d\( -f2 | sort
+++ /tmp/moz Tue Apr 18 13:45:30 2006
+-moz-appearance
+-moz-background-clip
+-moz-background-inline-policy
+-moz-background-origin
+-moz-binding
+-moz-border-bottom-colors
+-moz-border-left-colors
+-moz-border-radius
+-moz-border-radius-bottomleft
+-moz-border-radius-bottomright
+-moz-border-radius-topleft
+-moz-border-radius-topright
+-moz-border-right-colors
+-moz-border-top-colors
+-moz-box-align
+-moz-box-direction
+-moz-box-flex
+-moz-box-ordinal-group
+-moz-box-orient
+-moz-box-pack
+-moz-box-sizing
+-moz-column-count
+-moz-column-gap
+-moz-column-width
+-moz-float-edge
+-moz-force-broken-image-icon
+-moz-image-region
+-moz-margin-end
+-moz-margin-start
+-moz-outline-radius
+-moz-outline-radius-bottomleft
+-moz-outline-radius-bottomright
+-moz-outline-radius-topleft
+-moz-outline-radius-topright
+-moz-padding-end
+-moz-padding-start
+-moz-user-focus
+-moz-user-input
+-moz-user-modify
+-moz-user-select
+-x-background-x-position
+-x-background-y-position
+azimuth
+cue
+cue-after
+cue-before
+elevation
+font-size-adjust
+margin-end-value
+margin-left-ltr-source
+margin-left-rtl-source
+margin-left-value
+margin-right-ltr-source
+margin-right-rtl-source
+margin-right-value
+margin-start-value
+marker
+marker-offset
+marks
+padding-end-value
+padding-left-ltr-source
+padding-left-rtl-source
+padding-left-value
+padding-right-ltr-source
+padding-right-rtl-source
+padding-right-value
+padding-start-value
+pause
+pause-after
+pause-before
+pitch
+pitch-range
+richness
+speak
+speak-header
+speak-numeral
+speak-punctuation
+speech-rate
+stress
+voice-family
+volume
diff --git a/WebKitTools/iExploder/htdocs/cssvalues.in b/WebKitTools/iExploder/htdocs/cssvalues.in
new file mode 100644
index 0000000..c19f78f
--- /dev/null
+++ b/WebKitTools/iExploder/htdocs/cssvalues.in
@@ -0,0 +1,339 @@
+"Trebuchet MS",Verdana, Arial, Helvetica, sans-serif
+#339933 !important !important !important
+#9999999999999999999999999999999999999999999
+-5, -5, -5
+-9999%
+-999999999999999999999999999%
+-999999999999999999999999999em
+-999999999999999999999999999px
+-9999em
+-9999px
+-webkit-activelink
+-webkit-auto
+-webkit-baseline-middle
+-webkit-body
+-webkit-box
+-webkit-center
+-webkit-focus-ring-color
+-webkit-inline-box
+-webkit-left
+-webkit-link
+-webkit-marquee
+-webkit-nowrap
+-webkit-overlay
+-webkit-right
+-webkit-text
+-webkit-xxx-large
+0
+0 auto
+0 fixed
+2%
+90000000000000000000000000000000000000000000%
+9999999999999999999999
+99999999999999999999999999999999999999 auto
+99999999999999999999999999999999999999999999px
+999999px solid #fff
+above
+absolute
+activeborder
+activecaption
+after-white-space
+ahead
+alternate
+always
+appworkspace
+aqua
+armenian
+attr("ATTRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
+auto
+avoid
+background
+backwards
+baseline
+below
+bidi-override
+black
+blink
+block
+block clear
+block width
+block-axis
+blue
+bold
+bolder
+border
+border-box
+both
+bottom
+break-word
+button
+button-bevel
+buttonface
+buttonhighlight
+buttonshadow
+buttontext
+capitalize
+caption
+captiontext
+caret
+center
+checkbox
+circle
+cjk-ideographic
+clip
+clip:rect(-0px -2000000px -200000px -0px)
+clip:rect(0px 2000000px 200000px 0px)
+close-quote
+collapse
+compact
+condensed
+content
+content-box
+continuous
+crop
+cross
+crosshair
+cursive
+dashed
+decimal
+decimal-leading-zero
+default
+disc
+discard
+dot-dash
+dot-dot-dash
+dotted
+double
+down
+e-resize
+element
+ellipsis
+embed
+end
+expanded
+extra-condensed
+extra-expanded
+fantasy
+fast
+fixed
+forwards
+fuchsia
+georgian
+gray
+graytext
+green
+grey
+groove
+hand
+hebrew
+help
+helvetica, arial, Courier New, Courier, Mono, Blah, Blah, Blah
+hidden
+hide
+higher
+highlight
+highlighttext
+hiragana
+hiragana-iroha
+horizontal
+icon
+ignore
+inactiveborder
+inactivecaption
+inactivecaptiontext
+infinite
+infobackground
+infotext
+inherit
+initial
+inline
+inline-axis
+inline-block
+inline-table
+inset
+inside
+intrinsic
+invert
+italic
+justify
+katakana
+katakana-iroha
+landscape
+large
+larger
+left
+level
+lighter
+lime
+line-through
+list-item
+listbox
+listitem
+logical
+loud
+lower
+lower-alpha
+lower-greek
+lower-latin
+lower-roman
+lowercase
+ltr
+marker
+maroon
+match
+medium
+menu
+menulist
+menulist-button
+menulist-text
+menulist-textfield
+menutext
+message-box
+middle
+min-intrinsic
+mix
+monospace
+move
+multiple
+n-resize
+narrower
+navy
+ne-resize
+no-close
+no-close-quote
+no-open-quote
+no-repeat
+none
+normal
+normal !important
+nowrap
+nw-resize
+oblique
+olive
+once
+open-quote
+orange
+outset
+outside
+overline
+padding
+pointer
+portrait
+pre
+pre-line
+pre-wrap
+purple
+push-button
+radio
+read-only
+read-write
+read-write-plaintext-only
+red
+relative
+repeat
+repeat-x
+repeat-y
+reverse
+rgb(9999999999, 999999999, 9999999999999)
+ridge
+right
+round
+rtl
+run-in
+s-resize
+sans-serif
+scroll
+scrollbar
+scrollbarbutton-down
+scrollbarbutton-left
+scrollbarbutton-right
+scrollbarbutton-up
+scrollbargripper-horizontal
+scrollbargripper-vertical
+scrollbarthumb-horizontal
+scrollbarthumb-vertical
+scrollbartrack-horizontal
+scrollbartrack-vertical
+se-resize
+searchfield
+searchfield-close
+searchfield-results
+semi-condensed
+semi-expanded
+separate
+serif
+show
+silver
+single
+skip-white-space
+slide
+slider-horizontal
+slider-vertical
+sliderthumb-horizontal
+sliderthumb-vertical
+slow
+small
+small-caps
+small-caption
+smaller
+solid
+space
+square
+square-button
+start
+static
+status-bar
+stretch
+sub
+super
+sw-resize
+table
+table-caption
+table-cell
+table-column
+table-column-group
+table-footer-group
+table-header-group
+table-row
+table-row-group
+teal
+text
+text-bottom
+text-top
+textfield
+thick
+thick dashed yellow
+thick dotted blue
+thin
+threeddarkshadow
+threedface
+threedhighlight
+threedlightshadow
+threedshadow
+top
+transparent
+ultra-condensed
+ultra-expanded
+underline
+unfurl
+up
+upper-alpha
+upper-latin
+upper-roman
+uppercase
+vertical
+visible
+visual
+w-resize
+wait
+wave
+white
+wider
+window
+windowframe
+windowtext
+x-large
+x-small
+xx-large
+xx-small
+yellow
diff --git a/WebKitTools/iExploder/htdocs/htmlattrs.in b/WebKitTools/iExploder/htdocs/htmlattrs.in
new file mode 100644
index 0000000..ad92384
--- /dev/null
+++ b/WebKitTools/iExploder/htdocs/htmlattrs.in
@@ -0,0 +1,259 @@
+# the following come from WebCore 2006-04-15 (WebKit/WebCore/html/HTMLNames.h)
+
+abbr
+accept
+accept_charset
+accesskey
+action
+align
+alink
+alt
+archive
+autocomplete
+autosave
+axis
+background
+behavior
+bgcolor
+bgproperties
+border
+bordercolor
+cellborder
+cellpadding
+cellspacing
+challenge
+char
+charoff
+charset
+checked
+cite
+class
+classid
+clear
+code
+codebase
+codetype
+color
+cols
+colspan
+compact
+composite
+content
+contenteditable
+coords
+data
+datetime
+declare
+defer
+dir
+direction
+disabled
+enctype
+face
+for
+frame
+frameborder
+headers
+height
+hidden
+href
+hreflang
+hspace
+http_equiv
+id
+incremental
+ismap
+keytype
+label
+lang
+language
+left
+leftmargin
+link
+longdesc
+loop
+marginheight
+marginwidth
+max
+maxlength
+mayscript
+media
+method
+min
+multiple
+name
+nohref
+noresize
+noshade
+nowrap
+object
+onabort
+onbeforecopy
+onbeforecut
+onbeforepaste
+onbeforeunload
+onblur
+onchange
+onclick
+oncontextmenu
+oncopy
+oncut
+ondblclick
+ondrag
+ondragend
+ondragenter
+ondragleave
+ondragover
+ondragstart
+ondrop
+onerror
+onfocus
+oninput
+onkeydown
+onkeypress
+onkeyup
+onload
+onmousedown
+onmousemove
+onmouseout
+onmouseover
+onmouseup
+onmousewheel
+onpaste
+onreset
+onresize
+onscroll
+onsearch
+onselect
+onselectstart
+onsubmit
+onunload
+pagex
+pagey
+placeholder
+plain
+pluginpage
+pluginspage
+pluginurl
+precision
+profile
+prompt
+readonly
+rel
+results
+rev
+rows
+rowspan
+rules
+scheme
+scope
+scrollamount
+scrolldelay
+scrolling
+selected
+shape
+size
+span
+src
+standby
+start
+style
+summary
+tabindex
+tableborder
+target
+text
+title
+top
+topmargin
+truespeed
+type
+usemap
+valign
+value
+valuetype
+version
+vlink
+vspace
+width
+wrap
+
+# was in khtml in 2004, but is no longer in WebCore
+accept-charset
+html
+http-equiv
+nosave
+oversrc
+unknown
+visibility
+z-index
+
+# From Mozilla CVS 2006-04-15 (mozilla/layout/style/xbl-marquee)
+bounce
+finish
+onbounce
+onfinish
+onstart
+
+
+# IE specific, from msdn.microsoft.com/workshop/author/dhtml/reference/properties
+acceptcharset
+allowtransparency
+balance
+choff
+datafld
+dataformatas
+datapagesize
+datasrc
+dynsrc
+framespacing
+galleryimg
+hidefocus
+methods
+scroll
+units
+urn
+volume
+
+# From Mozilla CVS 2006-04-15 (mozilla/content/base/src/nsGkAtomList.h)
+# To get these, I used:
+# ggrep -r "Get.*Attr" * | perl -ne 'if (/nsHTMLAtoms::(\w+)/) { \
+# system("grep \\($1, content/base/src/nsGkAtomList.h"); }' \
+# | cut -d\" -f2 | sort -u
+autocheck
+base
+bottommargin
+event
+font-weight
+handler
+layout
+observer
+ping
+point-size
+rightmargin
+variable
+
+# events from Mozilla CVS 2006-04-15 (mozilla/content/base/src/nsGkAtomList.h)
+# cat nsGkAtomList.h | grep GK_ATOM | cut -d\" -f2 | egrep "^on[a-z]+"
+onzoom
+onunderflow
+ontext
+onset
+onpopupshown
+onpopupshowing
+onpopuphiding
+onpopuphidden
+onpaint
+onpageshow
+onpagehide
+onoverflowchanged
+onoverflow
+onget
+ondraggesture
+ondragexit
+ondragdrop
+oncompositionstart
+oncompositionend
+oncommandupdate
+oncommand
+onclose
diff --git a/WebKitTools/iExploder/htdocs/htmltags.in b/WebKitTools/iExploder/htdocs/htmltags.in
new file mode 100644
index 0000000..acac8f3
--- /dev/null
+++ b/WebKitTools/iExploder/htdocs/htmltags.in
@@ -0,0 +1,128 @@
+# The following come from khtml's htmltags.in from 19oct2004
+# From WebCore svn tree, 2006-04-18 (WebKit/WebCore/html/HTMLNames.h)
+
+a
+abbr
+acronym
+address
+applet
+area
+b
+base
+basefont
+bdo
+big
+blockquote
+body
+br
+button
+canvas
+caption
+center
+cite
+code
+col
+colgroup
+dd
+del
+dfn
+dir
+div
+dl
+dt
+em
+embed
+fieldset
+font
+form
+frame
+frameset
+h1
+h2
+h3
+h4
+h5
+h6
+head
+hr
+html
+i
+iframe
+image
+img
+input
+ins
+isindex
+kbd
+keygen
+label
+layer
+legend
+li
+link
+listing
+map
+marquee
+menu
+meta
+nobr
+noembed
+noframes
+nolayer
+noscript
+object
+ol
+optgroup
+option
+p
+param
+plaintext
+pre
+q
+s
+samp
+script
+select
+small
+span
+strike
+strong
+style
+sub
+sup
+table
+tbody
+td
+textarea
+tfoot
+th
+thead
+title
+tr
+tt
+u
+ul
+var
+wbr
+xmp
+
+# This was in khtml in 10-2004
+ilayer
+
+# Additions from Mozilla CVS, 2006-04-18.
+# mozilla/parser/htmlparser/public/nsHTMLTagList.h
+bgsound
+blink
+multicol
+spacer
+
+# The following tags used to be in Mozilla in 10-2004, now removed
+counter
+endnote
+parsererror
+server
+sound
+sourcetext
+
+# From Internet Explorer - http://msdn.microsoft.com/workshop/author/html/reference/elements.asp
+xml
diff --git a/WebKitTools/iExploder/htdocs/htmlvalues.in b/WebKitTools/iExploder/htdocs/htmlvalues.in
new file mode 100644
index 0000000..d54984f
--- /dev/null
+++ b/WebKitTools/iExploder/htdocs/htmlvalues.in
@@ -0,0 +1,35 @@
+# Many of the following are from mangleme.cgi.c's make_up_value() function
+#
+*
+_blank
+_parent
+_self
+_top
+about:
+about:plugins
+file:
+http:
+jar:
+javascript:
+left
+top
+%n%n%n%n%n
+ftp:
+right
+wysiwyg:
+bottom
+none
+ldap:
+%i %i
+999999999,9999999,999999999,9999999,999999999,9999999,999999999,9999999,9
+999999999,9999999,9
+999999999,9999999
+true
+false
+_SEARCH
+javascript
+off
+on
+vbscript
+password
+image
diff --git a/WebKitTools/iExploder/htdocs/iexploder.cgi b/WebKitTools/iExploder/htdocs/iexploder.cgi
new file mode 100755
index 0000000..89e099c
--- /dev/null
+++ b/WebKitTools/iExploder/htdocs/iexploder.cgi
@@ -0,0 +1,45 @@
+#!/usr/bin/ruby
+# iExploder - Generates bad HTML files to perform QA for web browsers.
+# Developed for the Mozilla Foundation.
+#####################
+#
+# Copyright (c) 2006 Thomas Stromberg <thomas%stromberg.org>
+#
+# This software is provided 'as-is', without any express or implied warranty.
+# In no event will the authors be held liable for any damages arising from the
+# use of this software.
+#
+# Permission is granted to anyone to use this software for any purpose,
+# including commercial applications, and to alter it and redistribute it
+# freely, subject to the following restrictions:
+#
+# 1. The origin of this software must not be misrepresented; you must not
+# claim that you wrote the original software. If you use this software in a
+# product, an acknowledgment in the product documentation would be appreciated
+# but is not required.
+#
+# 2. Altered source versions must be plainly marked as such, and must not be
+# misrepresented as being the original software.
+#
+# 3. This notice may not be removed or altered from any source distribution.
+
+require 'cgi';
+require 'iexploder';
+require 'config';
+
+### THE INTERACTION ##################################
+ie = IExploder.new($HTML_MAX_TAGS, $HTML_MAX_ATTRS, $CSS_MAX_PROPS)
+ie.readTagFiles()
+
+cgi = CGI.new("html4");
+ie.url=ENV['SCRIPT_NAME'] || '?'
+ie.test_num = cgi.params['test'][0].to_i
+ie.subtest_num = cgi.params['subtest'][0].to_i || 0
+ie.random_mode = cgi.params['random'][0]
+ie.lookup_mode = cgi.params['lookup'][0]
+ie.stop_num = cgi.params['stop'][0].to_i || 0
+ie.setRandomSeed
+
+cgi.out('type' => 'text/html') do
+ ie.buildPage()
+end
diff --git a/WebKitTools/iExploder/htdocs/iexploder.rb b/WebKitTools/iExploder/htdocs/iexploder.rb
new file mode 100644
index 0000000..eee3e38
--- /dev/null
+++ b/WebKitTools/iExploder/htdocs/iexploder.rb
@@ -0,0 +1,337 @@
+# iExploder - Generates bad HTML files to perform QA for web browsers.
+# Developed for the Mozilla Foundation.
+#####################
+#
+# Copyright (c) 2006 Thomas Stromberg <thomas%stromberg.org>
+#
+# This software is provided 'as-is', without any express or implied warranty.
+# In no event will the authors be held liable for any damages arising from the
+# use of this software.
+#
+# Permission is granted to anyone to use this software for any purpose,
+# including commercial applications, and to alter it and redistribute it
+# freely, subject to the following restrictions:
+#
+# 1. The origin of this software must not be misrepresented; you must not
+# claim that you wrote the original software. If you use this software in a
+# product, an acknowledgment in the product documentation would be appreciated
+# but is not required.
+#
+# 2. Altered source versions must be plainly marked as such, and must not be
+# misrepresented as being the original software.
+#
+# 3. This notice may not be removed or altered from any source distribution.
+
+$VERSION="1.3.2"
+
+class IExploder
+ attr_accessor :test_num, :subtest_num, :lookup_mode, :random_mode, :url
+ attr_accessor :offset, :lines, :stop_num
+
+ def initialize(max_tags, max_attrs, max_props)
+ @htmlMaxTags = max_tags
+ @htmlMaxAttrs = max_attrs
+ @cssMaxProps = max_props
+ @mangledTagTotal = 0
+ @stop_num = 0
+ end
+
+ def setRandomSeed
+ if @test_num > 0
+ srand(@test_num)
+ else
+ srand
+ end
+ end
+
+
+ def readTagFiles
+ # These if statements are so that mod_ruby doesn't have to reload the files
+ # each time
+
+ if (! @cssTags)
+ @cssTags = readTagFile('cssproperties.in');
+ end
+
+ if (! @htmlTags)
+ @htmlTags = readTagFile('htmltags.in');
+ end
+ if (! @htmlAttr)
+ @htmlAttr = readTagFile('htmlattrs.in');
+ end
+
+ if (! @htmlValues)
+ @htmlValues = readTagFile('htmlvalues.in');
+ end
+
+ if (! @cssValues)
+ @cssValues = readTagFile('cssvalues.in');
+ end
+
+ end
+
+
+ def readTagFile(filename)
+ list = Array.new
+ File.new(filename).readlines.each { |line|
+ line.chop!
+
+ # Don't include comments.
+ if (line !~ /^# /) && (line.length > 0)
+ list << line
+ end
+ }
+ return list
+ end
+
+ # based on make_up_value, essentially.
+ def inventValue
+ value = rand(19);
+ case value
+ when 1..3 then return (@htmlValues[rand(@htmlValues.length)])
+ when 4..5 then return (@htmlValues[rand(@htmlValues.length)] + inventValue())
+ when 6 then return (@htmlValues[rand(@htmlValues.length)] + "//" + inventValue())
+ when 7 then return ''
+ # this may return negative argument?
+ when 8..10 then return rand(255).chr * (rand(256)+8)
+ when 11 then return rand(255).chr * (rand(2048)+8)
+ when 12 then return "#" + rand(999999).to_s
+ when 13 then return rand(999999).to_s + "%"
+ when 14..15 then return "&" + rand(999999).to_s + ";"
+ # filters
+ when 16 then
+ return inventValue() + "=" + inventValue()
+
+ # this my return undefined method + for nil:NilClass
+ when 17 then return inventValue() + "," + inventValue()
+ else
+ if rand(5) > 3
+ return "-" + rand(999999).to_s
+ else
+ return rand(999999).to_s
+ end
+ end
+ end
+
+ # based on make_up_value, essentially.
+ def inventCssValue(tag)
+ value = rand(23);
+ case value
+ when 1..10 then return @cssValues[rand(@cssValues.length)]
+ when 11 then return ''
+ when 12 then return rand(255).chr * (rand(8192)+8)
+ when 13
+ length = rand(1024) + 8
+ return (rand(255).chr * length) + " " + (rand(255).chr * length) + " " + (rand(255).chr * length)
+ when 14 then return (rand(255).chr * (rand(1024)+3)) + "px"
+ when 15 then return (rand(255).chr * (rand(1024)+3)) + "em"
+ when 16 then return "url(" + inventValue() + ")"
+ when 17..18 then return "#" + rand(999999999).to_s
+ when 19 then return "-" + rand(99999999).to_s
+ else return rand(99999999).to_s;
+ end
+ end
+
+
+ def mangleTag(tag)
+ @mangledTagTotal += 1
+ out = ''
+
+ # 20% chance of closing a tag instead of opening it. This
+ # still counts against @mangledTagTotal, however.
+ if rand(10) > 8
+ out = "</" + tag + ">"
+ return out
+ end
+
+ # we're opening it.
+ out = "<" + tag
+
+ # forgot the space between the tag and the attributes
+ if rand(15) > 1
+ out << ' '
+ end
+
+ attrNum = rand(@htmlMaxAttrs) + 1
+
+ 1.upto(attrNum) {
+ attr = @htmlAttr[rand(@htmlAttr.length)]
+
+ out << attr
+
+ # 7.5% of the time we skip the = sign. Don't prefix it
+ # if the attribute ends with a ( however.
+
+
+ if rand(15) > 1
+ out << '='
+ end
+
+ # sometimes quote it, sometimes not. I doubt the importance
+ # of this test, but mangleme-1.2 added it, and adding more
+ # random-ness never hurt anything but time. I'll do it less often.
+ quote = rand(2)
+ if (quote > 1)
+ out << "\""
+ end
+
+ out << inventValue()
+
+ # end the quote when you are done
+ if (quote > 1)
+ out << "\" "
+ end
+
+ # 5% chance we skip the space at the end of the name
+ if rand(20) > 1
+ out << ' '
+ end
+
+ }
+
+ # CSS styles!
+ if rand(4) > 1
+ out << " style=\""
+ 1.upto(rand(@cssMaxProps)+1) {
+ out << @cssTags[rand(@cssTags.length)]
+
+ # very small chance we let the tag run on.
+ if rand(50) > 1
+ out << ": "
+ end
+
+ out << inventCssValue(tag)
+ # we almost always put the ; there.
+ if rand(50) > 1
+ out << '; '
+ end
+ }
+ out << "\""
+ end
+
+ out << ">\n"
+
+ # support our local troops!
+ if (@subtest_num > 0) && filterSubTest()
+ if tag =~ /html|body|head/
+ return '<' + tag + '>'
+ else
+ return "<x-#@mangledTagTotal>\n"
+ end
+ else
+ return out
+ end
+ end
+ #end
+
+ def filterSubTest()
+ result = 1
+ if (@mangledTagTotal >= @offset) && (@mangledTagTotal < (@offset + @lines))
+ result = nil
+ end
+ return result
+ end
+
+ def nextTestNum()
+ if random_mode
+ n = rand(99999999)
+ else
+ if @test_num
+ n = @test_num + 1
+ else
+ n = 1
+ end
+ end
+ return n
+ end
+
+ # If we are at line 30 with 8 extra lines, there is no point to try line 31
+ # with 8 lines as well.. skip back to 1 and bump up the line count.
+ def nextSubTestNum()
+ if (@offset + @lines) > @htmlMaxTags
+ nextNum = ((@lines * 2 -1)) * @htmlMaxTags
+ else
+ nextNum = @subtest_num + 1
+ end
+ return nextNum
+ end
+
+
+ def buildPage
+ if (! @test_num) || (@test_num < 1)
+ @test_num = 1
+ end
+ next_num=nextTestNum()
+ @lines = @subtest_num.div(@htmlMaxTags) + 1
+ @offset = @subtest_num.modulo(@htmlMaxTags)
+
+ # building the HTML
+ bodyText = mangleTag('html')
+ bodyText << "\n<head>\n"
+
+ # Only do redirects if lookup=1 has not been specified.
+ if (! @lookup_mode) && (@lines <= @htmlMaxTags) && (@stop_num != @test_num)
+ newpage = @url + "?"
+ if @subtest_num > 0
+ newpage << "test=" << @test_num.to_s << "&subtest=" << nextSubTestNum().to_s
+ else
+ newpage << "test=" << next_num.to_s
+ end
+
+ if @random_mode
+ newpage << "&random=1"
+ end
+
+ if @stop_num > 0
+ newpage << "&stop=" << @stop_num.to_s
+ end
+
+ bodyText << "\t<META HTTP-EQUIV=\"Refresh\" content=\"0;URL=#{newpage}\">\n"
+ # use both techniques, because you never know how you might be corrupting yourself.
+ bodyText << "\t<script language=\"javascript\">setTimeout('window.location=\"#{newpage}\"', 1000);</script>\n"
+ end
+
+ bodyText << "\t" << mangleTag('meta')
+ bodyText << "\t" << mangleTag('meta')
+ bodyText << "\t" << mangleTag('link')
+
+ bodyText << "\t<title>[#@test_num] iExploder #{$VERSION} - #{inventValue()}</title>\n"
+ bodyText << "</head>\n\n"
+
+ # What tags will we be messing with ######################
+ tagList = [ 'body']
+
+ # we already have 5 tags?
+ 1.upto(@htmlMaxTags - 5 ) { tagList << @htmlTags[rand(@htmlTags.length)] }
+
+ tagList.each { |tag|
+ bodyText << mangleTag(tag)
+ bodyText << inventValue() + "\n"
+ }
+ bodyText << "</body>\n</html>"
+ end
+end
+
+
+
+if $0 == __FILE__
+ max=ARGV[0].to_i
+ puts "testing #{max} tags"
+ test = IExploder.new(max, 5, 5)
+ test.readTagFiles()
+ test.test_num=1
+ test.subtest_num=1
+ counter=0
+ test.lines=0
+
+ while test.lines < max
+ test.lines = test.subtest_num.div(max) + 1
+ test.offset = test.subtest_num.modulo(max)
+ test.subtest_num=test.nextSubTestNum
+ counter = counter + 1
+ puts "[#{counter}] subtest #{test.subtest_num} is #{test.lines} lines with #{test.offset} offset"
+ end
+
+ puts "for #{max} tests, you will have #{counter} iterations until #{test.subtest_num}"
+end
+
diff --git a/WebKitTools/iExploder/htdocs/index.html b/WebKitTools/iExploder/htdocs/index.html
new file mode 100644
index 0000000..849bc6b
--- /dev/null
+++ b/WebKitTools/iExploder/htdocs/index.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <title>iExploder 1.3.2</title>
+</head>
+<body>
+<h2>iExploder: Web Browser Quality Assurance Tester</h2>
+<small>Written by <a href="http://toadstool.se/">Thomas Str&ouml;mberg</a> for the
+<a href="http://www.mozilla.org/firefox/">Mozilla FireFox</a> project</small>
+
+
+<ul>
+ <li><a href="iexploder.cgi">Start test sequence from the beginning!</a></li>
+ <li><a href="iexploder.cgi?random=1">Start test sequence in random</a></li>
+ <li>Start testing from a test number:
+ <form method="get" action="iexploder.cgi" name="test">
+ Test: <input size="9" name="test" value="1"> Subtest: <input size="2" name="subtest" value="">
+ <input value="Start" type="submit">
+ </form>
+ </li>
+
+ <li>Lookup a single test number:
+ <form method="get" action="iexploder.cgi" name="test">
+ <input type="hidden" name="lookup" value="1">
+ Test: <input size="9" name="test" value="1"> Subtest: <input size="2" name="subtest" value="">
+ <input value="Lookup" type="submit"></form>
+ </li>
+</ul>
+
+If your browser crashes, please contact thomas%stromberg.org!
+
+</body>
+</html>
+
diff --git a/WebKitTools/iExploder/htdocs/webserver.rb b/WebKitTools/iExploder/htdocs/webserver.rb
new file mode 100755
index 0000000..5176172
--- /dev/null
+++ b/WebKitTools/iExploder/htdocs/webserver.rb
@@ -0,0 +1,75 @@
+#!/usr/bin/ruby
+# iExploder - Generates bad HTML files to perform QA for web browsers.
+# Developed for the Mozilla Foundation.
+#####################
+#
+# Copyright (c) 2006 Thomas Stromberg <thomas%stromberg.org>
+#
+# This software is provided 'as-is', without any express or implied warranty.
+# In no event will the authors be held liable for any damages arising from the
+# use of this software.
+#
+# Permission is granted to anyone to use this software for any purpose,
+# including commercial applications, and to alter it and redistribute it
+# freely, subject to the following restrictions:
+#
+# 1. The origin of this software must not be misrepresented; you must not
+# claim that you wrote the original software. If you use this software in a
+# product, an acknowledgment in the product documentation would be appreciated
+# but is not required.
+#
+# 2. Altered source versions must be plainly marked as such, and must not be
+# misrepresented as being the original software.
+#
+# 3. This notice may not be removed or altered from any source distribution.
+
+require 'webrick'
+require 'iexploder';
+require 'config';
+
+include WEBrick
+### THE INTERACTION ##################################
+$ie_preload = IExploder.new($HTML_MAX_TAGS, $HTML_MAX_ATTRS, $CSS_MAX_PROPS)
+$ie_preload.readTagFiles()
+$ie_preload.url='/iexploder.cgi'
+
+if ARGV[0]
+ port = ARGV[0].to_i
+else
+ port = 2000
+end
+
+puts "* iExploder #{$VERSION} will be available at http://localhost:#{port}"
+puts "* Max Tags: #$HTML_MAX_TAGS Max Attrs: #$HTML_MAX_ATTRS Max Props: #$CSS_MAX_PROPS"
+puts
+
+s = HTTPServer.new( :Port => port )
+class IEServlet < HTTPServlet::AbstractServlet
+ def do_GET(req, res)
+ ie = $ie_preload.dup
+ ie.test_num = req.query['test'].to_i
+ ie.subtest_num = req.query['subtest'].to_i || 0
+ ie.random_mode = req.query['random']
+ ie.lookup_mode = req.query['lookup']
+ ie.stop_num = req.query['stop'].to_i
+ ie.setRandomSeed
+
+ res['Content-Type'] = 'text/html'
+ res.body = ie.buildPage()
+ end
+end
+
+class IEForm < HTTPServlet::AbstractServlet
+ def do_GET(req, res)
+ res['Content-Type'] = 'text/html'
+ res.body = File.open("index.html").readlines.join("\n")
+ end
+end
+
+
+
+s.mount("/iexploder.cgi", IEServlet)
+s.mount("/", IEForm)
+trap("INT") { s.shutdown }
+
+s.start
diff --git a/WebKitTools/iExploder/tools/lasthit.rb b/WebKitTools/iExploder/tools/lasthit.rb
new file mode 100755
index 0000000..b569deb
--- /dev/null
+++ b/WebKitTools/iExploder/tools/lasthit.rb
@@ -0,0 +1,53 @@
+#!/usr/bin/ruby
+# lasthit, part of iExploder
+#
+# Shows statistics about recent agents that have tested with iExploder.
+# It takes all or part of an apache logfile via stdin, and outputs a list
+# of all the agents who tested within that section, what their last test
+# was, and how many tests they have done.
+
+# The usefulness is finding out where a browser crashed.
+
+
+hostHash = Hash.new
+
+if (ARGV[0])
+ file = File.open(ARGV[0])
+else
+ file = $stdin
+end
+
+file.readlines.each { |line|
+ if (line =~ /^(.*?) .*iexploder.*?test=(\d+).* HTTP.* \"(.*?)\"$/)
+ host = $1
+ testnum = $2
+ agent = $3
+ if (! hostHash[host])
+ hostHash[host] = Hash.new
+ end
+ if (! hostHash[host][agent])
+ hostHash[host][agent] = Hash.new
+ hostHash[host][agent]['total'] = 0
+ end
+
+ hostHash[host][agent]['last'] = testnum
+ if line =~ /subtest=(\d+)/
+ hostHash[host][agent]['subtest'] = $1
+ else
+ hostHash[host][agent]['subtest'] = ''
+ end
+ hostHash[host][agent]['total'] = hostHash[host][agent]['total'] + 1
+ end
+}
+
+printf("%14.14s | %8.8s | %3.3s | %8.8s | %s\n",
+ "IP", "Test", "SubTest", "Total", "Agent")
+puts "---------------------------------------------------------------------------"
+hostHash.each_key { |host|
+
+ hostHash[host].each_key { |agent|
+ printf("%14.14s | %8.8s | %3.3s | %8.8s | %s\n",
+ host, hostHash[host][agent]['last'], hostHash[host][agent]['subtest'], hostHash[host][agent]['total'], agent);
+ }
+}
+
diff --git a/WebKitTools/iExploder/tools/osx_last_crash.rb b/WebKitTools/iExploder/tools/osx_last_crash.rb
new file mode 100755
index 0000000..5b62c6d
--- /dev/null
+++ b/WebKitTools/iExploder/tools/osx_last_crash.rb
@@ -0,0 +1,48 @@
+#!/usr/bin/ruby
+# Gives you information about the most recent crash for each application
+# that has crashed within the last 2 days
+
+$LogDir=ENV['HOME'] + '/Library/Logs/CrashReporter'
+$Days=1
+$StackCount=5
+
+files=`find #$LogDir -mtime -#$Days -type f | grep -v synergy`
+files.each { |filename|
+ filename.chop!
+ record = 0
+ date=''
+ stackTrace = []
+
+ File.open(filename).readlines.each { |line|
+ #puts line
+
+ if line =~ /^Date.*(200.*)/
+ date = $1
+ end
+
+ if line =~ /^Thread \d+ Crashed/
+ record = 1
+ # reset the stack trace
+ stackTrace = []
+ end
+
+ if record
+ stackTrace << line
+ record = record + 1
+
+ # stop recording after $StackCount lines
+ if record > ($StackCount + 2)
+ record = nil
+ end
+ end
+ }
+
+ puts File.basename(filename) + " - " + date
+ puts "==================================================="
+ stackTrace.each { |line|
+ puts line
+ }
+ puts ""
+}
+
+
diff --git a/WebKitTools/iExploder/tools/showtest.rb b/WebKitTools/iExploder/tools/showtest.rb
new file mode 100755
index 0000000..af6b101
--- /dev/null
+++ b/WebKitTools/iExploder/tools/showtest.rb
@@ -0,0 +1,43 @@
+#!/usr/bin/ruby
+# showtest.rb - simple CLI interface to grab a testcase
+#####################
+#
+# Copyright (c) 2006 Thomas Stromberg <thomas%stromberg.org>
+#
+# This software is provided 'as-is', without any express or implied warranty.
+# In no event will the authors be held liable for any damages arising from the
+# use of this software.
+#
+# Permission is granted to anyone to use this software for any purpose,
+# including commercial applications, and to alter it and redistribute it
+# freely, subject to the following restrictions:
+#
+# 1. The origin of this software must not be misrepresented; you must not
+# claim that you wrote the original software. If you use this software in a
+# product, an acknowledgment in the product documentation would be appreciated
+# but is not required.
+#
+# 2. Altered source versions must be plainly marked as such, and must not be
+# misrepresented as being the original software.
+#
+# 3. This notice may not be removed or altered from any source distribution.
+
+Dir.chdir('../htdocs')
+require 'iexploder';
+require 'config';
+
+### THE INTERACTION ##################################
+ie = IExploder.new($HTML_MAX_TAGS, $HTML_MAX_ATTRS, $CSS_MAX_PROPS)
+ie.readTagFiles()
+
+if ! ARGV[0]
+ puts "syntax: showtest.rb [test#] [subtest#]"
+ exit
+end
+
+ie.test_num = ARGV[0].to_i
+ie.subtest_num = ARGV[1].to_i || 0
+ie.lookup_mode = 1
+ie.setRandomSeed
+
+puts ie.buildPage()
diff --git a/WebKitTools/mangleme/LICENSE b/WebKitTools/mangleme/LICENSE
new file mode 100644
index 0000000..5ab7695
--- /dev/null
+++ b/WebKitTools/mangleme/LICENSE
@@ -0,0 +1,504 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/WebKitTools/mangleme/Makefile b/WebKitTools/mangleme/Makefile
new file mode 100644
index 0000000..90d01e9
--- /dev/null
+++ b/WebKitTools/mangleme/Makefile
@@ -0,0 +1,16 @@
+#
+# HTML manglizer
+# --------------
+# Copyright (C) 2004 by Michal Zalewski <lcamtuf@coredump.cx>
+#
+# Makefile adapted for WebKit project.
+
+CC = gcc
+CFLAGS = -Wall -O3 -fomit-frame-pointer -funroll-loops
+OUTDIR = ../../WebKitBuild/mangleme
+
+all: $(OUTDIR)/mangle.cgi $(OUTDIR)/remangle.cgi
+
+$(OUTDIR)/%.cgi: %.cgi.c
+ if [ ! -d $(OUTDIR) ]; then mkdir -p $(OUTDIR); fi
+ $(CC) $(CFLAGS) $< -o $(OUTDIR)/$*.cgi
diff --git a/WebKitTools/mangleme/README b/WebKitTools/mangleme/README
new file mode 100644
index 0000000..4fe2928
--- /dev/null
+++ b/WebKitTools/mangleme/README
@@ -0,0 +1,20 @@
+
+ HTML manglizer
+ --------------
+
+ Copyright (C) 2004 by Michal Zalewski <lcamtuf@coredump.cx>
+
+ A trivial utility to automatically check for HTML parsing flaws. Generates
+ a basic set of badly mangled tags on request, with auto-refresh back to the
+ script, so that you can point a browser to it once, and let it run until
+ it crashes.
+
+ Put it in your cgi-bin directory or any other Apache folder with ExecCGI option
+ enabled, then visit the URL http://<yourserver>/<cgidir>/mangleme.cgi.
+
+ When the browser crashes, error-log should be examined for the last matching
+ entry generated by mangle.cgi; extract the hexadecimal value, then invoke
+ remangle.cgi?hex_value from the browser again. If it crashes, you've reproduced
+ the problem, and can save the remangle.cgi page using wget or such.
+
+ Check gallery/ for some samples.
diff --git a/WebKitTools/mangleme/mangle.cgi.c b/WebKitTools/mangleme/mangle.cgi.c
new file mode 100644
index 0000000..12ca948
--- /dev/null
+++ b/WebKitTools/mangleme/mangle.cgi.c
@@ -0,0 +1,122 @@
+/*
+
+ HTML manglizer
+ --------------
+ Copyright (C) 2004 by Michal Zalewski <lcamtuf@coredump.cx>
+
+ HTML manglizer library. Logs random seeds to error-log; find the last entry before
+ crash, then pass it to remangle.cgi to reproduce the problem.
+
+ */
+
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+#include "tags.h"
+
+#define R(x) (rand() % (x))
+
+#define MAXTCOUNT 100
+#define MAXPCOUNT 20
+#define MAXSTR2 80
+
+void make_up_value(void) {
+ char c=R(2);
+
+ if (c) putchar('"');
+
+ switch (R(31)) {
+
+ case 0: printf("javascript:"); make_up_value(); break;
+// case 1: printf("jar:"); make_up_value(); break;
+ case 2: printf("mk:"); make_up_value(); break;
+ case 3: printf("file:"); make_up_value(); break;
+ case 4: printf("http:"); make_up_value(); break;
+ case 5: printf("about:"); make_up_value(); break;
+ case 6: printf("_blank"); break;
+ case 7: printf("_self"); break;
+ case 8: printf("top"); break;
+ case 9: printf("left"); break;
+ case 10: putchar('&'); make_up_value(); putchar(';'); break;
+ case 11: make_up_value(); make_up_value(); break;
+
+ case 12 ... 20: {
+ int c = R(10) ? R(10) : (1 + R(MAXSTR2) * R(MAXSTR2));
+ char* x = malloc(c);
+ memset(x,R(256),c);
+ fwrite(x,c,1,stdout);
+ free(x);
+ break;
+ }
+
+ case 21: printf("%s","%n%n%n%n%n%n"); break;
+ case 22: putchar('#'); break;
+ case 23: putchar('*'); break;
+ default: if (R(2)) putchar('-'); printf("%d",rand()); break;
+
+ }
+
+ if (c) putchar('"');
+
+}
+
+
+void random_tag(void) {
+ int tn, tc;
+
+ do tn = R(MAXTAGS); while (!tags[tn][0]);
+ tc = R(MAXPCOUNT) + 1;
+
+ putchar('<');
+
+ switch (R(10)) {
+ case 0: putchar(R(256)); break;
+ case 1: putchar('/');
+ }
+
+ printf("%s", tags[tn][0]);
+
+ while (tc--) {
+ int pn;
+ switch (R(32)) {
+ case 0: putchar(R(256));
+ case 1: break;
+ default: putchar(' ');
+ }
+ do pn = R(MAXPARS-1) + 1; while (!tags[tn][pn]);
+ printf("%s", tags[tn][pn]);
+ switch (R(32)) {
+ case 0: putchar(R(256));
+ case 1: break;
+ default: putchar('=');
+ }
+
+ make_up_value();
+
+ }
+
+ putchar('>');
+
+}
+
+
+int main(int argc,char** argv) {
+ int tc,seed;
+
+ printf("Content-Type: text/html;charset=utf-8\nRefresh: 0;URL=mangle.cgi\n\n");
+ printf("<HTML><HEAD><META HTTP-EQUIV=\"Refresh\" content=\"0;URL=mangle.cgi\">\n");
+ printf("<script language=\"javascript\">setTimeout('window.location=\"mangle.cgi\"', 1000);</script>\n");
+
+ seed = (time(0) ^ (getpid() << 16));
+ fprintf(stderr,"[%u] Mangle attempt 0x%08x (%s) -- %s\n", (int)time(0), seed, getenv("HTTP_USER_AGENT"), getenv("REMOTE_ADDR"));
+ srand(seed);
+
+ tc = R(MAXTCOUNT) + 1;
+ while (tc--) random_tag();
+ fflush(0);
+ return 0;
+}
diff --git a/WebKitTools/mangleme/remangle.cgi.c b/WebKitTools/mangleme/remangle.cgi.c
new file mode 100644
index 0000000..ccc4472
--- /dev/null
+++ b/WebKitTools/mangleme/remangle.cgi.c
@@ -0,0 +1,125 @@
+/*
+
+ HTML manglizer
+ --------------
+ Copyright (C) 2004 by Michal Zalewski <lcamtuf@coredump.cx>
+
+ Fault reproduction utility.
+
+ */
+
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+#include "tags.h"
+
+#define R(x) (rand() % (x))
+
+#define MAXTCOUNT 100
+#define MAXPCOUNT 20
+#define MAXSTR2 80
+
+void make_up_value(void) {
+ char c=R(2);
+
+ if (c) putchar('"');
+
+ switch (R(31)) {
+
+ case 0: printf("javascript:"); make_up_value(); break;
+// case 1: printf("jar:"); make_up_value(); break;
+ case 2: printf("mk:"); make_up_value(); break;
+ case 3: printf("file:"); make_up_value(); break;
+ case 4: printf("http:"); make_up_value(); break;
+ case 5: printf("about:"); make_up_value(); break;
+ case 6: printf("_blank"); break;
+ case 7: printf("_self"); break;
+ case 8: printf("top"); break;
+ case 9: printf("left"); break;
+ case 10: putchar('&'); make_up_value(); putchar(';'); break;
+ case 11: make_up_value(); make_up_value(); break;
+
+ case 12 ... 20: {
+ int c = R(10) ? R(10) : (1 + R(MAXSTR2) * R(MAXSTR2));
+ char* x = malloc(c);
+ memset(x,R(256),c);
+ fwrite(x,c,1,stdout);
+ free(x);
+ break;
+ }
+
+ case 21: printf("%s","%n%n%n%n%n%n"); break;
+ case 22: putchar('#'); break;
+ case 23: putchar('*'); break;
+ default: if (R(2)) putchar('-'); printf("%d",rand()); break;
+
+ }
+
+ if (c) putchar('"');
+
+}
+
+
+void random_tag(void) {
+ int tn, tc;
+
+ do tn = R(MAXTAGS); while (!tags[tn][0]);
+ tc = R(MAXPCOUNT) + 1;
+
+ putchar('<');
+
+ switch (R(10)) {
+ case 0: putchar(R(256)); break;
+ case 1: putchar('/');
+ }
+
+ printf("%s", tags[tn][0]);
+
+ while (tc--) {
+ int pn;
+ switch (R(32)) {
+ case 0: putchar(R(256));
+ case 1: break;
+ default: putchar(' ');
+ }
+ do pn = R(MAXPARS-1) + 1; while (!tags[tn][pn]);
+ printf("%s", tags[tn][pn]);
+ switch (R(32)) {
+ case 0: putchar(R(256));
+ case 1: break;
+ default: putchar('=');
+ }
+
+ make_up_value();
+
+ }
+
+ putchar('>');
+
+}
+
+
+int main(int argc,char** argv) {
+ int tc,seed;
+ char* x = getenv("QUERY_STRING");
+
+ if (!x || sscanf(x,"%x",&seed) != 1) {
+ printf("Content-type: text/plain\n\nMissing or invalid parameter.\n");
+ exit(1);
+ }
+
+ printf("Content-Type: text/html;charset=utf-8\nRefresh: 0;URL=remangle.cgi?0x%08x\n\n", seed);
+ printf("<HTML><HEAD><META HTTP-EQUIV=\"Refresh\" content=\"0;URL=remangle.cgi?0x%08x\">\n", seed);
+ printf("<script language=\"javascript\">setTimeout('window.location=\"remangle.cgi?0x%08x\"', 1000);</script>\n", seed);
+
+ srand(seed);
+
+ tc = R(MAXTCOUNT) + 1;
+ while (tc--) random_tag();
+ fflush(0);
+ return 0;
+}
diff --git a/WebKitTools/mangleme/tags.h b/WebKitTools/mangleme/tags.h
new file mode 100644
index 0000000..5789441
--- /dev/null
+++ b/WebKitTools/mangleme/tags.h
@@ -0,0 +1,76 @@
+/*
+
+ HTML manglizer
+ --------------
+ Copyright (C) 2004 by Michal Zalewski <lcamtuf@coredump.cx>
+
+ Tag and parameter list: guesstimating / reference compilation.
+
+ */
+
+
+#define MAXTAGS 80
+#define MAXPARS 20
+
+static char* tags[MAXTAGS][MAXPARS] = {
+ { "A", "NAME", "HREF", "REF", "REV", "TITLE", "TARGET", "SHAPE", "onLoad", "STYLE", 0 },
+ { "APPLET", "CODEBASE", "CODE", "NAME", "ALIGN", "ALT", "HEIGHT", "WIDTH", "HSPACE", "VSPACE", "DOWNLOAD", "HEIGHT", "NAME", "TITLE", "onLoad", "STYLE", 0 },
+ { "AREA", "SHAPE", "ALT", "CO-ORDS", "HREF", "onLoad", "STYLE", 0 },
+ { "B", "onLoad", "STYLE", 0 },
+ { "BANNER", "onLoad", "STYLE", 0 },
+ { "BASE", "HREF", "TARGET", "onLoad", "STYLE", 0 },
+ { "BASEFONT", "SIZE", "onLoad", "STYLE", 0 },
+ { "BGSOUND", "SRC", "LOOP", "onLoad", "STYLE", 0 },
+ { "BQ", "CLEAR", "NOWRAP", "onLoad", "STYLE", 0 },
+ { "BODY", "BACKGROUND", "BGCOLOR", "TEXT", "LINK", "ALINK", "VLINK", "LEFTMARGIN", "TOPMARGIN", "BGPROPERTIES", "onLoad", "STYLE", 0 },
+ { "CAPTION", "ALIGN", "VALIGN", "onLoad", "STYLE", 0 },
+ { "CENTER", "onLoad", "STYLE", 0 },
+ { "COL", "ALIGN", "SPAN", "onLoad", "STYLE", 0 },
+ { "COLGROUP", "ALIGN", "VALIGN", "HALIGN", "WIDTH", "SPAN", "onLoad", "STYLE", 0 },
+ { "DIV", "ALIGN", "CLASS", "LANG", "onLoad", "STYLE", 0 },
+ { "EMBED", "SRC", "HEIGHT", "WIDTH", "UNITS", "NAME", "PALETTE", "onLoad", "STYLE", 0 },
+ { "FIG", "SRC", "ALIGN", "HEIGHT", "WIDTH", "UNITS", "IMAGEMAP", "onLoad", "STYLE", 0 },
+ { "FN", "ID", "onLoad", "STYLE", 0 },
+ { "FONT", "SIZE", "COLOR", "FACE", "onLoad", "STYLE", 0 },
+ { "FORM", "ACTION", "METHOD", "ENCTYPE", "TARGET", "SCRIPT", "onLoad", "STYLE", 0 },
+ { "FRAME", "SRC", "NAME", "MARGINWIDTH", "MARGINHEIGHT", "SCROLLING", "FRAMESPACING", "onLoad", "STYLE", 0 },
+ { "FRAMESET", "ROWS", "COLS", "onLoad", "STYLE", 0 },
+ { "H1", "SRC", "DINGBAT", "onLoad", "STYLE", 0 },
+ { "HEAD", "onLoad", "STYLE", 0 },
+ { "HR", "SRC", "SIZE", "WIDTH", "ALIGN", "COLOR", "onLoad", "STYLE", 0 },
+ { "HTML", "onLoad", "STYLE", 0 },
+ { "IFRAME", "ALIGN", "FRAMEBORDER", "HEIGHT", "MARGINHEIGHT", "MARGINWIDTH", "NAME", "SCROLLING", "SRC", "ADDRESS", "WIDTH", "onLoad", "STYLE", 0 },
+ { "IMG", "ALIGN", "ALT", "SRC", "BORDER", "DYNSRC", "HEIGHT", "HSPACE", "ISMAP", "LOOP", "LOWSRC", "START", "UNITS", "USEMAP", "WIDTH", "VSPACE", "onLoad", "STYLE", 0 },
+ { "INPUT", "TYPE", "NAME", "VALUE", "onLoad", "STYLE", 0 },
+ { "ISINDEX", "HREF", "PROMPT", "onLoad", "STYLE", 0 },
+ { "LI", "SRC", "DINGBAT", "SKIP", "TYPE", "VALUE", "onLoad", "STYLE", 0 },
+ { "LINK", "REL", "REV", "HREF", "TITLE", "onLoad", "STYLE", 0 },
+ { "MAP", "NAME", "onLoad", "STYLE", 0 },
+ { "MARQUEE", "ALIGN", "BEHAVIOR", "BGCOLOR", "DIRECTION", "HEIGHT", "HSPACE", "LOOP", "SCROLLAMOUNT", "SCROLLDELAY", "WIDTH", "VSPACE", "onLoad", "STYLE", 0 },
+ { "MENU", "onLoad", "STYLE", 0 },
+ { "META", "HTTP-EQUIV", "CONTENT", "NAME", "onLoad", "STYLE", 0 },
+ { "MULTICOL", "COLS", "GUTTER", "WIDTH", "onLoad", "STYLE", 0 },
+ { "NOFRAMES", "onLoad", "STYLE", 0 },
+ { "NOTE", "CLASS", "SRC", "onLoad", "STYLE", 0 },
+ { "OVERLAY", "SRC", "X", "Y", "HEIGHT", "WIDTH", "UNITS", "IMAGEMAP", "onLoad", "STYLE", 0 },
+ { "PARAM", "NAME", "VALUE", "onLoad", "STYLE", 0 },
+ { "RANGE", "FROM", "UNTIL", "onLoad", "STYLE", 0 },
+ { "SCRIPT", "LANGUAGE", "onLoad", "STYLE", 0 },
+ { "SELECT", "NAME", "SIZE", "MULTIPLE", "WIDTH", "HEIGHT", "UNITS", "onLoad", "STYLE", 0 },
+ { "OPTION", "VALUE", "SHAPE", "onLoad", "STYLE", 0 },
+ { "SPACER", "TYPE", "SIZE", "WIDTH", "HEIGHT", "ALIGN", "onLoad", "STYLE", 0 },
+ { "SPOT", "ID", "onLoad", "STYLE", 0 },
+ { "TAB", "INDENT", "TO", "ALIGN", "DP", "onLoad", "STYLE", 0 },
+ { "TABLE", "ALIGN", "WIDTH", "BORDER", "CELLPADDING", "CELLSPACING", "BGCOLOR", "VALIGN", "COLSPEC", "UNITS", "DP", "onLoad", "STYLE", 0 },
+ { "TBODY", "CLASS", "ID", "onLoad", "STYLE", 0 },
+ { "TD", "COLSPAN", "ROWSPAN", "ALIGN", "VALIGN", "BGCOLOR", "onLoad", "STYLE", 0 },
+ { "TEXTAREA", "NAME", "COLS", "ROWS", "onLoad", "STYLE", 0 },
+ { "TEXTFLOW", "CLASS", "ID", "onLoad", "STYLE", 0 },
+ { "TFOOT", "COLSPAN", "ROWSPAN", "ALIGN", "VALIGN", "BGCOLOR", "onLoad", "STYLE", 0 },
+ { "TH", "ALIGN", "CLASS", "ID", "onLoad", "STYLE", 0 },
+ { "TITLE", "onLoad", "STYLE", 0 },
+ { "TR", "ALIGN", "VALIGN", "BGCOLOR", "CLASS", "onLoad", "STYLE", 0 },
+ { "UL", "SRC", "DINGBAT", "WRAP", "TYPE", "PLAIN", "onLoad", "STYLE", 0 },
+ { 0 }
+};
+
diff --git a/WebKitTools/record-memory-win/main.cpp b/WebKitTools/record-memory-win/main.cpp
new file mode 100644
index 0000000..e660afe
--- /dev/null
+++ b/WebKitTools/record-memory-win/main.cpp
@@ -0,0 +1,187 @@
+#include <windows.h>
+#include <assert.h>
+#include <psapi.h>
+#include <stdio.h>
+#include <tchar.h>
+#include <time.h>
+#include "Shlwapi.h"
+
+#pragma comment(lib, "psapi.lib")
+#pragma comment(lib, "shlwapi.lib")
+
+bool gSingleProcess = true;
+int gQueryInterval = 5; // seconds
+time_t gDuration = 0; // seconds
+LPTSTR gCommandLine;
+
+HRESULT ProcessArgs(int argc, TCHAR *argv[]);
+HRESULT PrintUsage();
+void UseImage(void (functionForQueryType(HANDLE)));
+void QueryContinuously(HANDLE hProcess);
+time_t ElapsedTime(time_t startTime);
+unsigned int OneQuery(HANDLE hProcess);
+unsigned int OneQueryMP(HANDLE hProcess);
+
+int __cdecl _tmain (int argc, TCHAR *argv[])
+{
+ HRESULT result = ProcessArgs(argc, argv);
+ if (FAILED(result))
+ return result;
+
+ UseImage(QueryContinuously);
+ return S_OK;
+}
+
+HRESULT ProcessArgs(int argc, TCHAR *argv[])
+{
+ LPTSTR argument;
+ for( int count = 1; count < argc; count++ ) {
+ argument = argv[count] ;
+ if (wcsstr(argument, _T("-h")) ||
+ wcsstr(argument, _T("--help")))
+ return PrintUsage();
+ else if (wcsstr(argument, _T("--exe"))) {
+ gCommandLine = argv[++count];
+ if (wcsstr(gCommandLine, _T("chrome.exe")))
+ gSingleProcess = false;
+ } else if (wcsstr(argument, _T("-i")) ||
+ wcsstr(argument, _T("--interval"))) {
+ gQueryInterval = _wtoi(argv[++count]);
+ if (gQueryInterval < 1) {
+ printf("ERROR: invalid interval\n");
+ return E_INVALIDARG;
+ }
+ } else if (wcsstr(argument, _T("-d")) ||
+ wcsstr(argument, _T("--duration"))) {
+ gDuration = _wtoi(argv[++count]);
+ if (gDuration < 1) {
+ printf("ERROR: invalid duration\n");
+ return E_INVALIDARG;
+ }
+ } else {
+ _tprintf(_T("ERROR: unrecognized argument \"%s\"\n"), (LPCTSTR)argument);
+ return PrintUsage();
+ }
+ }
+ if (argc < 2 || !wcslen(gCommandLine) ) {
+ printf("ERROR: executable path is required\n");
+ return PrintUsage();
+ }
+ return S_OK;
+}
+
+HRESULT PrintUsage()
+{
+ printf("record-memory-win --exe EXE_PATH\n");
+ printf(" Launch an executable and print the memory usage (in Private Bytes)\n");
+ printf(" of the process.\n\n");
+ printf("Usage:\n");
+ printf("-h [--help] : Print usage\n");
+ printf("--exe arg : Launch specified image. Required\n");
+ printf("-i [--interval] arg : Print memory usage every arg seconds. Default: 5 seconds\n");
+ printf("-d [--duration] arg : Run for up to arg seconds. Default: no limit\n\n");
+ printf("Examples:\n");
+ printf(" record-memory-win --exe \"C:\\Program Files\\Safari\\Safari.exe\"\n");
+ printf(" record-memory-win --exe Safari.exe -i 10 -d 7200\n");
+ return E_FAIL;
+}
+
+void UseImage(void (functionForQueryType(HANDLE)))
+{
+ STARTUPINFO si = {0};
+ si.cb = sizeof(STARTUPINFO);
+ PROCESS_INFORMATION pi = {0};
+
+ // Start the child process.
+ if(!CreateProcess( NULL, // No module name (use command line)
+ gCommandLine, // Command line
+ NULL, // Process handle not inheritable
+ NULL, // Thread handle not inheritable
+ FALSE, // Set handle inheritance to FALSE
+ 0, // No creation flags
+ NULL, // Use parent's environment block
+ NULL, // Use parent's starting directory
+ &si, // Pointer to STARTUPINFO structure
+ &pi )) // Pointer to PROCESS_INFORMATION structure
+ printf("CreateProcess failed (%d)\n", GetLastError());
+ else {
+ printf("Created process\n");
+ functionForQueryType(pi.hProcess);
+ // Close process and thread handles.
+ CloseHandle( pi.hProcess );
+ CloseHandle( pi.hThread );
+ }
+}
+
+void QueryContinuously(HANDLE hProcess)
+{
+ Sleep(2000); // give the process some time to launch
+ bool pastDuration = false;
+ time_t startTime = time(NULL);
+ unsigned int memUsage = gSingleProcess ? OneQuery(hProcess) : OneQueryMP(hProcess);
+ while(memUsage && !pastDuration) {
+ printf( "%u\n", memUsage );
+ Sleep(gQueryInterval*1000);
+ memUsage = gSingleProcess ? OneQuery(hProcess) : OneQueryMP(hProcess);
+ pastDuration = gDuration > 0 ? ElapsedTime(startTime) > gDuration : false;
+ }
+}
+
+// returns elapsed time in seconds
+time_t ElapsedTime(time_t startTime)
+{
+ time_t currentTime = time(NULL);
+ return currentTime - startTime;
+}
+
+// returns Commit Size (Private Bytes) in bytes
+unsigned int OneQuery(HANDLE hProcess)
+{
+ PROCESS_MEMORY_COUNTERS_EX pmc;
+ if (NULL == hProcess)
+ return 0;
+ if (GetProcessMemoryInfo(hProcess, (PPROCESS_MEMORY_COUNTERS)&pmc, sizeof(pmc)))
+ return (unsigned)pmc.PrivateUsage;
+ return 0;
+}
+
+// returns Commit Size (Private Bytes) in bytes for multi-process executables
+unsigned int OneQueryMP(HANDLE hProcess)
+{
+ unsigned int memUsage = 0;
+ TCHAR monitoredProcessName[MAX_PATH];
+ GetProcessImageFileName(hProcess, monitoredProcessName, sizeof(monitoredProcessName)/sizeof(TCHAR));
+ LPTSTR shortProcessName = PathFindFileName(monitoredProcessName);
+ DWORD aProcesses[1024], cbNeeded, cProcesses;
+ HANDLE hFoundProcess;
+ if (!EnumProcesses(aProcesses, sizeof(aProcesses), &cbNeeded))
+ return 0;
+
+ // Calculate how many process identifiers were returned.
+ cProcesses = cbNeeded / sizeof(DWORD);
+ // find existing process
+ for (unsigned int i = 0; i < cProcesses; i++)
+ if (aProcesses[i] != 0) {
+ DWORD retVal = 0;
+ TCHAR foundProcessName[MAX_PATH];
+
+ // Get a handle to the process.
+ hFoundProcess = OpenProcess(PROCESS_QUERY_INFORMATION |
+ PROCESS_VM_READ,
+ FALSE, aProcesses[i]);
+
+ // Get the process name.
+ if (NULL != hFoundProcess) {
+ HMODULE hMod;
+ DWORD cbNeeded;
+
+ if (EnumProcessModules(hFoundProcess, &hMod, sizeof(hMod), &cbNeeded)) {
+ GetModuleBaseName(hFoundProcess, hMod, foundProcessName, sizeof(foundProcessName)/sizeof(TCHAR));
+ if (wcsstr(foundProcessName, shortProcessName))
+ memUsage += OneQuery(hFoundProcess);
+ }
+ }
+ CloseHandle(hFoundProcess);
+ }
+ return memUsage;
+}
diff --git a/WebKitTools/record-memory-win/record-memory-win.vcproj b/WebKitTools/record-memory-win/record-memory-win.vcproj
new file mode 100644
index 0000000..6ec3c27
--- /dev/null
+++ b/WebKitTools/record-memory-win/record-memory-win.vcproj
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="record-memory-win"
+ ProjectGUID="{44B9C152-1870-4035-B94D-7B3285AA0C12}"
+ RootNamespace="recordmemorywin"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(WebKitOutputDir)\bin"
+ IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="&quot;$(VCInstallDir)\PlatformSDK\Include&quot;;&quot;$(VCInstallDir)\Include&quot;"
+ PreprocessorDefinitions="_WIN32_WINNT=0x501"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="&quot;$(VCInstallDir)\PlatformSDK\Lib&quot;"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\main.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/WebKitTools/vcbin/cl.exe b/WebKitTools/vcbin/cl.exe
new file mode 100755
index 0000000..2ec78c9
--- /dev/null
+++ b/WebKitTools/vcbin/cl.exe
Binary files differ
diff --git a/WebKitTools/vcbin/midl.exe b/WebKitTools/vcbin/midl.exe
new file mode 100755
index 0000000..55ecd1d
--- /dev/null
+++ b/WebKitTools/vcbin/midl.exe
Binary files differ
diff --git a/WebKitTools/wx/browser/browser.bkl b/WebKitTools/wx/browser/browser.bkl
new file mode 100644
index 0000000..0a60fd9
--- /dev/null
+++ b/WebKitTools/wx/browser/browser.bkl
@@ -0,0 +1,63 @@
+<?xml version="1.0" ?>
+<!--
+Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.com>
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ its contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+wxWebKit sample application build file
+-->
+
+<makefile>
+ <set var="WX_UNICODE">1</set>
+ <set var="WX_SHARED">1</set>
+
+ <include file="../../../WebKit/wx/wxwk-settings.bkl"/>
+
+ <!-- the WX_PYTHON option was added to presets/wx.bkl in 2.8.5, so define
+ it in case the presets/wx.bkl doesn't define it for us. -->
+ <if cond="not isdefined('WX_PYTHON')">
+ <set var="WX_PYTHON">0</set>
+ </if>
+ <template id="wxwebkit">
+ <lib-path>$(WKOUTPUTDIR)</lib-path>
+ <sys-lib>wxwebkit</sys-lib>
+ </template>
+ <exe id="wxBrowser" template="wxwk,xml2,iconv,xslt,icu,jscore,webcore,wxwebkit,curl,pthreads">
+ <app-type>gui</app-type>
+ <runtime-libs>dynamic</runtime-libs>
+
+ <include>$(WK_ROOT)/WebCore/platform/wx</include>
+ <include>$(WK_ROOT)/WebCore/bridge/wx</include>
+ <include>$(WK_ROOT)/WebCore/page/wx</include>
+ <include>$(WK_ROOT)/WebKit/wx</include>
+ <include>$(WK_ROOT)/WebKit/wx/WebKitSupport</include>
+
+ <sources>
+ browser.cpp
+ </sources>
+
+ </exe>
+
+</makefile>
diff --git a/WebKitTools/wx/browser/browser.cpp b/WebKitTools/wx/browser/browser.cpp
new file mode 100644
index 0000000..83f909b
--- /dev/null
+++ b/WebKitTools/wx/browser/browser.cpp
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.com>
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// webkit includes
+#include "WebView.h"
+#include "WebBrowserShell.h"
+
+#include "wx/wxprec.h"
+#ifndef WX_PRECOMP
+ #include "wx/wx.h"
+#endif
+
+class MyApp : public wxApp
+{
+public:
+
+ virtual bool OnInit();
+};
+
+
+IMPLEMENT_APP(MyApp)
+
+bool MyApp::OnInit()
+{
+ wxInitAllImageHandlers();
+
+ // create the main application window
+ // see WebKit/wx/WebFrame.cpp for how to write a shell around wxWebView.
+ wxWebBrowserShell *frame = new wxWebBrowserShell(_T("wxWebKit Test App"));
+
+#ifndef NDEBUG
+ frame->ShowDebugMenu(true);
+#endif
+ frame->CentreOnScreen();
+ frame->Show(true);
+
+ return true;
+}
diff --git a/WebKitTools/wx/build-wxwebkit b/WebKitTools/wx/build-wxwebkit
new file mode 100755
index 0000000..a4db5f2
--- /dev/null
+++ b/WebKitTools/wx/build-wxwebkit
@@ -0,0 +1,407 @@
+#!/bin/bash
+
+# Copyright (C) 2007 Robin Dunn, Kevin Ollivier 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 COMPUTER, INC. ``AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Driver for the wxWebKit build process.
+
+set -o errexit
+#set -o xtrace
+
+#----------------------------------------------------------------------
+# Set up the environment
+
+scriptDir="$(cd $(dirname $0);pwd)"
+WK_ROOT=$scriptDir/../..
+WK_ROOTDIR="$WK_ROOT"
+
+cd $scriptDir
+
+if [ -z $WEBKITOUTPUTDIR ]; then
+ WEBKITOUTPUTDIR=`cd $WK_ROOT/WebKitTools/Scripts; perl -e "use webkitdirs; print productDir()"`
+fi
+
+WKWINLIBS=WebKitLibraries/win
+WINDEPS=" $WKWINLIBS/lib/pthreadVC2.dll"
+WINDEPS="$WINDEPS $WKWINLIBS/bin/icuuc34.dll $WKWINLIBS/bin/icudt34.dll $WKWINLIBS/bin/icuin34.dll"
+WINDEPS="$WINDEPS $WKWINLIBS/bin/libcurl.dll $WKWINLIBS/bin/libeay32.dll $WKWINLIBS/bin/ssleay32.dll $WKWINLIBS/bin/zlib1.dll"
+WINDEPS="$WINDEPS $WKWINLIBS/lib/sqlite3.dll"
+WINDEPS="$WINDEPS $WKWINLIBS/bin/libxml2.dll $WKWINLIBS/bin/libxslt.dll"
+WINDEPS="$WINDEPS $WKWINLIBS/bin/iconv.dll"
+
+# TODO: check that we are running from the root of the source tree...
+
+# cygpath will bork if the dir doesn't exist...
+mkdir -p $WEBKITOUTPUTDIR
+
+if [ $OSTYPE == cygwin ]; then
+ EXE=.exe
+ WK_ROOTDIR=`cygpath -d $WK_ROOT`
+ WEBKITOUTPUTDIR=`cygpath -d $WEBKITOUTPUTDIR`
+ export WEBKITOUTPUTDIR
+ if [ -z $WXWIN ]; then
+ echo "Error, you must set WXWIN to your wxWidgets root directory."
+ exit 1
+ fi
+ if [ -z $WX_PREFIX ]; then
+ WX_PREFIX=$WXWIN
+ fi
+ if [ -z $BAKEFILE_PATHS ]; then
+ export BAKEFILE_PATHS=$WXWIN/build/bakefiles/wxpresets
+ fi
+ LINKER=`which link`
+ if [ "$LINKER" = "/usr/bin/link" ]; then
+ echo "WARNING: wxWebKit builds using MSVC on Windows, but it looks like"
+ echo "you have the GCC linker on your path. If /usr/bin/link does NOT point"
+ echo "to the MSVC linker, you need to move it or change your path to pick up"
+ echo "Microsoft's link.exe program first."
+ fi
+
+else
+ export WEBKITOUTPUTDIR
+ WX_PREFIX=`wx-config --prefix`
+ if [ ! -d "$WX_PREFIX" ]; then
+ echo "ERROR: Cannot find your wxWidgets installation."
+ echo "Make sure wx-config is on your PATH and points to a valid wxWidgets installation."
+ exit 1
+ fi
+
+ CONFIG=`wx-config --selected-config`
+ if [ "${CONFIG:0:4}" != "gtk2" -a "${CONFIG:0:3}" != "mac" ]; then
+ echo "WARNING: This configuration '$CONFIG' is not currently supported by wxWebKit. Please use the win, mac, or gtk2 port depending on your platform."
+ fi
+
+ if [ ! -d "$WX_PREFIX/share/bakefile" ]; then
+ echo "ERROR: wxWidgets installation does not have wxpresets."
+ echo "wx-config is pointing to an installation that does not have Bakefile presets installed. Run `wx-config --version` to ensure your wxWidgets is of version 2.8+."
+ exit 1
+ fi
+
+ if [ -z $BAKEFILE_PATHS ]; then
+ export BAKEFILE_PATHS=$WX_PREFIX/share/bakefile
+ fi
+fi
+
+# after all that, make sure that BAKEFILE_PATHS was either set
+# previously, or by the code above
+if [ -z $BAKEFILE_PATHS ]; then
+ echo "Error, you must set BAKEFILE_PATHS to the directory containing wxpresets."
+ exit 1
+fi
+
+#----------------------------------------------------------------------
+# process command line args
+build_type_set=0
+
+do_bake=0
+do_prep=0
+do_extras=0
+do_build=0
+do_clean=0
+do_install=0
+use_wxgc=0
+debug=1
+wxdebug=0
+wxpython=0
+make_args=''
+other_args=''
+
+for flag in $*; do
+ case $flag in
+ bake) do_bake=1 ;;
+ prep) do_prep=1 ;;
+ build) do_build=1 ;;
+ all) do_extras=1; do_bake=1; do_prep=1; do_build=1 ;;
+ clean) other_args=clean; do_clean=1 ;;
+ wxgc) use_wxgc=1 ;;
+ wxdebug) wxdebug=1 ;;
+ wxpython) wxpython=1 ;;
+ wxpython-install) wxpython_install=1 ;;
+ *) export $flag ;; #other_args='$other_args "$flag"' ;;
+ esac
+done
+
+
+#----------------------------------------------------------------------
+
+# if no arguments were passed, do a full build.
+if [ $do_bake == 0 -a $do_prep == 0 -a $do_build == 0 -a $do_clean == 0 ]; then
+ do_bake=1; do_prep=1; do_build=1
+fi
+
+if [ -f $WK_ROOT/WebKitBuild/Configuration ]; then
+ BUILD_TYPE=`cat $WK_ROOT/WebKitBuild/Configuration`
+ echo "Configuration is: $BUILD_TYPE"
+
+ if [ $BUILD_TYPE == "Release" ]; then
+ debug=0
+ fi
+ if [ $BUILD_TYPE == "Debug" ]; then
+ debug=1
+ fi
+
+fi
+
+function do_make {
+ dir=$1
+ cxxflags=$2
+ olddir=$PWD
+ shift
+ shift
+ # NOTE: If we try to do make clean after the Bakefiles were cleaned out, or before they were
+ # first generated, we will get errors about missing files, so we need to check that the
+ # makefile exists before running it.
+ if [ $OSTYPE == cygwin ]; then
+ cd $dir
+ if [ -f makefile.vc ]; then
+ nmake -f makefile.vc CXXFLAGS="$cxxflags" $@
+ fi
+ cd $olddir
+ else
+ if [ -f $dir/GNUmakefile ]; then
+ make -C $dir -f GNUmakefile $MAKE_ARGS CXXFLAGS="$cxxflags" $@
+ fi
+ fi
+ if [ $? != 0 ]; then
+ exit $?
+ fi
+}
+
+# output the first parameter that is a dir and exists
+function find_existing_dir {
+ for arg in $*; do
+ tester=$arg
+ if [ $OSTYPE == cygwin ]; then
+ tester=`cygpath -u $arg`
+ fi
+ if [ -d $tester ]; then
+ echo $arg
+ return
+ fi
+ done
+}
+
+
+olddir=$PWD
+
+if [ $do_clean != 1 ]; then
+
+ mkdir -p $WEBKITOUTPUTDIR/build
+
+ if [ $do_bake == 1 ]; then
+ # bakefile stuff
+ cd $WK_ROOT/WebKit/wx
+ bakefile_gen
+
+ # we need to do this because Bakefile doesn't know which
+ # platform it's running on with GNU format, and so it defaults
+ # to the standard Unix file endings and linker args.
+ if [ "${OSTYPE:0:6}" = "darwin" ]; then
+ sed "s/libwebcore-wx.so/libwebcore-wx.dylib/" < $WK_ROOT/WebCore/GNUmakefile > temp
+ mv temp $WK_ROOT/WebCore/GNUmakefile
+
+ sed "s/\-shared/\-dynamiclib/" < $WK_ROOT/WebCore/GNUmakefile > temp
+ mv temp $WK_ROOT/WebCore/GNUmakefile
+
+ sed "s/libwxwebkit.so/libwxwebkit.dylib/" < $WK_ROOT/WebKit/wx/GNUmakefile > temp
+ mv temp $WK_ROOT/WebKit/wx/GNUmakefile
+
+ sed "s/\-shared/\-dynamiclib/" < $WK_ROOT/WebKit/wx/GNUmakefile > temp
+ mv temp $WK_ROOT/WebKit/wx/GNUmakefile
+ fi
+ fi
+
+ if [ $do_prep == 1 ]; then
+ # Other preparation steps
+
+ # since the buildbot will wipe the build tree clean sometimes, we need to reinstall
+ # the dependencies if they aren't installed.
+ if [ "${OSTYPE:0:6}" == "darwin" ]; then
+ $WK_ROOT/WebKitTools/wx/install-unix-extras
+ fi
+
+ cd $WK_ROOT/JavaScriptCore
+ ./make-generated-sources.sh
+ if [ $? != 0 ]; then
+ exit $?
+ fi
+
+ cd $WK_ROOT/WebCore
+ ./make-generated-sources.sh FEATURE_DEFINES="ENABLE_DATABASE"
+ if [ $? != 0 ]; then
+ exit $?
+ fi
+ fi
+fi
+
+
+if [ $do_build == 1 -o $do_clean == 1 ]; then
+ # Build steps
+ WXGC_DEFINE=""
+ if [ $use_wxgc == 1 ]; then
+ WXGC_DEFINE="-DWTF_USE_WXGC=1"
+ fi
+ WX_EXT=
+ if [ "${OSTYPE:0:6}" == "cygwin" -a $wxdebug == 1 ]; then
+ WX_EXT=d
+ fi
+ if [ "${OSTYPE:0:6}" == "cygwin" -a $wxpython == 1 ]; then
+ other_args=WX_PYTHON=1
+ WX_EXT=h
+ wxdebug=1
+ fi
+
+ if [ "${OSTYPE:0:6}" == "cygwin" ]; then
+ PLATFORM_OS="win"
+ elif [ "${OSTYPE:0:6}" == "darwin" ]; then
+ PLATFORM_OS="mac"
+ else
+ PLATFORM_OS="linux"
+ use_wxgc=1 # Linux requires us to use wxgc to get proper drawing.
+ fi
+
+ WINDEPS="$WINDEPS $WXWIN/lib/vc_dll/wxmsw28u${WX_EXT}_core_vc.dll $WXWIN/lib/vc_dll/wxbase28u${WX_EXT}_vc.dll"
+
+ do_make $WK_ROOT/JavaScriptCore "-DBUILDING_WX__=1 $WXGC_DEFINE" WX_DEBUG=$wxdebug DEBUG=$debug WEBKIT_ROOT=$WK_ROOTDIR PLATFORM_OS=$PLATFORM_OS $other_args
+
+ mkdir -p $WEBKITOUTPUTDIR/JavaScriptCore
+ cp -p $WK_ROOT/JavaScriptCore/API/*.h $WEBKITOUTPUTDIR/JavaScriptCore/
+
+ do_make $WK_ROOT/WebCore "-DBUILDING_WX__=1 $WXGC_DEFINE" WX_DEBUG=$wxdebug WEBKIT_ROOT=$WK_ROOTDIR DEBUG=$debug PLATFORM_OS=$PLATFORM_OS $other_args
+ do_make $WK_ROOT/WebKit/wx "-DBUILDING_WX__=1 -DWXMAKINGDLL_WEBKIT=1 $WXGC_DEFINE" WX_DEBUG=$wxdebug DEBUG=$debug WEBKIT_ROOT=$WK_ROOTDIR PLATFORM_OS=$PLATFORM_OS $other_args
+ do_make $WK_ROOT/WebKitTools/wx/browser "-DBUILDING_WX__=1 -DWXUSINGDLL_WEBKIT=1 $WXGC_DEFINE" WX_DEBUG=$wxdebug DEBUG=$debug WEBKIT_ROOT=$WK_ROOTDIR PLATFORM_OS=$PLATFORM_OS $other_args
+
+ if [ $do_clean == 1 ]; then
+ rm -rf $WK_ROOT/JavaScriptCore/DerivedSources
+ rm -rf $WK_ROOT/WebCore/DerivedSources
+ rm -rf $WK_ROOT/WebCore/include/JavaScriptCore
+ fi
+
+ if [ $do_build == 1 ]; then
+ if [ "${OSTYPE:0:6}" = "darwin" ]; then
+ cd $WEBKITOUTPUTDIR
+ mkdir -p wxBrowser.app/Contents/MacOS
+ mkdir -p wxBrowser.app/Contents/Frameworks
+ cp wxBrowser wxBrowser.app/Contents/MacOS
+ install_name_tool -change libwxwebkit.dylib @executable_path/../Frameworks/libwxwebkit.dylib wxBrowser.app/Contents/MacOS/wxBrowser
+ if [ ! -f "$WEBKITOUTPUTDIR/libwxwebkit.dylib" ]; then
+ ln -s $WEBKITOUTPUTDIR/libwxwebkit.dylib wxBrowser.app/Contents/Frameworks
+ fi
+ fi
+
+ if [ $wxpython == 1 ]; then
+ if [ -z $SWIG ]; then
+ SWIG=`which swig`
+ fi
+
+ if [ ! -f "$SWIG" ]; then
+ echo "ERROR: Cannot find SWIG. Make sure that SWIG 1.3.29 is located on your path.";
+ exit 1;
+ fi
+
+ cd $WK_ROOT/WebKit/wx/bindings/python
+
+ SWIG_FLAGS=`python -c "import wx.build.config; import string; print string.join(wx.build.config.swig_args, ' ')"`
+ WEBKIT_INCLUDE="-I$WK_ROOT/WebKit/wx"
+ if [ "${OSTYPE:0:6}" == "cygwin" ]; then
+ WEBKIT_INCLUDE="-I`cygpath -d $WK_ROOT/WebKit/wx`"
+ fi
+
+ # Determine which include path to use for wxPython's *.i files
+ # Options are:
+ # wxPython installed on a posix system
+ # the wxPython win32 devel tarball
+ # a wx source tree from a tarball where wxPython is in the wx dir
+ # a wx source tree from SVN where wxPython is a sibling of the wx dir
+ WXPY_INCLUDE=`find_existing_dir \
+ $WX_PREFIX/include/wx-2.9/wx/wxPython/i_files \
+ $WX_PREFIX/include/wx-2.8/wx/wxPython/i_files \
+ $WX_PREFIX/include/wx/wxPython/i_files \
+ $WX_PREFIX/wxPython/src \
+ $WX_PREFIX/../wxPython/src`
+ if [ -z $WXPY_INCLUDE ]; then
+ echo "ERROR: Unable to find wxPython's *.i files"
+ exit 1
+ fi
+
+ # Run SWIG
+ $SWIG $SWIG_FLAGS -I$WXPY_INCLUDE $WEBKIT_INCLUDE -o webview.cpp webview.i
+ cp webview.py $WEBKITOUTPUTDIR/webview.py
+
+ PY_INCLUDE=`python -c "import sys,distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_python_inc())"`
+ PY_VERSION=`python -c "import sys; sys.stdout.write(str(sys.version_info[0]) + str(sys.version_info[1]))"`
+ PY_LIBDIR=`python -c "import distutils.sysconfig; import sys; sys.stdout.write(distutils.sysconfig.PREFIX)"`
+
+ if [ "${OSTYPE:0:6}" == "cygwin" ]; then
+ PY_LIBDIR="$PY_LIBDIR\\Libs"
+ else
+ PY_LIBDIR="$PY_LIBDIR/lib"
+ fi
+
+ do_make $WK_ROOT/WebKit/wx/bindings/python "-DBUILDING_WX__=1 -DWXUSINGDLL=1 -DWXUSINGDLL_WEBKIT=1 -I$PY_INCLUDE -I$WX_PREFIX/wxPython/include -I$WX_PREFIX/../wxPython/include $WXGC_DEFINE" \
+ WX_DEBUG=$wxdebug DEBUG=$debug WEBKIT_ROOT=$WK_ROOTDIR PLATFORM_OS=$PLATFORM_OS PYTHON_VERSION=$PY_VERSION PYTHON_LIBDIR=$PY_LIBDIR $other_args
+ if [ "${OSTYPE:0:6}" == "cygwin" ]; then
+ if [ -f $WEBKITOUTPUTDIR/_webview.pyd -a -f $WEBKITOUTPUTDIR/_webview.dll ]; then
+ rm $WEBKITOUTPUTDIR/_webview.pyd
+ mv $WEBKITOUTPUTDIR/_webview.dll $WEBKITOUTPUTDIR/_webview.pyd
+ fi
+ fi
+ fi
+
+
+ if [ "$OSTYPE" == "cygwin" ]; then
+ echo "Copying necessary DLLs to run test and sample applications..."
+ cd $WK_ROOT
+ cp $WINDEPS `cygpath -u $WEBKITOUTPUTDIR`
+ chmod +x `cygpath -u $WEBKITOUTPUTDIR/`*.dll
+ if [ -e `cygpath -u $WEBKITOUTPUTDIR/_webview.dll` ]; then
+ mv `cygpath -u $WEBKITOUTPUTDIR/_webview.dll` `cygpath -u $WEBKITOUTPUTDIR/_webview.pyd`
+ fi
+ fi
+
+ BROWSERAPP="wxBrowser"
+
+ if [ "${OSTYPE:0:6}" == "darwin" ]; then
+ BROWSERAPP="wxBrowser.app/Contents/MacOS/wxBrowser"
+ fi
+
+ echo ""
+ echo ""
+ echo "--- BUILD COMPLETE ---"
+ echo ""
+ echo "Next steps:"
+ echo ""
+ echo "-- Run '$WK_ROOT/WebKitTools/Scripts/run-javascriptcore-tests --wx' to ensure JSCore tests pass."
+ echo ""
+ echo "-- Run $WEBKITOUTPUTDIR/$BROWSERAPP to test your wxWebKit build."
+ echo ""
+ echo ""
+ fi
+fi
+
+if [ $do_clean == 1 ]; then
+ cd $WK_ROOT/WebKit/wx
+ bakefile_gen --clean
+fi
+
+cd $olddir
diff --git a/WebKitTools/wx/install-unix-extras b/WebKitTools/wx/install-unix-extras
new file mode 100755
index 0000000..b3088c0
--- /dev/null
+++ b/WebKitTools/wx/install-unix-extras
@@ -0,0 +1,172 @@
+#!/bin/sh
+
+# Copyright (C) 2005, 2006 Apple Computer, 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.
+# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# A script to download the extra libraries needed to build WebKit on UNIX-based OSes.
+# libxml/libxslt need to be added, but so far I've had them on all the (UNIX) machines
+# I've tested on, so I don't have a machine to test the code on.
+
+DL_CMD="curl -L"
+
+scriptDir="$(cd $(dirname $0);pwd)"
+WK_ROOT=$scriptDir/../..
+WK_ROOTDIR=$WK_ROOT
+
+DL_DIR=/tmp/webkit-deps
+# NOTE: If you change this, make sure the dir is on the path.
+DEPS_PREFIX=$WK_ROOT/WebKitLibraries/unix
+DLLEXT=so
+
+if [ "${OSTYPE:0:6}" == "darwin" ]; then
+ DLLEXT=dylib
+fi
+
+mkdir -p $DL_DIR
+mkdir -p $DEPS_PREFIX
+
+ICU_VERSION="3.4.1"
+ICU_TARBALL="icu-$ICU_VERSION.tgz"
+ICU_URL="ftp://ftp.software.ibm.com/software/globalization/icu/$ICU_VERSION/$ICU_TARBALL"
+
+# dependent app, not lib, what should we do for these?
+
+GPERF_VERSION="3.0.1"
+GPERF_TARBALL="gperf-$GPERF_VERSION.tar.gz"
+GPERF_URL="ftp://mirrors.kernel.org/gnu/gperf/$GPERF_TARBALL"
+
+PKG_CONFIG_VERSION="0.20"
+PKG_CONFIG_TARBALL="pkg-config-$PKG_CONFIG_VERSION.tar.gz"
+PKG_CONFIG_URL="http://pkgconfig.freedesktop.org/releases/$PKG_CONFIG_TARBALL"
+
+ICONV_VERSION="1.9.2"
+ICONV_TARBALL="libiconv-$ICONV_VERSION.tar.gz"
+ICONV_URL="http://ftp.gnu.org/pub/gnu/libiconv/$ICONV_TARBALL"
+
+LIBJPEG_VERSION="6b"
+LIBJPEG_TARBALL="jpegsrc.v$LIBJPEG_VERSION.tar.gz"
+LIBJPEG_URL="http://www.ijg.org/files/$LIBJPEG_TARBALL"
+
+LIBPNG_VERSION="1.2.33"
+LIBPNG_TARBALL="libpng-$LIBPNG_VERSION.tar.gz"
+LIBPNG_URL="http://wxwebkit.wxcommunity.com/downloads/deps/$LIBPNG_TARBALL"
+
+cd $DL_DIR
+# build ICU
+if [ `which icu-config >/dev/null 2>&1` ]; then
+ $DL_CMD -o $DL_DIR/$ICU_TARBALL $ICU_URL
+
+ tar xzvf $DL_DIR/$ICU_TARBALL
+ cd $DL_DIR/icu/source
+
+ chmod +x configure install-sh
+
+ if [ "${OSTYPE:0:6}" == "darwin" ]; then
+ ./configure --prefix=$DEPS_PREFIX --disable-dependency-tracking
+ make CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
+ LDFLAGS="-arch i386 -arch ppc"
+ make install
+ else
+ ./configure --prefix=$DEPS_PREFIX
+
+ make
+ #make check
+ make install
+ fi
+ cd $DL_DIR
+ rm -rf icu
+fi
+
+# TODO: What would be a good way to test for this?
+if [ ! -f $DEPS_PREFIX/lib/libiconv.$DLLEXT ]; then
+ $DL_CMD -o $DL_DIR/$ICONV_TARBALL $ICONV_URL
+
+ tar xzvf $DL_DIR/$ICONV_TARBALL
+ cd $DL_DIR/libiconv-$ICONV_VERSION
+
+ if [ "${OSTYPE:0:6}" == "darwin" ]; then
+ ./configure --prefix=$DEPS_PREFIX --disable-dependency-tracking
+ make CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
+ LDFLAGS="-arch i386 -arch ppc"
+ make install
+ else
+ ./configure --prefix=$DEPS_PREFIX
+
+ make
+ make install
+ fi
+ cd $DL_DIR
+ rm -rf $DL_DIR/libiconv-$ICONV_VERSION
+fi
+
+if [ ! -f $DEPS_PREFIX/lib/libjpeg.a ]; then
+ $DL_CMD -o $DL_DIR/$LIBJPEG_TARBALL $LIBJPEG_URL
+
+ tar xzvf $DL_DIR/$LIBJPEG_TARBALL
+ cd $DL_DIR/jpeg-$LIBJPEG_VERSION
+
+ # jpeg install command expects this to exist.
+ mkdir -p $DEPS_PREFIX/man/man1
+
+ if [ "${OSTYPE:0:6}" == "darwin" ]; then
+ ./configure --prefix=$DEPS_PREFIX --disable-dependency-tracking
+ make CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
+ LDFLAGS="-arch i386 -arch ppc"
+ make install
+ else
+ ./configure --prefix=$DEPS_PREFIX
+
+ make
+ fi
+
+ cp libjpeg.a $DEPS_PREFIX/lib
+ cp *.h $DEPS_PREFIX/include
+
+ cd $DL_DIR
+ rm -rf $DL_DIR/jpeg-$LIBJPEG_VERSION
+fi
+
+if [ ! -f $DEPS_PREFIX/lib/libpng.a ]; then
+ $DL_CMD -o $DL_DIR/$LIBPNG_TARBALL $LIBPNG_URL
+
+ tar xzvf $DL_DIR/$LIBPNG_TARBALL
+ cd $DL_DIR/libpng-$LIBPNG_VERSION
+
+ if [ "${OSTYPE:0:6}" == "darwin" ]; then
+ ./configure --prefix=$DEPS_PREFIX --disable-dependency-tracking
+ make CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \
+ LDFLAGS="-arch i386 -arch ppc"
+ make install
+ else
+ ./configure --prefix=$DEPS_PREFIX
+
+ make
+ make install
+ fi
+
+ cd $DL_DIR
+ rm -rf $DL_DIR/libpng-$LIBPNG_VERSION
+fi
diff --git a/WebKitTools/wx/packaging/build-win-installer.py b/WebKitTools/wx/packaging/build-win-installer.py
new file mode 100644
index 0000000..beed705
--- /dev/null
+++ b/WebKitTools/wx/packaging/build-win-installer.py
@@ -0,0 +1,109 @@
+#!/usr/bin/python
+
+# Copyright (C) 2008 Kevin Ollivier 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 COMPUTER, INC. ``AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Create a Windows installer package for wxPython wxWebKit binaries
+
+import sys, os, string
+import commands
+import glob
+from subprocess import *
+
+# Find InnoSetup executable
+def getInnoSetupPath():
+ name = "ISCC.exe"
+ retval = ""
+ dirs = os.environ["PATH"].split(":")
+ # Add the default file path
+ dirs.append("C:\\Program Files\\Inno Setup 5")
+
+ if os.environ.has_key("INNO5"):
+ retval = os.environ["INNO5"]
+
+ if retval == "":
+ for dir in dirs:
+ filepath = os.path.join(dir, name)
+ if os.path.isfile(filepath):
+ retval = filepath
+
+ return retval
+
+def getWebKitOutputDir():
+ retval = ""
+ if os.environ.has_key("WEBKITOUTPUTDIR"):
+ retval = os.environ["WEBKITOUTPUTDIR"]
+
+ if retval == "":
+ retval = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "..", "WebKitBuild"))
+
+ return os.path.join(retval, "Release")
+
+def getRevisionString():
+ pipe = Popen("svnversion", shell=True, stdout=PIPE).stdout
+ svnrevision = pipe.read().strip()
+ print "r" + svnrevision
+ svnrevision = string.split(svnrevision, ":")[0]
+ svnrevision = svnrevision.replace("M", "")
+ svnrevision = "r" + svnrevision
+
+ return svnrevision
+
+if __name__ == "__main__":
+ innoSetup = getInnoSetupPath()
+ buildDir = getWebKitOutputDir()
+ os.chdir(sys.path[0])
+
+ svnrevision = getRevisionString()
+
+ if not os.path.exists(innoSetup):
+ print "ERROR: Cannot find InnoSetup."
+ #sys.exit(1)
+
+ if not os.path.exists(buildDir):
+ print "ERROR: Build dir %s doesn't exist." % buildDir
+ sys.exit(1)
+
+ fileList = """
+CopyMode: alwaysoverwrite; Source: *.pyd; DestDir: "{app}"
+CopyMode: alwaysoverwrite; Source: *.py; DestDir: "{app}"
+"""
+
+ dlls = glob.glob(os.path.join(buildDir, "*.dll"))
+ for dll in dlls:
+ if dll.find("wxbase") == -1 and dll.find("wxmsw") == -1:
+ fileList += """CopyMode: alwaysoverwrite; Source: %s; DestDir: "{app}" \n""" % dll
+
+ installerTemplate = open("wxWebKitInstaller.iss.in", "r").read()
+
+ installerTemplate = installerTemplate.replace("<<VERSION>>", svnrevision)
+ installerTemplate = installerTemplate.replace("<<ROOTDIR>>", buildDir )
+ installerTemplate = installerTemplate.replace("<<PYTHONVER>>", "2.5" )
+ installerTemplate = installerTemplate.replace("<<FILES>>", fileList )
+
+ outputFile = open("wxWebKitInstaller.iss", "w")
+ outputFile.write(installerTemplate)
+ outputFile.close()
+
+ success = os.system('"%s" wxWebKitInstaller.iss' % innoSetup)
+ sys.exit(success)
diff --git a/WebKitTools/wx/packaging/wxWebKitInstaller.iss.in b/WebKitTools/wx/packaging/wxWebKitInstaller.iss.in
new file mode 100644
index 0000000..a2c808c
--- /dev/null
+++ b/WebKitTools/wx/packaging/wxWebKitInstaller.iss.in
@@ -0,0 +1,79 @@
+; Installer script for wxWebKit for wxPython
+
+[Setup]
+AppName=wxWebKit
+AppId=wxWebKit
+AppVersion=<<VERSION>>
+AppVerName=wxWebKit <<VERSION>>
+AppCopyright=LGPL
+DefaultDirName={code:GetInstallDir|c:\DoNotInstallHere}
+AppPublisher=wxWebKit Project
+AppPublisherURL=http://wxwebkit.wxcommunity.com/pmwiki/
+AppSupportURL=http://wxwebkit.wxcommunity.com/pmwiki/
+AppUpdatesURL=http://wxwebkit.wxcommunity.com/pmwiki/
+UninstallDisplayName=wxWebKit <<VERSION>>
+UninstallFilesDir={app}\Uninstall
+
+Compression=bzip/9
+SourceDir=<<ROOTDIR>>
+OutputDir=win-installer
+OutputBaseFilename=wxWebKit-Py<<PYTHONVER>>-<<VERSION>>
+DisableStartupPrompt=yes
+AllowNoIcons=yes
+DisableProgramGroupPage=yes
+DisableReadyPage=yes
+
+[Files]
+<<FILES>>
+
+[Messages]
+WelcomeLabel1=Welcome to the wxWebKit for wxPython Setup Wizard
+
+[Code]
+
+program Setup;
+var
+ PythonDir : String;
+ InstallDir : String;
+
+
+function InitializeSetup(): Boolean;
+begin
+
+ (* -------------------------------------------------------------- *)
+ (* Figure out what to use as a default installation dir *)
+
+ if not RegQueryStringValue(HKEY_LOCAL_MACHINE,
+ 'Software\Python\PythonCore\<<PYTHONVER>>\InstallPath',
+ '', PythonDir) then begin
+
+ if not RegQueryStringValue(HKEY_CURRENT_USER,
+ 'Software\Python\PythonCore\<<PYTHONVER>>\InstallPath',
+ '', PythonDir) then begin
+
+ MsgBox('No installation of Python <<PYTHONVER>> found in registry.' + #13 +
+ 'Be sure to enter a pathname that places wxPython on the PYTHONPATH',
+ mbConfirmation, MB_OK);
+ PythonDir := 'C:\Put a directory on PYTHONPATH here\';
+ end;
+ end;
+ InstallDir := PythonDir + '\Lib\site-packages\wx-2.8-msw-unicode\wx\';
+ Result := True;
+end;
+
+
+
+function GetPythonDir(Default: String): String;
+begin
+ Result := PythonDir;
+end;
+
+
+
+function GetInstallDir(Default: String): String;
+begin
+ Result := InstallDir;
+end;
+
+begin
+end.