Changeset 162817 in webkit


Ignore:
Timestamp:
Jan 26, 2014 4:01:15 PM (10 years ago)
Author:
aestes@apple.com
Message:

[iOS] Upstream changes in Tools/DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=127412

Reviewed by Simon Fraser.

Source/WebKit/mac:

  • Misc/WebCoreStatistics.h: Included CGContext.h.

Tools:

Upstream all iOS changes. Added a new target called DumpRenderTree.app,
which builds the DumpRenderTree static library into an app bundle as
expected by the iOS Simulator.

  • DumpRenderTree/AccessibilityTextMarker.h:
  • DumpRenderTree/AccessibilityUIElement.h:
  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
  • DumpRenderTree/DumpRenderTreeFileDraggingSource.h:
  • DumpRenderTree/DumpRenderTreePrefix.h:
  • DumpRenderTree/PixelDumpSupport.cpp:
  • DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:
  • DumpRenderTree/TestNetscapePlugIn/PluginObject.h:
  • DumpRenderTree/TestNetscapePlugIn/PluginObjectMac.mm:
  • DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
  • DumpRenderTree/TestNetscapePlugIn/PluginTest.h:
  • DumpRenderTree/TestNetscapePlugIn/TestObject.cpp:
  • DumpRenderTree/TestNetscapePlugIn/TestObject.h:
  • DumpRenderTree/TestNetscapePlugIn/Tests/DocumentOpenInDestroyStream.cpp:
  • DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSAfterRemovingPluginElement.cpp:
  • DumpRenderTree/TestNetscapePlugIn/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp:
  • DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp:
  • DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeRemoveProperty.cpp:
  • DumpRenderTree/TestNetscapePlugIn/Tests/NullNPPGetValuePointer.cpp:
  • DumpRenderTree/TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp:
  • DumpRenderTree/TestNetscapePlugIn/Tests/PluginScriptableNPObjectInvokeDefault.cpp:
  • DumpRenderTree/TestNetscapePlugIn/main.cpp:
  • DumpRenderTree/TestRunner.cpp:
  • DumpRenderTree/TestRunner.h:
  • DumpRenderTree/cg/ImageDiffCG.cpp:
  • DumpRenderTree/cg/PixelDumpSupportCG.cpp:
  • DumpRenderTree/ios/AccessibilityControllerIOS.mm:
  • DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
  • DumpRenderTree/ios/DumpRenderTreeBrowserView.h: Added.
  • DumpRenderTree/ios/DumpRenderTreeBrowserView.mm: Added.
  • DumpRenderTree/ios/Info.plist: Added.
  • DumpRenderTree/ios/PerlSupport/DumpRenderTreeSupport.c: Added.
  • DumpRenderTree/ios/PerlSupport/DumpRenderTreeSupportPregenerated.pm: Added.
  • DumpRenderTree/ios/PerlSupport/DumpRenderTreeSupport_wrapPregenerated.c: Added.
  • DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/Changes: Added.
  • DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/IPhoneSimulatorNotification.xs: Added.
  • DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/MANIFEST: Added.
  • DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/Makefile.PL: Added.
  • DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/README: Added.
  • DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/lib/IPhoneSimulatorNotification.pm: Added.
  • DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/ppport.h: Added.
  • DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/t/IPhoneSimulatorNotification.t: Added.
  • DumpRenderTree/ios/PerlSupport/Makefile: Added.
  • DumpRenderTree/ios/PixelDumpSupportIOS.mm: Added.
  • DumpRenderTree/mac/AccessibilityNotificationHandler.mm:
  • DumpRenderTree/mac/AccessibilityTextMarkerMac.mm:
  • DumpRenderTree/mac/AppleScriptController.m:
  • DumpRenderTree/mac/Configurations/Base.xcconfig:
  • DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
  • DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig:
  • DumpRenderTree/mac/Configurations/DumpRenderTreeApp.xcconfig: Added.
  • DumpRenderTree/mac/Configurations/DumpRenderTreeLibrary.xcconfig:
  • DumpRenderTree/mac/Configurations/ImageDiff.xcconfig:
  • DumpRenderTree/mac/Configurations/LayoutTestHelper.xcconfig: Added.
  • DumpRenderTree/mac/Configurations/TestNetscapePlugIn.xcconfig:
  • DumpRenderTree/mac/DumpRenderTree.mm:
  • DumpRenderTree/mac/DumpRenderTreeDraggingInfo.h:
  • DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm:
  • DumpRenderTree/mac/DumpRenderTreeMac.h:
  • DumpRenderTree/mac/DumpRenderTreePasteboard.h:
  • DumpRenderTree/mac/DumpRenderTreePasteboard.m:
  • DumpRenderTree/mac/DumpRenderTreeWindow.h:
  • DumpRenderTree/mac/DumpRenderTreeWindow.mm:
  • DumpRenderTree/mac/EditingDelegate.h:
  • DumpRenderTree/mac/EventSendingController.h:
  • DumpRenderTree/mac/EventSendingController.mm:
  • DumpRenderTree/mac/FrameLoadDelegate.mm:
  • DumpRenderTree/mac/HistoryDelegate.h:
  • DumpRenderTree/mac/LayoutTestHelper.m:
  • DumpRenderTree/mac/MockGeolocationProvider.mm:
  • DumpRenderTree/mac/NavigationController.h:
  • DumpRenderTree/mac/ObjCPlugin.h:
  • DumpRenderTree/mac/ObjCPlugin.m:
  • DumpRenderTree/mac/ObjCPluginFunction.h:
  • DumpRenderTree/mac/PolicyDelegate.h:
  • DumpRenderTree/mac/ResourceLoadDelegate.h:
  • DumpRenderTree/mac/ResourceLoadDelegate.mm:
  • DumpRenderTree/mac/TestRunnerMac.mm:
  • DumpRenderTree/mac/TextInputController.h:
  • DumpRenderTree/mac/TextInputController.m:
  • DumpRenderTree/mac/UIDelegate.h:
  • DumpRenderTree/mac/UIDelegate.mm:
Location:
trunk
Files:
18 added
56 edited
4 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/mac/ChangeLog

    r162808 r162817  
     12014-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
    1102014-01-26  Anders Carlsson  <andersca@apple.com>
    211
  • trunk/Source/WebKit/mac/Misc/WebCoreStatistics.h

    r131564 r162817  
    2727 */
    2828
     29#import <CoreGraphics/CGContext.h>
    2930#import <Foundation/Foundation.h>
    30 
    3131#import <WebKit/WebFrame.h>
    3232
  • trunk/Tools/ChangeLog

    r162784 r162817  
     12014-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
    1952014-01-25  Darin Adler  <darin@apple.com>
    296
  • trunk/Tools/DumpRenderTree/AccessibilityTextMarker.h

    r67105 r162817  
    2929#include <JavaScriptCore/JSObjectRef.h>
    3030
    31 #if PLATFORM(MAC)
     31#if PLATFORM(MAC) && !PLATFORM(IOS)
    3232#define SUPPORTS_AX_TEXTMARKERS 1
    3333#else
     
    5959private:
    6060    static JSClassRef getJSClass();
    61 #if PLATFORM(MAC)
     61#if SUPPORTS_AX_TEXTMARKERS
    6262    RetainPtr<PlatformTextMarker> m_textMarker;
    6363#else
     
    7979private:
    8080    static JSClassRef getJSClass();
    81 #if PLATFORM(MAC)
     81#if SUPPORTS_AX_TEXTMARKERS
    8282    RetainPtr<PlatformTextMarkerRange> m_textMarkerRange;
    8383#else
  • trunk/Tools/DumpRenderTree/AccessibilityUIElement.h

    r161417 r162817  
    288288    PlatformUIElement m_element;
    289289   
     290#if PLATFORM(IOS)
     291    JSObjectRef m_notificationFunctionCallback;
     292#elif PLATFORM(MAC)
    290293    // A retained, platform specific object used to help manage notifications for this object.
    291 #if PLATFORM(MAC)
    292294    NotificationHandler m_notificationHandler;
    293295#endif
  • trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj

    r162573 r162817  
    1414                        );
    1515                        dependencies = (
     16                                A1158D6818927B240088C17B /* PBXTargetDependency */,
    1617                                2D403F211508736C005358D2 /* PBXTargetDependency */,
    1718                                A134E52D188FC09200901D06 /* PBXTargetDependency */,
     
    4445                1A5CC1F5137DD2EC00A5D7E7 /* GetURLWithJavaScriptURL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5CC1F3137DD2EC00A5D7E7 /* GetURLWithJavaScriptURL.cpp */; };
    4546                1A66C35114576A920099A115 /* ContentsScaleFactor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A66C34F14576A920099A115 /* ContentsScaleFactor.cpp */; };
    46                 1A7961071803454C00FE42CD /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A7961061803454C00FE42CD /* IOKit.framework */; };
    4747                1A8F02E80BB9B4EC008CFA34 /* TestObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8F024C0BB9B056008CFA34 /* TestObject.h */; };
    4848                1AC6C8490D07638600CD3161 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC6C77F0D07589B00CD3161 /* main.cpp */; };
     
    5555                1AD9D2FE12028409001A70D1 /* PluginScriptableNPObjectInvokeDefault.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD9D2FD12028409001A70D1 /* PluginScriptableNPObjectInvokeDefault.cpp */; };
    5656                1AFF66BC137DEFD200791696 /* GetURLNotifyWithURLThatFailsToLoad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFF66BB137DEA8300791696 /* GetURLNotifyWithURLThatFailsToLoad.cpp */; };
    57                 23BCB8900EA57623003C6289 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 23BCB88F0EA57623003C6289 /* OpenGL.framework */; };
    5857                29CFBA11122736E600BC30C0 /* AccessibilityTextMarker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29CFBA0F122736E600BC30C0 /* AccessibilityTextMarker.cpp */; };
    5958                29CFBA2E12273A1000BC30C0 /* AccessibilityTextMarkerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29CFBA2D12273A1000BC30C0 /* AccessibilityTextMarkerMac.mm */; };
    6059                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 */; };
    6460                2D403F1B15087209005358D2 /* LayoutTestHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D403EA215087142005358D2 /* LayoutTestHelper.m */; };
    6561                31117B3D15D9A56A00163BC8 /* MockWebNotificationProvider.mm in Sources */ = {isa = PBXBuildFile; fileRef = 31117B3B15D9A56A00163BC8 /* MockWebNotificationProvider.mm */; };
     
    8682                5DB9AC9F0F722C3600684641 /* WebKitWeightWatcher800.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 375F09780DAC3CB600C8B4E5 /* WebKitWeightWatcher800.ttf */; };
    8783                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 */; };
    8984                80045AEE147718E7008290A8 /* AccessibilityNotificationHandler.mm in Sources */ = {isa = PBXBuildFile; fileRef = 80045AEC147718E7008290A8 /* AccessibilityNotificationHandler.mm */; };
    9085                8465E2C70FFA8DF2003B8342 /* PixelDumpSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8465E2C60FFA8DF2003B8342 /* PixelDumpSupport.cpp */; };
    9186                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 */; };
    9387                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 */; };
    9590                A134E531188FC27000901D06 /* DumpRenderTreeMain.mm in Sources */ = {isa = PBXBuildFile; fileRef = A134E52F188FC27000901D06 /* DumpRenderTreeMain.mm */; };
    9691                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 */; };
    10093                A8B91ADA0CF3B32F008F91FF /* DumpRenderTreePasteboard.m in Sources */ = {isa = PBXBuildFile; fileRef = A8B91AD70CF3B32F008F91FF /* DumpRenderTreePasteboard.m */; };
    10194                A8B91ADC0CF3B32F008F91FF /* DumpRenderTreeWindow.mm in Sources */ = {isa = PBXBuildFile; fileRef = A8B91AD90CF3B32F008F91FF /* DumpRenderTreeWindow.mm */; };
     
    10497                AA5A15EF16E15CD000F7C561 /* AccessibilityControllerIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = AA5A15ED16E15CD000F7C561 /* AccessibilityControllerIOS.mm */; };
    10598                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 */; };
    10999                BC0131DA0C9772010087317D /* TestRunner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC0131D80C9772010087317D /* TestRunner.cpp */; };
    110100                BC0E24E10E2D9451001B6BC2 /* AccessibilityUIElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC0E24DF0E2D9451001B6BC2 /* AccessibilityUIElement.cpp */; };
     
    156146                        remoteInfo = LayoutTestHelper;
    157147                };
     148                A1158D6718927B240088C17B /* PBXContainerItemProxy */ = {
     149                        isa = PBXContainerItemProxy;
     150                        containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
     151                        proxyType = 1;
     152                        remoteGlobalIDString = A1158D6218927AF00088C17B;
     153                        remoteInfo = "Perl Support";
     154                };
    158155                A1321CD7188FABE000125434 /* PBXContainerItemProxy */ = {
    159156                        isa = PBXContainerItemProxy;
     
    169166                        remoteGlobalIDString = 9340994A08540CAE007F3BC8;
    170167                        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)";
    171182                };
    172183                A84F608E08B1370E00E9745F /* PBXContainerItemProxy */ = {
     
    277288                9340995408540CAF007F3BC8 /* DumpRenderTree */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = DumpRenderTree; sourceTree = BUILT_PRODUCTS_DIR; };
    278289                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; };
    279307                A1321C9E188F9A3600125434 /* libDumpRenderTree.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libDumpRenderTree.a; sourceTree = BUILT_PRODUCTS_DIR; };
    280308                A134E52F188FC27000901D06 /* DumpRenderTreeMain.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DumpRenderTreeMain.mm; path = mac/DumpRenderTreeMain.mm; sourceTree = "<group>"; };
     
    283311                A134E5391890671C00901D06 /* DumpRenderTreeLibrary.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = DumpRenderTreeLibrary.xcconfig; path = mac/Configurations/DumpRenderTreeLibrary.xcconfig; sourceTree = "<group>"; };
    284312                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>"; };
    285315                A803FF7409CAAD08009B2A37 /* DumpRenderTree.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = DumpRenderTree.h; sourceTree = "<group>"; };
    286316                A817090308B164D300CCB9FB /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
     
    381411                        buildActionMask = 2147483647;
    382412                        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 */,
    387413                        );
    388414                        runOnlyForDeploymentPostprocessing = 0;
     
    392418                        buildActionMask = 2147483647;
    393419                        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 = (
    401427                        );
    402428                        runOnlyForDeploymentPostprocessing = 0;
     
    406432                        buildActionMask = 2147483647;
    407433                        files = (
    408                                 AE8259F408D22463000507AB /* Carbon.framework in Frameworks */,
    409                                 A817090008B163EF00CCB9FB /* Cocoa.framework in Frameworks */,
    410                                 B5A752A208AF5D1F00138E45 /* QuartzCore.framework in Frameworks */,
    411434                        );
    412435                        runOnlyForDeploymentPostprocessing = 0;
     
    418441                        isa = PBXGroup;
    419442                        children = (
     443                                A1158D6A18927CE10088C17B /* ios */,
    420444                                A134E53418905E6C00901D06 /* config.h */,
    421445                                1A2FB84C178C80920059FD96 /* DefaultPolicyDelegate.h */,
     
    603627                                141BF233096A44CF00E0753C /* TestNetscapePlugIn.plugin */,
    604628                                A1321C9E188F9A3600125434 /* libDumpRenderTree.a */,
     629                                A1158D7F18927E7A0088C17B /* DumpRenderTree.app */,
    605630                        );
    606631                        name = Products;
     
    625650                        sourceTree = "<group>";
    626651                };
     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                };
    627707                A803FF6409CAACC1009B2A37 /* Frameworks */ = {
    628708                        isa = PBXGroup;
     
    671751                                BCB282F40CFA7450007E533E /* DebugRelease.xcconfig */,
    672752                                BCB281F00CFA713D007E533E /* DumpRenderTree.xcconfig */,
     753                                A19317FD18928738001C52B1 /* DumpRenderTreeApp.xcconfig */,
    673754                                A134E5391890671C00901D06 /* DumpRenderTreeLibrary.xcconfig */,
    674755                                BCB283D80CFA7AFD007E533E /* ImageDiff.xcconfig */,
     756                                A1103B5B1892498F00738C87 /* LayoutTestHelper.xcconfig */,
    675757                                BCB283DE0CFA7C20007E533E /* TestNetscapePlugIn.xcconfig */,
    676758                        );
     
    688770                                BCB284880CFA8202007E533E /* PixelDumpSupportCG.cpp */,
    689771                                BCB284890CFA8202007E533E /* PixelDumpSupportCG.h */,
     772                                A1158D57189273EB0088C17B /* PixelDumpSupportIOS.mm */,
    690773                                BCB2848C0CFA8221007E533E /* PixelDumpSupportMac.mm */,
    691774                        );
     
    714797                };
    715798/* 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 */
    716817
    717818/* Begin PBXNativeTarget section */
     
    770871                        productType = "com.apple.product-type.tool";
    771872                };
     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                };
    772891                A1321C9D188F9A3600125434 /* DumpRenderTree (Library) */ = {
    773892                        isa = PBXNativeTarget;
     
    819938                                French,
    820939                                German,
     940                                en,
     941                                Base,
    821942                        );
    822943                        mainGroup = 08FB7794FE84155DC02AAC07 /* DumpRenderTree */;
     
    828949                                A1321C9D188F9A3600125434 /* DumpRenderTree (Library) */,
    829950                                9340994A08540CAE007F3BC8 /* DumpRenderTree */,
     951                                A1158D7E18927E7A0088C17B /* DumpRenderTree.app */,
    830952                                B5A7525A08AF4A4A00138E45 /* ImageDiff */,
    831953                                141BF21E096A441D00E0753C /* TestNetscapePlugIn */,
    832954                                2D403EB2150871F9005358D2 /* LayoutTestHelper */,
     955                                A1158D6218927AF00088C17B /* Perl Support */,
    833956                        );
    834957                };
     
    837960/* Begin PBXResourcesBuildPhase section */
    838961                141BF21B096A441D00E0753C /* Resources */ = {
     962                        isa = PBXResourcesBuildPhase;
     963                        buildActionMask = 2147483647;
     964                        files = (
     965                        );
     966                        runOnlyForDeploymentPostprocessing = 0;
     967                };
     968                A1158D7D18927E7A0088C17B /* Resources */ = {
    839969                        isa = PBXResourcesBuildPhase;
    840970                        buildActionMask = 2147483647;
     
    9211051                                BCF6C6500C98E9C000AC063E /* GCController.cpp in Sources */,
    9221052                                BCA18B230C9B014B00114369 /* GCControllerMac.mm in Sources */,
     1053                                A1158D581892740C0088C17B /* DumpRenderTreeBrowserView.mm in Sources */,
    9231054                                5185F6B210714E07007AA393 /* HistoryDelegate.mm in Sources */,
    9241055                                2CE88FA217124D8C00734FC0 /* JavaScriptThreading.cpp in Sources */,
     
    9291060                                BCA18B7E0C9B08F100114369 /* ObjCPlugin.m in Sources */,
    9301061                                BCA18B800C9B08F100114369 /* ObjCPluginFunction.m in Sources */,
     1062                                A1158D59189274360088C17B /* PixelDumpSupportIOS.mm in Sources */,
    9311063                                8465E2C70FFA8DF2003B8342 /* PixelDumpSupport.cpp in Sources */,
    9321064                                BCB284CD0CFA83C8007E533E /* PixelDumpSupportCG.cpp in Sources */,
     
    9461078                        runOnlyForDeploymentPostprocessing = 0;
    9471079                };
     1080                A1158D7B18927E7A0088C17B /* Sources */ = {
     1081                        isa = PBXSourcesBuildPhase;
     1082                        buildActionMask = 2147483647;
     1083                        files = (
     1084                                A19318001892886B001C52B1 /* DumpRenderTreeMain.mm in Sources */,
     1085                        );
     1086                        runOnlyForDeploymentPostprocessing = 0;
     1087                };
    9481088                A134E52E188FC0DB00901D06 /* Sources */ = {
    9491089                        isa = PBXSourcesBuildPhase;
     
    9751115                        targetProxy = 2D403F201508736C005358D2 /* PBXContainerItemProxy */;
    9761116                };
     1117                A1158D6818927B240088C17B /* PBXTargetDependency */ = {
     1118                        isa = PBXTargetDependency;
     1119                        target = A1158D6218927AF00088C17B /* Perl Support */;
     1120                        targetProxy = A1158D6718927B240088C17B /* PBXContainerItemProxy */;
     1121                };
    9771122                A1321CD8188FABE000125434 /* PBXTargetDependency */ = {
    9781123                        isa = PBXTargetDependency;
     
    9851130                        targetProxy = A134E52C188FC09200901D06 /* PBXContainerItemProxy */;
    9861131                };
     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                };
    9871142                A84F608F08B1370E00E9745F /* PBXTargetDependency */ = {
    9881143                        isa = PBXTargetDependency;
     
    10411196                2D403F16150871F9005358D2 /* Debug */ = {
    10421197                        isa = XCBuildConfiguration;
    1043                         baseConfigurationReference = A16CD20D18907A7D0092363E /* BaseTarget.xcconfig */;
     1198                        baseConfigurationReference = A1103B5B1892498F00738C87 /* LayoutTestHelper.xcconfig */;
    10441199                        buildSettings = {
    10451200                                PRODUCT_NAME = LayoutTestHelper;
     
    10491204                2D403F17150871F9005358D2 /* Release */ = {
    10501205                        isa = XCBuildConfiguration;
    1051                         baseConfigurationReference = A16CD20D18907A7D0092363E /* BaseTarget.xcconfig */;
     1206                        baseConfigurationReference = A1103B5B1892498F00738C87 /* LayoutTestHelper.xcconfig */;
    10521207                        buildSettings = {
    10531208                                PRODUCT_NAME = LayoutTestHelper;
     
    10571212                2D403F18150871F9005358D2 /* Production */ = {
    10581213                        isa = XCBuildConfiguration;
    1059                         baseConfigurationReference = A16CD20D18907A7D0092363E /* BaseTarget.xcconfig */;
     1214                        baseConfigurationReference = A1103B5B1892498F00738C87 /* LayoutTestHelper.xcconfig */;
    10601215                        buildSettings = {
    10611216                                INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Frameworks/$(WEBKIT_FRAMEWORK_RESOURCES_PATH)";
     
    11061261                                INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Frameworks/$(WEBKIT_FRAMEWORK_RESOURCES_PATH)";
    11071262                                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";
    11081305                        };
    11091306                        name = Production;
     
    12231420                        defaultConfigurationName = Production;
    12241421                };
     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                };
    12251442                A1321C9F188F9A3600125434 /* Build configuration list for PBXNativeTarget "DumpRenderTree (Library)" */ = {
    12261443                        isa = XCConfigurationList;
  • trunk/Tools/DumpRenderTree/DumpRenderTreeFileDraggingSource.h

    r43890 r162817  
    2727// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2828
     29#if !PLATFORM(IOS)
     30
    2931#import <Cocoa/Cocoa.h>
    3032
     
    3840
    3941@end
     42
     43#endif
  • trunk/Tools/DumpRenderTree/DumpRenderTreePrefix.h

    r156302 r162817  
    2727 */
    2828
     29#include <wtf/Platform.h>
     30
    2931#ifdef __OBJC__
    30 
    3132#import <Foundation/Foundation.h>
    32 
    3333#endif
  • trunk/Tools/DumpRenderTree/PixelDumpSupport.cpp

    r161699 r162817  
    4444#endif
    4545
     46#if !PLATFORM(IOS)
    4647void dumpWebViewAsPixelsAndCompareWithExpected(const std::string& expectedHash)
    4748{
     
    7475        dumpBitmap(context.get(), actualHash);
    7576}
     77#endif
    7678
    7779static void appendIntToVector(unsigned number, Vector<unsigned char>& vector)
  • trunk/Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.h

    r122402 r162817  
    8686#endif
    8787
    88 #endif // PluginObject_h
     88#endif
  • trunk/Tools/DumpRenderTree/TestNetscapePlugIn/PluginObjectMac.mm

    r85036 r162817  
    2525
    2626#include "PluginObject.h"
    27 
    2827
    2928#include <QuartzCore/QuartzCore.h>
     
    9796    return caLayer;
    9897}
    99 
    100 
  • trunk/Tools/DumpRenderTree/TestNetscapePlugIn/TestObject.cpp

    r72302 r162817  
    2525
    2626#include "TestObject.h"
     27
    2728#include "PluginObject.h"
    2829
  • trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp

    r73076 r162817  
    2323 * THE POSSIBILITY OF SUCH DAMAGE.
    2424 */
    25 
    26 #include "PluginTest.h"
    2725
    2826#include "PluginTest.h"
  • trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp

    r104239 r162817  
    8686
    8787static PluginTest::Register<NPRuntimeObjectFromDestroyedPlugin> npRuntimeObjectFromDestroyedPlugin("npruntime-object-from-destroyed-plugin");
    88 
  • trunk/Tools/DumpRenderTree/TestRunner.cpp

    r161666 r162817  
    5050#include <wtf/StdLibExtras.h>
    5151
    52 #if PLATFORM(MAC)
     52#if PLATFORM(MAC) && !PLATFORM(IOS)
    5353#include <Carbon/Carbon.h>
    5454#endif
     
    13171317}
    13181318
     1319#if PLATFORM(IOS)
     1320static 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
     1331static 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
    13191343#if ENABLE(IOS_TEXT_AUTOSIZING)
    13201344static JSValueRef setTextAutosizingEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
     
    18471871static JSValueRef getSecureEventInputIsEnabledCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
    18481872{
    1849 #if PLATFORM(MAC)
     1873#if PLATFORM(MAC) && !PLATFORM(IOS)
    18501874    return JSValueMakeBoolean(context, IsSecureEventInputEnabled());
    18511875#else
     
    21692193        { "setStopProvisionalFrameLoads", setStopProvisionalFrameLoadsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    21702194        { "setTabKeyCyclesThroughElements", setTabKeyCyclesThroughElementsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     2195#if PLATFORM(IOS)
     2196        { "setTelephoneNumberParsingEnabled", setTelephoneNumberParsingEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     2197        { "setPagePaused", setPagePausedCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     2198#endif
    21712199#if ENABLE(IOS_TEXT_AUTOSIZING)
    21722200        { "setTextAutosizingEnabled", setTextAutosizingEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
  • trunk/Tools/DumpRenderTree/TestRunner.h

    r161666 r162817  
    119119    void setScrollbarPolicy(JSStringRef orientation, JSStringRef policy);
    120120    void startSpeechInput(JSContextRef inputElement);
     121#if PLATFORM(IOS)
     122    void setTelephoneNumberParsingEnabled(bool enable);
     123    void setPagePaused(bool paused);
     124#endif
     125
    121126    void setPageVisibility(const char*);
    122127    void resetPageVisibility();
  • trunk/Tools/DumpRenderTree/cg/ImageDiffCG.cpp

    r160581 r162817  
    4545#include <ImageIO/CGImageDestination.h>
    4646
    47 #if PLATFORM(MAC)
     47#if PLATFORM(IOS)
     48#include <MobileCoreServices/UTCoreTypes.h>
     49#elif PLATFORM(MAC)
    4850#include <LaunchServices/UTCoreTypes.h>
    4951#endif
  • trunk/Tools/DumpRenderTree/cg/PixelDumpSupportCG.cpp

    r149716 r162817  
    4444#if PLATFORM(WIN)
    4545#include "MD5.h"
     46#elif PLATFORM(IOS)
     47#include <MobileCoreServices/UTCoreTypes.h>
     48#define COMMON_DIGEST_FOR_OPENSSL
     49#include <CommonCrypto/CommonDigest.h>
    4650#elif PLATFORM(MAC)
    4751#include <LaunchServices/UTCoreTypes.h>
  • trunk/Tools/DumpRenderTree/ios/AccessibilityControllerIOS.mm

    r162222 r162817  
    2727#import "DumpRenderTree.h"
    2828#import "AccessibilityController.h"
    29 
    30 #if PLATFORM(IOS)
    3129
    3230#import "AccessibilityCommonMac.h"
     
    135133    return platformName;
    136134}
    137 
    138 #endif // PLATFORM(IOS)
  • trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm

    r161417 r162817  
    3636#import <WebKit/WebFrame.h>
    3737#import <WebKit/WebHTMLView.h>
    38 #import <WebKit/WebTypesInternal.h>
    3938#import <wtf/RetainPtr.h>
    4039#import <wtf/Vector.h>
    41 
    42 #if PLATFORM(IOS)
    4340
    4441#import <UIKit/UIKit.h>
     
    654651}
    655652
     653void AccessibilityUIElement::scrollToMakeVisible()
     654{
     655    // FIXME: implement
     656}
     657
    656658JSStringRef AccessibilityUIElement::selectedTextRange()
    657659{
     
    821823    return 0;
    822824}
    823 #endif // PLATFORM(IOS)
     825
     826JSStringRef AccessibilityUIElement::classList() const
     827{
     828    // FIXME: implement
     829    return nullptr;
     830}
     831
     832void AccessibilityUIElement::uiElementArrayAttributeValue(JSStringRef, Vector<AccessibilityUIElement>&) const
     833{
     834    // FIXME: implement
     835}
  • trunk/Tools/DumpRenderTree/ios/DumpRenderTreeBrowserView.h

    r162816 r162817  
    11/*
    2  * Copyright (C) 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2009 Apple Inc. All Rights Reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2323 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2424 */
    25  
    26 #import <Cocoa/Cocoa.h>
    2725
    28 @interface HistoryDelegate : NSObject
    29 {
     26
     27#import <UIKit/UIWebBrowserView.h>
     28
     29@interface DumpRenderTreeBrowserView : UIWebBrowserView {
     30    BOOL _scrollingUsesUIWebScrollView;
    3031}
    3132
     33@property (nonatomic, assign) BOOL scrollingUsesUIWebScrollView;
     34
    3235@end
  • trunk/Tools/DumpRenderTree/ios/PerlSupport/DumpRenderTreeSupport.c

    r162816 r162817  
    2323 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2424 */
    25  
    26 #import <Cocoa/Cocoa.h>
    2725
    28 @interface HistoryDelegate : NSObject
     26#include <stdio.h>
     27#include <sys/sysctl.h>
     28
     29int processIsCrashing(int pid)
    2930{
     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;
    3043}
    31 
    32 @end
  • trunk/Tools/DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/IPhoneSimulatorNotification.xs

    r162816 r162817  
    2323 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2424 */
    25  
    26 #import <Cocoa/Cocoa.h>
    2725
    28 @interface HistoryDelegate : NSObject
    29 {
    30 }
     26#include "EXTERN.h"
     27#include "perl.h"
     28#include "XSUB.h"
    3129
     30#include "ppport.h"
     31
     32#import <Foundation/Foundation.h>
     33
     34@interface IPhoneSimulatorNotification : NSObject
    3235@end
     36
     37@implementation IPhoneSimulatorNotification
     38- (void)readyNotificationCallback { }
     39- (void)applicationLaunchedNotificationCallback:(NSNotification *)notification { }
     40- (void)applicationQuitNotificationCallback:(NSNotification *)notification { }
     41@end
     42
     43MODULE = IPhoneSimulatorNotification            PACKAGE = IPhoneSimulatorNotification           
     44
     45PROTOTYPES: ENABLE
     46
  • trunk/Tools/DumpRenderTree/mac/AccessibilityNotificationHandler.mm

    r102378 r162817  
    3838#import <JavaScriptCore/JSStringRefCF.h>
    3939#import <WebKit/WebFrame.h>
    40 #import <WebKit/WebTypesInternal.h>
    4140#import <wtf/RetainPtr.h>
    4241
  • trunk/Tools/DumpRenderTree/mac/AccessibilityTextMarkerMac.mm

    r74733 r162817  
    2828#import "AccessibilityTextMarker.h"
    2929#import "DumpRenderTree.h"
     30
     31#if SUPPORTS_AX_TEXTMARKERS
    3032
    3133// MARK: AccessibilityTextMarker
     
    8082    return m_textMarkerRange.get();
    8183}
     84
     85#endif // SUPPORTS_AX_TEXTMARKERS
  • trunk/Tools/DumpRenderTree/mac/AppleScriptController.m

    r46340 r162817  
    3030#import "config.h"
    3131#import "AppleScriptController.h"
     32
     33#if !PLATFORM(IOS)
    3234
    3335#import <WebKit/WebView.h>
     
    126128
    127129@end
     130
     131#endif // !PLATFORM(IOS)
  • trunk/Tools/DumpRenderTree/mac/Configurations/Base.xcconfig

    r157987 r162817  
    2222// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2323
     24#include "<DEVELOPER_DIR>/AppleInternal/XcodeConfig/AspenFamily.xcconfig"
     25
    2426CLANG_CXX_LANGUAGE_STANDARD = gnu++0x;
    2527CLANG_CXX_LIBRARY = libc++;
    2628CLANG_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;
     29HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include $(BUILT_PRODUCTS_DIR)/WebCoreTestSupport ForwardingHeaders $(HEADER_SEARCH_PATHS_$(PLATFORM_NAME)) $(SRCROOT)/../../Source/JavaScriptCore/icu;
     30HEADER_SEARCH_PATHS_iphoneos = $(SDKROOT)/usr/local/include $(SDKROOT)/usr/local/include/WebCoreTestSupport;
     31HEADER_SEARCH_PATHS_iphonesimulator = $(HEADER_SEARCH_PATHS_iphoneos);
     32HEADER_SEARCH_PATHS_macosx = mac/InternalHeaders $(NEXT_ROOT)/usr/local/include/WebCoreTestSupport;
     33FRAMEWORK_SEARCH_PATHS = $(FRAMEWORK_SEARCH_PATHS_$(PLATFORM_NAME));
     34FRAMEWORK_SEARCH_PATHS_macosx = $(interited);
     35FRAMEWORK_SEARCH_PATHS_iphoneos = $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
     36FRAMEWORK_SEARCH_PATHS_iphonesimulator = $(FRAMEWORK_SEARCH_PATHS_iphoneos);
     37GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) $(GCC_PREPROCESSOR_DEFINITIONS_$(PLATFORM_NAME)) WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST;
     38GCC_PREPROCESSOR_DEFINITIONS_macosx = ENABLE_DASHBOARD_SUPPORT;
    2939DEBUG_INFORMATION_FORMAT = dwarf-with-dsym;
    3040PREBINDING = NO
     
    3848GCC_WARN_UNUSED_FUNCTION = YES
    3949GCC_WARN_UNUSED_VARIABLE = YES
     50// FIXME: <http://webkit.org/b/118590> DumpRenderTree should build with -Wshorten-64-to-32
     51GCC_WARN_64_TO_32_BIT_CONVERSION[arch=arm64] = NO;
     52GCC_WARN_64_TO_32_BIT_CONVERSION[arch=x86_64] = NO;
    4053WARNING_CFLAGS = -Wall -W -Wno-unused-parameter -Wundef
    4154LINKER_DISPLAYS_MANGLED_NAMES = YES;
     
    5972TOOLCHAINS_macosx_1090 = $(TOOLCHAINS);
    6073TOOLCHAINS_macosx_101000 = $(TOOLCHAINS_macosx_1090);
     74
     75SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator;
  • trunk/Tools/DumpRenderTree/mac/Configurations/DebugRelease.xcconfig

    r157987 r162817  
    2929ONLY_ACTIVE_ARCH = YES;
    3030
    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;
     31MACOSX_DEPLOYMENT_TARGET = $(MACOSX_DEPLOYMENT_TARGET_$(PLATFORM_NAME));
     32MACOSX_DEPLOYMENT_TARGET_iphoneos = 10.9;
     33MACOSX_DEPLOYMENT_TARGET_iphonesimulator = 10.9;
     34MACOSX_DEPLOYMENT_TARGET_macosx = $(MACOSX_DEPLOYMENT_TARGET_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR));
     35MACOSX_DEPLOYMENT_TARGET_macosx_1080 = 10.8;
     36MACOSX_DEPLOYMENT_TARGET_macosx_1090 = 10.9;
     37MACOSX_DEPLOYMENT_TARGET_macosx_101000 = 10.10;
    3538
    3639WEBKIT_SYSTEM_INTERFACE_LIBRARY = $(WEBKIT_SYSTEM_INTERFACE_LIBRARY_$(PLATFORM_NAME));
  • trunk/Tools/DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig

    r162573 r162817  
    2424#include "BaseTarget.xcconfig"
    2525
    26 OTHER_LDFLAGS = $(inherited) -l$(WEBKIT_SYSTEM_INTERFACE_LIBRARY) -force_load $(BUILT_PRODUCTS_DIR)/libDumpRenderTree.a;
     26OTHER_LDFLAGS = $(OTHER_LDFLAGS_$(PLATFORM_NAME));
     27OTHER_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;
    2728LD_RUNPATH_SEARCH_PATHS = "@loader_path/.";
    2829PRODUCT_NAME = DumpRenderTree;
     30EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(PLATFORM_NAME));
     31EXCLUDED_SOURCE_FILE_NAMES_iphoneos = DumpRenderTreeMain.mm *.ttf *.TTF *.sfont;
     32EXCLUDED_SOURCE_FILE_NAMES_iphonesimulator = $(EXCLUDED_SOURCE_FILE_NAMES_iphoneos);
  • trunk/Tools/DumpRenderTree/mac/Configurations/DumpRenderTreeLibrary.xcconfig

    r162573 r162817  
    2828PRODUCT_NAME = DumpRenderTree;
    2929SKIP_INSTALL = YES;
     30
     31EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(PLATFORM_NAME));
     32EXCLUDED_SOURCE_FILE_NAMES_iphoneos = AccessibilityControllerMac.mm AccessibilityUIElementMac.mm DumpRenderTreeFileDraggingSource.m PixelDumpSupportMac.mm PixelDumpSupportCG.cpp;
     33EXCLUDED_SOURCE_FILE_NAMES_iphonesimulator = $(EXCLUDED_SOURCE_FILE_NAMES_iphoneos);
     34EXCLUDED_SOURCE_FILE_NAMES_macosx = AccessibilityUIElementIOS.mm AccessibilityControllerIOS.mm PixelDumpSupportIOS.mm DumpRenderTreeBrowserView.mm;
  • trunk/Tools/DumpRenderTree/mac/Configurations/ImageDiff.xcconfig

    r156611 r162817  
    2424#include "BaseTarget.xcconfig"
    2525
    26 PRODUCT_NAME = ImageDiff
     26PRODUCT_NAME = ImageDiff;
     27OTHER_LDFLAGS = $(OTHER_LDFLAGS_$(PLATFORM_NAME));
     28OTHER_LDFLAGS_macosx = -framework Carbon -framework Cocoa -framework QuartzCore;
     29OTHER_LDFLAGS_iphoneos = -framework CoreFoundation -framework CoreGraphics -framework MobileCoreServices -framework ImageIO;
     30OTHER_LDFLAGS_iphonesimulator = $(OTHER_LDFLAGS_iphoneos);
  • trunk/Tools/DumpRenderTree/mac/Configurations/LayoutTestHelper.xcconfig

    r162816 r162817  
    2626#include "BaseTarget.xcconfig"
    2727
    28 PRODUCT_NAME = DumpRenderTree;
    29 SKIP_INSTALL = YES;
     28OTHER_LDFLAGS = $(OTHER_LDFLAGS_$(PLATFORM_NAME));
     29OTHER_LDFLAGS_macosx = -framework Carbon -framework Cocoa -framework OpenGL -framework IOKit;
  • trunk/Tools/DumpRenderTree/mac/Configurations/TestNetscapePlugIn.xcconfig

    r156611 r162817  
    3030WARNING_CFLAGS = -Wmost -Wno-four-char-constants -Wno-unknown-pragmas
    3131LIBRARY_STYLE = BUNDLE
     32EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(PLATFORM_NAME));
     33EXCLUDED_SOURCE_FILE_NAMES_iphoneos = *;
     34EXCLUDED_SOURCE_FILE_NAMES_iphonesimulator = $(EXCLUDED_SOURCE_FILE_NAMES_iphoneos);
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm

    r162573 r162817  
    5757#import "WorkQueue.h"
    5858#import "WorkQueueItem.h"
    59 #import <Carbon/Carbon.h>
    6059#import <CoreFoundation/CoreFoundation.h>
    6160#import <JavaScriptCore/HeapStatistics.h>
     
    7271#import <WebKit/WebDocumentPrivate.h>
    7372#import <WebKit/WebDeviceOrientationProviderMock.h>
    74 #import <WebKit/WebDynamicScrollBarsView.h>
    7573#import <WebKit/WebEditingDelegate.h>
    7674#import <WebKit/WebFrameView.h>
     
    8583#import <WebKit/WebResourceLoadDelegate.h>
    8684#import <WebKit/WebStorageManagerPrivate.h>
    87 #import <WebKit/WebTypesInternal.h>
    8885#import <WebKit/WebViewPrivate.h>
    8986#import <getopt.h>
     
    9592#import <wtf/OwnPtr.h>
    9693
     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
    97116extern "C" {
    98117#import <mach-o/getsect.h>
     
    101120using namespace std;
    102121
     122#if !PLATFORM(IOS)
    103123@interface DumpRenderTreeApplication : NSApplication
    104124@end
     
    106126@interface DumpRenderTreeEvent : NSEvent
    107127@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
    108147
    109148@interface NSURLRequest (PrivateThingsWeShouldntReallyUse)
     
    151190DefaultPolicyDelegate *defaultPolicyDelegate;
    152191StorageTrackerDelegate *storageDelegate;
     192#if PLATFORM(IOS)
     193static ScrollViewResizerDelegate *scrollViewResizerDelegate;
     194#endif
    153195
    154196static int dumpPixelsForAllTests = NO;
     
    165207static WebHistoryItem *prevTestBFItem = nil;  // current b/f item at the end of the previous test
    166208
     209#if PLATFORM(IOS)
     210const unsigned phoneViewHeight = 480;
     211const unsigned phoneViewWidth = 320;
     212const unsigned phoneBrowserScrollViewHeight = 416;
     213const unsigned phoneBrowserAddressBarOffset = 60;
     214const CGRect layoutTestViewportRect = { {0, 0}, {static_cast<CGFloat>(TestRunner::viewWidth), static_cast<CGFloat>(TestRunner::viewHeight)} };
     215UIWebBrowserView *gWebBrowserView = nil;
     216UIWebScrollView *gWebScrollView = nil;
     217DumpRenderTreeWindow *gDrtWindow = nil;
     218#endif
     219
    167220#ifdef __OBJC2__
    168221static void swizzleAllMethods(Class imposter, Class original)
     
    237290}
    238291
     292#if !PLATFORM(IOS)
    239293static NSSet *allowedFontFamilySet()
    240294{
     
    472526    activateTestingFonts();
    473527}
    474 
     528#else
     529static 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)
     577void 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
     601void 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)
    475622@interface DRTMockScroller : NSScroller
    476623@end
     
    531678    [WebDynamicScrollBarsView setCustomScrollerClass:[DRTMockScroller class]];
    532679}
     680#endif
    533681
    534682WebView *createWebViewAndOffscreenWindow()
    535683{
     684#if !PLATFORM(IOS)
    536685    NSRect rect = NSMakeRect(0, 0, TestRunner::viewWidth, TestRunner::viewHeight);
    537686    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
    539694    [webView setUIDelegate:uiDelegate];
    540695    [webView setFrameLoadDelegate:frameLoadDelegate];
     
    550705    [WebView registerURLSchemeAsLocal:@"feedsearch"];
    551706   
     707#if !PLATFORM(IOS)
    552708    [webView setContinuousSpellCheckingEnabled:YES];
    553709    [webView setAutomaticQuoteSubstitutionEnabled:NO];
     
    574730
    575731    [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)
    577757    // For reasons that are not entirely clear, the following pair of calls makes WebView handle its
    578758    // dynamic scrollbars properly. Without it, every frame will always have scrollbars.
    579759    NSBitmapImageRep *imageRep = [webView bitmapImageRepForCachingDisplayInRect:[webView bounds]];
    580760    [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
    582775    return webView;
    583776}
     
    616809    [preferences setJavaScriptEnabled:YES];
    617810    [preferences setEditableLinkBehavior:WebKitEditableLinkOnlyLiveWithShiftKey];
     811#if !PLATFORM(IOS)
    618812    [preferences setTabsToLinks:NO];
     813#endif
    619814    [preferences setDOMPasteAllowed:YES];
     815#if !PLATFORM(IOS)
    620816    [preferences setShouldPrintBackgrounds:YES];
     817#endif
    621818    [preferences setCacheModel:WebCacheModelDocumentBrowser];
    622819    [preferences setXSSAuditorEnabled:NO];
    623820    [preferences setExperimentalNotificationsEnabled:NO];
    624821    [preferences setPlugInsEnabled:YES];
     822#if !PLATFORM(IOS)
    625823    [preferences setTextAreasAreResizable:YES];
     824#endif
    626825
    627826    [preferences setPrivateBrowsingEnabled:NO];
     
    641840    } else
    642841        [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
    643850
    644851#if ENABLE(IOS_TEXT_AUTOSIZING)
     
    667874#endif
    668875
     876#if ENABLE(IOS_TEXT_AUTOSIZING)
     877    // Disable text autosizing by default.
     878    [preferences _setMinimumZoomFontSize:0];
     879#endif
     880
    669881    [preferences setScreenFontSubstitutionEnabled:YES];
    670882
     
    679891static void setDefaultsToConsistentValuesForTesting()
    680892{
     893#if PLATFORM(IOS)
     894    WebThreadLock();
     895#endif
     896
    681897    static const int NoFontSmoothing = 0;
    682898    static const int BlueTintedAppearance = 1;
     
    696912        WebKitFullScreenEnabledPreferenceKey: @YES,
    697913        @"UseWebKitWebInspector": @YES,
     914#if !PLATFORM(IOS)
    698915        @"NSTestCorrectionDictionary": @{
    699916            @"notationl": @"notational",
     
    703920            @"hellolfworld": @"hello\nworld"
    704921        },
     922#endif
    705923        @"WebKitKerningAndLigaturesEnabledByDefault": @NO,
    706924        @"AppleScrollBarVariant": @"DoubleMax",
     925#if !PLATFORM(IOS)
    707926        @"NSScrollAnimationEnabled": @NO,
     927#endif
    708928        @"NSOverlayScrollersEnabled": @NO,
    709929        @"AppleShowScrollBars": @"Always",
     
    758978    storageDelegate = [[StorageTrackerDelegate alloc] init];
    759979    defaultPolicyDelegate = [[DefaultPolicyDelegate alloc] init];
     980#if PLATFORM(IOS)
     981    scrollViewResizerDelegate = [[ScrollViewResizerDelegate alloc] init];
     982#endif
    760983}
    761984
     
    776999    releaseAndZero(&policyDelegate);
    7771000    releaseAndZero(&storageDelegate);
     1001#if PLATFORM(IOS)
     1002    releaseAndZero(&scrollViewResizerDelegate);
     1003#endif
    7781004}
    7791005
     
    8051031static void addTestPluginsToPluginSearchPath(const char* executablePath)
    8061032{
     1033#if !PLATFORM(IOS)
    8071034    NSString *pwd = [[NSString stringWithUTF8String:executablePath] stringByDeletingLastPathComponent];
    8081035    [WebPluginDatabase setAdditionalWebPlugInPaths:[NSArray arrayWithObject:pwd]];
    8091036    [[WebPluginDatabase sharedDatabase] refresh];
     1037#endif
    8101038}
    8111039
     
    8351063static void prepareConsistentTestingEnvironment()
    8361064{
     1065#if !PLATFORM(IOS)
    8371066    poseAsClass("DumpRenderTreePasteboard", "NSPasteboard");
    8381067    poseAsClass("DumpRenderTreeEvent", "NSEvent");
     1068#else
     1069    poseAsClass("DumpRenderTreeEvent", "GSEvent");
     1070#endif
    8391071
    8401072    [[WebPreferences standardPreferences] setAutosaves:NO];
     1073
     1074#if !PLATFORM(IOS)
    8411075
    8421076    // FIXME: We'd like to start with a clean state for every test, but this function can't be used more than once yet.
     
    8521086    adjustFonts();
    8531087    registerMockScrollbars();
     1088#else
     1089    activateFontsIOS();
     1090#endif
    8541091   
    8551092    allocateGlobalControllers();
     
    8571094    makeLargeMallocFailSilently();
    8581095
    859 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
     1096#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
    8601097    NSActivityOptions options = (NSActivityUserInitiatedAllowingIdleSystemSleep | NSActivityLatencyCritical) & ~(NSActivitySuddenTerminationDisabled | NSActivityAutomaticTerminationDisabled);
    8611098    static id assertion = [[[NSProcessInfo processInfo] beginActivityWithOptions:options reason:@"DumpRenderTree should not be subject to process suppression"] retain];
     
    8661103void dumpRenderTree(int argc, const char *argv[])
    8671104{
     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
    8681114    initializeGlobalsFromCommandLineOptions(argc, argv);
    8691115    prepareConsistentTestingEnvironment();
     
    9041150        stopJavaScriptThreads();
    9051151
     1152#if !PLATFORM(IOS)
    9061153    NSWindow *window = [webView window];
     1154#endif
    9071155    [webView close];
    9081156    mainFrame = nil;
    9091157
     1158#if !PLATFORM(IOS)
    9101159    // Work around problem where registering drag types leaves an outstanding
    9111160    // "perform selector" on the window, which retains the window. It's a bit
     
    9151164   
    9161165    [window close]; // releases when closed
     1166#else
     1167    UIWindow *uiWindow = [gWebBrowserView window];
     1168    [uiWindow removeFromSuperview];
     1169    [uiWindow release];
     1170#endif
     1171
    9171172    [webView release];
    9181173   
    9191174    releaseGlobalControllers();
    9201175   
     1176#if !PLATFORM(IOS)
    9211177    [DumpRenderTreePasteboard releaseLocalPasteboards];
     1178#endif
    9221179
    9231180    // FIXME: This should be moved onto TestRunner and made into a HashSet
     
    9261183        disallowedURLs = 0;
    9271184    }
    928 }
     1185
     1186#if PLATFORM(IOS)
     1187    close(infd);
     1188    close(outfd);
     1189    close(errfd);
     1190#endif
     1191}
     1192
     1193#if PLATFORM(IOS)
     1194static int _argc;
     1195static 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
    9291252
    9301253int DumpRenderTreeMain(int argc, const char *argv[])
    9311254{
     1255#if PLATFORM(IOS)
     1256    _UIApplicationLoadWebKit();
     1257#endif
    9321258    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    9331259
    9341260    setDefaultsToConsistentValuesForTesting(); // Must be called before NSApplication initialization.
    9351261
     1262#if !PLATFORM(IOS)
    9361263    [DumpRenderTreeApplication sharedApplication]; // Force AppKit to init itself
    9371264
    9381265    dumpRenderTree(argc, argv);
     1266#else
     1267    _argc = argc;
     1268    _argv = argv;
     1269    UIApplicationMain(argc, (char**)argv, @"DumpRenderTree", nil);
     1270#endif
    9391271    [WebCoreStatistics garbageCollectJavaScriptObjects];
    9401272    [WebCoreStatistics emptyCache]; // Otherwise SVGImages trigger false positives for Frame/Node counts
     
    10391371static NSData *dumpFrameAsPDF(WebFrame *frame)
    10401372{
     1373#if !PLATFORM(IOS)
    10411374    if (!frame)
    10421375        return nil;
     
    10681401
    10691402    return pdfData;
     1403#else
     1404    return nil;
     1405#endif
    10701406}
    10711407
     
    11341470    for (unsigned i = 0; i < count; i++) {
    11351471        NSWindow *window = (NSWindow *)CFArrayGetValueAtIndex(openWindows, i);
     1472#if !PLATFORM(IOS)
    11361473        WebView *webView = [[[window contentView] subviews] objectAtIndex:0];
     1474#else
     1475        ASSERT([[window contentView] isKindOfClass:[WebView class]]);
     1476        WebView *webView = (WebView *)[window contentView];
     1477#endif
    11371478        dumpBackForwardListForWebView(webView);
    11381479    }
     
    11631504void dump()
    11641505{
     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   
    11651515    invalidateAnyPreviousWaitToDumpWatchdog();
    11661516    ASSERT(!gTestRunner->hasPendingWebNotificationClick());
     
    12651615}
    12661616
     1617#if PLATFORM(IOS)
     1618static bool shouldMakeViewportFlexible(const char* pathOrURL)
     1619{
     1620    return strstr(pathOrURL, "viewport/");
     1621}
     1622#endif
     1623
    12671624static void resetWebViewToConsistentStateBeforeTesting()
    12681625{
    12691626    WebView *webView = [mainFrame webView];
     1627#if PLATFORM(IOS)
     1628    adjustWebDocumentForStandardViewport(gWebBrowserView, gWebScrollView);
     1629    [webView _setAllowsMessaging:YES];
     1630    [mainFrame setMediaDataLoadsAutomatically:YES];
     1631#endif
    12701632    [webView setEditable:NO];
    12711633    [(EditingDelegate *)[webView editingDelegate] setAcceptsEditing:YES];
     
    12731635    [webView resetPageZoom:nil];
    12741636    [webView _scaleWebView:1.0 atOrigin:NSZeroPoint];
     1637#if !PLATFORM(IOS)
    12751638    [webView _setCustomBackingScaleFactor:0];
     1639#endif
    12761640    [webView setTabKeyCyclesThroughElements:YES];
    12771641    [webView setPolicyDelegate:defaultPolicyDelegate];
     
    12791643    [policyDelegate setControllerToNotifyDone:0];
    12801644    [frameLoadDelegate resetToConsistentState];
     1645#if !PLATFORM(IOS)
    12811646    [webView _setDashboardBehavior:WebDashboardBehaviorUseBackwardCompatibilityMode to:NO];
     1647#endif
    12821648    [webView _clearMainFrameName];
    12831649    [[webView undoManager] removeAllActions];
    12841650    [WebView _removeAllUserContentFromGroup:[webView groupName]];
     1651#if !PLATFORM(IOS)
    12851652    [[webView window] setAutodisplay:NO];
     1653#endif
    12861654    [webView setTracksRepaints:NO];
    12871655   
     
    12981666    }
    12991667
     1668#if !PLATFORM(IOS)
    13001669    [webView setContinuousSpellCheckingEnabled:YES];
    13011670    [webView setAutomaticQuoteSubstitutionEnabled:NO];
     
    13071676
    13081677    [WebView _setUsesTestModeFocusRingColor:YES];
     1678#endif
    13091679    [WebView _resetOriginAccessWhitelists];
    13101680    [WebView _setAllowsRoundingHacks:NO];
     
    13131683    [[MockWebNotificationProvider shared] reset];
    13141684   
     1685#if !PLATFORM(IOS)
    13151686    // Clear the contents of the general pasteboard
    13161687    [[NSPasteboard generalPasteboard] declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:nil];
     1688#endif
    13171689
    13181690    [mainFrame _clearOpener];
    13191691}
     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.
     1699static 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
    13201717
    13211718static void runTest(const string& inputLine)
     
    13491746    gTestRunner = TestRunner::create(testURL, command.expectedPixelHash);
    13501747    topLoadingFrame = nil;
     1748#if !PLATFORM(IOS)
    13511749    ASSERT(!draggingInfo); // the previous test should have called eventSender.mouseUp to drop!
    13521750    releaseAndZero(&draggingInfo);
     1751#endif
    13531752    done = NO;
    13541753
     
    13761775    }
    13771776
     1777#if PLATFORM(IOS)
     1778    if (shouldMakeViewportFlexible(pathOrURL.c_str()))
     1779        adjustWebDocumentForFlexibleViewport(gWebBrowserView, gWebScrollView);
     1780#endif
     1781
    13781782    if ([WebHistory optionalSharedHistory])
    13791783        [WebHistory setOptionalSharedHistory:nil];
     
    14011805    }
    14021806
     1807#if PLATFORM(IOS)
     1808    [(DumpRenderTree *)UIApp _waitForWebThread];
     1809    WebThreadLockAfterDelegateCallbacksHaveCompleted();
     1810#endif
    14031811    pool = [[NSAutoreleasePool alloc] init];
    14041812    [EventSendingController clearSavedEvents];
     
    14181826                continue;
    14191827           
     1828#if !PLATFORM(IOS)
    14201829            WebView *webView = [[[window contentView] subviews] objectAtIndex:0];
     1830#else
     1831            ASSERT([[window contentView] isKindOfClass:[WebView class]]);
     1832            WebView *webView = (WebView *)[window contentView];
     1833#endif
    14211834
    14221835            [webView close];
     
    14541867void displayWebView()
    14551868{
     1869#if !PLATFORM(IOS)
    14561870    WebView *webView = [mainFrame webView];
    14571871    [webView display];
     
    14591873    [webView setTracksRepaints:YES];
    14601874    [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)
    14631884@implementation DumpRenderTreeEvent
    14641885
     
    14791900
    14801901@end
     1902#endif
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.h

    r25566 r162817  
    2727 */
    2828
     29#if !PLATFORM(IOS)
     30
    2931#import <Cocoa/Cocoa.h>
    3032
     
    5254@end
    5355
     56#endif
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm

    r154314 r162817  
    2929#import "config.h"
    3030#import "DumpRenderTreeDraggingInfo.h"
     31
     32#if !PLATFORM(IOS)
    3133
    3234#import "DumpRenderTree.h"
     
    143145@end
    144146
     147#endif // !PLATFORM(IOS)
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTreeMac.h

    r162573 r162817  
    3131
    3232#include <CoreFoundation/CoreFoundation.h>
     33#if PLATFORM(IOS) && defined(__OBJC__)
     34#import <UIKit/UIKit.h>
     35#endif
     36
    3337
    3438#ifdef __OBJC__
     
    7074unsigned worldIDForWorld(WebScriptWorld *);
    7175
     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;
     86extern UIWebBrowserView *gWebBrowserView;
     87#endif
     88
    7289int DumpRenderTreeMain(int, const char *[]);
    7390
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTreePasteboard.h

    r32995 r162817  
    2929 */
    3030
     31#if !PLATFORM(IOS)
     32
    3133#import <AppKit/AppKit.h>
    3234#import <WebKit/WebTypesInternal.h>
     
    3739@end
    3840
     41#endif
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTreePasteboard.m

    r154647 r162817  
    3333#import "DumpRenderTreePasteboard.h"
    3434
     35#if !PLATFORM(IOS)
     36
    3537#import <WebKit/WebTypesInternal.h>
    3638
     
    213215
    214216@end
     217
     218#endif // !PLATFORM(IOS)
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTreeWindow.h

    r156724 r162817  
    2929 */
    3030
     31#if !PLATFORM(IOS)
    3132#import <AppKit/AppKit.h>
     33#else
     34#import <UIKit/UIKit.h>
     35#import <UIKit/UIWebBrowserView.h>
     36#import <WebKit/WAKWindow.h>
     37#endif
    3238
    3339@class WebView;
     
    3642{
    3743}
     44
     45#if PLATFORM(IOS)
     46@property (nonatomic, retain) UIWindow *uiWindow;
     47@property (nonatomic, retain) UIWebBrowserView *browserView;
     48#endif
    3849
    3950// I'm not sure why we can't just use [NSApp windows]
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTreeWindow.mm

    r156724 r162817  
    3737#import "TestRunner.h"
    3838#import <WebKit/WebViewPrivate.h>
    39 #import <WebKit/WebTypesInternal.h>
     39
     40#if PLATFORM(IOS)
     41#import <QuartzCore/CALayer.h>
     42#endif
    4043
    4144CFMutableArrayRef openWindowsRef = 0;
     
    5154@implementation DumpRenderTreeWindow
    5255
     56#if PLATFORM(IOS)
     57@synthesize uiWindow = _uiWindow;
     58@synthesize browserView = _browserView;
     59#endif
     60
    5361+ (NSArray *)openWindows
    5462{
     
    5664}
    5765
    58 - (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)styleMask backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation
     66- (void)_addToOpenWindows
    5967{
    6068    if (!openWindowsRef)
     
    6270
    6371    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];
    6578    return [super initWithContentRect:contentRect styleMask:styleMask backing:bufferingType defer:deferCreation];
    6679}
     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
    6796
    6897- (void)close
     
    76105
    77106    [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
    78119}
    79120
     
    88129}
    89130
     131#if !PLATFORM(IOS)
    90132- (void)keyDown:(NSEvent *)event
    91133{
     
    93135    // once we get to the end of the responder chain.
    94136}
     137#endif
    95138
    96139- (WebView *)webView
    97140{
     141#if !PLATFORM(IOS)
    98142    NSView *firstView = nil;
    99143    if ([[[self contentView] subviews] count] > 0) {
     
    103147    }
    104148    return nil;
     149#else
     150    ASSERT([[self contentView] isKindOfClass:[WebView class]]);
     151    return (WebView *)[self contentView];
     152#endif
    105153}
    106154
     
    114162- (void)webViewStartedAcceleratedCompositing:(NSNotification *)notification
    115163{
     164#if !PLATFORM(IOS)
    116165    // If the WebView has gone into compositing mode, turn on window autodisplay. This is necessary for CA
    117166    // to update layers and start animations.
     
    119168    if ([[self webView] _isUsingAcceleratedCompositing])
    120169        [self setAutodisplay:YES];
     170#endif
    121171}
    122172
  • trunk/Tools/DumpRenderTree/mac/EditingDelegate.h

    r25566 r162817  
    2727 */
    2828 
    29 #import <Cocoa/Cocoa.h>
     29#import <Foundation/Foundation.h>
    3030
    3131@interface EditingDelegate : NSObject
  • trunk/Tools/DumpRenderTree/mac/EventSendingController.h

    r39377 r162817  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
    28  
    29 #import <Cocoa/Cocoa.h>
     28
     29#import <Foundation/Foundation.h>
    3030#import <WebKit/WebKit.h>
    3131
     
    3838    int eventNumber;
    3939    double timeOffset;
     40#if PLATFORM(IOS)
     41    NSMutableArray* touches;
     42    unsigned currentTouchIdentifier;
     43    unsigned nextEventFlags;
     44#endif
    4045}
    4146
  • trunk/Tools/DumpRenderTree/mac/EventSendingController.mm

    r156740 r162817  
    3737#import "DumpRenderTreeFileDraggingSource.h"
    3838
    39 #import <Carbon/Carbon.h>                           // for GetCurrentEventTime()
    4039#import <WebKit/DOMPrivate.h>
    4140#import <WebKit/WebKit.h>
    4241#import <WebKit/WebViewPrivate.h>
    4342
     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)
    4456extern "C" void _NSNewKillRingSequence();
    4557
     
    4759- (void)_setCurrentEvent:(NSEvent *)event;
    4860@end
     61#endif
    4962
    5063enum MouseAction {
     
    7588NSMutableArray *savedMouseEvents; // mouse events sent between mouseDown and mouseUp are stored here, and then executed at once.
    7689BOOL 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
    77130
    78131@implementation EventSendingController
     
    150203            || aSelector == @selector(scalePageBy:atX:andY:)
    151204            || 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            )
    153220        return NO;
    154221    return YES;
     
    192259    if (aSelector == @selector(scalePageBy:atX:andY:))
    193260        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
    194285    return nil;
    195286}
     
    205296- (void)dealloc
    206297{
     298#if PLATFORM(IOS)
     299    [touches release];
     300#endif
    207301    [super dealloc];
    208302}
     
    210304- (double)currentEventTime
    211305{
     306#if !PLATFORM(IOS)
    212307    return GetCurrentEventTime() + timeOffset;
     308#else
     309    return GSCurrentEventTimestamp() + timeOffset;
     310#endif
    213311}
    214312
     
    231329- (void)clearKillRing
    232330{
     331#if !PLATFORM(IOS)
    233332    _NSNewKillRingSequence();
    234 }
    235 
     333#endif
     334}
     335
     336#if !PLATFORM(IOS)
    236337static NSEventType eventTypeForMouseButtonAndAction(int button, MouseAction action)
    237338{
     
    299400    leftMouseButtonDown = YES; // Make the rest of eventSender think a drag is in progress
    300401}
     402#endif // !PLATFORM(IOS)
    301403
    302404- (void)updateClickCountForButton:(int)buttonNumber
     
    313415static int modifierFlags(const NSString* modifierName)
    314416{
     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
    315429    int flags = 0;
    316430    if ([modifierName isEqual:@"ctrlKey"])
    317         flags |= NSControlKeyMask;
     431        flags |= controlKeyMask;
    318432    else if ([modifierName isEqual:@"shiftKey"] || [modifierName isEqual:@"rangeSelectionKey"])
    319         flags |= NSShiftKeyMask;
     433        flags |= shiftKeyMask;
    320434    else if ([modifierName isEqual:@"altKey"])
    321         flags |= NSAlternateKeyMask;
     435        flags |= alternateKeyMask;
    322436    else if ([modifierName isEqual:@"metaKey"] || [modifierName isEqual:@"addSelectionKey"])
    323         flags |= NSCommandKeyMask;
     437        flags |= commandKeyMask;
    324438
    325439    return flags;
     
    345459    [self updateClickCountForButton:buttonNumber];
    346460   
     461#if !PLATFORM(IOS)
    347462    NSEventType eventType = eventTypeForMouseButtonAndAction(buttonNumber, MouseDown);
    348463    NSEvent *event = [NSEvent mouseEventWithType:eventType
     
    355470                                      clickCount:clickCount
    356471                                        pressure:0.0];
     472#else
     473    WebEvent *event = [[WebEvent alloc] initWithMouseEventType:WebEventMouseDown
     474                                                     timeStamp:[self currentEventTime]
     475                                                      location:lastMousePosition];
     476#endif
    357477
    358478    NSView *subView = [[mainFrame webView] hitTest:[event locationInWindow]];
    359479    if (subView) {
     480#if !PLATFORM(IOS)
    360481        [NSApp _setCurrentEvent:event];
     482#endif
    361483        [subView mouseDown:event];
     484#if !PLATFORM(IOS)
    362485        [NSApp _setCurrentEvent:nil];
     486#endif
    363487        if (buttonNumber == LeftMouseButton)
    364488            leftMouseButtonDown = YES;
    365489    }
     490
     491#if PLATFORM(IOS)
     492    [event release];
     493#endif
    366494}
    367495
     
    393521- (void)scalePageBy:(float)scale atX:(float)x andY:(float)y
    394522{
     523#if !PLATFORM(IOS)
     524    // -[WebView _scaleWebView:] is Mac-specific API, and calls functions that
     525    // assert to not be used in iOS.
    395526    [[mainFrame webView] _scaleWebView:scale atOrigin:NSMakePoint(x, y)];
     527#endif
    396528}
    397529
     
    412544
    413545    [[[mainFrame frameView] documentView] layout];
     546#if !PLATFORM(IOS)
    414547    NSEventType eventType = eventTypeForMouseButtonAndAction(buttonNumber, MouseUp);
    415548    NSEvent *event = [NSEvent mouseEventWithType:eventType
     
    422555                                      clickCount:clickCount
    423556                                        pressure:0.0];
     557#else
     558    WebEvent *event = [[WebEvent alloc] initWithMouseEventType:WebEventMouseUp
     559                                                     timeStamp:[self currentEventTime]
     560                                                      location:lastMousePosition];
     561#endif
    424562
    425563    NSView *targetView = [[mainFrame webView] hitTest:[event locationInWindow]];
     
    429567    targetView = targetView ? targetView : [[mainFrame frameView] documentView];
    430568    assert(targetView);
     569#if !PLATFORM(IOS)
    431570    [NSApp _setCurrentEvent:event];
     571#endif
    432572    [targetView mouseUp:event];
     573#if !PLATFORM(IOS)
    433574    [NSApp _setCurrentEvent:nil];
     575#endif
    434576    if (buttonNumber == LeftMouseButton)
    435577        leftMouseButtonDown = NO;
    436578    lastClick = [event timestamp];
    437579    lastClickPosition = lastMousePosition;
     580#if !PLATFORM(IOS)
    438581    if (draggingInfo) {
    439582        WebView *webView = [mainFrame webView];
     
    451594        draggingInfo = nil;
    452595    }
     596#endif
     597
     598#if PLATFORM(IOS)
     599    [event release];
     600#endif
    453601}
    454602
     
    472620
    473621    NSView *view = [mainFrame webView];
     622#if !PLATFORM(IOS)
    474623    lastMousePosition = [view convertPoint:NSMakePoint(x, [view frame].size.height - y) toView:nil];
    475624    NSEvent *event = [NSEvent mouseEventWithType:(leftMouseButtonDown ? NSLeftMouseDragged : NSMouseMoved)
     
    482631                                      clickCount:(leftMouseButtonDown ? clickCount : 0)
    483632                                        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)
    484639
    485640    NSView *subView = [[mainFrame webView] hitTest:[event locationInWindow]];
    486641    if (subView) {
     642#if !PLATFORM(IOS)
    487643        [NSApp _setCurrentEvent:event];
     644#endif
    488645        if (leftMouseButtonDown) {
     646#if !PLATFORM(IOS)
    489647            if (draggingInfo) {
    490648                // Per NSDragging.h: draggingSources may not implement draggedImage:movedTo:
     
    494652            } else
    495653                [subView mouseDragged:event];
     654#endif
    496655        } else
    497656            [subView mouseMoved:event];
     657#if !PLATFORM(IOS)
    498658        [NSApp _setCurrentEvent:nil];
    499     }
     659#endif
     660    }
     661
     662#if PLATFORM(IOS)
     663    [event release];
     664#endif
    500665}
    501666
    502667- (void)mouseScrollByX:(int)x andY:(int)y continuously:(BOOL)c
    503668{
     669#if !PLATFORM(IOS)
    504670    CGScrollEventUnit unit = c?kCGScrollEventUnitPixel:kCGScrollEventUnitLine;
    505671    CGEventRef cgScrollEvent = CGEventCreateScrollWheelEvent(NULL, unit, 2, y, x);
     
    521687        [NSApp _setCurrentEvent:nil];
    522688    }
     689#endif
    523690}
    524691
     
    535702- (NSArray *)contextClick
    536703{
     704#if !PLATFORM(IOS)
    537705    [[[mainFrame frameView] documentView] layout];
    538706    [self updateClickCountForButton:RightMouseButton];
     
    569737   
    570738    return menuItemStrings;
     739#else
     740    return nil;
     741#endif
    571742}
    572743
     
    768939
    769940    if ([character length] == 1 && [character characterAtIndex:0] >= 'A' && [character characterAtIndex:0] <= 'Z') {
     941#if !PLATFORM(IOS)
    770942        modifierFlags |= NSShiftKeyMask;
     943#else
     944        modifierFlags |= WebEventFlagMaskAlphaShift;
     945#endif
    771946        charactersIgnoringModifiers = [character lowercaseString];
    772947    }
     
    779954    [[[mainFrame frameView] documentView] layout];
    780955
     956#if !PLATFORM(IOS)
    781957    NSEvent *event = [NSEvent keyEventWithType:NSKeyDown
    782958                        location:NSMakePoint(5, 5)
     
    789965                        isARepeat:NO
    790966                        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)
    792981    [NSApp _setCurrentEvent:event];
     982#endif
    793983    [[[[mainFrame webView] window] firstResponder] keyDown:event];
     984#if !PLATFORM(IOS)
    794985    [NSApp _setCurrentEvent:nil];
    795 
     986#endif
     987
     988#if !PLATFORM(IOS)
    796989    event = [NSEvent keyEventWithType:NSKeyUp
    797990                        location:NSMakePoint(5, 5)
     
    804997                        isARepeat:NO
    805998                        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)
    8071014    [NSApp _setCurrentEvent:event];
     1015#endif
    8081016    [[[[mainFrame webView] window] firstResponder] keyUp:event];
     1017#if !PLATFORM(IOS)
    8091018    [NSApp _setCurrentEvent:nil];
     1019#endif
     1020
     1021#if PLATFORM(IOS)
     1022    [event release];
     1023#endif
    8101024}
    8111025
     
    9791193}
    9801194
     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
    9811350@end
  • trunk/Tools/DumpRenderTree/mac/FrameLoadDelegate.mm

    r154314 r162817  
    3232
    3333#import "AccessibilityController.h"
    34 #import "AppleScriptController.h"
    3534#import "EventSendingController.h"
    36 #import "Foundation/NSNotification.h"
    3735#import "GCController.h"
    38 #import "TestRunner.h"
    3936#import "NavigationController.h"
    4037#import "ObjCController.h"
    4138#import "ObjCPlugin.h"
    4239#import "ObjCPluginFunction.h"
     40#import "TestRunner.h"
    4341#import "TextInputController.h"
    4442#import "WebCoreTestSupport.h"
    4543#import "WorkQueue.h"
    4644#import "WorkQueueItem.h"
     45#import <Foundation/NSNotification.h>
    4746#import <JavaScriptCore/JavaScriptCore.h>
    4847#import <WebKitSystemInterface.h>
     
    5554#import <WebKit/WebViewPrivate.h>
    5655#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
    5764
    5865#ifndef NSEC_PER_MSEC
     
    112119        gcController = new GCController;
    113120        accessibilityController = new AccessibilityController;
     121#if !PLATFORM(IOS)
    114122        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(webViewProgressFinishedNotification:) name:WebViewProgressFinishedNotification object:nil];
     123#endif
    115124    }
    116125    return self;
     
    119128- (void)dealloc
    120129{
     130#if !PLATFORM(IOS)
    121131    [[NSNotificationCenter defaultCenter] removeObserver:self];
     132#endif
    122133    delete gcController;
    123134    delete accessibilityController;
     
    131142    if (topLoadingFrame)
    132143        return;
     144
     145#if PLATFORM(IOS)
     146    WebThreadLock();
     147#endif
    133148
    134149    // if we finish all the commands, we're ready to dump state
     
    213228        dispatch_time_t when = dispatch_time(DISPATCH_TIME_NOW, deferredWaitTime);
    214229        dispatch_after(when, dispatch_get_main_queue(), ^{
     230#if PLATFORM(IOS)
     231            WebThreadLock();
     232#endif
    215233            [sender setDefersCallbacks:NO];
    216234        });
     
    227245    ASSERT(![frame provisionalDataSource]);
    228246    ASSERT([frame dataSource]);
    229    
    230247    gTestRunner->setWindowIsKey(true);
     248#if !PLATFORM(IOS)
    231249    NSView *documentView = [[mainFrame frameView] documentView];
    232250    [[[mainFrame webView] window] makeFirstResponder:documentView];
     251#endif
    233252}
    234253
     
    316335    // Make Old-Style controllers
    317336
     337#if !PLATFORM(IOS)
    318338    WebView *webView = [frame webView];
     339#endif
    319340    WebScriptObject *obj = [frame windowObject];
     341#if !PLATFORM(IOS)
    320342    AppleScriptController *asc = [[AppleScriptController alloc] initWithWebView:webView];
    321343    [obj setValue:asc forKey:@"appleScriptController"];
    322344    [asc release];
     345#endif
    323346
    324347    EventSendingController *esc = [[EventSendingController alloc] init];
     
    340363    [pluginFunction release];
    341364
     365#if !PLATFORM(IOS)
     366// FIXME: <rdar://problem/5106287> DumpRenderTree: fix TextInputController to work with iOS and re-enable tests
    342367    TextInputController *tic = [[TextInputController alloc] initWithWebView:webView];
    343368    [obj setValue:tic forKey:@"textInputController"];
    344369    [tic release];
     370#endif
    345371}
    346372
  • trunk/Tools/DumpRenderTree/mac/HistoryDelegate.h

    r48917 r162817  
    2323 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2424 */
    25  
    26 #import <Cocoa/Cocoa.h>
     25
     26#import <Foundation/Foundation.h>
    2727
    2828@interface HistoryDelegate : NSObject
  • trunk/Tools/DumpRenderTree/mac/LayoutTestHelper.m

    r157057 r162817  
    3030 */
    3131
     32#if !PLATFORM(IOS)
     33
    3234#import <AppKit/AppKit.h>
    3335#import <ApplicationServices/ApplicationServices.h>
     
    205207    return 0;
    206208}
     209
     210#endif // !PLATFORM(IOS)
     211
     212#if PLATFORM(IOS)
     213int main(int argc, char* argv[])
     214{
     215    return 0;
     216}
     217#endif
  • trunk/Tools/DumpRenderTree/mac/MockGeolocationProvider.mm

    r133533 r162817  
    2626#import "config.h"
    2727#import "MockGeolocationProvider.h"
     28
     29#if PLATFORM(IOS)
     30#import <WebCore/WebCoreThreadRun.h>
     31#endif
    2832
    2933@implementation MockGeolocationProvider
     
    8993}
    9094
     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
    91117- (void)stopTimer
    92118{
     
    102128    HashSet<WebView*> views = _registeredViews;
    103129    for (HashSet<WebView*>::iterator iter = views.begin(); iter != views.end(); ++iter) {
     130#if !PLATFORM(IOS)
    104131        if (_hasError)
    105132            [*iter _geolocationDidFailWithMessage:_errorMessage.get()];
    106133        else
    107134            [*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
    108149    }
    109150}
  • trunk/Tools/DumpRenderTree/mac/NavigationController.h

    r25566 r162817  
    2727 */
    2828
    29 #import <Cocoa/Cocoa.h>
     29#import <Foundation/Foundation.h>
    3030#import <WebKit/WebView.h>
    3131
  • trunk/Tools/DumpRenderTree/mac/ObjCPlugin.h

    r29663 r162817  
    2424*/
    2525
    26 #import <Cocoa/Cocoa.h>
    27 
     26#import <Foundation/Foundation.h>
    2827
    2928@interface ObjCPlugin : NSObject
  • trunk/Tools/DumpRenderTree/mac/ObjCPlugin.m

    r135882 r162817  
    127127- (NSString *)classNameOfObject:(id)obj
    128128{
    129     return [obj className];
     129    return NSStringFromClass([obj class]);
    130130}
    131131
  • trunk/Tools/DumpRenderTree/mac/ObjCPluginFunction.h

    r29663 r162817  
    2424*/
    2525
    26 
    27 #import <Cocoa/Cocoa.h>
    28 
     26#import <Foundation/Foundation.h>
    2927
    3028@interface ObjCPluginFunction : NSObject
  • trunk/Tools/DumpRenderTree/mac/PolicyDelegate.h

    r125516 r162817  
    2727 */
    2828
    29 #import <Cocoa/Cocoa.h>
     29#import <Foundation/Foundation.h>
    3030
    3131class TestRunner;
  • trunk/Tools/DumpRenderTree/mac/ResourceLoadDelegate.h

    r29663 r162817  
    2727 */
    2828
    29 #import <Cocoa/Cocoa.h>
    30 
     29#import <Foundation/Foundation.h>
    3130
    3231@interface ResourceLoadDelegate : NSObject {
  • trunk/Tools/DumpRenderTree/mac/ResourceLoadDelegate.mm

    r153903 r162817  
    3333#import "TestRunner.h"
    3434#import <WebKit/WebKit.h>
    35 #import <WebKit/WebTypesInternal.h>
    3635#import <WebKit/WebDataSourcePrivate.h>
    3736#import <wtf/Assertions.h>
     
    249248- (void)webView: (WebView *)wv plugInFailedWithError:(NSError *)error dataSource:(WebDataSource *)dataSource
    250249{
     250#if !PLATFORM(IOS)
    251251    // The call to -display here simulates the "Plug-in not found" sheet that Safari shows.
    252252    // It is used for platform/mac/plugins/update-widget-from-style-recalc.html
    253253    [wv display];
     254#endif
    254255}
    255256
  • trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm

    r161666 r162817  
    6363#import <WebKit/WebHistory.h>
    6464#import <WebKit/WebHistoryPrivate.h>
    65 #import <WebKit/WebIconDatabasePrivate.h>
    6665#import <WebKit/WebInspectorPrivate.h>
    6766#import <WebKit/WebNSURLExtras.h>
     
    7372#import <WebKit/WebSecurityOriginPrivate.h>
    7473#import <WebKit/WebStorageManagerPrivate.h>
    75 #import <WebKit/WebTypesInternal.h>
    7674#import <WebKit/WebView.h>
    7775#import <WebKit/WebViewPrivate.h>
     
    8078#import <wtf/RetainPtr.h>
    8179
     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)
    8292@interface CommandValidationTarget : NSObject <NSValidatedUserInterfaceItem>
    8393{
     
    110120
    111121@end
     122#endif
    112123
    113124@interface WebGeolocationPosition (Internal)
     
    485496void TestRunner::setIconDatabaseEnabled(bool iconDatabaseEnabled)
    486497{
     498#if ENABLE(ICON_DATABASE)
    487499    // FIXME: Workaround <rdar://problem/6480108>
    488500    static WebIconDatabase *sharedWebIconDatabase = NULL;
     
    495507    }
    496508    [sharedWebIconDatabase setEnabled:iconDatabaseEnabled];
     509#endif
    497510}
    498511
    499512void TestRunner::setMainFrameIsFirstResponder(bool flag)
    500513{
     514#if !PLATFORM(IOS)
    501515    NSView *documentView = [[mainFrame frameView] documentView];
    502516   
    503517    NSResponder *firstResponder = flag ? documentView : nil;
    504518    [[[mainFrame webView] window] makeFirstResponder:firstResponder];
     519#endif
    505520}
    506521
     
    547562void TestRunner::setAutomaticLinkDetectionEnabled(bool enabled)
    548563{
     564#if !PLATFORM(IOS)
    549565    [[mainFrame webView] setAutomaticLinkDetectionEnabled:enabled];
     566#endif
    550567}
    551568
     
    554571    [[mainFrame webView] setTabKeyCyclesThroughElements:cycles];
    555572}
     573
     574#if PLATFORM(IOS)
     575void TestRunner::setTelephoneNumberParsingEnabled(bool enabled)
     576{
     577    [[[mainFrame webView] preferences] _setTelephoneNumberParsingEnabled:enabled];
     578}
     579
     580void TestRunner::setPagePaused(bool paused)
     581{
     582    [gWebBrowserView setPaused:paused];
     583}
     584#endif
    556585
    557586#if ENABLE(IOS_TEXT_AUTOSIZING)
     
    565594void TestRunner::setUseDashboardCompatibilityMode(bool flag)
    566595{
     596#if !PLATFORM(IOS)
    567597    [[mainFrame webView] _setDashboardBehavior:WebDashboardBehaviorUseBackwardCompatibilityMode to:flag];
     598#endif
    568599}
    569600
     
    706737bool TestRunner::isCommandEnabled(JSStringRef name)
    707738{
     739#if !PLATFORM(IOS)
    708740    RetainPtr<CFStringRef> nameCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, name));
    709741    NSString *nameNS = (NSString *)nameCF.get();
     
    726758        return true;
    727759    return [validator validateUserInterfaceItem:target.get()];
     760#else
     761    return false;
     762#endif
    728763}
    729764
     
    783818void TestRunner::showWebInspector()
    784819{
     820#if ENABLE(INSPECTOR)
    785821    [[[mainFrame webView] inspector] show:nil];
     822#endif
    786823}
    787824
    788825void TestRunner::closeWebInspector()
    789826{
     827#if ENABLE(INSPECTOR)
    790828    [[[mainFrame webView] inspector] close:nil];
     829#endif
    791830}
    792831
    793832void TestRunner::evaluateInWebInspector(long callId, JSStringRef script)
    794833{
     834#if ENABLE(INSPECTOR)
    795835    RetainPtr<CFStringRef> scriptCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, script));
    796836    NSString *scriptNS = (NSString *)scriptCF.get();
    797837    [[[mainFrame webView] inspector] evaluateInFrontend:nil callId:callId script:scriptNS];
     838#endif
    798839}
    799840
     
    880921@end
    881922
     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
    882997void TestRunner::apiTestNewWindowDataLoadBaseURL(JSStringRef utf8Data, JSStringRef baseURL)
    883998{
     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
    8841011    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    8851012
     
    9001027        [pool release];
    9011028    }
    902        
     1029
     1030#if PLATFORM(IOS)
     1031    [(DumpRenderTree *)[UIApplication sharedApplication] _waitForWebThread];
     1032#endif
     1033
    9031034    [webView close];
    9041035    [webView release];
     
    10031134void TestRunner::abortModal()
    10041135{
     1136#if !PLATFORM(IOS)
    10051137    [NSApp abortModal];
     1138#endif
    10061139}
    10071140
     
    10131146void TestRunner::setTextDirection(JSStringRef directionName)
    10141147{
     1148#if !PLATFORM(IOS)
    10151149    if (JSStringIsEqualToUTF8CString(directionName, "ltr"))
    10161150        [[mainFrame webView] makeBaseWritingDirectionLeftToRight:0];
     
    10191153    else
    10201154        ASSERT_NOT_REACHED();
     1155#endif
    10211156}
    10221157
    10231158void TestRunner::addChromeInputField()
    10241159{
     1160#if !PLATFORM(IOS)
    10251161    NSTextField *textField = [[NSTextField alloc] initWithFrame:NSMakeRect(0, 0, 100, 20)];
    10261162    textField.tag = 1;
     
    10301166    [textField setNextKeyView:[mainFrame webView]];
    10311167    [[mainFrame webView] setNextKeyView:textField];
     1168#endif
    10321169}
    10331170
    10341171void TestRunner::removeChromeInputField()
    10351172{
     1173#if !PLATFORM(IOS)
    10361174    NSView* textField = [[[[mainFrame webView] window] contentView] viewWithTag:1];
    10371175    if (textField) {
     
    10391177        focusWebView();
    10401178    }
     1179#endif
    10411180}
    10421181
    10431182void TestRunner::focusWebView()
    10441183{
     1184#if !PLATFORM(IOS)
    10451185    [[[mainFrame webView] window] makeFirstResponder:[mainFrame webView]];
     1186#endif
    10461187}
    10471188
    10481189void TestRunner::setBackingScaleFactor(double backingScaleFactor)
    10491190{
     1191#if !PLATFORM(IOS)
    10501192    [[mainFrame webView] _setCustomBackingScaleFactor:backingScaleFactor];
     1193#endif
    10511194}
    10521195
  • trunk/Tools/DumpRenderTree/mac/TextInputController.h

    r25566 r162817  
    2929#import <Foundation/Foundation.h>
    3030
     31#if !PLATFORM(IOS)
     32// FIXME: <rdar://problem/5106287> DumpRenderTree: fix TextInputController to work with iOS and re-enable tests
     33
    3134@class WebView;
    3235@class WebHTMLView;
     
    4144- (id)initWithWebView:(WebView *)view;
    4245@end
     46
     47#endif
  • trunk/Tools/DumpRenderTree/mac/TextInputController.m

    r154803 r162817  
    3030#import "TextInputController.h"
    3131
     32#if !PLATFORM(IOS)
     33// FIXME: <rdar://problem/5106287> DumpRenderTree: fix TextInputController to work with iOS and re-enable tests
     34
    3235#import "DumpRenderTreeMac.h"
    3336#import <AppKit/NSInputManager.h>
     
    525528
    526529@end
     530
     531#endif // !PLATFORM(IOS)
  • trunk/Tools/DumpRenderTree/mac/UIDelegate.h

    r81018 r162817  
    2727 */
    2828 
     29#if !PLATFORM(IOS)
    2930#import <Cocoa/Cocoa.h>
     31#else
     32#import <WebKit/WAKView.h>
     33#endif
    3034
    3135@interface UIDelegate : NSObject {
  • trunk/Tools/DumpRenderTree/mac/UIDelegate.mm

    r158447 r162817  
    4747#import <wtf/Assertions.h>
    4848
     49#if !PLATFORM(IOS)
    4950DumpRenderTreeDraggingInfo *draggingInfo = nil;
     51#endif
    5052
    5153@implementation UIDelegate
     
    8183- (void)modalWindowWillClose:(NSNotification *)notification
    8284{
     85#if !PLATFORM(IOS)
    8386    [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowWillCloseNotification object:nil];
    8487    [NSApp abortModal];
     88#endif
    8589}
    8690
    8791- (void)webViewRunModal:(WebView *)sender
    8892{
     93#if !PLATFORM(IOS)
    8994    gTestRunner->setWindowIsKey(false);
    9095    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(modalWindowWillClose:) name:NSWindowWillCloseNotification object:nil];
    9196    [NSApp runModalForWindow:[sender window]];
    9297    gTestRunner->setWindowIsKey(true);
     98#endif
    9399}
    94100
     
    124130
    125131
     132#if !PLATFORM(IOS)
    126133- (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
    127134{
     
    131138     [EventSendingController replaySavedEvents];
    132139}
     140#endif
    133141
    134142- (void)webViewFocus:(WebView *)webView
     
    273281- (BOOL)webView:(WebView *)webView supportsFullScreenForElement:(DOMElement*)element withKeyboard:(BOOL)withKeyboard
    274282{
     283#if PLATFORM(IOS)
     284    return NO;
     285#else
    275286    return YES;
    276 }
    277 
     287#endif
     288}
     289
     290#if ENABLE(FULLSCREEN_API)
    278291- (void)enterFullScreenWithListener:(NSObject<WebKitFullScreenListener>*)listener
    279292{
     
    305318    [listener webkitDidExitFullScreen];
    306319}
     320#endif
    307321
    308322- (BOOL)webView:(WebView *)webView didPressMissingPluginButton:(DOMElement *)element
     
    338352- (void)dealloc
    339353{
     354#if !PLATFORM(IOS)
    340355    [draggingInfo release];
    341356    draggingInfo = nil;
     357#endif
    342358    [m_pendingGeolocationPermissionListeners release];
    343359    m_pendingGeolocationPermissionListeners = nil;
Note: See TracChangeset for help on using the changeset viewer.