Web Inspector: Track CSS error location information.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Mar 2013 11:41:39 +0000 (11:41 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Mar 2013 11:41:39 +0000 (11:41 +0000)
commit0276cb810a365fb4dea158fc0c94c55b0246bfe5
treed4f77083c459a0c8affac47596738ad423480107
parent8e35ed12c747cbfb7e3085bb708e5b9b5e3ae98a
Web Inspector: Track CSS error location information.
https://bugs.webkit.org/show_bug.cgi?id=111314

Source/WebCore:

Added CSS syntax error reporting to some (other rules will be covered later) error recovery grammar rules.
Added code to CSSParser to allow track error location information.
Added empty rule to declaration_list. Needed to not report error about declarations like "body {}".
Added helper grammar rule "errors: error | errors error". Handles the same grammar as "error" but simplifies error location tracking.

Patch by Sergey Ryazanov <serya@chromium.org> on 2013-03-21
Reviewed by Pavel Feldman.

Test: inspector/console/console-css-warnings.html

* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::CSSParser):
(WebCore::CSSParser::currentLocation):
(WebCore):
(WebCore::CSSParser::realLex):
* css/CSSParser.h:
(CSSParser):

LayoutTests:

Patch by Sergey Ryazanov <serya@chromium.org> on 2013-03-21
Reviewed by Pavel Feldman.

* inspector/console/console-css-warnings-expected.txt: Added.
* inspector/console/console-css-warnings.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@146452 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/console/console-css-warnings-expected.txt [new file with mode: 0644]
LayoutTests/inspector/console/console-css-warnings.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSGrammar.y.in
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSParser.h