GNOME Bugzilla – Bug 321564
Sniff does not show text for non-editable text nodes
Last modified: 2005-11-16 17:57:10 UTC
1. Run epiphany, and open a page page 2. Run at-poke and browse into the web page. Observe text nodes, at-poke will show you the text of these nodes 3. Run sniff and browse into the same nodes. Result: sniff shows blank text for these text nodes. Expected behaviour: It should show the text. I can browse into the tree manually in the python interface, and looking at the node's text attribute I can see the text there. So this looks like a bug in sniff.
OK, I liberally scattered print expressions in setupTable and I think I've figured out the problem. In this line: # Eeew! I'm touching tree's privates. assert node._Node__editableText If a node supports the Text interface but not the EditableInterface, then the expression node._Node__editableText causes an AttributeError; the assertion never gets a chance to fire. Hence control passes into the except AttributeError: clause where the buffer for the GtkTextView is emptied, and you never see the text. I can write a patch for this but it's not clear what that whole signal thing is meant to do. Are you trying to suppress emission of the "changed" signal whilst changing the buffer yourself? If so, there are ways to do this Changing bug title to better reflect the problem
Ooh, good find. I just fixed it by catching the AttributeError, and documented it.