Changeset 142640 in webkit
- Timestamp:
- Feb 12, 2013 10:40:48 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r142638 r142640 1 2013-02-12 Pablo Flouret <pablof@motorola.com> 2 3 Handle error recovery in @supports 4 https://bugs.webkit.org/show_bug.cgi?id=103934 5 6 Reviewed by Antti Koivisto. 7 8 * css3/supports-cssom.html: 9 * css3/supports-expected.txt: 10 * css3/supports.html: 11 1 12 2013-02-12 Emil A Eklund <eae@chromium.org> 2 13 -
trunk/LayoutTests/css3/supports-cssom.html
r139866 r142640 17 17 @supports (( ( padding: 0) and (display: none)) or (display: rainbow)) { 18 18 dfn { width:0; } 19 19 20 @supports (width: 0) { 20 21 br { height:0; } 21 22 } 23 24 /* Rules with syntax errors should be ignored. */ 25 @supports (display: none); 26 @supports (display: none)) ; 27 @supports; 28 @supports ; 29 @supports (display: none)) {} 30 @supports (display: )) {} 31 @supports ((display: none) and {} 32 @supports (display: none) {} 33 ); 34 @supports ((display: none) and ; 35 @supports (display: none) {} 36 ); 37 22 38 ol { display:none; } 23 39 } -
trunk/LayoutTests/css3/supports-expected.txt
r139866 r142640 41 41 PASS getComputedStyle(document.getElementById('t35')).content is "APPLIED" 42 42 PASS getComputedStyle(document.getElementById('t36')).content is "UNTOUCHED" 43 PASS getComputedStyle(document.getElementById('t37')).content is "APPLIED" 44 PASS getComputedStyle(document.getElementById('t38')).content is "APPLIED" 45 PASS getComputedStyle(document.getElementById('t39')).content is "APPLIED" 46 PASS getComputedStyle(document.getElementById('t40')).content is "APPLIED" 47 PASS getComputedStyle(document.getElementById('t41')).content is "APPLIED" 48 PASS getComputedStyle(document.getElementById('t42')).content is "APPLIED" 49 PASS getComputedStyle(document.getElementById('t43')).content is "UNTOUCHED" 50 PASS getComputedStyle(document.getElementById('t44')).content is "UNTOUCHED" 43 51 PASS successfullyParsed is true 44 52 -
trunk/LayoutTests/css3/supports.html
r139866 r142640 173 173 } 174 174 } 175 176 /* Invalid syntax error recovery */ 177 178 @supports (display: none); 179 @supports (display: none) and ( (display: none) ) { 180 #t37 { content: "APPLIED" } 181 } 182 183 @supports (display: none)) ; 184 @supports (display: none) { 185 #t38 { content: "APPLIED" } 186 } 187 188 @supports; 189 @supports (display: none) { 190 #t39 { content: "APPLIED" } 191 } 192 193 @supports ; 194 @supports (display: none) { 195 #t40 { content: "APPLIED" } 196 } 197 198 @supports (display: none)) { 199 #t41 { content: "FAIL" } 200 } 201 @supports (display: none) { 202 #t41 { content: "APPLIED" } 203 } 204 205 @supports (display: )) { 206 #t42 { content: "FAIL" } 207 } 208 @supports (display: none) { 209 #t42 { content: "APPLIED" } 210 } 211 212 @supports ((display: none) and { 213 #t43 { content: "FAIL" } 214 } 215 @supports (display: none) { 216 #t43 { content: "FAIL" } 217 } 218 ); 219 220 @supports ((display: none) and ; 221 @supports (display: none) { 222 #t44 { content: "FAIL" } 223 } 224 ); 225 175 226 </style> 176 227 </head> … … 180 231 <script> 181 232 description("Test the @supports rule."); 182 var numTests = 37;183 var untouchedTests = [1, 3, 5, 8, 12, 13, 14, 18, 28, 29, 34, 36 ]; // Tests whose content shouldn't change from the UNTOUCHED default.233 var numTests = 45; 234 var untouchedTests = [1, 3, 5, 8, 12, 13, 14, 18, 28, 29, 34, 36, 43, 44]; // Tests whose content shouldn't change from the UNTOUCHED default. 184 235 185 236 var container = document.getElementById("test_container"); -
trunk/Source/WebCore/ChangeLog
r142639 r142640 1 2013-02-12 Pablo Flouret <pablof@motorola.com> 2 3 Handle error recovery in @supports 4 https://bugs.webkit.org/show_bug.cgi?id=103934 5 6 Reviewed by Antti Koivisto. 7 8 Tests 021, 024, 031, and 033 in 9 http://hg.csswg.org/test/file/5f94e4b03ed9/contributors/opera/submitted/css3-conditional 10 fail because there's no explicit error recovery in @support's grammar. 11 Opera and Firefox pass the tests. 12 13 No new tests, modified css3/supports{,-cssom}.html 14 15 * css/CSSGrammar.y.in: 16 * css/CSSParser.cpp: 17 (WebCore::CSSParser::createSupportsRule): 18 (WebCore::CSSParser::markSupportsRuleHeaderEnd): 19 (WebCore::CSSParser::popSupportsRuleData): 20 * css/CSSParser.h: 21 1 22 2013-02-12 Eric Carlson <eric.carlson@apple.com> 2 23 -
trunk/Source/WebCore/css/CSSGrammar.y.in
r142021 r142640 250 250 %type <boolean> supports_disjunction 251 251 %type <boolean> supports_declaration_condition 252 %type <boolean> supports_error 252 253 #endif 253 254 … … 693 694 $$ = parser->createSupportsRule($4, $9); 694 695 } 695 ; 696 | before_supports_rule SUPPORTS_SYM supports_error { 697 parser->popRuleData(); 698 parser->popSupportsRuleData(); 699 } 700 ; 701 702 supports_error: 703 error ';' 704 | error invalid_block 696 705 697 706 before_supports_rule: … … 745 754 } 746 755 | supports_declaration_condition 756 | '(' error ')' 747 757 ; 748 758 -
trunk/Source/WebCore/css/CSSParser.cpp
r142168 r142640 10862 10862 m_allowImportRules = m_allowNamespaceDeclarations = false; 10863 10863 10864 ASSERT(!m_supportsRuleDataStack->isEmpty()); 10865 RefPtr<CSSRuleSourceData> data = m_supportsRuleDataStack->last(); 10866 m_supportsRuleDataStack->removeLast(); 10867 if (m_supportsRuleDataStack->isEmpty()) 10868 m_supportsRuleDataStack.clear(); 10869 10864 RefPtr<CSSRuleSourceData> data = popSupportsRuleData(); 10870 10865 RefPtr<StyleRuleSupports> rule; 10871 10866 String conditionText; … … 10904 10899 void CSSParser::markSupportsRuleHeaderEnd() 10905 10900 { 10906 ASSERT( !m_supportsRuleDataStack->isEmpty());10901 ASSERT(m_supportsRuleDataStack && !m_supportsRuleDataStack->isEmpty()); 10907 10902 10908 10903 if (is8BitSource()) … … 10911 10906 m_supportsRuleDataStack->last()->ruleHeaderRange.end = tokenStart<UChar>() - m_dataStart16.get(); 10912 10907 } 10908 10909 PassRefPtr<CSSRuleSourceData> CSSParser::popSupportsRuleData() 10910 { 10911 ASSERT(m_supportsRuleDataStack && !m_supportsRuleDataStack->isEmpty()); 10912 RefPtr<CSSRuleSourceData> data = m_supportsRuleDataStack->last(); 10913 m_supportsRuleDataStack->removeLast(); 10914 return data.release(); 10915 } 10916 10913 10917 #endif 10914 10918 -
trunk/Source/WebCore/css/CSSParser.h
r141480 r142640 301 301 void markSupportsRuleHeaderStart(); 302 302 void markSupportsRuleHeaderEnd(); 303 PassRefPtr<CSSRuleSourceData> popSupportsRuleData(); 303 304 #endif 304 305 #if ENABLE(SHADOW_DOM)
Note: See TracChangeset
for help on using the changeset viewer.