Shadow DOM styles appear to be over-eagerly shared
https://bugs.webkit.org/show_bug.cgi?id=110797

Reviewed by Dimitri Glazkov.

Source/WebCore:

A style of a distributed node should not be shared, because the node
might be affected by styles in a shadow dom tree, i.e. :distributed
or something.

Test: fast/dom/shadow/no-style-sharing-with-distributed-nodes.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::locateCousinList):
Skip shadow hosts, because children of shadow hosts are distributed
nodes and cannot share their styles.

LayoutTests:

* fast/dom/shadow/no-style-sharing-with-distributed-nodes-expected.html: Added.
* fast/dom/shadow/no-style-sharing-with-distributed-nodes.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144031 268f45cc-cd09-0410-ab3c-d52691b4dbfc