Bug 972083 - Null-check in visual presenter and don't hide. r=yzen
authorEitan Isaacson <eitan@monotonous.org>
Tue, 18 Feb 2014 10:19:50 -0800
changeset 169677 458f8189525bcff67848ccb51c84aa2f36aba39d
parent 169676 9635476adfeb13c63259283617e549774c03ae19
child 169678 3afcb38ad9477603f4cea52f46a9290ddd85d609
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersyzen
bugs972083
milestone30.0a1
Bug 972083 - Null-check in visual presenter and don't hide. r=yzen
accessible/src/jsat/Presentation.jsm
--- a/accessible/src/jsat/Presentation.jsm
+++ b/accessible/src/jsat/Presentation.jsm
@@ -161,24 +161,26 @@ VisualPresenter.prototype = {
         }
       };
     }
 
     return null;
   },
 
   pivotChanged: function VisualPresenter_pivotChanged(aContext, aReason) {
+    if (!aContext.accessible) {
+      // XXX: Don't hide because another vc may be using the highlight.
+      return null;
+    }
+
     this._displayedAccessibles.set(aContext.accessible.document.window,
                                    { accessible: aContext.accessibleForBounds,
                                      startOffset: aContext.startOffset,
                                      endOffset: aContext.endOffset });
 
-    if (!aContext.accessibleForBounds)
-      return {type: this.type, details: {method: 'hideBounds'}};
-
     try {
       aContext.accessibleForBounds.scrollTo(
         Ci.nsIAccessibleScrollType.SCROLL_TYPE_ANYWHERE);
 
       let bounds = (aContext.startOffset === -1 && aContext.endOffset === -1) ?
             aContext.bounds : Utils.getTextBounds(aContext.accessibleForBounds,
                                                   aContext.startOffset,
                                                   aContext.endOffset);