[EFL] LayoutTestController needs implementation of addUserStyleSheet
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Apr 2012 15:35:37 +0000 (15:35 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Apr 2012 15:35:37 +0000 (15:35 +0000)
https://bugs.webkit.org/show_bug.cgi?id=82446

Source/WebKit/efl:

Add missing implementation addUserStyleSheet to EFL's
DumpRenderTreeSupport.

Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> on 2012-04-10
Reviewed by Antonio Gomes.

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::addUserStyleSheet):
* WebCoreSupport/DumpRenderTreeSupportEfl.h:

Tools:

Adding missing implementation addUserStyleSheet to EFL's LayoutTestController
so that we can unskip related tests from the skip list.

Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> on 2012-04-10
Reviewed by Antonio Gomes.

* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
(LayoutTestController::addUserStyleSheet): Implemented.

LayoutTests:

Unskipping the following test cases:
userscripts/mixed-case-stylesheet.html
userscripts/user-style-all-frames.html
userscripts/simple-stylesheet.html
userscripts/script-run-at-end.html

Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> on 2012-04-10
Reviewed by Antonio Gomes.

* platform/efl/Skipped:

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

LayoutTests/ChangeLog
LayoutTests/platform/efl/Skipped
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp
Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h
Tools/ChangeLog
Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp

index ebd94c3..81fb5ee 100644 (file)
@@ -1,3 +1,18 @@
+2012-04-10  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
+
+        [EFL] LayoutTestController needs implementation of addUserStyleSheet
+        https://bugs.webkit.org/show_bug.cgi?id=82446
+
+        Unskipping the following test cases:
+        userscripts/mixed-case-stylesheet.html 
+        userscripts/user-style-all-frames.html
+        userscripts/simple-stylesheet.html 
+        userscripts/script-run-at-end.html
+
+        Reviewed by Antonio Gomes.
+
+        * platform/efl/Skipped:
+
 2012-04-10  Csaba Osztrogonác  <ossy@webkit.org>
 
         [Qt][WK2] Unreviewed gardening, skip a test to try to paint the bot greener.
index 7059504..446b7e2 100644 (file)
@@ -632,11 +632,18 @@ loader/go-back-to-different-window-size.html
 media/restore-from-page-cache.html
 
 # EFL's LayoutTestController does not implement addUserScript
-userscripts
-
-# EFL's LayoutTestController does not implement addUserStyleSheet
-#userscripts
-printing/page-rule-selection.html
+userscripts/document-element-available-at-start.html
+userscripts/script-not-run-for-fragments.html
+userscripts/script-run-at-start.html
+userscripts/user-script-all-frames.html
+userscripts/user-script-audio-document.html
+userscripts/user-script-image-document.html
+userscripts/user-script-plugin-document.html
+userscripts/user-script-top-frame-only.html
+userscripts/user-script-video-document.html
+userscripts/user-style-top-frame-only.html
+userscripts/window-onerror-for-isolated-world-1.html
+userscripts/window-onerror-for-isolated-world-2.html
 
 # EFL's LayoutTestController does not implement setAsynchronousSpellCheckingEnabled
 editing/spelling/spellcheck-paste.html
index c9feeca..43de065 100644 (file)
@@ -1,3 +1,17 @@
+2012-04-10  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
+
+        [EFL] LayoutTestController needs implementation of addUserStyleSheet
+        https://bugs.webkit.org/show_bug.cgi?id=82446
+
+        Add missing implementation addUserStyleSheet to EFL's
+        DumpRenderTreeSupport.
+
+        Reviewed by Antonio Gomes.
+
+        * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+        (DumpRenderTreeSupportEfl::addUserStyleSheet):
+        * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
 2012-04-04  Raphael Kubo da Costa  <rakuco@webkit.org>
 
         Another unreviewed attempt at getting the EFL build bot to a
index 8ccf188..b7617c8 100644 (file)
@@ -37,6 +37,7 @@
 #include <IntRect.h>
 #include <JSCSSStyleDeclaration.h>
 #include <JSElement.h>
+#include <PageGroup.h>
 #include <PrintContext.h>
 #include <RenderTreeAsText.h>
 #include <Settings.h>
@@ -350,6 +351,15 @@ void DumpRenderTreeSupportEfl::setDefersLoading(Evas_Object* ewkView, bool defer
     page->setDefersLoading(defers);
 }
 
+void DumpRenderTreeSupportEfl::addUserStyleSheet(const Evas_Object* ewkView, const char* sourceCode, bool allFrames)
+{
+    WebCore::Page* page = EWKPrivate::corePage(ewkView);
+    if (!page)
+        return;
+
+    page->group().addUserStyleSheetToWorld(WebCore::mainThreadNormalWorld(), sourceCode, WebCore::KURL(), nullptr, nullptr, allFrames ? WebCore::InjectInAllFrames : WebCore::InjectInTopFrameOnly);
+}
+
 bool DumpRenderTreeSupportEfl::findString(const Evas_Object* ewkView, const char* text, WebCore::FindOptions options)
 {
     WebCore::Page* page = EWKPrivate::corePage(ewkView);
index 606767d..b43349a 100644 (file)
@@ -68,6 +68,7 @@ public:
     static void setAutofilled(JSContextRef, JSValueRef nodeObject, bool autofilled);
     static void setDefersLoading(Evas_Object* ewkView, bool defers);
 
+    static void addUserStyleSheet(const Evas_Object* ewkView, const char* sourceCode, bool allFrames);
     static bool findString(const Evas_Object* ewkView, const char* text, WebCore::FindOptions);
     static void setSmartInsertDeleteEnabled(Evas_Object* ewkView, bool enabled);
     static void setSelectTrailingWhitespaceEnabled(Evas_Object* ewkView, bool enabled);
index 2d8215f..c4cfe44 100644 (file)
@@ -1,3 +1,16 @@
+2012-04-10  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
+
+        [EFL] LayoutTestController needs implementation of addUserStyleSheet
+        https://bugs.webkit.org/show_bug.cgi?id=82446
+
+        Adding missing implementation addUserStyleSheet to EFL's LayoutTestController 
+        so that we can unskip related tests from the skip list. 
+
+        Reviewed by Antonio Gomes.
+
+        * DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
+        (LayoutTestController::addUserStyleSheet): Implemented.
+
 2012-04-10  Philip Rogers  <pdr@google.com>
 
         Adding myself to committers.py!
index 7aa527c..873acba 100644 (file)
@@ -655,10 +655,9 @@ void LayoutTestController::addUserScript(JSStringRef, bool, bool)
     notImplemented();
 }
 
-void LayoutTestController::addUserStyleSheet(JSStringRef, bool)
+void LayoutTestController::addUserStyleSheet(JSStringRef source, bool allFrames)
 {
-    // FIXME: needs more investigation why userscripts/user-style-top-frame-only.html fails when allFrames is false.
-    notImplemented();
+    DumpRenderTreeSupportEfl::addUserStyleSheet(browser->mainView(), source->ustring().utf8().data(), allFrames);
 }
 
 void LayoutTestController::setDeveloperExtrasEnabled(bool enabled)