[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)
commit66f08b9e7f57be394de4bf5bacc7122f1ea02488
tree565e3018782ba5c72743395d019705e191aaf250
parent3d6ff048a6551f0366ee97d18ba6668ff5b4be71
[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: http://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