Handle ::content and :host-context correctly in SelectorQuery.

SelectorQuery was checking for selectors that cross tree scopes (::shadow and
/deep/) to decide if it should update distribution, but it should have been
checking for selectors that need distribution (::content and :host-context).

SelectorQuery's ::matches and ::closest modes were also missing the step to
update the distribution.

BUG=491641

Review URL: https://codereview.chromium.org/1153873004

git-svn-id: svn://svn.chromium.org/blink/trunk@195882 bbb929c8-8fbe-4397-9dbb-9b2b20218538
9 files changed