Title: [104562] trunk/Source/WebKit/efl
Revision
104562
Author
[email protected]
Date
2012-01-10 05:46:54 -0800 (Tue, 10 Jan 2012)

Log Message

[EFL] Add getter for Ewk_JS_Object::view.
https://bugs.webkit.org/show_bug.cgi?id=75868

Reviewed by Andreas Kling.

So far the view associated with a given JS object was a private
property only accessible to ewk itself. This does not make much sense,
as one often needs to know which view a certain method was invoked
from, for example.

* ewk/ewk_js.cpp:
(ewk_js_object_view_get):
* ewk/ewk_js.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/efl/ChangeLog (104561 => 104562)


--- trunk/Source/WebKit/efl/ChangeLog	2012-01-10 13:44:50 UTC (rev 104561)
+++ trunk/Source/WebKit/efl/ChangeLog	2012-01-10 13:46:54 UTC (rev 104562)
@@ -1,3 +1,19 @@
+2012-01-09  Raphael Kubo da Costa  <[email protected]>
+
+        [EFL] Add getter for Ewk_JS_Object::view.
+        https://bugs.webkit.org/show_bug.cgi?id=75868
+
+        Reviewed by Andreas Kling.
+
+        So far the view associated with a given JS object was a private
+        property only accessible to ewk itself. This does not make much sense,
+        as one often needs to know which view a certain method was invoked
+        from, for example.
+
+        * ewk/ewk_js.cpp:
+        (ewk_js_object_view_get):
+        * ewk/ewk_js.h:
+
 2012-01-06  JungJik Lee  <[email protected]>
 
         [EFL] Add new pre-rendering code.

Modified: trunk/Source/WebKit/efl/ewk/ewk_js.cpp (104561 => 104562)


--- trunk/Source/WebKit/efl/ewk/ewk_js.cpp	2012-01-10 13:44:50 UTC (rev 104561)
+++ trunk/Source/WebKit/efl/ewk/ewk_js.cpp	2012-01-10 13:46:54 UTC (rev 104562)
@@ -612,6 +612,13 @@
         free(jsObject);
 }
 
+Evas_Object* ewk_js_object_view_get(const Ewk_JS_Object* jsObject)
+{
+    EINA_SAFETY_ON_NULL_RETURN_VAL(jsObject, 0);
+    EINA_MAGIC_CHECK_OR_RETURN(jsObject, 0);
+    return jsObject->view;
+}
+
 Eina_Hash* ewk_js_object_properties_get(const Ewk_JS_Object* jsObject)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(jsObject, 0);
@@ -708,6 +715,11 @@
     return 0;
 }
 
+Evas_Object* ewk_js_object_view_get(const Ewk_JS_Object* jsObject)
+{
+    return 0;
+}
+
 void ewk_js_variant_free(Ewk_JS_Variant* jsVariant)
 {
 }

Modified: trunk/Source/WebKit/efl/ewk/ewk_js.h (104561 => 104562)


--- trunk/Source/WebKit/efl/ewk/ewk_js.h	2012-01-10 13:44:50 UTC (rev 104561)
+++ trunk/Source/WebKit/efl/ewk/ewk_js.h	2012-01-10 13:46:54 UTC (rev 104562)
@@ -119,6 +119,21 @@
 EAPI const char *ewk_js_object_name_get(const Ewk_JS_Object *obj);
 
 /**
+ * Returns the view associated with an Ewk_JS_Object.
+ *
+ * The returned view is the one passed to ewk_view_js_object_add. Right now,
+ * the object is always added to the view's main frame.
+ *
+ * @param obj The object to be queried.
+ *
+ * @return The view whose main frame the object has been inserted into, or
+ *         @c NULL if the object has not been added to a view yet.
+ *
+ * @sa ewk_view_js_object_add, ewk_view_frame_main_get
+ */
+EAPI Evas_Object *ewk_js_object_view_get(const Ewk_JS_Object *obj);
+
+/**
  * Release resources allocated by @a var.
  *
  * @param var @a Ewk_JS_Variant to be release
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to