Skip to content
  • alice.liu@apple.com's avatar
    Source/WebKit/mac: Add SPI to WebKit1 WebFrame for node conversion to JSValueRef · 15b028de
    alice.liu@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=105262
    
    Reviewed by Anders Carlsson.
    
    * WebView/WebFrame.mm:
    (-[WebFrame jsWrapper:forWorld:]): Added. Takes a DOMNode and WebScriptWorld and provides a JSValueRef
    for the WebCore::Node in that particular WebScriptWorld.
    * WebView/WebFramePrivate.h:
    
    Tools: Test for https://bugs.webkit.org/show_bug.cgi?id=105262
    Add SPI to WebKit1 WebFrame for node conversion to JSValueRef
    
    Reviewed by Anders Carlsson.
    
    * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Added file Tests/mac/JSWrapperForNodeInWebFrame.mm.mm
    * TestWebKitAPI/Tests/mac/JSWrapperForNodeInWebFrame.mm.mm: Added.
    (TestWebKitAPI::TEST): Tests for the correct JS wrapper for a DOMNode, provided a WebScriptWorld.
    Loads html with a single div element. In an isolated world, creates a property on that node.
    Also, in the standard world, creates a different property on that node.  Then tests for 4 things:
        - Existence of the isolated property in the isolated world.
        - Existence of the standard property in the standard world.
        - Non-existence of the isolated property in the standard world.
        - Non-existence of the standard property in the isolated world.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    15b028de