Summary: selectorText returns an incorrect string if a descendant selector has more than one subselector. In the attached testcase, "div span.a.b" is serialized as "span.adiv .b".
Created attachment 6588 [details] Testcase
Created attachment 6630 [details] Iterate over subselectors The change is smaller than it might look (most of it is just extra indentation).
Comment on attachment 6630 [details] Iterate over subselectors r=me
Comment on attachment 6630 [details] Iterate over subselectors This patch no longer applies cleanly. I'm going to post an updated version.
Created attachment 6724 [details] A patch that applies Again, the diff is messy but the change is simple.
Comment on attachment 6724 [details] A patch that applies r=me again
Verified in r13060 nightly