[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 11:26:32 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 3797db44cf81e8c084b36f310e7f310372aff86f
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jul 23 15:44:05 2010 +0000

    2010-07-23  Lucas De Marchi  <lucas.demarchi at profusion.mobi>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            Notify browser when window shall be closed.
    
            This is used for window.close() events Javascript, though it would be
            triggered for any event on WebCore that might ask for the window to be
            closed.
    
            https://bugs.webkit.org/show_bug.cgi?id=42890
    
            * WebCoreSupport/ChromeClientEfl.cpp:
            (WebCore::ChromeClientEfl::closeWindowSoon): call new function and moves its
            previous functionality there.
            * ewk/ewk_private.h:
            * ewk/ewk_view.cpp:
            (ewk_view_window_close): stop all loaders as was being done previously and
            notify browser afterwards.
            * ewk/ewk_view.h: declare new virtual method.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63978 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/efl/ChangeLog b/WebKit/efl/ChangeLog
index 2a0e5c4..f64bbee 100644
--- a/WebKit/efl/ChangeLog
+++ b/WebKit/efl/ChangeLog
@@ -1,3 +1,24 @@
+2010-07-23  Lucas De Marchi  <lucas.demarchi at profusion.mobi>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Notify browser when window shall be closed.
+
+        This is used for window.close() events Javascript, though it would be
+        triggered for any event on WebCore that might ask for the window to be
+        closed.
+
+        https://bugs.webkit.org/show_bug.cgi?id=42890
+
+        * WebCoreSupport/ChromeClientEfl.cpp:
+        (WebCore::ChromeClientEfl::closeWindowSoon): call new function and moves its
+        previous functionality there.
+        * ewk/ewk_private.h:
+        * ewk/ewk_view.cpp:
+        (ewk_view_window_close): stop all loaders as was being done previously and
+        notify browser afterwards.
+        * ewk/ewk_view.h: declare new virtual method.
+
 2010-07-23  Gyuyoung Kim  <gyuyoung.kim at samsung.com>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp b/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
index 4b01b75..ffbd642 100644
--- a/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
+++ b/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
@@ -231,7 +231,7 @@ void ChromeClientEfl::setResizable(bool)
 
 void ChromeClientEfl::closeWindowSoon()
 {
-    ewk_view_stop(m_view);
+    ewk_view_window_close(m_view);
 }
 
 bool ChromeClientEfl::canTakeFocus(FocusDirection)
diff --git a/WebKit/efl/ewk/ewk_private.h b/WebKit/efl/ewk/ewk_private.h
index de3b75c..2096e76 100644
--- a/WebKit/efl/ewk/ewk_private.h
+++ b/WebKit/efl/ewk/ewk_private.h
@@ -63,6 +63,7 @@ void ewk_view_load_progress_changed(Evas_Object *o);
 void ewk_view_load_show(Evas_Object* o);
 void ewk_view_restore_state(Evas_Object *o, Evas_Object *frame);
 Evas_Object *ewk_view_window_create(Evas_Object *o, Eina_Bool javascript, const WebCore::WindowFeatures* coreFeatures);
+void ewk_view_window_close(Evas_Object *o);
 
 void ewk_view_mouse_link_hover_in(Evas_Object *o, void *data);
 void ewk_view_mouse_link_hover_out(Evas_Object *o);
diff --git a/WebKit/efl/ewk/ewk_view.cpp b/WebKit/efl/ewk/ewk_view.cpp
index 333d136..32ebde9 100644
--- a/WebKit/efl/ewk/ewk_view.cpp
+++ b/WebKit/efl/ewk/ewk_view.cpp
@@ -3292,6 +3292,27 @@ Evas_Object* ewk_view_window_create(Evas_Object* o, Eina_Bool javascript, const
 
 /**
  * @internal
+ * Reports a window should be closed. It's client responsibility to decide if
+ * the window should in fact be closed. So, if only windows created by javascript
+ * are allowed to be closed by this call, browser needs to save the javascript
+ * flag when the window is created. Since a window can close itself (for example
+ * with a 'self.close()' in Javascript) browser must postpone the deletion to an
+ * idler.
+ *
+ * @param o View to be closed.
+ */
+void ewk_view_window_close(Evas_Object* o)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(o, sd);
+
+    ewk_view_stop(o);
+    if (!sd->api->window_close)
+        return;
+    sd->api->window_close(sd);
+}
+
+/**
+ * @internal
  * Reports mouse has moved over a link.
  *
  * Emits signal: "link,hover,in"
diff --git a/WebKit/efl/ewk/ewk_view.h b/WebKit/efl/ewk/ewk_view.h
index 520dea2..19a3588 100644
--- a/WebKit/efl/ewk/ewk_view.h
+++ b/WebKit/efl/ewk/ewk_view.h
@@ -100,6 +100,7 @@ struct _Ewk_View_Smart_Class {
     unsigned long version;
 
     Evas_Object *(*window_create)(Ewk_View_Smart_Data *sd, Eina_Bool javascript, const Ewk_Window_Features *window_features); /**< creates a new window, requested by webkit */
+    void (*window_close)(Ewk_View_Smart_Data *sd); /**< creates a new window, requested by webkit */
     // hooks to allow different backing stores
     Evas_Object *(*backing_store_add)(Ewk_View_Smart_Data *sd); /**< must be defined */
     Eina_Bool (*scrolls_process)(Ewk_View_Smart_Data *sd); /**< must be defined */
@@ -146,7 +147,7 @@ struct _Ewk_View_Smart_Class {
  * @see EWK_VIEW_SMART_CLASS_INIT_VERSION
  * @see EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION
  */
-#define EWK_VIEW_SMART_CLASS_INIT(smart_class_init) {smart_class_init, EWK_VIEW_SMART_CLASS_VERSION, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+#define EWK_VIEW_SMART_CLASS_INIT(smart_class_init) {smart_class_init, EWK_VIEW_SMART_CLASS_VERSION, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
 
 /**
  * Initializer to zero a whole Ewk_View_Smart_Class structure.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list