Bug 1053250 - When automoving back into a remote iframe preserve the frame's vc position. r=yzen
authorEitan Isaacson <eitan@monotonous.org>
Thu, 14 Aug 2014 09:24:08 -0400
changeset 199535 ee2ce6de36701dd7b961489723c75ba46ea138d4
parent 199534 b4c055c3cf1f79506810c883e525b99fb12adff9
child 199536 025955aed95e13991be29731ede037b216eb4e37
push id27309
push userryanvm@gmail.com
push dateThu, 14 Aug 2014 20:21:31 +0000
treeherdermozilla-central@31db71673c6e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyzen
bugs1053250
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1053250 - When automoving back into a remote iframe preserve the frame's vc position. r=yzen
accessible/jsat/ContentControl.jsm
accessible/jsat/EventManager.jsm
accessible/tests/mochitest/jsat/test_content_integration.html
--- a/accessible/jsat/ContentControl.jsm
+++ b/accessible/jsat/ContentControl.jsm
@@ -420,17 +420,22 @@ this.ContentControl.prototype = {
       }
       if (moveFirstOrLast && !moved) {
         // We move to first/last after no anchor move happened or succeeded.
         moved = vc[moveMethod](rule);
       }
 
       let sentToChild = this.sendToChild(vc, {
         name: 'AccessFu:AutoMove',
-        json: aOptions
+        json: {
+          moveMethod: aOptions.moveMethod,
+          moveToFocused: aOptions.moveToFocused,
+          noOpIfOnScreen: true,
+          forcePresent: true
+        }
       });
 
       if (!moved && !sentToChild) {
         forcePresentFunc();
       }
     };
 
     if (aOptions.delay) {
--- a/accessible/jsat/EventManager.jsm
+++ b/accessible/jsat/EventManager.jsm
@@ -274,18 +274,20 @@ this.EventManager.prototype = {
         }
         break;
       }
       case Events.FOCUS:
       {
         // Put vc where the focus is at
         let acc = aEvent.accessible;
         let doc = aEvent.accessibleDocument;
-        if (acc.role != Roles.DOCUMENT && doc.role != Roles.CHROME_WINDOW) {
-         this.contentControl.autoMove(acc);
+        if ([Roles.CHROME_WINDOW,
+             Roles.DOCUMENT,
+             Roles.APPLICATION].indexOf(acc.role) < 0) {
+          this.contentControl.autoMove(acc);
        }
        break;
       }
       case Events.DOCUMENT_LOAD_COMPLETE:
       {
         this.contentControl.autoMove(
           aEvent.accessible, { delay: 500 });
         break;
--- a/accessible/tests/mochitest/jsat/test_content_integration.html
+++ b/accessible/tests/mochitest/jsat/test_content_integration.html
@@ -174,17 +174,16 @@
             speak: ['This is an alert!',
                     {'string': 'headingLevel', 'args': [1]},
                     {'string': 'dialog'}]
           }],
 
           // XXX: Place cursor back where it was.
           [doc.defaultView.hideAlert, {
             speak: ['wow', {'string': 'headingLevel', 'args': [1]}, 'such app'],
-            speak_checkFunc: 'todo_is'
           }],
 
           [ContentMessages.clearCursor, 'AccessFu:CursorCleared'],
 
           // Open dialog, then focus on something when closing
           [ContentMessages.simpleMoveNext, {
             speak: ['Phone status bar', 'Traversal Rule test document']
           }],