collectMatchingElementsInFlatTree should not find elements inside an user agent shadow tree. Also, add matchingElementInFlatTree which finds the first element which matches a given selector.
Created attachment 299677 [details] Fixes the bug
<rdar://problem/30181058>
Comment on attachment 299677 [details] Fixes the bug Thanks for the review!
Comment on attachment 299677 [details] Fixes the bug Clearing flags on attachment: 299677 Committed r211139: <http://trac.webkit.org/changeset/211139>
All reviewed patches have been landed. Closing bug.