-
commit-queue@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=125637 Patch by Martin Hodovan <mhodovan@inf.u-szeged.hu> on 2013-12-18 Reviewed by Darin Adler. Source/WebCore: Error recovery in @media is broken if any of its rules misses the opening '{'. The problem is that when the parser recognises the mistake it removes only the last WHITESPACE token instead of the whole selector and tries to recover the selector again. it swallows everything until it finds the next opening bracket. thats why the '}' brackets of both subrules and even the @media rule are ignored, and the whole @media will be considered invalid. By joining the selector and its trailing whitespace the error recovery ignores the bad selector only and keep the @media rule. Test: fast/css/media-error-recovery.html * css/CSSGrammar.y.in: LayoutTests: Test with broken @media rule. * fast/css/media-error-recovery-expected.txt: Added. * fast/css/media-error-recovery.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160779 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1996569c