[CSSRegions]Fix region style code in CSSStyleSelector
authormihnea@adobe.com <mihnea@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jan 2012 16:57:16 +0000 (16:57 +0000)
committermihnea@adobe.com <mihnea@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jan 2012 16:57:16 +0000 (16:57 +0000)
commit9dd1768bf3cbcb427e6b7c6717e98d697fefee8b
tree565e3018782ba5c72743395d019705e191aaf250
parentf11f739217be207ebbdf8952b9fd849b238d5e54
[CSSRegions]Fix region style code in CSSStyleSelector
https://bugs.webkit.org/show_bug.cgi?id=76453

Reviewed by Antti Koivisto.

Source/WebCore:

Follow up after comments in https://bugs.webkit.org/show_bug.cgi?id=76064.
With the new approach, the css rule specificity is correctly taken into account
when applying the region style rule.
No new tests, the region style tests are still disabled.

* css/CSSStyleSelector.cpp:
(WebCore::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair):
(WebCore::CSSStyleSelector::CSSStyleSelector):
(WebCore::CSSStyleSelector::addMatchedDeclaration):
(WebCore::CSSStyleSelector::collectMatchingRules):
(WebCore::CSSStyleSelector::collectMatchingRulesForRegion):
(WebCore::CSSStyleSelector::matchRules):
(WebCore::CSSStyleSelector::collectMatchingRulesForList):
(WebCore::CSSStyleSelector::matchAllRules):
(WebCore::CSSStyleSelector::styleForElement):
(WebCore::CSSStyleSelector::pseudoStyleForElement):
(WebCore::CSSStyleSelector::checkRegionStyle):
(WebCore::CSSStyleSelector::checkRegionSelector):
(WebCore::RuleData::RuleData):
(WebCore::RuleSet::RuleSet):
(WebCore::RuleSet::addRule):
(WebCore::RuleSet::addRegionRule):
(WebCore::RuleSet::addRulesFromSheet):
(WebCore::isInsideRegionRule):
(WebCore::CSSStyleSelector::applyDeclaration):
(WebCore::CSSStyleSelector::applyDeclarations):
(WebCore::CSSStyleSelector::isValidRegionStyleProperty):
(WebCore::CSSStyleSelector::applyProperty):
* css/CSSStyleSelector.h:

LayoutTests:

Fix the test as it was not taking into account the selector specificity.
* fast/regions/region-style-block-background-color.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@105280 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/regions/region-style-block-background-color.html
Source/WebCore/ChangeLog
Source/WebCore/css/CSSStyleSelector.cpp
Source/WebCore/css/CSSStyleSelector.h