AX: WKTR: Don't update isolated tree mode behavior if not required
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Mar 2020 18:44:59 +0000 (18:44 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Mar 2020 18:44:59 +0000 (18:44 +0000)
https://bugs.webkit.org/show_bug.cgi?id=209555
<rdar://problem/60885094>

Reviewed by Darin Adler.

If the isolated tree mode has not changed, then we should not poke at the mechanisms for turning it on/off.
This might have the side effect of turning on accessibility unexpectedly.

* WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
(WTR::AccessibilityController::setAccessibilityIsolatedTreeMode):

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

Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.cpp

index 7a511d5..add5a0b 100644 (file)
@@ -1,3 +1,17 @@
+2020-03-26  Chris Fleizach  <cfleizach@apple.com>
+
+        AX: WKTR: Don't update isolated tree mode behavior if not required
+        https://bugs.webkit.org/show_bug.cgi?id=209555
+        <rdar://problem/60885094>
+
+        Reviewed by Darin Adler.
+
+        If the isolated tree mode has not changed, then we should not poke at the mechanisms for turning it on/off.
+        This might have the side effect of turning on accessibility unexpectedly.
+
+        * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
+        (WTR::AccessibilityController::setAccessibilityIsolatedTreeMode):
+
 2020-03-26  Philippe Normand  <pnormand@igalia.com>
 
         [Flatpak SDK] Pass all the arguments of build-webkit to webkit-flatpak
 2020-03-26  Philippe Normand  <pnormand@igalia.com>
 
         [Flatpak SDK] Pass all the arguments of build-webkit to webkit-flatpak
index 81a4c10..e26c4aa 100644 (file)
@@ -57,8 +57,10 @@ AccessibilityController::~AccessibilityController()
 #if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
 void AccessibilityController::setAccessibilityIsolatedTreeMode(bool flag)
 {
 #if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
 void AccessibilityController::setAccessibilityIsolatedTreeMode(bool flag)
 {
-    m_accessibilityIsolatedTreeMode = flag;
-    updateIsolatedTreeMode();
+    if (m_accessibilityIsolatedTreeMode != flag) {
+        m_accessibilityIsolatedTreeMode = flag;
+        updateIsolatedTreeMode();
+    }
 }
 
 void AccessibilityController::updateIsolatedTreeMode()
 }
 
 void AccessibilityController::updateIsolatedTreeMode()