[EFL][WK2] Use C API inside ewk_security_origin
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Feb 2013 21:36:57 +0000 (21:36 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Feb 2013 21:36:57 +0000 (21:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=107923

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2013-02-18
Reviewed by Alexey Proskuryakov.

Use C API inside ewk_security_origin instead of accessing
directly internal C++ classes, to avoid breaking API
layering.

* UIProcess/API/efl/EwkView.cpp:
(EwkView::enterFullScreen):
* UIProcess/API/efl/ewk_security_origin.cpp:
(EwkSecurityOrigin::EwkSecurityOrigin):
* UIProcess/API/efl/ewk_security_origin_private.h:
(EwkSecurityOrigin::create):
(EwkSecurityOrigin):

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/efl/EwkView.cpp
Source/WebKit2/UIProcess/API/efl/ewk_security_origin.cpp
Source/WebKit2/UIProcess/API/efl/ewk_security_origin_private.h

index 60df332bb54a23ab2fcbe404a2b1dde72a30b302..3e4e9bb63e3ae368d303cced442a6bc03dd275d7 100644 (file)
@@ -1,3 +1,22 @@
+2013-02-18  Christophe Dumez  <christophe.dumez@intel.com>
+
+        [EFL][WK2] Use C API inside ewk_security_origin
+        https://bugs.webkit.org/show_bug.cgi?id=107923
+
+        Reviewed by Alexey Proskuryakov.
+
+        Use C API inside ewk_security_origin instead of accessing
+        directly internal C++ classes, to avoid breaking API
+        layering.
+
+        * UIProcess/API/efl/EwkView.cpp:
+        (EwkView::enterFullScreen):
+        * UIProcess/API/efl/ewk_security_origin.cpp:
+        (EwkSecurityOrigin::EwkSecurityOrigin):
+        * UIProcess/API/efl/ewk_security_origin_private.h:
+        (EwkSecurityOrigin::create):
+        (EwkSecurityOrigin):
+
 2013-01-04  Jer Noble  <jer.noble@apple.com>
 
         pinch-zooming webpage messes up full-screening of embedded video
index 73a0cf5c5de434979a2872ad5dd3c8f6d8bdfa15..f29df0cc928e5502e2d5411ff9369890c82a37c3 100644 (file)
@@ -616,7 +616,7 @@ void EwkView::enterFullScreen()
 {
     Ewk_View_Smart_Data* sd = smartData();
 
-    RefPtr<EwkSecurityOrigin> origin = EwkSecurityOrigin::create(KURL(ParsedURLString, String::fromUTF8(m_url)));
+    RefPtr<EwkSecurityOrigin> origin = EwkSecurityOrigin::create(m_url);
 
     if (!sd->api->fullscreen_enter || !sd->api->fullscreen_enter(sd, origin.get())) {
         Ecore_Evas* ecoreEvas = ecore_evas_ecore_evas_get(sd->base.evas);
index 60d8e39f8f25bf9274f5ef805958db4bbda8d9a6..184ad2f46903323bd32a8c27106894a65b4436b6 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "WKAPICast.h"
 #include "WKSecurityOrigin.h"
-#include "WebSecurityOrigin.h"
+#include "WKString.h"
 #include "ewk_security_origin_private.h"
 #include <WebCore/SecurityOrigin.h>
 
@@ -41,8 +41,8 @@ EwkSecurityOrigin::EwkSecurityOrigin(WKSecurityOriginRef originRef)
     , m_protocol(AdoptWK, WKSecurityOriginCopyProtocol(originRef))
 { }
 
-EwkSecurityOrigin::EwkSecurityOrigin(const KURL& url)
-    : m_wkOrigin(AdoptWK, toAPI(WebSecurityOrigin::create(SecurityOrigin::create(url)).leakRef()))
+EwkSecurityOrigin::EwkSecurityOrigin(const char* url)
+    : m_wkOrigin(AdoptWK, WKSecurityOriginCreateFromString(adoptWK(WKStringCreateWithUTF8CString(url)).get()))
     , m_host(AdoptWK, WKSecurityOriginCopyHost(m_wkOrigin.get()))
     , m_protocol(AdoptWK, WKSecurityOriginCopyProtocol(m_wkOrigin.get()))
 { }
index a2d3b317bac17b6ed2246d5a7e85a6770792f21a..e8bd4a03e9ac72915edcba62b08be808a629d654 100644 (file)
@@ -29,7 +29,6 @@
 #include "WKEinaSharedString.h"
 #include "WKSecurityOrigin.h"
 #include "ewk_object_private.h"
-#include <WebCore/KURL.h>
 #include <WebKit2/WKBase.h>
 #include <wtf/PassRefPtr.h>
 
@@ -42,7 +41,7 @@ public:
         return adoptRef(new EwkSecurityOrigin(originRef));
     }
 
-    static PassRefPtr<EwkSecurityOrigin> create(const WebCore::KURL& url)
+    static PassRefPtr<EwkSecurityOrigin> create(const char* url)
     {
         return adoptRef(new EwkSecurityOrigin(url));
     }
@@ -53,7 +52,7 @@ public:
 
 private:
     explicit EwkSecurityOrigin(WKSecurityOriginRef originRef);
-    explicit EwkSecurityOrigin(const WebCore::KURL& url);
+    explicit EwkSecurityOrigin(const char* url);
 
     WKRetainPtr<WKSecurityOriginRef> m_wkOrigin;
     WKEinaSharedString m_host;