[EFL] Add basic DRT/Efl implementation to support viewport test.
authorryuan.choi@samsung.com <ryuan.choi@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Feb 2012 05:46:30 +0000 (05:46 +0000)
committerryuan.choi@samsung.com <ryuan.choi@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Feb 2012 05:46:30 +0000 (05:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=77320

Reviewed by Andreas Kling.

Source/WebKit/efl:

Add dumpConfigurationForViewport.

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

Tools:

* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
(LayoutTestController::dumpConfigurationForViewport): call dumpConfigurationForViewport().

LayoutTests:

Remove fast/viewport from Skipped and add some tests which aren't passed.
These skipped tests are also in qt/Skipped and gtk/Skipped.

* platform/efl/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106431 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 65578cb..ad4c367 100644 (file)
@@ -1,3 +1,15 @@
+2012-01-31  Ryuan Choi  <ryuan.choi@samsung.com>
+
+        [EFL] Add basic DRT/Efl implementation to support viewport test.
+        https://bugs.webkit.org/show_bug.cgi?id=77320
+
+        Reviewed by Andreas Kling.
+
+        Remove fast/viewport from Skipped and add some tests which aren't passed.
+        These skipped tests are also in qt/Skipped and gtk/Skipped.
+
+        * platform/efl/Skipped:
+
 2012-01-31  Joe Thomas  <joethomas@motorola.com>
 
         https://bugs.webkit.org/show_bug.cgi?id=76801
index 13ffcf2..05763eb 100644 (file)
@@ -825,8 +825,41 @@ editing/spelling/spelling-linebreak.html
 # EFL's LayoutTestController does not implement hasGrammarMarker
 editing/spelling/grammar.html
 
-# EFL's LayoutTestController does not implement dumpConfigurationForViewport
-fast/viewport
+# viewport meta tag tests that differ from the Opera results
+fast/viewport/viewport-65.html
+fast/viewport/viewport-82.html
+fast/viewport/viewport-84.html
+fast/viewport/viewport-87.html
+fast/viewport/viewport-126.html
+fast/viewport/viewport-127.html
+
+# viewport meta tag tests that fail on the bot for yet unknown reasons
+fast/viewport/viewport-6.html
+fast/viewport/viewport-58.html
+
+# REGRESSION(r99195)
+# https://bugs.webkit.org/show_bug.cgi?id=70609
+fast/viewport/viewport-18.html
+fast/viewport/viewport-36.html
+fast/viewport/viewport-37.html
+fast/viewport/viewport-43.html
+fast/viewport/viewport-46.html
+fast/viewport/viewport-52.html
+fast/viewport/viewport-53.html
+fast/viewport/viewport-54.html
+fast/viewport/viewport-55.html
+fast/viewport/viewport-60.html
+fast/viewport/viewport-75.html
+fast/viewport/viewport-76.html
+fast/viewport/viewport-83.html
+fast/viewport/viewport-86.html
+fast/viewport/viewport-121.html
+fast/viewport/viewport-122.html
+fast/viewport/viewport-125.html
+fast/viewport/viewport-129.html
+fast/viewport/viewport-warnings-3.html
+fast/viewport/viewport-warnings-4.html
+fast/viewport/viewport-warnings-6.html
 
 # EFL's LayoutTestController does not implement setSerializeHTTPLoads
 fast/loader/file-protocol-fragment.html
index b79c459..dd94c85 100644 (file)
@@ -1,3 +1,16 @@
+2012-01-31  Ryuan Choi  <ryuan.choi@samsung.com>
+
+        [EFL] Add basic DRT/Efl implementation to support viewport test.
+        https://bugs.webkit.org/show_bug.cgi?id=77320
+
+        Reviewed by Andreas Kling.
+
+        Add dumpConfigurationForViewport.
+
+        * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+        (DumpRenderTreeSupportEfl::dumpConfigurationForViewport):
+        * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
 2012-01-31  KwangHyuk Kim  <hyuki.kim@samsung.com>
 
         [EFL] Set content hint information for ewk_view_single.
index e7ceef1..1eb58d5 100644 (file)
@@ -385,3 +385,20 @@ void DumpRenderTreeSupportEfl::setMockScrollbarsEnabled(bool enable)
 {
     WebCore::Settings::setMockScrollbarsEnabled(enable);
 }
+
+void DumpRenderTreeSupportEfl::dumpConfigurationForViewport(Evas_Object* ewkView, int deviceDPI, const WebCore::IntSize& deviceSize, const WebCore::IntSize& availableSize)
+{
+    WebCore::Page* page = EWKPrivate::corePage(ewkView);
+
+    if (!page)
+        return;
+    WebCore::ViewportArguments arguments = page->mainFrame()->document()->viewportArguments();
+    WebCore::ViewportAttributes attributes = computeViewportAttributes(arguments,
+            /* default layout width for non-mobile pages */ 980,
+            deviceSize.width(), deviceSize.height(),
+            deviceDPI,
+            availableSize);
+    restrictMinimumScaleFactorToViewportSize(attributes, availableSize);
+    restrictScaleFactorToInitialScaleIfNotUserScalable(attributes);
+    fprintf(stdout, "viewport size %dx%d scale %f with limits [%f, %f] and userScalable %f\n", attributes.layoutSize.width(), attributes.layoutSize.height(), attributes.initialScale, attributes.minimumScale, attributes.maximumScale, attributes.userScalable);
+}
index d6f25ff..0ba342a 100644 (file)
@@ -74,6 +74,8 @@ public:
     static bool isTargetItem(const Ewk_History_Item*);
 
     static void setMockScrollbarsEnabled(bool);
+
+    static void dumpConfigurationForViewport(Evas_Object* ewkView, int deviceDPI, const WebCore::IntSize& deviceSize, const WebCore::IntSize& availableSize);
 };
 
 #endif // DumpRenderTreeSupportEfl_h
index 668629d..7643b00 100644 (file)
@@ -1,3 +1,13 @@
+2012-01-31  Ryuan Choi  <ryuan.choi@samsung.com>
+
+        [EFL] Add basic DRT/Efl implementation to support viewport test.
+        https://bugs.webkit.org/show_bug.cgi?id=77320
+
+        Reviewed by Andreas Kling.
+
+        * DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
+        (LayoutTestController::dumpConfigurationForViewport): call dumpConfigurationForViewport().
+
 2012-01-31  Alexey Proskuryakov  <ap@apple.com>
 
         REGRESSION (WebKit2): event.keyCode is always zero when typing in Russian
index 8dd0a37..90c2633 100644 (file)
@@ -734,9 +734,12 @@ bool LayoutTestController::hasGrammarMarker(int, int)
     return false;
 }
 
-void LayoutTestController::dumpConfigurationForViewport(int, int, int, int, int)
+void LayoutTestController::dumpConfigurationForViewport(int deviceDPI, int deviceWidth, int deviceHeight, int availableWidth, int availableHeight)
 {
-    notImplemented();
+    DumpRenderTreeSupportEfl::dumpConfigurationForViewport(browser->mainView(),
+            deviceDPI,
+            WebCore::IntSize(deviceWidth, deviceHeight),
+            WebCore::IntSize(availableWidth, availableHeight));
 }
 
 void LayoutTestController::setSerializeHTTPLoads(bool)