Skip to content
  • ggaren's avatar
    LayoutTests: · 54f8e1b6
    ggaren authored
            Reviewed by Maciej Stachowiak.
            
            Tests for more fix-ups to the WebScriptObject/WebScripting APIs, related to
            <rdar://problem/5140447> API for fetching JSGlobalContextRef from WebView 
            or WebFrame
    
            * fast/dom/wrapper-classes-expected.txt:
            * fast/dom/wrapper-classes.html: Added cases to test the wrapper classes
            for different data types sent across the JS/ObjC bridge.
            * fast/dom/wrapper-round-tripping-expected.txt: Added.
            * fast/dom/wrapper-round-tripping.html: Added. New test to verify that
            you can round-trip between a JSObjectRef and a WebScriptObject.
    
    WebCore:
    
            Reviewed by Maciej Stachowiak.
            
            More fix-ups to the WebScriptObject/WebScripting APIs, related to
            <rdar://problem/5140447> API for fetching JSGlobalContextRef from WebView 
            or WebFrame
    
            * bindings/objc/WebScriptObject.h: Fully specified the surprising rules for
            type conversion between JavaScript and ObjC.
            * bindings/objc/WebScriptObject.mm: Added up-call accessor to WebFrame.
            This is kind of stinky, but I'm OK with it because eventually all of this
            code should move up into WebKit.
            (+[WebScriptObject scriptObjectForJSObject:frame:]):
            (-[WebScriptObject valueForKey:]):
            (-[WebScriptObject JSObject]): 
                - Added _rootObject check because if _rootObject returns NULL it means 
                that _imp is no longer GC protected, so it's not safe to use. 
                - Added _isSafeScript check because that's what WebScriptObject methods
                typically do, even though the value of doing so isn't clear to me.
            * bindings/objc/WebScriptObjectPendingPublic.h: Added WebFrame* parameter
            to -scriptObjectForJSObject:. This is required to wrap JS objects that
            are not already in the wrapper cache. It would be nice to remove this
            limitation of WebScriptObject some day.
            * page/mac/FrameMac.mm:
            (WebCore::Frame::cleanupPlatformScriptObjects): Force removal of m_windowScriptObject
            from the cache, to avoid retrieving the m_windowScriptObject from the previous
            page on a new page load. (It would be non-functional in that case.)
    
    WebKitTools:
    
            Reviewed by Maciej Stachowiak.
            
            Added support for testing ObjC/JS type bridging.
            
            Added ASSERT that -JSObject returns nil when the underlying JSObject
            is no longer GC protected.
    
            * DumpRenderTree/DumpRenderTree.m:
            (returnThisCallback):
            (returnThisClass):
            (-[WaitUntilDoneDelegate webView:didClearWindowObject:forFrame:]):
            (+[LayoutTestController isSelectorExcludedFromWebScript:]):
            (+[LayoutTestController webScriptNameForSelector:]):
            (-[LayoutTestController accessStoredWebScriptObject]):
            (-[LayoutTestController testWrapperRoundTripping]):
            (-[LayoutTestController objCClassNameOf:]):
            (-[LayoutTestController objCObjectOfClass:]):
            * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@21354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    54f8e1b6