Changeset 162817 in webkit
- Timestamp:
- Jan 26, 2014 4:01:15 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 18 added
- 56 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/mac/ChangeLog
r162808 r162817 1 2014-01-24 Andy Estes <aestes@apple.com> 2 3 [iOS] Upstream changes in Tools/DumpRenderTree 4 https://bugs.webkit.org/show_bug.cgi?id=127412 5 6 Reviewed by Simon Fraser. 7 8 * Misc/WebCoreStatistics.h: Included CGContext.h. 9 1 10 2014-01-26 Anders Carlsson <andersca@apple.com> 2 11 -
trunk/Source/WebKit/mac/Misc/WebCoreStatistics.h
r131564 r162817 27 27 */ 28 28 29 #import <CoreGraphics/CGContext.h> 29 30 #import <Foundation/Foundation.h> 30 31 31 #import <WebKit/WebFrame.h> 32 32 -
trunk/Tools/ChangeLog
r162784 r162817 1 2014-01-24 Andy Estes <aestes@apple.com> 2 3 [iOS] Upstream changes in Tools/DumpRenderTree 4 https://bugs.webkit.org/show_bug.cgi?id=127412 5 6 Reviewed by Simon Fraser. 7 8 Upstream all iOS changes. Added a new target called DumpRenderTree.app, 9 which builds the DumpRenderTree static library into an app bundle as 10 expected by the iOS Simulator. 11 12 * DumpRenderTree/AccessibilityTextMarker.h: 13 * DumpRenderTree/AccessibilityUIElement.h: 14 * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: 15 * DumpRenderTree/DumpRenderTreeFileDraggingSource.h: 16 * DumpRenderTree/DumpRenderTreePrefix.h: 17 * DumpRenderTree/PixelDumpSupport.cpp: 18 * DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp: 19 * DumpRenderTree/TestNetscapePlugIn/PluginObject.h: 20 * DumpRenderTree/TestNetscapePlugIn/PluginObjectMac.mm: 21 * DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp: 22 * DumpRenderTree/TestNetscapePlugIn/PluginTest.h: 23 * DumpRenderTree/TestNetscapePlugIn/TestObject.cpp: 24 * DumpRenderTree/TestNetscapePlugIn/TestObject.h: 25 * DumpRenderTree/TestNetscapePlugIn/Tests/DocumentOpenInDestroyStream.cpp: 26 * DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSAfterRemovingPluginElement.cpp: 27 * DumpRenderTree/TestNetscapePlugIn/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp: 28 * DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp: 29 * DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeRemoveProperty.cpp: 30 * DumpRenderTree/TestNetscapePlugIn/Tests/NullNPPGetValuePointer.cpp: 31 * DumpRenderTree/TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp: 32 * DumpRenderTree/TestNetscapePlugIn/Tests/PluginScriptableNPObjectInvokeDefault.cpp: 33 * DumpRenderTree/TestNetscapePlugIn/main.cpp: 34 * DumpRenderTree/TestRunner.cpp: 35 * DumpRenderTree/TestRunner.h: 36 * DumpRenderTree/cg/ImageDiffCG.cpp: 37 * DumpRenderTree/cg/PixelDumpSupportCG.cpp: 38 * DumpRenderTree/ios/AccessibilityControllerIOS.mm: 39 * DumpRenderTree/ios/AccessibilityUIElementIOS.mm: 40 * DumpRenderTree/ios/DumpRenderTreeBrowserView.h: Added. 41 * DumpRenderTree/ios/DumpRenderTreeBrowserView.mm: Added. 42 * DumpRenderTree/ios/Info.plist: Added. 43 * DumpRenderTree/ios/PerlSupport/DumpRenderTreeSupport.c: Added. 44 * DumpRenderTree/ios/PerlSupport/DumpRenderTreeSupportPregenerated.pm: Added. 45 * DumpRenderTree/ios/PerlSupport/DumpRenderTreeSupport_wrapPregenerated.c: Added. 46 * DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/Changes: Added. 47 * DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/IPhoneSimulatorNotification.xs: Added. 48 * DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/MANIFEST: Added. 49 * DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/Makefile.PL: Added. 50 * DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/README: Added. 51 * DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/lib/IPhoneSimulatorNotification.pm: Added. 52 * DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/ppport.h: Added. 53 * DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/t/IPhoneSimulatorNotification.t: Added. 54 * DumpRenderTree/ios/PerlSupport/Makefile: Added. 55 * DumpRenderTree/ios/PixelDumpSupportIOS.mm: Added. 56 * DumpRenderTree/mac/AccessibilityNotificationHandler.mm: 57 * DumpRenderTree/mac/AccessibilityTextMarkerMac.mm: 58 * DumpRenderTree/mac/AppleScriptController.m: 59 * DumpRenderTree/mac/Configurations/Base.xcconfig: 60 * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig: 61 * DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig: 62 * DumpRenderTree/mac/Configurations/DumpRenderTreeApp.xcconfig: Added. 63 * DumpRenderTree/mac/Configurations/DumpRenderTreeLibrary.xcconfig: 64 * DumpRenderTree/mac/Configurations/ImageDiff.xcconfig: 65 * DumpRenderTree/mac/Configurations/LayoutTestHelper.xcconfig: Added. 66 * DumpRenderTree/mac/Configurations/TestNetscapePlugIn.xcconfig: 67 * DumpRenderTree/mac/DumpRenderTree.mm: 68 * DumpRenderTree/mac/DumpRenderTreeDraggingInfo.h: 69 * DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm: 70 * DumpRenderTree/mac/DumpRenderTreeMac.h: 71 * DumpRenderTree/mac/DumpRenderTreePasteboard.h: 72 * DumpRenderTree/mac/DumpRenderTreePasteboard.m: 73 * DumpRenderTree/mac/DumpRenderTreeWindow.h: 74 * DumpRenderTree/mac/DumpRenderTreeWindow.mm: 75 * DumpRenderTree/mac/EditingDelegate.h: 76 * DumpRenderTree/mac/EventSendingController.h: 77 * DumpRenderTree/mac/EventSendingController.mm: 78 * DumpRenderTree/mac/FrameLoadDelegate.mm: 79 * DumpRenderTree/mac/HistoryDelegate.h: 80 * DumpRenderTree/mac/LayoutTestHelper.m: 81 * DumpRenderTree/mac/MockGeolocationProvider.mm: 82 * DumpRenderTree/mac/NavigationController.h: 83 * DumpRenderTree/mac/ObjCPlugin.h: 84 * DumpRenderTree/mac/ObjCPlugin.m: 85 * DumpRenderTree/mac/ObjCPluginFunction.h: 86 * DumpRenderTree/mac/PolicyDelegate.h: 87 * DumpRenderTree/mac/ResourceLoadDelegate.h: 88 * DumpRenderTree/mac/ResourceLoadDelegate.mm: 89 * DumpRenderTree/mac/TestRunnerMac.mm: 90 * DumpRenderTree/mac/TextInputController.h: 91 * DumpRenderTree/mac/TextInputController.m: 92 * DumpRenderTree/mac/UIDelegate.h: 93 * DumpRenderTree/mac/UIDelegate.mm: 94 1 95 2014-01-25 Darin Adler <darin@apple.com> 2 96 -
trunk/Tools/DumpRenderTree/AccessibilityTextMarker.h
r67105 r162817 29 29 #include <JavaScriptCore/JSObjectRef.h> 30 30 31 #if PLATFORM(MAC) 31 #if PLATFORM(MAC) && !PLATFORM(IOS) 32 32 #define SUPPORTS_AX_TEXTMARKERS 1 33 33 #else … … 59 59 private: 60 60 static JSClassRef getJSClass(); 61 #if PLATFORM(MAC)61 #if SUPPORTS_AX_TEXTMARKERS 62 62 RetainPtr<PlatformTextMarker> m_textMarker; 63 63 #else … … 79 79 private: 80 80 static JSClassRef getJSClass(); 81 #if PLATFORM(MAC)81 #if SUPPORTS_AX_TEXTMARKERS 82 82 RetainPtr<PlatformTextMarkerRange> m_textMarkerRange; 83 83 #else -
trunk/Tools/DumpRenderTree/AccessibilityUIElement.h
r161417 r162817 288 288 PlatformUIElement m_element; 289 289 290 #if PLATFORM(IOS) 291 JSObjectRef m_notificationFunctionCallback; 292 #elif PLATFORM(MAC) 290 293 // A retained, platform specific object used to help manage notifications for this object. 291 #if PLATFORM(MAC)292 294 NotificationHandler m_notificationHandler; 293 295 #endif -
trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
r162573 r162817 14 14 ); 15 15 dependencies = ( 16 A1158D6818927B240088C17B /* PBXTargetDependency */, 16 17 2D403F211508736C005358D2 /* PBXTargetDependency */, 17 18 A134E52D188FC09200901D06 /* PBXTargetDependency */, … … 44 45 1A5CC1F5137DD2EC00A5D7E7 /* GetURLWithJavaScriptURL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5CC1F3137DD2EC00A5D7E7 /* GetURLWithJavaScriptURL.cpp */; }; 45 46 1A66C35114576A920099A115 /* ContentsScaleFactor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A66C34F14576A920099A115 /* ContentsScaleFactor.cpp */; }; 46 1A7961071803454C00FE42CD /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A7961061803454C00FE42CD /* IOKit.framework */; };47 47 1A8F02E80BB9B4EC008CFA34 /* TestObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8F024C0BB9B056008CFA34 /* TestObject.h */; }; 48 48 1AC6C8490D07638600CD3161 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC6C77F0D07589B00CD3161 /* main.cpp */; }; … … 55 55 1AD9D2FE12028409001A70D1 /* PluginScriptableNPObjectInvokeDefault.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD9D2FD12028409001A70D1 /* PluginScriptableNPObjectInvokeDefault.cpp */; }; 56 56 1AFF66BC137DEFD200791696 /* GetURLNotifyWithURLThatFailsToLoad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFF66BB137DEA8300791696 /* GetURLNotifyWithURLThatFailsToLoad.cpp */; }; 57 23BCB8900EA57623003C6289 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 23BCB88F0EA57623003C6289 /* OpenGL.framework */; };58 57 29CFBA11122736E600BC30C0 /* AccessibilityTextMarker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29CFBA0F122736E600BC30C0 /* AccessibilityTextMarker.cpp */; }; 59 58 29CFBA2E12273A1000BC30C0 /* AccessibilityTextMarkerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29CFBA2D12273A1000BC30C0 /* AccessibilityTextMarkerMac.mm */; }; 60 59 2CE88FA217124D8C00734FC0 /* JavaScriptThreading.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CE88FA117124CEE00734FC0 /* JavaScriptThreading.cpp */; }; 61 2D403F05150871F9005358D2 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE8257EF08D22389000507AB /* Carbon.framework */; };62 2D403F06150871F9005358D2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A84F608908B136DA00E9745F /* Cocoa.framework */; };63 2D403F08150871F9005358D2 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 23BCB88F0EA57623003C6289 /* OpenGL.framework */; };64 60 2D403F1B15087209005358D2 /* LayoutTestHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D403EA215087142005358D2 /* LayoutTestHelper.m */; }; 65 61 31117B3D15D9A56A00163BC8 /* MockWebNotificationProvider.mm in Sources */ = {isa = PBXBuildFile; fileRef = 31117B3B15D9A56A00163BC8 /* MockWebNotificationProvider.mm */; }; … … 86 82 5DB9AC9F0F722C3600684641 /* WebKitWeightWatcher800.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 375F09780DAC3CB600C8B4E5 /* WebKitWeightWatcher800.ttf */; }; 87 83 5DB9ACA00F722C3600684641 /* WebKitWeightWatcher900.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 375F09790DAC3CB600C8B4E5 /* WebKitWeightWatcher900.ttf */; }; 88 5DE8AE4413A2C15900D6A37D /* libWebCoreTestSupport.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DE8AE4313A2C15800D6A37D /* libWebCoreTestSupport.dylib */; };89 84 80045AEE147718E7008290A8 /* AccessibilityNotificationHandler.mm in Sources */ = {isa = PBXBuildFile; fileRef = 80045AEC147718E7008290A8 /* AccessibilityNotificationHandler.mm */; }; 90 85 8465E2C70FFA8DF2003B8342 /* PixelDumpSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8465E2C60FFA8DF2003B8342 /* PixelDumpSupport.cpp */; }; 91 86 8CCDA82A151A72D10003F937 /* SampleFont.sfont in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 8CCDA81F151A56550003F937 /* SampleFont.sfont */; }; 92 9340995108540CAE007F3BC8 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9335435F03D75502008635CE /* WebKit.framework */; };93 87 9830F31F15C81181005AB206 /* DumpRenderTreeCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9830F31E15C81181005AB206 /* DumpRenderTreeCommon.cpp */; }; 94 A1321CD4188F9E7A00125434 /* libDumpRenderTree.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A1321C9E188F9A3600125434 /* libDumpRenderTree.a */; }; 88 A1158D581892740C0088C17B /* DumpRenderTreeBrowserView.mm in Sources */ = {isa = PBXBuildFile; fileRef = A1158D56189273EB0088C17B /* DumpRenderTreeBrowserView.mm */; }; 89 A1158D59189274360088C17B /* PixelDumpSupportIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = A1158D57189273EB0088C17B /* PixelDumpSupportIOS.mm */; }; 95 90 A134E531188FC27000901D06 /* DumpRenderTreeMain.mm in Sources */ = {isa = PBXBuildFile; fileRef = A134E52F188FC27000901D06 /* DumpRenderTreeMain.mm */; }; 96 91 A134E53618905EFF00901D06 /* AccessibilityCommonMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC0E26140E2DA4C6001B6BC3 /* AccessibilityCommonMac.mm */; }; 97 A817090008B163EF00CCB9FB /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A84F608908B136DA00E9745F /* Cocoa.framework */; }; 98 A817090408B164D300CCB9FB /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A817090308B164D300CCB9FB /* JavaScriptCore.framework */; }; 99 A84F608A08B136DA00E9745F /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A84F608908B136DA00E9745F /* Cocoa.framework */; }; 92 A19318001892886B001C52B1 /* DumpRenderTreeMain.mm in Sources */ = {isa = PBXBuildFile; fileRef = A134E52F188FC27000901D06 /* DumpRenderTreeMain.mm */; }; 100 93 A8B91ADA0CF3B32F008F91FF /* DumpRenderTreePasteboard.m in Sources */ = {isa = PBXBuildFile; fileRef = A8B91AD70CF3B32F008F91FF /* DumpRenderTreePasteboard.m */; }; 101 94 A8B91ADC0CF3B32F008F91FF /* DumpRenderTreeWindow.mm in Sources */ = {isa = PBXBuildFile; fileRef = A8B91AD90CF3B32F008F91FF /* DumpRenderTreeWindow.mm */; }; … … 104 97 AA5A15EF16E15CD000F7C561 /* AccessibilityControllerIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = AA5A15ED16E15CD000F7C561 /* AccessibilityControllerIOS.mm */; }; 105 98 AA5A15F016E15CD000F7C561 /* AccessibilityUIElementIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = AA5A15EE16E15CD000F7C561 /* AccessibilityUIElementIOS.mm */; }; 106 AE8259F308D22463000507AB /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE8257EF08D22389000507AB /* Carbon.framework */; };107 AE8259F408D22463000507AB /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE8257EF08D22389000507AB /* Carbon.framework */; };108 B5A752A208AF5D1F00138E45 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B5A752A108AF5D1F00138E45 /* QuartzCore.framework */; };109 99 BC0131DA0C9772010087317D /* TestRunner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC0131D80C9772010087317D /* TestRunner.cpp */; }; 110 100 BC0E24E10E2D9451001B6BC2 /* AccessibilityUIElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC0E24DF0E2D9451001B6BC2 /* AccessibilityUIElement.cpp */; }; … … 156 146 remoteInfo = LayoutTestHelper; 157 147 }; 148 A1158D6718927B240088C17B /* PBXContainerItemProxy */ = { 149 isa = PBXContainerItemProxy; 150 containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; 151 proxyType = 1; 152 remoteGlobalIDString = A1158D6218927AF00088C17B; 153 remoteInfo = "Perl Support"; 154 }; 158 155 A1321CD7188FABE000125434 /* PBXContainerItemProxy */ = { 159 156 isa = PBXContainerItemProxy; … … 169 166 remoteGlobalIDString = 9340994A08540CAE007F3BC8; 170 167 remoteInfo = DumpRenderTree; 168 }; 169 A19317FE18928835001C52B1 /* PBXContainerItemProxy */ = { 170 isa = PBXContainerItemProxy; 171 containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; 172 proxyType = 1; 173 remoteGlobalIDString = A1158D7E18927E7A0088C17B; 174 remoteInfo = DumpRenderTree.app; 175 }; 176 A193180118928C10001C52B1 /* PBXContainerItemProxy */ = { 177 isa = PBXContainerItemProxy; 178 containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; 179 proxyType = 1; 180 remoteGlobalIDString = A1321C9D188F9A3600125434; 181 remoteInfo = "DumpRenderTree (Library)"; 171 182 }; 172 183 A84F608E08B1370E00E9745F /* PBXContainerItemProxy */ = { … … 277 288 9340995408540CAF007F3BC8 /* DumpRenderTree */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = DumpRenderTree; sourceTree = BUILT_PRODUCTS_DIR; }; 278 289 9830F31E15C81181005AB206 /* DumpRenderTreeCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DumpRenderTreeCommon.cpp; sourceTree = "<group>"; }; 290 A1103B5B1892498F00738C87 /* LayoutTestHelper.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = LayoutTestHelper.xcconfig; path = mac/Configurations/LayoutTestHelper.xcconfig; sourceTree = "<group>"; }; 291 A1158D55189273EB0088C17B /* DumpRenderTreeBrowserView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DumpRenderTreeBrowserView.h; path = ios/DumpRenderTreeBrowserView.h; sourceTree = "<group>"; }; 292 A1158D56189273EB0088C17B /* DumpRenderTreeBrowserView.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = DumpRenderTreeBrowserView.mm; path = ios/DumpRenderTreeBrowserView.mm; sourceTree = "<group>"; }; 293 A1158D57189273EB0088C17B /* PixelDumpSupportIOS.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = PixelDumpSupportIOS.mm; path = ios/PixelDumpSupportIOS.mm; sourceTree = "<group>"; }; 294 A1158D6C18927CF10088C17B /* DumpRenderTreeSupport.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = DumpRenderTreeSupport.c; sourceTree = "<group>"; }; 295 A1158D6D18927CF10088C17B /* DumpRenderTreeSupport_wrapPregenerated.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = DumpRenderTreeSupport_wrapPregenerated.c; sourceTree = "<group>"; }; 296 A1158D6E18927CF10088C17B /* DumpRenderTreeSupportPregenerated.pm */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; path = DumpRenderTreeSupportPregenerated.pm; sourceTree = "<group>"; }; 297 A1158D7018927CF10088C17B /* Changes */ = {isa = PBXFileReference; lastKnownFileType = text; path = Changes; sourceTree = "<group>"; }; 298 A1158D7118927CF10088C17B /* IPhoneSimulatorNotification.xs */ = {isa = PBXFileReference; lastKnownFileType = text; path = IPhoneSimulatorNotification.xs; sourceTree = "<group>"; }; 299 A1158D7318927CF20088C17B /* IPhoneSimulatorNotification.pm */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; path = IPhoneSimulatorNotification.pm; sourceTree = "<group>"; }; 300 A1158D7418927CF20088C17B /* Makefile.PL */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; path = Makefile.PL; sourceTree = "<group>"; }; 301 A1158D7518927CF20088C17B /* MANIFEST */ = {isa = PBXFileReference; lastKnownFileType = text; path = MANIFEST; sourceTree = "<group>"; }; 302 A1158D7618927CF20088C17B /* ppport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ppport.h; sourceTree = "<group>"; }; 303 A1158D7718927CF20088C17B /* README */ = {isa = PBXFileReference; lastKnownFileType = text; path = README; sourceTree = "<group>"; }; 304 A1158D7918927CF20088C17B /* IPhoneSimulatorNotification.t */ = {isa = PBXFileReference; lastKnownFileType = text; path = IPhoneSimulatorNotification.t; sourceTree = "<group>"; }; 305 A1158D7A18927CF20088C17B /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; }; 306 A1158D7F18927E7A0088C17B /* DumpRenderTree.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DumpRenderTree.app; sourceTree = BUILT_PRODUCTS_DIR; }; 279 307 A1321C9E188F9A3600125434 /* libDumpRenderTree.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libDumpRenderTree.a; sourceTree = BUILT_PRODUCTS_DIR; }; 280 308 A134E52F188FC27000901D06 /* DumpRenderTreeMain.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DumpRenderTreeMain.mm; path = mac/DumpRenderTreeMain.mm; sourceTree = "<group>"; }; … … 283 311 A134E5391890671C00901D06 /* DumpRenderTreeLibrary.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = DumpRenderTreeLibrary.xcconfig; path = mac/Configurations/DumpRenderTreeLibrary.xcconfig; sourceTree = "<group>"; }; 284 312 A16CD20D18907A7D0092363E /* BaseTarget.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = BaseTarget.xcconfig; path = mac/Configurations/BaseTarget.xcconfig; sourceTree = "<group>"; }; 313 A19317FC1892855F001C52B1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = ios/Info.plist; sourceTree = "<group>"; }; 314 A19317FD18928738001C52B1 /* DumpRenderTreeApp.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = DumpRenderTreeApp.xcconfig; path = mac/Configurations/DumpRenderTreeApp.xcconfig; sourceTree = "<group>"; }; 285 315 A803FF7409CAAD08009B2A37 /* DumpRenderTree.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = DumpRenderTree.h; sourceTree = "<group>"; }; 286 316 A817090308B164D300CCB9FB /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; … … 381 411 buildActionMask = 2147483647; 382 412 files = ( 383 2D403F05150871F9005358D2 /* Carbon.framework in Frameworks */,384 2D403F06150871F9005358D2 /* Cocoa.framework in Frameworks */,385 2D403F08150871F9005358D2 /* OpenGL.framework in Frameworks */,386 1A7961071803454C00FE42CD /* IOKit.framework in Frameworks */,387 413 ); 388 414 runOnlyForDeploymentPostprocessing = 0; … … 392 418 buildActionMask = 2147483647; 393 419 files = ( 394 A1321CD4188F9E7A00125434 /* libDumpRenderTree.a in Frameworks */,395 AE8259F308D22463000507AB /* Carbon.framework in Frameworks */,396 A84F608A08B136DA00E9745F /* Cocoa.framework in Frameworks */,397 A817090408B164D300CCB9FB /* JavaScriptCore.framework in Frameworks */,398 5DE8AE4413A2C15900D6A37D /* libWebCoreTestSupport.dylib in Frameworks */,399 23BCB8900EA57623003C6289 /* OpenGL.framework in Frameworks */,400 9340995108540CAE007F3BC8 /* WebKit.framework in Frameworks */,420 ); 421 runOnlyForDeploymentPostprocessing = 0; 422 }; 423 A1158D7C18927E7A0088C17B /* Frameworks */ = { 424 isa = PBXFrameworksBuildPhase; 425 buildActionMask = 2147483647; 426 files = ( 401 427 ); 402 428 runOnlyForDeploymentPostprocessing = 0; … … 406 432 buildActionMask = 2147483647; 407 433 files = ( 408 AE8259F408D22463000507AB /* Carbon.framework in Frameworks */,409 A817090008B163EF00CCB9FB /* Cocoa.framework in Frameworks */,410 B5A752A208AF5D1F00138E45 /* QuartzCore.framework in Frameworks */,411 434 ); 412 435 runOnlyForDeploymentPostprocessing = 0; … … 418 441 isa = PBXGroup; 419 442 children = ( 443 A1158D6A18927CE10088C17B /* ios */, 420 444 A134E53418905E6C00901D06 /* config.h */, 421 445 1A2FB84C178C80920059FD96 /* DefaultPolicyDelegate.h */, … … 603 627 141BF233096A44CF00E0753C /* TestNetscapePlugIn.plugin */, 604 628 A1321C9E188F9A3600125434 /* libDumpRenderTree.a */, 629 A1158D7F18927E7A0088C17B /* DumpRenderTree.app */, 605 630 ); 606 631 name = Products; … … 625 650 sourceTree = "<group>"; 626 651 }; 652 A1158D6A18927CE10088C17B /* ios */ = { 653 isa = PBXGroup; 654 children = ( 655 A1158D55189273EB0088C17B /* DumpRenderTreeBrowserView.h */, 656 A1158D56189273EB0088C17B /* DumpRenderTreeBrowserView.mm */, 657 A19317FC1892855F001C52B1 /* Info.plist */, 658 A1158D6B18927CF10088C17B /* PerlSupport */, 659 ); 660 name = ios; 661 sourceTree = "<group>"; 662 }; 663 A1158D6B18927CF10088C17B /* PerlSupport */ = { 664 isa = PBXGroup; 665 children = ( 666 A1158D6C18927CF10088C17B /* DumpRenderTreeSupport.c */, 667 A1158D6D18927CF10088C17B /* DumpRenderTreeSupport_wrapPregenerated.c */, 668 A1158D6E18927CF10088C17B /* DumpRenderTreeSupportPregenerated.pm */, 669 A1158D6F18927CF10088C17B /* IPhoneSimulatorNotification */, 670 A1158D7A18927CF20088C17B /* Makefile */, 671 ); 672 name = PerlSupport; 673 path = ios/PerlSupport; 674 sourceTree = "<group>"; 675 }; 676 A1158D6F18927CF10088C17B /* IPhoneSimulatorNotification */ = { 677 isa = PBXGroup; 678 children = ( 679 A1158D7018927CF10088C17B /* Changes */, 680 A1158D7118927CF10088C17B /* IPhoneSimulatorNotification.xs */, 681 A1158D7218927CF20088C17B /* lib */, 682 A1158D7418927CF20088C17B /* Makefile.PL */, 683 A1158D7518927CF20088C17B /* MANIFEST */, 684 A1158D7618927CF20088C17B /* ppport.h */, 685 A1158D7718927CF20088C17B /* README */, 686 A1158D7818927CF20088C17B /* t */, 687 ); 688 path = IPhoneSimulatorNotification; 689 sourceTree = "<group>"; 690 }; 691 A1158D7218927CF20088C17B /* lib */ = { 692 isa = PBXGroup; 693 children = ( 694 A1158D7318927CF20088C17B /* IPhoneSimulatorNotification.pm */, 695 ); 696 path = lib; 697 sourceTree = "<group>"; 698 }; 699 A1158D7818927CF20088C17B /* t */ = { 700 isa = PBXGroup; 701 children = ( 702 A1158D7918927CF20088C17B /* IPhoneSimulatorNotification.t */, 703 ); 704 path = t; 705 sourceTree = "<group>"; 706 }; 627 707 A803FF6409CAACC1009B2A37 /* Frameworks */ = { 628 708 isa = PBXGroup; … … 671 751 BCB282F40CFA7450007E533E /* DebugRelease.xcconfig */, 672 752 BCB281F00CFA713D007E533E /* DumpRenderTree.xcconfig */, 753 A19317FD18928738001C52B1 /* DumpRenderTreeApp.xcconfig */, 673 754 A134E5391890671C00901D06 /* DumpRenderTreeLibrary.xcconfig */, 674 755 BCB283D80CFA7AFD007E533E /* ImageDiff.xcconfig */, 756 A1103B5B1892498F00738C87 /* LayoutTestHelper.xcconfig */, 675 757 BCB283DE0CFA7C20007E533E /* TestNetscapePlugIn.xcconfig */, 676 758 ); … … 688 770 BCB284880CFA8202007E533E /* PixelDumpSupportCG.cpp */, 689 771 BCB284890CFA8202007E533E /* PixelDumpSupportCG.h */, 772 A1158D57189273EB0088C17B /* PixelDumpSupportIOS.mm */, 690 773 BCB2848C0CFA8221007E533E /* PixelDumpSupportMac.mm */, 691 774 ); … … 714 797 }; 715 798 /* End PBXHeadersBuildPhase section */ 799 800 /* Begin PBXLegacyTarget section */ 801 A1158D6218927AF00088C17B /* Perl Support */ = { 802 isa = PBXLegacyTarget; 803 buildArgumentsString = "$(ACTION)"; 804 buildConfigurationList = A1158D6318927AF00088C17B /* Build configuration list for PBXLegacyTarget "Perl Support" */; 805 buildPhases = ( 806 ); 807 buildToolPath = /usr/bin/make; 808 buildWorkingDirectory = "$(SRCROOT)/ios/PerlSupport"; 809 dependencies = ( 810 A19317FF18928835001C52B1 /* PBXTargetDependency */, 811 ); 812 name = "Perl Support"; 813 passBuildSettingsInEnvironment = 1; 814 productName = "Perl Support"; 815 }; 816 /* End PBXLegacyTarget section */ 716 817 717 818 /* Begin PBXNativeTarget section */ … … 770 871 productType = "com.apple.product-type.tool"; 771 872 }; 873 A1158D7E18927E7A0088C17B /* DumpRenderTree.app */ = { 874 isa = PBXNativeTarget; 875 buildConfigurationList = A1158DAB18927E7B0088C17B /* Build configuration list for PBXNativeTarget "DumpRenderTree.app" */; 876 buildPhases = ( 877 A1158D7B18927E7A0088C17B /* Sources */, 878 A1158D7C18927E7A0088C17B /* Frameworks */, 879 A1158D7D18927E7A0088C17B /* Resources */, 880 ); 881 buildRules = ( 882 ); 883 dependencies = ( 884 A193180218928C10001C52B1 /* PBXTargetDependency */, 885 ); 886 name = DumpRenderTree.app; 887 productName = DumpRenderTree; 888 productReference = A1158D7F18927E7A0088C17B /* DumpRenderTree.app */; 889 productType = "com.apple.product-type.application"; 890 }; 772 891 A1321C9D188F9A3600125434 /* DumpRenderTree (Library) */ = { 773 892 isa = PBXNativeTarget; … … 819 938 French, 820 939 German, 940 en, 941 Base, 821 942 ); 822 943 mainGroup = 08FB7794FE84155DC02AAC07 /* DumpRenderTree */; … … 828 949 A1321C9D188F9A3600125434 /* DumpRenderTree (Library) */, 829 950 9340994A08540CAE007F3BC8 /* DumpRenderTree */, 951 A1158D7E18927E7A0088C17B /* DumpRenderTree.app */, 830 952 B5A7525A08AF4A4A00138E45 /* ImageDiff */, 831 953 141BF21E096A441D00E0753C /* TestNetscapePlugIn */, 832 954 2D403EB2150871F9005358D2 /* LayoutTestHelper */, 955 A1158D6218927AF00088C17B /* Perl Support */, 833 956 ); 834 957 }; … … 837 960 /* Begin PBXResourcesBuildPhase section */ 838 961 141BF21B096A441D00E0753C /* Resources */ = { 962 isa = PBXResourcesBuildPhase; 963 buildActionMask = 2147483647; 964 files = ( 965 ); 966 runOnlyForDeploymentPostprocessing = 0; 967 }; 968 A1158D7D18927E7A0088C17B /* Resources */ = { 839 969 isa = PBXResourcesBuildPhase; 840 970 buildActionMask = 2147483647; … … 921 1051 BCF6C6500C98E9C000AC063E /* GCController.cpp in Sources */, 922 1052 BCA18B230C9B014B00114369 /* GCControllerMac.mm in Sources */, 1053 A1158D581892740C0088C17B /* DumpRenderTreeBrowserView.mm in Sources */, 923 1054 5185F6B210714E07007AA393 /* HistoryDelegate.mm in Sources */, 924 1055 2CE88FA217124D8C00734FC0 /* JavaScriptThreading.cpp in Sources */, … … 929 1060 BCA18B7E0C9B08F100114369 /* ObjCPlugin.m in Sources */, 930 1061 BCA18B800C9B08F100114369 /* ObjCPluginFunction.m in Sources */, 1062 A1158D59189274360088C17B /* PixelDumpSupportIOS.mm in Sources */, 931 1063 8465E2C70FFA8DF2003B8342 /* PixelDumpSupport.cpp in Sources */, 932 1064 BCB284CD0CFA83C8007E533E /* PixelDumpSupportCG.cpp in Sources */, … … 946 1078 runOnlyForDeploymentPostprocessing = 0; 947 1079 }; 1080 A1158D7B18927E7A0088C17B /* Sources */ = { 1081 isa = PBXSourcesBuildPhase; 1082 buildActionMask = 2147483647; 1083 files = ( 1084 A19318001892886B001C52B1 /* DumpRenderTreeMain.mm in Sources */, 1085 ); 1086 runOnlyForDeploymentPostprocessing = 0; 1087 }; 948 1088 A134E52E188FC0DB00901D06 /* Sources */ = { 949 1089 isa = PBXSourcesBuildPhase; … … 975 1115 targetProxy = 2D403F201508736C005358D2 /* PBXContainerItemProxy */; 976 1116 }; 1117 A1158D6818927B240088C17B /* PBXTargetDependency */ = { 1118 isa = PBXTargetDependency; 1119 target = A1158D6218927AF00088C17B /* Perl Support */; 1120 targetProxy = A1158D6718927B240088C17B /* PBXContainerItemProxy */; 1121 }; 977 1122 A1321CD8188FABE000125434 /* PBXTargetDependency */ = { 978 1123 isa = PBXTargetDependency; … … 985 1130 targetProxy = A134E52C188FC09200901D06 /* PBXContainerItemProxy */; 986 1131 }; 1132 A19317FF18928835001C52B1 /* PBXTargetDependency */ = { 1133 isa = PBXTargetDependency; 1134 target = A1158D7E18927E7A0088C17B /* DumpRenderTree.app */; 1135 targetProxy = A19317FE18928835001C52B1 /* PBXContainerItemProxy */; 1136 }; 1137 A193180218928C10001C52B1 /* PBXTargetDependency */ = { 1138 isa = PBXTargetDependency; 1139 target = A1321C9D188F9A3600125434 /* DumpRenderTree (Library) */; 1140 targetProxy = A193180118928C10001C52B1 /* PBXContainerItemProxy */; 1141 }; 987 1142 A84F608F08B1370E00E9745F /* PBXTargetDependency */ = { 988 1143 isa = PBXTargetDependency; … … 1041 1196 2D403F16150871F9005358D2 /* Debug */ = { 1042 1197 isa = XCBuildConfiguration; 1043 baseConfigurationReference = A1 6CD20D18907A7D0092363E /* BaseTarget.xcconfig */;1198 baseConfigurationReference = A1103B5B1892498F00738C87 /* LayoutTestHelper.xcconfig */; 1044 1199 buildSettings = { 1045 1200 PRODUCT_NAME = LayoutTestHelper; … … 1049 1204 2D403F17150871F9005358D2 /* Release */ = { 1050 1205 isa = XCBuildConfiguration; 1051 baseConfigurationReference = A1 6CD20D18907A7D0092363E /* BaseTarget.xcconfig */;1206 baseConfigurationReference = A1103B5B1892498F00738C87 /* LayoutTestHelper.xcconfig */; 1052 1207 buildSettings = { 1053 1208 PRODUCT_NAME = LayoutTestHelper; … … 1057 1212 2D403F18150871F9005358D2 /* Production */ = { 1058 1213 isa = XCBuildConfiguration; 1059 baseConfigurationReference = A1 6CD20D18907A7D0092363E /* BaseTarget.xcconfig */;1214 baseConfigurationReference = A1103B5B1892498F00738C87 /* LayoutTestHelper.xcconfig */; 1060 1215 buildSettings = { 1061 1216 INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Frameworks/$(WEBKIT_FRAMEWORK_RESOURCES_PATH)"; … … 1106 1261 INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Frameworks/$(WEBKIT_FRAMEWORK_RESOURCES_PATH)"; 1107 1262 SKIP_INSTALL = NO; 1263 }; 1264 name = Production; 1265 }; 1266 A1158D6418927AF00088C17B /* Debug */ = { 1267 isa = XCBuildConfiguration; 1268 buildSettings = { 1269 }; 1270 name = Debug; 1271 }; 1272 A1158D6518927AF00088C17B /* Release */ = { 1273 isa = XCBuildConfiguration; 1274 buildSettings = { 1275 }; 1276 name = Release; 1277 }; 1278 A1158D6618927AF00088C17B /* Production */ = { 1279 isa = XCBuildConfiguration; 1280 buildSettings = { 1281 }; 1282 name = Production; 1283 }; 1284 A1158DAC18927E7B0088C17B /* Debug */ = { 1285 isa = XCBuildConfiguration; 1286 baseConfigurationReference = A19317FD18928738001C52B1 /* DumpRenderTreeApp.xcconfig */; 1287 buildSettings = { 1288 INFOPLIST_FILE = "$(SRCROOT)/ios/Info.plist"; 1289 }; 1290 name = Debug; 1291 }; 1292 A1158DAD18927E7B0088C17B /* Release */ = { 1293 isa = XCBuildConfiguration; 1294 baseConfigurationReference = A19317FD18928738001C52B1 /* DumpRenderTreeApp.xcconfig */; 1295 buildSettings = { 1296 INFOPLIST_FILE = "$(SRCROOT)/ios/Info.plist"; 1297 }; 1298 name = Release; 1299 }; 1300 A1158DAE18927E7B0088C17B /* Production */ = { 1301 isa = XCBuildConfiguration; 1302 baseConfigurationReference = A19317FD18928738001C52B1 /* DumpRenderTreeApp.xcconfig */; 1303 buildSettings = { 1304 INFOPLIST_FILE = "$(SRCROOT)/ios/Info.plist"; 1108 1305 }; 1109 1306 name = Production; … … 1223 1420 defaultConfigurationName = Production; 1224 1421 }; 1422 A1158D6318927AF00088C17B /* Build configuration list for PBXLegacyTarget "Perl Support" */ = { 1423 isa = XCConfigurationList; 1424 buildConfigurations = ( 1425 A1158D6418927AF00088C17B /* Debug */, 1426 A1158D6518927AF00088C17B /* Release */, 1427 A1158D6618927AF00088C17B /* Production */, 1428 ); 1429 defaultConfigurationIsVisible = 0; 1430 defaultConfigurationName = Production; 1431 }; 1432 A1158DAB18927E7B0088C17B /* Build configuration list for PBXNativeTarget "DumpRenderTree.app" */ = { 1433 isa = XCConfigurationList; 1434 buildConfigurations = ( 1435 A1158DAC18927E7B0088C17B /* Debug */, 1436 A1158DAD18927E7B0088C17B /* Release */, 1437 A1158DAE18927E7B0088C17B /* Production */, 1438 ); 1439 defaultConfigurationIsVisible = 0; 1440 defaultConfigurationName = Production; 1441 }; 1225 1442 A1321C9F188F9A3600125434 /* Build configuration list for PBXNativeTarget "DumpRenderTree (Library)" */ = { 1226 1443 isa = XCConfigurationList; -
trunk/Tools/DumpRenderTree/DumpRenderTreeFileDraggingSource.h
r43890 r162817 27 27 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 29 #if !PLATFORM(IOS) 30 29 31 #import <Cocoa/Cocoa.h> 30 32 … … 38 40 39 41 @end 42 43 #endif -
trunk/Tools/DumpRenderTree/DumpRenderTreePrefix.h
r156302 r162817 27 27 */ 28 28 29 #include <wtf/Platform.h> 30 29 31 #ifdef __OBJC__ 30 31 32 #import <Foundation/Foundation.h> 32 33 33 #endif -
trunk/Tools/DumpRenderTree/PixelDumpSupport.cpp
r161699 r162817 44 44 #endif 45 45 46 #if !PLATFORM(IOS) 46 47 void dumpWebViewAsPixelsAndCompareWithExpected(const std::string& expectedHash) 47 48 { … … 74 75 dumpBitmap(context.get(), actualHash); 75 76 } 77 #endif 76 78 77 79 static void appendIntToVector(unsigned number, Vector<unsigned char>& vector) -
trunk/Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.h
r122402 r162817 86 86 #endif 87 87 88 #endif // PluginObject_h88 #endif -
trunk/Tools/DumpRenderTree/TestNetscapePlugIn/PluginObjectMac.mm
r85036 r162817 25 25 26 26 #include "PluginObject.h" 27 28 27 29 28 #include <QuartzCore/QuartzCore.h> … … 97 96 return caLayer; 98 97 } 99 100 -
trunk/Tools/DumpRenderTree/TestNetscapePlugIn/TestObject.cpp
r72302 r162817 25 25 26 26 #include "TestObject.h" 27 27 28 #include "PluginObject.h" 28 29 -
trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp
r73076 r162817 23 23 * THE POSSIBILITY OF SUCH DAMAGE. 24 24 */ 25 26 #include "PluginTest.h"27 25 28 26 #include "PluginTest.h" -
trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp
r104239 r162817 86 86 87 87 static PluginTest::Register<NPRuntimeObjectFromDestroyedPlugin> npRuntimeObjectFromDestroyedPlugin("npruntime-object-from-destroyed-plugin"); 88 -
trunk/Tools/DumpRenderTree/TestRunner.cpp
r161666 r162817 50 50 #include <wtf/StdLibExtras.h> 51 51 52 #if PLATFORM(MAC) 52 #if PLATFORM(MAC) && !PLATFORM(IOS) 53 53 #include <Carbon/Carbon.h> 54 54 #endif … … 1317 1317 } 1318 1318 1319 #if PLATFORM(IOS) 1320 static JSValueRef setTelephoneNumberParsingEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 1321 { 1322 if (argumentCount < 1) 1323 return JSValueMakeUndefined(context); 1324 1325 TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject)); 1326 controller->setTelephoneNumberParsingEnabled(JSValueToBoolean(context, arguments[0])); 1327 1328 return JSValueMakeUndefined(context); 1329 } 1330 1331 static JSValueRef setPagePausedCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 1332 { 1333 if (argumentCount < 1) 1334 return JSValueMakeUndefined(context); 1335 1336 TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject)); 1337 controller->setPagePaused(JSValueToBoolean(context, arguments[0])); 1338 1339 return JSValueMakeUndefined(context); 1340 } 1341 #endif 1342 1319 1343 #if ENABLE(IOS_TEXT_AUTOSIZING) 1320 1344 static JSValueRef setTextAutosizingEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) … … 1847 1871 static JSValueRef getSecureEventInputIsEnabledCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) 1848 1872 { 1849 #if PLATFORM(MAC) 1873 #if PLATFORM(MAC) && !PLATFORM(IOS) 1850 1874 return JSValueMakeBoolean(context, IsSecureEventInputEnabled()); 1851 1875 #else … … 2169 2193 { "setStopProvisionalFrameLoads", setStopProvisionalFrameLoadsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2170 2194 { "setTabKeyCyclesThroughElements", setTabKeyCyclesThroughElementsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2195 #if PLATFORM(IOS) 2196 { "setTelephoneNumberParsingEnabled", setTelephoneNumberParsingEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2197 { "setPagePaused", setPagePausedCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2198 #endif 2171 2199 #if ENABLE(IOS_TEXT_AUTOSIZING) 2172 2200 { "setTextAutosizingEnabled", setTextAutosizingEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, -
trunk/Tools/DumpRenderTree/TestRunner.h
r161666 r162817 119 119 void setScrollbarPolicy(JSStringRef orientation, JSStringRef policy); 120 120 void startSpeechInput(JSContextRef inputElement); 121 #if PLATFORM(IOS) 122 void setTelephoneNumberParsingEnabled(bool enable); 123 void setPagePaused(bool paused); 124 #endif 125 121 126 void setPageVisibility(const char*); 122 127 void resetPageVisibility(); -
trunk/Tools/DumpRenderTree/cg/ImageDiffCG.cpp
r160581 r162817 45 45 #include <ImageIO/CGImageDestination.h> 46 46 47 #if PLATFORM(MAC) 47 #if PLATFORM(IOS) 48 #include <MobileCoreServices/UTCoreTypes.h> 49 #elif PLATFORM(MAC) 48 50 #include <LaunchServices/UTCoreTypes.h> 49 51 #endif -
trunk/Tools/DumpRenderTree/cg/PixelDumpSupportCG.cpp
r149716 r162817 44 44 #if PLATFORM(WIN) 45 45 #include "MD5.h" 46 #elif PLATFORM(IOS) 47 #include <MobileCoreServices/UTCoreTypes.h> 48 #define COMMON_DIGEST_FOR_OPENSSL 49 #include <CommonCrypto/CommonDigest.h> 46 50 #elif PLATFORM(MAC) 47 51 #include <LaunchServices/UTCoreTypes.h> -
trunk/Tools/DumpRenderTree/ios/AccessibilityControllerIOS.mm
r162222 r162817 27 27 #import "DumpRenderTree.h" 28 28 #import "AccessibilityController.h" 29 30 #if PLATFORM(IOS)31 29 32 30 #import "AccessibilityCommonMac.h" … … 135 133 return platformName; 136 134 } 137 138 #endif // PLATFORM(IOS) -
trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm
r161417 r162817 36 36 #import <WebKit/WebFrame.h> 37 37 #import <WebKit/WebHTMLView.h> 38 #import <WebKit/WebTypesInternal.h>39 38 #import <wtf/RetainPtr.h> 40 39 #import <wtf/Vector.h> 41 42 #if PLATFORM(IOS)43 40 44 41 #import <UIKit/UIKit.h> … … 654 651 } 655 652 653 void AccessibilityUIElement::scrollToMakeVisible() 654 { 655 // FIXME: implement 656 } 657 656 658 JSStringRef AccessibilityUIElement::selectedTextRange() 657 659 { … … 821 823 return 0; 822 824 } 823 #endif // PLATFORM(IOS) 825 826 JSStringRef AccessibilityUIElement::classList() const 827 { 828 // FIXME: implement 829 return nullptr; 830 } 831 832 void AccessibilityUIElement::uiElementArrayAttributeValue(JSStringRef, Vector<AccessibilityUIElement>&) const 833 { 834 // FIXME: implement 835 } -
trunk/Tools/DumpRenderTree/ios/DumpRenderTreeBrowserView.h
r162816 r162817 1 1 /* 2 * Copyright (C) 2009 Apple Inc. All rights reserved.2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 23 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 24 */ 25 26 #import <Cocoa/Cocoa.h>27 25 28 @interface HistoryDelegate : NSObject 29 { 26 27 #import <UIKit/UIWebBrowserView.h> 28 29 @interface DumpRenderTreeBrowserView : UIWebBrowserView { 30 BOOL _scrollingUsesUIWebScrollView; 30 31 } 31 32 33 @property (nonatomic, assign) BOOL scrollingUsesUIWebScrollView; 34 32 35 @end -
trunk/Tools/DumpRenderTree/ios/PerlSupport/DumpRenderTreeSupport.c
r162816 r162817 23 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 24 */ 25 26 #import <Cocoa/Cocoa.h>27 25 28 @interface HistoryDelegate : NSObject 26 #include <stdio.h> 27 #include <sys/sysctl.h> 28 29 int processIsCrashing(int pid) 29 30 { 31 int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, pid }; 32 struct kinfo_proc info; 33 size_t bufferSize = sizeof(info); 34 if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), &info, &bufferSize, 0, 0)) { 35 perror("sysctl"); 36 return 0; 37 } 38 39 struct extern_proc proc = info.kp_proc; 40 41 // The process is crashing if it is waiting to exit, is not a zombie, and has a non-zero exit code. 42 return proc.p_stat != SZOMB && (proc.p_flag & P_WEXIT) && proc.p_xstat; 30 43 } 31 32 @end -
trunk/Tools/DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/IPhoneSimulatorNotification.xs
r162816 r162817 23 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 24 */ 25 26 #import <Cocoa/Cocoa.h>27 25 28 @interface HistoryDelegate : NSObject 29 { 30 } 26 #include "EXTERN.h" 27 #include "perl.h" 28 #include "XSUB.h" 31 29 30 #include "ppport.h" 31 32 #import <Foundation/Foundation.h> 33 34 @interface IPhoneSimulatorNotification : NSObject 32 35 @end 36 37 @implementation IPhoneSimulatorNotification 38 - (void)readyNotificationCallback { } 39 - (void)applicationLaunchedNotificationCallback:(NSNotification *)notification { } 40 - (void)applicationQuitNotificationCallback:(NSNotification *)notification { } 41 @end 42 43 MODULE = IPhoneSimulatorNotification PACKAGE = IPhoneSimulatorNotification 44 45 PROTOTYPES: ENABLE 46 -
trunk/Tools/DumpRenderTree/mac/AccessibilityNotificationHandler.mm
r102378 r162817 38 38 #import <JavaScriptCore/JSStringRefCF.h> 39 39 #import <WebKit/WebFrame.h> 40 #import <WebKit/WebTypesInternal.h>41 40 #import <wtf/RetainPtr.h> 42 41 -
trunk/Tools/DumpRenderTree/mac/AccessibilityTextMarkerMac.mm
r74733 r162817 28 28 #import "AccessibilityTextMarker.h" 29 29 #import "DumpRenderTree.h" 30 31 #if SUPPORTS_AX_TEXTMARKERS 30 32 31 33 // MARK: AccessibilityTextMarker … … 80 82 return m_textMarkerRange.get(); 81 83 } 84 85 #endif // SUPPORTS_AX_TEXTMARKERS -
trunk/Tools/DumpRenderTree/mac/AppleScriptController.m
r46340 r162817 30 30 #import "config.h" 31 31 #import "AppleScriptController.h" 32 33 #if !PLATFORM(IOS) 32 34 33 35 #import <WebKit/WebView.h> … … 126 128 127 129 @end 130 131 #endif // !PLATFORM(IOS) -
trunk/Tools/DumpRenderTree/mac/Configurations/Base.xcconfig
r157987 r162817 22 22 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 23 24 #include "<DEVELOPER_DIR>/AppleInternal/XcodeConfig/AspenFamily.xcconfig" 25 24 26 CLANG_CXX_LANGUAGE_STANDARD = gnu++0x; 25 27 CLANG_CXX_LIBRARY = libc++; 26 28 CLANG_WARN_CXX0X_EXTENSIONS = NO; 27 HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include ForwardingHeaders mac/InternalHeaders $(NEXT_ROOT)/usr/local/include/WebCoreTestSupport $(SRCROOT)/../../Source/JavaScriptCore/icu; 28 GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) ENABLE_DASHBOARD_SUPPORT WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST; 29 HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include $(BUILT_PRODUCTS_DIR)/WebCoreTestSupport ForwardingHeaders $(HEADER_SEARCH_PATHS_$(PLATFORM_NAME)) $(SRCROOT)/../../Source/JavaScriptCore/icu; 30 HEADER_SEARCH_PATHS_iphoneos = $(SDKROOT)/usr/local/include $(SDKROOT)/usr/local/include/WebCoreTestSupport; 31 HEADER_SEARCH_PATHS_iphonesimulator = $(HEADER_SEARCH_PATHS_iphoneos); 32 HEADER_SEARCH_PATHS_macosx = mac/InternalHeaders $(NEXT_ROOT)/usr/local/include/WebCoreTestSupport; 33 FRAMEWORK_SEARCH_PATHS = $(FRAMEWORK_SEARCH_PATHS_$(PLATFORM_NAME)); 34 FRAMEWORK_SEARCH_PATHS_macosx = $(interited); 35 FRAMEWORK_SEARCH_PATHS_iphoneos = $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks; 36 FRAMEWORK_SEARCH_PATHS_iphonesimulator = $(FRAMEWORK_SEARCH_PATHS_iphoneos); 37 GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) $(GCC_PREPROCESSOR_DEFINITIONS_$(PLATFORM_NAME)) WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST; 38 GCC_PREPROCESSOR_DEFINITIONS_macosx = ENABLE_DASHBOARD_SUPPORT; 29 39 DEBUG_INFORMATION_FORMAT = dwarf-with-dsym; 30 40 PREBINDING = NO … … 38 48 GCC_WARN_UNUSED_FUNCTION = YES 39 49 GCC_WARN_UNUSED_VARIABLE = YES 50 // FIXME: <http://webkit.org/b/118590> DumpRenderTree should build with -Wshorten-64-to-32 51 GCC_WARN_64_TO_32_BIT_CONVERSION[arch=arm64] = NO; 52 GCC_WARN_64_TO_32_BIT_CONVERSION[arch=x86_64] = NO; 40 53 WARNING_CFLAGS = -Wall -W -Wno-unused-parameter -Wundef 41 54 LINKER_DISPLAYS_MANGLED_NAMES = YES; … … 59 72 TOOLCHAINS_macosx_1090 = $(TOOLCHAINS); 60 73 TOOLCHAINS_macosx_101000 = $(TOOLCHAINS_macosx_1090); 74 75 SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator; -
trunk/Tools/DumpRenderTree/mac/Configurations/DebugRelease.xcconfig
r157987 r162817 29 29 ONLY_ACTIVE_ARCH = YES; 30 30 31 MACOSX_DEPLOYMENT_TARGET = $(MACOSX_DEPLOYMENT_TARGET_$(TARGET_MAC_OS_X_VERSION_MAJOR)) 32 MACOSX_DEPLOYMENT_TARGET_1080 = 10.8; 33 MACOSX_DEPLOYMENT_TARGET_1090 = 10.9; 34 MACOSX_DEPLOYMENT_TARGET_101000 = 10.10; 31 MACOSX_DEPLOYMENT_TARGET = $(MACOSX_DEPLOYMENT_TARGET_$(PLATFORM_NAME)); 32 MACOSX_DEPLOYMENT_TARGET_iphoneos = 10.9; 33 MACOSX_DEPLOYMENT_TARGET_iphonesimulator = 10.9; 34 MACOSX_DEPLOYMENT_TARGET_macosx = $(MACOSX_DEPLOYMENT_TARGET_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)); 35 MACOSX_DEPLOYMENT_TARGET_macosx_1080 = 10.8; 36 MACOSX_DEPLOYMENT_TARGET_macosx_1090 = 10.9; 37 MACOSX_DEPLOYMENT_TARGET_macosx_101000 = 10.10; 35 38 36 39 WEBKIT_SYSTEM_INTERFACE_LIBRARY = $(WEBKIT_SYSTEM_INTERFACE_LIBRARY_$(PLATFORM_NAME)); -
trunk/Tools/DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig
r162573 r162817 24 24 #include "BaseTarget.xcconfig" 25 25 26 OTHER_LDFLAGS = $(inherited) -l$(WEBKIT_SYSTEM_INTERFACE_LIBRARY) -force_load $(BUILT_PRODUCTS_DIR)/libDumpRenderTree.a; 26 OTHER_LDFLAGS = $(OTHER_LDFLAGS_$(PLATFORM_NAME)); 27 OTHER_LDFLAGS_macosx = $(inherited) -l$(WEBKIT_SYSTEM_INTERFACE_LIBRARY) -lWebCoreTestSupport -force_load $(BUILT_PRODUCTS_DIR)/libDumpRenderTree.a -framework Carbon -framework Cocoa -framework JavaScriptCore -framework OpenGL -framework WebKit; 27 28 LD_RUNPATH_SEARCH_PATHS = "@loader_path/."; 28 29 PRODUCT_NAME = DumpRenderTree; 30 EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(PLATFORM_NAME)); 31 EXCLUDED_SOURCE_FILE_NAMES_iphoneos = DumpRenderTreeMain.mm *.ttf *.TTF *.sfont; 32 EXCLUDED_SOURCE_FILE_NAMES_iphonesimulator = $(EXCLUDED_SOURCE_FILE_NAMES_iphoneos); -
trunk/Tools/DumpRenderTree/mac/Configurations/DumpRenderTreeLibrary.xcconfig
r162573 r162817 28 28 PRODUCT_NAME = DumpRenderTree; 29 29 SKIP_INSTALL = YES; 30 31 EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(PLATFORM_NAME)); 32 EXCLUDED_SOURCE_FILE_NAMES_iphoneos = AccessibilityControllerMac.mm AccessibilityUIElementMac.mm DumpRenderTreeFileDraggingSource.m PixelDumpSupportMac.mm PixelDumpSupportCG.cpp; 33 EXCLUDED_SOURCE_FILE_NAMES_iphonesimulator = $(EXCLUDED_SOURCE_FILE_NAMES_iphoneos); 34 EXCLUDED_SOURCE_FILE_NAMES_macosx = AccessibilityUIElementIOS.mm AccessibilityControllerIOS.mm PixelDumpSupportIOS.mm DumpRenderTreeBrowserView.mm; -
trunk/Tools/DumpRenderTree/mac/Configurations/ImageDiff.xcconfig
r156611 r162817 24 24 #include "BaseTarget.xcconfig" 25 25 26 PRODUCT_NAME = ImageDiff 26 PRODUCT_NAME = ImageDiff; 27 OTHER_LDFLAGS = $(OTHER_LDFLAGS_$(PLATFORM_NAME)); 28 OTHER_LDFLAGS_macosx = -framework Carbon -framework Cocoa -framework QuartzCore; 29 OTHER_LDFLAGS_iphoneos = -framework CoreFoundation -framework CoreGraphics -framework MobileCoreServices -framework ImageIO; 30 OTHER_LDFLAGS_iphonesimulator = $(OTHER_LDFLAGS_iphoneos); -
trunk/Tools/DumpRenderTree/mac/Configurations/LayoutTestHelper.xcconfig
r162816 r162817 26 26 #include "BaseTarget.xcconfig" 27 27 28 PRODUCT_NAME = DumpRenderTree;29 SKIP_INSTALL = YES;28 OTHER_LDFLAGS = $(OTHER_LDFLAGS_$(PLATFORM_NAME)); 29 OTHER_LDFLAGS_macosx = -framework Carbon -framework Cocoa -framework OpenGL -framework IOKit; -
trunk/Tools/DumpRenderTree/mac/Configurations/TestNetscapePlugIn.xcconfig
r156611 r162817 30 30 WARNING_CFLAGS = -Wmost -Wno-four-char-constants -Wno-unknown-pragmas 31 31 LIBRARY_STYLE = BUNDLE 32 EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(PLATFORM_NAME)); 33 EXCLUDED_SOURCE_FILE_NAMES_iphoneos = *; 34 EXCLUDED_SOURCE_FILE_NAMES_iphonesimulator = $(EXCLUDED_SOURCE_FILE_NAMES_iphoneos); -
trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
r162573 r162817 57 57 #import "WorkQueue.h" 58 58 #import "WorkQueueItem.h" 59 #import <Carbon/Carbon.h>60 59 #import <CoreFoundation/CoreFoundation.h> 61 60 #import <JavaScriptCore/HeapStatistics.h> … … 72 71 #import <WebKit/WebDocumentPrivate.h> 73 72 #import <WebKit/WebDeviceOrientationProviderMock.h> 74 #import <WebKit/WebDynamicScrollBarsView.h>75 73 #import <WebKit/WebEditingDelegate.h> 76 74 #import <WebKit/WebFrameView.h> … … 85 83 #import <WebKit/WebResourceLoadDelegate.h> 86 84 #import <WebKit/WebStorageManagerPrivate.h> 87 #import <WebKit/WebTypesInternal.h>88 85 #import <WebKit/WebViewPrivate.h> 89 86 #import <getopt.h> … … 95 92 #import <wtf/OwnPtr.h> 96 93 94 #if !PLATFORM(IOS) 95 #import <Carbon/Carbon.h> 96 #import <WebKit/WebDynamicScrollBarsView.h> 97 #endif 98 99 #if PLATFORM(IOS) 100 #import <CoreGraphics/CGFontDB.h> 101 #import <GraphicsServices/GSFont.h> 102 #import <QuartzCore/QuartzCore.h> 103 #import <UIKit/UIApplication_Private.h> 104 #import <UIKit/UIMath.h> 105 #import <UIKit/UIWebBrowserView.h> 106 #import <UIKit/UIWebScrollView.h> 107 #import <WebKit/WAKViewPrivate.h> 108 #import <WebKit/WAKWindow.h> 109 #import <WebKit/WebCoreThread.h> 110 #import <WebKit/WebCoreThreadRun.h> 111 #import <WebKit/WebDOMOperations.h> 112 #import <fcntl.h> 113 #import "DumpRenderTreeBrowserView.h" 114 #endif 115 97 116 extern "C" { 98 117 #import <mach-o/getsect.h> … … 101 120 using namespace std; 102 121 122 #if !PLATFORM(IOS) 103 123 @interface DumpRenderTreeApplication : NSApplication 104 124 @end … … 106 126 @interface DumpRenderTreeEvent : NSEvent 107 127 @end 128 #else 129 @interface ScrollViewResizerDelegate : NSObject 130 @end 131 132 @implementation ScrollViewResizerDelegate 133 - (void)view:(UIWebDocumentView *)view didSetFrame:(CGRect)newFrame oldFrame:(CGRect)oldFrame asResultOfZoom:(BOOL)wasResultOfZoom 134 { 135 UIView *scrollView = [view superview]; 136 while (![scrollView isKindOfClass:[UIWebScrollView class]]) 137 scrollView = [scrollView superview]; 138 139 ASSERT(scrollView && [scrollView isKindOfClass:[UIWebScrollView class]]); 140 const CGSize scrollViewSize = [scrollView bounds].size; 141 CGSize contentSize = newFrame.size; 142 contentSize.height = _ROUNDF_(MAX(CGRectGetMaxY(newFrame), scrollViewSize.height)); 143 [(UIWebScrollView *)scrollView setContentSize:contentSize]; 144 } 145 @end 146 #endif 108 147 109 148 @interface NSURLRequest (PrivateThingsWeShouldntReallyUse) … … 151 190 DefaultPolicyDelegate *defaultPolicyDelegate; 152 191 StorageTrackerDelegate *storageDelegate; 192 #if PLATFORM(IOS) 193 static ScrollViewResizerDelegate *scrollViewResizerDelegate; 194 #endif 153 195 154 196 static int dumpPixelsForAllTests = NO; … … 165 207 static WebHistoryItem *prevTestBFItem = nil; // current b/f item at the end of the previous test 166 208 209 #if PLATFORM(IOS) 210 const unsigned phoneViewHeight = 480; 211 const unsigned phoneViewWidth = 320; 212 const unsigned phoneBrowserScrollViewHeight = 416; 213 const unsigned phoneBrowserAddressBarOffset = 60; 214 const CGRect layoutTestViewportRect = { {0, 0}, {static_cast<CGFloat>(TestRunner::viewWidth), static_cast<CGFloat>(TestRunner::viewHeight)} }; 215 UIWebBrowserView *gWebBrowserView = nil; 216 UIWebScrollView *gWebScrollView = nil; 217 DumpRenderTreeWindow *gDrtWindow = nil; 218 #endif 219 167 220 #ifdef __OBJC2__ 168 221 static void swizzleAllMethods(Class imposter, Class original) … … 237 290 } 238 291 292 #if !PLATFORM(IOS) 239 293 static NSSet *allowedFontFamilySet() 240 294 { … … 472 526 activateTestingFonts(); 473 527 } 474 528 #else 529 static void activateFontsIOS() 530 { 531 static const char* fontSectionNames[] = { 532 "Ahem", 533 "ltcher100", 534 "WeightWatcher200", 535 "WeightWatcher300", 536 "WeightWatcher400", 537 "WeightWatcher500", 538 "WeightWatcher600", 539 "WeightWatcher700", 540 "WeightWatcher800", 541 "WeightWatcher900", 542 0 543 }; 544 545 for (unsigned i = 0; fontSectionNames[i]; ++i) { 546 unsigned long fontDataLength; 547 char* fontData = getsectdata("__DATA", fontSectionNames[i], &fontDataLength); 548 if (!fontData) { 549 fprintf(stderr, "Failed to locate the %s font.\n", fontSectionNames[i]); 550 exit(1); 551 } 552 553 CGDataProviderRef data = CGDataProviderCreateWithData(NULL, fontData, fontDataLength, NULL); 554 if (!data) { 555 fprintf(stderr, "Failed to create CGDataProviderRef for the %s font.\n", fontSectionNames[i]); 556 exit(1); 557 } 558 559 CGFontRef cgFont = CGFontCreateWithDataProvider(data); 560 CGDataProviderRelease(data); 561 if (!cgFont) { 562 fprintf(stderr, "Failed to create CGFontRef for the %s font.\n", fontSectionNames[i]); 563 exit(1); 564 } 565 566 if (!GSFontAddCGFont(cgFont)) { 567 fprintf(stderr, "Failed to add CGFont to GraphicsServices for the %s font.\n", fontSectionNames[i]); 568 exit(1); 569 } 570 CGFontRelease(cgFont); 571 } 572 } 573 #endif // !PLATFORM(IOS) 574 575 576 #if PLATFORM(IOS) 577 void adjustWebDocumentForFlexibleViewport(UIWebBrowserView *webBrowserView, UIWebScrollView *scrollView) 578 { 579 // These values match MobileSafari's, see -[TabDocument _createDocumentView]. 580 [webBrowserView setMinimumScale:0.25f forDocumentTypes:UIEveryDocumentMask]; 581 [webBrowserView setMaximumScale:5.0f forDocumentTypes:UIEveryDocumentMask]; 582 [webBrowserView setInitialScale:UIWebViewScalesToFitScale forDocumentTypes:UIEveryDocumentMask]; 583 [webBrowserView setViewportSize:CGSizeMake(UIWebViewStandardViewportWidth, UIWebViewGrowsAndShrinksToFitHeight) forDocumentTypes:UIEveryDocumentMask]; 584 585 // Adjust the viewport view and viewport to have similar behavior 586 // as the browser. 587 [(DumpRenderTreeBrowserView *)webBrowserView setScrollingUsesUIWebScrollView:YES]; 588 [webBrowserView setDelegate:scrollViewResizerDelegate]; 589 590 CGRect viewportRect = CGRectMake(0, 0, phoneViewWidth, phoneBrowserScrollViewHeight); 591 [scrollView setBounds:viewportRect]; 592 [scrollView setFrame:viewportRect]; 593 594 [webBrowserView setMinimumSize:viewportRect.size]; 595 [webBrowserView setAutoresizes:YES]; 596 CGRect browserViewFrame = [webBrowserView frame]; 597 browserViewFrame.origin = CGPointMake(0, phoneBrowserAddressBarOffset); 598 [webBrowserView setFrame:browserViewFrame]; 599 } 600 601 void adjustWebDocumentForStandardViewport(UIWebBrowserView *webBrowserView, UIWebScrollView *scrollView) 602 { 603 [webBrowserView setMinimumScale:1.0f forDocumentTypes:UIEveryDocumentMask]; 604 [webBrowserView setMaximumScale:5.0f forDocumentTypes:UIEveryDocumentMask]; 605 [webBrowserView setInitialScale:1.0f forDocumentTypes:UIEveryDocumentMask]; 606 607 [(DumpRenderTreeBrowserView *)webBrowserView setScrollingUsesUIWebScrollView:NO]; 608 [webBrowserView setDelegate: nil]; 609 610 [scrollView setBounds:layoutTestViewportRect]; 611 [scrollView setFrame:layoutTestViewportRect]; 612 613 [webBrowserView setMinimumSize:layoutTestViewportRect.size]; 614 [webBrowserView setAutoresizes:NO]; 615 CGRect browserViewFrame = [webBrowserView frame]; 616 browserViewFrame.origin = CGPointZero; 617 [webBrowserView setFrame:browserViewFrame]; 618 } 619 #endif 620 621 #if !PLATFORM(IOS) 475 622 @interface DRTMockScroller : NSScroller 476 623 @end … … 531 678 [WebDynamicScrollBarsView setCustomScrollerClass:[DRTMockScroller class]]; 532 679 } 680 #endif 533 681 534 682 WebView *createWebViewAndOffscreenWindow() 535 683 { 684 #if !PLATFORM(IOS) 536 685 NSRect rect = NSMakeRect(0, 0, TestRunner::viewWidth, TestRunner::viewHeight); 537 686 WebView *webView = [[WebView alloc] initWithFrame:rect frameName:nil groupName:@"org.webkit.DumpRenderTree"]; 538 687 #else 688 UIWebBrowserView *webBrowserView = [[[DumpRenderTreeBrowserView alloc] initWithFrame:layoutTestViewportRect] autorelease]; 689 690 WebView *webView = [[webBrowserView webView] retain]; 691 [webView setGroupName:@"org.webkit.DumpRenderTree"]; 692 #endif 693 539 694 [webView setUIDelegate:uiDelegate]; 540 695 [webView setFrameLoadDelegate:frameLoadDelegate]; … … 550 705 [WebView registerURLSchemeAsLocal:@"feedsearch"]; 551 706 707 #if !PLATFORM(IOS) 552 708 [webView setContinuousSpellCheckingEnabled:YES]; 553 709 [webView setAutomaticQuoteSubstitutionEnabled:NO]; … … 574 730 575 731 [window startListeningForAcceleratedCompositingChanges]; 576 732 #else 733 DumpRenderTreeWindow *drtWindow = [[DumpRenderTreeWindow alloc] initWithLayer:[webBrowserView layer]]; 734 [drtWindow setContentView:webView]; 735 [webBrowserView setWAKWindow:drtWindow]; 736 737 [[webView window] makeFirstResponder:[[[webView mainFrame] frameView] documentView]]; 738 739 CGRect uiWindowRect = layoutTestViewportRect; 740 uiWindowRect.origin.y += [UIApp statusBarHeight]; 741 UIWindow *uiWindow = [[[UIWindow alloc] initWithFrame:uiWindowRect] autorelease]; 742 743 // The UIWindow and UIWebBrowserView are released when the DumpRenderTreeWindow is closed. 744 drtWindow.uiWindow = uiWindow; 745 drtWindow.browserView = webBrowserView; 746 747 UIWebScrollView *scrollView = [[UIWebScrollView alloc] initWithFrame:layoutTestViewportRect]; 748 [scrollView addSubview:webBrowserView]; 749 750 [uiWindow addSubview:scrollView]; 751 [scrollView release]; 752 753 adjustWebDocumentForStandardViewport(webBrowserView, scrollView); 754 #endif 755 756 #if !PLATFORM(IOS) 577 757 // For reasons that are not entirely clear, the following pair of calls makes WebView handle its 578 758 // dynamic scrollbars properly. Without it, every frame will always have scrollbars. 579 759 NSBitmapImageRep *imageRep = [webView bitmapImageRepForCachingDisplayInRect:[webView bounds]]; 580 760 [webView cacheDisplayInRect:[webView bounds] toBitmapImageRep:imageRep]; 581 761 #else 762 [[webView mainFrame] _setVisibleSize:CGSizeMake(phoneViewWidth, phoneViewHeight)]; 763 [[webView preferences] _setTelephoneNumberParsingEnabled:NO]; 764 765 // Initialize the global UIViews, and set the key UIWindow to be painted. 766 if (!gWebBrowserView) { 767 gWebBrowserView = [webBrowserView retain]; 768 gWebScrollView = [scrollView retain]; 769 gDrtWindow = [drtWindow retain]; 770 [uiWindow makeKeyAndVisible]; 771 [uiWindow retain]; 772 } 773 #endif 774 582 775 return webView; 583 776 } … … 616 809 [preferences setJavaScriptEnabled:YES]; 617 810 [preferences setEditableLinkBehavior:WebKitEditableLinkOnlyLiveWithShiftKey]; 811 #if !PLATFORM(IOS) 618 812 [preferences setTabsToLinks:NO]; 813 #endif 619 814 [preferences setDOMPasteAllowed:YES]; 815 #if !PLATFORM(IOS) 620 816 [preferences setShouldPrintBackgrounds:YES]; 817 #endif 621 818 [preferences setCacheModel:WebCacheModelDocumentBrowser]; 622 819 [preferences setXSSAuditorEnabled:NO]; 623 820 [preferences setExperimentalNotificationsEnabled:NO]; 624 821 [preferences setPlugInsEnabled:YES]; 822 #if !PLATFORM(IOS) 625 823 [preferences setTextAreasAreResizable:YES]; 824 #endif 626 825 627 826 [preferences setPrivateBrowsingEnabled:NO]; … … 641 840 } else 642 841 [preferences setUserStyleSheetEnabled:NO]; 842 #if PLATFORM(IOS) 843 [preferences setMediaPlaybackAllowsInline:YES]; 844 [preferences setMediaPlaybackRequiresUserGesture:NO]; 845 846 // Enable the tracker before creating the first WebView will 847 // cause initialization to use the correct database paths. 848 [preferences setStorageTrackerEnabled:YES]; 849 #endif 643 850 644 851 #if ENABLE(IOS_TEXT_AUTOSIZING) … … 667 874 #endif 668 875 876 #if ENABLE(IOS_TEXT_AUTOSIZING) 877 // Disable text autosizing by default. 878 [preferences _setMinimumZoomFontSize:0]; 879 #endif 880 669 881 [preferences setScreenFontSubstitutionEnabled:YES]; 670 882 … … 679 891 static void setDefaultsToConsistentValuesForTesting() 680 892 { 893 #if PLATFORM(IOS) 894 WebThreadLock(); 895 #endif 896 681 897 static const int NoFontSmoothing = 0; 682 898 static const int BlueTintedAppearance = 1; … … 696 912 WebKitFullScreenEnabledPreferenceKey: @YES, 697 913 @"UseWebKitWebInspector": @YES, 914 #if !PLATFORM(IOS) 698 915 @"NSTestCorrectionDictionary": @{ 699 916 @"notationl": @"notational", … … 703 920 @"hellolfworld": @"hello\nworld" 704 921 }, 922 #endif 705 923 @"WebKitKerningAndLigaturesEnabledByDefault": @NO, 706 924 @"AppleScrollBarVariant": @"DoubleMax", 925 #if !PLATFORM(IOS) 707 926 @"NSScrollAnimationEnabled": @NO, 927 #endif 708 928 @"NSOverlayScrollersEnabled": @NO, 709 929 @"AppleShowScrollBars": @"Always", … … 758 978 storageDelegate = [[StorageTrackerDelegate alloc] init]; 759 979 defaultPolicyDelegate = [[DefaultPolicyDelegate alloc] init]; 980 #if PLATFORM(IOS) 981 scrollViewResizerDelegate = [[ScrollViewResizerDelegate alloc] init]; 982 #endif 760 983 } 761 984 … … 776 999 releaseAndZero(&policyDelegate); 777 1000 releaseAndZero(&storageDelegate); 1001 #if PLATFORM(IOS) 1002 releaseAndZero(&scrollViewResizerDelegate); 1003 #endif 778 1004 } 779 1005 … … 805 1031 static void addTestPluginsToPluginSearchPath(const char* executablePath) 806 1032 { 1033 #if !PLATFORM(IOS) 807 1034 NSString *pwd = [[NSString stringWithUTF8String:executablePath] stringByDeletingLastPathComponent]; 808 1035 [WebPluginDatabase setAdditionalWebPlugInPaths:[NSArray arrayWithObject:pwd]]; 809 1036 [[WebPluginDatabase sharedDatabase] refresh]; 1037 #endif 810 1038 } 811 1039 … … 835 1063 static void prepareConsistentTestingEnvironment() 836 1064 { 1065 #if !PLATFORM(IOS) 837 1066 poseAsClass("DumpRenderTreePasteboard", "NSPasteboard"); 838 1067 poseAsClass("DumpRenderTreeEvent", "NSEvent"); 1068 #else 1069 poseAsClass("DumpRenderTreeEvent", "GSEvent"); 1070 #endif 839 1071 840 1072 [[WebPreferences standardPreferences] setAutosaves:NO]; 1073 1074 #if !PLATFORM(IOS) 841 1075 842 1076 // FIXME: We'd like to start with a clean state for every test, but this function can't be used more than once yet. … … 852 1086 adjustFonts(); 853 1087 registerMockScrollbars(); 1088 #else 1089 activateFontsIOS(); 1090 #endif 854 1091 855 1092 allocateGlobalControllers(); … … 857 1094 makeLargeMallocFailSilently(); 858 1095 859 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 10901096 #if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 860 1097 NSActivityOptions options = (NSActivityUserInitiatedAllowingIdleSystemSleep | NSActivityLatencyCritical) & ~(NSActivitySuddenTerminationDisabled | NSActivityAutomaticTerminationDisabled); 861 1098 static id assertion = [[[NSProcessInfo processInfo] beginActivityWithOptions:options reason:@"DumpRenderTree should not be subject to process suppression"] retain]; … … 866 1103 void dumpRenderTree(int argc, const char *argv[]) 867 1104 { 1105 #if PLATFORM(IOS) 1106 int infd = open("/tmp/DumpRenderTree_IN", O_RDWR); 1107 dup2(infd, STDIN_FILENO); 1108 int outfd = open("/tmp/DumpRenderTree_OUT", O_RDWR); 1109 dup2(outfd, STDOUT_FILENO); 1110 int errfd = open("/tmp/DumpRenderTree_ERROR", O_RDWR | O_NONBLOCK); 1111 dup2(errfd, STDERR_FILENO); 1112 #endif 1113 868 1114 initializeGlobalsFromCommandLineOptions(argc, argv); 869 1115 prepareConsistentTestingEnvironment(); … … 904 1150 stopJavaScriptThreads(); 905 1151 1152 #if !PLATFORM(IOS) 906 1153 NSWindow *window = [webView window]; 1154 #endif 907 1155 [webView close]; 908 1156 mainFrame = nil; 909 1157 1158 #if !PLATFORM(IOS) 910 1159 // Work around problem where registering drag types leaves an outstanding 911 1160 // "perform selector" on the window, which retains the window. It's a bit … … 915 1164 916 1165 [window close]; // releases when closed 1166 #else 1167 UIWindow *uiWindow = [gWebBrowserView window]; 1168 [uiWindow removeFromSuperview]; 1169 [uiWindow release]; 1170 #endif 1171 917 1172 [webView release]; 918 1173 919 1174 releaseGlobalControllers(); 920 1175 1176 #if !PLATFORM(IOS) 921 1177 [DumpRenderTreePasteboard releaseLocalPasteboards]; 1178 #endif 922 1179 923 1180 // FIXME: This should be moved onto TestRunner and made into a HashSet … … 926 1183 disallowedURLs = 0; 927 1184 } 928 } 1185 1186 #if PLATFORM(IOS) 1187 close(infd); 1188 close(outfd); 1189 close(errfd); 1190 #endif 1191 } 1192 1193 #if PLATFORM(IOS) 1194 static int _argc; 1195 static const char **_argv; 1196 1197 @implementation DumpRenderTree 1198 1199 - (void)_runDumpRenderTree 1200 { 1201 dumpRenderTree(_argc, _argv); 1202 } 1203 1204 - (void)applicationDidFinishLaunching:(NSNotification *)notification 1205 { 1206 [self performSelectorOnMainThread:@selector(_runDumpRenderTree) withObject:nil waitUntilDone:NO]; 1207 } 1208 1209 - (void)_deferDumpToMainThread 1210 { 1211 ASSERT(WebThreadIsCurrent()); 1212 1213 dispatch_async(dispatch_get_main_queue(), ^{ 1214 dump(); 1215 }); 1216 } 1217 1218 - (void)_webThreadEventLoopHasRun 1219 { 1220 ASSERT(!WebThreadIsCurrent()); 1221 _hasFlushedWebThreadRunQueue = YES; 1222 } 1223 1224 - (void)_webThreadInvoked 1225 { 1226 ASSERT(WebThreadIsCurrent()); 1227 dispatch_async(dispatch_get_main_queue(), ^{ 1228 [self _webThreadEventLoopHasRun]; 1229 }); 1230 } 1231 1232 // The test can end in response to a delegate callback while there are still methods queued on the Web Thread. 1233 // If we do not ensure the Web Thread has been run, the callback can be done on a WebView that no longer exists. 1234 // To avoid this, _waitForWebThread dispatches a call to the WebThread event loop, actively processing the delegate 1235 // callbacks in the main thread while waiting for the call to be invoked on the Web Thread. 1236 - (void)_waitForWebThread 1237 { 1238 ASSERT(!WebThreadIsCurrent()); 1239 _hasFlushedWebThreadRunQueue = NO; 1240 WebThreadRun(^{ 1241 [self _webThreadInvoked]; 1242 }); 1243 while (!_hasFlushedWebThreadRunQueue) { 1244 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 1245 [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]]; 1246 [pool release]; 1247 } 1248 } 1249 1250 @end 1251 #endif 929 1252 930 1253 int DumpRenderTreeMain(int argc, const char *argv[]) 931 1254 { 1255 #if PLATFORM(IOS) 1256 _UIApplicationLoadWebKit(); 1257 #endif 932 1258 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 933 1259 934 1260 setDefaultsToConsistentValuesForTesting(); // Must be called before NSApplication initialization. 935 1261 1262 #if !PLATFORM(IOS) 936 1263 [DumpRenderTreeApplication sharedApplication]; // Force AppKit to init itself 937 1264 938 1265 dumpRenderTree(argc, argv); 1266 #else 1267 _argc = argc; 1268 _argv = argv; 1269 UIApplicationMain(argc, (char**)argv, @"DumpRenderTree", nil); 1270 #endif 939 1271 [WebCoreStatistics garbageCollectJavaScriptObjects]; 940 1272 [WebCoreStatistics emptyCache]; // Otherwise SVGImages trigger false positives for Frame/Node counts … … 1039 1371 static NSData *dumpFrameAsPDF(WebFrame *frame) 1040 1372 { 1373 #if !PLATFORM(IOS) 1041 1374 if (!frame) 1042 1375 return nil; … … 1068 1401 1069 1402 return pdfData; 1403 #else 1404 return nil; 1405 #endif 1070 1406 } 1071 1407 … … 1134 1470 for (unsigned i = 0; i < count; i++) { 1135 1471 NSWindow *window = (NSWindow *)CFArrayGetValueAtIndex(openWindows, i); 1472 #if !PLATFORM(IOS) 1136 1473 WebView *webView = [[[window contentView] subviews] objectAtIndex:0]; 1474 #else 1475 ASSERT([[window contentView] isKindOfClass:[WebView class]]); 1476 WebView *webView = (WebView *)[window contentView]; 1477 #endif 1137 1478 dumpBackForwardListForWebView(webView); 1138 1479 } … … 1163 1504 void dump() 1164 1505 { 1506 #if PLATFORM(IOS) 1507 // This can get called on the web thread if from a JavaScript notifyDone(). 1508 if (WebThreadIsCurrent()) { 1509 [(DumpRenderTree *)UIApp _deferDumpToMainThread]; 1510 return; 1511 } 1512 WebThreadLock(); 1513 #endif 1514 1165 1515 invalidateAnyPreviousWaitToDumpWatchdog(); 1166 1516 ASSERT(!gTestRunner->hasPendingWebNotificationClick()); … … 1265 1615 } 1266 1616 1617 #if PLATFORM(IOS) 1618 static bool shouldMakeViewportFlexible(const char* pathOrURL) 1619 { 1620 return strstr(pathOrURL, "viewport/"); 1621 } 1622 #endif 1623 1267 1624 static void resetWebViewToConsistentStateBeforeTesting() 1268 1625 { 1269 1626 WebView *webView = [mainFrame webView]; 1627 #if PLATFORM(IOS) 1628 adjustWebDocumentForStandardViewport(gWebBrowserView, gWebScrollView); 1629 [webView _setAllowsMessaging:YES]; 1630 [mainFrame setMediaDataLoadsAutomatically:YES]; 1631 #endif 1270 1632 [webView setEditable:NO]; 1271 1633 [(EditingDelegate *)[webView editingDelegate] setAcceptsEditing:YES]; … … 1273 1635 [webView resetPageZoom:nil]; 1274 1636 [webView _scaleWebView:1.0 atOrigin:NSZeroPoint]; 1637 #if !PLATFORM(IOS) 1275 1638 [webView _setCustomBackingScaleFactor:0]; 1639 #endif 1276 1640 [webView setTabKeyCyclesThroughElements:YES]; 1277 1641 [webView setPolicyDelegate:defaultPolicyDelegate]; … … 1279 1643 [policyDelegate setControllerToNotifyDone:0]; 1280 1644 [frameLoadDelegate resetToConsistentState]; 1645 #if !PLATFORM(IOS) 1281 1646 [webView _setDashboardBehavior:WebDashboardBehaviorUseBackwardCompatibilityMode to:NO]; 1647 #endif 1282 1648 [webView _clearMainFrameName]; 1283 1649 [[webView undoManager] removeAllActions]; 1284 1650 [WebView _removeAllUserContentFromGroup:[webView groupName]]; 1651 #if !PLATFORM(IOS) 1285 1652 [[webView window] setAutodisplay:NO]; 1653 #endif 1286 1654 [webView setTracksRepaints:NO]; 1287 1655 … … 1298 1666 } 1299 1667 1668 #if !PLATFORM(IOS) 1300 1669 [webView setContinuousSpellCheckingEnabled:YES]; 1301 1670 [webView setAutomaticQuoteSubstitutionEnabled:NO]; … … 1307 1676 1308 1677 [WebView _setUsesTestModeFocusRingColor:YES]; 1678 #endif 1309 1679 [WebView _resetOriginAccessWhitelists]; 1310 1680 [WebView _setAllowsRoundingHacks:NO]; … … 1313 1683 [[MockWebNotificationProvider shared] reset]; 1314 1684 1685 #if !PLATFORM(IOS) 1315 1686 // Clear the contents of the general pasteboard 1316 1687 [[NSPasteboard generalPasteboard] declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:nil]; 1688 #endif 1317 1689 1318 1690 [mainFrame _clearOpener]; 1319 1691 } 1692 1693 #if PLATFORM(IOS) 1694 // Work around <rdar://problem/9909073> WebKit's method of calling delegates on 1695 // the main thread is not thread safe. If the web thread is attempting to call 1696 // out to a delegate method on the main thread, we want to spin the main thread 1697 // run loop until the delegate method completes before taking the web thread 1698 // lock to prevent potentially re-entering WebCore. 1699 static void WebThreadLockAfterDelegateCallbacksHaveCompleted() 1700 { 1701 dispatch_semaphore_t delegateSemaphore = dispatch_semaphore_create(0); 1702 WebThreadRun(^{ 1703 dispatch_semaphore_signal(delegateSemaphore); 1704 }); 1705 1706 while (dispatch_semaphore_wait(delegateSemaphore, DISPATCH_TIME_NOW)) { 1707 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 1708 [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]]; 1709 [pool release]; 1710 } 1711 1712 WebThreadLock(); 1713 1714 dispatch_release(delegateSemaphore); 1715 } 1716 #endif 1320 1717 1321 1718 static void runTest(const string& inputLine) … … 1349 1746 gTestRunner = TestRunner::create(testURL, command.expectedPixelHash); 1350 1747 topLoadingFrame = nil; 1748 #if !PLATFORM(IOS) 1351 1749 ASSERT(!draggingInfo); // the previous test should have called eventSender.mouseUp to drop! 1352 1750 releaseAndZero(&draggingInfo); 1751 #endif 1353 1752 done = NO; 1354 1753 … … 1376 1775 } 1377 1776 1777 #if PLATFORM(IOS) 1778 if (shouldMakeViewportFlexible(pathOrURL.c_str())) 1779 adjustWebDocumentForFlexibleViewport(gWebBrowserView, gWebScrollView); 1780 #endif 1781 1378 1782 if ([WebHistory optionalSharedHistory]) 1379 1783 [WebHistory setOptionalSharedHistory:nil]; … … 1401 1805 } 1402 1806 1807 #if PLATFORM(IOS) 1808 [(DumpRenderTree *)UIApp _waitForWebThread]; 1809 WebThreadLockAfterDelegateCallbacksHaveCompleted(); 1810 #endif 1403 1811 pool = [[NSAutoreleasePool alloc] init]; 1404 1812 [EventSendingController clearSavedEvents]; … … 1418 1826 continue; 1419 1827 1828 #if !PLATFORM(IOS) 1420 1829 WebView *webView = [[[window contentView] subviews] objectAtIndex:0]; 1830 #else 1831 ASSERT([[window contentView] isKindOfClass:[WebView class]]); 1832 WebView *webView = (WebView *)[window contentView]; 1833 #endif 1421 1834 1422 1835 [webView close]; … … 1454 1867 void displayWebView() 1455 1868 { 1869 #if !PLATFORM(IOS) 1456 1870 WebView *webView = [mainFrame webView]; 1457 1871 [webView display]; … … 1459 1873 [webView setTracksRepaints:YES]; 1460 1874 [webView resetTrackedRepaints]; 1461 } 1462 1875 #else 1876 // FIXME: <rdar://problem/5106253> DumpRenderTree: fix DRT and ImageDiff to re-enable pixel tests 1877 [gDrtWindow layoutTilesNow]; 1878 [gDrtWindow setNeedsDisplayInRect:[gDrtWindow frame]]; 1879 [CATransaction flush]; 1880 #endif 1881 } 1882 1883 #if !PLATFORM(IOS) 1463 1884 @implementation DumpRenderTreeEvent 1464 1885 … … 1479 1900 1480 1901 @end 1902 #endif -
trunk/Tools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.h
r25566 r162817 27 27 */ 28 28 29 #if !PLATFORM(IOS) 30 29 31 #import <Cocoa/Cocoa.h> 30 32 … … 52 54 @end 53 55 56 #endif -
trunk/Tools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm
r154314 r162817 29 29 #import "config.h" 30 30 #import "DumpRenderTreeDraggingInfo.h" 31 32 #if !PLATFORM(IOS) 31 33 32 34 #import "DumpRenderTree.h" … … 143 145 @end 144 146 147 #endif // !PLATFORM(IOS) -
trunk/Tools/DumpRenderTree/mac/DumpRenderTreeMac.h
r162573 r162817 31 31 32 32 #include <CoreFoundation/CoreFoundation.h> 33 #if PLATFORM(IOS) && defined(__OBJC__) 34 #import <UIKit/UIKit.h> 35 #endif 36 33 37 34 38 #ifdef __OBJC__ … … 70 74 unsigned worldIDForWorld(WebScriptWorld *); 71 75 76 77 #if PLATFORM(IOS) && defined(__OBJC__) 78 @interface DumpRenderTree : UIApplication { 79 BOOL _hasFlushedWebThreadRunQueue; 80 } 81 82 - (void)_waitForWebThread; 83 @end 84 85 @class UIWebBrowserView; 86 extern UIWebBrowserView *gWebBrowserView; 87 #endif 88 72 89 int DumpRenderTreeMain(int, const char *[]); 73 90 -
trunk/Tools/DumpRenderTree/mac/DumpRenderTreePasteboard.h
r32995 r162817 29 29 */ 30 30 31 #if !PLATFORM(IOS) 32 31 33 #import <AppKit/AppKit.h> 32 34 #import <WebKit/WebTypesInternal.h> … … 37 39 @end 38 40 41 #endif -
trunk/Tools/DumpRenderTree/mac/DumpRenderTreePasteboard.m
r154647 r162817 33 33 #import "DumpRenderTreePasteboard.h" 34 34 35 #if !PLATFORM(IOS) 36 35 37 #import <WebKit/WebTypesInternal.h> 36 38 … … 213 215 214 216 @end 217 218 #endif // !PLATFORM(IOS) -
trunk/Tools/DumpRenderTree/mac/DumpRenderTreeWindow.h
r156724 r162817 29 29 */ 30 30 31 #if !PLATFORM(IOS) 31 32 #import <AppKit/AppKit.h> 33 #else 34 #import <UIKit/UIKit.h> 35 #import <UIKit/UIWebBrowserView.h> 36 #import <WebKit/WAKWindow.h> 37 #endif 32 38 33 39 @class WebView; … … 36 42 { 37 43 } 44 45 #if PLATFORM(IOS) 46 @property (nonatomic, retain) UIWindow *uiWindow; 47 @property (nonatomic, retain) UIWebBrowserView *browserView; 48 #endif 38 49 39 50 // I'm not sure why we can't just use [NSApp windows] -
trunk/Tools/DumpRenderTree/mac/DumpRenderTreeWindow.mm
r156724 r162817 37 37 #import "TestRunner.h" 38 38 #import <WebKit/WebViewPrivate.h> 39 #import <WebKit/WebTypesInternal.h> 39 40 #if PLATFORM(IOS) 41 #import <QuartzCore/CALayer.h> 42 #endif 40 43 41 44 CFMutableArrayRef openWindowsRef = 0; … … 51 54 @implementation DumpRenderTreeWindow 52 55 56 #if PLATFORM(IOS) 57 @synthesize uiWindow = _uiWindow; 58 @synthesize browserView = _browserView; 59 #endif 60 53 61 + (NSArray *)openWindows 54 62 { … … 56 64 } 57 65 58 - ( id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)styleMask backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation66 - (void)_addToOpenWindows 59 67 { 60 68 if (!openWindowsRef) … … 62 70 63 71 CFArrayAppendValue(openWindowsRef, self); 64 72 } 73 74 #if !PLATFORM(IOS) 75 - (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)styleMask backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation 76 { 77 [self _addToOpenWindows]; 65 78 return [super initWithContentRect:contentRect styleMask:styleMask backing:bufferingType defer:deferCreation]; 66 79 } 80 #else 81 - (id)initWithLayer:(CALayer *)layer 82 { 83 if ((self = [super initWithLayer:layer])) 84 [self _addToOpenWindows]; 85 86 return self; 87 } 88 89 - (void)dealloc 90 { 91 ASSERT(!_browserView); 92 ASSERT(!_uiWindow); 93 [super dealloc]; 94 } 95 #endif 67 96 68 97 - (void)close … … 76 105 77 106 [super close]; 107 108 #if PLATFORM(IOS) 109 // By default, NSWindows are released when closed. On iOS we do 110 // it manually, and release the UIWindow and UIWebBrowserView. 111 if (_uiWindow) { 112 [_uiWindow release]; 113 _uiWindow = nil; 114 [_browserView release]; 115 _browserView = nil; 116 [self release]; 117 } 118 #endif 78 119 } 79 120 … … 88 129 } 89 130 131 #if !PLATFORM(IOS) 90 132 - (void)keyDown:(NSEvent *)event 91 133 { … … 93 135 // once we get to the end of the responder chain. 94 136 } 137 #endif 95 138 96 139 - (WebView *)webView 97 140 { 141 #if !PLATFORM(IOS) 98 142 NSView *firstView = nil; 99 143 if ([[[self contentView] subviews] count] > 0) { … … 103 147 } 104 148 return nil; 149 #else 150 ASSERT([[self contentView] isKindOfClass:[WebView class]]); 151 return (WebView *)[self contentView]; 152 #endif 105 153 } 106 154 … … 114 162 - (void)webViewStartedAcceleratedCompositing:(NSNotification *)notification 115 163 { 164 #if !PLATFORM(IOS) 116 165 // If the WebView has gone into compositing mode, turn on window autodisplay. This is necessary for CA 117 166 // to update layers and start animations. … … 119 168 if ([[self webView] _isUsingAcceleratedCompositing]) 120 169 [self setAutodisplay:YES]; 170 #endif 121 171 } 122 172 -
trunk/Tools/DumpRenderTree/mac/EditingDelegate.h
r25566 r162817 27 27 */ 28 28 29 #import < Cocoa/Cocoa.h>29 #import <Foundation/Foundation.h> 30 30 31 31 @interface EditingDelegate : NSObject -
trunk/Tools/DumpRenderTree/mac/EventSendingController.h
r39377 r162817 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 29 #import < Cocoa/Cocoa.h>28 29 #import <Foundation/Foundation.h> 30 30 #import <WebKit/WebKit.h> 31 31 … … 38 38 int eventNumber; 39 39 double timeOffset; 40 #if PLATFORM(IOS) 41 NSMutableArray* touches; 42 unsigned currentTouchIdentifier; 43 unsigned nextEventFlags; 44 #endif 40 45 } 41 46 -
trunk/Tools/DumpRenderTree/mac/EventSendingController.mm
r156740 r162817 37 37 #import "DumpRenderTreeFileDraggingSource.h" 38 38 39 #import <Carbon/Carbon.h> // for GetCurrentEventTime()40 39 #import <WebKit/DOMPrivate.h> 41 40 #import <WebKit/WebKit.h> 42 41 #import <WebKit/WebViewPrivate.h> 43 42 43 #if !PLATFORM(IOS) 44 #import <Carbon/Carbon.h> // for GetCurrentEventTime() 45 #endif 46 47 #if PLATFORM(IOS) 48 #import <GraphicsServices/GraphicsServices.h> // for GSCurrentEventTimestamp() 49 #import <WebKit/KeyEventCodesIOS.h> 50 #import <WebKit/WAKWindow.h> 51 #import <WebKit/WebEvent.h> 52 #import <UIKit/UIKit.h> 53 #endif 54 55 #if !PLATFORM(IOS) 44 56 extern "C" void _NSNewKillRingSequence(); 45 57 … … 47 59 - (void)_setCurrentEvent:(NSEvent *)event; 48 60 @end 61 #endif 49 62 50 63 enum MouseAction { … … 75 88 NSMutableArray *savedMouseEvents; // mouse events sent between mouseDown and mouseUp are stored here, and then executed at once. 76 89 BOOL replayingSavedEvents; 90 91 92 #if PLATFORM(IOS) 93 @interface SyntheticTouch : NSObject { 94 @public 95 CGPoint _location; 96 UITouchPhase _phase; 97 unsigned _identifier; 98 }; 99 100 @property (nonatomic) CGPoint location; 101 @property (nonatomic) UITouchPhase phase; 102 @property (nonatomic) unsigned identifier; 103 104 + (id)touchWithLocation:(CGPoint)location phase:(UITouchPhase)phase identifier:(unsigned)identifier; 105 - (id)initWithLocation:(CGPoint)location phase:(UITouchPhase)phase identifier:(unsigned)identifier; 106 @end 107 108 @implementation SyntheticTouch 109 110 @synthesize location = _location; 111 @synthesize phase = _phase; 112 @synthesize identifier = _identifier; 113 114 + (id)touchWithLocation:(CGPoint)location phase:(UITouchPhase)phase identifier:(unsigned)identifier 115 { 116 return [[[SyntheticTouch alloc] initWithLocation:location phase:phase identifier:identifier] autorelease]; 117 } 118 119 - (id)initWithLocation:(CGPoint)location phase:(UITouchPhase)phase identifier:(unsigned)identifier 120 { 121 if ((self = [super init])) { 122 _location = location; 123 _phase = phase; 124 _identifier = identifier; 125 } 126 return self; 127 } 128 @end // SyntheticTouch 129 #endif 77 130 78 131 @implementation EventSendingController … … 150 203 || aSelector == @selector(scalePageBy:atX:andY:) 151 204 || aSelector == @selector(mouseScrollByX:andY:) 152 || aSelector == @selector(continuousMouseScrollByX:andY:)) 205 || aSelector == @selector(continuousMouseScrollByX:andY:) 206 #if PLATFORM(IOS) 207 || aSelector == @selector(addTouchAtX:y:) 208 || aSelector == @selector(updateTouchAtIndex:x:y:) 209 || aSelector == @selector(cancelTouchAtIndex:) 210 || aSelector == @selector(clearTouchPoints) 211 || aSelector == @selector(markAllTouchesAsStationary) 212 || aSelector == @selector(releaseTouchAtIndex:) 213 || aSelector == @selector(setTouchModifier:value:) 214 || aSelector == @selector(touchStart) 215 || aSelector == @selector(touchMove) 216 || aSelector == @selector(touchEnd) 217 || aSelector == @selector(touchCancel) 218 #endif 219 ) 153 220 return NO; 154 221 return YES; … … 192 259 if (aSelector == @selector(scalePageBy:atX:andY:)) 193 260 return @"scalePageBy"; 261 #if PLATFORM(IOS) 262 if (aSelector == @selector(addTouchAtX:y:)) 263 return @"addTouchPoint"; 264 if (aSelector == @selector(updateTouchAtIndex:x:y:)) 265 return @"updateTouchPoint"; 266 if (aSelector == @selector(cancelTouchAtIndex:)) 267 return @"cancelTouchPoint"; 268 if (aSelector == @selector(clearTouchPoints)) 269 return @"clearTouchPoints"; 270 if (aSelector == @selector(markAllTouchesAsStationary)) 271 return @"markAllTouchesAsStationary"; 272 if (aSelector == @selector(releaseTouchAtIndex:)) 273 return @"releaseTouchPoint"; 274 if (aSelector == @selector(setTouchModifier:value:)) 275 return @"setTouchModifier"; 276 if (aSelector == @selector(touchStart)) 277 return @"touchStart"; 278 if (aSelector == @selector(touchMove)) 279 return @"touchMove"; 280 if (aSelector == @selector(touchEnd)) 281 return @"touchEnd"; 282 if (aSelector == @selector(touchCancel)) 283 return @"touchCancel"; 284 #endif 194 285 return nil; 195 286 } … … 205 296 - (void)dealloc 206 297 { 298 #if PLATFORM(IOS) 299 [touches release]; 300 #endif 207 301 [super dealloc]; 208 302 } … … 210 304 - (double)currentEventTime 211 305 { 306 #if !PLATFORM(IOS) 212 307 return GetCurrentEventTime() + timeOffset; 308 #else 309 return GSCurrentEventTimestamp() + timeOffset; 310 #endif 213 311 } 214 312 … … 231 329 - (void)clearKillRing 232 330 { 331 #if !PLATFORM(IOS) 233 332 _NSNewKillRingSequence(); 234 } 235 333 #endif 334 } 335 336 #if !PLATFORM(IOS) 236 337 static NSEventType eventTypeForMouseButtonAndAction(int button, MouseAction action) 237 338 { … … 299 400 leftMouseButtonDown = YES; // Make the rest of eventSender think a drag is in progress 300 401 } 402 #endif // !PLATFORM(IOS) 301 403 302 404 - (void)updateClickCountForButton:(int)buttonNumber … … 313 415 static int modifierFlags(const NSString* modifierName) 314 416 { 417 #if !PLATFORM(IOS) 418 const int controlKeyMask = NSControlKeyMask; 419 const int shiftKeyMask = NSShiftKeyMask; 420 const int alternateKeyMask = NSAlternateKeyMask; 421 const int commandKeyMask = NSCommandKeyMask; 422 #else 423 const int controlKeyMask = WebEventFlagMaskControl; 424 const int shiftKeyMask = WebEventFlagMaskShift; 425 const int alternateKeyMask = WebEventFlagMaskAlternate; 426 const int commandKeyMask = WebEventFlagMaskCommand; 427 #endif 428 315 429 int flags = 0; 316 430 if ([modifierName isEqual:@"ctrlKey"]) 317 flags |= NSControlKeyMask;431 flags |= controlKeyMask; 318 432 else if ([modifierName isEqual:@"shiftKey"] || [modifierName isEqual:@"rangeSelectionKey"]) 319 flags |= NSShiftKeyMask;433 flags |= shiftKeyMask; 320 434 else if ([modifierName isEqual:@"altKey"]) 321 flags |= NSAlternateKeyMask;435 flags |= alternateKeyMask; 322 436 else if ([modifierName isEqual:@"metaKey"] || [modifierName isEqual:@"addSelectionKey"]) 323 flags |= NSCommandKeyMask;437 flags |= commandKeyMask; 324 438 325 439 return flags; … … 345 459 [self updateClickCountForButton:buttonNumber]; 346 460 461 #if !PLATFORM(IOS) 347 462 NSEventType eventType = eventTypeForMouseButtonAndAction(buttonNumber, MouseDown); 348 463 NSEvent *event = [NSEvent mouseEventWithType:eventType … … 355 470 clickCount:clickCount 356 471 pressure:0.0]; 472 #else 473 WebEvent *event = [[WebEvent alloc] initWithMouseEventType:WebEventMouseDown 474 timeStamp:[self currentEventTime] 475 location:lastMousePosition]; 476 #endif 357 477 358 478 NSView *subView = [[mainFrame webView] hitTest:[event locationInWindow]]; 359 479 if (subView) { 480 #if !PLATFORM(IOS) 360 481 [NSApp _setCurrentEvent:event]; 482 #endif 361 483 [subView mouseDown:event]; 484 #if !PLATFORM(IOS) 362 485 [NSApp _setCurrentEvent:nil]; 486 #endif 363 487 if (buttonNumber == LeftMouseButton) 364 488 leftMouseButtonDown = YES; 365 489 } 490 491 #if PLATFORM(IOS) 492 [event release]; 493 #endif 366 494 } 367 495 … … 393 521 - (void)scalePageBy:(float)scale atX:(float)x andY:(float)y 394 522 { 523 #if !PLATFORM(IOS) 524 // -[WebView _scaleWebView:] is Mac-specific API, and calls functions that 525 // assert to not be used in iOS. 395 526 [[mainFrame webView] _scaleWebView:scale atOrigin:NSMakePoint(x, y)]; 527 #endif 396 528 } 397 529 … … 412 544 413 545 [[[mainFrame frameView] documentView] layout]; 546 #if !PLATFORM(IOS) 414 547 NSEventType eventType = eventTypeForMouseButtonAndAction(buttonNumber, MouseUp); 415 548 NSEvent *event = [NSEvent mouseEventWithType:eventType … … 422 555 clickCount:clickCount 423 556 pressure:0.0]; 557 #else 558 WebEvent *event = [[WebEvent alloc] initWithMouseEventType:WebEventMouseUp 559 timeStamp:[self currentEventTime] 560 location:lastMousePosition]; 561 #endif 424 562 425 563 NSView *targetView = [[mainFrame webView] hitTest:[event locationInWindow]]; … … 429 567 targetView = targetView ? targetView : [[mainFrame frameView] documentView]; 430 568 assert(targetView); 569 #if !PLATFORM(IOS) 431 570 [NSApp _setCurrentEvent:event]; 571 #endif 432 572 [targetView mouseUp:event]; 573 #if !PLATFORM(IOS) 433 574 [NSApp _setCurrentEvent:nil]; 575 #endif 434 576 if (buttonNumber == LeftMouseButton) 435 577 leftMouseButtonDown = NO; 436 578 lastClick = [event timestamp]; 437 579 lastClickPosition = lastMousePosition; 580 #if !PLATFORM(IOS) 438 581 if (draggingInfo) { 439 582 WebView *webView = [mainFrame webView]; … … 451 594 draggingInfo = nil; 452 595 } 596 #endif 597 598 #if PLATFORM(IOS) 599 [event release]; 600 #endif 453 601 } 454 602 … … 472 620 473 621 NSView *view = [mainFrame webView]; 622 #if !PLATFORM(IOS) 474 623 lastMousePosition = [view convertPoint:NSMakePoint(x, [view frame].size.height - y) toView:nil]; 475 624 NSEvent *event = [NSEvent mouseEventWithType:(leftMouseButtonDown ? NSLeftMouseDragged : NSMouseMoved) … … 482 631 clickCount:(leftMouseButtonDown ? clickCount : 0) 483 632 pressure:0.0]; 633 #else 634 lastMousePosition = [view convertPoint:NSMakePoint(x, y) toView:nil]; 635 WebEvent *event = [[WebEvent alloc] initWithMouseEventType:WebEventMouseMoved 636 timeStamp:[self currentEventTime] 637 location:lastMousePosition]; 638 #endif // !PLATFORM(IOS) 484 639 485 640 NSView *subView = [[mainFrame webView] hitTest:[event locationInWindow]]; 486 641 if (subView) { 642 #if !PLATFORM(IOS) 487 643 [NSApp _setCurrentEvent:event]; 644 #endif 488 645 if (leftMouseButtonDown) { 646 #if !PLATFORM(IOS) 489 647 if (draggingInfo) { 490 648 // Per NSDragging.h: draggingSources may not implement draggedImage:movedTo: … … 494 652 } else 495 653 [subView mouseDragged:event]; 654 #endif 496 655 } else 497 656 [subView mouseMoved:event]; 657 #if !PLATFORM(IOS) 498 658 [NSApp _setCurrentEvent:nil]; 499 } 659 #endif 660 } 661 662 #if PLATFORM(IOS) 663 [event release]; 664 #endif 500 665 } 501 666 502 667 - (void)mouseScrollByX:(int)x andY:(int)y continuously:(BOOL)c 503 668 { 669 #if !PLATFORM(IOS) 504 670 CGScrollEventUnit unit = c?kCGScrollEventUnitPixel:kCGScrollEventUnitLine; 505 671 CGEventRef cgScrollEvent = CGEventCreateScrollWheelEvent(NULL, unit, 2, y, x); … … 521 687 [NSApp _setCurrentEvent:nil]; 522 688 } 689 #endif 523 690 } 524 691 … … 535 702 - (NSArray *)contextClick 536 703 { 704 #if !PLATFORM(IOS) 537 705 [[[mainFrame frameView] documentView] layout]; 538 706 [self updateClickCountForButton:RightMouseButton]; … … 569 737 570 738 return menuItemStrings; 739 #else 740 return nil; 741 #endif 571 742 } 572 743 … … 768 939 769 940 if ([character length] == 1 && [character characterAtIndex:0] >= 'A' && [character characterAtIndex:0] <= 'Z') { 941 #if !PLATFORM(IOS) 770 942 modifierFlags |= NSShiftKeyMask; 943 #else 944 modifierFlags |= WebEventFlagMaskAlphaShift; 945 #endif 771 946 charactersIgnoringModifiers = [character lowercaseString]; 772 947 } … … 779 954 [[[mainFrame frameView] documentView] layout]; 780 955 956 #if !PLATFORM(IOS) 781 957 NSEvent *event = [NSEvent keyEventWithType:NSKeyDown 782 958 location:NSMakePoint(5, 5) … … 789 965 isARepeat:NO 790 966 keyCode:keyCode]; 791 967 #else 968 WebEvent *event = [[WebEvent alloc] initWithKeyEventType:WebEventKeyDown 969 timeStamp:[self currentEventTime] 970 characters:eventCharacter 971 charactersIgnoringModifiers:charactersIgnoringModifiers 972 modifiers:(WebEventFlags)modifierFlags 973 isRepeating:NO 974 isPopupVariant:NO 975 keyCode:[character characterAtIndex:0] 976 isTabKey:([character characterAtIndex:0] == '\t') 977 characterSet:WebEventCharacterSetASCII]; 978 #endif 979 980 #if !PLATFORM(IOS) 792 981 [NSApp _setCurrentEvent:event]; 982 #endif 793 983 [[[[mainFrame webView] window] firstResponder] keyDown:event]; 984 #if !PLATFORM(IOS) 794 985 [NSApp _setCurrentEvent:nil]; 795 986 #endif 987 988 #if !PLATFORM(IOS) 796 989 event = [NSEvent keyEventWithType:NSKeyUp 797 990 location:NSMakePoint(5, 5) … … 804 997 isARepeat:NO 805 998 keyCode:keyCode]; 806 999 #else 1000 [event release]; 1001 event = [[WebEvent alloc] initWithKeyEventType:WebEventKeyUp 1002 timeStamp:[self currentEventTime] 1003 characters:eventCharacter 1004 charactersIgnoringModifiers:charactersIgnoringModifiers 1005 modifiers:(WebEventFlags)modifierFlags 1006 isRepeating:NO 1007 isPopupVariant:NO 1008 keyCode:[character characterAtIndex:0] 1009 isTabKey:([character characterAtIndex:0] == '\t') 1010 characterSet:WebEventCharacterSetASCII]; 1011 #endif 1012 1013 #if !PLATFORM(IOS) 807 1014 [NSApp _setCurrentEvent:event]; 1015 #endif 808 1016 [[[[mainFrame webView] window] firstResponder] keyUp:event]; 1017 #if !PLATFORM(IOS) 809 1018 [NSApp _setCurrentEvent:nil]; 1019 #endif 1020 1021 #if PLATFORM(IOS) 1022 [event release]; 1023 #endif 810 1024 } 811 1025 … … 979 1193 } 980 1194 1195 #if PLATFORM(IOS) 1196 - (void)addTouchAtX:(int)x y:(int)y 1197 { 1198 if (!touches) 1199 touches = [[NSMutableArray alloc] init]; 1200 1201 [touches addObject:[SyntheticTouch touchWithLocation:CGPointMake(x, y) phase:UITouchPhaseBegan identifier:currentTouchIdentifier++]]; 1202 } 1203 1204 - (void)cancelTouchAtIndex:(unsigned)index 1205 { 1206 if (index < [touches count]) 1207 [[touches objectAtIndex:index] setPhase:UITouchPhaseCancelled]; 1208 } 1209 1210 - (void)clearTouchPoints 1211 { 1212 [touches removeAllObjects]; 1213 } 1214 1215 - (void)releaseTouchAtIndex:(unsigned)index 1216 { 1217 if (index < [touches count]) { 1218 SyntheticTouch *touch = [touches objectAtIndex:index]; 1219 [touch setPhase:UITouchPhaseEnded]; 1220 } 1221 } 1222 1223 - (void)markAllTouchesAsStationary 1224 { 1225 for (SyntheticTouch *touch in touches) 1226 [touch setPhase:UITouchPhaseStationary]; 1227 } 1228 1229 - (void)updateTouchAtIndex:(unsigned)index x:(int)x y:(int)y 1230 { 1231 if (index < [touches count]) { 1232 SyntheticTouch *touch = [touches objectAtIndex:index]; 1233 [touch setPhase:UITouchPhaseMoved]; 1234 [touch setLocation:CGPointMake(x, y)]; 1235 } 1236 } 1237 1238 - (void)setTouchModifier:(NSString*)modifierName value:(BOOL)flag 1239 { 1240 unsigned modifier = 0; 1241 1242 if ([modifierName isEqualToString:@"alt"]) 1243 modifier = WebEventFlagMaskAlternate; 1244 else if ([modifierName isEqualToString:@"shift"]) 1245 modifier = WebEventFlagMaskShift; 1246 else if ([modifierName isEqualToString:@"meta"]) 1247 modifier = WebEventFlagMaskCommand; 1248 else if ([modifierName isEqualToString:@"ctrl"]) 1249 modifier = WebEventFlagMaskControl; 1250 1251 if (!modifier) 1252 return; 1253 1254 if (flag) 1255 nextEventFlags |= modifier; 1256 else 1257 nextEventFlags &= ~modifier; 1258 } 1259 1260 - (void)sentTouchEventOfType:(WebEventType)type 1261 { 1262 NSMutableArray *touchLocations = [[NSMutableArray alloc] initWithCapacity:[touches count]]; 1263 NSMutableArray *touchIdentifiers = [[NSMutableArray alloc] initWithCapacity:[touches count]]; 1264 NSMutableArray *touchPhases = [[NSMutableArray alloc] initWithCapacity:[touches count]]; 1265 1266 CGPoint centroid = CGPointZero; 1267 NSUInteger touchesDownCount = 0; 1268 1269 for (SyntheticTouch *currTouch in touches) { 1270 [touchLocations addObject:[NSValue valueWithCGPoint:currTouch.location]]; 1271 [touchIdentifiers addObject:[NSNumber numberWithUnsignedInt:currTouch.identifier]]; 1272 [touchPhases addObject:[NSNumber numberWithUnsignedInt:currTouch.phase]]; 1273 1274 if ((currTouch.phase == UITouchPhaseEnded) || (currTouch.phase == UITouchPhaseCancelled)) 1275 continue; 1276 1277 centroid.x += currTouch.location.x; 1278 centroid.y += currTouch.location.y; 1279 1280 touchesDownCount++; 1281 } 1282 1283 if (touchesDownCount > 0) 1284 centroid = CGPointMake(centroid.x / touchesDownCount, centroid.y / touchesDownCount); 1285 else 1286 centroid = CGPointZero; 1287 1288 WebEvent *event = [[WebEvent alloc] initWithTouchEventType:type 1289 timeStamp:[self currentEventTime] 1290 location:centroid 1291 modifiers:(WebEventFlags)nextEventFlags 1292 touchCount:[touches count] 1293 touchLocations:touchLocations 1294 touchIdentifiers:touchIdentifiers 1295 touchPhases:touchPhases 1296 isGesture:(touchesDownCount > 1) 1297 gestureScale:1 1298 gestureRotation:0]; 1299 // Ensure that layout is up-to-date so that hit-testing through WAKViews works correctly. 1300 [mainFrame updateLayout]; 1301 [[[mainFrame webView] window] sendEventSynchronously:event]; 1302 [event release]; 1303 1304 [touchLocations release]; 1305 [touchIdentifiers release]; 1306 [touchPhases release]; 1307 1308 nextEventFlags = 0; 1309 } 1310 1311 - (void)touchStart 1312 { 1313 [self sentTouchEventOfType:WebEventTouchBegin]; 1314 } 1315 1316 - (void)touchMove 1317 { 1318 [self sentTouchEventOfType:WebEventTouchChange]; 1319 } 1320 1321 - (void)touchEnd 1322 { 1323 [self sentTouchEventOfType:WebEventTouchEnd]; 1324 1325 NSMutableArray *touchesToRemove = [[NSMutableArray alloc] init]; 1326 for (SyntheticTouch *currTouch in touches) { 1327 if (currTouch.phase == UITouchPhaseEnded) 1328 [touchesToRemove addObject:currTouch]; 1329 } 1330 1331 [touches removeObjectsInArray:touchesToRemove]; 1332 [touchesToRemove release]; 1333 } 1334 1335 - (void)touchCancel 1336 { 1337 [self sentTouchEventOfType:WebEventTouchCancel]; 1338 1339 NSMutableArray *touchesToRemove = [[NSMutableArray alloc] init]; 1340 for (SyntheticTouch *currTouch in touches) { 1341 if (currTouch.phase == UITouchPhaseCancelled) 1342 [touchesToRemove addObject:currTouch]; 1343 } 1344 1345 [touches removeObjectsInArray:touchesToRemove]; 1346 [touchesToRemove release]; 1347 } 1348 #endif 1349 981 1350 @end -
trunk/Tools/DumpRenderTree/mac/FrameLoadDelegate.mm
r154314 r162817 32 32 33 33 #import "AccessibilityController.h" 34 #import "AppleScriptController.h"35 34 #import "EventSendingController.h" 36 #import "Foundation/NSNotification.h"37 35 #import "GCController.h" 38 #import "TestRunner.h"39 36 #import "NavigationController.h" 40 37 #import "ObjCController.h" 41 38 #import "ObjCPlugin.h" 42 39 #import "ObjCPluginFunction.h" 40 #import "TestRunner.h" 43 41 #import "TextInputController.h" 44 42 #import "WebCoreTestSupport.h" 45 43 #import "WorkQueue.h" 46 44 #import "WorkQueueItem.h" 45 #import <Foundation/NSNotification.h> 47 46 #import <JavaScriptCore/JavaScriptCore.h> 48 47 #import <WebKitSystemInterface.h> … … 55 54 #import <WebKit/WebViewPrivate.h> 56 55 #import <wtf/Assertions.h> 56 57 #if !PLATFORM(IOS) 58 #import "AppleScriptController.h" 59 #endif 60 61 #if PLATFORM(IOS) 62 #import <WebKit/WebCoreThreadMessage.h> 63 #endif 57 64 58 65 #ifndef NSEC_PER_MSEC … … 112 119 gcController = new GCController; 113 120 accessibilityController = new AccessibilityController; 121 #if !PLATFORM(IOS) 114 122 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(webViewProgressFinishedNotification:) name:WebViewProgressFinishedNotification object:nil]; 123 #endif 115 124 } 116 125 return self; … … 119 128 - (void)dealloc 120 129 { 130 #if !PLATFORM(IOS) 121 131 [[NSNotificationCenter defaultCenter] removeObserver:self]; 132 #endif 122 133 delete gcController; 123 134 delete accessibilityController; … … 131 142 if (topLoadingFrame) 132 143 return; 144 145 #if PLATFORM(IOS) 146 WebThreadLock(); 147 #endif 133 148 134 149 // if we finish all the commands, we're ready to dump state … … 213 228 dispatch_time_t when = dispatch_time(DISPATCH_TIME_NOW, deferredWaitTime); 214 229 dispatch_after(when, dispatch_get_main_queue(), ^{ 230 #if PLATFORM(IOS) 231 WebThreadLock(); 232 #endif 215 233 [sender setDefersCallbacks:NO]; 216 234 }); … … 227 245 ASSERT(![frame provisionalDataSource]); 228 246 ASSERT([frame dataSource]); 229 230 247 gTestRunner->setWindowIsKey(true); 248 #if !PLATFORM(IOS) 231 249 NSView *documentView = [[mainFrame frameView] documentView]; 232 250 [[[mainFrame webView] window] makeFirstResponder:documentView]; 251 #endif 233 252 } 234 253 … … 316 335 // Make Old-Style controllers 317 336 337 #if !PLATFORM(IOS) 318 338 WebView *webView = [frame webView]; 339 #endif 319 340 WebScriptObject *obj = [frame windowObject]; 341 #if !PLATFORM(IOS) 320 342 AppleScriptController *asc = [[AppleScriptController alloc] initWithWebView:webView]; 321 343 [obj setValue:asc forKey:@"appleScriptController"]; 322 344 [asc release]; 345 #endif 323 346 324 347 EventSendingController *esc = [[EventSendingController alloc] init]; … … 340 363 [pluginFunction release]; 341 364 365 #if !PLATFORM(IOS) 366 // FIXME: <rdar://problem/5106287> DumpRenderTree: fix TextInputController to work with iOS and re-enable tests 342 367 TextInputController *tic = [[TextInputController alloc] initWithWebView:webView]; 343 368 [obj setValue:tic forKey:@"textInputController"]; 344 369 [tic release]; 370 #endif 345 371 } 346 372 -
trunk/Tools/DumpRenderTree/mac/HistoryDelegate.h
r48917 r162817 23 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 24 */ 25 26 #import < Cocoa/Cocoa.h>25 26 #import <Foundation/Foundation.h> 27 27 28 28 @interface HistoryDelegate : NSObject -
trunk/Tools/DumpRenderTree/mac/LayoutTestHelper.m
r157057 r162817 30 30 */ 31 31 32 #if !PLATFORM(IOS) 33 32 34 #import <AppKit/AppKit.h> 33 35 #import <ApplicationServices/ApplicationServices.h> … … 205 207 return 0; 206 208 } 209 210 #endif // !PLATFORM(IOS) 211 212 #if PLATFORM(IOS) 213 int main(int argc, char* argv[]) 214 { 215 return 0; 216 } 217 #endif -
trunk/Tools/DumpRenderTree/mac/MockGeolocationProvider.mm
r133533 r162817 26 26 #import "config.h" 27 27 #import "MockGeolocationProvider.h" 28 29 #if PLATFORM(IOS) 30 #import <WebCore/WebCoreThreadRun.h> 31 #endif 28 32 29 33 @implementation MockGeolocationProvider … … 89 93 } 90 94 95 #if PLATFORM(IOS) 96 - (void)setEnableHighAccuracy:(BOOL)enableHighAccuracy 97 { 98 UNUSED_PARAM(enableHighAccuracy); 99 } 100 101 - (void)initializeGeolocationForWebView:(WebView *)webView listener:(id<WebGeolocationProviderInitializationListener>)listener 102 { 103 [listener initializationAllowedWebView:webView provider:self]; 104 } 105 106 - (void)cancelWarmUpForWebView:(WebView *)webView 107 { 108 UNUSED_PARAM(webView); 109 } 110 111 - (void)stopTrackingWebView:(WebView *)webView 112 { 113 UNUSED_PARAM(webView); 114 } 115 #endif 116 91 117 - (void)stopTimer 92 118 { … … 102 128 HashSet<WebView*> views = _registeredViews; 103 129 for (HashSet<WebView*>::iterator iter = views.begin(); iter != views.end(); ++iter) { 130 #if !PLATFORM(IOS) 104 131 if (_hasError) 105 132 [*iter _geolocationDidFailWithMessage:_errorMessage.get()]; 106 133 else 107 134 [*iter _geolocationDidChangePosition:_lastPosition.get()]; 135 #else 136 WebView* webView = *iter; 137 WebGeolocationPosition *lastPosition = _lastPosition.get(); 138 NSString *errorMessage = _errorMessage.get(); 139 if (_hasError) { 140 WebThreadRun(^{ 141 [webView _geolocationDidFailWithMessage:errorMessage]; 142 }); 143 } else { 144 WebThreadRun(^{ 145 [webView _geolocationDidChangePosition:lastPosition]; 146 }); 147 } 148 #endif 108 149 } 109 150 } -
trunk/Tools/DumpRenderTree/mac/NavigationController.h
r25566 r162817 27 27 */ 28 28 29 #import < Cocoa/Cocoa.h>29 #import <Foundation/Foundation.h> 30 30 #import <WebKit/WebView.h> 31 31 -
trunk/Tools/DumpRenderTree/mac/ObjCPlugin.h
r29663 r162817 24 24 */ 25 25 26 #import <Cocoa/Cocoa.h> 27 26 #import <Foundation/Foundation.h> 28 27 29 28 @interface ObjCPlugin : NSObject -
trunk/Tools/DumpRenderTree/mac/ObjCPlugin.m
r135882 r162817 127 127 - (NSString *)classNameOfObject:(id)obj 128 128 { 129 return [obj className];129 return NSStringFromClass([obj class]); 130 130 } 131 131 -
trunk/Tools/DumpRenderTree/mac/ObjCPluginFunction.h
r29663 r162817 24 24 */ 25 25 26 27 #import <Cocoa/Cocoa.h> 28 26 #import <Foundation/Foundation.h> 29 27 30 28 @interface ObjCPluginFunction : NSObject -
trunk/Tools/DumpRenderTree/mac/PolicyDelegate.h
r125516 r162817 27 27 */ 28 28 29 #import < Cocoa/Cocoa.h>29 #import <Foundation/Foundation.h> 30 30 31 31 class TestRunner; -
trunk/Tools/DumpRenderTree/mac/ResourceLoadDelegate.h
r29663 r162817 27 27 */ 28 28 29 #import <Cocoa/Cocoa.h> 30 29 #import <Foundation/Foundation.h> 31 30 32 31 @interface ResourceLoadDelegate : NSObject { -
trunk/Tools/DumpRenderTree/mac/ResourceLoadDelegate.mm
r153903 r162817 33 33 #import "TestRunner.h" 34 34 #import <WebKit/WebKit.h> 35 #import <WebKit/WebTypesInternal.h>36 35 #import <WebKit/WebDataSourcePrivate.h> 37 36 #import <wtf/Assertions.h> … … 249 248 - (void)webView: (WebView *)wv plugInFailedWithError:(NSError *)error dataSource:(WebDataSource *)dataSource 250 249 { 250 #if !PLATFORM(IOS) 251 251 // The call to -display here simulates the "Plug-in not found" sheet that Safari shows. 252 252 // It is used for platform/mac/plugins/update-widget-from-style-recalc.html 253 253 [wv display]; 254 #endif 254 255 } 255 256 -
trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm
r161666 r162817 63 63 #import <WebKit/WebHistory.h> 64 64 #import <WebKit/WebHistoryPrivate.h> 65 #import <WebKit/WebIconDatabasePrivate.h>66 65 #import <WebKit/WebInspectorPrivate.h> 67 66 #import <WebKit/WebNSURLExtras.h> … … 73 72 #import <WebKit/WebSecurityOriginPrivate.h> 74 73 #import <WebKit/WebStorageManagerPrivate.h> 75 #import <WebKit/WebTypesInternal.h>76 74 #import <WebKit/WebView.h> 77 75 #import <WebKit/WebViewPrivate.h> … … 80 78 #import <wtf/RetainPtr.h> 81 79 80 #if !PLATFORM(IOS) 81 #import <WebKit/WebIconDatabasePrivate.h> 82 #endif 83 84 #if PLATFORM(IOS) 85 #import <UIKit/UIWebBrowserView.h> 86 #import <WebKit/WebCoreThread.h> 87 #import <WebKit/WebCoreThreadMessage.h> 88 #import <WebKit/WebDOMOperationsPrivate.h> 89 #endif 90 91 #if !PLATFORM(IOS) 82 92 @interface CommandValidationTarget : NSObject <NSValidatedUserInterfaceItem> 83 93 { … … 110 120 111 121 @end 122 #endif 112 123 113 124 @interface WebGeolocationPosition (Internal) … … 485 496 void TestRunner::setIconDatabaseEnabled(bool iconDatabaseEnabled) 486 497 { 498 #if ENABLE(ICON_DATABASE) 487 499 // FIXME: Workaround <rdar://problem/6480108> 488 500 static WebIconDatabase *sharedWebIconDatabase = NULL; … … 495 507 } 496 508 [sharedWebIconDatabase setEnabled:iconDatabaseEnabled]; 509 #endif 497 510 } 498 511 499 512 void TestRunner::setMainFrameIsFirstResponder(bool flag) 500 513 { 514 #if !PLATFORM(IOS) 501 515 NSView *documentView = [[mainFrame frameView] documentView]; 502 516 503 517 NSResponder *firstResponder = flag ? documentView : nil; 504 518 [[[mainFrame webView] window] makeFirstResponder:firstResponder]; 519 #endif 505 520 } 506 521 … … 547 562 void TestRunner::setAutomaticLinkDetectionEnabled(bool enabled) 548 563 { 564 #if !PLATFORM(IOS) 549 565 [[mainFrame webView] setAutomaticLinkDetectionEnabled:enabled]; 566 #endif 550 567 } 551 568 … … 554 571 [[mainFrame webView] setTabKeyCyclesThroughElements:cycles]; 555 572 } 573 574 #if PLATFORM(IOS) 575 void TestRunner::setTelephoneNumberParsingEnabled(bool enabled) 576 { 577 [[[mainFrame webView] preferences] _setTelephoneNumberParsingEnabled:enabled]; 578 } 579 580 void TestRunner::setPagePaused(bool paused) 581 { 582 [gWebBrowserView setPaused:paused]; 583 } 584 #endif 556 585 557 586 #if ENABLE(IOS_TEXT_AUTOSIZING) … … 565 594 void TestRunner::setUseDashboardCompatibilityMode(bool flag) 566 595 { 596 #if !PLATFORM(IOS) 567 597 [[mainFrame webView] _setDashboardBehavior:WebDashboardBehaviorUseBackwardCompatibilityMode to:flag]; 598 #endif 568 599 } 569 600 … … 706 737 bool TestRunner::isCommandEnabled(JSStringRef name) 707 738 { 739 #if !PLATFORM(IOS) 708 740 RetainPtr<CFStringRef> nameCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, name)); 709 741 NSString *nameNS = (NSString *)nameCF.get(); … … 726 758 return true; 727 759 return [validator validateUserInterfaceItem:target.get()]; 760 #else 761 return false; 762 #endif 728 763 } 729 764 … … 783 818 void TestRunner::showWebInspector() 784 819 { 820 #if ENABLE(INSPECTOR) 785 821 [[[mainFrame webView] inspector] show:nil]; 822 #endif 786 823 } 787 824 788 825 void TestRunner::closeWebInspector() 789 826 { 827 #if ENABLE(INSPECTOR) 790 828 [[[mainFrame webView] inspector] close:nil]; 829 #endif 791 830 } 792 831 793 832 void TestRunner::evaluateInWebInspector(long callId, JSStringRef script) 794 833 { 834 #if ENABLE(INSPECTOR) 795 835 RetainPtr<CFStringRef> scriptCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, script)); 796 836 NSString *scriptNS = (NSString *)scriptCF.get(); 797 837 [[[mainFrame webView] inspector] evaluateInFrontend:nil callId:callId script:scriptNS]; 838 #endif 798 839 } 799 840 … … 880 921 @end 881 922 923 #if PLATFORM(IOS) 924 @interface APITestDelegateIPhone : NSObject 925 { 926 TestRunner* m_layoutTestRunner; 927 JSStringRef m_utf8Data; 928 JSStringRef m_baseURL; 929 WebView *m_webView; 930 } 931 932 - (id)initWithTestRunner:(TestRunner*)layoutTestRunner utf8Data:(JSStringRef)utf8Data baseURL:(JSStringRef)baseURL; 933 - (void)run; 934 @end 935 936 @implementation APITestDelegateIPhone 937 938 - (id)initWithTestRunner:(TestRunner*)layoutTestRunner utf8Data:(JSStringRef)utf8Data baseURL:(JSStringRef)baseURL 939 { 940 self = [super init]; 941 if (!self) 942 return nil; 943 944 m_layoutTestRunner = layoutTestRunner; 945 m_utf8Data = utf8Data; 946 m_baseURL = baseURL; 947 return self; 948 } 949 950 - (void)run 951 { 952 m_layoutTestRunner->setWaitToDump(true); 953 954 RetainPtr<CFStringRef> utf8DataCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, m_utf8Data)); 955 RetainPtr<CFStringRef> baseURLCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, m_baseURL)); 956 m_utf8Data = NULL; 957 m_baseURL = NULL; 958 959 WebThreadLock(); 960 m_webView = [[WebView alloc] initWithFrame:NSZeroRect frameName:@"" groupName:@""]; 961 [m_webView setFrameLoadDelegate:self]; 962 963 [[m_webView mainFrame] loadData:[(NSString *)utf8DataCF.get() dataUsingEncoding:NSUTF8StringEncoding] MIMEType:@"text/html" textEncodingName:@"utf-8" baseURL:[NSURL URLWithString:(NSString *)baseURLCF.get()]]; 964 } 965 966 - (void)_cleanup 967 { 968 WebThreadLock(); 969 [m_webView _clearDelegates]; 970 [m_webView close]; 971 [m_webView release]; 972 973 m_layoutTestRunner->notifyDone(); 974 } 975 976 - (void)webView:(WebView *)sender didFailLoadWithError:(NSError *)error forFrame:(WebFrame *)frame 977 { 978 printf("API Test load failed\n"); 979 [self _cleanup]; 980 } 981 982 - (void)webView:(WebView *)sender didFailProvisionalLoadWithError:(NSError *)error forFrame:(WebFrame *)frame 983 { 984 printf("API Test load failed provisional\n"); 985 [self _cleanup]; 986 } 987 988 - (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame 989 { 990 printf("API Test load succeeded\n"); 991 [self _cleanup]; 992 } 993 994 @end 995 #endif 996 882 997 void TestRunner::apiTestNewWindowDataLoadBaseURL(JSStringRef utf8Data, JSStringRef baseURL) 883 998 { 999 #if PLATFORM(IOS) 1000 // On iOS this gets called via JavaScript on the WebThread. But since it creates 1001 // and closes a WebView, it should be run on the main thread. Make the switch 1002 // from the web thread to the main thread and make the test asynchronous. 1003 if (WebThreadIsCurrent()) { 1004 APITestDelegateIPhone *dispatcher = [[APITestDelegateIPhone alloc] initWithTestRunner:this utf8Data:utf8Data baseURL:baseURL]; 1005 NSInvocation *invocation = WebThreadMakeNSInvocation(dispatcher, @selector(run)); 1006 WebThreadCallDelegate(invocation); 1007 return; 1008 } 1009 #endif 1010 884 1011 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 885 1012 … … 900 1027 [pool release]; 901 1028 } 902 1029 1030 #if PLATFORM(IOS) 1031 [(DumpRenderTree *)[UIApplication sharedApplication] _waitForWebThread]; 1032 #endif 1033 903 1034 [webView close]; 904 1035 [webView release]; … … 1003 1134 void TestRunner::abortModal() 1004 1135 { 1136 #if !PLATFORM(IOS) 1005 1137 [NSApp abortModal]; 1138 #endif 1006 1139 } 1007 1140 … … 1013 1146 void TestRunner::setTextDirection(JSStringRef directionName) 1014 1147 { 1148 #if !PLATFORM(IOS) 1015 1149 if (JSStringIsEqualToUTF8CString(directionName, "ltr")) 1016 1150 [[mainFrame webView] makeBaseWritingDirectionLeftToRight:0]; … … 1019 1153 else 1020 1154 ASSERT_NOT_REACHED(); 1155 #endif 1021 1156 } 1022 1157 1023 1158 void TestRunner::addChromeInputField() 1024 1159 { 1160 #if !PLATFORM(IOS) 1025 1161 NSTextField *textField = [[NSTextField alloc] initWithFrame:NSMakeRect(0, 0, 100, 20)]; 1026 1162 textField.tag = 1; … … 1030 1166 [textField setNextKeyView:[mainFrame webView]]; 1031 1167 [[mainFrame webView] setNextKeyView:textField]; 1168 #endif 1032 1169 } 1033 1170 1034 1171 void TestRunner::removeChromeInputField() 1035 1172 { 1173 #if !PLATFORM(IOS) 1036 1174 NSView* textField = [[[[mainFrame webView] window] contentView] viewWithTag:1]; 1037 1175 if (textField) { … … 1039 1177 focusWebView(); 1040 1178 } 1179 #endif 1041 1180 } 1042 1181 1043 1182 void TestRunner::focusWebView() 1044 1183 { 1184 #if !PLATFORM(IOS) 1045 1185 [[[mainFrame webView] window] makeFirstResponder:[mainFrame webView]]; 1186 #endif 1046 1187 } 1047 1188 1048 1189 void TestRunner::setBackingScaleFactor(double backingScaleFactor) 1049 1190 { 1191 #if !PLATFORM(IOS) 1050 1192 [[mainFrame webView] _setCustomBackingScaleFactor:backingScaleFactor]; 1193 #endif 1051 1194 } 1052 1195 -
trunk/Tools/DumpRenderTree/mac/TextInputController.h
r25566 r162817 29 29 #import <Foundation/Foundation.h> 30 30 31 #if !PLATFORM(IOS) 32 // FIXME: <rdar://problem/5106287> DumpRenderTree: fix TextInputController to work with iOS and re-enable tests 33 31 34 @class WebView; 32 35 @class WebHTMLView; … … 41 44 - (id)initWithWebView:(WebView *)view; 42 45 @end 46 47 #endif -
trunk/Tools/DumpRenderTree/mac/TextInputController.m
r154803 r162817 30 30 #import "TextInputController.h" 31 31 32 #if !PLATFORM(IOS) 33 // FIXME: <rdar://problem/5106287> DumpRenderTree: fix TextInputController to work with iOS and re-enable tests 34 32 35 #import "DumpRenderTreeMac.h" 33 36 #import <AppKit/NSInputManager.h> … … 525 528 526 529 @end 530 531 #endif // !PLATFORM(IOS) -
trunk/Tools/DumpRenderTree/mac/UIDelegate.h
r81018 r162817 27 27 */ 28 28 29 #if !PLATFORM(IOS) 29 30 #import <Cocoa/Cocoa.h> 31 #else 32 #import <WebKit/WAKView.h> 33 #endif 30 34 31 35 @interface UIDelegate : NSObject { -
trunk/Tools/DumpRenderTree/mac/UIDelegate.mm
r158447 r162817 47 47 #import <wtf/Assertions.h> 48 48 49 #if !PLATFORM(IOS) 49 50 DumpRenderTreeDraggingInfo *draggingInfo = nil; 51 #endif 50 52 51 53 @implementation UIDelegate … … 81 83 - (void)modalWindowWillClose:(NSNotification *)notification 82 84 { 85 #if !PLATFORM(IOS) 83 86 [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowWillCloseNotification object:nil]; 84 87 [NSApp abortModal]; 88 #endif 85 89 } 86 90 87 91 - (void)webViewRunModal:(WebView *)sender 88 92 { 93 #if !PLATFORM(IOS) 89 94 gTestRunner->setWindowIsKey(false); 90 95 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(modalWindowWillClose:) name:NSWindowWillCloseNotification object:nil]; 91 96 [NSApp runModalForWindow:[sender window]]; 92 97 gTestRunner->setWindowIsKey(true); 98 #endif 93 99 } 94 100 … … 124 130 125 131 132 #if !PLATFORM(IOS) 126 133 - (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 127 134 { … … 131 138 [EventSendingController replaySavedEvents]; 132 139 } 140 #endif 133 141 134 142 - (void)webViewFocus:(WebView *)webView … … 273 281 - (BOOL)webView:(WebView *)webView supportsFullScreenForElement:(DOMElement*)element withKeyboard:(BOOL)withKeyboard 274 282 { 283 #if PLATFORM(IOS) 284 return NO; 285 #else 275 286 return YES; 276 } 277 287 #endif 288 } 289 290 #if ENABLE(FULLSCREEN_API) 278 291 - (void)enterFullScreenWithListener:(NSObject<WebKitFullScreenListener>*)listener 279 292 { … … 305 318 [listener webkitDidExitFullScreen]; 306 319 } 320 #endif 307 321 308 322 - (BOOL)webView:(WebView *)webView didPressMissingPluginButton:(DOMElement *)element … … 338 352 - (void)dealloc 339 353 { 354 #if !PLATFORM(IOS) 340 355 [draggingInfo release]; 341 356 draggingInfo = nil; 357 #endif 342 358 [m_pendingGeolocationPermissionListeners release]; 343 359 m_pendingGeolocationPermissionListeners = nil;
Note: See TracChangeset
for help on using the changeset viewer.