A UTF-8 BOM is not handled properly by the CSSParser (and it should never get through to it). Upstreaming http://code.google.com/p/chromium/issues/detail?id=78703
Created attachment 90917 [details] [PATCH] Suggested fix
Comment on attachment 90917 [details] [PATCH] Suggested fix View in context: https://bugs.webkit.org/attachment.cgi?id=90917&action=review > LayoutTests/inspector/styles/parse-utf8-bom.html:15 > + InspectorTest.dumpSelectedElementStyles(true, false, true); Can we be sure that the styles content is already loaded at this point?
(In reply to comment #2) > (From update of attachment 90917 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=90917&action=review > > > LayoutTests/inspector/styles/parse-utf8-bom.html:15 > > + InspectorTest.dumpSelectedElementStyles(true, false, true); > > Can we be sure that the styles content is already loaded at this point? Yes, all external stylesheets will have been loaded by the time window.onload fires.
Committed r84777: <http://trac.webkit.org/changeset/84777>
Comment on attachment 90917 [details] [PATCH] Suggested fix View in context: https://bugs.webkit.org/attachment.cgi?id=90917&action=review > Source/WebCore/inspector/InspectorStyleSheet.cpp:1061 > + success = resourceStyleSheetText(&rawText); You should instead fetch CachedResource, cast it to the Stylesheet and get decoded data.