When someone opens the inspector after loading a page, no HTML errors are reported. One could think there's no error on the page. I think it's counter productive for web developers. Steps to reproduce: 1) Open the testcase 2) Open the console Actual results: No error reported Result expected: "Unmatched </div> encountered. Ignoring tag. testcase.html (line 10)"
Created attachment 22752 [details] Testcase
If we don't want to run the HTML error code when the inspector is closed, we should at least give hints to the developers. A tooltip in the console saying "Reload the page if you want to check HTML errors".
Javascript errors are shown, right? It's just HTML errors that aren't? I feel like we should be consistent.
(In reply to comment #3) > Javascript errors are shown, right? It's just HTML errors that aren't? I feel > like we should be consistent. HTMLDocument.cpp Tokenizer *HTMLDocument::createTokenizer() { bool reportErrors = false; #if ENABLE(INSPECTOR) if (Page* page = this->page()) reportErrors = page->inspectorController()->windowVisible(); #endif return new HTMLTokenizer(this, reportErrors); } Who wants to hardcode 'true' under #if ENABLE(INSPECTOR)?
I can write the patch, I feel like this is the right way to go.
Oh, this bug doesn't trace Hyatt's comments. He thinks the overhead is too important to enable that all the time. Hence my proposition for a tooltip.
Oh, I missed that. (In reply to comment #6) > Oh, this bug doesn't trace Hyatt's comments. He thinks the overhead is too > important to enable that all the time. Hence my proposition for a tooltip. Oh, that seems fair. I didn't see a duplicate of the bug with Hyatt's comments. How do you think the tooltip should look?
A simple log like the XHR feedback seems ok. Maybe we want a warning so that the user sees it in the status bar.
My thoughts: The console has a special log, that has a yellow background and text like Rik mentioned. And a reload button in there. Basically like a banner row thing. See it?
I don't think it should be a warning that counds in the status bar.
(In reply to comment #9) > My thoughts: The console has a special log, that has a yellow background and > text like Rik mentioned. And a reload button in there. > > Basically like a banner row thing. See it? The banner idea works, but I feel like we should do something with this only if there is an error. If there is some way we can track whether or not an error occurred parsing, and not show this bar every time. I don't think we should spam the user to reload a page on the possibility there might be an error.
We could add a cheap way for the parser to say when a warning/error occurred. If we do that, then we should show it in the count in the corner.
I don't think WebCore forwards any errors from the HTML5 parser. Should it? I don't know what any of these errors would look like.
<rdar://problem/15801394>
IIRC the HTML errors mentioned here have long been removed from the parser.