Title: [157631] trunk
Revision
157631
Author
[email protected]
Date
2013-10-18 04:26:29 -0700 (Fri, 18 Oct 2013)

Log Message

[ATK] Fix invalid signal to set objects to an unknown state "layout-complete"
https://bugs.webkit.org/show_bug.cgi?id=122970

Patch by Denis Nomiyama <[email protected]> on 2013-10-18
Reviewed by Mario Sanchez Prada.

Source/WebCore:

Removed an invalid signal to set objects to an unknown state
layout-complete. This signal was originally generated to notify DRT
and WKTR in case of page load complete.
It was replaced by ATK:AtkDocument:load-complete, which is already sent
by AXObjectCache::frameLoadingEventPlatformNotification().

There is no new test since the changes are covered by existing ones
(e.g. accessibility/loading-iframe-sends-notification.html).

* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::postPlatformNotification): Removed an invalid
signal to set objects to an unknown state layout-complete.

Tools:

Removed an invalid signal to set an object state to layout-complete
that does not exist. It was replaced by ATK:AtkDocument:load-complete.

* DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp:
(axObjectEventListener): Replaced layout-complete with load-complete.
(connectAccessibilityCallbacks): Connect callback to new listener for
ATK:AtkDocument:load-complete.
(disconnectAccessibilityCallbacks): Disconnect callback to new listener
for ATK:AtkDocument:load-complete.
* WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:
(axObjectEventListener): Replaced layout-complete with load-complete.
(WTR::AccessibilityNotificationHandler::connectAccessibilityCallbacks):
Connect callback to new listener for ATK:AtkDocument:load-complete.
(WTR::AccessibilityNotificationHandler::disconnectAccessibilityCallbacks):
Disconnect callback to new listener for ATK:AtkDocument:load-complete.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (157630 => 157631)


--- trunk/Source/WebCore/ChangeLog	2013-10-18 10:33:26 UTC (rev 157630)
+++ trunk/Source/WebCore/ChangeLog	2013-10-18 11:26:29 UTC (rev 157631)
@@ -1,3 +1,23 @@
+2013-10-18  Denis Nomiyama  <[email protected]>
+
+        [ATK] Fix invalid signal to set objects to an unknown state "layout-complete"
+        https://bugs.webkit.org/show_bug.cgi?id=122970
+
+        Reviewed by Mario Sanchez Prada.
+
+        Removed an invalid signal to set objects to an unknown state
+        layout-complete. This signal was originally generated to notify DRT
+        and WKTR in case of page load complete.
+        It was replaced by ATK:AtkDocument:load-complete, which is already sent
+        by AXObjectCache::frameLoadingEventPlatformNotification().
+
+        There is no new test since the changes are covered by existing ones
+        (e.g. accessibility/loading-iframe-sends-notification.html).
+
+        * accessibility/atk/AXObjectCacheAtk.cpp:
+        (WebCore::AXObjectCache::postPlatformNotification): Removed an invalid
+        signal to set objects to an unknown state layout-complete.
+
 2013-10-18  Carlos Garcia Campos  <[email protected]>
 
         [GTK] Generate API documentation for GObject DOM bindings

Modified: trunk/Source/WebCore/accessibility/atk/AXObjectCacheAtk.cpp (157630 => 157631)


--- trunk/Source/WebCore/accessibility/atk/AXObjectCacheAtk.cpp	2013-10-18 10:33:26 UTC (rev 157630)
+++ trunk/Source/WebCore/accessibility/atk/AXObjectCacheAtk.cpp	2013-10-18 11:26:29 UTC (rev 157631)
@@ -164,9 +164,7 @@
         atk_value_get_current_value(ATK_VALUE(axObject), &propertyValues.new_value);
 
         g_signal_emit_by_name(ATK_OBJECT(axObject), "property-change::accessible-value", &propertyValues, NULL);
-    } else if (notification == AXLayoutComplete)
-        g_signal_emit_by_name(axObject, "state-change", "layout-complete", true);
-    else if (notification == AXInvalidStatusChanged)
+    } else if (notification == AXInvalidStatusChanged)
         g_signal_emit_by_name(axObject, "state-change", "invalid-entry", coreObject->invalidStatus() != "false");
 }
 

Modified: trunk/Tools/ChangeLog (157630 => 157631)


--- trunk/Tools/ChangeLog	2013-10-18 10:33:26 UTC (rev 157630)
+++ trunk/Tools/ChangeLog	2013-10-18 11:26:29 UTC (rev 157631)
@@ -1,3 +1,26 @@
+2013-10-18  Denis Nomiyama  <[email protected]>
+
+        [ATK] Fix invalid signal to set objects to an unknown state "layout-complete"
+        https://bugs.webkit.org/show_bug.cgi?id=122970
+
+        Reviewed by Mario Sanchez Prada.
+
+        Removed an invalid signal to set an object state to layout-complete
+        that does not exist. It was replaced by ATK:AtkDocument:load-complete.
+
+        * DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp:
+        (axObjectEventListener): Replaced layout-complete with load-complete.
+        (connectAccessibilityCallbacks): Connect callback to new listener for
+        ATK:AtkDocument:load-complete.
+        (disconnectAccessibilityCallbacks): Disconnect callback to new listener
+        for ATK:AtkDocument:load-complete.
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:
+        (axObjectEventListener): Replaced layout-complete with load-complete.
+        (WTR::AccessibilityNotificationHandler::connectAccessibilityCallbacks):
+        Connect callback to new listener for ATK:AtkDocument:load-complete.
+        (WTR::AccessibilityNotificationHandler::disconnectAccessibilityCallbacks):
+        Disconnect callback to new listener for ATK:AtkDocument:load-complete.
+
 2013-10-18  Carlos Garcia Campos  <[email protected]>
 
         [GTK] Generate API documentation for GObject DOM bindings

Modified: trunk/Tools/DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp (157630 => 157631)


--- trunk/Tools/DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp	2013-10-18 10:33:26 UTC (rev 157630)
+++ trunk/Tools/DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp	2013-10-18 11:26:29 UTC (rev 157631)
@@ -56,6 +56,7 @@
 static guint childrenChangedListenerId = 0;
 static guint propertyChangedListenerId = 0;
 static guint visibleDataChangedListenerId = 0;
+static guint loadCompleteListenerId = 0;
 static NotificationHandlersMap notificationHandlers;
 static AccessibilityNotificationHandler* globalNotificationHandler = 0;
 
@@ -106,8 +107,6 @@
             notificationName = "CheckedStateChanged";
         else if (!g_strcmp0(g_value_get_string(&paramValues[1]), "invalid-entry"))
             notificationName = "AXInvalidStatusChanged";
-        else if (!g_strcmp0(g_value_get_string(&paramValues[1]), "layout-complete"))
-            notificationName = "AXLayoutComplete";
     } else if (!g_strcmp0(signalQuery.signal_name, "focus-event")) {
         signalName.set(g_strdup("focus-event"));
         signalValue.set(g_strdup_printf("%d", g_value_get_boolean(&paramValues[1])));
@@ -120,7 +119,9 @@
         signalName.set(g_strdup_printf("property-change:%s", g_quark_to_string(signalHint->detail)));
         if (!g_strcmp0(g_quark_to_string(signalHint->detail), "accessible-value"))
             notificationName = "AXValueChanged";
-    } else
+    } else if (!g_strcmp0(signalQuery.signal_name, "load-complete"))
+        notificationName = "AXLoadComplete";
+    else
         signalName.set(g_strdup(signalQuery.signal_name));
 
     if (loggingAccessibilityEvents)
@@ -178,6 +179,7 @@
     childrenChangedListenerId = atk_add_global_event_listener(axObjectEventListener, "ATK:AtkObject:children-changed");
     propertyChangedListenerId = atk_add_global_event_listener(axObjectEventListener, "ATK:AtkObject:property-change");
     visibleDataChangedListenerId = atk_add_global_event_listener(axObjectEventListener, "ATK:AtkObject:visible-data-changed");
+    loadCompleteListenerId = atk_add_global_event_listener(axObjectEventListener, "ATK:AtkDocument:load-complete");
 
     // Ensure the Atk interface types are registered, otherwise
     // the AtkDocument signal handlers below won't get registered.
@@ -218,6 +220,10 @@
         atk_remove_global_event_listener(visibleDataChangedListenerId);
         visibleDataChangedListenerId = 0;
     }
+    if (loadCompleteListenerId) {
+        atk_remove_global_event_listener(loadCompleteListenerId);
+        loadCompleteListenerId = 0;
+    }
 
     return true;
 }

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp (157630 => 157631)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp	2013-10-18 10:33:26 UTC (rev 157630)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp	2013-10-18 11:26:29 UTC (rev 157631)
@@ -43,6 +43,7 @@
 unsigned childrenChangedListenerId = 0;
 unsigned propertyChangedListenerId = 0;
 unsigned visibleDataChangedListenerId = 0;
+unsigned loadCompleteListenerId = 0;
 NotificationHandlersMap notificationHandlers;
 AccessibilityNotificationHandler* globalNotificationHandler = 0;
 bool loggingAccessibilityEvents = false;
@@ -93,8 +94,6 @@
             notificationName = "CheckedStateChanged";
         else if (!g_strcmp0(g_value_get_string(&paramValues[1]), "invalid-entry"))
             notificationName = "AXInvalidStatusChanged";
-        else if (!g_strcmp0(g_value_get_string(&paramValues[1]), "layout-complete"))
-            notificationName = "AXLayoutComplete";
     } else if (!g_strcmp0(signalQuery.signal_name, "focus-event")) {
         signalName.set(g_strdup("focus-event"));
         signalValue.set(g_strdup_printf("%d", g_value_get_boolean(&paramValues[1])));
@@ -107,7 +106,9 @@
         signalName.set(g_strdup_printf("property-change:%s", g_quark_to_string(signalHint->detail)));
         if (!g_strcmp0(g_quark_to_string(signalHint->detail), "accessible-value"))
             notificationName = "AXValueChanged";
-    } else
+    } else if (!g_strcmp0(signalQuery.signal_name, "load-complete"))
+        notificationName = "AXLoadComplete";
+    else
         signalName.set(g_strdup(signalQuery.signal_name));
 
     if (loggingAccessibilityEvents)
@@ -240,6 +241,7 @@
     childrenChangedListenerId = atk_add_global_event_listener(axObjectEventListener, "ATK:AtkObject:children-changed");
     propertyChangedListenerId = atk_add_global_event_listener(axObjectEventListener, "ATK:AtkObject:property-change");
     visibleDataChangedListenerId = atk_add_global_event_listener(axObjectEventListener, "ATK:AtkObject:visible-data-changed");
+    loadCompleteListenerId = atk_add_global_event_listener(axObjectEventListener, "ATK:AtkDocument:load-complete");
 }
 
 bool AccessibilityNotificationHandler::disconnectAccessibilityCallbacks()
@@ -273,7 +275,10 @@
         atk_remove_global_event_listener(visibleDataChangedListenerId);
         visibleDataChangedListenerId = 0;
     }
-
+    if (loadCompleteListenerId) {
+        atk_remove_global_event_listener(loadCompleteListenerId);
+        loadCompleteListenerId = 0;
+    }
     return true;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to