platform/mac/accessibility/aria-multiline.html sometimes asserts in AccessibilityCont...
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Jan 2014 21:54:16 +0000 (21:54 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Jan 2014 21:54:16 +0000 (21:54 +0000)
https://bugs.webkit.org/show_bug.cgi?id=127141

Reviewed by Alexey Proskuryakov.

Make sure to reset the notification handler each time.

* DumpRenderTree/AccessibilityController.cpp:
(AccessibilityController::resetToConsistentState):
* DumpRenderTree/AccessibilityController.h:
* DumpRenderTree/atk/AccessibilityControllerAtk.cpp:
(AccessibilityController::platformResetToConsistentState):
* DumpRenderTree/ios/AccessibilityControllerIOS.mm:
(AccessibilityController::platformResetToConsistentState):
* DumpRenderTree/mac/AccessibilityControllerMac.mm:
(AccessibilityController::~AccessibilityController):
(AccessibilityController::platformResetToConsistentState):
(AccessibilityController::removeNotificationListener):
* DumpRenderTree/win/AccessibilityControllerWin.cpp:
(AccessibilityController::platformResetToConsistentState):

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

Tools/ChangeLog
Tools/DumpRenderTree/AccessibilityController.cpp
Tools/DumpRenderTree/AccessibilityController.h
Tools/DumpRenderTree/atk/AccessibilityControllerAtk.cpp
Tools/DumpRenderTree/ios/AccessibilityControllerIOS.mm
Tools/DumpRenderTree/mac/AccessibilityControllerMac.mm
Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp

index 4ea5c104754d523ac72570a7b5046573fb399a88..63db8549715f61dbbfcf84607c6fc66afc7c89d7 100644 (file)
@@ -1,3 +1,26 @@
+2014-01-17  Chris Fleizach  <cfleizach@apple.com>
+
+        platform/mac/accessibility/aria-multiline.html sometimes asserts in AccessibilityController::removeNotificationListener
+        https://bugs.webkit.org/show_bug.cgi?id=127141
+
+        Reviewed by Alexey Proskuryakov.
+
+        Make sure to reset the notification handler each time.
+
+        * DumpRenderTree/AccessibilityController.cpp:
+        (AccessibilityController::resetToConsistentState):
+        * DumpRenderTree/AccessibilityController.h:
+        * DumpRenderTree/atk/AccessibilityControllerAtk.cpp:
+        (AccessibilityController::platformResetToConsistentState):
+        * DumpRenderTree/ios/AccessibilityControllerIOS.mm:
+        (AccessibilityController::platformResetToConsistentState):
+        * DumpRenderTree/mac/AccessibilityControllerMac.mm:
+        (AccessibilityController::~AccessibilityController):
+        (AccessibilityController::platformResetToConsistentState):
+        (AccessibilityController::removeNotificationListener):
+        * DumpRenderTree/win/AccessibilityControllerWin.cpp:
+        (AccessibilityController::platformResetToConsistentState):
+
 2014-01-17  Alberto Garcia  <berto@igalia.com>
 
         [GTK] Test /webkit/download/not-found fails in GTK Linux 64-bit Release bot
index fa139fb428fdf174d00b7035c33041aba7f863c4..dd9996be8bac42a878f274faf095fba4d0b0b7ae 100644 (file)
@@ -174,5 +174,6 @@ void AccessibilityController::resetToConsistentState()
     setLogValueChangeEvents(false);
     setLogScrollingStartEvents(false);
     setLogAccessibilityEvents(false);
+    platformResetToConsistentState();
 }
 #endif // HAVE(ACCESSIBILITY)
index d3d41f88faa791752e44764b503dbadf8e29094c..2f4f6ae9e00fc97f74fa87adfb1d8983fe439c38 100644 (file)
@@ -96,6 +96,8 @@ private:
 #if HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
     RefPtr<AccessibilityNotificationHandler> m_globalNotificationHandler;
 #endif
+    
+    void platformResetToConsistentState();
 };
 
 #endif // AccessibilityController_h
index 7c211d33a3437c3d7a59823fc563110ddd97184c..d8d0fc96c823d9597a42dadcd0c8e446d55f6be8 100644 (file)
@@ -52,6 +52,9 @@ AccessibilityUIElement AccessibilityController::elementAtPoint(int x, int y)
     return nullptr;
 }
 
+void AccessibilityController::platformResetToConsistentState()
+{
+}
 
 void AccessibilityController::setLogFocusEvents(bool)
 {
index b2e235493cceb738b79df851f642ba75c4eb5b41..a31cb8671ad831da544140eb4038385a34bf55a7 100644 (file)
@@ -121,6 +121,10 @@ bool AccessibilityController::addNotificationListener(JSObjectRef functionCallba
     return false;
 }
 
+void AccessibilityController::platformResetToConsistentState()
+{
+}
+
 void AccessibilityController::removeNotificationListener()
 {
 }
index 090b1bf9980883e88d72815bc2ade0ef48935798..e1b21c3fdd8ac974a0b3e26631a3573533cec82e 100644 (file)
@@ -44,7 +44,8 @@ AccessibilityController::AccessibilityController()
 
 AccessibilityController::~AccessibilityController()
 {
-    m_globalNotificationHandler.clear();
+    // ResetToConsistentState should have cleared this already.
+    ASSERT(!m_globalNotificationHandler);
 }
 
 AccessibilityUIElement AccessibilityController::elementAtPoint(int x, int y)
@@ -118,6 +119,11 @@ void AccessibilityController::setLogAccessibilityEvents(bool)
 {
 }
 
+void AccessibilityController::platformResetToConsistentState()
+{
+    m_globalNotificationHandler.clear();
+}
+
 bool AccessibilityController::addNotificationListener(JSObjectRef functionCallback)
 {
     if (!functionCallback)
@@ -136,9 +142,7 @@ bool AccessibilityController::addNotificationListener(JSObjectRef functionCallba
 
 void AccessibilityController::removeNotificationListener()
 {
-    // Mac programmers should not be trying to remove a listener that's already removed.
-    ASSERT(m_globalNotificationHandler);
-    m_globalNotificationHandler.clear();
+    // No longer a need to cleanup for tests, since resetToConsistentState will remove the listener.
 }
 
 JSRetainPtr<JSStringRef> AccessibilityController::platformName() const
index ab8f7586551ef1f70004d1ab54fec2d8225e5bbc..31dd7934729c74b4a7c1208fb6423ed1b3e565d2 100644 (file)
@@ -247,6 +247,10 @@ void AccessibilityController::setLogFocusEvents(bool logFocusEvents)
     ASSERT(m_focusEventHook);
 }
 
+void AccessibilityController::platformResetToConsistentState()
+{
+}
+
 void AccessibilityController::setLogValueChangeEvents(bool logValueChangeEvents)
 {
     if (!!m_valueChangeEventHook == logValueChangeEvents)