Commit 82731cc9 authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

2011-04-08 Dominic Cooney <dominicc@google.com>

        Reviewed by Kent Tamura.

        Make WK2 layoutTestController.shadowRoot return undefined, not
        null, when its argument is not an element.
        https://bugs.webkit.org/show_bug.cgi?id=58121

        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
        (WTR::LayoutTestController::shadowRoot):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83270 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a1ad846d
2011-04-08 Dominic Cooney <dominicc@google.com>
Reviewed by Kent Tamura.
Make WK2 layoutTestController.shadowRoot return undefined, not
null, when its argument is not an element.
https://bugs.webkit.org/show_bug.cgi?id=58121
* WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
(WTR::LayoutTestController::shadowRoot):
2011-04-07 Dirk Pranke <dpranke@chromium.org>
Reviewed by Mihai Parparita.
......
......@@ -360,11 +360,11 @@ JSValueRef LayoutTestController::shadowRoot(JSValueRef element)
JSContextRef context = WKBundleFrameGetJavaScriptContext(mainFrame);
if (!element || !JSValueIsObject(context, element))
return JSValueMakeNull(context);
return JSValueMakeUndefined(context);
WKRetainPtr<WKBundleNodeHandleRef> domElement = adoptWK(WKBundleNodeHandleCreate(context, const_cast<JSObjectRef>(element)));
if (!domElement)
return JSValueMakeNull(context);
return JSValueMakeUndefined(context);
WKRetainPtr<WKBundleNodeHandleRef> shadowRootDOMElement = adoptWK(WKBundleNodeHandleCopyElementShadowRoot(domElement.get()));
if (!shadowRootDOMElement)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment