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 221161 ee2ce6de36701dd7b961489723c75ba46ea138d4
parent 221160 b4c055c3cf1f79506810c883e525b99fb12adff9
child 221162 025955aed95e13991be29731ede037b216eb4e37
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [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']
           }],