Changeset 138854 in webkit


Ignore:
Timestamp:
Jan 4, 2013 2:01:44 PM (11 years ago)
Author:
zoltan@webkit.org
Message:

[CSS Regions] @region rules inside media queries are ignored
https://bugs.webkit.org/show_bug.cgi?id=102388

Reviewed by David Hyatt.

Using @region rules in media queries was ignored, but we should accept and apply it.

Source/WebCore:

Tests: fast/regions/region-rule-nested-region-rule.html

fast/regions/region-styling-mediaquery.html

  • css/CSSGrammar.y.in: Add new ruleList for region rule to handle the media query case

and avoid using nested region rules.

  • css/RuleSet.cpp:

(WebCore::RuleSet::addRulesFromSheet): Add case for region rules inside media queries.

LayoutTests:

  • fast/regions/region-rule-nested-region-rule-expected.html: Added.
  • fast/regions/region-rule-nested-region-rule.html: Added.
  • fast/regions/region-styling-mediaquery-expected.html: Added.
  • fast/regions/region-styling-mediaquery.html: Added.
Location:
trunk
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r138850 r138854  
     12013-01-04  Zoltan Horvath  <zoltan@webkit.org>
     2
     3        [CSS Regions] @region rules inside media queries are ignored
     4        https://bugs.webkit.org/show_bug.cgi?id=102388
     5
     6        Reviewed by David Hyatt.
     7
     8        Using @region rules in media queries was ignored, but we should accept and apply it.
     9
     10        * fast/regions/region-rule-nested-region-rule-expected.html: Added.
     11        * fast/regions/region-rule-nested-region-rule.html: Added.
     12        * fast/regions/region-styling-mediaquery-expected.html: Added.
     13        * fast/regions/region-styling-mediaquery.html: Added.
     14
    1152013-01-04  Abhishek Arya  <inferno@chromium.org>
    216
  • trunk/Source/WebCore/ChangeLog

    r138851 r138854  
     12013-01-04  Zoltan Horvath  <zoltan@webkit.org>
     2
     3        [CSS Regions] @region rules inside media queries are ignored
     4        https://bugs.webkit.org/show_bug.cgi?id=102388
     5
     6        Reviewed by David Hyatt.
     7
     8        Using @region rules in media queries was ignored, but we should accept and apply it.
     9
     10        Tests: fast/regions/region-rule-nested-region-rule.html
     11               fast/regions/region-styling-mediaquery.html
     12
     13        * css/CSSGrammar.y.in: Add new ruleList for region rule to handle the media query case
     14        and avoid using nested region rules.
     15        * css/RuleSet.cpp:
     16        (WebCore::RuleSet::addRulesFromSheet): Add case for region rules inside media queries.
     17
    1182013-01-04  Dan Bernstein  <mitz@apple.com>
    219
  • trunk/Source/WebCore/css/CSSGrammar.y.in

    r137955 r138854  
    206206%type <rule> valid_rule
    207207%type <ruleList> block_rule_list
     208%type <ruleList> region_block_rule_list
    208209%type <rule> block_rule
    209210%type <rule> block_valid_rule
     
    446447  ;
    447448
     449region_block_rule_list:
     450    /* empty */ { $$ = 0; }
     451  | region_block_rule_list block_valid_rule maybe_sgml {
     452      $$ = $1;
     453      if ($2) {
     454          if (!$$)
     455              $$ = parser->createRuleList();
     456          $$->append($2);
     457      }
     458  }
     459  ;
     460
    448461block_valid_rule:
    449462    ruleset
     
    463476  | import
    464477  | media
     478  | region
    465479#if ENABLE_CSS3_CONDITIONAL_RULES
    466480  | supports
     
    9891003
    9901004region:
    991     before_region_rule WEBKIT_REGION_RULE_SYM WHITESPACE region_selector at_rule_header_end '{' at_rule_body_start maybe_space block_rule_list save_block {
     1005    before_region_rule WEBKIT_REGION_RULE_SYM WHITESPACE region_selector at_rule_header_end '{' at_rule_body_start maybe_space region_block_rule_list save_block {
    9921006        if ($4)
    9931007            $$ = parser->createRegionRule($4, $9);
  • trunk/Source/WebCore/css/RuleSet.cpp

    r138432 r138854  
    318318                            continue;
    319319                        resolver->addKeyframeStyle(static_cast<StyleRuleKeyframes*>(childRule));
     320                    } else if (childRule->isRegionRule() && resolver) {
     321                        // FIXME (BUG 72472): We don't add @-webkit-region rules of scoped style sheets for the moment.
     322                        if (scope)
     323                            continue;
     324                        addRegionRule(static_cast<StyleRuleRegion*>(childRule), hasDocumentSecurityOrigin);
    320325                    }
    321326#if ENABLE(CSS_DEVICE_ADAPTATION)
Note: See TracChangeset for help on using the changeset viewer.