Changeset 112099 in webkit


Ignore:
Timestamp:
Mar 26, 2012 8:16:38 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[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.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r112098 r112099  
     12012-03-26  Mihai Balan  <mibalan@adobe.com>
     2
     3        [CSS Regions] In region styling (@-webkit-region) the position for CSS rules is incorrectly computed
     4        https://bugs.webkit.org/show_bug.cgi?id=81901
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Ref tests for bug #81901. Testing that CSS rules position is properly computed when having multiple
     9        @-webkit-region declarations.
     10
     11        * fast/regions/region-style-rule-position-expected.html: Added.
     12        * fast/regions/region-style-rule-position.html: Added.
     13
    1142012-03-26  Csaba Osztrogonác  <ossy@webkit.org>
    215
  • trunk/Source/WebCore/ChangeLog

    r112095 r112099  
     12012-03-26  Mihai Balan  <mibalan@adobe.com>
     2
     3        [CSS Regions] In region styling (@-webkit-region) the position for CSS rules is incorrectly computed
     4        https://bugs.webkit.org/show_bug.cgi?id=81901
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Right now CSS rules position does not take into account rules that are inside a @-webkit-region
     9        declaration, leading to buggy behavior where rules that appear later in the document are superseded
     10        by rules that appear earlier in the document (opposite as how things should be). The fix updates
     11        the "global" rules counter once the rules in a @-webkit-region declaration have been added.
     12
     13        Tests: fast/regions/region-style-rule-position-expected.html
     14               fast/regions/region-style-rule-position.html
     15
     16        * css/CSSStyleSelector.cpp:
     17        (WebCore::CSSStyleSelector::collectMatchingRulesForList):
     18
    1192012-03-26  Pierre Rossi  <pierre.rossi@nokia.com>
    220
  • trunk/Source/WebCore/css/CSSStyleSelector.cpp

    r112076 r112099  
    24382438            regionRuleSet->addStyleRule(static_cast<CSSStyleRule*>(regionStylingRule)->styleRule(), true, true);
    24392439    }
     2440    // Update the "global" rule count so that proper order is maintained
     2441    m_ruleCount = regionRuleSet->m_ruleCount;
    24402442
    24412443    m_regionSelectorsAndRuleSets.append(RuleSetSelectorPair(regionRule->selectorList().first(), regionRuleSet));
Note: See TracChangeset for help on using the changeset viewer.