|Summary:||WebKit needs to log CSS errors (like FireFox & FireBug do)|
|Product:||WebKit||Reporter:||Eric Seidel (no email) <eric>|
|Severity:||Normal||CC:||ap, aroben, bburg, dev+webkit, hyatt, mrowe, nickshanks, simon.fraser|
|OS:||OS X 10.4|
|Bug Depends on:|
Description Eric Seidel (no email) 2006-07-01 22:40:05 PDT
WebKit needs to be able to log CSS errors (like FireFox & FireBug do) These should be logged any time a declaration is dropped, or a value is ignored.
Comment 1 Eric Seidel (no email) 2006-09-18 20:33:02 PDT
Comment 2 Dave Hyatt 2006-09-18 21:48:48 PDT
Errors basically break down into two classes I think... (1) Errors that bison would catch, e.g., bad tokens, bad combinations, etc. (2) Errors that cssparser.cpp would catch, i.e., grammatically well-formed properties that are simply illegal (wrong unit types, wrong # of arguments, etc.) (1) is pretty hard, since we often don't even handle those errors well for real. :) (2) is easier and probably where you'd get more bang for your buck anyway.
Comment 4 Eric Seidel (no email) 2006-12-24 07:40:54 PST
Created attachment 12000 [details] A hack to make this possible I don't really expect anyone to take this patch seriously. However it does address the issue at hand (and hopefully could start some small dialog on the subject).
Comment 5 Alexey Proskuryakov 2006-12-24 07:56:08 PST
Do we also want to distinguish errors, warnings and messages, as Firefox does?
Comment 6 Alexey Proskuryakov 2006-12-24 08:22:43 PST
Actually, this patch seems to match bug 10361 better.
Comment 7 Geoffrey Garen 2006-12-24 13:18:10 PST
Doesn't this patch mean "only log JS errors?"
Comment 8 Eric Seidel (no email) 2006-12-24 16:36:40 PST
Personally, I find Firefox's logging system a bit overly geeky. The point of only logging JS errors in my hack-patch, was to maintain the status-quo, as logging more than that might be a "UI decision".
Comment 9 Darin Adler 2006-12-27 22:38:29 PST
Comment on attachment 12000 [details] A hack to make this possible This doesn't seem necessary. I suggest we start logging more on the console, and later add levels and/or types based on our experience using the console.
Comment 10 Timothy Hatcher 2008-07-19 14:26:03 PDT
*** Bug 14358 has been marked as a duplicate of this bug. ***
Comment 11 Brian Burg 2014-01-12 15:03:05 PST
CSS errors and warnings are logged to console and highlighted in the CSS text editor in the current inspector.
Comment 12 Simon Fraser (smfr) 2014-01-12 22:13:52 PST
But not nearly enough of them. I think we only log syntax errors, right, and then only property names? What about: * invalid values * meaningless combinations of properties (e.g. z-index on non-positioned) * things with perf impact (negative text-indent without overflow:hidden)
Comment 13 Brian Burg 2014-01-13 09:06:42 PST
Some invalid values are shown as crossed out in the CSS details sidebar, IIRC. The other things sound like audits to me. (I agree we need new audits, but each one in a separate bug.) In any case, I'm not sure that blasting the console with these errors/warnings is the right thing to do. Even with just parse errors today, the console gets filled with junk on popular websites.