[CSS Regions] In region styling (@-webkit-region) the position for CSS rules is incor...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Mar 2012 15:16:38 +0000 (15:16 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Mar 2012 15:16:38 +0000 (15:16 +0000)
commit98a1badfe30d4b7d8c42a0d184c3a89cef03cb68
treea02fb572652a746bf692cf86919bee256d5e7b6e
parent389885697455eb3e053a983932370cbf431f256f
[CSS Regions] In region styling (@-webkit-region) the position for CSS rules is incorrectly computed
https://bugs.webkit.org/show_bug.cgi?id=81901

Patch by Mihai Balan <mibalan@adobe.com> on 2012-03-26
Reviewed by Antti Koivisto.

Source/WebCore:

Right now CSS rules position does not take into account rules that are inside a @-webkit-region
declaration, leading to buggy behavior where rules that appear later in the document are superseded
by rules that appear earlier in the document (opposite as how things should be). The fix updates
the "global" rules counter once the rules in a @-webkit-region declaration have been added.

Tests: fast/regions/region-style-rule-position-expected.html
       fast/regions/region-style-rule-position.html

* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::collectMatchingRulesForList):

LayoutTests:

Ref tests for bug #81901. Testing that CSS rules position is properly computed when having multiple
@-webkit-region declarations.

* fast/regions/region-style-rule-position-expected.html: Added.
* fast/regions/region-style-rule-position.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112099 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/regions/region-style-rule-position-expected.html [new file with mode: 0644]
LayoutTests/fast/regions/region-style-rule-position.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSStyleSelector.cpp