[EFL] Add setting API for author and user styles.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Apr 2012 07:27:27 +0000 (07:27 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Apr 2012 07:27:27 +0000 (07:27 +0000)
https://bugs.webkit.org/show_bug.cgi?id=82860

Patch by Kamil Blank <k.blank@samsung.com> on 2012-04-20
Reviewed by Daniel Bates.

Source/WebKit/efl:

Add missing implementation setAuthorAndUserStylesEnabled to EFL's
DumpRenderTreeSupport.

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:

Tools:

Implementation of setAuthorAndUserStylesEnabled.

* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
(LayoutTestController::setAuthorAndUserStylesEnabled):

LayoutTests:

Enable test connected with setAuthorAndUserStylesEnabled.

* platform/efl/Skipped:
* platform/efl/fast/css/disabled-author-styles-expected.txt: Added.

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

LayoutTests/ChangeLog
LayoutTests/platform/efl/Skipped
LayoutTests/platform/efl/fast/css/disabled-author-styles-expected.txt [new file with mode: 0644]
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp
Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h
Tools/ChangeLog
Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp

index 3f7b267..6ea5a3c 100644 (file)
@@ -1,3 +1,15 @@
+2012-04-20  Kamil Blank  <k.blank@samsung.com>
+
+        [EFL] Add setting API for author and user styles.
+        https://bugs.webkit.org/show_bug.cgi?id=82860
+
+        Reviewed by Daniel Bates.
+
+        Enable test connected with setAuthorAndUserStylesEnabled.
+
+        * platform/efl/Skipped:
+        * platform/efl/fast/css/disabled-author-styles-expected.txt: Added.
+
 2012-04-19  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
 
         [EFL] Missing keycode translation for space key
index 1e90c5a..bb33b13 100644 (file)
@@ -412,9 +412,6 @@ fast/frames/location-change-no-file-access.html
 fast/xmlhttprequest/xmlhttprequest-no-file-access.html
 fast/xmlhttprequest/xmlhttprequest-nonexistent-file.html
 
-# EFL's LayoutTestController does not implement setAuthorAndUserStylesEnabled
-fast/css/disabled-author-styles.html
-
 # EFL's LayoutTestController does not implement setJavaScriptProfilingEnabled
 fast/profiler
 
diff --git a/LayoutTests/platform/efl/fast/css/disabled-author-styles-expected.txt b/LayoutTests/platform/efl/fast/css/disabled-author-styles-expected.txt
new file mode 100644 (file)
index 0000000..35bee5c
--- /dev/null
@@ -0,0 +1,9 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {DIV} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 214x19
+          text run at (0,0) width 214: "This text should be black, not red."
+      RenderBlock {DIV} at (0,18) size 784x0
index 80c0c5d..8762b6f 100644 (file)
@@ -1,3 +1,15 @@
+2012-04-20  Kamil Blank  <k.blank@samsung.com>
+
+        [EFL] Add setting API for author and user styles.
+        https://bugs.webkit.org/show_bug.cgi?id=82860
+
+        Reviewed by Daniel Bates.
+
+        Add missing implementation setAuthorAndUserStylesEnabled to EFL's
+        DumpRenderTreeSupport.
+
+        * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+
 2012-04-19  Christophe Dumez  <christophe.dumez@intel.com>
 
         [EFL] dispatchDidCancelClientRedirect needs implementation
index dc99411..bbaeb89 100644 (file)
@@ -561,3 +561,12 @@ JSValueRef DumpRenderTreeSupportEfl::computedStyleIncludingVisitedInfo(JSContext
     RefPtr<WebCore::CSSComputedStyleDeclaration> style = WebCore::CSSComputedStyleDeclaration::create(element, true);
     return toRef(exec, toJS(exec, jsElement->globalObject(), style.get()));
 }
+
+void DumpRenderTreeSupportEfl::setAuthorAndUserStylesEnabled(Evas_Object* ewkView, bool enabled)
+{
+    WebCore::Page* corePage = EWKPrivate::corePage(ewkView);
+    if (!corePage)
+        return;
+
+    corePage->settings()->setAuthorAndUserStylesEnabled(enabled);
+}
index 06d9695..e68e284 100644 (file)
@@ -93,6 +93,7 @@ public:
     static String markerTextForListItem(JSContextRef, JSValueRef nodeObject);
     static void setInteractiveFormValidationEnabled(Evas_Object* ewkView, bool enabled);
     static JSValueRef computedStyleIncludingVisitedInfo(JSContextRef, JSValueRef);
+    static void setAuthorAndUserStylesEnabled(Evas_Object* ewkView, bool);
 };
 
 #endif // DumpRenderTreeSupportEfl_h
index 7f27cd0..8ea4413 100644 (file)
@@ -1,3 +1,15 @@
+2012-04-20  Kamil Blank  <k.blank@samsung.com>
+
+        [EFL] Add setting API for author and user styles.
+        https://bugs.webkit.org/show_bug.cgi?id=82860
+
+        Reviewed by Daniel Bates.
+
+        Implementation of setAuthorAndUserStylesEnabled.
+
+        * DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
+        (LayoutTestController::setAuthorAndUserStylesEnabled):
+
 2012-04-19  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
 
         [EFL] Missing keycode translation for space key
index 2a3d833..8c56074 100644 (file)
@@ -354,9 +354,9 @@ void LayoutTestController::setAllowFileAccessFromFileURLs(bool)
     notImplemented();
 }
 
-void LayoutTestController::setAuthorAndUserStylesEnabled(bool)
+void LayoutTestController::setAuthorAndUserStylesEnabled(bool flag)
 {
-    notImplemented();
+    DumpRenderTreeSupportEfl::setAuthorAndUserStylesEnabled(browser->mainView(), flag);
 }
 
 void LayoutTestController::setAutofilled(JSContextRef context, JSValueRef nodeObject, bool autofilled)