Index: src/orca/Gecko.py
===================================================================
--- src/orca/Gecko.py	(revision 2370)
+++ src/orca/Gecko.py	(working copy)
@@ -2254,34 +2254,27 @@
 
     def onDocumentReload(self, event):
         """Called when the reload button is hit for a web page."""
-        self._loadingDocumentContent = True
-        # [[[TODO: WDW - Currently, we handle loading notification by
-        # looking at the state changed events on the document frame
-        # (we care about busy state there) and visibility/value changes
-        # on the progress bar.]]]
+        # We care about the main document and we'll ignore document
+        # events from HTML iframes.
         #
-        self._loadingDocumentContent = True
-        pass
+        if event.source.role == rolenames.ROLE_DOCUMENT_FRAME:
+            self._loadingDocumentContent = True
 
     def onDocumentLoadComplete(self, event):
         """Called when a web page load is completed."""
-        # [[[TODO: WDW - Currently, we handle loading notification by
-        # looking at the state changed events on the document frame
-        # (we care about busy state there) and visibility/value changes
-        # on the progress bar.]]]
+        # We care about the main document and we'll ignore document
+        # events from HTML iframes.
         #
-        self._loadingDocumentContent = False
-        pass
+        if event.source.role == rolenames.ROLE_DOCUMENT_FRAME:
+            self._loadingDocumentContent = False
 
     def onDocumentLoadStopped(self, event):
         """Called when a web page load is interrupted."""
-        # [[[TODO: WDW - Currently, we handle loading notification by
-        # looking at the state changed events on the document frame
-        # (we care about busy state there) and visibility/value changes
-        # on the progress bar.]]]
+        # We care about the main document and we'll ignore document
+        # events from HTML iframes.
         #
-        self._loadingDocumentContent = False
-        pass
+        if event.source.role == rolenames.ROLE_DOCUMENT_FRAME:
+            self._loadingDocumentContent = False
 
     def onNameChanged(self, event):
         """Called whenever a property on an object changes.
@@ -2451,7 +2444,10 @@
             if event.source \
                 and (event.source.role == rolenames.ROLE_DOCUMENT_FRAME):
                 if event.detail1:
+                    # A detail1=1 means the page has started loading.
+                    #
                     self._loadingDocumentContent = True
+
                     # Translators: this is in reference to loading a web page.
                     #
                     message = _("Loading.  Please wait.")
@@ -2459,7 +2455,16 @@
                     speech.stop()
                     speech.speak(message)
                 elif event.source.name:
-                    self._loadingDocumentContent = False
+                    # Seems like a document can go between busy and not
+                    # busy while it is loading.  So...we wait for
+                    # document:load-complete and document:load-stopped
+                    # events to tell us when loading is done.  After
+                    # that event, we will get a state-changed:busy event
+                    # with a detail1=0 to let us know things are done.
+                    #
+                    if self._loadingDocumentContent:
+                        return
+
                     # Translators: this is in reference to loading a web page.
                     #
                     message = _("Finished loading %s.") % event.source.name
@@ -2467,7 +2472,16 @@
                     speech.stop()
                     speech.speak(message)
                 else:
-                    self._loadingDocumentContent = False
+                    # Seems like a document can go between busy and not
+                    # busy while it is loading.  So...we wait for
+                    # document:load-complete and document:load-stopped
+                    # events to tell us when loading is done.  After
+                    # that event, we will get a state-changed:busy event
+                    # with a detail1=0 to let us know things are done.
+                    #
+                    if self._loadingDocumentContent:
+                        return
+
                     # Translators: this is in reference to loading a web page.
                     #
                     message = _("Finished loading.")
@@ -2502,6 +2516,12 @@
             #print "    ", documentFrame
             #print "    ", documentFrame.parent
 
+            # If the document frame is busy loading, we won't present
+            # anything to prevent Orca from being too chatty.
+            #
+            if self._loadingDocumentContent:
+                return
+
             braille.displayMessage(documentFrame.name)
             speech.stop()
             speech.speak(
@@ -2597,6 +2617,13 @@
             self.caretContext = self.findFirstCaretContext(newLocusOfFocus,
                                                            caretOffset)
 
+        # We'll ignore focus changes when the document frame is busy.
+        # This will keep Orca from chatting too much while a page is
+        # loading.
+        #
+        if self._loadingDocumentContent:
+            return
+
         # Don't bother speaking all the information about the HTML
         # container - it's duplicated all over the place.  So, we
         # just speak the role.
