Changeset 150791 in webkit
- Timestamp:
- May 28, 2013 12:21:02 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r150776 r150791 1 2013-05-28 Sergio Villar Senin <svillar@igalia.com> 2 3 Web Inspector: Enable CSS logging 4 https://bugs.webkit.org/show_bug.cgi?id=113401 5 6 Reviewed by Benjamin Poulain. 7 8 From Blink r149265 by <serya@chromium.org> 9 10 Unskipped console-css-warnings.html now that it's working. 11 12 * TestExpectations: 13 1 14 2013-05-27 Claudio Saavedra <csaavedra@igalia.com> 2 15 -
trunk/LayoutTests/TestExpectations
r150579 r150791 9 9 webkit.org/b/109570 media/track/regions-webvtt [ Skip ] 10 10 11 # pending CSS grammar refactoring12 webkit.org/b/113401 inspector/console/console-css-warnings.html [ Skip ]13 14 11 # media/video-seek-after-end.html is flaky 15 12 webkit.org/b/116293 media/video-seek-after-end.html [ Pass Failure ] -
trunk/Source/WebCore/ChangeLog
r150789 r150791 1 2013-05-28 Sergio Villar Senin <svillar@igalia.com> 2 3 Web Inspector: Enable CSS logging 4 https://bugs.webkit.org/show_bug.cgi?id=113401 5 6 Reviewed by Benjamin Poulain. 7 8 From Blink r149265 by <serya@chromium.org> 9 10 CSS logging was disabled in r147028 to prevent message overflow in 11 the inspector console. This change restores it by modifying the 12 CSS grammar in order to reduce as much consecutive errors as 13 possible in 'declaration_list' and 'decl_list' rules. 14 15 This way, for rules like 'x { color: ### }' only the first '#' 16 will be reported as error (instead of 3 identical errors). 17 18 The rule 'declaration' still produces multiple errors, because it 19 does not eat as much errors as possible. So in order not to create 20 a complex risky patch we just disable logging in the parser for 21 that rule. 22 23 * css/CSSGrammar.y.in: 24 * css/CSSParser.cpp: 25 (WebCore::CSSParser::CSSParser): 26 (WebCore::CSSParser::parseSheet): 27 (WebCore::CSSParser::syntaxError): 28 (WebCore::CSSParser::isLoggingErrors): 29 (WebCore::CSSParser::rewriteSpecifiers): 30 * css/CSSParser.h: 31 (CSSParser): 32 1 33 2013-05-27 Patrick Gansterer <paroga@webkit.org> 2 34 -
trunk/Source/WebCore/css/CSSGrammar.y.in
r150682 r150791 1533 1533 $$ = $1; 1534 1534 } 1535 | errors decl_list_recovery { 1536 parser->syntaxError($1, CSSParser::PropertyDeclarationError); 1535 | decl_list_recovery { 1537 1536 $$ = false; 1538 1537 } 1539 | decl_list errors decl_list_recovery { 1540 parser->syntaxError($2, CSSParser::PropertyDeclarationError); 1538 | decl_list decl_list_recovery { 1541 1539 $$ = $1; 1542 1540 } … … 1556 1554 $$ = false; 1557 1555 } 1558 | errors decl_list_recovery ';' maybe_space { 1559 parser->syntaxError($1, CSSParser::PropertyDeclarationError); 1556 | decl_list_recovery ';' maybe_space { 1560 1557 parser->markPropertyStart(); 1561 1558 $$ = false; … … 1567 1564 $$ = $2; 1568 1565 } 1569 | decl_list errors decl_list_recovery ';' maybe_space { 1566 | decl_list decl_list_recovery ';' maybe_space { 1567 parser->markPropertyStart(); 1568 $$ = $1; 1569 } 1570 ; 1571 1572 decl_list_recovery: 1573 error error_location { 1570 1574 parser->syntaxError($2, CSSParser::PropertyDeclarationError); 1571 parser->markPropertyStart(); 1572 $$ = $1; 1573 } 1574 ; 1575 1576 decl_list_recovery: 1577 invalid_block_list error 1578 | /* empty */ 1575 } 1576 | decl_list_recovery invalid_block 1577 | decl_list_recovery error 1579 1578 ; 1580 1579 -
trunk/Source/WebCore/css/CSSParser.cpp
r150776 r150791 325 325 , m_hadSyntacticallyValidCSSRule(false) 326 326 , m_logErrors(false) 327 , m_ignoreErrorsInDeclaration(false) 327 328 #if ENABLE(CSS_SHADERS) 328 329 , m_inFilterRule(false) … … 461 462 462 463 m_logErrors = logErrors && sheet->singleOwnerDocument() && !sheet->baseURL().isEmpty() && sheet->singleOwnerDocument()->page(); 464 m_ignoreErrorsInDeclaration = false; 463 465 m_lineNumber = startLineNumber; 464 466 setupParser("", string, ""); … … 468 470 m_ruleSourceDataResult = 0; 469 471 m_rule = 0; 472 m_ignoreErrorsInDeclaration = false; 470 473 m_logErrors = false; 471 474 } … … 11499 11502 11500 11503 logError(builder.toString(), location.lineNumber); 11504 11505 m_ignoreErrorsInDeclaration = true; 11501 11506 } 11502 11507 11503 11508 bool CSSParser::isLoggingErrors() 11504 11509 { 11505 // FIXME: return logging back (https://bugs.webkit.org/show_bug.cgi?id=113401). 11506 return false; 11510 return m_logErrors && !m_ignoreErrorsInDeclaration; 11507 11511 } 11508 11512 … … 11950 11954 void CSSParser::markPropertyStart() 11951 11955 { 11956 m_ignoreErrorsInDeclaration = false; 11952 11957 if (!isExtractingSourceData()) 11953 11958 return; -
trunk/Source/WebCore/css/CSSParser.h
r150734 r150791 398 398 bool m_hadSyntacticallyValidCSSRule; 399 399 bool m_logErrors; 400 bool m_ignoreErrorsInDeclaration; 400 401 401 402 #if ENABLE(CSS_SHADERS)
Note: See TracChangeset
for help on using the changeset viewer.