Bug 922558: use selection module instead of direct DOM access to get the selected text for PredicateContext
Bug 922558: PredicateContext: set documentType