2011-04-01 Dominic Cooney <dominicc@google.com>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Apr 2011 21:36:20 +0000 (21:36 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Apr 2011 21:36:20 +0000 (21:36 +0000)
        Reviewed by Martin Robinson.

        Add layoutTestController.shadowRoot to GTK DumpRenderTree.
        https://bugs.webkit.org/show_bug.cgi?id=57551

        * platform/gtk/Skipped: unskip test that accesses shadowRoot
2011-04-01  Dominic Cooney  <dominicc@google.com>

        Reviewed by Martin Robinson.

        Add layoutTestController.shadowRoot to GTK DumpRenderTree.
        https://bugs.webkit.org/show_bug.cgi?id=57551

        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
        (DumpRenderTreeSupportGtk::shadowRoot):
        * WebCoreSupport/DumpRenderTreeSupportGtk.h:
2011-04-01  Dominic Cooney  <dominicc@google.com>

        Reviewed by Martin Robinson.

        Add layoutTestController.shadowRoot to GTK DumpRenderTree.
        https://bugs.webkit.org/show_bug.cgi?id=57551

        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
        (LayoutTestController::shadowRoot):

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

LayoutTests/ChangeLog
LayoutTests/platform/gtk/Skipped
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
Tools/ChangeLog
Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp

index 98a71420ed26cbbcd27dd596b3c0444f8edeaed0..41a1b9ac4e8433a1d93a7074a0bb2d3ac4b07d11 100644 (file)
@@ -1,3 +1,12 @@
+2011-04-01  Dominic Cooney  <dominicc@google.com>
+
+        Reviewed by Martin Robinson.
+
+        Add layoutTestController.shadowRoot to GTK DumpRenderTree.
+        https://bugs.webkit.org/show_bug.cgi?id=57551
+
+        * platform/gtk/Skipped: unskip test that accesses shadowRoot
+
 2011-04-01  Darin Adler  <darin@apple.com>
 
         Removed some more executable bits from files that don't need them.
 2011-04-01  Darin Adler  <darin@apple.com>
 
         Removed some more executable bits from files that don't need them.
index 6c872350f566b51dafeb063c4b7261594140a0f4..9a5809fe91a81cf05f00776aa17e1b34ae3d5906 100644 (file)
@@ -474,10 +474,6 @@ fast/canvas/patternfill-repeat.html
 # https://bugs.webkit.org/show_bug.cgi?id=54136
 fast/html/keygen.html
 
 # https://bugs.webkit.org/show_bug.cgi?id=54136
 fast/html/keygen.html
 
-# layoutTestController does not implement shadowRoot accessor
-# See https://bugs.webkit.org/show_bug.cgi?id=56573
-fast/dom/HTMLKeygenElement/keygen.html
-
 # [GTK] GTK+ does not support hyphenation
 # https://bugs.webkit.org/show_bug.cgi?id=44478
 fast/text/hyphenate-character.html
 # [GTK] GTK+ does not support hyphenation
 # https://bugs.webkit.org/show_bug.cgi?id=44478
 fast/text/hyphenate-character.html
index f1d79e4ebc759c9ad6efa6f99b2eff7de0bbd4cb..33ecdee3cbe6a6a7b35d0e5b98200db6f51682b3 100644 (file)
@@ -1,3 +1,14 @@
+2011-04-01  Dominic Cooney  <dominicc@google.com>
+
+        Reviewed by Martin Robinson.
+
+        Add layoutTestController.shadowRoot to GTK DumpRenderTree.
+        https://bugs.webkit.org/show_bug.cgi?id=57551
+
+        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+        (DumpRenderTreeSupportGtk::shadowRoot):
+        * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+
 2011-03-31  Xan Lopez  <xlopez@igalia.com>
 
         Reviewed by Martin Robinson.
 2011-03-31  Xan Lopez  <xlopez@igalia.com>
 
         Reviewed by Martin Robinson.
index 1336f11861ae04eea8640c3af21b0961a657463e..6d9493843591a572555dfb863cd31baed2e49086 100644 (file)
@@ -28,6 +28,7 @@
 #include "AnimationController.h"
 #include "DOMWrapperWorld.h"
 #include "Document.h"
 #include "AnimationController.h"
 #include "DOMWrapperWorld.h"
 #include "Document.h"
+#include "Element.h"
 #include "FocusController.h"
 #include "FrameLoaderClientGtk.h"
 #include "FrameTree.h"
 #include "FocusController.h"
 #include "FrameLoaderClientGtk.h"
 #include "FrameTree.h"
@@ -636,6 +637,16 @@ void DumpRenderTreeSupportGtk::clearOpener(WebKitWebFrame* frame)
         coreFrame->loader()->setOpener(0);
 }
 
         coreFrame->loader()->setOpener(0);
 }
 
+JSValueRef DumpRenderTreeSupportGtk::shadowRoot(JSContextRef context, JSValueRef value)
+{
+    JSC::ExecState* exec = toJS(context);
+    Element* element = toElement(toJS(exec, value));
+    if (!element)
+      return JSValueMakeNull(context);
+
+    return toRef(exec, toJS(exec, element->shadowRoot()));
+}
+
 unsigned int DumpRenderTreeSupportGtk::workerThreadCount()
 {
 #if ENABLE(WORKERS)
 unsigned int DumpRenderTreeSupportGtk::workerThreadCount()
 {
 #if ENABLE(WORKERS)
index 7ad5af60e2970c83e24c6241df859e2a83fa8609..d8dd09ff7a48feedbec76cf6ea59e0791f2c440b 100644 (file)
@@ -61,6 +61,8 @@ public:
 
     static void clearOpener(WebKitWebFrame*);
 
 
     static void clearOpener(WebKitWebFrame*);
 
+    static JSValueRef shadowRoot(JSContextRef, JSValueRef);
+
     // FIXME: Move these to webkitwebframe.h once their API has been discussed.
     static GSList* getFrameChildren(WebKitWebFrame*);
     static WTF::CString getInnerText(WebKitWebFrame*);
     // FIXME: Move these to webkitwebframe.h once their API has been discussed.
     static GSList* getFrameChildren(WebKitWebFrame*);
     static WTF::CString getInnerText(WebKitWebFrame*);
index 9036736d1ce2832abe329a088a56767efc4fe6a0..642b345d608d1207b62cf696a5d7aa766205ea8b 100644 (file)
@@ -1,3 +1,13 @@
+2011-04-01  Dominic Cooney  <dominicc@google.com>
+
+        Reviewed by Martin Robinson.
+
+        Add layoutTestController.shadowRoot to GTK DumpRenderTree.
+        https://bugs.webkit.org/show_bug.cgi?id=57551
+
+        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+        (LayoutTestController::shadowRoot):
+
 2011-04-01  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Anders Carlsson.
 2011-04-01  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Anders Carlsson.
index 849205a3efc46041328a75b5ef46549cb1873b01..0979dd5c036e5cd9a1765fbf9c589e7c6e0120a1 100644 (file)
@@ -917,10 +917,9 @@ void LayoutTestController::setEditingBehavior(const char* editingBehavior)
         g_object_set(G_OBJECT(settings), "editing-behavior", WEBKIT_EDITING_BEHAVIOR_UNIX, NULL);
 }
 
         g_object_set(G_OBJECT(settings), "editing-behavior", WEBKIT_EDITING_BEHAVIOR_UNIX, NULL);
 }
 
-JSValueRef LayoutTestController::shadowRoot(JSContextRef context, JSValueRef jsElement)
+JSValueRef LayoutTestController::shadowRoot(JSContextRef context, JSValueRef element)
 {
 {
-    // FIXME: Implement this.
-    return JSValueMakeUndefined(context);
+    return DumpRenderTreeSupportGtk::shadowRoot(context, element);
 }
 
 void LayoutTestController::abortModal()
 }
 
 void LayoutTestController::abortModal()