Inspector crashes when trying to inspect a page with CSS region styling
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jul 2012 10:08:45 +0000 (10:08 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jul 2012 10:08:45 +0000 (10:08 +0000)
commit118baebcd30c775db723c25adefdb7dd1e4beded
treef2bfb26ba069d81f2cc429f9cb1b625fb715edaa
parent3b5c96e1d0415b741fe39ba351f6e348ba71dd2b
Inspector crashes when trying to inspect a page with CSS region styling
https://bugs.webkit.org/show_bug.cgi?id=91503

Patch by Raul Hudea <rhudea@adobe.com> on 2012-07-31
Reviewed by Alexander Pavlov.

Source/WebCore:

Fix by making sure a CSSRuleSourceData is always created when parsing @-webkit-region rules.

Test: inspector/styles/region-style-crash.html

* css/CSSGrammar.y: Made ruleset called explicitly markRuleBodyStart instead of depending on updateLastSelectorLineAndPosition to call it.
* css/CSSParser.cpp:
(WebCore::CSSParser::updateLastSelectorLineAndPosition): markRuleBodyStart should be called via at_rule_body_start.
* css/CSSPropertySourceData.h:

LayoutTests:

Test to make sure inspector is not crashing when having to parse @-webkit-region rules

* inspector/styles/region-style-crash-expected.txt: Added.
* inspector/styles/region-style-crash.html: Added.
* platform/chromium/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@124186 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/styles/region-style-crash-expected.txt [new file with mode: 0644]
LayoutTests/inspector/styles/region-style-crash.html [new file with mode: 0644]
LayoutTests/platform/chromium/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/css/CSSGrammar.y
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSPropertySourceData.h