Get rid of Evas image object from Ewk_View_Smart_Data
authorPiotr Tworek <p.tworek@samsung.com>
Fri, 13 Mar 2015 09:17:25 +0000 (10:17 +0100)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
The actual image object is now created and managed inside
RenderWidgetHostViewEfl. The one left over in EWK layer is not used for
anything and should be removed.

Change-Id: I858b21f8d7b57cafe715a92fb370333f442103df
Signed-off-by: Piotr Tworek <p.tworek@samsung.com>
tizen_src/ewk/efl_integration/eweb_view.cc
tizen_src/ewk/efl_integration/eweb_view.h
tizen_src/ewk/efl_integration/private/ewk_view_private.cc
tizen_src/ewk/efl_integration/private/webview_delegate_ewk.cc
tizen_src/ewk/efl_integration/private/webview_delegate_ewk.h
tizen_src/ewk/efl_integration/public/ewk_view.h
tizen_src/ewk/efl_integration/tizen_webview/public/tw_webview_delegate.h

index 0948c24..4e42f80 100644 (file)
@@ -350,11 +350,6 @@ tizen_webview::WebView* EWebView::GetPublicWebView() {
   return public_webview_;
 }
 
-Evas_Object* EWebView::GetContentImageObject() const
-{
-  return WebViewDelegate::GetInstance()->GetContentImageEvasObject(evas_object_);
-}
-
 RenderWidgetHostViewEfl* EWebView::rwhv() const {
   return static_cast<RenderWidgetHostViewEfl*>(web_contents_->GetRenderWidgetHostView());
 }
@@ -2268,7 +2263,6 @@ void EWebView::InitializeContent() {
   WebContents* new_contents = create_new_window_web_contents_cb_.Run(this);
   if (!new_contents) {
     WebContents::CreateParams params(context_->browser_context());
-    params.context = GetContentImageObject();
     params.initial_size = gfx::Size(width, height);
     params.ewk_view = this;
     web_contents_.reset(WebContents::Create(params));
index e993a29..8e31d5b 100644 (file)
@@ -243,7 +243,6 @@ class EWebView {
   tizen_webview::WebContext* context() const { return context_.get(); }
   Evas_Object* evas_object() const { return evas_object_; }
   Evas* GetEvas() const { return evas_object_evas_get(evas_object_); }
-  Evas_Object* GetContentImageObject() const;
 
   content::WebContents& web_contents() const
   {
index 10a4b69..518fed5 100644 (file)
@@ -72,13 +72,6 @@ void handleEvasObjectAdd(Evas_Object* evas_object)
   parent_smart_class_.add(evas_object);
 
   d->priv = 0; // Will be initialized later.
-
-  // Create evas_object_image to draw web contents.
-  d->image = evas_object_image_add(d->base.evas);
-  evas_object_image_alpha_set(d->image, false);
-  evas_object_image_filled_set(d->image, true);
-  evas_object_smart_member_add(d->image, evas_object);
-  evas_object_show(d->image);
 }
 
 // Ewk_View_Smart_Class callback interface:
@@ -103,7 +96,6 @@ void handleEvasObjectShow(Evas_Object* o)
   // TODO: consider this when we will have AC support.
   if (evas_object_clipees_get(d->base.clipper))
     evas_object_show(d->base.clipper);
-  evas_object_show(d->image);
   wv->HandleShow();
 }
 
@@ -115,7 +107,6 @@ void handleEvasObjectHide(Evas_Object* o)
     return;
   }
   evas_object_hide(d->base.clipper);
-  evas_object_hide(d->image);
   // Deleting view by app results in calling hide method.
   // We assert that, RWHV is null only when renderer has crashed.
   /*if (!ToEWebView(d)->rwhv()) {
@@ -133,7 +124,6 @@ void handleEvasObjectMove(Evas_Object* o, Evas_Coord x, Evas_Coord y)
   if (!wv) {
     return;
   }
-  evas_object_move(d->image, x, y);
   wv->HandleMove(x, y);
   SmartDataChanged(d);
 }
@@ -145,9 +135,6 @@ void handleEvasObjectResize(Evas_Object* o, Evas_Coord width, Evas_Coord height)
   if (!wv) {
     return;
   }
-  evas_object_resize(d->image, width, height);
-  evas_object_image_size_set(d->image, width, height);
-  evas_object_image_fill_set(d->image, 0, 0, width, height);
   d->view.w = width;
   d->view.h = height;
   wv->HandleResize(width, height);
index 06738fc..0c491b0 100644 (file)
@@ -22,14 +22,6 @@ bool WebViewDelegateEwk::IsWebViewEvasObject(Evas_Object* evas_object) {
   return ::IsWebViewObject(evas_object);
 }
 
-Evas_Object* WebViewDelegateEwk::GetContentImageEvasObject(
-    Evas_Object* evas_object) {
-  if (!WebViewDelegateEwk::IsWebViewEvasObject(evas_object)) {
-    return NULL;
-  }
-  return GetEwkViewSmartDataFromEvasObject(evas_object)->image;
-}
-
 Evas_Object_Smart_Clipped_Data* WebViewDelegateEwk::GetSmartClippedData(
     Evas_Object* evas_object) {
   if (!WebViewDelegateEwk::IsWebViewEvasObject(evas_object)) {
index b15b81c..0e337c9 100644 (file)
@@ -18,7 +18,6 @@ struct WebViewDelegateEwk : public WebViewDelegate {
  protected:
   WebView* GetWebViewFromEvasObject(Evas_Object* evas_object);
   bool IsWebViewEvasObject(Evas_Object* evas_object);
-  Evas_Object* GetContentImageEvasObject(Evas_Object* evas_object);
   Evas_Object_Smart_Clipped_Data* GetSmartClippedData(Evas_Object* evas_object);
   Eina_Rectangle GetLastUsedViewPortArea(Evas_Object* evas_object);
 
index 592afde..573c0d2 100644 (file)
@@ -372,7 +372,6 @@ struct Ewk_View_Smart_Data {
     Evas_Object_Smart_Clipped_Data base;
     const Ewk_View_Smart_Class* api; /**< reference to casted class instance */
     Evas_Object* self; /**< reference to owner object */
-    Evas_Object* image; /**< reference to evas_object_image for drawing web contents */
     EwkViewImpl* priv; /**< should never be accessed, c++ stuff */
     struct {
         Evas_Coord x, y, w, h; /**< last used viewport */
index fe3ce10..0f00ab1 100644 (file)
@@ -36,9 +36,6 @@ class WebViewDelegate {
   // Check if |evas_object| is WebView or not.
   virtual bool IsWebViewEvasObject(Evas_Object* evas_object) = 0;
 
-  // Get the evas image object holded by WebView evas object.
-  virtual Evas_Object* GetContentImageEvasObject(Evas_Object* evas_object) = 0;
-
   // Get clipped data from WebView evas object which is a clipped smart object.
   virtual Evas_Object_Smart_Clipped_Data* GetSmartClippedData(
       Evas_Object* evas_object) = 0;