2010-06-30 Gyuyoung Kim <gyuyoung.kim@samsung.com>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Jun 2010 13:03:40 +0000 (13:03 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Jun 2010 13:03:40 +0000 (13:03 +0000)
        Reviewed by Kenneth Rohde Christiansen.

        [EFL] Implement windowRect() and setWindowRect() in ChromeClientEfl.cpp
        https://bugs.webkit.org/show_bug.cgi?id=40876

        * efl/WebCoreSupport/ChromeClientEfl.cpp: Implements two methods
        to change window size.

        (WebCore::ChromeClientEfl::windowRect):
        (WebCore::ChromeClientEfl::setWindowRect):

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

WebKit/ChangeLog
WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp

index ba56e03..7ba39c3 100644 (file)
@@ -1,3 +1,16 @@
+2010-06-30  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [EFL] Implement windowRect() and setWindowRect() in ChromeClientEfl.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=40876
+
+        * efl/WebCoreSupport/ChromeClientEfl.cpp: Implements two methods
+        to change window size.
+
+        (WebCore::ChromeClientEfl::windowRect):
+        (WebCore::ChromeClientEfl::setWindowRect):
+
 2010-06-28  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
 
         Unreviewed build fix.
index 8ec65b9..5fef33e 100644 (file)
@@ -49,9 +49,9 @@
 #include "PlatformString.h"
 #include "WindowFeatures.h"
 #include "ewk_private.h"
-#include <wtf/text/CString.h>
-
+#include <Ecore_Evas.h>
 #include <Evas.h>
+#include <wtf/text/CString.h>
 
 using namespace WebCore;
 
@@ -87,13 +87,28 @@ void ChromeClientEfl::focusedNodeChanged(Node*)
 
 FloatRect ChromeClientEfl::windowRect()
 {
-    notImplemented();
-    return FloatRect();
+    Ecore_Evas* ee = 0;
+    int x, y, w, h;
+
+    if (!m_view)
+        return FloatRect();
+
+    ee = ecore_evas_ecore_evas_get(evas_object_evas_get(m_view));
+    ecore_evas_geometry_get(ee, &x, &y, &w, &h);
+    return FloatRect(x, y, w, h);
 }
 
 void ChromeClientEfl::setWindowRect(const FloatRect& rect)
 {
-    notImplemented();
+    Ecore_Evas* ee = 0;
+    IntRect intrect = IntRect(rect);
+
+    if (!m_view)
+        return;
+
+    ee = ecore_evas_ecore_evas_get(evas_object_evas_get(m_view));
+    ecore_evas_move(ee, intrect.x(), intrect.y());
+    ecore_evas_resize(ee, intrect.width(), intrect.height());
 }
 
 FloatRect ChromeClientEfl::pageRect()