Changeset 157720 in webkit
- Timestamp:
- Oct 21, 2013 9:53:23 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r157710 r157720 1 2013-10-21 Mihai Maerean <mmaerean@adobe.com> 2 3 [CSS Regions] Fix WHITESPACE issues in the CSS grammar. 4 https://bugs.webkit.org/show_bug.cgi?id=123082 5 6 Reviewed by Andreas Kling. 7 8 This is a port of Rune Lillesveen's patch from https://codereview.chromium.org/25607005 9 10 * css3/filters/custom-with-at-rule-syntax/parsing-at-rule-valid-expected.txt: 11 * css3/filters/custom-with-at-rule-syntax/script-tests/parsing-at-rule-valid.js: 12 * fast/css/calc-comments-allowed-expected.html: Added. 13 * fast/css/calc-comments-allowed.html: Added. 14 * fast/regions/webkit-region-syntax-space-expected.txt: Added. 15 * fast/regions/webkit-region-syntax-space.html: Added. 16 1 17 2013-10-21 Santosh Mahto <santosh.ma@samsung.com> 2 18 -
trunk/LayoutTests/css3/filters/custom-with-at-rule-syntax/parsing-at-rule-valid-expected.txt
r142149 r157720 47 47 PASS declaration.length is 2 48 48 49 Empty rule, comment separators 50 @-webkit-filter/**/my-filter/**/{ } 51 PASS cssRule.cssText is "@-webkit-filter my-filter { }" 52 PASS cssRule.type is CSSRule.WEBKIT_FILTER_RULE 53 PASS cssRule instanceof WebKitCSSFilterRule is true 54 PASS cssRule.constructor === WebKitCSSFilterRule is true 55 PASS cssRule.__proto__ === WebKitCSSFilterRule.prototype is true 56 PASS declaration.length is 0 57 58 Empty rule, comment+space separators 59 @-webkit-filter/**/ my-filter/**/ { } 60 PASS cssRule.cssText is "@-webkit-filter my-filter { }" 61 PASS cssRule.type is CSSRule.WEBKIT_FILTER_RULE 62 PASS cssRule instanceof WebKitCSSFilterRule is true 63 PASS cssRule.constructor === WebKitCSSFilterRule is true 64 PASS cssRule.__proto__ === WebKitCSSFilterRule.prototype is true 65 PASS declaration.length is 0 66 67 Empty rule, space+comment separators 68 @-webkit-filter /**/my-filter /**/{ } 69 PASS cssRule.cssText is "@-webkit-filter my-filter { }" 70 PASS cssRule.type is CSSRule.WEBKIT_FILTER_RULE 71 PASS cssRule instanceof WebKitCSSFilterRule is true 72 PASS cssRule.constructor === WebKitCSSFilterRule is true 73 PASS cssRule.__proto__ === WebKitCSSFilterRule.prototype is true 74 PASS declaration.length is 0 75 76 Empty rule, space+comment+space separators 77 @-webkit-filter /**/ my-filter /**/ { } 78 PASS cssRule.cssText is "@-webkit-filter my-filter { }" 79 PASS cssRule.type is CSSRule.WEBKIT_FILTER_RULE 80 PASS cssRule instanceof WebKitCSSFilterRule is true 81 PASS cssRule.constructor === WebKitCSSFilterRule is true 82 PASS cssRule.__proto__ === WebKitCSSFilterRule.prototype is true 83 PASS declaration.length is 0 84 49 85 ======================================== 50 86 Nested filter at-rule tests. -
trunk/LayoutTests/css3/filters/custom-with-at-rule-syntax/script-tests/parsing-at-rule-valid.js
r142149 r157720 71 71 "@-webkit-filter my-filter { width: 100px; height: 100px; }", 72 72 {width: "100px", height: "100px"}); 73 testFilterAtRule("Empty rule, comment separators", 74 "@-webkit-filter/**/my-filter/**/{ }", 75 "@-webkit-filter my-filter { }"); 76 testFilterAtRule("Empty rule, comment+space separators", 77 "@-webkit-filter/**/ my-filter/**/ { }", 78 "@-webkit-filter my-filter { }"); 79 testFilterAtRule("Empty rule, space+comment separators", 80 "@-webkit-filter /**/my-filter /**/{ }", 81 "@-webkit-filter my-filter { }"); 82 testFilterAtRule("Empty rule, space+comment+space separators", 83 "@-webkit-filter /**/ my-filter /**/ { }", 84 "@-webkit-filter my-filter { }"); 73 85 74 86 heading("Nested filter at-rule tests."); -
trunk/Source/WebCore/ChangeLog
r157718 r157720 1 2013-10-21 Mihai Maerean <mmaerean@adobe.com> 2 3 [CSS Regions] Fix WHITESPACE issues in the CSS grammar. 4 https://bugs.webkit.org/show_bug.cgi?id=123082 5 6 Reviewed by Andreas Kling. 7 8 This is a port of Rune Lillesveen's patch from https://codereview.chromium.org/25607005 9 10 Fix WHITESPACE issues in the CSS grammar. 11 12 A single WHITESPACE token consumes consecutive spaces, but does not consume 13 spaces separated by comments. That means S* and S+ in CSS grammars need to 14 accept multiple WHITESPACE tokens. Additionally, white spaces are not 15 mandatory to separate an @-symbol and the rest of the prelude. 16 17 Use space non-terminal instead of WHITESPACE for S+ in calc expressions. 18 19 Use maybe_space non-terminal instead of WHITESPACE for S* after @-webkit-filter 20 and @-webkit-region. 21 22 Tests: fast/css/calc-comments-allowed.html 23 fast/regions/webkit-region-syntax-space.html 24 25 * css/CSSGrammar.y.in: 26 1 27 2013-10-21 Anton Obzhirov <a.obzhirov@samsung.com> 2 28 -
trunk/Source/WebCore/css/CSSGrammar.y.in
r157702 r157720 370 370 #endif 371 371 372 /* for expressions that require at least one whitespace to be present, like the + and - operators in calc expressions */ 373 space: WHITESPACE | space WHITESPACE ; 374 372 375 maybe_space: /* empty */ %prec UNIMPORTANT_TOK | maybe_space WHITESPACE ; 373 376 … … 955 958 956 959 region: 957 before_region_rule WEBKIT_REGION_RULE_SYM WHITESPACEselector_list at_rule_header_end '{' at_rule_body_start maybe_space block_valid_rule_list save_block {960 before_region_rule WEBKIT_REGION_RULE_SYM maybe_space selector_list at_rule_header_end '{' at_rule_body_start maybe_space block_valid_rule_list save_block { 958 961 OwnPtr<Vector<RefPtr<StyleRuleBase>>> ruleList = adoptPtr($9); 959 962 if ($4) … … 976 979 977 980 filter: 978 before_filter_rule WEBKIT_FILTER_RULE_SYM WHITESPACEIDENT at_rule_header_end_maybe_space '{' at_rule_body_start maybe_space_before_declaration declaration_list closing_brace {981 before_filter_rule WEBKIT_FILTER_RULE_SYM maybe_space IDENT at_rule_header_end_maybe_space '{' at_rule_body_start maybe_space_before_declaration declaration_list closing_brace { 979 982 parser->m_inFilterRule = false; 980 983 $$ = parser->createFilterRule($4).leakRef(); … … 1584 1587 ; 1585 1588 1589 /* 1590 * The grammar requires spaces around binary ‘+’ and ‘-’ operators. 1591 * The '*' and '/' operators do not require spaces. 1592 * http://www.w3.org/TR/css3-values/#calc-syntax 1593 */ 1586 1594 calc_func_operator: 1587 WHITESPACE '+' WHITESPACE{1595 space '+' space { 1588 1596 $$ = '+'; 1589 1597 } 1590 | WHITESPACE '-' WHITESPACE{1598 | space '-' space { 1591 1599 $$ = '-'; 1592 1600 }
Note: See TracChangeset
for help on using the changeset viewer.