2011-04-08 Dominic Cooney <dominicc@google.com>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Apr 2011 09:26:02 +0000 (09:26 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Apr 2011 09:26:02 +0000 (09:26 +0000)
        Reviewed by Kent Tamura.

        layoutTestController.shadowRoot should return undefined if its
        argument is not an element.
        https://bugs.webkit.org/show_bug.cgi?id=58119

        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
        (DumpRenderTreeSupportGtk::shadowRoot):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83272 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp

index 7a26b5a..781ea1b 100644 (file)
@@ -1,3 +1,14 @@
+2011-04-08  Dominic Cooney  <dominicc@google.com>
+
+        Reviewed by Kent Tamura.
+
+        layoutTestController.shadowRoot should return undefined if its
+        argument is not an element.
+        https://bugs.webkit.org/show_bug.cgi?id=58119
+
+        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+        (DumpRenderTreeSupportGtk::shadowRoot):
+
 2011-04-08  Mario Sanchez Prada  <msanchez@igalia.com>
 
         Reviewed by Martin Robinson.
index 0dced64..6bc8829 100644 (file)
@@ -643,7 +643,7 @@ JSValueRef DumpRenderTreeSupportGtk::shadowRoot(JSContextRef context, JSValueRef
     JSC::ExecState* exec = toJS(context);
     Element* element = toElement(toJS(exec, value));
     if (!element)
-      return JSValueMakeNull(context);
+        return JSValueMakeUndefined(context);
 
     return toRef(exec, toJS(exec, element->shadowRoot()));
 }