orca r3810 - in branches/gnome-2-22: . src/orca



Author: joanied
Date: Sat Apr  5 03:22:47 2008
New Revision: 3810
URL: http://svn.gnome.org/viewvc/orca?rev=3810&view=rev

Log:
* src/orca/Gecko.py:
  Fix for bug #520029 - Better handle our presentation of images 
  and text on a web page when the image spans multiple lines.


Modified:
   branches/gnome-2-22/ChangeLog
   branches/gnome-2-22/src/orca/Gecko.py

Modified: branches/gnome-2-22/src/orca/Gecko.py
==============================================================================
--- branches/gnome-2-22/src/orca/Gecko.py	(original)
+++ branches/gnome-2-22/src/orca/Gecko.py	Sat Apr  5 03:22:47 2008
@@ -7749,7 +7749,8 @@
                             start = cStart
                         else:
                             start += 1
-                    elif child.getRole() != pyatspi.ROLE_LINK:
+                    elif not child.getRole() in [pyatspi.ROLE_LINK,
+                                                 pyatspi.ROLE_IMAGE]:
                         text = None
                         obj = child
                     else:
@@ -7846,13 +7847,9 @@
 
             nextExtents = self.getExtents(nextObj, nOffset, nOffset + 1)
 
-            imgOnLine = obj.getRole() == pyatspi.ROLE_IMAGE \
-                     and extents[1] < nextExtents[1] < extents[1] + extents[3]
-                              
             if self.onSameLine(extents, nextExtents) \
                and lastExtents != nextExtents \
-               or nextExtents == (0, 0, 0, 0) \
-               or imgOnLine:
+               or nextExtents == (0, 0, 0, 0):
                 toAdd = self.getObjectsFromEOCs(nextObj, nOffset, boundary)
                 objects.extend(toAdd)
             elif (nextObj.getRole() in [pyatspi.ROLE_SECTION,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]