Index: src/orca/scripts/toolkits/Gecko/script.py
===================================================================
--- src/orca/scripts/toolkits/Gecko/script.py	(revision 4025)
+++ src/orca/scripts/toolkits/Gecko/script.py	(working copy)
@@ -1087,7 +1087,6 @@
             self.updateBraille(context.obj)
         elif callbackType == speechserver.SayAllContext.COMPLETED:
             #print "COMPLETED", context.utterance, context.currentOffset
-            orca.setLocusOfFocus(None, context.obj, False)
             try:
                 self.setCaretPosition(context.obj, context.currentOffset)
             except:
@@ -1368,18 +1367,6 @@
            and event.source[0].getRole() == pyatspi.ROLE_UNKNOWN:
             return
 
-        # Otherwise, we'll just assume that the thing in which the caret
-        # moved is the locus of focus.  We'll only do this if the current
-        # object that's the locus of focus no longer has focus, though.
-        # The reason for this is that we can indeed get caret-moved events
-        # from things that really have nothing to do with the locus of
-        # focus.
-        #
-        if orca_state.locusOfFocus \
-            and not orca_state.locusOfFocus.getState().contains(
-                        pyatspi.STATE_FOCUSED):
-            orca.setLocusOfFocus(event, event.source, False)
-
         # We need to handle HTML content differently because we do our
         # own navigation and we also handle the
         # EMBEDDED_OBJECT_CHARACTER.  If we're not in HTML content,
@@ -1445,32 +1432,6 @@
         """
 
         self._destroyLineCache()
-
-        # The search entries in Firefox's and Thunderbird's top toolbars
-        # contain text which functions as the label (Yahoo, Entire Message)
-        # and which gets deleted just prior to the entry gaining focus.
-        # This is also true of the search entry in the Downloads frame. If
-        # we pass that event on to the default script, it will set the
-        # entry to the locus of focus silently and then the focus event
-        # will not cause the entry to be spoken.  In addition, if the
-        # Location autocomplete is expanded and Backspace is pressed,
-        # the locus of focus will be a table cell and the default script
-        # will not speak the characters being deleted from the entry.
-        #
-        if event.source and orca_state.locusOfFocus \
-           and not self.isSameObject(event.source, orca_state.locusOfFocus):
-            if event.source.parent.getRole() == pyatspi.ROLE_FRAME:
-                return
-
-            toolbar = self.getAncestor(event.source,
-                                       [pyatspi.ROLE_TOOL_BAR],
-                                       [pyatspi.ROLE_DOCUMENT_FRAME])
-            if toolbar:
-                if orca_state.locusOfFocus.getRole() == pyatspi.ROLE_TABLE_CELL:
-                    orca.setLocusOfFocus(event, event.source, False)
-                else:
-                    return
-
         default.Script.onTextDeleted(self, event)
 
     def onTextInserted(self, event):
@@ -1552,7 +1513,8 @@
         #
         if self.isSameObject(event.source, self._objectForFocusGrab) \
            and not event.source.getRole() in [pyatspi.ROLE_ENTRY,
-                                              pyatspi.ROLE_LINK]:
+                                              pyatspi.ROLE_LINK,
+                                              pyatspi.ROLE_DOCUMENT_FRAME]:
             orca.setLocusOfFocus(event, event.source, False)
             return
 
@@ -1830,15 +1792,6 @@
                         if not obj:
                             return
 
-                    # When a document is loaded, we are going to
-                    # assume that the newly loaded document frame has
-                    # focus.  Gecko doesn't seem to give us a focus
-                    # event for this, though, so we will force the
-                    # locus of focus here.
-                    #
-                    orca.setLocusOfFocus(event, obj, False)
-                    self.setCaretPosition(obj, characterOffset)
-
                     # For braille, we just show the current line
                     # containing the caret.  For speech, however, we
                     # will start a Say All operation if the caret is
Index: src/orca/default.py
===================================================================
--- src/orca/default.py	(revision 4025)
+++ src/orca/default.py	(working copy)
@@ -3493,15 +3493,6 @@
         - event: the Event
         """
 
-        # We don't always get focus: events for text areas, so if we
-        # see caret moved events for a focused text area, we silently
-        # set them to be the locus of focus.
-        #
-        if event and event.source and \
-           (event.source != orca_state.locusOfFocus) and \
-            event.source.getState().contains(pyatspi.STATE_FOCUSED):
-            orca.setLocusOfFocus(event, event.source, False)
-
         # Ignore caret movements from non-focused objects, unless the
         # currently focused object is the parent of the object which
         # has the caret.
@@ -3525,15 +3516,6 @@
         - event: the Event
         """
 
-        # We don't always get focus: events for text areas, so if we
-        # see deleted text events for a focused text area, we silently
-        # set them to be the locus of focus..
-        #
-        if event and event.source and \
-           (event.source != orca_state.locusOfFocus) and \
-            event.source.getState().contains(pyatspi.STATE_FOCUSED):
-            orca.setLocusOfFocus(event, event.source, False)
-
         # Ignore text deletions from non-focused objects, unless the
         # currently focused object is the parent of the object from which
         # text was deleted
@@ -3619,15 +3601,6 @@
         - event: the Event
         """
 
-        # We don't always get focus: events for text areas, so if we
-        # see inserted text events for a focused text area, we silently
-        # set them to be the locus of focus..
-        #
-        if event and event.source and \
-           (event.source != orca_state.locusOfFocus) and \
-            event.source.getState().contains(pyatspi.STATE_FOCUSED):
-            orca.setLocusOfFocus(event, event.source, False)
-
         # Ignore text insertions from non-focused objects, unless the
         # currently focused object is the parent of the object from which
         # text was inserted.
