FremyCompany / css-grid-polyfill

A working implementation of css grids for current browsers.
MIT License
1.11k stars 82 forks source link

Parsing invalid property names fails #9

Closed toresenneseth closed 9 years ago

toresenneseth commented 9 years ago

When parsing invalid css property names, for example *display, consumeAListOfDeclarations attempts calling reconsume() on the css parser instead of the TokenStream instance. Changed the code so that the call to reconsume() is called on the TokenStream instead.

However, I guess the real issue here is that invalid properties should be ignored by the parser entirely? Feel free to reject this PR if you think I've fixed the "wrong" issue!

FremyCompany commented 9 years ago

cc @tabatkins?

tabatkins commented 9 years ago

This is the correct fix; it was a typo on my part. "Invalid" properties (those that don't correspond to the basic grammar of a property) just cause the parser to enter error-recovery mode, and seek forward to the next semicolon or the end of the block contents.