Changeset 142149 in webkit
- Timestamp:
- Feb 7, 2013 10:21:12 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 2 deleted
- 3 edited
- 5 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r142148 r142149 1 2013-02-07 Max Vujovic <mvujovic@adobe.com> 2 3 [CSS Shaders] Add WebKitCSSFilterRule to DOMWindow.idl 4 https://bugs.webkit.org/show_bug.cgi?id=109082 5 6 Move the at-rule parsing tests to the recently added folder named 7 "custom-with-at-rule-parsing". 8 9 Remove the "custom-filter" prefix from the test filenames to 10 match the new convention. 11 12 Update the tests to use the "shouldHaveConstructor" JS helper function instead of the 13 "shouldBeType" JS helper function. Among other things, using "shouldHaveConstructor" tests 14 that window.WebKitCSSFilterRule is defined. "shouldHaveConstructor" has the same 15 behavior in JSC and V8, unlike "shouldBeType". Therefore, remove the Chromium-specific text 16 expectation file that was previously needed for "shouldBeType". 17 18 Reviewed by Dean Jackson. 19 20 * css3/filters/custom-with-at-rule-syntax/parsing-at-rule-invalid-expected.txt: Renamed from LayoutTests/css3/filters/custom/custom-filter-parsing-at-rule-invalid-expected.txt. 21 * css3/filters/custom-with-at-rule-syntax/parsing-at-rule-invalid.html: Renamed from LayoutTests/css3/filters/custom/custom-filter-parsing-at-rule-invalid.html. 22 * css3/filters/custom-with-at-rule-syntax/parsing-at-rule-valid-expected.txt: Added. 23 * css3/filters/custom-with-at-rule-syntax/parsing-at-rule-valid.html: Renamed from LayoutTests/css3/filters/custom/custom-filter-parsing-at-rule-valid.html. 24 * css3/filters/custom-with-at-rule-syntax/script-tests/parsing-at-rule-invalid.js: Renamed from LayoutTests/css3/filters/script-tests/custom-filter-parsing-at-rule-invalid.js. 25 (testInvalidFilterAtRule): 26 * css3/filters/custom-with-at-rule-syntax/script-tests/parsing-at-rule-valid.js: Renamed from LayoutTests/css3/filters/script-tests/custom-filter-parsing-at-rule-valid.js. 27 (testFilterAtRule): 28 (testNestedRules): 29 (checkRule): 30 * css3/filters/custom/custom-filter-parsing-at-rule-valid-expected.txt: Removed. 31 * platform/chromium/css3/filters/custom/custom-filter-parsing-at-rule-valid-expected.txt: Removed. 32 1 33 2013-02-07 Vsevolod Vlasov <vsevik@chromium.org> 2 34 -
trunk/LayoutTests/css3/filters/custom-with-at-rule-syntax/parsing-at-rule-invalid-expected.txt
r142148 r142149 5 5 6 6 7 ======================================== 8 Filter at-rule symbol tests. 9 ======================================== 10 7 11 Unprefixed rule. 8 12 @filter my-filter { } 9 13 PASS insertRuleException instanceof DOMException is true 10 PASS insertRuleException.code is 12 14 PASS insertRuleException.code is DOMException.SYNTAX_ERR 15 16 ======================================== 17 Filter name tests. 18 ======================================== 11 19 12 20 Missing filter name identifier. 13 21 @-webkit-filter { } 14 22 PASS insertRuleException instanceof DOMException is true 15 PASS insertRuleException.code is 1223 PASS insertRuleException.code is DOMException.SYNTAX_ERR 16 24 17 25 Filter name as string. 18 26 @-webkit-filter 'my-filter' { } 19 27 PASS insertRuleException instanceof DOMException is true 20 PASS insertRuleException.code is 1228 PASS insertRuleException.code is DOMException.SYNTAX_ERR 21 29 22 30 Filter name as number. 23 31 @-webkit-filter 123 { } 24 32 PASS insertRuleException instanceof DOMException is true 25 PASS insertRuleException.code is 12 33 PASS insertRuleException.code is DOMException.SYNTAX_ERR 34 35 ======================================== 36 Filter at-rule body tests. 37 ======================================== 26 38 27 39 Missing rule body. 28 40 @-webkit-filter my-filter 29 41 PASS insertRuleException instanceof DOMException is true 30 PASS insertRuleException.code is 1242 PASS insertRuleException.code is DOMException.SYNTAX_ERR 31 43 32 44 Missing opening brace. 33 45 @-webkit-filter my-filter } 34 46 PASS insertRuleException instanceof DOMException is true 35 PASS insertRuleException.code is 1247 PASS insertRuleException.code is DOMException.SYNTAX_ERR 36 48 37 49 Missing closing brace. 38 50 @-webkit-filter my-filter { 39 51 PASS insertRuleException instanceof DOMException is true 40 PASS insertRuleException.code is 1252 PASS insertRuleException.code is DOMException.SYNTAX_ERR 41 53 PASS successfullyParsed is true 42 54 -
trunk/LayoutTests/css3/filters/custom-with-at-rule-syntax/parsing-at-rule-invalid.html
r142148 r142149 9 9 <div id="console"></div> 10 10 <script src="../script-tests/custom-filter-parsing-common.js"></script> 11 <script src=" ../script-tests/custom-filter-parsing-at-rule-valid.js"></script>11 <script src="script-tests/parsing-at-rule-invalid.js"></script> 12 12 <script src="../../../fast/js/resources/js-test-post.js"></script> 13 13 </body> -
trunk/LayoutTests/css3/filters/custom-with-at-rule-syntax/parsing-at-rule-valid.html
r142148 r142149 9 9 <div id="console"></div> 10 10 <script src="../script-tests/custom-filter-parsing-common.js"></script> 11 <script src=" ../script-tests/custom-filter-parsing-at-rule-invalid.js"></script>11 <script src="script-tests/parsing-at-rule-valid.js"></script> 12 12 <script src="../../../fast/js/resources/js-test-post.js"></script> 13 13 </body> -
trunk/LayoutTests/css3/filters/custom-with-at-rule-syntax/script-tests/parsing-at-rule-invalid.js
r142148 r142149 16 16 insertRuleException = e; 17 17 shouldBeTrue("insertRuleException instanceof DOMException"); 18 shouldEvaluateTo("insertRuleException.code", DOMException.SYNTAX_ERR)18 shouldEvaluateTo("insertRuleException.code", "DOMException.SYNTAX_ERR") 19 19 } 20 20 } 21 21 22 heading("Filter at-rule symbol tests."); 22 23 testInvalidFilterAtRule("Unprefixed rule.", "@filter my-filter { }"); 23 24 25 heading("Filter name tests."); 24 26 testInvalidFilterAtRule("Missing filter name identifier.", "@-webkit-filter { }"); 25 27 testInvalidFilterAtRule("Filter name as string.", "@-webkit-filter 'my-filter' { }"); 26 28 testInvalidFilterAtRule("Filter name as number.", "@-webkit-filter 123 { }"); 27 29 30 heading("Filter at-rule body tests."); 28 31 testInvalidFilterAtRule("Missing rule body.", "@-webkit-filter my-filter"); 29 32 testInvalidFilterAtRule("Missing opening brace.", "@-webkit-filter my-filter }"); -
trunk/LayoutTests/css3/filters/custom-with-at-rule-syntax/script-tests/parsing-at-rule-valid.js
r142148 r142149 14 14 // Check the rule's text and type. 15 15 cssRule = stylesheet.cssRules.item(0); 16 checkRule(expectedValue, CSSRule.WEBKIT_FILTER_RULE, "WebKitCSSFilterRule");16 checkRule(expectedValue, "CSSRule.WEBKIT_FILTER_RULE", "WebKitCSSFilterRule"); 17 17 18 18 // Check the rule's CSSStyleDeclaration properties. … … 36 36 37 37 cssRule = stylesheet.cssRules.item(0); 38 checkRule(parentExpectations.cssText, parentExpectations.ruleType, parentExpectations. jsType);38 checkRule(parentExpectations.cssText, parentExpectations.ruleType, parentExpectations.constructorName); 39 39 40 40 if (childExpectations) { 41 41 cssRule = cssRule.cssRules[0]; 42 checkRule(childExpectations.cssText, childExpectations.ruleType, childExpectations. jsType);42 checkRule(childExpectations.cssText, childExpectations.ruleType, childExpectations.constructorName); 43 43 44 44 for (var i = 0; i < cssRule.cssText.length; i++) { … … 50 50 51 51 // Checks the global "cssRule" against some expected properties. 52 function checkRule(expectedCSSText, expectedRuleType, expected JSType)52 function checkRule(expectedCSSText, expectedRuleType, expectedConstructorName) 53 53 { 54 54 shouldBeEqualToString("cssRule.cssText", expectedCSSText); 55 55 shouldEvaluateTo("cssRule.type", expectedRuleType); 56 should BeType("cssRule", expectedJSType);56 shouldHaveConstructor("cssRule", expectedConstructorName); 57 57 } 58 58 59 heading("Filter at-rule tests."); 59 60 testFilterAtRule("Empty rule, separated by single spaces.", 60 61 "@-webkit-filter my-filter { }", 61 62 "@-webkit-filter my-filter { }"); 62 63 63 testFilterAtRule("Empty rule, separated by multiple spaces.", 64 64 " @-webkit-filter my-filter { } ", 65 65 "@-webkit-filter my-filter { }"); 66 67 66 testFilterAtRule("Empty rule, no extra whitespace.", 68 67 "@-webkit-filter my-filter{}", 69 68 "@-webkit-filter my-filter { }"); 70 71 69 testFilterAtRule("Rule with arbitrary properties.", 72 70 "@-webkit-filter my-filter { width: 100px; height: 100px; }", … … 74 72 {width: "100px", height: "100px"}); 75 73 74 heading("Nested filter at-rule tests."); 76 75 testNestedRules("Nested rule.", 77 76 "@-webkit-filter parent-filter { @-webkit-filter child-filter { } }", … … 79 78 cssText: "@-webkit-filter parent-filter { }", 80 79 ruleType: CSSRule.WEBKIT_FILTER_RULE, 81 jsType: "WebKitCSSFilterRule"80 constructorName: "WebKitCSSFilterRule" 82 81 }); 83 84 82 testNestedRules("Twice nested rule.", 85 83 "@-webkit-filter parent-filter { @-webkit-filter child-filter { @-webkit-filter grandchild-filter } }", … … 87 85 cssText: "@-webkit-filter parent-filter { }", 88 86 ruleType: CSSRule.WEBKIT_FILTER_RULE, 89 jsType: "WebKitCSSFilterRule"87 constructorName: "WebKitCSSFilterRule" 90 88 }); 91 92 89 testNestedRules("Nested rule inside arbitrary rule.", 93 90 "@font-face { @-webkit-filter child-filter { } }", … … 95 92 cssText: "@font-face { }", 96 93 ruleType: CSSRule.FONT_FACE_RULE, 97 jsType: "CSSFontFaceRule"94 constructorName: "CSSFontFaceRule" 98 95 }); 99 100 96 testNestedRules("Nested rule inside media query.", 101 97 "@media screen { @-webkit-filter child-filter { } }", … … 103 99 cssText: "@media screen { \n @-webkit-filter child-filter { }\n}", 104 100 ruleType: CSSRule.MEDIA_RULE, 105 jsType: "CSSMediaRule",101 constructorName: "CSSMediaRule", 106 102 }, 107 103 { 108 104 cssText: "@-webkit-filter child-filter { }", 109 105 ruleType: CSSRule.WEBKIT_FILTER_RULE, 110 jsType: "WebKitCSSFilterRule",106 constructorName: "WebKitCSSFilterRule", 111 107 }); -
trunk/Source/WebCore/ChangeLog
r142148 r142149 1 2013-02-07 Max Vujovic <mvujovic@adobe.com> 2 3 [CSS Shaders] Add WebKitCSSFilterRule to DOMWindow.idl 4 https://bugs.webkit.org/show_bug.cgi?id=109082 5 6 Reviewed by Dean Jackson. 7 8 Add an entry for WebKitCSSFilterRuleConstructor in DOMWindow.idl. 9 10 Tests: css3/filters/custom-with-at-rule-syntax/parsing-at-rule-invalid.html 11 css3/filters/custom-with-at-rule-syntax/parsing-at-rule-valid.html 12 13 * page/DOMWindow.idl: 14 1 15 2013-02-07 Vsevolod Vlasov <vsevik@chromium.org> 2 16 -
trunk/Source/WebCore/page/DOMWindow.idl
r141578 r142149 336 336 337 337 #if defined(ENABLE_CSS_SHADERS) && ENABLE_CSS_SHADERS 338 attribute WebKitCSSFilterRuleConstructor WebKitCSSFilterRule; 338 339 attribute WebKitCSSMixFunctionValueConstructor WebKitCSSMixFunctionValue; 339 340 #endif
Note: See TracChangeset
for help on using the changeset viewer.