Remove ScopedStyleResolver::treeScopeFor.
The ownerNode()'s treeScope() is always the scope of a stylesheet except for
document scoped sheets in imports which apply to the main document. We can
express this simpler without the set of checks in treeScopeFor.
Link elements and processing instructions also don't even get added as
candidates if they're not children of the Document so we don't need the type
checks, I've instead replaced them with asserts. There's also no way for us
have a null ownerDocument at the point where this code is called so I added
an assert for that too.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/1285293003
git-svn-id: svn://svn.chromium.org/blink/trunk@200578 bbb929c8-8fbe-4397-9dbb-9b2b20218538