Assert triggered in SelectorChecker::checkOneSelector when scrollbar (e.g. :horizontal) selector is specified.
https://bugs.webkit.org/show_bug.cgi?id=106414

Reviewed by Dimitri Glazkov.

Source/WebCore:

In SelectorChecker::checkOneSelector, scrollbar related pseudoType (e.g. :horizontal) is not handled anywhere.
This caused ASSERT triggered. We have to check them.

Test: fast/css/scrollbar-crash.html

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOneSelector):

LayoutTests:

* fast/css/scrollbar-crash-expected.txt: Added.
* fast/css/scrollbar-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Shadow DOM] Distribution related code on ElementShadow should be minimized.
https://bugs.webkit.org/show_bug.cgi?id=106294

Reviewed by Dimitri Glazkov.

.:

* Source/autotools/symbols.filter:

Source/WebCore:

This change moves ElementShadow::m_selectFeatures,
m_shouldCollectSelectFeatureSet and related methods to
ContentDistributor.

There are also some renaming and small refactorings for better fit
on new place:

- shouldCollectSelectFeatureSet is renamed needsSelectorRuleSet for conciseness.
- setShouldCollectSelectFeatureSet() which used recursion morphed into
  iterative willAffectSelector().
- ensureDistributionFromDocument() becomes a static method.

No new tests. Refactoring.

* WebCore.exp.in:
* dom/Element.cpp:
(WebCore::Element::shouldInvalidateDistributionWhenAttributeChanged):
* dom/ElementShadow.cpp:
(WebCore::ElementShadow::addShadowRoot):
(WebCore::ElementShadow::removeAllShadowRoots):
* dom/ElementShadow.h:
(ElementShadow):
(WebCore::ElementShadow::invalidateDistribution):
(WebCore::ElementShadow::ensureDistribution):
(WebCore::ElementShadow::didAffectSelector):
(WebCore::ElementShadow::willAffectSelector):
(WebCore::ElementShadow::containingShadow):
(WebCore):
* html/shadow/ContentDistributor.cpp:
(WebCore::ScopeContentDistribution::registerInsertionPoint):
(WebCore::ScopeContentDistribution::unregisterInsertionPoint):
(WebCore::ContentDistributor::ContentDistributor):
(WebCore::ContentDistributor::ensureDistribution):
(WebCore):
(WebCore::ContentDistributor::ensureDistributionFromDocument):
(WebCore::ContentDistributor::invalidateDistribution):
(WebCore::ContentDistributor::ensureSelectFeatureSet):
(WebCore::ContentDistributor::collectSelectFeatureSetFrom):
(WebCore::ContentDistributor::didAffectSelector):
(WebCore::ContentDistributor::willAffectSelector):
(WebCore::ContentDistributor::didShadowBoundaryChange):
* html/shadow/ContentDistributor.h:
(ScopeContentDistribution):
(WebCore::ContentDistributor::needsSelectFeatureSet):
(WebCore::ContentDistributor::setNeedsSelectFeatureSet):
(ContentDistributor):
(WebCore::ContentDistributor::setValidity):
(WebCore::ContentDistributor::needsInvalidation):
* html/shadow/HTMLContentElement.cpp:
(WebCore::HTMLContentElement::parseAttribute):
* html/shadow/HTMLContentElement.h:
* html/shadow/HTMLShadowElement.cpp:
(WebCore::HTMLShadowElement::olderShadowRoot):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::getDistributedNodes):
(WebCore::InsertionPoint::insertedInto):
(WebCore::InsertionPoint::removedFrom):
* html/shadow/InsertionPoint.h:
(WebCore::InsertionPoint::canAffectSelector):
* testing/Internals.cpp:
(WebCore::Internals::hasSelectorForIdInShadow):
(WebCore::Internals::hasSelectorForClassInShadow):
(WebCore::Internals::hasSelectorForAttributeInShadow):
(WebCore::Internals::hasSelectorForPseudoClassInShadow):

Source/WebKit/win:

* WebKit.vcproj/WebKit.def.in:


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